#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 *, ...);
int main(void) {
  int i;
  struct month {
    int numberofdays;
    char name[3];
  };
  const struct month months[12] = {{31, "Jan"}, {28, "Feb"}, {31, "Mar"},
                                   {30, "Apr"}, {31, "May"}, {30, "Jun"},
                                   {31, "Jul"}, {31, "Aug"}, {30, "Sep"},
                                   {31, "Oct"}, {30, "Nov"}, {31, "Dec"}};
  printf("Month   Number of Days\n");
  printf("-----   ---------------\n");
  for (i = 0; i < 12; ++i)
    printf(" %c%c%c              %i\n", months[i].name[0], months[i].name[1],
           months[i].name[2], months[i].numberofdays);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x60,%edx
call   1040 <memcpy@plt>
lea    0xf15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xc,-0x8(%rbp)
jge    11b1 <main+0x91>
movslq -0x8(%rbp),%rax
movsbl -0x6c(%rbp,%rax,8),%esi
movslq -0x8(%rbp),%rax
movsbl -0x6b(%rbp,%rax,8),%edx
movslq -0x8(%rbp),%rax
movsbl -0x6a(%rbp,%rax,8),%ecx
movslq -0x8(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8d
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1167 <main+0x47>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4a,%esi
mov    $0x61,%edx
mov    $0x6e,%ecx
mov    $0x1f,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x46,%esi
mov    $0x65,%edx
mov    $0x62,%ecx
mov    $0x1c,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4d,%esi
mov    $0x61,%edx
mov    $0x72,%ecx
mov    $0x1f,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x41,%esi
mov    $0x70,%edx
mov    $0x72,%ecx
mov    $0x1e,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4d,%esi
mov    $0x61,%edx
mov    $0x79,%ecx
mov    $0x1f,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4a,%esi
mov    $0x75,%edx
mov    $0x6e,%ecx
mov    $0x1e,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4a,%esi
mov    $0x75,%edx
mov    $0x6c,%ecx
mov    $0x1f,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x41,%esi
mov    $0x75,%edx
mov    $0x67,%ecx
mov    $0x1f,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x53,%esi
mov    $0x65,%edx
mov    $0x70,%ecx
mov    $0x1e,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4f,%esi
mov    $0x63,%edx
mov    $0x74,%ecx
mov    $0x1f,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4e,%esi
mov    $0x6f,%edx
mov    $0x76,%ecx
mov    $0x1e,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x44,%esi
mov    $0x65,%edx
mov    $0x63,%ecx
mov    $0x1f,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.month = type { i32, [3 x i8] }
@__const.main.months = [12 x %struct.month] [%struct.month { i32 31, [3 x i8] c"Jan" }, %struct.month { i32 28, [3 x i8] c"Feb" }, %struct.month { i32 31, [3 x i8] c"Mar" }, %struct.month { i32 30, [3 x i8] c"Apr" }, %struct.month { i32 31, [3 x i8] c"May" }, %struct.month { i32 30, [3 x i8] c"Jun" }, %struct.month { i32 31, [3 x i8] c"Jul" }, %struct.month { i32 31, [3 x i8] c"Aug" }, %struct.month { i32 30, [3 x i8] c"Sep" }, %struct.month { i32 31, [3 x i8] c"Oct" }, %struct.month { i32 30, [3 x i8] c"Nov" }, %struct.month { i32 31, [3 x i8] c"Dec" }]
@.str = [24 x i8] c"Month Number of Days\0A\00"
@.str.1 = [25 x i8] c"----- ---------------\0A\00"
@.str.2 = [25 x i8] c" %c%c%c %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [12 x %struct.month]
store i32 0, i32* %1
%4 = bitcast [12 x %struct.month]* %3 to i8*
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %7
7: ; preds = %38, %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 12
br i1 %9, label %10, label %41
10: ; preds = %7
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [12 x %struct.month], [12 x %struct.month]* %3, i64 0, i64 %12
%14 = getelementptr inbounds %struct.month, %struct.month* %13, i32 0, i32 1
%15 = getelementptr inbounds [3 x i8], [3 x i8]* %14, i64 0, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = load i32, i32* %2
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [12 x %struct.month], [12 x %struct.month]* %3, i64 0, i64 %19
%21 = getelementptr inbounds %struct.month, %struct.month* %20, i32 0, i32 1
%22 = getelementptr inbounds [3 x i8], [3 x i8]* %21, i64 0, i64 1
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = load i32, i32* %2
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [12 x %struct.month], [12 x %struct.month]* %3, i64 0, i64 %26
%28 = getelementptr inbounds %struct.month, %struct.month* %27, i32 0, i32 1
%29 = getelementptr inbounds [3 x i8], [3 x i8]* %28, i64 0, i64 2
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = load i32, i32* %2
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [12 x %struct.month], [12 x %struct.month]* %3, i64 0, i64 %33
%35 = getelementptr inbounds %struct.month, %struct.month* %34, i32 0, i32 0
%36 = load i32, i32* %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %17, i32 %24, i32 %31, i32 %36)
br label %38
38: ; preds = %10
%39 = load i32, i32* %2
%40 = add nsw i32 %39, 1
store i32 %40, i32* %2
br label %7
41: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [25 x i8] c" %c%c%c %i\0A\00"
@str = [23 x i8] c"Month Number of Days\00"
@str.3 = [24 x i8] c"----- ---------------\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 74, i32 97, i32 110, i32 31)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 70, i32 101, i32 98, i32 28)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 77, i32 97, i32 114, i32 31)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 65, i32 112, i32 114, i32 30)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 77, i32 97, i32 121, i32 31)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 74, i32 117, i32 110, i32 30)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 74, i32 117, i32 108, i32 31)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 65, i32 117, i32 103, i32 31)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 83, i32 101, i32 112, i32 30)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 79, i32 99, i32 116, i32 31)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 78, i32 111, i32 118, i32 30)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 68, i32 101, i32 99, i32 31)
ret i32 0
}