#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*/ printf(char *, ...);
void print_ascii_table() {
  int i;
  printf("Printing standard ASCII table\n");
  printf("Decimcal:\t\t\tHex:\t\t\tASCII:\n");
  for (i = 0x20; i <= 0x7E; i++)
    printf("%9d\t\t\t%2x\t\t\t%5c\n", i, i, i);
}


x86 assembly (clang, -O0):
<print_ascii_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x20,-0x4(%rbp)
cmpl   $0x7e,-0x4(%rbp)
jg     116a <print_ascii_table+0x5a>
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%ecx
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113b <print_ascii_table+0x2b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_ascii_table>:
push   %r14
push   %rbx
push   %rax
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
lea    0xef8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x20,%ebx
lea    0xeb8(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0x7f,%ebx
jne    1150 <print_ascii_table+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Printing standard ASCII table\0A\00"
@.str.1 = [27 x i8] c"Decimcal:\09\09\09Hex:\09\09\09ASCII:\0A\00"
@.str.2 = [17 x i8] c"%9d\09\09\09%2x\09\09\09%5c\0A\00"
define void @print_ascii_table() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
store i32 32, i32* %1
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %1
%6 = icmp sle i32 %5, 126
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %1
%9 = load i32, i32* %1
%10 = load i32, i32* %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
br label %12
12: ; preds = %7
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str.2 = [17 x i8] c"%9d\09\09\09%2x\09\09\09%5c\0A\00"
@str = [30 x i8] c"Printing standard ASCII table\00"
@str.3 = [26 x i8] c"Decimcal:\09\09\09Hex:\09\09\09ASCII:\00"
define void @print_ascii_table() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.3, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 32, %0 ], [ %6, %3 ]
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %4, i32 %4, i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 127
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}