; LLVM IR from Tencent-RoboticsX/jbdl :: src/jbdl/experimental/qpoases/src (Matrices)

; 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::SparseMatrix" = type { ptr, i32, i32, ptr, ptr, ptr, ptr, %"class.qpOASES::Matrix.base" }
%"class.qpOASES::Matrix.base" = type <{ ptr, i32 }>

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES6getAbsEd(double noundef) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES7getSqrtEd(double noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK7qpOASES12SparseMatrix10getRowNormEPdi(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef %1, i32 noundef %2) unnamed_addr #3 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  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
  %11 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %22, %3
  %13 = load i32, ptr %9, align 4, !tbaa !9
  %14 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 1
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = icmp slt i32 %13, %15
  br i1 %16, label %17, label %25

17:                                               ; preds = %12
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = load i32, ptr %9, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds double, ptr %18, i64 %20
  store double 0.000000e+00, ptr %21, align 8, !tbaa !13
  br label %22

22:                                               ; preds = %17
  %23 = load i32, ptr %9, align 4, !tbaa !9
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %9, align 4, !tbaa !9
  br label %12, !llvm.loop !15

25:                                               ; preds = %12
  %26 = load i32, ptr %7, align 4, !tbaa !9
  switch i32 %26, label %152 [
    i32 2, label %27
    i32 1, label %102
  ]

27:                                               ; preds = %25
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %78, %27
  %29 = load i32, ptr %9, align 4, !tbaa !9
  %30 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 2
  %31 = load i32, ptr %30, align 4, !tbaa !17
  %32 = icmp slt i32 %29, %31
  br i1 %32, label %33, label %81

33:                                               ; preds = %28
  %34 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 4
  %35 = load ptr, ptr %34, align 8, !tbaa !18
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i32, ptr %35, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !9
  store i32 %39, ptr %8, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %74, %33
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 4
  %43 = load ptr, ptr %42, align 8, !tbaa !18
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr %43, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = icmp slt i32 %41, %48
  br i1 %49, label %50, label %77

50:                                               ; preds = %40
  %51 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 6
  %52 = load ptr, ptr %51, align 8, !tbaa !19
  %53 = load i32, ptr %8, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds double, ptr %52, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !13
  %57 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 6
  %58 = load ptr, ptr %57, align 8, !tbaa !19
  %59 = load i32, ptr %8, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds double, ptr %58, i64 %60
  %62 = load double, ptr %61, align 8, !tbaa !13
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !20
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i32, ptr %65, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds double, ptr %63, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !13
  %73 = call double @llvm.fmuladd.f64(double %56, double %62, double %72)
  store double %73, ptr %71, align 8, !tbaa !13
  br label %74

74:                                               ; preds = %50
  %75 = load i32, ptr %8, align 4, !tbaa !9
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %8, align 4, !tbaa !9
  br label %40, !llvm.loop !21

77:                                               ; preds = %40
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %9, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %9, align 4, !tbaa !9
  br label %28, !llvm.loop !22

81:                                               ; preds = %28
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %98, %81
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 1
  %85 = load i32, ptr %84, align 8, !tbaa !11
  %86 = icmp slt i32 %83, %85
  br i1 %86, label %87, label %101

87:                                               ; preds = %82
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %88, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !13
  %93 = call noundef double @_ZN7qpOASES7getSqrtEd(double noundef %92)
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = load i32, ptr %9, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds double, ptr %94, i64 %96
  store double %93, ptr %97, align 8, !tbaa !13
  br label %98

98:                                               ; preds = %87
  %99 = load i32, ptr %9, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %9, align 4, !tbaa !9
  br label %82, !llvm.loop !23

101:                                              ; preds = %82
  br label %153

102:                                              ; preds = %25
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %148, %102
  %104 = load i32, ptr %9, align 4, !tbaa !9
  %105 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 2
  %106 = load i32, ptr %105, align 4, !tbaa !17
  %107 = icmp slt i32 %104, %106
  br i1 %107, label %108, label %151

108:                                              ; preds = %103
  %109 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 4
  %110 = load ptr, ptr %109, align 8, !tbaa !18
  %111 = load i32, ptr %9, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds i32, ptr %110, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !9
  store i32 %114, ptr %8, align 4, !tbaa !9
  br label %115

115:                                              ; preds = %126, %108
  %116 = load i32, ptr %8, align 4, !tbaa !9
  %117 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 4
  %118 = load ptr, ptr %117, align 8, !tbaa !18
  %119 = load i32, ptr %9, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr %118, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !9
  %124 = icmp slt i32 %116, %123
  br i1 %124, label %125, label %129

125:                                              ; preds = %115
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %8, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %8, align 4, !tbaa !9
  br label %115, !llvm.loop !24

129:                                              ; preds = %115
  %130 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 6
  %131 = load ptr, ptr %130, align 8, !tbaa !19
  %132 = load i32, ptr %8, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds double, ptr %131, i64 %133
  %135 = load double, ptr %134, align 8, !tbaa !13
  %136 = call noundef double @_ZN7qpOASES6getAbsEd(double noundef %135)
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %11, i32 0, i32 3
  %139 = load ptr, ptr %138, align 8, !tbaa !20
  %140 = load i32, ptr %8, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds i32, ptr %139, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds double, ptr %137, i64 %144
  %146 = load double, ptr %145, align 8, !tbaa !13
  %147 = fadd double %146, %136
  store double %147, ptr %145, align 8, !tbaa !13
  br label %148

148:                                              ; preds = %129
  %149 = load i32, ptr %9, align 4, !tbaa !9
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %9, align 4, !tbaa !9
  br label %103, !llvm.loop !25

151:                                              ; preds = %103
  br label %153

152:                                              ; preds = %25
  store i32 3, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %154

153:                                              ; preds = %151, %101
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %154

154:                                              ; preds = %153, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %155 = load i32, ptr %4, align 4
  ret i32 %155
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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, !10, i64 8}
!12 = !{!"_ZTSN7qpOASES12SparseMatrixE", !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!12, !10, i64 12}
!18 = !{!12, !6, i64 24}
!19 = !{!12, !6, i64 40}
!20 = !{!12, !6, i64 16}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !16}
!25 = distinct !{!25, !16}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES6getAbsEd(double noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES7getSqrtEd(double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef range(i32 0, 4) i32 @_ZNK7qpOASES12SparseMatrix10getRowNormEPdi(ptr nocapture noundef nonnull readonly align 8 dereferenceable(48) %0, ptr nocapture noundef %1, i32 noundef %2) unnamed_addr #2 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %3
  %7 = zext nneg i32 %5 to i64
  %8 = shl nuw nsw i64 %7, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %1, i8 0, i64 %8, i1 false), !tbaa !11
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %3
  switch i32 %2, label %.loopexit [
    i32 2, label %.preheader35
    i32 1, label %.preheader36
  ]

.preheader36:                                     ; preds = %._crit_edge
  %9 = getelementptr inbounds i8, ptr %0, i64 12
  %10 = load i32, ptr %9, align 4, !tbaa !13
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph42, label %.loopexit

.lr.ph42:                                         ; preds = %.preheader36
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = getelementptr inbounds i8, ptr %0, i64 40
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  br label %63

.preheader35:                                     ; preds = %._crit_edge
  %15 = getelementptr inbounds i8, ptr %0, i64 12
  %16 = load i32, ptr %15, align 4, !tbaa !13
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph47, label %.preheader

.lr.ph47:                                         ; preds = %.preheader35
  %18 = getelementptr inbounds i8, ptr %0, i64 24
  %19 = load ptr, ptr %18, align 8, !tbaa !14
  %20 = getelementptr inbounds i8, ptr %0, i64 40
  %21 = load ptr, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = load ptr, ptr %22, align 8
  %wide.trip.count59 = zext nneg i32 %16 to i64
  %.pre = load i32, ptr %19, align 4, !tbaa !15
  br label %24

.loopexit34:                                      ; preds = %.lr.ph45.prol.loopexit, %.lr.ph45, %24
  %exitcond60.not = icmp eq i64 %indvars.iv.next57, %wide.trip.count59
  br i1 %exitcond60.not, label %.preheader, label %24, !llvm.loop !16

.preheader:                                       ; preds = %.loopexit34, %.preheader35
  br i1 %6, label %.lr.ph49, label %.loopexit

24:                                               ; preds = %.lr.ph47, %.loopexit34
  %25 = phi i32 [ %.pre, %.lr.ph47 ], [ %27, %.loopexit34 ]
  %indvars.iv56 = phi i64 [ 0, %.lr.ph47 ], [ %indvars.iv.next57, %.loopexit34 ]
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %26 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.next57
  %27 = load i32, ptr %26, align 4, !tbaa !15
  %28 = icmp slt i32 %25, %27
  br i1 %28, label %.lr.ph45.preheader, label %.loopexit34

.lr.ph45.preheader:                               ; preds = %24
  %29 = sext i32 %25 to i64
  %wide.trip.count = sext i32 %27 to i64
  %30 = sub nsw i64 %wide.trip.count, %29
  %xtraiter = and i64 %30, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph45.prol.loopexit, label %.lr.ph45.prol

.lr.ph45.prol:                                    ; preds = %.lr.ph45.preheader
  %31 = getelementptr inbounds double, ptr %21, i64 %29
  %32 = load double, ptr %31, align 8, !tbaa !11
  %33 = getelementptr inbounds i32, ptr %23, i64 %29
  %34 = load i32, ptr %33, align 4, !tbaa !15
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds double, ptr %1, i64 %35
  %37 = load double, ptr %36, align 8, !tbaa !11
  %38 = tail call double @llvm.fmuladd.f64(double %32, double %32, double %37)
  store double %38, ptr %36, align 8, !tbaa !11
  %indvars.iv.next54.prol = add nsw i64 %29, 1
  br label %.lr.ph45.prol.loopexit

.lr.ph45.prol.loopexit:                           ; preds = %.lr.ph45.prol, %.lr.ph45.preheader
  %indvars.iv53.unr = phi i64 [ %29, %.lr.ph45.preheader ], [ %indvars.iv.next54.prol, %.lr.ph45.prol ]
  %39 = add nsw i64 %wide.trip.count, -1
  %40 = icmp eq i64 %39, %29
  br i1 %40, label %.loopexit34, label %.lr.ph45

.lr.ph45:                                         ; preds = %.lr.ph45.prol.loopexit, %.lr.ph45
  %indvars.iv53 = phi i64 [ %indvars.iv.next54.1, %.lr.ph45 ], [ %indvars.iv53.unr, %.lr.ph45.prol.loopexit ]
  %41 = getelementptr inbounds double, ptr %21, i64 %indvars.iv53
  %42 = load double, ptr %41, align 8, !tbaa !11
  %43 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv53
  %44 = load i32, ptr %43, align 4, !tbaa !15
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds double, ptr %1, i64 %45
  %47 = load double, ptr %46, align 8, !tbaa !11
  %48 = tail call double @llvm.fmuladd.f64(double %42, double %42, double %47)
  store double %48, ptr %46, align 8, !tbaa !11
  %indvars.iv.next54 = add nsw i64 %indvars.iv53, 1
  %49 = getelementptr inbounds double, ptr %21, i64 %indvars.iv.next54
  %50 = load double, ptr %49, align 8, !tbaa !11
  %51 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv.next54
  %52 = load i32, ptr %51, align 4, !tbaa !15
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds double, ptr %1, i64 %53
  %55 = load double, ptr %54, align 8, !tbaa !11
  %56 = tail call double @llvm.fmuladd.f64(double %50, double %50, double %55)
  store double %56, ptr %54, align 8, !tbaa !11
  %indvars.iv.next54.1 = add nsw i64 %indvars.iv53, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next54.1, %wide.trip.count
  br i1 %exitcond.not.1, label %.loopexit34, label %.lr.ph45, !llvm.loop !18

.lr.ph49:                                         ; preds = %.preheader, %.lr.ph49
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %.lr.ph49 ], [ 0, %.preheader ]
  %57 = getelementptr inbounds double, ptr %1, i64 %indvars.iv61
  %58 = load double, ptr %57, align 8, !tbaa !11
  %59 = tail call noundef double @_ZN7qpOASES7getSqrtEd(double noundef %58)
  store double %59, ptr %57, align 8, !tbaa !11
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %60 = load i32, ptr %4, align 8, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next62, %61
  br i1 %62, label %.lr.ph49, label %.loopexit, !llvm.loop !19

63:                                               ; preds = %.lr.ph42, %63
  %indvars.iv = phi i64 [ 0, %.lr.ph42 ], [ %indvars.iv.next, %63 ]
  %64 = load ptr, ptr %12, align 8, !tbaa !14
  %65 = getelementptr inbounds i32, ptr %64, i64 %indvars.iv
  %66 = load i32, ptr %65, align 4, !tbaa !15
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %67 = getelementptr inbounds i32, ptr %64, i64 %indvars.iv.next
  %68 = load i32, ptr %67, align 4, !tbaa !15
  %smax = tail call i32 @llvm.smax.i32(i32 %66, i32 %68)
  %69 = load ptr, ptr %13, align 8, !tbaa !20
  %70 = sext i32 %smax to i64
  %71 = getelementptr inbounds double, ptr %69, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !11
  %73 = tail call noundef double @_ZN7qpOASES6getAbsEd(double noundef %72)
  %74 = load ptr, ptr %14, align 8, !tbaa !21
  %75 = getelementptr inbounds i32, ptr %74, i64 %70
  %76 = load i32, ptr %75, align 4, !tbaa !15
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds double, ptr %1, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !11
  %80 = fadd double %73, %79
  store double %80, ptr %78, align 8, !tbaa !11
  %81 = load i32, ptr %9, align 4, !tbaa !13
  %82 = sext i32 %81 to i64
  %83 = icmp slt i64 %indvars.iv.next, %82
  br i1 %83, label %63, label %.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %63, %.lr.ph49, %.preheader36, %.preheader, %._crit_edge
  %.033 = phi i32 [ 3, %._crit_edge ], [ 0, %.preheader ], [ 0, %.preheader36 ], [ 0, %.lr.ph49 ], [ 0, %63 ]
  ret i32 %.033
}

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !7, i64 8}
!6 = !{!"_ZTSN7qpOASES12SparseMatrixE", !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!6, !7, i64 12}
!14 = !{!6, !10, i64 24}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = !{!6, !10, i64 40}
!21 = !{!6, !10, i64 16}
!22 = distinct !{!22, !17}


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