; LLVM IR from CMU-CBML/NeuronTransportIGA :: spline_src/KnotInsertion.ll (Z13DegreeElevateRSt6vectorIS_IdSaIdEESaIS1_EE)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

; 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 void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13DegreeElevateRSt6vectorIS_IdSaIdEESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca double, align 8
  %6 = alloca %"class.std::allocator.2", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca [4 x double], align 16
  %16 = alloca [4 x i32], align 16
  %17 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 3, ptr %3, align 4, !tbaa !9
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  store double 0.000000e+00, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #3
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  invoke void @_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 16, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %20 unwind label %26

20:                                               ; preds = %1
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE6resizeEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef 25, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %21 unwind label %30

21:                                               ; preds = %20
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %155, %21
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = icmp slt i32 %23, 5
  br i1 %24, label %35, label %25

25:                                               ; preds = %22
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %158

26:                                               ; preds = %1
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %7, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %8, align 4
  br label %34

30:                                               ; preds = %20
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %7, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %8, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  br label %34

34:                                               ; preds = %30, %26
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %159

35:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %151, %35
  %37 = load i32, ptr %12, align 4, !tbaa !9
  %38 = icmp slt i32 %37, 5
  br i1 %38, label %40, label %39

39:                                               ; preds = %36
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %154

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %41 = load i32, ptr %12, align 4, !tbaa !9
  %42 = sitofp i32 %41 to double
  %43 = load i32, ptr %3, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  %45 = sitofp i32 %44 to double
  %46 = fdiv double %42, %45
  store double %46, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = sitofp i32 %47 to double
  %49 = load i32, ptr %3, align 4, !tbaa !9
  %50 = add nsw i32 %49, 1
  %51 = sitofp i32 %50 to double
  %52 = fdiv double %48, %51
  store double %52, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #3
  %53 = load double, ptr %13, align 8, !tbaa !11
  %54 = fsub double 1.000000e+00, %53
  %55 = load double, ptr %14, align 8, !tbaa !11
  %56 = fsub double 1.000000e+00, %55
  %57 = fmul double %54, %56
  store double %57, ptr %15, align 8, !tbaa !11
  %58 = getelementptr inbounds double, ptr %15, i64 1
  %59 = load double, ptr %13, align 8, !tbaa !11
  %60 = load double, ptr %14, align 8, !tbaa !11
  %61 = fsub double 1.000000e+00, %60
  %62 = fmul double %59, %61
  store double %62, ptr %58, align 8, !tbaa !11
  %63 = getelementptr inbounds double, ptr %15, i64 2
  %64 = load double, ptr %13, align 8, !tbaa !11
  %65 = fsub double 1.000000e+00, %64
  %66 = load double, ptr %14, align 8, !tbaa !11
  %67 = fmul double %65, %66
  store double %67, ptr %63, align 8, !tbaa !11
  %68 = getelementptr inbounds double, ptr %15, i64 3
  %69 = load double, ptr %13, align 8, !tbaa !11
  %70 = load double, ptr %14, align 8, !tbaa !11
  %71 = fmul double %69, %70
  store double %71, ptr %68, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #3
  %72 = load i32, ptr %10, align 4, !tbaa !9
  %73 = mul nsw i32 4, %72
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = add nsw i32 %73, %74
  store i32 %75, ptr %16, align 4, !tbaa !9
  %76 = getelementptr inbounds i32, ptr %16, i64 1
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = mul nsw i32 4, %77
  %79 = load i32, ptr %12, align 4, !tbaa !9
  %80 = add nsw i32 %78, %79
  %81 = sub nsw i32 %80, 1
  store i32 %81, ptr %76, align 4, !tbaa !9
  %82 = getelementptr inbounds i32, ptr %16, i64 2
  %83 = load i32, ptr %10, align 4, !tbaa !9
  %84 = sub nsw i32 %83, 1
  %85 = mul nsw i32 4, %84
  %86 = load i32, ptr %12, align 4, !tbaa !9
  %87 = add nsw i32 %85, %86
  store i32 %87, ptr %82, align 4, !tbaa !9
  %88 = getelementptr inbounds i32, ptr %16, i64 3
  %89 = load i32, ptr %10, align 4, !tbaa !9
  %90 = sub nsw i32 %89, 1
  %91 = mul nsw i32 4, %90
  %92 = load i32, ptr %12, align 4, !tbaa !9
  %93 = add nsw i32 %91, %92
  %94 = sub nsw i32 %93, 1
  store i32 %94, ptr %88, align 4, !tbaa !9
  %95 = load i32, ptr %12, align 4, !tbaa !9
  %96 = icmp eq i32 %95, 0
  br i1 %96, label %97, label %100

