; LLVM IR from zhenrong-wang/co2 :: co2_property_calc (calc_tsat_p)

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

@__const.calc_tsat_p.tau_ini = external hidden unnamed_addr constant [10 x double], align 16
@__const.calc_tsat_p.d1_ini = external hidden unnamed_addr constant [3 x double], align 16
@__const.calc_tsat_p.d2_ini = external hidden unnamed_addr constant [9 x double], align 16

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i1 @llvm.is.fpclass.f64(double, i32 immarg) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @Gaussian_elimination(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local double @find_max(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @calcfgh_dfgh_psat(ptr noundef, ptr noundef, double noundef, double noundef, double noundef, double noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @calc_tsat_p(ptr noundef %0, ptr noundef %1, ptr noundef %2, double noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca [3 x double], align 16
  %11 = alloca [3 x [3 x double]], align 16
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca [3 x double], align 16
  %19 = alloca [10 x double], align 16
  %20 = alloca [3 x double], align 16
  %21 = alloca [9 x double], align 16
  %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 i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store double %3, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @llvm.memset.p0.i64(ptr align 16 %10, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 72, ptr %11) #5
  call void @llvm.memset.p0.i64(ptr align 16 %11, i8 0, i64 72, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 -1, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #5
  call void @llvm.memset.p0.i64(ptr align 16 %18, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 80, ptr %19) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 @__const.calc_tsat_p.tau_ini, i64 80, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 @__const.calc_tsat_p.d1_ini, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 72, ptr %21) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 @__const.calc_tsat_p.d2_ini, i64 72, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store i32 0, ptr %28, align 4, !tbaa !11
  br label %32

32:                                               ; preds = %164, %4
  %33 = load i32, ptr %28, align 4, !tbaa !11
  %34 = icmp slt i32 %33, 10
  br i1 %34, label %35, label %167

35:                                               ; preds = %32
  store i32 0, ptr %29, align 4, !tbaa !11
  br label %36

36:                                               ; preds = %160, %35
  %37 = load i32, ptr %29, align 4, !tbaa !11
  %38 = icmp slt i32 %37, 3
  br i1 %38, label %39, label %163

39:                                               ; preds = %36
  store i32 0, ptr %30, align 4, !tbaa !11
  br label %40

40:                                               ; preds = %156, %39
  %41 = load i32, ptr %30, align 4, !tbaa !11
  %42 = icmp slt i32 %41, 9
  br i1 %42, label %43, label %159

43:                                               ; preds = %40
  %44 = getelementptr inbounds [3 x [3 x double]], ptr %11, i64 0, i64 0
  %45 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  %46 = load i32, ptr %28, align 4, !tbaa !11
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [10 x double], ptr %19, i64 0, i64 %47
  %49 = load double, ptr %48, align 8, !tbaa !9
  %50 = load i32, ptr %29, align 4, !tbaa !11
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [3 x double], ptr %20, i64 0, i64 %51
  %53 = load double, ptr %52, align 8, !tbaa !9
  %54 = load i32, ptr %30, align 4, !tbaa !11
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [9 x double], ptr %21, i64 0, i64 %55
  %57 = load double, ptr %56, align 8, !tbaa !9
  %58 = load double, ptr %9, align 8, !tbaa !9
  call void @calcfgh_dfgh_psat(ptr noundef %44, ptr noundef %45, double noundef %49, double noundef %53, double noundef %57, double noundef %58)
  %59 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %60 = getelementptr inbounds [3 x [3 x double]], ptr %11, i64 0, i64 0
  %61 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  %62 = call i32 @Gaussian_elimination(ptr noundef %59, ptr noundef %60, ptr noundef %61)
  store i32 %62, ptr %12, align 4, !tbaa !11
  %63 = load i32, ptr %12, align 4, !tbaa !11
  %64 = icmp eq i32 %63, -1
  br i1 %64, label %65, label %66

65:                                               ; preds = %43
  br label %156

66:                                               ; preds = %43
  %67 = load i32, ptr %28, align 4, !tbaa !11
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [10 x double], ptr %19, i64 0, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !9
  %71 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %72 = load double, ptr %71, align 16, !tbaa !9
  %73 = fadd double %70, %72
  store double %73, ptr %22, align 8, !tbaa !9
  %74 = load i32, ptr %29, align 4, !tbaa !11
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [3 x double], ptr %20, i64 0, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !9
  %78 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 1
  %79 = load double, ptr %78, align 8, !tbaa !9
  %80 = fadd double %77, %79
  store double %80, ptr %25, align 8, !tbaa !9
  %81 = load i32, ptr %30, align 4, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [9 x double], ptr %21, i64 0, i64 %82
  %84 = load double, ptr %83, align 8, !tbaa !9
  %85 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 2
  %86 = load double, ptr %85, align 16, !tbaa !9
  %87 = fadd double %84, %86
  store double %87, ptr %27, align 8, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %88

88:                                               ; preds = %127, %66
  %89 = load double, ptr %22, align 8, !tbaa !9
  store double %89, ptr %23, align 8, !tbaa !9
  %90 = load double, ptr %25, align 8, !tbaa !9
  store double %90, ptr %24, align 8, !tbaa !9
  %91 = load double, ptr %27, align 8, !tbaa !9
  store double %91, ptr %26, align 8, !tbaa !9
  %92 = getelementptr inbounds [3 x [3 x double]], ptr %11, i64 0, i64 0
  %93 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  %94 = load double, ptr %23, align 8, !tbaa !9
  %95 = load double, ptr %24, align 8, !tbaa !9
  %96 = load double, ptr %26, align 8, !tbaa !9
  %97 = load double, ptr %9, align 8, !tbaa !9
  call void @calcfgh_dfgh_psat(ptr noundef %92, ptr noundef %93, double noundef %94, double noundef %95, double noundef %96, double noundef %97)
  %98 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %99 = getelementptr inbounds [3 x [3 x double]], ptr %11, i64 0, i64 0
  %100 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  %101 = call i32 @Gaussian_elimination(ptr noundef %98, ptr noundef %99, ptr noundef %100)
  store i32 %101, ptr %12, align 4, !tbaa !11
  %102 = load i32, ptr %12, align 4, !tbaa !11
  %103 = icmp eq i32 %102, -1
  br i1 %103, label %104, label %105

104:                                              ; preds = %88
  br label %129

105:                                              ; preds = %88
  %106 = load double, ptr %23, align 8, !tbaa !9
  %107 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %108 = load double, ptr %107, align 16, !tbaa !9
  %109 = fadd double %106, %108
  store double %109, ptr %22, align 8, !tbaa !9
  %110 = load double, ptr %24, align 8, !tbaa !9
  %111 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 1
  %112 = load double, ptr %111, align 8, !tbaa !9
  %113 = fadd double %110, %112
  store double %113, ptr %25, align 8, !tbaa !9
  %114 = load double, ptr %26, align 8, !tbaa !9
  %115 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 2
  %116 = load double, ptr %115, align 16, !tbaa !9
  %117 = fadd double %114, %116
  store double %117, ptr %27, align 8, !tbaa !9
  %118 = load i32, ptr %13, align 4, !tbaa !11
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %13, align 4, !tbaa !11
  br label %120

120:                                              ; preds = %105
  %121 = load i32, ptr %13, align 4, !tbaa !11
  %122 = icmp slt i32 %121, 100
  br i1 %122, label %123, label %127

123:                                              ; preds = %120
  %124 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %125 = call double @find_max(ptr noundef %124)
  %126 = fcmp ogt double %125, 0x3EB0C6F7A0B5ED8D
  br label %127

127:                                              ; preds = %123, %120
  %128 = phi i1 [ false, %120 ], [ %126, %123 ]
  br i1 %128, label %88, label %129, !llvm.loop !13

129:                                              ; preds = %127, %104
  %130 = load i32, ptr %13, align 4, !tbaa !11
  %131 = icmp eq i32 %130, 100
  br i1 %131, label %135, label %132

132:                                              ; preds = %129
  %133 = load i32, ptr %12, align 4, !tbaa !11
  %134 = icmp eq i32 %133, -1
  br i1 %134, label %135, label %136

135:                                              ; preds = %132, %129
  br label %156

136:                                              ; preds = %132
  %137 = load double, ptr %22, align 8, !tbaa !9
  %138 = call i1 @llvm.is.fpclass.f64(double %137, i32 3)
  br i1 %138, label %155, label %139

139:                                              ; preds = %136
  %140 = load double, ptr %25, align 8, !tbaa !9
  %141 = call i1 @llvm.is.fpclass.f64(double %140, i32 3)
  br i1 %141, label %155, label %142

142:                                              ; preds = %139
  %143 = load double, ptr %27, align 8, !tbaa !9
  %144 = call i1 @llvm.is.fpclass.f64(double %143, i32 3)
  br i1 %144, label %155, label %145

145:                                              ; preds = %142
  %146 = load double, ptr %22, align 8, !tbaa !9
  %147 = fdiv double 0x4073020D1B71758E, %146
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  store double %147, ptr %148, align 8, !tbaa !9
  %149 = load double, ptr %25, align 8, !tbaa !9
  %150 = fmul double %149, 4.676000e+02
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  store double %150, ptr %151, align 8, !tbaa !9
  %152 = load double, ptr %27, align 8, !tbaa !9
  %153 = fmul double %152, 4.676000e+02
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  store double %153, ptr %154, align 8, !tbaa !9
  store i32 0, ptr %5, align 4
  store i32 1, ptr %31, align 4
  br label %168

155:                                              ; preds = %142, %139, %136
  br label %156

156:                                              ; preds = %155, %135, %65
  %157 = load i32, ptr %30, align 4, !tbaa !11
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %30, align 4, !tbaa !11
  br label %40, !llvm.loop !15

159:                                              ; preds = %40
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %29, align 4, !tbaa !11
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %29, align 4, !tbaa !11
  br label %36, !llvm.loop !16

163:                                              ; preds = %36
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %28, align 4, !tbaa !11
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %28, align 4, !tbaa !11
  br label %32, !llvm.loop !17

167:                                              ; preds = %32
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %31, align 4
  br label %168

168:                                              ; preds = %167, %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, 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
  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 72, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  %169 = load i32, ptr %5, align 4
  ret i32 %169
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}


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

@__const.calc_tsat_p.tau_ini = external hidden unnamed_addr constant [10 x double], align 16
@__const.calc_tsat_p.d1_ini = external hidden unnamed_addr constant [3 x double], align 16
@__const.calc_tsat_p.d2_ini = external hidden unnamed_addr constant [9 x double], align 16

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @Gaussian_elimination(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local double @find_max(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @calcfgh_dfgh_psat(ptr noundef, ptr noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @calc_tsat_p(ptr nocapture noundef writeonly %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2, double noundef %3) local_unnamed_addr #1 {
  %5 = alloca [3 x double], align 16
  %6 = alloca [3 x [3 x double]], align 16
  %7 = alloca [3 x double], align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %5, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6) #3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(72) %6, i8 0, i64 72, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  %8 = getelementptr inbounds i8, ptr %5, i64 16
  %.pre = load double, ptr @__const.calc_tsat_p.d1_ini, align 16, !tbaa !5
  %9 = load double, ptr getelementptr inbounds (i8, ptr @__const.calc_tsat_p.d1_ini, i64 8), align 8
  %10 = load double, ptr getelementptr inbounds (i8, ptr @__const.calc_tsat_p.d1_ini, i64 16), align 16
  br label %.preheader54

.preheader54:                                     ; preds = %4, %120
  %indvars.iv73 = phi i64 [ 0, %4 ], [ %indvars.iv.next74, %120 ]
  %11 = getelementptr inbounds [10 x double], ptr @__const.calc_tsat_p.tau_ini, i64 0, i64 %indvars.iv73
  %12 = load double, ptr %11, align 8, !tbaa !5
  %13 = insertelement <2 x double> poison, double %12, i64 0
  %14 = insertelement <2 x double> %13, double %.pre, i64 1
  br label %15

15:                                               ; preds = %.preheader54, %53
  %indvars.iv = phi i64 [ 0, %.preheader54 ], [ %indvars.iv.next, %53 ]
  %16 = getelementptr inbounds [9 x double], ptr @__const.calc_tsat_p.d2_ini, i64 0, i64 %indvars.iv
  %17 = load double, ptr %16, align 8, !tbaa !5
  call void @calcfgh_dfgh_psat(ptr noundef nonnull %6, ptr noundef nonnull %7, double noundef %12, double noundef %.pre, double noundef %17, double noundef %3)
  %18 = call i32 @Gaussian_elimination(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %19 = icmp eq i32 %18, -1
  br i1 %19, label %53, label %20

20:                                               ; preds = %15
  %21 = load <2 x double>, ptr %5, align 16, !tbaa !5
  %22 = fadd <2 x double> %14, %21
  %23 = load double, ptr %8, align 16, !tbaa !5
  %24 = fadd double %17, %23
  br label %25

25:                                               ; preds = %36, %20
  %.045 = phi i32 [ 0, %20 ], [ %37, %36 ]
  %.041 = phi double [ %24, %20 ], [ %35, %36 ]
  %26 = phi <2 x double> [ %22, %20 ], [ %33, %36 ]
  %27 = extractelement <2 x double> %26, i64 0
  %28 = extractelement <2 x double> %26, i64 1
  call void @calcfgh_dfgh_psat(ptr noundef nonnull %6, ptr noundef nonnull %7, double noundef %27, double noundef %28, double noundef %.041, double noundef %3)
  %29 = call i32 @Gaussian_elimination(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %30 = icmp eq i32 %29, -1
  br i1 %30, label %.critedge, label %31

31:                                               ; preds = %25
  %32 = load <2 x double>, ptr %5, align 16, !tbaa !5
  %33 = fadd <2 x double> %26, %32
  %34 = load double, ptr %8, align 16, !tbaa !5
  %35 = fadd double %.041, %34
  %exitcond.not = icmp eq i32 %.045, 99
  br i1 %exitcond.not, label %.critedge, label %36

36:                                               ; preds = %31
  %37 = add nuw nsw i32 %.045, 1
  %38 = call double @find_max(ptr noundef nonnull %5)
  %39 = fcmp ogt double %38, 0x3EB0C6F7A0B5ED8D
  br i1 %39, label %25, label %.critedge, !llvm.loop !9

.critedge:                                        ; preds = %31, %25, %36
  %.146 = phi i32 [ 100, %31 ], [ %.045, %25 ], [ %37, %36 ]
  %.1 = phi double [ %35, %31 ], [ %.041, %25 ], [ %35, %36 ]
  %40 = phi <2 x double> [ %33, %31 ], [ %26, %25 ], [ %33, %36 ]
  %41 = icmp eq i32 %.146, 100
  %or.cond = or i1 %30, %41
  %42 = extractelement <2 x double> %40, i64 0
  %43 = fcmp uno double %42, 0.000000e+00
  %or.cond51 = select i1 %or.cond, i1 true, i1 %43
  %44 = extractelement <2 x double> %40, i64 1
  %45 = fcmp uno double %44, 0.000000e+00
  %or.cond52 = select i1 %or.cond51, i1 true, i1 %45
  %46 = fcmp uno double %.1, 0.000000e+00
  %or.cond53 = select i1 %or.cond52, i1 true, i1 %46
  br i1 %or.cond53, label %53, label %.loopexit64

.loopexit64:                                      ; preds = %.critedge, %.critedge.1, %.critedge.2
  %.1.lcssa = phi double [ %.1.2, %.critedge.2 ], [ %.1.1, %.critedge.1 ], [ %.1, %.critedge ]
  %47 = phi <2 x double> [ %112, %.critedge.2 ], [ %79, %.critedge.1 ], [ %40, %.critedge ]
  %48 = extractelement <2 x double> %47, i64 0
  %49 = fdiv double 0x4073020D1B71758E, %48
  store double %49, ptr %0, align 8, !tbaa !5
  %50 = extractelement <2 x double> %47, i64 1
  %51 = fmul double %50, 4.676000e+02
  store double %51, ptr %1, align 8, !tbaa !5
  %52 = fmul double %.1.lcssa, 4.676000e+02
  store double %52, ptr %2, align 8, !tbaa !5
  br label %.loopexit

53:                                               ; preds = %.critedge, %15
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond59.not = icmp eq i64 %indvars.iv.next, 9
  br i1 %exitcond59.not, label %.preheader.1.preheader, label %15, !llvm.loop !11

.preheader.1.preheader:                           ; preds = %53
  %54 = insertelement <2 x double> %13, double %9, i64 1
  br label %.preheader.1

.preheader.1:                                     ; preds = %.preheader.1.preheader, %86
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %86 ], [ 0, %.preheader.1.preheader ]
  %55 = getelementptr inbounds [9 x double], ptr @__const.calc_tsat_p.d2_ini, i64 0, i64 %indvars.iv.1
  %56 = load double, ptr %55, align 8, !tbaa !5
  call void @calcfgh_dfgh_psat(ptr noundef nonnull %6, ptr noundef nonnull %7, double noundef %12, double noundef %9, double noundef %56, double noundef %3)
  %57 = call i32 @Gaussian_elimination(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %58 = icmp eq i32 %57, -1
  br i1 %58, label %86, label %59

59:                                               ; preds = %.preheader.1
  %60 = load <2 x double>, ptr %5, align 16, !tbaa !5
  %61 = fadd <2 x double> %54, %60
  %62 = load double, ptr %8, align 16, !tbaa !5
  %63 = fadd double %56, %62
  br label %64

64:                                               ; preds = %75, %59
  %.045.1 = phi i32 [ 0, %59 ], [ %76, %75 ]
  %.041.1 = phi double [ %63, %59 ], [ %74, %75 ]
  %65 = phi <2 x double> [ %61, %59 ], [ %72, %75 ]
  %66 = extractelement <2 x double> %65, i64 0
  %67 = extractelement <2 x double> %65, i64 1
  call void @calcfgh_dfgh_psat(ptr noundef nonnull %6, ptr noundef nonnull %7, double noundef %66, double noundef %67, double noundef %.041.1, double noundef %3)
  %68 = call i32 @Gaussian_elimination(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %69 = icmp eq i32 %68, -1
  br i1 %69, label %.critedge.1, label %70

70:                                               ; preds = %64
  %71 = load <2 x double>, ptr %5, align 16, !tbaa !5
  %72 = fadd <2 x double> %65, %71
  %73 = load double, ptr %8, align 16, !tbaa !5
  %74 = fadd double %.041.1, %73
  %exitcond.1.not = icmp eq i32 %.045.1, 99
  br i1 %exitcond.1.not, label %.critedge.1, label %75

75:                                               ; preds = %70
  %76 = add nuw nsw i32 %.045.1, 1
  %77 = call double @find_max(ptr noundef nonnull %5)
  %78 = fcmp ogt double %77, 0x3EB0C6F7A0B5ED8D
  br i1 %78, label %64, label %.critedge.1, !llvm.loop !9

.critedge.1:                                      ; preds = %75, %70, %64
  %.146.1 = phi i32 [ 100, %70 ], [ %.045.1, %64 ], [ %76, %75 ]
  %.1.1 = phi double [ %74, %70 ], [ %.041.1, %64 ], [ %74, %75 ]
  %79 = phi <2 x double> [ %72, %70 ], [ %65, %64 ], [ %72, %75 ]
  %80 = icmp eq i32 %.146.1, 100
  %or.cond.1 = or i1 %69, %80
  %81 = extractelement <2 x double> %79, i64 0
  %82 = fcmp uno double %81, 0.000000e+00
  %or.cond51.1 = select i1 %or.cond.1, i1 true, i1 %82
  %83 = extractelement <2 x double> %79, i64 1
  %84 = fcmp uno double %83, 0.000000e+00
  %or.cond52.1 = select i1 %or.cond51.1, i1 true, i1 %84
  %85 = fcmp uno double %.1.1, 0.000000e+00
  %or.cond53.1 = select i1 %or.cond52.1, i1 true, i1 %85
  br i1 %or.cond53.1, label %86, label %.loopexit64

86:                                               ; preds = %.critedge.1, %.preheader.1
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %exitcond59.1.not = icmp eq i64 %indvars.iv.next.1, 9
  br i1 %exitcond59.1.not, label %.preheader.2.preheader, label %.preheader.1, !llvm.loop !11

.preheader.2.preheader:                           ; preds = %86
  %87 = insertelement <2 x double> %13, double %10, i64 1
  br label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.2.preheader, %119
  %indvars.iv.2 = phi i64 [ %indvars.iv.next.2, %119 ], [ 0, %.preheader.2.preheader ]
  %88 = getelementptr inbounds [9 x double], ptr @__const.calc_tsat_p.d2_ini, i64 0, i64 %indvars.iv.2
  %89 = load double, ptr %88, align 8, !tbaa !5
  call void @calcfgh_dfgh_psat(ptr noundef nonnull %6, ptr noundef nonnull %7, double noundef %12, double noundef %10, double noundef %89, double noundef %3)
  %90 = call i32 @Gaussian_elimination(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %91 = icmp eq i32 %90, -1
  br i1 %91, label %119, label %92

92:                                               ; preds = %.preheader.2
  %93 = load <2 x double>, ptr %5, align 16, !tbaa !5
  %94 = fadd <2 x double> %87, %93
  %95 = load double, ptr %8, align 16, !tbaa !5
  %96 = fadd double %89, %95
  br label %97

97:                                               ; preds = %108, %92
  %.045.2 = phi i32 [ 0, %92 ], [ %109, %108 ]
  %.041.2 = phi double [ %96, %92 ], [ %107, %108 ]
  %98 = phi <2 x double> [ %94, %92 ], [ %105, %108 ]
  %99 = extractelement <2 x double> %98, i64 0
  %100 = extractelement <2 x double> %98, i64 1
  call void @calcfgh_dfgh_psat(ptr noundef nonnull %6, ptr noundef nonnull %7, double noundef %99, double noundef %100, double noundef %.041.2, double noundef %3)
  %101 = call i32 @Gaussian_elimination(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %102 = icmp eq i32 %101, -1
  br i1 %102, label %.critedge.2, label %103

103:                                              ; preds = %97
  %104 = load <2 x double>, ptr %5, align 16, !tbaa !5
  %105 = fadd <2 x double> %98, %104
  %106 = load double, ptr %8, align 16, !tbaa !5
  %107 = fadd double %.041.2, %106
  %exitcond.2.not = icmp eq i32 %.045.2, 99
  br i1 %exitcond.2.not, label %.critedge.2, label %108

108:                                              ; preds = %103
  %109 = add nuw nsw i32 %.045.2, 1
  %110 = call double @find_max(ptr noundef nonnull %5)
  %111 = fcmp ogt double %110, 0x3EB0C6F7A0B5ED8D
  br i1 %111, label %97, label %.critedge.2, !llvm.loop !9

.critedge.2:                                      ; preds = %108, %103, %97
  %.146.2 = phi i32 [ 100, %103 ], [ %.045.2, %97 ], [ %109, %108 ]
  %.1.2 = phi double [ %107, %103 ], [ %.041.2, %97 ], [ %107, %108 ]
  %112 = phi <2 x double> [ %105, %103 ], [ %98, %97 ], [ %105, %108 ]
  %113 = icmp eq i32 %.146.2, 100
  %or.cond.2 = or i1 %102, %113
  %114 = extractelement <2 x double> %112, i64 0
  %115 = fcmp uno double %114, 0.000000e+00
  %or.cond51.2 = select i1 %or.cond.2, i1 true, i1 %115
  %116 = extractelement <2 x double> %112, i64 1
  %117 = fcmp uno double %116, 0.000000e+00
  %or.cond52.2 = select i1 %or.cond51.2, i1 true, i1 %117
  %118 = fcmp uno double %.1.2, 0.000000e+00
  %or.cond53.2 = select i1 %or.cond52.2, i1 true, i1 %118
  br i1 %or.cond53.2, label %119, label %.loopexit64

119:                                              ; preds = %.critedge.2, %.preheader.2
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1
  %exitcond59.2.not = icmp eq i64 %indvars.iv.next.2, 9
  br i1 %exitcond59.2.not, label %120, label %.preheader.2, !llvm.loop !11

120:                                              ; preds = %119
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %exitcond76.not = icmp eq i64 %indvars.iv.next74, 10
  br i1 %exitcond76.not, label %.loopexit, label %.preheader54, !llvm.loop !12

.loopexit:                                        ; preds = %120, %.loopexit64
  %.042 = phi i32 [ 0, %.loopexit64 ], [ -1, %120 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  ret i32 %.042
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass