; LLVM IR from liaojing/MorphLib :: MorphLib/Morph.ll (ZN8MorphLib6CMorph33calculate_halfway_parametrizationEPfS1_S1_)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.MorphLib::CMorph" = type <{ ptr, ptr, i32, i32, i32, i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%"class.MorphLib::CParameters" = type { i32, i32, ptr, ptr, ptr, ptr, float, float, float, float, float, i32, i32, float, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<MorphLib::ConstraintPoint, std::allocator<MorphLib::ConstraintPoint>>::_Vector_impl" }
%"struct.std::_Vector_base<MorphLib::ConstraintPoint, std::allocator<MorphLib::ConstraintPoint>>::_Vector_impl" = type { %"struct.std::_Vector_base<MorphLib::ConstraintPoint, std::allocator<MorphLib::ConstraintPoint>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MorphLib::ConstraintPoint, std::allocator<MorphLib::ConstraintPoint>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.CPyramid = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<CPyramidLevel, std::allocator<CPyramidLevel>>::_Vector_impl" }
%"struct.std::_Vector_base<CPyramidLevel, std::allocator<CPyramidLevel>>::_Vector_impl" = type { %"struct.std::_Vector_base<CPyramidLevel, std::allocator<CPyramidLevel>>::_Vector_impl_data" }
%"struct.std::_Vector_base<CPyramidLevel, std::allocator<CPyramidLevel>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.CPyramidLevel = type { i32, i32, float, i32, i32, i32, ptr, ptr, ptr, ptr }
%"struct.MorphLib::CData" = type { %struct.anon, %struct.anon.5, %struct.anon.6, ptr, ptr, ptr, ptr, i32 }
%struct.anon = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.anon.5 = type { ptr, ptr, ptr }
%struct.anon.6 = type { ptr, ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; 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
define dso_local noundef zeroext i1 @_ZN8MorphLib6CMorph33calculate_halfway_parametrizationEPfS1_S1_(ptr noundef nonnull align 8 dereferenceable(49) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #2 align 2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca float, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %23 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 2
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = sub nsw i32 %24, 1
  call void @_ZN8MorphLib6CMorph13load_identityEi(ptr noundef nonnull align 8 dereferenceable(49) %21, i32 noundef %25)
  %26 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = getelementptr inbounds %"class.MorphLib::CParameters", ptr %27, i32 0, i32 15
  %29 = call noundef i64 @_ZNKSt6vectorIN8MorphLib15ConstraintPointESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  %30 = icmp ugt i64 %29, 0
  br i1 %30, label %31, label %78

31:                                               ; preds = %4
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %33 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 2
  %34 = load i32, ptr %33, align 8, !tbaa !9
  %35 = sub nsw i32 %34, 1
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %32, i32 noundef %35)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef @.str.3)
  %38 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 1
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  %40 = getelementptr inbounds %class.CPyramid, ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 2
  %42 = load i32, ptr %41, align 8, !tbaa !9
  %43 = sub nsw i32 %42, 1
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %44) #7
  %46 = getelementptr inbounds %class.CPyramidLevel, ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !15
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %37, i32 noundef %47)
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef @.str.4)
  %50 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 1
  %51 = load ptr, ptr %50, align 8, !tbaa !14
  %52 = getelementptr inbounds %class.CPyramid, ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 2
  %54 = load i32, ptr %53, align 8, !tbaa !9
  %55 = sub nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %56) #7
  %58 = getelementptr inbounds %class.CPyramidLevel, ptr %57, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !18
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %49, i32 noundef %59)
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef @.str.1)
  %62 = call i64 @clock() #7
  store i64 %62, ptr %10, align 8, !tbaa !19
  %63 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 2
  %64 = load i32, ptr %63, align 8, !tbaa !9
  %65 = sub nsw i32 %64, 1
  call void @_ZN8MorphLib6CMorph21optimize_highestlevelEi(ptr noundef nonnull align 8 dereferenceable(49) %21, i32 noundef %65)
  %66 = call i64 @clock() #7
  store i64 %66, ptr %11, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %67 = load i64, ptr %11, align 8, !tbaa !19
  %68 = load i64, ptr %10, align 8, !tbaa !19
  %69 = sub nsw i64 %67, %68
  %70 = sitofp i64 %69 to float
  %71 = fmul float %70, 1.000000e+03
  %72 = fdiv float %71, 1.000000e+06
  store float %72, ptr %12, align 4, !tbaa !21
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  %74 = load float, ptr %12, align 4, !tbaa !21
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %73, float noundef %74)
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef @.str.6)
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef @.str.1)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %78

