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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @basiclu_factorize(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, i32 noundef %12) #0 {
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca %struct.lu, align 8
  %29 = alloca i32, align 4
  %30 = alloca double, align 8
  %31 = alloca i32, align 4
  store ptr %0, ptr %15, align 8, !tbaa !5
  store ptr %1, ptr %16, align 8, !tbaa !5
  store ptr %2, ptr %17, align 8, !tbaa !5
  store ptr %3, ptr %18, align 8, !tbaa !5
  store ptr %4, ptr %19, align 8, !tbaa !5
  store ptr %5, ptr %20, align 8, !tbaa !5
  store ptr %6, ptr %21, align 8, !tbaa !5
  store ptr %7, ptr %22, align 8, !tbaa !5
  store ptr %8, ptr %23, align 8, !tbaa !5
  store ptr %9, ptr %24, align 8, !tbaa !5
  store ptr %10, ptr %25, align 8, !tbaa !5
  store ptr %11, ptr %26, align 8, !tbaa !5
  store i32 %12, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 696, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  %32 = load ptr, ptr %15, align 8, !tbaa !5
  %33 = load ptr, ptr %16, align 8, !tbaa !5
  %34 = load ptr, ptr %17, align 8, !tbaa !5
  %35 = load ptr, ptr %18, align 8, !tbaa !5
  %36 = load ptr, ptr %19, align 8, !tbaa !5
  %37 = load ptr, ptr %20, align 8, !tbaa !5
  %38 = load ptr, ptr %21, align 8, !tbaa !5
  %39 = load ptr, ptr %22, align 8, !tbaa !5
  %40 = call i32 @lu_load(ptr noundef %28, ptr noundef %32, ptr noundef %33, ptr noundef %34, ptr noundef %35, ptr noundef %36, ptr noundef %37, ptr noundef %38, ptr noundef %39)
  store i32 %40, ptr %29, align 4, !tbaa !9
  %41 = load i32, ptr %29, align 4, !tbaa !9
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %45

43:                                               ; preds = %13
  %44 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %44, ptr %14, align 4
  store i32 1, ptr %31, align 4
  br label %213

45:                                               ; preds = %13
  %46 = load ptr, ptr %17, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %75

48:                                               ; preds = %45
  %49 = load ptr, ptr %18, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %75

51:                                               ; preds = %48
  %52 = load ptr, ptr %19, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %75

54:                                               ; preds = %51
  %55 = load ptr, ptr %20, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %75

57:                                               ; preds = %54
  %58 = load ptr, ptr %21, align 8, !tbaa !5
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %75

60:                                               ; preds = %57
  %61 = load ptr, ptr %22, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %75

63:                                               ; preds = %60
  %64 = load ptr, ptr %23, align 8, !tbaa !5
  %65 = icmp ne ptr %64, null
  br i1 %65, label %66, label %75

66:                                               ; preds = %63
  %67 = load ptr, ptr %24, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %75

69:                                               ; preds = %66
  %70 = load ptr, ptr %25, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %75

72:                                               ; preds = %69
  %73 = load ptr, ptr %26, align 8, !tbaa !5
  %74 = icmp ne ptr %73, null
  br i1 %74, label %80, label %75

75:                                               ; preds = %72, %69, %66, %63, %60, %57, %54, %51, %48, %45
  store i32 -3, ptr %29, align 4, !tbaa !9
  %76 = load ptr, ptr %15, align 8, !tbaa !5
  %77 = load ptr, ptr %16, align 8, !tbaa !5
  %78 = load i32, ptr %29, align 4, !tbaa !9
  %79 = call i32 @lu_save(ptr noundef %28, ptr noundef %76, ptr noundef %77, i32 noundef %78)
  store i32 %79, ptr %14, align 4
  store i32 1, ptr %31, align 4
  br label %213

80:                                               ; preds = %72
  %81 = load i32, ptr %27, align 4, !tbaa !9
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %85, label %83

83:                                               ; preds = %80
  call void @lu_reset(ptr noundef %28)
  %84 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 61
  store i32 1, ptr %84, align 8, !tbaa !11
  br label %85

85:                                               ; preds = %83, %80
  %86 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 61
  %87 = load i32, ptr %86, align 8, !tbaa !11
  switch i32 %87, label %92 [
    i32 1, label %88
    i32 2, label %89
    i32 3, label %90
    i32 4, label %91
  ]

88:                                               ; preds = %85
  br label %97

89:                                               ; preds = %85
  br label %108

90:                                               ; preds = %85
  br label %119

91:                                               ; preds = %85
  br label %126

92:                                               ; preds = %85
  store i32 -2, ptr %29, align 4, !tbaa !9
  %93 = load ptr, ptr %15, align 8, !tbaa !5
  %94 = load ptr, ptr %16, align 8, !tbaa !5
  %95 = load i32, ptr %29, align 4, !tbaa !9
  %96 = call i32 @lu_save(ptr noundef %28, ptr noundef %93, ptr noundef %94, i32 noundef %95)
  store i32 %96, ptr %14, align 4
  store i32 1, ptr %31, align 4
  br label %213

97:                                               ; preds = %88
  %98 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 61
  store i32 1, ptr %98, align 8, !tbaa !11
  %99 = load ptr, ptr %23, align 8, !tbaa !5
  %100 = load ptr, ptr %24, align 8, !tbaa !5
  %101 = load ptr, ptr %25, align 8, !tbaa !5
  %102 = load ptr, ptr %26, align 8, !tbaa !5
  %103 = call i32 @lu_singletons(ptr noundef %28, ptr noundef %99, ptr noundef %100, ptr noundef %101, ptr noundef %102)
  store i32 %103, ptr %29, align 4, !tbaa !9
  %104 = load i32, ptr %29, align 4, !tbaa !9
  %105 = icmp ne i32 %104, 0
  br i1 %105, label %106, label %107

106:                                              ; preds = %97
  br label %208

107:                                              ; preds = %97
  br label %108

108:                                              ; preds = %107, %89
  %109 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 61
  store i32 2, ptr %109, align 8, !tbaa !11
  %110 = load ptr, ptr %23, align 8, !tbaa !5
  %111 = load ptr, ptr %24, align 8, !tbaa !5
  %112 = load ptr, ptr %25, align 8, !tbaa !5
  %113 = load ptr, ptr %26, align 8, !tbaa !5
  %114 = call i32 @lu_setup_bump(ptr noundef %28, ptr noundef %110, ptr noundef %111, ptr noundef %112, ptr noundef %113)
  store i32 %114, ptr %29, align 4, !tbaa !9
  %115 = load i32, ptr %29, align 4, !tbaa !9
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %118

117:                                              ; preds = %108
  br label %208

118:                                              ; preds = %108
  br label %119

119:                                              ; preds = %118, %90
  %120 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 61
  store i32 3, ptr %120, align 8, !tbaa !11
  %121 = call i32 @lu_factorize_bump(ptr noundef %28)
  store i32 %121, ptr %29, align 4, !tbaa !9
  %122 = load i32, ptr %29, align 4, !tbaa !9
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %125

124:                                              ; preds = %119
  br label %208

125:                                              ; preds = %119
  br label %126

126:                                              ; preds = %125, %91
  %127 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 61
  store i32 4, ptr %127, align 8, !tbaa !11
  %128 = call i32 @lu_build_factors(ptr noundef %28)
  store i32 %128, ptr %29, align 4, !tbaa !9
  %129 = load i32, ptr %29, align 4, !tbaa !9
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %132

131:                                              ; preds = %126
  br label %208

