; 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 double @_ZN7qpOASES6getAbsEd(double noundef) #3

declare noundef i32 @_ZN7qpOASES15MessageHandling9throwInfoENS_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: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES9QProblemB20determineHessianTypeEv(ptr noundef nonnull align 8 dereferenceable(800) %0) #4 align 2 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %11 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %10)
  store i32 %11, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %12 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 15
  %13 = load i32, ptr %12, align 4, !tbaa !11
  switch i32 %13, label %32 [
    i32 0, label %14
    i32 1, label %25
    i32 2, label %26
    i32 3, label %26
    i32 4, label %26
    i32 5, label %26
  ]

14:                                               ; preds = %1
  %15 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 23
  %16 = getelementptr inbounds %"class.qpOASES::Options", ptr %15, i32 0, i32 4
  %17 = load i32, ptr %16, align 8, !tbaa !26
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %24

19:                                               ; preds = %14
  %20 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 23
  %21 = getelementptr inbounds %"class.qpOASES::Options", ptr %20, i32 0, i32 4
  store i32 1, ptr %21, align 8, !tbaa !26
  %22 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 23
  %23 = getelementptr inbounds %"class.qpOASES::Options", ptr %22, i32 0, i32 24
  store i32 1, ptr %23, align 8, !tbaa !27
  br label %24

24:                                               ; preds = %19, %14
  store i32 0, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %135

25:                                               ; preds = %1
  store i32 0, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %135

26:                                               ; preds = %1, %1, %1, %1
  %27 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 2
  %28 = load ptr, ptr %27, align 8, !tbaa !28
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %31

30:                                               ; preds = %26
  store i32 0, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %135

31:                                               ; preds = %26
  br label %32

32:                                               ; preds = %31, %1
  br label %33

33:                                               ; preds = %32
  %34 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !28
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %51

37:                                               ; preds = %33
  %38 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 15
  store i32 0, ptr %38, align 4, !tbaa !11
  %39 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %40 = call noundef i32 @_ZN7qpOASES15MessageHandling9throwInfoENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %39, i32 noundef 119, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 1215, i32 noundef 1)
  %41 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 23
  %42 = getelementptr inbounds %"class.qpOASES::Options", ptr %41, i32 0, i32 4
  %43 = load i32, ptr %42, align 8, !tbaa !26
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %50

45:                                               ; preds = %37
  %46 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 23
  %47 = getelementptr inbounds %"class.qpOASES::Options", ptr %46, i32 0, i32 4
  store i32 1, ptr %47, align 8, !tbaa !26
  %48 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 23
  %49 = getelementptr inbounds %"class.qpOASES::Options", ptr %48, i32 0, i32 24
  store i32 1, ptr %49, align 8, !tbaa !27
  br label %50

50:                                               ; preds = %45, %37
  store i32 0, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %135

51:                                               ; preds = %33
  %52 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 15
  store i32 2, ptr %52, align 4, !tbaa !11
  %53 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 2
  %54 = load ptr, ptr %53, align 8, !tbaa !28
  %55 = load ptr, ptr %54, align 8, !tbaa !29
  %56 = getelementptr i8, ptr %55, i64 -24
  %57 = load i64, ptr %56, align 8
  %58 = getelementptr inbounds i8, ptr %54, i64 %57
  %59 = load ptr, ptr %58, align 8, !tbaa !29
  %60 = getelementptr inbounds ptr, ptr %59, i64 5
  %61 = load ptr, ptr %60, align 8
  %62 = call noundef i32 %61(ptr noundef nonnull align 8 dereferenceable(12) %58)
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %51
  store i32 0, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %135

65:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !31
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %110, %65
  %67 = load i32, ptr %4, align 4, !tbaa !9
  %68 = load i32, ptr %5, align 4, !tbaa !9
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %70, label %113

