#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*/ printDecimalAsBinary(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int i;
  printf("Decimal\tBinary\tOctal\tHex\n");
  for (i = 0; i < 20; i++) {
    printf("%d\t", i);
    printDecimalAsBinary(i);
    printf("\t%o\t%X\n", i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    1189 <main+0x69>
mov    -0x8(%rbp),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <printDecimalAsBinary@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <printDecimalAsBinary@plt>
lea    0xea3(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x2,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x4,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x5,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x6,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x6,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x7,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x7,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x8,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x8,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0x9,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0xa,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xb,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
mov    $0xb,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xc,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
mov    $0xc,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xd,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0xd,%esi
mov    $0xd,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xe,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0xe,%esi
mov    $0xe,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xf,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
mov    $0xf,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x10,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
mov    $0x10,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x11,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x11,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x11,%esi
mov    $0x11,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x12,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x12,%esi
mov    $0x12,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x13,%edi
call   1050 <printDecimalAsBinary@plt>
mov    %rbx,%rdi
mov    $0x13,%esi
mov    $0x13,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Decimal\09Binary\09Octal\09Hex\0A\00"
@.str.1 = [4 x i8] c"%d\09\00"
@.str.2 = [8 x i8] c"\09%o\09%X\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %4
4: ; preds = %15, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 20
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = call i32 @printDecimalAsBinary(i32 %10)
%12 = load i32, i32* %2
%13 = load i32, i32* %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %12, i32 %13)
br label %15
15: ; preds = %7
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %4
18: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\09\00"
@.str.2 = [8 x i8] c"\09%o\09%X\0A\00"
@str = [25 x i8] c"Decimal\09Binary\09Octal\09Hex\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
%3 = tail call i32 @printDecimalAsBinary(i32 0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
%6 = tail call i32 @printDecimalAsBinary(i32 1)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 1)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 2)
%9 = tail call i32 @printDecimalAsBinary(i32 2)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 2, i32 2)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%12 = tail call i32 @printDecimalAsBinary(i32 3)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 3, i32 3)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 4)
%15 = tail call i32 @printDecimalAsBinary(i32 4)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 4)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
%18 = tail call i32 @printDecimalAsBinary(i32 5)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 5, i32 5)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 6)
%21 = tail call i32 @printDecimalAsBinary(i32 6)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 6, i32 6)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 7)
%24 = tail call i32 @printDecimalAsBinary(i32 7)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 7, i32 7)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 8)
%27 = tail call i32 @printDecimalAsBinary(i32 8)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 8, i32 8)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 9)
%30 = tail call i32 @printDecimalAsBinary(i32 9)
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 9, i32 9)
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 10)
%33 = tail call i32 @printDecimalAsBinary(i32 10)
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 10, i32 10)
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 11)
%36 = tail call i32 @printDecimalAsBinary(i32 11)
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 11, i32 11)
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 12)
%39 = tail call i32 @printDecimalAsBinary(i32 12)
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 12, i32 12)
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 13)
%42 = tail call i32 @printDecimalAsBinary(i32 13)
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 13, i32 13)
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 14)
%45 = tail call i32 @printDecimalAsBinary(i32 14)
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 14, i32 14)
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 15)
%48 = tail call i32 @printDecimalAsBinary(i32 15)
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 15, i32 15)
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 16)
%51 = tail call i32 @printDecimalAsBinary(i32 16)
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 16, i32 16)
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 17)
%54 = tail call i32 @printDecimalAsBinary(i32 17)
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 17, i32 17)
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 18)
%57 = tail call i32 @printDecimalAsBinary(i32 18)
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 18, i32 18)
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 19)
%60 = tail call i32 @printDecimalAsBinary(i32 19)
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 19, i32 19)
ret i32 0
}