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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *, ...);
int /*<<< orphan*/ julday(int, int, int);
int /*<<< orphan*/ nrerror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main(void) {
  int i, id, im, iy, n;
  char txt[80];
  static char *name[] = {
      "",     "january", "february",  "march",   "april",    "may",     "june",
      "july", "august",  "september", "october", "november", "december"};
  FILE *fp;
  if ((fp = fopen("dates1.dat", "r")) == NULL)
    nrerror("Data file dates1.dat not found\n");
  fgets(txt, 80, fp);
  fscanf(fp, "%d %*s ", &n);
  printf("\n%5s %8s %6s %12s %9s\n", "month", "day", "year", "julian day",
         "event");
  for (i = 1; i <= n; i++) {
    fscanf(fp, "%d %d %d ", &im, &id, &iy);
    fgets(txt, 80, fp);
    printf("%-10s %3d %6d %10ld %5s %s", name[im], id, iy, julday(im, id, iy),
           " ", txt);
  }
  fclose(fp);
  printf("\nYour choices: (negative to end)\n");
  printf("month day year (e.g. 1 13 1905)\n");
  for (i = 1; i <= 20; i++) {
    printf("\nmm dd yyyy ?\n");
    scanf("%d %d %d", &im, &id, &iy);
    if (im < 0)
      return 0;
    printf("julian day: %ld \n", julday(im, id, iy));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xebd(%rip),%rdi
lea    0xf09(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x78(%rbp)
cmp    $0x0,%rax
jne    11bf <main+0x3f>
lea    0xea7(%rip),%rdi
call   1030 <nrerror@plt>
lea    -0x70(%rbp),%rdi
mov    -0x78(%rbp),%rdx
mov    $0x50,%esi
call   1080 <fgets@plt>
mov    -0x78(%rbp),%rdi
lea    0xea5(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1070 <fscanf@plt>
lea    0xe9b(%rip),%rdi
lea    0xeab(%rip),%rsi
lea    0xeb6(%rip),%rdx
lea    0xea3(%rip),%rcx
lea    0xea1(%rip),%r8
lea    0xea5(%rip),%r9
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     12c6 <main+0x146>
mov    -0x78(%rbp),%rdi
lea    0xe86(%rip),%rsi
lea    -0x10(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x14(%rbp),%r8
mov    $0x0,%al
call   1070 <fscanf@plt>
lea    -0x70(%rbp),%rdi
mov    -0x78(%rbp),%rdx
mov    $0x50,%esi
call   1080 <fgets@plt>
movslq -0x10(%rbp),%rcx
lea    0x2e0a(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x88(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1050 <julday@plt>
mov    -0x88(%rbp),%rsi
mov    -0x80(%rbp),%edx
mov    -0x7c(%rbp),%ecx
mov    %eax,%r8d
lea    -0x70(%rbp),%rax
lea    0xe20(%rip),%rdi
lea    0xe17(%rip),%r9
mov    %rax,(%rsp)
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    121f <main+0x9f>
mov    -0x78(%rbp),%rdi
call   1040 <fclose@plt>
lea    0xe0b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe1f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jg     1364 <main+0x1e4>
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe22(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1090 <scanf@plt>
cmpl   $0x0,-0x10(%rbp)
jge    1338 <main+0x1b8>
movl   $0x0,-0x4(%rbp)
jmp    136b <main+0x1eb>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1050 <julday@plt>
mov    %eax,%esi
lea    0xded(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12f2 <main+0x172>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0xee5(%rip),%rdi
lea    0xf31(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%r12
test   %rax,%rax
jne    11c5 <main+0x35>
lea    0xed5(%rip),%rdi
call   1040 <nrerror@plt>
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
mov    %r12,%rdx
call   1090 <fgets@plt>
lea    0xed4(%rip),%rsi
lea    0x1c(%rsp),%rdx
mov    %r12,%rdi
xor    %eax,%eax
call   1080 <fscanf@plt>
lea    0xec6(%rip),%rdi
lea    0xed6(%rip),%rsi
lea    0xee1(%rip),%rdx
lea    0xece(%rip),%rcx
lea    0xecc(%rip),%r8
lea    0xed0(%rip),%r9
xor    %eax,%eax
call   1070 <printf@plt>
cmpl   $0x0,0x1c(%rsp)
jle    12b9 <main+0x129>
xor    %r14d,%r14d
nop
mov    %r12,%rdi
lea    0xeb6(%rip),%rsi
lea    0x14(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0x10(%rsp),%r8
xor    %eax,%eax
call   1080 <fscanf@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
mov    %r12,%rdx
call   1090 <fgets@plt>
movslq 0x14(%rsp),%rdi
lea    0xd94(%rip),%rax
movslq (%rax,%rdi,4),%r13
add    %rax,%r13
mov    0x18(%rsp),%ebp
mov    0x10(%rsp),%r15d
mov    %ebp,%esi
mov    %r15d,%edx
call   1060 <julday@plt>
mov    %rbx,(%rsp)
lea    0xe69(%rip),%rdi
mov    %r13,%rsi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %eax,%r8d
lea    0xe55(%rip),%r9
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x1,%r14d
cmp    0x1c(%rsp),%r14d
jl     1230 <main+0xa0>
mov    %r12,%rdi
call   1050 <fclose@plt>
lea    0xe68(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7d(%rip),%rdi
call   1030 <puts@plt>
mov    $0x14,%r14d
lea    0xe2f(%rip),%r15
lea    0x14(%rsp),%r12
lea    0x18(%rsp),%rbp
lea    0x10(%rsp),%rbx
lea    0xe22(%rip),%r13
nopl   0x0(%rax)
lea    0xe6a(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
mov    %rbx,%rcx
call   10a0 <scanf@plt>
mov    0x14(%rsp),%edi
test   %edi,%edi
js     1344 <main+0x1b4>
mov    0x18(%rsp),%esi
mov    0x10(%rsp),%edx
call   1060 <julday@plt>
mov    %r13,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0xffffffff,%r14d
jne    1300 <main+0x170>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@main.name = internal global [13 x i8*] [i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 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 ([5 x i8], [5 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 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 ([9 x i8], [9 x i8]* @.str.12, i32 0, i32 0)]
@.str = [1 x i8] zeroinitializer
@.str.1 = [8 x i8] c"january\00"
@.str.2 = [9 x i8] c"february\00"
@.str.3 = [6 x i8] c"march\00"
@.str.4 = [6 x i8] c"april\00"
@.str.5 = [4 x i8] c"may\00"
@.str.6 = [5 x i8] c"june\00"
@.str.7 = [5 x i8] c"july\00"
@.str.8 = [7 x i8] c"august\00"
@.str.9 = [10 x i8] c"september\00"
@.str.10 = [8 x i8] c"october\00"
@.str.11 = [9 x i8] c"november\00"
@.str.12 = [9 x i8] c"december\00"
@.str.13 = [11 x i8] c"dates1.dat\00"
@.str.14 = [2 x i8] c"r\00"
@.str.15 = [32 x i8] c"Data file dates1.dat not found\0A\00"
@.str.16 = [8 x i8] c"%d %*s \00"
@.str.17 = [23 x i8] c"\0A%5s %8s %6s %12s %9s\0A\00"
@.str.18 = [6 x i8] c"month\00"
@.str.19 = [4 x i8] c"day\00"
@.str.20 = [5 x i8] c"year\00"
@.str.21 = [11 x i8] c"julian day\00"
@.str.22 = [6 x i8] c"event\00"
@.str.23 = [10 x i8] c"%d %d %d \00"
@.str.24 = [27 x i8] c"%-10s %3d %6d %10ld %5s %s\00"
@.str.25 = [2 x i8] c" \00"
@.str.26 = [34 x i8] c"\0AYour choices: (negative to end)\0A\00"
@.str.27 = [33 x i8] c"month day year (e.g. 1 13 1905)\0A\00"
@.str.28 = [15 x i8] c"\0Amm dd yyyy ?\0A\00"
@.str.29 = [9 x i8] c"%d %d %d\00"
@.str.30 = [18 x i8] c"julian day: %ld \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [80 x i8]
%8 = alloca i32*
store i32 0, i32* %1
%9 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
store i32* %9, i32** %8
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0))
br label %13
13: ; preds = %11, %0
%14 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%15 = load i32*, i32** %8
%16 = call i32 @fgets(i8* %14, i32 80, i32* %15)
%17 = load i32*, i32** %8
%18 = call i32 (i32*, i8*, i32*, ...) @fscanf(i32* %17, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i32* %6)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0))
store i32 1, i32* %2
br label %20
20: ; preds = %42, %13
%21 = load i32, i32* %2
%22 = load i32, i32* %6
%23 = icmp sle i32 %21, %22
br i1 %23, label %24, label %45
24: ; preds = %20
%25 = load i32*, i32** %8
%26 = call i32 (i32*, i8*, i32*, ...) @fscanf(i32* %25, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.23, i64 0, i64 0), i32* %4, i32* %3, i32* %5)
%27 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%28 = load i32*, i32** %8
%29 = call i32 @fgets(i8* %27, i32 80, i32* %28)
%30 = load i32, i32* %4
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [13 x i8*], [13 x i8*]* @main.name, i64 0, i64 %31
%33 = load i8*, i8** %32
%34 = load i32, i32* %3
%35 = load i32, i32* %5
%36 = load i32, i32* %4
%37 = load i32, i32* %3
%38 = load i32, i32* %5
%39 = call i32 @julday(i32 %36, i32 %37, i32 %38)
%40 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.24, i64 0, i64 0), i8* %33, i32 %34, i32 %35, i32 %39, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0), i8* %40)
br label %42
42: ; preds = %24
%43 = load i32, i32* %2
%44 = add nsw i32 %43, 1
store i32 %44, i32* %2
br label %20
45: ; preds = %20
%46 = load i32*, i32** %8
%47 = call i32 @fclose(i32* %46)
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.26, i64 0, i64 0))
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.27, i64 0, i64 0))
store i32 1, i32* %2
br label %50
50: ; preds = %65, %45
%51 = load i32, i32* %2
%52 = icmp sle i32 %51, 20
br i1 %52, label %53, label %68
53: ; preds = %50
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.28, i64 0, i64 0))
%55 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.29, i64 0, i64 0), i32* %4, i32* %3, i32* %5)
%56 = load i32, i32* %4
%57 = icmp slt i32 %56, 0
br i1 %57, label %58, label %59
58: ; preds = %53
store i32 0, i32* %1
br label %69
59: ; preds = %53
%60 = load i32, i32* %4
%61 = load i32, i32* %3
%62 = load i32, i32* %5
%63 = call i32 @julday(i32 %60, i32 %61, i32 %62)
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.30, i64 0, i64 0), i32 %63)
br label %65
65: ; preds = %59
%66 = load i32, i32* %2
%67 = add nsw i32 %66, 1
store i32 %67, i32* %2
br label %50
68: ; preds = %50
store i32 0, i32* %1
br label %69
69: ; preds = %68, %58
%70 = load i32, i32* %1
ret i32 %70
}

