; LLVM IR from dartsim/dart :: dart/external/odelcpsolver/matrix.ll (ZN4dart8external3ode16_dInvertPDMatrixEPKdPdiPv)

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

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@__FUNCTION__._ZN4dart8external3ode16_dInvertPDMatrixEPKdPdiPv = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [73 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dart8external3ode9_dSetZeroEPdm(ptr noundef, i64 noundef) #0

declare void @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef, ptr noundef, ...) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4dart8external3ode16_dFactorCholeskyEPdiPv(ptr noundef, i32 noundef, ptr noundef) #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4dart8external3ode16_dInvertPDMatrixEPKdPdiPv(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %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
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %26, label %32

26:                                               ; preds = %4
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %32

29:                                               ; preds = %26
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %33, label %32

32:                                               ; preds = %29, %26, %4
  call void (i32, ptr, ...) @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef 2, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4dart8external3ode16_dInvertPDMatrixEPKdPdiPv)
  br label %33

33:                                               ; preds = %32, %29
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  store i8 0, ptr %9, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = call noundef i64 @_ZN4dart8external3odeL34_dEstimateFactorCholeskyTmpbufSizeEi(i32 noundef %34)
  store i64 %35, ptr %10, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = call noundef i64 @_ZN4dart8external3odeL33_dEstimateSolveCholeskyTmpbufSizeEi(i32 noundef %36)
  store i64 %37, ptr %11, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %38 = load i64, ptr %10, align 8, !tbaa !13
  %39 = load i64, ptr %11, align 8, !tbaa !13
  %40 = icmp ugt i64 %38, %39
  br i1 %40, label %41, label %43

41:                                               ; preds = %33
  %42 = load i64, ptr %10, align 8, !tbaa !13
  br label %45

43:                                               ; preds = %33
  %44 = load i64, ptr %11, align 8, !tbaa !13
  br label %45

45:                                               ; preds = %43, %41
  %46 = phi i64 [ %42, %41 ], [ %44, %43 ]
  store i64 %46, ptr %12, align 8, !tbaa !13
  %47 = load i64, ptr %12, align 8, !tbaa !13
  %48 = urem i64 %47, 8
  %49 = icmp eq i64 %48, 0
  br i1 %49, label %51, label %50

50:                                               ; preds = %45
  call void (i32, ptr, ...) @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef 1, ptr noundef @.str.4, ptr noundef @__FUNCTION__._ZN4dart8external3ode16_dInvertPDMatrixEPKdPdiPv, ptr noundef @.str.2, i32 noundef 229)
  br label %51

51:                                               ; preds = %50, %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = icmp sgt i32 %52, 1
  br i1 %53, label %54, label %59

54:                                               ; preds = %51
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = sub nsw i32 %55, 1
  %57 = or i32 %56, 3
  %58 = add nsw i32 %57, 1
  br label %61

59:                                               ; preds = %51
  %60 = load i32, ptr %7, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %59, %54
  %62 = phi i32 [ %58, %54 ], [ %60, %59 ]
  store i32 %62, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %63 = load i32, ptr %13, align 4, !tbaa !9
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = mul nsw i32 %63, %64
  store i32 %65, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %70

68:                                               ; preds = %61
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  br label %84

70:                                               ; preds = %61
  %71 = load i64, ptr %12, align 8, !tbaa !13
  %72 = load i32, ptr %13, align 4, !tbaa !9
  %73 = load i32, ptr %14, align 4, !tbaa !9
  %74 = add nsw i32 %72, %73
  %75 = sext i32 %74 to i64
  %76 = mul i64 %75, 8
  %77 = add i64 %71, %76
  %78 = add i64 %77, 15
  %79 = alloca i8, i64 %78, align 16
  %80 = ptrtoint ptr %79 to i64
  %81 = add i64 %80, 15
  %82 = and i64 %81, -16
  %83 = inttoptr i64 %82 to ptr
  br label %84

84:                                               ; preds = %70, %68
  %85 = phi ptr [ %69, %68 ], [ %83, %70 ]
  store ptr %85, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = load i64, ptr %12, align 8, !tbaa !13
  %88 = getelementptr inbounds i8, ptr %86, i64 %87
  store ptr %88, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %89 = load ptr, ptr %16, align 8, !tbaa !5
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds double, ptr %89, i64 %91
  store ptr %92, ptr %17, align 8, !tbaa !5
  %93 = load ptr, ptr %17, align 8, !tbaa !5
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = load i32, ptr %14, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = mul i64 %96, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %93, ptr align 8 %94, i64 %97, i1 false)
  %98 = load ptr, ptr %17, align 8, !tbaa !5
  %99 = load i32, ptr %7, align 4, !tbaa !9
  %100 = load ptr, ptr %15, align 8, !tbaa !5
  %101 = call noundef i32 @_ZN4dart8external3ode16_dFactorCholeskyEPdiPv(ptr noundef %98, i32 noundef %99, ptr noundef %100)
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %154

103:                                              ; preds = %84
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = load i32, ptr %14, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  call void @_ZN4dart8external3ode9_dSetZeroEPdm(ptr noundef %104, i64 noundef %106)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %107, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %108 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %108, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %109 = load ptr, ptr %16, align 8, !tbaa !5
  %110 = load i32, ptr %7, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds double, ptr %109, i64 %111
  store ptr %112, ptr %20, align 8, !tbaa !5
  br label %113

113:                                              ; preds = %148, %103
  %114 = load ptr, ptr %19, align 8, !tbaa !5
  %115 = load ptr, ptr %20, align 8, !tbaa !5
  %116 = icmp ne ptr %114, %115
  br i1 %116, label %117, label %153

117:                                              ; preds = %113
  %118 = load ptr, ptr %16, align 8, !tbaa !5
  %119 = load i32, ptr %7, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  call void @_ZN4dart8external3ode9_dSetZeroEPdm(ptr noundef %118, i64 noundef %120)
  %121 = load ptr, ptr %19, align 8, !tbaa !5
  store double 1.000000e+00, ptr %121, align 8, !tbaa !15
  %122 = load ptr, ptr %17, align 8, !tbaa !5
  %123 = load ptr, ptr %16, align 8, !tbaa !5
  %124 = load i32, ptr %7, align 4, !tbaa !9
  %125 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN4dart8external3ode15_dSolveCholeskyEPKdPdiPv(ptr noundef %122, ptr noundef %123, i32 noundef %124, ptr noundef %125)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %126 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %126, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %127, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %128 = load ptr, ptr %16, align 8, !tbaa !5
  %129 = load i32, ptr %7, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds double, ptr %128, i64 %130
  store ptr %131, ptr %23, align 8, !tbaa !5
  br label %132

132:                                              ; preds = %140, %117
  %133 = load ptr, ptr %22, align 8, !tbaa !5
  %134 = load ptr, ptr %23, align 8, !tbaa !5
  %135 = icmp ne ptr %133, %134
  br i1 %135, label %136, label %147

136:                                              ; preds = %132
  %137 = load ptr, ptr %22, align 8, !tbaa !5
  %138 = load double, ptr %137, align 8, !tbaa !15
  %139 = load ptr, ptr %21, align 8, !tbaa !5
  store double %138, ptr %139, align 8, !tbaa !15
  br label %140

140:                                              ; preds = %136
  %141 = load i32, ptr %13, align 4, !tbaa !9
  %142 = load ptr, ptr %21, align 8, !tbaa !5
  %143 = sext i32 %141 to i64
  %144 = getelementptr inbounds double, ptr %142, i64 %143
  store ptr %144, ptr %21, align 8, !tbaa !5
  %145 = load ptr, ptr %22, align 8, !tbaa !5
  %146 = getelementptr inbounds double, ptr %145, i32 1
  store ptr %146, ptr %22, align 8, !tbaa !5
  br label %132, !llvm.loop !17

147:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %148

148:                                              ; preds = %147
  %149 = load ptr, ptr %18, align 8, !tbaa !5
  %150 = getelementptr inbounds double, ptr %149, i32 1
  store ptr %150, ptr %18, align 8, !tbaa !5
  %151 = load ptr, ptr %19, align 8, !tbaa !5
  %152 = getelementptr inbounds double, ptr %151, i32 1
  store ptr %152, ptr %19, align 8, !tbaa !5
  br label %113, !llvm.loop !19

153:                                              ; preds = %113
  store i8 1, ptr %9, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %154

154:                                              ; preds = %153, %84
  %155 = load i8, ptr %9, align 1, !tbaa !11, !range !20, !noundef !21
  %156 = trunc i8 %155 to i1
  %157 = zext i1 %156 to i64
  %158 = select i1 %156, i32 1, i32 0
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  ret i32 %158
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN4dart8external3odeL34_dEstimateFactorCholeskyTmpbufSizeEi(i32 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN4dart8external3odeL33_dEstimateSolveCholeskyTmpbufSizeEi(i32 noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }

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

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


; 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 [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@__FUNCTION__._ZN4dart8external3ode16_dInvertPDMatrixEPKdPdiPv = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [73 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dart8external3ode9_dSetZeroEPdm(ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4dart8external3ode16_dFactorCholeskyEPdiPv(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN4dart8external3ode16_dInvertPDMatrixEPKdPdiPv(ptr noundef readonly %0, ptr noundef %1, i32 noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = icmp sgt i32 %2, 0
  %6 = icmp ne ptr %0, null
  %or.cond = and i1 %6, %5
  %7 = icmp ne ptr %1, null
  %or.cond3 = and i1 %7, %or.cond
  br i1 %or.cond3, label %9, label %8

8:                                                ; preds = %4
  tail call void (i32, ptr, ...) @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef 2, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4dart8external3ode16_dInvertPDMatrixEPKdPdiPv)
  br label %9

9:                                                ; preds = %4, %8
  %10 = tail call noundef i64 @_ZN4dart8external3odeL34_dEstimateFactorCholeskyTmpbufSizeEi(i32 noundef %2)
  %11 = tail call noundef i64 @_ZN4dart8external3odeL33_dEstimateSolveCholeskyTmpbufSizeEi(i32 noundef %2)
  %12 = tail call i64 @llvm.umax.i64(i64 %10, i64 %11)
  %13 = and i64 %12, 7
  %14 = icmp eq i64 %13, 0
  br i1 %14, label %16, label %15

15:                                               ; preds = %9
  tail call void (i32, ptr, ...) @_ZN4dart8external3ode6dDebugEiPKcz(i32 noundef 1, ptr noundef nonnull @.str.4, ptr noundef nonnull @__FUNCTION__._ZN4dart8external3ode16_dInvertPDMatrixEPKdPdiPv, ptr noundef nonnull @.str.2, i32 noundef 229)
  br label %16

16:                                               ; preds = %15, %9
  %17 = icmp sgt i32 %2, 1
  %18 = add nsw i32 %2, -1
  %19 = or i32 %18, 3
  %20 = add nuw nsw i32 %19, 1
  %21 = select i1 %17, i32 %20, i32 %2
  %22 = mul nsw i32 %21, %2
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %23, label %30

23:                                               ; preds = %16
  %24 = add nsw i32 %22, %21
  %25 = sext i32 %24 to i64
  %26 = shl nsw i64 %25, 3
  %27 = add nsw i64 %26, 15
  %28 = add i64 %27, %12
  %29 = alloca i8, i64 %28, align 16
  br label %30

30:                                               ; preds = %16, %23
  %31 = phi ptr [ %29, %23 ], [ %3, %16 ]
  %32 = getelementptr inbounds i8, ptr %31, i64 %12
  %33 = sext i32 %21 to i64
  %34 = getelementptr inbounds double, ptr %32, i64 %33
  %35 = sext i32 %22 to i64
  %36 = shl nsw i64 %35, 3
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %34, ptr align 8 %0, i64 %36, i1 false)
  %37 = call noundef i32 @_ZN4dart8external3ode16_dFactorCholeskyEPdiPv(ptr noundef nonnull %34, i32 noundef %2, ptr noundef nonnull %31)
  %.not68.not = icmp ne i32 %37, 0
  br i1 %.not68.not, label %38, label %.loopexit

38:                                               ; preds = %30
  call void @_ZN4dart8external3ode9_dSetZeroEPdm(ptr noundef %1, i64 noundef %35)
  %39 = sext i32 %2 to i64
  %40 = getelementptr inbounds double, ptr %32, i64 %39
  %.not6974 = icmp eq i32 %2, 0
  br i1 %.not6974, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %38, %._crit_edge
  %.06376 = phi ptr [ %45, %._crit_edge ], [ %1, %38 ]
  %.06475 = phi ptr [ %46, %._crit_edge ], [ %32, %38 ]
  call void @_ZN4dart8external3ode9_dSetZeroEPdm(ptr noundef nonnull %32, i64 noundef %39)
  store double 1.000000e+00, ptr %.06475, align 8, !tbaa !5
  call void @_ZN4dart8external3ode15_dSolveCholeskyEPKdPdiPv(ptr noundef nonnull %34, ptr noundef nonnull %32, i32 noundef %2, ptr noundef nonnull %31)
  br label %41

41:                                               ; preds = %.lr.ph, %41
  %.06173 = phi ptr [ %32, %.lr.ph ], [ %44, %41 ]
  %.06272 = phi ptr [ %.06376, %.lr.ph ], [ %43, %41 ]
  %42 = load double, ptr %.06173, align 8, !tbaa !5
  store double %42, ptr %.06272, align 8, !tbaa !5
  %43 = getelementptr inbounds double, ptr %.06272, i64 %33
  %44 = getelementptr inbounds i8, ptr %.06173, i64 8
  %.not70 = icmp eq ptr %44, %40
  br i1 %.not70, label %._crit_edge, label %41, !llvm.loop !9

._crit_edge:                                      ; preds = %41
  %45 = getelementptr inbounds i8, ptr %.06376, i64 8
  %46 = getelementptr inbounds i8, ptr %.06475, i64 8
  %.not69 = icmp eq ptr %46, %40
  br i1 %.not69, label %.loopexit, label %.lr.ph, !llvm.loop !11

.loopexit:                                        ; preds = %._crit_edge, %38, %30
  %47 = zext i1 %.not68.not to i32
  ret i32 %47
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN4dart8external3odeL34_dEstimateFactorCholeskyTmpbufSizeEi(i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN4dart8external3odeL33_dEstimateSolveCholeskyTmpbufSizeEi(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #4

attributes #0 = { 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 #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 = { inlinehint 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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