; LLVM IR from Tencent-RoboticsX/jbdl :: src/jbdl/experimental/qpoases/src (SolutionAnalysis)

; 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 [111 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK7qpOASES16SolutionAnalysis15getKktViolationEPNS_9QProblemBEPdS3_S3_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 align 2 {
  %6 = alloca double, align 8
  %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
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  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
  %23 = 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
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %24)
  store i32 %25, ptr %13, align 4, !tbaa !9
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %29

28:                                               ; preds = %5
  store double 1.000000e+20, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %157

29:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !11
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = call noundef i32 @_ZNK7qpOASES9QProblemB14getHessianTypeEv(ptr noundef nonnull align 8 dereferenceable(800) %30)
  switch i32 %31, label %33 [
    i32 0, label %72
    i32 1, label %32
  ]

32:                                               ; preds = %29
  store i32 1, ptr %16, align 4, !tbaa !11
  br label %72

33:                                               ; preds = %29
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %34, i32 0, i32 2
  %36 = load ptr, ptr %35, align 8, !tbaa !13
  %37 = load ptr, ptr %36, align 8, !tbaa !27
  %38 = getelementptr i8, ptr %37, i64 -24
  %39 = load i64, ptr %38, align 8
  %40 = getelementptr inbounds i8, ptr %36, i64 %39
  %41 = load ptr, ptr %40, align 8, !tbaa !27
  %42 = getelementptr inbounds ptr, ptr %41, i64 20
  %43 = load ptr, ptr %42, align 8
  %44 = call noundef ptr %43(ptr noundef nonnull align 8 dereferenceable(12) %40)
  store ptr %44, ptr %15, align 8, !tbaa !5
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = call noundef i32 @_ZNK7qpOASES9QProblemB19usingRegularisationEv(ptr noundef nonnull align 8 dereferenceable(800) %45)
  %47 = icmp eq i32 %46, 1
  br i1 %47, label %48, label %71

48:                                               ; preds = %33
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %67, %48
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %53, label %70

53:                                               ; preds = %49
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %54, i32 0, i32 16
  %56 = load double, ptr %55, align 8, !tbaa !29
  %57 = load ptr, ptr %15, align 8, !tbaa !5
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = load i32, ptr %13, align 4, !tbaa !9
  %60 = mul nsw i32 %58, %59
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = add nsw i32 %60, %61
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds double, ptr %57, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !30
  %66 = fsub double %65, %56
  store double %66, ptr %64, align 8, !tbaa !30
  br label %67

67:                                               ; preds = %53
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %12, align 4, !tbaa !9
  br label %49, !llvm.loop !31

70:                                               ; preds = %49
  br label %71

71:                                               ; preds = %70, %33
  br label %72

72:                                               ; preds = %71, %32, %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %74, i64 8)
  %76 = extractvalue { i64, i1 } %75, 1
  %77 = extractvalue { i64, i1 } %75, 0
  %78 = select i1 %76, i64 -1, i64 %77
  %79 = call noalias noundef nonnull ptr @_Znam(i64 noundef %78) #9
  store ptr %79, ptr %17, align 8, !tbaa !5
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = load ptr, ptr %17, align 8, !tbaa !5
  %82 = load ptr, ptr %80, align 8, !tbaa !27
  %83 = getelementptr inbounds ptr, ptr %82, i64 5
  %84 = load ptr, ptr %83, align 8
  %85 = call noundef i32 %84(ptr noundef nonnull align 8 dereferenceable(800) %80, ptr noundef %81)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  store double 0.000000e+00, ptr %18, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  store double 0.000000e+00, ptr %19, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  store double 0.000000e+00, ptr %20, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  store double 0.000000e+00, ptr %21, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = load ptr, ptr %15, align 8, !tbaa !5
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %88, i32 0, i32 3
  %90 = load ptr, ptr %89, align 8, !tbaa !33
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %91, i32 0, i32 4
  %93 = load ptr, ptr %92, align 8, !tbaa !34
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %94, i32 0, i32 5
  %96 = load ptr, ptr %95, align 8, !tbaa !35
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %97, i32 0, i32 9
  %99 = load ptr, ptr %98, align 8, !tbaa !36
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %100, i32 0, i32 10
  %102 = load ptr, ptr %101, align 8, !tbaa !37
  %103 = load ptr, ptr %17, align 8, !tbaa !5
  %104 = load i32, ptr %16, align 4, !tbaa !11
  %105 = call noundef i32 @_ZN7qpOASES15getKktViolationEiPKdS1_S1_S1_S1_S1_RdS2_S2_S1_NS_11BooleanTypeE(i32 noundef %86, ptr noundef %87, ptr noundef %90, ptr noundef %93, ptr noundef %96, ptr noundef %99, ptr noundef %102, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef %103, i32 noundef %104)
  store i32 %105, ptr %22, align 4, !tbaa !38
  %106 = load ptr, ptr %17, align 8, !tbaa !5
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %113

