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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES6getMinEdd(double noundef, double noundef) #2

; 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
declare dso_local noundef i32 @_ZN7qpOASES9QProblemB24setupAuxiliaryQPgradientEv(ptr noundef nonnull align 8 dereferenceable(800)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES6getMaxEdd(double noundef, double noundef) #2

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

7:                                                ; preds = %172, %1
  %8 = load i32, ptr %3, align 4, !tbaa !9
  %9 = load i32, ptr %4, align 4, !tbaa !9
  %10 = icmp slt i32 %8, %9
  br i1 %10, label %11, label %175

11:                                               ; preds = %7
  %12 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 6
  %13 = load i32, ptr %3, align 4, !tbaa !9
  %14 = call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef %13)
  switch i32 %14, label %171 [
    i32 1, label %15
    i32 2, label %147
    i32 0, label %170
    i32 4, label %170
    i32 3, label %170
  ]

15:                                               ; preds = %11
  %16 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 6
  %17 = load i32, ptr %3, align 4, !tbaa !9
  %18 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %16, i32 noundef %17)
  switch i32 %18, label %146 [
    i32 -1, label %19
    i32 1, label %61
    i32 0, label %103
    i32 4, label %145
    i32 2, label %145
    i32 3, label %145
  ]

19:                                               ; preds = %15
  %20 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 9
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = load i32, ptr %3, align 4, !tbaa !9
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds double, ptr %21, i64 %23
  %25 = load double, ptr %24, align 8, !tbaa !26
  %26 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 4
  %27 = load ptr, ptr %26, align 8, !tbaa !27
  %28 = load i32, ptr %3, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds double, ptr %27, i64 %29
  store double %25, ptr %30, align 8, !tbaa !26
  %31 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 5
  %32 = load ptr, ptr %31, align 8, !tbaa !28
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds double, ptr %32, i64 %34
  %36 = load double, ptr %35, align 8, !tbaa !26
  %37 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 9
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = load i32, ptr %3, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds double, ptr %38, i64 %40
  %42 = load double, ptr %41, align 8, !tbaa !26
  %43 = call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %36, double noundef %42)
  %44 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 5
  %45 = load ptr, ptr %44, align 8, !tbaa !28
  %46 = load i32, ptr %3, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds double, ptr %45, i64 %47
  store double %43, ptr %48, align 8, !tbaa !26
  %49 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 10
  %50 = load ptr, ptr %49, align 8, !tbaa !29
  %51 = load i32, ptr %3, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds double, ptr %50, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !26
  %55 = call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %54, double noundef 0.000000e+00)
  %56 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 10
  %57 = load ptr, ptr %56, align 8, !tbaa !29
  %58 = load i32, ptr %3, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %57, i64 %59
  store double %55, ptr %60, align 8, !tbaa !26
  br label %146

61:                                               ; preds = %15
  %62 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !27
  %64 = load i32, ptr %3, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds double, ptr %63, i64 %65
  %67 = load double, ptr %66, align 8, !tbaa !26
  %68 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 9
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = load i32, ptr %3, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds double, ptr %69, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !26
  %74 = call noundef double @_ZN7qpOASES6getMinEdd(double noundef %67, double noundef %73)
  %75 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !27
  %77 = load i32, ptr %3, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds double, ptr %76, i64 %78
  store double %74, ptr %79, align 8, !tbaa !26
  %80 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 9
  %81 = load ptr, ptr %80, align 8, !tbaa !11
  %82 = load i32, ptr %3, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds double, ptr %81, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !26
  %86 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 5
  %87 = load ptr, ptr %86, align 8, !tbaa !28
  %88 = load i32, ptr %3, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds double, ptr %87, i64 %89
  store double %85, ptr %90, align 8, !tbaa !26
  %91 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 10
  %92 = load ptr, ptr %91, align 8, !tbaa !29
  %93 = load i32, ptr %3, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds double, ptr %92, i64 %94
  %96 = load double, ptr %95, align 8, !tbaa !26
  %97 = call noundef double @_ZN7qpOASES6getMinEdd(double noundef %96, double noundef 0.000000e+00)
  %98 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 10
  %99 = load ptr, ptr %98, align 8, !tbaa !29
  %100 = load i32, ptr %3, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds double, ptr %99, i64 %101
  store double %97, ptr %102, align 8, !tbaa !26
  br label %146

103:                                              ; preds = %15
  %104 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 4
  %105 = load ptr, ptr %104, align 8, !tbaa !27
  %106 = load i32, ptr %3, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %105, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !26
  %110 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 9
  %111 = load ptr, ptr %110, align 8, !tbaa !11
  %112 = load i32, ptr %3, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds double, ptr %111, i64 %113
  %115 = load double, ptr %114, align 8, !tbaa !26
  %116 = call noundef double @_ZN7qpOASES6getMinEdd(double noundef %109, double noundef %115)
  %117 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 4
  %118 = load ptr, ptr %117, align 8, !tbaa !27
  %119 = load i32, ptr %3, 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
  %122 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 5
  %123 = load ptr, ptr %122, align 8, !tbaa !28
  %124 = load i32, ptr %3, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds double, ptr %123, i64 %125
  %127 = load double, ptr %126, align 8, !tbaa !26
  %128 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 9
  %129 = load ptr, ptr %128, align 8, !tbaa !11
  %130 = load i32, ptr %3, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds double, ptr %129, i64 %131
  %133 = load double, ptr %132, align 8, !tbaa !26
  %134 = call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %127, double noundef %133)
  %135 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 5
  %136 = load ptr, ptr %135, align 8, !tbaa !28
  %137 = load i32, ptr %3, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds double, ptr %136, i64 %138
  store double %134, ptr %139, align 8, !tbaa !26
  %140 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 10
  %141 = load ptr, ptr %140, align 8, !tbaa !29
  %142 = load i32, ptr %3, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds double, ptr %141, i64 %143
  store double 0.000000e+00, ptr %144, align 8, !tbaa !26
  br label %146

145:                                              ; preds = %15, %15, %15
  br label %146

146:                                              ; preds = %145, %103, %61, %19, %15
  br label %171

147:                                              ; preds = %11
  %148 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 9
  %149 = load ptr, ptr %148, align 8, !tbaa !11
  %150 = load i32, ptr %3, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds double, ptr %149, i64 %151
  %153 = load double, ptr %152, align 8, !tbaa !26
  %154 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 4
  %155 = load ptr, ptr %154, align 8, !tbaa !27
  %156 = load i32, ptr %3, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds double, ptr %155, i64 %157
  store double %153, ptr %158, align 8, !tbaa !26
  %159 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 9
  %160 = load ptr, ptr %159, align 8, !tbaa !11
  %161 = load i32, ptr %3, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds double, ptr %160, i64 %162
  %164 = load double, ptr %163, align 8, !tbaa !26
  %165 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %5, i32 0, i32 5
  %166 = load ptr, ptr %165, align 8, !tbaa !28
  %167 = load i32, ptr %3, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds double, ptr %166, i64 %168
  store double %164, ptr %169, align 8, !tbaa !26
  br label %171

170:                                              ; preds = %11, %11, %11
  br label %171

171:                                              ; preds = %170, %147, %146, %11
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %3, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %3, align 4, !tbaa !9
  br label %7, !llvm.loop !30

175:                                              ; preds = %7
  %176 = call noundef i32 @_ZN7qpOASES9QProblemB24setupAuxiliaryQPgradientEv(ptr noundef nonnull align 8 dereferenceable(800) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  ret i32 %176
}

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 = { 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, !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, !6, i64 192}
!30 = distinct !{!30, !31}
!31 = !{!"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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES6getMinEdd(double noundef, double noundef) local_unnamed_addr #1

; 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
declare dso_local noundef i32 @_ZN7qpOASES9QProblemB24setupAuxiliaryQPgradientEv(ptr noundef nonnull align 8 dereferenceable(800)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES9QProblemB22performDriftCorrectionEv(ptr noundef nonnull align 8 dereferenceable(800) %0) unnamed_addr #2 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 192
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %9

9:                                                ; preds = %.lr.ph, %76
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %76 ]
  %10 = trunc nuw nsw i64 %indvars.iv to i32
  %11 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %4, i32 noundef %10)
  switch i32 %11, label %76 [
    i32 1, label %12
    i32 2, label %68
  ]

12:                                               ; preds = %9
  %13 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %4, i32 noundef %10)
  switch i32 %13, label %76 [
    i32 -1, label %14
    i32 1, label %30
    i32 0, label %49
  ]

14:                                               ; preds = %12
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds double, ptr %15, i64 %indvars.iv
  %17 = load double, ptr %16, align 8, !tbaa !24
  %18 = load ptr, ptr %6, align 8, !tbaa !25
  %19 = getelementptr inbounds double, ptr %18, i64 %indvars.iv
  store double %17, ptr %19, align 8, !tbaa !24
  %20 = load ptr, ptr %7, align 8, !tbaa !26
  %21 = getelementptr inbounds double, ptr %20, i64 %indvars.iv
  %22 = load double, ptr %21, align 8, !tbaa !24
  %23 = tail call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %22, double noundef %17)
  %24 = load ptr, ptr %7, align 8, !tbaa !26
  %25 = getelementptr inbounds double, ptr %24, i64 %indvars.iv
  store double %23, ptr %25, align 8, !tbaa !24
  %26 = load ptr, ptr %8, align 8, !tbaa !27
  %27 = getelementptr inbounds double, ptr %26, i64 %indvars.iv
  %28 = load double, ptr %27, align 8, !tbaa !24
  %29 = tail call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %28, double noundef 0.000000e+00)
  br label %.sink.split

