; 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::QProblem" = type { %"class.qpOASES::QProblemB", i32, ptr, ptr, ptr, %"class.qpOASES::Constraints", ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"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 }
%"struct.qpOASES::TabularOutput" = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.qpOASES::Constraints" = type { %"class.qpOASES::SubjectTo", %"class.qpOASES::Indexlist", %"class.qpOASES::Indexlist" }

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

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

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() #1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES8QProblem19setupQPdataFromFileEPKcS2_S2_S2_S2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(1064) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #6 align 2 {
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %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 i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  %24 = load ptr, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %25 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %24)
  store i32 %25, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %26 = call noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1064) %24)
  store i32 %26, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = load ptr, ptr %14, align 8, !tbaa !5
  %30 = load ptr, ptr %15, align 8, !tbaa !5
  %31 = call noundef i32 @_ZN7qpOASES9QProblemB19setupQPdataFromFileEPKcS2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(800) %24, ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %30)
  store i32 %31, ptr %21, align 4, !tbaa !11
  %32 = load i32, ptr %21, align 4, !tbaa !11
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %38

34:                                               ; preds = %8
  %35 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %36 = load i32, ptr %21, align 4, !tbaa !11
  %37 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %35, i32 noundef %36, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5900, i32 noundef 1)
  store i32 %37, ptr %9, align 4
  store i32 1, ptr %22, align 4
  br label %146

38:                                               ; preds = %8
  %39 = load i32, ptr %20, align 4, !tbaa !9
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %41, label %47

41:                                               ; preds = %38
  %42 = load ptr, ptr %13, align 8, !tbaa !5
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %47

44:                                               ; preds = %41
  %45 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %46 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %45, i32 noundef 3, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5903, i32 noundef 1)
  store i32 %46, ptr %9, align 4
  store i32 1, ptr %22, align 4
  br label %146

47:                                               ; preds = %41, %38
  %48 = load i32, ptr %20, align 4, !tbaa !9
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %50, label %145

50:                                               ; preds = %47
  %51 = load ptr, ptr %16, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %66

53:                                               ; preds = %50
  %54 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %24, i32 0, i32 3
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = load i32, ptr %20, align 4, !tbaa !9
  %57 = load ptr, ptr %16, align 8, !tbaa !5
  %58 = call noundef i32 @_ZN7qpOASES12readFromFileEPdiPKc(ptr noundef %55, i32 noundef %56, ptr noundef %57)
  store i32 %58, ptr %21, align 4, !tbaa !11
  %59 = load i32, ptr %21, align 4, !tbaa !11
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %65

61:                                               ; preds = %53
  %62 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %63 = load i32, ptr %21, align 4, !tbaa !11
  %64 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %62, i32 noundef %63, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5912, i32 noundef 1)
  store i32 %64, ptr %9, align 4
  store i32 1, ptr %22, align 4
  br label %146

65:                                               ; preds = %53
  br label %81

66:                                               ; preds = %50
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %77, %66
  %68 = load i32, ptr %18, align 4, !tbaa !9
  %69 = load i32, ptr %20, align 4, !tbaa !9
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %71, label %80

71:                                               ; preds = %67
  %72 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %24, i32 0, i32 3
  %73 = load ptr, ptr %72, align 8, !tbaa !13
  %74 = load i32, ptr %18, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds double, ptr %73, i64 %75
  store double -1.000000e+20, ptr %76, align 8, !tbaa !29
  br label %77

77:                                               ; preds = %71
  %78 = load i32, ptr %18, align 4, !tbaa !9
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %18, align 4, !tbaa !9
  br label %67, !llvm.loop !30

80:                                               ; preds = %67
  br label %81

81:                                               ; preds = %80, %65
  %82 = load ptr, ptr %17, align 8, !tbaa !5
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %97

84:                                               ; preds = %81
  %85 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %24, i32 0, i32 4
  %86 = load ptr, ptr %85, align 8, !tbaa !32
  %87 = load i32, ptr %20, align 4, !tbaa !9
  %88 = load ptr, ptr %17, align 8, !tbaa !5
  %89 = call noundef i32 @_ZN7qpOASES12readFromFileEPdiPKc(ptr noundef %86, i32 noundef %87, ptr noundef %88)
  store i32 %89, ptr %21, align 4, !tbaa !11
  %90 = load i32, ptr %21, align 4, !tbaa !11
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %96

