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

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @rl_hash_get_objects(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #1

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

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

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

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

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

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

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

declare i32 @rl_btree_add_element(ptr noundef, ptr noundef, i64 noundef, 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) #0

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

30:                                               ; preds = %8
  br label %164

31:                                               ; preds = %8
  store i32 0, ptr %17, align 4, !tbaa !11
  br label %32

32:                                               ; preds = %160, %31
  %33 = load i32, ptr %17, align 4, !tbaa !11
  %34 = load i32, ptr %12, align 4, !tbaa !11
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %36, label %163

36:                                               ; preds = %32
  %37 = call noalias ptr @malloc(i64 noundef 20) #6
  store ptr %37, ptr %21, align 8, !tbaa !5
  %38 = load ptr, ptr %21, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  store i32 4, ptr %18, align 4, !tbaa !11
  br label %164

41:                                               ; preds = %36
  %42 = load ptr, ptr %13, align 8, !tbaa !5
  %43 = load i32, ptr %17, align 4, !tbaa !11
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds ptr, ptr %42, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = load ptr, ptr %14, align 8, !tbaa !5
  %48 = load i32, ptr %17, align 4, !tbaa !11
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i64, ptr %47, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !9
  %52 = load ptr, ptr %21, align 8, !tbaa !5
  %53 = call i32 @sha1(ptr noundef %46, i64 noundef %51, ptr noundef %52)
  store i32 %53, ptr %18, align 4, !tbaa !11
  %54 = load i32, ptr %18, align 4, !tbaa !11
  %55 = icmp ne i32 0, %54
  br i1 %55, label %56, label %57

56:                                               ; preds = %41
  br label %164

57:                                               ; preds = %41
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = load ptr, ptr %20, align 8, !tbaa !5
  %60 = load ptr, ptr %21, align 8, !tbaa !5
  %61 = call i32 @rl_btree_find_score(ptr noundef %58, ptr noundef %59, ptr noundef %60, ptr noundef %23, ptr noundef null, ptr noundef null)
  store i32 %61, ptr %18, align 4, !tbaa !11
  %62 = load i32, ptr %18, align 4, !tbaa !11
  %63 = icmp eq i32 %62, 2
  br i1 %63, label %64, label %100

64:                                               ; preds = %57
  %65 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %65, ptr %22, align 8, !tbaa !5
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = load ptr, ptr %22, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.rl_hashkey, ptr %67, i32 0, i32 1
  %69 = load i64, ptr %68, align 8, !tbaa !13
  %70 = call i32 @rl_multi_string_delete(ptr noundef %66, i64 noundef %69)
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = load ptr, ptr %22, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.rl_hashkey, ptr %72, i32 0, i32 1
  %74 = load ptr, ptr %15, align 8, !tbaa !5
  %75 = load i32, ptr %17, align 4, !tbaa !11
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds ptr, ptr %74, i64 %76
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = load i32, ptr %17, align 4, !tbaa !11
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds i64, ptr %79, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !9
  %84 = call i32 @rl_multi_string_set(ptr noundef %71, ptr noundef %73, ptr noundef %78, i64 noundef %83)
  store i32 %84, ptr %18, align 4, !tbaa !11
  %85 = load i32, ptr %18, align 4, !tbaa !11
  %86 = icmp ne i32 0, %85
  br i1 %86, label %87, label %88

87:                                               ; preds = %64
  br label %164

88:                                               ; preds = %64
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = load ptr, ptr %20, align 8, !tbaa !5
  %91 = load ptr, ptr %21, align 8, !tbaa !5
  %92 = load ptr, ptr %22, align 8, !tbaa !5
  %93 = call i32 @rl_btree_update_element(ptr noundef %89, ptr noundef %90, ptr noundef %91, ptr noundef %92)
  store i32 %93, ptr %18, align 4, !tbaa !11
  %94 = load i32, ptr %18, align 4, !tbaa !11
  %95 = icmp eq i32 %94, 0
  br i1 %95, label %96, label %98

96:                                               ; preds = %88
  %97 = load ptr, ptr %21, align 8, !tbaa !5
  call void @free(ptr noundef %97) #5
  store ptr null, ptr %21, align 8, !tbaa !5
  br label %99

98:                                               ; preds = %88
  br label %164

99:                                               ; preds = %96
  br label %159

100:                                              ; preds = %57
  %101 = load i32, ptr %18, align 4, !tbaa !11
  %102 = icmp eq i32 %101, 3
  br i1 %102, label %103, label %158

103:                                              ; preds = %100
  %104 = call noalias ptr @malloc(i64 noundef 16) #6
  store ptr %104, ptr %22, align 8, !tbaa !5
  %105 = load ptr, ptr %22, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  store i32 4, ptr %18, align 4, !tbaa !11
  br label %164

108:                                              ; preds = %103
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = load ptr, ptr %22, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.rl_hashkey, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  %113 = load i32, ptr %17, align 4, !tbaa !11
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds ptr, ptr %112, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = load i32, ptr %17, align 4, !tbaa !11
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i64, ptr %117, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !9
  %122 = call i32 @rl_multi_string_set(ptr noundef %109, ptr noundef %111, ptr noundef %116, i64 noundef %121)
  store i32 %122, ptr %18, align 4, !tbaa !11
  %123 = load i32, ptr %18, align 4, !tbaa !11
  %124 = icmp ne i32 0, %123
  br i1 %124, label %125, label %126

125:                                              ; preds = %108
  br label %164

126:                                              ; preds = %108
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = load ptr, ptr %22, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.rl_hashkey, ptr %128, i32 0, i32 1
  %130 = load ptr, ptr %15, align 8, !tbaa !5
  %131 = load i32, ptr %17, align 4, !tbaa !11
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds ptr, ptr %130, i64 %132
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = load ptr, ptr %16, align 8, !tbaa !5
  %136 = load i32, ptr %17, align 4, !tbaa !11
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i64, ptr %135, i64 %137
  %139 = load i64, ptr %138, align 8, !tbaa !9
  %140 = call i32 @rl_multi_string_set(ptr noundef %127, ptr noundef %129, ptr noundef %134, i64 noundef %139)
  store i32 %140, ptr %18, align 4, !tbaa !11
  %141 = load i32, ptr %18, align 4, !tbaa !11
  %142 = icmp ne i32 0, %141
  br i1 %142, label %143, label %144

143:                                              ; preds = %126
  br label %164

144:                                              ; preds = %126
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = load ptr, ptr %20, align 8, !tbaa !5
  %147 = load i64, ptr %19, align 8, !tbaa !9
  %148 = load ptr, ptr %21, align 8, !tbaa !5
  %149 = load ptr, ptr %22, align 8, !tbaa !5
  %150 = call i32 @rl_btree_add_element(ptr noundef %145, ptr noundef %146, i64 noundef %147, ptr noundef %148, ptr noundef %149)
  store i32 %150, ptr %18, align 4, !tbaa !11
  %151 = load i32, ptr %18, align 4, !tbaa !11
  %152 = icmp ne i32 %151, 2
  br i1 %152, label %153, label %157

153:                                              ; preds = %144
  %154 = load i32, ptr %18, align 4, !tbaa !11
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %157

156:                                              ; preds = %153
  br label %164

157:                                              ; preds = %153, %144
  br label %158

158:                                              ; preds = %157, %100
  br label %159

159:                                              ; preds = %158, %99
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %17, align 4, !tbaa !11
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %17, align 4, !tbaa !11
  br label %32, !llvm.loop !15

163:                                              ; preds = %32
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %164

164:                                              ; preds = %163, %156, %143, %125, %107, %98, %87, %56, %40, %30
  %165 = load i32, ptr %18, align 4, !tbaa !11
  %166 = icmp ne i32 %165, 0
  br i1 %166, label %167, label %170

167:                                              ; preds = %164
  %168 = load ptr, ptr %21, align 8, !tbaa !5
  call void @free(ptr noundef %168) #5
  %169 = load ptr, ptr %22, align 8, !tbaa !5
  call void @free(ptr noundef %169) #5
  br label %170

170:                                              ; preds = %167, %164
  %171 = load i32, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  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 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  ret i32 %171
}

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 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 = { "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 "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 8}
!14 = !{!"rl_hashkey", !10, i64 0, !10, i64 8}
!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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @rl_hash_get_objects(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #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

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

declare i32 @rl_btree_find_score(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

declare i32 @rl_btree_update_element(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress 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 @rl_hmset(ptr noundef %0, ptr noundef %1, i64 noundef %2, i32 noundef %3, ptr nocapture noundef readonly %4, ptr nocapture noundef readonly %5, ptr nocapture noundef readonly %6, ptr nocapture noundef readonly %7) local_unnamed_addr #1 {
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %12 = call i32 @rl_hash_get_objects(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef nonnull %9, ptr noundef nonnull %10, i32 noundef 1, i32 noundef 1)
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %.preheader, label %.loopexit88

.preheader:                                       ; preds = %8
  %13 = icmp sgt i32 %3, 0
  br i1 %13, label %.lr.ph.preheader, label %.loopexit

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

.lr.ph:                                           ; preds = %.lr.ph.preheader, %57
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %57 ]
  %.090 = phi ptr [ null, %.lr.ph.preheader ], [ %.1, %57 ]
  %14 = call noalias dereferenceable_or_null(20) ptr @malloc(i64 noundef 20) #6
  %.not73 = icmp eq ptr %14, null
  br i1 %.not73, label %.loopexit88, label %15

15:                                               ; preds = %.lr.ph
  %16 = getelementptr inbounds ptr, ptr %4, i64 %indvars.iv
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = getelementptr inbounds i64, ptr %5, i64 %indvars.iv
  %19 = load i64, ptr %18, align 8, !tbaa !9
  %20 = call i32 @sha1(ptr noundef %17, i64 noundef %19, ptr noundef nonnull %14) #5
  %.not74 = icmp eq i32 %20, 0
  br i1 %.not74, label %21, label %.loopexit88

21:                                               ; preds = %15
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  %23 = call i32 @rl_btree_find_score(ptr noundef %0, ptr noundef %22, ptr noundef nonnull %14, ptr noundef nonnull %11, ptr noundef null, ptr noundef null) #5
  switch i32 %23, label %57 [
    i32 2, label %24
    i32 3, label %39
  ]

24:                                               ; preds = %21
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load i64, ptr %26, align 8, !tbaa !11
  %28 = call i32 @rl_multi_string_delete(ptr noundef %0, i64 noundef %27) #5
  %29 = getelementptr inbounds ptr, ptr %6, i64 %indvars.iv
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = getelementptr inbounds i64, ptr %7, i64 %indvars.iv
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = call i32 @rl_multi_string_set(ptr noundef %0, ptr noundef nonnull %26, ptr noundef %30, i64 noundef %32) #5
  %.not78 = icmp eq i32 %33, 0
  br i1 %.not78, label %34, label %.loopexit88

34:                                               ; preds = %24
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = call i32 @rl_btree_update_element(ptr noundef %0, ptr noundef %35, ptr noundef nonnull %14, ptr noundef nonnull %25) #5
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %38, label %.loopexit88

38:                                               ; preds = %34
  call void @free(ptr noundef nonnull %14) #5
  br label %57

39:                                               ; preds = %21
  %40 = call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #6
  %.not75 = icmp eq ptr %40, null
  br i1 %.not75, label %.loopexit88, label %41

41:                                               ; preds = %39
  %42 = load ptr, ptr %16, align 8, !tbaa !5
  %43 = load i64, ptr %18, align 8, !tbaa !9
  %44 = call i32 @rl_multi_string_set(ptr noundef %0, ptr noundef nonnull %40, ptr noundef %42, i64 noundef %43) #5
  %.not76 = icmp eq i32 %44, 0
  br i1 %.not76, label %45, label %.loopexit88

45:                                               ; preds = %41
  %46 = getelementptr inbounds i8, ptr %40, i64 8
  %47 = getelementptr inbounds ptr, ptr %6, i64 %indvars.iv
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = getelementptr inbounds i64, ptr %7, i64 %indvars.iv
  %50 = load i64, ptr %49, align 8, !tbaa !9
  %51 = call i32 @rl_multi_string_set(ptr noundef %0, ptr noundef nonnull %46, ptr noundef %48, i64 noundef %50) #5
  %.not77 = icmp eq i32 %51, 0
  br i1 %.not77, label %52, label %.loopexit88

52:                                               ; preds = %45
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = load i64, ptr %9, align 8, !tbaa !9
  %55 = call i32 @rl_btree_add_element(ptr noundef %0, ptr noundef %53, i64 noundef %54, ptr noundef nonnull %14, ptr noundef nonnull %40) #5
  %56 = and i32 %55, -3
  %or.cond.not = icmp eq i32 %56, 0
  br i1 %or.cond.not, label %57, label %.loopexit88

57:                                               ; preds = %21, %38, %52
  %.1 = phi ptr [ %25, %38 ], [ %40, %52 ], [ %.090, %21 ]
  %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 %.loopexit, label %.lr.ph, !llvm.loop !13

.loopexit88:                                      ; preds = %15, %24, %34, %41, %45, %52, %.lr.ph, %39, %8
  %.059.ph = phi i32 [ %12, %8 ], [ %20, %15 ], [ %33, %24 ], [ %36, %34 ], [ %44, %41 ], [ %51, %45 ], [ %55, %52 ], [ 4, %.lr.ph ], [ 4, %39 ]
  %.258.ph = phi ptr [ null, %8 ], [ %14, %15 ], [ %14, %24 ], [ %14, %34 ], [ %14, %41 ], [ %14, %45 ], [ %14, %52 ], [ null, %.lr.ph ], [ %14, %39 ]
  %.2.ph = phi ptr [ null, %8 ], [ %.090, %15 ], [ %25, %24 ], [ %25, %34 ], [ %40, %41 ], [ %40, %45 ], [ %40, %52 ], [ %.090, %.lr.ph ], [ null, %39 ]
  call void @free(ptr noundef %.258.ph) #5
  call void @free(ptr noundef %.2.ph) #5
  br label %.loopexit

.loopexit:                                        ; preds = %57, %.preheader, %.loopexit88
  %.05985 = phi i32 [ %.059.ph, %.loopexit88 ], [ 0, %.preheader ], [ 0, %57 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  ret i32 %.05985
}

attributes #0 = { mustprogress 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 = { 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 = { "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 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 #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, !10, i64 8}
!12 = !{!"rl_hashkey", !10, i64 0, !10, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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