; LLVM IR from ERGO-Code/HiGHS :: src/ipm/ipx/maxvolume.ll (ZN3ipx9Maxvolume12RunHeuristicEPKdRNS_5BasisE)

; 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.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ipx::Maxvolume::Slice" = type { %"class.std::valarray", %"class.std::valarray", %"class.std::vector.18", %"class.std::valarray", %"class.ipx::IndexedVector", %"class.ipx::IndexedVector", %"class.std::valarray" }
%"class.std::vector.18" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.ipx::IndexedVector" = type <{ %"class.std::valarray", %"class.std::vector.4", i32, [4 x i8] }>
%"class.std::valarray" = type { i64, ptr }
%"class.ipx::Timer" = type { %"class.std::chrono::time_point" }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.ipx::Maxvolume" = type { ptr, i32, i32, i32, i32, double, double, i32, double, double }

@.str.12 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx9Maxvolume12RunHeuristicEPKdRNS_5BasisE = external hidden unnamed_addr constant [58 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

declare i32 @__gxx_personality_v0(...)

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

declare noundef nonnull align 8 dereferenceable(704) ptr @_ZNK3ipx5Basis5modelEv(ptr noundef nonnull align 8 dereferenceable(176)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704)) #2 align 2

declare void @_ZN3ipx5TimerC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5BasisixEi(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ipx9Maxvolume5ResetEv(ptr noundef nonnull align 8 dereferenceable(64)) #2 align 2

declare void @_ZN3ipx8SortpermEiPKdb(ptr dead_on_unwind writable sret(%"class.std::vector.4") align 8, i32 noundef, ptr noundef, i1 noundef zeroext) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

declare noundef double @_ZNK3ipx5Timer7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3ipx9Maxvolume12RunHeuristicEPKdRNS_5BasisE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(176) %2) #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.ipx::Maxvolume::Slice", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.ipx::Timer", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::vector.4", align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::_Bit_reference", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(704) ptr @_ZNK3ipx5Basis5modelEv(ptr noundef nonnull align 8 dereferenceable(176) %27)
  store ptr %28, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %29)
  store i32 %30, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = call noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704) %31)
  store i32 %32, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 200, ptr %10) #6
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN3ipx9Maxvolume5SliceC2Eii(ptr noundef nonnull align 8 dereferenceable(200) %10, i32 noundef %33, i32 noundef %34)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  invoke void @_ZN3ipx5TimerC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %35 unwind label %57

35:                                               ; preds = %3
  invoke void @_ZN3ipx9Maxvolume5ResetEv(ptr noundef nonnull align 8 dereferenceable(64) %26)
          to label %36 unwind label %57

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %37 = load i32, ptr %8, align 4, !tbaa !9
  %38 = getelementptr inbounds %"class.ipx::Maxvolume", ptr %26, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = invoke noundef i32 @_ZNK3ipx7Control14rows_per_sliceEv(ptr noundef nonnull align 8 dereferenceable(1496) %39)
          to label %41 unwind label %61

41:                                               ; preds = %36
  %42 = sdiv i32 %37, %40
  %43 = sext i32 %42 to i64
  store i64 %43, ptr %16, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store i64 0, ptr %17, align 8, !tbaa !14
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %45 unwind label %65

45:                                               ; preds = %41
  %46 = load i64, ptr %44, align 8, !tbaa !14
  %47 = add nsw i64 5, %46
  %48 = trunc i64 %47 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  store i32 %48, ptr %15, align 4, !tbaa !9
  %49 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %50 unwind label %70

50:                                               ; preds = %45
  %51 = load i32, ptr %49, align 4, !tbaa !9
  store i32 %51, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %117, %50
  %53 = load i32, ptr %18, align 4, !tbaa !9
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %74, label %56

56:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %120

57:                                               ; preds = %35, %3
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %13, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %14, align 4
  br label %236

61:                                               ; preds = %36
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %13, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %14, align 4
  br label %69

65:                                               ; preds = %41
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %13, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %69

69:                                               ; preds = %65, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %235

70:                                               ; preds = %45
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %13, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %14, align 4
  br label %235

74:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = load i32, ptr %18, align 4, !tbaa !9
  %77 = invoke noundef i32 @_ZNK3ipx5BasisixEi(ptr noundef nonnull align 8 dereferenceable(176) %75, i32 noundef %76)
          to label %78 unwind label %110

78:                                               ; preds = %74
  store i32 %77, ptr %19, align 4, !tbaa !9
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = load i32, ptr %19, align 4, !tbaa !9
  %81 = invoke noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176) %79, i32 noundef %80)
          to label %82 unwind label %110

82:                                               ; preds = %78
  %83 = icmp eq i32 %81, 0
  br i1 %83, label %84, label %116

84:                                               ; preds = %82
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %94

87:                                               ; preds = %84
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = load i32, ptr %19, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %88, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !16
  %93 = fdiv double 1.000000e+00, %92
  br label %95

94:                                               ; preds = %84
  br label %95

95:                                               ; preds = %94, %87
  %96 = phi double [ %93, %87 ], [ 1.000000e+00, %94 ]
  %97 = getelementptr inbounds %"struct.ipx::Maxvolume::Slice", ptr %10, i32 0, i32 1
  %98 = load i32, ptr %18, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %97, i64 noundef %99) #6
  store double %96, ptr %100, align 8, !tbaa !16
  %101 = getelementptr inbounds %"struct.ipx::Maxvolume::Slice", ptr %10, i32 0, i32 1
  %102 = load i32, ptr %18, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %101, i64 noundef %103) #6
  %105 = load double, ptr %104, align 8, !tbaa !16
  %106 = invoke noundef zeroext i1 @_ZSt8isfinited(double noundef %105)
          to label %107 unwind label %110

107:                                              ; preds = %95
  br i1 %106, label %108, label %109

108:                                              ; preds = %107
  br label %115

109:                                              ; preds = %107
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.12, i32 noundef 123, ptr noundef @__PRETTY_FUNCTION__._ZN3ipx9Maxvolume12RunHeuristicEPKdRNS_5BasisE) #7
  unreachable

110:                                              ; preds = %95, %78, %74
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %13, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %235

114:                                              ; No predecessors!
  br label %115

115:                                              ; preds = %114, %108
  br label %116

116:                                              ; preds = %115, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %18, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %18, align 4, !tbaa !9
  br label %52, !llvm.loop !17

120:                                              ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %121

121:                                              ; preds = %155, %120
  %122 = load i32, ptr %20, align 4, !tbaa !9
  %123 = load i32, ptr %9, align 4, !tbaa !9
  %124 = load i32, ptr %8, align 4, !tbaa !9
  %125 = add nsw i32 %123, %124
  %126 = icmp slt i32 %122, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %158

128:                                              ; preds = %121
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = load i32, ptr %20, align 4, !tbaa !9
  %131 = invoke noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176) %129, i32 noundef %130)
          to label %132 unwind label %150

132:                                              ; preds = %128
  %133 = icmp eq i32 %131, -1
  br i1 %133, label %134, label %154

134:                                              ; preds = %132
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = icmp ne ptr %135, null
  br i1 %136, label %137, label %143

137:                                              ; preds = %134
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = load i32, ptr %20, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds double, ptr %138, i64 %140
  %142 = load double, ptr %141, align 8, !tbaa !16
  br label %144

143:                                              ; preds = %134
  br label %144

144:                                              ; preds = %143, %137
  %145 = phi double [ %142, %137 ], [ 1.000000e+00, %143 ]
  %146 = getelementptr inbounds %"struct.ipx::Maxvolume::Slice", ptr %10, i32 0, i32 0
  %147 = load i32, ptr %20, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %146, i64 noundef %148) #6
  store double %145, ptr %149, align 8, !tbaa !16
  br label %154

150:                                              ; preds = %128
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %13, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %235

154:                                              ; preds = %144, %132
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %20, align 4, !tbaa !9
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %20, align 4, !tbaa !9
  br label %121, !llvm.loop !19

158:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #6
  %159 = load i32, ptr %8, align 4, !tbaa !9
  %160 = getelementptr inbounds %"struct.ipx::Maxvolume::Slice", ptr %10, i32 0, i32 1
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %160, i64 noundef 0) #6
  invoke void @_ZN3ipx8SortpermEiPKdb(ptr dead_on_unwind writable sret(%"class.std::vector.4") align 8 %21, i32 noundef %159, ptr noundef %161, i1 noundef zeroext false)
          to label %162 unwind label %168

162:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %216, %162
  %164 = load i32, ptr %22, align 4, !tbaa !9
  %165 = load i32, ptr %15, align 4, !tbaa !9
  %166 = icmp slt i32 %164, %165
  br i1 %166, label %172, label %167

167:                                              ; preds = %163
  store i32 8, ptr %23, align 4
  br label %219

168:                                              ; preds = %158
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %13, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %14, align 4
  br label %234

172:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %173

173:                                              ; preds = %197, %172
  %174 = load i32, ptr %24, align 4, !tbaa !9
  %175 = load i32, ptr %8, align 4, !tbaa !9
  %176 = icmp slt i32 %174, %175
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  store i32 11, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %204

178:                                              ; preds = %173
  %179 = load i32, ptr %24, align 4, !tbaa !9
  %180 = load i32, ptr %15, align 4, !tbaa !9
  %181 = srem i32 %179, %180
  %182 = load i32, ptr %22, align 4, !tbaa !9
  %183 = icmp eq i32 %181, %182
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #6
  %184 = getelementptr inbounds %"struct.ipx::Maxvolume::Slice", ptr %10, i32 0, i32 2
  %185 = load i32, ptr %24, align 4, !tbaa !9
  %186 = sext i32 %185 to i64
  %187 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %186) #6
  %188 = load i32, ptr %187, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %184, i64 noundef %189)
          to label %191 unwind label %200

191:                                              ; preds = %178
  %192 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 0
  %193 = extractvalue { ptr, i64 } %190, 0
  store ptr %193, ptr %192, align 8
  %194 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 1
  %195 = extractvalue { ptr, i64 } %190, 1
  store i64 %195, ptr %194, align 8
  %196 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %25, i1 noundef zeroext %183) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  br label %197

197:                                              ; preds = %191
  %198 = load i32, ptr %24, align 4, !tbaa !9
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %24, align 4, !tbaa !9
  br label %173, !llvm.loop !20

200:                                              ; preds = %178
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %13, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %220

204:                                              ; preds = %177
  %205 = load ptr, ptr %6, align 8, !tbaa !5
  %206 = invoke noundef i32 @_ZN3ipx9Maxvolume6DriverERNS_5BasisERNS0_5SliceE(ptr noundef nonnull align 8 dereferenceable(64) %26, ptr noundef nonnull align 8 dereferenceable(176) %205, ptr noundef nonnull align 8 dereferenceable(200) %10)
          to label %207 unwind label %211

207:                                              ; preds = %204
  store i32 %206, ptr %11, align 4, !tbaa !9
  %208 = load i32, ptr %11, align 4, !tbaa !9
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %210, label %215

210:                                              ; preds = %207
  store i32 8, ptr %23, align 4
  br label %219

211:                                              ; preds = %204
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %13, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %14, align 4
  br label %220

215:                                              ; preds = %207
  br label %216

216:                                              ; preds = %215
  %217 = load i32, ptr %22, align 4, !tbaa !9
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %22, align 4, !tbaa !9
  br label %163, !llvm.loop !21

219:                                              ; preds = %210, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %221

220:                                              ; preds = %211, %200
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %233

221:                                              ; preds = %219
  %222 = invoke noundef double @_ZNK3ipx5Timer7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %223 unwind label %229

223:                                              ; preds = %221
  %224 = getelementptr inbounds %"class.ipx::Maxvolume", ptr %26, i32 0, i32 6
  store double %222, ptr %224, align 8, !tbaa !22
  %225 = getelementptr inbounds %"class.ipx::Maxvolume", ptr %26, i32 0, i32 3
  store i32 -1, ptr %225, align 8, !tbaa !23
  %226 = load i32, ptr %15, align 4, !tbaa !9
  %227 = getelementptr inbounds %"class.ipx::Maxvolume", ptr %26, i32 0, i32 4
  store i32 %226, ptr %227, align 4, !tbaa !24
  %228 = load i32, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %23, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @_ZN3ipx9Maxvolume5SliceD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %10) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret i32 %228

229:                                              ; preds = %221
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %13, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %14, align 4
  br label %233

233:                                              ; preds = %229, %220
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  br label %234

234:                                              ; preds = %233, %168
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  br label %235

235:                                              ; preds = %234, %150, %110, %70, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %236

236:                                              ; preds = %235, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @_ZN3ipx9Maxvolume5SliceD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %10) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %237