92:                                               ; preds = %84
  %93 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %94 = load i32, ptr %21, align 4, !tbaa !11
  %95 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %93, i32 noundef %94, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5926, i32 noundef 1)
  store i32 %95, ptr %9, align 4
  store i32 1, ptr %22, align 4
  br label %146

96:                                               ; preds = %84
  br label %112

97:                                               ; preds = %81
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %108, %97
  %99 = load i32, ptr %18, align 4, !tbaa !9
  %100 = load i32, ptr %20, align 4, !tbaa !9
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %102, label %111

102:                                              ; preds = %98
  %103 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %24, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !32
  %105 = load i32, ptr %18, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds double, ptr %104, i64 %106
  store double 1.000000e+20, ptr %107, align 8, !tbaa !29
  br label %108

108:                                              ; preds = %102
  %109 = load i32, ptr %18, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %18, align 4, !tbaa !9
  br label %98, !llvm.loop !33

111:                                              ; preds = %98
  br label %112

112:                                              ; preds = %111, %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %113 = load i32, ptr %20, align 4, !tbaa !9
  %114 = load i32, ptr %19, align 4, !tbaa !9
  %115 = mul nsw i32 %113, %114
  %116 = sext i32 %115 to i64
  %117 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %116, i64 8)
  %118 = extractvalue { i64, i1 } %117, 1
  %119 = extractvalue { i64, i1 } %117, 0
  %120 = select i1 %118, i64 -1, i64 %119
  %121 = call noalias noundef nonnull ptr @_Znam(i64 noundef %120) #9
  store ptr %121, ptr %23, align 8, !tbaa !5
  %122 = load ptr, ptr %23, align 8, !tbaa !5
  %123 = load i32, ptr %20, align 4, !tbaa !9
  %124 = load i32, ptr %19, align 4, !tbaa !9
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = call noundef i32 @_ZN7qpOASES12readFromFileEPdiiPKc(ptr noundef %122, i32 noundef %123, i32 noundef %124, ptr noundef %125)
  store i32 %126, ptr %21, align 4, !tbaa !11
  %127 = load i32, ptr %21, align 4, !tbaa !11
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %129, label %137

129:                                              ; preds = %112
  %130 = load ptr, ptr %23, align 8, !tbaa !5
  %131 = icmp eq ptr %130, null
  br i1 %131, label %133, label %132

132:                                              ; preds = %129
  call void @_ZdaPv(ptr noundef %130) #10
  br label %133

133:                                              ; preds = %132, %129
  %134 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %135 = load i32, ptr %21, align 4, !tbaa !11
  %136 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %134, i32 noundef %135, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 5941, i32 noundef 1)
  store i32 %136, ptr %9, align 4
  store i32 1, ptr %22, align 4
  br label %142

137:                                              ; preds = %112
  %138 = load ptr, ptr %23, align 8, !tbaa !5
  %139 = call noundef i32 @_ZN7qpOASES8QProblem4setAEPKd(ptr noundef nonnull align 8 dereferenceable(1064) %24, ptr noundef %138)
  %140 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %24, i32 0, i32 2
  %141 = load ptr, ptr %140, align 8, !tbaa !34
  call void @_ZN7qpOASES6Matrix12doFreeMemoryEv(ptr noundef nonnull align 8 dereferenceable(12) %141)
  store i32 0, ptr %22, align 4
  br label %142

142:                                              ; preds = %137, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  %143 = load i32, ptr %22, align 4
  switch i32 %143, label %146 [
    i32 0, label %144
  ]

144:                                              ; preds = %142
  br label %145

145:                                              ; preds = %144, %47
  store i32 0, ptr %9, align 4
  store i32 1, ptr %22, align 4
  br label %146

146:                                              ; preds = %145, %142, %92, %61, %44, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  %147 = load i32, ptr %9, align 4
  ret i32 %147
}

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

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

