#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 *, char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  int age = 23;
  char name[] = "Hassan";
  printf("%s is %d \n", "Hassan", 23);
  printf("%s is %d \n", name, age);
  age = 20;
  strcpy(name, "Khaled");
  printf("%s is %d\n", name, age);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x17,-0x8(%rbp)
mov    0xec4(%rip),%eax
mov    %eax,-0xf(%rbp)
mov    0xebe(%rip),%ax
mov    %ax,-0xb(%rbp)
mov    0xeb6(%rip),%al
mov    %al,-0x9(%rbp)
lea    0xead(%rip),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x17,%edx
call   1040 <printf@plt>
lea    -0xf(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
movl   $0x14,-0x8(%rbp)
lea    -0xf(%rbp),%rdi
lea    0xe82(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0xf(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xe76(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0x6e6173,0x3(%rsp)
movl   $0x73736148,(%rsp)
lea    0xed1(%rip),%rsi
lea    0xebf(%rip),%r14
mov    %r14,%rdi
mov    $0x17,%edx
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x17,%edx
call   1040 <printf@plt>
lea    0xeaa(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xea2(%rip),%rdi
mov    %rbx,%rsi
mov    $0x14,%edx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.name = [7 x i8] c"Hassan\00"
@.str = [11 x i8] c"%s is %d \0A\00"
@.str.1 = [7 x i8] c"Hassan\00"
@.str.2 = [7 x i8] c"Khaled\00"
@.str.3 = [10 x i8] c"%s is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [7 x i8]
store i32 0, i32* %1
store i32 23, i32* %2
%4 = bitcast [7 x i8]* %3 to i8*
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 23)
%6 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
store i32 20, i32* %2
%9 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%10 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%11 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%12 = load i32, i32* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s is %d \0A\00"
@.str.1 = [7 x i8] c"Hassan\00"
@.str.2 = [7 x i8] c"Khaled\00"
@.str.3 = [10 x i8] c"%s is %d\0A\00"
define i32 @main() {
%1 = alloca [7 x i8]
%2 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 23)
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2, i32 23)
%5 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* %2, i32 20)
ret i32 0
}