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

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

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

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

declare i32 @rl_key_get(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

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

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

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

29:                                               ; preds = %6
  store i32 4, ptr %13, align 4, !tbaa !11
  br label %139

30:                                               ; preds = %6
  %31 = load i32, ptr %19, align 4, !tbaa !11
  %32 = sext i32 %31 to i64
  %33 = mul i64 8, %32
  %34 = call noalias ptr @malloc(i64 noundef %33) #6
  store ptr %34, ptr %14, align 8, !tbaa !5
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %38, label %37

37:                                               ; preds = %30
  store i32 4, ptr %13, align 4, !tbaa !11
  br label %139

38:                                               ; preds = %30
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %39

39:                                               ; preds = %48, %38
  %40 = load i64, ptr %18, align 8, !tbaa !9
  %41 = load i32, ptr %19, align 4, !tbaa !11
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %40, %42
  br i1 %43, label %44, label %51

44:                                               ; preds = %39
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  %46 = load i64, ptr %18, align 8, !tbaa !9
  %47 = getelementptr inbounds ptr, ptr %45, i64 %46
  store ptr null, ptr %47, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %44
  %49 = load i64, ptr %18, align 8, !tbaa !9
  %50 = add nsw i64 %49, 1
  store i64 %50, ptr %18, align 8, !tbaa !9
  br label %39, !llvm.loop !15

51:                                               ; preds = %39
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %52

52:                                               ; preds = %81, %51
  %53 = load i64, ptr %18, align 8, !tbaa !9
  %54 = load i32, ptr %10, align 4, !tbaa !11
  %55 = sext i32 %54 to i64
  %56 = icmp slt i64 %53, %55
  br i1 %56, label %57, label %84

57:                                               ; preds = %52
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = load i64, ptr %18, align 8, !tbaa !9
  %61 = getelementptr inbounds ptr, ptr %59, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = load i64, ptr %18, align 8, !tbaa !9
  %65 = getelementptr inbounds i64, ptr %63, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !9
  %67 = load ptr, ptr %14, align 8, !tbaa !5
  %68 = load i64, ptr %18, align 8, !tbaa !9
  %69 = getelementptr inbounds ptr, ptr %67, i64 %68
  %70 = load ptr, ptr %16, align 8, !tbaa !5
  %71 = load i64, ptr %18, align 8, !tbaa !9
  %72 = getelementptr inbounds i64, ptr %70, i64 %71
  %73 = call i32 @rl_get(ptr noundef %58, ptr noundef %62, i64 noundef %66, ptr noundef %69, ptr noundef %72)
  store i32 %73, ptr %13, align 4, !tbaa !11
  %74 = load i32, ptr %13, align 4, !tbaa !11
  %75 = icmp ne i32 0, %74
  br i1 %75, label %76, label %80

76:                                               ; preds = %57
  %77 = load i32, ptr %13, align 4, !tbaa !11
  %78 = icmp ne i32 3, %77
  br i1 %78, label %79, label %80

79:                                               ; preds = %76
  br label %139

80:                                               ; preds = %76, %57
  br label %81

81:                                               ; preds = %80
  %82 = load i64, ptr %18, align 8, !tbaa !9
  %83 = add nsw i64 %82, 1
  store i64 %83, ptr %18, align 8, !tbaa !9
  br label %52, !llvm.loop !17

84:                                               ; preds = %52
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = load i64, ptr %9, align 8, !tbaa !9
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  %89 = load i32, ptr %10, align 4, !tbaa !11
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds ptr, ptr %88, i64 %90
  %92 = load ptr, ptr %16, align 8, !tbaa !5
  %93 = load i32, ptr %10, align 4, !tbaa !11
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i64, ptr %92, i64 %94
  %96 = call i32 @rl_get(ptr noundef %85, ptr noundef %86, i64 noundef %87, ptr noundef %91, ptr noundef %95)
  store i32 %96, ptr %13, align 4, !tbaa !11
  %97 = load i32, ptr %13, align 4, !tbaa !11
  %98 = icmp ne i32 0, %97
  br i1 %98, label %99, label %103

99:                                               ; preds = %84
  %100 = load i32, ptr %13, align 4, !tbaa !11
  %101 = icmp ne i32 3, %100
  br i1 %101, label %102, label %103

102:                                              ; preds = %99
  br label %139

103:                                              ; preds = %99, %84
  %104 = load i32, ptr %19, align 4, !tbaa !11
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  %106 = load ptr, ptr %16, align 8, !tbaa !5
  %107 = call i32 @rl_str_pfmerge(i32 noundef %104, ptr noundef %105, ptr noundef %106, ptr noundef %15, ptr noundef %17)
  store i32 %107, ptr %13, align 4, !tbaa !11
  %108 = load i32, ptr %13, align 4, !tbaa !11
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %116

110:                                              ; preds = %103
  %111 = load i32, ptr %13, align 4, !tbaa !11
  %112 = icmp eq i32 %111, -1
  br i1 %112, label %113, label %114

113:                                              ; preds = %110
  store i32 1, ptr %13, align 4, !tbaa !11
  br label %115

114:                                              ; preds = %110
  store i32 6, ptr %13, align 4, !tbaa !11
  br label %115

115:                                              ; preds = %114, %113
  br label %139

116:                                              ; preds = %103
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = load i64, ptr %9, align 8, !tbaa !9
  %120 = call i32 @rl_key_get(ptr noundef %117, ptr noundef %118, i64 noundef %119, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef %20, ptr noundef null)
  store i32 %120, ptr %13, align 4, !tbaa !11
  %121 = load i32, ptr %13, align 4, !tbaa !11
  %122 = icmp ne i32 2, %121
  br i1 %122, label %123, label %127

123:                                              ; preds = %116
  %124 = load i32, ptr %13, align 4, !tbaa !11
  %125 = icmp ne i32 3, %124
  br i1 %125, label %126, label %127

126:                                              ; preds = %123
  br label %139

127:                                              ; preds = %123, %116
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = load i64, ptr %9, align 8, !tbaa !9
  %131 = load ptr, ptr %15, align 8, !tbaa !5
  %132 = load i64, ptr %17, align 8, !tbaa !9
  %133 = load i64, ptr %20, align 8, !tbaa !13
  %134 = call i32 @rl_set(ptr noundef %128, ptr noundef %129, i64 noundef %130, ptr noundef %131, i64 noundef %132, i32 noundef 0, i64 noundef %133)
  store i32 %134, ptr %13, align 4, !tbaa !11
  %135 = load i32, ptr %13, align 4, !tbaa !11
  %136 = icmp ne i32 0, %135
  br i1 %136, label %137, label %138

137:                                              ; preds = %127
  br label %139

138:                                              ; preds = %127
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %139

139:                                              ; preds = %138, %137, %126, %115, %102, %79, %37, %29
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %140

140:                                              ; preds = %150, %139
  %141 = load i64, ptr %18, align 8, !tbaa !9
  %142 = load i32, ptr %19, align 4, !tbaa !11
  %143 = sext i32 %142 to i64
  %144 = icmp slt i64 %141, %143
  br i1 %144, label %145, label %153

145:                                              ; preds = %140
  %146 = load ptr, ptr %14, align 8, !tbaa !5
  %147 = load i64, ptr %18, align 8, !tbaa !9
  %148 = getelementptr inbounds ptr, ptr %146, i64 %147
  %149 = load ptr, ptr %148, align 8, !tbaa !5
  call void @free(ptr noundef %149) #5
  br label %150

150:                                              ; preds = %145
  %151 = load i64, ptr %18, align 8, !tbaa !9
  %152 = add nsw i64 %151, 1
  store i64 %152, ptr %18, align 8, !tbaa !9
  br label %140, !llvm.loop !18

153:                                              ; preds = %140
  %154 = load ptr, ptr %14, align 8, !tbaa !5
  call void @free(ptr noundef %154) #5
  %155 = load ptr, ptr %16, align 8, !tbaa !5
  call void @free(ptr noundef %155) #5
  %156 = load ptr, ptr %15, align 8, !tbaa !5
  call void @free(ptr noundef %156) #5
  %157 = load i32, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, 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 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  ret i32 %157
}

