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

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

%"struct.qpOASES::MessageHandling::ReturnValueList" = type { i32, ptr, i32 }
%"class.qpOASES::MessageHandling" = type <{ i32, i32, i32, [4 x i8], ptr, i32, [4 x i8] }>

@_ZN7qpOASES15returnValueListE = external dso_local global [152 x %"struct.qpOASES::MessageHandling::ReturnValueList"], align 16
@.str.143 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local 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 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES15MessageHandling12throwMessageENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusES3_(ptr noundef nonnull align 8 dereferenceable(28) %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i64 noundef %5, i32 noundef %6, ptr noundef %7) #0 align 2 {
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca [160 x i8], align 16
  %20 = alloca [160 x i8], align 16
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store i32 %1, ptr %11, align 4, !tbaa !9
  store ptr %2, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store ptr %4, ptr %14, align 8, !tbaa !5
  store i64 %5, ptr %15, align 8, !tbaa !11
  store i32 %6, ptr %16, align 4, !tbaa !13
  store ptr %7, ptr %17, align 8, !tbaa !5
  %23 = load ptr, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 160, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 160, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %24 = getelementptr inbounds %"class.qpOASES::MessageHandling", ptr %23, i32 0, i32 5
  %25 = load i32, ptr %24, align 8, !tbaa !17
  %26 = sub nsw i32 %25, 1
  %27 = mul nsw i32 %26, 2
  store i32 %27, ptr %21, align 4, !tbaa !15
  %28 = load i32, ptr %21, align 4, !tbaa !15
  %29 = icmp slt i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %8
  store i32 0, ptr %21, align 4, !tbaa !15
  br label %31

31:                                               ; preds = %30, %8
  %32 = load i32, ptr %21, align 4, !tbaa !15
  %33 = icmp sgt i32 %32, 40
  br i1 %33, label %34, label %35

34:                                               ; preds = %31
  store i32 40, ptr %21, align 4, !tbaa !15
  br label %35

35:                                               ; preds = %34, %31
  %36 = load i32, ptr %21, align 4, !tbaa !15
  %37 = icmp sge i32 %36, 160
  br i1 %37, label %38, label %39

38:                                               ; preds = %35
  store i32 159, ptr %21, align 4, !tbaa !15
  br label %39

39:                                               ; preds = %38, %35
  %40 = getelementptr inbounds [160 x i8], ptr %20, i64 0, i64 0
  %41 = load i32, ptr %21, align 4, !tbaa !15
  %42 = sext i32 %41 to i64
  call void @llvm.memset.p0.i64(ptr align 16 %40, i8 32, i64 %42, i1 false)
  %43 = load i32, ptr %21, align 4, !tbaa !15
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [160 x i8], ptr %20, i64 0, i64 %44
  store i8 0, ptr %45, align 1, !tbaa !19
  br label %46

46:                                               ; preds = %65, %39
  %47 = load i32, ptr %18, align 4, !tbaa !15
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [152 x %"struct.qpOASES::MessageHandling::ReturnValueList"], ptr @_ZN7qpOASES15returnValueListE, i64 0, i64 %48
  %50 = getelementptr inbounds %"struct.qpOASES::MessageHandling::ReturnValueList", ptr %49, i32 0, i32 0
  %51 = load i32, ptr %50, align 8, !tbaa !20
  %52 = icmp ne i32 %51, -1
  br i1 %52, label %53, label %66

53:                                               ; preds = %46
  %54 = load i32, ptr %18, align 4, !tbaa !15
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [152 x %"struct.qpOASES::MessageHandling::ReturnValueList"], ptr @_ZN7qpOASES15returnValueListE, i64 0, i64 %55
  %57 = getelementptr inbounds %"struct.qpOASES::MessageHandling::ReturnValueList", ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 8, !tbaa !20
  %59 = load i32, ptr %11, align 4, !tbaa !9
  %60 = icmp eq i32 %58, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %53
  br label %66

62:                                               ; preds = %53
  %63 = load i32, ptr %18, align 4, !tbaa !15
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %18, align 4, !tbaa !15
  br label %65

65:                                               ; preds = %62
  br label %46, !llvm.loop !22

