#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*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
int main(void) {
  char my_word_1[10] = {'k', 'e', 'y', 'b', 'o', 'a', 'r', 'd', '\0'};
  printf("%s\n", my_word_1);
  puts(my_word_1);
  char my_word_2[10] = "piano";
  printf("\n%s\n", my_word_2);
  puts(my_word_2);
  flushall();
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xea7(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0xe(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
lea    -0xe(%rbp),%rdi
call   1030 <puts@plt>
mov    0xe85(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe82(%rip),%ax
mov    %ax,-0x10(%rbp)
lea    -0x18(%rbp),%rsi
lea    0xe75(%rip),%rdi
call   1040 <printf@plt>
lea    -0x18(%rbp),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1050 <flushall@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movabs $0x6472616f6279656b,%rax
61 72 64
mov    %rax,0x10(%rsp)
movw   $0x0,0x18(%rsp)
lea    0xeb3(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
movabs $0x6f6e616970,%rax
mov    %rax,(%rsp)
movw   $0x0,0x8(%rsp)
lea    0xe81(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <flushall@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.my_word_1 = [10 x i8] c"keyboard\00\00"
@.str = [4 x i8] c"%s\0A\00"
@__const.main.my_word_2 = [10 x i8] c"piano\00\00\00\00\00"
@.str.1 = [5 x i8] c"\0A%s\0A\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @puts(i8* %3)
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = call i32 @puts(i8* %6)
%9 = call i32 (...) @flushall()
%10 = call i32 (...) @getchar()
ret i32 0
}