; LLVM IR from yudi-matsuzake/libgenerics :: src (red_black_tree)

; 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.redblacktree_t = type { i64, i64, ptr, ptr, i64, ptr }
%struct.redblacknode_t = type { ptr, ptr, ptr, i32, ptr }

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @rbtree_remove_node(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = icmp ne ptr %9, null
  br i1 %10, label %12, label %11

11:                                               ; preds = %2
  store i32 1, ptr %3, align 4
  br label %166

12:                                               ; preds = %2
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %16, label %15

15:                                               ; preds = %12
  store i32 11, ptr %3, align 4
  br label %166

16:                                               ; preds = %12
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.redblacktree_t, ptr %17, i32 0, i32 0
  %19 = load i64, ptr %18, align 8, !tbaa !9
  %20 = icmp ne i64 %19, 0
  br i1 %20, label %22, label %21

21:                                               ; preds = %16
  store i32 5, ptr %3, align 4
  br label %166

22:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %23, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.redblacknode_t, ptr %24, i32 0, i32 3
  %26 = load i32, ptr %25, align 8, !tbaa !12
  store i32 %26, ptr %8, align 4, !tbaa !15
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.redblacknode_t, ptr %27, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8, !tbaa !16
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %41

31:                                               ; preds = %22
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.redblacknode_t, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !17
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %41

36:                                               ; preds = %31
  %37 = call ptr @rbtree_create_double_black()
  store ptr %37, ptr %7, align 8, !tbaa !5
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  call void @rbtree_transplant(ptr noundef %38, ptr noundef %39, ptr noundef %40)
  br label %140

41:                                               ; preds = %31, %22
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.redblacknode_t, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !17
  %45 = icmp eq ptr %44, null
  br i1 %45, label %46, label %55

46:                                               ; preds = %41
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.redblacknode_t, ptr %47, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !16
  store ptr %49, ptr %7, align 8, !tbaa !5
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.redblacknode_t, ptr %52, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !16
  call void @rbtree_transplant(ptr noundef %50, ptr noundef %51, ptr noundef %54)
  br label %139

55:                                               ; preds = %41
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.redblacknode_t, ptr %56, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !16
  %59 = icmp eq ptr %58, null
  br i1 %59, label %60, label %69

60:                                               ; preds = %55
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.redblacknode_t, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !17
  store ptr %63, ptr %7, align 8, !tbaa !5
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.redblacknode_t, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !17
  call void @rbtree_transplant(ptr noundef %64, ptr noundef %65, ptr noundef %68)
  br label %138

69:                                               ; preds = %55
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.redblacknode_t, ptr %70, i32 0, i32 1
  %72 = load ptr, ptr %71, align 8, !tbaa !16
  %73 = call ptr @rbtree_find_minimal_node(ptr noundef %72)
  store ptr %73, ptr %6, align 8, !tbaa !5
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.redblacknode_t, ptr %74, i32 0, i32 3
  %76 = load i32, ptr %75, align 8, !tbaa !12
  store i32 %76, ptr %8, align 4, !tbaa !15
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.redblacknode_t, ptr %77, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !16
  %80 = icmp eq ptr %79, null
  br i1 %80, label %81, label %89

81:                                               ; preds = %69
  %82 = call ptr @rbtree_create_double_black()
  store ptr %82, ptr %7, align 8, !tbaa !5
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.redblacknode_t, ptr %84, i32 0, i32 1
  store ptr %83, ptr %85, align 8, !tbaa !16
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.redblacknode_t, ptr %87, i32 0, i32 2
  store ptr %86, ptr %88, align 8, !tbaa !18
  br label %93

89:                                               ; preds = %69
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.redblacknode_t, ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %91, align 8, !tbaa !16
  store ptr %92, ptr %7, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %89, %81
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.redblacknode_t, ptr %94, i32 0, i32 2
  %96 = load ptr, ptr %95, align 8, !tbaa !18
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = icmp eq ptr %96, %97
  br i1 %98, label %99, label %103

99:                                               ; preds = %93
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.redblacknode_t, ptr %101, i32 0, i32 2
  store ptr %100, ptr %102, align 8, !tbaa !18
  br label %119

103:                                              ; preds = %93
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.redblacknode_t, ptr %106, i32 0, i32 1
  %108 = load ptr, ptr %107, align 8, !tbaa !16
  call void @rbtree_transplant(ptr noundef %104, ptr noundef %105, ptr noundef %108)
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.redblacknode_t, ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !16
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.redblacknode_t, ptr %112, i32 0, i32 1
  store ptr %111, ptr %113, align 8, !tbaa !16
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.redblacknode_t, ptr %115, i32 0, i32 1
  %117 = load ptr, ptr %116, align 8, !tbaa !16
  %118 = getelementptr inbounds %struct.redblacknode_t, ptr %117, i32 0, i32 2
  store ptr %114, ptr %118, align 8, !tbaa !18
  br label %119

119:                                              ; preds = %103, %99
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  call void @rbtree_transplant(ptr noundef %120, ptr noundef %121, ptr noundef %122)
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.redblacknode_t, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !17
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.redblacknode_t, ptr %126, i32 0, i32 0
  store ptr %125, ptr %127, align 8, !tbaa !17
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.redblacknode_t, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !17
  %132 = getelementptr inbounds %struct.redblacknode_t, ptr %131, i32 0, i32 2
  store ptr %128, ptr %132, align 8, !tbaa !18
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.redblacknode_t, ptr %133, i32 0, i32 3
  %135 = load i32, ptr %134, align 8, !tbaa !12
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.redblacknode_t, ptr %136, i32 0, i32 3
  store i32 %135, ptr %137, align 8, !tbaa !12
  br label %138

138:                                              ; preds = %119, %60
  br label %139

139:                                              ; preds = %138, %46
  br label %140

140:                                              ; preds = %139, %36
  %141 = load i32, ptr %8, align 4, !tbaa !15
  %142 = icmp eq i32 %141, 1
  br i1 %142, label %143, label %146

143:                                              ; preds = %140
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  call void @rbtree_delete_fixup(ptr noundef %144, ptr noundef %145)
  br label %146

146:                                              ; preds = %143, %140
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = icmp ne ptr %147, null
  br i1 %148, label %149, label %157

149:                                              ; preds = %146
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.redblacknode_t, ptr %150, i32 0, i32 3
  %152 = load i32, ptr %151, align 8, !tbaa !12
  %153 = icmp eq i32 %152, 2
  br i1 %153, label %154, label %157

154:                                              ; preds = %149
  %155 = load ptr, ptr %4, align 8, !tbaa !5
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  call void @rbtree_remove_double_black(ptr noundef %155, ptr noundef %156)
  br label %157

157:                                              ; preds = %154, %149, %146
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.redblacknode_t, ptr %158, i32 0, i32 4
  %160 = load ptr, ptr %159, align 8, !tbaa !19
  call void @free(ptr noundef %160) #3
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %161) #3
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.redblacktree_t, ptr %162, i32 0, i32 0
  %164 = load i64, ptr %163, align 8, !tbaa !9
  %165 = add i64 %164, -1
  store i64 %165, ptr %163, align 8, !tbaa !9
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %166

166:                                              ; preds = %157, %21, %15, %11
  %167 = load i32, ptr %3, align 4
  ret i32 %167
}

; Function Attrs: nounwind uwtable
declare dso_local void @rbtree_transplant(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @rbtree_find_minimal_node(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @rbtree_delete_fixup(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @rbtree_remove_double_black(ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @rbtree_create_double_black() #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"redblacktree_t", !11, i64 0, !11, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !6, i64 40}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !14, i64 24}
!13 = !{!"redblacknode_t", !6, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !6, i64 32}
!14 = !{!"int", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!13, !6, i64 8}
!17 = !{!13, !6, i64 0}
!18 = !{!13, !6, i64 16}
!19 = !{!13, !6, i64 32}


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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 12) i32 @rbtree_remove_node(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %56, label %3

3:                                                ; preds = %2
  %.not65 = icmp eq ptr %1, null
  br i1 %.not65, label %56, label %4

4:                                                ; preds = %3
  %5 = load i64, ptr %0, align 8, !tbaa !5
  %.not66 = icmp eq i64 %5, 0
  br i1 %.not66, label %56, label %6

6:                                                ; preds = %4
  %7 = getelementptr inbounds i8, ptr %1, i64 24
  %8 = load i32, ptr %7, align 8, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !14
  %11 = icmp eq ptr %10, null
  %12 = load ptr, ptr %1, align 8, !tbaa !15
  %13 = icmp eq ptr %12, null
  br i1 %11, label %14, label %17

14:                                               ; preds = %6
  br i1 %13, label %15, label %19

15:                                               ; preds = %14
  %16 = tail call ptr @rbtree_create_double_black()
  tail call void @rbtree_transplant(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef %16)
  br label %42

17:                                               ; preds = %6
  br i1 %13, label %18, label %20

18:                                               ; preds = %17
  tail call void @rbtree_transplant(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %10)
  br label %42

19:                                               ; preds = %14
  tail call void @rbtree_transplant(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %12)
  br label %42

20:                                               ; preds = %17
  %21 = tail call ptr @rbtree_find_minimal_node(ptr noundef nonnull %10)
  %22 = getelementptr inbounds i8, ptr %21, i64 24
  %23 = load i32, ptr %22, align 8, !tbaa !11
  %24 = getelementptr inbounds i8, ptr %21, i64 8
  %25 = load ptr, ptr %24, align 8, !tbaa !14
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %30

27:                                               ; preds = %20
  %28 = tail call ptr @rbtree_create_double_black()
  store ptr %28, ptr %24, align 8, !tbaa !14
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  store ptr %21, ptr %29, align 8, !tbaa !16
  br label %30

30:                                               ; preds = %20, %27
  %31 = phi ptr [ %28, %27 ], [ %25, %20 ]
  %32 = getelementptr inbounds i8, ptr %21, i64 16
  %33 = load ptr, ptr %32, align 8, !tbaa !16
  %34 = icmp eq ptr %33, %1
  br i1 %34, label %37, label %35

35:                                               ; preds = %30
  tail call void @rbtree_transplant(ptr noundef nonnull %0, ptr noundef nonnull %21, ptr noundef nonnull %31)
  %36 = load ptr, ptr %9, align 8, !tbaa !14
  store ptr %36, ptr %24, align 8, !tbaa !14
  br label %37

37:                                               ; preds = %30, %35
  %.sink69 = phi ptr [ %36, %35 ], [ %31, %30 ]
  %38 = getelementptr inbounds i8, ptr %.sink69, i64 16
  store ptr %21, ptr %38, align 8, !tbaa !16
  tail call void @rbtree_transplant(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %21)
  %39 = load ptr, ptr %1, align 8, !tbaa !15
  store ptr %39, ptr %21, align 8, !tbaa !15
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  store ptr %21, ptr %40, align 8, !tbaa !16
  %41 = load i32, ptr %7, align 8, !tbaa !11
  store i32 %41, ptr %22, align 8, !tbaa !11
  br label %42

42:                                               ; preds = %18, %37, %19, %15
  %.1 = phi ptr [ %16, %15 ], [ %10, %18 ], [ %12, %19 ], [ %31, %37 ]
  %.0 = phi i32 [ %8, %15 ], [ %8, %18 ], [ %8, %19 ], [ %23, %37 ]
  %43 = icmp eq i32 %.0, 1
  br i1 %43, label %44, label %45

44:                                               ; preds = %42
  tail call void @rbtree_delete_fixup(ptr noundef nonnull %0, ptr noundef %.1)
  br label %45

45:                                               ; preds = %44, %42
  %.not67 = icmp eq ptr %.1, null
  br i1 %.not67, label %51, label %46

46:                                               ; preds = %45
  %47 = getelementptr inbounds i8, ptr %.1, i64 24
  %48 = load i32, ptr %47, align 8, !tbaa !11
  %49 = icmp eq i32 %48, 2
  br i1 %49, label %50, label %51

50:                                               ; preds = %46
  tail call void @rbtree_remove_double_black(ptr noundef nonnull %0, ptr noundef nonnull %.1)
  br label %51

51:                                               ; preds = %50, %46, %45
  %52 = getelementptr inbounds i8, ptr %1, i64 32
  %53 = load ptr, ptr %52, align 8, !tbaa !17
  tail call void @free(ptr noundef %53) #2
  tail call void @free(ptr noundef nonnull %1) #2
  %54 = load i64, ptr %0, align 8, !tbaa !5
  %55 = add i64 %54, -1
  store i64 %55, ptr %0, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %4, %3, %2, %51
  %.059 = phi i32 [ 0, %51 ], [ 1, %2 ], [ 11, %3 ], [ 5, %4 ]
  ret i32 %.059
}

; Function Attrs: nounwind uwtable
declare dso_local void @rbtree_transplant(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @rbtree_find_minimal_node(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @rbtree_delete_fixup(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @rbtree_remove_double_black(ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @rbtree_create_double_black() local_unnamed_addr #0

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 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 #2 = { 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, !7, i64 0}
!6 = !{!"redblacktree_t", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !10, i64 40}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !13, i64 24}
!12 = !{!"redblacknode_t", !10, i64 0, !10, i64 8, !10, i64 16, !13, i64 24, !10, i64 32}
!13 = !{!"int", !8, i64 0}
!14 = !{!12, !10, i64 8}
!15 = !{!12, !10, i64 0}
!16 = !{!12, !10, i64 16}
!17 = !{!12, !10, i64 32}


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