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

; 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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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::allocator.5" = type { i8 }

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11maxheapsortPiS_i(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11sortSetDataiRSt6vectorIiSaIiEEPKdS4_S4_PdS5_S5_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #2 personality ptr @__gxx_personality_v0 {
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.std::vector.3", align 8
  %18 = alloca %"class.std::allocator.5", align 1
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::vector.3", align 8
  %22 = alloca %"class.std::allocator.5", align 1
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store i32 %0, ptr %9, align 4, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !9
  store ptr %2, ptr %11, align 8, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !9
  store ptr %6, ptr %15, align 8, !tbaa !9
  store ptr %7, ptr %16, align 8, !tbaa !9
  %27 = load i32, ptr %9, align 4, !tbaa !5
  %28 = icmp sle i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %8
  br label %157

30:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #3
  %31 = load i32, ptr %9, align 4, !tbaa !5
  %32 = add nsw i32 1, %31
  %33 = sext i32 %32 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #3
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #3
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %33, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %34 unwind label %46

34:                                               ; preds = %30
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #3
  %35 = load i32, ptr %9, align 4, !tbaa !5
  %36 = add nsw i32 1, %35
  %37 = sext i32 %36 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #3
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #3
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %37, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %38 unwind label %50

38:                                               ; preds = %34
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %39 = call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #3
  store ptr %39, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %40 = call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #3
  store ptr %40, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %71, %38
  %42 = load i32, ptr %25, align 4, !tbaa !5
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %54, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  br label %74

46:                                               ; preds = %30
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %19, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %20, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #3
  br label %159

50:                                               ; preds = %34
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %19, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %20, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #3
  br label %158

54:                                               ; preds = %41
  %55 = load ptr, ptr %10, align 8, !tbaa !9
  %56 = load i32, ptr %25, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %57) #3
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = load ptr, ptr %23, align 8, !tbaa !9
  %61 = load i32, ptr %25, align 4, !tbaa !5
  %62 = add nsw i32 1, %61
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i32, ptr %60, i64 %63
  store i32 %59, ptr %64, align 4, !tbaa !5
  %65 = load i32, ptr %25, align 4, !tbaa !5
  %66 = load ptr, ptr %24, align 8, !tbaa !9
  %67 = load i32, ptr %25, align 4, !tbaa !5
  %68 = add nsw i32 1, %67
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %66, i64 %69
  store i32 %65, ptr %70, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %54
  %72 = load i32, ptr %25, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %25, align 4, !tbaa !5
  br label %41, !llvm.loop !11

74:                                               ; preds = %45
  %75 = load ptr, ptr %23, align 8, !tbaa !9
  %76 = load ptr, ptr %24, align 8, !tbaa !9
  %77 = load i32, ptr %9, align 4, !tbaa !5
  invoke void @_Z11maxheapsortPiS_i(ptr noundef %75, ptr noundef %76, i32 noundef %77)
          to label %78 unwind label %84

78:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %153, %78
  %80 = load i32, ptr %26, align 4, !tbaa !5
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %88, label %83

83:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  br label %156

84:                                               ; preds = %74
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %19, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #3
  br label %158

88:                                               ; preds = %79
  %89 = load ptr, ptr %23, align 8, !tbaa !9
  %90 = load i32, ptr %26, align 4, !tbaa !5
  %91 = add nsw i32 1, %90
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i32, ptr %89, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load ptr, ptr %10, align 8, !tbaa !9
  %96 = load i32, ptr %26, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %97) #3
  store i32 %94, ptr %98, align 4, !tbaa !5
  %99 = load ptr, ptr %11, align 8, !tbaa !9
  %100 = icmp ne ptr %99, null
  br i1 %100, label %101, label %116

101:                                              ; preds = %88
  %102 = load ptr, ptr %11, align 8, !tbaa !9
  %103 = load ptr, ptr %24, align 8, !tbaa !9
  %104 = load i32, ptr %26, align 4, !tbaa !5
  %105 = add nsw i32 1, %104
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i32, ptr %103, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %102, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !13
  %112 = load ptr, ptr %14, align 8, !tbaa !9
  %113 = load i32, ptr %26, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds double, ptr %112, i64 %114
  store double %111, ptr %115, align 8, !tbaa !13
  br label %116

116:                                              ; preds = %101, %88
  %117 = load ptr, ptr %12, align 8, !tbaa !9
  %118 = icmp ne ptr %117, null
  br i1 %118, label %119, label %134