66:                                               ; preds = %61, %46
  %67 = load i32, ptr %18, align 4, !tbaa !15
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [152 x %"struct.qpOASES::MessageHandling::ReturnValueList"], ptr @_ZN7qpOASES15returnValueListE, i64 0, i64 %68
  %70 = getelementptr inbounds %"struct.qpOASES::MessageHandling::ReturnValueList", ptr %69, i32 0, i32 0
  %71 = load i32, ptr %70, align 8, !tbaa !20
  %72 = icmp eq i32 %71, -1
  br i1 %72, label %73, label %76

73:                                               ; preds = %66
  %74 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %23, i32 noundef 7, ptr noundef null, ptr noundef @.str.143, ptr noundef @.str.144, i64 noundef 502, i32 noundef 1)
  %75 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %75, ptr %9, align 4
  store i32 1, ptr %22, align 4
  br label %150

76:                                               ; preds = %66
  %77 = load i32, ptr %18, align 4, !tbaa !15
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [152 x %"struct.qpOASES::MessageHandling::ReturnValueList"], ptr @_ZN7qpOASES15returnValueListE, i64 0, i64 %78
  %80 = getelementptr inbounds %"struct.qpOASES::MessageHandling::ReturnValueList", ptr %79, i32 0, i32 2
  %81 = load i32, ptr %80, align 8, !tbaa !24
  %82 = icmp eq i32 %81, 1
  br i1 %82, label %83, label %148

83:                                               ; preds = %76
  %84 = load i32, ptr %16, align 4, !tbaa !13
  %85 = icmp eq i32 %84, 1
  br i1 %85, label %86, label %148

86:                                               ; preds = %83
  %87 = getelementptr inbounds %"class.qpOASES::MessageHandling", ptr %23, i32 0, i32 5
  %88 = load i32, ptr %87, align 8, !tbaa !17
  %89 = icmp slt i32 %88, 0
  br i1 %89, label %90, label %93

90:                                               ; preds = %86
  %91 = call noundef i32 @_ZN7qpOASES8myPrintfEPKc(ptr noundef @.str.149)
  %92 = getelementptr inbounds %"class.qpOASES::MessageHandling", ptr %23, i32 0, i32 5
  store i32 0, ptr %92, align 8, !tbaa !17
  br label %93

93:                                               ; preds = %90, %86
  %94 = getelementptr inbounds %"class.qpOASES::MessageHandling", ptr %23, i32 0, i32 5
  %95 = load i32, ptr %94, align 8, !tbaa !17
  %96 = icmp sgt i32 %95, 0
  br i1 %96, label %97, label %103

97:                                               ; preds = %93
  %98 = getelementptr inbounds [160 x i8], ptr %19, i64 0, i64 0
  %99 = getelementptr inbounds [160 x i8], ptr %20, i64 0, i64 0
  %100 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %98, i64 noundef 160, ptr noundef @.str.150, ptr noundef %99) #5
  %101 = getelementptr inbounds [160 x i8], ptr %19, i64 0, i64 0
  %102 = call noundef i32 @_ZN7qpOASES8myPrintfEPKc(ptr noundef %101)
  br label %103

103:                                              ; preds = %97, %93
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = icmp eq ptr %104, null
  br i1 %105, label %106, label %117

106:                                              ; preds = %103
  %107 = getelementptr inbounds [160 x i8], ptr %19, i64 0, i64 0
  %108 = load ptr, ptr %17, align 8, !tbaa !5
  %109 = load i32, ptr %18, align 4, !tbaa !15
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [152 x %"struct.qpOASES::MessageHandling::ReturnValueList"], ptr @_ZN7qpOASES15returnValueListE, i64 0, i64 %110
  %112 = getelementptr inbounds %"struct.qpOASES::MessageHandling::ReturnValueList", ptr %111, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !25
  %114 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %107, i64 noundef 160, ptr noundef @.str.151, ptr noundef %108, ptr noundef %113) #5
  %115 = getelementptr inbounds [160 x i8], ptr %19, i64 0, i64 0
  %116 = call noundef i32 @_ZN7qpOASES8myPrintfEPKc(ptr noundef %115)
  br label %129

117:                                              ; preds = %103
  %118 = getelementptr inbounds [160 x i8], ptr %19, i64 0, i64 0
  %119 = load ptr, ptr %17, align 8, !tbaa !5
  %120 = load i32, ptr %18, align 4, !tbaa !15
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [152 x %"struct.qpOASES::MessageHandling::ReturnValueList"], ptr @_ZN7qpOASES15returnValueListE, i64 0, i64 %121
  %123 = getelementptr inbounds %"struct.qpOASES::MessageHandling::ReturnValueList", ptr %122, i32 0, i32 1
  %124 = load ptr, ptr %123, align 8, !tbaa !25
  %125 = load ptr, ptr %12, align 8, !tbaa !5
  %126 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %118, i64 noundef 160, ptr noundef @.str.152, ptr noundef %119, ptr noundef %124, ptr noundef %125) #5
  %127 = getelementptr inbounds [160 x i8], ptr %19, i64 0, i64 0
  %128 = call noundef i32 @_ZN7qpOASES8myPrintfEPKc(ptr noundef %127)
  br label %129

129:                                              ; preds = %117, %106
  %130 = load ptr, ptr %17, align 8, !tbaa !5
  %131 = getelementptr inbounds i8, ptr %130, i64 0
  %132 = load i8, ptr %131, align 1, !tbaa !19
  %133 = sext i8 %132 to i32
  %134 = icmp eq i32 %133, 69
  br i1 %134, label %135, label %139

135:                                              ; preds = %129
  %136 = getelementptr inbounds %"class.qpOASES::MessageHandling", ptr %23, i32 0, i32 5
  %137 = load i32, ptr %136, align 8, !tbaa !17
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %136, align 8, !tbaa !17
  br label %147

139:                                              ; preds = %129
  %140 = getelementptr inbounds %"class.qpOASES::MessageHandling", ptr %23, i32 0, i32 5
  %141 = load i32, ptr %140, align 8, !tbaa !17
  %142 = icmp sgt i32 %141, 0
  br i1 %142, label %143, label %145

143:                                              ; preds = %139
  %144 = call noundef i32 @_ZN7qpOASES8myPrintfEPKc(ptr noundef @.str.149)
  br label %145

145:                                              ; preds = %143, %139
  %146 = getelementptr inbounds %"class.qpOASES::MessageHandling", ptr %23, i32 0, i32 5
  store i32 0, ptr %146, align 8, !tbaa !17
  br label %147

147:                                              ; preds = %145, %135
  br label %148

148:                                              ; preds = %147, %83, %76
  %149 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %149, ptr %9, align 4
  store i32 1, ptr %22, align 4
  br label %150

150:                                              ; preds = %148, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  %151 = load i32, ptr %9, align 4
  ret i32 %151
}

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

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #2

declare noundef i32 @_ZN7qpOASES8myPrintfEPKc(ptr 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 nounwind willreturn memory(argmem: write) }
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 = !{!"_ZTSN7qpOASES11returnValueE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN7qpOASES16VisibilityStatusE", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !16, i64 24}
!18 = !{!"_ZTSN7qpOASES15MessageHandlingE", !14, i64 0, !14, i64 4, !14, i64 8, !6, i64 16, !16, i64 24}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !10, i64 0}
!21 = !{!"_ZTSN7qpOASES15MessageHandling15ReturnValueListE", !10, i64 0, !6, i64 8, !14, i64 16}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!21, !14, i64 16}
!25 = !{!21, !6, i64 8}


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

%"struct.qpOASES::MessageHandling::ReturnValueList" = type { i32, ptr, i32 }

@_ZN7qpOASES15returnValueListE = external dso_local local_unnamed_addr global [152 x %"struct.qpOASES::MessageHandling::ReturnValueList"], align 16
@.str.143 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local 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 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES15MessageHandling12throwMessageENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusES3_(ptr noundef nonnull align 8 dereferenceable(28) %0, i32 noundef returned %1, ptr noundef %2, ptr nocapture noundef readnone %3, ptr nocapture noundef readnone %4, i64 noundef %5, i32 noundef %6, ptr noundef %7) local_unnamed_addr #0 align 2 {
  %9 = alloca [160 x i8], align 16
  %10 = alloca [160 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %10) #6
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = shl i32 %12, 1
  %14 = add i32 %13, -2
  %spec.store.select = tail call i32 @llvm.smax.i32(i32 %14, i32 0)
  %spec.store.select3 = tail call i32 @llvm.umin.i32(i32 %spec.store.select, i32 40)
  %15 = zext nneg i32 %spec.store.select3 to i64
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %10, i8 32, i64 %15, i1 false)
  %16 = getelementptr inbounds [160 x i8], ptr %10, i64 0, i64 %15
  store i8 0, ptr %16, align 2, !tbaa !12
  br label %17

17:                                               ; preds = %17, %8
  %indvars.iv = phi i64 [ %indvars.iv.next, %17 ], [ 0, %8 ]
  %18 = getelementptr inbounds [152 x %"struct.qpOASES::MessageHandling::ReturnValueList"], ptr @_ZN7qpOASES15returnValueListE, i64 0, i64 %indvars.iv
  %19 = load i32, ptr %18, align 8, !tbaa !13
  %.not = icmp eq i32 %19, -1
  %20 = icmp eq i32 %19, %1
  %or.cond27 = or i1 %.not, %20
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br i1 %or.cond27, label %21, label %17, !llvm.loop !16

21:                                               ; preds = %17
  br i1 %.not, label %22, label %24

22:                                               ; preds = %21
  %23 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %0, i32 noundef 7, ptr noundef null, ptr noundef nonnull @.str.143, ptr noundef nonnull @.str.144, i64 noundef 502, i32 noundef 1)
  br label %56

24:                                               ; preds = %21
  %25 = getelementptr inbounds i8, ptr %18, i64 16
  %26 = load i32, ptr %25, align 8, !tbaa !18
  %27 = icmp eq i32 %26, 1
  %28 = icmp eq i32 %6, 1
  %or.cond = and i1 %28, %27
  br i1 %or.cond, label %29, label %56

29:                                               ; preds = %24
  %30 = icmp slt i32 %12, 0
  br i1 %30, label %.thread, label %32

.thread:                                          ; preds = %29
  %31 = tail call noundef i32 @_ZN7qpOASES8myPrintfEPKc(ptr noundef nonnull @.str.149)
  store i32 0, ptr %11, align 8, !tbaa !5
  br label %36

32:                                               ; preds = %29
  %.not29 = icmp eq i32 %12, 0
  br i1 %.not29, label %36, label %33

33:                                               ; preds = %32
  %34 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %9, i64 noundef 160, ptr noundef nonnull @.str.150, ptr noundef nonnull %10) #6
  %35 = call noundef i32 @_ZN7qpOASES8myPrintfEPKc(ptr noundef nonnull %9)
  br label %36

36:                                               ; preds = %.thread, %33, %32
  %37 = icmp eq ptr %2, null
  %38 = getelementptr inbounds i8, ptr %18, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !19
  br i1 %37, label %40, label %42

40:                                               ; preds = %36
  %41 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %9, i64 noundef 160, ptr noundef nonnull @.str.151, ptr noundef %7, ptr noundef %39) #6
  br label %44

42:                                               ; preds = %36
  %43 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %9, i64 noundef 160, ptr noundef nonnull @.str.152, ptr noundef %7, ptr noundef %39, ptr noundef nonnull %2) #6
  br label %44

44:                                               ; preds = %42, %40
  %45 = call noundef i32 @_ZN7qpOASES8myPrintfEPKc(ptr noundef nonnull %9)
  %46 = load i8, ptr %7, align 1, !tbaa !12
  %47 = icmp eq i8 %46, 69
  %48 = load i32, ptr %11, align 8, !tbaa !5
  br i1 %47, label %49, label %51

49:                                               ; preds = %44
  %50 = add nsw i32 %48, 1
  store i32 %50, ptr %11, align 8, !tbaa !5
  br label %56

51:                                               ; preds = %44
  %52 = icmp sgt i32 %48, 0
  br i1 %52, label %53, label %55

53:                                               ; preds = %51
  %54 = call noundef i32 @_ZN7qpOASES8myPrintfEPKc(ptr noundef nonnull @.str.149)
  br label %55

55:                                               ; preds = %53, %51
  store i32 0, ptr %11, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %24, %55, %49, %22
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %9) #6
  ret i32 %1
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

declare noundef i32 @_ZN7qpOASES8myPrintfEPKc(ptr 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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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 = { 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 #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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 24}
!6 = !{!"_ZTSN7qpOASES15MessageHandlingE", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !11, i64 24}
!7 = !{!"_ZTSN7qpOASES16VisibilityStatusE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!8, !8, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN7qpOASES15MessageHandling15ReturnValueListE", !15, i64 0, !10, i64 8, !7, i64 16}
!15 = !{!"_ZTSN7qpOASES11returnValueE", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!14, !7, i64 16}
!19 = !{!14, !10, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass