; 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 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES9QProblemB24setupAuxiliaryWorkingSetEPKNS_6BoundsENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef %1, i32 noundef %2) #4 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  %12 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %13 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %12)
  store i32 %13, ptr %9, align 4, !tbaa !11
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %39

16:                                               ; preds = %3
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %17

17:                                               ; preds = %35, %16
  %18 = load i32, ptr %8, align 4, !tbaa !11
  %19 = load i32, ptr %9, align 4, !tbaa !11
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %21, label %38

21:                                               ; preds = %17
  %22 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %12, i32 0, i32 6
  %23 = load i32, ptr %8, align 4, !tbaa !11
  %24 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %22, i32 noundef %23)
  %25 = icmp eq i32 %24, 4
  br i1 %25, label %31, label %26

26:                                               ; preds = %21
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = load i32, ptr %8, align 4, !tbaa !11
  %29 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %27, i32 noundef %28)
  %30 = icmp eq i32 %29, 4
  br i1 %30, label %31, label %34

31:                                               ; preds = %26, %21
  %32 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %33 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %32, i32 noundef 9, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 2775, i32 noundef 1)
  store i32 %33, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %131

34:                                               ; preds = %26
  br label %35

35:                                               ; preds = %34
  %36 = load i32, ptr %8, align 4, !tbaa !11
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %8, align 4, !tbaa !11
  br label %17, !llvm.loop !13

38:                                               ; preds = %17
  br label %42

39:                                               ; preds = %3
  %40 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %41 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %40, i32 noundef 3, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 2779, i32 noundef 1)
  store i32 %41, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %131

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %45, label %46

45:                                               ; preds = %42
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %47

46:                                               ; preds = %42
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %46, %45
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %98

50:                                               ; preds = %47
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %51

51:                                               ; preds = %94, %50
  %52 = load i32, ptr %8, align 4, !tbaa !11
  %53 = load i32, ptr %9, align 4, !tbaa !11
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %55, label %97

55:                                               ; preds = %51
  %56 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %12, i32 0, i32 6
  %57 = load i32, ptr %8, align 4, !tbaa !11
  %58 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %56, i32 noundef %57)
  %59 = icmp eq i32 %58, -1
  br i1 %59, label %60, label %74

60:                                               ; preds = %55
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = load i32, ptr %8, align 4, !tbaa !11
  %63 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %61, i32 noundef %62)
  %64 = icmp ne i32 %63, -1
  br i1 %64, label %65, label %74

65:                                               ; preds = %60
  %66 = load i32, ptr %8, align 4, !tbaa !11
  %67 = load i32, ptr %11, align 4, !tbaa !9
  %68 = call noundef i32 @_ZN7qpOASES9QProblemB11removeBoundEiNS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(800) %12, i32 noundef %66, i32 noundef %67)
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %73

70:                                               ; preds = %65
  %71 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %72 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %71, i32 noundef 42, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 2802, i32 noundef 1)
  store i32 %72, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %130

73:                                               ; preds = %65
  br label %74

74:                                               ; preds = %73, %60, %55
  %75 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %12, i32 0, i32 6
  %76 = load i32, ptr %8, align 4, !tbaa !11
  %77 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %75, i32 noundef %76)
  %78 = icmp eq i32 %77, 1
  br i1 %78, label %79, label %93

79:                                               ; preds = %74
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load i32, ptr %8, align 4, !tbaa !11
  %82 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %80, i32 noundef %81)
  %83 = icmp ne i32 %82, 1
  br i1 %83, label %84, label %93

84:                                               ; preds = %79
  %85 = load i32, ptr %8, align 4, !tbaa !11
  %86 = load i32, ptr %11, align 4, !tbaa !9
  %87 = call noundef i32 @_ZN7qpOASES9QProblemB11removeBoundEiNS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(800) %12, i32 noundef %85, i32 noundef %86)
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %92

89:                                               ; preds = %84
  %90 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %91 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %90, i32 noundef 42, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 2806, i32 noundef 1)
  store i32 %91, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %130

