#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*/ INT_MAX;
int /*<<< orphan*/ INT_MIN;
int /*<<< orphan*/ LLONG_MAX;
int /*<<< orphan*/ LLONG_MIN;
int /*<<< orphan*/ UINT_MAX;
int /*<<< orphan*/ ULLONG_MAX;
int /*<<< orphan*/ init_alloc();
int /*<<< orphan*/ vga_printf(char *, ...);
int /*<<< orphan*/ vga_set_color(int, int);
void main() {
  init_alloc();
  vga_printf("&main = %08p\n", &main);
  int i;
  for (i = 10; i >= 0; i--)
    vga_printf("'%#0*x' %.*s '%*d' %.*s '%.*s' %.*s '%d'\n", i, 0xdead, 10 - i,
               "", i, -123, 10 - i, "", i, "moo", 10 - i, "", i << i);
  vga_printf("%d %d %lld %lld %u %llu\n", INT_MIN, INT_MAX, LLONG_MIN,
             LLONG_MAX, UINT_MAX, ULLONG_MAX);
  vga_set_color(0xC, 0x0);
  vga_printf("HALT");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    $0x0,%al
call   1040 <init_alloc@plt>
lea    0xeb5(%rip),%rdi
mov    0x2e8e(%rip),%rsi
mov    $0x0,%al
call   1050 <vga_printf@plt>
movl   $0xa,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     11fa <main+0xca>
mov    -0x1c(%rbp),%esi
mov    $0xa,%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%r9d
mov    $0xa,%r15d
sub    -0x1c(%rbp),%r15d
mov    -0x1c(%rbp),%r14d
mov    $0xa,%r11d
sub    -0x1c(%rbp),%r11d
mov    -0x1c(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    %cl,%eax
mov    -0x20(%rbp),%ecx
lea    0xe68(%rip),%rdi
mov    $0xdead,%edx
lea    0xe85(%rip),%r10
lea    0xe7f(%rip),%rbx
mov    %r10,%r8
movl   $0xffffff85,(%rsp)
mov    %r15d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %r14d,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11d,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %eax,0x38(%rsp)
mov    $0x0,%al
call   1050 <vga_printf@plt>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1160 <main+0x30>
mov    0x2dc7(%rip),%rax
mov    (%rax),%esi
mov    0x2dce(%rip),%rax
mov    (%rax),%edx
mov    0x2d9d(%rip),%rax
mov    (%rax),%ecx
mov    0x2da4(%rip),%rax
mov    (%rax),%r8d
mov    0x2daa(%rip),%rax
mov    (%rax),%r9d
mov    0x2db8(%rip),%rax
mov    (%rax),%eax
lea    0xe03(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1050 <vga_printf@plt>
mov    $0xc,%edi
xor    %esi,%esi
call   1030 <vga_set_color@plt>
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1050 <vga_printf@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <init_alloc@plt>
lea    0xebd(%rip),%rdi
mov    0x2e96(%rip),%rsi
xor    %eax,%eax
call   1050 <vga_printf@plt>
lea    0xedf(%rip),%rbx
lea    0xed9(%rip),%r15
lea    0xea8(%rip),%r14
mov    %r14,%rdi
mov    $0xa,%esi
mov    $0xdead,%edx
xor    %ecx,%ecx
mov    %rbx,%r8
mov    $0xa,%r9d
xor    %eax,%eax
push   $0x2800
push   %rbx
push   $0x0
push   %r15
push   $0xa
push   %rbx
push   $0x0
push   $0xffffffffffffff85
call   1050 <vga_printf@plt>
add    $0x40,%rsp
mov    %r14,%rdi
mov    $0x9,%esi
mov    $0xdead,%edx
mov    $0x1,%ecx
mov    %rbx,%r8
mov    $0x9,%r9d
xor    %eax,%eax
push   $0x1200
push   %rbx
push   $0x1
push   %r15
push   $0x9
push   %rbx
push   $0x1
push   $0xffffffffffffff85
call   1050 <vga_printf@plt>
add    $0x40,%rsp
mov    %r14,%rdi
mov    $0x8,%esi
mov    $0xdead,%edx
mov    $0x2,%ecx
mov    %rbx,%r8
mov    $0x8,%r9d
xor    %eax,%eax
push   $0x800
push   %rbx
push   $0x2
push   %r15
push   $0x8
push   %rbx
push   $0x2
push   $0xffffffffffffff85
call   1050 <vga_printf@plt>
add    $0x40,%rsp
mov    %r14,%rdi
mov    $0x7,%esi
mov    $0xdead,%edx
mov    $0x3,%ecx
mov    %rbx,%r8
mov    $0x7,%r9d
xor    %eax,%eax
push   $0x380
push   %rbx
push   $0x3
push   %r15
push   $0x7
push   %rbx
push   $0x3
push   $0xffffffffffffff85
call   1050 <vga_printf@plt>
add    $0x40,%rsp
mov    %r14,%rdi
mov    $0x6,%esi
mov    $0xdead,%edx
mov    $0x4,%ecx
mov    %rbx,%r8
mov    $0x6,%r9d
xor    %eax,%eax
push   $0x180
push   %rbx
push   $0x4
push   %r15
push   $0x6
push   %rbx
push   $0x4
push   $0xffffffffffffff85
call   1050 <vga_printf@plt>
add    $0x40,%rsp
mov    %r14,%rdi
mov    $0x5,%esi
mov    $0xdead,%edx
mov    $0x5,%ecx
mov    %rbx,%r8
mov    $0x5,%r9d
xor    %eax,%eax
push   $0xa0
push   %rbx
push   $0x5
push   %r15
push   $0x5
push   %rbx
push   $0x5
push   $0xffffffffffffff85
call   1050 <vga_printf@plt>
add    $0x40,%rsp
mov    %r14,%rdi
mov    $0x4,%esi
mov    $0xdead,%edx
mov    $0x6,%ecx
mov    %rbx,%r8
mov    $0x4,%r9d
xor    %eax,%eax
push   $0x40
push   %rbx
push   $0x6
push   %r15
push   $0x4
push   %rbx
push   $0x6
push   $0xffffffffffffff85
call   1050 <vga_printf@plt>
add    $0x40,%rsp
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0xdead,%edx
mov    $0x7,%ecx
mov    %rbx,%r8
mov    $0x3,%r9d
xor    %eax,%eax
push   $0x18
push   %rbx
push   $0x7
push   %r15
push   $0x3
push   %rbx
push   $0x7
push   $0xffffffffffffff85
call   1050 <vga_printf@plt>
add    $0x40,%rsp
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0xdead,%edx
mov    $0x8,%ecx
mov    %rbx,%r8
mov    $0x2,%r9d
xor    %eax,%eax
push   $0x8
push   %rbx
push   $0x8
push   %r15
push   $0x2
push   %rbx
push   $0x8
push   $0xffffffffffffff85
call   1050 <vga_printf@plt>
add    $0x40,%rsp
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0xdead,%edx
mov    $0x9,%ecx
mov    %rbx,%r8
mov    $0x1,%r9d
xor    %eax,%eax
push   $0x2
push   %rbx
push   $0x9
push   %r15
push   $0x1
push   %rbx
push   $0x9
push   $0xffffffffffffff85
call   1050 <vga_printf@plt>
add    $0x40,%rsp
mov    %r14,%rdi
xor    %esi,%esi
mov    $0xdead,%edx
mov    $0xa,%ecx
mov    %rbx,%r8
xor    %r9d,%r9d
xor    %eax,%eax
push   $0x0
push   %rbx
push   $0xa
push   %r15
push   $0x0
push   %rbx
push   $0xa
push   $0xffffffffffffff85
call   1050 <vga_printf@plt>
add    $0x40,%rsp
mov    0x2c16(%rip),%rax
mov    (%rax),%esi
mov    0x2c1d(%rip),%rax
mov    (%rax),%edx
mov    0x2bec(%rip),%rax
mov    (%rax),%ecx
mov    0x2bf3(%rip),%rax
mov    (%rax),%r8d
mov    0x2bf9(%rip),%rax
mov    (%rax),%r9d
mov    0x2c07(%rip),%rax
mov    (%rax),%ebx
sub    $0x8,%rsp
lea    0xc4e(%rip),%rdi
xor    %eax,%eax
push   %rbx
call   1050 <vga_printf@plt>
add    $0x10,%rsp
mov    $0xc,%edi
xor    %esi,%esi
call   1030 <vga_set_color@plt>
lea    0xc48(%rip),%rdi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <vga_printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"&main = %08p\0A\00"
@.str.1 = [42 x i8] c"'%*x' %.*s '%*d' %.*s '%.*s' %.*s '%d'\0A\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [4 x i8] c"moo\00"
@.str.4 = [25 x i8] c"%d %d %lld %lld %u %llu\0A\00"
@INT_MIN = global i32 0
@INT_MAX = global i32 0
@LLONG_MIN = global i32 0
@LLONG_MAX = global i32 0
@UINT_MAX = global i32 0
@ULLONG_MAX = global i32 0
@.str.5 = [5 x i8] c"HALT\00"
define void @main() {
%1 = alloca i32
%2 = call i32 (...) @init_alloc()
%3 = call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), void (...)* bitcast (void ()* @main to void (...)*))
store i32 10, i32* %1
br label %4
4: ; preds = %21, %0
%5 = load i32, i32* %1
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %24
7: ; preds = %4
%8 = load i32, i32* %1
%9 = load i32, i32* %1
%10 = sub nsw i32 10, %9
%11 = load i32, i32* %1
%12 = load i32, i32* %1
%13 = sub nsw i32 10, %12
%14 = load i32, i32* %1
%15 = load i32, i32* %1
%16 = sub nsw i32 10, %15
%17 = load i32, i32* %1
%18 = load i32, i32* %1
%19 = shl i32 %17, %18
%20 = call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 57005, i32 %10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 -123, i32 %13, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %16, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %7
%22 = load i32, i32* %1
%23 = add nsw i32 %22, -1
store i32 %23, i32* %1
br label %4
24: ; preds = %4
%25 = load i32, i32* @INT_MIN
%26 = load i32, i32* @INT_MAX
%27 = load i32, i32* @LLONG_MIN
%28 = load i32, i32* @LLONG_MAX
%29 = load i32, i32* @UINT_MAX
%30 = load i32, i32* @ULLONG_MAX
%31 = call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %25, i32 %26, i32 %27, i32 %28, i32 %29, i32 %30)
%32 = call i32 @vga_set_color(i32 12, i32 0)
%33 = call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"&main = %08p\0A\00"
@.str.1 = [42 x i8] c"'%*x' %.*s '%*d' %.*s '%.*s' %.*s '%d'\0A\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [4 x i8] c"moo\00"
@.str.4 = [25 x i8] c"%d %d %lld %lld %u %llu\0A\00"
@INT_MIN = global i32 0
@INT_MAX = global i32 0
@LLONG_MIN = global i32 0
@LLONG_MAX = global i32 0
@UINT_MAX = global i32 0
@ULLONG_MAX = global i32 0
@.str.5 = [5 x i8] c"HALT\00"
define void @main() {
%1 = tail call i32 (...) @init_alloc()
%2 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), void (...)* bitcast (void ()* @main to void (...)*))
%3 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 57005, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 10, i32 -123, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 10240)
%4 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 9, i32 57005, i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 9, i32 -123, i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 4608)
%5 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 57005, i32 2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 8, i32 -123, i32 2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 2048)
%6 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 7, i32 57005, i32 3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 7, i32 -123, i32 3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 896)
%7 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 6, i32 57005, i32 4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 6, i32 -123, i32 4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 384)
%8 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 57005, i32 5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 5, i32 -123, i32 5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 160)
%9 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 57005, i32 6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 -123, i32 6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 64)
%10 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 57005, i32 7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 3, i32 -123, i32 7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 24)
%11 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 57005, i32 8, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 2, i32 -123, i32 8, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 8, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 8)
%12 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 57005, i32 9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 -123, i32 9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 2)
%13 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 57005, i32 10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 -123, i32 10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 0)
%14 = load i32, i32* @INT_MIN
%15 = load i32, i32* @INT_MAX
%16 = load i32, i32* @LLONG_MIN
%17 = load i32, i32* @LLONG_MAX
%18 = load i32, i32* @UINT_MAX
%19 = load i32, i32* @ULLONG_MAX
%20 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %14, i32 %15, i32 %16, i32 %17, i32 %18, i32 %19)
%21 = tail call i32 @vga_set_color(i32 12, i32 0)
%22 = tail call i32 (i8*, ...) @vga_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
ret void
}