; LLVM IR from zsiciarz/aquila :: aquila/ml/Dtw.ll (ZN6Aquila3Dtw11getDistanceERKSt6vectorIS1_IdSaIdEESaIS3_EES7_)

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

%"struct.Aquila::DtwPoint" = type { i64, i64, double, double, ptr }
%"class.Aquila::Dtw" = type { %"class.std::function", i32, %"class.std::vector.0", i64, i64 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<Aquila::DtwPoint>, std::allocator<std::vector<Aquila::DtwPoint>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Aquila::DtwPoint>, std::allocator<std::vector<Aquila::DtwPoint>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Aquila::DtwPoint>, std::allocator<std::vector<Aquila::DtwPoint>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Aquila::DtwPoint>, std::allocator<std::vector<Aquila::DtwPoint>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Aquila3Dtw11getDistanceERKSt6vectorIS1_IdSaIdEESaIS3_EES7_(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #0 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca %"struct.Aquila::DtwPoint", align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca %"struct.Aquila::DtwPoint", 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
  %18 = load ptr, ptr %4, align 8
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call noundef i64 @_ZNKSt6vectorIS_IdSaIdEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #3
  %21 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 3
  store i64 %20, ptr %21, align 8, !tbaa !9
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call noundef i64 @_ZNKSt6vectorIS_IdSaIdEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #3
  %24 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 4
  store i64 %23, ptr %24, align 8, !tbaa !19
  %25 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  call void @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #3
  %26 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %27 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 3
  %28 = load i64, ptr %27, align 8, !tbaa !9
  call void @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %28)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store i64 0, ptr %7, align 8, !tbaa !20
  br label %29

29:                                               ; preds = %65, %3
  %30 = load i64, ptr %7, align 8, !tbaa !20
  %31 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 3
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = icmp ult i64 %30, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %29
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  br label %68

35:                                               ; preds = %29
  %36 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %37 = load i64, ptr %7, align 8, !tbaa !20
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %37) #3
  %39 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 4
  %40 = load i64, ptr %39, align 8, !tbaa !19
  call void @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %40)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store i64 0, ptr %9, align 8, !tbaa !20
  br label %41

41:                                               ; preds = %61, %35
  %42 = load i64, ptr %9, align 8, !tbaa !20
  %43 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 4
  %44 = load i64, ptr %43, align 8, !tbaa !19
  %45 = icmp ult i64 %42, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %41
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %64

47:                                               ; preds = %41
  %48 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %49 = load i64, ptr %7, align 8, !tbaa !20
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %49) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #3
  %51 = load i64, ptr %7, align 8, !tbaa !20
  %52 = load i64, ptr %9, align 8, !tbaa !20
  %53 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 0
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = load i64, ptr %7, align 8, !tbaa !20
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %55) #3
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = load i64, ptr %9, align 8, !tbaa !20
  %59 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %58) #3
  %60 = call noundef double @_ZNKSt8functionIFdRKSt6vectorIdSaIdEES4_EEclES4_S4_(ptr noundef nonnull align 8 dereferenceable(32) %53, ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(24) %59)
  call void @_ZN6Aquila8DtwPointC2Emmd(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %51, i64 noundef %52, double noundef %60)
  call void @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 8 dereferenceable(40) %10)
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #3
  br label %61

61:                                               ; preds = %47
  %62 = load i64, ptr %9, align 8, !tbaa !20
  %63 = add i64 %62, 1
  store i64 %63, ptr %9, align 8, !tbaa !20
  br label %41, !llvm.loop !21

64:                                               ; preds = %46
  br label %65

65:                                               ; preds = %64
  %66 = load i64, ptr %7, align 8, !tbaa !20
  %67 = add i64 %66, 1
  store i64 %67, ptr %7, align 8, !tbaa !20
  br label %29, !llvm.loop !23

68:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  store ptr null, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store i64 1, ptr %15, align 8, !tbaa !20
  br label %69

69:                                               ; preds = %192, %68
  %70 = load i64, ptr %15, align 8, !tbaa !20
  %71 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 3
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = icmp ult i64 %70, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %69
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %195

75:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store i64 1, ptr %16, align 8, !tbaa !20
  br label %76

