; LLVM IR from ryanlayer/giggle :: lib/htslib (bcf_sr_sort)

; 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.sr_sort_t = type { [256 x i8], i32, i32, ptr, i32, i32, i32, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.__kstring_t, i32, i32, ptr, i32, ptr, ptr, i32, i32, i32, i32 }
%struct.__kstring_t = type { i64, i64, ptr }
%struct.varset_t = type { i32, i32, ptr, i32, ptr }

@__func__.merge_vsets = external hidden unnamed_addr constant [12 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 uwtable
declare dso_local void @remove_vset(ptr noundef, i32 noundef) #1

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

16:                                               ; preds = %3
  %17 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %17, ptr %7, align 4, !tbaa !9
  %18 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %18, ptr %5, align 4, !tbaa !9
  %19 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %19, ptr %6, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %16, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.sr_sort_t, ptr %21, i32 0, i32 13
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds %struct.varset_t, ptr %23, i64 %25
  store ptr %26, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.sr_sort_t, ptr %27, i32 0, i32 13
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds %struct.varset_t, ptr %29, i64 %31
  store ptr %32, ptr %10, align 8, !tbaa !5
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.varset_t, ptr %33, i32 0, i32 4
  %35 = load ptr, ptr %34, align 8, !tbaa !15
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.varset_t, ptr %36, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  call void @kbs_bitwise_or(ptr noundef %35, ptr noundef %38)
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.varset_t, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !17
  store i32 %41, ptr %7, align 4, !tbaa !9
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.varset_t, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 8, !tbaa !17
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.varset_t, ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !17
  %48 = add nsw i32 %47, %44
  store i32 %48, ptr %46, align 8, !tbaa !17
  br label %49

49:                                               ; preds = %20
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.varset_t, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !17
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.varset_t, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 4, !tbaa !18
  %56 = icmp sgt i32 %52, %55
  br i1 %56, label %57, label %80

57:                                               ; preds = %49
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.varset_t, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !17
  %61 = icmp sge i32 %60, 1
  br i1 %61, label %62, label %66

62:                                               ; preds = %57
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.varset_t, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !17
  br label %67

66:                                               ; preds = %57
  br label %67

67:                                               ; preds = %66, %62
  %68 = phi i32 [ %65, %62 ], [ 1, %66 ]
  %69 = sext i32 %68 to i64
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.varset_t, ptr %70, i32 0, i32 1
  %72 = load i32, ptr %71, align 4, !tbaa !18
  %73 = sext i32 %72 to i64
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.varset_t, ptr %74, i32 0, i32 2
  %76 = call i64 @hts_realloc_or_die(i64 noundef %69, i64 noundef %73, i64 noundef 4, i64 noundef 4, i32 noundef 0, ptr noundef %75, ptr noundef @__func__.merge_vsets)
  %77 = trunc i64 %76 to i32
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.varset_t, ptr %78, i32 0, i32 1
  store i32 %77, ptr %79, align 4, !tbaa !18
  br label %80

80:                                               ; preds = %67, %49
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %103, %82
  %84 = load i32, ptr %8, align 4, !tbaa !9
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.varset_t, ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 8, !tbaa !17
  %88 = icmp slt i32 %84, %87
  br i1 %88, label %89, label %108

89:                                               ; preds = %83
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.varset_t, ptr %90, i32 0, i32 2
  %92 = load ptr, ptr %91, align 8, !tbaa !19
  %93 = load i32, ptr %8, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %92, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !9
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.varset_t, ptr %97, i32 0, i32 2
  %99 = load ptr, ptr %98, align 8, !tbaa !19
  %100 = load i32, ptr %7, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %99, i64 %101
  store i32 %96, ptr %102, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %89
  %104 = load i32, ptr %8, align 4, !tbaa !9
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %8, align 4, !tbaa !9
  %106 = load i32, ptr %7, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %7, align 4, !tbaa !9
  br label %83, !llvm.loop !20

108:                                              ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.sr_sort_t, ptr %109, i32 0, i32 7
  %111 = load ptr, ptr %110, align 8, !tbaa !22
  %112 = load i32, ptr %5, align 4, !tbaa !9
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.sr_sort_t, ptr %113, i32 0, i32 8
  %115 = load i32, ptr %114, align 8, !tbaa !23
  %116 = mul nsw i32 %112, %115
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %111, i64 %117
  store ptr %118, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.sr_sort_t, ptr %119, i32 0, i32 7
  %121 = load ptr, ptr %120, align 8, !tbaa !22
  %122 = load i32, ptr %6, align 4, !tbaa !9
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.sr_sort_t, ptr %123, i32 0, i32 8
  %125 = load i32, ptr %124, align 8, !tbaa !23
  %126 = mul nsw i32 %122, %125
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds i32, ptr %121, i64 %127
  store ptr %128, ptr %12, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %147, %108
  %130 = load i32, ptr %7, align 4, !tbaa !9
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.sr_sort_t, ptr %131, i32 0, i32 8
  %133 = load i32, ptr %132, align 8, !tbaa !23
  %134 = icmp slt i32 %130, %133
  br i1 %134, label %135, label %150

135:                                              ; preds = %129
  %136 = load ptr, ptr %12, align 8, !tbaa !5
  %137 = load i32, ptr %7, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i32, ptr %136, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !9
  %141 = load ptr, ptr %11, align 8, !tbaa !5
  %142 = load i32, ptr %7, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds i32, ptr %141, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !9
  %146 = add nsw i32 %145, %140
  store i32 %146, ptr %144, align 4, !tbaa !9
  br label %147

147:                                              ; preds = %135
  %148 = load i32, ptr %7, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %7, align 4, !tbaa !9
  br label %129, !llvm.loop !24

150:                                              ; preds = %129
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.sr_sort_t, ptr %151, i32 0, i32 11
  %153 = load ptr, ptr %152, align 8, !tbaa !25
  %154 = load i32, ptr %6, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds i32, ptr %153, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !9
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.sr_sort_t, ptr %158, i32 0, i32 11
  %160 = load ptr, ptr %159, align 8, !tbaa !25
  %161 = load i32, ptr %5, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i32, ptr %160, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !9
  %165 = add nsw i32 %164, %157
  store i32 %165, ptr %163, align 4, !tbaa !9
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = load i32, ptr %6, align 4, !tbaa !9
  call void @remove_vset(ptr noundef %166, i32 noundef %167)
  %168 = load i32, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret i32 %168
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @kbs_bitwise_or(ptr noundef, ptr noundef) #2

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

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 = { inlinehint 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, !6, i64 328}
!12 = !{!"", !7, i64 0, !10, i64 256, !10, i64 260, !6, i64 264, !10, i64 272, !10, i64 276, !10, i64 280, !6, i64 288, !10, i64 296, !10, i64 300, !10, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !13, i64 368, !10, i64 392, !10, i64 396, !6, i64 400, !10, i64 408, !6, i64 416, !6, i64 424, !10, i64 432, !10, i64 436, !10, i64 440, !10, i64 444}
!13 = !{!"__kstring_t", !14, i64 0, !14, i64 8, !6, i64 16}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !6, i64 24}
!16 = !{!"", !10, i64 0, !10, i64 4, !6, i64 8, !10, i64 16, !6, i64 24}
!17 = !{!16, !10, i64 0}
!18 = !{!16, !10, i64 4}
!19 = !{!16, !6, i64 8}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!12, !6, i64 288}
!23 = !{!12, !10, i64 296}
!24 = distinct !{!24, !21}
!25 = !{!12, !6, i64 312}


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

