#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 *, char const *, char const *);
void func3() {
  const char *str1 = "Hello world";
  const char *str2 = "Hello world";
  printf("%p %p\n", str1, str2);
  char arr1[] = "Goodbuy World";
  char arr2[] = "Goodbuy World";
  printf("%p %p\n", arr1, arr2);
}


x86 assembly (clang, -O0):
<func3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed6(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    0xeca(%rip),%rax
mov    %rax,-0x1e(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x16(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x12(%rbp)
mov    0xeab(%rip),%rax
mov    %rax,-0x2c(%rbp)
mov    0xea9(%rip),%eax
mov    %eax,-0x24(%rbp)
mov    0xea3(%rip),%ax
mov    %ax,-0x20(%rbp)
lea    -0x1e(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func3>:
push   %rbx
sub    $0x20,%rsp
lea    0xef0(%rip),%rbx
lea    0xedd(%rip),%rdx
mov    %rbx,%rdi
mov    %rdx,%rsi
call   1030 <printf@plt>
movabs $0x646c726f572079,%rax
mov    %rax,0x16(%rsp)
movabs $0x20797562646f6f47,%rcx
75 79 20
mov    %rcx,0x10(%rsp)
mov    %rax,0x6(%rsp)
mov    %rcx,(%rsp)
lea    0x10(%rsp),%rsi
mov    %rsp,%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Hello world\00"
@.str.1 = [7 x i8] c"%p %p\0A\00"
@__const.func3.arr1 = [14 x i8] c"Goodbuy World\00"
@__const.func3.arr2 = [14 x i8] c"Goodbuy World\00"
define void @func3() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca [14 x i8]
%4 = alloca [14 x i8]
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
%5 = load i8*, i8** %1
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %5, i8* %6)
%8 = bitcast [14 x i8]* %3 to i8*
%9 = bitcast [14 x i8]* %4 to i8*
%10 = getelementptr inbounds [14 x i8], [14 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [14 x i8], [14 x i8]* %4, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello world\00"
@.str.1 = [7 x i8] c"%p %p\0A\00"
@__const.func3.arr2 = [14 x i8] c"Goodbuy World\00"
define void @func3() {
%1 = alloca [14 x i8]
%2 = alloca [14 x i8]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %5)
ret void
}