76:                                               ; preds = %188, %75
  %77 = load i64, ptr %16, align 8, !tbaa !20
  %78 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 4
  %79 = load i64, ptr %78, align 8, !tbaa !19
  %80 = icmp ult i64 %77, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %76
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %191

82:                                               ; preds = %76
  %83 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %84 = load i64, ptr %15, align 8, !tbaa !20
  %85 = sub i64 %84, 1
  %86 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %85) #3
  %87 = load i64, ptr %16, align 8, !tbaa !20
  %88 = sub i64 %87, 1
  %89 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %86, i64 noundef %88) #3
  store ptr %89, ptr %12, align 8, !tbaa !5
  %90 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 1
  %91 = load i32, ptr %90, align 8, !tbaa !24
  %92 = icmp eq i32 0, %91
  br i1 %92, label %93, label %106

93:                                               ; preds = %82
  %94 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %95 = load i64, ptr %15, align 8, !tbaa !20
  %96 = sub i64 %95, 1
  %97 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %96) #3
  %98 = load i64, ptr %16, align 8, !tbaa !20
  %99 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef %98) #3
  store ptr %99, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %101 = load i64, ptr %15, align 8, !tbaa !20
  %102 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %101) #3
  %103 = load i64, ptr %16, align 8, !tbaa !20
  %104 = sub i64 %103, 1
  %105 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %104) #3
  store ptr %105, ptr %13, align 8, !tbaa !5
  br label %141

106:                                              ; preds = %82
  %107 = load i64, ptr %15, align 8, !tbaa !20
  %108 = icmp ugt i64 %107, 1
  br i1 %108, label %109, label %127

109:                                              ; preds = %106
  %110 = load i64, ptr %16, align 8, !tbaa !20
  %111 = icmp ugt i64 %110, 1
  br i1 %111, label %112, label %127

112:                                              ; preds = %109
  %113 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %114 = load i64, ptr %15, align 8, !tbaa !20
  %115 = sub i64 %114, 2
  %116 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %115) #3
  %117 = load i64, ptr %16, align 8, !tbaa !20
  %118 = sub i64 %117, 1
  %119 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %116, i64 noundef %118) #3
  store ptr %119, ptr %11, align 8, !tbaa !5
  %120 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %121 = load i64, ptr %15, align 8, !tbaa !20
  %122 = sub i64 %121, 1
  %123 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %120, i64 noundef %122) #3
  %124 = load i64, ptr %16, align 8, !tbaa !20
  %125 = sub i64 %124, 2
  %126 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef %125) #3
  store ptr %126, ptr %13, align 8, !tbaa !5
  br label %140

127:                                              ; preds = %109, %106
  %128 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %129 = load i64, ptr %15, align 8, !tbaa !20
  %130 = sub i64 %129, 1
  %131 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %128, i64 noundef %130) #3
  %132 = load i64, ptr %16, align 8, !tbaa !20
  %133 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %132) #3
  store ptr %133, ptr %11, align 8, !tbaa !5
  %134 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %135 = load i64, ptr %15, align 8, !tbaa !20
  %136 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef %135) #3
  %137 = load i64, ptr %16, align 8, !tbaa !20
  %138 = sub i64 %137, 1
  %139 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %136, i64 noundef %138) #3
  store ptr %139, ptr %13, align 8, !tbaa !5
  br label %140

140:                                              ; preds = %127, %112
  br label %141

141:                                              ; preds = %140, %93
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.Aquila::DtwPoint", ptr %142, i32 0, i32 3
  %144 = load double, ptr %143, align 8, !tbaa !25
  %145 = load ptr, ptr %12, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.Aquila::DtwPoint", ptr %145, i32 0, i32 3
  %147 = load double, ptr %146, align 8, !tbaa !25
  %148 = fcmp olt double %144, %147
  br i1 %148, label %149, label %151

149:                                              ; preds = %141
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %150, ptr %14, align 8, !tbaa !5
  br label %153

151:                                              ; preds = %141
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %152, ptr %14, align 8, !tbaa !5
  br label %153