119:                                              ; preds = %116
  %120 = load ptr, ptr %12, align 8, !tbaa !9
  %121 = load ptr, ptr %24, align 8, !tbaa !9
  %122 = load i32, ptr %26, align 4, !tbaa !5
  %123 = add nsw i32 1, %122
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds i32, ptr %121, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds double, ptr %120, i64 %127
  %129 = load double, ptr %128, align 8, !tbaa !13
  %130 = load ptr, ptr %15, align 8, !tbaa !9
  %131 = load i32, ptr %26, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds double, ptr %130, i64 %132
  store double %129, ptr %133, align 8, !tbaa !13
  br label %134

134:                                              ; preds = %119, %116
  %135 = load ptr, ptr %13, align 8, !tbaa !9
  %136 = icmp ne ptr %135, null
  br i1 %136, label %137, label %152

137:                                              ; preds = %134
  %138 = load ptr, ptr %13, align 8, !tbaa !9
  %139 = load ptr, ptr %24, align 8, !tbaa !9
  %140 = load i32, ptr %26, align 4, !tbaa !5
  %141 = add nsw i32 1, %140
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds i32, ptr %139, i64 %142
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds double, ptr %138, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !13
  %148 = load ptr, ptr %16, align 8, !tbaa !9
  %149 = load i32, ptr %26, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds double, ptr %148, i64 %150
  store double %147, ptr %151, align 8, !tbaa !13
  br label %152

152:                                              ; preds = %137, %134
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %26, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %26, align 4, !tbaa !5
  br label %79, !llvm.loop !15

156:                                              ; preds = %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #3
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #3
  br label %157

157:                                              ; preds = %156, %29
  ret void

158:                                              ; preds = %84, %50
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #3
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #3
  br label %159

159:                                              ; preds = %158, %46
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #3
  br label %160

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !12}


; 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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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::allocator.5" = type { i8 }

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11maxheapsortPiS_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11sortSetDataiRSt6vectorIiSaIiEEPKdS4_S4_PdS5_S5_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef readonly %2, ptr noundef readonly %3, ptr noundef readonly %4, ptr nocapture noundef writeonly %5, ptr nocapture noundef writeonly %6, ptr nocapture noundef writeonly %7) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %9 = alloca %"class.std::vector.3", align 8
  %10 = alloca %"class.std::allocator.5", align 1
  %11 = alloca %"class.std::vector.3", align 8
  %12 = alloca %"class.std::allocator.5", align 1
  %13 = icmp slt i32 %0, 1
  br i1 %13, label %112, label %14

14:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  %15 = add nuw nsw i32 %0, 1
  %16 = zext nneg i32 %15 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %16, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %17 unwind label %86

17:                                               ; preds = %14
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %16, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %.lr.ph.preheader unwind label %88

.lr.ph.preheader:                                 ; preds = %17
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  %18 = call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %19 = call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  invoke void @_Z11maxheapsortPiS_i(ptr noundef nonnull %18, ptr noundef nonnull %19, i32 noundef %0)
          to label %.lr.ph56 unwind label %95

.lr.ph56:                                         ; preds = %._crit_edge
  %.not = icmp eq ptr %2, null
  %.not52 = icmp eq ptr %3, null
  %.not53 = icmp eq ptr %4, null
  %smax113 = call i32 @llvm.smax.i32(i32 %0, i32 1)
  %wide.trip.count114 = zext nneg i32 %smax113 to i64
  br i1 %.not, label %.lr.ph56.split.us, label %.lr.ph56.split

.lr.ph56.split.us:                                ; preds = %.lr.ph56
  br i1 %.not52, label %.lr.ph56.split.us.split.us, label %.lr.ph56.split.us.split

.lr.ph56.split.us.split.us:                       ; preds = %.lr.ph56.split.us
  br i1 %.not53, label %.lr.ph56.split.us.split.us.split.us, label %.lr.ph56.split.us.split.us.split

.lr.ph56.split.us.split.us.split.us:              ; preds = %.lr.ph56.split.us.split.us, %.lr.ph56.split.us.split.us.split.us
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %.lr.ph56.split.us.split.us.split.us ], [ 0, %.lr.ph56.split.us.split.us ]
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %20 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next111
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv110) #4
  store i32 %21, ptr %22, align 4, !tbaa !5
  %exitcond115.not = icmp eq i64 %indvars.iv.next111, %wide.trip.count114
  br i1 %exitcond115.not, label %._crit_edge57, label %.lr.ph56.split.us.split.us.split.us, !llvm.loop !9