78:                                               ; preds = %31, %4
  %79 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !13
  %81 = getelementptr inbounds %"class.MorphLib::CParameters", ptr %80, i32 0, i32 11
  %82 = load i32, ptr %81, align 4, !tbaa !22
  %83 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 6
  store i32 %82, ptr %83, align 8, !tbaa !29
  %84 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 2
  %85 = load i32, ptr %84, align 8, !tbaa !9
  %86 = sub nsw i32 %85, 2
  %87 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 3
  store i32 %86, ptr %87, align 4, !tbaa !30
  br label %88

88:                                               ; preds = %164, %78
  %89 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 3
  %90 = load i32, ptr %89, align 4, !tbaa !30
  %91 = icmp sge i32 %90, 0
  br i1 %91, label %92, label %168

92:                                               ; preds = %88
  %93 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 6
  %94 = load i32, ptr %93, align 8, !tbaa !29
  %95 = sitofp i32 %94 to float
  %96 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !13
  %98 = getelementptr inbounds %"class.MorphLib::CParameters", ptr %97, i32 0, i32 13
  %99 = load float, ptr %98, align 4, !tbaa !31
  %100 = fdiv float %95, %99
  %101 = fptosi float %100 to i32
  %102 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 6
  store i32 %101, ptr %102, align 8, !tbaa !29
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %104 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 3
  %105 = load i32, ptr %104, align 4, !tbaa !30
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %103, i32 noundef %105)
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef @.str.3)
  %108 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 1
  %109 = load ptr, ptr %108, align 8, !tbaa !14
  %110 = getelementptr inbounds %class.CPyramid, ptr %109, i32 0, i32 0
  %111 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 3
  %112 = load i32, ptr %111, align 4, !tbaa !30
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %113) #7
  %115 = getelementptr inbounds %class.CPyramidLevel, ptr %114, i32 0, i32 0
  %116 = load i32, ptr %115, align 8, !tbaa !15
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %107, i32 noundef %116)
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef @.str.4)
  %119 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 1
  %120 = load ptr, ptr %119, align 8, !tbaa !14
  %121 = getelementptr inbounds %class.CPyramid, ptr %120, i32 0, i32 0
  %122 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 3
  %123 = load i32, ptr %122, align 4, !tbaa !30
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %124) #7
  %126 = getelementptr inbounds %class.CPyramidLevel, ptr %125, i32 0, i32 1
  %127 = load i32, ptr %126, align 4, !tbaa !18
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %118, i32 noundef %127)
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %128, ptr noundef @.str.1)
  %130 = call i64 @clock() #7
  store i64 %130, ptr %10, align 8, !tbaa !19
  %131 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 3
  %132 = load i32, ptr %131, align 4, !tbaa !30
  %133 = add nsw i32 %132, 1
  %134 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 3
  %135 = load i32, ptr %134, align 4, !tbaa !30
  call void @_ZN8MorphLib6CMorph14upsample_levelEii(ptr noundef nonnull align 8 dereferenceable(49) %21, i32 noundef %133, i32 noundef %135)
  %136 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 3
  %137 = load i32, ptr %136, align 4, !tbaa !30
  call void @_ZN8MorphLib6CMorph22initialize_incrementalEi(ptr noundef nonnull align 8 dereferenceable(49) %21, i32 noundef %137)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %138 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 3
  %139 = load i32, ptr %138, align 4, !tbaa !30
  %140 = call noundef i32 @_ZN8MorphLib6CMorph14optimize_levelEi(ptr noundef nonnull align 8 dereferenceable(49) %21, i32 noundef %139)
  store i32 %140, ptr %13, align 4, !tbaa !32
  %141 = call i64 @clock() #7
  store i64 %141, ptr %11, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %142 = load i64, ptr %11, align 8, !tbaa !19
  %143 = load i64, ptr %10, align 8, !tbaa !19
  %144 = sub nsw i64 %142, %143
  %145 = sitofp i64 %144 to float
  %146 = fmul float %145, 1.000000e+03
  %147 = fdiv float %146, 1.000000e+06
  store float %147, ptr %14, align 4, !tbaa !21
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.7)
  %149 = load i32, ptr %13, align 4, !tbaa !32
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %148, i32 noundef %149)
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef @.str.8)
  %152 = load float, ptr %14, align 4, !tbaa !21
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %151, float noundef %152)
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef @.str.6)
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %154, ptr noundef @.str.1)
  %156 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 9
  %157 = load i8, ptr %156, align 8, !tbaa !33, !range !34, !noundef !35
  %158 = trunc i8 %157 to i1
  br i1 %158, label %160, label %159

159:                                              ; preds = %92
  store i1 false, ptr %5, align 1
  store i32 1, ptr %15, align 4
  br label %161

160:                                              ; preds = %92
  store i32 0, ptr %15, align 4
  br label %161

161:                                              ; preds = %160, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %162 = load i32, ptr %15, align 4
  switch i32 %162, label %256 [
    i32 0, label %163
  ]

163:                                              ; preds = %161
  br label %164

164:                                              ; preds = %163
  %165 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 3
  %166 = load i32, ptr %165, align 4, !tbaa !30
  %167 = add nsw i32 %166, -1
  store i32 %167, ptr %165, align 4, !tbaa !30
  br label %88, !llvm.loop !36

168:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %169 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 1
  %170 = load ptr, ptr %169, align 8, !tbaa !14
  %171 = getelementptr inbounds %class.CPyramid, ptr %170, i32 0, i32 0
  %172 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %171, i64 noundef 0) #7
  %173 = getelementptr inbounds %class.CPyramidLevel, ptr %172, i32 0, i32 1
  %174 = load i32, ptr %173, align 4, !tbaa !18
  store i32 %174, ptr %16, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %175 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 1
  %176 = load ptr, ptr %175, align 8, !tbaa !14
  %177 = getelementptr inbounds %class.CPyramid, ptr %176, i32 0, i32 0
  %178 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %177, i64 noundef 0) #7
  %179 = getelementptr inbounds %class.CPyramidLevel, ptr %178, i32 0, i32 0
  %180 = load i32, ptr %179, align 8, !tbaa !15
  store i32 %180, ptr %17, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !32
  br label %181

181:                                              ; preds = %252, %168
  %182 = load i32, ptr %18, align 4, !tbaa !32
  %183 = load i32, ptr %16, align 4, !tbaa !32
  %184 = icmp slt i32 %182, %183
  br i1 %184, label %186, label %185

185:                                              ; preds = %181
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %255

186:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !32
  br label %187

187:                                              ; preds = %248, %186
  %188 = load i32, ptr %19, align 4, !tbaa !32
  %189 = load i32, ptr %17, align 4, !tbaa !32
  %190 = icmp slt i32 %188, %189
  br i1 %190, label %192, label %191

191:                                              ; preds = %187
  store i32 8, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %251

192:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %193 = load i32, ptr %19, align 4, !tbaa !32
  %194 = load i32, ptr %18, align 4, !tbaa !32
  %195 = call noundef i32 @_ZN8MorphLib6CMorph9mem_indexEiii(ptr noundef nonnull align 8 dereferenceable(49) %21, i32 noundef %193, i32 noundef %194, i32 noundef 0)
  store i32 %195, ptr %20, align 4, !tbaa !32
  %196 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 8
  %197 = load ptr, ptr %196, align 8, !tbaa !38
  %198 = getelementptr inbounds %"struct.MorphLib::CData", ptr %197, i64 0
  %199 = getelementptr inbounds %"struct.MorphLib::CData", ptr %198, i32 0, i32 4
  %200 = load ptr, ptr %199, align 8, !tbaa !39
  %201 = load i32, ptr %20, align 4, !tbaa !32
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds float, ptr %200, i64 %202
  %204 = load float, ptr %203, align 4, !tbaa !21
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = load i32, ptr %18, align 4, !tbaa !32
  %207 = load i32, ptr %17, align 4, !tbaa !32
  %208 = mul nsw i32 %206, %207
  %209 = load i32, ptr %19, align 4, !tbaa !32
  %210 = add nsw i32 %208, %209
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds float, ptr %205, i64 %211
  store float %204, ptr %212, align 4, !tbaa !21
  %213 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 8
  %214 = load ptr, ptr %213, align 8, !tbaa !38
  %215 = getelementptr inbounds %"struct.MorphLib::CData", ptr %214, i64 0
  %216 = getelementptr inbounds %"struct.MorphLib::CData", ptr %215, i32 0, i32 5
  %217 = load ptr, ptr %216, align 8, !tbaa !44
  %218 = load i32, ptr %20, align 4, !tbaa !32
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds float, ptr %217, i64 %219
  %221 = load float, ptr %220, align 4, !tbaa !21
  %222 = load ptr, ptr %8, align 8, !tbaa !5
  %223 = load i32, ptr %18, align 4, !tbaa !32
  %224 = load i32, ptr %17, align 4, !tbaa !32
  %225 = mul nsw i32 %223, %224
  %226 = load i32, ptr %19, align 4, !tbaa !32
  %227 = add nsw i32 %225, %226
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds float, ptr %222, i64 %228
  store float %221, ptr %229, align 4, !tbaa !21
  %230 = getelementptr inbounds %"class.MorphLib::CMorph", ptr %21, i32 0, i32 8
  %231 = load ptr, ptr %230, align 8, !tbaa !38
  %232 = getelementptr inbounds %"struct.MorphLib::CData", ptr %231, i64 0
  %233 = getelementptr inbounds %"struct.MorphLib::CData", ptr %232, i32 0, i32 0
  %234 = getelementptr inbounds %struct.anon, ptr %233, i32 0, i32 7
  %235 = load ptr, ptr %234, align 8, !tbaa !45
  %236 = load i32, ptr %20, align 4, !tbaa !32
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds float, ptr %235, i64 %237
  %239 = load float, ptr %238, align 4, !tbaa !21
  %240 = load ptr, ptr %9, align 8, !tbaa !5
  %241 = load i32, ptr %18, align 4, !tbaa !32
  %242 = load i32, ptr %17, align 4, !tbaa !32
  %243 = mul nsw i32 %241, %242
  %244 = load i32, ptr %19, align 4, !tbaa !32
  %245 = add nsw i32 %243, %244
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds float, ptr %240, i64 %246
  store float %239, ptr %247, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %248

248:                                              ; preds = %192
  %249 = load i32, ptr %19, align 4, !tbaa !32
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr %19, align 4, !tbaa !32
  br label %187, !llvm.loop !46

251:                                              ; preds = %191
  br label %252

252:                                              ; preds = %251
  %253 = load i32, ptr %18, align 4, !tbaa !32
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %18, align 4, !tbaa !32
  br label %181, !llvm.loop !47

255:                                              ; preds = %185
  store i1 true, ptr %5, align 1
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %256

