#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_FAILURE;
int abs(int);
scalar_t__ atof(char *);
int atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fabs(float);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
double getcoord(int);
int /*<<< orphan*/ stderr;
void getargs(int argc, char *argv[], int *y, int *m, double *tz, double *glong,
             double *glat) {
  int date, latitude, longitude;
  int mflag = 0, yflag = 0, longflag = 0, latflag = 0, tzflag = 0;
  int longminflag = 0, latminflag = 0, dflag = 0;
  date = atoi(argv[1]);
  *y = date / 100;
  *m = date - *y * 100;
  *tz = (double)atof(argv[2]);
  longitude = atoi(argv[3]);
  latitude = atoi(argv[4]);
  *glong = 0.0174532925199433 * getcoord(longitude);
  *glat = 0.0174532925199433 * getcoord(latitude);
  if (*m > 12 || *m < 1)
    mflag = 1;
  if (*y > 2500)
    yflag = 1;
  if (date < 150001)
    dflag = 1;
  if (fabs((float)*glong) > 180 * 0.0174532925199433)
    longflag = 1;
  if (abs(longitude) % 100 > 59)
    longminflag = 1;
  if (fabs((float)*glat) > 90 * 0.0174532925199433)
    latflag = 1;
  if (abs(latitude) % 100 > 59)
    latminflag = 1;
  if (fabs((float)*tz) > 12)
    tzflag = 1;
  if (dflag == 1) {
    fprintf(stderr, "date: dates must be in form yyyymm, gregorian, and later "
                    "than 1500 AD\n");
  }
  if (yflag == 1) {
    fprintf(stderr, "date: too far in future - accurate from 1500 to 2500\n");
  }
  if (mflag == 1) {
    fprintf(stderr, "date: month must be in range 0 to 12, eg - August 2000 is "
                    "entered as 200008\n");
  }
  if (tzflag == 1) {
    fprintf(stderr, "timz: must be in range +/- 12 hours, eg -6 for Chicago\n");
  }
  if (longflag == 1) {
    fprintf(stderr, "long: must be in range +/- 180 degrees\n");
  }
  if (longminflag == 1) {
    fprintf(stderr, "long: last two digits are arcmin - max 59\n");
  }
  if (latflag == 1) {
    fprintf(stderr, " lat: must be in range +/- 90 degrees\n");
  }
  if (latminflag == 1) {
    fprintf(stderr, " lat: last two digits are arcmin - max 59\n");
  }
  if (dflag + mflag + yflag + longflag + latflag + tzflag + longminflag +
          latminflag >
      0) {
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<getargs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x34(%rbp),%ecx
mov    -0x18(%rbp),%rax
imul   $0x64,(%rax),%eax
sub    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atof@plt>
cvtsi2sd %rax,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x38(%rbp)
mov    -0x3c(%rbp),%edi
call   1030 <getcoord@plt>
movaps %xmm0,%xmm1
movsd  0xdb3(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%edi
call   1030 <getcoord@plt>
movaps %xmm0,%xmm1
movsd  0xd94(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
cmpl   $0xc,(%rax)
jg     1292 <getargs+0x122>
mov    -0x20(%rbp),%rax
cmpl   $0x1,(%rax)
jge    1299 <getargs+0x129>
movl   $0x1,-0x40(%rbp)
mov    -0x18(%rbp),%rax
cmpl   $0x9c4,(%rax)
jle    12b0 <getargs+0x140>
movl   $0x1,-0x44(%rbp)
cmpl   $0x249f1,-0x34(%rbp)
jge    12c4 <getargs+0x154>
movl   $0x1,-0x5c(%rbp)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1060 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xd27(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12f2 <getargs+0x182>
movl   $0x1,-0x48(%rbp)
mov    -0x3c(%rbp),%edi
call   1040 <abs@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x3b,%edx
jle    1312 <getargs+0x1a2>
movl   $0x1,-0x54(%rbp)
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1060 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xce1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1340 <getargs+0x1d0>
movl   $0x1,-0x4c(%rbp)
mov    -0x38(%rbp),%edi
call   1040 <abs@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x3b,%edx
jle    1360 <getargs+0x1f0>
movl   $0x1,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1060 <fabs@plt>
cmp    $0xc,%eax
jle    1381 <getargs+0x211>
movl   $0x1,-0x50(%rbp)
cmpl   $0x1,-0x5c(%rbp)
jne    13a0 <getargs+0x230>
mov    0x2c4e(%rip),%rax
mov    (%rax),%edi
lea    0xc7d(%rip),%rsi
call   1070 <fprintf@plt>
cmpl   $0x1,-0x44(%rbp)
jne    13bf <getargs+0x24f>
mov    0x2c2f(%rip),%rax
mov    (%rax),%edi
lea    0xca5(%rip),%rsi
call   1070 <fprintf@plt>
cmpl   $0x1,-0x40(%rbp)
jne    13de <getargs+0x26e>
mov    0x2c10(%rip),%rax
mov    (%rax),%edi
lea    0xcbc(%rip),%rsi
call   1070 <fprintf@plt>
cmpl   $0x1,-0x50(%rbp)
jne    13fd <getargs+0x28d>
mov    0x2bf1(%rip),%rax
mov    (%rax),%edi
lea    0xcea(%rip),%rsi
call   1070 <fprintf@plt>
cmpl   $0x1,-0x48(%rbp)
jne    141c <getargs+0x2ac>
mov    0x2bd2(%rip),%rax
mov    (%rax),%edi
lea    0xd03(%rip),%rsi
call   1070 <fprintf@plt>
cmpl   $0x1,-0x54(%rbp)
jne    143b <getargs+0x2cb>
mov    0x2bb3(%rip),%rax
mov    (%rax),%edi
lea    0xd0c(%rip),%rsi
call   1070 <fprintf@plt>
cmpl   $0x1,-0x4c(%rbp)
jne    145a <getargs+0x2ea>
mov    0x2b94(%rip),%rax
mov    (%rax),%edi
lea    0xd18(%rip),%rsi
call   1070 <fprintf@plt>
cmpl   $0x1,-0x58(%rbp)
jne    1479 <getargs+0x309>
mov    0x2b75(%rip),%rax
mov    (%rax),%edi
lea    0xd20(%rip),%rsi
call   1070 <fprintf@plt>
mov    -0x5c(%rbp),%eax
add    -0x40(%rbp),%eax
add    -0x44(%rbp),%eax
add    -0x48(%rbp),%eax
add    -0x4c(%rbp),%eax
add    -0x50(%rbp),%eax
add    -0x54(%rbp),%eax
add    -0x58(%rbp),%eax
cmp    $0x0,%eax
jle    14a8 <getargs+0x338>
mov    0x2b37(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getargs>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,%r14
mov    %r8,%rbx
mov    %r8,0x10(%rsp)
mov    %rcx,%r13
mov    %rdx,%r12
mov    %rsi,%rbp
mov    0x8(%rsi),%rdi
call   1070 <atoi@plt>
movslq %eax,%r15
imul   $0x51eb851f,%r15,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
mov    %eax,(%r12)
imul   $0xffffff9c,%eax,%eax
add    %r15d,%eax
mov    %r15,0x30(%rsp)
mov    %eax,0x0(%r13)
mov    0x10(%rbp),%rdi
call   1040 <atof@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rbx)
mov    0x18(%rbp),%rdi
call   1070 <atoi@plt>
mov    %eax,%ebx
mov    0x20(%rbp),%rdi
call   1070 <atoi@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <getcoord@plt>
mulsd  0xe14(%rip),%xmm0
movsd  %xmm0,(%r14)
mov    %ebp,%edi
call   1030 <getcoord@plt>
mulsd  0xe00(%rip),%xmm0
mov    0x70(%rsp),%rax
movsd  %xmm0,(%rax)
mov    0x0(%r13),%eax
add    $0xfffffff3,%eax
mov    %eax,0x1c(%rsp)
cmp    $0xfffffff4,%eax
setb   0xf(%rsp)
mov    (%r12),%eax
mov    %eax,0x20(%rsp)
cmp    $0x9c5,%eax
setge  0xe(%rsp)
cmp    $0x249f1,%r15d
setl   0xd(%rsp)
movsd  (%r14),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1050 <fabs@plt>
mov    %eax,0x24(%rsp)
cmp    $0x4,%eax
setge  0xc(%rsp)
mov    %ebx,%r12d
neg    %r12d
cmovs  %ebx,%r12d
imul   $0x51eb851f,%r12,%rax
shr    $0x25,%rax
imul   $0x64,%eax,%eax
sub    %eax,%r12d
xor    %r13d,%r13d
cmp    $0x3c,%r12d
setae  0xb(%rsp)
mov    0x70(%rsp),%rax
movsd  (%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1050 <fabs@plt>
mov    %eax,0x28(%rsp)
cmp    $0x2,%eax
setge  0xa(%rsp)
mov    %ebp,%r15d
neg    %r15d
cmovs  %ebp,%r15d
imul   $0x51eb851f,%r15,%rax
shr    $0x25,%rax
imul   $0x64,%eax,%eax
sub    %eax,%r15d
xor    %eax,%eax
cmp    $0x3c,%r15d
adc    $0xffffffff,%eax
mov    %eax,0x2c(%rsp)
mov    0x10(%rsp),%rax
movsd  (%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1050 <fabs@plt>
mov    %eax,%ebx
cmp    $0xd,%eax
setge  0x9(%rsp)
cmpl   $0x249f0,0x30(%rsp)
jle    1423 <getargs+0x2c3>
cmpl   $0x9c5,0x20(%rsp)
jge    1446 <getargs+0x2e6>
cmpl   $0xfffffff3,0x1c(%rsp)
ja     1315 <getargs+0x1b5>
mov    0x2cd9(%rip),%rax
mov    (%rax),%edi
lea    0xd75(%rip),%rsi
call   1060 <fprintf@plt>
cmp    $0xd,%ebx
movl   $0x0,0x10(%rsp)
jl     1337 <getargs+0x1d7>
mov    0x2cb7(%rip),%rax
mov    (%rax),%edi
lea    0xda0(%rip),%rsi
call   1060 <fprintf@plt>
cmpl   $0x4,0x24(%rsp)
mov    $0x0,%r14d
jl     1359 <getargs+0x1f9>
mov    0x2c95(%rip),%rax
mov    (%rax),%edi
lea    0xdb6(%rip),%rsi
call   1060 <fprintf@plt>
cmp    $0x3c,%r12d
jb     1374 <getargs+0x214>
mov    0x2c7a(%rip),%rax
mov    (%rax),%edi
lea    0xdc3(%rip),%rsi
call   1060 <fprintf@plt>
cmpl   $0x2,0x28(%rsp)
mov    $0x0,%ebp
mov    $0x0,%ebx
mov    $0x0,%r12d
jl     13a0 <getargs+0x240>
mov    0x2c4e(%rip),%rax
mov    (%rax),%edi
lea    0xdc2(%rip),%rsi
call   1060 <fprintf@plt>
mov    0xf(%rsp),%al
mov    %al,%r14b
mov    0xe(%rsp),%al
mov    0x10(%rsp),%ecx
mov    %al,%cl
mov    %ecx,0x10(%rsp)
mov    0xd(%rsp),%al
xor    %ecx,%ecx
mov    %al,%cl
mov    0xc(%rsp),%al
mov    %al,%bpl
mov    0xb(%rsp),%al
mov    %al,%r13b
mov    0xa(%rsp),%al
mov    %al,%bl
mov    0x9(%rsp),%al
mov    %al,%r12b
cmp    $0x3c,%r15d
jb     13f9 <getargs+0x299>
mov    0x2bfb(%rip),%rax
mov    (%rax),%edi
lea    0xd96(%rip),%rsi
mov    %ecx,%r15d
call   1060 <fprintf@plt>
mov    %r15d,%ecx
add    %ecx,%r13d
add    %r14d,%r13d
add    0x10(%rsp),%r13d
add    %ebp,%r13d
add    %ebx,%r13d
add    %r12d,%r13d
cmp    0x2c(%rsp),%r13d
jne    146b <getargs+0x30b>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2bb6(%rip),%rax
mov    (%rax),%edi
lea    0xbd5(%rip),%rsi
call   1060 <fprintf@plt>
cmpl   $0x9c5,0x20(%rsp)
jl     12f9 <getargs+0x199>
mov    0x2b93(%rip),%rax
mov    (%rax),%edi
lea    0xbf9(%rip),%rsi
call   1060 <fprintf@plt>
cmpl   $0xfffffff3,0x1c(%rsp)
jbe    1300 <getargs+0x1a0>
jmp    1315 <getargs+0x1b5>
mov    0x2b66(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [71 x i8] c"date: dates must be in form yyyymm, gregorian, and later than 1500 AD\0A\00"
@.str.1 = [54 x i8] c"date: too far in future - accurate from 1500 to 2500\0A\00"
@.str.2 = [77 x i8] c"date: month must be in range 0 to 12, eg - August 2000 is entered as 200008\0A\00"
@.str.3 = [56 x i8] c"timz: must be in range +/- 12 hours, eg -6 for Chicago\0A\00"
@.str.4 = [40 x i8] c"long: must be in range +/- 180 degrees\0A\00"
@.str.5 = [43 x i8] c"long: last two digits are arcmin - max 59\0A\00"
@.str.6 = [39 x i8] c" lat: must be in range +/- 90 degrees\0A\00"
@.str.7 = [43 x i8] c" lat: last two digits are arcmin - max 59\0A\00"
@EXIT_FAILURE = global i32 0
define void @getargs(i32 %0, i8** %1, i32* %2, i32* %3, double* %4, double* %5, double* %6) {
%8 = alloca i32
%9 = alloca i8**
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
store i32 %0, i32* %8
store i8** %1, i8*** %9
store i32* %2, i32** %10
store i32* %3, i32** %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
store i32 0, i32* %18
store i32 0, i32* %19
store i32 0, i32* %20
store i32 0, i32* %21
store i32 0, i32* %22
store i32 0, i32* %23
store i32 0, i32* %24
store i32 0, i32* %25
%26 = load i8**, i8*** %9
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = call i32 @atoi(i8* %28)
store i32 %29, i32* %15
%30 = load i32, i32* %15
%31 = sdiv i32 %30, 100
%32 = load i32*, i32** %10
store i32 %31, i32* %32
%33 = load i32, i32* %15
%34 = load i32*, i32** %10
%35 = load i32, i32* %34
%36 = mul nsw i32 %35, 100
%37 = sub nsw i32 %33, %36
%38 = load i32*, i32** %11
store i32 %37, i32* %38
%39 = load i8**, i8*** %9
%40 = getelementptr inbounds i8*, i8** %39, i64 2
%41 = load i8*, i8** %40
%42 = call i64 @atof(i8* %41)
%43 = sitofp i64 %42 to double
%44 = load double*, double** %12
store double %43, double* %44
%45 = load i8**, i8*** %9
%46 = getelementptr inbounds i8*, i8** %45, i64 3
%47 = load i8*, i8** %46
%48 = call i32 @atoi(i8* %47)
store i32 %48, i32* %17
%49 = load i8**, i8*** %9
%50 = getelementptr inbounds i8*, i8** %49, i64 4
%51 = load i8*, i8** %50
%52 = call i32 @atoi(i8* %51)
store i32 %52, i32* %16
%53 = load i32, i32* %17
%54 = call double @getcoord(i32 %53)
%55 = fmul double 0x3F91DF46A2529D3A, %54
%56 = load double*, double** %13
store double %55, double* %56
%57 = load i32, i32* %16
%58 = call double @getcoord(i32 %57)
%59 = fmul double 0x3F91DF46A2529D3A, %58
%60 = load double*, double** %14
store double %59, double* %60
%61 = load i32*, i32** %11
%62 = load i32, i32* %61
%63 = icmp sgt i32 %62, 12
br i1 %63, label %68, label %64
64: ; preds = %7
%65 = load i32*, i32** %11
%66 = load i32, i32* %65
%67 = icmp slt i32 %66, 1
br i1 %67, label %68, label %69
68: ; preds = %64, %7
store i32 1, i32* %18
br label %69
69: ; preds = %68, %64
%70 = load i32*, i32** %10
%71 = load i32, i32* %70
%72 = icmp sgt i32 %71, 2500
br i1 %72, label %73, label %74
73: ; preds = %69
store i32 1, i32* %19
br label %74
74: ; preds = %73, %69
%75 = load i32, i32* %15
%76 = icmp slt i32 %75, 150001
br i1 %76, label %77, label %78
77: ; preds = %74
store i32 1, i32* %25
br label %78
78: ; preds = %77, %74
%79 = load double*, double** %13
%80 = load double, double* %79
%81 = fptrunc double %80 to float
%82 = call i32 @fabs(float %81)
%83 = sitofp i32 %82 to double
%84 = fcmp ogt double %83, 0x400921FB54442D1A
br i1 %84, label %85, label %86
85: ; preds = %78
store i32 1, i32* %20
br label %86
86: ; preds = %85, %78
%87 = load i32, i32* %17
%88 = call i32 @abs(i32 %87)
%89 = srem i32 %88, 100
%90 = icmp sgt i32 %89, 59
br i1 %90, label %91, label %92
91: ; preds = %86
store i32 1, i32* %23
br label %92
92: ; preds = %91, %86
%93 = load double*, double** %14
%94 = load double, double* %93
%95 = fptrunc double %94 to float
%96 = call i32 @fabs(float %95)
%97 = sitofp i32 %96 to double
%98 = fcmp ogt double %97, 0x3FF921FB54442D1A
br i1 %98, label %99, label %100
99: ; preds = %92
store i32 1, i32* %21
br label %100
100: ; preds = %99, %92
%101 = load i32, i32* %16
%102 = call i32 @abs(i32 %101)
%103 = srem i32 %102, 100
%104 = icmp sgt i32 %103, 59
br i1 %104, label %105, label %106
105: ; preds = %100
store i32 1, i32* %24
br label %106
106: ; preds = %105, %100
%107 = load double*, double** %12
%108 = load double, double* %107
%109 = fptrunc double %108 to float
%110 = call i32 @fabs(float %109)
%111 = icmp sgt i32 %110, 12
br i1 %111, label %112, label %113
112: ; preds = %106
store i32 1, i32* %22
br label %113
113: ; preds = %112, %106
%114 = load i32, i32* %25
%115 = icmp eq i32 %114, 1
br i1 %115, label %116, label %119
116: ; preds = %113
%117 = load i32, i32* @stderr
%118 = call i32 @fprintf(i32 %117, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
br label %119
119: ; preds = %116, %113
%120 = load i32, i32* %19
%121 = icmp eq i32 %120, 1
br i1 %121, label %122, label %125
122: ; preds = %119
%123 = load i32, i32* @stderr
%124 = call i32 @fprintf(i32 %123, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
br label %125
125: ; preds = %122, %119
%126 = load i32, i32* %18
%127 = icmp eq i32 %126, 1
br i1 %127, label %128, label %131
128: ; preds = %125
%129 = load i32, i32* @stderr
%130 = call i32 @fprintf(i32 %129, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.2, i64 0, i64 0))
br label %131
131: ; preds = %128, %125
%132 = load i32, i32* %22
%133 = icmp eq i32 %132, 1
br i1 %133, label %134, label %137
134: ; preds = %131
%135 = load i32, i32* @stderr
%136 = call i32 @fprintf(i32 %135, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
br label %137
137: ; preds = %134, %131
%138 = load i32, i32* %20
%139 = icmp eq i32 %138, 1
br i1 %139, label %140, label %143
140: ; preds = %137
%141 = load i32, i32* @stderr
%142 = call i32 @fprintf(i32 %141, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
br label %143
143: ; preds = %140, %137
%144 = load i32, i32* %23
%145 = icmp eq i32 %144, 1
br i1 %145, label %146, label %149
146: ; preds = %143
%147 = load i32, i32* @stderr
%148 = call i32 @fprintf(i32 %147, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
br label %149
149: ; preds = %146, %143
%150 = load i32, i32* %21
%151 = icmp eq i32 %150, 1
br i1 %151, label %152, label %155
152: ; preds = %149
%153 = load i32, i32* @stderr
%154 = call i32 @fprintf(i32 %153, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0))
br label %155
155: ; preds = %152, %149
%156 = load i32, i32* %24
%157 = icmp eq i32 %156, 1
br i1 %157, label %158, label %161
158: ; preds = %155
%159 = load i32, i32* @stderr
%160 = call i32 @fprintf(i32 %159, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0))
br label %161
161: ; preds = %158, %155
%162 = load i32, i32* %25
%163 = load i32, i32* %18
%164 = add nsw i32 %162, %163
%165 = load i32, i32* %19
%166 = add nsw i32 %164, %165
%167 = load i32, i32* %20
%168 = add nsw i32 %166, %167
%169 = load i32, i32* %21
%170 = add nsw i32 %168, %169
%171 = load i32, i32* %22
%172 = add nsw i32 %170, %171
%173 = load i32, i32* %23
%174 = add nsw i32 %172, %173
%175 = load i32, i32* %24
%176 = add nsw i32 %174, %175
%177 = icmp sgt i32 %176, 0
br i1 %177, label %178, label %181
178: ; preds = %161
%179 = load i32, i32* @EXIT_FAILURE
%180 = call i32 @exit(i32 %179)
unreachable
181: ; preds = %161
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [71 x i8] c"date: dates must be in form yyyymm, gregorian, and later than 1500 AD\0A\00"
@.str.1 = [54 x i8] c"date: too far in future - accurate from 1500 to 2500\0A\00"
@.str.2 = [77 x i8] c"date: month must be in range 0 to 12, eg - August 2000 is entered as 200008\0A\00"
@.str.3 = [56 x i8] c"timz: must be in range +/- 12 hours, eg -6 for Chicago\0A\00"
@.str.4 = [40 x i8] c"long: must be in range +/- 180 degrees\0A\00"
@.str.5 = [43 x i8] c"long: last two digits are arcmin - max 59\0A\00"
@.str.6 = [39 x i8] c" lat: must be in range +/- 90 degrees\0A\00"
@.str.7 = [43 x i8] c" lat: last two digits are arcmin - max 59\0A\00"
@EXIT_FAILURE = global i32 0
define void @getargs(i32 %0, i8** nocapture %1, i32* nocapture %2, i32* nocapture %3, double* nocapture %4, double* nocapture %5, double* nocapture %6) {
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = sdiv i32 %10, 100
store i32 %11, i32* %2
%12 = mul nsw i32 %11, -100
%13 = add i32 %12, %10
store i32 %13, i32* %3
%14 = getelementptr inbounds i8*, i8** %1, i64 2
%15 = load i8*, i8** %14
%16 = tail call i64 @atof(i8* %15)
%17 = sitofp i64 %16 to double
store double %17, double* %4
%18 = getelementptr inbounds i8*, i8** %1, i64 3
%19 = load i8*, i8** %18
%20 = tail call i32 @atoi(i8* %19)
%21 = getelementptr inbounds i8*, i8** %1, i64 4
%22 = load i8*, i8** %21
%23 = tail call i32 @atoi(i8* %22)
%24 = tail call double @getcoord(i32 %20)
%25 = fmul double %24, 0x3F91DF46A2529D3A
store double %25, double* %5
%26 = tail call double @getcoord(i32 %23)
%27 = fmul double %26, 0x3F91DF46A2529D3A
store double %27, double* %6
%28 = load i32, i32* %3
%29 = add i32 %28, -13
%30 = icmp ult i32 %29, -12
%31 = zext i1 %30 to i32
%32 = load i32, i32* %2
%33 = icmp sgt i32 %32, 2500
%34 = zext i1 %33 to i32
%35 = icmp slt i32 %10, 150001
%36 = zext i1 %35 to i32
%37 = load double, double* %5
%38 = fptrunc double %37 to float
%39 = tail call i32 @fabs(float %38)
%40 = icmp sgt i32 %39, 3
%41 = zext i1 %40 to i32
%42 = tail call i32 @llvm.abs.i32(i32 %20, i1 true)
%43 = urem i32 %42, 100
%44 = icmp ugt i32 %43, 59
%45 = zext i1 %44 to i32
%46 = load double, double* %6
%47 = fptrunc double %46 to float
%48 = tail call i32 @fabs(float %47)
%49 = icmp sgt i32 %48, 1
%50 = zext i1 %49 to i32
%51 = tail call i32 @llvm.abs.i32(i32 %23, i1 true)
%52 = urem i32 %51, 100
%53 = icmp ugt i32 %52, 59
%54 = sext i1 %53 to i32
%55 = load double, double* %4
%56 = fptrunc double %55 to float
%57 = tail call i32 @fabs(float %56)
%58 = icmp sgt i32 %57, 12
%59 = zext i1 %58 to i32
br i1 %35, label %60, label %63
60: ; preds = %7
%61 = load i32, i32* @stderr
%62 = tail call i32 @fprintf(i32 %61, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
br label %63
63: ; preds = %60, %7
br i1 %33, label %64, label %67
64: ; preds = %63
%65 = load i32, i32* @stderr
%66 = tail call i32 @fprintf(i32 %65, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
br label %67
67: ; preds = %64, %63
br i1 %30, label %68, label %71
68: ; preds = %67
%69 = load i32, i32* @stderr
%70 = tail call i32 @fprintf(i32 %69, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.2, i64 0, i64 0))
br label %71
71: ; preds = %68, %67
br i1 %58, label %72, label %75
72: ; preds = %71
%73 = load i32, i32* @stderr
%74 = tail call i32 @fprintf(i32 %73, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
br label %75
75: ; preds = %72, %71
br i1 %40, label %76, label %79
76: ; preds = %75
%77 = load i32, i32* @stderr
%78 = tail call i32 @fprintf(i32 %77, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
br label %79
79: ; preds = %76, %75
br i1 %44, label %80, label %83
80: ; preds = %79
%81 = load i32, i32* @stderr
%82 = tail call i32 @fprintf(i32 %81, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
br label %83
83: ; preds = %80, %79
br i1 %49, label %84, label %87
84: ; preds = %83
%85 = load i32, i32* @stderr
%86 = tail call i32 @fprintf(i32 %85, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0))
br label %87
87: ; preds = %84, %83
br i1 %53, label %88, label %91
88: ; preds = %87
%89 = load i32, i32* @stderr
%90 = tail call i32 @fprintf(i32 %89, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0))
br label %91
91: ; preds = %88, %87
%92 = add nuw nsw i32 %45, %36
%93 = add nuw nsw i32 %92, %31
%94 = add nuw nsw i32 %93, %34
%95 = add nuw nsw i32 %94, %41
%96 = add nuw nsw i32 %95, %50
%97 = add nuw nsw i32 %96, %59
%98 = icmp eq i32 %97, %54
br i1 %98, label %102, label %99
99: ; preds = %91
%100 = load i32, i32* @EXIT_FAILURE
%101 = tail call i32 @exit(i32 %100)
unreachable
102: ; preds = %91
ret void
}