#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*/ print_byte_hex(int);
int /*<<< orphan*/ print_float(double, int);
int /*<<< orphan*/ print_s32_dec(int);
int /*<<< orphan*/ print_s64_dec(int);
int /*<<< orphan*/ print_str(char *);
int /*<<< orphan*/ print_u32_dec(int);
int /*<<< orphan*/ print_u32_hex(int);
int /*<<< orphan*/ print_u64_dec(int);
int /*<<< orphan*/ print_u64_hex(int);
int main(void) {
  print_str("If you can read this:\n");
  print_u32_dec(0xFFFFFFFF);
  print_str("\n");
  print_s32_dec(0x80000000);
  print_str("\n");
  print_byte_hex(0xFA);
  print_str("\n");
  print_s32_dec(0x80000000);
  print_str("\n");
  print_u32_hex(0x12345678);
  print_str("\n");
  print_u64_hex(0x123456789ABCDEF0);
  print_str("\n");
  print_u64_dec(0xFFFFFFFFFFFFFFFF);
  print_str("\n");
  print_s64_dec(0x8000000000000000);
  print_str("\n");
  print_float(1.2345, 5);
  print_str("\n");
  print_str("Test successful.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe62(%rip),%rdi
call   1060 <print_str@plt>
mov    $0xffffffff,%edi
call   1070 <print_u32_dec@plt>
lea    0xe73(%rip),%rdi
call   1060 <print_str@plt>
mov    $0x80000000,%edi
call   1040 <print_s32_dec@plt>
lea    0xe5d(%rip),%rdi
call   1060 <print_str@plt>
mov    $0xfa,%edi
call   1080 <print_byte_hex@plt>
lea    0xe47(%rip),%rdi
call   1060 <print_str@plt>
mov    $0x80000000,%edi
call   1040 <print_s32_dec@plt>
lea    0xe31(%rip),%rdi
call   1060 <print_str@plt>
mov    $0x12345678,%edi
call   10a0 <print_u32_hex@plt>
lea    0xe1b(%rip),%rdi
call   1060 <print_str@plt>
mov    $0x9abcdef0,%edi
call   1050 <print_u64_hex@plt>
lea    0xe05(%rip),%rdi
call   1060 <print_str@plt>
mov    $0xffffffff,%edi
call   1090 <print_u64_dec@plt>
lea    0xdef(%rip),%rdi
call   1060 <print_str@plt>
xor    %edi,%edi
call   1030 <print_s64_dec@plt>
lea    0xddc(%rip),%rdi
call   1060 <print_str@plt>
movsd  0xda0(%rip),%xmm0
mov    $0x5,%edi
call   10b0 <print_float@plt>
lea    0xdbe(%rip),%rdi
call   1060 <print_str@plt>
lea    0xda2(%rip),%rdi
call   1060 <print_str@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xe70(%rip),%rdi
call   1060 <print_str@plt>
mov    $0xffffffff,%edi
call   1070 <print_u32_dec@plt>
lea    0xe81(%rip),%rbx
mov    %rbx,%rdi
call   1060 <print_str@plt>
mov    $0x80000000,%edi
call   1040 <print_s32_dec@plt>
mov    %rbx,%rdi
call   1060 <print_str@plt>
mov    $0xfa,%edi
call   1080 <print_byte_hex@plt>
mov    %rbx,%rdi
call   1060 <print_str@plt>
mov    $0x80000000,%edi
call   1040 <print_s32_dec@plt>
mov    %rbx,%rdi
call   1060 <print_str@plt>
mov    $0x12345678,%edi
call   10a0 <print_u32_hex@plt>
mov    %rbx,%rdi
call   1060 <print_str@plt>
mov    $0x9abcdef0,%edi
call   1050 <print_u64_hex@plt>
mov    %rbx,%rdi
call   1060 <print_str@plt>
mov    $0xffffffff,%edi
call   1090 <print_u64_dec@plt>
mov    %rbx,%rdi
call   1060 <print_str@plt>
xor    %edi,%edi
call   1030 <print_s64_dec@plt>
mov    %rbx,%rdi
call   1060 <print_str@plt>
movsd  0xdc7(%rip),%xmm0
mov    $0x5,%edi
call   10b0 <print_float@plt>
mov    %rbx,%rdi
call   1060 <print_str@plt>
lea    0xdcd(%rip),%rdi
call   1060 <print_str@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"If you can read this:\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [18 x i8] c"Test successful.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @print_str(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @print_u32_dec(i32 -1)
%4 = call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @print_s32_dec(i32 -2147483648)
%6 = call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @print_byte_hex(i32 250)
%8 = call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @print_s32_dec(i32 -2147483648)
%10 = call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @print_u32_hex(i32 305419896)
%12 = call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @print_u64_hex(i32 -1698898192)
%14 = call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 @print_u64_dec(i32 -1)
%16 = call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @print_s64_dec(i32 0)
%18 = call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @print_float(double 1.234500e+00, i32 5)
%20 = call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 @print_str(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"If you can read this:\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [18 x i8] c"Test successful.\0A\00"
define i32 @main() {
%1 = tail call i32 @print_str(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_u32_dec(i32 -1)
%3 = tail call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @print_s32_dec(i32 -2147483648)
%5 = tail call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @print_byte_hex(i32 250)
%7 = tail call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @print_s32_dec(i32 -2147483648)
%9 = tail call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @print_u32_hex(i32 305419896)
%11 = tail call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @print_u64_hex(i32 -1698898192)
%13 = tail call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = tail call i32 @print_u64_dec(i32 -1)
%15 = tail call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = tail call i32 @print_s64_dec(i32 0)
%17 = tail call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%18 = tail call i32 @print_float(double 1.234500e+00, i32 5)
%19 = tail call i32 @print_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%20 = tail call i32 @print_str(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}