#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, int);
int main(int argc, char const *argv[]) {
  int days[12] = {31, 28, [4] = 31, 30, 31, [1] = 29};
  int i;
  for (i = 0; i < 12; i++) {
    printf("%2d %d\n", i + 1, days[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
movl   $0x1f,-0x40(%rbp)
movl   $0x1d,-0x3c(%rbp)
movl   $0x1f,-0x30(%rbp)
movl   $0x1e,-0x2c(%rbp)
movl   $0x1f,-0x28(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0xc,-0x44(%rbp)
jge    11a2 <main+0x82>
mov    -0x44(%rbp),%esi
add    $0x1,%esi
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%edx
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1170 <main+0x50>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1f,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1d,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x1f,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x1e,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x1f,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
xor    %edx,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%2d %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 1, i32 31)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 2, i32 29)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 3, i32 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 4, i32 0)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 5, i32 31)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 6, i32 30)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7, i32 31)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 8, i32 0)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 9, i32 0)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 10, i32 0)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 11, i32 0)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 12, i32 0)
ret i32 0
}