; 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 }

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

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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) #0

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

; 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 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) #0

; 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 @_ZN7qpOASES9QProblemB14solveInitialQPEPKdS2_PKNS_6BoundsES2_RiPd(ptr noundef nonnull align 8 dereferenceable(800), 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 @_ZN7qpOASES9QProblemB4initEPKcS2_S2_S2_RiPdPKdS6_PKNS_6BoundsES2_(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10) #4 align 2 {
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %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 i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  store ptr %0, ptr %13, align 8, !tbaa !5
  store ptr %1, ptr %14, align 8, !tbaa !5
  store ptr %2, ptr %15, align 8, !tbaa !5
  store ptr %3, ptr %16, align 8, !tbaa !5
  store ptr %4, ptr %17, align 8, !tbaa !5
  store ptr %5, ptr %18, align 8, !tbaa !5
  store ptr %6, ptr %19, align 8, !tbaa !5
  store ptr %7, ptr %20, align 8, !tbaa !5
  store ptr %8, ptr %21, align 8, !tbaa !5
  store ptr %9, ptr %22, align 8, !tbaa !5
  store ptr %10, ptr %23, align 8, !tbaa !5
  %28 = load ptr, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %29 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %28)
  store i32 %29, ptr %25, align 4, !tbaa !9
  %30 = load i32, ptr %25, align 4, !tbaa !9
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %35

32:                                               ; preds = %11
  %33 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %34 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %33, i32 noundef 29, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 363, i32 noundef 1)
  store i32 %34, ptr %12, align 4
  store i32 1, ptr %26, align 4
  br label %136

35:                                               ; preds = %11
  %36 = call noundef i32 @_ZNK7qpOASES9QProblemB13isInitialisedEv(ptr noundef nonnull align 8 dereferenceable(800) %28)
  %37 = icmp eq i32 %36, 1
  br i1 %37, label %38, label %45

38:                                               ; preds = %35
  %39 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %40 = call noundef i32 @_ZN7qpOASES15MessageHandling12throwWarningENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %39, i32 noundef 30, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 368, i32 noundef 1)
  %41 = load ptr, ptr %28, align 8, !tbaa !11
  %42 = getelementptr inbounds ptr, ptr %41, i64 3
  %43 = load ptr, ptr %42, align 8
  %44 = call noundef i32 %43(ptr noundef nonnull align 8 dereferenceable(800) %28)
  br label %45

45:                                               ; preds = %38, %35
  %46 = load ptr, ptr %22, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %66

48:                                               ; preds = %45
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %62, %48
  %50 = load i32, ptr %24, align 4, !tbaa !9
  %51 = load i32, ptr %25, align 4, !tbaa !9
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %53, label %65

53:                                               ; preds = %49
  %54 = load ptr, ptr %22, align 8, !tbaa !5
  %55 = load i32, ptr %24, align 4, !tbaa !9
  %56 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %54, i32 noundef %55)
  %57 = icmp eq i32 %56, 4
  br i1 %57, label %58, label %61

58:                                               ; preds = %53
  %59 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %60 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %59, i32 noundef 3, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 377, i32 noundef 1)
  store i32 %60, ptr %12, align 4
  store i32 1, ptr %26, align 4
  br label %136

61:                                               ; preds = %53
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %24, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %24, align 4, !tbaa !9
  br label %49, !llvm.loop !13

65:                                               ; preds = %49
  br label %66

66:                                               ; preds = %65, %45
  %67 = load ptr, ptr %20, align 8, !tbaa !5
  %68 = icmp eq ptr %67, null
  br i1 %68, label %69, label %78

69:                                               ; preds = %66
  %70 = load ptr, ptr %21, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %78

72:                                               ; preds = %69
  %73 = load ptr, ptr %22, align 8, !tbaa !5
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %78

75:                                               ; preds = %72
  %76 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %77 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %76, i32 noundef 3, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 383, i32 noundef 1)
  store i32 %77, ptr %12, align 4
  store i32 1, ptr %26, align 4
  br label %136

78:                                               ; preds = %72, %69, %66
  %79 = load ptr, ptr %23, align 8, !tbaa !5
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %93

81:                                               ; preds = %78
  %82 = load ptr, ptr %20, align 8, !tbaa !5
  %83 = icmp ne ptr %82, null
  br i1 %83, label %90, label %84

84:                                               ; preds = %81
  %85 = load ptr, ptr %21, align 8, !tbaa !5
  %86 = icmp ne ptr %85, null
  br i1 %86, label %90, label %87

87:                                               ; preds = %84
  %88 = load ptr, ptr %22, align 8, !tbaa !5
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %93

90:                                               ; preds = %87, %84, %81
  %91 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %92 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %91, i32 noundef 44, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 386, i32 noundef 1)
  store i32 %92, ptr %12, align 4
  store i32 1, ptr %26, align 4
  br label %136

93:                                               ; preds = %87, %78
  %94 = load ptr, ptr %14, align 8, !tbaa !5
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  %97 = load ptr, ptr %17, align 8, !tbaa !5
  %98 = call noundef i32 @_ZN7qpOASES9QProblemB19setupQPdataFromFileEPKcS2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(800) %28, ptr noundef %94, ptr noundef %95, ptr noundef %96, ptr noundef %97)
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %103

100:                                              ; preds = %93
  %101 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %102 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %101, i32 noundef 129, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 390, i32 noundef 1)
  store i32 %102, ptr %12, align 4
  store i32 1, ptr %26, align 4
  br label %136

103:                                              ; preds = %93
  %104 = load ptr, ptr %23, align 8, !tbaa !5
  %105 = icmp eq ptr %104, null
  br i1 %105, label %106, label %113

106:                                              ; preds = %103
  %107 = load ptr, ptr %20, align 8, !tbaa !5
  %108 = load ptr, ptr %21, align 8, !tbaa !5
  %109 = load ptr, ptr %22, align 8, !tbaa !5
  %110 = load ptr, ptr %18, align 8, !tbaa !5
  %111 = load ptr, ptr %19, align 8, !tbaa !5
  %112 = call noundef i32 @_ZN7qpOASES9QProblemB14solveInitialQPEPKdS2_PKNS_6BoundsES2_RiPd(ptr noundef nonnull align 8 dereferenceable(800) %28, ptr noundef %107, ptr noundef %108, ptr noundef %109, ptr noundef null, ptr noundef nonnull align 4 dereferenceable(4) %110, ptr noundef %111)
  store i32 %112, ptr %12, align 4
  store i32 1, ptr %26, align 4
  br label %136

113:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %114 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %28, i32 0, i32 7
  %115 = load ptr, ptr %114, align 8, !tbaa !15
  %116 = load i32, ptr %25, align 4, !tbaa !9
  %117 = load i32, ptr %25, align 4, !tbaa !9
  %118 = load ptr, ptr %23, align 8, !tbaa !5
  %119 = call noundef i32 @_ZN7qpOASES12readFromFileEPdiiPKc(ptr noundef %115, i32 noundef %116, i32 noundef %117, ptr noundef %118)
  store i32 %119, ptr %27, align 4, !tbaa !30
  %120 = load i32, ptr %27, align 4, !tbaa !30
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %126

122:                                              ; preds = %113
  %123 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %124 = load i32, ptr %27, align 4, !tbaa !30
  %125 = call noundef i32 @_ZN7qpOASES15MessageHandling12throwWarningENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %123, i32 noundef %124, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 402, i32 noundef 1)
  store i32 %125, ptr %12, align 4
  store i32 1, ptr %26, align 4
  br label %135

126:                                              ; preds = %113
  %127 = load ptr, ptr %20, align 8, !tbaa !5
  %128 = load ptr, ptr %21, align 8, !tbaa !5
  %129 = load ptr, ptr %22, align 8, !tbaa !5
  %130 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %28, i32 0, i32 7
  %131 = load ptr, ptr %130, align 8, !tbaa !15
  %132 = load ptr, ptr %18, align 8, !tbaa !5
  %133 = load ptr, ptr %19, align 8, !tbaa !5
  %134 = call noundef i32 @_ZN7qpOASES9QProblemB14solveInitialQPEPKdS2_PKNS_6BoundsES2_RiPd(ptr noundef nonnull align 8 dereferenceable(800) %28, ptr noundef %127, ptr noundef %128, ptr noundef %129, ptr noundef %131, ptr noundef nonnull align 4 dereferenceable(4) %132, ptr noundef %133)
  store i32 %134, ptr %12, align 4
  store i32 1, ptr %26, align 4
  br label %135

135:                                              ; preds = %126, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %136

136:                                              ; preds = %135, %106, %100, %90, %75, %58, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  %137 = load i32, ptr %12, align 4
  ret i32 %137
}

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

