; 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.86 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [8 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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7qpOASES6Bounds7getFreeEv(ptr noundef nonnull align 8 dereferenceable(120)) #2 align 2

declare noundef i32 @_ZNK7qpOASES9Indexlist14getNumberArrayEPPi(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7qpOASES6Bounds8getFixedEv(ptr noundef nonnull align 8 dereferenceable(120)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7qpOASES11Constraints9getActiveEv(ptr noundef nonnull align 8 dereferenceable(120)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7qpOASES11Constraints11getInactiveEv(ptr noundef nonnull align 8 dereferenceable(120)) #2 align 2

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

declare noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKdiiPKc(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #3

declare i32 @fclose(ptr noundef) #3

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

23:                                               ; preds = %2
  store i32 127, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %90

24:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %25 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %18)
  store i32 %25, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %26 = call noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1064) %18)
  store i32 %26, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %27 = call noundef i32 @_ZNK7qpOASES9QProblemB6getNFREv(ptr noundef nonnull align 8 dereferenceable(800) %18)
  store i32 %27, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %28 = call noundef i32 @_ZNK7qpOASES9QProblemB6getNFXEv(ptr noundef nonnull align 8 dereferenceable(800) %18)
  store i32 %28, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %29 = call noundef i32 @_ZNK7qpOASES8QProblem6getNACEv(ptr noundef nonnull align 8 dereferenceable(1064) %18)
  store i32 %29, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %30 = call noundef i32 @_ZNK7qpOASES8QProblem7getNIACEv(ptr noundef nonnull align 8 dereferenceable(1064) %18)
  store i32 %30, ptr %13, align 4, !tbaa !9
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %18, i32 0, i32 6
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %18, i32 0, i32 8
  %35 = load i32, ptr %34, align 8, !tbaa !27
  %36 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %18, i32 0, i32 8
  %37 = load i32, ptr %36, align 8, !tbaa !27
  %38 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKdiiPKc(ptr noundef %31, ptr noundef %33, i32 noundef %35, i32 noundef %37, ptr noundef @.str.94)
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %18, i32 0, i32 7
  %41 = load ptr, ptr %40, align 8, !tbaa !28
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = load i32, ptr %8, align 4, !tbaa !9
  %44 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKdiiPKc(ptr noundef %39, ptr noundef %41, i32 noundef %42, i32 noundef %43, ptr noundef @.str.95)
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %18, i32 0, i32 9
  %47 = load ptr, ptr %46, align 8, !tbaa !29
  %48 = load i32, ptr %9, align 4, !tbaa !9
  %49 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKdiiPKc(ptr noundef %45, ptr noundef %47, i32 noundef %48, i32 noundef 1, ptr noundef @.str.96)
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %18, i32 0, i32 10
  %52 = load ptr, ptr %51, align 8, !tbaa !30
  %53 = load i32, ptr %9, align 4, !tbaa !9
  %54 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKdiiPKc(ptr noundef %50, ptr noundef %52, i32 noundef %53, i32 noundef 1, ptr noundef @.str.97)
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %18, i32 0, i32 11
  %57 = load ptr, ptr %56, align 8, !tbaa !31
  %58 = load i32, ptr %9, align 4, !tbaa !9
  %59 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKdiiPKc(ptr noundef %55, ptr noundef %57, i32 noundef %58, i32 noundef 1, ptr noundef @.str.98)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %60 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %18, i32 0, i32 6
  %61 = call noundef ptr @_ZN7qpOASES6Bounds7getFreeEv(ptr noundef nonnull align 8 dereferenceable(120) %60)
  %62 = call noundef i32 @_ZNK7qpOASES9Indexlist14getNumberArrayEPPi(ptr noundef nonnull align 8 dereferenceable(36) %61, ptr noundef %14)
  %63 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %18, i32 0, i32 6
  %64 = call noundef ptr @_ZN7qpOASES6Bounds8getFixedEv(ptr noundef nonnull align 8 dereferenceable(120) %63)
  %65 = call noundef i32 @_ZNK7qpOASES9Indexlist14getNumberArrayEPPi(ptr noundef nonnull align 8 dereferenceable(36) %64, ptr noundef %15)
  %66 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %18, i32 0, i32 5
  %67 = call noundef ptr @_ZN7qpOASES11Constraints9getActiveEv(ptr noundef nonnull align 8 dereferenceable(120) %66)
  %68 = call noundef i32 @_ZNK7qpOASES9Indexlist14getNumberArrayEPPi(ptr noundef nonnull align 8 dereferenceable(36) %67, ptr noundef %16)
  %69 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %18, i32 0, i32 5
  %70 = call noundef ptr @_ZN7qpOASES11Constraints11getInactiveEv(ptr noundef nonnull align 8 dereferenceable(120) %69)
  %71 = call noundef i32 @_ZNK7qpOASES9Indexlist14getNumberArrayEPPi(ptr noundef nonnull align 8 dereferenceable(36) %70, ptr noundef %17)
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = load i32, ptr %10, align 4, !tbaa !9
  %75 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKiiiPKc(ptr noundef %72, ptr noundef %73, i32 noundef %74, i32 noundef 1, ptr noundef @.str.99)
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = load ptr, ptr %15, align 8, !tbaa !5
  %78 = load i32, ptr %11, align 4, !tbaa !9
  %79 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKiiiPKc(ptr noundef %76, ptr noundef %77, i32 noundef %78, i32 noundef 1, ptr noundef @.str.100)
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load ptr, ptr %16, align 8, !tbaa !5
  %82 = load i32, ptr %12, align 4, !tbaa !9
  %83 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKiiiPKc(ptr noundef %80, ptr noundef %81, i32 noundef %82, i32 noundef 1, ptr noundef @.str.101)
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = load ptr, ptr %17, align 8, !tbaa !5
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKiiiPKc(ptr noundef %84, ptr noundef %85, i32 noundef %86, i32 noundef 1, ptr noundef @.str.102)
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = call i32 @fclose(ptr noundef %88)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %90

90:                                               ; preds = %24, %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %91 = load i32, ptr %3, align 4
  ret i32 %91
}

declare noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKiiiPKc(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #3

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


; 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.86 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [8 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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7qpOASES6Bounds7getFreeEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #2 align 2

declare noundef i32 @_ZNK7qpOASES9Indexlist14getNumberArrayEPPi(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7qpOASES6Bounds8getFixedEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7qpOASES11Constraints9getActiveEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7qpOASES11Constraints11getInactiveEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #2 align 2

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #4

declare noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKdiiPKc(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 128) i32 @_ZN7qpOASES8QProblem27writeQpWorkspaceIntoMatFileEPKc(ptr noundef nonnull align 8 dereferenceable(1064) %0, ptr nocapture noundef readonly %1) local_unnamed_addr #5 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.86)
  %8 = icmp eq ptr %7, null
  br i1 %8, label %52, label %9

9:                                                ; preds = %2
  %10 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %11 = tail call noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1064) %0)
  %12 = tail call noundef i32 @_ZNK7qpOASES9QProblemB6getNFREv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %13 = tail call noundef i32 @_ZNK7qpOASES9QProblemB6getNFXEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %14 = tail call noundef i32 @_ZNK7qpOASES8QProblem6getNACEv(ptr noundef nonnull align 8 dereferenceable(1064) %0)
  %15 = tail call noundef i32 @_ZNK7qpOASES8QProblem7getNIACEv(ptr noundef nonnull align 8 dereferenceable(1064) %0)
  %16 = getelementptr inbounds i8, ptr %0, i64 952
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %0, i64 968
  %19 = load i32, ptr %18, align 8, !tbaa !25
  %20 = tail call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKdiiPKc(ptr noundef nonnull %7, ptr noundef %17, i32 noundef %19, i32 noundef %19, ptr noundef nonnull @.str.94)
  %21 = getelementptr inbounds i8, ptr %0, i64 960
  %22 = load ptr, ptr %21, align 8, !tbaa !26
  %23 = tail call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKdiiPKc(ptr noundef nonnull %7, ptr noundef %22, i32 noundef %10, i32 noundef %10, ptr noundef nonnull @.str.95)
  %24 = getelementptr inbounds i8, ptr %0, i64 976
  %25 = load ptr, ptr %24, align 8, !tbaa !27
  %26 = tail call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKdiiPKc(ptr noundef nonnull %7, ptr noundef %25, i32 noundef %11, i32 noundef 1, ptr noundef nonnull @.str.96)
  %27 = getelementptr inbounds i8, ptr %0, i64 984
  %28 = load ptr, ptr %27, align 8, !tbaa !28
  %29 = tail call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKdiiPKc(ptr noundef nonnull %7, ptr noundef %28, i32 noundef %11, i32 noundef 1, ptr noundef nonnull @.str.97)
  %30 = getelementptr inbounds i8, ptr %0, i64 992
  %31 = load ptr, ptr %30, align 8, !tbaa !29
  %32 = tail call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKdiiPKc(ptr noundef nonnull %7, ptr noundef %31, i32 noundef %11, i32 noundef 1, ptr noundef nonnull @.str.98)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %33 = getelementptr inbounds i8, ptr %0, i64 48
  %34 = tail call noundef ptr @_ZN7qpOASES6Bounds7getFreeEv(ptr noundef nonnull align 8 dereferenceable(120) %33)
  %35 = call noundef i32 @_ZNK7qpOASES9Indexlist14getNumberArrayEPPi(ptr noundef nonnull align 8 dereferenceable(36) %34, ptr noundef nonnull %3)
  %36 = call noundef ptr @_ZN7qpOASES6Bounds8getFixedEv(ptr noundef nonnull align 8 dereferenceable(120) %33)
  %37 = call noundef i32 @_ZNK7qpOASES9Indexlist14getNumberArrayEPPi(ptr noundef nonnull align 8 dereferenceable(36) %36, ptr noundef nonnull %4)
  %38 = getelementptr inbounds i8, ptr %0, i64 832
  %39 = call noundef ptr @_ZN7qpOASES11Constraints9getActiveEv(ptr noundef nonnull align 8 dereferenceable(120) %38)
  %40 = call noundef i32 @_ZNK7qpOASES9Indexlist14getNumberArrayEPPi(ptr noundef nonnull align 8 dereferenceable(36) %39, ptr noundef nonnull %5)
  %41 = call noundef ptr @_ZN7qpOASES11Constraints11getInactiveEv(ptr noundef nonnull align 8 dereferenceable(120) %38)
  %42 = call noundef i32 @_ZNK7qpOASES9Indexlist14getNumberArrayEPPi(ptr noundef nonnull align 8 dereferenceable(36) %41, ptr noundef nonnull %6)
  %43 = load ptr, ptr %3, align 8, !tbaa !30
  %44 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKiiiPKc(ptr noundef nonnull %7, ptr noundef %43, i32 noundef %12, i32 noundef 1, ptr noundef nonnull @.str.99)
  %45 = load ptr, ptr %4, align 8, !tbaa !30
  %46 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKiiiPKc(ptr noundef nonnull %7, ptr noundef %45, i32 noundef %13, i32 noundef 1, ptr noundef nonnull @.str.100)
  %47 = load ptr, ptr %5, align 8, !tbaa !30
  %48 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKiiiPKc(ptr noundef nonnull %7, ptr noundef %47, i32 noundef %14, i32 noundef 1, ptr noundef nonnull @.str.101)
  %49 = load ptr, ptr %6, align 8, !tbaa !30
  %50 = call noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKiiiPKc(ptr noundef nonnull %7, ptr noundef %49, i32 noundef %15, i32 noundef 1, ptr noundef nonnull @.str.102)
  %51 = call i32 @fclose(ptr noundef nonnull %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %52

52:                                               ; preds = %2, %9
  %.0 = phi i32 [ 0, %9 ], [ 127, %2 ]
  ret i32 %.0
}

declare noundef i32 @_ZN7qpOASES16writeIntoMatFileEP8_IO_FILEPKiiiPKc(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { 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 #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 = { 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 952}
!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 = !{!6, !14, i64 968}
!26 = !{!6, !11, i64 960}
!27 = !{!6, !11, i64 976}
!28 = !{!6, !11, i64 984}
!29 = !{!6, !11, i64 992}
!30 = !{!11, !11, i64 0}


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