; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/LAPACKE/src (lapacke_dsyevd_2stage_work)

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @LAPACKE_dsyevd_2stage_work(i32 noundef %0, i8 noundef signext %1, i8 noundef signext %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef %6, ptr noundef %7, i32 noundef %8, ptr noundef %9, i32 noundef %10) #0 {
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  store i32 %0, ptr %13, align 4, !tbaa !5
  store i8 %1, ptr %14, align 1, !tbaa !9
  store i8 %2, ptr %15, align 1, !tbaa !9
  store i32 %3, ptr %16, align 4, !tbaa !5
  store ptr %4, ptr %17, align 8, !tbaa !10
  store i32 %5, ptr %18, align 4, !tbaa !5
  store ptr %6, ptr %19, align 8, !tbaa !10
  store ptr %7, ptr %20, align 8, !tbaa !10
  store i32 %8, ptr %21, align 4, !tbaa !5
  store ptr %9, ptr %22, align 8, !tbaa !10
  store i32 %10, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !5
  %28 = load i32, ptr %13, align 4, !tbaa !5
  %29 = icmp eq i32 %28, 102
  br i1 %29, label %30, label %41

30:                                               ; preds = %11
  %31 = load ptr, ptr %17, align 8, !tbaa !10
  %32 = load ptr, ptr %19, align 8, !tbaa !10
  %33 = load ptr, ptr %20, align 8, !tbaa !10
  %34 = load ptr, ptr %22, align 8, !tbaa !10
  call void @dsyevd_2stage_(ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %31, ptr noundef %18, ptr noundef %32, ptr noundef %33, ptr noundef %21, ptr noundef %34, ptr noundef %23, ptr noundef %24, i64 noundef 1, i64 noundef 1)
  %35 = load i32, ptr %24, align 4, !tbaa !5
  %36 = icmp slt i32 %35, 0
  br i1 %36, label %37, label %40

37:                                               ; preds = %30
  %38 = load i32, ptr %24, align 4, !tbaa !5
  %39 = sub nsw i32 %38, 1
  store i32 %39, ptr %24, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %37, %30
  br label %148

41:                                               ; preds = %11
  %42 = load i32, ptr %13, align 4, !tbaa !5
  %43 = icmp eq i32 %42, 101
  br i1 %43, label %44, label %145

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %45 = load i32, ptr %16, align 4, !tbaa !5
  %46 = icmp sgt i32 1, %45
  br i1 %46, label %47, label %48

47:                                               ; preds = %44
  br label %50

48:                                               ; preds = %44
  %49 = load i32, ptr %16, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %48, %47
  %51 = phi i32 [ 1, %47 ], [ %49, %48 ]
  store i32 %51, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  store ptr null, ptr %26, align 8, !tbaa !10
  %52 = load i32, ptr %18, align 4, !tbaa !5
  %53 = load i32, ptr %16, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %55, label %58

55:                                               ; preds = %50
  store i32 -6, ptr %24, align 4, !tbaa !5
  %56 = load i32, ptr %24, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %56)
  %57 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %57, ptr %12, align 4
  store i32 1, ptr %27, align 4
  br label %142

58:                                               ; preds = %50
  %59 = load i32, ptr %23, align 4, !tbaa !5
  %60 = icmp eq i32 %59, -1
  br i1 %60, label %64, label %61

61:                                               ; preds = %58
  %62 = load i32, ptr %21, align 4, !tbaa !5
  %63 = icmp eq i32 %62, -1
  br i1 %63, label %64, label %78

64:                                               ; preds = %61, %58
  %65 = load ptr, ptr %17, align 8, !tbaa !10
  %66 = load ptr, ptr %19, align 8, !tbaa !10
  %67 = load ptr, ptr %20, align 8, !tbaa !10
  %68 = load ptr, ptr %22, align 8, !tbaa !10
  call void @dsyevd_2stage_(ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %65, ptr noundef %25, ptr noundef %66, ptr noundef %67, ptr noundef %21, ptr noundef %68, ptr noundef %23, ptr noundef %24, i64 noundef 1, i64 noundef 1)
  %69 = load i32, ptr %24, align 4, !tbaa !5
  %70 = icmp slt i32 %69, 0
  br i1 %70, label %71, label %74

