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

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

%struct.HighsIndexCollection = type { i32, i8, i32, i32, i8, i32, %"class.std::vector", i8, %"class.std::vector" }
%"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 }

; 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 nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z16updateOutInIndexRK20HighsIndexCollectionRiS2_S2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5) #1 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.HighsIndexCollection, ptr %19, i32 0, i32 1
  %21 = load i8, ptr %20, align 4, !tbaa !9, !range !17, !noundef !18
  %22 = trunc i8 %21 to i1
  br i1 %22, label %23, label %42

23:                                               ; preds = %6
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.HighsIndexCollection, ptr %24, i32 0, i32 2
  %26 = load i32, ptr %25, align 8, !tbaa !19
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %26, ptr %27, align 4, !tbaa !20
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.HighsIndexCollection, ptr %28, i32 0, i32 3
  %30 = load i32, ptr %29, align 4, !tbaa !21
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %30, ptr %31, align 4, !tbaa !20
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.HighsIndexCollection, ptr %32, i32 0, i32 3
  %34 = load i32, ptr %33, align 4, !tbaa !21
  %35 = add nsw i32 %34, 1
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 %35, ptr %36, align 4, !tbaa !20
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.HighsIndexCollection, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !22
  %40 = sub nsw i32 %39, 1
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %40, ptr %41, align 4, !tbaa !20
  br label %208

42:                                               ; preds = %6
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.HighsIndexCollection, ptr %43, i32 0, i32 4
  %45 = load i8, ptr %44, align 8, !tbaa !23, !range !17, !noundef !18
  %46 = trunc i8 %45 to i1
  br i1 %46, label %47, label %132

47:                                               ; preds = %42
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.HighsIndexCollection, ptr %48, i32 0, i32 6
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  %51 = load i32, ptr %50, align 4, !tbaa !20
  %52 = sext i32 %51 to i64
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %52) #2
  %54 = load i32, ptr %53, align 4, !tbaa !20
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %54, ptr %55, align 4, !tbaa !20
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = load i32, ptr %56, align 4, !tbaa !20
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %57, ptr %58, align 4, !tbaa !20
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  %60 = load i32, ptr %59, align 4, !tbaa !20
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %59, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #2
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = load i32, ptr %62, align 4, !tbaa !20
  store i32 %63, ptr %13, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  %64 = load i32, ptr %13, align 4, !tbaa !20
  store i32 %64, ptr %14, align 4, !tbaa !20
  br label %65

65:                                               ; preds = %100, %47
  %66 = load i32, ptr %14, align 4, !tbaa !20
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.HighsIndexCollection, ptr %67, i32 0, i32 5
  %69 = load i32, ptr %68, align 4, !tbaa !24
  %70 = icmp slt i32 %66, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %65
  store i32 2, ptr %15, align 4
  br label %103

72:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #2
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.HighsIndexCollection, ptr %73, i32 0, i32 6
  %75 = load i32, ptr %14, align 4, !tbaa !20
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %76) #2
  %78 = load i32, ptr %77, align 4, !tbaa !20
  store i32 %78, ptr %16, align 4, !tbaa !20
  %79 = load i32, ptr %16, align 4, !tbaa !20
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = load i32, ptr %80, align 4, !tbaa !20
  %82 = add nsw i32 %81, 1
  %83 = icmp sgt i32 %79, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %72
  store i32 2, ptr %15, align 4
  br label %97

85:                                               ; preds = %72
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.HighsIndexCollection, ptr %86, i32 0, i32 6
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  %89 = load i32, ptr %88, align 4, !tbaa !20
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %90) #2
  %92 = load i32, ptr %91, align 4, !tbaa !20
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %92, ptr %93, align 4, !tbaa !20
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = load i32, ptr %94, align 4, !tbaa !20
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %94, align 4, !tbaa !20
  store i32 0, ptr %15, align 4
  br label %97

97:                                               ; preds = %85, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  %98 = load i32, ptr %15, align 4
  switch i32 %98, label %103 [
    i32 0, label %99
  ]

99:                                               ; preds = %97
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %14, align 4, !tbaa !20
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %14, align 4, !tbaa !20
  br label %65, !llvm.loop !25

103:                                              ; preds = %97, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  br label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = load i32, ptr %105, align 4, !tbaa !20
  %107 = add nsw i32 %106, 1
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 %107, ptr %108, align 4, !tbaa !20
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = load i32, ptr %109, align 4, !tbaa !20
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.HighsIndexCollection, ptr %111, i32 0, i32 5
  %113 = load i32, ptr %112, align 4, !tbaa !24
  %114 = icmp slt i32 %110, %113
  br i1 %114, label %115, label %125