108:                                              ; preds = %72
  %109 = load ptr, ptr %17, align 8, !tbaa !5
  %110 = icmp eq ptr %109, null
  br i1 %110, label %112, label %111

111:                                              ; preds = %108
  call void @_ZdaPv(ptr noundef %109) #10
  br label %112

112:                                              ; preds = %111, %108
  br label %113

113:                                              ; preds = %112, %72
  %114 = load ptr, ptr %15, align 8, !tbaa !5
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %121

116:                                              ; preds = %113
  %117 = load ptr, ptr %15, align 8, !tbaa !5
  %118 = icmp eq ptr %117, null
  br i1 %118, label %120, label %119

119:                                              ; preds = %116
  call void @_ZdaPv(ptr noundef %117) #10
  br label %120

120:                                              ; preds = %119, %116
  br label %121

121:                                              ; preds = %120, %113
  %122 = load i32, ptr %22, align 4, !tbaa !38
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %128

124:                                              ; preds = %121
  %125 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %126 = load i32, ptr %22, align 4, !tbaa !38
  %127 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %125, i32 noundef %126, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 143, i32 noundef 1)
  br label %128

128:                                              ; preds = %124, %121
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = icmp ne ptr %129, null
  br i1 %130, label %131, label %134

131:                                              ; preds = %128
  %132 = load double, ptr %19, align 8, !tbaa !30
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  store double %132, ptr %133, align 8, !tbaa !30
  br label %134

134:                                              ; preds = %131, %128
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = icmp ne ptr %135, null
  br i1 %136, label %137, label %140

137:                                              ; preds = %134
  %138 = load double, ptr %20, align 8, !tbaa !30
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  store double %138, ptr %139, align 8, !tbaa !30
  br label %140

140:                                              ; preds = %137, %134
  %141 = load ptr, ptr %11, align 8, !tbaa !5
  %142 = icmp ne ptr %141, null
  br i1 %142, label %143, label %146

143:                                              ; preds = %140
  %144 = load double, ptr %21, align 8, !tbaa !30
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  store double %144, ptr %145, align 8, !tbaa !30
  br label %146

146:                                              ; preds = %143, %140
  %147 = load double, ptr %18, align 8, !tbaa !30
  %148 = load double, ptr %19, align 8, !tbaa !30
  %149 = call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %147, double noundef %148)
  store double %149, ptr %18, align 8, !tbaa !30
  %150 = load double, ptr %18, align 8, !tbaa !30
  %151 = load double, ptr %20, align 8, !tbaa !30
  %152 = call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %150, double noundef %151)
  store double %152, ptr %18, align 8, !tbaa !30
  %153 = load double, ptr %18, align 8, !tbaa !30
  %154 = load double, ptr %21, align 8, !tbaa !30
  %155 = call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %153, double noundef %154)
  store double %155, ptr %18, align 8, !tbaa !30
  %156 = load double, ptr %18, align 8, !tbaa !30
  store double %156, ptr %6, align 8
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %157

157:                                              ; preds = %146, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  %158 = load double, ptr %6, align 8
  ret double %158
}

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

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

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

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

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

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