92:                                               ; preds = %84
  br label %93

93:                                               ; preds = %92, %79, %74
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %8, align 4, !tbaa !11
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %8, align 4, !tbaa !11
  br label %51, !llvm.loop !15

97:                                               ; preds = %51
  br label %98

98:                                               ; preds = %97, %47
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %99

99:                                               ; preds = %126, %98
  %100 = load i32, ptr %8, align 4, !tbaa !11
  %101 = load i32, ptr %9, align 4, !tbaa !11
  %102 = icmp slt i32 %100, %101
  br i1 %102, label %103, label %129

103:                                              ; preds = %99
  %104 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %12, i32 0, i32 6
  %105 = load i32, ptr %8, align 4, !tbaa !11
  %106 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %104, i32 noundef %105)
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %125

108:                                              ; preds = %103
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = load i32, ptr %8, align 4, !tbaa !11
  %111 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %109, i32 noundef %110)
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %125

113:                                              ; preds = %108
  %114 = load i32, ptr %8, align 4, !tbaa !11
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = load i32, ptr %8, align 4, !tbaa !11
  %117 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %115, i32 noundef %116)
  %118 = load i32, ptr %11, align 4, !tbaa !9
  %119 = call noundef i32 @_ZN7qpOASES9QProblemB8addBoundEiNS_15SubjectToStatusENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(800) %12, i32 noundef %114, i32 noundef %117, i32 noundef %118)
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %124

121:                                              ; preds = %113
  %122 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %123 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %122, i32 noundef 42, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 2819, i32 noundef 1)
  store i32 %123, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %130

124:                                              ; preds = %113
  br label %125

125:                                              ; preds = %124, %108, %103
  br label %126

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

129:                                              ; preds = %99
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %130

130:                                              ; preds = %129, %121, %89, %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %131

131:                                              ; preds = %130, %39, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %132 = load i32, ptr %4, align 4
  ret i32 %132
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7qpOASES9QProblemB8addBoundEiNS_15SubjectToStatusENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(800), i32 noundef, i32 noundef, i32 noundef) #4 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 = { 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 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !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 [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 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES9QProblemB24setupAuxiliaryWorkingSetEPKNS_6BoundsENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #3 align 2 {
  %4 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %18, label %.preheader45

.preheader45:                                     ; preds = %3
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader45
  %6 = getelementptr inbounds i8, ptr %0, i64 48
  br label %9

7:                                                ; preds = %12
  %8 = add nuw nsw i32 %.03446, 1
  %exitcond.not = icmp eq i32 %8, %4
  br i1 %exitcond.not, label %._crit_edge, label %9, !llvm.loop !5

9:                                                ; preds = %.lr.ph, %7
  %.03446 = phi i32 [ 0, %.lr.ph ], [ %8, %7 ]
  %10 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %6, i32 noundef %.03446)
  %11 = icmp eq i32 %10, 4
  br i1 %11, label %15, label %12

12:                                               ; preds = %9
  %13 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %1, i32 noundef %.03446)
  %14 = icmp eq i32 %13, 4
  br i1 %14, label %15, label %7

15:                                               ; preds = %12, %9
  %16 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %17 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %16, i32 noundef 9, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 2775, i32 noundef 1)
  br label %.loopexit

18:                                               ; preds = %3
  %19 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %20 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %19, i32 noundef 3, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 2779, i32 noundef 1)
  br label %.loopexit

._crit_edge:                                      ; preds = %7
  %21 = icmp ne i32 %2, 1
  %. = zext i1 %21 to i32
  %22 = icmp eq i32 %2, 0
  %or.cond = and i1 %22, %5
  br i1 %or.cond, label %.lr.ph48, label %.loopexit44

.lr.ph48:                                         ; preds = %._crit_edge
  %23 = getelementptr inbounds i8, ptr %0, i64 48
  br label %24

24:                                               ; preds = %.lr.ph48, %44
  %.13547 = phi i32 [ 0, %.lr.ph48 ], [ %45, %44 ]
  %25 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %23, i32 noundef %.13547)
  %26 = icmp eq i32 %25, -1
  br i1 %26, label %27, label %34

27:                                               ; preds = %24
  %28 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %1, i32 noundef %.13547)
  %.not40 = icmp eq i32 %28, -1
  br i1 %.not40, label %34, label %29

29:                                               ; preds = %27
  %30 = tail call noundef i32 @_ZN7qpOASES9QProblemB11removeBoundEiNS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(800) %0, i32 noundef %.13547, i32 noundef %.)
  %.not41 = icmp eq i32 %30, 0
  br i1 %.not41, label %34, label %31

31:                                               ; preds = %29
  %32 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %33 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %32, i32 noundef 42, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 2802, i32 noundef 1)
  br label %.loopexit

34:                                               ; preds = %29, %27, %24
  %35 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %23, i32 noundef %.13547)
  %36 = icmp eq i32 %35, 1
  br i1 %36, label %37, label %44

37:                                               ; preds = %34
  %38 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %1, i32 noundef %.13547)
  %.not42 = icmp eq i32 %38, 1
  br i1 %.not42, label %44, label %39

39:                                               ; preds = %37
  %40 = tail call noundef i32 @_ZN7qpOASES9QProblemB11removeBoundEiNS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(800) %0, i32 noundef %.13547, i32 noundef %.)
  %.not43 = icmp eq i32 %40, 0
  br i1 %.not43, label %44, label %41

41:                                               ; preds = %39
  %42 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %43 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %42, i32 noundef 42, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 2806, i32 noundef 1)
  br label %.loopexit

44:                                               ; preds = %34, %37, %39
  %45 = add nuw nsw i32 %.13547, 1
  %exitcond52.not = icmp eq i32 %45, %4
  br i1 %exitcond52.not, label %.loopexit44, label %24, !llvm.loop !7

.loopexit44:                                      ; preds = %44, %._crit_edge
  br i1 %5, label %.lr.ph51, label %.loopexit

.lr.ph51:                                         ; preds = %.loopexit44
  %46 = getelementptr inbounds i8, ptr %0, i64 48
  br label %47

47:                                               ; preds = %.lr.ph51, %58
  %.249 = phi i32 [ 0, %.lr.ph51 ], [ %59, %58 ]
  %48 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %46, i32 noundef %.249)
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %58

50:                                               ; preds = %47
  %51 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %1, i32 noundef %.249)
  %.not38 = icmp eq i32 %51, 0
  br i1 %.not38, label %58, label %52

52:                                               ; preds = %50
  %53 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %1, i32 noundef %.249)
  %54 = tail call noundef i32 @_ZN7qpOASES9QProblemB8addBoundEiNS_15SubjectToStatusENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(800) %0, i32 noundef %.249, i32 noundef %53, i32 noundef %.)
  %.not39 = icmp eq i32 %54, 0
  br i1 %.not39, label %58, label %55

55:                                               ; preds = %52
  %56 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %57 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %56, i32 noundef 42, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 2819, i32 noundef 1)
  br label %.loopexit

58:                                               ; preds = %47, %50, %52
  %59 = add nuw nsw i32 %.249, 1
  %exitcond53.not = icmp eq i32 %59, %4
  br i1 %exitcond53.not, label %.loopexit, label %47, !llvm.loop !8

.loopexit:                                        ; preds = %58, %.preheader45, %.loopexit44, %31, %41, %55, %18, %15
  %.1 = phi i32 [ %17, %15 ], [ %20, %18 ], [ %33, %31 ], [ %43, %41 ], [ %57, %55 ], [ 0, %.loopexit44 ], [ 0, %.preheader45 ], [ 0, %58 ]
  ret i32 %.1
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7qpOASES9QProblemB8addBoundEiNS_15SubjectToStatusENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(800), i32 noundef, i32 noundef, i32 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}


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