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

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

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1

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

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() #1

declare noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef) #1

; 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)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1064)) #2 align 2

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

declare noundef i32 @_ZN7qpOASES15MessageHandling12throwWarningENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES8QProblem4initEPKdS2_S2_S2_S2_S2_S2_RiPdS2_S2_PKNS_6BoundsEPKNS_11ConstraintsES2_(ptr noundef nonnull align 8 dereferenceable(1064) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14) #4 align 2 {
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  store ptr %0, ptr %17, align 8, !tbaa !5
  store ptr %1, ptr %18, align 8, !tbaa !5
  store ptr %2, ptr %19, align 8, !tbaa !5
  store ptr %3, ptr %20, align 8, !tbaa !5
  store ptr %4, ptr %21, align 8, !tbaa !5
  store ptr %5, ptr %22, align 8, !tbaa !5
  store ptr %6, ptr %23, align 8, !tbaa !5
  store ptr %7, ptr %24, align 8, !tbaa !5
  store ptr %8, ptr %25, align 8, !tbaa !5
  store ptr %9, ptr %26, align 8, !tbaa !5
  store ptr %10, ptr %27, align 8, !tbaa !5
  store ptr %11, ptr %28, align 8, !tbaa !5
  store ptr %12, ptr %29, align 8, !tbaa !5
  store ptr %13, ptr %30, align 8, !tbaa !5
  store ptr %14, ptr %31, align 8, !tbaa !5
  %36 = load ptr, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  %37 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %36)
  store i32 %37, ptr %33, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  %38 = call noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1064) %36)
  store i32 %38, ptr %34, align 4, !tbaa !9
  %39 = load i32, ptr %33, align 4, !tbaa !9
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %44

41:                                               ; preds = %15
  %42 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %43 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %42, i32 noundef 29, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 330, i32 noundef 1)
  store i32 %43, ptr %16, align 4
  store i32 1, ptr %35, align 4
  br label %151

44:                                               ; preds = %15
  %45 = call noundef i32 @_ZNK7qpOASES9QProblemB13isInitialisedEv(ptr noundef nonnull align 8 dereferenceable(800) %36)
  %46 = icmp eq i32 %45, 1
  br i1 %46, label %47, label %54

47:                                               ; preds = %44
  %48 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %49 = call noundef i32 @_ZN7qpOASES15MessageHandling12throwWarningENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %48, i32 noundef 30, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 335, i32 noundef 1)
  %50 = load ptr, ptr %36, align 8, !tbaa !11
  %51 = getelementptr inbounds ptr, ptr %50, i64 3
  %52 = load ptr, ptr %51, align 8
  %53 = call noundef i32 %52(ptr noundef nonnull align 8 dereferenceable(1064) %36)
  br label %54

54:                                               ; preds = %47, %44
  %55 = load ptr, ptr %29, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %75

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

58:                                               ; preds = %71, %57
  %59 = load i32, ptr %32, align 4, !tbaa !9
  %60 = load i32, ptr %33, align 4, !tbaa !9
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %74

62:                                               ; preds = %58
  %63 = load ptr, ptr %29, align 8, !tbaa !5
  %64 = load i32, ptr %32, align 4, !tbaa !9
  %65 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %63, i32 noundef %64)
  %66 = icmp eq i32 %65, 4
  br i1 %66, label %67, label %70

67:                                               ; preds = %62
  %68 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %69 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %68, i32 noundef 3, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 344, i32 noundef 1)
  store i32 %69, ptr %16, align 4
  store i32 1, ptr %35, align 4
  br label %151

70:                                               ; preds = %62
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %32, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %32, align 4, !tbaa !9
  br label %58, !llvm.loop !13

74:                                               ; preds = %58
  br label %75

75:                                               ; preds = %74, %54
  %76 = load ptr, ptr %30, align 8, !tbaa !5
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %96

78:                                               ; preds = %75
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %92, %78
  %80 = load i32, ptr %32, align 4, !tbaa !9
  %81 = load i32, ptr %34, align 4, !tbaa !9
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %83, label %95

83:                                               ; preds = %79
  %84 = load ptr, ptr %30, align 8, !tbaa !5
  %85 = load i32, ptr %32, align 4, !tbaa !9
  %86 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %84, i32 noundef %85)
  %87 = icmp eq i32 %86, 4
  br i1 %87, label %88, label %91

88:                                               ; preds = %83
  %89 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %90 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %89, i32 noundef 3, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 352, i32 noundef 1)
  store i32 %90, ptr %16, align 4
  store i32 1, ptr %35, align 4
  br label %151

91:                                               ; preds = %83
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %32, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %32, align 4, !tbaa !9
  br label %79, !llvm.loop !15

95:                                               ; preds = %79
  br label %96

96:                                               ; preds = %95, %75
  %97 = load ptr, ptr %27, align 8, !tbaa !5
  %98 = icmp eq ptr %97, null
  br i1 %98, label %99, label %111

99:                                               ; preds = %96
  %100 = load ptr, ptr %28, align 8, !tbaa !5
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %111

102:                                              ; preds = %99
  %103 = load ptr, ptr %29, align 8, !tbaa !5
  %104 = icmp ne ptr %103, null
  br i1 %104, label %108, label %105

105:                                              ; preds = %102
  %106 = load ptr, ptr %30, align 8, !tbaa !5
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %111

108:                                              ; preds = %105, %102
  %109 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %110 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %109, i32 noundef 3, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 357, i32 noundef 1)
  store i32 %110, ptr %16, align 4
  store i32 1, ptr %35, align 4
  br label %151

111:                                              ; preds = %105, %99, %96
  %112 = load ptr, ptr %31, align 8, !tbaa !5
  %113 = icmp ne ptr %112, null
  br i1 %113, label %114, label %129

114:                                              ; preds = %111
  %115 = load ptr, ptr %27, align 8, !tbaa !5
  %116 = icmp ne ptr %115, null
  br i1 %116, label %126, label %117

117:                                              ; preds = %114
  %118 = load ptr, ptr %28, align 8, !tbaa !5
  %119 = icmp ne ptr %118, null
  br i1 %119, label %126, label %120

120:                                              ; preds = %117
  %121 = load ptr, ptr %29, align 8, !tbaa !5
  %122 = icmp ne ptr %121, null
  br i1 %122, label %126, label %123

123:                                              ; preds = %120
  %124 = load ptr, ptr %30, align 8, !tbaa !5
  %125 = icmp ne ptr %124, null
  br i1 %125, label %126, label %129

126:                                              ; preds = %123, %120, %117, %114
  %127 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %128 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %127, i32 noundef 44, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 360, i32 noundef 1)
  store i32 %128, ptr %16, align 4
  store i32 1, ptr %35, align 4
  br label %151

129:                                              ; preds = %123, %111
  %130 = load ptr, ptr %18, align 8, !tbaa !5
  %131 = load ptr, ptr %19, align 8, !tbaa !5
  %132 = load ptr, ptr %20, align 8, !tbaa !5
  %133 = load ptr, ptr %21, align 8, !tbaa !5
  %134 = load ptr, ptr %22, align 8, !tbaa !5
  %135 = load ptr, ptr %23, align 8, !tbaa !5
  %136 = load ptr, ptr %24, align 8, !tbaa !5
  %137 = call noundef i32 @_ZN7qpOASES8QProblem11setupQPdataEPKdS2_S2_S2_S2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(1064) %36, ptr noundef %130, ptr noundef %131, ptr noundef %132, ptr noundef %133, ptr noundef %134, ptr noundef %135, ptr noundef %136)
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %142

139:                                              ; preds = %129
  %140 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %141 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %140, i32 noundef 3, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 364, i32 noundef 1)
  store i32 %141, ptr %16, align 4
  store i32 1, ptr %35, align 4
  br label %151

142:                                              ; preds = %129
  %143 = load ptr, ptr %27, align 8, !tbaa !5
  %144 = load ptr, ptr %28, align 8, !tbaa !5
  %145 = load ptr, ptr %29, align 8, !tbaa !5
  %146 = load ptr, ptr %30, align 8, !tbaa !5
  %147 = load ptr, ptr %31, align 8, !tbaa !5
  %148 = load ptr, ptr %25, align 8, !tbaa !5
  %149 = load ptr, ptr %26, align 8, !tbaa !5
  %150 = call noundef i32 @_ZN7qpOASES8QProblem14solveInitialQPEPKdS2_PKNS_6BoundsEPKNS_11ConstraintsES2_RiPd(ptr noundef nonnull align 8 dereferenceable(1064) %36, ptr noundef %143, ptr noundef %144, ptr noundef %145, ptr noundef %146, ptr noundef %147, ptr noundef nonnull align 4 dereferenceable(4) %148, ptr noundef %149)
  store i32 %150, ptr %16, align 4
  store i32 1, ptr %35, align 4
  br label %151

151:                                              ; preds = %142, %139, %126, %108, %88, %67, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  %152 = load i32, ptr %16, align 4
  ret i32 %152
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() local_unnamed_addr #0

declare noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1064)) local_unnamed_addr #1 align 2

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

declare noundef i32 @_ZN7qpOASES15MessageHandling12throwWarningENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7qpOASES8QProblem14solveInitialQPEPKdS2_PKNS_6BoundsEPKNS_11ConstraintsES2_RiPd(ptr noundef nonnull align 8 dereferenceable(1064), ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES8QProblem4initEPKdS2_S2_S2_S2_S2_S2_RiPdS2_S2_PKNS_6BoundsEPKNS_11ConstraintsES2_(ptr noundef nonnull align 8 dereferenceable(1064) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14) local_unnamed_addr #3 align 2 {
  %16 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %17 = tail call noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1064) %0)
  %18 = icmp eq i32 %16, 0
  br i1 %18, label %19, label %22

19:                                               ; preds = %15
  %20 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %21 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %20, i32 noundef 29, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 330, i32 noundef 1)
  br label %70

22:                                               ; preds = %15
  %23 = tail call noundef i32 @_ZNK7qpOASES9QProblemB13isInitialisedEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %24 = icmp eq i32 %23, 1
  br i1 %24, label %25, label %32

25:                                               ; preds = %22
  %26 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %27 = tail call noundef i32 @_ZN7qpOASES15MessageHandling12throwWarningENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %26, i32 noundef 30, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 335, i32 noundef 1)
  %28 = load ptr, ptr %0, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %28, i64 24
  %30 = load ptr, ptr %29, align 8
  %31 = tail call noundef i32 %30(ptr noundef nonnull align 8 dereferenceable(1064) %0)
  br label %32

32:                                               ; preds = %25, %22
  %33 = icmp ne ptr %12, null
  %34 = icmp sgt i32 %16, 0
  %or.cond = and i1 %33, %34
  br i1 %or.cond, label %.lr.ph, label %.loopexit53

35:                                               ; preds = %.lr.ph
  %36 = add nuw nsw i32 %.04654, 1
  %exitcond.not = icmp eq i32 %36, %16
  br i1 %exitcond.not, label %.loopexit53, label %.lr.ph, !llvm.loop !8

.lr.ph:                                           ; preds = %32, %35
  %.04654 = phi i32 [ %36, %35 ], [ 0, %32 ]
  %37 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef %.04654)
  %38 = icmp eq i32 %37, 4
  br i1 %38, label %39, label %35

39:                                               ; preds = %.lr.ph
  %40 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %41 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %40, i32 noundef 3, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 344, i32 noundef 1)
  br label %70

.loopexit53:                                      ; preds = %35, %32
  %42 = icmp ne ptr %13, null
  %43 = icmp sgt i32 %17, 0
  %or.cond57 = and i1 %42, %43
  br i1 %or.cond57, label %.lr.ph56, label %.loopexit

44:                                               ; preds = %.lr.ph56
  %45 = add nuw nsw i32 %.155, 1
  %exitcond58.not = icmp eq i32 %45, %17
  br i1 %exitcond58.not, label %.loopexit, label %.lr.ph56, !llvm.loop !10

.lr.ph56:                                         ; preds = %.loopexit53, %44
  %.155 = phi i32 [ %45, %44 ], [ 0, %.loopexit53 ]
  %46 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %13, i32 noundef %.155)
  %47 = icmp eq i32 %46, 4
  br i1 %47, label %48, label %44

48:                                               ; preds = %.lr.ph56
  %49 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %50 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %49, i32 noundef 3, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 352, i32 noundef 1)
  br label %70

.loopexit:                                        ; preds = %44, %.loopexit53
  %51 = icmp eq ptr %10, null
  %52 = icmp ne ptr %11, null
  %or.cond3 = or i1 %33, %42
  %53 = and i1 %51, %or.cond3
  %or.cond51 = and i1 %52, %53
  br i1 %or.cond51, label %54, label %57

54:                                               ; preds = %.loopexit
  %55 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %56 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %55, i32 noundef 3, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 357, i32 noundef 1)
  br label %70

57:                                               ; preds = %.loopexit
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %63, label %58

58:                                               ; preds = %57
  %59 = icmp ne ptr %10, null
  %or.cond5 = or i1 %59, %52
  %or.cond7 = or i1 %or.cond5, %33
  %or.cond9 = or i1 %or.cond7, %42
  br i1 %or.cond9, label %60, label %63

60:                                               ; preds = %58
  %61 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %62 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %61, i32 noundef 44, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 360, i32 noundef 1)
  br label %70

63:                                               ; preds = %58, %57
  %64 = tail call noundef i32 @_ZN7qpOASES8QProblem11setupQPdataEPKdS2_S2_S2_S2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(1064) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7)
  %.not50 = icmp eq i32 %64, 0
  br i1 %.not50, label %68, label %65

65:                                               ; preds = %63
  %66 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %67 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %66, i32 noundef 3, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 364, i32 noundef 1)
  br label %70

68:                                               ; preds = %63
  %69 = tail call noundef i32 @_ZN7qpOASES8QProblem14solveInitialQPEPKdS2_PKNS_6BoundsEPKNS_11ConstraintsES2_RiPd(ptr noundef nonnull align 8 dereferenceable(1064) %0, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef %9)
  br label %70

70:                                               ; preds = %68, %65, %60, %54, %48, %39, %19
  %.0 = phi i32 [ %21, %19 ], [ %41, %39 ], [ %50, %48 ], [ %56, %54 ], [ %62, %60 ], [ %67, %65 ], [ %69, %68 ]
  ret i32 %.0
}

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

attributes #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 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" }

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


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