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

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

22:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %23 = load i32, ptr %13, align 4, !tbaa !9
  %24 = load i32, ptr %13, align 4, !tbaa !9
  %25 = mul nsw i32 %23, %24
  %26 = sext i32 %25 to i64
  %27 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %26, i64 8)
  %28 = extractvalue { i64, i1 } %27, 1
  %29 = extractvalue { i64, i1 } %27, 0
  %30 = select i1 %28, i64 -1, i64 %29
  %31 = call noalias noundef nonnull ptr @_Znam(i64 noundef %30) #9
  store ptr %31, ptr %15, align 8, !tbaa !5
  %32 = load ptr, ptr %15, align 8, !tbaa !5
  %33 = load i32, ptr %13, align 4, !tbaa !9
  %34 = load i32, ptr %13, align 4, !tbaa !9
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = call noundef i32 @_ZN7qpOASES12readFromFileEPdiiPKc(ptr noundef %32, i32 noundef %33, i32 noundef %34, ptr noundef %35)
  store i32 %36, ptr %14, align 4, !tbaa !11
  %37 = load i32, ptr %14, align 4, !tbaa !11
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %47

39:                                               ; preds = %22
  %40 = load ptr, ptr %15, align 8, !tbaa !5
  %41 = icmp eq ptr %40, null
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  call void @_ZdaPv(ptr noundef %40) #10
  br label %43

43:                                               ; preds = %42, %39
  %44 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %45 = load i32, ptr %14, align 4, !tbaa !11
  %46 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %44, i32 noundef %45, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 1823, i32 noundef 1)
  store i32 %46, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %56

47:                                               ; preds = %22
  %48 = load ptr, ptr %15, align 8, !tbaa !5
  %49 = call noundef i32 @_ZN7qpOASES9QProblemB4setHEPKd(ptr noundef nonnull align 8 dereferenceable(800) %18, ptr noundef %48)
  %50 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %18, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !13
  %52 = load ptr, ptr %51, align 8, !tbaa !28
  %53 = getelementptr i8, ptr %52, i64 -24
  %54 = load i64, ptr %53, align 8
  %55 = getelementptr inbounds i8, ptr %51, i64 %54
  call void @_ZN7qpOASES6Matrix12doFreeMemoryEv(ptr noundef nonnull align 8 dereferenceable(12) %55)
  store i32 0, ptr %16, align 4
  br label %56

56:                                               ; preds = %47, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  %57 = load i32, ptr %16, align 4
  switch i32 %57, label %143 [
    i32 0, label %58
  ]

58:                                               ; preds = %56
  br label %62

59:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  store ptr null, ptr %17, align 8, !tbaa !5
  %60 = load ptr, ptr %17, align 8, !tbaa !5
  %61 = call noundef i32 @_ZN7qpOASES9QProblemB4setHEPKd(ptr noundef nonnull align 8 dereferenceable(800) %18, ptr noundef %60)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %62

62:                                               ; preds = %59, %58
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = icmp eq ptr %63, null
  br i1 %64, label %65, label %68

65:                                               ; preds = %62
  %66 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %67 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %66, i32 noundef 3, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 1836, i32 noundef 1)
  store i32 %67, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %143

68:                                               ; preds = %62
  %69 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %18, i32 0, i32 3
  %70 = load ptr, ptr %69, align 8, !tbaa !30
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = call noundef i32 @_ZN7qpOASES12readFromFileEPdiPKc(ptr noundef %70, i32 noundef %71, ptr noundef %72)
  store i32 %73, ptr %14, align 4, !tbaa !11
  %74 = load i32, ptr %14, align 4, !tbaa !11
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %80

76:                                               ; preds = %68
  %77 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %78 = load i32, ptr %14, align 4, !tbaa !11
  %79 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %77, i32 noundef %78, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 1840, i32 noundef 1)
  store i32 %79, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %143

80:                                               ; preds = %68
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %96

83:                                               ; preds = %80
  %84 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %18, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !31
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = call noundef i32 @_ZN7qpOASES12readFromFileEPdiPKc(ptr noundef %85, i32 noundef %86, ptr noundef %87)
  store i32 %88, ptr %14, align 4, !tbaa !11
  %89 = load i32, ptr %14, align 4, !tbaa !11
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %95

91:                                               ; preds = %83
  %92 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %93 = load i32, ptr %14, align 4, !tbaa !11
  %94 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %92, i32 noundef %93, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 1847, i32 noundef 1)
  store i32 %94, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %143

