; LLVM IR from ERGO-Code/HiGHS :: src/util/HFactor.ll (ZNK7HFactor7btranPFER11HVectorBaseIdE)

; 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.HFactor = type { double, double, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector", %struct.RefactorInfo, i32, i32, i32, i32, i32, i32, i32, double, i8, ptr, ptr, ptr, ptr, double, double, i32, double, %"class.std::unique_ptr", %struct.HighsLogOptions, i8, i8, i32, i32, ptr, i32, %"class.std::vector", %"class.std::vector.10", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.10", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.10", %"class.std::vector.10", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.15", %"class.std::vector.10", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.10", %"class.std::vector", %"class.std::vector", %"class.std::vector.10", %"class.std::vector", %"class.std::vector", %"class.std::vector.10", i32, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.10", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.10", %"class.std::vector.10", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.10", %class.HVectorBase }
%struct.RefactorInfo = type { i8, %"class.std::vector", %"class.std::vector", %"class.std::vector.3", double }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<signed char, std::allocator<signed char>>::_Vector_impl" }
%"struct.std::_Vector_base<signed char, std::allocator<signed char>>::_Vector_impl" = type { %"struct.std::_Vector_base<signed char, std::allocator<signed char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<signed char, std::allocator<signed char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.9" }
%"struct.std::_Head_base.9" = type { ptr }
%struct.HighsLogOptions = type <{ ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::function", ptr, i8, [7 x i8] }>
%"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.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = 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.HVectorBase = type { i32, i32, %"class.std::vector", %"class.std::vector.10", double, %"class.std::vector.15", %"class.std::vector", ptr, i8, i32, %"class.std::vector", %"class.std::vector.10" }

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK7HFactor7btranPFER11HVectorBaseIdE(ptr noundef nonnull align 8 dereferenceable(1912) %0, ptr noundef nonnull align 8 dereferenceable(176) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %20 = getelementptr inbounds %class.HFactor, ptr %19, i32 0, i32 84
  %21 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #3
  %22 = trunc i64 %21 to i32
  store i32 %22, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %23 = getelementptr inbounds %class.HFactor, ptr %19, i32 0, i32 84
  %24 = call noundef ptr @_ZNKSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #3
  store ptr %24, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %25 = getelementptr inbounds %class.HFactor, ptr %19, i32 0, i32 83
  %26 = call noundef ptr @_ZNKSt6vectorIdSaIdEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #3
  store ptr %26, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %27 = getelementptr inbounds %class.HFactor, ptr %19, i32 0, i32 85
  %28 = call noundef ptr @_ZNKSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #3
  store ptr %28, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %29 = getelementptr inbounds %class.HFactor, ptr %19, i32 0, i32 86
  %30 = call noundef ptr @_ZNKSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #3
  store ptr %30, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %31 = getelementptr inbounds %class.HFactor, ptr %19, i32 0, i32 87
  %32 = call noundef ptr @_ZNKSt6vectorIdSaIdEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #3
  store ptr %32, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %class.HVectorBase, ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !11
  store i32 %35, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %class.HVectorBase, ptr %36, i32 0, i32 2
  %38 = call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #3
  store ptr %38, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %class.HVectorBase, ptr %39, i32 0, i32 3
  %41 = call noundef ptr @_ZNSt6vectorIdSaIdEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #3
  store ptr %41, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %42 = load i32, ptr %5, align 4, !tbaa !9
  %43 = sub nsw i32 %42, 1
  store i32 %43, ptr %14, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %129, %2
  %45 = load i32, ptr %14, align 4, !tbaa !9
  %46 = icmp sge i32 %45, 0
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %132

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = load i32, ptr %14, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i32, ptr %49, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !9
  store i32 %53, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  %55 = load i32, ptr %16, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds double, ptr %54, i64 %56
  %58 = load double, ptr %57, align 8, !tbaa !27
  store double %58, ptr %17, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = load i32, ptr %14, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %59, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !9
  store i32 %63, ptr %18, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %92, %48
  %65 = load i32, ptr %18, align 4, !tbaa !9
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = load i32, ptr %14, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %66, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !9
  %72 = icmp slt i32 %65, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %64
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %95

74:                                               ; preds = %64
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = load i32, ptr %18, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds double, ptr %75, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !27
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = load i32, ptr %18, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i32, ptr %81, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds double, ptr %80, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !27
  %89 = load double, ptr %17, align 8, !tbaa !27
  %90 = fneg double %79
  %91 = call double @llvm.fmuladd.f64(double %90, double %88, double %89)
  store double %91, ptr %17, align 8, !tbaa !27
  br label %92

92:                                               ; preds = %74
  %93 = load i32, ptr %18, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %18, align 4, !tbaa !9
  br label %64, !llvm.loop !28

95:                                               ; preds = %73
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load i32, ptr %14, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds double, ptr %96, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !27
  %101 = load double, ptr %17, align 8, !tbaa !27
  %102 = fdiv double %101, %100
  store double %102, ptr %17, align 8, !tbaa !27
  %103 = load ptr, ptr %13, align 8, !tbaa !5
  %104 = load i32, ptr %16, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds double, ptr %103, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !27
  %108 = fcmp oeq double %107, 0.000000e+00
  br i1 %108, label %109, label %116

109:                                              ; preds = %95
  %110 = load i32, ptr %16, align 4, !tbaa !9
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  %112 = load i32, ptr %11, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %11, align 4, !tbaa !9
  %114 = sext i32 %112 to i64
  %115 = getelementptr inbounds i32, ptr %111, i64 %114
  store i32 %110, ptr %115, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %109, %95
  %117 = load double, ptr %17, align 8, !tbaa !27
  %118 = call double @llvm.fabs.f64(double %117)
  %119 = fcmp olt double %118, 0x3D06849B86A12B9B
  br i1 %119, label %120, label %121

120:                                              ; preds = %116
  br label %123

121:                                              ; preds = %116
  %122 = load double, ptr %17, align 8, !tbaa !27
  br label %123

123:                                              ; preds = %121, %120
  %124 = phi double [ 1.000000e-100, %120 ], [ %122, %121 ]
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = load i32, ptr %16, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds double, ptr %125, i64 %127
  store double %124, ptr %128, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  br label %129

129:                                              ; preds = %123
  %130 = load i32, ptr %14, align 4, !tbaa !9
  %131 = add nsw i32 %130, -1
  store i32 %131, ptr %14, align 4, !tbaa !9
  br label %44, !llvm.loop !30

132:                                              ; preds = %47
  %133 = load i32, ptr %11, align 4, !tbaa !9
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %class.HVectorBase, ptr %134, i32 0, i32 1
  store i32 %133, ptr %135, align 4, !tbaa !11
  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 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret void
}

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !10, i64 4}
!12 = !{!"_ZTS11HVectorBaseIdE", !10, i64 0, !10, i64 4, !13, i64 8, !17, i64 32, !21, i64 56, !22, i64 64, !13, i64 88, !6, i64 112, !26, i64 120, !10, i64 124, !13, i64 128, !17, i64 152}
!13 = !{!"_ZTSSt6vectorIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt6vectorIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"double", !7, i64 0}
!22 = !{!"_ZTSSt6vectorIcSaIcEE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"bool", !7, i64 0}
!27 = !{!21, !21, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}


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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK7HFactor7btranPFER11HVectorBaseIdE(ptr noundef nonnull align 8 dereferenceable(1912) %0, ptr noundef nonnull align 8 dereferenceable(176) %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 1640
  %4 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #2
  %5 = trunc i64 %4 to i32
  %6 = tail call noundef ptr @_ZNKSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #2
  %7 = getelementptr inbounds i8, ptr %0, i64 1616
  %8 = tail call noundef ptr @_ZNKSt6vectorIdSaIdEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #2
  %9 = getelementptr inbounds i8, ptr %0, i64 1664
  %10 = tail call noundef ptr @_ZNKSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #2
  %11 = getelementptr inbounds i8, ptr %0, i64 1688
  %12 = tail call noundef ptr @_ZNKSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #2
  %13 = getelementptr inbounds i8, ptr %0, i64 1712
  %14 = tail call noundef ptr @_ZNKSt6vectorIdSaIdEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #2
  %15 = getelementptr inbounds i8, ptr %1, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %1, i64 8
  %18 = tail call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #2
  %19 = getelementptr inbounds i8, ptr %1, i64 32
  %20 = tail call noundef ptr @_ZNSt6vectorIdSaIdEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #2
  %21 = icmp sgt i32 %5, 0
  br i1 %21, label %.lr.ph46.preheader, label %._crit_edge47

.lr.ph46.preheader:                               ; preds = %2
  %22 = and i64 %4, 2147483647
  br label %.lr.ph46

._crit_edge47:                                    ; preds = %72, %2
  %.037.lcssa = phi i32 [ %16, %2 ], [ %.1, %72 ]
  store i32 %.037.lcssa, ptr %15, align 4, !tbaa !5
  ret void

.lr.ph46:                                         ; preds = %.lr.ph46.preheader, %72
  %indvars.iv50 = phi i64 [ %22, %.lr.ph46.preheader ], [ %indvars.iv.next51, %72 ]
  %.03743 = phi i32 [ %16, %.lr.ph46.preheader ], [ %.1, %72 ]
  %indvars.iv.next51 = add nsw i64 %indvars.iv50, -1
  %23 = getelementptr inbounds i32, ptr %6, i64 %indvars.iv.next51
  %24 = load i32, ptr %23, align 4, !tbaa !25
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds double, ptr %20, i64 %25
  %27 = load double, ptr %26, align 8, !tbaa !26
  %28 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv.next51
  %29 = load i32, ptr %28, align 4, !tbaa !25
  %30 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv50
  %31 = load i32, ptr %30, align 4, !tbaa !25
  %32 = icmp slt i32 %29, %31
  br i1 %32, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.lr.ph46
  %33 = sext i32 %29 to i64
  %wide.trip.count = sext i32 %31 to i64
  %34 = sub nsw i64 %wide.trip.count, %33
  %xtraiter = and i64 %34, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader
  %35 = getelementptr inbounds double, ptr %14, i64 %33
  %36 = load double, ptr %35, align 8, !tbaa !26
  %37 = getelementptr inbounds i32, ptr %12, i64 %33
  %38 = load i32, ptr %37, align 4, !tbaa !25
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds double, ptr %20, i64 %39
  %41 = load double, ptr %40, align 8, !tbaa !26
  %42 = fneg double %36
  %43 = tail call double @llvm.fmuladd.f64(double %42, double %41, double %27)
  %indvars.iv.next.prol = add nsw i64 %33, 1
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.lcssa.unr = phi double [ poison, %.lr.ph.preheader ], [ %43, %.lr.ph.prol ]
  %indvars.iv.unr = phi i64 [ %33, %.lr.ph.preheader ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %.03639.unr = phi double [ %27, %.lr.ph.preheader ], [ %43, %.lr.ph.prol ]
  %44 = add nsw i64 %wide.trip.count, -1
  %45 = icmp eq i64 %44, %33
  br i1 %45, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %.lr.ph46
  %.036.lcssa = phi double [ %27, %.lr.ph46 ], [ %.lcssa.unr, %.lr.ph.prol.loopexit ], [ %67, %.lr.ph ]
  %46 = getelementptr inbounds double, ptr %8, i64 %indvars.iv.next51
  %47 = load double, ptr %46, align 8, !tbaa !26
  %48 = fdiv double %.036.lcssa, %47
  %49 = fcmp oeq double %27, 0.000000e+00
  br i1 %49, label %68, label %72

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %.03639 = phi double [ %67, %.lr.ph ], [ %.03639.unr, %.lr.ph.prol.loopexit ]
  %50 = getelementptr inbounds double, ptr %14, i64 %indvars.iv
  %51 = load double, ptr %50, align 8, !tbaa !26
  %52 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv
  %53 = load i32, ptr %52, align 4, !tbaa !25
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds double, ptr %20, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !26
  %57 = fneg double %51
  %58 = tail call double @llvm.fmuladd.f64(double %57, double %56, double %.03639)
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %59 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next
  %60 = load double, ptr %59, align 8, !tbaa !26
  %61 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv.next
  %62 = load i32, ptr %61, align 4, !tbaa !25
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds double, ptr %20, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !26
  %66 = fneg double %60
  %67 = tail call double @llvm.fmuladd.f64(double %66, double %65, double %58)
  %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge, label %.lr.ph, !llvm.loop !27

68:                                               ; preds = %._crit_edge
  %69 = add nsw i32 %.03743, 1
  %70 = sext i32 %.03743 to i64
  %71 = getelementptr inbounds i32, ptr %18, i64 %70
  store i32 %24, ptr %71, align 4, !tbaa !25
  br label %72

72:                                               ; preds = %68, %._crit_edge
  %.1 = phi i32 [ %69, %68 ], [ %.03743, %._crit_edge ]
  %73 = tail call double @llvm.fabs.f64(double %48)
  %74 = fcmp olt double %73, 0x3D06849B86A12B9B
  %75 = select i1 %74, double 1.000000e-100, double %48
  store double %75, ptr %26, align 8, !tbaa !26
  %76 = icmp sgt i64 %indvars.iv50, 1
  br i1 %76, label %.lr.ph46, label %._crit_edge47, !llvm.loop !29
}

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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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, !7, i64 4}
!6 = !{!"_ZTS11HVectorBaseIdE", !7, i64 0, !7, i64 4, !10, i64 8, !15, i64 32, !19, i64 56, !20, i64 64, !10, i64 88, !14, i64 112, !24, i64 120, !7, i64 124, !10, i64 128, !15, i64 152}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIiSaIiEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!"double", !8, i64 0}
!20 = !{!"_ZTSSt6vectorIcSaIcEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!24 = !{!"bool", !8, i64 0}
!25 = !{!7, !7, i64 0}
!26 = !{!19, !19, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}


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