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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ system(char *);
int main01(void) {
  char *p0 = "111111111";
  char *p1 = "000000000";
  char *p2 = "bbbbbbbbb";
  char *p3 = "aaaaaaaaa";
  char *p[] = {"111111111", "000000000", "bbbbbbbbb", "aaaaaaaaa"};
  int n = sizeof(p) / sizeof(p[0]);
  printf("sizeof(p) = %d, sizeof(p[0]) = %d\n", sizeof(p), sizeof(p[0]));
  int i = 0;
  for (i = 0; i < n; i++) {
    printf("%s\n", p[i]);
  }
  char *q[10] = {"111111111", "000000000", "bbbbbbbbb", "aaaaaaaaa"};
  printf("sizeof(q) = %d, sizeof(q[0]) = %d\n", sizeof(q), sizeof(q[0]));
  printf("\n");
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main01>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
lea    0xebe(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xebd(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xebc(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xebb(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2c92(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0x2c8f(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0x2c8c(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2c89(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x4,-0x44(%rbp)
lea    0xe87(%rip),%rdi
mov    $0x20,%esi
mov    $0x8,%edx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    11f1 <main01+0xc1>
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rsi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11c0 <main01+0x90>
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1050 <memset@plt>
lea    0xdf5(%rip),%rax
mov    %rax,-0xa0(%rbp)
lea    0xdf1(%rip),%rax
mov    %rax,-0x98(%rbp)
lea    0xded(%rip),%rax
mov    %rax,-0x90(%rbp)
lea    0xde9(%rip),%rax
mov    %rax,-0x88(%rbp)
lea    0xe0c(%rip),%rdi
mov    $0x50,%esi
mov    $0x8,%edx
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe09(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main01>:
push   %rax
lea    0xee0(%rip),%rdi
mov    $0x20,%esi
mov    $0x8,%edx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xea0(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9e(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9c(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9a(%rip),%rdi
call   1040 <puts@plt>
lea    0xebb(%rip),%rdi
mov    $0x50,%esi
mov    $0x8,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebc(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"111111111\00"
@.str.1 = [10 x i8] c"000000000\00"
@.str.2 = [10 x i8] c"bbbbbbbbb\00"
@.str.3 = [10 x i8] c"aaaaaaaaa\00"
@__const.main01.p = [4 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [35 x i8] c"sizeof(p) = %d, sizeof(p[0]) = %d\0A\00"
@.str.5 = [4 x i8] c"%s\0A\00"
@.str.6 = [35 x i8] c"sizeof(q) = %d, sizeof(q[0]) = %d\0A\00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [6 x i8] c"pause\00"
define i32 @main01() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [4 x i8*]
%6 = alloca i32
%7 = alloca i32
%8 = alloca [10 x i8*]
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8** %4
%9 = bitcast [4 x i8*]* %5 to i8*
store i32 4, i32* %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i64 32, i64 8)
store i32 0, i32* %7
store i32 0, i32* %7
br label %11
11: ; preds = %21, %0
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %24
15: ; preds = %11
%16 = load i32, i32* %7
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [4 x i8*], [4 x i8*]* %5, i64 0, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %15
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %11
24: ; preds = %11
%25 = bitcast [10 x i8*]* %8 to i8*
%26 = bitcast i8* %25 to [10 x i8*]*
%27 = getelementptr inbounds [10 x i8*], [10 x i8*]* %26, i32 0, i32 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8** %27
%28 = getelementptr inbounds [10 x i8*], [10 x i8*]* %26, i32 0, i32 1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8** %28
%29 = getelementptr inbounds [10 x i8*], [10 x i8*]* %26, i32 0, i32 2
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i32 0, i32 0), i8** %29
%30 = getelementptr inbounds [10 x i8*], [10 x i8*]* %26, i32 0, i32 3
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i32 0, i32 0), i8** %30
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i64 80, i64 8)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%33 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"111111111\00"
@.str.1 = [10 x i8] c"000000000\00"
@.str.2 = [10 x i8] c"bbbbbbbbb\00"
@.str.3 = [10 x i8] c"aaaaaaaaa\00"
@.str.4 = [35 x i8] c"sizeof(p) = %d, sizeof(p[0]) = %d\0A\00"
@.str.6 = [35 x i8] c"sizeof(q) = %d, sizeof(q[0]) = %d\0A\00"
@.str.8 = [6 x i8] c"pause\00"
define i32 @main01() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i64 32, i64 8)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i64 80, i64 8)
%7 = tail call i32 @putchar(i32 10)
%8 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}