95:                                               ; preds = %83
  br label %111

96:                                               ; preds = %80
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %107, %96
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %101, label %110

101:                                              ; preds = %97
  %102 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %18, i32 0, i32 4
  %103 = load ptr, ptr %102, align 8, !tbaa !31
  %104 = load i32, ptr %12, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds double, ptr %103, i64 %105
  store double -1.000000e+20, ptr %106, align 8, !tbaa !32
  br label %107

107:                                              ; preds = %101
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %12, align 4, !tbaa !9
  br label %97, !llvm.loop !33

110:                                              ; preds = %97
  br label %111

111:                                              ; preds = %110, %95
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = icmp ne ptr %112, null
  br i1 %113, label %114, label %127

114:                                              ; preds = %111
  %115 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %18, i32 0, i32 5
  %116 = load ptr, ptr %115, align 8, !tbaa !35
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  %119 = call noundef i32 @_ZN7qpOASES12readFromFileEPdiPKc(ptr noundef %116, i32 noundef %117, ptr noundef %118)
  store i32 %119, ptr %14, align 4, !tbaa !11
  %120 = load i32, ptr %14, align 4, !tbaa !11
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %126

122:                                              ; preds = %114
  %123 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %124 = load i32, ptr %14, align 4, !tbaa !11
  %125 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %123, i32 noundef %124, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 1861, i32 noundef 1)
  store i32 %125, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %143

126:                                              ; preds = %114
  br label %142

127:                                              ; preds = %111
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %138, %127
  %129 = load i32, ptr %12, align 4, !tbaa !9
  %130 = load i32, ptr %13, align 4, !tbaa !9
  %131 = icmp slt i32 %129, %130
  br i1 %131, label %132, label %141

132:                                              ; preds = %128
  %133 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %18, i32 0, i32 5
  %134 = load ptr, ptr %133, align 8, !tbaa !35
  %135 = load i32, ptr %12, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds double, ptr %134, i64 %136
  store double 1.000000e+20, ptr %137, align 8, !tbaa !32
  br label %138

138:                                              ; preds = %132
  %139 = load i32, ptr %12, align 4, !tbaa !9
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %12, align 4, !tbaa !9
  br label %128, !llvm.loop !36

141:                                              ; preds = %128
  br label %142

142:                                              ; preds = %141, %126
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %143

143:                                              ; preds = %142, %122, %91, %76, %65, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  %144 = load i32, ptr %6, align 4
  ret i32 %144
}

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

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

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

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

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #5 = { 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 = { 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 #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 16}
!14 = !{!"_ZTSN7qpOASES9QProblemBE", !15, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !16, i64 48, !6, i64 168, !15, i64 176, !6, i64 184, !6, i64 192, !19, i64 200, !20, i64 208, !15, i64 212, !15, i64 216, !21, i64 220, !19, i64 224, !10, i64 232, !6, i64 240, !19, i64 248, !19, i64 256, !10, i64 264, !22, i64 272, !25, i64 496, !27, i64 768}
!15 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!16 = !{!"_ZTSN7qpOASES6BoundsE", !17, i64 0, !18, i64 40, !18, i64 80}
!17 = !{!"_ZTSN7qpOASES9SubjectToE", !10, i64 8, !6, i64 16, !6, i64 24, !15, i64 32, !15, i64 36}
!18 = !{!"_ZTSN7qpOASES9IndexlistE", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!19 = !{!"double", !7, i64 0}
!20 = !{!"_ZTSN7qpOASES14QProblemStatusE", !7, i64 0}
!21 = !{!"_ZTSN7qpOASES11HessianTypeE", !7, i64 0}
!22 = !{!"_ZTSN7qpOASES7OptionsE", !23, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !10, i64 28, !10, i64 32, !15, i64 36, !19, i64 40, !19, i64 48, !19, i64 56, !19, i64 64, !19, i64 72, !19, i64 80, !19, i64 88, !19, i64 96, !19, i64 104, !19, i64 112, !19, i64 120, !24, i64 128, !19, i64 136, !10, i64 144, !19, i64 152, !10, i64 160, !19, i64 168, !19, i64 176, !19, i64 184, !19, i64 192, !15, i64 200, !15, i64 204, !10, i64 208, !10, i64 212, !10, i64 216}
!23 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!24 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!25 = !{!"_ZTSN7qpOASES7FlipperE", !10, i64 0, !10, i64 4, !16, i64 8, !26, i64 128, !6, i64 248, !6, i64 256, !6, i64 264}
!26 = !{!"_ZTSN7qpOASES11ConstraintsE", !17, i64 0, !18, i64 40, !18, 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 = !{!14, !6, i64 24}
!31 = !{!14, !6, i64 32}
!32 = !{!19, !19, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!14, !6, i64 40}
!36 = distinct !{!36, !34}


; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #1

; 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: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES9QProblemB19setupQPdataFromFileEPKcS2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #3 align 2 {
  %6 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %23, label %7

7:                                                ; preds = %5
  %8 = mul nsw i32 %6, %6
  %9 = zext nneg i32 %8 to i64
  %10 = shl nuw nsw i64 %9, 3
  %11 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %10) #6
  %12 = tail call noundef i32 @_ZN7qpOASES12readFromFileEPdiiPKc(ptr noundef nonnull %11, i32 noundef %6, i32 noundef %6, ptr noundef nonnull %1)
  %.not48 = icmp eq i32 %12, 0
  br i1 %.not48, label %.thread, label %20

.thread:                                          ; preds = %7
  %13 = tail call noundef i32 @_ZN7qpOASES9QProblemB4setHEPKd(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef nonnull %11)
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = load ptr, ptr %15, align 8, !tbaa !24
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr %15, i64 %18
  tail call void @_ZN7qpOASES6Matrix12doFreeMemoryEv(ptr noundef nonnull align 8 dereferenceable(12) %19)
  br label %25

20:                                               ; preds = %7
  tail call void @_ZdaPv(ptr noundef nonnull %11) #7
  %21 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %22 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %21, i32 noundef %12, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 1823, i32 noundef 1)
  br label %.loopexit