.lr.ph56.split.us.split.us.split:                 ; preds = %.lr.ph56.split.us.split.us, %.lr.ph56.split.us.split.us.split
  %indvars.iv104 = phi i64 [ %indvars.iv.next105, %.lr.ph56.split.us.split.us.split ], [ 0, %.lr.ph56.split.us.split.us ]
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %23 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next105
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv104) #4
  store i32 %24, ptr %25, align 4, !tbaa !5
  %26 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.next105
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds double, ptr %4, i64 %28
  %30 = load double, ptr %29, align 8, !tbaa !11
  %31 = getelementptr inbounds double, ptr %7, i64 %indvars.iv104
  store double %30, ptr %31, align 8, !tbaa !11
  %exitcond109.not = icmp eq i64 %indvars.iv.next105, %wide.trip.count114
  br i1 %exitcond109.not, label %._crit_edge57, label %.lr.ph56.split.us.split.us.split, !llvm.loop !9

.lr.ph56.split.us.split:                          ; preds = %.lr.ph56.split.us
  br i1 %.not53, label %.lr.ph56.split.us.split.split.us, label %.lr.ph56.split.us.split.split

.lr.ph56.split.us.split.split.us:                 ; preds = %.lr.ph56.split.us.split, %.lr.ph56.split.us.split.split.us
  %indvars.iv98 = phi i64 [ %indvars.iv.next99, %.lr.ph56.split.us.split.split.us ], [ 0, %.lr.ph56.split.us.split ]
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %32 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next99
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv98) #4
  store i32 %33, ptr %34, align 4, !tbaa !5
  %35 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.next99
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds double, ptr %3, i64 %37
  %39 = load double, ptr %38, align 8, !tbaa !11
  %40 = getelementptr inbounds double, ptr %6, i64 %indvars.iv98
  store double %39, ptr %40, align 8, !tbaa !11
  %exitcond103.not = icmp eq i64 %indvars.iv.next99, %wide.trip.count114
  br i1 %exitcond103.not, label %._crit_edge57, label %.lr.ph56.split.us.split.split.us, !llvm.loop !9

.lr.ph56.split.us.split.split:                    ; preds = %.lr.ph56.split.us.split, %.lr.ph56.split.us.split.split
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %.lr.ph56.split.us.split.split ], [ 0, %.lr.ph56.split.us.split ]
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %41 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next93
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv92) #4
  store i32 %42, ptr %43, align 4, !tbaa !5
  %44 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.next93
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds double, ptr %3, i64 %46
  %48 = load double, ptr %47, align 8, !tbaa !11
  %49 = getelementptr inbounds double, ptr %6, i64 %indvars.iv92
  store double %48, ptr %49, align 8, !tbaa !11
  %50 = getelementptr inbounds double, ptr %4, i64 %46
  %51 = load double, ptr %50, align 8, !tbaa !11
  %52 = getelementptr inbounds double, ptr %7, i64 %indvars.iv92
  store double %51, ptr %52, align 8, !tbaa !11
  %exitcond97.not = icmp eq i64 %indvars.iv.next93, %wide.trip.count114
  br i1 %exitcond97.not, label %._crit_edge57, label %.lr.ph56.split.us.split.split, !llvm.loop !9

.lr.ph56.split:                                   ; preds = %.lr.ph56
  br i1 %.not52, label %.lr.ph56.split.split.us, label %.lr.ph56.split.split

.lr.ph56.split.split.us:                          ; preds = %.lr.ph56.split
  br i1 %.not53, label %.lr.ph56.split.split.us.split.us, label %.lr.ph56.split.split.us.split

.lr.ph56.split.split.us.split.us:                 ; preds = %.lr.ph56.split.split.us, %.lr.ph56.split.split.us.split.us
  %indvars.iv86 = phi i64 [ %indvars.iv.next87, %.lr.ph56.split.split.us.split.us ], [ 0, %.lr.ph56.split.split.us ]
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %53 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next87
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv86) #4
  store i32 %54, ptr %55, align 4, !tbaa !5
  %56 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.next87
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds double, ptr %2, i64 %58
  %60 = load double, ptr %59, align 8, !tbaa !11
  %61 = getelementptr inbounds double, ptr %5, i64 %indvars.iv86
  store double %60, ptr %61, align 8, !tbaa !11
  %exitcond91.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count114
  br i1 %exitcond91.not, label %._crit_edge57, label %.lr.ph56.split.split.us.split.us, !llvm.loop !9

.lr.ph56.split.split.us.split:                    ; preds = %.lr.ph56.split.split.us, %.lr.ph56.split.split.us.split
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %.lr.ph56.split.split.us.split ], [ 0, %.lr.ph56.split.split.us ]
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %62 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next81
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv80) #4
  store i32 %63, ptr %64, align 4, !tbaa !5
  %65 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.next81
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds double, ptr %2, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !11
  %70 = getelementptr inbounds double, ptr %5, i64 %indvars.iv80
  store double %69, ptr %70, align 8, !tbaa !11
  %71 = getelementptr inbounds double, ptr %4, i64 %67
  %72 = load double, ptr %71, align 8, !tbaa !11
  %73 = getelementptr inbounds double, ptr %7, i64 %indvars.iv80
  store double %72, ptr %73, align 8, !tbaa !11
  %exitcond85.not = icmp eq i64 %indvars.iv.next81, %wide.trip.count114
  br i1 %exitcond85.not, label %._crit_edge57, label %.lr.ph56.split.split.us.split, !llvm.loop !9

.lr.ph56.split.split:                             ; preds = %.lr.ph56.split
  br i1 %.not53, label %.lr.ph56.split.split.split.us, label %.lr.ph56.split.split.split

.lr.ph56.split.split.split.us:                    ; preds = %.lr.ph56.split.split, %.lr.ph56.split.split.split.us
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %.lr.ph56.split.split.split.us ], [ 0, %.lr.ph56.split.split ]
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %74 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next75
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv74) #4
  store i32 %75, ptr %76, align 4, !tbaa !5
  %77 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.next75
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds double, ptr %2, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !11
  %82 = getelementptr inbounds double, ptr %5, i64 %indvars.iv74
  store double %81, ptr %82, align 8, !tbaa !11
  %83 = getelementptr inbounds double, ptr %3, i64 %79
  %84 = load double, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds double, ptr %6, i64 %indvars.iv74
  store double %84, ptr %85, align 8, !tbaa !11
  %exitcond79.not = icmp eq i64 %indvars.iv.next75, %wide.trip.count114
  br i1 %exitcond79.not, label %._crit_edge57, label %.lr.ph56.split.split.split.us, !llvm.loop !9

86:                                               ; preds = %14
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  br label %114

88:                                               ; preds = %17
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  br label %113

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #4
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %92 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next
  store i32 %91, ptr %92, align 4, !tbaa !5
  %93 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.next
  %94 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %94, ptr %93, align 4, !tbaa !5
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

._crit_edge57:                                    ; preds = %.lr.ph56.split.split.split, %.lr.ph56.split.split.split.us, %.lr.ph56.split.split.us.split, %.lr.ph56.split.split.us.split.us, %.lr.ph56.split.us.split.split, %.lr.ph56.split.us.split.split.us, %.lr.ph56.split.us.split.us.split, %.lr.ph56.split.us.split.us.split.us
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  br label %112

95:                                               ; preds = %._crit_edge
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  br label %113

.lr.ph56.split.split.split:                       ; preds = %.lr.ph56.split.split, %.lr.ph56.split.split.split
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %.lr.ph56.split.split.split ], [ 0, %.lr.ph56.split.split ]
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %97 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next70
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv69) #4
  store i32 %98, ptr %99, align 4, !tbaa !5
  %100 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.next70
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds double, ptr %2, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !11
  %105 = getelementptr inbounds double, ptr %5, i64 %indvars.iv69
  store double %104, ptr %105, align 8, !tbaa !11
  %106 = getelementptr inbounds double, ptr %3, i64 %102
  %107 = load double, ptr %106, align 8, !tbaa !11
  %108 = getelementptr inbounds double, ptr %6, i64 %indvars.iv69
  store double %107, ptr %108, align 8, !tbaa !11
  %109 = getelementptr inbounds double, ptr %4, i64 %102
  %110 = load double, ptr %109, align 8, !tbaa !11
  %111 = getelementptr inbounds double, ptr %7, i64 %indvars.iv69
  store double %110, ptr %111, align 8, !tbaa !11
  %exitcond73.not = icmp eq i64 %indvars.iv.next70, %wide.trip.count114
  br i1 %exitcond73.not, label %._crit_edge57, label %.lr.ph56.split.split.split, !llvm.loop !9

112:                                              ; preds = %8, %._crit_edge57
  ret void

113:                                              ; preds = %95, %88
  %.pn = phi { ptr, i32 } [ %96, %95 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  br label %114

114:                                              ; preds = %113, %86
  %.pn.pn = phi { ptr, i32 } [ %.pn, %113 ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #3

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

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

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


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