115:                                              ; preds = %104
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.HighsIndexCollection, ptr %116, i32 0, i32 6
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  %119 = load i32, ptr %118, align 4, !tbaa !20
  %120 = sext i32 %119 to i64
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef %120) #2
  %122 = load i32, ptr %121, align 4, !tbaa !20
  %123 = sub nsw i32 %122, 1
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %123, ptr %124, align 4, !tbaa !20
  br label %131

125:                                              ; preds = %104
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.HighsIndexCollection, ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 8, !tbaa !22
  %129 = sub nsw i32 %128, 1
  %130 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %129, ptr %130, align 4, !tbaa !20
  br label %131

131:                                              ; preds = %125, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #2
  br label %207

132:                                              ; preds = %42
  %133 = load ptr, ptr %11, align 8, !tbaa !5
  %134 = load i32, ptr %133, align 4, !tbaa !20
  %135 = add nsw i32 %134, 1
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %135, ptr %136, align 4, !tbaa !20
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.HighsIndexCollection, ptr %137, i32 0, i32 0
  %139 = load i32, ptr %138, align 8, !tbaa !22
  %140 = sub nsw i32 %139, 1
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %140, ptr %141, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #2
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = load i32, ptr %142, align 4, !tbaa !20
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %17, align 4, !tbaa !20
  br label %145

145:                                              ; preds = %165, %132
  %146 = load i32, ptr %17, align 4, !tbaa !20
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.HighsIndexCollection, ptr %147, i32 0, i32 0
  %149 = load i32, ptr %148, align 8, !tbaa !22
  %150 = icmp slt i32 %146, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %145
  store i32 5, ptr %15, align 4
  br label %168

152:                                              ; preds = %145
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.HighsIndexCollection, ptr %153, i32 0, i32 8
  %155 = load i32, ptr %17, align 4, !tbaa !20
  %156 = sext i32 %155 to i64
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %154, i64 noundef %156) #2
  %158 = load i32, ptr %157, align 4, !tbaa !20
  %159 = icmp ne i32 %158, 0
  br i1 %159, label %164, label %160

160:                                              ; preds = %152
  %161 = load i32, ptr %17, align 4, !tbaa !20
  %162 = sub nsw i32 %161, 1
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %162, ptr %163, align 4, !tbaa !20
  store i32 5, ptr %15, align 4
  br label %168

164:                                              ; preds = %152
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %17, align 4, !tbaa !20
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %17, align 4, !tbaa !20
  br label %145, !llvm.loop !27

168:                                              ; preds = %160, %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  br label %169

169:                                              ; preds = %168
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = load i32, ptr %170, align 4, !tbaa !20
  %172 = add nsw i32 %171, 1
  %173 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 %172, ptr %173, align 4, !tbaa !20
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.HighsIndexCollection, ptr %174, i32 0, i32 0
  %176 = load i32, ptr %175, align 8, !tbaa !22
  %177 = sub nsw i32 %176, 1
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %177, ptr %178, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #2
  %179 = load ptr, ptr %9, align 8, !tbaa !5
  %180 = load i32, ptr %179, align 4, !tbaa !20
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %18, align 4, !tbaa !20
  br label %182

182:                                              ; preds = %202, %169
  %183 = load i32, ptr %18, align 4, !tbaa !20
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.HighsIndexCollection, ptr %184, i32 0, i32 0
  %186 = load i32, ptr %185, align 8, !tbaa !22
  %187 = icmp slt i32 %183, %186
  br i1 %187, label %189, label %188

188:                                              ; preds = %182
  store i32 8, ptr %15, align 4
  br label %205

189:                                              ; preds = %182
  %190 = load ptr, ptr %7, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.HighsIndexCollection, ptr %190, i32 0, i32 8
  %192 = load i32, ptr %18, align 4, !tbaa !20
  %193 = sext i32 %192 to i64
  %194 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %191, i64 noundef %193) #2
  %195 = load i32, ptr %194, align 4, !tbaa !20
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %197, label %201

197:                                              ; preds = %189
  %198 = load i32, ptr %18, align 4, !tbaa !20
  %199 = sub nsw i32 %198, 1
  %200 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %199, ptr %200, align 4, !tbaa !20
  store i32 8, ptr %15, align 4
  br label %205

