; LLVM IR from seppo0010/rlite :: src (type_set)

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @rl_set_get_objects(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #0

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

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

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

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

declare i32 @rl_multi_string_get(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @rl_srandmembers(ptr noundef %0, ptr noundef %1, i64 noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, 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 ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i64 %2, ptr %10, align 8, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !11
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store ptr null, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store ptr null, ptr %21, align 8, !tbaa !5
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = load i64, ptr %10, align 8, !tbaa !9
  %25 = call i32 @rl_set_get_objects(ptr noundef %22, ptr noundef %23, i64 noundef %24, ptr noundef null, ptr noundef %19, i32 noundef 0, i32 noundef 0)
  store i32 %25, ptr %16, align 4, !tbaa !11
  %26 = load i32, ptr %16, align 4, !tbaa !11
  %27 = icmp ne i32 0, %26
  br i1 %27, label %28, label %29

28:                                               ; preds = %7
  br label %125

29:                                               ; preds = %7
  %30 = load i32, ptr %11, align 4, !tbaa !11
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %53, label %32

32:                                               ; preds = %29
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  %34 = load i64, ptr %33, align 8, !tbaa !9
  %35 = load ptr, ptr %19, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.rl_btree, ptr %35, i32 0, i32 5
  %37 = load i64, ptr %36, align 8, !tbaa !13
  %38 = icmp sgt i64 %34, %37
  br i1 %38, label %39, label %44

39:                                               ; preds = %32
  %40 = load ptr, ptr %19, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.rl_btree, ptr %40, i32 0, i32 5
  %42 = load i64, ptr %41, align 8, !tbaa !13
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 %42, ptr %43, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %39, %32
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = load i64, ptr %45, align 8, !tbaa !9
  %47 = mul i64 8, %46
  %48 = call noalias ptr @malloc(i64 noundef %47) #6
  store ptr %48, ptr %18, align 8, !tbaa !5
  %49 = load ptr, ptr %18, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %52, label %51

51:                                               ; preds = %44
  store i32 4, ptr %16, align 4, !tbaa !11
  br label %125

52:                                               ; preds = %44
  br label %53

53:                                               ; preds = %52, %29
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = load i64, ptr %54, align 8, !tbaa !9
  %56 = mul i64 8, %55
  %57 = call noalias ptr @malloc(i64 noundef %56) #6
  store ptr %57, ptr %20, align 8, !tbaa !5
  %58 = load ptr, ptr %20, align 8, !tbaa !5
  %59 = icmp ne ptr %58, null
  br i1 %59, label %61, label %60

60:                                               ; preds = %53
  store i32 4, ptr %16, align 4, !tbaa !11
  br label %125

61:                                               ; preds = %53
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = load i64, ptr %62, align 8, !tbaa !9
  %64 = mul i64 8, %63
  %65 = call noalias ptr @malloc(i64 noundef %64) #6
  store ptr %65, ptr %21, align 8, !tbaa !5
  %66 = load ptr, ptr %21, align 8, !tbaa !5
  %67 = icmp ne ptr %66, null
  br i1 %67, label %69, label %68

68:                                               ; preds = %61
  store i32 4, ptr %16, align 4, !tbaa !11
  br label %125

69:                                               ; preds = %61
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %70

70:                                               ; preds = %117, %69
  %71 = load i64, ptr %15, align 8, !tbaa !9
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = load i64, ptr %72, align 8, !tbaa !9
  %74 = icmp slt i64 %71, %73
  br i1 %74, label %75, label %120

75:                                               ; preds = %70
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = load ptr, ptr %19, align 8, !tbaa !5
  %78 = call i32 @rl_btree_random_element(ptr noundef %76, ptr noundef %77, ptr noundef null, ptr noundef %17)
  store i32 %78, ptr %16, align 4, !tbaa !11
  %79 = load i32, ptr %16, align 4, !tbaa !11
  %80 = icmp ne i32 0, %79
  br i1 %80, label %81, label %82

81:                                               ; preds = %75
  br label %125

82:                                               ; preds = %75
  %83 = load i32, ptr %11, align 4, !tbaa !11
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %102, label %85

85:                                               ; preds = %82
  %86 = load i64, ptr %15, align 8, !tbaa !9
  %87 = load ptr, ptr %18, align 8, !tbaa !5
  %88 = load ptr, ptr %17, align 8, !tbaa !5
  %89 = load i64, ptr %88, align 8, !tbaa !9
  %90 = call i32 @contains(i64 noundef %86, ptr noundef %87, i64 noundef %89)
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %95

92:                                               ; preds = %85
  %93 = load i64, ptr %15, align 8, !tbaa !9
  %94 = add nsw i64 %93, -1
  store i64 %94, ptr %15, align 8, !tbaa !9
  br label %117

95:                                               ; preds = %85
  %96 = load ptr, ptr %17, align 8, !tbaa !5
  %97 = load i64, ptr %96, align 8, !tbaa !9
  %98 = load ptr, ptr %18, align 8, !tbaa !5
  %99 = load i64, ptr %15, align 8, !tbaa !9
  %100 = getelementptr inbounds i64, ptr %98, i64 %99
  store i64 %97, ptr %100, align 8, !tbaa !9
  br label %101

101:                                              ; preds = %95
  br label %102

102:                                              ; preds = %101, %82
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = load ptr, ptr %17, align 8, !tbaa !5
  %105 = load i64, ptr %104, align 8, !tbaa !9
  %106 = load ptr, ptr %20, align 8, !tbaa !5
  %107 = load i64, ptr %15, align 8, !tbaa !9
  %108 = getelementptr inbounds ptr, ptr %106, i64 %107
  %109 = load ptr, ptr %21, align 8, !tbaa !5
  %110 = load i64, ptr %15, align 8, !tbaa !9
  %111 = getelementptr inbounds i64, ptr %109, i64 %110
  %112 = call i32 @rl_multi_string_get(ptr noundef %103, i64 noundef %105, ptr noundef %108, ptr noundef %111)
  store i32 %112, ptr %16, align 4, !tbaa !11
  %113 = load i32, ptr %16, align 4, !tbaa !11
  %114 = icmp ne i32 0, %113
  br i1 %114, label %115, label %116

115:                                              ; preds = %102
  br label %125

116:                                              ; preds = %102
  br label %117

117:                                              ; preds = %116, %92
  %118 = load i64, ptr %15, align 8, !tbaa !9
  %119 = add nsw i64 %118, 1
  store i64 %119, ptr %15, align 8, !tbaa !9
  br label %70, !llvm.loop !15

120:                                              ; preds = %70
  %121 = load ptr, ptr %20, align 8, !tbaa !5
  %122 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %121, ptr %122, align 8, !tbaa !5
  %123 = load ptr, ptr %21, align 8, !tbaa !5
  %124 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %123, ptr %124, align 8, !tbaa !5
  br label %125

125:                                              ; preds = %120, %115, %81, %68, %60, %51, %28
  %126 = load i32, ptr %16, align 4, !tbaa !11
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %131

128:                                              ; preds = %125
  %129 = load ptr, ptr %20, align 8, !tbaa !5
  call void @free(ptr noundef %129) #5
  %130 = load ptr, ptr %21, align 8, !tbaa !5
  call void @free(ptr noundef %130) #5
  br label %131

131:                                              ; preds = %128, %125
  %132 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %132) #5
  %133 = load i32, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  ret i32 %133
}

declare i32 @rl_btree_random_element(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden i32 @contains(i64 noundef, ptr noundef, i64 noundef) #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 = { 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 = { "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 40}
!14 = !{!"rl_btree", !6, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !10, i64 40}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; 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
declare dso_local i32 @rl_set_get_objects(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

declare i32 @rl_multi_string_get(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local i32 @rl_srandmembers(ptr noundef %0, ptr noundef %1, i64 noundef %2, i32 noundef %3, ptr nocapture noundef %4, ptr nocapture noundef writeonly %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %10 = call i32 @rl_set_get_objects(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef null, ptr noundef nonnull %9, i32 noundef 0, i32 noundef 0)
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %11, label %.loopexit

11:                                               ; preds = %7
  %.not57 = icmp eq i32 %3, 0
  %.pre = load i64, ptr %4, align 8, !tbaa !5
  br i1 %.not57, label %12, label %._crit_edge80

._crit_edge80:                                    ; preds = %11
  %.pre81 = shl i64 %.pre, 3
  br label %22

12:                                               ; preds = %11
  %13 = load ptr, ptr %9, align 8, !tbaa !9
  %14 = getelementptr inbounds i8, ptr %13, i64 40
  %15 = load i64, ptr %14, align 8, !tbaa !11
  %16 = icmp sgt i64 %.pre, %15
  br i1 %16, label %17, label %18

17:                                               ; preds = %12
  store i64 %15, ptr %4, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %17, %12
  %19 = phi i64 [ %15, %17 ], [ %.pre, %12 ]
  %20 = shl i64 %19, 3
  %21 = call noalias ptr @malloc(i64 noundef %20) #6
  %.not58 = icmp eq ptr %21, null
  br i1 %.not58, label %.loopexit, label %22

22:                                               ; preds = %._crit_edge80, %18
  %.pre-phi = phi i64 [ %.pre81, %._crit_edge80 ], [ %20, %18 ]
  %23 = phi i64 [ %.pre, %._crit_edge80 ], [ %19, %18 ]
  %.039 = phi ptr [ null, %._crit_edge80 ], [ %21, %18 ]
  %24 = call noalias ptr @malloc(i64 noundef %.pre-phi) #6
  %.not59 = icmp eq ptr %24, null
  br i1 %.not59, label %.loopexit, label %25

25:                                               ; preds = %22
  %26 = call noalias ptr @malloc(i64 noundef %.pre-phi) #6
  %.not60 = icmp eq ptr %26, null
  br i1 %.not60, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %25
  %27 = icmp sgt i64 %23, 0
  br i1 %27, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  br i1 %.not57, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %43
  %.04276.us = phi i64 [ %44, %43 ], [ 0, %.lr.ph ]
  %28 = load ptr, ptr %9, align 8, !tbaa !9
  %29 = call i32 @rl_btree_random_element(ptr noundef %0, ptr noundef %28, ptr noundef null, ptr noundef nonnull %8) #5
  %.not61.us = icmp eq i32 %29, 0
  br i1 %.not61.us, label %30, label %.loopexit

30:                                               ; preds = %.lr.ph.split.us
  %31 = load ptr, ptr %8, align 8, !tbaa !9
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %33 = call i32 @contains(i64 noundef %.04276.us, ptr noundef %.039, i64 noundef %32)
  %.not62.us = icmp eq i32 %33, 0
  br i1 %.not62.us, label %36, label %34

34:                                               ; preds = %30
  %35 = add nsw i64 %.04276.us, -1
  br label %43

36:                                               ; preds = %30
  %37 = load ptr, ptr %8, align 8, !tbaa !9
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = getelementptr inbounds i64, ptr %.039, i64 %.04276.us
  store i64 %38, ptr %39, align 8, !tbaa !5
  %40 = getelementptr inbounds ptr, ptr %24, i64 %.04276.us
  %41 = getelementptr inbounds i64, ptr %26, i64 %.04276.us
  %42 = call i32 @rl_multi_string_get(ptr noundef %0, i64 noundef %38, ptr noundef nonnull %40, ptr noundef nonnull %41) #5
  %.not63.us = icmp eq i32 %42, 0
  br i1 %.not63.us, label %43, label %.loopexit

43:                                               ; preds = %36, %34
  %.143.us = phi i64 [ %.04276.us, %36 ], [ %35, %34 ]
  %44 = add nsw i64 %.143.us, 1
  %45 = load i64, ptr %4, align 8, !tbaa !5
  %46 = icmp slt i64 %44, %45
  br i1 %46, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !13

.lr.ph.split:                                     ; preds = %.lr.ph, %55
  %.04276 = phi i64 [ %56, %55 ], [ 0, %.lr.ph ]
  %47 = load ptr, ptr %9, align 8, !tbaa !9
  %48 = call i32 @rl_btree_random_element(ptr noundef %0, ptr noundef %47, ptr noundef null, ptr noundef nonnull %8) #5
  %.not61 = icmp eq i32 %48, 0
  br i1 %.not61, label %49, label %.loopexit

49:                                               ; preds = %.lr.ph.split
  %50 = load ptr, ptr %8, align 8, !tbaa !9
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds ptr, ptr %24, i64 %.04276
  %53 = getelementptr inbounds i64, ptr %26, i64 %.04276
  %54 = call i32 @rl_multi_string_get(ptr noundef %0, i64 noundef %51, ptr noundef nonnull %52, ptr noundef nonnull %53) #5
  %.not63 = icmp eq i32 %54, 0
  br i1 %.not63, label %55, label %.loopexit

55:                                               ; preds = %49
  %56 = add nuw nsw i64 %.04276, 1
  %57 = load i64, ptr %4, align 8, !tbaa !5
  %58 = icmp slt i64 %56, %57
  br i1 %58, label %.lr.ph.split, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %55, %43, %.preheader
  store ptr %24, ptr %5, align 8, !tbaa !9
  store ptr %26, ptr %6, align 8, !tbaa !9
  br label %59

.loopexit:                                        ; preds = %49, %.lr.ph.split, %36, %.lr.ph.split.us, %7, %18, %22, %25
  %.2.ph = phi i32 [ 4, %25 ], [ 4, %22 ], [ 4, %18 ], [ %10, %7 ], [ %29, %.lr.ph.split.us ], [ %42, %36 ], [ %48, %.lr.ph.split ], [ %54, %49 ]
  %.1.ph = phi ptr [ %.039, %25 ], [ %.039, %22 ], [ null, %18 ], [ null, %7 ], [ %.039, %.lr.ph.split.us ], [ %.039, %36 ], [ %.039, %.lr.ph.split ], [ %.039, %49 ]
  %.038.ph = phi ptr [ %24, %25 ], [ null, %22 ], [ null, %18 ], [ null, %7 ], [ %24, %.lr.ph.split.us ], [ %24, %36 ], [ %24, %.lr.ph.split ], [ %24, %49 ]
  %.0.ph = phi ptr [ null, %25 ], [ null, %22 ], [ null, %18 ], [ null, %7 ], [ %26, %.lr.ph.split.us ], [ %26, %36 ], [ %26, %.lr.ph.split ], [ %26, %49 ]
  call void @free(ptr noundef %.038.ph) #5
  call void @free(ptr noundef %.0.ph) #5
  br label %59

59:                                               ; preds = %._crit_edge, %.loopexit
  %.173 = phi ptr [ %.1.ph, %.loopexit ], [ %.039, %._crit_edge ]
  %.271 = phi i32 [ %.2.ph, %.loopexit ], [ 0, %._crit_edge ]
  call void @free(ptr noundef %.173) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  ret i32 %.271
}

declare i32 @rl_btree_random_element(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden i32 @contains(i64 noundef, ptr noundef, i64 noundef) 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 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 = { 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 #4 = { "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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 40}
!12 = !{!"rl_btree", !10, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !6, i64 40}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass