; LLVM IR from robotic-vision-lab/Cloud-Object-Recognition-Engine :: 3rdparty/libsvm/svm.ll (ZN9Solver_NU12do_shrinkingEv)

; 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.Solver = type <{ ptr, i32, [4 x i8], ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, ptr, ptr, ptr, i32, i8, [3 x i8] }>

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Solver10swap_indexEii(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef, i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Solver20reconstruct_gradientEv(ptr noundef nonnull align 8 dereferenceable(117)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef double @_ZL3maxIdET_S0_S0_(double noundef, double noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9Solver_NU9be_shrunkEidddd(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, double noundef, double noundef, double noundef, double noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9Solver_NU12do_shrinkingEv(ptr noundef nonnull align 8 dereferenceable(128) %0) unnamed_addr #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  store double 0xFFF0000000000000, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  store double 0xFFF0000000000000, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store double 0xFFF0000000000000, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store double 0xFFF0000000000000, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !11
  br label %9

9:                                                ; preds = %113, %1
  %10 = load i32, ptr %7, align 4, !tbaa !11
  %11 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 1
  %12 = load i32, ptr %11, align 8, !tbaa !13
  %13 = icmp slt i32 %10, %12
  br i1 %13, label %14, label %116

14:                                               ; preds = %9
  %15 = load i32, ptr %7, align 4, !tbaa !11
  %16 = call noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %8, i32 noundef %15)
  br i1 %16, label %65, label %17

17:                                               ; preds = %14
  %18 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 3
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %20 = load i32, ptr %7, align 4, !tbaa !11
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds i8, ptr %19, i64 %21
  %23 = load i8, ptr %22, align 1, !tbaa !17
  %24 = sext i8 %23 to i32
  %25 = icmp eq i32 %24, 1
  br i1 %25, label %26, label %45

26:                                               ; preds = %17
  %27 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 4
  %28 = load ptr, ptr %27, align 8, !tbaa !18
  %29 = load i32, ptr %7, align 4, !tbaa !11
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds double, ptr %28, i64 %30
  %32 = load double, ptr %31, align 8, !tbaa !9
  %33 = fneg double %32
  %34 = load double, ptr %3, align 8, !tbaa !9
  %35 = fcmp ogt double %33, %34
  br i1 %35, label %36, label %44

36:                                               ; preds = %26
  %37 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !18
  %39 = load i32, ptr %7, align 4, !tbaa !11
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds double, ptr %38, i64 %40
  %42 = load double, ptr %41, align 8, !tbaa !9
  %43 = fneg double %42
  store double %43, ptr %3, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %36, %26
  br label %64

45:                                               ; preds = %17
  %46 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 4
  %47 = load ptr, ptr %46, align 8, !tbaa !18
  %48 = load i32, ptr %7, align 4, !tbaa !11
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds double, ptr %47, i64 %49
  %51 = load double, ptr %50, align 8, !tbaa !9
  %52 = fneg double %51
  %53 = load double, ptr %6, align 8, !tbaa !9
  %54 = fcmp ogt double %52, %53
  br i1 %54, label %55, label %63

55:                                               ; preds = %45
  %56 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 4
  %57 = load ptr, ptr %56, align 8, !tbaa !18
  %58 = load i32, ptr %7, align 4, !tbaa !11
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %57, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !9
  %62 = fneg double %61
  store double %62, ptr %6, align 8, !tbaa !9
  br label %63

63:                                               ; preds = %55, %45
  br label %64

64:                                               ; preds = %63, %44
  br label %65

65:                                               ; preds = %64, %14
  %66 = load i32, ptr %7, align 4, !tbaa !11
  %67 = call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %8, i32 noundef %66)
  br i1 %67, label %112, label %68

68:                                               ; preds = %65
  %69 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 3
  %70 = load ptr, ptr %69, align 8, !tbaa !16
  %71 = load i32, ptr %7, align 4, !tbaa !11
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i8, ptr %70, i64 %72
  %74 = load i8, ptr %73, align 1, !tbaa !17
  %75 = sext i8 %74 to i32
  %76 = icmp eq i32 %75, 1
  br i1 %76, label %77, label %94

77:                                               ; preds = %68
  %78 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 4
  %79 = load ptr, ptr %78, align 8, !tbaa !18
  %80 = load i32, ptr %7, align 4, !tbaa !11
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds double, ptr %79, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !9
  %84 = load double, ptr %4, align 8, !tbaa !9
  %85 = fcmp ogt double %83, %84
  br i1 %85, label %86, label %93

86:                                               ; preds = %77
  %87 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 4
  %88 = load ptr, ptr %87, align 8, !tbaa !18
  %89 = load i32, ptr %7, align 4, !tbaa !11
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %88, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !9
  store double %92, ptr %4, align 8, !tbaa !9
  br label %93

93:                                               ; preds = %86, %77
  br label %111

94:                                               ; preds = %68
  %95 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 4
  %96 = load ptr, ptr %95, align 8, !tbaa !18
  %97 = load i32, ptr %7, align 4, !tbaa !11
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds double, ptr %96, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !9
  %101 = load double, ptr %5, align 8, !tbaa !9
  %102 = fcmp ogt double %100, %101
  br i1 %102, label %103, label %110

103:                                              ; preds = %94
  %104 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 4
  %105 = load ptr, ptr %104, align 8, !tbaa !18
  %106 = load i32, ptr %7, align 4, !tbaa !11
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %105, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !9
  store double %109, ptr %5, align 8, !tbaa !9
  br label %110

110:                                              ; preds = %103, %94
  br label %111

111:                                              ; preds = %110, %93
  br label %112

112:                                              ; preds = %111, %65
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %7, align 4, !tbaa !11
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %7, align 4, !tbaa !11
  br label %9, !llvm.loop !19

116:                                              ; preds = %9
  %117 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 16
  %118 = load i8, ptr %117, align 4, !tbaa !21, !range !22, !noundef !23
  %119 = trunc i8 %118 to i1
  %120 = zext i1 %119 to i32
  %121 = icmp eq i32 %120, 0
  br i1 %121, label %122, label %139

122:                                              ; preds = %116
  %123 = load double, ptr %3, align 8, !tbaa !9
  %124 = load double, ptr %4, align 8, !tbaa !9
  %125 = fadd double %123, %124
  %126 = load double, ptr %5, align 8, !tbaa !9
  %127 = load double, ptr %6, align 8, !tbaa !9
  %128 = fadd double %126, %127
  %129 = call noundef double @_ZL3maxIdET_S0_S0_(double noundef %125, double noundef %128)
  %130 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 9
  %131 = load double, ptr %130, align 8, !tbaa !24
  %132 = fmul double %131, 1.000000e+01
  %133 = fcmp ole double %129, %132
  br i1 %133, label %134, label %139

134:                                              ; preds = %122
  %135 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 16
  store i8 1, ptr %135, align 4, !tbaa !21
  call void @_ZN6Solver20reconstruct_gradientEv(ptr noundef nonnull align 8 dereferenceable(117) %8)
  %136 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 15
  %137 = load i32, ptr %136, align 8, !tbaa !25
  %138 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 1
  store i32 %137, ptr %138, align 8, !tbaa !13
  br label %139

139:                                              ; preds = %134, %122, %116
  store i32 0, ptr %7, align 4, !tbaa !11
  br label %140

140:                                              ; preds = %179, %139
  %141 = load i32, ptr %7, align 4, !tbaa !11
  %142 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 1
  %143 = load i32, ptr %142, align 8, !tbaa !13
  %144 = icmp slt i32 %141, %143
  br i1 %144, label %145, label %182

145:                                              ; preds = %140
  %146 = load i32, ptr %7, align 4, !tbaa !11
  %147 = load double, ptr %3, align 8, !tbaa !9
  %148 = load double, ptr %4, align 8, !tbaa !9
  %149 = load double, ptr %5, align 8, !tbaa !9
  %150 = load double, ptr %6, align 8, !tbaa !9
  %151 = call noundef zeroext i1 @_ZN9Solver_NU9be_shrunkEidddd(ptr noundef nonnull align 8 dereferenceable(128) %8, i32 noundef %146, double noundef %147, double noundef %148, double noundef %149, double noundef %150)
  br i1 %151, label %152, label %178

152:                                              ; preds = %145
  %153 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 1
  %154 = load i32, ptr %153, align 8, !tbaa !13
  %155 = add nsw i32 %154, -1
  store i32 %155, ptr %153, align 8, !tbaa !13
  br label %156

156:                                              ; preds = %173, %152
  %157 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 1
  %158 = load i32, ptr %157, align 8, !tbaa !13
  %159 = load i32, ptr %7, align 4, !tbaa !11
  %160 = icmp sgt i32 %158, %159
  br i1 %160, label %161, label %177

161:                                              ; preds = %156
  %162 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 1
  %163 = load i32, ptr %162, align 8, !tbaa !13
  %164 = load double, ptr %3, align 8, !tbaa !9
  %165 = load double, ptr %4, align 8, !tbaa !9
  %166 = load double, ptr %5, align 8, !tbaa !9
  %167 = load double, ptr %6, align 8, !tbaa !9
  %168 = call noundef zeroext i1 @_ZN9Solver_NU9be_shrunkEidddd(ptr noundef nonnull align 8 dereferenceable(128) %8, i32 noundef %163, double noundef %164, double noundef %165, double noundef %166, double noundef %167)
  br i1 %168, label %173, label %169

169:                                              ; preds = %161
  %170 = load i32, ptr %7, align 4, !tbaa !11
  %171 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 1
  %172 = load i32, ptr %171, align 8, !tbaa !13
  call void @_ZN6Solver10swap_indexEii(ptr noundef nonnull align 8 dereferenceable(117) %8, i32 noundef %170, i32 noundef %172)
  br label %177

173:                                              ; preds = %161
  %174 = getelementptr inbounds %class.Solver, ptr %8, i32 0, i32 1
  %175 = load i32, ptr %174, align 8, !tbaa !13
  %176 = add nsw i32 %175, -1
  store i32 %176, ptr %174, align 8, !tbaa !13
  br label %156, !llvm.loop !26

177:                                              ; preds = %169, %156
  br label %178

178:                                              ; preds = %177, %145
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %7, align 4, !tbaa !11
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %7, align 4, !tbaa !11
  br label %140, !llvm.loop !27

182:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { inlinehint 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 #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, !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, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTS6Solver", !12, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !12, i64 112, !15, i64 116}
!15 = !{!"bool", !7, i64 0}
!16 = !{!14, !6, i64 16}
!17 = !{!7, !7, i64 0}
!18 = !{!14, !6, i64 24}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!14, !15, i64 116}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!14, !10, i64 64}
!25 = !{!14, !12, i64 112}
!26 = distinct !{!26, !20}
!27 = distinct !{!27, !20}


; 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 uwtable
declare dso_local void @_ZN6Solver10swap_indexEii(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Solver20reconstruct_gradientEv(ptr noundef nonnull align 8 dereferenceable(117)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef double @_ZL3maxIdET_S0_S0_(double noundef, double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9Solver_NU9be_shrunkEidddd(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9Solver_NU12do_shrinkingEv(ptr noundef nonnull align 8 dereferenceable(128) %0) unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  %3 = load i32, ptr %2, align 8, !tbaa !5
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  br label %7

7:                                                ; preds = %.lr.ph, %41
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %41 ]
  %.03551 = phi double [ 0xFFF0000000000000, %.lr.ph ], [ %.136, %41 ]
  %.03750 = phi double [ 0xFFF0000000000000, %.lr.ph ], [ %.138, %41 ]
  %.03949 = phi double [ 0xFFF0000000000000, %.lr.ph ], [ %.140, %41 ]
  %.04148 = phi double [ 0xFFF0000000000000, %.lr.ph ], [ %.142, %41 ]
  %8 = trunc nuw nsw i64 %indvars.iv to i32
  %9 = tail call noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %8)
  br i1 %9, label %25, label %10

10:                                               ; preds = %7
  %11 = load ptr, ptr %5, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %11, i64 %indvars.iv
  %13 = load i8, ptr %12, align 1, !tbaa !14
  %14 = icmp eq i8 %13, 1
  %15 = load ptr, ptr %6, align 8, !tbaa !15
  %16 = getelementptr inbounds double, ptr %15, i64 %indvars.iv
  %17 = load double, ptr %16, align 8, !tbaa !16
  %18 = fneg double %17
  br i1 %14, label %19, label %22

19:                                               ; preds = %10
  %20 = fcmp olt double %.04148, %18
  br i1 %20, label %21, label %25

21:                                               ; preds = %19
  br label %25

22:                                               ; preds = %10
  %23 = fcmp olt double %.03551, %18
  br i1 %23, label %24, label %25

24:                                               ; preds = %22
  br label %25

25:                                               ; preds = %21, %19, %24, %22, %7
  %.142 = phi double [ %.04148, %7 ], [ %18, %21 ], [ %.04148, %19 ], [ %.04148, %24 ], [ %.04148, %22 ]
  %.136 = phi double [ %.03551, %7 ], [ %.03551, %21 ], [ %.03551, %19 ], [ %18, %24 ], [ %.03551, %22 ]
  %26 = tail call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %8)
  br i1 %26, label %41, label %27

27:                                               ; preds = %25
  %28 = load ptr, ptr %5, align 8, !tbaa !13
  %29 = getelementptr inbounds i8, ptr %28, i64 %indvars.iv
  %30 = load i8, ptr %29, align 1, !tbaa !14
  %31 = icmp eq i8 %30, 1
  %32 = load ptr, ptr %6, align 8, !tbaa !15
  %33 = getelementptr inbounds double, ptr %32, i64 %indvars.iv
  %34 = load double, ptr %33, align 8, !tbaa !16
  br i1 %31, label %35, label %38

35:                                               ; preds = %27
  %36 = fcmp ogt double %34, %.03949
  br i1 %36, label %37, label %41

37:                                               ; preds = %35
  br label %41

38:                                               ; preds = %27
  %39 = fcmp ogt double %34, %.03750
  br i1 %39, label %40, label %41

40:                                               ; preds = %38
  br label %41

41:                                               ; preds = %25, %38, %40, %35, %37
  %.140 = phi double [ %.03949, %25 ], [ %34, %37 ], [ %.03949, %35 ], [ %.03949, %40 ], [ %.03949, %38 ]
  %.138 = phi double [ %.03750, %25 ], [ %.03750, %37 ], [ %.03750, %35 ], [ %34, %40 ], [ %.03750, %38 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %42 = load i32, ptr %2, align 8, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = icmp slt i64 %indvars.iv.next, %43
  br i1 %44, label %7, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %41, %1
  %45 = phi i32 [ %3, %1 ], [ %42, %41 ]
  %.041.lcssa = phi double [ 0xFFF0000000000000, %1 ], [ %.142, %41 ]
  %.039.lcssa = phi double [ 0xFFF0000000000000, %1 ], [ %.140, %41 ]
  %.037.lcssa = phi double [ 0xFFF0000000000000, %1 ], [ %.138, %41 ]
  %.035.lcssa = phi double [ 0xFFF0000000000000, %1 ], [ %.136, %41 ]
  %46 = getelementptr inbounds i8, ptr %0, i64 116
  %47 = load i8, ptr %46, align 4, !tbaa !19, !range !20, !noundef !21
  %48 = icmp eq i8 %47, 0
  br i1 %48, label %49, label %60

49:                                               ; preds = %._crit_edge
  %50 = fadd double %.041.lcssa, %.039.lcssa
  %51 = fadd double %.037.lcssa, %.035.lcssa
  %52 = tail call noundef double @_ZL3maxIdET_S0_S0_(double noundef %50, double noundef %51)
  %53 = getelementptr inbounds i8, ptr %0, i64 64
  %54 = load double, ptr %53, align 8, !tbaa !22
  %55 = fmul double %54, 1.000000e+01
  %56 = fcmp ugt double %52, %55
  br i1 %56, label %._crit_edge61, label %57

._crit_edge61:                                    ; preds = %49
  %.pre = load i32, ptr %2, align 8, !tbaa !5
  br label %60

57:                                               ; preds = %49
  store i8 1, ptr %46, align 4, !tbaa !19
  tail call void @_ZN6Solver20reconstruct_gradientEv(ptr noundef nonnull align 8 dereferenceable(117) %0)
  %58 = getelementptr inbounds i8, ptr %0, i64 112
  %59 = load i32, ptr %58, align 8, !tbaa !23
  store i32 %59, ptr %2, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %._crit_edge61, %57, %._crit_edge
  %61 = phi i32 [ %.pre, %._crit_edge61 ], [ %59, %57 ], [ %45, %._crit_edge ]
  %62 = icmp sgt i32 %61, 0
  br i1 %62, label %.lr.ph58, label %._crit_edge59

.lr.ph58:                                         ; preds = %60, %.loopexit
  %.156 = phi i32 [ %69, %.loopexit ], [ 0, %60 ]
  %63 = tail call noundef zeroext i1 @_ZN9Solver_NU9be_shrunkEidddd(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %.156, double noundef %.041.lcssa, double noundef %.039.lcssa, double noundef %.037.lcssa, double noundef %.035.lcssa)
  br i1 %63, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.lr.ph58, %65
  %storemerge.in = load i32, ptr %2, align 8, !tbaa !5
  %storemerge = add nsw i32 %storemerge.in, -1
  store i32 %storemerge, ptr %2, align 8, !tbaa !5
  %64 = icmp sgt i32 %storemerge, %.156
  br i1 %64, label %65, label %.loopexit

65:                                               ; preds = %.preheader
  %66 = tail call noundef zeroext i1 @_ZN9Solver_NU9be_shrunkEidddd(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %storemerge, double noundef %.041.lcssa, double noundef %.039.lcssa, double noundef %.037.lcssa, double noundef %.035.lcssa)
  br i1 %66, label %.preheader, label %67, !llvm.loop !24

67:                                               ; preds = %65
  %68 = load i32, ptr %2, align 8, !tbaa !5
  tail call void @_ZN6Solver10swap_indexEii(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %.156, i32 noundef %68)
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader, %.lr.ph58, %67
  %69 = add nuw nsw i32 %.156, 1
  %70 = load i32, ptr %2, align 8, !tbaa !5
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %.lr.ph58, label %._crit_edge59, !llvm.loop !25

._crit_edge59:                                    ; preds = %.loopexit, %60
  ret void
}

attributes #0 = { 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 #1 = { 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 #2 = { inlinehint 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" }

!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, !7, i64 8}
!6 = !{!"_ZTS6Solver", !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !12, i64 116}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!6, !10, i64 16}
!14 = !{!8, !8, i64 0}
!15 = !{!6, !10, i64 24}
!16 = !{!11, !11, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!6, !12, i64 116}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!6, !11, i64 64}
!23 = !{!6, !7, i64 112}
!24 = distinct !{!24, !18}
!25 = distinct !{!25, !18}


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