#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
double slaCldj(int, int, int, int *);
double strtod(char *, int /*<<< orphan*/ *);
int strtol(char *, int /*<<< orphan*/ *, int);
int main(int argc, char *argv[]) {
  int year, month = 1, day = 1, hour = 0, min = 0, err;
  double MJD, fracday, sec = 0.0;
  if (argc < 2) {
    printf("\nUsage:  'cal2mjd YYYY MM DD HH MM SS.SSSSS'\n\n");
    exit(1);
  }
  year = strtol(argv[1], NULL, 10);
  if (argc > 2) {
    month = strtol(argv[2], NULL, 10);
    if (month < 1 || month > 12) {
      printf("\nmonth = %d is out-of-range.\n", month);
      exit(1);
    }
  }
  if (argc > 3) {
    day = strtol(argv[3], NULL, 10);
    if (day < 1 || day > 31) {
      printf("\nday = %d is out-of-range.\n", month);
      exit(1);
    }
  }
  if (argc > 4) {
    hour = strtol(argv[4], NULL, 10);
    if (hour == 24)
      hour = 0;
    if (hour < 0 || hour > 23) {
      printf("\nhour = %d is out-of-range.\n", month);
      exit(1);
    }
  }
  if (argc > 5) {
    min = strtol(argv[5], NULL, 10);
    if (min < 0 || min > 59) {
      printf("\nmin = %d is out-of-range.\n", month);
      exit(1);
    }
  }
  if (argc > 6) {
    sec = strtod(argv[6], NULL);
    if (sec < 0.0 || sec >= 60.0) {
      printf("\nsec = %d is out-of-range.\n", month);
      exit(1);
    }
  }
  fracday = (hour + (min + (sec / 60.0)) / 60.0) / 24.0;
  MJD = slaCldj(year, month, day, &err);
  MJD += fracday;
  if (err == 1) {
    printf("\nTry again.  Bad year.\n\n");
    exit(1);
  }
  if (err == 2) {
    printf("\nTry again.  Bad month.\n\n");
    exit(1);
  }
  if (err == 3) {
    printf("\nTry again.  Bad day.\n\n");
    exit(1);
  }
  printf("\nMJD is %17.11f\n\n", MJD);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11ac <main+0x5c>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    121c <main+0xcc>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jl     11fc <main+0xac>
cmpl   $0xc,-0x18(%rbp)
jle    1217 <main+0xc7>
mov    -0x18(%rbp),%esi
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    121c <main+0xcc>
cmpl   $0x3,-0x8(%rbp)
jle    1273 <main+0x123>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jl     1253 <main+0x103>
cmpl   $0x1f,-0x1c(%rbp)
jle    126e <main+0x11e>
mov    -0x18(%rbp),%esi
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    1273 <main+0x123>
cmpl   $0x4,-0x8(%rbp)
jle    12db <main+0x18b>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x18,-0x20(%rbp)
jne    12a7 <main+0x157>
movl   $0x0,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jl     12bb <main+0x16b>
cmpl   $0x17,-0x20(%rbp)
jle    12d6 <main+0x186>
mov    -0x18(%rbp),%esi
lea    0xdb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    12db <main+0x18b>
cmpl   $0x5,-0x8(%rbp)
jle    1332 <main+0x1e2>
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jl     1312 <main+0x1c2>
cmpl   $0x3b,-0x24(%rbp)
jle    132d <main+0x1dd>
mov    -0x18(%rbp),%esi
lea    0xd7a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    1332 <main+0x1e2>
cmpl   $0x6,-0x8(%rbp)
jle    1397 <main+0x247>
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <strtod@plt>
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x40(%rbp),%xmm0
ja     1377 <main+0x227>
movsd  -0x40(%rbp),%xmm0
movsd  0xc93(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1392 <main+0x242>
mov    -0x18(%rbp),%esi
lea    0xd31(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    1397 <main+0x247>
cvtsi2sdl -0x20(%rbp),%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  0xc52(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
movsd  0xc42(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xc3a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    -0x28(%rbp),%rcx
call   1050 <slaCldj@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
cmpl   $0x1,-0x28(%rbp)
jne    141f <main+0x2cf>
lea    0xcc0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
cmpl   $0x2,-0x28(%rbp)
jne    1441 <main+0x2f1>
lea    0xcb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
cmpl   $0x3,-0x28(%rbp)
jne    1463 <main+0x313>
lea    0xcaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
movsd  -0x30(%rbp),%xmm0
lea    0xcaa(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
cmp    $0x1,%edi
jg     1189 <main+0x29>
lea    0xf7f(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    %rsi,%rbp
mov    %edi,%r12d
mov    0x8(%rsi),%rdi
xor    %r14d,%r14d
xor    %esi,%esi
mov    $0xa,%edx
call   1070 <strtol@plt>
mov    %eax,%r15d
mov    $0x1,%r13d
xorpd  %xmm0,%xmm0
cmp    $0x2,%r12d
jne    11c7 <main+0x67>
movsd  %xmm0,0x8(%rsp)
xor    %ebp,%ebp
mov    $0x1,%ebx
jmp    1262 <main+0x102>
movsd  %xmm0,0x8(%rsp)
mov    0x10(%rbp),%rdi
xor    %r14d,%r14d
xor    %esi,%esi
mov    $0xa,%edx
call   1070 <strtol@plt>
mov    %eax,%ebx
add    $0xfffffff3,%eax
cmp    $0xfffffff3,%eax
ja     11f6 <main+0x96>
lea    0xe1f(%rip),%rdi
jmp    1358 <main+0x1f8>
cmp    $0x4,%r12d
jb     1260 <main+0x100>
mov    0x18(%rbp),%rdi
xor    %r14d,%r14d
xor    %esi,%esi
mov    $0xa,%edx
call   1070 <strtol@plt>
mov    %eax,%r13d
lea    -0x20(%r13),%eax
cmp    $0xffffffe0,%eax
ja     1227 <main+0xc7>
lea    0xe0c(%rip),%rdi
jmp    1358 <main+0x1f8>
cmp    $0x5,%r12d
jb     1260 <main+0x100>
mov    0x20(%rbp),%rdi
xor    %r14d,%r14d
xor    %esi,%esi
mov    $0xa,%edx
call   1070 <strtol@plt>
cmp    $0x18,%eax
cmove  %r14d,%eax
mov    %eax,0x4(%rsp)
cmp    $0x18,%eax
jb     12f6 <main+0x196>
lea    0xdef(%rip),%rdi
jmp    1358 <main+0x1f8>
xor    %ebp,%ebp
lea    0x14(%rsp),%rcx
mov    %r15d,%edi
mov    %ebx,%esi
mov    %r13d,%edx
call   1060 <slaCldj@plt>
mov    0x14(%rsp),%eax
cmp    $0x3,%eax
je     1293 <main+0x133>
cmp    $0x2,%eax
je     129f <main+0x13f>
cmp    $0x1,%eax
jne    12ab <main+0x14b>
lea    0xe53(%rip),%rdi
jmp    117a <main+0x1a>
lea    0xe17(%rip),%rdi
jmp    117a <main+0x1a>
lea    0xe22(%rip),%rdi
jmp    117a <main+0x1a>
movsd  0xd4d(%rip),%xmm1
movsd  0x8(%rsp),%xmm3
divsd  %xmm1,%xmm3
cvtsi2sd %r14d,%xmm2
addsd  %xmm3,%xmm2
divsd  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
addsd  %xmm2,%xmm1
divsd  0xd2b(%rip),%xmm1
addsd  %xmm1,%xmm0
lea    0xdb7(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   1080 <exit@plt>
cmp    $0x6,%r12d
jb     1348 <main+0x1e8>
mov    0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1070 <strtol@plt>
cmp    $0x3c,%eax
jb     131a <main+0x1ba>
lea    0xd4f(%rip),%rdi
jmp    1358 <main+0x1f8>
mov    %eax,%r14d
cmp    $0x7,%r12d
jb     1348 <main+0x1e8>
mov    0x30(%rbp),%rdi
xor    %esi,%esi
call   1040 <strtod@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     1351 <main+0x1f1>
ucomisd 0xcc0(%rip),%xmm0
jae    1351 <main+0x1f1>
movsd  %xmm0,0x8(%rsp)
mov    0x4(%rsp),%ebp
jmp    1262 <main+0x102>
lea    0xd2b(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"\0AUsage: 'cal2mjd YYYY MM DD HH MM SS.SSSSS'\0A\0A\00"
@.str.1 = [30 x i8] c"\0Amonth = %d is out-of-range.\0A\00"
@.str.2 = [28 x i8] c"\0Aday = %d is out-of-range.\0A\00"
@.str.3 = [29 x i8] c"\0Ahour = %d is out-of-range.\0A\00"
@.str.4 = [28 x i8] c"\0Amin = %d is out-of-range.\0A\00"
@.str.5 = [28 x i8] c"\0Asec = %d is out-of-range.\0A\00"
@.str.6 = [25 x i8] c"\0ATry again. Bad year.\0A\0A\00"
@.str.7 = [26 x i8] c"\0ATry again. Bad month.\0A\0A\00"
@.str.8 = [24 x i8] c"\0ATry again. Bad day.\0A\0A\00"
@.str.9 = [18 x i8] c"\0AMJD is %17.11f\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca double
%14 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %7
store i32 1, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store double 0.000000e+00, double* %14
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 2
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @exit(i32 1)
unreachable
20: ; preds = %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i32 @strtol(i8* %23, i32* null, i32 10)
store i32 %24, i32* %6
%25 = load i32, i32* %4
%26 = icmp sgt i32 %25, 2
br i1 %26, label %27, label %42
27: ; preds = %20
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 2
%30 = load i8*, i8** %29
%31 = call i32 @strtol(i8* %30, i32* null, i32 10)
store i32 %31, i32* %7
%32 = load i32, i32* %7
%33 = icmp slt i32 %32, 1
br i1 %33, label %37, label %34
34: ; preds = %27
%35 = load i32, i32* %7
%36 = icmp sgt i32 %35, 12
br i1 %36, label %37, label %41
37: ; preds = %34, %27
%38 = load i32, i32* %7
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %38)
%40 = call i32 @exit(i32 1)
unreachable
41: ; preds = %34
br label %42
42: ; preds = %41, %20
%43 = load i32, i32* %4
%44 = icmp sgt i32 %43, 3
br i1 %44, label %45, label %60
45: ; preds = %42
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 3
%48 = load i8*, i8** %47
%49 = call i32 @strtol(i8* %48, i32* null, i32 10)
store i32 %49, i32* %8
%50 = load i32, i32* %8
%51 = icmp slt i32 %50, 1
br i1 %51, label %55, label %52
52: ; preds = %45
%53 = load i32, i32* %8
%54 = icmp sgt i32 %53, 31
br i1 %54, label %55, label %59
55: ; preds = %52, %45
%56 = load i32, i32* %7
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %56)
%58 = call i32 @exit(i32 1)
unreachable
59: ; preds = %52
br label %60
60: ; preds = %59, %42
%61 = load i32, i32* %4
%62 = icmp sgt i32 %61, 4
br i1 %62, label %63, label %82
63: ; preds = %60
%64 = load i8**, i8*** %5
%65 = getelementptr inbounds i8*, i8** %64, i64 4
%66 = load i8*, i8** %65
%67 = call i32 @strtol(i8* %66, i32* null, i32 10)
store i32 %67, i32* %9
%68 = load i32, i32* %9
%69 = icmp eq i32 %68, 24
br i1 %69, label %70, label %71
70: ; preds = %63
store i32 0, i32* %9
br label %71
71: ; preds = %70, %63
%72 = load i32, i32* %9
%73 = icmp slt i32 %72, 0
br i1 %73, label %77, label %74
74: ; preds = %71
%75 = load i32, i32* %9
%76 = icmp sgt i32 %75, 23
br i1 %76, label %77, label %81
77: ; preds = %74, %71
%78 = load i32, i32* %7
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %78)
%80 = call i32 @exit(i32 1)
unreachable
81: ; preds = %74
br label %82
82: ; preds = %81, %60
%83 = load i32, i32* %4
%84 = icmp sgt i32 %83, 5
br i1 %84, label %85, label %100
85: ; preds = %82
%86 = load i8**, i8*** %5
%87 = getelementptr inbounds i8*, i8** %86, i64 5
%88 = load i8*, i8** %87
%89 = call i32 @strtol(i8* %88, i32* null, i32 10)
store i32 %89, i32* %10
%90 = load i32, i32* %10
%91 = icmp slt i32 %90, 0
br i1 %91, label %95, label %92
92: ; preds = %85
%93 = load i32, i32* %10
%94 = icmp sgt i32 %93, 59
br i1 %94, label %95, label %99
95: ; preds = %92, %85
%96 = load i32, i32* %7
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %96)
%98 = call i32 @exit(i32 1)
unreachable
99: ; preds = %92
br label %100
100: ; preds = %99, %82
%101 = load i32, i32* %4
%102 = icmp sgt i32 %101, 6
br i1 %102, label %103, label %118
103: ; preds = %100
%104 = load i8**, i8*** %5
%105 = getelementptr inbounds i8*, i8** %104, i64 6
%106 = load i8*, i8** %105
%107 = call double @strtod(i8* %106, i32* null)
store double %107, double* %14
%108 = load double, double* %14
%109 = fcmp olt double %108, 0.000000e+00
br i1 %109, label %113, label %110
110: ; preds = %103
%111 = load double, double* %14
%112 = fcmp oge double %111, 6.000000e+01
br i1 %112, label %113, label %117
113: ; preds = %110, %103
%114 = load i32, i32* %7
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %114)
%116 = call i32 @exit(i32 1)
unreachable
117: ; preds = %110
br label %118
118: ; preds = %117, %100
%119 = load i32, i32* %9
%120 = sitofp i32 %119 to double
%121 = load i32, i32* %10
%122 = sitofp i32 %121 to double
%123 = load double, double* %14
%124 = fdiv double %123, 6.000000e+01
%125 = fadd double %122, %124
%126 = fdiv double %125, 6.000000e+01
%127 = fadd double %120, %126
%128 = fdiv double %127, 2.400000e+01
store double %128, double* %13
%129 = load i32, i32* %6
%130 = load i32, i32* %7
%131 = load i32, i32* %8
%132 = call double @slaCldj(i32 %129, i32 %130, i32 %131, i32* %11)
store double %132, double* %12
%133 = load double, double* %13
%134 = load double, double* %12
%135 = fadd double %134, %133
store double %135, double* %12
%136 = load i32, i32* %11
%137 = icmp eq i32 %136, 1
br i1 %137, label %138, label %141
138: ; preds = %118
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%140 = call i32 @exit(i32 1)
unreachable
141: ; preds = %118
%142 = load i32, i32* %11
%143 = icmp eq i32 %142, 2
br i1 %143, label %144, label %147
144: ; preds = %141
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%146 = call i32 @exit(i32 1)
unreachable
147: ; preds = %141
%148 = load i32, i32* %11
%149 = icmp eq i32 %148, 3
br i1 %149, label %150, label %153
150: ; preds = %147
%151 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%152 = call i32 @exit(i32 1)
unreachable
153: ; preds = %147
%154 = load double, double* %12
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), double %154)
%156 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [30 x i8] c"\0Amonth = %d is out-of-range.\0A\00"
@.str.2 = [28 x i8] c"\0Aday = %d is out-of-range.\0A\00"
@.str.3 = [29 x i8] c"\0Ahour = %d is out-of-range.\0A\00"
@.str.4 = [28 x i8] c"\0Amin = %d is out-of-range.\0A\00"
@.str.5 = [28 x i8] c"\0Asec = %d is out-of-range.\0A\00"
@.str.9 = [18 x i8] c"\0AMJD is %17.11f\0A\0A\00"
@str = [23 x i8] c"\0ATry again. Bad day.\0A\00"
@str.10 = [25 x i8] c"\0ATry again. Bad month.\0A\00"
@str.11 = [24 x i8] c"\0ATry again. Bad year.\0A\00"
@str.12 = [46 x i8] c"\0AUsage: 'cal2mjd YYYY MM DD HH MM SS.SSSSS'\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.12, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @strtol(i8* nocapture %11, i32* null, i32 10)
%13 = icmp eq i32 %0, 2
br i1 %13, label %68, label %14
14: ; preds = %9
%15 = getelementptr inbounds i8*, i8** %1, i64 2
%16 = load i8*, i8** %15
%17 = tail call i32 @strtol(i8* nocapture %16, i32* null, i32 10)
%18 = add i32 %17, -13
%19 = icmp ult i32 %18, -12
br i1 %19, label %20, label %23
20: ; preds = %14
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%22 = tail call i32 @exit(i32 1)
unreachable
23: ; preds = %14
%24 = icmp ugt i32 %0, 3
br i1 %24, label %25, label %68
25: ; preds = %23
%26 = getelementptr inbounds i8*, i8** %1, i64 3
%27 = load i8*, i8** %26
%28 = tail call i32 @strtol(i8* nocapture %27, i32* null, i32 10)
%29 = add i32 %28, -32
%30 = icmp ult i32 %29, -31
br i1 %30, label %31, label %34
31: ; preds = %25
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%33 = tail call i32 @exit(i32 1)
unreachable
34: ; preds = %25
%35 = icmp ugt i32 %0, 4
br i1 %35, label %36, label %68
36: ; preds = %34
%37 = getelementptr inbounds i8*, i8** %1, i64 4
%38 = load i8*, i8** %37
%39 = tail call i32 @strtol(i8* nocapture %38, i32* null, i32 10)
%40 = icmp eq i32 %39, 24
%41 = select i1 %40, i32 0, i32 %39
%42 = icmp ugt i32 %41, 23
br i1 %42, label %43, label %46
43: ; preds = %36
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%45 = tail call i32 @exit(i32 1)
unreachable
46: ; preds = %36
%47 = icmp ugt i32 %0, 5
br i1 %47, label %48, label %68
48: ; preds = %46
%49 = getelementptr inbounds i8*, i8** %1, i64 5
%50 = load i8*, i8** %49
%51 = tail call i32 @strtol(i8* nocapture %50, i32* null, i32 10)
%52 = icmp ugt i32 %51, 59
br i1 %52, label %53, label %56
53: ; preds = %48
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %17)
%55 = tail call i32 @exit(i32 1)
unreachable
56: ; preds = %48
%57 = icmp ugt i32 %0, 6
br i1 %57, label %58, label %68
58: ; preds = %56
%59 = getelementptr inbounds i8*, i8** %1, i64 6
%60 = load i8*, i8** %59
%61 = tail call double @strtod(i8* nocapture %60, i32* null)
%62 = fcmp olt double %61, 0.000000e+00
%63 = fcmp oge double %61, 6.000000e+01
%64 = or i1 %62, %63
br i1 %64, label %65, label %68
65: ; preds = %58
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %17)
%67 = tail call i32 @exit(i32 1)
unreachable
68: ; preds = %9, %23, %34, %46, %58, %56
%69 = phi i32 [ %51, %58 ], [ %51, %56 ], [ 0, %46 ], [ 0, %34 ], [ 0, %23 ], [ 0, %9 ]
%70 = phi i32 [ %28, %58 ], [ %28, %56 ], [ %28, %46 ], [ %28, %34 ], [ 1, %23 ], [ 1, %9 ]
%71 = phi i32 [ %41, %58 ], [ %41, %56 ], [ %41, %46 ], [ 0, %34 ], [ 0, %23 ], [ 0, %9 ]
%72 = phi i32 [ %17, %58 ], [ %17, %56 ], [ %17, %46 ], [ %17, %34 ], [ %17, %23 ], [ 1, %9 ]
%73 = phi double [ %61, %58 ], [ 0.000000e+00, %56 ], [ 0.000000e+00, %46 ], [ 0.000000e+00, %34 ], [ 0.000000e+00, %23 ], [ 0.000000e+00, %9 ]
%74 = call double @slaCldj(i32 %12, i32 %72, i32 %70, i32* %3)
%75 = load i32, i32* %3
switch i32 %75, label %85 [
i32 1, label %76
i32 2, label %79
i32 3, label %82
]
76: ; preds = %68
%77 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.11, i64 0, i64 0))
%78 = call i32 @exit(i32 1)
unreachable
79: ; preds = %68
%80 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.10, i64 0, i64 0))
%81 = call i32 @exit(i32 1)
unreachable
82: ; preds = %68
%83 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%84 = call i32 @exit(i32 1)
unreachable
85: ; preds = %68
%86 = fdiv double %73, 6.000000e+01
%87 = sitofp i32 %69 to double
%88 = fadd double %86, %87
%89 = fdiv double %88, 6.000000e+01
%90 = sitofp i32 %71 to double
%91 = fadd double %89, %90
%92 = fdiv double %91, 2.400000e+01
%93 = fadd double %74, %92
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), double %93)
%95 = call i32 @exit(i32 0)
unreachable
}