#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*/ flushall();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, char **);
int /*<<< orphan*/ strcpy(char *, char *);
main() {
  char name[] = {'R', 'o', 'b', 'e', 'r', 't'};
  puts(name);
  scanf("%s", &name);
  flushall();
  strcpy(name, "Philip");
  *(name + 5) = 'a';
  *(name + 3) = 'z';
  puts(name);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xea2(%rip),%eax
mov    %eax,-0x6(%rbp)
mov    0xe9c(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0x6(%rbp),%rdi
call   1040 <puts@plt>
lea    -0x6(%rbp),%rsi
lea    0xe86(%rip),%rdi
call   1070 <scanf@plt>
mov    $0x0,%al
call   1050 <flushall@plt>
lea    -0x6(%rbp),%rdi
lea    0xe72(%rip),%rsi
call   1030 <strcpy@plt>
movb   $0x61,-0x1(%rbp)
movb   $0x7a,-0x3(%rbp)
lea    -0x6(%rbp),%rdi
call   1040 <puts@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movw   $0x7472,0xc(%rsp)
movl   $0x65626f52,0x8(%rsp)
65
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xe8e(%rip),%rdi
mov    %rbx,%rsi
call   1070 <scanf@plt>
xor    %eax,%eax
call   1050 <flushall@plt>
lea    0xe7b(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
movb   $0x61,0xd(%rsp)
movb   $0x7a,0xb(%rsp)
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.name = [6 x i8] c"Robert"
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"Philip\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = bitcast [6 x i8]* %1 to i8*
%3 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%4 = call i32 @puts(i8* %3)
%5 = bitcast [6 x i8]* %1 to i8**
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %5)
%7 = call i32 (...) @flushall()
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%9 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%11 = getelementptr inbounds i8, i8* %10, i64 5
store i8 97, i8* %11
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%13 = getelementptr inbounds i8, i8* %12, i64 3
store i8 122, i8* %13
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%15 = call i32 @puts(i8* %14)
%16 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@__const.main.name = [6 x i8] c"Robert"
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"Philip\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 @puts(i8* %2)
%4 = bitcast [6 x i8]* %1 to i8**
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %4)
%6 = call i32 (...) @flushall()
%7 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 5
store i8 97, i8* %8
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 3
store i8 122, i8* %9
%10 = call i32 @puts(i8* %2)
%11 = call i32 (...) @getchar()
ret i32 0
}