153:                                              ; preds = %151, %149
  %154 = load ptr, ptr %13, align 8, !tbaa !5
  %155 = getelementptr inbounds %"struct.Aquila::DtwPoint", ptr %154, i32 0, i32 3
  %156 = load double, ptr %155, align 8, !tbaa !25
  %157 = load ptr, ptr %14, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.Aquila::DtwPoint", ptr %157, i32 0, i32 3
  %159 = load double, ptr %158, align 8, !tbaa !25
  %160 = fcmp olt double %156, %159
  br i1 %160, label %161, label %163

161:                                              ; preds = %153
  %162 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %162, ptr %14, align 8, !tbaa !5
  br label %163

163:                                              ; preds = %161, %153
  %164 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %165 = load i64, ptr %15, align 8, !tbaa !20
  %166 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %164, i64 noundef %165) #3
  %167 = load i64, ptr %16, align 8, !tbaa !20
  %168 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %166, i64 noundef %167) #3
  %169 = getelementptr inbounds %"struct.Aquila::DtwPoint", ptr %168, i32 0, i32 2
  %170 = load double, ptr %169, align 8, !tbaa !28
  %171 = load ptr, ptr %14, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.Aquila::DtwPoint", ptr %171, i32 0, i32 3
  %173 = load double, ptr %172, align 8, !tbaa !25
  %174 = fadd double %170, %173
  %175 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %176 = load i64, ptr %15, align 8, !tbaa !20
  %177 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %175, i64 noundef %176) #3
  %178 = load i64, ptr %16, align 8, !tbaa !20
  %179 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %177, i64 noundef %178) #3
  %180 = getelementptr inbounds %"struct.Aquila::DtwPoint", ptr %179, i32 0, i32 3
  store double %174, ptr %180, align 8, !tbaa !25
  %181 = load ptr, ptr %14, align 8, !tbaa !5
  %182 = getelementptr inbounds %"class.Aquila::Dtw", ptr %18, i32 0, i32 2
  %183 = load i64, ptr %15, align 8, !tbaa !20
  %184 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %182, i64 noundef %183) #3
  %185 = load i64, ptr %16, align 8, !tbaa !20
  %186 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %184, i64 noundef %185) #3
  %187 = getelementptr inbounds %"struct.Aquila::DtwPoint", ptr %186, i32 0, i32 4
  store ptr %181, ptr %187, align 8, !tbaa !29
  br label %188

188:                                              ; preds = %163
  %189 = load i64, ptr %16, align 8, !tbaa !20
  %190 = add i64 %189, 1
  store i64 %190, ptr %16, align 8, !tbaa !20
  br label %76, !llvm.loop !30

191:                                              ; preds = %81
  br label %192

192:                                              ; preds = %191
  %193 = load i64, ptr %15, align 8, !tbaa !20
  %194 = add i64 %193, 1
  store i64 %194, ptr %15, align 8, !tbaa !20
  br label %69, !llvm.loop !31

195:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #3
  call void @_ZNK6Aquila3Dtw13getFinalPointEv(ptr dead_on_unwind writable sret(%"struct.Aquila::DtwPoint") align 8 %17, ptr noundef nonnull align 8 dereferenceable(80) %18)
  %196 = getelementptr inbounds %"struct.Aquila::DtwPoint", ptr %17, i32 0, i32 3
  %197 = load double, ptr %196, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #3
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  ret double %197
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(40)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNKSt8functionIFdRKSt6vectorIdSaIdEES4_EEclES4_S4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Aquila8DtwPointC2Emmd(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i64 noundef, double noundef) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK6Aquila3Dtw13getFinalPointEv(ptr dead_on_unwind noalias writable sret(%"struct.Aquila::DtwPoint") align 8, ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !18, i64 64}
!10 = !{!"_ZTSN6Aquila3DtwE", !11, i64 0, !13, i64 32, !14, i64 40, !18, i64 64, !18, i64 72}
!11 = !{!"_ZTSSt8functionIFdRKSt6vectorIdSaIdEES4_EE", !12, i64 0, !6, i64 24}
!12 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!13 = !{!"_ZTSN6Aquila3Dtw8PassTypeE", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseISt6vectorIN6Aquila8DtwPointESaIS2_EESaIS4_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN6Aquila8DtwPointESaIS2_EESaIS4_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN6Aquila8DtwPointESaIS2_EESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"long", !7, i64 0}
!19 = !{!10, !18, i64 72}
!20 = !{!18, !18, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!10, !13, i64 32}
!25 = !{!26, !27, i64 24}
!26 = !{!"_ZTSN6Aquila8DtwPointE", !18, i64 0, !18, i64 8, !27, i64 16, !27, i64 24, !6, i64 32}
!27 = !{!"double", !7, i64 0}
!28 = !{!26, !27, i64 16}
!29 = !{!26, !6, i64 32}
!30 = distinct !{!30, !22}
!31 = distinct !{!31, !22}


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

