; 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 }
%struct.bcf_srs_t = type { i32, ptr, i32, i32, ptr, i32, ptr, i32, i32, i32, ptr, ptr, ptr, i32, i32, %struct.__kstring_t, i32, i32, ptr, ptr }
%struct.vcf_buf_t = type { i32, i32, ptr }
%struct.var_t = type { ptr, i32, i32, i32, i32, ptr, ptr, ptr }

@__func__.push_vset = external hidden unnamed_addr constant [10 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

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

; Function Attrs: nounwind uwtable
define dso_local void @push_vset(ptr noundef %0, i32 noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.sr_sort_t, ptr %12, i32 0, i32 13
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = load i32, ptr %4, align 4, !tbaa !9
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds %struct.varset_t, ptr %14, i64 %16
  store ptr %17, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %80, %2
  %19 = load i32, ptr %6, align 4, !tbaa !9
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.sr_sort_t, ptr %20, i32 0, i32 15
  %22 = load ptr, ptr %21, align 8, !tbaa !15
  %23 = getelementptr inbounds %struct.bcf_srs_t, ptr %22, i32 0, i32 7
  %24 = load i32, ptr %23, align 8, !tbaa !16
  %25 = icmp slt i32 %19, %24
  br i1 %25, label %26, label %83

26:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.sr_sort_t, ptr %27, i32 0, i32 14
  %29 = load ptr, ptr %28, align 8, !tbaa !18
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds %struct.vcf_buf_t, ptr %29, i64 %31
  store ptr %32, ptr %8, align 8, !tbaa !5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.vcf_buf_t, ptr %33, i32 0, i32 0
  %35 = load i32, ptr %34, align 8, !tbaa !19
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %34, align 8, !tbaa !19
  br label %37

37:                                               ; preds = %26
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.vcf_buf_t, ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !19
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.vcf_buf_t, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !21
  %44 = icmp sgt i32 %40, %43
  br i1 %44, label %45, label %68

45:                                               ; preds = %37
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.vcf_buf_t, ptr %46, i32 0, i32 0
  %48 = load i32, ptr %47, align 8, !tbaa !19
  %49 = icmp sge i32 %48, 1
  br i1 %49, label %50, label %54

50:                                               ; preds = %45
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.vcf_buf_t, ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 8, !tbaa !19
  br label %55

54:                                               ; preds = %45
  br label %55

55:                                               ; preds = %54, %50
  %56 = phi i32 [ %53, %50 ], [ 1, %54 ]
  %57 = sext i32 %56 to i64
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.vcf_buf_t, ptr %58, i32 0, i32 1
  %60 = load i32, ptr %59, align 4, !tbaa !21
  %61 = sext i32 %60 to i64
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.vcf_buf_t, ptr %62, i32 0, i32 2
  %64 = call i64 @hts_realloc_or_die(i64 noundef %57, i64 noundef %61, i64 noundef 4, i64 noundef 8, i32 noundef 0, ptr noundef %63, ptr noundef @__func__.push_vset)
  %65 = trunc i64 %64 to i32
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.vcf_buf_t, ptr %66, i32 0, i32 1
  store i32 %65, ptr %67, align 4, !tbaa !21
  br label %68

68:                                               ; preds = %55, %37
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.vcf_buf_t, ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !22
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.vcf_buf_t, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 8, !tbaa !19
  %77 = sub nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds ptr, ptr %73, i64 %78
  store ptr null, ptr %79, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %80

80:                                               ; preds = %70
  %81 = load i32, ptr %6, align 4, !tbaa !9
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %6, align 4, !tbaa !9
  br label %18, !llvm.loop !23

83:                                               ; preds = %18
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %143, %83
  %85 = load i32, ptr %6, align 4, !tbaa !9
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.varset_t, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !25
  %89 = icmp slt i32 %85, %88
  br i1 %89, label %90, label %146

90:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.sr_sort_t, ptr %91, i32 0, i32 3
  %93 = load ptr, ptr %92, align 8, !tbaa !27
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.varset_t, ptr %94, i32 0, i32 2
  %96 = load ptr, ptr %95, align 8, !tbaa !28
  %97 = load i32, ptr %6, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %96, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds %struct.var_t, ptr %93, i64 %101
  store ptr %102, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %139, %90
  %104 = load i32, ptr %7, align 4, !tbaa !9
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.var_t, ptr %105, i32 0, i32 3
  %107 = load i32, ptr %106, align 8, !tbaa !29
  %108 = icmp slt i32 %104, %107
  br i1 %108, label %109, label %142

109:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.var_t, ptr %110, i32 0, i32 5
  %112 = load ptr, ptr %111, align 8, !tbaa !31
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i32, ptr %112, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !9
  store i32 %116, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.sr_sort_t, ptr %117, i32 0, i32 14
  %119 = load ptr, ptr %118, align 8, !tbaa !18
  %120 = load i32, ptr %10, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds %struct.vcf_buf_t, ptr %119, i64 %121
  store ptr %122, ptr %11, align 8, !tbaa !5
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.var_t, ptr %123, i32 0, i32 6
  %125 = load ptr, ptr %124, align 8, !tbaa !32
  %126 = load i32, ptr %7, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds ptr, ptr %125, i64 %127
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = load ptr, ptr %11, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.vcf_buf_t, ptr %130, i32 0, i32 2
  %132 = load ptr, ptr %131, align 8, !tbaa !22
  %133 = load ptr, ptr %11, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.vcf_buf_t, ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 8, !tbaa !19
  %136 = sub nsw i32 %135, 1
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds ptr, ptr %132, i64 %137
  store ptr %129, ptr %138, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %139

139:                                              ; preds = %109
  %140 = load i32, ptr %7, align 4, !tbaa !9
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %7, align 4, !tbaa !9
  br label %103, !llvm.loop !33

142:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %6, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %6, align 4, !tbaa !9
  br label %84, !llvm.loop !34

146:                                              ; preds = %84
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = load i32, ptr %4, align 4, !tbaa !9
  call void @remove_vset(ptr noundef %147, i32 noundef %148)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret void
}

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 = { "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 }

!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 = !{!12, !6, i64 344}
!16 = !{!17, !10, i64 48}
!17 = !{!"", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !13, i64 96, !10, i64 120, !10, i64 124, !6, i64 128, !6, i64 136}
!18 = !{!12, !6, i64 336}
!19 = !{!20, !10, i64 0}
!20 = !{!"", !10, i64 0, !10, i64 4, !6, i64 8}
!21 = !{!20, !10, i64 4}
!22 = !{!20, !6, i64 8}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!26, !10, i64 0}
!26 = !{!"", !10, i64 0, !10, i64 4, !6, i64 8, !10, i64 16, !6, i64 24}
!27 = !{!12, !6, i64 264}
!28 = !{!26, !6, i64 8}
!29 = !{!30, !10, i64 16}
!30 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40}
!31 = !{!30, !6, i64 24}
!32 = !{!30, !6, i64 32}
!33 = distinct !{!33, !24}
!34 = distinct !{!34, !24}


; 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 }
%struct.vcf_buf_t = type { i32, i32, ptr }
%struct.var_t = type { ptr, i32, i32, i32, i32, ptr, ptr, ptr }

@__func__.push_vset = external hidden unnamed_addr constant [10 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @push_vset(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 328
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = sext i32 %1 to i64
  %6 = getelementptr inbounds %struct.varset_t, ptr %4, i64 %5
  %7 = getelementptr inbounds i8, ptr %0, i64 344
  %8 = load ptr, ptr %7, align 8, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %8, i64 48
  %10 = load i32, ptr %9, align 8, !tbaa !14
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %2
  %12 = getelementptr inbounds i8, ptr %0, i64 336
  br label %18

.preheader:                                       ; preds = %32, %2
  %13 = load i32, ptr %6, align 8, !tbaa !16
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph41, label %._crit_edge42

.lr.ph41:                                         ; preds = %.preheader
  %15 = getelementptr inbounds i8, ptr %0, i64 264
  %16 = getelementptr inbounds i8, ptr %6, i64 8
  %17 = getelementptr inbounds i8, ptr %0, i64 336
  %wide.trip.count50 = zext nneg i32 %13 to i64
  br label %44

18:                                               ; preds = %.lr.ph, %32
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %32 ]
  %19 = load ptr, ptr %12, align 8, !tbaa !18
  %20 = getelementptr inbounds %struct.vcf_buf_t, ptr %19, i64 %indvars.iv
  %21 = load i32, ptr %20, align 8, !tbaa !19
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %20, align 8, !tbaa !19
  %23 = getelementptr inbounds i8, ptr %20, i64 4
  %24 = load i32, ptr %23, align 4, !tbaa !21
  %.not = icmp slt i32 %21, %24
  br i1 %.not, label %32, label %25

25:                                               ; preds = %18
  %26 = icmp sgt i32 %21, -1
  %spec.select = select i1 %26, i32 %22, i32 1
  %27 = zext nneg i32 %spec.select to i64
  %28 = sext i32 %24 to i64
  %29 = getelementptr inbounds i8, ptr %20, i64 8
  %30 = tail call i64 @hts_realloc_or_die(i64 noundef %27, i64 noundef %28, i64 noundef 4, i64 noundef 8, i32 noundef 0, ptr noundef nonnull %29, ptr noundef nonnull @__func__.push_vset) #2
  %31 = trunc i64 %30 to i32
  store i32 %31, ptr %23, align 4, !tbaa !21
  %.pre = load i32, ptr %20, align 8, !tbaa !19
  br label %32

32:                                               ; preds = %25, %18
  %33 = phi i32 [ %.pre, %25 ], [ %22, %18 ]
  %34 = getelementptr inbounds i8, ptr %20, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !22
  %36 = sext i32 %33 to i64
  %37 = getelementptr ptr, ptr %35, i64 %36
  %38 = getelementptr i8, ptr %37, i64 -8
  store ptr null, ptr %38, align 8, !tbaa !23
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %39 = load ptr, ptr %7, align 8, !tbaa !13
  %40 = getelementptr inbounds i8, ptr %39, i64 48
  %41 = load i32, ptr %40, align 8, !tbaa !14
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %indvars.iv.next, %42
  br i1 %43, label %18, label %.preheader, !llvm.loop !24

44:                                               ; preds = %.lr.ph41, %._crit_edge
  %indvars.iv47 = phi i64 [ 0, %.lr.ph41 ], [ %indvars.iv.next48, %._crit_edge ]
  %45 = load ptr, ptr %15, align 8, !tbaa !26
  %46 = load ptr, ptr %16, align 8, !tbaa !27
  %47 = getelementptr inbounds i32, ptr %46, i64 %indvars.iv47
  %48 = load i32, ptr %47, align 4, !tbaa !28
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds %struct.var_t, ptr %45, i64 %49
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  %52 = load i32, ptr %51, align 8, !tbaa !29
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %.lr.ph39, label %._crit_edge

.lr.ph39:                                         ; preds = %44
  %54 = getelementptr inbounds i8, ptr %50, i64 24
  %55 = getelementptr inbounds i8, ptr %50, i64 32
  %wide.trip.count = zext nneg i32 %52 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %56 = icmp eq i32 %52, 1
  br i1 %56, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph39.new

.lr.ph39.new:                                     ; preds = %.lr.ph39
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %57

57:                                               ; preds = %57, %.lr.ph39.new
  %indvars.iv44 = phi i64 [ 0, %.lr.ph39.new ], [ %indvars.iv.next45.1, %57 ]
  %niter = phi i64 [ 0, %.lr.ph39.new ], [ %niter.next.1, %57 ]
  %58 = load ptr, ptr %54, align 8, !tbaa !31
  %59 = getelementptr inbounds i32, ptr %58, i64 %indvars.iv44
  %60 = load i32, ptr %59, align 4, !tbaa !28
  %61 = load ptr, ptr %17, align 8, !tbaa !18
  %62 = sext i32 %60 to i64
  %63 = getelementptr inbounds %struct.vcf_buf_t, ptr %61, i64 %62
  %64 = load ptr, ptr %55, align 8, !tbaa !32
  %65 = getelementptr inbounds ptr, ptr %64, i64 %indvars.iv44
  %66 = load ptr, ptr %65, align 8, !tbaa !23
  %67 = getelementptr inbounds i8, ptr %63, i64 8
  %68 = load ptr, ptr %67, align 8, !tbaa !22
  %69 = load i32, ptr %63, align 8, !tbaa !19
  %70 = sext i32 %69 to i64
  %71 = getelementptr ptr, ptr %68, i64 %70
  %72 = getelementptr i8, ptr %71, i64 -8
  store ptr %66, ptr %72, align 8, !tbaa !23
  %indvars.iv.next45 = or disjoint i64 %indvars.iv44, 1
  %73 = load ptr, ptr %54, align 8, !tbaa !31
  %74 = getelementptr inbounds i32, ptr %73, i64 %indvars.iv.next45
  %75 = load i32, ptr %74, align 4, !tbaa !28
  %76 = load ptr, ptr %17, align 8, !tbaa !18
  %77 = sext i32 %75 to i64
  %78 = getelementptr inbounds %struct.vcf_buf_t, ptr %76, i64 %77
  %79 = load ptr, ptr %55, align 8, !tbaa !32
  %80 = getelementptr inbounds ptr, ptr %79, i64 %indvars.iv.next45
  %81 = load ptr, ptr %80, align 8, !tbaa !23
  %82 = getelementptr inbounds i8, ptr %78, i64 8
  %83 = load ptr, ptr %82, align 8, !tbaa !22
  %84 = load i32, ptr %78, align 8, !tbaa !19
  %85 = sext i32 %84 to i64
  %86 = getelementptr ptr, ptr %83, i64 %85
  %87 = getelementptr i8, ptr %86, i64 -8
  store ptr %81, ptr %87, align 8, !tbaa !23
  %indvars.iv.next45.1 = add nuw nsw i64 %indvars.iv44, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %57, !llvm.loop !33

._crit_edge.loopexit.unr-lcssa:                   ; preds = %57, %.lr.ph39
  %indvars.iv44.unr = phi i64 [ 0, %.lr.ph39 ], [ %indvars.iv.next45.1, %57 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %88 = load ptr, ptr %54, align 8, !tbaa !31
  %89 = getelementptr inbounds i32, ptr %88, i64 %indvars.iv44.unr
  %90 = load i32, ptr %89, align 4, !tbaa !28
  %91 = load ptr, ptr %17, align 8, !tbaa !18
  %92 = sext i32 %90 to i64
  %93 = getelementptr inbounds %struct.vcf_buf_t, ptr %91, i64 %92
  %94 = load ptr, ptr %55, align 8, !tbaa !32
  %95 = getelementptr inbounds ptr, ptr %94, i64 %indvars.iv44.unr
  %96 = load ptr, ptr %95, align 8, !tbaa !23
  %97 = getelementptr inbounds i8, ptr %93, i64 8
  %98 = load ptr, ptr %97, align 8, !tbaa !22
  %99 = load i32, ptr %93, align 8, !tbaa !19
  %100 = sext i32 %99 to i64
  %101 = getelementptr ptr, ptr %98, i64 %100
  %102 = getelementptr i8, ptr %101, i64 -8
  store ptr %96, ptr %102, align 8, !tbaa !23
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %44
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %exitcond51.not = icmp eq i64 %indvars.iv.next48, %wide.trip.count50
  br i1 %exitcond51.not, label %._crit_edge42, label %44, !llvm.loop !34

._crit_edge42:                                    ; preds = %._crit_edge, %.preheader
  tail call void @remove_vset(ptr noundef nonnull %0, i32 noundef %1)
  ret void
}

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 = { "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 }

!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 = !{!6, !10, i64 344}
!14 = !{!15, !9, i64 48}
!15 = !{!"", !9, i64 0, !10, i64 8, !9, i64 16, !9, i64 20, !10, i64 24, !9, i64 32, !10, i64 40, !9, i64 48, !9, i64 52, !9, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !9, i64 88, !9, i64 92, !11, i64 96, !9, i64 120, !9, i64 124, !10, i64 128, !10, i64 136}
!16 = !{!17, !9, i64 0}
!17 = !{!"", !9, i64 0, !9, i64 4, !10, i64 8, !9, i64 16, !10, i64 24}
!18 = !{!6, !10, i64 336}
!19 = !{!20, !9, i64 0}
!20 = !{!"", !9, i64 0, !9, i64 4, !10, i64 8}
!21 = !{!20, !9, i64 4}
!22 = !{!20, !10, i64 8}
!23 = !{!10, !10, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!6, !10, i64 264}
!27 = !{!17, !10, i64 8}
!28 = !{!9, !9, i64 0}
!29 = !{!30, !9, i64 16}
!30 = !{!"", !10, i64 0, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20, !10, i64 24, !10, i64 32, !10, i64 40}
!31 = !{!30, !10, i64 24}
!32 = !{!30, !10, i64 32}
!33 = distinct !{!33, !25}
!34 = distinct !{!34, !25}


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