int main(int argc, char **argv) {
  int i = 123, j = 456;
  cmp2(&i, &j);
  int a[] = {33, 30, 332, 5, 9};
  int b[] = {0, 0, 0, 0};
  int c[] = {824, 938, 1399, 5607, 6973, 5703, 9609, 4398, 8247};
  int d[] = {121, 12};
  int e[] = {3, 43, 48, 94, 85, 33, 64, 32, 63, 66};
  printf("%s\n", largestNumber(a, 5));
  printf("%s\n", largestNumber(b, 4));
  printf("%d\n",
         strcmp(largestNumber(c, 9), "9609938824824769735703560743981399"));
  printf("%s\n", largestNumber(d, 2));
  printf("%s\n", largestNumber(e, 10));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x7b,-0x14(%rbp)
movl   $0x1c8,-0x18(%rbp)
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1070 <cmp2@plt>
mov    0xe63(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe60(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe5e(%rip),%eax
mov    %eax,-0x20(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xe50(%rip),%rsi
mov    $0x24,%edx
call   1060 <memcpy@plt>
mov    0xe97(%rip),%rax
mov    %rax,-0x78(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xe5d(%rip),%rsi
mov    $0x28,%edx
call   1060 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
mov    $0x0,%al
call   1080 <largestNumber@plt>
mov    %eax,%esi
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1080 <largestNumber@plt>
mov    %eax,%esi
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    $0x9,%esi
mov    $0x0,%al
call   1080 <largestNumber@plt>
movslq %eax,%rdi
lea    0xe31(%rip),%rsi
call   1050 <strcmp@plt>
mov    %eax,%esi
lea    0xe1f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x78(%rbp),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1080 <largestNumber@plt>
mov    %eax,%esi
lea    0xdfb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xa0(%rbp),%rdi
mov    $0xa,%esi
mov    $0x0,%al
call   1080 <largestNumber@plt>
mov    %eax,%esi
lea    0xdd8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xa0,%rsp
movl   $0x7b,0x4(%rsp)
movl   $0x1c8,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1050 <cmp2@plt>
mov    0xea4(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xe89(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
mov    0xeb6(%rip),%eax
mov    %eax,0x60(%rsp)
movaps 0xe9b(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe7f(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movabs $0xc00000079,%rax
mov    %rax,0x8(%rsp)
mov    0xeb4(%rip),%rax
mov    %rax,0x90(%rsp)
movaps 0xe95(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xe76(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1060 <largestNumber@plt>
lea    0xe81(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x30(%rsp),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1060 <largestNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x40(%rsp),%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1060 <largestNumber@plt>
movslq %eax,%rdi
lea    0xe45(%rip),%rsi
call   1040 <strcmp@plt>
lea    0xe35(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1060 <largestNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x70(%rsp),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1060 <largestNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [5 x i32] [i32 33, i32 30, i32 332, i32 5, i32 9]
@__const.main.c = [9 x i32] [i32 824, i32 938, i32 1399, i32 5607, i32 6973, i32 5703, i32 9609, i32 4398, i32 8247]
@__const.main.d = [2 x i32] [i32 121, i32 12]
@__const.main.e = [10 x i32] [i32 3, i32 43, i32 48, i32 94, i32 85, i32 33, i32 64, i32 32, i32 63, i32 66]
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [35 x i8] c"9609938824824769735703560743981399\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [5 x i32]
%9 = alloca [4 x i32]
%10 = alloca [9 x i32]
%11 = alloca [2 x i32]
%12 = alloca [10 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 123, i32* %6
store i32 456, i32* %7
%13 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @cmp2 to i32 (i32*, i32*, ...)*)(i32* %6, i32* %7)
%14 = bitcast [5 x i32]* %8 to i8*
%15 = bitcast [4 x i32]* %9 to i8*
%16 = bitcast [9 x i32]* %10 to i8*
%17 = bitcast [2 x i32]* %11 to i8*
%18 = bitcast [10 x i32]* %12 to i8*
%19 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 0
%20 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @largestNumber to i32 (i32*, i32, ...)*)(i32* %19, i32 5)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 0
%23 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @largestNumber to i32 (i32*, i32, ...)*)(i32* %22, i32 4)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = getelementptr inbounds [9 x i32], [9 x i32]* %10, i64 0, i64 0
%26 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @largestNumber to i32 (i32*, i32, ...)*)(i32* %25, i32 9)
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to i8*
%29 = call i32 @strcmp(i8* %28, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%32 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @largestNumber to i32 (i32*, i32, ...)*)(i32* %31, i32 2)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %32)
%34 = getelementptr inbounds [10 x i32], [10 x i32]* %12, i64 0, i64 0
%35 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @largestNumber to i32 (i32*, i32, ...)*)(i32* %34, i32 10)
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %35)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [5 x i32] [i32 33, i32 30, i32 332, i32 5, i32 9]
@__const.main.c = [9 x i32] [i32 824, i32 938, i32 1399, i32 5607, i32 6973, i32 5703, i32 9609, i32 4398, i32 8247]
@__const.main.e = [10 x i32] [i32 3, i32 43, i32 48, i32 94, i32 85, i32 33, i32 64, i32 32, i32 63, i32 66]
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [35 x i8] c"9609938824824769735703560743981399\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [5 x i32]
%6 = alloca [4 x i32]
%7 = alloca [9 x i32]
%8 = alloca i64
%9 = alloca [10 x i32]
%10 = bitcast i32* %3 to i8*
store i32 123, i32* %3
%11 = bitcast i32* %4 to i8*
store i32 456, i32* %4
%12 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @cmp2 to i32 (i32*, i32*, ...)*)(i32* %3, i32* %4)
%13 = bitcast [5 x i32]* %5 to i8*
%14 = bitcast [4 x i32]* %6 to i8*
%15 = bitcast [9 x i32]* %7 to i8*
%16 = bitcast i64* %8 to i8*
store i64 51539607673, i64* %8
%17 = bitcast [10 x i32]* %9 to i8*
%18 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%19 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @largestNumber to i32 (i32*, i32, ...)*)(i32* %18, i32 5)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%22 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @largestNumber to i32 (i32*, i32, ...)*)(i32* %21, i32 4)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds [9 x i32], [9 x i32]* %7, i64 0, i64 0
%25 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @largestNumber to i32 (i32*, i32, ...)*)(i32* %24, i32 9)
%26 = sext i32 %25 to i64
%27 = inttoptr i64 %26 to i8*
%28 = call i32 @strcmp(i8* dereferenceable(1) %27, i8* dereferenceable(35) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %28)
%30 = bitcast i64* %8 to i32*
%31 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @largestNumber to i32 (i32*, i32, ...)*)(i32* %30, i32 2)
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 0
%34 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @largestNumber to i32 (i32*, i32, ...)*)(i32* %33, i32 10)
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %34)
ret i32 0
}