%"struct.Aquila::DtwPoint" = type { i64, i64, double, double, ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Aquila3Dtw11getDistanceERKSt6vectorIS1_IdSaIdEESaIS3_EES7_(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #0 align 2 {
  %4 = alloca %"struct.Aquila::DtwPoint", align 8
  %5 = alloca %"struct.Aquila::DtwPoint", align 8
  %6 = tail call noundef i64 @_ZNKSt6vectorIS_IdSaIdEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #3
  %7 = getelementptr inbounds i8, ptr %0, i64 64
  store i64 %6, ptr %7, align 8, !tbaa !5
  %8 = tail call noundef i64 @_ZNKSt6vectorIS_IdSaIdEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 72
  store i64 %8, ptr %9, align 8, !tbaa !18
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #3
  %11 = load i64, ptr %7, align 8, !tbaa !5
  tail call void @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %11)
  %12 = load i64, ptr %7, align 8, !tbaa !5
  %.not = icmp eq i64 %12, 0
  br i1 %.not, label %._crit_edge65, label %.lr.ph60

.preheader56:                                     ; preds = %._crit_edge
  %13 = icmp ugt i64 %21, 1
  br i1 %13, label %.preheader.lr.ph, label %._crit_edge65

.preheader.lr.ph:                                 ; preds = %.preheader56
  %14 = getelementptr inbounds i8, ptr %0, i64 32
  %15 = load i64, ptr %9, align 8, !tbaa !18
  %16 = icmp ugt i64 %15, 1
  br i1 %16, label %.preheader, label %._crit_edge65

.lr.ph60:                                         ; preds = %3, %._crit_edge
  %.05558 = phi i64 [ %20, %._crit_edge ], [ 0, %3 ]
  %17 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.05558) #3
  %18 = load i64, ptr %9, align 8, !tbaa !18
  call void @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %18)
  %19 = load i64, ptr %9, align 8, !tbaa !18
  %.not66 = icmp eq i64 %19, 0
  br i1 %.not66, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph60
  %20 = add nuw i64 %.05558, 1
  %21 = load i64, ptr %7, align 8, !tbaa !5
  %22 = icmp ult i64 %20, %21
  br i1 %22, label %.lr.ph60, label %.preheader56, !llvm.loop !19

.lr.ph:                                           ; preds = %.lr.ph60, %.lr.ph
  %.05457 = phi i64 [ %27, %.lr.ph ], [ 0, %.lr.ph60 ]
  %23 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.05558) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #3
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.05558) #3
  %25 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05457) #3
  %26 = call noundef double @_ZNKSt8functionIFdRKSt6vectorIdSaIdEES4_EEclES4_S4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %25)
  call void @_ZN6Aquila8DtwPointC2Emmd(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %.05558, i64 noundef %.05457, double noundef %26)
  call void @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(40) %4)
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #3
  %27 = add nuw i64 %.05457, 1
  %28 = load i64, ptr %9, align 8, !tbaa !18
  %29 = icmp ult i64 %27, %28
  br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !21

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge63
  %30 = phi i64 [ %70, %._crit_edge63 ], [ %21, %.preheader.lr.ph ]
  %31 = phi i64 [ %71, %._crit_edge63 ], [ %15, %.preheader.lr.ph ]
  %.05064 = phi i64 [ %72, %._crit_edge63 ], [ 1, %.preheader.lr.ph ]
  %32 = icmp ugt i64 %31, 1
  br i1 %32, label %.lr.ph62, label %._crit_edge63

