int main() {
  print$Int("0", 0, 0);
  print$Int("1", 1, 1);
  print$Int("10", 10, 10);
  print$Int("010", 010, 8);
  print$Int("0x10", 0x10, 16);
  print$Int("100", 100, 100);
  print$Int("0100", 0100, 64);
  print$Int("0101", 0101, 65);
  print$Int("0x0101", 0x0101, 257);
  print$Int("1 | 64 | 512", 1 | 64 | 512, 577);
  print$Int("01 | 0100", 01 | 0100, 65);
  print$Int("01 | 0100 | 01000", 01 | 0100 | 01000, 577);
  print$Int("0xFFFFFFFF", 0xFFFFFFFF, -1);
  print$Int("0x80000000 | 0x7FFFFFFFU", 0x80000000 | 0x7FFFFFFFU, -1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf11(%rip),%rdi
xor    %edx,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xed6(%rip),%rdi
mov    $0x1,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xeb4(%rip),%rdi
mov    $0xa,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xe9e(%rip),%rdi
mov    $0x8,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xe8d(%rip),%rdi
mov    $0x10,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xe97(%rip),%rdi
mov    $0x64,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xe81(%rip),%rdi
mov    $0x40,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xe55(%rip),%rdi
mov    $0x41,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xe3e(%rip),%rdi
mov    $0x101,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xe30(%rip),%rdi
mov    $0x241,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xe28(%rip),%rdi
mov    $0x41,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xe1d(%rip),%rdi
mov    $0x241,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xe1a(%rip),%rdi
mov    $0xffffffff,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
lea    0xe10(%rip),%rdi
mov    $0xffffffff,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <print$Int@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf1f(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xee4(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xebf(%rip),%rdi
mov    $0xa,%esi
mov    $0xa,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xea6(%rip),%rdi
mov    $0x8,%esi
mov    $0x8,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xe92(%rip),%rdi
mov    $0x10,%esi
mov    $0x10,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xe99(%rip),%rdi
mov    $0x64,%esi
mov    $0x64,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xe80(%rip),%rdi
mov    $0x40,%esi
mov    $0x40,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xe51(%rip),%rdi
mov    $0x41,%esi
mov    $0x41,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xe37(%rip),%rdi
mov    $0x101,%esi
mov    $0x101,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xe26(%rip),%rdi
mov    $0x241,%esi
mov    $0x241,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xe1b(%rip),%rdi
mov    $0x41,%esi
mov    $0x41,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xe0d(%rip),%rdi
mov    $0x241,%esi
mov    $0x241,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xe07(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
lea    0xdfa(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1030 <print$Int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [3 x i8] c"10\00"
@.str.3 = [4 x i8] c"010\00"
@.str.4 = [5 x i8] c"0x10\00"
@.str.5 = [4 x i8] c"100\00"
@.str.6 = [5 x i8] c"0100\00"
@.str.7 = [5 x i8] c"0101\00"
@.str.8 = [7 x i8] c"0x0101\00"
@.str.9 = [13 x i8] c"1 | 64 | 512\00"
@.str.10 = [10 x i8] c"01 | 0100\00"
@.str.11 = [18 x i8] c"01 | 0100 | 01000\00"
@.str.12 = [11 x i8] c"0xFFFFFFFF\00"
@.str.13 = [25 x i8] c"0x80000000 | 0x7FFFFFFFU\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
%3 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 1)
%4 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 10, i32 10)
%5 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 8, i32 8)
%6 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 16, i32 16)
%7 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 100, i32 100)
%8 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 64, i32 64)
%9 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 65, i32 65)
%10 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 257, i32 257)
%11 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 577, i32 577)
%12 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32 65, i32 65)
%13 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i32 577, i32 577)
%14 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i32 -1, i32 -1)
%15 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i32 -1, i32 -1)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [3 x i8] c"10\00"
@.str.3 = [4 x i8] c"010\00"
@.str.4 = [5 x i8] c"0x10\00"
@.str.5 = [4 x i8] c"100\00"
@.str.6 = [5 x i8] c"0100\00"
@.str.7 = [5 x i8] c"0101\00"
@.str.8 = [7 x i8] c"0x0101\00"
@.str.9 = [13 x i8] c"1 | 64 | 512\00"
@.str.10 = [10 x i8] c"01 | 0100\00"
@.str.11 = [18 x i8] c"01 | 0100 | 01000\00"
@.str.12 = [11 x i8] c"0xFFFFFFFF\00"
@.str.13 = [25 x i8] c"0x80000000 | 0x7FFFFFFFU\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
%2 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 1)
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 10, i32 10)
%4 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 8, i32 8)
%5 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 16, i32 16)
%6 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 100, i32 100)
%7 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 64, i32 64)
%8 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 65, i32 65)
%9 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 257, i32 257)
%10 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 577, i32 577)
%11 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32 65, i32 65)
%12 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i32 577, i32 577)
%13 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i32 -1, i32 -1)
%14 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @"print$Int" to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i32 -1, i32 -1)
ret i32 0
}