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

; 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_key = type { i8, i64, i64, i64, i64 }

@stderr = external global ptr, align 8
@.str.25 = external hidden unnamed_addr constant [17 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
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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

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

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

14:                                               ; preds = %2
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %148

15:                                               ; preds = %2
  %16 = load i32, ptr %5, align 4, !tbaa !9
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %19

18:                                               ; preds = %15
  br label %148

19:                                               ; preds = %15
  br label %20

20:                                               ; preds = %19
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = call i32 @rl_btree_pages(ptr noundef %21, ptr noundef %22, ptr noundef %23)
  store i32 %24, ptr %5, align 4, !tbaa !9
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = icmp ne i32 0, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %20
  br label %148

28:                                               ; preds = %20
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = call i32 @rl_btree_iterator_create(ptr noundef %29, ptr noundef %30, ptr noundef %9)
  store i32 %31, ptr %5, align 4, !tbaa !9
  %32 = load i32, ptr %5, align 4, !tbaa !9
  %33 = icmp ne i32 0, %32
  br i1 %33, label %34, label %35

34:                                               ; preds = %28
  br label %148

35:                                               ; preds = %28
  br label %36

36:                                               ; preds = %141, %35
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = call i32 @rl_btree_iterator_next(ptr noundef %37, ptr noundef null, ptr noundef %6)
  store i32 %38, ptr %5, align 4, !tbaa !9
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %143

40:                                               ; preds = %36
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %41, ptr %7, align 8, !tbaa !5
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.rl_key, ptr %43, i32 0, i32 1
  %45 = load i64, ptr %44, align 8, !tbaa !11
  %46 = getelementptr inbounds i16, ptr %42, i64 %45
  store i16 1, ptr %46, align 2, !tbaa !15
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.rl_key, ptr %48, i32 0, i32 2
  %50 = load i64, ptr %49, align 8, !tbaa !17
  %51 = getelementptr inbounds i16, ptr %47, i64 %50
  store i16 1, ptr %51, align 2, !tbaa !15
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.rl_key, ptr %53, i32 0, i32 1
  %55 = load i64, ptr %54, align 8, !tbaa !11
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = call i32 @rl_multi_string_pages(ptr noundef %52, i64 noundef %55, ptr noundef %56)
  store i32 %57, ptr %5, align 4, !tbaa !9
  %58 = load i32, ptr %5, align 4, !tbaa !9
  %59 = icmp ne i32 0, %58
  br i1 %59, label %60, label %61

60:                                               ; preds = %40
  br label %148

61:                                               ; preds = %40
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.rl_key, ptr %62, i32 0, i32 0
  %64 = load i8, ptr %63, align 8, !tbaa !18
  %65 = zext i8 %64 to i32
  %66 = icmp eq i32 %65, 90
  br i1 %66, label %67, label %74

67:                                               ; preds = %61
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.rl_key, ptr %69, i32 0, i32 2
  %71 = load i64, ptr %70, align 8, !tbaa !17
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = call i32 @rl_zset_pages(ptr noundef %68, i64 noundef %71, ptr noundef %72)
  store i32 %73, ptr %5, align 4, !tbaa !9
  br label %137

74:                                               ; preds = %61
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.rl_key, ptr %75, i32 0, i32 0
  %77 = load i8, ptr %76, align 8, !tbaa !18
  %78 = zext i8 %77 to i32
  %79 = icmp eq i32 %78, 72
  br i1 %79, label %80, label %87

80:                                               ; preds = %74
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.rl_key, ptr %82, i32 0, i32 2
  %84 = load i64, ptr %83, align 8, !tbaa !17
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = call i32 @rl_hash_pages(ptr noundef %81, i64 noundef %84, ptr noundef %85)
  store i32 %86, ptr %5, align 4, !tbaa !9
  br label %136

87:                                               ; preds = %74
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.rl_key, ptr %88, i32 0, i32 0
  %90 = load i8, ptr %89, align 8, !tbaa !18
  %91 = zext i8 %90 to i32
  %92 = icmp eq i32 %91, 83
  br i1 %92, label %93, label %100

93:                                               ; preds = %87
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.rl_key, ptr %95, i32 0, i32 2
  %97 = load i64, ptr %96, align 8, !tbaa !17
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = call i32 @rl_set_pages(ptr noundef %94, i64 noundef %97, ptr noundef %98)
  store i32 %99, ptr %5, align 4, !tbaa !9
  br label %135

100:                                              ; preds = %87
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.rl_key, ptr %101, i32 0, i32 0
  %103 = load i8, ptr %102, align 8, !tbaa !18
  %104 = zext i8 %103 to i32
  %105 = icmp eq i32 %104, 76
  br i1 %105, label %106, label %113

106:                                              ; preds = %100
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.rl_key, ptr %108, i32 0, i32 2
  %110 = load i64, ptr %109, align 8, !tbaa !17
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = call i32 @rl_llist_pages(ptr noundef %107, i64 noundef %110, ptr noundef %111)
  store i32 %112, ptr %5, align 4, !tbaa !9
  br label %134

113:                                              ; preds = %100
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.rl_key, ptr %114, i32 0, i32 0
  %116 = load i8, ptr %115, align 8, !tbaa !18
  %117 = zext i8 %116 to i32
  %118 = icmp eq i32 %117, 84
  br i1 %118, label %119, label %126

119:                                              ; preds = %113
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.rl_key, ptr %121, i32 0, i32 2
  %123 = load i64, ptr %122, align 8, !tbaa !17
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = call i32 @rl_string_pages(ptr noundef %120, i64 noundef %123, ptr noundef %124)
  store i32 %125, ptr %5, align 4, !tbaa !9
  br label %133

126:                                              ; preds = %113
  %127 = load ptr, ptr @stderr, align 8, !tbaa !5
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.rl_key, ptr %128, i32 0, i32 0
  %130 = load i8, ptr %129, align 8, !tbaa !18
  %131 = zext i8 %130 to i32
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %127, ptr noundef @.str.25, i32 noundef %131) #4
  br label %148

133:                                              ; preds = %119
  br label %134

134:                                              ; preds = %133, %106
  br label %135

135:                                              ; preds = %134, %93
  br label %136

136:                                              ; preds = %135, %80
  br label %137

137:                                              ; preds = %136, %67
  %138 = load i32, ptr %5, align 4, !tbaa !9
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %140, label %141

140:                                              ; preds = %137
  br label %148

141:                                              ; preds = %137
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %142) #4
  br label %36, !llvm.loop !19

143:                                              ; preds = %36
  store ptr null, ptr %6, align 8, !tbaa !5
  store ptr null, ptr %9, align 8, !tbaa !5
  %144 = load i32, ptr %5, align 4, !tbaa !9
  %145 = icmp ne i32 %144, 9
  br i1 %145, label %146, label %147

146:                                              ; preds = %143
  br label %148

147:                                              ; preds = %143
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %148

148:                                              ; preds = %147, %146, %140, %126, %60, %34, %27, %18, %14
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %149) #4
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = call i32 @rl_btree_iterator_destroy(ptr noundef %150)
  %152 = load i32, ptr %5, align 4, !tbaa !9
  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 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret i32 %152
}

declare i32 @rl_btree_pages(ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @rl_btree_iterator_create(ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @rl_btree_iterator_next(ptr noundef, ptr noundef, ptr noundef) #3

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

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

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

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

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

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

declare i32 @rl_btree_iterator_destroy(ptr noundef) #3

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

!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, !13, i64 8}
!12 = !{!"rl_key", !7, i64 0, !13, i64 8, !13, i64 16, !14, i64 24, !13, i64 32}
!13 = !{!"long", !7, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!12, !13, i64 16}
!18 = !{!12, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str.25 = external hidden unnamed_addr constant [17 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: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) 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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @rl_database_is_balanced(ptr noundef %0, ptr noundef %1) local_unnamed_addr #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store ptr null, ptr %5, align 8, !tbaa !5
  %6 = call i32 @rl_get_key_btree(ptr noundef %0, ptr noundef nonnull %4, i32 noundef 0)
  switch i32 %6, label %.fold.split [
    i32 3, label %.loopexit
    i32 0, label %7
  ]

7:                                                ; preds = %2
  %8 = load ptr, ptr %4, align 8, !tbaa !5
  %9 = call i32 @rl_btree_pages(ptr noundef %0, ptr noundef %8, ptr noundef %1) #5
  %.not46 = icmp eq i32 %9, 0
  br i1 %.not46, label %10, label %.loopexit

10:                                               ; preds = %7
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = call i32 @rl_btree_iterator_create(ptr noundef %0, ptr noundef %11, ptr noundef nonnull %5) #5
  %.not47 = icmp eq i32 %12, 0
  br i1 %.not47, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %10
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = call i32 @rl_btree_iterator_next(ptr noundef %13, ptr noundef null, ptr noundef nonnull %3) #5
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader, %46
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load i64, ptr %17, align 8, !tbaa !9
  %19 = getelementptr inbounds i16, ptr %1, i64 %18
  store i16 1, ptr %19, align 2, !tbaa !13
  %20 = getelementptr inbounds i8, ptr %16, i64 16
  %21 = load i64, ptr %20, align 8, !tbaa !15
  %22 = getelementptr inbounds i16, ptr %1, i64 %21
  store i16 1, ptr %22, align 2, !tbaa !13
  %23 = call i32 @rl_multi_string_pages(ptr noundef %0, i64 noundef %18, ptr noundef %1) #5
  %.not49 = icmp eq i32 %23, 0
  br i1 %.not49, label %24, label %.loopexit

24:                                               ; preds = %.lr.ph
  %25 = load i8, ptr %16, align 8, !tbaa !16
  switch i8 %25, label %41 [
    i8 90, label %26
    i8 72, label %29
    i8 83, label %32
    i8 76, label %35
    i8 84, label %38
  ]

26:                                               ; preds = %24
  %27 = load i64, ptr %20, align 8, !tbaa !15
  %28 = call i32 @rl_zset_pages(ptr noundef %0, i64 noundef %27, ptr noundef nonnull %1) #5
  br label %45

29:                                               ; preds = %24
  %30 = load i64, ptr %20, align 8, !tbaa !15
  %31 = call i32 @rl_hash_pages(ptr noundef %0, i64 noundef %30, ptr noundef nonnull %1) #5
  br label %45

32:                                               ; preds = %24
  %33 = load i64, ptr %20, align 8, !tbaa !15
  %34 = call i32 @rl_set_pages(ptr noundef %0, i64 noundef %33, ptr noundef nonnull %1) #5
  br label %45

35:                                               ; preds = %24
  %36 = load i64, ptr %20, align 8, !tbaa !15
  %37 = call i32 @rl_llist_pages(ptr noundef %0, i64 noundef %36, ptr noundef nonnull %1) #5
  br label %45

38:                                               ; preds = %24
  %39 = load i64, ptr %20, align 8, !tbaa !15
  %40 = call i32 @rl_string_pages(ptr noundef %0, i64 noundef %39, ptr noundef nonnull %1) #5
  br label %45

41:                                               ; preds = %24
  %42 = zext i8 %25 to i32
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.25, i32 noundef %42) #6
  br label %.loopexit

45:                                               ; preds = %29, %35, %38, %32, %26
  %.0 = phi i32 [ %28, %26 ], [ %31, %29 ], [ %34, %32 ], [ %37, %35 ], [ %40, %38 ]
  %.not50 = icmp eq i32 %.0, 0
  br i1 %.not50, label %46, label %.loopexit

46:                                               ; preds = %45
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %47) #5
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = call i32 @rl_btree_iterator_next(ptr noundef %48, ptr noundef null, ptr noundef nonnull %3) #5
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %46, %.preheader
  %.lcssa51 = phi i32 [ %14, %.preheader ], [ %49, %46 ]
  store ptr null, ptr %3, align 8, !tbaa !5
  store ptr null, ptr %5, align 8, !tbaa !5
  %.not48 = icmp eq i32 %.lcssa51, 9
  %spec.store.select = select i1 %.not48, i32 0, i32 %.lcssa51
  br label %.loopexit

.fold.split:                                      ; preds = %2
  br label %.loopexit

.loopexit:                                        ; preds = %45, %.lr.ph, %2, %.fold.split, %._crit_edge, %10, %7, %41
  %.1 = phi i32 [ %9, %7 ], [ %12, %10 ], [ 0, %41 ], [ %spec.store.select, %._crit_edge ], [ 0, %2 ], [ %6, %.fold.split ], [ %.0, %45 ], [ %23, %.lr.ph ]
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %51) #5
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = call i32 @rl_btree_iterator_destroy(ptr noundef %52) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret i32 %.1
}

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

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

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

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

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

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

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

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

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

declare i32 @rl_btree_iterator_destroy(ptr noundef) local_unnamed_addr #4

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


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