201:                                              ; preds = %189
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %18, align 4, !tbaa !20
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %18, align 4, !tbaa !20
  br label %182, !llvm.loop !28

205:                                              ; preds = %197, %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #2
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206, %131
  br label %208

208:                                              ; preds = %207, %23
  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 = { 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, !12, i64 4}
!10 = !{!"_ZTS20HighsIndexCollection", !11, i64 0, !12, i64 4, !11, i64 8, !11, i64 12, !12, i64 16, !11, i64 20, !13, i64 24, !12, i64 48, !13, i64 56}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!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 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!10, !11, i64 8}
!20 = !{!11, !11, i64 0}
!21 = !{!10, !11, i64 12}
!22 = !{!10, !11, i64 0}
!23 = !{!10, !12, i64 16}
!24 = !{!10, !11, i64 20}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = distinct !{!28, !26}


; 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 nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z16updateOutInIndexRK20HighsIndexCollectionRiS2_S2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %1, ptr nocapture noundef nonnull align 4 dereferenceable(4) %2, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %3, ptr nocapture noundef nonnull align 4 dereferenceable(4) %4, ptr nocapture noundef nonnull align 4 dereferenceable(4) %5) local_unnamed_addr #0 {
  %7 = getelementptr inbounds i8, ptr %0, i64 4
  %8 = load i8, ptr %7, align 4, !tbaa !5, !range !16, !noundef !17
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %10, label %18

10:                                               ; preds = %6
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load i32, ptr %11, align 8, !tbaa !18
  store i32 %12, ptr %1, align 4, !tbaa !19
  %13 = getelementptr inbounds i8, ptr %0, i64 12
  %14 = load i32, ptr %13, align 4, !tbaa !20
  store i32 %14, ptr %2, align 4, !tbaa !19
  %15 = add nsw i32 %14, 1
  store i32 %15, ptr %3, align 4, !tbaa !19
  %16 = load i32, ptr %0, align 8, !tbaa !21
  %17 = add nsw i32 %16, -1
  br label %.loopexit.sink.split

18:                                               ; preds = %6
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = load i8, ptr %19, align 8, !tbaa !22, !range !16, !noundef !17
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %22, label %58

22:                                               ; preds = %18
  %23 = getelementptr inbounds i8, ptr %0, i64 24
  %24 = load i32, ptr %5, align 4, !tbaa !19
  %25 = sext i32 %24 to i64
  %26 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %25) #1
  %27 = load i32, ptr %26, align 4, !tbaa !19
  store i32 %27, ptr %1, align 4, !tbaa !19
  store i32 %27, ptr %2, align 4, !tbaa !19
  %28 = load i32, ptr %5, align 4, !tbaa !19
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %5, align 4, !tbaa !19
  %30 = getelementptr inbounds i8, ptr %0, i64 20
  %31 = load i32, ptr %30, align 4, !tbaa !23
  %32 = icmp slt i32 %29, %31
  br i1 %32, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %22
  %33 = sext i32 %28 to i64
  %34 = add nsw i64 %33, 1
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %39
  %indvars.iv79 = phi i64 [ %34, %.lr.ph.preheader ], [ %indvars.iv.next80, %39 ]
  %35 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %indvars.iv79) #1
  %36 = load i32, ptr %35, align 4, !tbaa !19
  %37 = load i32, ptr %2, align 4, !tbaa !19
  %38 = add nsw i32 %37, 1
  %.not67 = icmp sgt i32 %36, %38
  br i1 %.not67, label %.critedge, label %39

39:                                               ; preds = %.lr.ph
  %40 = load i32, ptr %5, align 4, !tbaa !19
  %41 = sext i32 %40 to i64
  %42 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %41) #1
  %43 = load i32, ptr %42, align 4, !tbaa !19
  store i32 %43, ptr %2, align 4, !tbaa !19
  %44 = load i32, ptr %5, align 4, !tbaa !19
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %5, align 4, !tbaa !19
  %indvars.iv.next80 = add nsw i64 %indvars.iv79, 1
  %46 = load i32, ptr %30, align 4, !tbaa !23
  %47 = sext i32 %46 to i64
  %48 = icmp slt i64 %indvars.iv.next80, %47
  br i1 %48, label %.lr.ph, label %.critedge, !llvm.loop !24

.critedge:                                        ; preds = %39, %.lr.ph, %22
  %49 = load i32, ptr %2, align 4, !tbaa !19
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %3, align 4, !tbaa !19
  %51 = load i32, ptr %5, align 4, !tbaa !19
  %52 = load i32, ptr %30, align 4, !tbaa !23
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %54, label %57

54:                                               ; preds = %.critedge
  %55 = sext i32 %51 to i64
  %56 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %55) #1
  br label %57

57:                                               ; preds = %.critedge, %54
  %storemerge.in.in = phi ptr [ %56, %54 ], [ %0, %.critedge ]
  %storemerge.in = load i32, ptr %storemerge.in.in, align 4, !tbaa !19
  %storemerge = add nsw i32 %storemerge.in, -1
  br label %.loopexit.sink.split

58:                                               ; preds = %18
  %59 = load i32, ptr %4, align 4, !tbaa !19
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %1, align 4, !tbaa !19
  %61 = load i32, ptr %0, align 8, !tbaa !21
  %62 = add nsw i32 %61, -1
  store i32 %62, ptr %2, align 4, !tbaa !19
  %63 = load i32, ptr %4, align 4, !tbaa !19
  %64 = getelementptr inbounds i8, ptr %0, i64 56
  %65 = sext i32 %63 to i64
  br label %66

66:                                               ; preds = %70, %58
  %indvars.iv = phi i64 [ %indvars.iv.next, %70 ], [ %65, %58 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %67 = load i32, ptr %0, align 8, !tbaa !21
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %indvars.iv.next, %68
  br i1 %69, label %70, label %.loopexit68.loopexit

70:                                               ; preds = %66
  %71 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %indvars.iv.next) #1
  %72 = load i32, ptr %71, align 4, !tbaa !19
  %.not = icmp eq i32 %72, 0
  br i1 %.not, label %73, label %66, !llvm.loop !26

73:                                               ; preds = %70
  %74 = trunc nsw i64 %indvars.iv to i32
  store i32 %74, ptr %2, align 4, !tbaa !19
  br label %.loopexit68

.loopexit68.loopexit:                             ; preds = %66
  %.pre = load i32, ptr %2, align 4, !tbaa !19
  br label %.loopexit68

.loopexit68:                                      ; preds = %.loopexit68.loopexit, %73
  %75 = phi i32 [ %.pre, %.loopexit68.loopexit ], [ %74, %73 ]
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %3, align 4, !tbaa !19
  %77 = load i32, ptr %0, align 8, !tbaa !21
  %78 = add nsw i32 %77, -1
  store i32 %78, ptr %4, align 4, !tbaa !19
  %79 = load i32, ptr %2, align 4, !tbaa !19
  %80 = sext i32 %79 to i64
  br label %81

81:                                               ; preds = %85, %.loopexit68
  %indvars.iv76 = phi i64 [ %indvars.iv.next77, %85 ], [ %80, %.loopexit68 ]
  %indvars.iv.next77 = add nsw i64 %indvars.iv76, 1
  %82 = load i32, ptr %0, align 8, !tbaa !21
  %83 = sext i32 %82 to i64
  %84 = icmp slt i64 %indvars.iv.next77, %83
  br i1 %84, label %85, label %.loopexit

85:                                               ; preds = %81
  %86 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %indvars.iv.next77) #1
  %87 = load i32, ptr %86, align 4, !tbaa !19
  %.not66 = icmp eq i32 %87, 0
  br i1 %.not66, label %81, label %88, !llvm.loop !27

88:                                               ; preds = %85
  %89 = trunc nsw i64 %indvars.iv76 to i32
  br label %.loopexit.sink.split

.loopexit.sink.split:                             ; preds = %10, %57, %88
  %.sink = phi i32 [ %89, %88 ], [ %storemerge, %57 ], [ %17, %10 ]
  store i32 %.sink, ptr %4, align 4, !tbaa !19
  br label %.loopexit

.loopexit:                                        ; preds = %81, %.loopexit.sink.split
  ret void
}

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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 4}
!6 = !{!"_ZTS20HighsIndexCollection", !7, i64 0, !10, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !7, i64 20, !11, i64 24, !10, i64 48, !11, i64 56}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSSt6vectorIiSaIiEE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!6, !7, i64 8}
!19 = !{!7, !7, i64 0}
!20 = !{!6, !7, i64 12}
!21 = !{!6, !7, i64 0}
!22 = !{!6, !10, i64 16}
!23 = !{!6, !7, i64 20}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}


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