23:                                               ; preds = %5
  %24 = tail call noundef i32 @_ZN7qpOASES9QProblemB4setHEPKd(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef null)
  br label %25

25:                                               ; preds = %.thread, %23
  %26 = icmp eq ptr %2, null
  br i1 %26, label %27, label %30

27:                                               ; preds = %25
  %28 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %29 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %28, i32 noundef 3, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 1836, i32 noundef 1)
  br label %.loopexit

30:                                               ; preds = %25
  %31 = getelementptr inbounds i8, ptr %0, i64 24
  %32 = load ptr, ptr %31, align 8, !tbaa !26
  %33 = tail call noundef i32 @_ZN7qpOASES12readFromFileEPdiPKc(ptr noundef %32, i32 noundef %6, ptr noundef nonnull %2)
  %.not49 = icmp eq i32 %33, 0
  br i1 %.not49, label %37, label %34

34:                                               ; preds = %30
  %35 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %36 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %35, i32 noundef %33, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 1840, i32 noundef 1)
  br label %.loopexit

37:                                               ; preds = %30
  %.not50 = icmp eq ptr %3, null
  br i1 %.not50, label %.preheader55, label %44

.preheader55:                                     ; preds = %37
  %38 = icmp sgt i32 %6, 0
  br i1 %38, label %.lr.ph, label %.loopexit56

.lr.ph:                                           ; preds = %.preheader55
  %39 = getelementptr inbounds i8, ptr %0, i64 32
  %40 = load ptr, ptr %39, align 8, !tbaa !27
  %wide.trip.count = zext nneg i32 %6 to i64
  %min.iters.check = icmp ult i32 %6, 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 ]
  %41 = getelementptr inbounds double, ptr %40, i64 %index
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  store <2 x double> <double -1.000000e+20, double -1.000000e+20>, ptr %41, align 8, !tbaa !28
  store <2 x double> <double -1.000000e+20, double -1.000000e+20>, ptr %42, align 8, !tbaa !28
  %index.next = add nuw i64 %index, 4
  %43 = icmp eq i64 %index.next, %n.vec
  br i1 %43, label %middle.block, label %vector.body, !llvm.loop !29

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

44:                                               ; preds = %37
  %45 = getelementptr inbounds i8, ptr %0, i64 32
  %46 = load ptr, ptr %45, align 8, !tbaa !27
  %47 = tail call noundef i32 @_ZN7qpOASES12readFromFileEPdiPKc(ptr noundef %46, i32 noundef %6, ptr noundef nonnull %3)
  %.not51 = icmp eq i32 %47, 0
  br i1 %.not51, label %.loopexit56, label %48

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

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %51 = getelementptr inbounds double, ptr %40, i64 %indvars.iv
  store double -1.000000e+20, ptr %51, align 8, !tbaa !28
  %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 %.loopexit56, label %scalar.ph, !llvm.loop !33

.loopexit56:                                      ; preds = %scalar.ph, %middle.block, %.preheader55, %44
  %.not52 = icmp eq ptr %4, null
  br i1 %.not52, label %.preheader, label %58

.preheader:                                       ; preds = %.loopexit56
  %52 = icmp sgt i32 %6, 0
  br i1 %52, label %.lr.ph59, label %.loopexit

.lr.ph59:                                         ; preds = %.preheader
  %53 = getelementptr inbounds i8, ptr %0, i64 40
  %54 = load ptr, ptr %53, align 8, !tbaa !34
  %wide.trip.count64 = zext nneg i32 %6 to i64
  %min.iters.check68 = icmp ult i32 %6, 4
  br i1 %min.iters.check68, label %scalar.ph67.preheader, label %vector.ph69

scalar.ph67.preheader:                            ; preds = %middle.block66, %.lr.ph59
  %indvars.iv61.ph = phi i64 [ 0, %.lr.ph59 ], [ %n.vec71, %middle.block66 ]
  br label %scalar.ph67

vector.ph69:                                      ; preds = %.lr.ph59
  %n.vec71 = and i64 %wide.trip.count64, 2147483644
  br label %vector.body73

vector.body73:                                    ; preds = %vector.body73, %vector.ph69
  %index74 = phi i64 [ 0, %vector.ph69 ], [ %index.next75, %vector.body73 ]
  %55 = getelementptr inbounds double, ptr %54, i64 %index74
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  store <2 x double> <double 1.000000e+20, double 1.000000e+20>, ptr %55, align 8, !tbaa !28
  store <2 x double> <double 1.000000e+20, double 1.000000e+20>, ptr %56, align 8, !tbaa !28
  %index.next75 = add nuw i64 %index74, 4
  %57 = icmp eq i64 %index.next75, %n.vec71
  br i1 %57, label %middle.block66, label %vector.body73, !llvm.loop !35

middle.block66:                                   ; preds = %vector.body73
  %cmp.n76 = icmp eq i64 %n.vec71, %wide.trip.count64
  br i1 %cmp.n76, label %.loopexit, label %scalar.ph67.preheader

58:                                               ; preds = %.loopexit56
  %59 = getelementptr inbounds i8, ptr %0, i64 40
  %60 = load ptr, ptr %59, align 8, !tbaa !34
  %61 = tail call noundef i32 @_ZN7qpOASES12readFromFileEPdiPKc(ptr noundef %60, i32 noundef %6, ptr noundef nonnull %4)
  %.not53 = icmp eq i32 %61, 0
  br i1 %.not53, label %.loopexit, label %62

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

scalar.ph67:                                      ; preds = %scalar.ph67.preheader, %scalar.ph67
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %scalar.ph67 ], [ %indvars.iv61.ph, %scalar.ph67.preheader ]
  %65 = getelementptr inbounds double, ptr %54, i64 %indvars.iv61
  store double 1.000000e+20, ptr %65, align 8, !tbaa !28
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next62, %wide.trip.count64
  br i1 %exitcond65.not, label %.loopexit, label %scalar.ph67, !llvm.loop !36

.loopexit:                                        ; preds = %scalar.ph67, %middle.block66, %.preheader, %20, %58, %62, %48, %34, %27
  %.1 = phi i32 [ %29, %27 ], [ %36, %34 ], [ %50, %48 ], [ %64, %62 ], [ %22, %20 ], [ 0, %58 ], [ 0, %.preheader ], [ 0, %middle.block66 ], [ 0, %scalar.ph67 ]
  ret i32 %.1
}

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

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

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

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

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 = { 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 = { 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 = { 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 = { builtin allocsize(0) }
attributes #7 = { 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, !10, i64 16}
!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 24}
!27 = !{!6, !10, i64 32}
!28 = !{!15, !15, i64 0}
!29 = distinct !{!29, !30, !31, !32}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!"llvm.loop.isvectorized", i32 1}
!32 = !{!"llvm.loop.unroll.runtime.disable"}
!33 = distinct !{!33, !30, !32, !31}
!34 = !{!6, !10, i64 40}
!35 = distinct !{!35, !30, !31, !32}
!36 = distinct !{!36, !30, !32, !31}


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