#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_err(float, float, float, float);
int /*<<< orphan*/ printf(char *, ...);
float sqrt(float);
void calc_errs(float zl, float zs, float dzl, float dzs, float theta,
               float dtheta, double omega0, double lambda, float dl, float ds,
               float dls, float d, float me) {
  float ddl, dds, ddls;
  float dd;
  float dme;
  ddl = ang_dist_err(0.0, zl, 0.0, dzl) / 3.1e24;
  dds = ang_dist_err(0.0, zs, 0.0, dzs) / 3.1e24;
  ddls = ang_dist_err(zl, zs, dzl, dzs) / 3.1e24;
  dd = d * sqrt(ddl * ddl / (dl * dl) + dds * dds / (ds * ds) +
                ddls * ddls / (dls * dls));
  dme = me * sqrt(dd * dd / (d * d) + 4.0 * dtheta * dtheta / (theta * theta));
  printf("\nUncertainties on the above quantities are:\n");
  printf("   dD_l  = %7.4f h^{-1} Mpc\n", ddl);
  printf("   dD_s  = %7.4f h^{-1} Mpc\n", dds);
  printf("   dD_ls = %7.4f h^{-1} Mpc\n", ddls);
  printf("   dD    = %7.4f h^{-1} Gpc\n", dd);
  printf("   dM_E  = %9.3e h^{-1} M_sun\n\n", dme);
}