70:                                               ; preds = %66
  %71 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 2
  %72 = load ptr, ptr %71, align 8, !tbaa !28
  %73 = load ptr, ptr %72, align 8, !tbaa !29
  %74 = getelementptr i8, ptr %73, i64 -24
  %75 = load i64, ptr %74, align 8
  %76 = getelementptr inbounds i8, ptr %72, i64 %75
  %77 = load i32, ptr %4, align 4, !tbaa !9
  %78 = load ptr, ptr %76, align 8, !tbaa !29
  %79 = getelementptr inbounds ptr, ptr %78, i64 4
  %80 = load ptr, ptr %79, align 8
  %81 = call noundef double %80(ptr noundef nonnull align 8 dereferenceable(12) %76, i32 noundef %77)
  store double %81, ptr %6, align 8, !tbaa !32
  %82 = load double, ptr %6, align 8, !tbaa !32
  %83 = fcmp oge double %82, 1.000000e+20
  br i1 %83, label %84, label %85

84:                                               ; preds = %70
  store i32 140, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %134

85:                                               ; preds = %70
  %86 = load double, ptr %6, align 8, !tbaa !32
  %87 = fcmp olt double %86, -1.000000e-25
  br i1 %87, label %88, label %98

88:                                               ; preds = %85
  %89 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 15
  store i32 5, ptr %89, align 4, !tbaa !11
  %90 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 23
  %91 = getelementptr inbounds %"class.qpOASES::Options", ptr %90, i32 0, i32 3
  %92 = load i32, ptr %91, align 4, !tbaa !33
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %94, label %97

94:                                               ; preds = %88
  %95 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %96 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %95, i32 noundef 100, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 1247, i32 noundef 1)
  store i32 %96, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %134

97:                                               ; preds = %88
  store i32 0, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %134

98:                                               ; preds = %85
  %99 = load double, ptr %6, align 8, !tbaa !32
  %100 = fsub double %99, 1.000000e+00
  %101 = call noundef double @_ZN7qpOASES6getAbsEd(double noundef %100)
  %102 = fcmp ogt double %101, 2.221000e-16
  br i1 %102, label %103, label %104

103:                                              ; preds = %98
  store i32 0, ptr %8, align 4, !tbaa !31
  br label %104

104:                                              ; preds = %103, %98
  %105 = load double, ptr %6, align 8, !tbaa !32
  %106 = call noundef double @_ZN7qpOASES6getAbsEd(double noundef %105)
  %107 = fcmp ogt double %106, 2.221000e-16
  br i1 %107, label %108, label %109

108:                                              ; preds = %104
  store i32 0, ptr %9, align 4, !tbaa !31
  br label %109

109:                                              ; preds = %108, %104
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %4, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %4, align 4, !tbaa !9
  br label %66, !llvm.loop !34

113:                                              ; preds = %66
  %114 = load i32, ptr %8, align 4, !tbaa !31
  %115 = icmp eq i32 %114, 1
  br i1 %115, label %116, label %118

116:                                              ; preds = %113
  %117 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 15
  store i32 1, ptr %117, align 4, !tbaa !11
  br label %118

118:                                              ; preds = %116, %113
  %119 = load i32, ptr %9, align 4, !tbaa !31
  %120 = icmp eq i32 %119, 1
  br i1 %120, label %121, label %133

121:                                              ; preds = %118
  %122 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 15
  store i32 0, ptr %122, align 4, !tbaa !11
  %123 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 23
  %124 = getelementptr inbounds %"class.qpOASES::Options", ptr %123, i32 0, i32 4
  %125 = load i32, ptr %124, align 8, !tbaa !26
  %126 = icmp eq i32 %125, 0
  br i1 %126, label %127, label %132

127:                                              ; preds = %121
  %128 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 23
  %129 = getelementptr inbounds %"class.qpOASES::Options", ptr %128, i32 0, i32 4
  store i32 1, ptr %129, align 8, !tbaa !26
  %130 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %10, i32 0, i32 23
  %131 = getelementptr inbounds %"class.qpOASES::Options", ptr %130, i32 0, i32 24
  store i32 1, ptr %131, align 8, !tbaa !27
  br label %132

132:                                              ; preds = %127, %121
  br label %133

133:                                              ; preds = %132, %118
  store i32 0, ptr %2, align 4
  store i32 1, ptr %7, align 4
  br label %134

134:                                              ; preds = %133, %97, %94, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %135

135:                                              ; preds = %134, %64, %50, %30, %25, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %136 = load i32, ptr %2, align 4
  ret i32 %136
}

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, !19, i64 220}
!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 = !{!12, !13, i64 288}
!27 = !{!12, !10, i64 416}
!28 = !{!12, !6, i64 16}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !8, i64 0}
!31 = !{!13, !13, i64 0}
!32 = !{!17, !17, i64 0}
!33 = !{!12, !13, i64 284}
!34 = distinct !{!34, !35}
!35 = !{!"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"

@.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 double @_ZN7qpOASES6getAbsEd(double noundef) local_unnamed_addr #2

declare noundef i32 @_ZN7qpOASES15MessageHandling9throwInfoENS_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: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES9QProblemB20determineHessianTypeEv(ptr noundef nonnull align 8 dereferenceable(800) %0) local_unnamed_addr #3 align 2 {
  %2 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %3 = getelementptr inbounds i8, ptr %0, i64 220
  %4 = load i32, ptr %3, align 4, !tbaa !5
  switch i32 %4, label %14 [
    i32 0, label %5
    i32 1, label %.loopexit
    i32 2, label %11
    i32 3, label %11
    i32 4, label %11
    i32 5, label %11
  ]

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 288
  %7 = load i32, ptr %6, align 8, !tbaa !24
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %9, label %.loopexit

9:                                                ; preds = %5
  store i32 1, ptr %6, align 8, !tbaa !24
  %10 = getelementptr inbounds i8, ptr %0, i64 416
  store i32 1, ptr %10, align 8, !tbaa !25
  br label %.loopexit

11:                                               ; preds = %1, %1, %1, %1
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !26
  %.not = icmp eq ptr %13, null
  br i1 %.not, label %.thread, label %.loopexit

14:                                               ; preds = %1
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 16
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !26
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = icmp eq ptr %.pre, null
  br i1 %16, label %.thread, label %24

.thread:                                          ; preds = %11, %14
  store i32 0, ptr %3, align 4, !tbaa !5
  %17 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %18 = tail call noundef i32 @_ZN7qpOASES15MessageHandling9throwInfoENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %17, i32 noundef 119, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 1215, i32 noundef 1)
  %19 = getelementptr inbounds i8, ptr %0, i64 288
  %20 = load i32, ptr %19, align 8, !tbaa !24
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %.loopexit

22:                                               ; preds = %.thread
  store i32 1, ptr %19, align 8, !tbaa !24
  %23 = getelementptr inbounds i8, ptr %0, i64 416
  store i32 1, ptr %23, align 8, !tbaa !25
  br label %.loopexit

24:                                               ; preds = %14
  store i32 2, ptr %3, align 4, !tbaa !5
  %25 = load ptr, ptr %.pre, align 8, !tbaa !27
  %26 = getelementptr i8, ptr %25, i64 -24
  %27 = load i64, ptr %26, align 8
  %28 = getelementptr inbounds i8, ptr %.pre, i64 %27
  %29 = load ptr, ptr %28, align 8, !tbaa !27
  %30 = getelementptr inbounds i8, ptr %29, i64 40
  %31 = load ptr, ptr %30, align 8
  %32 = tail call noundef i32 %31(ptr noundef nonnull align 8 dereferenceable(12) %28)
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %24
  %34 = icmp sgt i32 %2, 0
  br i1 %34, label %.lr.ph, label %._crit_edge.thread.thread

