#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, char const *);
int zodiac(int, int);
int main(void) {
  const char *_zodiac_name[] = {
      "NO_EXISTS", "Aries",    "Taurus", "Gemini",  "Cancer",
      "Leo",       "Virgo",    "Libra",  "Scorpio", "Sagittarius",
      "Capricorn", "Aquarius", "Pisces"};
  int _z = 0;
  int m, d;
  for (m = 1; m < 13; m++) {
    for (d = 1; d < 32; d++) {
      _z = zodiac(m, d);
      printf("%02d/%02d => %s\n", m, d, _zodiac_name[_z]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0x2c63(%rip),%rsi
mov    $0x68,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x74(%rbp)
movl   $0x1,-0x78(%rbp)
cmpl   $0xd,-0x78(%rbp)
jge    11ca <main+0x9a>
movl   $0x1,-0x7c(%rbp)
cmpl   $0x20,-0x7c(%rbp)
jge    11b7 <main+0x87>
mov    -0x78(%rbp),%edi
mov    -0x7c(%rbp),%esi
call   1050 <zodiac@plt>
mov    %eax,-0x74(%rbp)
mov    -0x78(%rbp),%esi
mov    -0x7c(%rbp),%edx
movslq -0x74(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rcx
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1176 <main+0x46>
jmp    11bc <main+0x8c>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1165 <main+0x35>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xf41(%rip),%r15
lea    0xf29(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <zodiac@plt>
cltq
movslq (%r15,%rax,4),%rcx
add    %r15,%rcx
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x20,%ebp
jne    1150 <main+0x30>
add    $0x1,%ebx
cmp    $0xd,%ebx
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"NO_EXISTS\00"
@.str.1 = [6 x i8] c"Aries\00"
@.str.2 = [7 x i8] c"Taurus\00"
@.str.3 = [7 x i8] c"Gemini\00"
@.str.4 = [7 x i8] c"Cancer\00"
@.str.5 = [4 x i8] c"Leo\00"
@.str.6 = [6 x i8] c"Virgo\00"
@.str.7 = [6 x i8] c"Libra\00"
@.str.8 = [8 x i8] c"Scorpio\00"
@.str.9 = [12 x i8] c"Sagittarius\00"
@.str.10 = [10 x i8] c"Capricorn\00"
@.str.11 = [9 x i8] c"Aquarius\00"
@.str.12 = [7 x i8] c"Pisces\00"
@__const.main._zodiac_name = [13 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i32 0, i32 0)]
@.str.13 = [17 x i8] c"%02d/%02d => %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [13 x i8*]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [13 x i8*]* %2 to i8*
store i32 0, i32* %3
store i32 1, i32* %4
br label %7
7: ; preds = %29, %0
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 13
br i1 %9, label %10, label %32
10: ; preds = %7
store i32 1, i32* %5
br label %11
11: ; preds = %25, %10
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 32
br i1 %13, label %14, label %28
14: ; preds = %11
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = call i32 @zodiac(i32 %15, i32 %16)
store i32 %17, i32* %3
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [13 x i8*], [13 x i8*]* %2, i64 0, i64 %21
%23 = load i8*, i8** %22
%24 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i32 %18, i32 %19, i8* %23)
br label %25
25: ; preds = %14
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
br label %11
28: ; preds = %11
br label %29
29: ; preds = %28
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %7
32: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"NO_EXISTS\00"
@.str.1 = [6 x i8] c"Aries\00"
@.str.2 = [7 x i8] c"Taurus\00"
@.str.3 = [7 x i8] c"Gemini\00"
@.str.4 = [7 x i8] c"Cancer\00"
@.str.5 = [4 x i8] c"Leo\00"
@.str.6 = [6 x i8] c"Virgo\00"
@.str.7 = [6 x i8] c"Libra\00"
@.str.8 = [8 x i8] c"Scorpio\00"
@.str.9 = [12 x i8] c"Sagittarius\00"
@.str.10 = [10 x i8] c"Capricorn\00"
@.str.11 = [9 x i8] c"Aquarius\00"
@.str.12 = [7 x i8] c"Pisces\00"
@reltable.main = [13 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.1 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.2 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.3 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.4 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.5 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.6 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.7 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.8 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.9 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.10 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.11 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.12 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32)]
@.str.13 = [17 x i8] c"%02d/%02d => %s\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %12
%2 = phi i32 [ 1, %0 ], [ %13, %12 ]
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ 1, %1 ], [ %10, %3 ]
%5 = tail call i32 @zodiac(i32 %2, i32 %4)
%6 = sext i32 %5 to i64
%7 = shl i64 %6, 2
%8 = call i8* @llvm.load.relative.i64(i8* bitcast ([13 x i32]* @reltable.main to i8*), i64 %7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i32 %2, i32 %4, i8* %8)
%10 = add nuw nsw i32 %4, 1
%11 = icmp eq i32 %10, 32
br i1 %11, label %12, label %3
12: ; preds = %3
%13 = add nuw nsw i32 %2, 1
%14 = icmp eq i32 %13, 13
br i1 %14, label %15, label %1
15: ; preds = %12
ret i32 0
}