x86 assembly (clang, -O0):
<calc_errs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movss  0x30(%rbp),%xmm8
movss  0x28(%rbp),%xmm8
movss  0x20(%rbp),%xmm8
movss  0x18(%rbp),%xmm8
movss  0x10(%rbp),%xmm8
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movsd  %xmm6,-0x20(%rbp)
movsd  %xmm7,-0x28(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0xc(%rbp),%xmm3
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
call   1050 <ang_dist_err@plt>
movsd  0xe6d(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm3
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
call   1050 <ang_dist_err@plt>
movsd  0xe43(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
call   1050 <ang_dist_err@plt>
movsd  0xe15(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  0x28(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x2c(%rbp),%xmm0
mulss  -0x2c(%rbp),%xmm0
movss  0x10(%rbp),%xmm1
mulss  0x10(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  -0x30(%rbp),%xmm1
mulss  -0x30(%rbp),%xmm1
movss  0x18(%rbp),%xmm2
mulss  0x18(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  -0x34(%rbp),%xmm1
mulss  -0x34(%rbp),%xmm1
movss  0x20(%rbp),%xmm2
mulss  0x20(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x44(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x38(%rbp)
movss  0x30(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x38(%rbp),%xmm0
mulss  -0x38(%rbp),%xmm0
movss  0x28(%rbp),%xmm1
mulss  0x28(%rbp),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xd59(%rip),%xmm1
mulsd  %xmm2,%xmm1
movss  -0x18(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm1
movss  -0x14(%rbp),%xmm2
mulss  -0x14(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x40(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x3c(%rbp)
lea    0xd21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd37(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd3d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd43(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x38(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd49(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x3c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd4f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_errs>:
sub    $0x58,%rsp
movss  %xmm5,0x28(%rsp)
movss  %xmm4,0x2c(%rsp)
movss  %xmm3,0x30(%rsp)
movaps %xmm2,%xmm3
movss  %xmm2,0x1c(%rsp)
movss  %xmm1,0xc(%rsp)
movaps %xmm0,%xmm1
movss  %xmm0,0x18(%rsp)
movss  0x80(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0x78(%rsp),%xmm0
movss  %xmm0,0x24(%rsp)
movss  0x68(%rsp),%xmm0
movss  %xmm0,0x20(%rsp)
xorpd  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   1060 <ang_dist_err@plt>
movapd %xmm0,0x40(%rsp)
xorpd  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movss  0xc(%rsp),%xmm1
movss  0x30(%rsp),%xmm3
call   1060 <ang_dist_err@plt>
divsd  0xe39(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x14(%rsp)
movss  0x18(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
movss  0x1c(%rsp),%xmm2
movss  0x30(%rsp),%xmm3
call   1060 <ang_dist_err@plt>
movapd 0x40(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
divpd  0xe10(%rip),%xmm1
cvtpd2ps %xmm1,%xmm0
movss  0x14(%rsp),%xmm1
mulss  %xmm1,%xmm1
movss  0x20(%rsp),%xmm2
mulss  %xmm2,%xmm2
divss  %xmm2,%xmm1
movapd %xmm0,0x30(%rsp)
mulps  %xmm0,%xmm0
movss  0x70(%rsp),%xmm2
movss  0x60(%rsp),%xmm3
unpcklps %xmm2,%xmm3
mulps  %xmm3,%xmm3
divps  %xmm3,%xmm0
addss  %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm0
addss  %xmm1,%xmm0
ucomiss 0xdd3(%rip),%xmm0
jb     1255 <calc_errs+0x115>
sqrtss %xmm0,%xmm0
jmp    125a <calc_errs+0x11a>
call   1050 <sqrt@plt>
movss  0x24(%rsp),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,0xc(%rsp)
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x28(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xd7c(%rip),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movss  0x2c(%rsp),%xmm1
mulss  %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
ucomiss 0xd68(%rip),%xmm0
jb     12c0 <calc_errs+0x180>
sqrtss %xmm0,%xmm0
jmp    12c5 <calc_errs+0x185>
call   1050 <sqrt@plt>
mulss  0x10(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
lea    0xde0(%rip),%rdi
call   1030 <puts@plt>
movaps 0x30(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd37(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd3c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movaps 0x30(%rsp),%xmm0
shufps $0x55,%xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd3e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd43(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd48(%rip),%rdi
mov    $0x1,%al
add    $0x58,%rsp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"\0AUncertainties on the above quantities are:\0A\00"
@.str.1 = [29 x i8] c" dD_l = %7.4f h^{-1} Mpc\0A\00"
@.str.2 = [29 x i8] c" dD_s = %7.4f h^{-1} Mpc\0A\00"
@.str.3 = [29 x i8] c" dD_ls = %7.4f h^{-1} Mpc\0A\00"
@.str.4 = [29 x i8] c" dD = %7.4f h^{-1} Gpc\0A\00"
@.str.5 = [32 x i8] c" dM_E = %9.3e h^{-1} M_sun\0A\0A\00"
define void @calc_errs(float %0, float %1, float %2, float %3, float %4, float %5, double %6, double %7, float %8, float %9, float %10, float %11, float %12) {
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca double
%21 = alloca double
%22 = alloca float
%23 = alloca float
%24 = alloca float
%25 = alloca float
%26 = alloca float
%27 = alloca float
%28 = alloca float
%29 = alloca float
%30 = alloca float
%31 = alloca float
store float %0, float* %14
store float %1, float* %15
store float %2, float* %16
store float %3, float* %17
store float %4, float* %18
store float %5, float* %19
store double %6, double* %20
store double %7, double* %21
store float %8, float* %22
store float %9, float* %23
store float %10, float* %24
store float %11, float* %25
store float %12, float* %26
%32 = load float, float* %14
%33 = load float, float* %16
%34 = call double @ang_dist_err(float 0.000000e+00, float %32, float 0.000000e+00, float %33)
%35 = fdiv double %34, 3.100000e+24
%36 = fptrunc double %35 to float
store float %36, float* %27
%37 = load float, float* %15
%38 = load float, float* %17
%39 = call double @ang_dist_err(float 0.000000e+00, float %37, float 0.000000e+00, float %38)
%40 = fdiv double %39, 3.100000e+24
%41 = fptrunc double %40 to float
store float %41, float* %28
%42 = load float, float* %14
%43 = load float, float* %15
%44 = load float, float* %16
%45 = load float, float* %17
%46 = call double @ang_dist_err(float %42, float %43, float %44, float %45)
%47 = fdiv double %46, 3.100000e+24
%48 = fptrunc double %47 to float
store float %48, float* %29
%49 = load float, float* %25
%50 = load float, float* %27
%51 = load float, float* %27
%52 = fmul float %50, %51
%53 = load float, float* %22
%54 = load float, float* %22
%55 = fmul float %53, %54
%56 = fdiv float %52, %55
%57 = load float, float* %28
%58 = load float, float* %28
%59 = fmul float %57, %58
%60 = load float, float* %23
%61 = load float, float* %23
%62 = fmul float %60, %61
%63 = fdiv float %59, %62
%64 = fadd float %56, %63
%65 = load float, float* %29
%66 = load float, float* %29
%67 = fmul float %65, %66
%68 = load float, float* %24
%69 = load float, float* %24
%70 = fmul float %68, %69
%71 = fdiv float %67, %70
%72 = fadd float %64, %71
%73 = call float @sqrt(float %72)
%74 = fmul float %49, %73
store float %74, float* %30
%75 = load float, float* %26
%76 = load float, float* %30
%77 = load float, float* %30
%78 = fmul float %76, %77
%79 = load float, float* %25
%80 = load float, float* %25
%81 = fmul float %79, %80
%82 = fdiv float %78, %81
%83 = fpext float %82 to double
%84 = load float, float* %19
%85 = fpext float %84 to double
%86 = fmul double 4.000000e+00, %85
%87 = load float, float* %19
%88 = fpext float %87 to double
%89 = fmul double %86, %88
%90 = load float, float* %18
%91 = load float, float* %18
%92 = fmul float %90, %91
%93 = fpext float %92 to double
%94 = fdiv double %89, %93
%95 = fadd double %83, %94
%96 = fptrunc double %95 to float
%97 = call float @sqrt(float %96)
%98 = fmul float %75, %97
store float %98, float* %31
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%100 = load float, float* %27
%101 = fpext float %100 to double
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), double %101)
%103 = load float, float* %28
%104 = fpext float %103 to double
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double %104)
%106 = load float, float* %29
%107 = fpext float %106 to double
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), double %107)
%109 = load float, float* %30
%110 = fpext float %109 to double
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), double %110)
%112 = load float, float* %31
%113 = fpext float %112 to double
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), double %113)
ret void
}

LLVM IR (-O2):
@.str.1 = [29 x i8] c" dD_l = %7.4f h^{-1} Mpc\0A\00"
@.str.2 = [29 x i8] c" dD_s = %7.4f h^{-1} Mpc\0A\00"
@.str.3 = [29 x i8] c" dD_ls = %7.4f h^{-1} Mpc\0A\00"
@.str.4 = [29 x i8] c" dD = %7.4f h^{-1} Gpc\0A\00"
@.str.5 = [32 x i8] c" dM_E = %9.3e h^{-1} M_sun\0A\0A\00"
@str = [44 x i8] c"\0AUncertainties on the above quantities are:\00"
define void @calc_errs(float %0, float %1, float %2, float %3, float %4, float %5, double %6, double %7, float %8, float %9, float %10, float %11, float %12) {
%14 = tail call double @ang_dist_err(float 0.000000e+00, float %0, float 0.000000e+00, float %2)
%15 = tail call double @ang_dist_err(float 0.000000e+00, float %1, float 0.000000e+00, float %3)
%16 = fdiv double %15, 3.100000e+24
%17 = fptrunc double %16 to float
%18 = tail call double @ang_dist_err(float %0, float %1, float %2, float %3)
%19 = insertelement <2 x double> poison, double %14, i64 0
%20 = insertelement <2 x double> %19, double %18, i64 1
%21 = fdiv <2 x double> %20, <double 3.100000e+24, double 3.100000e+24>
%22 = fptrunc <2 x double> %21 to <2 x float>
%23 = fmul float %17, %17
%24 = fmul float %9, %9
%25 = fdiv float %23, %24
%26 = fmul <2 x float> %22, %22
%27 = insertelement <2 x float> poison, float %8, i64 0
%28 = insertelement <2 x float> %27, float %10, i64 1
%29 = fmul <2 x float> %28, %28
%30 = fdiv <2 x float> %26, %29
%31 = extractelement <2 x float> %30, i64 0
%32 = fadd float %31, %25
%33 = extractelement <2 x float> %30, i64 1
%34 = fadd float %32, %33
%35 = tail call float @sqrt(float %34)
%36 = fmul float %35, %11
%37 = fmul float %36, %36
%38 = fmul float %11, %11
%39 = fdiv float %37, %38
%40 = fpext float %39 to double
%41 = fpext float %5 to double
%42 = fmul double %41, 4.000000e+00
%43 = fmul double %42, %41
%44 = fmul float %4, %4
%45 = fpext float %44 to double
%46 = fdiv double %43, %45
%47 = fadd double %46, %40
%48 = fptrunc double %47 to float
%49 = tail call float @sqrt(float %48)
%50 = fmul float %49, %12
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%52 = extractelement <2 x float> %22, i64 0
%53 = fpext float %52 to double
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), double %53)
%55 = fpext float %17 to double
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double %55)
%57 = extractelement <2 x float> %22, i64 1
%58 = fpext float %57 to double
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), double %58)
%60 = fpext float %36 to double
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), double %60)
%62 = fpext float %50 to double
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), double %62)
ret void
}