#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*/ puts(char const *);
int main(void) {
  char words[81] = "I am a string in an array.";
  const char *pt1 = "Something is pointing at me.";
  puts("Here are some strings:");
  puts("I am a symbolic string constant.");
  puts(words);
  puts(pt1);
  words[8] = 'p';
  puts(words);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x51,%edx
call   1040 <memcpy@plt>
lea    0xf06(%rip),%rax
mov    %rax,-0x68(%rbp)
lea    0xf18(%rip),%rdi
call   1030 <puts@plt>
lea    0xf23(%rip),%rdi
call   1030 <puts@plt>
lea    -0x60(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x68(%rbp),%rdi
call   1030 <puts@plt>
movb   $0x70,-0x58(%rbp)
lea    -0x60(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
movaps 0xf24(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xf08(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeec(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,(%rsp)
movb   $0x0,0x50(%rsp)
lea    0xf12(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1d(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
movb   $0x70,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.words = [81 x i8] c"I am a string in an array.\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [29 x i8] c"Something is pointing at me.\00"
@.str.1 = [23 x i8] c"Here are some strings:\00"
@.str.2 = [33 x i8] c"I am a symbolic string constant.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [81 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [81 x i8]* %2 to i8*
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8** %3
%5 = call i32 @puts(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%7 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%8 = call i32 @puts(i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 @puts(i8* %9)
%11 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 8
store i8 112, i8* %11
%12 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%13 = call i32 @puts(i8* %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.words = [81 x i8] c"I am a string in an array.\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [29 x i8] c"Something is pointing at me.\00"
@.str.1 = [23 x i8] c"Here are some strings:\00"
@.str.2 = [33 x i8] c"I am a symbolic string constant.\00"
define i32 @main() {
%1 = alloca [81 x i8]
%2 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @puts(i8* %2)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 8
store i8 112, i8* %7
%8 = call i32 @puts(i8* %2)
ret i32 0
}