; LLVM IR from MBMS/C-CODE_FOR_MEMBRANE_BASED_MODEL :: CODE_MODEL/Membrane.ll (ZN8Membrane14watpermeatdaisEdddddd)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN8Membrane14watpermeatdaisEdddddd(double noundef %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5) #3 {
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  store double %0, ptr %7, align 8, !tbaa !5
  store double %1, ptr %8, align 8, !tbaa !5
  store double %2, ptr %9, align 8, !tbaa !5
  store double %3, ptr %10, align 8, !tbaa !5
  store double %4, ptr %11, align 8, !tbaa !5
  store double %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store double 2.981500e+02, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store double 3.031500e+02, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store double 3.081500e+02, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %33 = load double, ptr %9, align 8, !tbaa !5
  %34 = fmul double %33, 1.000000e+02
  %35 = call double @pow(double noundef %34, double noundef 1.710000e+00) #5
  %36 = fmul double 2.480000e-04, %35
  store double %36, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %37 = load double, ptr %9, align 8, !tbaa !5
  %38 = fmul double %37, 1.000000e+02
  %39 = call double @pow(double noundef %38, double noundef 1.730000e+00) #5
  %40 = fmul double 2.480000e-04, %39
  store double %40, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %41 = load double, ptr %9, align 8, !tbaa !5
  %42 = fmul double %41, 1.000000e+02
  %43 = call double @pow(double noundef %42, double noundef 1.730000e+00) #5
  %44 = fmul double 1.760000e-04, %43
  store double %44, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %45 = load double, ptr %9, align 8, !tbaa !5
  %46 = fmul double %45, 1.000000e+02
  %47 = call double @pow(double noundef %46, double noundef 1.760000e+00) #5
  %48 = fmul double 2.480000e-04, %47
  store double %48, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %49 = load double, ptr %9, align 8, !tbaa !5
  %50 = fmul double %49, 1.000000e+02
  %51 = call double @pow(double noundef %50, double noundef 1.780000e+00) #5
  %52 = fmul double 2.530000e-04, %51
  store double %52, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %53 = load double, ptr %9, align 8, !tbaa !5
  %54 = fmul double %53, 1.000000e+02
  %55 = call double @pow(double noundef %54, double noundef 1.900000e+00) #5
  %56 = fmul double 1.240000e-04, %55
  store double %56, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  store double 0.000000e+00, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %57 = load double, ptr %10, align 8, !tbaa !5
  %58 = load double, ptr %12, align 8, !tbaa !5
  %59 = fmul double %57, %58
  %60 = load double, ptr %11, align 8, !tbaa !5
  %61 = call noundef double @_ZN19MoistAirVapProperty5airmuEd(double noundef %60)
  %62 = fdiv double %59, %61
  store double %62, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %63 = load double, ptr %14, align 8, !tbaa !5
  %64 = call noundef double @_ZN19MoistAirVapProperty6airrhoEd(double noundef %63)
  %65 = fmul double %64, 4.000000e+01
  %66 = fdiv double %65, 6.000000e+04
  %67 = fdiv double %66, 4.570000e-04
  %68 = fmul double %67, 2.000000e-03
  %69 = load double, ptr %14, align 8, !tbaa !5
  %70 = call noundef double @_ZN19MoistAirVapProperty5airmuEd(double noundef %69)
  %71 = fdiv double %68, %70
  store double %71, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %72 = load double, ptr %14, align 8, !tbaa !5
  %73 = call noundef double @_ZN19MoistAirVapProperty6airrhoEd(double noundef %72)
  %74 = fmul double %73, 1.000000e+02
  %75 = fdiv double %74, 6.000000e+04
  %76 = fdiv double %75, 4.570000e-04
  %77 = fmul double %76, 2.000000e-03
  %78 = load double, ptr %14, align 8, !tbaa !5
  %79 = call noundef double @_ZN19MoistAirVapProperty5airmuEd(double noundef %78)
  %80 = fdiv double %77, %79
  store double %80, ptr %25, align 8, !tbaa !5
  %81 = load double, ptr %11, align 8, !tbaa !5
  %82 = load double, ptr %14, align 8, !tbaa !5
  %83 = fcmp olt double %81, %82
  br i1 %83, label %84, label %117

84:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %85 = load double, ptr %11, align 8, !tbaa !5
  %86 = load double, ptr %13, align 8, !tbaa !5
  %87 = fsub double %85, %86
  %88 = load double, ptr %14, align 8, !tbaa !5
  %89 = load double, ptr %13, align 8, !tbaa !5
  %90 = fsub double %88, %89
  %91 = fdiv double %87, %90
  store double %91, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %92 = load double, ptr %17, align 8, !tbaa !5
  %93 = load double, ptr %16, align 8, !tbaa !5
  %94 = fsub double %92, %93
  %95 = load double, ptr %26, align 8, !tbaa !5
  %96 = load double, ptr %16, align 8, !tbaa !5
  %97 = call double @llvm.fmuladd.f64(double %94, double %95, double %96)
  store double %97, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %98 = load double, ptr %20, align 8, !tbaa !5
  %99 = load double, ptr %19, align 8, !tbaa !5
  %100 = fsub double %98, %99
  %101 = load double, ptr %26, align 8, !tbaa !5
  %102 = load double, ptr %19, align 8, !tbaa !5
  %103 = call double @llvm.fmuladd.f64(double %100, double %101, double %102)
  store double %103, ptr %28, align 8, !tbaa !5
  %104 = load double, ptr %27, align 8, !tbaa !5
  %105 = load double, ptr %28, align 8, !tbaa !5
  %106 = load double, ptr %27, align 8, !tbaa !5
  %107 = fsub double %105, %106
  %108 = load double, ptr %23, align 8, !tbaa !5
  %109 = load double, ptr %24, align 8, !tbaa !5
  %110 = fsub double %108, %109
  %111 = fmul double %107, %110
  %112 = load double, ptr %25, align 8, !tbaa !5
  %113 = load double, ptr %24, align 8, !tbaa !5
  %114 = fsub double %112, %113
  %115 = fdiv double %111, %114
  %116 = fadd double %104, %115
  store double %116, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %150

117:                                              ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %118 = load double, ptr %11, align 8, !tbaa !5
  %119 = load double, ptr %14, align 8, !tbaa !5
  %120 = fsub double %118, %119
  %121 = load double, ptr %15, align 8, !tbaa !5
  %122 = load double, ptr %14, align 8, !tbaa !5
  %123 = fsub double %121, %122
  %124 = fdiv double %120, %123
  store double %124, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %125 = load double, ptr %18, align 8, !tbaa !5
  %126 = load double, ptr %17, align 8, !tbaa !5
  %127 = fsub double %125, %126
  %128 = load double, ptr %29, align 8, !tbaa !5
  %129 = load double, ptr %17, align 8, !tbaa !5
  %130 = call double @llvm.fmuladd.f64(double %127, double %128, double %129)
  store double %130, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %131 = load double, ptr %21, align 8, !tbaa !5
  %132 = load double, ptr %20, align 8, !tbaa !5
  %133 = fsub double %131, %132
  %134 = load double, ptr %29, align 8, !tbaa !5
  %135 = load double, ptr %20, align 8, !tbaa !5
  %136 = call double @llvm.fmuladd.f64(double %133, double %134, double %135)
  store double %136, ptr %31, align 8, !tbaa !5
  %137 = load double, ptr %30, align 8, !tbaa !5
  %138 = load double, ptr %31, align 8, !tbaa !5
  %139 = load double, ptr %30, align 8, !tbaa !5
  %140 = fsub double %138, %139
  %141 = load double, ptr %23, align 8, !tbaa !5
  %142 = load double, ptr %24, align 8, !tbaa !5
  %143 = fsub double %141, %142
  %144 = fmul double %140, %143
  %145 = load double, ptr %25, align 8, !tbaa !5
  %146 = load double, ptr %24, align 8, !tbaa !5
  %147 = fsub double %145, %146
  %148 = fdiv double %144, %147
  %149 = fadd double %137, %148
  store double %149, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %150

150:                                              ; preds = %117, %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %151 = load double, ptr %22, align 8, !tbaa !5
  %152 = load double, ptr %7, align 8, !tbaa !5
  %153 = load double, ptr %8, align 8, !tbaa !5
  %154 = fsub double %152, %153
  %155 = fmul double %151, %154
  %156 = fdiv double %155, 3.600000e+06
  store double %156, ptr %32, align 8, !tbaa !5
  %157 = load double, ptr %7, align 8, !tbaa !5
  %158 = load double, ptr %8, align 8, !tbaa !5
  %159 = fsub double %157, %158
  %160 = fcmp olt double %159, 0.000000e+00
  br i1 %160, label %161, label %162

161:                                              ; preds = %150
  store double 0.000000e+00, ptr %32, align 8, !tbaa !5
  br label %162

162:                                              ; preds = %161, %150
  %163 = load double, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  ret double %163
}

declare noundef double @_ZN19MoistAirVapProperty5airmuEd(double noundef) #4

declare noundef double @_ZN19MoistAirVapProperty6airrhoEd(double noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN8Membrane14watpermeatdaisEdddddd(double noundef %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5) local_unnamed_addr #1 {
  %7 = fmul double %2, 1.000000e+02
  %8 = tail call double @pow(double noundef %7, double noundef 1.710000e+00) #4
  %9 = tail call double @pow(double noundef %7, double noundef 1.730000e+00) #4
  %10 = tail call double @pow(double noundef %7, double noundef 1.730000e+00) #4
  %11 = tail call double @pow(double noundef %7, double noundef 1.760000e+00) #4
  %12 = tail call double @pow(double noundef %7, double noundef 1.780000e+00) #4
  %13 = insertelement <2 x double> poison, double %12, i64 0
  %14 = insertelement <2 x double> %13, double %9, i64 1
  %15 = fmul <2 x double> %14, <double 2.530000e-04, double 2.480000e-04>
  %16 = tail call double @pow(double noundef %7, double noundef 1.900000e+00) #4
  %17 = tail call noundef double @_ZN19MoistAirVapProperty5airmuEd(double noundef %4)
  %18 = tail call noundef double @_ZN19MoistAirVapProperty6airrhoEd(double noundef 3.031500e+02)
  %19 = tail call noundef double @_ZN19MoistAirVapProperty5airmuEd(double noundef 3.031500e+02)
  %20 = tail call noundef double @_ZN19MoistAirVapProperty6airrhoEd(double noundef 3.031500e+02)
  %21 = tail call noundef double @_ZN19MoistAirVapProperty5airmuEd(double noundef 3.031500e+02)
  %22 = fcmp olt double %4, 3.031500e+02
  br i1 %22, label %23, label %36

23:                                               ; preds = %6
  %24 = insertelement <2 x double> poison, double %11, i64 0
  %25 = insertelement <2 x double> %24, double %8, i64 1
  %26 = fmul <2 x double> %25, <double 2.480000e-04, double 2.480000e-04>
  %27 = fadd double %4, -2.981500e+02
  %28 = fdiv double %27, 5.000000e+00
  %29 = fsub <2 x double> %15, %26
  %30 = insertelement <2 x double> poison, double %28, i64 0
  %31 = shufflevector <2 x double> %30, <2 x double> poison, <2 x i32> zeroinitializer
  %32 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %29, <2 x double> %31, <2 x double> %26)
  %33 = extractelement <2 x double> %32, i64 0
  %34 = extractelement <2 x double> %32, i64 1
  %35 = fsub double %33, %34
  br label %49

36:                                               ; preds = %6
  %37 = insertelement <2 x double> poison, double %16, i64 0
  %38 = insertelement <2 x double> %37, double %10, i64 1
  %39 = fmul <2 x double> %38, <double 1.240000e-04, double 1.760000e-04>
  %40 = fadd double %4, -3.031500e+02
  %41 = fdiv double %40, 5.000000e+00
  %42 = fsub <2 x double> %39, %15
  %43 = insertelement <2 x double> poison, double %41, i64 0
  %44 = shufflevector <2 x double> %43, <2 x double> poison, <2 x i32> zeroinitializer
  %45 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %42, <2 x double> %44, <2 x double> %15)
  %46 = extractelement <2 x double> %45, i64 0
  %47 = extractelement <2 x double> %45, i64 1
  %48 = fsub double %46, %47
  br label %49

49:                                               ; preds = %36, %23
  %.sink63 = phi double [ %48, %36 ], [ %35, %23 ]
  %.sink = phi double [ %47, %36 ], [ %34, %23 ]
  %50 = fmul double %20, 1.000000e+02
  %51 = fdiv double %50, 6.000000e+04
  %52 = fdiv double %51, 4.570000e-04
  %53 = fmul double %18, 4.000000e+01
  %54 = fdiv double %53, 6.000000e+04
  %55 = fdiv double %54, 4.570000e-04
  %56 = fmul double %55, 2.000000e-03
  %57 = fdiv double %56, %19
  %58 = insertelement <2 x double> poison, double %3, i64 0
  %59 = insertelement <2 x double> %58, double %52, i64 1
  %60 = insertelement <2 x double> <double poison, double 2.000000e-03>, double %5, i64 0
  %61 = fmul <2 x double> %59, %60
  %62 = insertelement <2 x double> poison, double %17, i64 0
  %63 = insertelement <2 x double> %62, double %21, i64 1
  %64 = fdiv <2 x double> %61, %63
  %65 = insertelement <2 x double> poison, double %57, i64 0
  %66 = shufflevector <2 x double> %65, <2 x double> poison, <2 x i32> zeroinitializer
  %67 = fsub <2 x double> %64, %66
  %68 = extractelement <2 x double> %67, i64 0
  %69 = fmul double %.sink63, %68
  %70 = extractelement <2 x double> %67, i64 1
  %71 = fdiv double %69, %70
  %72 = fadd double %.sink, %71
  %73 = fsub double %0, %1
  %74 = fmul double %73, %72
  %75 = fdiv double %74, 3.600000e+06
  %76 = fcmp olt double %73, 0.000000e+00
  %.0 = select i1 %76, double 0.000000e+00, double %75
  ret double %.0
}

declare noundef double @_ZN19MoistAirVapProperty5airmuEd(double noundef) local_unnamed_addr #2

declare noundef double @_ZN19MoistAirVapProperty6airrhoEd(double noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #3

attributes #0 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}


; Effective O3 passes: EarlyCSEPass,GlobalDCEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass