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

%"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 [103 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [33 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: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr 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) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES8QProblem15changeActiveSetEiNS_15SubjectToStatusENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(1064) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #4 align 2 {
  %5 = alloca i32, align 4
  %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 [160 x i8], align 16
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !11
  store i32 %3, ptr %9, align 4, !tbaa !13
  %14 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %15 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %14)
  store i32 %15, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 160, ptr %11) #5
  %16 = load i32, ptr %8, align 4, !tbaa !11
  switch i32 %16, label %74 [
    i32 4, label %17
    i32 0, label %18
  ]

17:                                               ; preds = %4
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %146

18:                                               ; preds = %4
  %19 = load i32, ptr %9, align 4, !tbaa !13
  %20 = icmp eq i32 %19, 1
  br i1 %20, label %21, label %46

21:                                               ; preds = %18
  %22 = getelementptr inbounds [160 x i8], ptr %11, i64 0, i64 0
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %22, i64 noundef 160, ptr noundef @.str.42, i32 noundef %23) #5
  %25 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %26 = getelementptr inbounds [160 x i8], ptr %11, i64 0, i64 0
  %27 = call noundef i32 @_ZN7qpOASES15MessageHandling9throwInfoENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %25, i32 noundef 82, ptr noundef %26, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5304, i32 noundef 1)
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 23
  %30 = getelementptr inbounds %"class.qpOASES::Options", ptr %29, i32 0, i32 6
  %31 = load i32, ptr %30, align 8, !tbaa !15
  %32 = load ptr, ptr %14, align 8, !tbaa !28
  %33 = getelementptr inbounds ptr, ptr %32, i64 32
  %34 = load ptr, ptr %33, align 8
  %35 = call noundef i32 %34(ptr noundef nonnull align 8 dereferenceable(1064) %14, i32 noundef %28, i32 noundef 1, i32 noundef 1, i32 noundef %31)
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %40

37:                                               ; preds = %21
  %38 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %39 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %38, i32 noundef 84, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5308, i32 noundef 1)
  store i32 %39, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %146

40:                                               ; preds = %21
  %41 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 10
  %42 = load ptr, ptr %41, align 8, !tbaa !30
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds double, ptr %42, i64 %44
  store double 0.000000e+00, ptr %45, align 8, !tbaa !31
  br label %73

46:                                               ; preds = %18
  %47 = getelementptr inbounds [160 x i8], ptr %11, i64 0, i64 0
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %47, i64 noundef 160, ptr noundef @.str.43, i32 noundef %48) #5
  %50 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %51 = getelementptr inbounds [160 x i8], ptr %11, i64 0, i64 0
  %52 = call noundef i32 @_ZN7qpOASES15MessageHandling9throwInfoENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %50, i32 noundef 82, ptr noundef %51, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5316, i32 noundef 1)
  %53 = load i32, ptr %7, align 4, !tbaa !9
  %54 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 23
  %55 = getelementptr inbounds %"class.qpOASES::Options", ptr %54, i32 0, i32 6
  %56 = load i32, ptr %55, align 8, !tbaa !15
  %57 = load ptr, ptr %14, align 8, !tbaa !28
  %58 = getelementptr inbounds ptr, ptr %57, i64 31
  %59 = load ptr, ptr %58, align 8
  %60 = call noundef i32 %59(ptr noundef nonnull align 8 dereferenceable(1064) %14, i32 noundef %53, i32 noundef 1, i32 noundef 1, i32 noundef %56)
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %65

62:                                               ; preds = %46
  %63 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %64 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %63, i32 noundef 84, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5320, i32 noundef 1)
  store i32 %64, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %146

65:                                               ; preds = %46
  %66 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 10
  %67 = load ptr, ptr %66, align 8, !tbaa !30
  %68 = load i32, ptr %10, align 4, !tbaa !9
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = add nsw i32 %68, %69
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds double, ptr %67, i64 %71
  store double 0.000000e+00, ptr %72, align 8, !tbaa !31
  br label %73

73:                                               ; preds = %65, %40
  br label %145

74:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %75 = load i32, ptr %9, align 4, !tbaa !13
  %76 = icmp eq i32 %75, 1
  br i1 %76, label %77, label %109

77:                                               ; preds = %74
  %78 = load i32, ptr %8, align 4, !tbaa !11
  %79 = icmp eq i32 %78, -1
  br i1 %79, label %80, label %84

80:                                               ; preds = %77
  %81 = getelementptr inbounds [160 x i8], ptr %11, i64 0, i64 0
  %82 = load i32, ptr %7, align 4, !tbaa !9
  %83 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %81, i64 noundef 160, ptr noundef @.str.47, i32 noundef %82) #5
  br label %88

84:                                               ; preds = %77
  %85 = getelementptr inbounds [160 x i8], ptr %11, i64 0, i64 0
  %86 = load i32, ptr %7, align 4, !tbaa !9
  %87 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %85, i64 noundef 160, ptr noundef @.str.48, i32 noundef %86) #5
  br label %88

88:                                               ; preds = %84, %80
  %89 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %90 = getelementptr inbounds [160 x i8], ptr %11, i64 0, i64 0
  %91 = call noundef i32 @_ZN7qpOASES15MessageHandling9throwInfoENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %89, i32 noundef 83, ptr noundef %90, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5337, i32 noundef 1)
  %92 = load i32, ptr %7, align 4, !tbaa !9
  %93 = load i32, ptr %8, align 4, !tbaa !11
  %94 = load ptr, ptr %14, align 8, !tbaa !28
  %95 = getelementptr inbounds ptr, ptr %94, i64 28
  %96 = load ptr, ptr %95, align 8
  %97 = call noundef i32 %96(ptr noundef nonnull align 8 dereferenceable(1064) %14, i32 noundef %92, i32 noundef %93, i32 noundef 1, i32 noundef 1)
  store i32 %97, ptr %13, align 4, !tbaa !32
  %98 = load i32, ptr %13, align 4, !tbaa !32
  %99 = icmp eq i32 %98, 79
  br i1 %99, label %100, label %102

100:                                              ; preds = %88
  %101 = load i32, ptr %13, align 4, !tbaa !32
  store i32 %101, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %142

102:                                              ; preds = %88
  %103 = load i32, ptr %13, align 4, !tbaa !32
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %108

105:                                              ; preds = %102
  %106 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %107 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %106, i32 noundef 85, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5344, i32 noundef 1)
  store i32 %107, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %142

108:                                              ; preds = %102
  br label %141

109:                                              ; preds = %74
  %110 = load i32, ptr %8, align 4, !tbaa !11
  %111 = icmp eq i32 %110, -1
  br i1 %111, label %112, label %116

112:                                              ; preds = %109
  %113 = getelementptr inbounds [160 x i8], ptr %11, i64 0, i64 0
  %114 = load i32, ptr %7, align 4, !tbaa !9
  %115 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %113, i64 noundef 160, ptr noundef @.str.49, i32 noundef %114) #5
  br label %120

116:                                              ; preds = %109
  %117 = getelementptr inbounds [160 x i8], ptr %11, i64 0, i64 0
  %118 = load i32, ptr %7, align 4, !tbaa !9
  %119 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %117, i64 noundef 160, ptr noundef @.str.50, i32 noundef %118) #5
  br label %120

120:                                              ; preds = %116, %112
  %121 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %122 = getelementptr inbounds [160 x i8], ptr %11, i64 0, i64 0
  %123 = call noundef i32 @_ZN7qpOASES15MessageHandling9throwInfoENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %121, i32 noundef 83, ptr noundef %122, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5353, i32 noundef 1)
  %124 = load i32, ptr %7, align 4, !tbaa !9
  %125 = load i32, ptr %8, align 4, !tbaa !11
  %126 = load ptr, ptr %14, align 8, !tbaa !28
  %127 = getelementptr inbounds ptr, ptr %126, i64 25
  %128 = load ptr, ptr %127, align 8
  %129 = call noundef i32 %128(ptr noundef nonnull align 8 dereferenceable(1064) %14, i32 noundef %124, i32 noundef %125, i32 noundef 1, i32 noundef 1)
  store i32 %129, ptr %13, align 4, !tbaa !32
  %130 = load i32, ptr %13, align 4, !tbaa !32
  %131 = icmp eq i32 %130, 77
  br i1 %131, label %132, label %134

132:                                              ; preds = %120
  %133 = load i32, ptr %13, align 4, !tbaa !32
  store i32 %133, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %142

134:                                              ; preds = %120
  %135 = load i32, ptr %13, align 4, !tbaa !32
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %140

137:                                              ; preds = %134
  %138 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %139 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %138, i32 noundef 85, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5360, i32 noundef 1)
  store i32 %139, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %142

140:                                              ; preds = %134
  br label %141

141:                                              ; preds = %140, %108
  store i32 0, ptr %12, align 4
  br label %142

142:                                              ; preds = %141, %137, %132, %105, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %143 = load i32, ptr %12, align 4
  switch i32 %143, label %146 [
    i32 0, label %144
  ]

144:                                              ; preds = %142
  br label %145

145:                                              ; preds = %144, %73
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %146

146:                                              ; preds = %145, %142, %62, %37, %17
  call void @llvm.lifetime.end.p0(i64 160, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %147 = load i32, ptr %5, align 4
  ret i32 %147
}

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 = { nounwind "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 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!15 = !{!16, !14, i64 296}
!16 = !{!"_ZTSN7qpOASES9QProblemBE", !14, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !17, i64 48, !6, i64 168, !14, i64 176, !6, i64 184, !6, i64 192, !20, i64 200, !21, i64 208, !14, i64 212, !14, i64 216, !22, i64 220, !20, i64 224, !10, i64 232, !6, i64 240, !20, i64 248, !20, i64 256, !10, i64 264, !23, i64 272, !25, i64 496, !27, i64 768}
!17 = !{!"_ZTSN7qpOASES6BoundsE", !18, i64 0, !19, i64 40, !19, i64 80}
!18 = !{!"_ZTSN7qpOASES9SubjectToE", !10, i64 8, !6, i64 16, !6, i64 24, !14, i64 32, !14, i64 36}
!19 = !{!"_ZTSN7qpOASES9IndexlistE", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!20 = !{!"double", !7, i64 0}
!21 = !{!"_ZTSN7qpOASES14QProblemStatusE", !7, i64 0}
!22 = !{!"_ZTSN7qpOASES11HessianTypeE", !7, i64 0}
!23 = !{!"_ZTSN7qpOASES7OptionsE", !24, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !10, i64 28, !10, i64 32, !14, i64 36, !20, i64 40, !20, i64 48, !20, i64 56, !20, i64 64, !20, i64 72, !20, i64 80, !20, i64 88, !20, i64 96, !20, i64 104, !20, i64 112, !20, i64 120, !12, i64 128, !20, i64 136, !10, i64 144, !20, i64 152, !10, i64 160, !20, i64 168, !20, i64 176, !20, i64 184, !20, i64 192, !14, i64 200, !14, i64 204, !10, i64 208, !10, i64 212, !10, i64 216}
!24 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!25 = !{!"_ZTSN7qpOASES7FlipperE", !10, i64 0, !10, i64 4, !17, i64 8, !26, i64 128, !6, i64 248, !6, i64 256, !6, i64 264}
!26 = !{!"_ZTSN7qpOASES11ConstraintsE", !18, i64 0, !19, i64 40, !19, i64 80}
!27 = !{!"_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}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !8, i64 0}
!30 = !{!16, !6, i64 192}
!31 = !{!20, !20, i64 0}
!32 = !{!33, !33, i64 0}
!33 = !{!"_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 [103 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [33 x i8], align 1

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

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() local_unnamed_addr #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) local_unnamed_addr #1

; Function Attrs: mustprogress 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)) local_unnamed_addr #2 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #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) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES8QProblem15changeActiveSetEiNS_15SubjectToStatusENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(1064) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #4 align 2 {
  %5 = alloca [160 x i8], align 16
  %6 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %5) #5
  switch i32 %2, label %45 [
    i32 4, label %.thread
    i32 0, label %7
  ]

7:                                                ; preds = %4
  %8 = icmp eq i32 %3, 1
  %9 = getelementptr inbounds i8, ptr %0, i64 296
  br i1 %8, label %10, label %27

10:                                               ; preds = %7
  %11 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 160, ptr noundef nonnull @.str.42, i32 noundef %1) #5
  %12 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %13 = call noundef i32 @_ZN7qpOASES15MessageHandling9throwInfoENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %12, i32 noundef 82, ptr noundef nonnull %5, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 5304, i32 noundef 1)
  %14 = load i32, ptr %9, align 8, !tbaa !5
  %15 = load ptr, ptr %0, align 8, !tbaa !24
  %16 = getelementptr inbounds i8, ptr %15, i64 256
  %17 = load ptr, ptr %16, align 8
  %18 = call noundef i32 %17(ptr noundef nonnull align 8 dereferenceable(1064) %0, i32 noundef %1, i32 noundef 1, i32 noundef 1, i32 noundef %14)
  %.not33 = icmp eq i32 %18, 0
  br i1 %.not33, label %22, label %19

19:                                               ; preds = %10
  %20 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %21 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %20, i32 noundef 84, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 5308, i32 noundef 1)
  br label %.thread

22:                                               ; preds = %10
  %23 = getelementptr inbounds i8, ptr %0, i64 192
  %24 = load ptr, ptr %23, align 8, !tbaa !26
  %25 = sext i32 %1 to i64
  %26 = getelementptr inbounds double, ptr %24, i64 %25
  store double 0.000000e+00, ptr %26, align 8, !tbaa !27
  br label %.thread

27:                                               ; preds = %7
  %28 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 160, ptr noundef nonnull @.str.43, i32 noundef %1) #5
  %29 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %30 = call noundef i32 @_ZN7qpOASES15MessageHandling9throwInfoENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %29, i32 noundef 82, ptr noundef nonnull %5, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 5316, i32 noundef 1)
  %31 = load i32, ptr %9, align 8, !tbaa !5
  %32 = load ptr, ptr %0, align 8, !tbaa !24
  %33 = getelementptr inbounds i8, ptr %32, i64 248
  %34 = load ptr, ptr %33, align 8
  %35 = call noundef i32 %34(ptr noundef nonnull align 8 dereferenceable(1064) %0, i32 noundef %1, i32 noundef 1, i32 noundef 1, i32 noundef %31)
  %.not = icmp eq i32 %35, 0
  br i1 %.not, label %39, label %36

36:                                               ; preds = %27
  %37 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %38 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %37, i32 noundef 84, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 5320, i32 noundef 1)
  br label %.thread

39:                                               ; preds = %27
  %40 = getelementptr inbounds i8, ptr %0, i64 192
  %41 = load ptr, ptr %40, align 8, !tbaa !26
  %42 = add nsw i32 %6, %1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds double, ptr %41, i64 %43
  store double 0.000000e+00, ptr %44, align 8, !tbaa !27
  br label %.thread

45:                                               ; preds = %4
  %46 = icmp eq i32 %3, 1
  %47 = icmp eq i32 %2, -1
  br i1 %46, label %48, label %56

48:                                               ; preds = %45
  %.str.47..str.48 = select i1 %47, ptr @.str.47, ptr @.str.48
  %49 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 160, ptr noundef nonnull %.str.47..str.48, i32 noundef %1) #5
  %50 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %51 = call noundef i32 @_ZN7qpOASES15MessageHandling9throwInfoENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %50, i32 noundef 83, ptr noundef nonnull %5, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 5337, i32 noundef 1)
  %52 = load ptr, ptr %0, align 8, !tbaa !24
  %53 = getelementptr inbounds i8, ptr %52, i64 224
  %54 = load ptr, ptr %53, align 8
  %55 = call noundef i32 %54(ptr noundef nonnull align 8 dereferenceable(1064) %0, i32 noundef %1, i32 noundef %2, i32 noundef 1, i32 noundef 1)
  switch i32 %55, label %.thread.sink.split [
    i32 79, label %.thread
    i32 0, label %.thread
  ]

56:                                               ; preds = %45
  %.str.49..str.50 = select i1 %47, ptr @.str.49, ptr @.str.50
  %57 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 160, ptr noundef nonnull %.str.49..str.50, i32 noundef %1) #5
  %58 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %59 = call noundef i32 @_ZN7qpOASES15MessageHandling9throwInfoENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %58, i32 noundef 83, ptr noundef nonnull %5, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 5353, i32 noundef 1)
  %60 = load ptr, ptr %0, align 8, !tbaa !24
  %61 = getelementptr inbounds i8, ptr %60, i64 200
  %62 = load ptr, ptr %61, align 8
  %63 = call noundef i32 %62(ptr noundef nonnull align 8 dereferenceable(1064) %0, i32 noundef %1, i32 noundef %2, i32 noundef 1, i32 noundef 1)
  switch i32 %63, label %.thread.sink.split [
    i32 77, label %.thread
    i32 0, label %.thread
  ]

.thread.sink.split:                               ; preds = %56, %48
  %.sink38 = phi i64 [ 5344, %48 ], [ 5360, %56 ]
  %64 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %65 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %64, i32 noundef 85, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef %.sink38, i32 noundef 1)
  br label %.thread

.thread:                                          ; preds = %56, %48, %.thread.sink.split, %39, %22, %48, %56, %4, %36, %19
  %.1 = phi i32 [ %21, %19 ], [ %38, %36 ], [ 0, %4 ], [ %63, %56 ], [ %55, %48 ], [ 0, %22 ], [ 0, %39 ], [ %63, %56 ], [ %55, %48 ], [ %65, %.thread.sink.split ]
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %5) #5
  ret i32 %.1
}

attributes #0 = { mustprogress 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 = { nofree nounwind "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, !7, i64 296}
!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 = !{!25, !25, i64 0}
!25 = !{!"vtable pointer", !9, i64 0}
!26 = !{!6, !10, i64 192}
!27 = !{!15, !15, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass