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

@stderr = external global ptr, align 8
@.str.26 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [19 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 allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @rl_is_balanced(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.rlite, ptr %9, i32 0, i32 10
  %11 = load i32, ptr %10, align 8, !tbaa !9
  %12 = sext i32 %11 to i64
  store i64 %12, ptr %5, align 8, !tbaa !13
  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
  store i64 0, ptr %7, align 8, !tbaa !13
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.rlite, ptr %13, i32 0, i32 4
  %15 = load i64, ptr %14, align 8, !tbaa !14
  %16 = mul i64 2, %15
  %17 = call noalias ptr @malloc(i64 noundef %16) #6
  store ptr %17, ptr %6, align 8, !tbaa !5
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %21, label %20

20:                                               ; preds = %1
  store i32 4, ptr %3, align 4, !tbaa !15
  br label %141

21:                                               ; preds = %1
  store i64 1, ptr %4, align 8, !tbaa !13
  br label %22

22:                                               ; preds = %32, %21
  %23 = load i64, ptr %4, align 8, !tbaa !13
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.rlite, ptr %24, i32 0, i32 4
  %26 = load i64, ptr %25, align 8, !tbaa !14
  %27 = icmp slt i64 %23, %26
  br i1 %27, label %28, label %35

28:                                               ; preds = %22
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = load i64, ptr %4, align 8, !tbaa !13
  %31 = getelementptr inbounds i16, ptr %29, i64 %30
  store i16 0, ptr %31, align 2, !tbaa !16
  br label %32

32:                                               ; preds = %28
  %33 = load i64, ptr %4, align 8, !tbaa !13
  %34 = add nsw i64 %33, 1
  store i64 %34, ptr %4, align 8, !tbaa !13
  br label %22, !llvm.loop !18

35:                                               ; preds = %22
  store i64 0, ptr %4, align 8, !tbaa !13
  br label %36

36:                                               ; preds = %77, %35
  %37 = load i64, ptr %4, align 8, !tbaa !13
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.rlite, ptr %38, i32 0, i32 11
  %40 = load i32, ptr %39, align 4, !tbaa !20
  %41 = add nsw i32 %40, 6
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %37, %42
  br i1 %43, label %44, label %80

44:                                               ; preds = %36
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.rlite, ptr %45, i32 0, i32 12
  %47 = load ptr, ptr %46, align 8, !tbaa !21
  %48 = load i64, ptr %4, align 8, !tbaa !13
  %49 = getelementptr inbounds i64, ptr %47, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !13
  %51 = icmp eq i64 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %44
  br label %77

53:                                               ; preds = %44
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.rlite, ptr %55, i32 0, i32 12
  %57 = load ptr, ptr %56, align 8, !tbaa !21
  %58 = load i64, ptr %4, align 8, !tbaa !13
  %59 = getelementptr inbounds i64, ptr %57, i64 %58
  %60 = load i64, ptr %59, align 8, !tbaa !13
  %61 = getelementptr inbounds i16, ptr %54, i64 %60
  store i16 1, ptr %61, align 2, !tbaa !16
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = load i64, ptr %4, align 8, !tbaa !13
  %64 = trunc i64 %63 to i32
  %65 = call i32 @rl_select(ptr noundef %62, i32 noundef %64)
  store i32 %65, ptr %3, align 4, !tbaa !15
  %66 = load i32, ptr %3, align 4, !tbaa !15
  %67 = icmp ne i32 0, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %53
  br label %141

69:                                               ; preds = %53
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = call i32 @rl_database_is_balanced(ptr noundef %70, ptr noundef %71)
  store i32 %72, ptr %3, align 4, !tbaa !15
  %73 = load i32, ptr %3, align 4, !tbaa !15
  %74 = icmp ne i32 0, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %69
  br label %141

76:                                               ; preds = %69
  br label %77

77:                                               ; preds = %76, %52
  %78 = load i64, ptr %4, align 8, !tbaa !13
  %79 = add nsw i64 %78, 1
  store i64 %79, ptr %4, align 8, !tbaa !13
  br label %36, !llvm.loop !22

80:                                               ; preds = %36
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  %82 = load i64, ptr %5, align 8, !tbaa !13
  %83 = trunc i64 %82 to i32
  %84 = call i32 @rl_select(ptr noundef %81, i32 noundef %83)
  store i32 %84, ptr %3, align 4, !tbaa !15
  %85 = load i32, ptr %3, align 4, !tbaa !15
  %86 = icmp ne i32 0, %85
  br i1 %86, label %87, label %88

87:                                               ; preds = %80
  br label %141

88:                                               ; preds = %80
  %89 = load ptr, ptr %2, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.rlite, ptr %89, i32 0, i32 5
  %91 = load i64, ptr %90, align 8, !tbaa !23
  store i64 %91, ptr %8, align 8, !tbaa !13
  br label %92

92:                                               ; preds = %108, %88
  %93 = load i64, ptr %8, align 8, !tbaa !13
  %94 = load ptr, ptr %2, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.rlite, ptr %94, i32 0, i32 4
  %96 = load i64, ptr %95, align 8, !tbaa !14
  %97 = icmp ne i64 %93, %96
  br i1 %97, label %98, label %109

98:                                               ; preds = %92
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = load i64, ptr %8, align 8, !tbaa !13
  %101 = getelementptr inbounds i16, ptr %99, i64 %100
  store i16 1, ptr %101, align 2, !tbaa !16
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  %103 = load i64, ptr %8, align 8, !tbaa !13
  %104 = call i32 @rl_long_get(ptr noundef %102, ptr noundef %8, i64 noundef %103)
  store i32 %104, ptr %3, align 4, !tbaa !15
  %105 = load i32, ptr %3, align 4, !tbaa !15
  %106 = icmp ne i32 0, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %98
  br label %141

108:                                              ; preds = %98
  br label %92, !llvm.loop !24

109:                                              ; preds = %92
  store i64 1, ptr %4, align 8, !tbaa !13
  br label %110

110:                                              ; preds = %130, %109
  %111 = load i64, ptr %4, align 8, !tbaa !13
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.rlite, ptr %112, i32 0, i32 4
  %114 = load i64, ptr %113, align 8, !tbaa !14
  %115 = icmp slt i64 %111, %114
  br i1 %115, label %116, label %133

116:                                              ; preds = %110
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = load i64, ptr %4, align 8, !tbaa !13
  %119 = getelementptr inbounds i16, ptr %117, i64 %118
  %120 = load i16, ptr %119, align 2, !tbaa !16
  %121 = sext i16 %120 to i32
  %122 = icmp eq i32 %121, 0
  br i1 %122, label %123, label %129

123:                                              ; preds = %116
  %124 = load ptr, ptr @stderr, align 8, !tbaa !5
  %125 = load i64, ptr %4, align 8, !tbaa !13
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.26, i64 noundef %125) #5
  %127 = load i64, ptr %7, align 8, !tbaa !13
  %128 = add nsw i64 %127, 1
  store i64 %128, ptr %7, align 8, !tbaa !13
  br label %129

129:                                              ; preds = %123, %116
  br label %130

130:                                              ; preds = %129
  %131 = load i64, ptr %4, align 8, !tbaa !13
  %132 = add nsw i64 %131, 1
  store i64 %132, ptr %4, align 8, !tbaa !13
  br label %110, !llvm.loop !25

133:                                              ; preds = %110
  %134 = load i64, ptr %7, align 8, !tbaa !13
  %135 = icmp ne i64 %134, 0
  br i1 %135, label %136, label %140

136:                                              ; preds = %133
  %137 = load ptr, ptr @stderr, align 8, !tbaa !5
  %138 = load i64, ptr %7, align 8, !tbaa !13
  %139 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef @.str.27, i64 noundef %138) #5
  store i32 6, ptr %3, align 4, !tbaa !15
  br label %140

140:                                              ; preds = %136, %133
  br label %141

141:                                              ; preds = %140, %107, %87, %75, %68, %20
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %142) #5
  %143 = load i32, ptr %3, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret i32 %143
}

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

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 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 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, !12, i64 72}
!10 = !{!"rlite", !11, i64 0, !11, i64 8, !12, i64 16, !6, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !6, i64 56, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !6, i64 80, !11, i64 88, !11, i64 96, !6, i64 104, !11, i64 112, !11, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !11, i64 32}
!15 = !{!12, !12, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!10, !12, i64 76}
!21 = !{!10, !6, i64 80}
!22 = distinct !{!22, !19}
!23 = !{!10, !11, i64 40}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !19}


; 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.26 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [19 x i8], align 1

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture 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 @rl_long_get(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
define dso_local i32 @rl_is_balanced(ptr noundef %0) local_unnamed_addr #4 {
  %2 = alloca i64, align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 72
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  %6 = load i64, ptr %5, align 8, !tbaa !12
  %7 = shl i64 %6, 1
  %8 = tail call noalias ptr @malloc(i64 noundef %7) #6
  %.not = icmp eq ptr %8, null
  br i1 %.not, label %.loopexit, label %.preheader61

.preheader61:                                     ; preds = %1
  %9 = icmp sgt i64 %6, 1
  br i1 %9, label %.lr.ph.preheader, label %.preheader59

.lr.ph.preheader:                                 ; preds = %.preheader61
  %scevgep = getelementptr i8, ptr %8, i64 2
  %10 = add i64 %7, -2
  tail call void @llvm.memset.p0.i64(ptr align 2 %scevgep, i8 0, i64 %10, i1 false), !tbaa !13
  br label %.preheader59

.preheader59:                                     ; preds = %.lr.ph.preheader, %.preheader61
  %11 = getelementptr inbounds i8, ptr %0, i64 76
  %12 = load i32, ptr %11, align 4, !tbaa !15
  %13 = icmp sgt i32 %12, -6
  br i1 %13, label %.lr.ph64, label %._crit_edge

.lr.ph64:                                         ; preds = %.preheader59
  %14 = getelementptr inbounds i8, ptr %0, i64 80
  br label %15

15:                                               ; preds = %.lr.ph64, %27
  %16 = phi i32 [ %12, %.lr.ph64 ], [ %28, %27 ]
  %.14363 = phi i64 [ 0, %.lr.ph64 ], [ %29, %27 ]
  %17 = load ptr, ptr %14, align 8, !tbaa !16
  %18 = getelementptr inbounds i64, ptr %17, i64 %.14363
  %19 = load i64, ptr %18, align 8, !tbaa !17
  %20 = icmp eq i64 %19, 0
  br i1 %20, label %27, label %21

21:                                               ; preds = %15
  %22 = getelementptr inbounds i16, ptr %8, i64 %19
  store i16 1, ptr %22, align 2, !tbaa !13
  %23 = trunc i64 %.14363 to i32
  %24 = tail call i32 @rl_select(ptr noundef nonnull %0, i32 noundef %23)
  %.not57 = icmp eq i32 %24, 0
  br i1 %.not57, label %25, label %.loopexit

25:                                               ; preds = %21
  %26 = tail call i32 @rl_database_is_balanced(ptr noundef nonnull %0, ptr noundef nonnull %8)
  %.not58 = icmp eq i32 %26, 0
  br i1 %.not58, label %._crit_edge70, label %.loopexit

._crit_edge70:                                    ; preds = %25
  %.pre = load i32, ptr %11, align 4, !tbaa !15
  br label %27

27:                                               ; preds = %._crit_edge70, %15
  %28 = phi i32 [ %.pre, %._crit_edge70 ], [ %16, %15 ]
  %29 = add nuw nsw i64 %.14363, 1
  %30 = add nsw i32 %28, 6
  %31 = sext i32 %30 to i64
  %32 = icmp slt i64 %29, %31
  br i1 %32, label %15, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %27, %.preheader59
  %33 = tail call i32 @rl_select(ptr noundef nonnull %0, i32 noundef %4)
  %.not53 = icmp eq i32 %33, 0
  br i1 %.not53, label %34, label %.loopexit

34:                                               ; preds = %._crit_edge
  %35 = getelementptr inbounds i8, ptr %0, i64 40
  %36 = load i64, ptr %35, align 8, !tbaa !20
  store i64 %36, ptr %2, align 8, !tbaa !17
  %37 = load i64, ptr %5, align 8, !tbaa !12
  %.not5480 = icmp eq i64 %36, %37
  br i1 %.not5480, label %.preheader, label %.lr.ph

thread-pre-split:                                 ; preds = %.lr.ph
  %.pr = load i64, ptr %2, align 8, !tbaa !17
  %38 = load i64, ptr %5, align 8, !tbaa !12
  %.not54 = icmp eq i64 %.pr, %38
  br i1 %.not54, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %thread-pre-split, %34
  %.lcssa = phi i64 [ %36, %34 ], [ %.pr, %thread-pre-split ]
  %39 = icmp sgt i64 %.lcssa, 1
  br i1 %39, label %.lr.ph67, label %.loopexit

.lr.ph:                                           ; preds = %34, %thread-pre-split
  %40 = phi i64 [ %.pr, %thread-pre-split ], [ %36, %34 ]
  %41 = getelementptr inbounds i16, ptr %8, i64 %40
  store i16 1, ptr %41, align 2, !tbaa !13
  %42 = call i32 @rl_long_get(ptr noundef nonnull %0, ptr noundef nonnull %2, i64 noundef %40) #7
  %.not56 = icmp eq i32 %42, 0
  br i1 %.not56, label %thread-pre-split, label %.loopexit, !llvm.loop !21

.lr.ph67:                                         ; preds = %.preheader, %51
  %43 = phi i64 [ %52, %51 ], [ %.lcssa, %.preheader ]
  %.066 = phi i64 [ %.1, %51 ], [ 0, %.preheader ]
  %.265 = phi i64 [ %53, %51 ], [ 1, %.preheader ]
  %44 = getelementptr inbounds i16, ptr %8, i64 %.265
  %45 = load i16, ptr %44, align 2, !tbaa !13
  %46 = icmp eq i16 %45, 0
  br i1 %46, label %47, label %51

47:                                               ; preds = %.lr.ph67
  %48 = load ptr, ptr @stderr, align 8, !tbaa !22
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.26, i64 noundef %.265) #8
  %50 = add nsw i64 %.066, 1
  %.pre71 = load i64, ptr %5, align 8, !tbaa !12
  br label %51

