#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*/ strcpy(char *, char *);
int main() {
  int age = 21;
  char name[] = "Naif Alharbi";
  printf("I am %d years old\n", 21);
  printf("I am %s\n", "Naif Alharbi");
  printf("I am %d years old\n", age);
  printf("I am %s\n", name);
  age = 28;
  strcpy(name, "Omar\n");
  printf(" I am %s\n", name);
  printf("I am %d years old\n", age);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x15,-0x8(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x15(%rbp)
mov    0xec1(%rip),%eax
mov    %eax,-0xd(%rbp)
mov    0xebc(%rip),%al
mov    %al,-0x9(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x15,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeba(%rip),%rdi
lea    0xe8c(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x15(%rbp),%rsi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1c,-0x8(%rbp)
lea    -0x15(%rbp),%rdi
lea    0xe70(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x15(%rbp),%rsi
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
movabs $0x69627261686c41,%rax
mov    %rax,0xd(%rsp)
movabs $0x686c41206669614e,%rax
41 6c 68
mov    %rax,0x8(%rsp)
lea    0xec3(%rip),%r14
lea    0xea9(%rip),%r15
mov    %r15,%rdi
mov    $0x15,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeba(%rip),%r12
mov    %r12,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    $0x15,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rbx
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe7e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xe75(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    $0x1c,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.name = [13 x i8] c"Naif Alharbi\00"
@.str = [19 x i8] c"I am %d years old\0A\00"
@.str.1 = [9 x i8] c"I am %s\0A\00"
@.str.2 = [13 x i8] c"Naif Alharbi\00"
@.str.3 = [6 x i8] c"Omar\0A\00"
@.str.4 = [10 x i8] c" I am %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [13 x i8]
store i32 0, i32* %1
store i32 21, i32* %2
%4 = bitcast [13 x i8]* %3 to i8*
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 21)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [13 x i8], [13 x i8]* %3, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %9)
store i32 28, i32* %2
%11 = getelementptr inbounds [13 x i8], [13 x i8]* %3, i64 0, i64 0
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%13 = getelementptr inbounds [13 x i8], [13 x i8]* %3, i64 0, i64 0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* %13)
%15 = load i32, i32* %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"I am %d years old\0A\00"
@.str.1 = [9 x i8] c"I am %s\0A\00"
@.str.2 = [13 x i8] c"Naif Alharbi\00"
@.str.3 = [6 x i8] c"Omar\0A\00"
@.str.4 = [10 x i8] c" I am %s\0A\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 21)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 21)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%7 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* %2)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 28)
ret i32 0
}