#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 = 20;
  char name[30] = "Ahmed Al Okran";
  printf("my name is %s\n", "Ahmed Al Okran");
  printf("my age is %d years old\n", 20);
  printf("my name is %s\n", name);
  printf("my age is %d years old", age);
  strcpy(name, "BOB\n");
  age = 34;
  printf("my name is %s and i am %d years old\n", name, age);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xebd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    0xeb5(%rip),%ax
mov    %ax,-0x14(%rbp)
lea    0xeac(%rip),%rdi
lea    0xeb4(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb5(%rip),%rdi
mov    $0x14,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x30(%rbp),%rdi
lea    0xeaa(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0x22,-0x8(%rbp)
lea    -0x30(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movups 0xee0(%rip),%xmm0
movups %xmm0,0xe(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xed9(%rip),%r14
lea    0xee1(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xece(%rip),%rdi
mov    %rbx,%rsi
mov    $0x22,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.name = [30 x i8] c"Ahmed Al Okran\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [15 x i8] c"my name is %s\0A\00"
@.str.1 = [15 x i8] c"Ahmed Al Okran\00"
@.str.2 = [24 x i8] c"my age is %d years old\0A\00"
@.str.3 = [23 x i8] c"my age is %d years old\00"
@.str.4 = [5 x i8] c"BOB\0A\00"
@.str.5 = [37 x i8] c"my name is %s and i am %d years old\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [30 x i8]
store i32 0, i32* %1
store i32 20, i32* %2
%4 = bitcast [30 x i8]* %3 to i8*
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 20)
%7 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
store i32 34, i32* %2
%13 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%14 = load i32, i32* %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i8* %13, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@__const.main.name = [30 x i8] c"Ahmed Al Okran\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [15 x i8] c"my name is %s\0A\00"
@.str.1 = [15 x i8] c"Ahmed Al Okran\00"
@.str.2 = [24 x i8] c"my age is %d years old\0A\00"
@.str.3 = [23 x i8] c"my age is %d years old\00"
@.str.4 = [5 x i8] c"BOB\0A\00"
@.str.5 = [37 x i8] c"my name is %s and i am %d years old\0A\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 20)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 20)
%7 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i8* %2, i32 34)
ret i32 0
}