declare noundef i32 @_ZN7qpOASES12readFromFileEPdiiPKc(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #0

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


; 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 [104 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 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 @_ZN7qpOASES9QProblemB14solveInitialQPEPKdS2_PKNS_6BoundsES2_RiPd(ptr noundef nonnull align 8 dereferenceable(800), 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 @_ZN7qpOASES9QProblemB4initEPKcS2_S2_S2_RiPdPKdS6_PKNS_6BoundsES2_(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10) local_unnamed_addr #3 align 2 {
  %12 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %14, label %17

14:                                               ; preds = %11
  %15 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %16 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %15, i32 noundef 29, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 363, i32 noundef 1)
  br label %68

17:                                               ; preds = %11
  %18 = tail call noundef i32 @_ZNK7qpOASES9QProblemB13isInitialisedEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %19 = icmp eq i32 %18, 1
  br i1 %19, label %20, label %27

20:                                               ; preds = %17
  %21 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %22 = tail call noundef i32 @_ZN7qpOASES15MessageHandling12throwWarningENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %21, i32 noundef 30, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 368, i32 noundef 1)
  %23 = load ptr, ptr %0, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 24
  %25 = load ptr, ptr %24, align 8
  %26 = tail call noundef i32 %25(ptr noundef nonnull align 8 dereferenceable(800) %0)
  br label %27

27:                                               ; preds = %20, %17
  %28 = icmp ne ptr %9, null
  br i1 %28, label %.preheader, label %.thread

.preheader:                                       ; preds = %27
  %29 = icmp sgt i32 %12, 0
  br i1 %29, label %.lr.ph, label %._crit_edge

.thread:                                          ; preds = %27
  %30 = icmp ne ptr %8, null
  br label %43

31:                                               ; preds = %.lr.ph
  %32 = add nuw nsw i32 %.04254, 1
  %exitcond.not = icmp eq i32 %32, %12
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !8

.lr.ph:                                           ; preds = %.preheader, %31
  %.04254 = phi i32 [ %32, %31 ], [ 0, %.preheader ]
  %33 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %9, i32 noundef %.04254)
  %34 = icmp eq i32 %33, 4
  br i1 %34, label %35, label %31

35:                                               ; preds = %.lr.ph
  %36 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %37 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %36, i32 noundef 3, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 377, i32 noundef 1)
  br label %68

._crit_edge:                                      ; preds = %31, %.preheader
  %38 = icmp eq ptr %7, null
  %39 = icmp ne ptr %8, null
  %or.cond = and i1 %38, %39
  br i1 %or.cond, label %40, label %43

40:                                               ; preds = %._crit_edge
  %41 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %42 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %41, i32 noundef 3, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 383, i32 noundef 1)
  br label %68

43:                                               ; preds = %.thread, %._crit_edge
  %44 = phi i1 [ %30, %.thread ], [ %39, %._crit_edge ]
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %50, label %45

45:                                               ; preds = %43
  %46 = icmp ne ptr %7, null
  %or.cond5 = or i1 %46, %44
  %or.cond7 = or i1 %28, %or.cond5
  br i1 %or.cond7, label %47, label %.thread51

47:                                               ; preds = %45
  %48 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %49 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %48, i32 noundef 44, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 386, i32 noundef 1)
  br label %68

50:                                               ; preds = %43
  %51 = tail call noundef i32 @_ZN7qpOASES9QProblemB19setupQPdataFromFileEPKcS2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4)
  %.not47 = icmp eq i32 %51, 0
  br i1 %.not47, label %56, label %53

.thread51:                                        ; preds = %45
  %52 = tail call noundef i32 @_ZN7qpOASES9QProblemB19setupQPdataFromFileEPKcS2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4)
  %.not4752 = icmp eq i32 %52, 0
  br i1 %.not4752, label %58, label %53

53:                                               ; preds = %.thread51, %50
  %54 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %55 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %54, i32 noundef 129, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 390, i32 noundef 1)
  br label %68

56:                                               ; preds = %50
  %57 = tail call noundef i32 @_ZN7qpOASES9QProblemB14solveInitialQPEPKdS2_PKNS_6BoundsES2_RiPd(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef null, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef %6)
  br label %68

58:                                               ; preds = %.thread51
  %59 = getelementptr inbounds i8, ptr %0, i64 168
  %60 = load ptr, ptr %59, align 8, !tbaa !10
  %61 = tail call noundef i32 @_ZN7qpOASES12readFromFileEPdiiPKc(ptr noundef %60, i32 noundef %12, i32 noundef %12, ptr noundef nonnull %10)
  %.not48 = icmp eq i32 %61, 0
  br i1 %.not48, label %65, label %62

62:                                               ; preds = %58
  %63 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %64 = tail call noundef i32 @_ZN7qpOASES15MessageHandling12throwWarningENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %63, i32 noundef %61, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 402, i32 noundef 1)
  br label %68

65:                                               ; preds = %58
  %66 = load ptr, ptr %59, align 8, !tbaa !10
  %67 = tail call noundef i32 @_ZN7qpOASES9QProblemB14solveInitialQPEPKdS2_PKNS_6BoundsES2_RiPd(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef null, ptr noundef %8, ptr noundef null, ptr noundef %66, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef %6)
  br label %68

68:                                               ; preds = %62, %65, %56, %53, %47, %40, %35, %14
  %.1 = phi i32 [ %16, %14 ], [ %37, %35 ], [ %42, %40 ], [ %49, %47 ], [ %55, %53 ], [ %57, %56 ], [ %64, %62 ], [ %67, %65 ]
  ret i32 %.1
}

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

declare noundef i32 @_ZN7qpOASES12readFromFileEPdiiPKc(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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


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