; LLVM IR from ERGO-Code/HiGHS :: src/ipm/basiclu (lu_factorize_bump)

; 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.lu = type { i32, i32, i32, double, double, double, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.lu_factorize_bump = external hidden unnamed_addr constant [38 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @lu_factorize_bump(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.lu, ptr %9, i32 0, i32 13
  %11 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %11, ptr %3, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.lu, ptr %12, i32 0, i32 77
  %14 = load ptr, ptr %13, align 8, !tbaa !14
  store ptr %14, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.lu, ptr %15, i32 0, i32 79
  %17 = load ptr, ptr %16, align 8, !tbaa !15
  store ptr %17, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.lu, ptr %18, i32 0, i32 94
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  store ptr %20, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.lu, ptr %21, i32 0, i32 96
  %23 = load ptr, ptr %22, align 8, !tbaa !17
  store ptr %23, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !13
  br label %24

24:                                               ; preds = %121, %1
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.lu, ptr %25, i32 0, i32 50
  %27 = load i32, ptr %26, align 4, !tbaa !18
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 68
  %30 = load i32, ptr %29, align 4, !tbaa !19
  %31 = add nsw i32 %27, %30
  %32 = load i32, ptr %3, align 4, !tbaa !13
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %34, label %122

34:                                               ; preds = %24
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.lu, ptr %35, i32 0, i32 63
  %37 = load i32, ptr %36, align 8, !tbaa !20
  %38 = icmp slt i32 %37, 0
  br i1 %38, label %39, label %42

39:                                               ; preds = %34
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = call i32 @lu_markowitz(ptr noundef %40)
  br label %42

42:                                               ; preds = %39, %34
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.lu, ptr %43, i32 0, i32 63
  %45 = load i32, ptr %44, align 8, !tbaa !20
  %46 = icmp sge i32 %45, 0
  br i1 %46, label %47, label %48

47:                                               ; preds = %42
  br label %49

48:                                               ; preds = %42
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 31, ptr noundef @__PRETTY_FUNCTION__.lu_factorize_bump) #6
  unreachable

49:                                               ; preds = %47
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.lu, ptr %50, i32 0, i32 62
  %52 = load i32, ptr %51, align 4, !tbaa !21
  %53 = icmp slt i32 %52, 0
  br i1 %53, label %54, label %66

54:                                               ; preds = %49
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.lu, ptr %57, i32 0, i32 63
  %59 = load i32, ptr %58, align 8, !tbaa !20
  call void @lu_list_remove(ptr noundef %55, ptr noundef %56, i32 noundef %59)
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.lu, ptr %60, i32 0, i32 63
  store i32 -1, ptr %61, align 8, !tbaa !20
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.lu, ptr %62, i32 0, i32 68
  %64 = load i32, ptr %63, align 4, !tbaa !19
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %63, align 4, !tbaa !19
  br label %121

66:                                               ; preds = %49
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.lu, ptr %68, i32 0, i32 62
  %70 = load i32, ptr %69, align 4, !tbaa !21
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %67, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !13
  %74 = icmp eq i32 %73, -1
  br i1 %74, label %75, label %76

75:                                               ; preds = %66
  br label %77

76:                                               ; preds = %66
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 43, ptr noundef @__PRETTY_FUNCTION__.lu_factorize_bump) #6
  unreachable

77:                                               ; preds = %75
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.lu, ptr %79, i32 0, i32 63
  %81 = load i32, ptr %80, align 8, !tbaa !20
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %78, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !13
  %85 = icmp eq i32 %84, -1
  br i1 %85, label %86, label %87

86:                                               ; preds = %77
  br label %88

87:                                               ; preds = %77
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 44, ptr noundef @__PRETTY_FUNCTION__.lu_factorize_bump) #6
  unreachable

88:                                               ; preds = %86
  %89 = load ptr, ptr %2, align 8, !tbaa !5
  %90 = call i32 @lu_pivot(ptr noundef %89)
  store i32 %90, ptr %8, align 4, !tbaa !13
  %91 = load i32, ptr %8, align 4, !tbaa !13
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %94

93:                                               ; preds = %88
  br label %122

94:                                               ; preds = %88
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.lu, ptr %95, i32 0, i32 50
  %97 = load i32, ptr %96, align 4, !tbaa !18
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.lu, ptr %99, i32 0, i32 62
  %101 = load i32, ptr %100, align 4, !tbaa !21
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i32, ptr %98, i64 %102
  store i32 %97, ptr %103, align 4, !tbaa !13
  %104 = load ptr, ptr %2, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.lu, ptr %104, i32 0, i32 50
  %106 = load i32, ptr %105, align 4, !tbaa !18
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = load ptr, ptr %2, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.lu, ptr %108, i32 0, i32 63
  %110 = load i32, ptr %109, align 8, !tbaa !20
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %107, i64 %111
  store i32 %106, ptr %112, align 4, !tbaa !13
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.lu, ptr %113, i32 0, i32 63
  store i32 -1, ptr %114, align 8, !tbaa !20
  %115 = load ptr, ptr %2, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.lu, ptr %115, i32 0, i32 62
  store i32 -1, ptr %116, align 4, !tbaa !21
  %117 = load ptr, ptr %2, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.lu, ptr %117, i32 0, i32 50
  %119 = load i32, ptr %118, align 4, !tbaa !18
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %118, align 4, !tbaa !18
  br label %121

121:                                              ; preds = %94, %54
  br label %24, !llvm.loop !22

122:                                              ; preds = %93, %24
  %123 = load i32, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret i32 %123
}

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

declare i32 @lu_markowitz(ptr noundef) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @lu_list_remove(ptr noundef, ptr noundef, i32 noundef) #4

declare i32 @lu_pivot(ptr noundef) #2

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

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { noreturn nounwind "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 #4 = { inlinehint 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 #5 = { nounwind }
attributes #6 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !11, i64 84}
!10 = !{!"lu", !11, i64 0, !11, i64 4, !11, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !11, i64 224, !11, i64 228, !11, i64 232, !12, i64 240, !12, i64 248, !12, i64 256, !12, i64 264, !12, i64 272, !12, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !11, i64 312, !11, i64 316, !11, i64 320, !11, i64 324, !11, i64 328, !11, i64 332, !11, i64 336, !11, i64 340, !12, i64 344, !12, i64 352, !12, i64 360, !12, i64 368, !11, i64 376, !11, i64 380, !11, i64 384, !11, i64 388, !11, i64 392, !11, i64 396, !11, i64 400, !11, i64 404, !11, i64 408, !11, i64 412, !6, i64 416, !6, i64 424, !6, i64 432, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584, !6, i64 592, !6, i64 600, !6, i64 608, !6, i64 616, !6, i64 624, !6, i64 632, !6, i64 640, !6, i64 648, !6, i64 656, !6, i64 664, !6, i64 672, !6, i64 680, !6, i64 688}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !6, i64 464}
!15 = !{!10, !6, i64 480}
!16 = !{!10, !6, i64 600}
!17 = !{!10, !6, i64 616}
!18 = !{!10, !11, i64 316}
!19 = !{!10, !11, i64 404}
!20 = !{!10, !11, i64 384}
!21 = !{!10, !11, i64 380}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.lu_factorize_bump = external hidden unnamed_addr constant [38 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @lu_factorize_bump(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 84
  %3 = load i32, ptr %2, align 4, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 464
  %5 = load ptr, ptr %4, align 8, !tbaa !12
  %6 = getelementptr inbounds i8, ptr %0, i64 480
  %7 = load ptr, ptr %6, align 8, !tbaa !13
  %8 = getelementptr inbounds i8, ptr %0, i64 600
  %9 = load ptr, ptr %8, align 8, !tbaa !14
  %10 = getelementptr inbounds i8, ptr %0, i64 616
  %11 = load ptr, ptr %10, align 8, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %0, i64 316
  %13 = getelementptr inbounds i8, ptr %0, i64 404
  %14 = load i32, ptr %12, align 4, !tbaa !16
  %15 = load i32, ptr %13, align 4, !tbaa !17
  %16 = add nsw i32 %15, %14
  %17 = icmp slt i32 %16, %3
  br i1 %17, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %18 = getelementptr inbounds i8, ptr %0, i64 384
  %19 = getelementptr inbounds i8, ptr %0, i64 380
  %.pre = load i32, ptr %18, align 8, !tbaa !18
  %20 = icmp slt i32 %.pre, 0
  br i1 %20, label %21, label %.thread.peel

21:                                               ; preds = %.lr.ph
  %22 = tail call i32 @lu_markowitz(ptr noundef nonnull %0) #4
  %.pr.peel = load i32, ptr %18, align 8, !tbaa !18
  %23 = icmp sgt i32 %.pr.peel, -1
  br i1 %23, label %.thread.peel, label %.loopexit

.thread.peel:                                     ; preds = %21, %.lr.ph
  %24 = phi i32 [ %.pr.peel, %21 ], [ %.pre, %.lr.ph ]
  %25 = load i32, ptr %19, align 4, !tbaa !19
  %26 = icmp slt i32 %25, 0
  br i1 %26, label %49, label %27

27:                                               ; preds = %.thread.peel
  %28 = zext nneg i32 %25 to i64
  %29 = getelementptr inbounds i32, ptr %9, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !20
  %31 = icmp eq i32 %30, -1
  br i1 %31, label %32, label %.loopexit41

32:                                               ; preds = %27
  %33 = zext nneg i32 %24 to i64
  %34 = getelementptr inbounds i32, ptr %11, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !20
  %36 = icmp eq i32 %35, -1
  br i1 %36, label %37, label %.loopexit42

37:                                               ; preds = %32
  %38 = tail call i32 @lu_pivot(ptr noundef nonnull %0) #4
  %.not.peel = icmp eq i32 %38, 0
  br i1 %.not.peel, label %39, label %._crit_edge

39:                                               ; preds = %37
  %40 = load i32, ptr %12, align 4, !tbaa !16
  %41 = load i32, ptr %19, align 4, !tbaa !19
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds i32, ptr %9, i64 %42
  store i32 %40, ptr %43, align 4, !tbaa !20
  %44 = load i32, ptr %18, align 8, !tbaa !18
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr %11, i64 %45
  store i32 %40, ptr %46, align 4, !tbaa !20
  store i32 -1, ptr %18, align 8, !tbaa !18
  store i32 -1, ptr %19, align 4, !tbaa !19
  %47 = load i32, ptr %12, align 4, !tbaa !16
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %12, align 4, !tbaa !16
  %.pre39.peel = load i32, ptr %13, align 4, !tbaa !17
  br label %52

49:                                               ; preds = %.thread.peel
  tail call void @lu_list_remove(ptr noundef %5, ptr noundef %7, i32 noundef %24)
  store i32 -1, ptr %18, align 8, !tbaa !18
  %50 = load i32, ptr %13, align 4, !tbaa !17
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %13, align 4, !tbaa !17
  %.pre38.peel = load i32, ptr %12, align 4, !tbaa !16
  br label %52

52:                                               ; preds = %49, %39
  %53 = phi i32 [ %.pre39.peel, %39 ], [ %51, %49 ]
  %54 = phi i32 [ %48, %39 ], [ %.pre38.peel, %49 ]
  %55 = add nsw i32 %53, %54
  %56 = icmp slt i32 %55, %3
  br i1 %56, label %.lr.ph.peel.newph, label %._crit_edge

.lr.ph.peel.newph:                                ; preds = %52, %86
  %57 = tail call i32 @lu_markowitz(ptr noundef nonnull %0) #4
  %.pr = load i32, ptr %18, align 8, !tbaa !18
  %58 = icmp sgt i32 %.pr, -1
  br i1 %58, label %.thread, label %.loopexit

.loopexit:                                        ; preds = %.lr.ph.peel.newph, %21
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 31, ptr noundef nonnull @__PRETTY_FUNCTION__.lu_factorize_bump) #5
  unreachable

.thread:                                          ; preds = %.lr.ph.peel.newph
  %59 = load i32, ptr %19, align 4, !tbaa !19
  %60 = icmp slt i32 %59, 0
  br i1 %60, label %61, label %64

61:                                               ; preds = %.thread
  tail call void @lu_list_remove(ptr noundef %5, ptr noundef %7, i32 noundef %.pr)
  store i32 -1, ptr %18, align 8, !tbaa !18
  %62 = load i32, ptr %13, align 4, !tbaa !17
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %13, align 4, !tbaa !17
  %.pre38 = load i32, ptr %12, align 4, !tbaa !16
  br label %86

64:                                               ; preds = %.thread
  %65 = zext nneg i32 %59 to i64
  %66 = getelementptr inbounds i32, ptr %9, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !20
  %68 = icmp eq i32 %67, -1
  br i1 %68, label %69, label %.loopexit41

.loopexit41:                                      ; preds = %64, %27
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 43, ptr noundef nonnull @__PRETTY_FUNCTION__.lu_factorize_bump) #5
  unreachable

69:                                               ; preds = %64
  %70 = zext nneg i32 %.pr to i64
  %71 = getelementptr inbounds i32, ptr %11, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !20
  %73 = icmp eq i32 %72, -1
  br i1 %73, label %74, label %.loopexit42

.loopexit42:                                      ; preds = %69, %32
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 44, ptr noundef nonnull @__PRETTY_FUNCTION__.lu_factorize_bump) #5
  unreachable

74:                                               ; preds = %69
  %75 = tail call i32 @lu_pivot(ptr noundef nonnull %0) #4
  %.not = icmp eq i32 %75, 0
  br i1 %.not, label %76, label %._crit_edge

76:                                               ; preds = %74
  %77 = load i32, ptr %12, align 4, !tbaa !16
  %78 = load i32, ptr %19, align 4, !tbaa !19
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %9, i64 %79
  store i32 %77, ptr %80, align 4, !tbaa !20
  %81 = load i32, ptr %18, align 8, !tbaa !18
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %11, i64 %82
  store i32 %77, ptr %83, align 4, !tbaa !20
  store i32 -1, ptr %18, align 8, !tbaa !18
  store i32 -1, ptr %19, align 4, !tbaa !19
  %84 = load i32, ptr %12, align 4, !tbaa !16
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %12, align 4, !tbaa !16
  %.pre39 = load i32, ptr %13, align 4, !tbaa !17
  br label %86

86:                                               ; preds = %76, %61
  %87 = phi i32 [ %.pre39, %76 ], [ %63, %61 ]
  %88 = phi i32 [ %85, %76 ], [ %.pre38, %61 ]
  %89 = add nsw i32 %87, %88
  %90 = icmp slt i32 %89, %3
  br i1 %90, label %.lr.ph.peel.newph, label %._crit_edge, !llvm.loop !21

._crit_edge:                                      ; preds = %37, %52, %86, %74, %1
  %.2 = phi i32 [ 0, %1 ], [ %38, %37 ], [ 0, %52 ], [ 0, %86 ], [ %75, %74 ]
  ret i32 %.2
}

declare i32 @lu_markowitz(ptr noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @lu_list_remove(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @lu_pivot(ptr noundef) local_unnamed_addr #1

attributes #0 = { 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 = { "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 = { noreturn nounwind "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 = { inlinehint 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 #4 = { nounwind }
attributes #5 = { noreturn 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 84}
!6 = !{!"lu", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !7, i64 44, !7, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !7, i64 224, !7, i64 228, !7, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !7, i64 312, !7, i64 316, !7, i64 320, !7, i64 324, !7, i64 328, !7, i64 332, !7, i64 336, !7, i64 340, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !7, i64 376, !7, i64 380, !7, i64 384, !7, i64 388, !7, i64 392, !7, i64 396, !7, i64 400, !7, i64 404, !7, i64 408, !7, i64 412, !11, i64 416, !11, i64 424, !11, i64 432, !11, i64 440, !11, i64 448, !11, i64 456, !11, i64 464, !11, i64 472, !11, i64 480, !11, i64 488, !11, i64 496, !11, i64 504, !11, i64 512, !11, i64 520, !11, i64 528, !11, i64 536, !11, i64 544, !11, i64 552, !11, i64 560, !11, i64 568, !11, i64 576, !11, i64 584, !11, i64 592, !11, i64 600, !11, i64 608, !11, i64 616, !11, i64 624, !11, i64 632, !11, i64 640, !11, i64 648, !11, i64 656, !11, i64 664, !11, i64 672, !11, i64 680, !11, i64 688}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !11, i64 464}
!13 = !{!6, !11, i64 480}
!14 = !{!6, !11, i64 600}
!15 = !{!6, !11, i64 616}
!16 = !{!6, !7, i64 316}
!17 = !{!6, !7, i64 404}
!18 = !{!6, !7, i64 384}
!19 = !{!6, !7, i64 380}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22, !23}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!"llvm.loop.peeled.count", i32 1}


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