#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 = 18;
  char name[20] = "Natasha Moreira";
  printf("my name is %s\n", "Natasha Moreira");
  printf("i am %d years old\n", 18);
  printf("my name is %s\n", name);
  printf("i am %d years old\n", age);
  strcpy(name, "bob\n");
  age = 55;
  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    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x12,-0x8(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xebe(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    0xeb8(%rip),%rdi
lea    0xec0(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x12,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
lea    0xe88(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0x37,-0x8(%rbp)
lea    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xe73(%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   %rbx
sub    $0x20,%rsp
movaps 0xed0(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0xed1(%rip),%r14
lea    0xed9(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeef(%rip),%r15
mov    %r15,%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
mov    $0x37,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.name = [20 x i8] c"Natasha Moreira\00\00\00\00\00"
@.str = [15 x i8] c"my name is %s\0A\00"
@.str.1 = [16 x i8] c"Natasha Moreira\00"
@.str.2 = [19 x i8] c"i am %d years old\0A\00"
@.str.3 = [5 x i8] c"bob\0A\00"
@.str.4 = [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 [20 x i8]
store i32 0, i32* %1
store i32 18, i32* %2
%4 = bitcast [20 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 ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 18)
%7 = getelementptr inbounds [20 x i8], [20 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 ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
store i32 55, i32* %2
%13 = getelementptr inbounds [20 x i8], [20 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.4, i64 0, i64 0), i8* %13, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@__const.main.name = [20 x i8] c"Natasha Moreira\00\00\00\00\00"
@.str = [15 x i8] c"my name is %s\0A\00"
@.str.1 = [16 x i8] c"Natasha Moreira\00"
@.str.2 = [19 x i8] c"i am %d years old\0A\00"
@.str.3 = [5 x i8] c"bob\0A\00"
@.str.4 = [37 x i8] c"my name is %s and i am %d years old\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 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 ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 18)
%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 ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 18)
%7 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* %2, i32 55)
ret i32 0
}