256:                                              ; preds = %255, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %257 = load i1, ptr %5, align 1
  ret i1 %257
}

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; Function Attrs: nounwind
declare i64 @clock() #5

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8), float noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8MorphLib6CMorph14optimize_levelEi(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN8MorphLib6CMorph9mem_indexEiii(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef, i32 noundef, i32 noundef) #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint 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 #4 = { "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 = { 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 #6 = { 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 #7 = { 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, !11, i64 16}
!10 = !{!"_ZTSN8MorphLib6CMorphE", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !6, i64 40, !12, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!10, !6, i64 0}
!14 = !{!10, !6, i64 8}
!15 = !{!16, !11, i64 0}
!16 = !{!"_ZTS13CPyramidLevel", !11, i64 0, !11, i64 4, !17, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!17 = !{!"float", !7, i64 0}
!18 = !{!16, !11, i64 4}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!17, !17, i64 0}
!22 = !{!23, !11, i64 60}
!23 = !{!"_ZTSN8MorphLib11CParametersE", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !17, i64 40, !17, i64 44, !17, i64 48, !17, i64 52, !17, i64 56, !11, i64 60, !11, i64 64, !17, i64 68, !24, i64 72, !25, i64 80}
!24 = !{!"_ZTSN8MorphLib17BoundaryConditionE", !7, i64 0}
!25 = !{!"_ZTSSt6vectorIN8MorphLib15ConstraintPointESaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIN8MorphLib15ConstraintPointESaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN8MorphLib15ConstraintPointESaIS1_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN8MorphLib15ConstraintPointESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!10, !11, i64 32}
!30 = !{!10, !11, i64 20}
!31 = !{!23, !17, i64 68}
!32 = !{!11, !11, i64 0}
!33 = !{!10, !12, i64 48}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!10, !6, i64 40}
!39 = !{!40, !6, i64 128}
!40 = !{!"_ZTSN8MorphLib5CDataE", !41, i64 0, !42, i64 72, !43, i64 96, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !11, i64 152}
!41 = !{!"_ZTSN8MorphLib5CDataUt_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!42 = !{!"_ZTSN8MorphLib5CDataUt0_E", !6, i64 0, !6, i64 8, !6, i64 16}
!43 = !{!"_ZTSN8MorphLib5CDataUt1_E", !6, i64 0, !6, i64 8, !6, i64 16}
!44 = !{!40, !6, i64 136}
!45 = !{!40, !6, i64 56}
!46 = distinct !{!46, !37}
!47 = distinct !{!47, !37}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN8MorphLib6CMorph33calculate_halfway_parametrizationEPfS1_S1_(ptr noundef nonnull align 8 dereferenceable(49) %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #1 align 2 {
  %5 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %8 = add nsw i32 %7, -1
  tail call void @_ZN8MorphLib6CMorph13load_identityEi(ptr noundef nonnull align 8 dereferenceable(49) %0, i32 noundef %8)
  %9 = load ptr, ptr %0, align 8, !tbaa !12
  %10 = getelementptr inbounds i8, ptr %9, i64 80
  %11 = tail call noundef i64 @_ZNKSt6vectorIN8MorphLib15ConstraintPointESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %.not = icmp eq i64 %11, 0
  br i1 %.not, label %48, label %12

12:                                               ; preds = %4
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %14 = load i32, ptr %6, align 8, !tbaa !5
  %15 = add nsw i32 %14, -1
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef %15)
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @.str.3)
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  %20 = load i32, ptr %6, align 8, !tbaa !5
  %21 = add nsw i32 %20, -1
  %22 = sext i32 %21 to i64
  %23 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %22) #6
  %24 = load i32, ptr %23, align 8, !tbaa !14
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %17, i32 noundef %24)
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str.4)
  %27 = load ptr, ptr %18, align 8, !tbaa !13
  %28 = load i32, ptr %6, align 8, !tbaa !5
  %29 = add nsw i32 %28, -1
  %30 = sext i32 %29 to i64
  %31 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %30) #6
  %32 = getelementptr inbounds i8, ptr %31, i64 4
  %33 = load i32, ptr %32, align 4, !tbaa !17
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %26, i32 noundef %33)
  %35 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull @.str.1)
  %36 = tail call i64 @clock() #6
  %37 = load i32, ptr %6, align 8, !tbaa !5
  %38 = add nsw i32 %37, -1
  tail call void @_ZN8MorphLib6CMorph21optimize_highestlevelEi(ptr noundef nonnull align 8 dereferenceable(49) %0, i32 noundef %38)
  %39 = tail call i64 @clock() #6
  %40 = sub nsw i64 %39, %36
  %41 = sitofp i64 %40 to float
  %42 = fmul float %41, 1.000000e+03
  %43 = fdiv float %42, 1.000000e+06
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %44, float noundef %43)
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull @.str.6)
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull @.str.1)
  br label %48

48:                                               ; preds = %12, %4
  %49 = load ptr, ptr %0, align 8, !tbaa !12
  %50 = getelementptr inbounds i8, ptr %49, i64 60
  %51 = load i32, ptr %50, align 4, !tbaa !18
  %52 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %51, ptr %52, align 8, !tbaa !25
  %53 = load i32, ptr %6, align 8, !tbaa !5
  %54 = add nsw i32 %53, -2
  %55 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 %54, ptr %55, align 4, !tbaa !26
  %56 = icmp slt i32 %53, 2
  br i1 %56, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %48
  %57 = getelementptr inbounds i8, ptr %0, i64 8
  %58 = getelementptr inbounds i8, ptr %0, i64 48
  br label %59

