; LLVM IR from robotic-vision-lab/Cloud-Object-Recognition-Engine :: 3rdparty/libsvm/svm.ll (ZN6Solver12do_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] }>

@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; 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 uwtable
declare hidden void @_ZL4infoPKcz(ptr noundef, ...) #1

; 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: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6Solver9be_shrunkEidd(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef, double noundef, double noundef) #1 align 2

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

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

12:                                               ; preds = %7
  %13 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 3
  %14 = load ptr, ptr %13, align 8, !tbaa !16
  %15 = load i32, ptr %3, align 4, !tbaa !11
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds i8, ptr %14, i64 %16
  %18 = load i8, ptr %17, align 1, !tbaa !17
  %19 = sext i8 %18 to i32
  %20 = icmp eq i32 %19, 1
  br i1 %20, label %21, label %64

21:                                               ; preds = %12
  %22 = load i32, ptr %3, align 4, !tbaa !11
  %23 = call noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %6, i32 noundef %22)
  br i1 %23, label %43, label %24

24:                                               ; preds = %21
  %25 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 4
  %26 = load ptr, ptr %25, align 8, !tbaa !18
  %27 = load i32, ptr %3, align 4, !tbaa !11
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds double, ptr %26, i64 %28
  %30 = load double, ptr %29, align 8, !tbaa !9
  %31 = fneg double %30
  %32 = load double, ptr %4, align 8, !tbaa !9
  %33 = fcmp oge double %31, %32
  br i1 %33, label %34, label %42

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

42:                                               ; preds = %34, %24
  br label %43

43:                                               ; preds = %42, %21
  %44 = load i32, ptr %3, align 4, !tbaa !11
  %45 = call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %6, i32 noundef %44)
  br i1 %45, label %63, label %46

46:                                               ; preds = %43
  %47 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 4
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = load i32, ptr %3, align 4, !tbaa !11
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds double, ptr %48, i64 %50
  %52 = load double, ptr %51, align 8, !tbaa !9
  %53 = load double, ptr %5, align 8, !tbaa !9
  %54 = fcmp oge double %52, %53
  br i1 %54, label %55, label %62

55:                                               ; preds = %46
  %56 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 4
  %57 = load ptr, ptr %56, align 8, !tbaa !18
  %58 = load i32, ptr %3, 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
  store double %61, ptr %5, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %55, %46
  br label %63

63:                                               ; preds = %62, %43
  br label %107

64:                                               ; preds = %12
  %65 = load i32, ptr %3, align 4, !tbaa !11
  %66 = call noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %6, i32 noundef %65)
  br i1 %66, label %86, label %67

67:                                               ; preds = %64
  %68 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !18
  %70 = load i32, ptr %3, align 4, !tbaa !11
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds double, ptr %69, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !9
  %74 = fneg double %73
  %75 = load double, ptr %5, align 8, !tbaa !9
  %76 = fcmp oge double %74, %75
  br i1 %76, label %77, label %85

77:                                               ; preds = %67
  %78 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 4
  %79 = load ptr, ptr %78, align 8, !tbaa !18
  %80 = load i32, ptr %3, 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 = fneg double %83
  store double %84, ptr %5, align 8, !tbaa !9
  br label %85

85:                                               ; preds = %77, %67
  br label %86

86:                                               ; preds = %85, %64
  %87 = load i32, ptr %3, align 4, !tbaa !11
  %88 = call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %6, i32 noundef %87)
  br i1 %88, label %106, label %89

89:                                               ; preds = %86
  %90 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 4
  %91 = load ptr, ptr %90, align 8, !tbaa !18
  %92 = load i32, ptr %3, align 4, !tbaa !11
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds double, ptr %91, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !9
  %96 = load double, ptr %4, align 8, !tbaa !9
  %97 = fcmp oge double %95, %96
  br i1 %97, label %98, label %105

98:                                               ; preds = %89
  %99 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 4
  %100 = load ptr, ptr %99, align 8, !tbaa !18
  %101 = load i32, ptr %3, align 4, !tbaa !11
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds double, ptr %100, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !9
  store double %104, ptr %4, align 8, !tbaa !9
  br label %105

105:                                              ; preds = %98, %89
  br label %106

106:                                              ; preds = %105, %86
  br label %107

107:                                              ; preds = %106, %63
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %3, align 4, !tbaa !11
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %3, align 4, !tbaa !11
  br label %7, !llvm.loop !19

111:                                              ; preds = %7
  %112 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 16
  %113 = load i8, ptr %112, align 4, !tbaa !21, !range !22, !noundef !23
  %114 = trunc i8 %113 to i1
  %115 = zext i1 %114 to i32
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %130

117:                                              ; preds = %111
  %118 = load double, ptr %4, align 8, !tbaa !9
  %119 = load double, ptr %5, align 8, !tbaa !9
  %120 = fadd double %118, %119
  %121 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 9
  %122 = load double, ptr %121, align 8, !tbaa !24
  %123 = fmul double %122, 1.000000e+01
  %124 = fcmp ole double %120, %123
  br i1 %124, label %125, label %130

125:                                              ; preds = %117
  %126 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 16
  store i8 1, ptr %126, align 4, !tbaa !21
  call void @_ZN6Solver20reconstruct_gradientEv(ptr noundef nonnull align 8 dereferenceable(117) %6)
  %127 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 15
  %128 = load i32, ptr %127, align 8, !tbaa !25
  %129 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 1
  store i32 %128, ptr %129, align 8, !tbaa !13
  call void (ptr, ...) @_ZL4infoPKcz(ptr noundef @.str.2)
  br label %130

130:                                              ; preds = %125, %117, %111
  store i32 0, ptr %3, align 4, !tbaa !11
  br label %131

131:                                              ; preds = %166, %130
  %132 = load i32, ptr %3, align 4, !tbaa !11
  %133 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 1
  %134 = load i32, ptr %133, align 8, !tbaa !13
  %135 = icmp slt i32 %132, %134
  br i1 %135, label %136, label %169

136:                                              ; preds = %131
  %137 = load i32, ptr %3, align 4, !tbaa !11
  %138 = load double, ptr %4, align 8, !tbaa !9
  %139 = load double, ptr %5, align 8, !tbaa !9
  %140 = call noundef zeroext i1 @_ZN6Solver9be_shrunkEidd(ptr noundef nonnull align 8 dereferenceable(117) %6, i32 noundef %137, double noundef %138, double noundef %139)
  br i1 %140, label %141, label %165

141:                                              ; preds = %136
  %142 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 1
  %143 = load i32, ptr %142, align 8, !tbaa !13
  %144 = add nsw i32 %143, -1
  store i32 %144, ptr %142, align 8, !tbaa !13
  br label %145

145:                                              ; preds = %160, %141
  %146 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 1
  %147 = load i32, ptr %146, align 8, !tbaa !13
  %148 = load i32, ptr %3, align 4, !tbaa !11
  %149 = icmp sgt i32 %147, %148
  br i1 %149, label %150, label %164

150:                                              ; preds = %145
  %151 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 1
  %152 = load i32, ptr %151, align 8, !tbaa !13
  %153 = load double, ptr %4, align 8, !tbaa !9
  %154 = load double, ptr %5, align 8, !tbaa !9
  %155 = call noundef zeroext i1 @_ZN6Solver9be_shrunkEidd(ptr noundef nonnull align 8 dereferenceable(117) %6, i32 noundef %152, double noundef %153, double noundef %154)
  br i1 %155, label %160, label %156

156:                                              ; preds = %150
  %157 = load i32, ptr %3, align 4, !tbaa !11
  %158 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 1
  %159 = load i32, ptr %158, align 8, !tbaa !13
  call void @_ZN6Solver10swap_indexEii(ptr noundef nonnull align 8 dereferenceable(117) %6, i32 noundef %157, i32 noundef %159)
  br label %164

160:                                              ; preds = %150
  %161 = getelementptr inbounds %class.Solver, ptr %6, i32 0, i32 1
  %162 = load i32, ptr %161, align 8, !tbaa !13
  %163 = add nsw i32 %162, -1
  store i32 %163, ptr %161, align 8, !tbaa !13
  br label %145, !llvm.loop !26

164:                                              ; preds = %156, %145
  br label %165

165:                                              ; preds = %164, %136
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %3, align 4, !tbaa !11
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %3, align 4, !tbaa !11
  br label %131, !llvm.loop !27

169:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  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 = { 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"

@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; 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 uwtable
declare hidden void @_ZL4infoPKcz(ptr noundef, ...) local_unnamed_addr #0

; 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: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6Solver9be_shrunkEidd(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef, double noundef, double noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Solver12do_shrinkingEv(ptr noundef nonnull align 8 dereferenceable(117) %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, %46
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %46 ]
  %.042 = phi double [ 0xFFF0000000000000, %.lr.ph ], [ %.2, %46 ]
  %.03041 = phi double [ 0xFFF0000000000000, %.lr.ph ], [ %.232, %46 ]
  %8 = load ptr, ptr %5, align 8, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %8, i64 %indvars.iv
  %10 = load i8, ptr %9, align 1, !tbaa !14
  %11 = icmp eq i8 %10, 1
  %12 = trunc nuw nsw i64 %indvars.iv to i32
  %13 = tail call noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %12)
  br i1 %11, label %14, label %30

14:                                               ; preds = %7
  br i1 %13, label %22, label %15

15:                                               ; preds = %14
  %16 = load ptr, ptr %6, align 8, !tbaa !15
  %17 = getelementptr inbounds double, ptr %16, i64 %indvars.iv
  %18 = load double, ptr %17, align 8, !tbaa !16
  %19 = fneg double %18
  %20 = fcmp ugt double %.03041, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %15
  br label %22

22:                                               ; preds = %15, %21, %14
  %.131 = phi double [ %.03041, %14 ], [ %19, %21 ], [ %.03041, %15 ]
  %23 = tail call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %12)
  br i1 %23, label %46, label %24

24:                                               ; preds = %22
  %25 = load ptr, ptr %6, align 8, !tbaa !15
  %26 = getelementptr inbounds double, ptr %25, i64 %indvars.iv
  %27 = load double, ptr %26, align 8, !tbaa !16
  %28 = fcmp ult double %27, %.042
  br i1 %28, label %46, label %29

29:                                               ; preds = %24
  br label %46

30:                                               ; preds = %7
  br i1 %13, label %38, label %31

31:                                               ; preds = %30
  %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
  %35 = fneg double %34
  %36 = fcmp ugt double %.042, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %31
  br label %38

38:                                               ; preds = %31, %37, %30
  %.1 = phi double [ %.042, %30 ], [ %35, %37 ], [ %.042, %31 ]
  %39 = tail call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %12)
  br i1 %39, label %46, label %40

40:                                               ; preds = %38
  %41 = load ptr, ptr %6, align 8, !tbaa !15
  %42 = getelementptr inbounds double, ptr %41, i64 %indvars.iv
  %43 = load double, ptr %42, align 8, !tbaa !16
  %44 = fcmp ult double %43, %.03041
  br i1 %44, label %46, label %45

45:                                               ; preds = %40
  br label %46

46:                                               ; preds = %24, %29, %22, %40, %45, %38
  %.232 = phi double [ %.131, %22 ], [ %.131, %29 ], [ %.131, %24 ], [ %.03041, %38 ], [ %43, %45 ], [ %.03041, %40 ]
  %.2 = phi double [ %.042, %22 ], [ %27, %29 ], [ %.042, %24 ], [ %.1, %38 ], [ %.1, %45 ], [ %.1, %40 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %47 = load i32, ptr %2, align 8, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %indvars.iv.next, %48
  br i1 %49, label %7, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %46, %1
  %50 = phi i32 [ %3, %1 ], [ %47, %46 ]
  %.030.lcssa = phi double [ 0xFFF0000000000000, %1 ], [ %.232, %46 ]
  %.0.lcssa = phi double [ 0xFFF0000000000000, %1 ], [ %.2, %46 ]
  %51 = getelementptr inbounds i8, ptr %0, i64 116
  %52 = load i8, ptr %51, align 4, !tbaa !19, !range !20, !noundef !21
  %53 = icmp eq i8 %52, 0
  br i1 %53, label %54, label %63

54:                                               ; preds = %._crit_edge
  %55 = fadd double %.030.lcssa, %.0.lcssa
  %56 = getelementptr inbounds i8, ptr %0, i64 64
  %57 = load double, ptr %56, align 8, !tbaa !22
  %58 = fmul double %57, 1.000000e+01
  %59 = fcmp ugt double %55, %58
  br i1 %59, label %63, label %60

60:                                               ; preds = %54
  store i8 1, ptr %51, align 4, !tbaa !19
  tail call void @_ZN6Solver20reconstruct_gradientEv(ptr noundef nonnull align 8 dereferenceable(117) %0)
  %61 = getelementptr inbounds i8, ptr %0, i64 112
  %62 = load i32, ptr %61, align 8, !tbaa !23
  store i32 %62, ptr %2, align 8, !tbaa !5
  tail call void (ptr, ...) @_ZL4infoPKcz(ptr noundef nonnull @.str.2)
  %.pre = load i32, ptr %2, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %60, %54, %._crit_edge
  %64 = phi i32 [ %.pre, %60 ], [ %50, %54 ], [ %50, %._crit_edge ]
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %.lr.ph46, label %._crit_edge47

.lr.ph46:                                         ; preds = %63, %.loopexit
  %.13444 = phi i32 [ %72, %.loopexit ], [ 0, %63 ]
  %66 = tail call noundef zeroext i1 @_ZN6Solver9be_shrunkEidd(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %.13444, double noundef %.030.lcssa, double noundef %.0.lcssa)
  br i1 %66, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.lr.ph46, %68
  %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
  %67 = icmp sgt i32 %storemerge, %.13444
  br i1 %67, label %68, label %.loopexit

68:                                               ; preds = %.preheader
  %69 = tail call noundef zeroext i1 @_ZN6Solver9be_shrunkEidd(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %storemerge, double noundef %.030.lcssa, double noundef %.0.lcssa)
  br i1 %69, label %.preheader, label %70, !llvm.loop !24

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

.loopexit:                                        ; preds = %.preheader, %.lr.ph46, %70
  %72 = add nuw nsw i32 %.13444, 1
  %73 = load i32, ptr %2, align 8, !tbaa !5
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %.lr.ph46, label %._crit_edge47, !llvm.loop !25

._crit_edge47:                                    ; preds = %.loopexit, %63
  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" }

!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