declare noundef i32 @_ZN7qpOASES9QProblemB19setupQPdataFromFileEPKcS2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(800), ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare noundef i32 @_ZN7qpOASES12readFromFileEPdiPKc(ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7qpOASES6Matrix12doFreeMemoryEv(ptr noundef nonnull align 8 dereferenceable(12)) #7 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nobuiltin allocsize(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 = { nobuiltin 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 #5 = { 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 #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = !{!"_ZTSN7qpOASES11returnValueE", !7, i64 0}
!13 = !{!14, !6, i64 816}
!14 = !{!"_ZTSN7qpOASES8QProblemE", !15, i64 0, !16, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !27, i64 832, !6, i64 952, !6, i64 960, !10, i64 968, !6, i64 976, !6, i64 984, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !6, i64 1024, !6, i64 1032, !6, i64 1040, !6, i64 1048, !6, i64 1056}
!15 = !{!"_ZTSN7qpOASES9QProblemBE", !16, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !17, i64 48, !6, i64 168, !16, i64 176, !6, i64 184, !6, i64 192, !20, i64 200, !21, i64 208, !16, i64 212, !16, 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, !26, i64 496, !28, i64 768}
!16 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!17 = !{!"_ZTSN7qpOASES6BoundsE", !18, i64 0, !19, i64 40, !19, i64 80}
!18 = !{!"_ZTSN7qpOASES9SubjectToE", !10, i64 8, !6, i64 16, !6, i64 24, !16, i64 32, !16, 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, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !10, i64 28, !10, i64 32, !16, 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, !25, 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, !16, i64 200, !16, i64 204, !10, i64 208, !10, i64 212, !10, i64 216}
!24 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!25 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!26 = !{!"_ZTSN7qpOASES7FlipperE", !10, i64 0, !10, i64 4, !17, i64 8, !27, i64 128, !6, i64 248, !6, i64 256, !6, i64 264}
!27 = !{!"_ZTSN7qpOASES11ConstraintsE", !18, i64 0, !19, i64 40, !19, i64 80}
!28 = !{!"_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}
!29 = !{!20, !20, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!14, !6, i64 824}
!33 = distinct !{!33, !31}
!34 = !{!14, !6, i64 808}


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

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

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() local_unnamed_addr #0

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES8QProblem19setupQPdataFromFileEPKcS2_S2_S2_S2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(1064) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #4 align 2 {
  %9 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %10 = tail call noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1064) %0)
  %11 = tail call noundef i32 @_ZN7qpOASES9QProblemB19setupQPdataFromFileEPKcS2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef %1, ptr noundef %2, ptr noundef %4, ptr noundef %5)
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %15, label %12

12:                                               ; preds = %8
  %13 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %14 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %13, i32 noundef %11, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 5900, i32 noundef 1)
  br label %58

15:                                               ; preds = %8
  %16 = icmp sgt i32 %10, 0
  %17 = icmp eq ptr %3, null
  %or.cond = and i1 %17, %16
  br i1 %or.cond, label %18, label %21

18:                                               ; preds = %15
  %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 5903, i32 noundef 1)
  br label %58

21:                                               ; preds = %15
  br i1 %16, label %22, label %58

22:                                               ; preds = %21
  %.not50 = icmp eq ptr %6, null
  %23 = getelementptr inbounds i8, ptr %0, i64 816
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  br i1 %.not50, label %.lr.ph, label %28

.lr.ph:                                           ; preds = %22
  %wide.trip.count = zext nneg i32 %10 to i64
  %min.iters.check = icmp ult i32 %10, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %25 = getelementptr inbounds double, ptr %24, i64 %index
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  store <2 x double> <double -1.000000e+20, double -1.000000e+20>, ptr %25, align 8, !tbaa !25
  store <2 x double> <double -1.000000e+20, double -1.000000e+20>, ptr %26, align 8, !tbaa !25
  %index.next = add nuw i64 %index, 4
  %27 = icmp eq i64 %index.next, %n.vec
  br i1 %27, label %middle.block, label %vector.body, !llvm.loop !26

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.loopexit57, label %scalar.ph.preheader

28:                                               ; preds = %22
  %29 = tail call noundef i32 @_ZN7qpOASES12readFromFileEPdiPKc(ptr noundef %24, i32 noundef %10, ptr noundef nonnull %6)
  %.not51 = icmp eq i32 %29, 0
  br i1 %.not51, label %.loopexit57, label %30

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

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %33 = getelementptr inbounds double, ptr %24, i64 %indvars.iv
  store double -1.000000e+20, ptr %33, align 8, !tbaa !25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit57, label %scalar.ph, !llvm.loop !30

