#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ dotestAnn(int, long long *);
int /*<<< orphan*/ dotestJohn(int, long long *);
int /*<<< orphan*/ dotestsumAnn(int, int);
int /*<<< orphan*/ dotestsumJohn(int, int);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("john\n");
  {
    long long sol1[11] = {0, 0, 1, 2, 2, 3, 4, 4, 5, 6, 6};
    dotestJohn(11, sol1);
    long long sol2[14] = {0, 0, 1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 7, 8};
    dotestJohn(14, sol2);
  }
  printf("ann\n");
  {
    long long sol1[6] = {1, 1, 2, 2, 3, 3};
    dotestAnn(6, sol1);
    long long sol2[15] = {1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 8, 8, 9};
    dotestAnn(15, sol2);
  }
  printf("sumJohn\n");
  {
    dotestsumJohn(75, 1720);
    dotestsumJohn(78, 1861);
  }
  printf("sumAnn\n");
  {
    dotestsumAnn(115, 4070);
    dotestsumAnn(150, 6930);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
lea    0xe7e(%rip),%rdi
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
lea    0xe8e(%rip),%rsi
mov    $0x58,%edx
call   1060 <memcpy@plt>
lea    -0x60(%rbp),%rsi
mov    $0xb,%edi
call   1090 <dotestJohn@plt>
lea    -0xd0(%rbp),%rdi
lea    0xec8(%rip),%rsi
mov    $0x70,%edx
call   1060 <memcpy@plt>
lea    -0xd0(%rbp),%rsi
mov    $0xe,%edi
call   1090 <dotestJohn@plt>
lea    0xe2c(%rip),%rdi
call   1040 <printf@plt>
lea    -0x100(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1050 <memset@plt>
movq   $0x1,-0x100(%rbp)
movq   $0x1,-0xf8(%rbp)
movq   $0x2,-0xf0(%rbp)
movq   $0x2,-0xe8(%rbp)
movq   $0x3,-0xe0(%rbp)
movq   $0x3,-0xd8(%rbp)
lea    -0x100(%rbp),%rsi
mov    $0x6,%edi
call   1030 <dotestAnn@plt>
lea    -0x180(%rbp),%rdi
lea    0xe9d(%rip),%rsi
mov    $0x78,%edx
call   1060 <memcpy@plt>
lea    -0x180(%rbp),%rsi
mov    $0xf,%edi
call   1030 <dotestAnn@plt>
lea    0xd96(%rip),%rdi
call   1040 <printf@plt>
mov    $0x4b,%edi
mov    $0x6b8,%esi
call   1080 <dotestsumJohn@plt>
mov    $0x4e,%edi
mov    $0x745,%esi
call   1080 <dotestsumJohn@plt>
lea    0xd75(%rip),%rdi
call   1040 <printf@plt>
mov    $0x73,%edi
mov    $0xfe6,%esi
call   1070 <dotestsumAnn@plt>
mov    $0x96,%edi
mov    $0x1b12,%esi
call   1070 <dotestsumAnn@plt>
xor    %eax,%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xd8,%rsp
lea    0x101a(%rip),%rdi
call   1030 <puts@plt>
mov    0xf16(%rip),%rax
mov    %rax,0xd0(%rsp)
movaps 0xef7(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xe9a(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xe7b(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
lea    0x80(%rsp),%rsi
mov    $0xb,%edi
call   1070 <dotestJohn@plt>
movaps 0xf1a(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xefe(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe8e(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe72(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0xe,%edi
call   1070 <dotestJohn@plt>
lea    0xf47(%rip),%rdi
call   1030 <puts@plt>
movaps 0xdbe(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xdbf(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xdc0(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
lea    0x80(%rsp),%rsi
mov    $0x6,%edi
call   1040 <dotestAnn@plt>
mov    0xeef(%rip),%rax
mov    %rax,0x70(%rsp)
movaps 0xed3(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xeb7(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe9b(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe7f(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe63(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe47(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe2b(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0xf,%edi
call   1040 <dotestAnn@plt>
lea    0xe94(%rip),%rdi
call   1030 <puts@plt>
mov    $0x4b,%edi
mov    $0x6b8,%esi
call   1060 <dotestsumJohn@plt>
mov    $0x4e,%edi
mov    $0x745,%esi
call   1060 <dotestsumJohn@plt>
lea    0xe72(%rip),%rdi
call   1030 <puts@plt>
mov    $0x73,%edi
mov    $0xfe6,%esi
call   1050 <dotestsumAnn@plt>
mov    $0x96,%edi
mov    $0x1b12,%esi
call   1050 <dotestsumAnn@plt>
xor    %eax,%eax
add    $0xd8,%rsp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"john\0A\00"
@__const.main.sol1 = [11 x i64] [i64 0, i64 0, i64 1, i64 2, i64 2, i64 3, i64 4, i64 4, i64 5, i64 6, i64 6]
@__const.main.sol2 = [14 x i64] [i64 0, i64 0, i64 1, i64 2, i64 2, i64 3, i64 4, i64 4, i64 5, i64 6, i64 6, i64 7, i64 7, i64 8]
@.str.1 = [5 x i8] c"ann\0A\00"
@__const.main.sol2.2 = [15 x i64] [i64 1, i64 1, i64 2, i64 2, i64 3, i64 3, i64 4, i64 5, i64 5, i64 6, i64 6, i64 7, i64 8, i64 8, i64 9]
@.str.3 = [9 x i8] c"sumJohn\0A\00"
@.str.4 = [8 x i8] c"sumAnn\0A\00"
define i32 @main() {
%1 = alloca [11 x i64]
%2 = alloca [14 x i64]
%3 = alloca [6 x i64]
%4 = alloca [15 x i64]
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = bitcast [11 x i64]* %1 to i8*
%7 = getelementptr inbounds [11 x i64], [11 x i64]* %1, i64 0, i64 0
%8 = call i32 @dotestJohn(i32 11, i64* %7)
%9 = bitcast [14 x i64]* %2 to i8*
%10 = getelementptr inbounds [14 x i64], [14 x i64]* %2, i64 0, i64 0
%11 = call i32 @dotestJohn(i32 14, i64* %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%13 = bitcast [6 x i64]* %3 to i8*
%14 = bitcast i8* %13 to [6 x i64]*
%15 = getelementptr inbounds [6 x i64], [6 x i64]* %14, i32 0, i32 0
store i64 1, i64* %15
%16 = getelementptr inbounds [6 x i64], [6 x i64]* %14, i32 0, i32 1
store i64 1, i64* %16
%17 = getelementptr inbounds [6 x i64], [6 x i64]* %14, i32 0, i32 2
store i64 2, i64* %17
%18 = getelementptr inbounds [6 x i64], [6 x i64]* %14, i32 0, i32 3
store i64 2, i64* %18
%19 = getelementptr inbounds [6 x i64], [6 x i64]* %14, i32 0, i32 4
store i64 3, i64* %19
%20 = getelementptr inbounds [6 x i64], [6 x i64]* %14, i32 0, i32 5
store i64 3, i64* %20
%21 = getelementptr inbounds [6 x i64], [6 x i64]* %3, i64 0, i64 0
%22 = call i32 @dotestAnn(i32 6, i64* %21)
%23 = bitcast [15 x i64]* %4 to i8*
%24 = getelementptr inbounds [15 x i64], [15 x i64]* %4, i64 0, i64 0
%25 = call i32 @dotestAnn(i32 15, i64* %24)
%26 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%27 = call i32 @dotestsumJohn(i32 75, i32 1720)
%28 = call i32 @dotestsumJohn(i32 78, i32 1861)
%29 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%30 = call i32 @dotestsumAnn(i32 115, i32 4070)
%31 = call i32 @dotestsumAnn(i32 150, i32 6930)
ret i32 0
}

LLVM IR (-O2):
@__const.main.sol1 = [11 x i64] [i64 0, i64 0, i64 1, i64 2, i64 2, i64 3, i64 4, i64 4, i64 5, i64 6, i64 6]
@__const.main.sol2 = [14 x i64] [i64 0, i64 0, i64 1, i64 2, i64 2, i64 3, i64 4, i64 4, i64 5, i64 6, i64 6, i64 7, i64 7, i64 8]
@__const.main.sol2.2 = [15 x i64] [i64 1, i64 1, i64 2, i64 2, i64 3, i64 3, i64 4, i64 5, i64 5, i64 6, i64 6, i64 7, i64 8, i64 8, i64 9]
@str = [5 x i8] c"john\00"
@str.5 = [4 x i8] c"ann\00"
@str.6 = [8 x i8] c"sumJohn\00"
@str.7 = [7 x i8] c"sumAnn\00"
define i32 @main() {
%1 = alloca [11 x i64]
%2 = alloca [14 x i64]
%3 = alloca [6 x i64]
%4 = alloca [15 x i64]
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%6 = bitcast [11 x i64]* %1 to i8*
%7 = getelementptr inbounds [11 x i64], [11 x i64]* %1, i64 0, i64 0
%8 = call i32 @dotestJohn(i32 11, i64* %7)
%9 = bitcast [14 x i64]* %2 to i8*
%10 = getelementptr inbounds [14 x i64], [14 x i64]* %2, i64 0, i64 0
%11 = call i32 @dotestJohn(i32 14, i64* %10)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.5, i64 0, i64 0))
%13 = bitcast [6 x i64]* %3 to i8*
%14 = getelementptr inbounds [6 x i64], [6 x i64]* %3, i64 0, i64 0
%15 = bitcast [6 x i64]* %3 to <2 x i64>*
store <2 x i64> <i64 1, i64 1>, <2 x i64>* %15
%16 = getelementptr inbounds [6 x i64], [6 x i64]* %3, i64 0, i64 2
%17 = bitcast i64* %16 to <2 x i64>*
store <2 x i64> <i64 2, i64 2>, <2 x i64>* %17
%18 = getelementptr inbounds [6 x i64], [6 x i64]* %3, i64 0, i64 4
%19 = bitcast i64* %18 to <2 x i64>*
store <2 x i64> <i64 3, i64 3>, <2 x i64>* %19
%20 = call i32 @dotestAnn(i32 6, i64* %14)
%21 = bitcast [15 x i64]* %4 to i8*
%22 = getelementptr inbounds [15 x i64], [15 x i64]* %4, i64 0, i64 0
%23 = call i32 @dotestAnn(i32 15, i64* %22)
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.6, i64 0, i64 0))
%25 = call i32 @dotestsumJohn(i32 75, i32 1720)
%26 = call i32 @dotestsumJohn(i32 78, i32 1861)
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.7, i64 0, i64 0))
%28 = call i32 @dotestsumAnn(i32 115, i32 4070)
%29 = call i32 @dotestsumAnn(i32 150, i32 6930)
ret i32 0
}