97:                                               ; preds = %40
  %98 = getelementptr inbounds [4 x i32], ptr %16, i64 0, i64 1
  store i32 -1, ptr %98, align 4, !tbaa !9
  %99 = getelementptr inbounds [4 x i32], ptr %16, i64 0, i64 3
  store i32 -1, ptr %99, align 4, !tbaa !9
  br label %100

100:                                              ; preds = %97, %40
  %101 = load i32, ptr %10, align 4, !tbaa !9
  %102 = icmp eq i32 %101, 0
  br i1 %102, label %103, label %106

103:                                              ; preds = %100
  %104 = getelementptr inbounds [4 x i32], ptr %16, i64 0, i64 2
  store i32 -1, ptr %104, align 8, !tbaa !9
  %105 = getelementptr inbounds [4 x i32], ptr %16, i64 0, i64 3
  store i32 -1, ptr %105, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %103, %100
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = icmp eq i32 %107, 4
  br i1 %108, label %109, label %112

109:                                              ; preds = %106
  %110 = getelementptr inbounds [4 x i32], ptr %16, i64 0, i64 0
  store i32 -1, ptr %110, align 16, !tbaa !9
  %111 = getelementptr inbounds [4 x i32], ptr %16, i64 0, i64 2
  store i32 -1, ptr %111, align 8, !tbaa !9
  br label %112

112:                                              ; preds = %109, %106
  %113 = load i32, ptr %10, align 4, !tbaa !9
  %114 = icmp eq i32 %113, 4
  br i1 %114, label %115, label %118

115:                                              ; preds = %112
  %116 = getelementptr inbounds [4 x i32], ptr %16, i64 0, i64 0
  store i32 -1, ptr %116, align 16, !tbaa !9
  %117 = getelementptr inbounds [4 x i32], ptr %16, i64 0, i64 1
  store i32 -1, ptr %117, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %115, %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %145, %118
  %120 = load i32, ptr %17, align 4, !tbaa !9
  %121 = icmp slt i32 %120, 4
  br i1 %121, label %123, label %122

122:                                              ; preds = %119
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %148

123:                                              ; preds = %119
  %124 = load i32, ptr %17, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [4 x i32], ptr %16, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = icmp ne i32 %127, -1
  br i1 %128, label %129, label %144

129:                                              ; preds = %123
  %130 = load i32, ptr %17, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [4 x double], ptr %15, i64 0, i64 %131
  %133 = load double, ptr %132, align 8, !tbaa !11
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = load i32, ptr %9, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef %136) #3
  %138 = load i32, ptr %17, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [4 x i32], ptr %16, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %142) #3
  store double %133, ptr %143, align 8, !tbaa !11
  br label %144

144:                                              ; preds = %129, %123
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %17, align 4, !tbaa !9
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %17, align 4, !tbaa !9
  br label %119, !llvm.loop !13

148:                                              ; preds = %122
  %149 = load i32, ptr %9, align 4, !tbaa !9
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %151

151:                                              ; preds = %148
  %152 = load i32, ptr %12, align 4, !tbaa !9
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %12, align 4, !tbaa !9
  br label %36, !llvm.loop !15

154:                                              ; preds = %39
  br label %155

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

158:                                              ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret void

159:                                              ; preds = %34
  %160 = load ptr, ptr %7, align 8
  %161 = load i32, ptr %8, align 4
  %162 = insertvalue { ptr, i32 } poison, ptr %160, 0
  %163 = insertvalue { ptr, i32 } %162, i32 %161, 1
  resume { ptr, i32 } %163
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

; Function Attrs: mustprogress 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 void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13DegreeElevateRSt6vectorIS_IdSaIdEESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.0", align 8
  %3 = alloca double, align 8
  %4 = alloca %"class.std::allocator.2", align 1
  tail call void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #3
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  invoke void @_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 16, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %5 unwind label %29

5:                                                ; preds = %1
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE6resizeEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 25, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %6 unwind label %31

6:                                                ; preds = %5
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  br label %7

7:                                                ; preds = %6, %.loopexit
  %.04249 = phi i32 [ 0, %6 ], [ %109, %.loopexit ]
  %.04348 = phi i64 [ 0, %6 ], [ %indvars.iv.next.3, %.loopexit ]
  %8 = uitofp nneg i32 %.04249 to double
  %9 = fmul double %8, 2.500000e-01
  %10 = fsub double 1.000000e+00, %9
  %11 = shl i32 %.04249, 2
  %12 = add nsw i32 %11, -4
  %13 = icmp eq i32 %.04249, 0
  %.not89 = icmp eq i32 %.04249, 4
  %sext = shl i64 %.04348, 32
  %14 = ashr exact i64 %sext, 32
  br i1 %.not89, label %.thread73, label %.thread

.thread:                                          ; preds = %7
  %.mux = select i1 %13, i32 -1, i32 %12
  %15 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %14) #3
  %16 = zext nneg i32 %11 to i64
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %16) #3
  store double %10, ptr %17, align 8, !tbaa !5
  br i1 %13, label %.peel.next, label %.thread73

.thread73:                                        ; preds = %7, %.thread
  %.sroa.20.0657176 = phi i32 [ %.mux, %.thread ], [ %12, %7 ]
  %18 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %14) #3
  %19 = sext i32 %.sroa.20.0657176 to i64
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %19) #3
  store double %9, ptr %20, align 8, !tbaa !5
  br label %.peel.next

.peel.next:                                       ; preds = %.thread73, %.thread
  %indvars.iv.next.peel = add nsw i64 %14, 1
  %21 = fmul double %10, 7.500000e-01
  %22 = fmul double %10, 2.500000e-01
  %23 = fmul double %9, 7.500000e-01
  %24 = fmul double %9, 2.500000e-01
  %25 = or disjoint i32 %11, 1
  %26 = add nsw i32 %11, -3
  %27 = add nsw i32 %11, -4
  %spec.select = select i1 %13, i32 -1, i32 %27
  %.sroa.20.3 = select i1 %13, i32 -1, i32 %26
  br i1 %.not89, label %41, label %34

28:                                               ; preds = %.loopexit
  ret void

29:                                               ; preds = %1
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %33

31:                                               ; preds = %5
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  br label %33

33:                                               ; preds = %31, %29
  %.pn = phi { ptr, i32 } [ %32, %31 ], [ %30, %29 ]
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  resume { ptr, i32 } %.pn

34:                                               ; preds = %.peel.next
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next.peel) #3
  %36 = zext nneg i32 %25 to i64
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %36) #3
  store double %21, ptr %37, align 8, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next.peel) #3
  %39 = zext nneg i32 %11 to i64
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %39) #3
  store double %22, ptr %40, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %.peel.next, %34
  br i1 %13, label %.critedge, label %42

42:                                               ; preds = %41
  %43 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next.peel) #3
  %44 = sext i32 %.sroa.20.3 to i64
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %44) #3
  store double %23, ptr %45, align 8, !tbaa !5
  %46 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next.peel) #3
  %47 = sext i32 %spec.select to i64
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %47) #3
  store double %24, ptr %48, align 8, !tbaa !5
  br label %.critedge