30:                                               ; preds = %12
  %31 = load ptr, ptr %6, align 8, !tbaa !25
  %32 = getelementptr inbounds double, ptr %31, i64 %indvars.iv
  %33 = load double, ptr %32, align 8, !tbaa !24
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds double, ptr %34, i64 %indvars.iv
  %36 = load double, ptr %35, align 8, !tbaa !24
  %37 = tail call noundef double @_ZN7qpOASES6getMinEdd(double noundef %33, double noundef %36)
  %38 = load ptr, ptr %6, align 8, !tbaa !25
  %39 = getelementptr inbounds double, ptr %38, i64 %indvars.iv
  store double %37, ptr %39, align 8, !tbaa !24
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds double, ptr %40, i64 %indvars.iv
  %42 = load double, ptr %41, align 8, !tbaa !24
  %43 = load ptr, ptr %7, align 8, !tbaa !26
  %44 = getelementptr inbounds double, ptr %43, i64 %indvars.iv
  store double %42, ptr %44, align 8, !tbaa !24
  %45 = load ptr, ptr %8, align 8, !tbaa !27
  %46 = getelementptr inbounds double, ptr %45, i64 %indvars.iv
  %47 = load double, ptr %46, align 8, !tbaa !24
  %48 = tail call noundef double @_ZN7qpOASES6getMinEdd(double noundef %47, double noundef 0.000000e+00)
  br label %.sink.split

49:                                               ; preds = %12
  %50 = load ptr, ptr %6, align 8, !tbaa !25
  %51 = getelementptr inbounds double, ptr %50, i64 %indvars.iv
  %52 = load double, ptr %51, align 8, !tbaa !24
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds double, ptr %53, i64 %indvars.iv
  %55 = load double, ptr %54, align 8, !tbaa !24
  %56 = tail call noundef double @_ZN7qpOASES6getMinEdd(double noundef %52, double noundef %55)
  %57 = load ptr, ptr %6, align 8, !tbaa !25
  %58 = getelementptr inbounds double, ptr %57, i64 %indvars.iv
  store double %56, ptr %58, align 8, !tbaa !24
  %59 = load ptr, ptr %7, align 8, !tbaa !26
  %60 = getelementptr inbounds double, ptr %59, i64 %indvars.iv
  %61 = load double, ptr %60, align 8, !tbaa !24
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds double, ptr %62, i64 %indvars.iv
  %64 = load double, ptr %63, align 8, !tbaa !24
  %65 = tail call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %61, double noundef %64)
  %66 = load ptr, ptr %7, align 8, !tbaa !26
  %67 = getelementptr inbounds double, ptr %66, i64 %indvars.iv
  store double %65, ptr %67, align 8, !tbaa !24
  br label %.sink.split

68:                                               ; preds = %9
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds double, ptr %69, i64 %indvars.iv
  %71 = load double, ptr %70, align 8, !tbaa !24
  %72 = load ptr, ptr %6, align 8, !tbaa !25
  %73 = getelementptr inbounds double, ptr %72, i64 %indvars.iv
  store double %71, ptr %73, align 8, !tbaa !24
  br label %.sink.split

.sink.split:                                      ; preds = %14, %30, %49, %68
  %.sink34 = phi ptr [ %7, %68 ], [ %8, %49 ], [ %8, %30 ], [ %8, %14 ]
  %.sink = phi double [ %71, %68 ], [ 0.000000e+00, %49 ], [ %48, %30 ], [ %29, %14 ]
  %74 = load ptr, ptr %.sink34, align 8, !tbaa !28
  %75 = getelementptr inbounds double, ptr %74, i64 %indvars.iv
  store double %.sink, ptr %75, align 8, !tbaa !24
  br label %76

76:                                               ; preds = %.sink.split, %9, %12
  %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 %9, !llvm.loop !29

._crit_edge:                                      ; preds = %76, %1
  %77 = tail call noundef i32 @_ZN7qpOASES9QProblemB24setupAuxiliaryQPgradientEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  ret i32 %77
}

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 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, !10, i64 40}
!27 = !{!6, !10, i64 192}
!28 = !{!10, !10, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


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