#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 = 19;
  char name[] = "Badr Basager";
  printf(" My name is %s \n", "Badr Basager");
  printf(" my age is %d\n", 19);
  printf(" My name is %s\n", name);
  printf(" My age is %d\n", age);
  strcpy(name, "Henry\n");
  age = 34;
  printf("My friend's name is %s and his age is %d\n", name, age);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x13,-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
lea    0xe9f(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeaf(%rip),%rdi
mov    $0x13,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x15(%rbp),%rsi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x15(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0x22,-0x8(%rbp)
lea    -0x15(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x72656761736142,%rax
mov    %rax,0x5(%rsp)
movabs $0x7361422072646142,%rax
42 61 73
mov    %rax,(%rsp)
lea    0xec8(%rip),%rsi
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xeac(%rip),%rdi
mov    %rbx,%rsi
mov    $0x22,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.name = [13 x i8] c"Badr Basager\00"
@.str = [17 x i8] c" My name is %s \0A\00"
@.str.1 = [13 x i8] c"Badr Basager\00"
@.str.2 = [15 x i8] c" my age is %d\0A\00"
@.str.3 = [16 x i8] c" My name is %s\0A\00"
@.str.4 = [15 x i8] c" My age is %d\0A\00"
@.str.5 = [7 x i8] c"Henry\0A\00"
@.str.6 = [42 x i8] c"My friend's name is %s and his age is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [13 x i8]
store i32 0, i32* %1
store i32 19, i32* %2
%4 = bitcast [13 x i8]* %3 to i8*
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 19)
%7 = getelementptr inbounds [13 x i8], [13 x i8]* %3, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [13 x i8], [13 x i8]* %3, i64 0, i64 0
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
store i32 34, i32* %2
%13 = getelementptr inbounds [13 x i8], [13 x i8]* %3, i64 0, i64 0
%14 = load i32, i32* %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i8* %13, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c" My name is %s \0A\00"
@.str.1 = [13 x i8] c"Badr Basager\00"
@.str.2 = [15 x i8] c" my age is %d\0A\00"
@.str.3 = [16 x i8] c" My name is %s\0A\00"
@.str.4 = [15 x i8] c" My age is %d\0A\00"
@.str.5 = [7 x i8] c"Henry\0A\00"
@.str.6 = [42 x i8] c"My friend's name is %s and his age is %d\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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 19)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 19)
%7 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i8* %2, i32 34)
ret i32 0
}