51:                                               ; preds = %.lr.ph67, %47
  %52 = phi i64 [ %.pre71, %47 ], [ %43, %.lr.ph67 ]
  %.1 = phi i64 [ %50, %47 ], [ %.066, %.lr.ph67 ]
  %53 = add nuw nsw i64 %.265, 1
  %54 = icmp slt i64 %53, %52
  br i1 %54, label %.lr.ph67, label %._crit_edge68, !llvm.loop !23

._crit_edge68:                                    ; preds = %51
  %.not55 = icmp eq i64 %.1, 0
  br i1 %.not55, label %.loopexit, label %55

55:                                               ; preds = %._crit_edge68
  %56 = load ptr, ptr @stderr, align 8, !tbaa !22
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.27, i64 noundef %.1) #8
  br label %.loopexit

.loopexit:                                        ; preds = %25, %21, %.lr.ph, %.preheader, %1, %._crit_edge68, %55, %._crit_edge
  %.141 = phi i32 [ %33, %._crit_edge ], [ 6, %55 ], [ 0, %._crit_edge68 ], [ 4, %1 ], [ 0, %.preheader ], [ %42, %.lr.ph ], [ %26, %25 ], [ %24, %21 ]
  call void @free(ptr noundef %8) #7
  ret i32 %.141
}

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

; 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 = { 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 #1 = { 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 #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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { nounwind }
attributes #8 = { 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, !10, i64 72}
!6 = !{!"rlite", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !11, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !11, i64 80, !7, i64 88, !7, i64 96, !11, i64 104, !7, i64 112, !7, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !7, i64 32}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !8, i64 0}
!15 = !{!6, !10, i64 76}
!16 = !{!6, !11, i64 80}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!6, !7, i64 40}
!21 = distinct !{!21, !19}
!22 = !{!11, !11, i64 0}
!23 = distinct !{!23, !19}


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