LLVM IR (-O2):
@reltable.main = internal unnamed_addr constant [13 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([1 x i8]* @.str to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.1 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.2 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.3 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 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 ([5 x i8]* @.str.6 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.7 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.8 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.9 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 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 ([9 x i8]* @.str.12 to i64), i64 ptrtoint ([13 x i32]* @reltable.main to i64)) to i32)]
@.str = [1 x i8] zeroinitializer
@.str.1 = [8 x i8] c"january\00"
@.str.2 = [9 x i8] c"february\00"
@.str.3 = [6 x i8] c"march\00"
@.str.4 = [6 x i8] c"april\00"
@.str.5 = [4 x i8] c"may\00"
@.str.6 = [5 x i8] c"june\00"
@.str.7 = [5 x i8] c"july\00"
@.str.8 = [7 x i8] c"august\00"
@.str.9 = [10 x i8] c"september\00"
@.str.10 = [8 x i8] c"october\00"
@.str.11 = [9 x i8] c"november\00"
@.str.12 = [9 x i8] c"december\00"
@.str.13 = [11 x i8] c"dates1.dat\00"
@.str.14 = [2 x i8] c"r\00"
@.str.15 = [32 x i8] c"Data file dates1.dat not found\0A\00"
@.str.16 = [8 x i8] c"%d %*s \00"
@.str.17 = [23 x i8] c"\0A%5s %8s %6s %12s %9s\0A\00"
@.str.18 = [6 x i8] c"month\00"
@.str.19 = [4 x i8] c"day\00"
@.str.20 = [5 x i8] c"year\00"
@.str.21 = [11 x i8] c"julian day\00"
@.str.22 = [6 x i8] c"event\00"
@.str.23 = [10 x i8] c"%d %d %d \00"
@.str.24 = [27 x i8] c"%-10s %3d %6d %10ld %5s %s\00"
@.str.25 = [2 x i8] c" \00"
@.str.29 = [9 x i8] c"%d %d %d\00"
@.str.30 = [18 x i8] c"julian day: %ld \0A\00"
@str = [33 x i8] c"\0AYour choices: (negative to end)\00"
@str.31 = [32 x i8] c"month day year (e.g. 1 13 1905)\00"
@str.32 = [14 x i8] c"\0Amm dd yyyy ?\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [80 x i8]
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%11 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = tail call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0))
br label %15
15: ; preds = %13, %0
%16 = call i32 @fgets(i8* %10, i32 80, i32* %11)
%17 = call i32 (i32*, i8*, i32*, ...) @fscanf(i32* %11, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i32* %4)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0))
%19 = load i32, i32* %4
%20 = icmp slt i32 %19, 1
br i1 %20, label %36, label %21
21: ; preds = %15, %21
%22 = phi i32 [ %33, %21 ], [ 1, %15 ]
%23 = call i32 (i32*, i8*, i32*, ...) @fscanf(i32* %11, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.23, i64 0, i64 0), i32* %2, i32* %1, i32* %3)
%24 = call i32 @fgets(i8* %10, i32 80, i32* %11)
%25 = load i32, i32* %2
%26 = sext i32 %25 to i64
%27 = shl i64 %26, 2
%28 = call i8* @llvm.load.relative.i64(i8* bitcast ([13 x i32]* @reltable.main to i8*), i64 %27)
%29 = load i32, i32* %1
%30 = load i32, i32* %3
%31 = call i32 @julday(i32 %25, i32 %29, i32 %30)
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.24, i64 0, i64 0), i8* %28, i32 %29, i32 %30, i32 %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0), i8* %10)
%33 = add nuw nsw i32 %22, 1
%34 = load i32, i32* %4
%35 = icmp slt i32 %22, %34
br i1 %35, label %21, label %36
36: ; preds = %21, %15
%37 = call i32 @fclose(i32* %11)
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.31, i64 0, i64 0))
br label %40
40: ; preds = %36, %46
%41 = phi i32 [ 1, %36 ], [ %51, %46 ]
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.32, i64 0, i64 0))
%43 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.29, i64 0, i64 0), i32* %2, i32* %1, i32* %3)
%44 = load i32, i32* %2
%45 = icmp slt i32 %44, 0
br i1 %45, label %53, label %46
46: ; preds = %40
%47 = load i32, i32* %1
%48 = load i32, i32* %3
%49 = call i32 @julday(i32 %44, i32 %47, i32 %48)
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.30, i64 0, i64 0), i32 %49)
%51 = add nuw nsw i32 %41, 1
%52 = icmp eq i32 %51, 21
br i1 %52, label %53, label %40
53: ; preds = %46, %40
ret i32 0
}