%struct.varset_t = type { i32, i32, ptr, i32, ptr }

@__func__.merge_vsets = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @remove_vset(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @merge_vsets(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %spec.select = tail call i32 @llvm.smax.i32(i32 %1, i32 %2)
  %spec.select56 = tail call i32 @llvm.smin.i32(i32 %1, i32 %2)
  %4 = getelementptr inbounds i8, ptr %0, i64 328
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = sext i32 %spec.select56 to i64
  %7 = getelementptr inbounds %struct.varset_t, ptr %5, i64 %6
  %8 = sext i32 %spec.select to i64
  %9 = getelementptr inbounds %struct.varset_t, ptr %5, i64 %8
  %10 = getelementptr inbounds i8, ptr %7, i64 24
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %9, i64 24
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  tail call void @kbs_bitwise_or(ptr noundef %11, ptr noundef %13)
  %14 = load i32, ptr %7, align 8, !tbaa !15
  %15 = load i32, ptr %9, align 8, !tbaa !15
  %16 = add nsw i32 %15, %14
  store i32 %16, ptr %7, align 8, !tbaa !15
  %17 = getelementptr inbounds i8, ptr %7, i64 4
  %18 = load i32, ptr %17, align 4, !tbaa !16
  %19 = icmp sgt i32 %16, %18
  br i1 %19, label %20, label %25

20:                                               ; preds = %3
  %narrow = tail call i32 @llvm.smax.i32(i32 %16, i32 1)
  %spec.select57 = zext nneg i32 %narrow to i64
  %21 = sext i32 %18 to i64
  %22 = getelementptr inbounds i8, ptr %7, i64 8
  %23 = tail call i64 @hts_realloc_or_die(i64 noundef %spec.select57, i64 noundef %21, i64 noundef 4, i64 noundef 4, i32 noundef 0, ptr noundef nonnull %22, ptr noundef nonnull @__func__.merge_vsets) #4
  %24 = trunc i64 %23 to i32
  store i32 %24, ptr %17, align 4, !tbaa !16
  br label %25

25:                                               ; preds = %20, %3
  %26 = load i32, ptr %9, align 8, !tbaa !15
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %25
  %28 = getelementptr inbounds i8, ptr %9, i64 8
  %29 = load ptr, ptr %28, align 8, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %7, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %32 = sext i32 %14 to i64
  br label %33

33:                                               ; preds = %.lr.ph, %33
  %indvars.iv64 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next65, %33 ]
  %indvars.iv = phi i64 [ %32, %.lr.ph ], [ %indvars.iv.next, %33 ]
  %34 = getelementptr inbounds i32, ptr %29, i64 %indvars.iv64
  %35 = load i32, ptr %34, align 4, !tbaa !18
  %36 = getelementptr inbounds i32, ptr %31, i64 %indvars.iv
  store i32 %35, ptr %36, align 4, !tbaa !18
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %37 = load i32, ptr %9, align 8, !tbaa !15
  %38 = sext i32 %37 to i64
  %39 = icmp slt i64 %indvars.iv.next65, %38
  br i1 %39, label %33, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %33, %25
  %40 = getelementptr inbounds i8, ptr %0, i64 288
  %41 = load ptr, ptr %40, align 8, !tbaa !21
  %42 = getelementptr inbounds i8, ptr %0, i64 296
  %43 = load i32, ptr %42, align 8, !tbaa !22
  %44 = mul nsw i32 %43, %spec.select56
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr %41, i64 %45
  %47 = mul nsw i32 %43, %spec.select
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i32, ptr %41, i64 %48
  %50 = icmp sgt i32 %43, 0
  br i1 %50, label %.lr.ph62, label %._crit_edge63

.lr.ph62:                                         ; preds = %._crit_edge, %.lr.ph62
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %.lr.ph62 ], [ 0, %._crit_edge ]
  %51 = getelementptr inbounds i32, ptr %49, i64 %indvars.iv69
  %52 = load i32, ptr %51, align 4, !tbaa !18
  %53 = getelementptr inbounds i32, ptr %46, i64 %indvars.iv69
  %54 = load i32, ptr %53, align 4, !tbaa !18
  %55 = add nsw i32 %54, %52
  store i32 %55, ptr %53, align 4, !tbaa !18
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %56 = load i32, ptr %42, align 8, !tbaa !22
  %57 = sext i32 %56 to i64
  %58 = icmp slt i64 %indvars.iv.next70, %57
  br i1 %58, label %.lr.ph62, label %._crit_edge63, !llvm.loop !23