declare i32 @rl_str_pfmerge(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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 = { "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 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 #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, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


; 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(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef, i64 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

declare i32 @rl_key_get(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @rl_pfmerge(ptr noundef %0, ptr noundef %1, i64 noundef %2, i32 noundef %3, ptr nocapture noundef readonly %4, ptr nocapture noundef readonly %5) local_unnamed_addr #0 {
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %10 = add nsw i32 %3, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  store i64 0, ptr %9, align 8, !tbaa !9
  %11 = sext i32 %10 to i64
  %12 = shl nsw i64 %11, 3
  %13 = tail call noalias ptr @malloc(i64 noundef %12) #7
  %.not = icmp eq ptr %13, null
  br i1 %.not, label %.loopexit, label %14

14:                                               ; preds = %6
  %15 = tail call noalias ptr @malloc(i64 noundef %12) #7
  %.not69 = icmp eq ptr %15, null
  br i1 %.not69, label %.loopexit, label %.preheader71

.preheader71:                                     ; preds = %14
  %16 = icmp sgt i32 %3, -1
  br i1 %16, label %.preheader, label %.preheader.thread

.preheader.thread:                                ; preds = %.preheader71
  %.pre = sext i32 %3 to i64
  br label %._crit_edge

.preheader:                                       ; preds = %.preheader71
  %17 = zext nneg i32 %3 to i64
  %18 = shl nuw nsw i64 %17, 3
  %19 = add nuw nsw i64 %18, 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %15, i8 0, i64 %19, i1 false), !tbaa !5
  %.not86 = icmp eq i32 %3, 0
  br i1 %.not86, label %._crit_edge, label %.lr.ph76

.lr.ph76:                                         ; preds = %.preheader, %27
  %.175 = phi i64 [ %28, %27 ], [ 0, %.preheader ]
  %20 = getelementptr inbounds ptr, ptr %4, i64 %.175
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds i64, ptr %5, i64 %.175
  %23 = load i64, ptr %22, align 8, !tbaa !11
  %24 = getelementptr inbounds ptr, ptr %15, i64 %.175
  %25 = getelementptr inbounds i64, ptr %13, i64 %.175
  %26 = tail call i32 @rl_get(ptr noundef %0, ptr noundef %21, i64 noundef %23, ptr noundef nonnull %24, ptr noundef nonnull %25)
  switch i32 %26, label %.loopexit [
    i32 3, label %27
    i32 0, label %27
  ]

27:                                               ; preds = %.lr.ph76, %.lr.ph76
  %28 = add nuw nsw i64 %.175, 1
  %exitcond.not = icmp eq i64 %28, %17
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph76, !llvm.loop !13

._crit_edge:                                      ; preds = %27, %.preheader.thread, %.preheader
  %.pre-phi84 = phi i64 [ %.pre, %.preheader.thread ], [ 0, %.preheader ], [ %17, %27 ]
  %29 = getelementptr inbounds ptr, ptr %15, i64 %.pre-phi84
  %30 = getelementptr inbounds i64, ptr %13, i64 %.pre-phi84
  %31 = tail call i32 @rl_get(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef nonnull %29, ptr noundef nonnull %30)
  switch i32 %31, label %.loopexit [
    i32 3, label %32
    i32 0, label %32
  ]

32:                                               ; preds = %._crit_edge, %._crit_edge
  %33 = call i32 @rl_str_pfmerge(i32 noundef %10, ptr noundef nonnull %15, ptr noundef nonnull %13, ptr noundef nonnull %7, ptr noundef nonnull %8) #6
  switch i32 %33, label %34 [
    i32 0, label %35
    i32 -1, label %.loopexit
  ]

34:                                               ; preds = %32
  br label %.loopexit

35:                                               ; preds = %32
  %36 = call i32 @rl_key_get(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef nonnull %9, ptr noundef null) #6
  %37 = add i32 %36, -4
  %or.cond5 = icmp ult i32 %37, -2
  br i1 %or.cond5, label %.loopexit, label %38

38:                                               ; preds = %35
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = load i64, ptr %8, align 8, !tbaa !11
  %41 = load i64, ptr %9, align 8, !tbaa !9
  %42 = call i32 @rl_set(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %39, i64 noundef %40, i32 noundef 0, i64 noundef %41)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph76, %32, %._crit_edge, %14, %6, %38, %35, %34
  %.060 = phi ptr [ %15, %._crit_edge ], [ %15, %34 ], [ %15, %35 ], [ %15, %38 ], [ null, %6 ], [ null, %14 ], [ %15, %32 ], [ %15, %.lr.ph76 ]
  %.0 = phi i32 [ %31, %._crit_edge ], [ 6, %34 ], [ %36, %35 ], [ %42, %38 ], [ 4, %6 ], [ 4, %14 ], [ 1, %32 ], [ %26, %.lr.ph76 ]
  %43 = icmp sgt i32 %3, -1
  br i1 %43, label %.lr.ph79, label %._crit_edge80

.lr.ph79:                                         ; preds = %.loopexit, %.lr.ph79
  %.277 = phi i64 [ %46, %.lr.ph79 ], [ 0, %.loopexit ]
  %44 = getelementptr inbounds ptr, ptr %.060, i64 %.277
  %45 = load ptr, ptr %44, align 8, !tbaa !5
  call void @free(ptr noundef %45) #6
  %46 = add nuw nsw i64 %.277, 1
  %exitcond82.not = icmp eq i64 %46, %11
  br i1 %exitcond82.not, label %._crit_edge80, label %.lr.ph79, !llvm.loop !15

._crit_edge80:                                    ; preds = %.lr.ph79, %.loopexit
  call void @free(ptr noundef %.060) #6
  call void @free(ptr noundef %13) #6
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %47) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  ret i32 %.0
}

declare i32 @rl_str_pfmerge(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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 = { "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 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { 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 long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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