#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 *, ...);
int /*<<< orphan*/ sprintf(char *, char *, int);
int main() {
  int age = 10;
  int height = 72;
  printf("I am %d years old.\n", age);
  printf("I am %d inches tall.\n", height);
  printf(" \\\" \\ \n \111 \x10 \u2093 %X test test\n", 10);
  printf("\u2050\n");
  char format[1000] = "";
  int i = 0;
  for (i = 2050; i < 2080; i++) {
    sprintf(format, "\\u%d %%d \n", i);
    printf(format, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x48,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0xa,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x400(%rbp),%rdi
xor    %esi,%esi
mov    $0x3e8,%edx
call   1040 <memset@plt>
movl   $0x0,-0x404(%rbp)
movl   $0x802,-0x404(%rbp)
cmpl   $0x820,-0x404(%rbp)
jge    120b <main+0xdb>
lea    -0x400(%rbp),%rdi
mov    -0x404(%rbp),%edx
lea    0xe6f(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x400(%rbp),%rdi
mov    -0x404(%rbp),%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x404(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x404(%rbp)
jmp    11ba <main+0x8a>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x3f0,%rsp
lea    0xeae(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeaf(%rip),%rdi
mov    $0x48,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb2(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    $0x3e8,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    $0x802,%ebp
lea    0xe9a(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x820,%ebp
jne    11b0 <main+0x70>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
@.str.2 = [30 x i8] c" \\\22 \\ \0A I \10 \E2\82\93 %X test test\0A\00"
@.str.3 = [5 x i8] c"\E2\81\90\0A\00"
@.str.4 = [11 x i8] c"\\u%d %%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [1000 x i8]
%5 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 72, i32* %3
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 10)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%12 = bitcast [1000 x i8]* %4 to i8*
store i32 0, i32* %5
store i32 2050, i32* %5
br label %13
13: ; preds = %23, %0
%14 = load i32, i32* %5
%15 = icmp slt i32 %14, 2080
br i1 %15, label %16, label %26
16: ; preds = %13
%17 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%18 = load i32, i32* %5
%19 = call i32 @sprintf(i8* %17, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%21 = load i32, i32* %5
%22 = call i32 (i8*, ...) @printf(i8* %20, i32 %21)
br label %23
23: ; preds = %16
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
br label %13
26: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
@.str.2 = [30 x i8] c" \\\22 \\ \0A I \10 \E2\82\93 %X test test\0A\00"
@.str.4 = [11 x i8] c"\\u%d %%d \0A\00"
@str = [4 x i8] c"\E2\81\90\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 72)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
br label %7
7: ; preds = %0, %7
%8 = phi i32 [ 2050, %0 ], [ %11, %7 ]
%9 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* %6, i32 %8)
%11 = add nuw nsw i32 %8, 1
%12 = icmp eq i32 %11, 2080
br i1 %12, label %13, label %7
13: ; preds = %7
ret i32 0
}