.critedge:                                        ; preds = %41, %42
  %indvars.iv.next = add nsw i64 %14, 2
  %49 = fmul double %10, 5.000000e-01
  %50 = fmul double %10, 5.000000e-01
  %51 = fmul double %9, 5.000000e-01
  %52 = fmul double %9, 5.000000e-01
  %53 = or disjoint i32 %11, 2
  %54 = or disjoint i32 %11, 1
  %55 = add nsw i32 %11, -2
  %56 = add nsw i32 %11, -3
  %spec.select.1 = select i1 %13, i32 -1, i32 %56
  %.sroa.20.3.1 = select i1 %13, i32 -1, i32 %55
  br i1 %.not89, label %64, label %57

57:                                               ; preds = %.critedge
  %58 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next) #3
  %59 = zext nneg i32 %53 to i64
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %59) #3
  store double %49, ptr %60, align 8, !tbaa !5
  %61 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next) #3
  %62 = zext nneg i32 %54 to i64
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %62) #3
  store double %50, ptr %63, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %57, %.critedge
  br i1 %13, label %.critedge91, label %65

65:                                               ; preds = %64
  %66 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next) #3
  %67 = sext i32 %.sroa.20.3.1 to i64
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %67) #3
  store double %51, ptr %68, align 8, !tbaa !5
  %69 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next) #3
  %70 = sext i32 %spec.select.1 to i64
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %70) #3
  store double %52, ptr %71, align 8, !tbaa !5
  br label %.critedge91

.critedge91:                                      ; preds = %64, %65
  %indvars.iv.next.1 = add nsw i64 %14, 3
  %72 = fmul double %10, 2.500000e-01
  %73 = fmul double %10, 7.500000e-01
  %74 = fmul double %9, 2.500000e-01
  %75 = fmul double %9, 7.500000e-01
  %76 = or disjoint i32 %11, 3
  %77 = or disjoint i32 %11, 2
  %78 = add nsw i32 %11, -1
  %79 = add nsw i32 %11, -2
  %spec.select.2 = select i1 %13, i32 -1, i32 %79
  br i1 %.not89, label %87, label %80

80:                                               ; preds = %.critedge91
  %81 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next.1) #3
  %82 = sext i32 %76 to i64
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %82) #3
  store double %72, ptr %83, align 8, !tbaa !5
  %84 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next.1) #3
  %85 = sext i32 %77 to i64
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %85) #3
  store double %73, ptr %86, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %80, %.critedge91
  %.not.2.2 = icmp eq i32 %11, 0
  br i1 %.not.2.2, label %92, label %88

88:                                               ; preds = %87
  %89 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next.1) #3
  %90 = sext i32 %78 to i64
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %90) #3
  store double %74, ptr %91, align 8, !tbaa !5
  br label %92

92:                                               ; preds = %88, %87
  br i1 %13, label %97, label %93

93:                                               ; preds = %92
  %94 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next.1) #3
  %95 = sext i32 %spec.select.2 to i64
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %95) #3
  store double %75, ptr %96, align 8, !tbaa !5
  br label %97

97:                                               ; preds = %93, %92
  %indvars.iv.next.2 = add nsw i64 %14, 4
  %98 = or disjoint i32 %11, 3
  %99 = add nsw i32 %11, -1
  br i1 %.not89, label %104, label %100

100:                                              ; preds = %97
  %101 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next.2) #3
  %102 = sext i32 %98 to i64
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %102) #3
  store double %10, ptr %103, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %97, %100
  %.not.3.3 = icmp eq i32 %11, 0
  br i1 %.not.3.3, label %.loopexit, label %105

105:                                              ; preds = %104
  %106 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next.2) #3
  %107 = sext i32 %99 to i64
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %107) #3
  store double %9, ptr %108, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %105, %104
  %indvars.iv.next.3 = add nsw i64 %14, 5
  %109 = add nuw nsw i32 %.04249, 1
  %exitcond53.not = icmp eq i32 %109, 5
  br i1 %exitcond53.not, label %28, label %7, !llvm.loop !9
}

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

attributes #0 = { mustprogress 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 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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