._crit_edge63:                                    ; preds = %.lr.ph62, %._crit_edge
  %59 = getelementptr inbounds i8, ptr %0, i64 312
  %60 = load ptr, ptr %59, align 8, !tbaa !24
  %61 = getelementptr inbounds i32, ptr %60, i64 %8
  %62 = load i32, ptr %61, align 4, !tbaa !18
  %63 = getelementptr inbounds i32, ptr %60, i64 %6
  %64 = load i32, ptr %63, align 4, !tbaa !18
  %65 = add nsw i32 %64, %62
  store i32 %65, ptr %63, align 4, !tbaa !18
  tail call void @remove_vset(ptr noundef nonnull %0, i32 noundef %spec.select)
  ret i32 %spec.select56
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @kbs_bitwise_or(ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #3

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 = { inlinehint 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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !10, i64 328}
!6 = !{!"", !7, i64 0, !9, i64 256, !9, i64 260, !10, i64 264, !9, i64 272, !9, i64 276, !9, i64 280, !10, i64 288, !9, i64 296, !9, i64 300, !9, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !11, i64 368, !9, i64 392, !9, i64 396, !10, i64 400, !9, i64 408, !10, i64 416, !10, i64 424, !9, i64 432, !9, i64 436, !9, i64 440, !9, i64 444}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!"__kstring_t", !12, i64 0, !12, i64 8, !10, i64 16}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 24}
!14 = !{!"", !9, i64 0, !9, i64 4, !10, i64 8, !9, i64 16, !10, i64 24}
!15 = !{!14, !9, i64 0}
!16 = !{!14, !9, i64 4}
!17 = !{!14, !10, i64 8}
!18 = !{!9, !9, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !10, i64 288}
!22 = !{!6, !9, i64 296}
!23 = distinct !{!23, !20}
!24 = !{!6, !10, i64 312}


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