.loopexit57:                                      ; preds = %scalar.ph, %middle.block, %28
  %.not52 = icmp eq ptr %7, null
  %34 = getelementptr inbounds i8, ptr %0, i64 824
  %35 = load ptr, ptr %34, align 8, !tbaa !31
  br i1 %.not52, label %.lr.ph60, label %39

.lr.ph60:                                         ; preds = %.loopexit57
  %smax = tail call i32 @llvm.smax.i32(i32 %10, i32 1)
  %wide.trip.count65 = zext nneg i32 %smax to i64
  %min.iters.check69 = icmp slt i32 %10, 4
  br i1 %min.iters.check69, label %scalar.ph68.preheader, label %vector.ph70

scalar.ph68.preheader:                            ; preds = %middle.block67, %.lr.ph60
  %indvars.iv62.ph = phi i64 [ 0, %.lr.ph60 ], [ %n.vec72, %middle.block67 ]
  br label %scalar.ph68

vector.ph70:                                      ; preds = %.lr.ph60
  %n.vec72 = and i64 %wide.trip.count65, 2147483644
  br label %vector.body74

vector.body74:                                    ; preds = %vector.body74, %vector.ph70
  %index75 = phi i64 [ 0, %vector.ph70 ], [ %index.next76, %vector.body74 ]
  %36 = getelementptr inbounds double, ptr %35, i64 %index75
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  store <2 x double> <double 1.000000e+20, double 1.000000e+20>, ptr %36, align 8, !tbaa !25
  store <2 x double> <double 1.000000e+20, double 1.000000e+20>, ptr %37, align 8, !tbaa !25
  %index.next76 = add nuw i64 %index75, 4
  %38 = icmp eq i64 %index.next76, %n.vec72
  br i1 %38, label %middle.block67, label %vector.body74, !llvm.loop !32

middle.block67:                                   ; preds = %vector.body74
  %cmp.n77 = icmp eq i64 %n.vec72, %wide.trip.count65
  br i1 %cmp.n77, label %.loopexit, label %scalar.ph68.preheader

39:                                               ; preds = %.loopexit57
  %40 = tail call noundef i32 @_ZN7qpOASES12readFromFileEPdiPKc(ptr noundef %35, i32 noundef %10, ptr noundef nonnull %7)
  %.not53 = icmp eq i32 %40, 0
  br i1 %.not53, label %.loopexit, 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 %40, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 5926, i32 noundef 1)
  br label %58

scalar.ph68:                                      ; preds = %scalar.ph68.preheader, %scalar.ph68
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %scalar.ph68 ], [ %indvars.iv62.ph, %scalar.ph68.preheader ]
  %44 = getelementptr inbounds double, ptr %35, i64 %indvars.iv62
  store double 1.000000e+20, ptr %44, align 8, !tbaa !25
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %exitcond66.not = icmp eq i64 %indvars.iv.next63, %wide.trip.count65
  br i1 %exitcond66.not, label %.loopexit, label %scalar.ph68, !llvm.loop !33

.loopexit:                                        ; preds = %scalar.ph68, %middle.block67, %39
  %45 = mul nsw i32 %10, %9
  %46 = zext nneg i32 %45 to i64
  %47 = icmp slt i32 %45, 0
  %48 = shl nuw nsw i64 %46, 3
  %49 = select i1 %47, i64 -1, i64 %48
  %50 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %49) #7
  %51 = tail call noundef i32 @_ZN7qpOASES12readFromFileEPdiiPKc(ptr noundef nonnull %50, i32 noundef %10, i32 noundef %9, ptr noundef %3)
  %.not54 = icmp eq i32 %51, 0
  br i1 %.not54, label %.thread, label %55

.thread:                                          ; preds = %.loopexit
  %52 = tail call noundef i32 @_ZN7qpOASES8QProblem4setAEPKd(ptr noundef nonnull align 8 dereferenceable(1064) %0, ptr noundef nonnull %50)
  %53 = getelementptr inbounds i8, ptr %0, i64 808
  %54 = load ptr, ptr %53, align 8, !tbaa !34
  tail call void @_ZN7qpOASES6Matrix12doFreeMemoryEv(ptr noundef nonnull align 8 dereferenceable(12) %54)
  br label %58

