#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*/ addll(int, int);
int /*<<< orphan*/ printf(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ test(int, int);
main() {
  long long i, j;
  for (i = 1; i < 5; i++)
    for (j = 1; j < 5; j++)
      test(i, j);
  test(-1, 2);
  printf("0x%llx + 0x%llx = 0x%llx\n", 0xffffffffll, 0x02ll,
         addll(0xffffffffll, 2));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
cmpq   $0x5,-0x10(%rbp)
jge    119d <main+0x6d>
movq   $0x1,-0x18(%rbp)
cmpq   $0x5,-0x18(%rbp)
jge    1187 <main+0x57>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
mov    -0x18(%rbp),%rax
mov    %eax,%esi
call   1050 <test@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    115a <main+0x2a>
jmp    118c <main+0x5c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1147 <main+0x17>
mov    $0xffffffff,%edi
mov    $0x2,%esi
call   1050 <test@plt>
mov    $0xffffffff,%edi
mov    $0x2,%esi
call   1040 <addll@plt>
mov    %eax,%ecx
lea    0xe3c(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1050 <test@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1050 <test@plt>
mov    $0x1,%edi
mov    $0x3,%esi
call   1050 <test@plt>
mov    $0x1,%edi
mov    $0x4,%esi
call   1050 <test@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1050 <test@plt>
mov    $0x2,%edi
mov    $0x2,%esi
call   1050 <test@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1050 <test@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1050 <test@plt>
mov    $0x3,%edi
mov    $0x1,%esi
call   1050 <test@plt>
mov    $0x3,%edi
mov    $0x2,%esi
call   1050 <test@plt>
mov    $0x3,%edi
mov    $0x3,%esi
call   1050 <test@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1050 <test@plt>
mov    $0x4,%edi
mov    $0x1,%esi
call   1050 <test@plt>
mov    $0x4,%edi
mov    $0x2,%esi
call   1050 <test@plt>
mov    $0x4,%edi
mov    $0x3,%esi
call   1050 <test@plt>
mov    $0x4,%edi
mov    $0x4,%esi
call   1050 <test@plt>
mov    $0xffffffff,%edi
mov    $0x2,%esi
call   1050 <test@plt>
mov    $0xffffffff,%edi
mov    $0x2,%esi
call   1040 <addll@plt>
lea    0xdba(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"0x%llx + 0x%llx = 0x%llx\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %2
br label %4
4: ; preds = %21, %0
%5 = load i64, i64* %2
%6 = icmp slt i64 %5, 5
br i1 %6, label %7, label %24
7: ; preds = %4
store i64 1, i64* %3
br label %8
8: ; preds = %17, %7
%9 = load i64, i64* %3
%10 = icmp slt i64 %9, 5
br i1 %10, label %11, label %20
11: ; preds = %8
%12 = load i64, i64* %2
%13 = trunc i64 %12 to i32
%14 = load i64, i64* %3
%15 = trunc i64 %14 to i32
%16 = call i32 @test(i32 %13, i32 %15)
br label %17
17: ; preds = %11
%18 = load i64, i64* %3
%19 = add nsw i64 %18, 1
store i64 %19, i64* %3
br label %8
20: ; preds = %8
br label %21
21: ; preds = %20
%22 = load i64, i64* %2
%23 = add nsw i64 %22, 1
store i64 %23, i64* %2
br label %4
24: ; preds = %4
%25 = call i32 @test(i32 -1, i32 2)
%26 = call i32 @addll(i32 -1, i32 2)
%27 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 -1, i32 2, i32 %26)
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@.str = [26 x i8] c"0x%llx + 0x%llx = 0x%llx\0A\00"
define i32 @main() {
%1 = tail call i32 @test(i32 1, i32 1)
%2 = tail call i32 @test(i32 1, i32 2)
%3 = tail call i32 @test(i32 1, i32 3)
%4 = tail call i32 @test(i32 1, i32 4)
%5 = tail call i32 @test(i32 2, i32 1)
%6 = tail call i32 @test(i32 2, i32 2)
%7 = tail call i32 @test(i32 2, i32 3)
%8 = tail call i32 @test(i32 2, i32 4)
%9 = tail call i32 @test(i32 3, i32 1)
%10 = tail call i32 @test(i32 3, i32 2)
%11 = tail call i32 @test(i32 3, i32 3)
%12 = tail call i32 @test(i32 3, i32 4)
%13 = tail call i32 @test(i32 4, i32 1)
%14 = tail call i32 @test(i32 4, i32 2)
%15 = tail call i32 @test(i32 4, i32 3)
%16 = tail call i32 @test(i32 4, i32 4)
%17 = tail call i32 @test(i32 -1, i32 2)
%18 = tail call i32 @addll(i32 -1, i32 2)
%19 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 -1, i32 2, i32 %18)
ret i32 0
}