; LLVM IR from ImperialCollegeLondon/pnflow :: src/pnm/pnflow/polygon/polygon_calcR.ll (ZN6Circle5calcREd)

; 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"

%class.ElemModel = type { ptr, double, double, ptr, ptr, double, ptr, i8, i8, i8, i8, i32, double, double, double, double, double, double, double, %"struct.std::pair", %"struct.std::pair" }
%"struct.std::pair" = type { double, double }
%class.VoidElem = type { %class.ElemModel, double, double, double, double }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK5Fluid9viscosityEv(ptr noundef nonnull align 8 dereferenceable(80)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK10CommonData14KrwatcornAtSw0Ev(ptr noundef nonnull align 8 dereferenceable(1972)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNK10CommonData7surfaceEv(ptr noundef nonnull align 8 dereferenceable(1972)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Circle5calcREd(ptr noundef nonnull align 8 dereferenceable(184) %0, double noundef %1) unnamed_addr #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %5 = load ptr, ptr %3, align 8
  %6 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 6
  %7 = load ptr, ptr %6, align 8, !tbaa !11
  %8 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 4
  %9 = load ptr, ptr %8, align 8, !tbaa !16
  %10 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %9)
  %11 = icmp eq ptr %7, %10
  br i1 %11, label %12, label %49

12:                                               ; preds = %2
  %13 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 14
  store double 1.000000e+00, ptr %13, align 8, !tbaa !17
  %14 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 18
  store double 0.000000e+00, ptr %14, align 8, !tbaa !18
  %15 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 19
  %16 = getelementptr inbounds %"struct.std::pair", ptr %15, i32 0, i32 0
  store double 0.000000e+00, ptr %16, align 8, !tbaa !19
  %17 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 13
  %18 = load double, ptr %17, align 8, !tbaa !20
  %19 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 4
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %21 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %20)
  %22 = call noundef double @_ZNK5Fluid9viscosityEv(ptr noundef nonnull align 8 dereferenceable(80) %21)
  %23 = load ptr, ptr %5, align 8, !tbaa !21
  %24 = getelementptr inbounds ptr, ptr %23, i64 23
  %25 = load ptr, ptr %24, align 8
  %26 = call noundef double %25(ptr noundef nonnull align 8 dereferenceable(184) %5, double noundef %18, double noundef %22)
  %27 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 19
  %28 = getelementptr inbounds %"struct.std::pair", ptr %27, i32 0, i32 1
  store double %26, ptr %28, align 8, !tbaa !23
  %29 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 13
  %30 = load double, ptr %29, align 8, !tbaa !20
  %31 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 4
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  %33 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %32)
  %34 = call noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80) %33)
  %35 = fdiv double %30, %34
  %36 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 13
  %37 = load double, ptr %36, align 8, !tbaa !20
  %38 = getelementptr inbounds %class.VoidElem, ptr %5, i32 0, i32 1
  %39 = load double, ptr %38, align 8, !tbaa !24
  %40 = fdiv double %37, %39
  %41 = call double @sqrt(double noundef %40) #3
  %42 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 4
  %43 = load ptr, ptr %42, align 8, !tbaa !16
  %44 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK10CommonData7surfaceEv(ptr noundef nonnull align 8 dereferenceable(1972) %43)
  %45 = call noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80) %44)
  %46 = fdiv double %41, %45
  %47 = fadd double %35, %46
  %48 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 17
  store double %47, ptr %48, align 8, !tbaa !26
  br label %80