71:                                               ; preds = %64
  %72 = load i32, ptr %24, align 4, !tbaa !5
  %73 = sub nsw i32 %72, 1
  br label %76

74:                                               ; preds = %64
  %75 = load i32, ptr %24, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %74, %71
  %77 = phi i32 [ %73, %71 ], [ %75, %74 ]
  store i32 %77, ptr %12, align 4
  store i32 1, ptr %27, align 4
  br label %142

78:                                               ; preds = %61
  %79 = load i32, ptr %25, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = mul i64 8, %80
  %82 = load i32, ptr %16, align 4, !tbaa !5
  %83 = icmp sgt i32 1, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %78
  br label %87

85:                                               ; preds = %78
  %86 = load i32, ptr %16, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %85, %84
  %88 = phi i32 [ 1, %84 ], [ %86, %85 ]
  %89 = sext i32 %88 to i64
  %90 = mul i64 %81, %89
  %91 = call noalias ptr @malloc(i64 noundef %90) #6
  store ptr %91, ptr %26, align 8, !tbaa !10
  %92 = load ptr, ptr %26, align 8, !tbaa !10
  %93 = icmp eq ptr %92, null
  br i1 %93, label %94, label %95

94:                                               ; preds = %87
  store i32 -1011, ptr %24, align 4, !tbaa !5
  br label %136

95:                                               ; preds = %87
  %96 = load i32, ptr %13, align 4, !tbaa !5
  %97 = load i8, ptr %15, align 1, !tbaa !9
  %98 = load i32, ptr %16, align 4, !tbaa !5
  %99 = load ptr, ptr %17, align 8, !tbaa !10
  %100 = load i32, ptr %18, align 4, !tbaa !5
  %101 = load ptr, ptr %26, align 8, !tbaa !10
  %102 = load i32, ptr %25, align 4, !tbaa !5
  call void @LAPACKE_dsy_trans(i32 noundef %96, i8 noundef signext %97, i32 noundef %98, ptr noundef %99, i32 noundef %100, ptr noundef %101, i32 noundef %102)
  %103 = load ptr, ptr %26, align 8, !tbaa !10
  %104 = load ptr, ptr %19, align 8, !tbaa !10
  %105 = load ptr, ptr %20, align 8, !tbaa !10
  %106 = load ptr, ptr %22, align 8, !tbaa !10
  call void @dsyevd_2stage_(ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %103, ptr noundef %25, ptr noundef %104, ptr noundef %105, ptr noundef %21, ptr noundef %106, ptr noundef %23, ptr noundef %24, i64 noundef 1, i64 noundef 1)
  %107 = load i32, ptr %24, align 4, !tbaa !5
  %108 = icmp slt i32 %107, 0
  br i1 %108, label %109, label %112

109:                                              ; preds = %95
  %110 = load i32, ptr %24, align 4, !tbaa !5
  %111 = sub nsw i32 %110, 1
  store i32 %111, ptr %24, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %109, %95
  %113 = load i8, ptr %14, align 1, !tbaa !9
  %114 = sext i8 %113 to i32
  %115 = icmp eq i32 %114, 86
  br i1 %115, label %120, label %116

116:                                              ; preds = %112
  %117 = load i8, ptr %14, align 1, !tbaa !9
  %118 = sext i8 %117 to i32
  %119 = icmp eq i32 %118, 118
  br i1 %119, label %120, label %127

120:                                              ; preds = %116, %112
  %121 = load i32, ptr %16, align 4, !tbaa !5
  %122 = load i32, ptr %16, align 4, !tbaa !5
  %123 = load ptr, ptr %26, align 8, !tbaa !10
  %124 = load i32, ptr %25, align 4, !tbaa !5
  %125 = load ptr, ptr %17, align 8, !tbaa !10
  %126 = load i32, ptr %18, align 4, !tbaa !5
  call void @LAPACKE_dge_trans(i32 noundef 102, i32 noundef %121, i32 noundef %122, ptr noundef %123, i32 noundef %124, ptr noundef %125, i32 noundef %126)
  br label %134

127:                                              ; preds = %116
  %128 = load i8, ptr %15, align 1, !tbaa !9
  %129 = load i32, ptr %16, align 4, !tbaa !5
  %130 = load ptr, ptr %26, align 8, !tbaa !10
  %131 = load i32, ptr %25, align 4, !tbaa !5
  %132 = load ptr, ptr %17, align 8, !tbaa !10
  %133 = load i32, ptr %18, align 4, !tbaa !5
  call void @LAPACKE_dsy_trans(i32 noundef 102, i8 noundef signext %128, i32 noundef %129, ptr noundef %130, i32 noundef %131, ptr noundef %132, i32 noundef %133)
  br label %134

134:                                              ; preds = %127, %120
  %135 = load ptr, ptr %26, align 8, !tbaa !10
  call void @free(ptr noundef %135) #5
  br label %136

136:                                              ; preds = %134, %94
  %137 = load i32, ptr %24, align 4, !tbaa !5
  %138 = icmp eq i32 %137, -1011
  br i1 %138, label %139, label %141

139:                                              ; preds = %136
  %140 = load i32, ptr %24, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %140)
  br label %141

141:                                              ; preds = %139, %136
  store i32 0, ptr %27, align 4
  br label %142

142:                                              ; preds = %141, %76, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  %143 = load i32, ptr %27, align 4
  switch i32 %143, label %150 [
    i32 0, label %144
  ]

144:                                              ; preds = %142
  br label %147

145:                                              ; preds = %41
  store i32 -1, ptr %24, align 4, !tbaa !5
  %146 = load i32, ptr %24, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %146)
  br label %147

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

148:                                              ; preds = %147, %40
  %149 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %149, ptr %12, align 4
  store i32 1, ptr %27, align 4
  br label %150

150:                                              ; preds = %148, %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  %151 = load i32, ptr %12, 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

declare void @dsyevd_2stage_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef) #2

declare void @LAPACKE_xerbla(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

declare void @LAPACKE_dsy_trans(i32 noundef, i8 noundef signext, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #2

declare void @LAPACKE_dge_trans(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #2

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nounwind 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 = { 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 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !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 [27 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @LAPACKE_dsyevd_2stage_work(i32 noundef %0, i8 noundef signext %1, i8 noundef signext %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef %6, ptr noundef %7, i32 noundef %8, ptr noundef %9, i32 noundef %10) local_unnamed_addr #0 {
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i8 %1, ptr %12, align 1, !tbaa !5
  store i8 %2, ptr %13, align 1, !tbaa !5
  store i32 %3, ptr %14, align 4, !tbaa !8
  store i32 %5, ptr %15, align 4, !tbaa !8
  store i32 %8, ptr %16, align 4, !tbaa !8
  store i32 %10, ptr %17, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #6
  store i32 0, ptr %18, align 4, !tbaa !8
  switch i32 %0, label %57 [
    i32 102, label %20
    i32 101, label %22
  ]

20:                                               ; preds = %11
  call void @dsyevd_2stage_(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef %4, ptr noundef nonnull %15, ptr noundef %6, ptr noundef %7, ptr noundef nonnull %16, ptr noundef %9, ptr noundef nonnull %17, ptr noundef nonnull %18, i64 noundef 1, i64 noundef 1) #6
  %21 = load i32, ptr %18, align 4, !tbaa !8
  %.lobit39 = ashr i32 %21, 31
  %spec.select = add nsw i32 %21, %.lobit39
  br label %58

22:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #6
  %23 = tail call i32 @llvm.smax.i32(i32 %3, i32 1)
  store i32 %23, ptr %19, align 4, !tbaa !8
  %24 = icmp slt i32 %5, %3
  br i1 %24, label %25, label %26

25:                                               ; preds = %22
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -6) #6
  br label %56

26:                                               ; preds = %22
  %27 = icmp eq i32 %10, -1
  %28 = icmp eq i32 %8, -1
  %or.cond = or i1 %28, %27
  br i1 %or.cond, label %29, label %32

29:                                               ; preds = %26
  call void @dsyevd_2stage_(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef %4, ptr noundef nonnull %19, ptr noundef %6, ptr noundef %7, ptr noundef nonnull %16, ptr noundef %9, ptr noundef nonnull %17, ptr noundef nonnull %18, i64 noundef 1, i64 noundef 1) #6
  %30 = load i32, ptr %18, align 4
  %.lobit = ashr i32 %30, 31
  %31 = add nsw i32 %.lobit, %30
  br label %56

32:                                               ; preds = %26
  %33 = zext nneg i32 %23 to i64
  %34 = shl nuw nsw i64 %33, 3
  %35 = mul i64 %34, %33
  %36 = tail call noalias ptr @malloc(i64 noundef %35) #7
  %37 = icmp eq ptr %36, null
  br i1 %37, label %.thread, label %38

.thread:                                          ; preds = %32
  store i32 -1011, ptr %18, align 4, !tbaa !8
  br label %55

38:                                               ; preds = %32
  tail call void @LAPACKE_dsy_trans(i32 noundef 101, i8 noundef signext %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef nonnull %36, i32 noundef %23) #6
  call void @dsyevd_2stage_(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %36, ptr noundef nonnull %19, ptr noundef %6, ptr noundef %7, ptr noundef nonnull %16, ptr noundef %9, ptr noundef nonnull %17, ptr noundef nonnull %18, i64 noundef 1, i64 noundef 1) #6
  %39 = load i32, ptr %18, align 4, !tbaa !8
  %40 = icmp slt i32 %39, 0
  br i1 %40, label %41, label %43

41:                                               ; preds = %38
  %42 = add nsw i32 %39, -1
  store i32 %42, ptr %18, align 4, !tbaa !8
  br label %43

43:                                               ; preds = %41, %38
  %44 = load i8, ptr %12, align 1
  %45 = and i8 %44, -33
  %or.cond4 = icmp eq i8 %45, 86
  br i1 %or.cond4, label %46, label %49

46:                                               ; preds = %43
  %47 = load i32, ptr %14, align 4, !tbaa !8
  %48 = load i32, ptr %19, align 4, !tbaa !8
  call void @LAPACKE_dge_trans(i32 noundef 102, i32 noundef %47, i32 noundef %47, ptr noundef nonnull %36, i32 noundef %48, ptr noundef %4, i32 noundef %5) #6
  br label %53

49:                                               ; preds = %43
  %50 = load i8, ptr %13, align 1, !tbaa !5
  %51 = load i32, ptr %14, align 4, !tbaa !8
  %52 = load i32, ptr %19, align 4, !tbaa !8
  call void @LAPACKE_dsy_trans(i32 noundef 102, i8 noundef signext %50, i32 noundef %51, ptr noundef nonnull %36, i32 noundef %52, ptr noundef %4, i32 noundef %5) #6
  br label %53

53:                                               ; preds = %46, %49
  call void @free(ptr noundef nonnull %36) #6
  %.pr = load i32, ptr %18, align 4, !tbaa !8
  %54 = icmp eq i32 %.pr, -1011
  br i1 %54, label %55, label %.thread35

55:                                               ; preds = %.thread, %53
  call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1011) #6
  %.pre.pre = load i32, ptr %18, align 4, !tbaa !8
  br label %.thread35

.thread35:                                        ; preds = %55, %53
  %.pre = phi i32 [ %.pre.pre, %55 ], [ %.pr, %53 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #6
  br label %58

56:                                               ; preds = %29, %25
  %.028 = phi i32 [ -6, %25 ], [ %31, %29 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #6
  br label %58

57:                                               ; preds = %11
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1) #6
  br label %58

58:                                               ; preds = %20, %57, %.thread35, %56
  %.1 = phi i32 [ %.028, %56 ], [ %.pre, %.thread35 ], [ -1, %57 ], [ %spec.select, %20 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #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

declare void @dsyevd_2stage_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

declare void @LAPACKE_xerbla(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

declare void @LAPACKE_dsy_trans(i32 noundef, i8 noundef signext, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @LAPACKE_dge_trans(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass