; LLVM IR from Tencent-RoboticsX/jbdl :: src/jbdl/experimental/qpoases/src/QProblemB.ll (ZN7qpOASES9QProblemB14performRampingEv)

; 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::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::Indexlist" = type <{ ptr, ptr, i32, i32, i32, i32, i32, [4 x i8] }>
%"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 }
%"class.qpOASES::Constraints" = type { %"class.qpOASES::SubjectTo", %"class.qpOASES::Indexlist", %"class.qpOASES::Indexlist" }
%"struct.qpOASES::TabularOutput" = type { i32, i32, i32, i32, i32, i32, i32, 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 uwtable
declare dso_local noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES9QProblemB14performRampingEv(ptr noundef nonnull align 8 dereferenceable(800) %0) unnamed_addr #4 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %9 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %8)
  store i32 %9, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %10

10:                                               ; preds = %154, %1
  %11 = load i32, ptr %5, align 4, !tbaa !9
  %12 = load i32, ptr %3, align 4, !tbaa !9
  %13 = icmp slt i32 %11, %12
  br i1 %13, label %14, label %157

14:                                               ; preds = %10
  %15 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 6
  %16 = load i32, ptr %5, align 4, !tbaa !9
  %17 = call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %15, i32 noundef %16)
  switch i32 %17, label %43 [
    i32 2, label %18
    i32 0, label %41
    i32 3, label %42
  ]

18:                                               ; preds = %14
  %19 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 9
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds double, ptr %20, i64 %22
  %24 = load double, ptr %23, align 8, !tbaa !26
  %25 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 4
  %26 = load ptr, ptr %25, align 8, !tbaa !27
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds double, ptr %26, i64 %28
  store double %24, ptr %29, align 8, !tbaa !26
  %30 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 9
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  %32 = load i32, ptr %5, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds double, ptr %31, i64 %33
  %35 = load double, ptr %34, align 8, !tbaa !26
  %36 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 5
  %37 = load ptr, ptr %36, align 8, !tbaa !28
  %38 = load i32, ptr %5, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds double, ptr %37, i64 %39
  store double %35, ptr %40, align 8, !tbaa !26
  br label %154

41:                                               ; preds = %14
  br label %154

42:                                               ; preds = %14
  br label %154

43:                                               ; preds = %14
  br label %44

44:                                               ; preds = %43
  %45 = load i32, ptr %5, align 4, !tbaa !9
  %46 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 21
  %47 = load i32, ptr %46, align 8, !tbaa !29
  %48 = add nsw i32 %45, %47
  %49 = load i32, ptr %3, align 4, !tbaa !9
  %50 = srem i32 %48, %49
  %51 = sitofp i32 %50 to double
  %52 = load i32, ptr %3, align 4, !tbaa !9
  %53 = sub nsw i32 %52, 1
  %54 = sitofp i32 %53 to double
  %55 = fdiv double %51, %54
  store double %55, ptr %6, align 8, !tbaa !26
  %56 = load double, ptr %6, align 8, !tbaa !26
  %57 = fsub double 1.000000e+00, %56
  %58 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 19
  %59 = load double, ptr %58, align 8, !tbaa !30
  %60 = load double, ptr %6, align 8, !tbaa !26
  %61 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 20
  %62 = load double, ptr %61, align 8, !tbaa !31
  %63 = fmul double %60, %62
  %64 = call double @llvm.fmuladd.f64(double %57, double %59, double %63)
  store double %64, ptr %7, align 8, !tbaa !26
  %65 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 6
  %66 = load i32, ptr %5, align 4, !tbaa !9
  %67 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %65, i32 noundef %66)
  store i32 %67, ptr %4, align 4, !tbaa !9
  %68 = load i32, ptr %4, align 4, !tbaa !9
  %69 = icmp ne i32 %68, -1
  br i1 %69, label %70, label %84

70:                                               ; preds = %44
  %71 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 9
  %72 = load ptr, ptr %71, align 8, !tbaa !11
  %73 = load i32, ptr %5, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds double, ptr %72, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !26
  %77 = load double, ptr %7, align 8, !tbaa !26
  %78 = fsub double %76, %77
  %79 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 4
  %80 = load ptr, ptr %79, align 8, !tbaa !27
  %81 = load i32, ptr %5, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds double, ptr %80, i64 %82
  store double %78, ptr %83, align 8, !tbaa !26
  br label %84

84:                                               ; preds = %70, %44
  %85 = load i32, ptr %4, align 4, !tbaa !9
  %86 = icmp ne i32 %85, 1
  br i1 %86, label %87, label %101

87:                                               ; preds = %84
  %88 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 9
  %89 = load ptr, ptr %88, align 8, !tbaa !11
  %90 = load i32, ptr %5, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds double, ptr %89, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !26
  %94 = load double, ptr %7, align 8, !tbaa !26
  %95 = fadd double %93, %94
  %96 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 5
  %97 = load ptr, ptr %96, align 8, !tbaa !28
  %98 = load i32, ptr %5, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds double, ptr %97, i64 %99
  store double %95, ptr %100, align 8, !tbaa !26
  br label %101

101:                                              ; preds = %87, %84
  %102 = load i32, ptr %4, align 4, !tbaa !9
  %103 = icmp eq i32 %102, -1
  br i1 %103, label %104, label %122

104:                                              ; preds = %101
  %105 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 9
  %106 = load ptr, ptr %105, align 8, !tbaa !11
  %107 = load i32, ptr %5, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds double, ptr %106, i64 %108
  %110 = load double, ptr %109, align 8, !tbaa !26
  %111 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 4
  %112 = load ptr, ptr %111, align 8, !tbaa !27
  %113 = load i32, ptr %5, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds double, ptr %112, i64 %114
  store double %110, ptr %115, align 8, !tbaa !26
  %116 = load double, ptr %7, align 8, !tbaa !26
  %117 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 10
  %118 = load ptr, ptr %117, align 8, !tbaa !32
  %119 = load i32, ptr %5, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds double, ptr %118, i64 %120
  store double %116, ptr %121, align 8, !tbaa !26
  br label %122

122:                                              ; preds = %104, %101
  %123 = load i32, ptr %4, align 4, !tbaa !9
  %124 = icmp eq i32 %123, 1
  br i1 %124, label %125, label %144

125:                                              ; preds = %122
  %126 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 9
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = load i32, ptr %5, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds double, ptr %127, i64 %129
  %131 = load double, ptr %130, align 8, !tbaa !26
  %132 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 5
  %133 = load ptr, ptr %132, align 8, !tbaa !28
  %134 = load i32, ptr %5, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds double, ptr %133, i64 %135
  store double %131, ptr %136, align 8, !tbaa !26
  %137 = load double, ptr %7, align 8, !tbaa !26
  %138 = fneg double %137
  %139 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 10
  %140 = load ptr, ptr %139, align 8, !tbaa !32
  %141 = load i32, ptr %5, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds double, ptr %140, i64 %142
  store double %138, ptr %143, align 8, !tbaa !26
  br label %144

144:                                              ; preds = %125, %122
  %145 = load i32, ptr %4, align 4, !tbaa !9
  %146 = icmp eq i32 %145, 0
  br i1 %146, label %147, label %153

147:                                              ; preds = %144
  %148 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 10
  %149 = load ptr, ptr %148, align 8, !tbaa !32
  %150 = load i32, ptr %5, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds double, ptr %149, i64 %151
  store double 0.000000e+00, ptr %152, align 8, !tbaa !26
  br label %153

153:                                              ; preds = %147, %144
  br label %154

154:                                              ; preds = %153, %42, %41, %18
  %155 = load i32, ptr %5, align 4, !tbaa !9
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %5, align 4, !tbaa !9
  br label %10, !llvm.loop !33

157:                                              ; preds = %10
  %158 = call noundef i32 @_ZN7qpOASES9QProblemB24setupAuxiliaryQPgradientEv(ptr noundef nonnull align 8 dereferenceable(800) %8)
  %159 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %8, i32 0, i32 21
  %160 = load i32, ptr %159, align 8, !tbaa !29
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %159, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret i32 0
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7qpOASES9QProblemB24setupAuxiliaryQPgradientEv(ptr noundef nonnull align 8 dereferenceable(800)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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, !6, i64 184}
!12 = !{!"_ZTSN7qpOASES9QProblemBE", !13, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !14, i64 48, !6, i64 168, !13, i64 176, !6, i64 184, !6, i64 192, !17, i64 200, !18, i64 208, !13, i64 212, !13, i64 216, !19, i64 220, !17, i64 224, !10, i64 232, !6, i64 240, !17, i64 248, !17, i64 256, !10, i64 264, !20, i64 272, !23, i64 496, !25, i64 768}
!13 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!14 = !{!"_ZTSN7qpOASES6BoundsE", !15, i64 0, !16, i64 40, !16, i64 80}
!15 = !{!"_ZTSN7qpOASES9SubjectToE", !10, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !13, i64 36}
!16 = !{!"_ZTSN7qpOASES9IndexlistE", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_ZTSN7qpOASES14QProblemStatusE", !7, i64 0}
!19 = !{!"_ZTSN7qpOASES11HessianTypeE", !7, i64 0}
!20 = !{!"_ZTSN7qpOASES7OptionsE", !21, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !10, i64 28, !10, i64 32, !13, i64 36, !17, i64 40, !17, i64 48, !17, i64 56, !17, i64 64, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !17, i64 104, !17, i64 112, !17, i64 120, !22, i64 128, !17, i64 136, !10, i64 144, !17, i64 152, !10, i64 160, !17, i64 168, !17, i64 176, !17, i64 184, !17, i64 192, !13, i64 200, !13, i64 204, !10, i64 208, !10, i64 212, !10, i64 216}
!21 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!22 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!23 = !{!"_ZTSN7qpOASES7FlipperE", !10, i64 0, !10, i64 4, !14, i64 8, !24, i64 128, !6, i64 248, !6, i64 256, !6, i64 264}
!24 = !{!"_ZTSN7qpOASES11ConstraintsE", !15, i64 0, !16, i64 40, !16, i64 80}
!25 = !{!"_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}
!26 = !{!17, !17, i64 0}
!27 = !{!12, !6, i64 32}
!28 = !{!12, !6, i64 40}
!29 = !{!12, !10, i64 264}
!30 = !{!12, !17, i64 248}
!31 = !{!12, !17, i64 256}
!32 = !{!12, !6, i64 192}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress 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 i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES9QProblemB14performRampingEv(ptr noundef nonnull align 8 dereferenceable(800) %0) unnamed_addr #3 align 2 {
  %2 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %3 = icmp sgt i32 %2, 0
  br i1 %3, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 48
  %5 = getelementptr inbounds i8, ptr %0, i64 184
  %6 = getelementptr inbounds i8, ptr %0, i64 32
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = getelementptr inbounds i8, ptr %0, i64 264
  %9 = add nsw i32 %2, -1
  %10 = uitofp nneg i32 %9 to double
  %11 = getelementptr inbounds i8, ptr %0, i64 248
  %12 = getelementptr inbounds i8, ptr %0, i64 256
  %13 = getelementptr inbounds i8, ptr %0, i64 192
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %14

14:                                               ; preds = %.lr.ph, %59
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %59 ]
  %15 = trunc nuw nsw i64 %indvars.iv to i32
  %16 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %4, i32 noundef %15)
  switch i32 %16, label %23 [
    i32 2, label %17
    i32 0, label %59
    i32 3, label %59
  ]

17:                                               ; preds = %14
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds double, ptr %18, i64 %indvars.iv
  %20 = load double, ptr %19, align 8, !tbaa !24
  %21 = load ptr, ptr %6, align 8, !tbaa !25
  %22 = getelementptr inbounds double, ptr %21, i64 %indvars.iv
  store double %20, ptr %22, align 8, !tbaa !24
  br label %.sink.split

23:                                               ; preds = %14
  %24 = load i32, ptr %8, align 8, !tbaa !26
  %25 = add nsw i32 %24, %15
  %26 = srem i32 %25, %2
  %27 = sitofp i32 %26 to double
  %28 = fdiv double %27, %10
  %29 = fsub double 1.000000e+00, %28
  %30 = load double, ptr %11, align 8, !tbaa !27
  %31 = load double, ptr %12, align 8, !tbaa !28
  %32 = fmul double %28, %31
  %33 = tail call double @llvm.fmuladd.f64(double %29, double %30, double %32)
  %34 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %4, i32 noundef %15)
  %cond = icmp eq i32 %34, -1
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds double, ptr %35, i64 %indvars.iv
  %37 = load double, ptr %36, align 8, !tbaa !24
  br i1 %cond, label %.thread, label %44

.thread:                                          ; preds = %23
  %38 = fadd double %33, %37
  %39 = load ptr, ptr %7, align 8, !tbaa !29
  %40 = getelementptr inbounds double, ptr %39, i64 %indvars.iv
  store double %38, ptr %40, align 8, !tbaa !24
  %41 = load double, ptr %36, align 8, !tbaa !24
  %42 = load ptr, ptr %6, align 8, !tbaa !25
  %43 = getelementptr inbounds double, ptr %42, i64 %indvars.iv
  store double %41, ptr %43, align 8, !tbaa !24
  br label %.sink.split

44:                                               ; preds = %23
  %45 = fsub double %37, %33
  %46 = load ptr, ptr %6, align 8, !tbaa !25
  %47 = getelementptr inbounds double, ptr %46, i64 %indvars.iv
  store double %45, ptr %47, align 8, !tbaa !24
  %cond36 = icmp eq i32 %34, 1
  %48 = load double, ptr %36, align 8, !tbaa !24
  br i1 %cond36, label %53, label %49

49:                                               ; preds = %44
  %50 = fadd double %33, %48
  %51 = load ptr, ptr %7, align 8, !tbaa !29
  %52 = getelementptr inbounds double, ptr %51, i64 %indvars.iv
  store double %50, ptr %52, align 8, !tbaa !24
  %cond37 = icmp eq i32 %34, 0
  br i1 %cond37, label %.sink.split, label %59

53:                                               ; preds = %44
  %54 = load ptr, ptr %7, align 8, !tbaa !29
  %55 = getelementptr inbounds double, ptr %54, i64 %indvars.iv
  store double %48, ptr %55, align 8, !tbaa !24
  %56 = fneg double %33
  br label %.sink.split

.sink.split:                                      ; preds = %49, %17, %.thread, %53
  %.sink42 = phi ptr [ %13, %53 ], [ %13, %.thread ], [ %7, %17 ], [ %13, %49 ]
  %.sink = phi double [ %56, %53 ], [ %33, %.thread ], [ %20, %17 ], [ 0.000000e+00, %49 ]
  %57 = load ptr, ptr %.sink42, align 8, !tbaa !30
  %58 = getelementptr inbounds double, ptr %57, i64 %indvars.iv
  store double %.sink, ptr %58, align 8, !tbaa !24
  br label %59

59:                                               ; preds = %.sink.split, %49, %14, %14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %14, !llvm.loop !31

._crit_edge:                                      ; preds = %59, %1
  %60 = tail call noundef i32 @_ZN7qpOASES9QProblemB24setupAuxiliaryQPgradientEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %61 = getelementptr inbounds i8, ptr %0, i64 264
  %62 = load i32, ptr %61, align 8, !tbaa !26
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %61, align 8, !tbaa !26
  ret i32 0
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7qpOASES9QProblemB24setupAuxiliaryQPgradientEv(ptr noundef nonnull align 8 dereferenceable(800)) local_unnamed_addr #3 align 2

attributes #0 = { inlinehint 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 = { 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 = { 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" }

!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, !10, i64 184}
!6 = !{!"_ZTSN7qpOASES9QProblemBE", !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !11, i64 48, !10, i64 168, !7, i64 176, !10, i64 184, !10, i64 192, !15, i64 200, !16, i64 208, !7, i64 212, !7, i64 216, !17, i64 220, !15, i64 224, !13, i64 232, !10, i64 240, !15, i64 248, !15, i64 256, !13, i64 264, !18, i64 272, !21, i64 496, !23, i64 768}
!7 = !{!"_ZTSN7qpOASES11BooleanTypeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTSN7qpOASES6BoundsE", !12, i64 0, !14, i64 40, !14, i64 80}
!12 = !{!"_ZTSN7qpOASES9SubjectToE", !13, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !7, i64 36}
!13 = !{!"int", !8, i64 0}
!14 = !{!"_ZTSN7qpOASES9IndexlistE", !10, i64 0, !10, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32}
!15 = !{!"double", !8, i64 0}
!16 = !{!"_ZTSN7qpOASES14QProblemStatusE", !8, i64 0}
!17 = !{!"_ZTSN7qpOASES11HessianTypeE", !8, i64 0}
!18 = !{!"_ZTSN7qpOASES7OptionsE", !19, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !13, i64 28, !13, i64 32, !7, i64 36, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !20, i64 128, !15, i64 136, !13, i64 144, !15, i64 152, !13, i64 160, !15, i64 168, !15, i64 176, !15, i64 184, !15, i64 192, !7, i64 200, !7, i64 204, !13, i64 208, !13, i64 212, !13, i64 216}
!19 = !{!"_ZTSN7qpOASES10PrintLevelE", !8, i64 0}
!20 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !8, i64 0}
!21 = !{!"_ZTSN7qpOASES7FlipperE", !13, i64 0, !13, i64 4, !11, i64 8, !22, i64 128, !10, i64 248, !10, i64 256, !10, i64 264}
!22 = !{!"_ZTSN7qpOASES11ConstraintsE", !12, i64 0, !14, i64 40, !14, i64 80}
!23 = !{!"_ZTSN7qpOASES13TabularOutputE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28}
!24 = !{!15, !15, i64 0}
!25 = !{!6, !10, i64 32}
!26 = !{!6, !13, i64 264}
!27 = !{!6, !15, i64 248}
!28 = !{!6, !15, i64 256}
!29 = !{!6, !10, i64 40}
!30 = !{!10, !10, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


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