; LLVM IR from lolosssss/leetcode :: c (257_binary_tree_paths)

; 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.TreeNode = type { i32, ptr, ptr }

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

; Function Attrs: nounwind uwtable
define dso_local ptr @binaryTreePaths(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store ptr null, ptr %10, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %18

16:                                               ; preds = %2
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %17, align 4, !tbaa !9
  store ptr null, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %147

18:                                               ; preds = %2
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.TreeNode, ptr %19, i32 0, i32 1
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %42

23:                                               ; preds = %18
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.TreeNode, ptr %24, i32 0, i32 2
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %42

28:                                               ; preds = %23
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 1, ptr %29, align 4, !tbaa !9
  %30 = call noalias ptr @malloc(i64 noundef 8) #5
  store ptr %30, ptr %8, align 8, !tbaa !5
  %31 = call noalias ptr @malloc(i64 noundef 16) #5
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds ptr, ptr %32, i64 0
  store ptr %31, ptr %33, align 8, !tbaa !5
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds ptr, ptr %34, i64 0
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.TreeNode, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !14
  %40 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %36, ptr noundef @.str, i32 noundef %39) #4
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %41, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %147

42:                                               ; preds = %23, %18
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.TreeNode, ptr %43, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %52

47:                                               ; preds = %42
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.TreeNode, ptr %48, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !11
  %51 = call ptr @binaryTreePaths(ptr noundef %50, ptr noundef %6)
  store ptr %51, ptr %9, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %47, %42
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.TreeNode, ptr %53, i32 0, i32 2
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %62

57:                                               ; preds = %52
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.TreeNode, ptr %58, i32 0, i32 2
  %60 = load ptr, ptr %59, align 8, !tbaa !13
  %61 = call ptr @binaryTreePaths(ptr noundef %60, ptr noundef %7)
  store ptr %61, ptr %10, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %57, %52
  %63 = load i32, ptr %6, align 4, !tbaa !9
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = add nsw i32 %63, %64
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %65, ptr %66, align 4, !tbaa !9
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = load i32, ptr %67, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = mul i64 8, %69
  %71 = call noalias ptr @malloc(i64 noundef %70) #5
  store ptr %71, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %103, %62
  %73 = load i32, ptr %12, align 4, !tbaa !9
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %72
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %106

77:                                               ; preds = %72
  %78 = call noalias ptr @malloc(i64 noundef 256) #5
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds ptr, ptr %79, i64 %81
  store ptr %78, ptr %82, align 8, !tbaa !5
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds ptr, ptr %83, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.TreeNode, ptr %88, i32 0, i32 0
  %90 = load i32, ptr %89, align 8, !tbaa !14
  %91 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %87, ptr noundef @.str.1, i32 noundef %90) #4
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = load i32, ptr %12, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds ptr, ptr %97, i64 %99
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = call ptr @strcat(ptr noundef %96, ptr noundef %101) #4
  br label %103

103:                                              ; preds = %77
  %104 = load i32, ptr %12, align 4, !tbaa !9
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %12, align 4, !tbaa !9
  br label %72, !llvm.loop !15

106:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %107 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %107, ptr %13, align 4, !tbaa !9
  br label %108

108:                                              ; preds = %142, %106
  %109 = load i32, ptr %13, align 4, !tbaa !9
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = icmp slt i32 %109, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %108
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %145

114:                                              ; preds = %108
  %115 = call noalias ptr @malloc(i64 noundef 256) #5
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds ptr, ptr %116, i64 %118
  store ptr %115, ptr %119, align 8, !tbaa !5
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = load i32, ptr %13, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds ptr, ptr %120, i64 %122
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.TreeNode, ptr %125, i32 0, i32 0
  %127 = load i32, ptr %126, align 8, !tbaa !14
  %128 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %124, ptr noundef @.str.1, i32 noundef %127) #4
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = load i32, ptr %13, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds ptr, ptr %129, i64 %131
  %133 = load ptr, ptr %132, align 8, !tbaa !5
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = load i32, ptr %13, align 4, !tbaa !9
  %136 = load i32, ptr %6, align 4, !tbaa !9
  %137 = sub nsw i32 %135, %136
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds ptr, ptr %134, i64 %138
  %140 = load ptr, ptr %139, align 8, !tbaa !5
  %141 = call ptr @strcat(ptr noundef %133, ptr noundef %140) #4
  br label %142

142:                                              ; preds = %114
  %143 = load i32, ptr %13, align 4, !tbaa !9
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %13, align 4, !tbaa !9
  br label %108, !llvm.loop !17

145:                                              ; preds = %113
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %146, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %147

147:                                              ; preds = %145, %28, %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %148 = load ptr, ptr %3, align 8
  ret ptr %148
}

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

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind
declare ptr @strcat(ptr noundef, ptr 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 = { 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 = { 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"TreeNode", !10, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!12, !6, i64 16}
!14 = !{!12, !10, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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 [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local noalias noundef ptr @binaryTreePaths(ptr noundef readonly %0, ptr nocapture noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  %5 = icmp eq ptr %0, null
  br i1 %5, label %6, label %7

6:                                                ; preds = %2
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %.loopexit

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !9
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %.thread

11:                                               ; preds = %7
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !12
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %.thread.thread

15:                                               ; preds = %11
  store i32 1, ptr %1, align 4, !tbaa !5
  %16 = tail call noalias dereferenceable_or_null(8) ptr @malloc(i64 noundef 8) #6
  %17 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #6
  store ptr %17, ptr %16, align 8, !tbaa !13
  %18 = load i32, ptr %0, align 8, !tbaa !14
  %19 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %18) #5
  br label %.loopexit

.thread:                                          ; preds = %7
  %20 = call ptr @binaryTreePaths(ptr noundef nonnull %9, ptr noundef nonnull %3)
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 16
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !12
  %.not47 = icmp eq ptr %.pre, null
  br i1 %.not47, label %23, label %.thread.thread

.thread.thread:                                   ; preds = %11, %.thread
  %.04159 = phi ptr [ %20, %.thread ], [ null, %11 ]
  %21 = phi ptr [ %.pre, %.thread ], [ %13, %11 ]
  %22 = call ptr @binaryTreePaths(ptr noundef nonnull %21, ptr noundef nonnull %4)
  %.pre55 = load i32, ptr %4, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %.thread.thread, %.thread
  %.04160 = phi ptr [ %.04159, %.thread.thread ], [ %20, %.thread ]
  %24 = phi i32 [ %.pre55, %.thread.thread ], [ 0, %.thread ]
  %.040 = phi ptr [ %22, %.thread.thread ], [ null, %.thread ]
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = add nsw i32 %24, %25
  store i32 %26, ptr %1, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = shl nsw i64 %27, 3
  %29 = tail call noalias ptr @malloc(i64 noundef %28) #6
  %30 = icmp sgt i32 %25, 0
  br i1 %30, label %.lr.ph.preheader, label %.preheader

.lr.ph.preheader:                                 ; preds = %23
  %wide.trip.count = zext nneg i32 %25 to i64
  br label %.lr.ph

.preheader.loopexit:                              ; preds = %.lr.ph
  %.pre56 = load i32, ptr %1, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %23
  %31 = phi i32 [ %.pre56, %.preheader.loopexit ], [ %26, %23 ]
  %32 = icmp slt i32 %25, %31
  br i1 %32, label %.lr.ph50.preheader, label %.loopexit

.lr.ph50.preheader:                               ; preds = %.preheader
  %33 = sext i32 %25 to i64
  br label %.lr.ph50

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %34 = tail call noalias dereferenceable_or_null(256) ptr @malloc(i64 noundef 256) #6
  %35 = getelementptr inbounds ptr, ptr %29, i64 %indvars.iv
  store ptr %34, ptr %35, align 8, !tbaa !13
  %36 = load i32, ptr %0, align 8, !tbaa !14
  %37 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %36) #5
  %38 = getelementptr inbounds ptr, ptr %.04160, i64 %indvars.iv
  %39 = load ptr, ptr %38, align 8, !tbaa !13
  %40 = tail call ptr @strcat(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) %39) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader.loopexit, label %.lr.ph, !llvm.loop !15

.lr.ph50:                                         ; preds = %.lr.ph50.preheader, %.lr.ph50
  %indvars.iv52 = phi i64 [ %33, %.lr.ph50.preheader ], [ %indvars.iv.next53, %.lr.ph50 ]
  %41 = tail call noalias dereferenceable_or_null(256) ptr @malloc(i64 noundef 256) #6
  %42 = getelementptr inbounds ptr, ptr %29, i64 %indvars.iv52
  store ptr %41, ptr %42, align 8, !tbaa !13
  %43 = load i32, ptr %0, align 8, !tbaa !14
  %44 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %41, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %43) #5
  %45 = sub nsw i64 %indvars.iv52, %33
  %46 = getelementptr inbounds ptr, ptr %.040, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  %48 = tail call ptr @strcat(ptr noundef nonnull dereferenceable(1) %41, ptr noundef nonnull dereferenceable(1) %47) #5
  %indvars.iv.next53 = add nsw i64 %indvars.iv52, 1
  %49 = load i32, ptr %1, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %indvars.iv.next53, %50
  br i1 %51, label %.lr.ph50, label %.loopexit, !llvm.loop !17

.loopexit:                                        ; preds = %.lr.ph50, %.preheader, %15, %6
  %.042 = phi ptr [ null, %6 ], [ %16, %15 ], [ %29, %.preheader ], [ %29, %.lr.ph50 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret ptr %.042
}

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcat(ptr noalias noundef returned, ptr noalias nocapture noundef readonly) 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

attributes #0 = { nofree 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 = { 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 #3 = { 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 #4 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 = !{!10, !11, i64 8}
!10 = !{!"TreeNode", !6, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !11, i64 16}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !6, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass