#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[50];
  strcpy(name, "Orlando");
  printf("%d\n", age);
  printf("%s\n", name);
  age = 15;
  strcpy(name, "hello");
  printf("%d\n", age);
  printf("%s\n", name);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x13,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xf,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%esi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0xec2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xeb8(%rip),%r14
mov    %r14,%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xe9e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Orlando\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [6 x i8] c"hello\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [50 x i8]
store i32 0, i32* %1
store i32 19, i32* %2
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %8)
store i32 15, i32* %2
%10 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%11 = call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"Orlando\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.3 = [6 x i8] c"hello\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 19)
%5 = call i32 @puts(i8* %2)
%6 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 15)
%8 = call i32 @puts(i8* %2)
ret i32 0
}