.lr.ph62:                                         ; preds = %.preheader
  %33 = add i64 %.05064, -1
  %34 = icmp ugt i64 %.05064, 1
  %35 = add i64 %.05064, -2
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %33) #3
  %37 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef 0) #3
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %33) #3
  %39 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef 1) #3
  %40 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.05064) #3
  %41 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef 0) #3
  %42 = getelementptr inbounds i8, ptr %39, i64 24
  %43 = load double, ptr %42, align 8, !tbaa !22
  %44 = getelementptr inbounds i8, ptr %37, i64 24
  %45 = load double, ptr %44, align 8, !tbaa !22
  %46 = fcmp olt double %43, %45
  %.053..peel = select i1 %46, ptr %39, ptr %37
  %47 = getelementptr inbounds i8, ptr %41, i64 24
  %48 = load double, ptr %47, align 8, !tbaa !22
  %49 = getelementptr inbounds i8, ptr %.053..peel, i64 24
  %50 = load double, ptr %49, align 8, !tbaa !22
  %51 = fcmp olt double %48, %50
  %.1.peel = select i1 %51, ptr %41, ptr %.053..peel
  %52 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.05064) #3
  %53 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef 1) #3
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  %55 = load double, ptr %54, align 8, !tbaa !25
  %56 = getelementptr inbounds i8, ptr %.1.peel, i64 24
  %57 = load double, ptr %56, align 8, !tbaa !22
  %58 = fadd double %55, %57
  %59 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.05064) #3
  %60 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef 1) #3
  %61 = getelementptr inbounds i8, ptr %60, i64 24
  store double %58, ptr %61, align 8, !tbaa !22
  %62 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.05064) #3
  %63 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef 1) #3
  %64 = getelementptr inbounds i8, ptr %63, i64 32
  store ptr %.1.peel, ptr %64, align 8, !tbaa !26
  %65 = load i64, ptr %9, align 8, !tbaa !18
  %66 = icmp ugt i64 %65, 2
  br i1 %66, label %.peel.next, label %._crit_edge63.loopexit

._crit_edge65:                                    ; preds = %._crit_edge63, %3, %.preheader.lr.ph, %.preheader56
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #3
  call void @_ZNK6Aquila3Dtw13getFinalPointEv(ptr dead_on_unwind nonnull writable sret(%"struct.Aquila::DtwPoint") align 8 %5, ptr noundef nonnull align 8 dereferenceable(80) %0)
  %67 = getelementptr inbounds i8, ptr %5, i64 24
  %68 = load double, ptr %67, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #3
  ret double %68

._crit_edge63.loopexit:                           ; preds = %96, %.lr.ph62
  %69 = phi i64 [ %65, %.lr.ph62 ], [ %121, %96 ]
  %.pre = load i64, ptr %7, align 8, !tbaa !5
  br label %._crit_edge63

._crit_edge63:                                    ; preds = %._crit_edge63.loopexit, %.preheader
  %70 = phi i64 [ %.pre, %._crit_edge63.loopexit ], [ %30, %.preheader ]
  %71 = phi i64 [ %69, %._crit_edge63.loopexit ], [ %31, %.preheader ]
  %72 = add nuw i64 %.05064, 1
  %73 = icmp ult i64 %72, %70
  br i1 %73, label %.preheader, label %._crit_edge65, !llvm.loop !27

.peel.next:                                       ; preds = %.lr.ph62, %96
  %.061 = phi i64 [ %120, %96 ], [ 2, %.lr.ph62 ]
  %74 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %33) #3
  %75 = add i64 %.061, -1
  %76 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %75) #3
  %77 = load i32, ptr %14, align 8, !tbaa !29
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %84

79:                                               ; preds = %.peel.next
  %80 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %33) #3
  %81 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %.061) #3
  %82 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.05064) #3
  %83 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %75) #3
  br label %96

84:                                               ; preds = %.peel.next
  br i1 %34, label %85, label %91

85:                                               ; preds = %84
  %86 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %35) #3
  %87 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %86, i64 noundef %75) #3
  %88 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %33) #3
  %89 = add i64 %.061, -2
  %90 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %89) #3
  br label %96

91:                                               ; preds = %84
  %92 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %33) #3
  %93 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %.061) #3
  %94 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.05064) #3
  %95 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %75) #3
  br label %96

96:                                               ; preds = %85, %91, %79
  %.053 = phi ptr [ %81, %79 ], [ %87, %85 ], [ %93, %91 ]
  %.052 = phi ptr [ %83, %79 ], [ %90, %85 ], [ %95, %91 ]
  %97 = getelementptr inbounds i8, ptr %.053, i64 24
  %98 = load double, ptr %97, align 8, !tbaa !22
  %99 = getelementptr inbounds i8, ptr %76, i64 24
  %100 = load double, ptr %99, align 8, !tbaa !22
  %101 = fcmp olt double %98, %100
  %.053. = select i1 %101, ptr %.053, ptr %76
  %102 = getelementptr inbounds i8, ptr %.052, i64 24
  %103 = load double, ptr %102, align 8, !tbaa !22
  %104 = getelementptr inbounds i8, ptr %.053., i64 24
  %105 = load double, ptr %104, align 8, !tbaa !22
  %106 = fcmp olt double %103, %105
  %.1 = select i1 %106, ptr %.052, ptr %.053.
  %107 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.05064) #3
  %108 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef %.061) #3
  %109 = getelementptr inbounds i8, ptr %108, i64 16
  %110 = load double, ptr %109, align 8, !tbaa !25
  %111 = getelementptr inbounds i8, ptr %.1, i64 24
  %112 = load double, ptr %111, align 8, !tbaa !22
  %113 = fadd double %110, %112
  %114 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.05064) #3
  %115 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %.061) #3
  %116 = getelementptr inbounds i8, ptr %115, i64 24
  store double %113, ptr %116, align 8, !tbaa !22
  %117 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.05064) #3
  %118 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef %.061) #3
  %119 = getelementptr inbounds i8, ptr %118, i64 32
  store ptr %.1, ptr %119, align 8, !tbaa !26
  %120 = add nuw i64 %.061, 1
  %121 = load i64, ptr %9, align 8, !tbaa !18
  %122 = icmp ult i64 %120, %121
  br i1 %122, label %.peel.next, label %._crit_edge63.loopexit, !llvm.loop !30
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN6Aquila8DtwPointESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNKSt8functionIFdRKSt6vectorIdSaIdEES4_EEclES4_S4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Aquila8DtwPointC2Emmd(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i64 noundef, double noundef) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK6Aquila3Dtw13getFinalPointEv(ptr dead_on_unwind noalias writable sret(%"struct.Aquila::DtwPoint") align 8, ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !17, i64 64}
!6 = !{!"_ZTSN6Aquila3DtwE", !7, i64 0, !12, i64 32, !13, i64 40, !17, i64 64, !17, i64 72}
!7 = !{!"_ZTSSt8functionIFdRKSt6vectorIdSaIdEES4_EE", !8, i64 0, !11, i64 24}
!8 = !{!"_ZTSSt14_Function_base", !9, i64 0, !11, i64 16}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTSN6Aquila3Dtw8PassTypeE", !9, i64 0}
!13 = !{!"_ZTSSt6vectorIS_IN6Aquila8DtwPointESaIS1_EESaIS3_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseISt6vectorIN6Aquila8DtwPointESaIS2_EESaIS4_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN6Aquila8DtwPointESaIS2_EESaIS4_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN6Aquila8DtwPointESaIS2_EESaIS4_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!17 = !{!"long", !9, i64 0}
!18 = !{!6, !17, i64 72}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!23, !24, i64 24}
!23 = !{!"_ZTSN6Aquila8DtwPointE", !17, i64 0, !17, i64 8, !24, i64 16, !24, i64 24, !11, i64 32}
!24 = !{!"double", !9, i64 0}
!25 = !{!23, !24, i64 16}
!26 = !{!23, !11, i64 32}
!27 = distinct !{!27, !20, !28}
!28 = !{!"llvm.loop.unswitch.partial.disable"}
!29 = !{!6, !12, i64 32}
!30 = distinct !{!30, !20, !31}
!31 = !{!"llvm.loop.peeled.count", i32 1}


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