.lr.ph:                                           ; preds = %.preheader, %54
  %.023 = phi i32 [ %.1, %54 ], [ 1, %.preheader ]
  %.01122 = phi i32 [ %.112, %54 ], [ 1, %.preheader ]
  %.01521 = phi i32 [ %60, %54 ], [ 0, %.preheader ]
  %35 = load ptr, ptr %15, align 8, !tbaa !26
  %36 = load ptr, ptr %35, align 8, !tbaa !27
  %37 = getelementptr i8, ptr %36, i64 -24
  %38 = load i64, ptr %37, align 8
  %39 = getelementptr inbounds i8, ptr %35, i64 %38
  %40 = load ptr, ptr %39, align 8, !tbaa !27
  %41 = getelementptr inbounds i8, ptr %40, i64 32
  %42 = load ptr, ptr %41, align 8
  %43 = tail call noundef double %42(ptr noundef nonnull align 8 dereferenceable(12) %39, i32 noundef %.01521)
  %44 = fcmp ult double %43, 1.000000e+20
  br i1 %44, label %45, label %.loopexit

45:                                               ; preds = %.lr.ph
  %46 = fcmp olt double %43, -1.000000e-25
  br i1 %46, label %47, label %54

47:                                               ; preds = %45
  store i32 5, ptr %3, align 4, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %0, i64 284
  %49 = load i32, ptr %48, align 4, !tbaa !29
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %.loopexit

51:                                               ; preds = %47
  %52 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %53 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %52, i32 noundef 100, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 1247, i32 noundef 1)
  br label %.loopexit

54:                                               ; preds = %45
  %55 = fadd double %43, -1.000000e+00
  %56 = tail call noundef double @_ZN7qpOASES6getAbsEd(double noundef %55)
  %57 = fcmp ogt double %56, 2.221000e-16
  %.112 = select i1 %57, i32 0, i32 %.01122
  %58 = tail call noundef double @_ZN7qpOASES6getAbsEd(double noundef %43)
  %59 = fcmp ogt double %58, 2.221000e-16
  %.1 = select i1 %59, i32 0, i32 %.023
  %60 = add nuw nsw i32 %.01521, 1
  %exitcond.not = icmp eq i32 %60, %2
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !30

._crit_edge:                                      ; preds = %54
  %61 = icmp eq i32 %.112, 1
  %62 = icmp eq i32 %.1, 1
  br i1 %61, label %._crit_edge.thread, label %63

._crit_edge.thread:                               ; preds = %._crit_edge
  store i32 1, ptr %3, align 4, !tbaa !5
  br i1 %62, label %._crit_edge.thread.thread, label %.loopexit

63:                                               ; preds = %._crit_edge
  br i1 %62, label %._crit_edge.thread.thread, label %.loopexit

._crit_edge.thread.thread:                        ; preds = %.preheader, %._crit_edge.thread, %63
  store i32 0, ptr %3, align 4, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %0, i64 288
  %65 = load i32, ptr %64, align 8, !tbaa !24
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %.loopexit

67:                                               ; preds = %._crit_edge.thread.thread
  store i32 1, ptr %64, align 8, !tbaa !24
  %68 = getelementptr inbounds i8, ptr %0, i64 416
  store i32 1, ptr %68, align 8, !tbaa !25
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %._crit_edge.thread, %51, %47, %._crit_edge.thread.thread, %67, %63, %24, %.thread, %22, %11, %1, %5, %9
  %.114 = phi i32 [ 0, %9 ], [ 0, %5 ], [ 0, %1 ], [ 0, %11 ], [ 0, %22 ], [ 0, %.thread ], [ 0, %24 ], [ %53, %51 ], [ 0, %47 ], [ 0, %._crit_edge.thread.thread ], [ 0, %67 ], [ 0, %63 ], [ 0, %._crit_edge.thread ], [ 140, %.lr.ph ]
  ret i32 %.114
}

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, !17, i64 220}
!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 = !{!6, !7, i64 288}
!25 = !{!6, !13, i64 416}
!26 = !{!6, !10, i64 16}
!27 = !{!28, !28, i64 0}
!28 = !{!"vtable pointer", !9, i64 0}
!29 = !{!6, !7, i64 284}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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