55:                                               ; preds = %.loopexit
  tail call void @_ZdaPv(ptr noundef nonnull %50) #8
  %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 %51, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 5941, i32 noundef 1)
  br label %58

58:                                               ; preds = %21, %.thread, %55, %41, %30, %18, %12
  %.1 = phi i32 [ %14, %12 ], [ %20, %18 ], [ %32, %30 ], [ %43, %41 ], [ %57, %55 ], [ 0, %.thread ], [ 0, %21 ]
  ret i32 %.1
}

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

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

declare noundef i32 @_ZN7qpOASES9QProblemB19setupQPdataFromFileEPKcS2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(800), ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7qpOASES6Matrix12doFreeMemoryEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #5 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #6

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 = { nobuiltin allocsize(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 = { nobuiltin 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 #3 = { 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 #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 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin 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, !11, i64 816}
!6 = !{!"_ZTSN7qpOASES8QProblemE", !7, i64 0, !8, i64 800, !11, i64 808, !11, i64 816, !11, i64 824, !23, i64 832, !11, i64 952, !11, i64 960, !14, i64 968, !11, i64 976, !11, i64 984, !11, i64 992, !11, i64 1000, !11, i64 1008, !11, i64 1016, !11, i64 1024, !11, i64 1032, !11, i64 1040, !11, i64 1048, !11, i64 1056}
!7 = !{!"_ZTSN7qpOASES9QProblemBE", !8, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !12, i64 48, !11, i64 168, !8, i64 176, !11, i64 184, !11, i64 192, !16, i64 200, !17, i64 208, !8, i64 212, !8, i64 216, !18, i64 220, !16, i64 224, !14, i64 232, !11, i64 240, !16, i64 248, !16, i64 256, !14, i64 264, !19, i64 272, !22, i64 496, !24, i64 768}
!8 = !{!"_ZTSN7qpOASES11BooleanTypeE", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTSN7qpOASES6BoundsE", !13, i64 0, !15, i64 40, !15, i64 80}
!13 = !{!"_ZTSN7qpOASES9SubjectToE", !14, i64 8, !11, i64 16, !11, i64 24, !8, i64 32, !8, i64 36}
!14 = !{!"int", !9, i64 0}
!15 = !{!"_ZTSN7qpOASES9IndexlistE", !11, i64 0, !11, i64 8, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32}
!16 = !{!"double", !9, i64 0}
!17 = !{!"_ZTSN7qpOASES14QProblemStatusE", !9, i64 0}
!18 = !{!"_ZTSN7qpOASES11HessianTypeE", !9, i64 0}
!19 = !{!"_ZTSN7qpOASES7OptionsE", !20, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !14, i64 28, !14, i64 32, !8, i64 36, !16, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !16, i64 120, !21, i64 128, !16, i64 136, !14, i64 144, !16, i64 152, !14, i64 160, !16, i64 168, !16, i64 176, !16, i64 184, !16, i64 192, !8, i64 200, !8, i64 204, !14, i64 208, !14, i64 212, !14, i64 216}
!20 = !{!"_ZTSN7qpOASES10PrintLevelE", !9, i64 0}
!21 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !9, i64 0}
!22 = !{!"_ZTSN7qpOASES7FlipperE", !14, i64 0, !14, i64 4, !12, i64 8, !23, i64 128, !11, i64 248, !11, i64 256, !11, i64 264}
!23 = !{!"_ZTSN7qpOASES11ConstraintsE", !13, i64 0, !15, i64 40, !15, i64 80}
!24 = !{!"_ZTSN7qpOASES13TabularOutputE", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28}
!25 = !{!16, !16, i64 0}
!26 = distinct !{!26, !27, !28, !29}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!"llvm.loop.isvectorized", i32 1}
!29 = !{!"llvm.loop.unroll.runtime.disable"}
!30 = distinct !{!30, !27, !29, !28}
!31 = !{!6, !11, i64 824}
!32 = distinct !{!32, !27, !28, !29}
!33 = distinct !{!33, !27, !29, !28}
!34 = !{!6, !11, i64 808}


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