declare noundef i32 @_ZN7qpOASES15getKktViolationEiPKdS1_S1_S1_S1_S1_RdS2_S2_S1_NS_11BooleanTypeE(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef) #6

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

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() #6

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) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES6getMaxEdd(double noundef, double noundef) #3

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { "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 = { 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 #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 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"_ZTSN7qpOASES9QProblemBE", !12, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !15, i64 48, !6, i64 168, !12, i64 176, !6, i64 184, !6, i64 192, !18, i64 200, !19, i64 208, !12, i64 212, !12, 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}
!15 = !{!"_ZTSN7qpOASES6BoundsE", !16, i64 0, !17, i64 40, !17, i64 80}
!16 = !{!"_ZTSN7qpOASES9SubjectToE", !10, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !12, 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, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !10, i64 28, !10, i64 32, !12, 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, !12, i64 200, !12, 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 = !{!28, !28, i64 0}
!28 = !{!"vtable pointer", !8, i64 0}
!29 = !{!14, !18, i64 224}
!30 = !{!18, !18, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!14, !6, i64 24}
!34 = !{!14, !6, i64 32}
!35 = !{!14, !6, i64 40}
!36 = !{!14, !6, i64 184}
!37 = !{!14, !6, i64 192}
!38 = !{!39, !39, i64 0}
!39 = !{!"_ZTSN7qpOASES11returnValueE", !7, i64 0}


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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK7qpOASES16SolutionAnalysis15getKktViolationEPNS_9QProblemBEPdS3_S3_(ptr nocapture noundef nonnull readnone align 1 dereferenceable(1) %0, ptr noundef nonnull %1, ptr noundef writeonly %2, ptr noundef writeonly %3, ptr noundef writeonly %4) local_unnamed_addr #0 align 2 {
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %1)
  %10 = tail call noundef i32 @_ZNK7qpOASES9QProblemB14getHessianTypeEv(ptr noundef nonnull align 8 dereferenceable(800) %1)
  %switch = icmp ult i32 %10, 2
  br i1 %switch, label %.loopexit, label %11

11:                                               ; preds = %5
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = load ptr, ptr %13, align 8, !tbaa !24
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr %13, i64 %16
  %18 = load ptr, ptr %17, align 8, !tbaa !24
  %19 = getelementptr inbounds i8, ptr %18, i64 160
  %20 = load ptr, ptr %19, align 8
  %21 = tail call noundef ptr %20(ptr noundef nonnull align 8 dereferenceable(12) %17)
  %22 = tail call noundef i32 @_ZNK7qpOASES9QProblemB19usingRegularisationEv(ptr noundef nonnull align 8 dereferenceable(800) %1)
  %23 = icmp eq i32 %22, 1
  %24 = icmp sgt i32 %9, 0
  %or.cond = and i1 %23, %24
  br i1 %or.cond, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %11
  %25 = getelementptr inbounds i8, ptr %1, i64 224
  %.04254 = add nuw i32 %9, 1
  %wide.trip.count = zext nneg i32 %9 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %26 = icmp eq i32 %9, 1
  br i1 %26, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %27

27:                                               ; preds = %27, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %27 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %27 ]
  %28 = load double, ptr %25, align 8, !tbaa !26
  %29 = trunc nuw nsw i64 %indvars.iv to i32
  %30 = mul i32 %.04254, %29
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds double, ptr %21, i64 %31
  %33 = load double, ptr %32, align 8, !tbaa !27
  %34 = fsub double %33, %28
  store double %34, ptr %32, align 8, !tbaa !27
  %35 = load double, ptr %25, align 8, !tbaa !26
  %36 = trunc i64 %indvars.iv to i32
  %37 = or disjoint i32 %36, 1
  %38 = mul i32 %.04254, %37
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds double, ptr %21, i64 %39
  %41 = load double, ptr %40, align 8, !tbaa !27
  %42 = fsub double %41, %35
  store double %42, ptr %40, align 8, !tbaa !27
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.loopexit.loopexit.unr-lcssa.loopexit, label %27, !llvm.loop !28

.loopexit.loopexit.unr-lcssa.loopexit:            ; preds = %27
  %43 = trunc nuw nsw i64 %indvars.iv.next.1 to i32
  br label %.loopexit.loopexit.unr-lcssa

.loopexit.loopexit.unr-lcssa:                     ; preds = %.loopexit.loopexit.unr-lcssa.loopexit, %.lr.ph
  %indvars.iv.unr = phi i32 [ 0, %.lr.ph ], [ %43, %.loopexit.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.loopexit.loopexit.epilog-lcssa

.loopexit.loopexit.epilog-lcssa:                  ; preds = %.loopexit.loopexit.unr-lcssa
  %44 = load double, ptr %25, align 8, !tbaa !26
  %45 = mul i32 %.04254, %indvars.iv.unr
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds double, ptr %21, i64 %46
  %48 = load double, ptr %47, align 8, !tbaa !27
  %49 = fsub double %48, %44
  store double %49, ptr %47, align 8, !tbaa !27
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit.epilog-lcssa, %.loopexit.loopexit.unr-lcssa, %5, %11
  %.044 = phi ptr [ %21, %11 ], [ null, %5 ], [ %21, %.loopexit.loopexit.unr-lcssa ], [ %21, %.loopexit.loopexit.epilog-lcssa ]
  %.043 = phi i32 [ 0, %11 ], [ %10, %5 ], [ 0, %.loopexit.loopexit.unr-lcssa ], [ 0, %.loopexit.loopexit.epilog-lcssa ]
  %50 = zext nneg i32 %9 to i64
  %51 = icmp slt i32 %9, 0
  %52 = shl nuw nsw i64 %50, 3
  %53 = select i1 %51, i64 -1, i64 %52
  %54 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %53) #7
  %55 = load ptr, ptr %1, align 8, !tbaa !24
  %56 = getelementptr inbounds i8, ptr %55, i64 40
  %57 = load ptr, ptr %56, align 8
  %58 = tail call noundef i32 %57(ptr noundef nonnull align 8 dereferenceable(800) %1, ptr noundef nonnull %54)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  store double 0.000000e+00, ptr %6, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store double 0.000000e+00, ptr %7, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  store double 0.000000e+00, ptr %8, align 8, !tbaa !27
  %59 = getelementptr inbounds i8, ptr %1, i64 24
  %60 = load ptr, ptr %59, align 8, !tbaa !30
  %61 = getelementptr inbounds i8, ptr %1, i64 32
  %62 = load ptr, ptr %61, align 8, !tbaa !31
  %63 = getelementptr inbounds i8, ptr %1, i64 40
  %64 = load ptr, ptr %63, align 8, !tbaa !32
  %65 = getelementptr inbounds i8, ptr %1, i64 184
  %66 = load ptr, ptr %65, align 8, !tbaa !33
  %67 = getelementptr inbounds i8, ptr %1, i64 192
  %68 = load ptr, ptr %67, align 8, !tbaa !34
  %69 = call noundef i32 @_ZN7qpOASES15getKktViolationEiPKdS1_S1_S1_S1_S1_RdS2_S2_S1_NS_11BooleanTypeE(i32 noundef %9, ptr noundef %.044, ptr noundef %60, ptr noundef %62, ptr noundef %64, ptr noundef %66, ptr noundef %68, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull %54, i32 noundef %.043)
  call void @_ZdaPv(ptr noundef nonnull %54) #9
  %.not = icmp eq ptr %.044, null
  br i1 %.not, label %71, label %70

70:                                               ; preds = %.loopexit
  call void @_ZdaPv(ptr noundef nonnull %.044) #9
  br label %71

71:                                               ; preds = %70, %.loopexit
  %.not50 = icmp eq i32 %69, 0
  br i1 %.not50, label %75, label %72

72:                                               ; preds = %71
  %73 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %74 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %73, i32 noundef %69, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 143, i32 noundef 1)
  br label %75

75:                                               ; preds = %72, %71
  %.not51 = icmp eq ptr %2, null
  br i1 %.not51, label %78, label %76

76:                                               ; preds = %75
  %77 = load double, ptr %6, align 8, !tbaa !27
  store double %77, ptr %2, align 8, !tbaa !27
  br label %78

78:                                               ; preds = %76, %75
  %.not52 = icmp eq ptr %3, null
  br i1 %.not52, label %81, label %79

79:                                               ; preds = %78
  %80 = load double, ptr %7, align 8, !tbaa !27
  store double %80, ptr %3, align 8, !tbaa !27
  br label %81

81:                                               ; preds = %79, %78
  %.not53 = icmp eq ptr %4, null
  br i1 %.not53, label %84, label %82

82:                                               ; preds = %81
  %83 = load double, ptr %8, align 8, !tbaa !27
  store double %83, ptr %4, align 8, !tbaa !27
  br label %84

84:                                               ; preds = %82, %81
  %85 = load double, ptr %6, align 8, !tbaa !27
  %86 = call noundef double @_ZN7qpOASES6getMaxEdd(double noundef 0.000000e+00, double noundef %85)
  %87 = load double, ptr %7, align 8, !tbaa !27
  %88 = call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %86, double noundef %87)
  %89 = load double, ptr %8, align 8, !tbaa !27
  %90 = call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %88, double noundef %89)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  ret double %90
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7qpOASES9QProblemB14getHessianTypeEv(ptr noundef nonnull align 8 dereferenceable(800)) local_unnamed_addr #3 align 2

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

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

declare noundef i32 @_ZN7qpOASES15getKktViolationEiPKdS1_S1_S1_S1_S1_RdS2_S2_S1_NS_11BooleanTypeE(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef) local_unnamed_addr #5

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

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() local_unnamed_addr #5

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 #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES6getMaxEdd(double noundef, double noundef) local_unnamed_addr #3

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { "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 = { builtin allocsize(0) }
attributes #8 = { nounwind }
attributes #9 = { 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, !15, i64 224}
!27 = !{!15, !15, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!6, !10, i64 24}
!31 = !{!6, !10, i64 32}
!32 = !{!6, !10, i64 40}
!33 = !{!6, !10, i64 184}
!34 = !{!6, !10, i64 192}


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