132:                                              ; preds = %126
  %133 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 61
  store i32 0, ptr %133, align 8, !tbaa !11
  %134 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 17
  store i32 0, ptr %134, align 4, !tbaa !14
  %135 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 64
  store i32 -1, ptr %135, align 4, !tbaa !15
  %136 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 65
  store i32 -1, ptr %136, align 8, !tbaa !16
  %137 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 19
  %138 = load i32, ptr %137, align 4, !tbaa !17
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %137, align 4, !tbaa !17
  %140 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 13
  %141 = load i32, ptr %140, align 4, !tbaa !18
  %142 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 87
  %143 = load ptr, ptr %142, align 8, !tbaa !19
  %144 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 71
  %145 = load ptr, ptr %144, align 8, !tbaa !20
  %146 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 74
  %147 = load ptr, ptr %146, align 8, !tbaa !21
  %148 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 93
  %149 = load ptr, ptr %148, align 8, !tbaa !22
  %150 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 103
  %151 = load ptr, ptr %150, align 8, !tbaa !23
  %152 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 42
  %153 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 44
  %154 = call double @lu_condest(i32 noundef %141, ptr noundef %143, ptr noundef %145, ptr noundef %147, ptr noundef null, ptr noundef %149, i32 noundef 0, ptr noundef %151, ptr noundef %152, ptr noundef %153)
  %155 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 40
  store double %154, ptr %155, align 8, !tbaa !24
  %156 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 13
  %157 = load i32, ptr %156, align 4, !tbaa !18
  %158 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 99
  %159 = load ptr, ptr %158, align 8, !tbaa !25
  %160 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 72
  %161 = load ptr, ptr %160, align 8, !tbaa !26
  %162 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 75
  %163 = load ptr, ptr %162, align 8, !tbaa !27
  %164 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 105
  %165 = load ptr, ptr %164, align 8, !tbaa !28
  %166 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 93
  %167 = load ptr, ptr %166, align 8, !tbaa !22
  %168 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 103
  %169 = load ptr, ptr %168, align 8, !tbaa !23
  %170 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 43
  %171 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 45
  %172 = call double @lu_condest(i32 noundef %157, ptr noundef %159, ptr noundef %161, ptr noundef %163, ptr noundef %165, ptr noundef %167, i32 noundef 1, ptr noundef %169, ptr noundef %170, ptr noundef %171)
  %173 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 41
  store double %172, ptr %173, align 8, !tbaa !29
  %174 = load ptr, ptr %23, align 8, !tbaa !5
  %175 = load ptr, ptr %24, align 8, !tbaa !5
  %176 = load ptr, ptr %25, align 8, !tbaa !5
  %177 = load ptr, ptr %26, align 8, !tbaa !5
  call void @lu_residual_test(ptr noundef %28, ptr noundef %174, ptr noundef %175, ptr noundef %176, ptr noundef %177)
  %178 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 13
  %179 = load i32, ptr %178, align 4, !tbaa !18
  %180 = sitofp i32 %179 to double
  %181 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 49
  %182 = load i32, ptr %181, align 8, !tbaa !30
  %183 = sitofp i32 %182 to double
  %184 = fmul double 7.000000e-02, %183
  %185 = call double @llvm.fmuladd.f64(double 4.000000e-02, double %180, double %184)
  %186 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 52
  %187 = load i32, ptr %186, align 4, !tbaa !31
  %188 = sitofp i32 %187 to double
  %189 = call double @llvm.fmuladd.f64(double 2.000000e-01, double %188, double %185)
  %190 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 53
  %191 = load i32, ptr %190, align 8, !tbaa !32
  %192 = sitofp i32 %191 to double
  %193 = call double @llvm.fmuladd.f64(double 2.000000e-01, double %192, double %189)
  %194 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 56
  %195 = load i32, ptr %194, align 4, !tbaa !33
  %196 = sitofp i32 %195 to double
  %197 = call double @llvm.fmuladd.f64(double 8.000000e-03, double %196, double %193)
  store double %197, ptr %30, align 8, !tbaa !34
  %198 = load double, ptr %30, align 8, !tbaa !34
  %199 = fmul double %198, 2.500000e+02
  %200 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 30
  store double %199, ptr %200, align 8, !tbaa !35
  %201 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 50
  %202 = load i32, ptr %201, align 4, !tbaa !36
  %203 = getelementptr inbounds %struct.lu, ptr %28, i32 0, i32 13
  %204 = load i32, ptr %203, align 4, !tbaa !18
  %205 = icmp slt i32 %202, %204
  br i1 %205, label %206, label %207

206:                                              ; preds = %132
  store i32 2, ptr %29, align 4, !tbaa !9
  br label %207

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

208:                                              ; preds = %207, %131, %124, %117, %106
  %209 = load ptr, ptr %15, align 8, !tbaa !5
  %210 = load ptr, ptr %16, align 8, !tbaa !5
  %211 = load i32, ptr %29, align 4, !tbaa !9
  %212 = call i32 @lu_save(ptr noundef %28, ptr noundef %209, ptr noundef %210, i32 noundef %211)
  store i32 %212, ptr %14, align 4
  store i32 1, ptr %31, align 4
  br label %213

213:                                              ; preds = %208, %92, %75, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 696, ptr %28) #4
  %214 = load i32, ptr %14, align 4
  ret i32 %214
}

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

declare i32 @lu_load(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @lu_save(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

declare void @lu_reset(ptr noundef) #2

declare i32 @lu_singletons(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @lu_setup_bump(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @lu_factorize_bump(ptr noundef) #2

declare i32 @lu_build_factors(ptr noundef) #2

declare double @lu_condest(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @lu_residual_test(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

; 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 376}
!12 = !{!"lu", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !13, i64 216, !10, i64 224, !10, i64 228, !10, i64 232, !13, i64 240, !13, i64 248, !13, i64 256, !13, i64 264, !13, i64 272, !13, i64 280, !13, i64 288, !13, i64 296, !13, i64 304, !10, i64 312, !10, i64 316, !10, i64 320, !10, i64 324, !10, i64 328, !10, i64 332, !10, i64 336, !10, i64 340, !13, i64 344, !13, i64 352, !13, i64 360, !13, i64 368, !10, i64 376, !10, i64 380, !10, i64 384, !10, i64 388, !10, i64 392, !10, i64 396, !10, i64 400, !10, i64 404, !10, i64 408, !10, 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}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !10, i64 100}
!15 = !{!12, !10, i64 388}
!16 = !{!12, !10, i64 392}
!17 = !{!12, !10, i64 108}
!18 = !{!12, !10, i64 84}
!19 = !{!12, !6, i64 544}
!20 = !{!12, !6, i64 416}
!21 = !{!12, !6, i64 440}
!22 = !{!12, !6, i64 592}
!23 = !{!12, !6, i64 672}
!24 = !{!12, !13, i64 240}
!25 = !{!12, !6, i64 640}
!26 = !{!12, !6, i64 424}
!27 = !{!12, !6, i64 448}
!28 = !{!12, !6, i64 688}
!29 = !{!12, !13, i64 248}
!30 = !{!12, !10, i64 312}
!31 = !{!12, !10, i64 324}
!32 = !{!12, !10, i64 328}
!33 = !{!12, !10, i64 340}
!34 = !{!13, !13, i64 0}
!35 = !{!12, !13, i64 168}
!36 = !{!12, !10, i64 316}


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

%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 }

; Function Attrs: nounwind uwtable
define dso_local i32 @basiclu_factorize(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, i32 noundef %12) local_unnamed_addr #0 {
  %14 = alloca %struct.lu, align 8
  call void @llvm.lifetime.start.p0(i64 696, ptr nonnull %14) #4
  %15 = call i32 @lu_load(ptr noundef nonnull %14, ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #4
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %16, label %109

16:                                               ; preds = %13
  %17 = insertelement <8 x ptr> poison, ptr %2, i64 0
  %18 = insertelement <8 x ptr> %17, ptr %3, i64 1
  %19 = insertelement <8 x ptr> %18, ptr %4, i64 2
  %20 = insertelement <8 x ptr> %19, ptr %5, i64 3
  %21 = insertelement <8 x ptr> %20, ptr %6, i64 4
  %22 = insertelement <8 x ptr> %21, ptr %7, i64 5
  %23 = insertelement <8 x ptr> %22, ptr %8, i64 6
  %24 = insertelement <8 x ptr> %23, ptr %9, i64 7
  %25 = icmp ne ptr %10, null
  %26 = icmp ne ptr %11, null
  %27 = icmp eq <8 x ptr> %24, zeroinitializer
  %28 = bitcast <8 x i1> %27 to i8
  %29 = icmp eq i8 %28, 0
  %op.rdx = and i1 %29, %25
  %op.rdx75 = and i1 %op.rdx, %26
  br i1 %op.rdx75, label %30, label %.sink.split

30:                                               ; preds = %16
  %.not70 = icmp eq i32 %12, 0
  br i1 %.not70, label %.thread, label %32

.thread:                                          ; preds = %30
  call void @lu_reset(ptr noundef nonnull %14) #4
  %31 = getelementptr inbounds i8, ptr %14, i64 376
  br label %34

32:                                               ; preds = %30
  %.phi.trans.insert = getelementptr inbounds i8, ptr %14, i64 376
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %14, i64 376
  switch i32 %.pre, label %.sink.split [
    i32 1, label %34
    i32 2, label %37
    i32 3, label %40
    i32 4, label %43
  ]

34:                                               ; preds = %.thread, %32
  %35 = phi ptr [ %31, %.thread ], [ %33, %32 ]
  store i32 1, ptr %35, align 8, !tbaa !5
  %36 = call i32 @lu_singletons(ptr noundef nonnull %14, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11) #4
  %.not71 = icmp eq i32 %36, 0
  br i1 %.not71, label %37, label %.sink.split

37:                                               ; preds = %34, %32
  %38 = phi ptr [ %35, %34 ], [ %33, %32 ]
  store i32 2, ptr %38, align 8, !tbaa !5
  %39 = call i32 @lu_setup_bump(ptr noundef nonnull %14, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11) #4
  %.not72 = icmp eq i32 %39, 0
  br i1 %.not72, label %40, label %.sink.split

40:                                               ; preds = %37, %32
  %41 = phi ptr [ %38, %37 ], [ %33, %32 ]
  store i32 3, ptr %41, align 8, !tbaa !5
  %42 = call i32 @lu_factorize_bump(ptr noundef nonnull %14) #4
  %.not73 = icmp eq i32 %42, 0
  br i1 %.not73, label %43, label %.sink.split

43:                                               ; preds = %40, %32
  %44 = phi ptr [ %41, %40 ], [ %33, %32 ]
  store i32 4, ptr %44, align 8, !tbaa !5
  %45 = call i32 @lu_build_factors(ptr noundef nonnull %14) #4
  %.not74 = icmp eq i32 %45, 0
  br i1 %.not74, label %46, label %.sink.split

46:                                               ; preds = %43
  store i32 0, ptr %44, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %14, i64 100
  store i32 0, ptr %47, align 4, !tbaa !12
  %48 = getelementptr inbounds i8, ptr %14, i64 388
  store i32 -1, ptr %48, align 4, !tbaa !13
  %49 = getelementptr inbounds i8, ptr %14, i64 392
  store i32 -1, ptr %49, align 8, !tbaa !14
  %50 = getelementptr inbounds i8, ptr %14, i64 108
  %51 = load i32, ptr %50, align 4, !tbaa !15
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %50, align 4, !tbaa !15
  %53 = getelementptr inbounds i8, ptr %14, i64 84
  %54 = load i32, ptr %53, align 4, !tbaa !16
  %55 = getelementptr inbounds i8, ptr %14, i64 544
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  %57 = getelementptr inbounds i8, ptr %14, i64 416
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = getelementptr inbounds i8, ptr %14, i64 440
  %60 = load ptr, ptr %59, align 8, !tbaa !19
  %61 = getelementptr inbounds i8, ptr %14, i64 592
  %62 = load ptr, ptr %61, align 8, !tbaa !20
  %63 = getelementptr inbounds i8, ptr %14, i64 672
  %64 = load ptr, ptr %63, align 8, !tbaa !21
  %65 = getelementptr inbounds i8, ptr %14, i64 256
  %66 = getelementptr inbounds i8, ptr %14, i64 272
  %67 = call double @lu_condest(i32 noundef %54, ptr noundef %56, ptr noundef %58, ptr noundef %60, ptr noundef null, ptr noundef %62, i32 noundef 0, ptr noundef %64, ptr noundef nonnull %65, ptr noundef nonnull %66) #4
  %68 = getelementptr inbounds i8, ptr %14, i64 240
  store double %67, ptr %68, align 8, !tbaa !22
  %69 = load i32, ptr %53, align 4, !tbaa !16
  %70 = getelementptr inbounds i8, ptr %14, i64 640
  %71 = load ptr, ptr %70, align 8, !tbaa !23
  %72 = getelementptr inbounds i8, ptr %14, i64 424
  %73 = load ptr, ptr %72, align 8, !tbaa !24
  %74 = getelementptr inbounds i8, ptr %14, i64 448
  %75 = load ptr, ptr %74, align 8, !tbaa !25
  %76 = getelementptr inbounds i8, ptr %14, i64 688
  %77 = load ptr, ptr %76, align 8, !tbaa !26
  %78 = load ptr, ptr %61, align 8, !tbaa !20
  %79 = load ptr, ptr %63, align 8, !tbaa !21
  %80 = getelementptr inbounds i8, ptr %14, i64 264
  %81 = getelementptr inbounds i8, ptr %14, i64 280
  %82 = call double @lu_condest(i32 noundef %69, ptr noundef %71, ptr noundef %73, ptr noundef %75, ptr noundef %77, ptr noundef %78, i32 noundef 1, ptr noundef %79, ptr noundef nonnull %80, ptr noundef nonnull %81) #4
  %83 = getelementptr inbounds i8, ptr %14, i64 248
  store double %82, ptr %83, align 8, !tbaa !27
  call void @lu_residual_test(ptr noundef nonnull %14, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11) #4
  %84 = load i32, ptr %53, align 4, !tbaa !16
  %85 = sitofp i32 %84 to double
  %86 = getelementptr inbounds i8, ptr %14, i64 312
  %87 = load i32, ptr %86, align 8, !tbaa !28
  %88 = sitofp i32 %87 to double
  %89 = fmul double %88, 7.000000e-02
  %90 = call double @llvm.fmuladd.f64(double %85, double 4.000000e-02, double %89)
  %91 = getelementptr inbounds i8, ptr %14, i64 324
  %92 = load i32, ptr %91, align 4, !tbaa !29
  %93 = sitofp i32 %92 to double
  %94 = call double @llvm.fmuladd.f64(double %93, double 2.000000e-01, double %90)
  %95 = getelementptr inbounds i8, ptr %14, i64 328
  %96 = load i32, ptr %95, align 8, !tbaa !30
  %97 = sitofp i32 %96 to double
  %98 = call double @llvm.fmuladd.f64(double %97, double 2.000000e-01, double %94)
  %99 = getelementptr inbounds i8, ptr %14, i64 340
  %100 = load i32, ptr %99, align 4, !tbaa !31
  %101 = sitofp i32 %100 to double
  %102 = call double @llvm.fmuladd.f64(double %101, double 8.000000e-03, double %98)
  %103 = fmul double %102, 2.500000e+02
  %104 = getelementptr inbounds i8, ptr %14, i64 168
  store double %103, ptr %104, align 8, !tbaa !32
  %105 = getelementptr inbounds i8, ptr %14, i64 316
  %106 = load i32, ptr %105, align 4, !tbaa !33
  %107 = icmp slt i32 %106, %84
  %spec.select = select i1 %107, i32 2, i32 0
  br label %.sink.split

.sink.split:                                      ; preds = %34, %37, %40, %43, %46, %32, %16
  %.064.sink = phi i32 [ -3, %16 ], [ -2, %32 ], [ %45, %43 ], [ %42, %40 ], [ %39, %37 ], [ %36, %34 ], [ %spec.select, %46 ]
  %108 = call i32 @lu_save(ptr noundef nonnull %14, ptr noundef %0, ptr noundef %1, i32 noundef %.064.sink) #4
  br label %109

109:                                              ; preds = %.sink.split, %13
  %.0 = phi i32 [ %15, %13 ], [ %108, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 696, ptr nonnull %14) #4
  ret i32 %.0
}

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

declare i32 @lu_load(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @lu_save(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @lu_reset(ptr noundef) local_unnamed_addr #2

declare i32 @lu_singletons(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @lu_setup_bump(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @lu_factorize_bump(ptr noundef) local_unnamed_addr #2

declare i32 @lu_build_factors(ptr noundef) local_unnamed_addr #2

declare double @lu_condest(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @lu_residual_test(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress 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 = { mustprogress 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 = { mustprogress 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, !7, i64 376}
!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, !7, i64 100}
!13 = !{!6, !7, i64 388}
!14 = !{!6, !7, i64 392}
!15 = !{!6, !7, i64 108}
!16 = !{!6, !7, i64 84}
!17 = !{!6, !11, i64 544}
!18 = !{!6, !11, i64 416}
!19 = !{!6, !11, i64 440}
!20 = !{!6, !11, i64 592}
!21 = !{!6, !11, i64 672}
!22 = !{!6, !10, i64 240}
!23 = !{!6, !11, i64 640}
!24 = !{!6, !11, i64 424}
!25 = !{!6, !11, i64 448}
!26 = !{!6, !11, i64 688}
!27 = !{!6, !10, i64 248}
!28 = !{!6, !7, i64 312}
!29 = !{!6, !7, i64 324}
!30 = !{!6, !7, i64 328}
!31 = !{!6, !7, i64 340}
!32 = !{!6, !10, i64 168}
!33 = !{!6, !7, i64 316}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass