; LLVM IR from kulho/STM32PendulumMPC :: STM32F407/qpOASES/src (SQProblemSchur)

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

%"class.qpOASES::SQProblemSchur" = type { %"class.qpOASES::SQProblem", ptr, ptr, i32, i32, ptr, ptr, double, double, i32, ptr, ptr, i32, ptr, ptr, ptr, %"class.qpOASES::Indexlist", %"class.qpOASES::Indexlist" }
%"class.qpOASES::SQProblem" = type { %"class.qpOASES::QProblem" }
%"class.qpOASES::QProblem" = type { %"class.qpOASES::QProblemB", i32, ptr, ptr, ptr, %"class.qpOASES::Constraints", ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.qpOASES::QProblemB" = type { ptr, i32, ptr, ptr, ptr, ptr, %"class.qpOASES::Bounds", ptr, i32, ptr, ptr, double, i32, i32, i32, i32, double, i32, ptr, double, double, i32, [4 x i8], %"class.qpOASES::Options", %"class.qpOASES::Flipper", %"struct.qpOASES::TabularOutput" }
%"class.qpOASES::Bounds" = type { %"class.qpOASES::SubjectTo", %"class.qpOASES::Indexlist", %"class.qpOASES::Indexlist" }
%"class.qpOASES::SubjectTo" = type { ptr, i32, ptr, ptr, i32, i32 }
%"class.qpOASES::Options" = type <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, i32, [4 x i8], double, i32, [4 x i8], double, i32, [4 x i8], double, double, double, double, i32, i32, i32, i32, i32, [4 x i8] }>
%"class.qpOASES::Flipper" = type { i32, i32, %"class.qpOASES::Bounds", %"class.qpOASES::Constraints", ptr, ptr, ptr }
%"struct.qpOASES::TabularOutput" = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.qpOASES::Constraints" = type { %"class.qpOASES::SubjectTo", %"class.qpOASES::Indexlist", %"class.qpOASES::Indexlist" }
%"class.qpOASES::Indexlist" = type <{ ptr, ptr, i32, i32, i32, i32, i32, [4 x i8] }>

@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z8MyPrintfPKcz(ptr noundef, ...) #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES14SQProblemSchur16backsolveSchurQREiPKdiPd(ptr noundef nonnull align 8 dereferenceable(1248) %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #3 align 2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  %20 = load ptr, ptr %7, align 8
  %21 = load i32, ptr %8, align 4, !tbaa !9
  %22 = icmp slt i32 %21, 1
  br i1 %22, label %26, label %23

23:                                               ; preds = %5
  %24 = load i32, ptr %10, align 4, !tbaa !9
  %25 = icmp slt i32 %24, 1
  br i1 %25, label %26, label %27

26:                                               ; preds = %23, %5
  store i32 0, ptr %6, align 4
  br label %102

27:                                               ; preds = %23
  %28 = load i32, ptr %10, align 4, !tbaa !9
  %29 = icmp sgt i32 %28, 1
  br i1 %29, label %30, label %32

30:                                               ; preds = %27
  %31 = load i32, ptr %10, align 4, !tbaa !9
  call void (ptr, ...) @_Z8MyPrintfPKcz(ptr noundef @.str.23, i32 noundef %31)
  store i32 143, ptr %6, align 4
  br label %102

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 1, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  store i64 %34, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %35 = getelementptr inbounds %"class.qpOASES::SQProblemSchur", ptr %20, i32 0, i32 4
  %36 = load i32, ptr %35, align 4, !tbaa !13
  %37 = sext i32 %36 to i64
  store i64 %37, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %38 = load i32, ptr %8, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  store i64 %39, ptr %18, align 8, !tbaa !11
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %49, %32
  %41 = load i32, ptr %12, align 4, !tbaa !9
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %44, label %52

44:                                               ; preds = %40
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds double, ptr %45, i64 %47
  store double 0.000000e+00, ptr %48, align 8, !tbaa !31
  br label %49

49:                                               ; preds = %44
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %12, align 4, !tbaa !9
  br label %40, !llvm.loop !32

52:                                               ; preds = %40
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %89, %52
  %54 = load i32, ptr %12, align 4, !tbaa !9
  %55 = load i32, ptr %8, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %57, label %92

57:                                               ; preds = %53
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %85, %57
  %59 = load i32, ptr %13, align 4, !tbaa !9
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %88

