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

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

@stderr = external global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

; 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 allocsize(0)
declare noalias ptr @malloc(i64 noundef) #1

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

declare i32 @rl_read(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef) #3

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @rl_btree_node_is_balanced(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #4

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

28:                                               ; preds = %2
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.rl_btree, ptr %30, i32 0, i32 4
  %32 = load i64, ptr %31, align 8, !tbaa !15
  %33 = load i32, ptr %9, align 4, !tbaa !16
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef @.str.6, i64 noundef %32, i32 noundef %33) #5
  br label %115

35:                                               ; preds = %2
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %36, ptr %8, align 8, !tbaa !5
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = call i32 @rl_btree_node_is_balanced(ptr noundef %37, ptr noundef %38, ptr noundef %39, i32 noundef 1)
  store i32 %40, ptr %9, align 4, !tbaa !16
  %41 = load i32, ptr %9, align 4, !tbaa !16
  %42 = icmp ne i32 0, %41
  br i1 %42, label %43, label %44

43:                                               ; preds = %35
  br label %115

44:                                               ; preds = %35
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.rl_btree, ptr %45, i32 0, i32 1
  %47 = load i64, ptr %46, align 8, !tbaa !17
  %48 = add nsw i64 %47, 1
  %49 = sitofp i64 %48 to double
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.rl_btree, ptr %50, i32 0, i32 2
  %52 = load i64, ptr %51, align 8, !tbaa !18
  %53 = add nsw i64 %52, 1
  %54 = sitofp i64 %53 to double
  %55 = call double @pow(double noundef %49, double noundef %54) #5
  %56 = fptosi double %55 to i64
  store i64 %56, ptr %10, align 8, !tbaa !19
  %57 = load i64, ptr %10, align 8, !tbaa !19
  %58 = mul i64 8, %57
  %59 = call noalias ptr @malloc(i64 noundef %58) #6
  store ptr %59, ptr %6, align 8, !tbaa !5
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %63, label %62

62:                                               ; preds = %44
  store i32 4, ptr %9, align 4, !tbaa !16
  br label %115

63:                                               ; preds = %44
  store i64 0, ptr %10, align 8, !tbaa !19
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = call i32 @rl_flatten_btree(ptr noundef %64, ptr noundef %65, ptr noundef %6, ptr noundef %10)
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %67

67:                                               ; preds = %111, %63
  %68 = load i64, ptr %11, align 8, !tbaa !19
  %69 = load i64, ptr %10, align 8, !tbaa !19
  %70 = icmp slt i64 %68, %69
  br i1 %70, label %71, label %114

71:                                               ; preds = %67
  %72 = load i64, ptr %11, align 8, !tbaa !19
  %73 = add nsw i64 %72, 1
  store i64 %73, ptr %12, align 8, !tbaa !19
  br label %74

74:                                               ; preds = %107, %71
  %75 = load i64, ptr %12, align 8, !tbaa !19
  %76 = load i64, ptr %10, align 8, !tbaa !19
  %77 = icmp slt i64 %75, %76
  br i1 %77, label %78, label %110

78:                                               ; preds = %74
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.rl_btree, ptr %79, i32 0, i32 3
  %81 = load ptr, ptr %80, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.rl_btree_type, ptr %81, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !20
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = load i64, ptr %11, align 8, !tbaa !19
  %86 = getelementptr inbounds ptr, ptr %84, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = load i64, ptr %12, align 8, !tbaa !19
  %90 = getelementptr inbounds ptr, ptr %88, i64 %89
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = call i32 %83(ptr noundef %87, ptr noundef %91)
  %93 = icmp sge i32 %92, 0
  br i1 %93, label %94, label %106

94:                                               ; preds = %78
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef @.str.7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %97 = call noalias ptr @malloc(i64 noundef 100) #6
  store ptr %97, ptr %13, align 8, !tbaa !5
  %98 = load ptr, ptr %13, align 8, !tbaa !5
  %99 = icmp ne ptr %98, null
  br i1 %99, label %101, label %100

100:                                              ; preds = %94
  store i32 4, ptr %9, align 4, !tbaa !16
  store i32 2, ptr %14, align 4
  br label %104

101:                                              ; preds = %94
  %102 = load ptr, ptr @stderr, align 8, !tbaa !5
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef @.str.8) #5
  store i32 1, ptr %9, align 4, !tbaa !16
  store i32 2, ptr %14, align 4
  br label %104

104:                                              ; preds = %101, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %105 = load i32, ptr %14, align 4
  switch i32 %105, label %118 [
    i32 2, label %115
  ]

106:                                              ; preds = %78
  br label %107

107:                                              ; preds = %106
  %108 = load i64, ptr %12, align 8, !tbaa !19
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr %12, align 8, !tbaa !19
  br label %74, !llvm.loop !21

110:                                              ; preds = %74
  br label %111

111:                                              ; preds = %110
  %112 = load i64, ptr %11, align 8, !tbaa !19
  %113 = add nsw i64 %112, 1
  store i64 %113, ptr %11, align 8, !tbaa !19
  br label %67, !llvm.loop !23

114:                                              ; preds = %67
  br label %115

115:                                              ; preds = %114, %104, %62, %43, %28
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %116) #5
  %117 = load i32, ptr %9, align 4, !tbaa !16
  store i32 %117, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %118

118:                                              ; preds = %115, %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %119 = load i32, ptr %3, align 4
  ret i32 %119
}

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @rl_flatten_btree(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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, !6, i64 24}
!10 = !{!"rl_btree", !6, i64 0, !11, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !11, i64 40}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !6, i64 8}
!13 = !{!"", !6, i64 0, !6, i64 8, !14, i64 16, !14, i64 20, !6, i64 24}
!14 = !{!"int", !7, i64 0}
!15 = !{!10, !11, i64 32}
!16 = !{!14, !14, i64 0}
!17 = !{!10, !11, i64 8}
!18 = !{!10, !11, i64 16}
!19 = !{!11, !11, i64 0}
!20 = !{!13, !6, i64 24}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

declare i32 @rl_read(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @rl_btree_node_is_balanced(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
define dso_local i32 @rl_btree_is_balanced(ptr noundef %0, ptr noundef %1) local_unnamed_addr #5 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %6 = getelementptr inbounds i8, ptr %1, i64 24
  %7 = load ptr, ptr %6, align 8, !tbaa !9
  %8 = getelementptr inbounds i8, ptr %7, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !12
  %10 = getelementptr inbounds i8, ptr %1, i64 32
  %11 = load i64, ptr %10, align 8, !tbaa !15
  %12 = call i32 @rl_read(ptr noundef %0, ptr noundef %9, i64 noundef %11, ptr noundef %1, ptr noundef nonnull %4, i32 noundef 1) #7
  %.not = icmp eq i32 %12, 2
  br i1 %.not, label %17, label %13

13:                                               ; preds = %2
  %14 = load ptr, ptr @stderr, align 8, !tbaa !5
  %15 = load i64, ptr %10, align 8, !tbaa !15
  %16 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.6, i64 noundef %15, i32 noundef %12) #8
  br label %.loopexit34

17:                                               ; preds = %2
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = call i32 @rl_btree_node_is_balanced(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %18, i32 noundef 1)
  %.not32 = icmp eq i32 %19, 0
  br i1 %.not32, label %20, label %.loopexit34

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %1, i64 8
  %22 = load i64, ptr %21, align 8, !tbaa !16
  %23 = add nsw i64 %22, 1
  %24 = sitofp i64 %23 to double
  %25 = getelementptr inbounds i8, ptr %1, i64 16
  %26 = load i64, ptr %25, align 8, !tbaa !17
  %27 = add nsw i64 %26, 1
  %28 = sitofp i64 %27 to double
  %29 = call double @pow(double noundef %24, double noundef %28) #7
  %30 = fptosi double %29 to i64
  store i64 %30, ptr %5, align 8, !tbaa !18
  %31 = shl i64 %30, 3
  %32 = call noalias ptr @malloc(i64 noundef %31) #9
  store ptr %32, ptr %3, align 8, !tbaa !5
  %.not33 = icmp eq ptr %32, null
  br i1 %.not33, label %.loopexit34, label %33

33:                                               ; preds = %20
  store i64 0, ptr %5, align 8, !tbaa !18
  %34 = call i32 @rl_flatten_btree(ptr noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %3, ptr noundef nonnull %5)
  %35 = load i64, ptr %5, align 8, !tbaa !18
  %36 = icmp sgt i64 %35, 0
  br i1 %36, label %.lr.ph37, label %.loopexit34

.loopexit:                                        ; preds = %42, %.lr.ph37
  %37 = phi i64 [ %39, %.lr.ph37 ], [ %44, %42 ]
  %38 = icmp slt i64 %40, %37
  br i1 %38, label %.lr.ph37, label %.loopexit34, !llvm.loop !19

.lr.ph37:                                         ; preds = %33, %.loopexit
  %39 = phi i64 [ %37, %.loopexit ], [ %35, %33 ]
  %.02836 = phi i64 [ %40, %.loopexit ], [ 0, %33 ]
  %40 = add nuw nsw i64 %.02836, 1
  %41 = icmp slt i64 %40, %39
  br i1 %41, label %.lr.ph, label %.loopexit

42:                                               ; preds = %.lr.ph
  %43 = add nuw nsw i64 %.02735, 1
  %44 = load i64, ptr %5, align 8, !tbaa !18
  %45 = icmp slt i64 %43, %44
  br i1 %45, label %.lr.ph, label %.loopexit, !llvm.loop !21

.lr.ph:                                           ; preds = %.lr.ph37, %42
  %.02735 = phi i64 [ %43, %42 ], [ %40, %.lr.ph37 ]
  %46 = load ptr, ptr %6, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %46, i64 24
  %48 = load ptr, ptr %47, align 8, !tbaa !22
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds ptr, ptr %49, i64 %.02836
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds ptr, ptr %49, i64 %.02735
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = call i32 %48(ptr noundef %51, ptr noundef %53) #7
  %55 = icmp sgt i32 %54, -1
  br i1 %55, label %56, label %42

56:                                               ; preds = %.lr.ph
  %57 = load ptr, ptr @stderr, align 8, !tbaa !5
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.7) #8
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef nonnull @.str.8) #8
  br label %.loopexit34

.loopexit34:                                      ; preds = %.loopexit, %33, %20, %56, %17, %13
  %.1 = phi i32 [ %12, %13 ], [ %19, %17 ], [ 1, %56 ], [ 4, %20 ], [ 0, %33 ], [ 0, %.loopexit ]
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %61) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  ret i32 %.1
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #6

; Function Attrs: nounwind uwtable
declare dso_local i32 @rl_flatten_btree(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { 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 #5 = { 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 #6 = { mustprogress nofree nounwind willreturn memory(write) "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 #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { 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, !6, i64 24}
!10 = !{!"rl_btree", !6, i64 0, !11, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !11, i64 40}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !6, i64 8}
!13 = !{!"", !6, i64 0, !6, i64 8, !14, i64 16, !14, i64 20, !6, i64 24}
!14 = !{!"int", !7, i64 0}
!15 = !{!10, !11, i64 32}
!16 = !{!10, !11, i64 8}
!17 = !{!10, !11, i64 16}
!18 = !{!11, !11, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!13, !6, i64 24}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass