#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 *, ...);
void main() {
  extern char a[];
  printf("%s\n", a);
  int ai[5] = {1, 4, 5, 6, 10};
  char ac[7] = "lixiang";
  printf("&ai[0]=%p,&ai[1]=%p,&ai[2]=%p\n", &ai[0], &ai[1], &ai[2]);
  printf("&ac[0]=%p,&ac[1]=%p,&ac[2]=%p", &ac[0], &ac[1], &ac[2]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xee1(%rip),%rdi
mov    0x2ec2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0xf1c(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xf19(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xf17(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xf12(%rip),%eax
mov    %eax,-0x27(%rbp)
mov    0xf0c(%rip),%ax
mov    %ax,-0x23(%rbp)
mov    0xf04(%rip),%al
mov    %al,-0x21(%rbp)
lea    -0x20(%rbp),%rsi
lea    -0x20(%rbp),%rdx
add    $0x4,%rdx
lea    -0x20(%rbp),%rcx
add    $0x8,%rcx
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x27(%rbp),%rsi
lea    -0x27(%rbp),%rdx
add    $0x1,%rdx
lea    -0x27(%rbp),%rcx
add    $0x2,%rcx
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0x2ebd(%rip),%rdi
call   1030 <puts@plt>
mov    0xeda(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xebf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x676e6169,0xb(%rsp)
67
movl   $0x6978696c,0x8(%rsp)
69
lea    0x14(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0xeb4(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x9(%rsp),%rdx
lea    0xa(%rsp),%rcx
lea    0xeb6(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@a = external global [0 x i8]
@__const.main.ai = [5 x i32] [i32 1, i32 4, i32 5, i32 6, i32 10]
@__const.main.ac = [7 x i8] c"lixiang"
@.str.1 = [31 x i8] c"&ai[0]=%p,&ai[1]=%p,&ai[2]=%p\0A\00"
@.str.2 = [30 x i8] c"&ac[0]=%p,&ac[1]=%p,&ac[2]=%p\00"
define void @main() {
%1 = alloca [5 x i32]
%2 = alloca [7 x i8]
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([0 x i8], [0 x i8]* @a, i64 0, i64 0))
%4 = bitcast [5 x i32]* %1 to i8*
%5 = bitcast [7 x i8]* %2 to i8*
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 1
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
%10 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%11 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 1
%12 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 2
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %10, i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
@a = external global [0 x i8]
@__const.main.ai = [5 x i32] [i32 1, i32 4, i32 5, i32 6, i32 10]
@__const.main.ac = [7 x i8] c"lixiang"
@.str.1 = [31 x i8] c"&ai[0]=%p,&ai[1]=%p,&ai[2]=%p\0A\00"
@.str.2 = [30 x i8] c"&ac[0]=%p,&ac[1]=%p,&ac[2]=%p\00"
define void @main() {
%1 = alloca [5 x i32]
%2 = alloca [7 x i8]
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([0 x i8], [0 x i8]* @a, i64 0, i64 0))
%4 = bitcast [5 x i32]* %1 to i8*
%5 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 1
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 2
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32* %6, i32* %7, i32* %8)
%10 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 1
%11 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 2
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %5, i8* %10, i8* %11)
ret void
}