59:                                               ; preds = %.lr.ph, %105
  %60 = load i32, ptr %52, align 8, !tbaa !25
  %61 = sitofp i32 %60 to float
  %62 = load ptr, ptr %0, align 8, !tbaa !12
  %63 = getelementptr inbounds i8, ptr %62, i64 68
  %64 = load float, ptr %63, align 4, !tbaa !27
  %65 = fdiv float %61, %64
  %66 = fptosi float %65 to i32
  store i32 %66, ptr %52, align 8, !tbaa !25
  %67 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %68 = load i32, ptr %55, align 4, !tbaa !26
  %69 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %67, i32 noundef %68)
  %70 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @.str.3)
  %71 = load ptr, ptr %57, align 8, !tbaa !13
  %72 = load i32, ptr %55, align 4, !tbaa !26
  %73 = sext i32 %72 to i64
  %74 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %73) #6
  %75 = load i32, ptr %74, align 8, !tbaa !14
  %76 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %70, i32 noundef %75)
  %77 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull @.str.4)
  %78 = load ptr, ptr %57, align 8, !tbaa !13
  %79 = load i32, ptr %55, align 4, !tbaa !26
  %80 = sext i32 %79 to i64
  %81 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %80) #6
  %82 = getelementptr inbounds i8, ptr %81, i64 4
  %83 = load i32, ptr %82, align 4, !tbaa !17
  %84 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %77, i32 noundef %83)
  %85 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull @.str.1)
  %86 = tail call i64 @clock() #6
  %87 = load i32, ptr %55, align 4, !tbaa !26
  %88 = add nsw i32 %87, 1
  tail call void @_ZN8MorphLib6CMorph14upsample_levelEii(ptr noundef nonnull align 8 dereferenceable(49) %0, i32 noundef %88, i32 noundef %87)
  %89 = load i32, ptr %55, align 4, !tbaa !26
  tail call void @_ZN8MorphLib6CMorph22initialize_incrementalEi(ptr noundef nonnull align 8 dereferenceable(49) %0, i32 noundef %89)
  %90 = load i32, ptr %55, align 4, !tbaa !26
  %91 = tail call noundef i32 @_ZN8MorphLib6CMorph14optimize_levelEi(ptr noundef nonnull align 8 dereferenceable(49) %0, i32 noundef %90)
  %92 = tail call i64 @clock() #6
  %93 = sub nsw i64 %92, %86
  %94 = sitofp i64 %93 to float
  %95 = fmul float %94, 1.000000e+03
  %96 = fdiv float %95, 1.000000e+06
  %97 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.7)
  %98 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %97, i32 noundef %91)
  %99 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef nonnull @.str.8)
  %100 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %99, float noundef %96)
  %101 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull @.str.6)
  %102 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef nonnull @.str.1)
  %103 = load i8, ptr %58, align 8, !tbaa !28, !range !29, !noundef !30
  %104 = trunc nuw i8 %103 to i1
  br i1 %104, label %105, label %.loopexit

105:                                              ; preds = %59
  %106 = load i32, ptr %55, align 4, !tbaa !26
  %107 = add nsw i32 %106, -1
  store i32 %107, ptr %55, align 4, !tbaa !26
  %108 = icmp slt i32 %106, 1
  br i1 %108, label %._crit_edge, label %59, !llvm.loop !31

._crit_edge:                                      ; preds = %105, %48
  %109 = getelementptr inbounds i8, ptr %0, i64 8
  %110 = load ptr, ptr %109, align 8, !tbaa !13
  %111 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef 0) #6
  %112 = getelementptr inbounds i8, ptr %111, i64 4
  %113 = load i32, ptr %112, align 4, !tbaa !17
  %114 = load ptr, ptr %109, align 8, !tbaa !13
  %115 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI13CPyramidLevelSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef 0) #6
  %116 = load i32, ptr %115, align 8, !tbaa !14
  %117 = icmp sgt i32 %113, 0
  br i1 %117, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %._crit_edge
  %118 = icmp sgt i32 %116, 0
  %119 = getelementptr inbounds i8, ptr %0, i64 40
  br i1 %118, label %.preheader.us.preheader, label %.loopexit

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %120 = zext nneg i32 %116 to i64
  %wide.trip.count51 = zext nneg i32 %113 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge40.us
  %indvars.iv48 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next49, %._crit_edge40.us ]
  %121 = mul nuw nsw i64 %indvars.iv48, %120
  %122 = trunc nuw nsw i64 %indvars.iv48 to i32
  br label %123

123:                                              ; preds = %.preheader.us, %123
  %indvars.iv = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next, %123 ]
  %124 = trunc nuw nsw i64 %indvars.iv to i32
  %125 = tail call noundef i32 @_ZN8MorphLib6CMorph9mem_indexEiii(ptr noundef nonnull align 8 dereferenceable(49) %0, i32 noundef %124, i32 noundef %122, i32 noundef 0)
  %126 = load ptr, ptr %119, align 8, !tbaa !33
  %127 = getelementptr inbounds i8, ptr %126, i64 128
  %128 = load ptr, ptr %127, align 8, !tbaa !34
  %129 = sext i32 %125 to i64
  %130 = getelementptr inbounds float, ptr %128, i64 %129
  %131 = load float, ptr %130, align 4, !tbaa !39
  %132 = add nuw nsw i64 %indvars.iv, %121
  %133 = getelementptr inbounds float, ptr %1, i64 %132
  store float %131, ptr %133, align 4, !tbaa !39
  %134 = getelementptr inbounds i8, ptr %126, i64 136
  %135 = load ptr, ptr %134, align 8, !tbaa !40
  %136 = getelementptr inbounds float, ptr %135, i64 %129
  %137 = load float, ptr %136, align 4, !tbaa !39
  %138 = getelementptr inbounds float, ptr %2, i64 %132
  store float %137, ptr %138, align 4, !tbaa !39
  %139 = getelementptr inbounds i8, ptr %126, i64 56
  %140 = load ptr, ptr %139, align 8, !tbaa !41
  %141 = getelementptr inbounds float, ptr %140, i64 %129
  %142 = load float, ptr %141, align 4, !tbaa !39
  %143 = getelementptr inbounds float, ptr %3, i64 %132
  store float %142, ptr %143, align 4, !tbaa !39
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %120
  br i1 %exitcond.not, label %._crit_edge40.us, label %123, !llvm.loop !42

._crit_edge40.us:                                 ; preds = %123
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %exitcond52.not = icmp eq i64 %indvars.iv.next49, %wide.trip.count51
  br i1 %exitcond52.not, label %.loopexit, label %.preheader.us, !llvm.loop !43

.loopexit:                                        ; preds = %59, %._crit_edge40.us, %.preheader.lr.ph, %._crit_edge
  %144 = phi i1 [ true, %._crit_edge ], [ true, %.preheader.lr.ph ], [ true, %._crit_edge40.us ], [ false, %59 ]
  ret i1 %144
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8MorphLib6CMorph13load_identityEi(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef) local_unnamed_addr #0 align 2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8), float noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8MorphLib6CMorph14optimize_levelEi(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef) local_unnamed_addr #1 align 2

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 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 = { "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 "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 = { 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 #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 16}
!6 = !{!"_ZTSN8MorphLib6CMorphE", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !7, i64 40, !11, i64 48}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!6, !7, i64 0}
!13 = !{!6, !7, i64 8}
!14 = !{!15, !10, i64 0}
!15 = !{!"_ZTS13CPyramidLevel", !10, i64 0, !10, i64 4, !16, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!16 = !{!"float", !8, i64 0}
!17 = !{!15, !10, i64 4}
!18 = !{!19, !10, i64 60}
!19 = !{!"_ZTSN8MorphLib11CParametersE", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !16, i64 40, !16, i64 44, !16, i64 48, !16, i64 52, !16, i64 56, !10, i64 60, !10, i64 64, !16, i64 68, !20, i64 72, !21, i64 80}
!20 = !{!"_ZTSN8MorphLib17BoundaryConditionE", !8, i64 0}
!21 = !{!"_ZTSSt6vectorIN8MorphLib15ConstraintPointESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN8MorphLib15ConstraintPointESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN8MorphLib15ConstraintPointESaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN8MorphLib15ConstraintPointESaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!25 = !{!6, !10, i64 32}
!26 = !{!6, !10, i64 20}
!27 = !{!19, !16, i64 68}
!28 = !{!6, !11, i64 48}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!6, !7, i64 40}
!34 = !{!35, !7, i64 128}
!35 = !{!"_ZTSN8MorphLib5CDataE", !36, i64 0, !37, i64 72, !38, i64 96, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !10, i64 152}
!36 = !{!"_ZTSN8MorphLib5CDataUt_E", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64}
!37 = !{!"_ZTSN8MorphLib5CDataUt0_E", !7, i64 0, !7, i64 8, !7, i64 16}
!38 = !{!"_ZTSN8MorphLib5CDataUt1_E", !7, i64 0, !7, i64 8, !7, i64 16}
!39 = !{!16, !16, i64 0}
!40 = !{!35, !7, i64 136}
!41 = !{!35, !7, i64 56}
!42 = distinct !{!42, !32}
!43 = distinct !{!43, !32}


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