index int64 0 66.5k | func_name stringlengths 2 5.36k | func_dep stringlengths 16 2.19k | func stringlengths 8 55.3k | test stringlengths 0 7.07k | opt stringclasses 4
values | language stringclasses 2
values | asm stringlengths 0 45.4k | ida_asm stringlengths 0 44.7k | ida_pseudo stringlengths 0 44.3k | ghidra_asm stringlengths 0 49.1k | ghidra_pseudo stringlengths 0 64.7k |
|---|---|---|---|---|---|---|---|---|---|---|---|
1,382 | func0 |
#include <cassert>
| int func0(int n, int k) {
if (n == 0 && k == 0) {
return 1;
}
if (k == 0) {
return 0;
}
return func0(n, k - 1) + func0(n - 1, n - k);
}
| int main() {
assert(func0(4, 3) == 5);
assert(func0(4, 2) == 4);
assert(func0(3, 1) == 1);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
mov %edi,%eax
push %r12
or %esi,%eax
push %rbp
push %rbx
je 1258 <_Z5func0ii+0x58>
mov %esi,%ebx
test %esi,%esi
je 1270 <_Z5func0ii+0x70>
mov %edi,%ebp
xor %r12d,%r12d
lea -0x1(%rbx),%esi
mov %ebp,%edi
callq 1200 <_Z5func0ii>
mov %ebp,%edx
sub $0x1,%... | _Z5func0ii:
endbr64
push r15
mov eax, edi
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
or eax, esi
jz loc_1741
mov ebp, esi
test esi, esi
jz loc_1537
xor r14d, r14d
mov ebx, edi
loc_122B:
lea r15d, [rbp-1]
mov eax, r15d
or eax, ebx
jz ... | long long func0(int a1, unsigned int a2)
{
unsigned int v2; // ebp
unsigned int v3; // r14d
int v4; // ebx
int v5; // r15d
unsigned int v6; // esi
int v7; // r13d
int v8; // eax
int v9; // ebp
unsigned int v10; // r9d
int v11; // r12d
int v12; // ebx
int v13; // r8d
int v14; // r13d
int v15... | func0:
ENDBR64
PUSH R15
MOV EAX,EDI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
OR EAX,ESI
JZ 0x00101741
MOV EBP,ESI
TEST ESI,ESI
JZ 0x00101537
XOR R14D,R14D
MOV EBX,EDI
LAB_0010122b:
LEA R15D,[RBP + -0x1]
MOV EAX,R15D
OR EAX,EBX
JZ 0x00101728
TEST R15D,R15D
JZ 0x0010151b
LAB_00101243:
MOV dword ptr [RSP ... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
int iVar16;
int iVar17;
int iVar18;
int iVar19;
... |
1,383 | func0 |
#include <cassert>
| int func0(int n, int k) {
if (n == 0 && k == 0) {
return 1;
}
if (k == 0) {
return 0;
}
return func0(n, k - 1) + func0(n - 1, n - k);
}
| int main() {
assert(func0(4, 3) == 5);
assert(func0(4, 2) == 4);
assert(func0(3, 1) == 1);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
mov %edi,%eax
push %r12
or %esi,%eax
push %rbp
push %rbx
je 1258 <_Z5func0ii+0x58>
mov %esi,%ebx
test %esi,%esi
je 1270 <_Z5func0ii+0x70>
mov %edi,%ebp
xor %r12d,%r12d
lea -0x1(%rbx),%esi
mov %ebp,%edi
callq 1200 <_Z5func0ii>
mov %ebp,%edx
sub $0x1,%... | _Z5func0ii:
endbr64
push r15
mov eax, edi
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
or eax, esi
jz loc_1741
mov ebp, esi
test esi, esi
jz loc_1537
xor r14d, r14d
mov ebx, edi
loc_122B:
lea r15d, [rbp-1]
mov eax, r15d
or eax, ebx
jz ... | long long func0(int a1, unsigned int a2)
{
unsigned int v2; // ebp
unsigned int v3; // r14d
int v4; // ebx
int v5; // r15d
unsigned int v6; // esi
int v7; // r13d
int v8; // eax
int v9; // ebp
unsigned int v10; // r9d
int v11; // r12d
int v12; // ebx
int v13; // r8d
int v14; // r13d
int v15... | func0:
ENDBR64
PUSH R15
MOV EAX,EDI
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
OR EAX,ESI
JZ 0x00101741
MOV EBP,ESI
TEST ESI,ESI
JZ 0x00101537
XOR R14D,R14D
MOV EBX,EDI
LAB_0010122b:
LEA R15D,[RBP + -0x1]
MOV EAX,R15D
OR EAX,EBX
JZ 0x00101728
TEST R15D,R15D
JZ 0x0010151b
LAB_00101243:
MOV dword ptr [RSP ... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
int iVar13;
int iVar14;
int iVar15;
int iVar16;
int iVar17;
int iVar18;
int iVar19;
... |
1,384 | func0 |
#include <assert.h>
| int func0(int m, int n) {
if (n < m) {
int temp = m;
m = n;
n = temp;
}
return (n * (n + 1) * (3 * m - n + 1)) / 6;
}
| int main() {
assert(func0(4, 3) == 20);
assert(func0(1, 2) == 2);
assert(func0(2, 2) == 5);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x18(%rbp),%eax
cmp -0x14(%rbp),%eax
jge 1171 <_Z5func0ii+0x28>
mov -0x14(%rbp),%eax
mov %eax,-0x4(%rbp)
mov -0x18(%rbp),%eax
mov %eax,-0x14(%rbp)
mov -0x4(%rbp),%eax
mov %eax,-0x18(%rbp... | _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov eax, [rbp+var_18]
cmp eax, [rbp+var_14]
jge short loc_1171
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
mov eax, [rbp+var_18]
mov [rbp+var_14], eax
mov eax, [rbp+var_4]
mov [rbp+var... | long long func0(int a1, int a2)
{
int v3; // [rsp+0h] [rbp-18h]
int v4; // [rsp+4h] [rbp-14h]
v4 = a1;
v3 = a2;
if ( a2 < a1 )
{
v4 = a2;
v3 = a1;
}
return (unsigned int)(v3 * (v3 + 1) * (3 * v4 - v3 + 1) / 6);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EAX,dword ptr [RBP + -0x18]
CMP EAX,dword ptr [RBP + -0x14]
JGE 0x00101171
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ... | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int4 local_20;
int4 local_1c;
local_20 = param_2;
local_1c = param_1;
if (param_2 < param_1) {
local_20 = param_1;
local_1c = param_2;
}
return (((local_1c * 3 - local_20) + 1) * (local_20 + 1) * local_20) / 6;
} |
1,385 | func0 |
#include <assert.h>
| int func0(int m, int n) {
if (n < m) {
int temp = m;
m = n;
n = temp;
}
return (n * (n + 1) * (3 * m - n + 1)) / 6;
}
| int main() {
assert(func0(4, 3) == 20);
assert(func0(1, 2) == 2);
assert(func0(2, 2) == 5);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
mov %esi,%eax
cmp %edi,%esi
jge 1159 <_Z5func0ii+0x10>
mov %edi,%edx
mov %esi,%edi
mov %edx,%eax
lea (%rdi,%rdi,2),%esi
sub %eax,%esi
add $0x1,%esi
lea 0x1(%rax),%edx
imul %edx,%eax
imul %eax,%esi
movslq %esi,%rax
imul $0x2aaaaaab,%rax,%rax
shr $0x20,%rax
... | _Z5func0ii:
endbr64
mov eax, edi
cmp esi, edi
jl short loc_1159
mov edx, esi
mov esi, edi
mov eax, edx
loc_1159:
lea edi, [rsi+rsi*2]
sub edi, eax
add edi, 1
lea edx, [rax+1]
imul eax, edx
imul edi, eax
movsxd rax, edi
imul rax, 2AAAAAABh
shr rax, 20h
sar edi, ... | long long func0(int a1, int a2)
{
int v2; // eax
int v3; // edx
v2 = a1;
if ( a2 >= a1 )
{
v3 = a2;
a2 = a1;
v2 = v3;
}
return (unsigned int)((v2 + 1) * v2 * (3 * a2 - v2 + 1) / 6);
} | func0:
ENDBR64
MOV EAX,EDI
CMP ESI,EDI
JL 0x00101159
MOV EDX,ESI
MOV ESI,EDI
MOV EAX,EDX
LAB_00101159:
LEA EDI,[RSI + RSI*0x2]
SUB EDI,EAX
ADD EDI,0x1
LEA EDX,[RAX + 0x1]
IMUL EAX,EDX
IMUL EDI,EAX
MOVSXD RAX,EDI
IMUL RAX,RAX,0x2aaaaaab
SHR RAX,0x20
SAR EDI,0x1f
SUB EAX,EDI
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2;
if (param_1 <= param_2) {
iVar1 = param_1;
param_1 = param_2;
}
return (((iVar1 * 3 - param_1) + 1) * param_1 * (param_1 + 1)) / 6;
} |
1,386 | func0 |
#include <assert.h>
| int func0(int m, int n) {
if (n < m) {
int temp = m;
m = n;
n = temp;
}
return (n * (n + 1) * (3 * m - n + 1)) / 6;
}
| int main() {
assert(func0(4, 3) == 20);
assert(func0(1, 2) == 2);
assert(func0(2, 2) == 5);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
mov %esi,%eax
cmp %edi,%esi
jge 1150 <_Z5func0ii+0x10>
mov %edi,%edx
mov %esi,%edi
mov %edx,%eax
lea (%rdi,%rdi,2),%esi
lea 0x1(%rax),%edx
sub %eax,%esi
imul %edx,%eax
add $0x1,%esi
imul %eax,%esi
movslq %esi,%rax
sar $0x1f,%esi
imul $0x2aaaaaab,%rax,%rax
... | _Z5func0ii:
endbr64
mov eax, edi
cmp esi, edi
jl short loc_1150
mov edx, esi
mov esi, edi
mov eax, edx
loc_1150:
lea edi, [rsi+rsi*2]
lea edx, [rax+1]
sub edi, eax
imul eax, edx
add edi, 1
imul edi, eax
movsxd rax, edi
sar edi, 1Fh
imul rax, 2AAAAAABh
shr rax, ... | long long func0(int a1, int a2)
{
int v2; // eax
int v3; // edx
v2 = a1;
if ( a2 >= a1 )
{
v3 = a2;
a2 = a1;
v2 = v3;
}
return (unsigned int)((v2 + 1) * v2 * (3 * a2 - v2 + 1) / 6);
} | func0:
ENDBR64
MOV EAX,EDI
CMP ESI,EDI
JL 0x00101150
MOV EDX,ESI
MOV ESI,EDI
MOV EAX,EDX
LAB_00101150:
LEA EDI,[RSI + RSI*0x2]
LEA EDX,[RAX + 0x1]
SUB EDI,EAX
IMUL EAX,EDX
ADD EDI,0x1
IMUL EDI,EAX
MOVSXD RAX,EDI
SAR EDI,0x1f
IMUL RAX,RAX,0x2aaaaaab
SHR RAX,0x20
SUB EAX,EDI
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2;
if (param_1 <= param_2) {
iVar1 = param_1;
param_1 = param_2;
}
return (((iVar1 * 3 - param_1) + 1) * param_1 * (param_1 + 1)) / 6;
} |
1,387 | func0 |
#include <assert.h>
| int func0(int m, int n) {
if (n < m) {
int temp = m;
m = n;
n = temp;
}
return (n * (n + 1) * (3 * m - n + 1)) / 6;
}
| int main() {
assert(func0(4, 3) == 20);
assert(func0(1, 2) == 2);
assert(func0(2, 2) == 5);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
mov %esi,%eax
cmp %edi,%esi
jge 1150 <_Z5func0ii+0x10>
mov %edi,%edx
mov %esi,%edi
mov %edx,%eax
lea (%rdi,%rdi,2),%esi
lea 0x1(%rax),%edx
sub %eax,%esi
imul %edx,%eax
add $0x1,%esi
imul %eax,%esi
movslq %esi,%rax
sar $0x1f,%esi
imul $0x2aaaaaab,%rax,%rax
... | _Z5func0ii:
endbr64
mov eax, edi
cmp esi, edi
jl short loc_1150
mov edx, esi
mov esi, edi
mov eax, edx
loc_1150:
lea edi, [rsi+rsi*2]
lea edx, [rax+1]
sub edi, eax
imul eax, edx
add edi, 1
imul edi, eax
movsxd rax, edi
sar edi, 1Fh
imul rax, 2AAAAAABh
shr rax, ... | long long func0(int a1, int a2)
{
int v2; // eax
int v3; // edx
v2 = a1;
if ( a2 >= a1 )
{
v3 = a2;
a2 = a1;
v2 = v3;
}
return (unsigned int)((v2 + 1) * v2 * (3 * a2 - v2 + 1) / 6);
} | func0:
ENDBR64
MOV EAX,EDI
CMP ESI,EDI
JL 0x00101150
MOV EDX,ESI
MOV ESI,EDI
MOV EAX,EDX
LAB_00101150:
LEA EDI,[RSI + RSI*0x2]
LEA EDX,[RAX + 0x1]
SUB EDI,EAX
IMUL EAX,EDX
ADD EDI,0x1
IMUL EDI,EAX
MOVSXD RAX,EDI
SAR EDI,0x1f
IMUL RAX,RAX,0x2aaaaaab
SHR RAX,0x20
SUB EAX,EDI
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
int iVar1;
iVar1 = param_2;
if (param_1 <= param_2) {
iVar1 = param_1;
param_1 = param_2;
}
return (((iVar1 * 3 - param_1) + 1) * param_1 * (param_1 + 1)) / 6;
} |
1,388 | func0 |
#include <cassert>
int bin_coff(int n, int r) {
int val = 1;
if (r > (n - r))
r = (n - r);
for (int i = 0; i < r; ++i) {
val *= (n - i);
val /= (i + 1);
}
return val;
}
| int func0(int M) {
int n = M / 2;
int a = bin_coff(2 * n, n);
int b = a / (n + 1);
return b;
}
| int main() {
assert(func0(4) == 2);
assert(func0(6) == 5);
assert(func0(8) == 14);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x18,%rsp
mov %edi,-0x14(%rbp)
mov -0x14(%rbp),%eax
mov %eax,%edx
shr $0x1f,%edx
add %edx,%eax
sar %eax
mov %eax,-0xc(%rbp)
mov -0xc(%rbp),%eax
lea (%rax,%rax,1),%edx
mov -0xc(%rbp),%eax
mov %eax,%esi
mov %edx,%edi
callq 1149 ... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 18h
mov [rbp+var_14], edi
mov eax, [rbp+var_14]
mov edx, eax
shr edx, 1Fh
add eax, edx
sar eax, 1
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
lea edx, [rax+rax]
mov eax, [rbp+var_C]
mov esi, eax; int
mov edi, edx;... | long long func0(int a1)
{
return (unsigned int)((int)bin_coff(2 * (a1 / 2), a1 / 2) / (a1 / 2 + 1));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x18
MOV dword ptr [RBP + -0x14],EDI
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
SHR EDX,0x1f
ADD EAX,EDX
SAR EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
LEA EDX,[RAX + RAX*0x1]
MOV EAX,dword ptr [RBP + -0xc]
MOV ESI,EAX
MOV EDI,EDX
CALL 0x00101149
M... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
iVar1 = param_1 / 2;
iVar2 = bin_coff(iVar1 * 2,iVar1);
return iVar2 / (iVar1 + 1);
} |
1,389 | func0 |
#include <cassert>
int bin_coff(int n, int r) {
int val = 1;
if (r > (n - r))
r = (n - r);
for (int i = 0; i < r; ++i) {
val *= (n - i);
val /= (i + 1);
}
return val;
}
| int func0(int M) {
int n = M / 2;
int a = bin_coff(2 * n, n);
int b = a / (n + 1);
return b;
}
| int main() {
assert(func0(4) == 2);
assert(func0(6) == 5);
assert(func0(8) == 14);
return 0;
}
| O1 | cpp | func0(int):
endbr64
push %rbx
mov %edi,%eax
shr $0x1f,%eax
lea (%rax,%rdi,1),%edi
mov %edi,%ebx
sar %ebx
and $0xfffffffe,%edi
mov %ebx,%esi
callq 1149 <_Z8bin_coffii>
add $0x1,%ebx
cltd
idiv %ebx
pop %rbx
retq
| _Z5func0i:
endbr64
push rbx
mov eax, edi
shr eax, 1Fh
lea edi, [rax+rdi]
mov ebx, edi
sar ebx, 1
and edi, 0FFFFFFFEh; int
mov esi, ebx; int
call _Z8bin_coffii; bin_coff(int,int)
add ebx, 1
cdq
idiv ebx
pop rbx
retn | long long func0(unsigned int a1)
{
return (unsigned int)((int)bin_coff(((a1 >> 31) + a1) & 0xFFFFFFFE, (int)a1 / 2) / ((int)a1 / 2 + 1));
} | func0:
ENDBR64
PUSH RBX
MOV EAX,EDI
SHR EAX,0x1f
LEA EDI,[RAX + RDI*0x1]
MOV EBX,EDI
SAR EBX,0x1
AND EDI,0xfffffffe
MOV ESI,EBX
CALL 0x00101149
ADD EBX,0x1
CDQ
IDIV EBX
POP RBX
RET | /* func0(int) */
int [16] func0(int param_1)
{
long lVar1;
int iVar2;
int auVar3 [16];
iVar2 = bin_coff(param_1 - (param_1 >> 0x1f) & 0xfffffffe,param_1 / 2);
lVar1 = (long)(param_1 / 2 + 1);
auVar3._0_8_ = (long)iVar2 / lVar1 & 0xffffffff;
auVar3._8_8_ = (long)iVar2 % lVar1 & 0xffffffff;
return a... |
1,390 | func0 |
#include <cassert>
int bin_coff(int n, int r) {
int val = 1;
if (r > (n - r))
r = (n - r);
for (int i = 0; i < r; ++i) {
val *= (n - i);
val /= (i + 1);
}
return val;
}
| int func0(int M) {
int n = M / 2;
int a = bin_coff(2 * n, n);
int b = a / (n + 1);
return b;
}
| int main() {
assert(func0(4) == 2);
assert(func0(6) == 5);
assert(func0(8) == 14);
return 0;
}
| O2 | cpp | func0(int):
endbr64
mov %edi,%eax
shr $0x1f,%eax
lea (%rax,%rdi,1),%esi
mov $0x1,%eax
mov %esi,%r8d
and $0xfffffffe,%esi
sar %r8d
mov %esi,%edi
sub %r8d,%edi
cmp %r8d,%edi
cmovg %r8d,%edi
test %edi,%edi
jle 11c1 <_Z5func0i+0x41>
xor %ecx,%ecx
nopl 0x0(%rax)
mov %esi,%edx
sub ... | _Z5func0i:
endbr64
mov esi, edi
shr esi, 1Fh
add esi, edi
sar esi, 1
cmp edi, 1
jle short loc_11C0
lea edi, [rsi+rsi]
mov eax, 1
xor ecx, ecx
nop dword ptr [rax+00h]
loc_11A0:
mov edx, edi
sub edx, ecx
add ecx, 1
imul eax, edx
cdq
idiv ecx
cmp esi, ecx
jnz ... | long long func0(int a1)
{
int v1; // esi
int v2; // eax
int v3; // ecx
int v4; // edx
v1 = a1 / 2;
if ( a1 <= 1 )
return (unsigned int)(1 / (v1 + 1));
v2 = 1;
v3 = 0;
do
{
v4 = 2 * v1 - v3++;
v2 = v4 * v2 / v3;
}
while ( v1 != v3 );
return (unsigned int)(v2 / (v1 + 1));
} | func0:
ENDBR64
MOV ESI,EDI
SHR ESI,0x1f
ADD ESI,EDI
SAR ESI,0x1
CMP EDI,0x1
JLE 0x001011c0
LEA EDI,[RSI + RSI*0x1]
MOV EAX,0x1
XOR ECX,ECX
NOP dword ptr [RAX]
LAB_001011a0:
MOV EDX,EDI
SUB EDX,ECX
ADD ECX,0x1
IMUL EAX,EDX
CDQ
IDIV ECX
CMP ESI,ECX
JNZ 0x001011a0
ADD ESI,0x1
CDQ
IDIV ESI
RET
LAB_001011c0:
MOV EAX,0x1
ADD... | /* func0(int) */
int [16] func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int auVar5 [16];
int auVar6 [16];
iVar4 = param_1 / 2;
if (1 < param_1) {
iVar1 = 1;
iVar2 = 0;
do {
iVar3 = iVar4 * 2 - iVar2;
iVar2 = iVar2 + 1;
iVar1 = (iVar1 * iVar3) / iVar... |
1,391 | func0 |
#include <cassert>
int bin_coff(int n, int r) {
int val = 1;
if (r > (n - r))
r = (n - r);
for (int i = 0; i < r; ++i) {
val *= (n - i);
val /= (i + 1);
}
return val;
}
| int func0(int M) {
int n = M / 2;
int a = bin_coff(2 * n, n);
int b = a / (n + 1);
return b;
}
| int main() {
assert(func0(4) == 2);
assert(func0(6) == 5);
assert(func0(8) == 14);
return 0;
}
| O3 | cpp | func0(int):
endbr64
mov %edi,%eax
shr $0x1f,%eax
lea (%rax,%rdi,1),%esi
mov $0x1,%eax
mov %esi,%r8d
and $0xfffffffe,%esi
sar %r8d
mov %esi,%edi
sub %r8d,%edi
cmp %r8d,%edi
cmovg %r8d,%edi
test %edi,%edi
jle 11c1 <_Z5func0i+0x41>
xor %ecx,%ecx
nopl 0x0(%rax)
mov %esi,%edx
sub ... | _Z5func0i:
endbr64
mov esi, edi
shr esi, 1Fh
add esi, edi
sar esi, 1
cmp edi, 1
jle short loc_11C0
lea edi, [rsi+rsi]
mov eax, 1
xor ecx, ecx
nop dword ptr [rax+00h]
loc_11A0:
mov edx, edi
sub edx, ecx
add ecx, 1
imul eax, edx
cdq
idiv ecx
cmp esi, ecx
jnz ... | long long func0(int a1)
{
int v1; // esi
int v2; // eax
int v3; // ecx
int v4; // edx
v1 = a1 / 2;
if ( a1 <= 1 )
return (unsigned int)(1 / (v1 + 1));
v2 = 1;
v3 = 0;
do
{
v4 = 2 * v1 - v3++;
v2 = v4 * v2 / v3;
}
while ( v1 != v3 );
return (unsigned int)(v2 / (v1 + 1));
} | func0:
ENDBR64
MOV ESI,EDI
SHR ESI,0x1f
ADD ESI,EDI
SAR ESI,0x1
CMP EDI,0x1
JLE 0x001011c0
LEA EDI,[RSI + RSI*0x1]
MOV EAX,0x1
XOR ECX,ECX
NOP dword ptr [RAX]
LAB_001011a0:
MOV EDX,EDI
SUB EDX,ECX
ADD ECX,0x1
IMUL EAX,EDX
CDQ
IDIV ECX
CMP ESI,ECX
JNZ 0x001011a0
ADD ESI,0x1
CDQ
IDIV ESI
RET
LAB_001011c0:
MOV EAX,0x1
ADD... | /* func0(int) */
int [16] func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int auVar5 [16];
int auVar6 [16];
iVar4 = param_1 / 2;
if (1 < param_1) {
iVar1 = 1;
iVar2 = 0;
do {
iVar3 = iVar4 * 2 - iVar2;
iVar2 = iVar2 + 1;
iVar1 = (iVar1 * iVar3) / iVar... |
1,392 | func0 |
#include <iostream>
#include <string>
#include <set>
#include <assert.h>
| std::string func0(const std::string& string) {
std::set<char> p(string.begin(), string.end());
std::set<char> s{'0', '1'};
if (s == p || p == std::set<char>{'0'} || p == std::set<char>{'1'}) {
return "Yes";
} else {
return "No";
}
}
| int main() {
assert(func0("01010101010") == "Yes");
assert(func0("name0") == "No");
assert(func0("101") == "Yes");
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 %r15
push %r14
push %r13
push %r12
push %rbx
sub $0x118,%rsp
mov %rdi,-0x118(%rbp)
mov %rsi,-0x120(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x38(%rbp)
xor %eax,%e... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 138h
mov [rbp+var_138], rdi
mov [rbp+var_140], rsi
mov rax, fs:28h
mov [rbp+var_38], rax
xor eax, eax
mov rax, [rbp+var_14... | long long func0(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
char v4; // bl
char v5; // r12
char v7; // [rsp+Eh] [rbp-152h]
char v8; // [rsp+Fh] [rbp-151h]
char v9; // [rsp+10h] [rbp-150h]
char v10; // [rsp+34h] [rbp-12Ch] BYREF
char v11; // [rsp+35h] [rbp-12Bh] BYREF
cha... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x138
MOV qword ptr [RBP + -0x138],RDI
MOV qword ptr [RBP + -0x140],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x140]
MOV RDI,RAX
CALL 0x001023a0
MOV RBX,RAX
MOV RAX,qword ... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
bool bVar2;
bool bVar3;
bool bVar4;
bool bVar5;
bool bVar6;
__normal_iterator _Var7;
__normal_iterator _Var8;
long in_FS_OFFSET;
__new_allocator<char> local_133 [2];
__new_allocator<char> local_131;
__new_allocator<c... |
1,393 | func0 |
#include <iostream>
#include <string>
#include <set>
#include <assert.h>
| std::string func0(const std::string& string) {
std::set<char> p(string.begin(), string.end());
std::set<char> s{'0', '1'};
if (s == p || p == std::set<char>{'0'} || p == std::set<char>{'1'}) {
return "Yes";
} else {
return "No";
}
}
| int main() {
assert(func0("01010101010") == "Yes");
assert(func0("name0") == "No");
assert(func0("101") == "Yes");
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %r13
push %r12
push %rbp
push %rbx
sub $0xe8,%rsp
mov %rdi,%rbp
mov %fs:0x28,%rax
mov %rax,0xd8(%rsp)
xor %eax,%eax
mov (%rsi),%rbx
mov %rbx,%r12
add 0x8(%rsi),%r12
movl $0x0,0x1... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 0E8h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+108h+var_30], rax
xor eax, eax
mov rbx, [rsi]
mov r12, rbx
add r12, [rsi+8]
mov [rsp+108h+var_F0], 0
mov [rs... | _QWORD * func0(_QWORD *a1, long long *a2)
{
long long v2; // rbx
long long v3; // r12
long long v4; // r12
long long v5; // rbx
char v6; // bl
long long v7; // r12
long long v8; // rbx
long long v9; // r12
long long v10; // rbx
_BYTE **p_i; // [rsp+8h] [rbp-100h] BYREF
_BYTE v13[8]; // [rsp+10h] [... | func0:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xe8
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xd8],RAX
XOR EAX,EAX
MOV RBX,qword ptr [RSI]
MOV R12,RBX
ADD R12,qword ptr [RSI + 0x8]
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
LEA RDX,[RSP + 0x10]
LEA RAX,[RSP + 0x18]
MOV... | /* func0(std::string const&) */
string * func0(string *param_1)
{
bool bVar1;
_Rb_tree_node_base *p_Var2;
_Rb_tree_node_base *p_Var3;
_Alloc_node *p_Var4;
long *in_RSI;
_Alloc_node *p_Var5;
long in_FS_OFFSET;
_Rb_tree<char,char,std::_Identity<char>,std::less<char>,std::allocator<char>> local_f8 [8];
... |
1,394 | func0 |
#include <iostream>
#include <string>
#include <set>
#include <assert.h>
| std::string func0(const std::string& string) {
std::set<char> p(string.begin(), string.end());
std::set<char> s{'0', '1'};
if (s == p || p == std::set<char>{'0'} || p == std::set<char>{'1'}) {
return "Yes";
} else {
return "No";
}
}
| int main() {
assert(func0("01010101010") == "Yes");
assert(func0("name0") == "No");
assert(func0("101") == "Yes");
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
mov %rdi,%r12
push %rbp
push %rbx
sub $0xe8,%rsp
mov (%rsi),%rbp
mov 0x8(%rsi),%r14
mov %fs:0x28,%rax
mov %rax,0xd8(%rsp)
xor %eax,%eax
lea 0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 0D8h
mov rbx, [rsi]
mov r13, [rsi+8]
mov rax, fs:28h
mov [rsp+108h+var_40], rax
xor eax, eax
lea r12, [rsp+108h+var_100]
m... | long long func0(long long a1, long long *a2)
{
long long v3; // rbx
long long v4; // r13
long long v5; // r13
long long v6; // r14
long long v7; // rbx
long long v8; // r15
_QWORD *v9; // rbx
void *v10; // rdi
_QWORD *v11; // rbx
void *v12; // rdi
long long v14; // rbx
long long v15; // r13
l... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0xd8
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xc8],RAX
XOR EAX,EAX
LEA R12,[RSP + 0x8]
MOV R14,RSP
MOV dword ptr [RSP + 0x8],0x0
ADD R13,RBX
MOV qword ptr [RSP + 0x18],... | /* func0(std::string const&) */
string * func0(string *param_1)
{
void *pvVar1;
void *pvVar2;
_Rb_tree_node *p_Var3;
_Rb_tree_node_base *p_Var4;
_Rb_tree_node_base *p_Var5;
_Alloc_node *p_Var6;
long *in_RSI;
_Alloc_node *p_Var7;
long in_FS_OFFSET;
int auStack_108 [8];
int4 local_100 [2];
void ... |
1,395 | func0 |
#include <iostream>
#include <string>
#include <set>
#include <assert.h>
| std::string func0(const std::string& string) {
std::set<char> p(string.begin(), string.end());
std::set<char> s{'0', '1'};
if (s == p || p == std::set<char>{'0'} || p == std::set<char>{'1'}) {
return "Yes";
} else {
return "No";
}
}
| int main() {
assert(func0("01010101010") == "Yes");
assert(func0("name0") == "No");
assert(func0("101") == "Yes");
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
mov %rdi,%r13
push %r12
push %rbp
push %rbx
sub $0xd8,%rsp
mov (%rsi),%rbx
mov 0x8(%rsi),%r15
mov %fs:0x28,%rax
mov %rax,0xc8(%rsp)
xor %eax,%eax
lea 0... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push r15
push r14
xor r14d, r14d
push r13
push r12
push rbp
push rbx
sub rsp, 0E8h
mov rbp, [rsi]
mov r12, [rsi+8]
mov [rsp+118h+var_110], rdi
lea r13, [rsp+118h+var_100]
add r12, rbp
mov rax, fs:28... | long long func0(long long a1, long long a2)
{
long long v2; // r14
char *v3; // rbp
char *v4; // r12
char v5; // r15
int *v6; // rbx
bool v7; // r14
long long v8; // rax
long long v9; // r14
__int16 *v10; // rbp
char v11; // r12
int *v12; // rbx
bool v13; // r14
long long v14; // rax
long l... | func0:
ENDBR64
PUSH R15
PUSH R14
XOR R14D,R14D
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0xe8
MOV RBP,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
MOV qword ptr [RSP + 0x8],RDI
LEA R13,[RSP + 0x18]
ADD R12,RBP
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0xd8],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x18],0x0
MOV q... | /* func0(std::string const&) */
string * func0(string *param_1)
{
_Rb_tree_node_base _Var1;
_Rb_tree_node *p_Var2;
_Rb_tree_node_base *p_Var3;
_Rb_tree_node_base *p_Var4;
long lVar5;
_Rb_tree_node_base _Var6;
_Rb_tree_node_base *p_Var7;
int8 *in_RSI;
_Rb_tree_node_base *p_Var8;
bool bVar9;
long ... |
1,396 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(const std::string& s) {
int maxOcc = 0;
int n = s.length();
int arr[26] = {0};
for (int i = 0; i < n; i++) {
arr[s[i] - 'a'] += 1;
}
for (int i = 0; i < 26; i++) {
if (arr[i] > maxOcc) {
maxOcc = arr[i];
}
}
return n - maxOc... | int main() {
assert(func0("mnm") == 1);
assert(func0("abcda") == 3);
assert(func0("abcb") == 2);
std::cout << "All test cases passed." << std::endl;
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 $0x90,%rsp
mov %rdi,-0x88(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0x0,-0x80(%rbp)
mov -0x88(%rbp),%rax
mov %rax,%rdi
callq 2310 <_ZNKSt7... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_88], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_80], 0
mov rax, [rbp+var_88]
mov rdi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char... | long long func0(long long a1)
{
char *v1; // rax
int v3; // [rsp+10h] [rbp-80h]
int i; // [rsp+14h] [rbp-7Ch]
int j; // [rsp+18h] [rbp-78h]
int v6; // [rsp+1Ch] [rbp-74h]
_DWORD v7[26]; // [rsp+20h] [rbp-70h] BYREF
unsigned long long v8; // [rsp+88h] [rbp-8h]
v8 = __readfsqword(0x28u);
v3 = 0;
v6 ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x88],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x80],0x0
MOV RAX,qword ptr [RBP + -0x88]
MOV RDI,RAX
CALL 0x00101260
MOV dword ptr [RBP + -0x74],EAX
LEA RDX,[RBP + -0x70]
MOV EAX,0x0
MOV ECX,0x... | /* func0(std::string const&) */
int func0(string *param_1)
{
int iVar1;
char *pcVar2;
long lVar3;
int *piVar4;
long in_FS_OFFSET;
byte bVar5;
int local_88;
int local_84;
int local_80;
int local_78 [26];
long local_10;
bVar5 = 0;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_88 = 0;
... |
1,397 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(const std::string& s) {
int maxOcc = 0;
int n = s.length();
int arr[26] = {0};
for (int i = 0; i < n; i++) {
arr[s[i] - 'a'] += 1;
}
for (int i = 0; i < 26; i++) {
if (arr[i] > maxOcc) {
maxOcc = arr[i];
}
}
return n - maxOc... | int main() {
assert(func0("mnm") == 1);
assert(func0("abcda") == 3);
assert(func0("abcb") == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
sub $0x78,%rsp
mov %rdi,%rdx
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
mov 0x8(%rdi),%r8
mov %rsp,%rdi
mov $0xd,%ecx
rep stos %rax,%es:(%rdi)
test %r8d,%r8d
jle 12b9 <_Z5func0RKN... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
sub rsp, 78h
mov rdx, rdi
mov rax, fs:28h
mov [rsp+78h+var_10], rax
xor eax, eax
mov r8, [rdi+8]
mov rdi, rsp
mov ecx, 0Dh
rep stosq
test r8d, r8d
jle short loc_1299
mov rdx, [rdx]
lea eax, [r8-1]
lea ... | long long func0(char **a1)
{
char *v1; // r8
char *v2; // rdx
long long v3; // rcx
unsigned long long *v4; // rax
int v5; // edx
_DWORD v7[26]; // [rsp+0h] [rbp-78h] BYREF
unsigned long long v8; // [rsp+68h] [rbp-10h] BYREF
v8 = __readfsqword(0x28u);
v1 = a1[1];
memset(v7, 0, sizeof(v7));
if ( (... | func0:
ENDBR64
SUB RSP,0x78
MOV RDX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
MOV R8,qword ptr [RDI + 0x8]
MOV RDI,RSP
MOV ECX,0xd
STOSQ.REP RDI
TEST R8D,R8D
JLE 0x00101299
MOV RDX,qword ptr [RDX]
LEA EAX,[R8 + -0x1]
LEA RCX,[RDX + RAX*0x1 + 0x1]
LAB_00101284:
MOVSX EAX,byte ptr [RDX]
S... | /* func0(std::string const&) */
int func0(string *param_1)
{
int *piVar1;
char *pcVar2;
int8 uVar3;
long *plVar4;
long lVar5;
int iVar6;
char *pcVar7;
long *plVar8;
int iVar9;
long in_FS_OFFSET;
long local_78 [13];
long local_10 [2];
plVar4 = local_78;
local_10[0] = *(long *)(in_FS_OFFS... |
1,398 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(const std::string& s) {
int maxOcc = 0;
int n = s.length();
int arr[26] = {0};
for (int i = 0; i < n; i++) {
arr[s[i] - 'a'] += 1;
}
for (int i = 0; i < 26; i++) {
if (arr[i] > maxOcc) {
maxOcc = arr[i];
}
}
return n - maxOc... | int main() {
assert(func0("mnm") == 1);
assert(func0("abcda") == 3);
assert(func0("abcb") == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
sub $0x78,%rsp
mov 0x8(%rdi),%r8
mov %rdi,%rdx
mov $0xd,%ecx
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
mov %rsp,%rdi
rep stos %rax,%es:(%rdi)
test %r8d,%r8d
jle 14ca <_Z5func0RKN... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
sub rsp, 78h
mov rsi, [rdi+8]
mov r8, rdi
mov ecx, 0Dh
mov rax, fs:28h
mov [rsp+78h+var_10], rax
xor eax, eax
mov rdx, rsp
mov rdi, rdx
rep stosq
test esi, esi
jle short loc_14B8
mov rax, [r8]
lea ... | long long func0(char **a1)
{
char *v1; // rsi
char *v2; // rax
long long v3; // rcx
long long v4; // rdi
unsigned long long *v5; // rdi
int v6; // edx
_DWORD v8[26]; // [rsp+0h] [rbp-78h] BYREF
unsigned long long v9; // [rsp+68h] [rbp-10h] BYREF
v1 = a1[1];
v9 = __readfsqword(0x28u);
memset(v8, ... | func0:
ENDBR64
SUB RSP,0x78
MOV RSI,qword ptr [RDI + 0x8]
MOV R8,RDI
MOV ECX,0xd
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
MOV RDX,RSP
MOV RDI,RDX
STOSQ.REP RDI
TEST ESI,ESI
JLE 0x001014b8
MOV RAX,qword ptr [R8]
LEA EDI,[RSI + -0x1]
LEA RCX,[RAX + 0x1]
ADD RDI,RCX
JMP 0x001014a4
LAB_001014a... | /* func0(std::string const&) */
int func0(string *param_1)
{
char *pcVar1;
int *piVar2;
int8 uVar3;
char *pcVar4;
long lVar5;
char *pcVar6;
int iVar7;
int iVar8;
int8 *puVar9;
long *plVar10;
long in_FS_OFFSET;
int8 local_78;
long local_10 [2];
plVar10 = &local_78;
uVar3 = *(int8 *)(pa... |
1,399 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| int func0(const std::string& s) {
int maxOcc = 0;
int n = s.length();
int arr[26] = {0};
for (int i = 0; i < n; i++) {
arr[s[i] - 'a'] += 1;
}
for (int i = 0; i < 26; i++) {
if (arr[i] > maxOcc) {
maxOcc = arr[i];
}
}
return n - maxOc... | int main() {
assert(func0("mnm") == 1);
assert(func0("abcda") == 3);
assert(func0("abcb") == 2);
std::cout << "All test cases passed." << std::endl;
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
sub $0x78,%rsp
mov 0x8(%rdi),%rsi
mov %rdi,%rdx
mov $0xd,%ecx
mov %fs:0x28,%rax
mov %rax,0x68(%rsp)
xor %eax,%eax
mov %rsp,%rdi
rep stos %rax,%es:(%rdi)
test %esi,%esi
jle 1488 <_Z5func0RK... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
sub rsp, 78h
mov rsi, [rdi+8]
mov rdx, rdi
mov ecx, 0Dh
mov rax, fs:28h
mov [rsp+78h+var_10], rax
xor eax, eax
mov rdi, rsp
rep stosq
test esi, esi
jle short loc_14B8
mov rax, [rdx]
lea ecx, [rsi-1]
le... | long long func0(char **a1)
{
char *v1; // rsi
char *v2; // rax
long long v3; // rdx
long long v4; // rcx
__m128i si128; // xmm1
int v6; // edx
__m128i v7; // xmm0
__m128i v8; // xmm0
__m128i v9; // xmm1
__m128i v10; // xmm2
__m128i v11; // xmm2
__m128i v12; // xmm1
__m128i v13; // xmm0
__m1... | func0:
ENDBR64
SUB RSP,0x78
MOV RSI,qword ptr [RDI + 0x8]
MOV RDX,RDI
MOV ECX,0xd
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
MOV RDI,RSP
STOSQ.REP RDI
TEST ESI,ESI
JLE 0x001014b8
MOV RAX,qword ptr [RDX]
LEA ECX,[RSI + -0x1]
LEA RDX,[RAX + 0x1]
ADD RCX,RDX
JMP 0x001014a4
LAB_001014a0:
ADD RDX... | /* func0(std::string const&) */
int func0(string *param_1)
{
char *pcVar1;
int8 uVar2;
int auVar3 [16];
int auVar4 [16];
char *pcVar5;
long lVar6;
char *pcVar7;
int iVar8;
int *piVar9;
long in_FS_OFFSET;
uint uVar10;
int auVar12 [16];
int auVar13 [16];
uint uVar14;
int auVar15 [16];
in... |
1,400 | func0 | #include <iostream>
#include <cassert>
#include <map>
| int func0(int arr[], int n, int k) {
std::map<int, int> count_map;
for (int i = 0; i < n; i++) {
if(count_map.find(arr[i]) != count_map.end()) {
count_map[arr[i]] += 1;
} else {
count_map[arr[i]] = 1;
}
}
for (int i = 0; i < n; i++) {
... | int main() {
int arr1[] = {0,1,2,3,4,5};
int arr2[] = {1,2,1,3,4};
int arr3[] = {2,3,4,3,5,7,1,2,3,5};
assert(func0(arr1, 6, 1) == 0);
assert(func0(arr2, 5, 2) == 1);
assert(func0(arr3, 10, 2) == 2);
return 0;
}
| O0 | cpp | func0(int*, int, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x78(%rbp)
mov %esi,-0x7c(%rbp)
mov %edx,-0x80(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
lea -0x50(%rbp),%rax
mov %rax,%rdi
callq 1734 <_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC1E... | _Z5func0Piii:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_78], rdi
mov [rbp+var_7C], esi
mov [rbp+var_80], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_50]
mov rdi, rax
call _ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev; std... | long long func0(int *a1, int a2, int a3)
{
_DWORD *v3; // rax
unsigned int v4; // ebx
int i; // [rsp+18h] [rbp-68h]
int j; // [rsp+1Ch] [rbp-64h]
long long v9; // [rsp+20h] [rbp-60h] BYREF
long long v10; // [rsp+28h] [rbp-58h] BYREF
_BYTE v11[56]; // [rsp+30h] [rbp-50h] BYREF
unsigned long long v12; //... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RBP + -0x78],RDI
MOV dword ptr [RBP + -0x7c],ESI
MOV dword ptr [RBP + -0x80],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x50]
MOV RDI,RAX
CALL 0x001016e4
MOV dword ptr [RBP + -0x68],0x0
JMP 0x001013... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
char cVar1;
int4 *puVar2;
int *piVar3;
int iVar4;
long in_FS_OFFSET;
int local_70;
int local_6c;
int8 local_68;
int8 local_60;
map<int,int,std::less<int>,std::allocator<std::pair<int_const,int>>> local_58 [56];
long lo... |
1,401 | func0 | #include <iostream>
#include <cassert>
#include <map>
| int func0(int arr[], int n, int k) {
std::map<int, int> count_map;
for (int i = 0; i < n; i++) {
if(count_map.find(arr[i]) != count_map.end()) {
count_map[arr[i]] += 1;
} else {
count_map[arr[i]] = 1;
}
}
for (int i = 0; i < n; i++) {
... | int main() {
int arr1[] = {0,1,2,3,4,5};
int arr2[] = {1,2,1,3,4};
int arr3[] = {2,3,4,3,5,7,1,2,3,5};
assert(func0(arr1, 6, 1) == 0);
assert(func0(arr2, 5, 2) == 1);
assert(func0(arr3, 10, 2) == 2);
return 0;
}
| O1 | cpp | func0(int*, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov %edx,0xc(%rsp)
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
movl $0x0,0x28(%rsp)
movq $0x0,0x30(%rsp)
lea 0x28(%rsp),%rax
mov %rax,0x38(%rsp)
mov %rax,0x40(%rsp)
m... | _Z5func0Piii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_9C], edx
mov rax, fs:28h
mov [rsp+0A8h+var_40], rax
xor eax, eax
mov [rsp+0A8h+var_70], 0
mov [rsp+0A8h+var_68], 0
lea rax, [rsp+0A8h+var_70]
mov [rsp+0A8h+var... | long long func0(int *a1, int a2, int a3)
{
int *v3; // rbx
int *v4; // rbp
int *v5; // r13
long long v6; // r12
int *v7; // rax
int v8; // r15d
int *v9; // rax
int *v10; // rax
unsigned int v11; // ebx
int *v13; // rax
char v15; // [rsp+15h] [rbp-93h] BYREF
char v16; // [rsp+16h] [rbp-92h] BYRE... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x78
MOV dword ptr [RSP + 0xc],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x0
LEA RAX,[RSP + 0x38]
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x... | /* func0(int*, int, int) */
int func0(int *param_1,int param_2,int param_3)
{
int *piVar1;
_Rb_tree_node *p_Var2;
_Rb_tree_iterator _Var3;
_Rb_tree_node_base *p_Var4;
piecewise_construct_t *ppVar5;
int4 extraout_var;
int4 extraout_var_00;
int4 extraout_var_01;
int iVar6;
int *piVar7;
long in_FS_... |
1,402 | func0 | #include <iostream>
#include <cassert>
#include <map>
| int func0(int arr[], int n, int k) {
std::map<int, int> count_map;
for (int i = 0; i < n; i++) {
if(count_map.find(arr[i]) != count_map.end()) {
count_map[arr[i]] += 1;
} else {
count_map[arr[i]] = 1;
}
}
for (int i = 0; i < n; i++) {
... | int main() {
int arr1[] = {0,1,2,3,4,5};
int arr2[] = {1,2,1,3,4};
int arr3[] = {2,3,4,3,5,7,1,2,3,5};
assert(func0(arr1, 6, 1) == 0);
assert(func0(arr2, 5, 2) == 1);
assert(func0(arr3, 10, 2) == 2);
return 0;
}
| O2 | cpp | func0(int*, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
lea 0x28(%rsp),%rbx
movl $0x0,0x28(%rsp)
movq $0x0,0x30(%rsp)
mov %rbx,0x38(%rsp)
mov %rbx,0x40(%rsp)
movq $0x0,0x48(%rsp)
... | _Z5func0Piii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
lea rbx, [rsp+98h+var_70]
mov [rsp+98h+var_70], 0
mov [rsp+98h+var_68], 0
mov [rsp+98h+var_60], rbx
mov [rsp+98h+var_58], ... | long long func0(int *a1, int a2, int a3)
{
int *v4; // rbp
int *v5; // r14
int *v6; // r12
_QWORD *v7; // r15
int v8; // ecx
_QWORD *v9; // rax
int *v10; // rdi
long long v11; // rdx
long long v12; // rsi
_QWORD *v13; // rdx
int *v14; // rsi
long long v15; // rdi
long long v16; // r8
long l... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
LEA RBX,[RSP + 0x28]
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],RBX
MOV qword ptr [RSP + 0x40],RBX
MOV qword ptr [RSP + 0... | /* func0(int*, int, int) */
uint func0(int *param_1,int param_2,int param_3)
{
uint *puVar1;
_Rb_tree_iterator _Var2;
int4 extraout_var;
tuple *ptVar4;
int4 extraout_var_01;
int iVar5;
tuple *ptVar6;
uint uVar7;
tuple *ptVar8;
uint *puVar9;
tuple *ptVar10;
long in_FS_OFFSET;
uint *local_90;
... |
1,403 | func0 | #include <iostream>
#include <cassert>
#include <map>
| int func0(int arr[], int n, int k) {
std::map<int, int> count_map;
for (int i = 0; i < n; i++) {
if(count_map.find(arr[i]) != count_map.end()) {
count_map[arr[i]] += 1;
} else {
count_map[arr[i]] = 1;
}
}
for (int i = 0; i < n; i++) {
... | int main() {
int arr1[] = {0,1,2,3,4,5};
int arr2[] = {1,2,1,3,4};
int arr3[] = {2,3,4,3,5,7,1,2,3,5};
assert(func0(arr1, 6, 1) == 0);
assert(func0(arr2, 5, 2) == 1);
assert(func0(arr3, 10, 2) == 2);
return 0;
}
| O3 | cpp | func0(int*, int, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x68,%rsp
mov %edx,0x4(%rsp)
lea 0x28(%rsp),%rbx
mov %fs:0x28,%rax
mov %rax,0x58(%rsp)
xor %eax,%eax
movl $0x0,0x28(%rsp)
movq $0x0,0x30(%rsp)
mov %rbx,0x38(%rsp)
mov %rbx,0x40(%rsp)
m... | _Z5func0Piii:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 68h
mov rax, fs:28h
mov [rsp+98h+var_40], rax
xor eax, eax
lea rbx, [rsp+98h+var_70]
mov [rsp+98h+var_70], 0
mov [rsp+98h+var_68], 0
mov [rsp+98h+var_60], rbx
mov [rsp+98h+var_58], ... | long long func0(int *a1, int a2, int a3)
{
int *v4; // rbp
int *v5; // r14
int *v6; // r12
long long v7; // r15
int v8; // edx
int *v9; // rax
int *v10; // rdi
int *v11; // rsi
long long v12; // rcx
int *v13; // rsi
int *v14; // rdi
int *v15; // rcx
long long v16; // rax
int *v17; // rcx
... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x68
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
LEA RBX,[RSP + 0x28]
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],RBX
MOV qword ptr [RSP + 0x40],RBX
MOV qword ptr [RSP + 0... | /* func0(int*, int, int) */
uint func0(int *param_1,int param_2,int param_3)
{
uint *puVar1;
int iVar2;
tuple *ptVar3;
tuple *ptVar4;
tuple *ptVar5;
tuple *ptVar6;
_Rb_tree_iterator _Var7;
tuple *ptVar8;
tuple *ptVar9;
int4 extraout_var_00;
int4 extraout_var_01;
tuple *in_RCX;
uint uVar10;
... |
1,404 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| bool func0(std::string str) {
for (int i = 0; i < str.length(); i++) {
for (int j = i + 1; j < str.length(); j++) {
if (str[i] == str[j]) {
return false;
}
}
}
return true;
}
| int main() {
assert(func0("aba") == false);
assert(func0("abc") == true);
assert(func0("abab") == false);
return 0;
}
| O0 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x28,%rsp
mov %rdi,-0x28(%rbp)
movl $0x0,-0x18(%rbp)
mov -0x18(%rbp),%eax
movslq %eax,%rbx
mov -0x28(%rbp),%rax
mov %rax,%rdi
callq 22c0 <_ZNKSt7__cxx1112basic_... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_28], rdi
mov [rbp+var_18], 0
jmp short loc_13D2
loc_1363:
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_13B2
loc_136E:
mov e... | long long func0(long long a1)
{
char v1; // bl
int i; // [rsp+18h] [rbp-18h]
int j; // [rsp+1Ch] [rbp-14h]
for ( i = 0; i < (unsigned long long)std::string::length(a1); ++i )
{
for ( j = i + 1; j < (unsigned long long)std::string::length(a1); ++j )
{
v1 = *(_BYTE *)std::string::operator[](a1, ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x18],0x0
JMP 0x001013d2
LAB_00101363:
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001013b2
LAB_0010136e:
MOV EAX,dword ptr [RBP + -0x18]
MOVSXD RDX,EAX
MOV RAX,qword ptr... | /* func0(std::string) */
int8 func0(ulong param_1)
{
char cVar1;
char *pcVar2;
ulong uVar3;
int local_20;
int local_1c;
local_20 = 0;
do {
uVar3 = std::string::length();
local_1c = local_20;
if (uVar3 <= (ulong)(long)local_20) {
return 1;
}
while( true ) {
local_1c = l... |
1,405 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| bool func0(std::string str) {
for (int i = 0; i < str.length(); i++) {
for (int j = i + 1; j < str.length(); j++) {
if (str[i] == str[j]) {
return false;
}
}
}
return true;
}
| int main() {
assert(func0("aba") == false);
assert(func0("abc") == true);
assert(func0("abab") == false);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%rdx
test %rdx,%rdx
je 1270 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x47>
mov $0x1,%r8d
cmp %r8,%rdx
jbe 125c <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rdx, [rdi+8]
test rdx, rdx
jz short loc_1250
mov r8d, 1
loc_121C:
cmp r8, rdx
jnb short loc_123C
mov rcx, [rdi]
movzx esi, byte ptr [rcx+r8-1]
movsxd rax, r8d
loc_122D:
cmp sil, [rcx+rax]
jz short loc_1256
... | long long func0(_QWORD *a1)
{
unsigned long long v1; // rdx
unsigned long long i; // r8
long long v3; // rax
v1 = a1[1];
if ( !v1 )
return 1LL;
for ( i = 1LL; i >= v1; ++i )
{
LABEL_7:
if ( i == v1 )
return 1LL;
}
v3 = (int)i;
while ( *(_BYTE *)(*a1 + i - 1) != *(_BYTE *)(*a1 + v3) )... | func0:
ENDBR64
MOV RDX,qword ptr [RDI + 0x8]
TEST RDX,RDX
JZ 0x00101250
MOV R8D,0x1
LAB_0010121c:
CMP R8,RDX
JNC 0x0010123c
MOV RCX,qword ptr [RDI]
MOVZX ESI,byte ptr [RCX + R8*0x1 + -0x1]
MOVSXD RAX,R8D
LAB_0010122d:
CMP SIL,byte ptr [RCX + RAX*0x1]
JZ 0x00101256
ADD RAX,0x1
CMP RAX,RDX
JC 0x0010122d
LAB_0010123c:
LEA... | /* func0(std::string) */
int8 func0(long *param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
bool bVar4;
uVar1 = param_1[1];
if (uVar1 == 0) {
return 1;
}
uVar3 = 1;
do {
if (uVar3 < uVar1) {
uVar2 = (ulong)(int)uVar3;
do {
if (*(char *)(*param_1 + -1 + uVar3) == *(char... |
1,406 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| bool func0(std::string str) {
for (int i = 0; i < str.length(); i++) {
for (int j = i + 1; j < str.length(); j++) {
if (str[i] == str[j]) {
return false;
}
}
}
return true;
}
| int main() {
assert(func0("aba") == false);
assert(func0("abc") == true);
assert(func0("abab") == false);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%rdx
test %rdx,%rdx
je 14f6 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x56>
mov $0x1,%r8d
cmp %r8,%rdx
jbe 14e8 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rdx, [rdi+8]
test rdx, rdx
jz short loc_1376
mov r8d, 1
loc_1333:
cmp r8, rdx
jnb short loc_1368
mov rcx, [rdi]
mov rax, r8
movzx esi, byte ptr [rcx+r8-1]
jmp short loc_1359
loc_1350:
add rax, 1
cmp r... | long long func0(_QWORD *a1)
{
unsigned long long v1; // rdx
unsigned long long i; // r8
unsigned long long v3; // rax
v1 = a1[1];
if ( !v1 )
return 1LL;
for ( i = 1LL; i >= v1; ++i )
{
LABEL_8:
if ( i == v1 )
return 1LL;
}
v3 = i;
while ( *(_BYTE *)(*a1 + i - 1) != *(_BYTE *)(*a1 + v... | func0:
ENDBR64
MOV RDX,qword ptr [RDI + 0x8]
TEST RDX,RDX
JZ 0x00101376
MOV R8D,0x1
LAB_00101333:
CMP R8,RDX
JNC 0x00101368
MOV RCX,qword ptr [RDI]
MOV RAX,R8
MOVZX ESI,byte ptr [RCX + R8*0x1 + -0x1]
JMP 0x00101359
LAB_00101350:
ADD RAX,0x1
CMP RAX,RDX
JNC 0x00101368
LAB_00101359:
CMP SIL,byte ptr [RCX + RAX*0x1]
JNZ 0... | /* func0(std::string) */
int8 func0(long *param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
bool bVar4;
uVar1 = param_1[1];
if (uVar1 != 0) {
uVar3 = 1;
do {
if (uVar3 < uVar1) {
uVar2 = uVar3;
do {
if (*(char *)(*param_1 + -1 + uVar3) == *(char *)(*param_1 + uVa... |
1,407 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
| bool func0(std::string str) {
for (int i = 0; i < str.length(); i++) {
for (int j = i + 1; j < str.length(); j++) {
if (str[i] == str[j]) {
return false;
}
}
}
return true;
}
| int main() {
assert(func0("aba") == false);
assert(func0("abc") == true);
assert(func0("abab") == false);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >):
endbr64
mov 0x8(%rdi),%rdx
test %rdx,%rdx
je 14f6 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x56>
mov $0x1,%r8d
cmp %rdx,%r8
jae 14e8 <_Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE... | _Z5func0NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rdx, [rdi+8]
test rdx, rdx
jz short loc_1456
mov r8d, 1
loc_1413:
cmp r8, rdx
jnb short loc_1448
mov rcx, [rdi]
mov rax, r8
movzx esi, byte ptr [rcx+r8-1]
jmp short loc_1439
loc_1430:
add rax, 1
cmp r... | long long func0(_QWORD *a1)
{
unsigned long long v1; // rdx
unsigned long long i; // r8
unsigned long long v3; // rax
v1 = a1[1];
if ( !v1 )
return 1LL;
for ( i = 1LL; i >= v1; ++i )
{
LABEL_8:
if ( i == v1 )
return 1LL;
}
v3 = i;
while ( *(_BYTE *)(*a1 + i - 1) != *(_BYTE *)(*a1 + v... | func0:
ENDBR64
MOV RDX,qword ptr [RDI + 0x8]
TEST RDX,RDX
JZ 0x00101456
MOV R8D,0x1
LAB_00101413:
CMP R8,RDX
JNC 0x00101448
MOV RCX,qword ptr [RDI]
MOV RAX,R8
MOVZX ESI,byte ptr [RCX + R8*0x1 + -0x1]
JMP 0x00101439
LAB_00101430:
ADD RAX,0x1
CMP RAX,RDX
JNC 0x00101448
LAB_00101439:
CMP SIL,byte ptr [RCX + RAX*0x1]
JNZ 0... | /* func0(std::string) */
int8 func0(long *param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
bool bVar4;
uVar1 = param_1[1];
if (uVar1 != 0) {
uVar3 = 1;
do {
if (uVar3 < uVar1) {
uVar2 = uVar3;
do {
if (*(char *)(*param_1 + -1 + uVar3) == *(char *)(*param_1 + uVa... |
1,408 | func0 |
#include <vector>
#include <assert.h>
| std::vector<std::vector<int>> func0(std::vector<std::vector<int>> list1, int n) {
for (auto& i : list1) {
i.erase(i.begin() + n);
}
return list1;
}
| int main() {
assert((func0({{1, 2, 3}, {2, 4, 5}, {1, 1, 1}}, 0) == std::vector<std::vector<int>>{{2, 3}, {4, 5}, {1, 1}}));
assert((func0({{1, 2, 3}, {-2, 4, -5}, {1, -1, 1}}, 2) == std::vector<std::vector<int>>{{1, 2}, {-2, 4}, {1, -1}}));
assert((func0({{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9... | O0 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x68,%rsp
mov %rdi,-0x58(%rbp)
mov %rsi,-0x60(%rbp)
mov %edx,-0x64(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 68h
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov [rbp+var_64], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_60]
mov [rbp+var_28], rax
mov rax, [rbp+var_... | long long func0(long long a1, long long a2, int a3)
{
long long v5; // [rsp+20h] [rbp-50h] BYREF
long long v6; // [rsp+28h] [rbp-48h] BYREF
long long v7; // [rsp+30h] [rbp-40h] BYREF
long long v8; // [rsp+38h] [rbp-38h] BYREF
_QWORD v9[2]; // [rsp+40h] [rbp-30h] BYREF
long long v10; // [rsp+50h] [rbp-20h]
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV dword ptr [RBP + -0x64],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >, int) */
vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> *
func0(vector param_1,int param_2)
{
bool bVar1;
int in_EDX;
int4 in_register_0000... |
1,409 | func0 |
#include <vector>
#include <assert.h>
| std::vector<std::vector<int>> func0(std::vector<std::vector<int>> list1, int n) {
for (auto& i : list1) {
i.erase(i.begin() + n);
}
return list1;
}
| int main() {
assert((func0({{1, 2, 3}, {2, 4, 5}, {1, 1, 1}}, 0) == std::vector<std::vector<int>>{{2, 3}, {4, 5}, {1, 1}}));
assert((func0({{1, 2, 3}, {-2, 4, -5}, {1, -1, 1}}, 2) == std::vector<std::vector<int>>{{1, 2}, {-2, 4}, {1, -1}}));
assert((func0({{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9... | O1 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, int):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x8,%rsp
mov %rdi,%r15
mov %rsi,%r13
mov (%rsi),%rbx
mov 0x8(%rsi),%r14
cmp %r14,%rbx
je 1... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r15, rdi
mov r13, rsi
mov rbx, [rsi]
mov r14, [rsi+8]
cmp r14, rbx
jz short loc_1335
movsxd rdx, edx
lea r12, ds:0[rdx*4]
jmp short loc_130D
loc_12F... | _QWORD * func0(_QWORD *a1, long long a2, int a3)
{
_QWORD *v5; // rbx
_QWORD *v6; // r14
long long v7; // r12
_DWORD *v8; // rdi
char *v9; // rdx
_BYTE *v10; // rsi
signed long long v11; // rdx
v5 = *(_QWORD **)a2;
v6 = *(_QWORD **)(a2 + 8);
if ( v6 != *(_QWORD **)a2 )
{
v7 = 4LL * a3;
do... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R15,RDI
MOV R13,RSI
MOV RBX,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
CMP R14,RBX
JZ 0x00101335
MOVSXD RDX,EDX
LEA R12,[RDX*0x4]
JMP 0x0010130d
LAB_001012fa:
CALL 0x001011b0
LAB_001012ff:
SUB qword ptr [RBP + 0x8],0x4
ADD RBX,0x18
... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >, int) */
long * func0(vector param_1,int param_2)
{
int4 *__src;
long *plVar1;
int in_EDX;
size_t __n;
long *plVar2;
int4 in_register_00000034;
long *plVar3;
int4 in_register_00000... |
1,410 | func0 |
#include <vector>
#include <assert.h>
| std::vector<std::vector<int>> func0(std::vector<std::vector<int>> list1, int n) {
for (auto& i : list1) {
i.erase(i.begin() + n);
}
return list1;
}
| int main() {
assert((func0({{1, 2, 3}, {2, 4, 5}, {1, 1, 1}}, 0) == std::vector<std::vector<int>>{{2, 3}, {4, 5}, {1, 1}}));
assert((func0({{1, 2, 3}, {-2, 4, -5}, {1, -1, 1}}, 2) == std::vector<std::vector<int>>{{1, 2}, {-2, 4}, {1, -1}}));
assert((func0({{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9... | O2 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, int):
endbr64
push %r14
push %r13
mov %rsi,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov (%rsi),%rbx
mov 0x8(%rsi),%r14
cmp %r14,%rbx
je 1ca0 <_Z5func0St6vectorIS_IiSa... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push r14
push r13
mov r13, rdi
push r12
mov r12, rsi
push rbp
push rbx
movdqu xmm0, xmmword ptr [rsi]
movhlps xmm1, xmm0
movq rbx, xmm0
movq rbp, xmm1
cmp rbp, rbx
jz short loc_1FB7
movsxd rdx, edx
lea r14, ds:0[rdx*4]
nop dw... | __m128 * func0(__m128 *a1, const __m128i *a2, int a3, double a4, __m128 a5)
{
__m128 v7; // xmm0
unsigned long long v8; // xmm1_8
_QWORD *v9; // rbx
long long v10; // r14
char *v11; // rax
_DWORD *v12; // rdi
_BYTE *v13; // rsi
long long v14; // rax
__m128 *result; // rax
v7 = (__m128)_mm_loadu_si1... | func0:
ENDBR64
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
MOV R12,RSI
PUSH RBP
PUSH RBX
MOVDQU XMM0,xmmword ptr [RSI]
MOVHLPS XMM1,XMM0
MOVQ RBX,XMM0
MOVQ RBP,XMM1
CMP RBP,RBX
JZ 0x00101fb7
MOVSXD RDX,EDX
LEA R14,[RDX*0x4]
NOP dword ptr [RAX + RAX*0x1]
LAB_00101f78:
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RBX + 0x8]
ADD... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >, int) */
int8 * func0(int8 *param_1,int (*param_2) [16],int param_3)
{
int4 *__src;
int8 uVar1;
int4 *puVar2;
size_t __n;
long *plVar3;
long *plVar4;
int4 *__dest;
long *plVar5;
... |
1,411 | func0 |
#include <vector>
#include <assert.h>
| std::vector<std::vector<int>> func0(std::vector<std::vector<int>> list1, int n) {
for (auto& i : list1) {
i.erase(i.begin() + n);
}
return list1;
}
| int main() {
assert((func0({{1, 2, 3}, {2, 4, 5}, {1, 1, 1}}, 0) == std::vector<std::vector<int>>{{2, 3}, {4, 5}, {1, 1}}));
assert((func0({{1, 2, 3}, {-2, 4, -5}, {1, -1, 1}}, 2) == std::vector<std::vector<int>>{{1, 2}, {-2, 4}, {1, -1}}));
assert((func0({{1, 3}, {5, 7}, {1, 3}, {13, 15, 17}, {5, 7}, {9... | O3 | cpp | func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, int):
endbr64
push %r14
push %r13
mov %rsi,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
mov (%rsi),%rbx
mov 0x8(%rsi),%r14
cmp %r14,%rbx
je 1d50 <_Z5func0St6vectorIS_IiSa... | _Z5func0St6vectorIS_IiSaIiEESaIS1_EEi:
endbr64
push r14
push r13
mov r13, rdi
push r12
mov r12, rsi
push rbp
push rbx
movdqu xmm0, xmmword ptr [rsi]
movhlps xmm1, xmm0
movq rbx, xmm0
movq rbp, xmm1
cmp rbp, rbx
jz short loc_2037
movsxd rdx, edx
lea r14, ds:0[rdx*4]
nop dw... | __m128 * func0(__m128 *a1, const __m128i *a2, int a3, double a4, __m128 a5)
{
__m128 v7; // xmm0
unsigned long long v8; // xmm1_8
_QWORD *v9; // rbx
long long v10; // r14
char *v11; // rax
_DWORD *v12; // rdi
_BYTE *v13; // rsi
long long v14; // rax
__m128 *result; // rax
v7 = (__m128)_mm_loadu_si1... | func0:
ENDBR64
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
MOV R12,RSI
PUSH RBP
PUSH RBX
MOVDQU XMM0,xmmword ptr [RSI]
MOVHLPS XMM1,XMM0
MOVQ RBX,XMM0
MOVQ RBP,XMM1
CMP RBP,RBX
JZ 0x00102037
MOVSXD RDX,EDX
LEA R14,[RDX*0x4]
NOP dword ptr [RAX + RAX*0x1]
LAB_00101ff8:
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RBX + 0x8]
ADD... | /* func0(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int,
std::allocator<int> > > >, int) */
int8 * func0(int8 *param_1,int (*param_2) [16],int param_3)
{
int4 *__src;
int8 uVar1;
int4 *puVar2;
size_t __n;
long *plVar3;
long *plVar4;
int4 *__dest;
long *plVar5;
... |
1,412 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int a, int n, int d) {
int tn = a + (n - 1) * d;
return tn;
}
| int main() {
assert(func0(1, 5, 2) == 9);
assert(func0(2, 6, 4) == 22);
assert(func0(1, 4, 5) == 16);
return 0;
}
| O0 | cpp | func0(int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
mov -0x18(%rbp),%eax
sub $0x1,%eax
imul -0x1c(%rbp),%eax
mov %eax,%edx
mov -0x14(%rbp),%eax
add %edx,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
pop %rbp
retq
| _Z5func0iii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov eax, [rbp+var_18]
sub eax, 1
imul eax, [rbp+var_1C]
mov edx, eax
mov eax, [rbp+var_14]
add eax, edx
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
pop rbp
ret... | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * (a2 - 1) + a1);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,0x1
IMUL EAX,dword ptr [RBP + -0x1c]
MOV EDX,EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,EDX
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP +... | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return param_1 + (param_2 + -1) * param_3;
} |
1,413 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int a, int n, int d) {
int tn = a + (n - 1) * d;
return tn;
}
| int main() {
assert(func0(1, 5, 2) == 9);
assert(func0(2, 6, 4) == 22);
assert(func0(1, 4, 5) == 16);
return 0;
}
| O1 | cpp | func0(int, int, int):
endbr64
sub $0x1,%esi
imul %edx,%esi
lea (%rsi,%rdi,1),%eax
retq
| _Z5func0iii:
endbr64
sub esi, 1
imul esi, edx
lea eax, [rsi+rdi]
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * (a2 - 1) + a1);
} | func0:
ENDBR64
SUB ESI,0x1
IMUL ESI,EDX
LEA EAX,[RSI + RDI*0x1]
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return (param_2 + -1) * param_3 + param_1;
} |
1,414 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int a, int n, int d) {
int tn = a + (n - 1) * d;
return tn;
}
| int main() {
assert(func0(1, 5, 2) == 9);
assert(func0(2, 6, 4) == 22);
assert(func0(1, 4, 5) == 16);
return 0;
}
| O2 | cpp | func0(int, int, int):
endbr64
sub $0x1,%esi
imul %edx,%esi
lea (%rsi,%rdi,1),%eax
retq
xchg %ax,%ax
| _Z5func0iii:
endbr64
sub esi, 1
imul esi, edx
lea eax, [rsi+rdi]
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * (a2 - 1) + a1);
} | func0:
ENDBR64
SUB ESI,0x1
IMUL ESI,EDX
LEA EAX,[RSI + RDI*0x1]
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return (param_2 + -1) * param_3 + param_1;
} |
1,415 | func0 |
#include <iostream>
#include <assert.h>
| int func0(int a, int n, int d) {
int tn = a + (n - 1) * d;
return tn;
}
| int main() {
assert(func0(1, 5, 2) == 9);
assert(func0(2, 6, 4) == 22);
assert(func0(1, 4, 5) == 16);
return 0;
}
| O3 | cpp | func0(int, int, int):
endbr64
sub $0x1,%esi
imul %edx,%esi
lea (%rsi,%rdi,1),%eax
retq
xchg %ax,%ax
| _Z5func0iii:
endbr64
sub esi, 1
imul esi, edx
lea eax, [rsi+rdi]
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(a3 * (a2 - 1) + a1);
} | func0:
ENDBR64
SUB ESI,0x1
IMUL ESI,EDX
LEA EAX,[RSI + RDI*0x1]
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return (param_2 + -1) * param_3 + param_1;
} |
1,416 | func0 |
#include <assert.h>
| int func0(int radius) {
int rectangles = 0;
int diameter = 2 * radius;
int diameterSquare = diameter * diameter;
for (int a = 1; a < 2 * radius; a++) {
for (int b = 1; b < 2 * radius; b++) {
int diagnalLengthSquare = (a * a + b * b);
if (diagnalLengthSquare <= diam... | int main() {
assert(func0(2) == 8);
assert(func0(1) == 1);
assert(func0(0) == 0);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x24(%rbp)
movl $0x0,-0x18(%rbp)
mov -0x24(%rbp),%eax
add %eax,%eax
mov %eax,-0xc(%rbp)
mov -0xc(%rbp),%eax
imul %eax,%eax
mov %eax,-0x8(%rbp)
movl $0x1,-0x14(%rbp)
mov -0x24(%rbp),%eax
add %eax,%eax
cmp %eax,-0x14(%rbp)
jge ... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_24], edi
mov [rbp+var_18], 0
mov eax, [rbp+var_24]
add eax, eax
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
imul eax, eax
mov [rbp+var_8], eax
mov [rbp+var_14], 1
jmp short loc_11AF
loc_1175:
mov [rbp+var_10], 1
jmp ... | long long func0(int a1)
{
unsigned int v2; // [rsp+Ch] [rbp-18h]
int i; // [rsp+10h] [rbp-14h]
int j; // [rsp+14h] [rbp-10h]
v2 = 0;
for ( i = 1; i < 2 * a1; ++i )
{
for ( j = 1; j < 2 * a1; ++j )
{
if ( i * i + j * j <= 2 * a1 * 2 * a1 )
++v2;
}
}
return v2;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x24],EDI
MOV dword ptr [RBP + -0x18],0x0
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,EAX
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
IMUL EAX,EAX
MOV dword ptr [RBP + -0x8],EAX
MOV dword ptr [RBP + -0x14],0x1
JMP 0x001011af
LAB_00101175:
MOV dword... | /* func0(int) */
int func0(int param_1)
{
int4 local_20;
int4 local_1c;
int4 local_18;
local_20 = 0;
for (local_1c = 1; local_1c < param_1 * 2; local_1c = local_1c + 1) {
for (local_18 = 1; local_18 < param_1 * 2; local_18 = local_18 + 1) {
if (local_18 * local_18 + local_1c * local_1c <= param... |
1,417 | func0 |
#include <assert.h>
| int func0(int radius) {
int rectangles = 0;
int diameter = 2 * radius;
int diameterSquare = diameter * diameter;
for (int a = 1; a < 2 * radius; a++) {
for (int b = 1; b < 2 * radius; b++) {
int diagnalLengthSquare = (a * a + b * b);
if (diagnalLengthSquare <= diam... | int main() {
assert(func0(2) == 8);
assert(func0(1) == 1);
assert(func0(0) == 0);
return 0;
}
| O1 | cpp | func0(int):
endbr64
lea (%rdi,%rdi,1),%esi
mov %esi,%r8d
imul %esi,%r8d
cmp $0x1,%esi
jle 1199 <_Z5func0i+0x50>
mov $0x1,%r9d
mov $0x0,%ecx
jmp 1172 <_Z5func0i+0x29>
add $0x1,%r9d
cmp %r9d,%esi
je 119e <_Z5func0i+0x55>
mov %r9d,%edi
imul %r9d,%edi
mov $0x1,%eax
mov %eax,%edx
... | _Z5func0i:
endbr64
lea eax, [rdi+rdi]
mov r8d, eax
imul r8d, eax
cmp eax, 1
jle short loc_119A
mov esi, eax
mov r9d, 1
mov ecx, 0
loc_1169:
mov edi, r9d
imul edi, r9d
mov eax, 1
loc_1175:
mov edx, eax
imul edx, eax
add edx, edi
cmp r8d, edx
setnl dl
movzx edx... | long long func0(int a1)
{
int v1; // esi
int v2; // r9d
unsigned int v3; // ecx
int v4; // eax
if ( 2 * a1 <= 1 )
{
return 0;
}
else
{
v1 = 2 * a1;
v2 = 1;
v3 = 0;
do
{
v4 = 1;
do
{
v3 += 2 * a1 * 2 * a1 >= v2 * v2 + v4 * v4;
++v4;
}
... | func0:
ENDBR64
LEA EAX,[RDI + RDI*0x1]
MOV R8D,EAX
IMUL R8D,EAX
CMP EAX,0x1
JLE 0x0010119a
MOV ESI,EAX
MOV R9D,0x1
MOV ECX,0x0
LAB_00101169:
MOV EDI,R9D
IMUL EDI,R9D
MOV EAX,0x1
LAB_00101175:
MOV EDX,EAX
IMUL EDX,EAX
ADD EDX,EDI
CMP R8D,EDX
SETGE DL
MOVZX EDX,DL
ADD ECX,EDX
ADD EAX,0x1
CMP EAX,ESI
JNZ 0x00101175
ADD R9... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
iVar1 = param_1 * 2;
if (iVar1 < 2) {
iVar3 = 0;
}
else {
iVar4 = 1;
iVar3 = 0;
do {
iVar2 = 1;
do {
iVar3 = iVar3 + (uint)(iVar2 * iVar2 + iVar4 * iVar4 <= iVar1 * iVar1);
... |
1,418 | func0 |
#include <assert.h>
| int func0(int radius) {
int rectangles = 0;
int diameter = 2 * radius;
int diameterSquare = diameter * diameter;
for (int a = 1; a < 2 * radius; a++) {
for (int b = 1; b < 2 * radius; b++) {
int diagnalLengthSquare = (a * a + b * b);
if (diagnalLengthSquare <= diam... | int main() {
assert(func0(2) == 8);
assert(func0(1) == 1);
assert(func0(0) == 0);
return 0;
}
| O2 | cpp | func0(int):
endbr64
lea (%rdi,%rdi,1),%ecx
mov %ecx,%edi
imul %ecx,%edi
cmp $0x1,%ecx
jle 1196 <_Z5func0i+0x56>
mov $0x1,%r9d
xor %r8d,%r8d
nopw 0x0(%rax,%rax,1)
mov %r9d,%esi
mov $0x1,%eax
imul %r9d,%esi
nopl 0x0(%rax)
mov %eax,%edx
imul %eax,%edx
add %esi,%edx
cmp %edx,%edi
... | _Z5func0i:
endbr64
lea esi, [rdi+rdi]
mov r8d, esi
imul r8d, esi
cmp esi, 1
jle short loc_1245
mov r9d, 1
xor ecx, ecx
nop dword ptr [rax+rax+00h]
loc_1210:
mov edi, r9d
mov eax, 1
imul edi, r9d
nop dword ptr [rax+00h]
loc_1220:
mov edx, eax
imul edx, eax
add edx... | long long func0(int a1)
{
int v1; // esi
int v2; // r9d
unsigned int v3; // ecx
int v4; // eax
bool v5; // dl
v1 = 2 * a1;
if ( 2 * a1 <= 1 )
return 0LL;
v2 = 1;
v3 = 0;
do
{
v4 = 1;
do
{
v5 = v1 * v1 >= v2 * v2 + v4 * v4;
++v4;
v3 += v5;
}
while ( v1 !=... | func0:
ENDBR64
LEA ESI,[RDI + RDI*0x1]
MOV R8D,ESI
IMUL R8D,ESI
CMP ESI,0x1
JLE 0x00101245
MOV R9D,0x1
XOR ECX,ECX
NOP dword ptr [RAX + RAX*0x1]
LAB_00101210:
MOV EDI,R9D
MOV EAX,0x1
IMUL EDI,R9D
NOP dword ptr [RAX]
LAB_00101220:
MOV EDX,EAX
IMUL EDX,EAX
ADD EDX,EDI
CMP R8D,EDX
SETGE DL
ADD EAX,0x1
MOVZX EDX,DL
ADD ECX... | /* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
iVar1 = param_1 * 2;
if (1 < iVar1) {
iVar5 = 1;
iVar3 = 0;
do {
iVar2 = 1;
do {
iVar4 = iVar2 * iVar2;
iVar2 = iVar2 + 1;
iVar3 = iVar3 + (uint)(iVar4 + iV... |
1,419 | func0 |
#include <assert.h>
| int func0(int radius) {
int rectangles = 0;
int diameter = 2 * radius;
int diameterSquare = diameter * diameter;
for (int a = 1; a < 2 * radius; a++) {
for (int b = 1; b < 2 * radius; b++) {
int diagnalLengthSquare = (a * a + b * b);
if (diagnalLengthSquare <= diam... | int main() {
assert(func0(2) == 8);
assert(func0(1) == 1);
assert(func0(0) == 0);
return 0;
}
| O3 | cpp | func0(int):
endbr64
lea (%rdi,%rdi,1),%ecx
mov %ecx,%edi
imul %ecx,%edi
cmp $0x1,%ecx
jle 1286 <_Z5func0i+0x146>
lea -0x2(%rcx),%eax
lea -0x1(%rcx),%r10d
cmp $0x2,%eax
jbe 128d <_Z5func0i+0x14d>
movd %edi,%xmm6
mov %r10d,%esi
pxor %xmm2,%xmm2
xor %edx,%edx
movdqa 0xea6(%rip),%xmm5
ps... | _Z5func0i:
endbr64
lea esi, [rdi+rdi]
mov r8d, esi
imul r8d, esi
cmp esi, 1
jle loc_127D
lea eax, [rsi-2]
lea r9d, [rsi-1]
cmp eax, 2
jbe loc_1282
movd xmm6, r8d
mov ecx, r9d
pxor xmm3, xmm3
xor edx, edx
movdqa xmm5, cs:xmmword_2010
pshufd xmm7, xmm6, 0
shr ecx, 2
... | long long func0(int a1)
{
int v1; // esi
signed int v2; // r8d
unsigned int v3; // r9d
__m128i v4; // xmm3
int v5; // edx
__m128i si128; // xmm5
__m128i v7; // xmm7
__m128i v8; // xmm8
__m128i v9; // xmm9
__m128i v10; // xmm0
__m128i v11; // xmm2
int v12; // eax
__m128i v13; // xmm4
__m128i... | func0:
ENDBR64
LEA ESI,[RDI + RDI*0x1]
MOV R8D,ESI
IMUL R8D,ESI
CMP ESI,0x1
JLE 0x0010127d
LEA EAX,[RSI + -0x2]
LEA R9D,[RSI + -0x1]
CMP EAX,0x2
JBE 0x00101282
MOVD XMM6,R8D
MOV ECX,R9D
PXOR XMM3,XMM3
XOR EDX,EDX
MOVDQA XMM5,xmmword ptr [0x00102010]
PSHUFD XMM7,XMM6,0x0
SHR ECX,0x2
MOVDQA XMM8,xmmword ptr [0x00102020]
... | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
int func0(int param_1)
{
int iVar1;
int iVar2;
uint uVar3;
int iVar4;
ulong uVar5;
ulong uVar6;
int auVar8 [16];
int auVar9 [16];
int iVar11;
int iVar12;
int iVar13;
int iVar14;
int auVar16 ... |
1,420 | func0 |
#include <assert.h>
| int func0(int a, int b) {
int c = 180 - (a + b);
return c;
}
| int main() {
assert(func0(47, 89) == 44);
assert(func0(45, 95) == 40);
assert(func0(50, 40) == 90);
return 0;
}
| O0 | cpp | func0(int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov -0x14(%rbp),%edx
mov -0x18(%rbp),%eax
add %edx,%eax
mov $0xb4,%edx
sub %eax,%edx
mov %edx,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
pop %rbp
retq
| _Z5func0ii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov edx, [rbp+var_14]
mov eax, [rbp+var_18]
add edx, eax
mov eax, 0B4h
sub eax, edx
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1, int a2)
{
return (unsigned int)(180 - (a2 + a1));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV EDX,dword ptr [RBP + -0x14]
MOV EAX,dword ptr [RBP + -0x18]
ADD EDX,EAX
MOV EAX,0xb4
SUB EAX,EDX
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
return 0xb4 - (param_1 + param_2);
} |
1,421 | func0 |
#include <assert.h>
| int func0(int a, int b) {
int c = 180 - (a + b);
return c;
}
| int main() {
assert(func0(47, 89) == 44);
assert(func0(45, 95) == 40);
assert(func0(50, 40) == 90);
return 0;
}
| O1 | cpp | func0(int, int):
endbr64
add %esi,%edi
mov $0xb4,%eax
sub %edi,%eax
retq
| _Z5func0ii:
endbr64
add edi, esi
mov eax, 0B4h
sub eax, edi
retn | long long func0(int a1, int a2)
{
return (unsigned int)(180 - (a2 + a1));
} | func0:
ENDBR64
ADD EDI,ESI
MOV EAX,0xb4
SUB EAX,EDI
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
return 0xb4 - (param_1 + param_2);
} |
1,422 | func0 |
#include <assert.h>
| int func0(int a, int b) {
int c = 180 - (a + b);
return c;
}
| int main() {
assert(func0(47, 89) == 44);
assert(func0(45, 95) == 40);
assert(func0(50, 40) == 90);
return 0;
}
| O2 | cpp | func0(int, int):
endbr64
add %esi,%edi
mov $0xb4,%eax
sub %edi,%eax
retq
xchg %ax,%ax
| _Z5func0ii:
endbr64
add edi, esi
mov eax, 0B4h
sub eax, edi
retn | long long func0(int a1, int a2)
{
return (unsigned int)(180 - (a2 + a1));
} | func0:
ENDBR64
ADD EDI,ESI
MOV EAX,0xb4
SUB EAX,EDI
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
return 0xb4 - (param_1 + param_2);
} |
1,423 | func0 |
#include <assert.h>
| int func0(int a, int b) {
int c = 180 - (a + b);
return c;
}
| int main() {
assert(func0(47, 89) == 44);
assert(func0(45, 95) == 40);
assert(func0(50, 40) == 90);
return 0;
}
| O3 | cpp | func0(int, int):
endbr64
add %esi,%edi
mov $0xb4,%eax
sub %edi,%eax
retq
xchg %ax,%ax
| _Z5func0ii:
endbr64
add edi, esi
mov eax, 0B4h
sub eax, edi
retn | long long func0(int a1, int a2)
{
return (unsigned int)(180 - (a2 + a1));
} | func0:
ENDBR64
ADD EDI,ESI
MOV EAX,0xb4
SUB EAX,EDI
RET | /* func0(int, int) */
int func0(int param_1,int param_2)
{
return 0xb4 - (param_1 + param_2);
} |
1,424 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
#include <climits>
| int func0(const std::vector<std::pair<int, int>>& test_list) {
int res = INT_MIN;
for (const auto& pair : test_list) {
res = std::max(res, std::max(pair.first, pair.second));
}
return res;
}
| int main() {
assert(func0({{2, 4}, {6, 7}, {5, 1}, {6, 10}, {8, 7}}) == 10);
assert(func0({{3, 5}, {7, 8}, {6, 2}, {7, 11}, {9, 8}}) == 11);
assert(func0({{4, 6}, {8, 9}, {7, 3}, {8, 12}, {10, 9}}) == 12);
std::cout << "All tests passed successfully." << std::endl;
return 0;
}
| O0 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x40,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
movl $0x80000000,-0x2c(%rbp)
mov -0x38(%rbp),%rax
mov %rax,-0x18(%rbp)
mov -0x18(%... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov [rbp+var_2C], 80000000h
mov rax, [rbp+var_38]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rdi, rax
call _Z... | long long func0(long long a1)
{
long long v1; // rax
unsigned int v3; // [rsp+14h] [rbp-2Ch] BYREF
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 = 0x8... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x2c],0x80000000
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
CALL 0x0010172e
MOV q... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
int func0(vector *param_1)
{
bool bVar1;
int *piVar2;
long in_FS_OFFSET;
int local_34;
int8 local_30;
int8 local_28;
vector<std::pair<int,int>,std::allocator<std::pair<int,int>>> *local_20;
int *local_18;
lon... |
1,425 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
#include <climits>
| int func0(const std::vector<std::pair<int, int>>& test_list) {
int res = INT_MIN;
for (const auto& pair : test_list) {
res = std::max(res, std::max(pair.first, pair.second));
}
return res;
}
| int main() {
assert(func0({{2, 4}, {6, 7}, {5, 1}, {6, 10}, {8, 7}}) == 10);
assert(func0({{3, 5}, {7, 8}, {6, 2}, {7, 11}, {9, 8}}) == 11);
assert(func0({{4, 6}, {8, 9}, {7, 3}, {8, 12}, {10, 9}}) == 12);
std::cout << "All tests passed successfully." << std::endl;
return 0;
}
| O1 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
sub $0x18,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movl $0x80000000,0x4(%rsp)
mov (%rdi),%rax
mov 0x8(%rdi),%rdi
cmp %rdi,%rax
je 12c7 <_Z5func0RKSt6vectorISt4pairIiiESaIS1_EE+0x5e>
l... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
sub rsp, 18h
mov rax, fs:28h
mov [rsp+18h+var_10], rax
xor eax, eax
mov [rsp+18h+var_14], 80000000h
mov rax, [rdi]
mov rdi, [rdi+8]
cmp rdi, rax
jz short loc_1287
lea r8, [rsp+18h+var_14]
jmp short loc_1273
loc_125C:
cmp [... | long long func0(unsigned int **a1)
{
unsigned int *v1; // rax
unsigned int *i; // rdi
unsigned int *v3; // rdx
signed int v4; // ecx
unsigned int v6; // [rsp+4h] [rbp-14h] BYREF
unsigned long long v7; // [rsp+8h] [rbp-10h]
v7 = __readfsqword(0x28u);
v6 = 0x80000000;
v1 = *a1;
for ( i = a1[1]; v1 !... | func0:
ENDBR64
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x4],0x80000000
MOV RAX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
CMP RDI,RAX
JZ 0x00101287
LEA R8,[RSP + 0x4]
JMP 0x00101273
LAB_0010125c:
CMP dword ptr [RSP + 0x4],ECX
CMOVGE RDX,R8
MOV EDX,dword... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
int *piVar3;
long in_FS_OFFSET;
int local_14;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_14 = -0x80000000;
piVar1 = *(int **)param_... |
1,426 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
#include <climits>
| int func0(const std::vector<std::pair<int, int>>& test_list) {
int res = INT_MIN;
for (const auto& pair : test_list) {
res = std::max(res, std::max(pair.first, pair.second));
}
return res;
}
| int main() {
assert(func0({{2, 4}, {6, 7}, {5, 1}, {6, 10}, {8, 7}}) == 10);
assert(func0({{3, 5}, {7, 8}, {6, 2}, {7, 11}, {9, 8}}) == 11);
assert(func0({{4, 6}, {8, 9}, {7, 3}, {8, 12}, {10, 9}}) == 12);
std::cout << "All tests passed successfully." << std::endl;
return 0;
}
| O2 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rdi
mov $0x80000000,%r8d
cmp %rdi,%rax
je 15e3 <_Z5func0RKSt6vectorISt4pairIiiESaIS1_EE+0x43>
nopw %cs:0x0(%rax,%rax,1)
mov (%rax),%edx
mov 0x4(%rax),%ecx
mov %rax,%rs... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
mov rax, [rdi]
mov r8, [rdi+8]
mov edi, 80000000h
cmp r8, rax
jz short loc_1519
nop dword ptr [rax]
loc_14F8:
mov edx, [rax]
mov ecx, [rax+4]
mov rsi, rax
cmp edx, ecx
jge short loc_150A
lea rsi, [rax+4]
mov edx, ecx
l... | long long func0(_QWORD *a1)
{
_DWORD *v1; // rax
_DWORD *v2; // r8
unsigned int i; // edi
signed int v4; // edx
unsigned int *v5; // rsi
v1 = (_DWORD *)*a1;
v2 = (_DWORD *)a1[1];
for ( i = 0x80000000; v1 != v2; v1 += 2 )
{
v4 = *v1;
v5 = v1;
if ( *v1 < v1[1] )
{
v5 = v1 + 1;
... | func0:
ENDBR64
MOV RAX,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x8]
MOV EDI,0x80000000
CMP R8,RAX
JZ 0x00101519
NOP dword ptr [RAX]
LAB_001014f8:
MOV EDX,dword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x4]
MOV RSI,RAX
CMP EDX,ECX
JGE 0x0010150a
LEA RSI,[RAX + 0x4]
MOV EDX,ECX
LAB_0010150a:
CMP EDI,EDX
JGE 0x00101510
MOV EDI,... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
int *piVar3;
int iVar4;
iVar4 = -0x80000000;
for (piVar1 = *(int **)param_1; *(int **)(param_1 + 8) != piVar1; piVar1 = piVar1 + 2) {
piVar3 = piVar1;
... |
1,427 | func0 |
#include <iostream>
#include <vector>
#include <cassert>
#include <climits>
| int func0(const std::vector<std::pair<int, int>>& test_list) {
int res = INT_MIN;
for (const auto& pair : test_list) {
res = std::max(res, std::max(pair.first, pair.second));
}
return res;
}
| int main() {
assert(func0({{2, 4}, {6, 7}, {5, 1}, {6, 10}, {8, 7}}) == 10);
assert(func0({{3, 5}, {7, 8}, {6, 2}, {7, 11}, {9, 8}}) == 11);
assert(func0({{4, 6}, {8, 9}, {7, 3}, {8, 12}, {10, 9}}) == 12);
std::cout << "All tests passed successfully." << std::endl;
return 0;
}
| O3 | cpp | func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rcx
mov $0x80000000,%r8d
cmp %rcx,%rax
je 155a <_Z5func0RKSt6vectorISt4pairIiiESaIS1_EE+0x3a>
nopw %cs:0x0(%rax,%rax,1)
mov (%rax),%edx
cmp %edx,0x4(%rax)
cmovge 0x4(%rax... | _Z5func0RKSt6vectorISt4pairIiiESaIS1_EE:
endbr64
mov rdx, [rdi]
mov rdi, [rdi+8]
mov ecx, 80000000h
cmp rdi, rdx
jz short loc_1590
nop dword ptr [rax]
loc_1578:
mov eax, [rdx]
mov esi, [rdx+4]
cmp eax, esi
cmovl eax, esi
cmp ecx, eax
cmovl ecx, eax
add rdx, 8
cmp rdx... | long long func0(signed int **a1)
{
signed int *v1; // rdx
signed int *v2; // rdi
unsigned int i; // ecx
signed int v4; // eax
v1 = *a1;
v2 = a1[1];
for ( i = 0x80000000; v1 != v2; v1 += 2 )
{
v4 = *v1;
if ( *v1 < v1[1] )
v4 = v1[1];
if ( (int)i < v4 )
i = v4;
}
return i;
} | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
MOV ECX,0x80000000
CMP RDI,RDX
JZ 0x00101590
NOP dword ptr [RAX]
LAB_00101578:
MOV EAX,dword ptr [RDX]
MOV ESI,dword ptr [RDX + 0x4]
CMP EAX,ESI
CMOVL EAX,ESI
CMP ECX,EAX
CMOVL ECX,EAX
ADD RDX,0x8
CMP RDX,RDI
JNZ 0x00101578
LAB_00101590:
MOV EAX,ECX
R... | /* func0(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) */
int func0(vector *param_1)
{
int iVar1;
int iVar2;
int *piVar3;
iVar2 = -0x80000000;
for (piVar3 = *(int **)param_1; *(int **)(param_1 + 8) != piVar3; piVar3 = piVar3 + 2) {
iVar1 = *piVar3;
if (*piVar3 < ... |
1,428 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
std::vector<int> result;
for (size_t i = 0; i < nums1.size(); ++i) {
result.push_back(nums1[i] % nums2[i]);
}
return result;
}
| int main() {
assert((func0({4, 5, 6}, {1, 2, 3}) == std::vector<int>{0, 1, 0}));
assert((func0({3, 2}, {1, 4}) == std::vector<int>{0, 2}));
assert((func0({90, 120}, {50, 70}) == std::vector<int>{40, 50}));
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x38(%rbp)
mov %rsi,-0x40(%rbp)
mov %rdx,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x38(%rbp)... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_48], rdx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_38]
mov rdi, rax
call _ZNSt6vectorIiSaIiEEC2Ev; std:... | long long func0(long long a1, long long a2, long long a3)
{
int v3; // ebx
unsigned long long v4; // rax
int v7; // [rsp+2Ch] [rbp-24h] BYREF
unsigned long long i; // [rsp+30h] [rbp-20h]
unsigned long long v9; // [rsp+38h] [rbp-18h]
v9 = __readfsqword(0x28u);
std::vector<int>::vector(a1);
for ( i = 0L... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x48],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,RAX
CALL 0x00101c0a
MOV qword ptr [RBP + -0x20],0x0
JM... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
int iVar1;
int *piVar2;
ulong uVar3;
vector<int,std::allocator<int>> *in_RDX;
long in_FS_OFFSET;
int local_2c;
ulong local_28;
long local_20;
... |
1,429 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
std::vector<int> result;
for (size_t i = 0; i < nums1.size(); ++i) {
result.push_back(nums1[i] % nums2[i]);
}
return result;
}
| int main() {
assert((func0({4, 5, 6}, {1, 2, 3}) == std::vector<int>{0, 1, 0}));
assert((func0({3, 2}, {1, 4}) == std::vector<int>{0, 2}));
assert((func0({90, 120}, {50, 70}) == std::vector<int>{40, 50}));
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %rdi,%rbp
mov %rdx,%r13
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 10h
mov rbp, rdi
mov r13, rdx
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rdx, [r... | _QWORD * func0(_QWORD *a1, long long *a2, _QWORD *a3)
{
long long v4; // rdx
unsigned long long v6; // rbx
int v7; // edx
int *v8; // rsi
int v10; // [rsp+4h] [rbp-34h] BYREF
unsigned long long v11; // [rsp+8h] [rbp-30h]
v11 = __readfsqword(0x28u);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v4 = *a2;
... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV RBP,RDI
MOV R13,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RDX,qword ptr [RSI]
CMP RDX,qword ptr [RSI + 0x8]
JZ 0x00101314
... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
int *piVar1;
long *in_RDX;
long lVar2;
ulong uVar3;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28... |
1,430 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
std::vector<int> result;
for (size_t i = 0; i < nums1.size(); ++i) {
result.push_back(nums1[i] % nums2[i]);
}
return result;
}
| int main() {
assert((func0({4, 5, 6}, {1, 2, 3}) == std::vector<int>{0, 1, 0}));
assert((func0({3, 2}, {1, 4}) == std::vector<int>{0, 2}));
assert((func0({90, 120}, {50, 70}) == std::vector<int>{40, 50}));
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
push %r13
mov %rdx,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
pxor xmm0, xmm0
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov rcx, [rsi]
mov qword ptr [rdi+10h], 0
cmp [rsi+8], r... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v4; // rcx
int *v7; // rdi
int *v8; // rsi
long long v9; // rbx
int v10; // edx
int v12; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v13; // [rsp+4h] [rbp-30h]
v13 = __readfsqword(0x28u);
*(_OWORD *)a1 = 0LL;
v4 = *a2;
*(_QW... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV RCX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RCX
JZ 0x00101790
MOV R12,RSI
MOV R13,R... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
long lVar1;
long *in_RDX;
ulong uVar2;
int *piVar3;
int *piVar4;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_F... |
1,431 | func0 |
#include <vector>
#include <cassert>
| std::vector<int> func0(const std::vector<int>& nums1, const std::vector<int>& nums2) {
std::vector<int> result;
for (size_t i = 0; i < nums1.size(); ++i) {
result.push_back(nums1[i] % nums2[i]);
}
return result;
}
| int main() {
assert((func0({4, 5, 6}, {1, 2, 3}) == std::vector<int>{0, 1, 0}));
assert((func0({3, 2}, {1, 4}) == std::vector<int>{0, 2}));
assert((func0({90, 120}, {50, 70}) == std::vector<int>{40, 50}));
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
mov %rdx,%r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x10,%rsp
mov %fs:0x28,%rax
mov %rax,0x8(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rd... | _Z5func0RKSt6vectorIiSaIiEES3_:
endbr64
push r14
pxor xmm0, xmm0
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 10h
mov rax, fs:28h
mov [rsp+38h+var_30], rax
xor eax, eax
movups xmmword ptr [rdi], xmm0
mov rcx, [rsi]
mov qword ptr [rdi+10h], 0
cmp [rsi+8], r... | long long func0(long long a1, long long *a2, _QWORD *a3)
{
long long v4; // rcx
int *v7; // rdi
int *v8; // rsi
long long v9; // rbx
int v10; // edx
int v12; // [rsp+0h] [rbp-34h] BYREF
unsigned long long v13; // [rsp+4h] [rbp-30h]
v13 = __readfsqword(0x28u);
*(_OWORD *)a1 = 0LL;
v4 = *a2;
*(_QW... | func0:
ENDBR64
PUSH R14
PXOR XMM0,XMM0
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOVUPS xmmword ptr [RDI],XMM0
MOV RCX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],RCX
JZ 0x00101790
MOV R12,RSI
MOV R13,R... | /* func0(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
vector * func0(vector *param_1,vector *param_2)
{
long lVar1;
long *in_RDX;
ulong uVar2;
int *piVar3;
int *piVar4;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_F... |
1,432 | func0 |
#include <string>
#include <assert.h>
| std::string func0(int a, int b, int c) {
if (2 * b * b == 9 * a * c) {
return "Yes";
} else {
return "No";
}
}
| int main() {
assert(func0(1, 3, 2) == "Yes");
assert(func0(1, 2, 3) == "No");
assert(func0(1, -5, 6) == "No");
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
mov -0x30(%rbp),%eax
imul %eax,%eax
lea (%rax,%rax,1),... | _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
mov eax, [rbp+var_40]
imul eax, eax
lea ecx, [rax+rax]
m... | long long func0[abi:cxx11](long long a1, int a2, int a3, int a4)
{
char v5; // [rsp+27h] [rbp-29h] BYREF
char *v6; // [rsp+28h] [rbp-28h]
char *v7; // [rsp+30h] [rbp-20h]
unsigned long long v8; // [rsp+38h] [rbp-18h]
v8 = __readfsqword(0x28u);
if ( 2 * a3 * a3 == 9 * a4 * a2 )
{
v6 = &v5;
std::s... | 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
MOV EAX,dword ptr [RBP + -0x40]
IMUL EAX,EAX
LEA EC... | /* 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;
allocator local_31;
allocator *local_30;
allocator *local_28;
long local_20;
this = (string *)CONCAT44(in_register_0000003... |
1,433 | func0 |
#include <string>
#include <assert.h>
| std::string func0(int a, int b, int c) {
if (2 * b * b == 9 * a * c) {
return "Yes";
} else {
return "No";
}
}
| int main() {
assert(func0(1, 3, 2) == "Yes");
assert(func0(1, 2, 3) == "No");
assert(func0(1, -5, 6) == "No");
return 0;
}
| O1 | cpp | func0[abi:cxx11](int, int, int):
endbr64
push %rbx
mov %rdi,%rbx
imul %edx,%edx
add %edx,%edx
imul %esi,%ecx
lea (%rcx,%rcx,8),%eax
cmp %eax,%edx
je 123c <_Z5func0B5cxx11iii+0x33>
lea 0x10(%rdi),%rax
mov %rax,(%rdi)
lea 0xe0a(%rip),%rdx
lea -0x2(%rdx),%rsi
callq 13b4 <_ZNSt7__cxx1112b... | _Z5func0B5cxx11iii:
endbr64
push rbx
mov rbx, rdi
imul edx, edx
add edx, edx
imul esi, ecx
lea eax, [rsi+rsi*8]
cmp edx, eax
jz short loc_123C
lea rax, [rdi+10h]
mov [rdi], rax
lea rdx, unk_200A
lea rsi, [rdx-2]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE1... | _QWORD * func0[abi:cxx11](_QWORD *a1, int a2, int a3, int a4)
{
*a1 = a1 + 2;
if ( 2 * a3 * a3 == 9 * a4 * a2 )
std::string::_M_construct<char const*>(a1, (char *)&unk_2007 - 3);
else
std::string::_M_construct<char const*>(a1, (char *)&unk_200A - 2);
return a1;
} | func0[abi:cxx11]:
ENDBR64
PUSH RBX
MOV RBX,RDI
IMUL EDX,EDX
ADD EDX,EDX
IMUL ESI,ECX
LEA EAX,[RSI + RSI*0x8]
CMP EDX,EAX
JZ 0x0010123c
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
LEA RDX,[0x10200a]
LEA RSI,[RDX + -0x2]
CALL 0x001013da
LAB_00101237:
MOV RAX,RBX
POP RBX
RET
LAB_0010123c:
LEA RAX,[RDI + 0x10]
MOV qword p... | /* func0[abi:cxx11](int, int, int) */
int8 func0_abi_cxx11_(int param_1,int param_2,int param_3)
{
int in_ECX;
int4 in_register_0000003c;
if (param_3 * param_3 * 2 == param_2 * in_ECX * 9) {
*(long *)CONCAT44(in_register_0000003c,param_1) = CONCAT44(in_register_0000003c,param_1) + 0x10;
std::string::... |
1,434 | func0 |
#include <string>
#include <assert.h>
| std::string func0(int a, int b, int c) {
if (2 * b * b == 9 * a * c) {
return "Yes";
} else {
return "No";
}
}
| int main() {
assert(func0(1, 3, 2) == "Yes");
assert(func0(1, 2, 3) == "No");
assert(func0(1, -5, 6) == "No");
return 0;
}
| O2 | cpp | func0[abi:cxx11](int, int, int):
endbr64
imul %edx,%edx
mov %rdi,%rax
lea 0x10(%rdi),%rdi
imul %esi,%ecx
mov %rdi,(%rax)
add %edx,%edx
lea (%rcx,%rcx,8),%ecx
cmp %ecx,%edx
je 13b8 <_Z5func0B5cxx11iii+0x38>
mov $0x6f4e,%edx
movq $0x2,0x8(%rax)
mov %dx,0x10(%rax)
movb $0x0,0x12(%rax)
r... | _Z5func0B5cxx11iii:
endbr64
imul edx, edx
push rbx
mov rbx, rdi
imul esi, ecx
add edx, edx
lea eax, [rsi+rsi*8]
cmp edx, eax
lea rax, [rdi+10h]
mov [rdi], rax
jz short loc_1448
lea rdx, unk_200A
lea rsi, [rdx-2]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE1... | _QWORD * func0[abi:cxx11](_QWORD *a1, int a2, int a3, int a4)
{
*a1 = a1 + 2;
if ( 2 * a3 * a3 == 9 * a4 * a2 )
std::string::_M_construct<char const*>(a1, (char *)&unk_2007 - 3);
else
std::string::_M_construct<char const*>(a1, (char *)&unk_200A - 2);
return a1;
} | func0[abi:cxx11]:
ENDBR64
IMUL EDX,EDX
PUSH RBX
MOV RBX,RDI
IMUL ESI,ECX
ADD EDX,EDX
LEA EAX,[RSI + RSI*0x8]
CMP EDX,EAX
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
JZ 0x00101448
LEA RDX,[0x10200a]
LEA RSI,[RDX + -0x2]
CALL 0x00101360
MOV RAX,RBX
POP RBX
RET
LAB_00101448:
LEA RDX,[0x102007]
LEA RSI,[RDX + -0x3]
CALL 0... | /* func0[abi:cxx11](int, int, int) */
int8 func0_abi_cxx11_(int param_1,int param_2,int param_3)
{
int in_ECX;
int4 in_register_0000003c;
*(long *)CONCAT44(in_register_0000003c,param_1) = CONCAT44(in_register_0000003c,param_1) + 0x10;
if (param_3 * param_3 * 2 != param_2 * in_ECX * 9) {
std::string::_M... |
1,435 | func0 |
#include <string>
#include <assert.h>
| std::string func0(int a, int b, int c) {
if (2 * b * b == 9 * a * c) {
return "Yes";
} else {
return "No";
}
}
| int main() {
assert(func0(1, 3, 2) == "Yes");
assert(func0(1, 2, 3) == "No");
assert(func0(1, -5, 6) == "No");
return 0;
}
| O3 | cpp | func0[abi:cxx11](int, int, int):
endbr64
imul %edx,%edx
mov %rdi,%rax
lea 0x10(%rdi),%rdi
imul %esi,%ecx
mov %rdi,(%rax)
add %edx,%edx
lea (%rcx,%rcx,8),%ecx
cmp %ecx,%edx
je 1338 <_Z5func0B5cxx11iii+0x38>
mov $0x6f4e,%edx
movq $0x2,0x8(%rax)
mov %dx,0x10(%rax)
movb $0x0,0x12(%rax)
r... | _Z5func0B5cxx11iii:
endbr64
imul edx, edx
mov rax, rdi
imul esi, ecx
add edx, edx
lea ecx, [rsi+rsi*8]
cmp edx, ecx
lea rdx, [rdi+10h]
mov [rdi], rdx
jz short loc_1348
mov edx, 6F4Eh
mov qword ptr [rdi+8], 2
mov [rdi+10h], dx
mov byte ptr [rdi+12h], 0
retn
loc_1348:
mo... | long long func0[abi:cxx11](long long a1, int a2, int a3, int a4)
{
long long result; // rax
result = a1;
*(_QWORD *)a1 = a1 + 16;
if ( 2 * a3 * a3 == 9 * a4 * a2 )
{
*(_BYTE *)(a1 + 18) = 115;
*(_WORD *)(a1 + 16) = 25945;
*(_QWORD *)(a1 + 8) = 3LL;
*(_BYTE *)(a1 + 19) = 0;
}
else
{
... | func0[abi:cxx11]:
ENDBR64
IMUL EDX,EDX
MOV RAX,RDI
IMUL ESI,ECX
ADD EDX,EDX
LEA ECX,[RSI + RSI*0x8]
CMP EDX,ECX
LEA RDX,[RDI + 0x10]
MOV qword ptr [RDI],RDX
JZ 0x00101348
MOV EDX,0x6f4e
MOV qword ptr [RDI + 0x8],0x2
MOV word ptr [RDI + 0x10],DX
MOV byte ptr [RDI + 0x12],0x0
RET
LAB_00101348:
MOV ECX,0x6559
MOV byte ptr... | /* func0[abi:cxx11](int, int, int) */
int8 func0_abi_cxx11_(int param_1,int param_2,int param_3)
{
int in_ECX;
int4 in_register_0000003c;
*(long *)CONCAT44(in_register_0000003c,param_1) = CONCAT44(in_register_0000003c,param_1) + 0x10;
if (param_3 * param_3 * 2 != param_2 * in_ECX * 9) {
*(int8 *)(CONCA... |
1,436 | func0 | #include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int n) {
int result = pow(2, n) - 1;
return result * result - 2;
}
| int main() {
assert(func0(2) == 7);
assert(func0(4) == 223);
assert(func0(5) == 959);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %edi,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
mov 0xec4(%rip),%rax
movapd %xmm0,%xmm1
movq %rax,%xmm0
callq 10b0 <pow@plt>
movsd 0xeb6(%rip),%xmm1
subsd %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
imul ... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_14], edi
pxor xmm0, xmm0
cvtsi2sd xmm0, [rbp+var_14]
mov rax, cs:x
movapd xmm1, xmm0; y
movq xmm0, rax; x
call _pow
movq rax, xmm0
movsd xmm0, cs:qword_2078
movq xmm1, rax
subsd xmm1, xmm0
cvttsd2si eax, xmm1
mov ... | long long func0(int a1)
{
double v1; // rax
v1 = pow(2.0, (double)a1);
return (unsigned int)((int)(v1 - 1.0) * (int)(v1 - 1.0) - 2);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x14],EDI
PXOR XMM0,XMM0
CVTSI2SD XMM0,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [0x00102070]
MOVAPD XMM1,XMM0
MOVQ XMM0,RAX
CALL 0x00101070
MOVQ RAX,XMM0
MOVSD XMM0,qword ptr [0x00102078]
MOVQ XMM1,RAX
SUBSD XMM1,XMM0
CVTTSD2SI EAX,XMM1
MOV dword p... | /* func0(int) */
int func0(int param_1)
{
double dVar1;
dVar1 = pow(DAT_00102070,(double)param_1);
return (int)(dVar1 - DAT_00102078) * (int)(dVar1 - DAT_00102078) + -2;
} |
1,437 | func0 | #include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int n) {
int result = pow(2, n) - 1;
return result * result - 2;
}
| int main() {
assert(func0(2) == 7);
assert(func0(4) == 223);
assert(func0(5) == 959);
return 0;
}
| O1 | cpp | func0(int):
endbr64
sub $0x8,%rsp
pxor %xmm1,%xmm1
cvtsi2sd %edi,%xmm1
movsd 0xec7(%rip),%xmm0
callq 10b0 <pow@plt>
subsd 0xec2(%rip),%xmm0
cvttsd2si %xmm0,%eax
imul %eax,%eax
sub $0x2,%eax
add $0x8,%rsp
retq
| _Z5func0i:
endbr64
sub rsp, 8
pxor xmm1, xmm1
cvtsi2sd xmm1, edi; y
movsd xmm0, cs:x; x
call _pow
subsd xmm0, cs:qword_2068
cvttsd2si eax, xmm0
imul eax, eax
sub eax, 2
add rsp, 8
retn | long long func0(int a1)
{
double v1; // xmm0_8
v1 = pow(2.0, (double)a1);
return (unsigned int)((int)(v1 - 1.0) * (int)(v1 - 1.0) - 2);
} | func0:
ENDBR64
SUB RSP,0x8
PXOR XMM1,XMM1
CVTSI2SD XMM1,EDI
MOVSD XMM0,qword ptr [0x00102060]
CALL 0x00101070
SUBSD XMM0,qword ptr [0x00102068]
CVTTSD2SI EAX,XMM0
IMUL EAX,EAX
SUB EAX,0x2
ADD RSP,0x8
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
int func0(int param_1)
{
double dVar1;
dVar1 = pow(DAT_00102060,(double)param_1);
return (int)(dVar1 - _DAT_00102068) * (int)(dVar1 - _DAT_00102068) + -2;
} |
1,438 | func0 | #include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int n) {
int result = pow(2, n) - 1;
return result * result - 2;
}
| int main() {
assert(func0(2) == 7);
assert(func0(4) == 223);
assert(func0(5) == 959);
return 0;
}
| O2 | cpp | func0(int):
endbr64
pxor %xmm1,%xmm1
sub $0x8,%rsp
movsd 0xe14(%rip),%xmm0
cvtsi2sd %edi,%xmm1
callq 1090 <pow@plt>
subsd 0xe0b(%rip),%xmm0
add $0x8,%rsp
cvttsd2si %xmm0,%eax
imul %eax,%eax
sub $0x2,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
xchg %ax,%ax
| _Z5func0i:
endbr64
pxor xmm1, xmm1
sub rsp, 8
movsd xmm0, cs:x; x
cvtsi2sd xmm1, edi; y
call _pow
subsd xmm0, cs:qword_2068
add rsp, 8
cvttsd2si eax, xmm0
imul eax, eax
sub eax, 2
retn | long long func0(int a1)
{
double v1; // xmm0_8
v1 = pow(2.0, (double)a1);
return (unsigned int)((int)(v1 - 1.0) * (int)(v1 - 1.0) - 2);
} | func0:
ENDBR64
PXOR XMM1,XMM1
SUB RSP,0x8
MOVSD XMM0,qword ptr [0x00102060]
CVTSI2SD XMM1,EDI
CALL 0x00101070
SUBSD XMM0,qword ptr [0x00102068]
ADD RSP,0x8
CVTTSD2SI EAX,XMM0
IMUL EAX,EAX
SUB EAX,0x2
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
int func0(int param_1)
{
double dVar1;
dVar1 = pow(DAT_00102060,(double)param_1);
return (int)(dVar1 - _DAT_00102068) * (int)(dVar1 - _DAT_00102068) + -2;
} |
1,439 | func0 | #include <iostream>
#include <cmath>
#include <assert.h>
| int func0(int n) {
int result = pow(2, n) - 1;
return result * result - 2;
}
| int main() {
assert(func0(2) == 7);
assert(func0(4) == 223);
assert(func0(5) == 959);
return 0;
}
| O3 | cpp | func0(int):
endbr64
pxor %xmm1,%xmm1
sub $0x8,%rsp
movsd 0xe14(%rip),%xmm0
cvtsi2sd %edi,%xmm1
callq 1090 <pow@plt>
subsd 0xe0b(%rip),%xmm0
add $0x8,%rsp
cvttsd2si %xmm0,%eax
imul %eax,%eax
sub $0x2,%eax
retq
nopw %cs:0x0(%rax,%rax,1)
xchg %ax,%ax
| _Z5func0i:
endbr64
pxor xmm1, xmm1
sub rsp, 8
movsd xmm0, cs:x; x
cvtsi2sd xmm1, edi; y
call _pow
subsd xmm0, cs:qword_2010
add rsp, 8
cvttsd2si eax, xmm0
imul eax, eax
sub eax, 2
retn | long long func0(int a1)
{
double v1; // xmm0_8
v1 = pow(2.0, (double)a1);
return (unsigned int)((int)(v1 - 1.0) * (int)(v1 - 1.0) - 2);
} | func0:
ENDBR64
PXOR XMM1,XMM1
SUB RSP,0x8
MOVSD XMM0,qword ptr [0x00102008]
CVTSI2SD XMM1,EDI
CALL 0x00101050
SUBSD XMM0,qword ptr [0x00102010]
ADD RSP,0x8
CVTTSD2SI EAX,XMM0
IMUL EAX,EAX
SUB EAX,0x2
RET | /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* func0(int) */
int func0(int param_1)
{
double dVar1;
dVar1 = pow(DAT_00102008,(double)param_1);
return (int)(dVar1 - _DAT_00102010) * (int)(dVar1 - _DAT_00102010) + -2;
} |
1,440 | func0 |
#include <cassert>
#include <string>
#include <vector>
#include <variant>
using Element = std::variant<std::vector<int>, std::string>;
| std::vector<Element> func0(const std::vector<Element>& list1) {
std::vector<Element> result;
for (const auto& x : list1) {
if (std::holds_alternative<std::string>(x)) {
if (!std::get<std::string>(x).empty()) {
result.push_back(x);
}
}
else ... | int main() {
// First assert
{
std::vector<Element> input = { std::vector<int>{}, std::vector<int>{}, std::vector<int>{}, "Red", "Green", std::vector<int>{1,2}, "Blue", std::vector<int>{}, std::vector<int>{} };
std::vector<Element> expected = { "Red", "Green", std::vector<int>{1,2}, "Blue" }... | O0 | cpp | func0(std::vector<std::variant<std::vector<int, std::allocator<int> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::variant<std::vector<int, std::allocator<int> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&):
end... | _Z5func0RKSt6vectorISt7variantIJS_IiSaIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaIS9_EE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_48]
mov ... | long long func0(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
long long v5; // [rsp+18h] [rbp-38h] BYREF
_QWORD v6[2]; // [rsp+20h] [rbp-30h] BYREF
long long v7; // [rsp+30h] [rbp-20h]
unsigned long long v8; // [rsp+38h] [rbp-18h]
v8 = __readfsqword(0x28u);
std::vector<std::v... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
CALL 0x001040fa
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x28],RAX
MO... | /* func0(std::vector<std::variant<std::vector<int, std::allocator<int> >, std::string >,
std::allocator<std::variant<std::vector<int, std::allocator<int> >, std::string > > > const&) */
vector * func0(vector *param_1)
{
char cVar1;
bool bVar2;
vector *this;
vector<std::variant<std::vector<int,std::allocato... |
1,441 | func0 |
#include <cassert>
#include <string>
#include <vector>
#include <variant>
using Element = std::variant<std::vector<int>, std::string>;
| std::vector<Element> func0(const std::vector<Element>& list1) {
std::vector<Element> result;
for (const auto& x : list1) {
if (std::holds_alternative<std::string>(x)) {
if (!std::get<std::string>(x).empty()) {
result.push_back(x);
}
}
else ... | int main() {
// First assert
{
std::vector<Element> input = { std::vector<int>{}, std::vector<int>{}, std::vector<int>{}, "Red", "Green", std::vector<int>{1,2}, "Blue", std::vector<int>{}, std::vector<int>{} };
std::vector<Element> expected = { "Red", "Green", std::vector<int>{1,2}, "Blue" }... | O1 | cpp | func0(std::vector<std::variant<std::vector<int, std::allocator<int> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::variant<std::vector<int, std::allocator<int> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&):
end... | _Z5func0RKSt6vectorISt7variantIJS_IiSaIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaIS9_EE:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 18h
mov r12, rdi
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbx, ... | _QWORD * func0(_QWORD *a1, _QWORD *a2)
{
_QWORD *v2; // rbx
_QWORD *v3; // r13
char v5; // al
long long v6; // r14
unsigned long long v7; // rcx
unsigned long long v8; // rcx
struct _Unwind_Exception *v9; // rbx
_DWORD *v10; // r15
_DWORD *v11; // rsi
signed long long v12; // rdx
_DWORD *v13; // r... | func0:
ENDBR64
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R12,RDI
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JNZ 0x001013e7
LAB_001013c1:
MOV RAX,R12
ADD RSP,0x18
POP RBX
POP RBP
POP R... | /* func0(std::vector<std::variant<std::vector<int, std::allocator<int> >, std::string >,
std::allocator<std::variant<std::vector<int, std::allocator<int> >, std::string > > > const&) */
vector * func0(vector *param_1)
{
variant *pvVar1;
_Variant_storage<false,std::vector<int,std::allocator<int>>,std::string> *... |
1,442 | func0 |
#include <cassert>
#include <string>
#include <vector>
#include <variant>
using Element = std::variant<std::vector<int>, std::string>;
| std::vector<Element> func0(const std::vector<Element>& list1) {
std::vector<Element> result;
for (const auto& x : list1) {
if (std::holds_alternative<std::string>(x)) {
if (!std::get<std::string>(x).empty()) {
result.push_back(x);
}
}
else ... | int main() {
// First assert
{
std::vector<Element> input = { std::vector<int>{}, std::vector<int>{}, std::vector<int>{}, "Red", "Green", std::vector<int>{1,2}, "Blue", std::vector<int>{}, std::vector<int>{} };
std::vector<Element> expected = { "Red", "Green", std::vector<int>{1,2}, "Blue" }... | O2 | cpp | func0(std::vector<std::variant<std::vector<int, std::allocator<int> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::variant<std::vector<int, std::allocator<int> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&):
end... | _Z5func0RKSt6vectorISt7variantIJS_IiSaIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaIS9_EE:
endbr64
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov r12, [rsi+8]
mov rbx, [rsi]
cmp ... | long long func0(long long a1, long long *a2)
{
long long v2; // r12
long long v3; // rbx
char v4; // al
long long v5; // r13
signed long long v6; // rax
signed long long v7; // r14
_DWORD *v8; // rcx
_DWORD *v9; // rsi
long long v10; // r14
long long v12; // rdx
*(_QWORD *)(a1 + 16) = 0LL;
*(_... | func0:
ENDBR64
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV R12,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
CMP R12,RBX
JZ 0x00102835
NOP
LAB_00102760:
MOVZX EAX,byte ptr [RBX + 0x20]
CMP AL,0x1
JZ 0x00102848
TEST AL,AL
JNZ 0x... | /* func0(std::vector<std::variant<std::vector<int, std::allocator<int> >, std::string >,
std::allocator<std::variant<std::vector<int, std::allocator<int> >, std::string > > > const&) */
vector * func0(vector *param_1)
{
long *plVar1;
int4 *__src;
long lVar2;
vector *pvVar3;
vector *__dest;
vector *pvVa... |
1,443 | func0 |
#include <cassert>
#include <string>
#include <vector>
#include <variant>
using Element = std::variant<std::vector<int>, std::string>;
| std::vector<Element> func0(const std::vector<Element>& list1) {
std::vector<Element> result;
for (const auto& x : list1) {
if (std::holds_alternative<std::string>(x)) {
if (!std::get<std::string>(x).empty()) {
result.push_back(x);
}
}
else ... | int main() {
// First assert
{
std::vector<Element> input = { std::vector<int>{}, std::vector<int>{}, std::vector<int>{}, "Red", "Green", std::vector<int>{1,2}, "Blue", std::vector<int>{}, std::vector<int>{} };
std::vector<Element> expected = { "Red", "Green", std::vector<int>{1,2}, "Blue" }... | O3 | cpp | func0(std::vector<std::variant<std::vector<int, std::allocator<int> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::variant<std::vector<int, std::allocator<int> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&):
end... | _Z5func0RKSt6vectorISt7variantIJS_IiSaIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaIS9_EE:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rsp+48h+var_40], rax
xor eax, eax
mov qword ... | long long func0(long long a1, long long *a2)
{
long long v3; // r12
long long v4; // rbx
char v5; // al
long long v6; // r13
signed long long v7; // rax
signed long long v8; // r14
_DWORD *v9; // rcx
_DWORD *v10; // rsi
long long v11; // r14
size_t v13; // r14
void *v14; // rdi
_BYTE *v15; // r... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV R12,qword ptr [RSI + 0x8]
MOV RBX,qword ptr [RSI]
CMP R12,RBX
JZ 0x0010287d
... | /* func0(std::vector<std::variant<std::vector<int, std::allocator<int> >, std::string >,
std::allocator<std::variant<std::vector<int, std::allocator<int> >, std::string > > > const&) */
vector * func0(vector *param_1)
{
long *plVar1;
int4 *__src;
ulong uVar2;
int4 *__dest;
variant *__dest_00;
long *plV... |
1,444 | func0 |
#include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<int>& nums) {
int max_val = 0;
int result = nums[0];
for(auto i : nums){
int occu = std::count(nums.begin(), nums.end(), i);
if(occu > max_val){
max_val = occu;
result = i;
}
}
return result;
}
| int main(){
assert(func0({1,2,3,1,2,3,12,4,2}) == 2);
assert(func0({1,2,6,7,0,1,0,1,0}) == 1);
assert(func0({1,2,3,1,2,4,1}) == 1);
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x48,%rsp
mov %rdi,-0x48(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movl $0x0,-0x3c(%rbp)
mov -0x48(%rbp),%rax
mov $0x0,%esi
mov %rax,%rdi
callq 16bc <_ZNKSt6vectorIiSaI... | _Z5func0RKSt6vectorIiSaIiEE:
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 [rbp+var_3C], 0
mov rax, [rbp+var_48]
mov esi, 0
mov rdi, rax
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::o... | long long func0(long long a1)
{
long long v1; // rbx
long long v2; // rax
unsigned int v4; // [rsp+10h] [rbp-40h] BYREF
int v5; // [rsp+14h] [rbp-3Ch]
unsigned int v6; // [rsp+18h] [rbp-38h]
int v7; // [rsp+1Ch] [rbp-34h]
long long v8; // [rsp+20h] [rbp-30h] BYREF
_QWORD v9[4]; // [rsp+28h] [rbp-28h] B... | 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 dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x48]
MOV ESI,0x0
MOV RDI,RAX
CALL 0x001016ec
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x38],EA... | /* func0(std::vector<int, std::allocator<int> > const&) */
int4 func0(vector *param_1)
{
bool bVar1;
int4 *puVar2;
int8 uVar3;
int8 uVar4;
long in_FS_OFFSET;
int4 local_48;
int local_44;
int4 local_40;
int local_3c;
int8 local_38;
int8 local_30;
vector<int,std::allocator<int>> *local_28;
lon... |
1,445 | func0 |
#include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<int>& nums) {
int max_val = 0;
int result = nums[0];
for(auto i : nums){
int occu = std::count(nums.begin(), nums.end(), i);
if(occu > max_val){
max_val = occu;
result = i;
}
}
return result;
}
| int main(){
assert(func0({1,2,3,1,2,3,12,4,2}) == 2);
assert(func0({1,2,6,7,0,1,0,1,0}) == 1);
assert(func0({1,2,3,1,2,4,1}) == 1);
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rcx
mov (%rcx),%r11d
mov 0x8(%rdi),%rdi
cmp %rdi,%rcx
je 125d <_Z5func0RKSt6vectorIiSaIiEE+0x54>
mov %rcx,%r10
mov $0x0,%r9d
jmp 1230 <_Z5func0RKSt6vectorIiSaIiEE+0x27>
add $0x4,%rcx
cmp %rcx,%rdi
je 125d <_Z5fu... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r11, [rdi]
mov r10d, [r11]
mov rdi, [rdi+8]
cmp rdi, r11
jz short loc_1258
mov r8, r11
mov r9d, 0
loc_1225:
mov esi, [r8]
mov rax, r11
mov edx, 0
loc_1230:
cmp esi, [rax]
setz cl
movzx ecx, cl
add rdx, rcx
add rax, 4
cmp ... | long long func0(unsigned int **a1)
{
unsigned int *v1; // r11
unsigned int v2; // r10d
unsigned int *v3; // rdi
unsigned int *v4; // r8
int v5; // r9d
unsigned int *v6; // rax
int v7; // edx
v1 = *a1;
v2 = **a1;
v3 = a1[1];
if ( v3 != v1 )
{
v4 = v1;
v5 = 0;
do
{
v6 = v1;... | func0:
ENDBR64
MOV R11,qword ptr [RDI]
MOV R10D,dword ptr [R11]
MOV RDI,qword ptr [RDI + 0x8]
CMP RDI,R11
JZ 0x00101258
MOV R8,R11
MOV R9D,0x0
LAB_00101225:
MOV ESI,dword ptr [R8]
MOV RAX,R11
MOV EDX,0x0
LAB_00101230:
CMP ESI,dword ptr [RAX]
SETZ CL
MOVZX ECX,CL
ADD RDX,RCX
ADD RAX,0x4
CMP RAX,RDI
JNZ 0x00101230
CMP ED... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
int *piVar2;
int *piVar3;
int iVar4;
int *piVar5;
int iVar6;
int iVar7;
piVar1 = *(int **)param_1;
iVar7 = *piVar1;
piVar2 = *(int **)(param_1 + 8);
if (piVar2 != piVar1) {
iVar6 = 0;
... |
1,446 | func0 |
#include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<int>& nums) {
int max_val = 0;
int result = nums[0];
for(auto i : nums){
int occu = std::count(nums.begin(), nums.end(), i);
if(occu > max_val){
max_val = occu;
result = i;
}
}
return result;
}
| int main(){
assert(func0({1,2,3,1,2,3,12,4,2}) == 2);
assert(func0({1,2,6,7,0,1,0,1,0}) == 1);
assert(func0({1,2,3,1,2,4,1}) == 1);
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r12
mov (%rdi),%r9
mov 0x8(%rdi),%rdi
mov (%r9),%r11d
cmp %rdi,%r9
je 1597 <_Z5func0RKSt6vectorIiSaIiEE+0x67>
add $0x4,%r9
mov %r11d,%esi
mov %r11d,%r12d
xor %r10d,%r10d
mov %r9,%r8
nopl (%rax)
mov %r9,%rax
mov ... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r11, [rdi]
mov rdi, [rdi+8]
mov r10d, [r11]
cmp rdi, r11
jz short loc_13F7
mov r8, r11
xor r9d, r9d
nop dword ptr [rax+00000000h]
loc_13C0:
mov esi, [r8]
mov rax, r11
xor edx, edx
nop dword ptr [rax+rax+00000000h]
loc_13D0:
xor ... | long long func0(unsigned int **a1)
{
unsigned int *v1; // r11
unsigned int *v2; // rdi
unsigned int v3; // r10d
unsigned int *v4; // r8
int v5; // r9d
unsigned int *v6; // rax
int v7; // edx
int v8; // ecx
v1 = *a1;
v2 = a1[1];
v3 = *v1;
if ( v2 != v1 )
{
v4 = v1;
v5 = 0;
do
... | func0:
ENDBR64
MOV R11,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
MOV R10D,dword ptr [R11]
CMP RDI,R11
JZ 0x001013f7
MOV R8,R11
XOR R9D,R9D
NOP dword ptr [RAX]
LAB_001013c0:
MOV ESI,dword ptr [R8]
MOV RAX,R11
XOR EDX,EDX
NOP dword ptr [RAX + RAX*0x1]
LAB_001013d0:
XOR ECX,ECX
CMP ESI,dword ptr [RAX]
SETZ CL
ADD RAX,... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int iVar5;
int *piVar6;
int iVar7;
int iVar8;
piVar2 = *(int **)param_1;
piVar3 = *(int **)(param_1 + 8);
iVar8 = *piVar2;
if (piVar3 != piVar2) {
iV... |
1,447 | func0 |
#include <vector>
#include <cassert>
#include <algorithm>
| int func0(const std::vector<int>& nums) {
int max_val = 0;
int result = nums[0];
for(auto i : nums){
int occu = std::count(nums.begin(), nums.end(), i);
if(occu > max_val){
max_val = occu;
result = i;
}
}
return result;
}
| int main(){
assert(func0({1,2,3,1,2,3,12,4,2}) == 2);
assert(func0({1,2,6,7,0,1,0,1,0}) == 1);
assert(func0({1,2,3,1,2,4,1}) == 1);
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %r15
push %r14
push %r13
push %r12
push %rbp
push %rbx
mov (%rdi),%r10
mov 0x8(%rdi),%rdi
mov (%r10),%r15d
cmp %rdi,%r10
je 18c0 <_Z5func0RKSt6vectorIiSaIiEE+0x140>
lea -0x4(%rdi),%r9
movdqa 0x943(%rip),%xmm6
mov %r10,%... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r11, [rdi]
mov r8, [rdi+8]
mov r10d, [r11]
cmp r8, r11
jz loc_181C
push r14
mov rsi, r11
pxor xmm5, xmm5
push r13
push r12
push rbp
lea rbp, [r8-4]
sub rbp, r11
push rbx
mov rbx, rbp
shr rbx, 2
add rbx, 1
mov rdx... | long long func0(unsigned int **a1)
{
const __m128i *v1; // r11
unsigned int *v2; // r8
unsigned int v3; // r10d
unsigned int *v4; // rsi
unsigned long long v5; // rbp
unsigned long long v6; // rbx
unsigned int *v7; // r9
const __m128i *v8; // rdx
signed __int32 v9; // edi
int v10; // ebx
unsigned... | func0:
ENDBR64
MOV R11,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x8]
MOV R10D,dword ptr [R11]
CMP R8,R11
JZ 0x0010181c
PUSH R14
MOV RSI,R11
PXOR XMM5,XMM5
PUSH R13
PUSH R12
PUSH RBP
LEA RBP,[R8 + -0x4]
SUB RBP,R11
PUSH RBX
MOV RBX,RBP
SHR RBX,0x2
ADD RBX,0x1
MOV RDX,RBX
MOV RAX,RBX
SHR RDX,0x2
AND RAX,-0x4
SHL RDX,0x4
L... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
int *piVar2;
int *piVar3;
int *piVar4;
int *piVar5;
int *piVar6;
int *piVar7;
ulong uVar8;
ulong uVar9;
int *piVar10;
int iVar11;
int *piVar12;
int iVar13;
int iVar15;
int auVar14 [16];
i... |
1,448 | func0 | #include <cassert>
#include <tuple>
#include <vector>
| std::vector<std::tuple<int, int, int>> func0(const std::vector<std::tuple<int, int, int>>& test_list, int K) {
std::vector<std::tuple<int, int, int>> res;
for (const auto& sub : test_list) {
int a = std::get<0>(sub);
int b = std::get<1>(sub);
int c = std::get<2>(sub);
res.p... | int main() {
{
std::vector<std::tuple<int, int, int>> input = { {1, 3, 4}, {2, 4, 6}, {3, 8, 1} };
std::vector<std::tuple<int, int, int>> expected = { {5, 7, 8}, {6, 8, 10}, {7, 12, 5} };
assert(func0(input, 4) == expected);
}
{
std::vector<std::tuple<int, int, i... | O0 | cpp | func0(std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int> > > const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x78,%rsp
mov %rdi,-0x68(%rbp)
mov %rsi,-0x70(%rbp)
mov %edx,-0x74(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
mov -0x68(%r... | _Z5func0RKSt6vectorISt5tupleIJiiiEESaIS1_EEi:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 78h
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov [rbp+var_74], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov rax, [rbp+var_68]
mov rdi, rax
call _ZNSt6vectorISt5... | long long func0(long long a1, long long a2, int a3)
{
int v5; // [rsp+20h] [rbp-60h] BYREF
int v6; // [rsp+24h] [rbp-5Ch] BYREF
int v7; // [rsp+28h] [rbp-58h] BYREF
int v8; // [rsp+2Ch] [rbp-54h]
int v9; // [rsp+30h] [rbp-50h]
int v10; // [rsp+34h] [rbp-4Ch]
long long v11; // [rsp+38h] [rbp-48h] BYREF
... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV dword ptr [RBP + -0x74],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,RAX
CALL 0x00101b3c
MOV RAX,qword ptr [RBP + -0x70]
MO... | /* func0(std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int> > > const&,
int) */
vector * func0(vector *param_1,int param_2)
{
bool bVar1;
type *ptVar2;
type *ptVar3;
type *ptVar4;
int in_EDX;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_68;
int local_64;
... |
1,449 | func0 | #include <cassert>
#include <tuple>
#include <vector>
| std::vector<std::tuple<int, int, int>> func0(const std::vector<std::tuple<int, int, int>>& test_list, int K) {
std::vector<std::tuple<int, int, int>> res;
for (const auto& sub : test_list) {
int a = std::get<0>(sub);
int b = std::get<1>(sub);
int c = std::get<2>(sub);
res.p... | int main() {
{
std::vector<std::tuple<int, int, int>> input = { {1, 3, 4}, {2, 4, 6}, {3, 8, 1} };
std::vector<std::tuple<int, int, int>> expected = { {5, 7, 8}, {6, 8, 10}, {7, 12, 5} };
assert(func0(input, 4) == expected);
}
{
std::vector<std::tuple<int, int, i... | O1 | cpp | func0(std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int> > > const&, int):
endbr64
push %r14
push %r13
push %r12
push %rbp
push %rbx
sub $0x20,%rsp
mov %rdi,%rbp
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0... | _Z5func0RKSt6vectorISt5tupleIJiiiEESaIS1_EEi:
endbr64
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 20h
mov rbp, rdi
mov rax, fs:28h
mov [rsp+48h+var_30], rax
xor eax, eax
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
mov rbx, [rsi]... | _QWORD * func0(_QWORD *a1, long long a2, int a3)
{
_DWORD *v3; // rbx
_DWORD *v4; // r13
int v6; // edx
int v7; // eax
int v8; // ecx
_DWORD *v9; // rsi
_DWORD v11[2]; // [rsp+Ch] [rbp-3Ch] BYREF
int v12; // [rsp+14h] [rbp-34h]
unsigned long long v13; // [rsp+18h] [rbp-30h]
v13 = __readfsqword(0x28... | func0:
ENDBR64
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x20
MOV RBP,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JZ 0x001012b7... | /* func0(std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int> > > const&,
int) */
vector * func0(vector *param_1,int param_2)
{
int *piVar1;
int *piVar2;
int in_EDX;
int *piVar3;
int4 in_register_00000034;
long in_FS_OFFSET;
int local_3c;
int local_38;
int local_34;
l... |
1,450 | func0 | #include <cassert>
#include <tuple>
#include <vector>
| std::vector<std::tuple<int, int, int>> func0(const std::vector<std::tuple<int, int, int>>& test_list, int K) {
std::vector<std::tuple<int, int, int>> res;
for (const auto& sub : test_list) {
int a = std::get<0>(sub);
int b = std::get<1>(sub);
int c = std::get<2>(sub);
res.p... | int main() {
{
std::vector<std::tuple<int, int, int>> input = { {1, 3, 4}, {2, 4, 6}, {3, 8, 1} };
std::vector<std::tuple<int, int, int>> expected = { {5, 7, 8}, {6, 8, 10}, {7, 12, 5} };
assert(func0(input, 4) == expected);
}
{
std::vector<std::tuple<int, int, i... | O2 | cpp | func0(std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int> > > const&, int):
endbr64
push %r14
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x20,%rsp
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
movq $0x0,(%rdi)
movq $0x0,0x8(%rdi)
movq $0x0... | _Z5func0RKSt6vectorISt5tupleIJiiiEESaIS1_EEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 28h
mov rax, fs:28h
mov [rsp+58h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx... | long long func0(long long a1, const __m128i **a2, unsigned int a3)
{
const __m128i *v3; // rbx
const __m128i *v4; // r13
__m128i v5; // xmm3
long long v7; // rsi
long long v8; // rdx
unsigned long long v9; // xmm2_8
unsigned int v10; // edx
long long v11; // rsi
unsigned long long v12; // xmm0_8
un... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JZ 0x001016b0... | /* func0(std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int> > > const&,
int) */
vector * func0(vector *param_1,int param_2)
{
int8 *puVar1;
int in_EDX;
int *piVar2;
int8 *puVar3;
int4 in_register_00000034;
int *piVar4;
long in_FS_OFFSET;
int iVar5;
int iVar6;
int8 l... |
1,451 | func0 | #include <cassert>
#include <tuple>
#include <vector>
| std::vector<std::tuple<int, int, int>> func0(const std::vector<std::tuple<int, int, int>>& test_list, int K) {
std::vector<std::tuple<int, int, int>> res;
for (const auto& sub : test_list) {
int a = std::get<0>(sub);
int b = std::get<1>(sub);
int c = std::get<2>(sub);
res.p... | int main() {
{
std::vector<std::tuple<int, int, int>> input = { {1, 3, 4}, {2, 4, 6}, {3, 8, 1} };
std::vector<std::tuple<int, int, int>> expected = { {5, 7, 8}, {6, 8, 10}, {7, 12, 5} };
assert(func0(input, 4) == expected);
}
{
std::vector<std::tuple<int, int, i... | O3 | cpp | func0(std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int> > > const&, int):
endbr64
push %r14
pxor %xmm0,%xmm0
push %r13
push %r12
mov %rdi,%r12
push %rbp
push %rbx
sub $0x20,%rsp
mov %fs:0x28,%rax
mov %rax,0x18(%rsp)
xor %eax,%eax
movq $0x0,0x10(%rdi)
movups %xm... | _Z5func0RKSt6vectorISt5tupleIJiiiEESaIS1_EEi:
endbr64
push r15
pxor xmm0, xmm0
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 28h
mov rax, fs:28h
mov [rsp+58h+var_40], rax
xor eax, eax
mov qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
mov rbx... | long long func0(long long a1, const __m128i **a2, unsigned int a3)
{
const __m128i *v3; // rbx
const __m128i *v4; // r13
__m128i v5; // xmm3
long long v7; // rsi
long long v8; // rdx
unsigned long long v9; // xmm2_8
unsigned int v10; // edx
long long v11; // rsi
unsigned long long v12; // xmm0_8
un... | func0:
ENDBR64
PUSH R15
PXOR XMM0,XMM0
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV RBX,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
CMP R13,RBX
JZ 0x001016b0... | /* func0(std::vector<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int> > > const&,
int) */
vector * func0(vector *param_1,int param_2)
{
int8 *puVar1;
int in_EDX;
int *piVar2;
int8 *puVar3;
int4 in_register_00000034;
int *piVar4;
long in_FS_OFFSET;
int iVar5;
int iVar6;
int8 l... |
1,452 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
char make_flip(char ch) {
return ch == '0' ? '1' : '0';
}
int get_flip_with_starting_character(const std::string& str, char expected) {
int flip_count = 0;
for (char i : str) {
if (i != expected) {
flip_count++;
... | int func0(const std::string& str) {
return std::min(get_flip_with_starting_character(str, '0'), get_flip_with_starting_character(str, '1'));
}
| int main() {
assert(func0("0001010111") == 2);
assert(func0("001") == 1);
assert(func0("010111011") == 2);
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 $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x8(%rbp)
xor %eax,%eax
mov -0x18(%rbp),%rax
mov $0x31,%esi
mov %rax,%rdi
callq 244a <_Z32get_flip_... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov rax, fs:28h
mov [rbp+var_8], rax
xor eax, eax
mov rax, [rbp+var_18]
mov esi, 31h ; '1'
mov rdi, rax
call _Z32get_flip_with_starting_characterRKNS... | long long func0(long long a1)
{
int v2; // [rsp+10h] [rbp-10h] BYREF
int flip_with_starting_character; // [rsp+14h] [rbp-Ch] BYREF
unsigned long long v4; // [rsp+18h] [rbp-8h]
v4 = __readfsqword(0x28u);
flip_with_starting_character = get_flip_with_starting_character(a1, 49LL);
v2 = get_flip_with_starting_... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ESI,0x31
MOV RDI,RAX
CALL 0x0010136a
MOV dword ptr [RBP + -0xc],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ESI,0x30
MOV RDI,RAX
CALL 0x... | /* func0(std::string const&) */
int func0(string *param_1)
{
int *piVar1;
long in_FS_OFFSET;
int local_18;
int local_14;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_14 = get_flip_with_starting_character(param_1,'1');
local_18 = get_flip_with_starting_character(param_1,'0');
pi... |
1,453 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
char make_flip(char ch) {
return ch == '0' ? '1' : '0';
}
int get_flip_with_starting_character(const std::string& str, char expected) {
int flip_count = 0;
for (char i : str) {
if (i != expected) {
flip_count++;
... | int func0(const std::string& str) {
return std::min(get_flip_with_starting_character(str, '0'), get_flip_with_starting_character(str, '1'));
}
| int main() {
assert(func0("0001010111") == 2);
assert(func0("001") == 1);
assert(func0("010111011") == 2);
return 0;
}
| O1 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
push %rbp
push %rbx
mov %rdi,%rbp
mov $0x31,%esi
callq 1238 <_Z32get_flip_with_starting_characterRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc>
mov %eax,%ebx
mov $0x30,%esi
mov %rbp,%rdi
... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
push rbp
push rbx
mov rbp, rdi
mov esi, 31h ; '1'
call _Z32get_flip_with_starting_characterRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc; get_flip_with_starting_character(std::string const&,char)
mov ebx, eax
mov ... | long long func0(long long a1)
{
int flip_with_starting_character; // ebx
long long result; // rax
flip_with_starting_character = get_flip_with_starting_character(a1, 49LL);
result = get_flip_with_starting_character(a1, 48LL);
if ( flip_with_starting_character <= (int)result )
return (unsigned int)flip_w... | func0:
ENDBR64
PUSH RBP
PUSH RBX
MOV RBP,RDI
MOV ESI,0x31
CALL 0x00101218
MOV EBX,EAX
MOV ESI,0x30
MOV RDI,RBP
CALL 0x00101218
CMP EBX,EAX
CMOVLE EAX,EBX
POP RBX
POP RBP
RET | /* func0(std::string const&) */
int func0(string *param_1)
{
int iVar1;
int iVar2;
iVar1 = get_flip_with_starting_character(param_1,'1');
iVar2 = get_flip_with_starting_character(param_1,'0');
if (iVar1 <= iVar2) {
iVar2 = iVar1;
}
return iVar2;
} |
1,454 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
char make_flip(char ch) {
return ch == '0' ? '1' : '0';
}
int get_flip_with_starting_character(const std::string& str, char expected) {
int flip_count = 0;
for (char i : str) {
if (i != expected) {
flip_count++;
... | int func0(const std::string& str) {
return std::min(get_flip_with_starting_character(str, '0'), get_flip_with_starting_character(str, '1'));
}
| int main() {
assert(func0("0001010111") == 2);
assert(func0("001") == 1);
assert(func0("010111011") == 2);
return 0;
}
| O2 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%r9
add %rdx,%r9
cmp %r9,%rdx
je 14c0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x90>
mov %rdx,%rcx
xor %r8d,%r8d
mov $0x31,%esi
mov $0x6... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rdx, [rdi]
mov rax, [rdi+8]
add rax, rdx
mov rdi, rax
cmp rdx, rax
jz short loc_1418
mov rax, rdx
xor esi, esi
mov ecx, 31h ; '1'
mov r9d, 61h ; 'a'
nop word ptr [rax+rax+00000000h]
loc_13C0:
xor ... | long long func0(_QWORD *a1)
{
_BYTE *v1; // rdx
_BYTE *v2; // rdi
_BYTE *v3; // rax
int v4; // esi
int v5; // ecx
int v6; // r8d
long long result; // rax
int v8; // ecx
_BOOL4 v9; // r8d
v1 = (_BYTE *)*a1;
v2 = (_BYTE *)(*a1 + a1[1]);
if ( v1 == v2 )
return 0LL;
v3 = v1;
v4 = 0;
v5 =... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
ADD RAX,RDX
MOV RDI,RAX
CMP RDX,RAX
JZ 0x00101418
MOV RAX,RDX
XOR ESI,ESI
MOV ECX,0x31
MOV R9D,0x61
NOP word ptr CS:[RAX + RAX*0x1]
LAB_001013c0:
XOR R8D,R8D
MOV R10D,R9D
CMP CL,byte ptr [RAX]
SETNZ R8B
SUB R10D,ECX
ADD RAX,0x1
ADD ESI,R8D
MOV ECX,R10... | /* func0(std::string const&) */
int func0(string *param_1)
{
int iVar1;
char *pcVar2;
char *pcVar3;
char cVar4;
char *pcVar5;
int iVar6;
bool bVar7;
pcVar5 = *(char **)param_1;
pcVar2 = pcVar5 + *(long *)(param_1 + 8);
if (pcVar5 != pcVar2) {
iVar6 = 0;
cVar4 = '1';
pcVar3 = pcVar5;... |
1,455 | func0 |
#include <iostream>
#include <string>
#include <assert.h>
char make_flip(char ch) {
return ch == '0' ? '1' : '0';
}
int get_flip_with_starting_character(const std::string& str, char expected) {
int flip_count = 0;
for (char i : str) {
if (i != expected) {
flip_count++;
... | int func0(const std::string& str) {
return std::min(get_flip_with_starting_character(str, '0'), get_flip_with_starting_character(str, '1'));
}
| int main() {
assert(func0("0001010111") == 2);
assert(func0("001") == 1);
assert(func0("010111011") == 2);
return 0;
}
| O3 | cpp | func0(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):
endbr64
mov (%rdi),%rdx
mov 0x8(%rdi),%r9
add %rdx,%r9
cmp %r9,%rdx
je 14c0 <_Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x90>
mov %rdx,%rcx
xor %r8d,%r8d
mov $0x31,%esi
mov $0x6... | _Z5func0RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
endbr64
mov rdx, [rdi]
mov r8, [rdi+8]
add r8, rdx
cmp rdx, r8
jz short loc_1410
mov rcx, rdx
xor edi, edi
mov eax, 31h ; '1'
mov r9d, 61h ; 'a'
jmp short loc_13BB
loc_13B8:
mov rcx, rsi
loc_13BB:
xor esi, e... | long long func0(long long a1)
{
_BYTE *v1; // rdx
_BYTE *v2; // r8
_BYTE *v3; // rcx
int v4; // edi
int v5; // eax
long long result; // rax
int v7; // esi
v1 = *(_BYTE **)a1;
v2 = (_BYTE *)(*(_QWORD *)a1 + *(_QWORD *)(a1 + 8));
if ( *(_BYTE **)a1 == v2 )
return 0LL;
v3 = *(_BYTE **)a1;
v4 ... | func0:
ENDBR64
MOV RDX,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x8]
ADD R8,RDX
CMP RDX,R8
JZ 0x00101410
MOV RCX,RDX
XOR EDI,EDI
MOV EAX,0x31
MOV R9D,0x61
JMP 0x001013bb
LAB_001013b8:
MOV RCX,RSI
LAB_001013bb:
XOR ESI,ESI
CMP AL,byte ptr [RCX]
SETNZ SIL
ADD EDI,ESI
MOV ESI,R9D
SUB ESI,EAX
MOV EAX,ESI
LEA RSI,[RCX + 0x1]... | /* func0(std::string const&) */
int func0(string *param_1)
{
char *pcVar1;
char cVar2;
int iVar3;
char *pcVar4;
char *pcVar5;
int iVar6;
bool bVar7;
pcVar5 = *(char **)param_1;
if (pcVar5 == pcVar5 + *(long *)(param_1 + 8)) {
return 0;
}
iVar6 = 0;
cVar2 = '1';
pcVar1 = pcVar5;
do {... |
1,456 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
while (n != 0) {
n /= 10;
count++;
}
return count;
}
| int main() {
assert(func0(12345) == 5);
assert(func0(11223305) == 8);
assert(func0(4123459) == 7);
return 0;
}
| O0 | cpp | func0(int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
movl $0x0,-0x4(%rbp)
cmpl $0x0,-0x14(%rbp)
je 1185 <_Z5func0i+0x3c>
mov -0x14(%rbp),%eax
movslq %eax,%rdx
imul $0x66666667,%rdx,%rdx
shr $0x20,%rdx
sar $0x2,%edx
sar $0x1f,%eax
sub %eax,%edx
mov %edx,%eax
mov %eax,-0... | _Z5func0i:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_4], 0
jmp short loc_117F
loc_115D:
mov eax, [rbp+var_14]
movsxd rdx, eax
imul rdx, 66666667h
shr rdx, 20h
mov ecx, edx
sar ecx, 2
cdq
mov eax, ecx
sub eax, edx
mov [rbp+var_14], eax
add [rb... | long long func0(int a1)
{
unsigned int v3; // [rsp+10h] [rbp-4h]
v3 = 0;
while ( a1 )
{
a1 /= 10;
++v3;
}
return v3;
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0010117f
LAB_0010115d:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,EAX
IMUL RDX,RDX,0x66666667
SHR RDX,0x20
MOV ECX,EDX
SAR ECX,0x2
CDQ
MOV EAX,ECX
SUB EAX,EDX
MOV dword ptr [RBP + -0x14],EAX
ADD dword ptr [RBP + -0x... | /* func0(int) */
int func0(int param_1)
{
int4 local_1c;
int4 local_c;
local_c = 0;
for (local_1c = param_1; local_1c != 0; local_1c = local_1c / 10) {
local_c = local_c + 1;
}
return local_c;
} |
1,457 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
while (n != 0) {
n /= 10;
count++;
}
return count;
}
| int main() {
assert(func0(12345) == 5);
assert(func0(11223305) == 8);
assert(func0(4123459) == 7);
return 0;
}
| O1 | cpp | func0(int):
endbr64
test %edi,%edi
je 1175 <_Z5func0i+0x2c>
mov $0x0,%edx
movslq %edi,%rax
imul $0x66666667,%rax,%rax
sar $0x22,%rax
sar $0x1f,%edi
sub %edi,%eax
mov %eax,%edi
add $0x1,%edx
test %eax,%eax
jne 1156 <_Z5func0i+0xd>
mov %edx,%eax
retq
mov %edi,%edx
jmp 1172 <_Z5func... | _Z5func0i:
endbr64
test edi, edi
jz short loc_1175
mov edx, 0
loc_1156:
movsxd rax, edi
imul rax, 66666667h
sar rax, 22h
sar edi, 1Fh
sub eax, edi
mov edi, eax
add edx, 1
test eax, eax
jnz short loc_1156
loc_1172:
mov eax, edx
retn
loc_1175:
mov edx, edi
jmp short ... | long long func0(int a1)
{
unsigned int v1; // edx
if ( a1 )
{
v1 = 0;
do
{
a1 /= 10;
++v1;
}
while ( a1 );
}
else
{
return 0;
}
return v1;
} | func0:
ENDBR64
TEST EDI,EDI
JZ 0x00101175
MOV EDX,0x0
LAB_00101156:
MOVSXD RAX,EDI
IMUL RAX,RAX,0x66666667
SAR RAX,0x22
SAR EDI,0x1f
SUB EAX,EDI
MOV EDI,EAX
ADD EDX,0x1
TEST EAX,EAX
JNZ 0x00101156
LAB_00101172:
MOV EAX,EDX
RET
LAB_00101175:
MOV EDX,EDI
JMP 0x00101172 | /* func0(int) */
int func0(int param_1)
{
int iVar1;
if (param_1 == 0) {
iVar1 = 0;
}
else {
iVar1 = 0;
do {
param_1 = param_1 / 10;
iVar1 = iVar1 + 1;
} while (param_1 != 0);
}
return iVar1;
} |
1,458 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
while (n != 0) {
n /= 10;
count++;
}
return count;
}
| int main() {
assert(func0(12345) == 5);
assert(func0(11223305) == 8);
assert(func0(4123459) == 7);
return 0;
}
| O2 | cpp | func0(int):
endbr64
xor %r8d,%r8d
test %edi,%edi
je 116b <_Z5func0i+0x2b>
nopl 0x0(%rax,%rax,1)
movslq %edi,%rax
sar $0x1f,%edi
add $0x1,%r8d
imul $0x66666667,%rax,%rax
sar $0x22,%rax
sub %edi,%eax
mov %eax,%edi
jne 1150 <_Z5func0i+0x10>
mov %r8d,%eax
retq
| _Z5func0i:
endbr64
xor ecx, ecx
test edi, edi
jz short loc_116C
nop word ptr [rax+rax+00h]
loc_1150:
movsxd rax, edi
mov edx, edi
add ecx, 1
imul rax, 66666667h
sar edx, 1Fh
sar rax, 22h
sub eax, edx
mov edi, eax
jnz short loc_1150
loc_116C:
mov eax, ecx
retn | long long func0(int a1)
{
unsigned int i; // ecx
for ( i = 0; a1; a1 /= 10 )
++i;
return i;
} | func0:
ENDBR64
XOR ECX,ECX
TEST EDI,EDI
JZ 0x0010116c
NOP word ptr [RAX + RAX*0x1]
LAB_00101150:
MOVSXD RAX,EDI
MOV EDX,EDI
ADD ECX,0x1
IMUL RAX,RAX,0x66666667
SAR EDX,0x1f
SAR RAX,0x22
SUB EAX,EDX
MOV EDI,EAX
JNZ 0x00101150
LAB_0010116c:
MOV EAX,ECX
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
iVar1 = 0;
if (param_1 != 0) {
do {
iVar1 = iVar1 + 1;
param_1 = param_1 / 10;
} while (param_1 != 0);
}
return iVar1;
} |
1,459 | func0 |
#include <assert.h>
| int func0(int n) {
int count = 0;
while (n != 0) {
n /= 10;
count++;
}
return count;
}
| int main() {
assert(func0(12345) == 5);
assert(func0(11223305) == 8);
assert(func0(4123459) == 7);
return 0;
}
| O3 | cpp | func0(int):
endbr64
xor %r8d,%r8d
test %edi,%edi
je 116b <_Z5func0i+0x2b>
nopl 0x0(%rax,%rax,1)
movslq %edi,%rax
sar $0x1f,%edi
add $0x1,%r8d
imul $0x66666667,%rax,%rax
sar $0x22,%rax
sub %edi,%eax
mov %eax,%edi
jne 1150 <_Z5func0i+0x10>
mov %r8d,%eax
retq
| _Z5func0i:
endbr64
xor ecx, ecx
test edi, edi
jz short loc_116C
nop word ptr [rax+rax+00h]
loc_1150:
movsxd rax, edi
mov edx, edi
add ecx, 1
imul rax, 66666667h
sar edx, 1Fh
sar rax, 22h
sub eax, edx
mov edi, eax
jnz short loc_1150
loc_116C:
mov eax, ecx
retn | long long func0(int a1)
{
unsigned int i; // ecx
for ( i = 0; a1; a1 /= 10 )
++i;
return i;
} | func0:
ENDBR64
XOR ECX,ECX
TEST EDI,EDI
JZ 0x0010116c
NOP word ptr [RAX + RAX*0x1]
LAB_00101150:
MOVSXD RAX,EDI
MOV EDX,EDI
ADD ECX,0x1
IMUL RAX,RAX,0x66666667
SAR EDX,0x1f
SAR RAX,0x22
SUB EAX,EDX
MOV EDI,EAX
JNZ 0x00101150
LAB_0010116c:
MOV EAX,ECX
RET | /* func0(int) */
int func0(int param_1)
{
int iVar1;
iVar1 = 0;
if (param_1 != 0) {
do {
iVar1 = iVar1 + 1;
param_1 = param_1 / 10;
} while (param_1 != 0);
}
return iVar1;
} |
1,460 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| int func0(const std::vector<int>& list_nums) {
int max_product = 0;
for (size_t i = 0; i < list_nums.size() - 1; ++i) {
int product = list_nums[i] * list_nums[i + 1];
max_product = std::max(max_product, product);
}
return max_product;
}
| int main() {
assert(func0({1, 2, 3, 4, 5, 6}) == 30);
assert(func0({1, 2, 3, 4, 5}) == 20);
assert(func0({2, 3}) == 6);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x38(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax
movl $0x0,-0x28(%rbp)
movq $0x0,-0x20(%rbp)
mov -0x38(%rbp),%rax
mov %rax,%rdi
callq 15ba <_ZNKSt6vect... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 38h
mov [rbp+var_38], rdi
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
mov [rbp+var_28], 0
mov [rbp+var_20], 0
jmp short loc_12CB
loc_127A:
mov rdx, [rbp+var_20]
mov rax, [rbp+var_38]
mov... | long long func0(long long a1)
{
long long i; // rax
int v2; // ebx
unsigned int v4; // [rsp+18h] [rbp-28h] BYREF
int v5; // [rsp+1Ch] [rbp-24h] BYREF
unsigned long long v6; // [rsp+20h] [rbp-20h]
unsigned long long v7; // [rsp+28h] [rbp-18h]
v7 = __readfsqword(0x28u);
v4 = 0;
v6 = 0LL;
for ( i = s... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
MOV dword ptr [RBP + -0x28],0x0
MOV qword ptr [RBP + -0x20],0x0
JMP 0x001012cb
LAB_0010127a:
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x38]
M... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int iVar1;
int *piVar2;
long lVar3;
long in_FS_OFFSET;
int local_30;
int local_2c;
ulong local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_30 = 0;
local_28 = 0;
while( true ) {
... |
1,461 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| int func0(const std::vector<int>& list_nums) {
int max_product = 0;
for (size_t i = 0; i < list_nums.size() - 1; ++i) {
int product = list_nums[i] * list_nums[i + 1];
max_product = std::max(max_product, product);
}
return max_product;
}
| int main() {
assert(func0({1, 2, 3, 4, 5, 6}) == 30);
assert(func0({1, 2, 3, 4, 5}) == 20);
assert(func0({2, 3}) == 6);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rdx
sub %rcx,%rdx
mov %rdx,%rax
sar $0x2,%rax
cmp $0x1,%rax
je 1248 <_Z5func0RKSt6vectorIiSaIiEE+0x3f>
mov %rcx,%rax
lea -0x4(%rcx,%rdx,1),%rsi
mov $0x0,%ecx
mov (%rax),%edx
imul 0x4(%rax),%e... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rsi, [rdi]
mov rax, [rdi+8]
sub rax, rsi
mov rdi, rax
sar rdi, 2
sub rdi, 1
cmp rax, 4
jz short loc_124A
mov ecx, 0
mov eax, 0
loc_1232:
mov edx, [rsi+rax*4]
add rax, 1
imul edx, [rsi+rax*4]
cmp ecx, edx
cmovl ecx, edx
cm... | long long func0(long long *a1)
{
long long v1; // rsi
long long v2; // rax
unsigned long long v3; // rdi
int v4; // ecx
unsigned long long v5; // rax
int v6; // edx
int v7; // edx
v1 = *a1;
v2 = a1[1] - *a1;
v3 = (v2 >> 2) - 1;
if ( v2 == 4 )
{
return 0;
}
else
{
v4 = 0;
v5 =... | func0:
ENDBR64
MOV RSI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,RSI
MOV RDI,RAX
SAR RDI,0x2
SUB RDI,0x1
CMP RAX,0x4
JZ 0x0010124a
MOV ECX,0x0
MOV EAX,0x0
LAB_00101232:
MOV EDX,dword ptr [RSI + RAX*0x4]
ADD RAX,0x1
IMUL EDX,dword ptr [RSI + RAX*0x4]
CMP ECX,EDX
CMOVL ECX,EDX
CMP RAX,RDI
JC 0x00101232
LAB_00... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
long lVar1;
long lVar2;
ulong uVar3;
int iVar4;
int iVar5;
lVar2 = *(long *)param_1;
if (*(long *)(param_1 + 8) - lVar2 == 4) {
iVar4 = 0;
}
else {
iVar4 = 0;
uVar3 = 0;
do {
lVar1 = uVar... |
1,462 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| int func0(const std::vector<int>& list_nums) {
int max_product = 0;
for (size_t i = 0; i < list_nums.size() - 1; ++i) {
int product = list_nums[i] * list_nums[i + 1];
max_product = std::max(max_product, product);
}
return max_product;
}
| int main() {
assert(func0({1, 2, 3, 4, 5, 6}) == 30);
assert(func0({1, 2, 3, 4, 5}) == 20);
assert(func0({2, 3}) == 6);
return 0;
}
| O2 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rax
mov 0x8(%rdi),%rsi
sub %rax,%rsi
mov %rsi,%rdx
sar $0x2,%rdx
cmp $0x1,%rdx
je 1410 <_Z5func0RKSt6vectorIiSaIiEE+0x50>
mov (%rax),%ecx
lea 0x4(%rax),%rdx
add %rax,%rsi
xor %r8d,%r8d
nopw 0x0(%rax,%rax,1)
mov... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov r8, [rdi]
mov rax, [rdi+8]
sub rax, r8
mov rdi, rax
sar rdi, 2
sub rdi, 1
cmp rax, 4
jz short loc_13D0
mov esi, [r8]
xor ecx, ecx
xor edx, edx
nop word ptr [rax+rax+00000000h]
loc_13B0:
add rdx, 1
mov eax, esi
mov esi,... | long long func0(int **a1)
{
int *v1; // r8
long long v2; // rax
unsigned long long v3; // rdi
int v4; // esi
int v5; // ecx
unsigned long long v6; // rdx
int v7; // eax
int v8; // eax
v1 = *a1;
v2 = (char *)a1[1] - (char *)*a1;
v3 = (v2 >> 2) - 1;
if ( v2 == 4 )
return 0LL;
v4 = *v1;
v... | func0:
ENDBR64
MOV R8,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,R8
MOV RDI,RAX
SAR RDI,0x2
SUB RDI,0x1
CMP RAX,0x4
JZ 0x001013d0
MOV ESI,dword ptr [R8]
XOR ECX,ECX
XOR EDX,EDX
NOP word ptr CS:[RAX + RAX*0x1]
LAB_001013b0:
ADD RDX,0x1
MOV EAX,ESI
MOV ESI,dword ptr [R8 + RDX*0x4]
IMUL EAX,ESI
CMP ECX,EAX
CMOV... | /* func0(std::vector<int, std::allocator<int> > const&) */
int func0(vector *param_1)
{
int *piVar1;
int iVar2;
int iVar3;
ulong uVar4;
piVar1 = *(int **)param_1;
if (*(long *)(param_1 + 8) - (long)piVar1 != 4) {
iVar3 = 0;
uVar4 = 0;
iVar2 = *piVar1;
do {
uVar4 = uVar4 + 1;
... |
1,463 | func0 |
#include <vector>
#include <algorithm>
#include <cassert>
| int func0(const std::vector<int>& list_nums) {
int max_product = 0;
for (size_t i = 0; i < list_nums.size() - 1; ++i) {
int product = list_nums[i] * list_nums[i + 1];
max_product = std::max(max_product, product);
}
return max_product;
}
| int main() {
assert(func0({1, 2, 3, 4, 5, 6}) == 30);
assert(func0({1, 2, 3, 4, 5}) == 20);
assert(func0({2, 3}) == 6);
return 0;
}
| O3 | cpp | func0(std::vector<int, std::allocator<int> > const&):
endbr64
mov (%rdi),%rcx
mov 0x8(%rdi),%rax
sub %rcx,%rax
sar $0x2,%rax
mov %rax,%rsi
sub $0x1,%rsi
je 14b8 <_Z5func0RKSt6vectorIiSaIiEE+0x128>
sub $0x2,%rax
cmp $0x2,%rax
jbe 14c1 <_Z5func0RKSt6vectorIiSaIiEE+0x131>
mov %rsi,%rdx
mo... | _Z5func0RKSt6vectorIiSaIiEE:
endbr64
mov rsi, [rdi]
mov rax, [rdi+8]
sub rax, rsi
mov rcx, rax
sar rcx, 2
sub rcx, 1
cmp rax, 4
jz loc_14B0
cmp rcx, 3
jbe loc_14B3
mov rdx, rcx
mov rax, rsi
pxor xmm3, xmm3
shr rdx, 2
shl rdx, 4
add rdx, rsi
nop word pt... | long long func0(long long *a1)
{
long long v1; // rsi
unsigned long long v2; // rcx
long long v3; // rax
__m128i v4; // xmm3
__m128i v5; // xmm1
__m128i v6; // xmm2
__m128i v7; // xmm0
__m128i v8; // xmm1
__m128i v9; // xmm0
__m128i v10; // xmm1
__m128i v11; // xmm1
__m128i v12; // xmm2
__m12... | func0:
ENDBR64
MOV RSI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,RSI
MOV RCX,RAX
SAR RCX,0x2
SUB RCX,0x1
CMP RAX,0x4
JZ 0x001014b0
CMP RCX,0x3
JBE 0x001014b3
MOV RDX,RCX
MOV RAX,RSI
PXOR XMM3,XMM3
SHR RDX,0x2
SHL RDX,0x4
ADD RDX,RSI
NOP word ptr [RAX + RAX*0x1]
LAB_001013c8:
MOVDQU XMM1,xmmword ptr [RAX]
MO... | /* func0(std::vector<int, std::allocator<int> > const&) */
uint func0(vector *param_1)
{
long lVar1;
int iVar2;
int iVar3;
ulong *puVar4;
ulong *puVar5;
ulong *puVar6;
ulong uVar7;
ulong uVar8;
uint uVar9;
uint uVar10;
uint uVar11;
uint uVar12;
uint uVar13;
uint uVar14;
uint uVar15;
ui... |
1,464 | func0 |
#include <iostream>
#include <assert.h>
class Node {
public:
int data;
Node* left;
Node* right;
Node(int data) : data(data), left(nullptr), right(nullptr) {}
};
int get_height(Node* root) {
if (!root) {
return 0;
}
return std::max(get_height(root->left), get_heig... | bool func0(Node* root) {
if (!root) {
return true;
}
int lh = get_height(root->left);
int rh = get_height(root->right);
if (std::abs(lh - rh) <= 1 && func0(root->left) && func0(root->right)) {
return true;
}
return false;
}
| int main() {
Node* root = new Node(1);
root->left = new Node(2);
root->right = new Node(3);
root->left->left = new Node(4);
root->left->right = new Node(5);
root->left->left->left = new Node(8);
Node* root1 = new Node(1);
root1->left = new Node(2);
root1->right = new Node(... | O0 | cpp | func0(Node*):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
cmpq $0x0,-0x18(%rbp)
jne 1268 <_Z5func0P4Node+0x1e>
mov $0x1,%eax
jmp 12e2 <_Z5func0P4Node+0x98>
mov -0x18(%rbp),%rax
mov 0x8(%rax),%rax
mov %rax,%rdi
callq 11c9 <_Z10get_heightP4Node>
mov %eax,-0x8(%rb... | _Z5func0P4Node:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
cmp [rbp+var_18], 0
jnz short loc_1228
mov eax, 1
jmp short locret_12A4
loc_1228:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rdi, rax; Node *
call _Z10get_heightP4Node; get_height(Node *)
mov ... | _BOOL8 func0(Node **a1)
{
int v2; // eax
int height; // [rsp+18h] [rbp-8h]
if ( !a1 )
return 1LL;
height = get_height(a1[1]);
v2 = height - get_height(a1[2]);
if ( v2 <= 0 )
v2 = -v2;
return v2 <= 1 && (unsigned __int8)func0(a1[1]) && (unsigned __int8)func0(a1[2]);
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00101228
MOV EAX,0x1
JMP 0x001012a4
LAB_00101228:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,RAX
CALL 0x00101189
MOV dword ptr [RBP + -0x8],EAX
MOV RAX,qword ptr [RBP + -0x18... | /* func0(Node*) */
int func0(Node *param_1)
{
int uVar1;
char cVar2;
int iVar3;
int iVar4;
if (param_1 != (Node *)0x0) {
iVar3 = get_height(*(Node **)(param_1 + 8));
iVar4 = get_height(*(Node **)(param_1 + 0x10));
iVar3 = iVar3 - iVar4;
if (iVar3 < 1) {
iVar3 = -iVar3;
}
if ... |
1,465 | func0 |
#include <iostream>
#include <assert.h>
class Node {
public:
int data;
Node* left;
Node* right;
Node(int data) : data(data), left(nullptr), right(nullptr) {}
};
int get_height(Node* root) {
if (!root) {
return 0;
}
return std::max(get_height(root->left), get_heig... | bool func0(Node* root) {
if (!root) {
return true;
}
int lh = get_height(root->left);
int rh = get_height(root->right);
if (std::abs(lh - rh) <= 1 && func0(root->left) && func0(root->right)) {
return true;
}
return false;
}
| int main() {
Node* root = new Node(1);
root->left = new Node(2);
root->right = new Node(3);
root->left->left = new Node(4);
root->left->right = new Node(5);
root->left->left->left = new Node(8);
Node* root1 = new Node(1);
root1->left = new Node(2);
root1->right = new Node(... | O1 | cpp | func0(Node*):
endbr64
mov $0x1,%eax
test %rdi,%rdi
je 123d <_Z5func0P4Node+0x59>
push %r12
push %rbp
push %rbx
mov %rdi,%rbp
mov 0x8(%rdi),%r12
mov %r12,%rdi
callq 11a9 <_Z10get_heightP4Node>
mov %eax,%ebx
mov 0x10(%rbp),%rbp
mov %rbp,%rdi
callq 11a9 <_Z10get_heightP4Node>
sub %eax... | _Z5func0P4Node:
endbr64
mov eax, 1
test rdi, rdi
jz short locret_11FD
push r12
push rbp
push rbx
mov rbp, rdi
mov r12, [rdi+8]
mov rdi, r12
call _Z10get_heightP4Node; get_height(Node *)
mov ebx, eax
mov rbp, [rbp+10h]
mov rdi, rbp
call _Z10get_heightP4Node; get_height(... | long long func0(long long a1)
{
long long result; // rax
long long v2; // r12
int height; // ebx
long long v4; // rbp
unsigned int v5; // ebx
result = 1LL;
if ( a1 )
{
v2 = *(_QWORD *)(a1 + 8);
height = get_height(v2);
v4 = *(_QWORD *)(a1 + 16);
v5 = height - get_height(v4) + 1;
re... | func0:
ENDBR64
MOV EAX,0x1
TEST RDI,RDI
JZ 0x001011fd
PUSH R12
PUSH RBP
PUSH RBX
MOV RBP,RDI
MOV R12,qword ptr [RDI + 0x8]
MOV RDI,R12
CALL 0x00101169
MOV EBX,EAX
MOV RBP,qword ptr [RBP + 0x10]
MOV RDI,RBP
CALL 0x00101169
SUB EBX,EAX
ADD EBX,0x1
MOV EAX,0x0
CMP EBX,0x2
JBE 0x001011e7
LAB_001011e2:
POP RBX
POP RBP
POP R... | /* func0(Node*) */
int8 func0(Node *param_1)
{
Node *pNVar1;
Node *pNVar2;
int iVar3;
int iVar4;
int8 uVar5;
if (param_1 != (Node *)0x0) {
pNVar1 = *(Node **)(param_1 + 8);
iVar3 = get_height(pNVar1);
pNVar2 = *(Node **)(param_1 + 0x10);
iVar4 = get_height(pNVar2);
uVar5 = 0;
if... |
1,466 | func0 |
#include <iostream>
#include <assert.h>
class Node {
public:
int data;
Node* left;
Node* right;
Node(int data) : data(data), left(nullptr), right(nullptr) {}
};
int get_height(Node* root) {
if (!root) {
return 0;
}
return std::max(get_height(root->left), get_heig... | bool func0(Node* root) {
if (!root) {
return true;
}
int lh = get_height(root->left);
int rh = get_height(root->right);
if (std::abs(lh - rh) <= 1 && func0(root->left) && func0(root->right)) {
return true;
}
return false;
}
| int main() {
Node* root = new Node(1);
root->left = new Node(2);
root->right = new Node(3);
root->left->left = new Node(4);
root->left->right = new Node(5);
root->left->left->left = new Node(8);
Node* root1 = new Node(1);
root1->left = new Node(2);
root1->right = new Node(... | O2 | cpp | func0(Node*):
endbr64
push %r12
push %rbp
push %rbx
mov %rdi,%rbx
test %rbx,%rbx
je 1590 <_Z5func0P4Node+0x70>
mov 0x8(%rbx),%r12
test %r12,%r12
je 1568 <_Z5func0P4Node+0x48>
mov %r12,%rdi
callq 14f0 <_Z10get_heightP4Node.part.0>
mov 0x10(%rbx),%rbx
mov %eax,%ebp
test %rbx,%rbx
je ... | _Z5func0P4Node:
endbr64
push r12
push rbp
push rbx
mov rbx, rdi
loc_201B:
test rbx, rbx
jz loc_23B8
mov r9, [rbx+8]
test r9, r9
jz loc_2320
mov rax, [r9+10h]
mov r10, [r9+8]
test rax, rax
jz loc_22F0
mov r11, [rax+8]
mov rax, [rax+10h]
test rax, rax
jz lo... | long long func0(long long a1, long long a2, long long a3, long long a4)
{
long long v5; // r9
long long v6; // rax
long long v7; // r10
long long v8; // r11
long long v9; // rax
long long v10; // r8
long long v11; // rax
long long v12; // rcx
int v13; // eax
long long v14; // rcx
long long v15; /... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
LAB_0010201b:
TEST RBX,RBX
JZ 0x001023b8
MOV R9,qword ptr [RBX + 0x8]
TEST R9,R9
JZ 0x00102320
MOV RAX,qword ptr [R9 + 0x10]
MOV R10,qword ptr [R9 + 0x8]
TEST RAX,RAX
JZ 0x001022f0
MOV R11,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
TEST RAX,RAX
JZ 0x001023... | /* func0(Node*) */
int8 func0(Node *param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
long lVar6;
int8 uVar7;
Node *pNVar8;
long lVar9;
long lVar10;
long lVar11;
Node *pNVar12;
LAB_0010201b:
do {
if (param_1 == (Node *)0x0) {
return 1;
}
pNVar12 = *(Node ... |
1,467 | func0 |
#include <iostream>
#include <assert.h>
class Node {
public:
int data;
Node* left;
Node* right;
Node(int data) : data(data), left(nullptr), right(nullptr) {}
};
int get_height(Node* root) {
if (!root) {
return 0;
}
return std::max(get_height(root->left), get_heig... | bool func0(Node* root) {
if (!root) {
return true;
}
int lh = get_height(root->left);
int rh = get_height(root->right);
if (std::abs(lh - rh) <= 1 && func0(root->left) && func0(root->right)) {
return true;
}
return false;
}
| int main() {
Node* root = new Node(1);
root->left = new Node(2);
root->right = new Node(3);
root->left->left = new Node(4);
root->left->right = new Node(5);
root->left->left->left = new Node(8);
Node* root1 = new Node(1);
root1->left = new Node(2);
root1->right = new Node(... | O3 | cpp | func0(Node*):
endbr64
push %rbp
push %rbx
mov %rdi,%rbx
sub $0x8,%rsp
test %rbx,%rbx
je 2580 <_Z5func0P4Node+0x7f0>
mov 0x8(%rbx),%r8
mov 0x10(%rbx),%rbx
test %r8,%r8
je 2060 <_Z5func0P4Node+0x2d0>
mov 0x10(%r8),%rax
mov 0x8(%r8),%rcx
test %rax,%rax
je 2590 <_Z5func0P4Node+0x800>... | _Z5func0P4Node:
endbr64
push r12
push rbp
push rbx
mov rbx, rdi
loc_201B:
test rbx, rbx
jz loc_2368
mov r8, [rbx+8]
test r8, r8
jz loc_2318
mov rax, [r8+10h]
mov r10, [r8+8]
test rax, rax
jz loc_22F0
mov r11, [rax+8]
mov rax, [rax+10h]
test rax, rax
jz lo... | long long func0(long long a1)
{
long long v2; // r8
long long v3; // rax
long long v4; // r10
long long v5; // r11
long long v6; // rax
long long v7; // rbp
long long v8; // rax
int v9; // ecx
int v10; // eax
int v11; // r9d
int v12; // ecx
long long v13; // rax
long long v14; // rbp
int he... | func0:
ENDBR64
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
LAB_0010201b:
TEST RBX,RBX
JZ 0x00102368
MOV R8,qword ptr [RBX + 0x8]
TEST R8,R8
JZ 0x00102318
MOV RAX,qword ptr [R8 + 0x10]
MOV R10,qword ptr [R8 + 0x8]
TEST RAX,RAX
JZ 0x001022f0
MOV R11,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
TEST RAX,RAX
JZ 0x001023... | /* func0(Node*) */
int8 func0(Node *param_1)
{
long lVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
long lVar7;
int8 uVar8;
long lVar9;
long lVar10;
Node *pNVar11;
Node *pNVar12;
LAB_0010201b:
do {
if (param_1 == (Node *)0x0) {
return 1;
}
pNVar12 = *(Node ... |
1,468 | func0 |
#include <tuple>
#include <vector>
#include <cassert>
template<typename T>
| std::vector<std::tuple<T, T>> func0(const std::tuple<T, T>& test_tup, int N) {
std::vector<std::tuple<T, T>> res(N, test_tup);
return res;
}
| int main() {
assert((func0(std::make_tuple(1, 3), 4) == std::vector<std::tuple<int, int>>{std::make_tuple(1, 3), std::make_tuple(1, 3), std::make_tuple(1, 3), std::make_tuple(1, 3)}));
assert((func0(std::make_tuple(1, 2), 3) == std::vector<std::tuple<int, int>>{std::make_tuple(1, 2), std::make_tuple(1, 2), st... | O0 | cpp | std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > func0<int>(std::tuple<int, int> const&, int):
endbr64
push %rbp
mov %rsp,%rbp
push %rbx
sub $0x38,%rsp
mov %rdi,-0x28(%rbp)
mov %rsi,-0x30(%rbp)
mov %edx,-0x34(%rbp)
mov %fs:0x28,%rax
mov %rax,-0x18(%rbp)
xor %eax,%eax... | _Z5func0IiESt6vectorISt5tupleIJT_S2_EESaIS3_EERKS3_i:
endbr64
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_44], edx
mov rax, fs:28h
mov [rbp+var_18], rax
xor eax, eax
lea rax, [rbp+var_21]
mov [rbp+var_20], rax
nop
nop... | long long func0<int>(long long a1, long long a2, int a3)
{
char v4; // [rsp+2Fh] [rbp-21h] BYREF
char *v5; // [rsp+30h] [rbp-20h]
unsigned long long v6; // [rsp+38h] [rbp-18h]
v6 = __readfsqword(0x28u);
v5 = &v4;
std::vector<std::tuple<int,int>>::vector(a1, a3, a2, &v4);
std::__new_allocator<std::tuple<... | func0<int>:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV dword ptr [RBP + -0x44],EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
LEA RAX,[RBP + -0x21]
MOV qword ptr [RBP + -0x20],RAX
NOP
NOP
MOV EAX,dword ptr [RBP + -0... | /* std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > >
func0<int>(std::tuple<int, int> const&, int) */
vector func0<int>(tuple *param_1,int param_2)
{
int in_EDX;
int4 in_register_00000034;
long in_FS_OFFSET;
allocator local_29;
allocator *local_28;
long local_20;
local_20 = ... |
1,469 | func0 |
#include <tuple>
#include <vector>
#include <cassert>
template<typename T>
| std::vector<std::tuple<T, T>> func0(const std::tuple<T, T>& test_tup, int N) {
std::vector<std::tuple<T, T>> res(N, test_tup);
return res;
}
| int main() {
assert((func0(std::make_tuple(1, 3), 4) == std::vector<std::tuple<int, int>>{std::make_tuple(1, 3), std::make_tuple(1, 3), std::make_tuple(1, 3), std::make_tuple(1, 3)}));
assert((func0(std::make_tuple(1, 2), 3) == std::vector<std::tuple<int, int>>{std::make_tuple(1, 2), std::make_tuple(1, 2), st... | O1 | cpp | std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > > func0<int>(std::tuple<int, int> const&, int):
endbr64
push %r12
push %rbp
push %rbx
movslq %edx,%rdx
movabs $0xfffffffffffffff,%rax
cmp %rax,%rdx
ja 156b <_Z5func0IiESt6vectorISt5tupleIJT_S2_EESaIS3_EERKS3_i+0x78>
mov %rdi,%rbp
mo... | _Z5func0IiESt6vectorISt5tupleIJT_S2_EESaIS3_EERKS3_i:
endbr64
push r13
push r12
push rbp
push rbx
sub rsp, 8
movsxd rbx, edx
mov rax, rbx
shr rax, 3Ch
jnz short loc_1590
mov r12, rdi
mov rbp, rsi
mov qword ptr [rdi], 0
mov qword ptr [rdi+8], 0
mov qword ptr [rdi+10h], 0
... | _QWORD * func0<int>(_QWORD *a1, _QWORD *a2, int a3)
{
long long v3; // rbx
unsigned long long v5; // r13
long long v6; // rax
long long v7; // rsi
long long v8; // rdx
v3 = a3;
if ( (unsigned long long)a3 >> 60 )
std::__throw_length_error("cannot create std::vector larger than max_size()");
*a1 = 0... | func0<int>:
ENDBR64
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOVSXD RBX,EDX
MOV RAX,RBX
SHR RAX,0x3c
JNZ 0x00101590
MOV R12,RDI
MOV RBP,RSI
MOV qword ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
MOV qword ptr [RDI + 0x10],0x0
TEST RBX,RBX
JZ 0x0010159c
LEA R13,[RBX*0x8]
MOV RDI,R13
CALL 0x001010c0
MOV qword ptr [... | /* std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int> > >
func0<int>(std::tuple<int, int> const&, int) */
vector func0<int>(tuple *param_1,int param_2)
{
void *pvVar1;
int in_EDX;
ulong uVar2;
ulong uVar3;
int4 in_register_00000034;
void *pvVar4;
char *pcVar5;
tuple *unaff_R12;
... |
1,470 | func0 |
#include <tuple>
#include <vector>
#include <cassert>
template<typename T>
| std::vector<std::tuple<T, T>> func0(const std::tuple<T, T>& test_tup, int N) {
std::vector<std::tuple<T, T>> res(N, test_tup);
return res;
}
| int main() {
assert((func0(std::make_tuple(1, 3), 4) == std::vector<std::tuple<int, int>>{std::make_tuple(1, 3), std::make_tuple(1, 3), std::make_tuple(1, 3), std::make_tuple(1, 3)}));
assert((func0(std::make_tuple(1, 2), 3) == std::vector<std::tuple<int, int>>{std::make_tuple(1, 2), std::make_tuple(1, 2), st... | O2 | cpp | |||||
1,471 | func0 |
#include <tuple>
#include <vector>
#include <cassert>
template<typename T>
| std::vector<std::tuple<T, T>> func0(const std::tuple<T, T>& test_tup, int N) {
std::vector<std::tuple<T, T>> res(N, test_tup);
return res;
}
| int main() {
assert((func0(std::make_tuple(1, 3), 4) == std::vector<std::tuple<int, int>>{std::make_tuple(1, 3), std::make_tuple(1, 3), std::make_tuple(1, 3), std::make_tuple(1, 3)}));
assert((func0(std::make_tuple(1, 2), 3) == std::vector<std::tuple<int, int>>{std::make_tuple(1, 2), std::make_tuple(1, 2), st... | O3 | cpp | |||||
1,472 | func0 |
#include <cassert>
| int func0(int l, int w, int h) {
int LSA = 2 * h * (l + w);
return LSA;
}
| int main() {
assert(func0(8, 5, 6) == 156);
assert(func0(7, 9, 10) == 320);
assert(func0(10, 20, 30) == 1800);
return 0;
}
| O0 | cpp | func0(int, int, int):
endbr64
push %rbp
mov %rsp,%rbp
mov %edi,-0x14(%rbp)
mov %esi,-0x18(%rbp)
mov %edx,-0x1c(%rbp)
mov -0x14(%rbp),%edx
mov -0x18(%rbp),%eax
add %edx,%eax
imul -0x1c(%rbp),%eax
add %eax,%eax
mov %eax,-0x4(%rbp)
mov -0x4(%rbp),%eax
pop %rbp
retq
| _Z5func0iii:
endbr64
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_18], esi
mov [rbp+var_1C], edx
mov edx, [rbp+var_14]
mov eax, [rbp+var_18]
add eax, edx
imul eax, [rbp+var_1C]
add eax, eax
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
pop rbp
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(2 * a3 * (a1 + a2));
} | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x14],EDI
MOV dword ptr [RBP + -0x18],ESI
MOV dword ptr [RBP + -0x1c],EDX
MOV EDX,dword ptr [RBP + -0x14]
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,EDX
IMUL EAX,dword ptr [RBP + -0x1c]
ADD EAX,EAX
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
POP R... | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return (param_2 + param_1) * param_3 * 2;
} |
1,473 | func0 |
#include <cassert>
| int func0(int l, int w, int h) {
int LSA = 2 * h * (l + w);
return LSA;
}
| int main() {
assert(func0(8, 5, 6) == 156);
assert(func0(7, 9, 10) == 320);
assert(func0(10, 20, 30) == 1800);
return 0;
}
| O1 | cpp | func0(int, int, int):
endbr64
add %esi,%edi
imul %edx,%edi
lea (%rdi,%rdi,1),%eax
retq
| _Z5func0iii:
endbr64
add edi, esi
imul edi, edx
lea eax, [rdi+rdi]
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(2 * a3 * (a2 + a1));
} | func0:
ENDBR64
ADD EDI,ESI
IMUL EDI,EDX
LEA EAX,[RDI + RDI*0x1]
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return (param_1 + param_2) * param_3 * 2;
} |
1,474 | func0 |
#include <cassert>
| int func0(int l, int w, int h) {
int LSA = 2 * h * (l + w);
return LSA;
}
| int main() {
assert(func0(8, 5, 6) == 156);
assert(func0(7, 9, 10) == 320);
assert(func0(10, 20, 30) == 1800);
return 0;
}
| O2 | cpp | func0(int, int, int):
endbr64
add %esi,%edi
imul %edx,%edi
lea (%rdi,%rdi,1),%eax
retq
nopl (%rax)
| _Z5func0iii:
endbr64
add edi, esi
imul edi, edx
lea eax, [rdi+rdi]
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(2 * a3 * (a2 + a1));
} | func0:
ENDBR64
ADD EDI,ESI
IMUL EDI,EDX
LEA EAX,[RDI + RDI*0x1]
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return (param_1 + param_2) * param_3 * 2;
} |
1,475 | func0 |
#include <cassert>
| int func0(int l, int w, int h) {
int LSA = 2 * h * (l + w);
return LSA;
}
| int main() {
assert(func0(8, 5, 6) == 156);
assert(func0(7, 9, 10) == 320);
assert(func0(10, 20, 30) == 1800);
return 0;
}
| O3 | cpp | func0(int, int, int):
endbr64
add %esi,%edi
imul %edx,%edi
lea (%rdi,%rdi,1),%eax
retq
nopl (%rax)
| _Z5func0iii:
endbr64
add edi, esi
imul edi, edx
lea eax, [rdi+rdi]
retn | long long func0(int a1, int a2, int a3)
{
return (unsigned int)(2 * a3 * (a2 + a1));
} | func0:
ENDBR64
ADD EDI,ESI
IMUL EDI,EDX
LEA EAX,[RDI + RDI*0x1]
RET | /* func0(int, int, int) */
int func0(int param_1,int param_2,int param_3)
{
return (param_1 + param_2) * param_3 * 2;
} |
1,476 | func0 | #include <cassert>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
| vector<pair<string, string>> func0(vector<pair<string, string>> price) {
sort(price.begin(), price.end(), [](const pair<string, string>& a, const pair<string, string>& b) {
return stod(a.second) > stod(b.second);
});
return price;
}
| int main(){
{
vector<pair<string, string>> input = {{"item1", "12.20"}, {"item2", "15.10"}, {"item3", "24.5"}};
vector<pair<string, string>> expected = {{"item3", "24.5"}, {"item2", "15.10"}, {"item1", "12.20"}};
assert(func0(input) == expected);
}
{
vector<pair<string... | O0 | cpp | func0(std::vector<std::pair<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::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_st... | _ZZ5func0St6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EEENKUlRKS7_SB_E_clESB_SB_:
push rbp
mov rbp, rsp
push rbx
sub rsp, 28h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
mov rax, [rbp+var_20]
add rax, 20h ; ' '
mov esi, 0
mov... | bool func0(std::vector<std::pair<std::string,std::string>>)::{lambda(std::pair<std::string,std::string> const&,std::pair<std::string,std::string> const&)#1}::operator()(
long long a1,
long long a2,
long long a3)
{
double v3; // rbx
v3 = std::stod(a2 + 32, 0LL);
return v3 > std::stod(a3 +... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,RAX
CALL 0x00104f64
MOV RBX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,RAX
CALL 0x00104f18
MOV RSI,RBX
MOV RDI,RAX
CALL 0x00103346
MOV RDX,qword ptr [RBP + -... | /* func0(std::vector<std::pair<std::string, std::string >, std::allocator<std::pair<std::string,
std::string > > >) */
vector<std::pair<std::string,std::string>,std::allocator<std::pair<std::string,std::string>>> *
func0(vector param_1)
{
__normal_iterator _Var1;
__normal_iterator _Var2;
_lambda_std__pair<st... |
1,477 | func0 | #include <cassert>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
| vector<pair<string, string>> func0(vector<pair<string, string>> price) {
sort(price.begin(), price.end(), [](const pair<string, string>& a, const pair<string, string>& b) {
return stod(a.second) > stod(b.second);
});
return price;
}
| int main(){
{
vector<pair<string, string>> input = {{"item1", "12.20"}, {"item2", "15.10"}, {"item3", "24.5"}};
vector<pair<string, string>> expected = {{"item3", "24.5"}, {"item2", "15.10"}, {"item1", "12.20"}};
assert(func0(input) == expected);
}
{
vector<pair<string... | O1 | cpp | void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::pair<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::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, s... | _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ESt6vectorIS9_SaIS9_EEEENS0_5__ops14_Val_comp_iterIZ5func0SD_EUlRKS9_SI_E_EEEvT_T0_:
push r14
push r13
push r12
push rbp
push rbx
sub rsp, 60h
mov rbp, rdi
mov rax, f... | unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::pair<std::string,std::string> *,std::vector<std::pair<std::string,std::string>>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<std::pair<std::string,std::string>>)::{lambda(std::pair<std::string,std::string> const&,std::pair<std::... | __unguarded_linear_insert<__normal_iterator<std::pair<std::string,std::string>*,std::vector<std::pair<std::string,std::string>,std::allocator<std::pair<std::string,std::string>>>>,__ops::_Val_comp_iter<func0(std::vector<std::pair<std::string,std::string>,std::allocator<std::pair<std::string,std::string>>>)::{lambda(std... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<std::pair<std::string, std::string >*,
std::vector<std::pair<std::string, std::string >, std::allocator<std::pair<std::string,
std::string > > > >, __ops::_Val_comp_iter<func0(std:... |
1,478 | func0 | #include <cassert>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
| vector<pair<string, string>> func0(vector<pair<string, string>> price) {
sort(price.begin(), price.end(), [](const pair<string, string>& a, const pair<string, string>& b) {
return stod(a.second) > stod(b.second);
});
return price;
}
| int main(){
{
vector<pair<string, string>> input = {{"item1", "12.20"}, {"item2", "15.10"}, {"item3", "24.5"}};
vector<pair<string, string>> expected = {{"item3", "24.5"}, {"item2", "15.10"}, {"item1", "12.20"}};
assert(func0(input) == expected);
}
{
vector<pair<string... | O2 | cpp | void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::pair<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::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, s... | _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ESt6vectorIS9_SaIS9_EEEENS0_5__ops14_Val_comp_iterIZ5func0SD_EUlRKS9_SI_E_EEEvT_T0_:
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 68h
mo... | unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::pair<std::string,std::string> *,std::vector<std::pair<std::string,std::string>>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<std::pair<std::string,std::string>>)::{lambda(std::pair<std::string,std::string> const&,std::pair<std::... | __unguarded_linear_insert<__normal_iterator<std::pair<std::string,std::string>*,std::vector<std::pair<std::string,std::string>,std::allocator<std::pair<std::string,std::string>>>>,__ops::_Val_comp_iter<func0(std::vector<std::pair<std::string,std::string>,std::allocator<std::pair<std::string,std::string>>>)::{lambda(std... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<std::pair<std::string, std::string >*,
std::vector<std::pair<std::string, std::string >, std::allocator<std::pair<std::string,
std::string > > > >, __ops::_Val_comp_iter<func0(std:... |
1,479 | func0 | #include <cassert>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
| vector<pair<string, string>> func0(vector<pair<string, string>> price) {
sort(price.begin(), price.end(), [](const pair<string, string>& a, const pair<string, string>& b) {
return stod(a.second) > stod(b.second);
});
return price;
}
| int main(){
{
vector<pair<string, string>> input = {{"item1", "12.20"}, {"item2", "15.10"}, {"item3", "24.5"}};
vector<pair<string, string>> expected = {{"item3", "24.5"}, {"item2", "15.10"}, {"item1", "12.20"}};
assert(func0(input) == expected);
}
{
vector<pair<string... | O3 | cpp | void std::__adjust_heap<__gnu_cxx::__normal_iterator<std::pair<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::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato... | _ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ESt6vectorIS9_SaIS9_EEEENS0_5__ops14_Val_comp_iterIZ5func0SD_EUlRKS9_SI_E_EEEvT_T0_:
push r15
push r14
push r13
push r12
push rbp
mov rbp, rdi
push rbx
sub rsp, 88h
mo... | unsigned long long std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<std::pair<std::string,std::string> *,std::vector<std::pair<std::string,std::string>>>,__gnu_cxx::__ops::_Val_comp_iter<func0(std::vector<std::pair<std::string,std::string>>)::{lambda(std::pair<std::string,std::string> const&,std::pair<std::... | __unguarded_linear_insert<__normal_iterator<std::pair<std::string,std::string>*,std::vector<std::pair<std::string,std::string>,std::allocator<std::pair<std::string,std::string>>>>,__ops::_Val_comp_iter<func0(std::vector<std::pair<std::string,std::string>,std::allocator<std::pair<std::string,std::string>>>)::{lambda(std... | /* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__unguarded_linear_insert<__normal_iterator<std::pair<std::string, std::string >*,
std::vector<std::pair<std::string, std::string >, std::allocator<std::pair<std::string,
std::string > > > >, __ops::_Val_comp_iter<func0(std:... |
1,480 | func0 |
#include <cassert>
#include <vector>
| int func0(const std::vector<int>& A, int left_element, int right_element) {
if (left_element > right_element) {
return left_element;
}
int mid = left_element + (right_element - left_element) / 2;
if (A[mid] == mid) {
return func0(A, mid + 1, right_element);
} else {
r... | int main() {
assert(func0({0, 1, 2, 3, 4, 5, 6}, 0, 6) == 7);
assert(func0({0, 1, 2, 6, 9, 11, 15}, 0, 6) == 3);
assert(func0({1, 2, 3, 4, 6, 9, 11, 15}, 0, 7) == 0);
return 0;
}
| O0 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
push %rbp
mov %rsp,%rbp
sub $0x20,%rsp
mov %rdi,-0x18(%rbp)
mov %esi,-0x1c(%rbp)
mov %edx,-0x20(%rbp)
mov -0x1c(%rbp),%eax
cmp -0x20(%rbp),%eax
jle 124c <_Z5func0RKSt6vectorIiSaIiEEii+0x23>
mov -0x1c(%rbp),%eax
jmp 1... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_20]
jle short loc_126C
mov eax, [rbp+var_1C]
jmp short locret_12D7
loc_126C:
mov eax, [rbp+va... | long long func0(long long a1, unsigned int a2, unsigned int a3)
{
unsigned int v5; // [rsp+1Ch] [rbp-4h]
if ( (int)a2 > (int)a3 )
return a2;
v5 = (int)(a3 - a2) / 2 + a2;
if ( v5 == *(_DWORD *)std::vector<int>::operator[](a1, (int)v5) )
return func0(a1, v5 + 1, a3);
else
return func0(a1, a2, v5 ... | func0:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x20]
JLE 0x0010126c
MOV EAX,dword ptr [RBP + -0x1c]
JMP 0x001012d7
LAB_0010126c:
MOV EAX,dword ptr [RBP + -0x20]
SUB... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
ulong func0(vector *param_1,int param_2,int param_3)
{
int iVar1;
int *piVar2;
ulong uVar3;
if (param_3 < param_2) {
uVar3 = (ulong)(uint)param_2;
}
else {
iVar1 = param_2 + (param_3 - param_2) / 2;
piVar2 = (int *)std::ve... |
1,481 | func0 |
#include <cassert>
#include <vector>
| int func0(const std::vector<int>& A, int left_element, int right_element) {
if (left_element > right_element) {
return left_element;
}
int mid = left_element + (right_element - left_element) / 2;
if (A[mid] == mid) {
return func0(A, mid + 1, right_element);
} else {
r... | int main() {
assert(func0({0, 1, 2, 3, 4, 5, 6}, 0, 6) == 7);
assert(func0({0, 1, 2, 6, 9, 11, 15}, 0, 6) == 3);
assert(func0({1, 2, 3, 4, 6, 9, 11, 15}, 0, 7) == 0);
return 0;
}
| O1 | cpp | func0(std::vector<int, std::allocator<int> > const&, int, int):
endbr64
mov %esi,%eax
cmp %edx,%esi
jg 1249 <_Z5func0RKSt6vectorIiSaIiEEii+0x40>
sub $0x8,%rsp
mov %edx,%ecx
sub %esi,%ecx
mov %ecx,%eax
shr $0x1f,%eax
add %ecx,%eax
sar %eax
add %esi,%eax
movslq %eax,%r8
mov (%rdi),%rc... | _Z5func0RKSt6vectorIiSaIiEEii:
endbr64
mov eax, esi
cmp esi, edx
jg short locret_1249
sub rsp, 8
mov ecx, edx
sub ecx, esi
mov eax, ecx
shr eax, 1Fh
add eax, ecx
sar eax, 1
add eax, esi
movsxd r8, eax
mov rcx, [rdi]
cmp [rcx+r8*4], eax
jz short loc_123F
lea ... | long long func0(_QWORD *a1, long long a2, int a3)
{
long long result; // rax
int v4; // eax
result = (unsigned int)a2;
if ( (int)a2 <= a3 )
{
v4 = a2 + (a3 - (int)a2) / 2;
if ( *(_DWORD *)(*a1 + 4LL * v4) == v4 )
return func0(a1, (unsigned int)(v4 + 1));
else
return func0(a1, a2);
... | func0:
ENDBR64
MOV EAX,ESI
CMP ESI,EDX
JG 0x00101249
SUB RSP,0x8
MOV ECX,EDX
SUB ECX,ESI
MOV EAX,ECX
SHR EAX,0x1f
ADD EAX,ECX
SAR EAX,0x1
ADD EAX,ESI
MOVSXD R8,EAX
MOV RCX,qword ptr [RDI]
CMP dword ptr [RCX + R8*0x4],EAX
JZ 0x0010123f
LEA EDX,[RAX + -0x1]
CALL 0x00101209
LAB_0010123a:
ADD RSP,0x8
RET
LAB_0010123f:
LEA ... | /* func0(std::vector<int, std::allocator<int> > const&, int, int) */
ulong func0(vector *param_1,int param_2,int param_3)
{
int iVar1;
ulong uVar2;
if (param_2 <= param_3) {
iVar1 = (param_3 - param_2) / 2 + param_2;
if (*(int *)(*(long *)param_1 + (long)iVar1 * 4) == iVar1) {
uVar2 = func0(par... |
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.