237:                                              ; preds = %236
  %238 = load ptr, ptr %13, align 8
  %239 = load i32, ptr %14, align 4
  %240 = insertvalue { ptr, i32 } poison, ptr %238, 0
  %241 = insertvalue { ptr, i32 } %240, i32 %239, 1
  resume { ptr, i32 } %241
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ipx9Maxvolume5SliceC2Eii(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef, i32 noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx7Control14rows_per_sliceEv(ptr noundef nonnull align 8 dereferenceable(1496)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt8isfinited(double noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3ipx9Maxvolume6DriverERNS_5BasisERNS0_5SliceE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(200)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3ipx9Maxvolume5SliceD2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { noreturn 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN3ipx9MaxvolumeE", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !13, i64 24, !13, i64 32, !10, i64 40, !13, i64 48, !13, i64 56}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!13, !13, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}
!21 = distinct !{!21, !18}
!22 = !{!12, !13, i64 32}
!23 = !{!12, !10, i64 16}
!24 = !{!12, !10, i64 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"

%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ipx::Maxvolume::Slice" = type { %"class.std::valarray", %"class.std::valarray", %"class.std::vector.18", %"class.std::valarray", %"class.ipx::IndexedVector", %"class.ipx::IndexedVector", %"class.std::valarray" }
%"class.std::vector.18" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.ipx::IndexedVector" = type <{ %"class.std::valarray", %"class.std::vector.4", i32, [4 x i8] }>
%"class.std::valarray" = type { i64, ptr }
%"class.ipx::Timer" = type { %"class.std::chrono::time_point" }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@.str.12 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx9Maxvolume12RunHeuristicEPKdRNS_5BasisE = external hidden unnamed_addr constant [58 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef nonnull align 8 dereferenceable(704) ptr @_ZNK3ipx5Basis5modelEv(ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #2 align 2

declare void @_ZN3ipx5TimerC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5BasisixEi(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ipx9Maxvolume5ResetEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #2 align 2

declare void @_ZN3ipx8SortpermEiPKdb(ptr dead_on_unwind writable sret(%"class.std::vector.4") align 8, i32 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

declare noundef double @_ZNK3ipx5Timer7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3ipx9Maxvolume12RunHeuristicEPKdRNS_5BasisE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef readonly %1, ptr noundef nonnull align 8 dereferenceable(176) %2) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca %"struct.ipx::Maxvolume::Slice", align 8
  %6 = alloca %"class.ipx::Timer", align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca %"class.std::vector.4", align 8
  %11 = alloca %"struct.std::_Bit_reference", align 8
  %12 = tail call noundef nonnull align 8 dereferenceable(704) ptr @_ZNK3ipx5Basis5modelEv(ptr noundef nonnull align 8 dereferenceable(176) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %13 = tail call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %12)
  store i32 %13, ptr %4, align 4, !tbaa !5
  %14 = tail call noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704) %12)
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %5) #6
  call void @_ZN3ipx9Maxvolume5SliceC2Eii(ptr noundef nonnull align 8 dereferenceable(200) %5, i32 noundef %13, i32 noundef %14)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  invoke void @_ZN3ipx5TimerC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %15 unwind label %56

15:                                               ; preds = %3
  call void @_ZN3ipx9Maxvolume5ResetEv(ptr noundef nonnull align 8 dereferenceable(64) %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = load ptr, ptr %0, align 8, !tbaa !9
  %18 = call noundef i32 @_ZNK3ipx7Control14rows_per_sliceEv(ptr noundef nonnull align 8 dereferenceable(1496) %17)
  %19 = sdiv i32 %16, %18
  %20 = sext i32 %19 to i64
  store i64 %20, ptr %8, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  store i64 0, ptr %9, align 8, !tbaa !13
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %22 = load i64, ptr %21, align 8, !tbaa !13
  %23 = trunc i64 %22 to i32
  %24 = add i32 %23, 5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  store i32 %24, ptr %7, align 4, !tbaa !5
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %26 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %26, ptr %7, align 4, !tbaa !5
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph, label %.preheader57

.lr.ph:                                           ; preds = %15
  %.not55 = icmp eq ptr %1, null
  %29 = getelementptr inbounds i8, ptr %5, i64 16
  br i1 %.not55, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %39
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %39 ], [ 0, %.lr.ph ]
  %30 = trunc nuw nsw i64 %indvars.iv75 to i32
  %31 = call noundef i32 @_ZNK3ipx5BasisixEi(ptr noundef nonnull align 8 dereferenceable(176) %2, i32 noundef %30)
  %32 = call noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176) %2, i32 noundef %31)
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %39

34:                                               ; preds = %.lr.ph.split.us
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %29, i64 noundef %indvars.iv75) #6
  store double 1.000000e+00, ptr %35, align 8, !tbaa !15
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %29, i64 noundef %indvars.iv75) #6
  %37 = load double, ptr %36, align 8, !tbaa !15
  %38 = call noundef zeroext i1 @_ZSt8isfinited(double noundef %37)
  br i1 %38, label %39, label %.split.us

39:                                               ; preds = %34, %.lr.ph.split.us
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next76, %41
  br i1 %42, label %.lr.ph.split.us, label %.preheader57, !llvm.loop !16

.preheader57:                                     ; preds = %71, %39, %15
  %43 = phi i32 [ %27, %15 ], [ %40, %39 ], [ %72, %71 ]
  %44 = add nsw i32 %43, %14
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph60, label %._crit_edge

.lr.ph60:                                         ; preds = %.preheader57
  %.not54 = icmp eq ptr %1, null
  br i1 %.not54, label %.lr.ph60.split.us, label %.lr.ph60.split

.lr.ph60.split.us:                                ; preds = %.lr.ph60, %51
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %51 ], [ 0, %.lr.ph60 ]
  %46 = trunc nuw nsw i64 %indvars.iv81 to i32
  %47 = call noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176) %2, i32 noundef %46)
  %48 = icmp eq i32 %47, -1
  br i1 %48, label %49, label %51