62:                                               ; preds = %58
  %63 = getelementptr inbounds %"class.qpOASES::SQProblemSchur", ptr %20, i32 0, i32 5
  %64 = load ptr, ptr %63, align 8, !tbaa !34
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = load i32, ptr %12, align 4, !tbaa !9
  %67 = getelementptr inbounds %"class.qpOASES::SQProblemSchur", ptr %20, i32 0, i32 4
  %68 = load i32, ptr %67, align 4, !tbaa !13
  %69 = mul nsw i32 %66, %68
  %70 = add nsw i32 %65, %69
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds double, ptr %64, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !31
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = load i32, ptr %13, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds double, ptr %74, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !31
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds double, ptr %79, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !31
  %84 = call double @llvm.fmuladd.f64(double %73, double %78, double %83)
  store double %84, ptr %82, align 8, !tbaa !31
  br label %85

85:                                               ; preds = %62
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %13, align 4, !tbaa !9
  br label %58, !llvm.loop !35

88:                                               ; preds = %58
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr %12, align 4, !tbaa !9
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %12, align 4, !tbaa !9
  br label %53, !llvm.loop !36

92:                                               ; preds = %53
  %93 = getelementptr inbounds %"class.qpOASES::SQProblemSchur", ptr %20, i32 0, i32 6
  %94 = load ptr, ptr %93, align 8, !tbaa !37
  %95 = load ptr, ptr %11, align 8, !tbaa !5
  call void @dtrtrs_(ptr noundef @.str.19, ptr noundef @.str.20, ptr noundef @.str.20, ptr noundef %16, ptr noundef %15, ptr noundef %94, ptr noundef %17, ptr noundef %95, ptr noundef %18, ptr noundef %14)
  %96 = load i64, ptr %14, align 8, !tbaa !11
  %97 = icmp ne i64 %96, 0
  br i1 %97, label %98, label %100

98:                                               ; preds = %92
  %99 = load i64, ptr %14, align 8, !tbaa !11
  call void (ptr, ...) @_Z8MyPrintfPKcz(ptr noundef @.str.24, i64 noundef %99)
  store i32 143, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %101

100:                                              ; preds = %92
  store i32 0, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %101

101:                                              ; preds = %100, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  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 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %102

102:                                              ; preds = %101, %30, %26
  %103 = load i32, ptr %6, align 4
  ret i32 %103
}

declare void @dtrtrs_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

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

!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 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 1076}
!14 = !{!"_ZTSN7qpOASES14SQProblemSchurE", !15, i64 0, !6, i64 1056, !6, i64 1064, !10, i64 1072, !10, i64 1076, !6, i64 1080, !6, i64 1088, !22, i64 1096, !22, i64 1104, !10, i64 1112, !6, i64 1120, !6, i64 1128, !10, i64 1136, !6, i64 1144, !6, i64 1152, !6, i64 1160, !21, i64 1168, !21, i64 1208}
!15 = !{!"_ZTSN7qpOASES9SQProblemE", !16, i64 0}
!16 = !{!"_ZTSN7qpOASES8QProblemE", !17, i64 0, !18, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !29, i64 832, !6, i64 952, !6, i64 960, !10, i64 968, !6, i64 976, !6, i64 984, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !6, i64 1024, !6, i64 1032, !6, i64 1040, !6, i64 1048}
!17 = !{!"_ZTSN7qpOASES9QProblemBE", !18, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !19, i64 48, !6, i64 168, !18, i64 176, !6, i64 184, !6, i64 192, !22, i64 200, !23, i64 208, !18, i64 212, !18, i64 216, !24, i64 220, !22, i64 224, !10, i64 232, !6, i64 240, !22, i64 248, !22, i64 256, !10, i64 264, !25, i64 272, !28, i64 496, !30, i64 768}
!18 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!19 = !{!"_ZTSN7qpOASES6BoundsE", !20, i64 0, !21, i64 40, !21, i64 80}
!20 = !{!"_ZTSN7qpOASES9SubjectToE", !10, i64 8, !6, i64 16, !6, i64 24, !18, i64 32, !18, i64 36}
!21 = !{!"_ZTSN7qpOASES9IndexlistE", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!22 = !{!"double", !7, i64 0}
!23 = !{!"_ZTSN7qpOASES14QProblemStatusE", !7, i64 0}
!24 = !{!"_ZTSN7qpOASES11HessianTypeE", !7, i64 0}
!25 = !{!"_ZTSN7qpOASES7OptionsE", !26, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !10, i64 28, !10, i64 32, !18, i64 36, !22, i64 40, !22, i64 48, !22, i64 56, !22, i64 64, !22, i64 72, !22, i64 80, !22, i64 88, !22, i64 96, !22, i64 104, !22, i64 112, !22, i64 120, !27, i64 128, !22, i64 136, !10, i64 144, !22, i64 152, !10, i64 160, !22, i64 168, !22, i64 176, !22, i64 184, !22, i64 192, !18, i64 200, !18, i64 204, !10, i64 208, !10, i64 212, !10, i64 216}
!26 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!27 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!28 = !{!"_ZTSN7qpOASES7FlipperE", !10, i64 0, !10, i64 4, !19, i64 8, !29, i64 128, !6, i64 248, !6, i64 256, !6, i64 264}
!29 = !{!"_ZTSN7qpOASES11ConstraintsE", !20, i64 0, !21, i64 40, !21, i64 80}
!30 = !{!"_ZTSN7qpOASES13TabularOutputE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!31 = !{!22, !22, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!14, !6, i64 1080}
!35 = distinct !{!35, !33}
!36 = distinct !{!36, !33}
!37 = !{!14, !6, i64 1088}


; 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.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z8MyPrintfPKcz(ptr noundef, ...) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 144) i32 @_ZN7qpOASES14SQProblemSchur16backsolveSchurQREiPKdiPd(ptr nocapture noundef nonnull readonly align 8 dereferenceable(1248) %0, i32 noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3, ptr noundef %4) local_unnamed_addr #3 align 2 {
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = icmp slt i32 %1, 1
  %12 = icmp slt i32 %3, 1
  %or.cond = or i1 %11, %12
  br i1 %or.cond, label %44, label %13

13:                                               ; preds = %5
  %14 = icmp ugt i32 %3, 1
  br i1 %14, label %15, label %.preheader.lr.ph

15:                                               ; preds = %13
  tail call void (ptr, ...) @_Z8MyPrintfPKcz(ptr noundef nonnull @.str.23, i32 noundef %3)
  br label %44

.preheader.lr.ph:                                 ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store i64 0, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  store i64 1, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %16 = zext nneg i32 %1 to i64
  store i64 %16, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %17 = getelementptr inbounds i8, ptr %0, i64 1076
  %18 = load i32, ptr %17, align 4, !tbaa !9
  %19 = sext i32 %18 to i64
  store i64 %19, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  store i64 %16, ptr %10, align 8, !tbaa !5
  %20 = shl nuw nsw i64 %16, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %4, i8 0, i64 %20, i1 false), !tbaa !29
  %21 = getelementptr inbounds i8, ptr %0, i64 1080
  %22 = load ptr, ptr %21, align 8
  %xtraiter = and i64 %16, 1
  %23 = icmp eq i32 %1, 1
  %unroll_iter = and i64 %16, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph
  %indvars.iv40 = phi i64 [ %indvars.iv.next41, %._crit_edge.us ], [ 0, %.preheader.lr.ph ]
  %24 = mul nsw i64 %indvars.iv40, %19
  %25 = getelementptr inbounds double, ptr %4, i64 %indvars.iv40
  %.promoted.us = load double, ptr %25, align 8, !tbaa !29
  %invariant.gep = getelementptr double, ptr %22, i64 %24
  br i1 %23, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %26 = phi double [ %34, %.preheader.us.new ], [ %.promoted.us, %.preheader.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %gep = getelementptr double, ptr %invariant.gep, i64 %indvars.iv
  %27 = load double, ptr %gep, align 8, !tbaa !29
  %28 = getelementptr inbounds double, ptr %2, i64 %indvars.iv
  %29 = load double, ptr %28, align 8, !tbaa !29
  %30 = tail call double @llvm.fmuladd.f64(double %27, double %29, double %26)
  store double %30, ptr %25, align 8, !tbaa !29
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %gep.1 = getelementptr double, ptr %invariant.gep, i64 %indvars.iv.next
  %31 = load double, ptr %gep.1, align 8, !tbaa !29
  %32 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next
  %33 = load double, ptr %32, align 8, !tbaa !29
  %34 = tail call double @llvm.fmuladd.f64(double %31, double %33, double %30)
  store double %34, ptr %25, align 8, !tbaa !29
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !30

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader.us.new, %.preheader.us
  %indvars.iv.unr = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next.1, %.preheader.us.new ]
  %.unr = phi double [ %.promoted.us, %.preheader.us ], [ %34, %.preheader.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %gep.epil = getelementptr double, ptr %invariant.gep, i64 %indvars.iv.unr
  %35 = load double, ptr %gep.epil, align 8, !tbaa !29
  %36 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.unr
  %37 = load double, ptr %36, align 8, !tbaa !29
  %38 = tail call double @llvm.fmuladd.f64(double %35, double %37, double %.unr)
  store double %38, ptr %25, align 8, !tbaa !29
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %exitcond44.not = icmp eq i64 %indvars.iv.next41, %16
  br i1 %exitcond44.not, label %._crit_edge37, label %.preheader.us, !llvm.loop !32

._crit_edge37:                                    ; preds = %._crit_edge.us
  %39 = getelementptr inbounds i8, ptr %0, i64 1088
  %40 = load ptr, ptr %39, align 8, !tbaa !33
  call void @dtrtrs_(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.20, ptr noundef nonnull %8, ptr noundef nonnull %7, ptr noundef %40, ptr noundef nonnull %9, ptr noundef nonnull %4, ptr noundef nonnull %10, ptr noundef nonnull %6)
  %41 = load i64, ptr %6, align 8, !tbaa !5
  %.not = icmp eq i64 %41, 0
  br i1 %.not, label %43, label %42

42:                                               ; preds = %._crit_edge37
  call void (ptr, ...) @_Z8MyPrintfPKcz(ptr noundef nonnull @.str.24, i64 noundef %41)
  br label %43

43:                                               ; preds = %._crit_edge37, %42
  %.027 = phi i32 [ 143, %42 ], [ 0, %._crit_edge37 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %44

44:                                               ; preds = %5, %43, %15
  %.128 = phi i32 [ 143, %15 ], [ %.027, %43 ], [ 0, %5 ]
  ret i32 %.128
}

declare void @dtrtrs_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !18, i64 1076}
!10 = !{!"_ZTSN7qpOASES14SQProblemSchurE", !11, i64 0, !15, i64 1056, !15, i64 1064, !18, i64 1072, !18, i64 1076, !15, i64 1080, !15, i64 1088, !20, i64 1096, !20, i64 1104, !18, i64 1112, !15, i64 1120, !15, i64 1128, !18, i64 1136, !15, i64 1144, !15, i64 1152, !15, i64 1160, !19, i64 1168, !19, i64 1208}
!11 = !{!"_ZTSN7qpOASES9SQProblemE", !12, i64 0}
!12 = !{!"_ZTSN7qpOASES8QProblemE", !13, i64 0, !14, i64 800, !15, i64 808, !15, i64 816, !15, i64 824, !27, i64 832, !15, i64 952, !15, i64 960, !18, i64 968, !15, i64 976, !15, i64 984, !15, i64 992, !15, i64 1000, !15, i64 1008, !15, i64 1016, !15, i64 1024, !15, i64 1032, !15, i64 1040, !15, i64 1048}
!13 = !{!"_ZTSN7qpOASES9QProblemBE", !14, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !16, i64 48, !15, i64 168, !14, i64 176, !15, i64 184, !15, i64 192, !20, i64 200, !21, i64 208, !14, i64 212, !14, i64 216, !22, i64 220, !20, i64 224, !18, i64 232, !15, i64 240, !20, i64 248, !20, i64 256, !18, i64 264, !23, i64 272, !26, i64 496, !28, i64 768}
!14 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!"_ZTSN7qpOASES6BoundsE", !17, i64 0, !19, i64 40, !19, i64 80}
!17 = !{!"_ZTSN7qpOASES9SubjectToE", !18, i64 8, !15, i64 16, !15, i64 24, !14, i64 32, !14, i64 36}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN7qpOASES9IndexlistE", !15, i64 0, !15, i64 8, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32}
!20 = !{!"double", !7, i64 0}
!21 = !{!"_ZTSN7qpOASES14QProblemStatusE", !7, i64 0}
!22 = !{!"_ZTSN7qpOASES11HessianTypeE", !7, i64 0}
!23 = !{!"_ZTSN7qpOASES7OptionsE", !24, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !18, i64 28, !18, i64 32, !14, i64 36, !20, i64 40, !20, i64 48, !20, i64 56, !20, i64 64, !20, i64 72, !20, i64 80, !20, i64 88, !20, i64 96, !20, i64 104, !20, i64 112, !20, i64 120, !25, i64 128, !20, i64 136, !18, i64 144, !20, i64 152, !18, i64 160, !20, i64 168, !20, i64 176, !20, i64 184, !20, i64 192, !14, i64 200, !14, i64 204, !18, i64 208, !18, i64 212, !18, i64 216}
!24 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!25 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!26 = !{!"_ZTSN7qpOASES7FlipperE", !18, i64 0, !18, i64 4, !16, i64 8, !27, i64 128, !15, i64 248, !15, i64 256, !15, i64 264}
!27 = !{!"_ZTSN7qpOASES11ConstraintsE", !17, i64 0, !19, i64 40, !19, i64 80}
!28 = !{!"_ZTSN7qpOASES13TabularOutputE", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28}
!29 = !{!20, !20, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = !{!10, !15, i64 1088}


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