49:                                               ; preds = %2
  %50 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 14
  store double 0.000000e+00, ptr %50, align 8, !tbaa !17
  %51 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 13
  %52 = load double, ptr %51, align 8, !tbaa !20
  %53 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 4
  %54 = load ptr, ptr %53, align 8, !tbaa !16
  %55 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %54)
  %56 = call noundef double @_ZNK5Fluid9viscosityEv(ptr noundef nonnull align 8 dereferenceable(80) %55)
  %57 = load ptr, ptr %5, align 8, !tbaa !21
  %58 = getelementptr inbounds ptr, ptr %57, i64 23
  %59 = load ptr, ptr %58, align 8
  %60 = call noundef double %59(ptr noundef nonnull align 8 dereferenceable(184) %5, double noundef %52, double noundef %56)
  %61 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 18
  store double %60, ptr %61, align 8, !tbaa !18
  %62 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !16
  %64 = call noundef double @_ZNK10CommonData14KrwatcornAtSw0Ev(ptr noundef nonnull align 8 dereferenceable(1972) %63)
  %65 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 18
  %66 = load double, ptr %65, align 8, !tbaa !18
  %67 = fmul double %64, %66
  %68 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 19
  %69 = getelementptr inbounds %"struct.std::pair", ptr %68, i32 0, i32 0
  store double %67, ptr %69, align 8, !tbaa !19
  %70 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 19
  %71 = getelementptr inbounds %"struct.std::pair", ptr %70, i32 0, i32 1
  store double 0.000000e+00, ptr %71, align 8, !tbaa !23
  %72 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 13
  %73 = load double, ptr %72, align 8, !tbaa !20
  %74 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !16
  %76 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %75)
  %77 = call noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80) %76)
  %78 = fdiv double %73, %77
  %79 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 17
  store double %78, ptr %79, align 8, !tbaa !26
  br label %80

80:                                               ; preds = %49, %12
  %81 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 14
  %82 = load double, ptr %81, align 8, !tbaa !17
  %83 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 13
  %84 = load double, ptr %83, align 8, !tbaa !20
  %85 = fmul double %82, %84
  %86 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 4
  %87 = load ptr, ptr %86, align 8, !tbaa !16
  %88 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %87)
  %89 = call noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80) %88)
  %90 = fdiv double %85, %89
  %91 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 14
  %92 = load double, ptr %91, align 8, !tbaa !17
  %93 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 13
  %94 = load double, ptr %93, align 8, !tbaa !20
  %95 = fmul double %92, %94
  %96 = getelementptr inbounds %class.VoidElem, ptr %5, i32 0, i32 1
  %97 = load double, ptr %96, align 8, !tbaa !24
  %98 = fdiv double %95, %97
  %99 = call double @sqrt(double noundef %98) #3
  %100 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 4
  %101 = load ptr, ptr %100, align 8, !tbaa !16
  %102 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK10CommonData7surfaceEv(ptr noundef nonnull align 8 dereferenceable(1972) %101)
  %103 = call noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80) %102)
  %104 = fdiv double %99, %103
  %105 = fadd double %90, %104
  %106 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 17
  store double %105, ptr %106, align 8, !tbaa !26
  %107 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 13
  %108 = load double, ptr %107, align 8, !tbaa !20
  %109 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 14
  %110 = load double, ptr %109, align 8, !tbaa !17
  %111 = fsub double 1.000000e+00, %110
  %112 = fmul double %108, %111
  %113 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 4
  %114 = load ptr, ptr %113, align 8, !tbaa !16
  %115 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %114)
  %116 = call noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80) %115)
  %117 = fdiv double %112, %116
  %118 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 17
  %119 = load double, ptr %118, align 8, !tbaa !26
  %120 = fadd double %119, %117
  store double %120, ptr %118, align 8, !tbaa !26
  %121 = getelementptr inbounds %class.ElemModel, ptr %5, i32 0, i32 14
  %122 = load double, ptr %121, align 8, !tbaa !17
  ret double %122
}

attributes #0 = { mustprogress nounwind 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 #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 = { 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 #3 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 48}
!12 = !{!"_ZTS9ElemModel", !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !6, i64 48, !13, i64 56, !13, i64 57, !13, i64 58, !13, i64 59, !14, i64 60, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !15, i64 120, !15, i64 136}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSSt4pairIddE", !10, i64 0, !10, i64 8}
!16 = !{!12, !6, i64 32}
!17 = !{!12, !10, i64 80}
!18 = !{!12, !10, i64 112}
!19 = !{!12, !10, i64 120}
!20 = !{!12, !10, i64 72}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, i64 0}
!23 = !{!12, !10, i64 128}
!24 = !{!25, !10, i64 152}
!25 = !{!"_ZTS8VoidElem", !12, i64 0, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176}
!26 = !{!12, !10, i64 104}


; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK5Fluid9viscosityEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK10CommonData14KrwatcornAtSw0Ev(ptr noundef nonnull align 8 dereferenceable(1972)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNK10CommonData7surfaceEv(ptr noundef nonnull align 8 dereferenceable(1972)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Circle5calcREd(ptr noundef nonnull align 8 dereferenceable(184) %0, double noundef %1) unnamed_addr #2 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 48
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  %6 = load ptr, ptr %5, align 8, !tbaa !14
  %7 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %6)
  %8 = icmp eq ptr %4, %7
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  br i1 %8, label %10, label %40

10:                                               ; preds = %2
  store double 1.000000e+00, ptr %9, align 8, !tbaa !15
  %11 = getelementptr inbounds i8, ptr %0, i64 112
  %12 = getelementptr inbounds i8, ptr %0, i64 72
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %11, i8 0, i64 16, i1 false)
  %13 = load double, ptr %12, align 8, !tbaa !16
  %14 = load ptr, ptr %5, align 8, !tbaa !14
  %15 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %14)
  %16 = tail call noundef double @_ZNK5Fluid9viscosityEv(ptr noundef nonnull align 8 dereferenceable(80) %15)
  %17 = load ptr, ptr %0, align 8, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %17, i64 184
  %19 = load ptr, ptr %18, align 8
  %20 = tail call noundef double %19(ptr noundef nonnull align 8 dereferenceable(184) %0, double noundef %13, double noundef %16)
  %21 = getelementptr inbounds i8, ptr %0, i64 128
  store double %20, ptr %21, align 8, !tbaa !19
  %22 = load <2 x double>, ptr %12, align 8
  %23 = load ptr, ptr %5, align 8, !tbaa !14
  %24 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %23)
  %25 = tail call noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
  %26 = load double, ptr %12, align 8, !tbaa !16
  %27 = getelementptr inbounds i8, ptr %0, i64 152
  %28 = load double, ptr %27, align 8, !tbaa !20
  %29 = fdiv double %26, %28
  %30 = tail call double @sqrt(double noundef %29) #4
  %31 = load ptr, ptr %5, align 8, !tbaa !14
  %32 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK10CommonData7surfaceEv(ptr noundef nonnull align 8 dereferenceable(1972) %31)
  %33 = tail call noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80) %32)
  %34 = insertelement <2 x double> %22, double %30, i64 1
  %35 = insertelement <2 x double> poison, double %25, i64 0
  %36 = insertelement <2 x double> %35, double %33, i64 1
  %37 = fdiv <2 x double> %34, %36
  %shift = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %38 = fadd <2 x double> %37, %shift
  %39 = extractelement <2 x double> %38, i64 0
  br label %62

40:                                               ; preds = %2
  store double 0.000000e+00, ptr %9, align 8, !tbaa !15
  %41 = getelementptr inbounds i8, ptr %0, i64 72
  %42 = load double, ptr %41, align 8, !tbaa !16
  %43 = load ptr, ptr %5, align 8, !tbaa !14
  %44 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %43)
  %45 = tail call noundef double @_ZNK5Fluid9viscosityEv(ptr noundef nonnull align 8 dereferenceable(80) %44)
  %46 = load ptr, ptr %0, align 8, !tbaa !17
  %47 = getelementptr inbounds i8, ptr %46, i64 184
  %48 = load ptr, ptr %47, align 8
  %49 = tail call noundef double %48(ptr noundef nonnull align 8 dereferenceable(184) %0, double noundef %42, double noundef %45)
  %50 = getelementptr inbounds i8, ptr %0, i64 112
  store double %49, ptr %50, align 8, !tbaa !22
  %51 = load ptr, ptr %5, align 8, !tbaa !14
  %52 = tail call noundef double @_ZNK10CommonData14KrwatcornAtSw0Ev(ptr noundef nonnull align 8 dereferenceable(1972) %51)
  %53 = load double, ptr %50, align 8, !tbaa !22
  %54 = fmul double %52, %53
  %55 = getelementptr inbounds i8, ptr %0, i64 120
  store double %54, ptr %55, align 8, !tbaa !23
  %56 = getelementptr inbounds i8, ptr %0, i64 128
  store double 0.000000e+00, ptr %56, align 8, !tbaa !19
  %57 = load double, ptr %41, align 8, !tbaa !16
  %58 = load ptr, ptr %5, align 8, !tbaa !14
  %59 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %58)
  %60 = tail call noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80) %59)
  %61 = fdiv double %57, %60
  br label %62

62:                                               ; preds = %40, %10
  %.sink = phi double [ %39, %10 ], [ %61, %40 ]
  %63 = getelementptr inbounds i8, ptr %0, i64 104
  store double %.sink, ptr %63, align 8
  %64 = getelementptr inbounds i8, ptr %0, i64 80
  %65 = load double, ptr %64, align 8, !tbaa !15
  %66 = getelementptr inbounds i8, ptr %0, i64 72
  %67 = load double, ptr %66, align 8, !tbaa !16
  %68 = fmul double %65, %67
  %69 = load ptr, ptr %5, align 8, !tbaa !14
  %70 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData5waterEv(ptr noundef nonnull align 8 dereferenceable(984) %69)
  %71 = tail call noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80) %70)
  %72 = fdiv double %68, %71
  %73 = load double, ptr %64, align 8, !tbaa !15
  %74 = load double, ptr %66, align 8, !tbaa !16
  %75 = fmul double %73, %74
  %76 = getelementptr inbounds i8, ptr %0, i64 152
  %77 = load double, ptr %76, align 8, !tbaa !20
  %78 = fdiv double %75, %77
  %79 = tail call double @sqrt(double noundef %78) #4
  %80 = load ptr, ptr %5, align 8, !tbaa !14
  %81 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK10CommonData7surfaceEv(ptr noundef nonnull align 8 dereferenceable(1972) %80)
  %82 = tail call noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80) %81)
  %83 = fdiv double %79, %82
  %84 = fadd double %72, %83
  store double %84, ptr %63, align 8, !tbaa !24
  %85 = load double, ptr %66, align 8, !tbaa !16
  %86 = load double, ptr %64, align 8, !tbaa !15
  %87 = fsub double 1.000000e+00, %86
  %88 = fmul double %85, %87
  %89 = load ptr, ptr %5, align 8, !tbaa !14
  %90 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK7GNMData3oilEv(ptr noundef nonnull align 8 dereferenceable(984) %89)
  %91 = tail call noundef double @_ZNK5Fluid11resistivityEv(ptr noundef nonnull align 8 dereferenceable(80) %90)
  %92 = fdiv double %88, %91
  %93 = load double, ptr %63, align 8, !tbaa !24
  %94 = fadd double %93, %92
  store double %94, ptr %63, align 8, !tbaa !24
  %95 = load double, ptr %64, align 8, !tbaa !15
  ret double %95
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

attributes #0 = { mustprogress nounwind 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 #1 = { 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 #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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)"}
!5 = !{!6, !10, i64 48}
!6 = !{!"_ZTS9ElemModel", !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !11, i64 56, !11, i64 57, !11, i64 58, !11, i64 59, !12, i64 60, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !13, i64 120, !13, i64 136}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"_ZTSSt4pairIddE", !7, i64 0, !7, i64 8}
!14 = !{!6, !10, i64 32}
!15 = !{!6, !7, i64 80}
!16 = !{!6, !7, i64 72}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !9, i64 0}
!19 = !{!6, !7, i64 128}
!20 = !{!21, !7, i64 152}
!21 = !{!"_ZTS8VoidElem", !6, i64 0, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176}
!22 = !{!6, !7, i64 112}
!23 = !{!6, !7, i64 120}
!24 = !{!6, !7, i64 104}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,MergedLoadStoreMotionPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass