#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*/ calendar;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
void main() {
  char calendar[12][31];
  printf("sizeof calendar = %d\n", sizeof(calendar));
  printf("sizeof calendar[4] = %d\n", sizeof calendar[4]);
  printf("sizeof calendar[5] = %d\n", sizeof calendar[5]);
  char *p = calendar[4];
  printf("sizeof *p = %d, sizeof p = %d\n", sizeof *p, sizeof p);
  char(*monthp)[31];
  monthp = calendar;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
lea    0xede(%rip),%rdi
mov    $0x174,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x1f,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x1f,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x180(%rbp),%rax
add    $0x7c,%rax
mov    %rax,-0x188(%rbp)
lea    0xedb(%rip),%rdi
mov    $0x1,%esi
mov    $0x8,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x180(%rbp),%rax
mov    %rax,-0x190(%rbp)
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x174,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x1f,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x1f,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x8,%edx
mov    $0x1,%esi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"sizeof calendar = %d\0A\00"
@.str.1 = [25 x i8] c"sizeof calendar[4] = %d\0A\00"
@.str.2 = [25 x i8] c"sizeof calendar[5] = %d\0A\00"
@.str.3 = [31 x i8] c"sizeof *p = %d, sizeof p = %d\0A\00"
define void @main() {
%1 = alloca [12 x [31 x i8]]
%2 = alloca i8*
%3 = alloca [31 x i8]*
%4 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 372)
%5 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 31)
%6 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 31)
%7 = getelementptr inbounds [12 x [31 x i8]], [12 x [31 x i8]]* %1, i64 0, i64 4
%8 = getelementptr inbounds [31 x i8], [31 x i8]* %7, i64 0, i64 0
store i8* %8, i8** %2
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 1, i64 8)
%10 = getelementptr inbounds [12 x [31 x i8]], [12 x [31 x i8]]* %1, i64 0, i64 0
store [31 x i8]* %10, [31 x i8]** %3
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"sizeof calendar = %d\0A\00"
@.str.1 = [25 x i8] c"sizeof calendar[4] = %d\0A\00"
@.str.2 = [25 x i8] c"sizeof calendar[5] = %d\0A\00"
@.str.3 = [31 x i8] c"sizeof *p = %d, sizeof p = %d\0A\00"
define void @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 372)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 31)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 31)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 1, i64 8)
ret void
}