#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 */
typedef int /*<<< orphan*/ quote;

/* Variables and functions */
int /*<<< orphan*/ fortune_cookie(char *);
int /*<<< orphan*/ printf(char *, ...);
void main() {
  char quote[] = "Cookies make you fat";
  fortune_cookie(quote);
  printf("The quote string is stored at: %p\n", quote);
  printf("The quote string is stored at: %p\n", &quote[0]);
  printf("The quote string is stored at3: %s\n", quote);
  printf("The quote string is stored at4: %i\n", sizeof(quote));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xec7(%rip),%al
mov    %al,-0xc(%rbp)
lea    -0x20(%rbp),%rdi
call   1040 <fortune_cookie@plt>
lea    -0x20(%rbp),%rsi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x15,%esi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movaps 0xed2(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x74616620756f79,%rax
mov    %rax,0xd(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <fortune_cookie@plt>
lea    0xec2(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x15,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.quote = [21 x i8] c"Cookies make you fat\00"
@.str = [35 x i8] c"The quote string is stored at: %p\0A\00"
@.str.1 = [36 x i8] c"The quote string is stored at3: %s\0A\00"
@.str.2 = [36 x i8] c"The quote string is stored at4: %i\0A\00"
define void @main() {
%1 = alloca [21 x i8]
%2 = bitcast [21 x i8]* %1 to i8*
%3 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%4 = call i32 @fortune_cookie(i8* %3)
%5 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i64 21)
ret void
}

LLVM IR (-O2):
@__const.main.quote = [21 x i8] c"Cookies make you fat\00"
@.str = [35 x i8] c"The quote string is stored at: %p\0A\00"
@.str.1 = [36 x i8] c"The quote string is stored at3: %s\0A\00"
@.str.2 = [36 x i8] c"The quote string is stored at4: %i\0A\00"
define void @main() {
%1 = alloca [21 x i8]
%2 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%3 = call i32 @fortune_cookie(i8* %2)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i64 21)
ret void
}