#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 */
double ang_dist(double, double, double, double);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ get_omega(double *, double *);
scalar_t__ get_valerr(double *, double *, char *);
int /*<<< orphan*/ printf(char *, ...);
int sscanf(char *, char *, double *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  int contin = 1;
  double offset;
  double sigv;
  double dsigv = 0.0;
  double v2;
  double zl, zs;
  double dzl, dzs;
  double omega0 = 1.0;
  double lambda = 0.0;
  double dal, das, dals;
  double theta_E;
  double gamma;
  char line[1000];
  dzl = dzs = 0.0;
  if (get_valerr(&sigv, &dsigv, "SIS velocity dispersion (km/sec)") == 0) {
    fprintf(stderr, "\nERROR.  Exiting calc_er.c\n\n");
    return 1;
  }
  v2 = 1.0e10 * sigv * sigv;
  if (get_valerr(&zl, &dzl, "redshift of SIS") == 0) {
    fprintf(stderr, "\nERROR.  Exiting sis_sigv.\n\n");
    return 1;
  }
  if (get_valerr(&zs, &dzs, "redshift of background source") == 0) {
    fprintf(stderr, "\nERROR.  Exiting sis_sigv.\n\n");
    return 1;
  }
  printf("\nEnter offset of SIS center from lens system (arcsec): ");
  fgets(line, 1000, stdin);
  while (sscanf(line, "%lf", &offset) != 1 || offset < 0.0) {
    fprintf(stderr, "ERROR.  Bad input.  Enter offst again.  ");
    fgets(line, 1000, stdin);
  }
  while (contin) {
    printf("\n");
    get_omega(&omega0, &lambda);
    printf("  Omega_m       = %f\n", omega0);
    printf("  Omega_Lambda  = %f\n\n", lambda);
    dal = ang_dist(0.0, zl, omega0, lambda) / 3.1e24;
    das = ang_dist(0.0, zs, omega0, lambda) / 3.1e24;
    dals = ang_dist(zl, zs, omega0, lambda) / 3.1e24;
    theta_E =
        206265.0 * 4 * 3.141592653589793 * v2 * dals / (3.0e10 * 3.0e10 * das);
    if (offset > theta_E)
      gamma = theta_E / (2.0 * offset);
    printf("\n--------------------------------------------------\n\n");
    printf("Inputs:\n");
    printf("  z_l           = %f\n", zl);
    printf("  z_s           = %f\n", zs);
    printf("  Omega_m       = %f\n", omega0);
    printf("  Omega_Lambda  = %f\n", lambda);
    printf("  sigma_V       = %5.0f km/sec\n\n", sigv);
    printf("Calculated quantities:\n");
    printf("   D_l           = %4.0f h^{-1} Mpc\n", dal);
    printf("   D_s           = %4.0f h^{-1} Mpc\n", das);
    printf("   D_ls          = %4.0f h^{-1} Mpc\n", dals);
    printf("   D_ls / D_s    = %6.3f\n", dals / das);
    printf("   theta_E       = %6.3f arcsec\n", theta_E);
    if (offset > theta_E)
      printf("   shear         = %5.3f\n", gamma);
    printf("\n--------------------------------------------------\n\n");
    printf("Another (Omega_m, Omega_Lambda)? (y/n) [y] ");
    fgets(line, 1000, stdin);
    if (line[0] == 'N' || line[0] == 'n')
      contin = 0;
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x490,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe60(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    0xe64(%rip),%rdx
call   1030 <get_valerr@plt>
cmp    $0x0,%rax
jne    11fc <main+0x8c>
mov    0x2df6(%rip),%rax
mov    (%rax),%edi
lea    0xe66(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15f4 <main+0x484>
movsd  0xe04(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    0xe4c(%rip),%rdx
call   1030 <get_valerr@plt>
cmp    $0x0,%rax
jne    1252 <main+0xe2>
mov    0x2da0(%rip),%rax
mov    (%rax),%edi
lea    0xe3d(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15f4 <main+0x484>
lea    -0x48(%rbp),%rdi
lea    -0x58(%rbp),%rsi
lea    0xe3a(%rip),%rdx
call   1030 <get_valerr@plt>
cmp    $0x0,%rax
jne    1291 <main+0x121>
mov    0x2d61(%rip),%rax
mov    (%rax),%edi
lea    0xdfe(%rip),%rsi
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15f4 <main+0x484>
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x480(%rbp),%rdi
mov    0x2d3b(%rip),%rax
mov    (%rax),%edx
mov    $0x3e8,%esi
call   1070 <fgets@plt>
lea    -0x480(%rbp),%rdi
lea    0xe2a(%rip),%rsi
lea    -0x20(%rbp),%rdx
call   1090 <sscanf@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x1,%ecx
mov    %al,-0x481(%rbp)
jne    12f4 <main+0x184>
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
seta   %al
mov    %al,-0x481(%rbp)
mov    -0x481(%rbp),%al
test   $0x1,%al
jne    1307 <main+0x197>
jmp    133b <main+0x1cb>
mov    0x2cca(%rip),%rax
mov    (%rax),%edi
lea    0xdde(%rip),%rsi
call   1080 <fprintf@plt>
lea    -0x480(%rbp),%rdi
mov    0x2cbe(%rip),%rax
mov    (%rax),%edx
mov    $0x3e8,%esi
call   1070 <fgets@plt>
jmp    12b9 <main+0x149>
jmp    1340 <main+0x1d0>
cmpl   $0x0,-0x14(%rbp)
je     15df <main+0x46f>
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
lea    -0x68(%rbp),%rsi
call   1050 <get_omega@plt>
movsd  -0x60(%rbp),%xmm0
lea    0xdad(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x68(%rbp),%xmm0
lea    0xdb0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x40(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm3
xorps  %xmm0,%xmm0
call   1060 <ang_dist@plt>
movsd  0xc76(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm3
xorps  %xmm0,%xmm0
call   1060 <ang_dist@plt>
movsd  0xc4e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm3
call   1060 <ang_dist@plt>
movsd  0xc24(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xc0b(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  0xbf1(%rip),%xmm1
mulsd  -0x78(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
ucomisd -0x88(%rbp),%xmm0
ff
jbe    1464 <main+0x2f4>
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xbd5(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
lea    0xce0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd08(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x40(%rbp),%xmm0
lea    0xcfe(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x48(%rbp),%xmm0
lea    0xd01(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x60(%rbp),%xmm0
lea    0xc6c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x68(%rbp),%xmm0
lea    0xcf1(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x28(%rbp),%xmm0
lea    0xcf4(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xd07(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x70(%rbp),%xmm0
lea    0xd0c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x78(%rbp),%xmm0
lea    0xd1e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x80(%rbp),%xmm0
lea    0xd30(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x80(%rbp),%xmm0
divsd  -0x78(%rbp),%xmm0
lea    0xd3d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x88(%rbp),%xmm0
ff
lea    0xd41(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x88(%rbp),%xmm0
ff
jbe    157d <main+0x40d>
movsd  -0x90(%rbp),%xmm0
ff
lea    0xd39(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xbc7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x480(%rbp),%rdi
mov    0x2a41(%rip),%rax
mov    (%rax),%edx
mov    $0x3e8,%esi
call   1070 <fgets@plt>
movsbl -0x480(%rbp),%eax
cmp    $0x4e,%eax
je     15d3 <main+0x463>
movsbl -0x480(%rbp),%eax
cmp    $0x6e,%eax
jne    15da <main+0x46a>
movl   $0x0,-0x14(%rbp)
jmp    1340 <main+0x1d0>
lea    0xb99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x490,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x468,%rsp
movq   $0x0,0x78(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x10(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x68(%rsp)
movq   $0x0,0x70(%rsp)
lea    0xe45(%rip),%rdx
lea    0x58(%rsp),%rdi
lea    0x78(%rsp),%rsi
call   1050 <get_valerr@plt>
test   %rax,%rax
je     1553 <main+0x3c3>
movsd  0x58(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
lea    0xe58(%rip),%rdx
lea    0x40(%rsp),%rdi
lea    0x70(%rsp),%rsi
call   1050 <get_valerr@plt>
test   %rax,%rax
je     1565 <main+0x3d5>
lea    0xe66(%rip),%rdx
lea    0x38(%rsp),%rdi
lea    0x68(%rsp),%rsi
call   1050 <get_valerr@plt>
test   %rax,%rax
je     1565 <main+0x3d5>
movsd  0xdbb(%rip),%xmm0
movsd  0x18(%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x28(%rsp)
lea    0xe49(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2d7a(%rip),%r14
jmp    1285 <main+0xf5>
mov    0x2d61(%rip),%rax
mov    (%rax),%edi
lea    0xe65(%rip),%rsi
call   10a0 <fprintf@plt>
mov    (%r14),%edx
lea    0x80(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1090 <fgets@plt>
lea    0xe3d(%rip),%rsi
lea    0x20(%rsp),%rdx
mov    %rbx,%rdi
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
jne    1270 <main+0xe0>
xorpd  %xmm0,%xmm0
ucomisd 0x20(%rsp),%xmm0
ja     1270 <main+0xe0>
movsd  0x28(%rsp),%xmm0
mulsd  0xd38(%rip),%xmm0
movsd  %xmm0,0x28(%rsp)
lea    0xe31(%rip),%r13
lea    0xfc9(%rip),%rbx
lea    0xf3c(%rip),%r15
lea    0xf70(%rip),%r12
lea    0x80(%rsp),%rbp
jmp    1334 <main+0x1a4>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    (%r14),%edx
mov    %rbp,%rdi
mov    $0x3e8,%esi
call   1090 <fgets@plt>
movzbl 0x80(%rsp),%eax
and    $0xdf,%al
cmp    $0x4e,%al
je     1581 <main+0x3f1>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1070 <get_omega@plt>
movsd  0x10(%rsp),%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0x8(%rsp),%xmm0
lea    0xdba(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0x40(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
xorpd  %xmm0,%xmm0
call   1080 <ang_dist@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x38(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
xorpd  %xmm0,%xmm0
call   1080 <ang_dist@plt>
movapd %xmm0,%xmm1
movsd  0xc57(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x40(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1080 <ang_dist@plt>
divsd  0xc28(%rip),%xmm0
movsd  0x28(%rsp),%xmm2
movsd  %xmm0,0x50(%rsp)
mulsd  %xmm0,%xmm2
movsd  0x18(%rsp),%xmm0
mulsd  0xc12(%rip),%xmm0
divsd  %xmm0,%xmm2
movsd  0x20(%rsp),%xmm0
ucomisd %xmm2,%xmm0
jbe    1428 <main+0x298>
addsd  %xmm0,%xmm0
movapd %xmm2,%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x60(%rsp)
movsd  0x30(%rsp),%xmm0
divsd  0xbda(%rip),%xmm0
movsd  %xmm0,0x30(%rsp)
mov    %rbx,%rdi
movsd  %xmm2,0x48(%rsp)
call   1040 <puts@plt>
lea    0xe3d(%rip),%rdi
call   1040 <puts@plt>
movsd  0x40(%rsp),%xmm0
lea    0xcd8(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0x38(%rsp),%xmm0
lea    0xcda(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0x10(%rsp),%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0x8(%rsp),%xmm0
lea    0xccc(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0x58(%rsp),%xmm0
lea    0xcce(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xdd9(%rip),%rdi
call   1040 <puts@plt>
lea    0xcd5(%rip),%rdi
movsd  0x30(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xce6(%rip),%rdi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xcf7(%rip),%rdi
movsd  0x50(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0x50(%rsp),%xmm0
divsd  0x18(%rsp),%xmm0
lea    0xcfc(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    %r15,%rdi
movsd  0x48(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0x20(%rsp),%xmm0
ucomisd 0x48(%rsp),%xmm0
jbe    1300 <main+0x170>
lea    0xd07(%rip),%rdi
movsd  0x60(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
jmp    1300 <main+0x170>
mov    0x2a7e(%rip),%rax
mov    (%rax),%edi
lea    0xade(%rip),%rsi
jmp    1575 <main+0x3e5>
mov    0x2a6c(%rip),%rax
mov    (%rax),%edi
lea    0xaf9(%rip),%rsi
call   10a0 <fprintf@plt>
mov    $0x1,%eax
jmp    158d <main+0x3fd>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x468,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"SIS velocity dispersion (km/sec)\00"
@stderr = global i32 0
@.str.1 = [29 x i8] c"\0AERROR. Exiting calc_er.c\0A\0A\00"
@.str.2 = [16 x i8] c"redshift of SIS\00"
@.str.3 = [29 x i8] c"\0AERROR. Exiting sis_sigv.\0A\0A\00"
@.str.4 = [30 x i8] c"redshift of background source\00"
@.str.5 = [56 x i8] c"\0AEnter offset of SIS center from lens system (arcsec): \00"
@stdin = global i32 0
@.str.6 = [4 x i8] c"%lf\00"
@.str.7 = [41 x i8] c"ERROR. Bad input. Enter offst again. \00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [22 x i8] c" Omega_m = %f\0A\00"
@.str.10 = [23 x i8] c" Omega_Lambda = %f\0A\0A\00"
@.str.11 = [54 x i8] c"\0A--------------------------------------------------\0A\0A\00"
@.str.12 = [9 x i8] c"Inputs:\0A\00"
@.str.13 = [22 x i8] c" z_l = %f\0A\00"
@.str.14 = [22 x i8] c" z_s = %f\0A\00"
@.str.15 = [22 x i8] c" Omega_Lambda = %f\0A\00"
@.str.16 = [33 x i8] c" sigma_V = %5.0f km/sec\0A\0A\00"
@.str.17 = [24 x i8] c"Calculated quantities:\0A\00"
@.str.18 = [37 x i8] c" D_l = %4.0f h^{-1} Mpc\0A\00"
@.str.19 = [37 x i8] c" D_s = %4.0f h^{-1} Mpc\0A\00"
@.str.20 = [37 x i8] c" D_ls = %4.0f h^{-1} Mpc\0A\00"
@.str.21 = [26 x i8] c" D_ls / D_s = %6.3f\0A\00"
@.str.22 = [33 x i8] c" theta_E = %6.3f arcsec\0A\00"
@.str.23 = [26 x i8] c" shear = %5.3f\0A\00"
@.str.24 = [44 x i8] c"Another (Omega_m, Omega_Lambda)? (y/n) [y] \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca [1000 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
store double 0.000000e+00, double* %9
store double 1.000000e+00, double* %15
store double 0.000000e+00, double* %16
store double 0.000000e+00, double* %14
store double 0.000000e+00, double* %13
%23 = call i64 @get_valerr(double* %8, double* %9, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %2
%26 = load i32, i32* @stderr
%27 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
br label %157
28: ; preds = %2
%29 = load double, double* %8
%30 = fmul double 1.000000e+10, %29
%31 = load double, double* %8
%32 = fmul double %30, %31
store double %32, double* %10
%33 = call i64 @get_valerr(double* %11, double* %13, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %28
%36 = load i32, i32* @stderr
%37 = call i32 @fprintf(i32 %36, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %3
br label %157
38: ; preds = %28
%39 = call i64 @get_valerr(double* %12, double* %14, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = load i32, i32* @stderr
%43 = call i32 @fprintf(i32 %42, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %3
br label %157
44: ; preds = %38
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0))
%46 = getelementptr inbounds [1000 x i8], [1000 x i8]* %22, i64 0, i64 0
%47 = load i32, i32* @stdin
%48 = call i32 @fgets(i8* %46, i32 1000, i32 %47)
br label %49
49: ; preds = %58, %44
%50 = getelementptr inbounds [1000 x i8], [1000 x i8]* %22, i64 0, i64 0
%51 = call i32 @sscanf(i8* %50, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), double* %7)
%52 = icmp ne i32 %51, 1
br i1 %52, label %56, label %53
53: ; preds = %49
%54 = load double, double* %7
%55 = fcmp olt double %54, 0.000000e+00
br label %56
56: ; preds = %53, %49
%57 = phi i1 [ true, %49 ], [ %55, %53 ]
br i1 %57, label %58, label %64
58: ; preds = %56
%59 = load i32, i32* @stderr
%60 = call i32 @fprintf(i32 %59, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%61 = getelementptr inbounds [1000 x i8], [1000 x i8]* %22, i64 0, i64 0
%62 = load i32, i32* @stdin
%63 = call i32 @fgets(i8* %61, i32 1000, i32 %62)
br label %49
64: ; preds = %56
br label %65
65: ; preds = %154, %64
%66 = load i32, i32* %6
%67 = icmp ne i32 %66, 0
br i1 %67, label %68, label %155
68: ; preds = %65
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%70 = call i32 @get_omega(double* %15, double* %16)
%71 = load double, double* %15
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), double %71)
%73 = load double, double* %16
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), double %73)
%75 = load double, double* %11
%76 = load double, double* %15
%77 = load double, double* %16
%78 = call double @ang_dist(double 0.000000e+00, double %75, double %76, double %77)
%79 = fdiv double %78, 3.100000e+24
store double %79, double* %17
%80 = load double, double* %12
%81 = load double, double* %15
%82 = load double, double* %16
%83 = call double @ang_dist(double 0.000000e+00, double %80, double %81, double %82)
%84 = fdiv double %83, 3.100000e+24
store double %84, double* %18
%85 = load double, double* %11
%86 = load double, double* %12
%87 = load double, double* %15
%88 = load double, double* %16
%89 = call double @ang_dist(double %85, double %86, double %87, double %88)
%90 = fdiv double %89, 3.100000e+24
store double %90, double* %19
%91 = load double, double* %10
%92 = fmul double 0x4143C68137A691C4, %91
%93 = load double, double* %19
%94 = fmul double %92, %93
%95 = load double, double* %18
%96 = fmul double 9.000000e+20, %95
%97 = fdiv double %94, %96
store double %97, double* %20
%98 = load double, double* %7
%99 = load double, double* %20
%100 = fcmp ogt double %98, %99
br i1 %100, label %101, label %106
101: ; preds = %68
%102 = load double, double* %20
%103 = load double, double* %7
%104 = fmul double 2.000000e+00, %103
%105 = fdiv double %102, %104
store double %105, double* %21
br label %106
106: ; preds = %101, %68
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.11, i64 0, i64 0))
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
%109 = load double, double* %11
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), double %109)
%111 = load double, double* %12
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0), double %111)
%113 = load double, double* %15
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), double %113)
%115 = load double, double* %16
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0), double %115)
%117 = load double, double* %8
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.16, i64 0, i64 0), double %117)
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0))
%120 = load double, double* %17
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i64 0, i64 0), double %120)
%122 = load double, double* %18
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.19, i64 0, i64 0), double %122)
%124 = load double, double* %19
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.20, i64 0, i64 0), double %124)
%126 = load double, double* %19
%127 = load double, double* %18
%128 = fdiv double %126, %127
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.21, i64 0, i64 0), double %128)
%130 = load double, double* %20
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.22, i64 0, i64 0), double %130)
%132 = load double, double* %7
%133 = load double, double* %20
%134 = fcmp ogt double %132, %133
br i1 %134, label %135, label %138
135: ; preds = %106
%136 = load double, double* %21
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.23, i64 0, i64 0), double %136)
br label %138
138: ; preds = %135, %106
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.11, i64 0, i64 0))
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.24, i64 0, i64 0))
%141 = getelementptr inbounds [1000 x i8], [1000 x i8]* %22, i64 0, i64 0
%142 = load i32, i32* @stdin
%143 = call i32 @fgets(i8* %141, i32 1000, i32 %142)
%144 = getelementptr inbounds [1000 x i8], [1000 x i8]* %22, i64 0, i64 0
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp eq i32 %146, 78
br i1 %147, label %153, label %148
148: ; preds = %138
%149 = getelementptr inbounds [1000 x i8], [1000 x i8]* %22, i64 0, i64 0
%150 = load i8, i8* %149
%151 = sext i8 %150 to i32
%152 = icmp eq i32 %151, 110
br i1 %152, label %153, label %154
153: ; preds = %148, %138
store i32 0, i32* %6
br label %154
154: ; preds = %153, %148
br label %65
155: ; preds = %65
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %3
br label %157
157: ; preds = %155, %41, %35, %25
%158 = load i32, i32* %3
ret i32 %158
}

LLVM IR (-O2):
@.str = [33 x i8] c"SIS velocity dispersion (km/sec)\00"
@stderr = global i32 0
@.str.1 = [29 x i8] c"\0AERROR. Exiting calc_er.c\0A\0A\00"
@.str.2 = [16 x i8] c"redshift of SIS\00"
@.str.3 = [29 x i8] c"\0AERROR. Exiting sis_sigv.\0A\0A\00"
@.str.4 = [30 x i8] c"redshift of background source\00"
@.str.5 = [56 x i8] c"\0AEnter offset of SIS center from lens system (arcsec): \00"
@stdin = global i32 0
@.str.6 = [4 x i8] c"%lf\00"
@.str.7 = [41 x i8] c"ERROR. Bad input. Enter offst again. \00"
@.str.9 = [22 x i8] c" Omega_m = %f\0A\00"
@.str.10 = [23 x i8] c" Omega_Lambda = %f\0A\0A\00"
@.str.13 = [22 x i8] c" z_l = %f\0A\00"
@.str.14 = [22 x i8] c" z_s = %f\0A\00"
@.str.15 = [22 x i8] c" Omega_Lambda = %f\0A\00"
@.str.16 = [33 x i8] c" sigma_V = %5.0f km/sec\0A\0A\00"
@.str.18 = [37 x i8] c" D_l = %4.0f h^{-1} Mpc\0A\00"
@.str.19 = [37 x i8] c" D_s = %4.0f h^{-1} Mpc\0A\00"
@.str.20 = [37 x i8] c" D_ls = %4.0f h^{-1} Mpc\0A\00"
@.str.21 = [26 x i8] c" D_ls / D_s = %6.3f\0A\00"
@.str.22 = [33 x i8] c" theta_E = %6.3f arcsec\0A\00"
@.str.23 = [26 x i8] c" shear = %5.3f\0A\00"
@.str.24 = [44 x i8] c"Another (Omega_m, Omega_Lambda)? (y/n) [y] \00"
@str.25 = [8 x i8] c"Inputs:\00"
@str.26 = [23 x i8] c"Calculated quantities:\00"
@str.27 = [53 x i8] c"\0A--------------------------------------------------\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca [1000 x i8]
%13 = bitcast double* %3 to i8*
%14 = bitcast double* %4 to i8*
%15 = bitcast double* %5 to i8*
store double 0.000000e+00, double* %5
%16 = bitcast double* %6 to i8*
%17 = bitcast double* %7 to i8*
%18 = bitcast double* %8 to i8*
%19 = bitcast double* %9 to i8*
%20 = bitcast double* %10 to i8*
store double 1.000000e+00, double* %10
%21 = bitcast double* %11 to i8*
store double 0.000000e+00, double* %11
%22 = getelementptr inbounds [1000 x i8], [1000 x i8]* %12, i64 0, i64 0
store double 0.000000e+00, double* %9
store double 0.000000e+00, double* %8
%23 = call i64 @get_valerr(double* %4, double* %5, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %2
%26 = load i32, i32* @stderr
%27 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %131
28: ; preds = %2
%29 = load double, double* %4
%30 = fmul double %29, 1.000000e+10
%31 = fmul double %29, %30
%32 = call i64 @get_valerr(double* %6, double* %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %28
%35 = load i32, i32* @stderr
%36 = call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
br label %131
37: ; preds = %28
%38 = call i64 @get_valerr(double* %7, double* %9, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %37
%41 = load i32, i32* @stderr
%42 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
br label %131
43: ; preds = %37
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0))
%45 = load i32, i32* @stdin
%46 = call i32 @fgets(i8* %22, i32 1000, i32 %45)
%47 = call i32 @sscanf(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), double* %3)
%48 = icmp ne i32 %47, 1
%49 = load double, double* %3
%50 = fcmp olt double %49, 0.000000e+00
%51 = select i1 %48, i1 true, i1 %50
br i1 %51, label %54, label %52
52: ; preds = %54, %43
%53 = fmul double %31, 0x4143C68137A691C4
br label %64
54: ; preds = %43, %54
%55 = load i32, i32* @stderr
%56 = call i32 @fprintf(i32 %55, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%57 = load i32, i32* @stdin
%58 = call i32 @fgets(i8* %22, i32 1000, i32 %57)
%59 = call i32 @sscanf(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), double* %3)
%60 = icmp ne i32 %59, 1
%61 = load double, double* %3
%62 = fcmp olt double %61, 0.000000e+00
%63 = select i1 %60, i1 true, i1 %62
br i1 %63, label %54, label %52
64: ; preds = %52, %121
%65 = phi double [ undef, %52 ], [ %97, %121 ]
%66 = call i32 @putchar(i32 10)
%67 = call i32 @get_omega(double* %10, double* %11)
%68 = load double, double* %10
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), double %68)
%70 = load double, double* %11
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), double %70)
%72 = load double, double* %6
%73 = load double, double* %10
%74 = load double, double* %11
%75 = call double @ang_dist(double 0.000000e+00, double %72, double %73, double %74)
%76 = fdiv double %75, 3.100000e+24
%77 = load double, double* %7
%78 = load double, double* %10
%79 = load double, double* %11
%80 = call double @ang_dist(double 0.000000e+00, double %77, double %78, double %79)
%81 = fdiv double %80, 3.100000e+24
%82 = load double, double* %6
%83 = load double, double* %7
%84 = load double, double* %10
%85 = load double, double* %11
%86 = call double @ang_dist(double %82, double %83, double %84, double %85)
%87 = fdiv double %86, 3.100000e+24
%88 = fmul double %53, %87
%89 = fmul double %81, 9.000000e+20
%90 = fdiv double %88, %89
%91 = load double, double* %3
%92 = fcmp ogt double %91, %90
br i1 %92, label %93, label %96
93: ; preds = %64
%94 = fmul double %91, 2.000000e+00
%95 = fdiv double %90, %94
br label %96
96: ; preds = %93, %64
%97 = phi double [ %95, %93 ], [ %65, %64 ]
%98 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.27, i64 0, i64 0))
%99 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.25, i64 0, i64 0))
%100 = load double, double* %6
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), double %100)
%102 = load double, double* %7
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0), double %102)
%104 = load double, double* %10
%105 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), double %104)
%106 = load double, double* %11
%107 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0), double %106)
%108 = load double, double* %4
%109 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.16, i64 0, i64 0), double %108)
%110 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.26, i64 0, i64 0))
%111 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i64 0, i64 0), double %76)
%112 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.19, i64 0, i64 0), double %81)
%113 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.20, i64 0, i64 0), double %87)
%114 = fdiv double %87, %81
%115 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.21, i64 0, i64 0), double %114)
%116 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.22, i64 0, i64 0), double %90)
%117 = load double, double* %3
%118 = fcmp ogt double %117, %90
br i1 %118, label %119, label %121
119: ; preds = %96
%120 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.23, i64 0, i64 0), double %97)
br label %121
121: ; preds = %119, %96
%122 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.27, i64 0, i64 0))
%123 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.24, i64 0, i64 0))
%124 = load i32, i32* @stdin
%125 = call i32 @fgets(i8* %22, i32 1000, i32 %124)
%126 = load i8, i8* %22
%127 = and i8 %126, -33
%128 = icmp eq i8 %127, 78
br i1 %128, label %129, label %64
129: ; preds = %121
%130 = call i32 @putchar(i32 10)
br label %131
131: ; preds = %129, %40, %34, %25
%132 = phi i32 [ 1, %25 ], [ 1, %34 ], [ 1, %40 ], [ 0, %129 ]
ret i32 %132
}