49:                                               ; preds = %.lr.ph60.split.us
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %indvars.iv81) #6
  store double 1.000000e+00, ptr %50, align 8, !tbaa !15
  br label %51

51:                                               ; preds = %49, %.lr.ph60.split.us
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = add nsw i32 %52, %14
  %54 = sext i32 %53 to i64
  %55 = icmp slt i64 %indvars.iv.next82, %54
  br i1 %55, label %.lr.ph60.split.us, label %._crit_edge, !llvm.loop !18

56:                                               ; preds = %3
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %132

.lr.ph.split:                                     ; preds = %.lr.ph, %71
  %indvars.iv = phi i64 [ %indvars.iv.next, %71 ], [ 0, %.lr.ph ]
  %58 = trunc nuw nsw i64 %indvars.iv to i32
  %59 = call noundef i32 @_ZNK3ipx5BasisixEi(ptr noundef nonnull align 8 dereferenceable(176) %2, i32 noundef %58)
  %60 = call noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176) %2, i32 noundef %59)
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %71

62:                                               ; preds = %.lr.ph.split
  %63 = sext i32 %59 to i64
  %64 = getelementptr inbounds double, ptr %1, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !15
  %66 = fdiv double 1.000000e+00, %65
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %29, i64 noundef %indvars.iv) #6
  store double %66, ptr %67, align 8, !tbaa !15
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %29, i64 noundef %indvars.iv) #6
  %69 = load double, ptr %68, align 8, !tbaa !15
  %70 = call noundef zeroext i1 @_ZSt8isfinited(double noundef %69)
  br i1 %70, label %71, label %.split.us

.split.us:                                        ; preds = %62, %34
  call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.12, i32 noundef 123, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3ipx9Maxvolume12RunHeuristicEPKdRNS_5BasisE) #7
  unreachable

71:                                               ; preds = %62, %.lr.ph.split
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = icmp slt i64 %indvars.iv.next, %73
  br i1 %74, label %.lr.ph.split, label %.preheader57, !llvm.loop !16

._crit_edge:                                      ; preds = %88, %51, %.preheader57
  %.lcssa = phi i32 [ %43, %.preheader57 ], [ %52, %51 ], [ %89, %88 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  %75 = getelementptr inbounds i8, ptr %5, i64 16
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %75, i64 noundef 0) #6
  invoke void @_ZN3ipx8SortpermEiPKdb(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.4") align 8 %10, i32 noundef %.lcssa, ptr noundef nonnull %76, i1 noundef zeroext false)
          to label %.preheader56 unwind label %99

.preheader56:                                     ; preds = %._crit_edge
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %.preheader.lr.ph, label %._crit_edge65

.preheader.lr.ph:                                 ; preds = %.preheader56
  %79 = getelementptr inbounds i8, ptr %5, i64 32
  %80 = getelementptr inbounds i8, ptr %11, i64 8
  br label %.preheader

.lr.ph60.split:                                   ; preds = %.lr.ph60, %88
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %88 ], [ 0, %.lr.ph60 ]
  %81 = trunc nuw nsw i64 %indvars.iv78 to i32
  %82 = call noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176) %2, i32 noundef %81)
  %83 = icmp eq i32 %82, -1
  br i1 %83, label %84, label %88

84:                                               ; preds = %.lr.ph60.split
  %85 = getelementptr inbounds double, ptr %1, i64 %indvars.iv78
  %86 = load double, ptr %85, align 8, !tbaa !15
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %indvars.iv78) #6
  store double %86, ptr %87, align 8, !tbaa !15
  br label %88

88:                                               ; preds = %.lr.ph60.split, %84
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %89 = load i32, ptr %4, align 4, !tbaa !5
  %90 = add nsw i32 %89, %14
  %91 = sext i32 %90 to i64
  %92 = icmp slt i64 %indvars.iv.next79, %91
  br i1 %92, label %.lr.ph60.split, label %._crit_edge, !llvm.loop !18

93:                                               ; preds = %119
  %94 = add nuw nsw i32 %.03664, 1
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %.preheader, label %._crit_edge65, !llvm.loop !19

.preheader:                                       ; preds = %.preheader.lr.ph, %93
  %.03664 = phi i32 [ 0, %.preheader.lr.ph ], [ %94, %93 ]
  %97 = load i32, ptr %4, align 4, !tbaa !5
  %98 = icmp sgt i32 %97, 0
  br i1 %98, label %.lr.ph62, label %._crit_edge63

99:                                               ; preds = %._crit_edge
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %131

._crit_edge63:                                    ; preds = %107, %.preheader
  %101 = invoke noundef i32 @_ZN3ipx9Maxvolume6DriverERNS_5BasisERNS0_5SliceE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(176) %2, ptr noundef nonnull align 8 dereferenceable(200) %5)
          to label %119 unwind label %120

.lr.ph62:                                         ; preds = %.preheader, %107
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %107 ], [ 0, %.preheader ]
  %102 = load i32, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv84) #6
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %79, i64 noundef %105)
          to label %107 unwind label %117

107:                                              ; preds = %.lr.ph62
  %108 = trunc nuw nsw i64 %indvars.iv84 to i32
  %109 = srem i32 %108, %102
  %110 = icmp eq i32 %109, %.03664
  %111 = extractvalue { ptr, i64 } %106, 0
  store ptr %111, ptr %11, align 8
  %112 = extractvalue { ptr, i64 } %106, 1
  store i64 %112, ptr %80, align 8
  %113 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %11, i1 noundef zeroext %110) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %114 = load i32, ptr %4, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = icmp slt i64 %indvars.iv.next85, %115
  br i1 %116, label %.lr.ph62, label %._crit_edge63, !llvm.loop !20

117:                                              ; preds = %.lr.ph62
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  br label %130

119:                                              ; preds = %._crit_edge63
  %.not = icmp eq i32 %101, 0
  br i1 %.not, label %93, label %._crit_edge65

120:                                              ; preds = %._crit_edge63
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %130

._crit_edge65:                                    ; preds = %93, %119, %.preheader56
  %.1 = phi i32 [ 0, %.preheader56 ], [ %101, %119 ], [ 0, %93 ]
  %122 = invoke noundef double @_ZNK3ipx5Timer7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %123 unwind label %128

123:                                              ; preds = %._crit_edge65
  %124 = getelementptr inbounds i8, ptr %0, i64 32
  store double %122, ptr %124, align 8, !tbaa !21
  %125 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 -1, ptr %125, align 8, !tbaa !22
  %126 = load i32, ptr %7, align 4, !tbaa !5
  %127 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 %126, ptr %127, align 4, !tbaa !23
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN3ipx9Maxvolume5SliceD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %5) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  ret i32 %.1

128:                                              ; preds = %._crit_edge65
  %129 = landingpad { ptr, i32 }
          cleanup
  br label %130

130:                                              ; preds = %117, %120, %128
  %.pn.pn = phi { ptr, i32 } [ %129, %128 ], [ %118, %117 ], [ %121, %120 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br label %131

131:                                              ; preds = %130, %99
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %130 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %132

132:                                              ; preds = %131, %56
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %131 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN3ipx9Maxvolume5SliceD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %5) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ipx9Maxvolume5SliceC2Eii(ptr noundef nonnull align 8 dereferenceable(200), i32 noundef, i32 noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx7Control14rows_per_sliceEv(ptr noundef nonnull align 8 dereferenceable(1496)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt8isfinited(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3ipx9Maxvolume6DriverERNS_5BasisERNS0_5SliceE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3ipx9Maxvolume5SliceD2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { noreturn 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN3ipx9MaxvolumeE", !11, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !12, i64 24, !12, i64 32, !6, i64 40, !12, i64 48, !12, i64 56}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!12, !12, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !17}
!21 = !{!10, !12, i64 32}
!22 = !{!10, !6, i64 16}
!23 = !{!10, !6, i64 20}


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