; LLVM IR from sylefeb/Silixel :: src/fstapi (fstapi)

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

@stderr = external global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [74 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: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #1

; Function Attrs: nounwind uwtable
declare dso_local void @fstWriterEmitValueChange(ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local void @fstWriterEmitValueChange32(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @fstWriterEmitValueChangeVec32(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  %15 = load i32, ptr %7, align 4, !tbaa !9
  %16 = icmp ule i32 %15, 32
  %17 = xor i1 %16, true
  %18 = xor i1 %17, true
  %19 = zext i1 %18 to i32
  %20 = sext i32 %19 to i64
  %21 = call i64 @llvm.expect.i64(i64 %20, i64 0)
  %22 = icmp ne i64 %21, 0
  br i1 %22, label %23, label %30

23:                                               ; preds = %4
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = getelementptr inbounds i32, ptr %27, i64 0
  %29 = load i32, ptr %28, align 4, !tbaa !9
  call void @fstWriterEmitValueChange32(ptr noundef %24, i32 noundef %25, i32 noundef %26, i32 noundef %29)
  br label %183

30:                                               ; preds = %4
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  %33 = xor i1 %32, true
  %34 = xor i1 %33, true
  %35 = zext i1 %34 to i32
  %36 = sext i32 %35 to i64
  %37 = call i64 @llvm.expect.i64(i64 %36, i64 1)
  %38 = icmp ne i64 %37, 0
  br i1 %38, label %39, label %182

39:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = udiv i32 %40, 32
  store i32 %41, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = and i32 %42, 31
  store i32 %43, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.fstWriterContext, ptr %45, i32 0, i32 11
  %47 = load i32, ptr %46, align 8, !tbaa !11
  %48 = icmp ugt i32 %44, %47
  %49 = xor i1 %48, true
  %50 = xor i1 %49, true
  %51 = zext i1 %50 to i32
  %52 = sext i32 %51 to i64
  %53 = call i64 @llvm.expect.i64(i64 %52, i64 0)
  %54 = icmp ne i64 %53, 0
  br i1 %54, label %55, label %86

55:                                               ; preds = %39
  %56 = load i32, ptr %7, align 4, !tbaa !9
  %57 = mul i32 %56, 2
  %58 = add i32 %57, 1
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.fstWriterContext, ptr %59, i32 0, i32 11
  store i32 %58, ptr %60, align 8, !tbaa !11
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.fstWriterContext, ptr %61, i32 0, i32 10
  %63 = load ptr, ptr %62, align 8, !tbaa !15
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.fstWriterContext, ptr %64, i32 0, i32 11
  %66 = load i32, ptr %65, align 8, !tbaa !11
  %67 = zext i32 %66 to i64
  %68 = call ptr @realloc(ptr noundef %63, i64 noundef %67) #7
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.fstWriterContext, ptr %69, i32 0, i32 10
  store ptr %68, ptr %70, align 8, !tbaa !15
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.fstWriterContext, ptr %71, i32 0, i32 10
  %73 = load ptr, ptr %72, align 8, !tbaa !15
  %74 = icmp ne ptr %73, null
  %75 = xor i1 %74, true
  %76 = xor i1 %75, true
  %77 = xor i1 %76, true
  %78 = zext i1 %77 to i32
  %79 = sext i32 %78 to i64
  %80 = call i64 @llvm.expect.i64(i64 %79, i64 0)
  %81 = icmp ne i64 %80, 0
  br i1 %81, label %82, label %85

82:                                               ; preds = %55
  %83 = load ptr, ptr @stderr, align 8, !tbaa !5
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef @.str.16) #6
  call void @exit(i32 noundef 255) #8
  unreachable

85:                                               ; preds = %55
  br label %86

86:                                               ; preds = %85, %39
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.fstWriterContext, ptr %87, i32 0, i32 10
  %89 = load ptr, ptr %88, align 8, !tbaa !15
  store ptr %89, ptr %14, align 8, !tbaa !5
  %90 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %90, ptr %12, align 4, !tbaa !9
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = load i32, ptr %12, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i32, ptr %91, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !9
  store i32 %95, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %96

96:                                               ; preds = %112, %86
  %97 = load i32, ptr %11, align 4, !tbaa !9
  %98 = load i32, ptr %10, align 4, !tbaa !9
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %100, label %115

100:                                              ; preds = %96
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = load i32, ptr %10, align 4, !tbaa !9
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = sub nsw i32 %102, %103
  %105 = sub nsw i32 %104, 1
  %106 = lshr i32 %101, %105
  %107 = and i32 %106, 1
  %108 = add i32 48, %107
  %109 = trunc i32 %108 to i8
  %110 = load ptr, ptr %14, align 8, !tbaa !5
  %111 = getelementptr inbounds i8, ptr %110, i32 1
  store ptr %111, ptr %14, align 8, !tbaa !5
  store i8 %109, ptr %110, align 1, !tbaa !16
  br label %112

112:                                              ; preds = %100
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %11, align 4, !tbaa !9
  br label %96, !llvm.loop !17

115:                                              ; preds = %96
  %116 = load i32, ptr %9, align 4, !tbaa !9
  %117 = sub nsw i32 %116, 1
  store i32 %117, ptr %12, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %173, %115
  %119 = load i32, ptr %12, align 4, !tbaa !9
  %120 = icmp sge i32 %119, 0
  br i1 %120, label %121, label %176

121:                                              ; preds = %118
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  %123 = load i32, ptr %12, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds i32, ptr %122, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !9
  store i32 %126, ptr %13, align 4, !tbaa !9
  store i32 28, ptr %11, align 4, !tbaa !9
  br label %127

127:                                              ; preds = %169, %121
  %128 = load i32, ptr %11, align 4, !tbaa !9
  %129 = icmp sge i32 %128, 0
  br i1 %129, label %130, label %172

130:                                              ; preds = %127
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = load i32, ptr %11, align 4, !tbaa !9
  %133 = add nsw i32 %132, 3
  %134 = lshr i32 %131, %133
  %135 = and i32 %134, 1
  %136 = add i32 48, %135
  %137 = trunc i32 %136 to i8
  %138 = load ptr, ptr %14, align 8, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %138, i64 0
  store i8 %137, ptr %139, align 1, !tbaa !16
  %140 = load i32, ptr %13, align 4, !tbaa !9
  %141 = load i32, ptr %11, align 4, !tbaa !9
  %142 = add nsw i32 %141, 2
  %143 = lshr i32 %140, %142
  %144 = and i32 %143, 1
  %145 = add i32 48, %144
  %146 = trunc i32 %145 to i8
  %147 = load ptr, ptr %14, align 8, !tbaa !5
  %148 = getelementptr inbounds i8, ptr %147, i64 1
  store i8 %146, ptr %148, align 1, !tbaa !16
  %149 = load i32, ptr %13, align 4, !tbaa !9
  %150 = load i32, ptr %11, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  %152 = lshr i32 %149, %151
  %153 = and i32 %152, 1
  %154 = add i32 48, %153
  %155 = trunc i32 %154 to i8
  %156 = load ptr, ptr %14, align 8, !tbaa !5
  %157 = getelementptr inbounds i8, ptr %156, i64 2
  store i8 %155, ptr %157, align 1, !tbaa !16
  %158 = load i32, ptr %13, align 4, !tbaa !9
  %159 = load i32, ptr %11, align 4, !tbaa !9
  %160 = add nsw i32 %159, 0
  %161 = lshr i32 %158, %160
  %162 = and i32 %161, 1
  %163 = add i32 48, %162
  %164 = trunc i32 %163 to i8
  %165 = load ptr, ptr %14, align 8, !tbaa !5
  %166 = getelementptr inbounds i8, ptr %165, i64 3
  store i8 %164, ptr %166, align 1, !tbaa !16
  %167 = load ptr, ptr %14, align 8, !tbaa !5
  %168 = getelementptr inbounds i8, ptr %167, i64 4
  store ptr %168, ptr %14, align 8, !tbaa !5
  br label %169

169:                                              ; preds = %130
  %170 = load i32, ptr %11, align 4, !tbaa !9
  %171 = sub nsw i32 %170, 4
  store i32 %171, ptr %11, align 4, !tbaa !9
  br label %127, !llvm.loop !19

172:                                              ; preds = %127
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %12, align 4, !tbaa !9
  %175 = add nsw i32 %174, -1
  store i32 %175, ptr %12, align 4, !tbaa !9
  br label %118, !llvm.loop !20

176:                                              ; preds = %118
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = load i32, ptr %6, align 4, !tbaa !9
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.fstWriterContext, ptr %179, i32 0, i32 10
  %181 = load ptr, ptr %180, align 8, !tbaa !15
  call void @fstWriterEmitValueChange(ptr noundef %177, i32 noundef %178, ptr noundef %181)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %182

182:                                              ; preds = %176, %30
  br label %183

183:                                              ; preds = %182, %23
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #2 = { 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 = { 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 #4 = { noreturn 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 allocsize(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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(1) }
attributes #8 = { noreturn 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, !10, i64 88}
!12 = !{!"fstWriterContext", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !13, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !6, i64 96, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 116, !10, i64 116, !10, i64 116, !13, i64 120, !13, i64 128, !10, i64 136, !10, i64 140, !13, i64 144, !13, i64 152, !10, i64 160, !10, i64 164, !10, i64 168, !13, i64 176, !10, i64 184, !14, i64 192, !6, i64 200, !6, i64 208, !10, i64 216, !13, i64 224, !7, i64 232, !10, i64 233, !10, i64 233, !10, i64 233, !10, i64 233, !10, i64 233, !10, i64 233, !10, i64 233, !10, i64 233, !7, i64 234, !7, i64 235, !10, i64 236, !13, i64 240, !13, i64 248, !13, i64 256, !13, i64 264, !13, i64 272, !10, i64 280, !6, i64 288, !10, i64 296, !10, i64 300, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !10, i64 336}
!13 = !{!"long", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!12, !6, i64 80}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}


; 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.16 = external hidden unnamed_addr constant [74 x i8], align 1

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
define dso_local void @fstWriterEmitValueChangeVec32(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3) local_unnamed_addr #0 {
  %5 = icmp ult i32 %2, 33
  br i1 %5, label %6, label %8, !prof !5

6:                                                ; preds = %4
  %7 = load i32, ptr %3, align 4, !tbaa !6
  tail call void @fstWriterEmitValueChange32(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %7)
  br label %143

8:                                                ; preds = %4
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %143, label %9, !prof !5

9:                                                ; preds = %8
  %10 = lshr i32 %2, 5
  %11 = and i32 %2, 31
  %12 = getelementptr inbounds i8, ptr %0, i64 88
  %13 = load i32, ptr %12, align 8, !tbaa !10
  %14 = icmp ult i32 %13, %2
  br i1 %14, label %15, label %._crit_edge68, !prof !5

._crit_edge68:                                    ; preds = %9
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 80
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !15
  br label %25

15:                                               ; preds = %9
  %16 = shl i32 %2, 1
  %17 = or disjoint i32 %16, 1
  store i32 %17, ptr %12, align 8, !tbaa !10
  %18 = getelementptr inbounds i8, ptr %0, i64 80
  %19 = load ptr, ptr %18, align 8, !tbaa !15
  %20 = zext i32 %17 to i64
  %21 = tail call ptr @realloc(ptr noundef %19, i64 noundef %20) #4
  store ptr %21, ptr %18, align 8, !tbaa !15
  %.not56 = icmp eq ptr %21, null
  br i1 %.not56, label %22, label %25, !prof !5

22:                                               ; preds = %15
  %23 = load ptr, ptr @stderr, align 8, !tbaa !16
  %24 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str.16) #5
  tail call void @exit(i32 noundef 255) #6
  unreachable

25:                                               ; preds = %._crit_edge68, %15
  %26 = phi ptr [ %.pre, %._crit_edge68 ], [ %21, %15 ]
  %27 = getelementptr inbounds i8, ptr %0, i64 80
  %28 = zext nneg i32 %10 to i64
  %29 = getelementptr inbounds i32, ptr %3, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !6
  %.not65 = icmp eq i32 %11, 0
  br i1 %.not65, label %.lr.ph64.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %25
  %31 = and i32 %2, 31
  %32 = zext nneg i32 %31 to i64
  %min.iters.check = icmp ult i32 %31, 8
  br i1 %min.iters.check, label %.lr.ph.preheader73, label %vector.ph

.lr.ph.preheader73:                               ; preds = %middle.block, %.lr.ph.preheader
  %.058.ph = phi ptr [ %26, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %.05057.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %ind.end69, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %32, 24
  %ind.end = getelementptr i8, ptr %26, i64 %n.vec
  %ind.end69 = trunc nuw nsw i64 %n.vec to i32
  %broadcast.splatinsert = insertelement <8 x i32> poison, i32 %11, i64 0
  %broadcast.splat = shufflevector <8 x i32> %broadcast.splatinsert, <8 x i32> poison, <8 x i32> zeroinitializer
  %broadcast.splatinsert71 = insertelement <8 x i32> poison, i32 %30, i64 0
  %broadcast.splat72 = shufflevector <8 x i32> %broadcast.splatinsert71, <8 x i32> poison, <8 x i32> zeroinitializer
  %33 = add nsw <8 x i32> %broadcast.splat, <i32 -1, i32 -2, i32 -3, i32 -4, i32 -5, i32 -6, i32 -7, i32 -8>
  %34 = lshr <8 x i32> %broadcast.splat72, %33
  %35 = trunc <8 x i32> %34 to <8 x i8>
  %36 = and <8 x i8> %35, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
  %37 = or disjoint <8 x i8> %36, <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>
  store <8 x i8> %37, ptr %26, align 1, !tbaa !17
  %38 = icmp eq i64 %n.vec, 8
  br i1 %38, label %middle.block, label %vector.body.1, !llvm.loop !18

vector.body.1:                                    ; preds = %vector.ph
  %next.gep.1 = getelementptr i8, ptr %26, i64 8
  %39 = add nsw <8 x i32> %broadcast.splat, <i32 -9, i32 -10, i32 -11, i32 -12, i32 -13, i32 -14, i32 -15, i32 -16>
  %40 = lshr <8 x i32> %broadcast.splat72, %39
  %41 = trunc <8 x i32> %40 to <8 x i8>
  %42 = and <8 x i8> %41, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
  %43 = or disjoint <8 x i8> %42, <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>
  store <8 x i8> %43, ptr %next.gep.1, align 1, !tbaa !17
  %44 = icmp eq i64 %n.vec, 16
  br i1 %44, label %middle.block, label %vector.body.2, !llvm.loop !18

vector.body.2:                                    ; preds = %vector.body.1
  %next.gep.2 = getelementptr i8, ptr %26, i64 16
  %45 = add nsw <8 x i32> %broadcast.splat, <i32 -17, i32 -18, i32 -19, i32 -20, i32 -21, i32 -22, i32 -23, i32 -24>
  %46 = lshr <8 x i32> %broadcast.splat72, %45
  %47 = trunc <8 x i32> %46 to <8 x i8>
  %48 = and <8 x i8> %47, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
  %49 = or disjoint <8 x i8> %48, <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>
  store <8 x i8> %49, ptr %next.gep.2, align 1, !tbaa !17
  br label %middle.block

middle.block:                                     ; preds = %vector.body.2, %vector.body.1, %vector.ph
  %cmp.n = icmp eq i64 %n.vec, %32
  br i1 %cmp.n, label %.lr.ph64.preheader, label %.lr.ph.preheader73

.lr.ph64.preheader:                               ; preds = %.lr.ph, %middle.block, %25
  %.0.lcssa = phi ptr [ %26, %25 ], [ %ind.end, %middle.block ], [ %58, %.lr.ph ]
  %50 = lshr i32 %2, 5
  %51 = zext nneg i32 %50 to i64
  br label %.lr.ph64

.lr.ph:                                           ; preds = %.lr.ph.preheader73, %.lr.ph
  %.058 = phi ptr [ %58, %.lr.ph ], [ %.058.ph, %.lr.ph.preheader73 ]
  %.05057 = phi i32 [ %59, %.lr.ph ], [ %.05057.ph, %.lr.ph.preheader73 ]
  %52 = xor i32 %.05057, -1
  %53 = add nsw i32 %11, %52
  %54 = lshr i32 %30, %53
  %55 = trunc i32 %54 to i8
  %56 = and i8 %55, 1
  %57 = or disjoint i8 %56, 48
  %58 = getelementptr inbounds i8, ptr %.058, i64 1
  store i8 %57, ptr %.058, align 1, !tbaa !17
  %59 = add nuw nsw i32 %.05057, 1
  %exitcond.not = icmp eq i32 %59, %11
  br i1 %exitcond.not, label %.lr.ph64.preheader, label %.lr.ph, !llvm.loop !22

.lr.ph64:                                         ; preds = %.lr.ph64.preheader, %.lr.ph64
  %indvars.iv = phi i64 [ %51, %.lr.ph64.preheader ], [ %indvars.iv.next, %.lr.ph64 ]
  %.162 = phi ptr [ %.0.lcssa, %.lr.ph64.preheader ], [ %140, %.lr.ph64 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %60 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv.next
  %61 = load i32, ptr %60, align 4, !tbaa !6
  %62 = lshr i32 %61, 31
  %63 = trunc nuw nsw i32 %62 to i8
  %64 = or disjoint i8 %63, 48
  store i8 %64, ptr %.162, align 1, !tbaa !17
  %65 = getelementptr inbounds i8, ptr %.162, i64 1
  %66 = insertelement <16 x i32> poison, i32 %61, i64 0
  %67 = shufflevector <16 x i32> %66, <16 x i32> poison, <16 x i32> zeroinitializer
  %68 = lshr <16 x i32> %67, <i32 30, i32 29, i32 28, i32 27, i32 26, i32 25, i32 24, i32 23, i32 22, i32 21, i32 20, i32 19, i32 18, i32 17, i32 16, i32 15>
  %69 = trunc <16 x i32> %68 to <16 x i8>
  %70 = and <16 x i8> %69, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
  %71 = or disjoint <16 x i8> %70, <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>
  store <16 x i8> %71, ptr %65, align 1, !tbaa !17
  %72 = lshr i32 %61, 14
  %73 = trunc i32 %72 to i8
  %74 = and i8 %73, 1
  %75 = or disjoint i8 %74, 48
  %76 = getelementptr inbounds i8, ptr %.162, i64 17
  store i8 %75, ptr %76, align 1, !tbaa !17
  %77 = lshr i32 %61, 13
  %78 = trunc i32 %77 to i8
  %79 = and i8 %78, 1
  %80 = or disjoint i8 %79, 48
  %81 = getelementptr inbounds i8, ptr %.162, i64 18
  store i8 %80, ptr %81, align 1, !tbaa !17
  %82 = lshr i32 %61, 12
  %83 = trunc i32 %82 to i8
  %84 = and i8 %83, 1
  %85 = or disjoint i8 %84, 48
  %86 = getelementptr inbounds i8, ptr %.162, i64 19
  store i8 %85, ptr %86, align 1, !tbaa !17
  %87 = getelementptr inbounds i8, ptr %.162, i64 20
  %88 = lshr i32 %61, 11
  %89 = trunc i32 %88 to i8
  %90 = and i8 %89, 1
  %91 = or disjoint i8 %90, 48
  store i8 %91, ptr %87, align 1, !tbaa !17
  %92 = lshr i32 %61, 10
  %93 = trunc i32 %92 to i8
  %94 = and i8 %93, 1
  %95 = or disjoint i8 %94, 48
  %96 = getelementptr inbounds i8, ptr %.162, i64 21
  store i8 %95, ptr %96, align 1, !tbaa !17
  %97 = lshr i32 %61, 9
  %98 = trunc i32 %97 to i8
  %99 = and i8 %98, 1
  %100 = or disjoint i8 %99, 48
  %101 = getelementptr inbounds i8, ptr %.162, i64 22
  store i8 %100, ptr %101, align 1, !tbaa !17
  %102 = lshr i32 %61, 8
  %103 = trunc i32 %102 to i8
  %104 = and i8 %103, 1
  %105 = or disjoint i8 %104, 48
  %106 = getelementptr inbounds i8, ptr %.162, i64 23
  store i8 %105, ptr %106, align 1, !tbaa !17
  %107 = getelementptr inbounds i8, ptr %.162, i64 24
  %108 = trunc i32 %61 to i8
  %109 = lshr i8 %108, 7
  %110 = or disjoint i8 %109, 48
  store i8 %110, ptr %107, align 1, !tbaa !17
  %111 = trunc i32 %61 to i8
  %112 = lshr i8 %111, 6
  %113 = and i8 %112, 1
  %114 = or disjoint i8 %113, 48
  %115 = getelementptr inbounds i8, ptr %.162, i64 25
  store i8 %114, ptr %115, align 1, !tbaa !17
  %116 = trunc i32 %61 to i8
  %117 = lshr i8 %116, 5
  %118 = and i8 %117, 1
  %119 = or disjoint i8 %118, 48
  %120 = getelementptr inbounds i8, ptr %.162, i64 26
  store i8 %119, ptr %120, align 1, !tbaa !17
  %121 = trunc i32 %61 to i8
  %122 = lshr i8 %121, 4
  %123 = and i8 %122, 1
  %124 = or disjoint i8 %123, 48
  %125 = getelementptr inbounds i8, ptr %.162, i64 27
  store i8 %124, ptr %125, align 1, !tbaa !17
  %126 = getelementptr inbounds i8, ptr %.162, i64 28
  %127 = trunc i32 %61 to i8
  %128 = lshr i8 %127, 3
  %129 = trunc i32 %61 to i8
  %130 = lshr i8 %129, 2
  %131 = trunc i32 %61 to i8
  %132 = lshr i8 %131, 1
  %133 = trunc i32 %61 to i8
  %134 = insertelement <4 x i8> poison, i8 %128, i64 0
  %135 = insertelement <4 x i8> %134, i8 %130, i64 1
  %136 = insertelement <4 x i8> %135, i8 %132, i64 2
  %137 = insertelement <4 x i8> %136, i8 %133, i64 3
  %138 = and <4 x i8> %137, <i8 1, i8 1, i8 1, i8 1>
  %139 = or disjoint <4 x i8> %138, <i8 48, i8 48, i8 48, i8 48>
  store <4 x i8> %139, ptr %126, align 1, !tbaa !17
  %140 = getelementptr inbounds i8, ptr %.162, i64 32
  %141 = icmp ugt i64 %indvars.iv, 1
  br i1 %141, label %.lr.ph64, label %._crit_edge, !llvm.loop !23

._crit_edge:                                      ; preds = %.lr.ph64
  %142 = load ptr, ptr %27, align 8, !tbaa !15
  tail call void @fstWriterEmitValueChange(ptr noundef nonnull %0, i32 noundef %1, ptr noundef %142)
  br label %143

143:                                              ; preds = %8, %._crit_edge, %6
  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 = { 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 #2 = { noreturn 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 #3 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) 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 #4 = { nounwind allocsize(1) }
attributes #5 = { cold nounwind }
attributes #6 = { noreturn 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 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!6 = !{!7, !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 88}
!11 = !{!"fstWriterContext", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !13, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !7, i64 88, !12, i64 96, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 116, !7, i64 116, !7, i64 116, !13, i64 120, !13, i64 128, !7, i64 136, !7, i64 140, !13, i64 144, !13, i64 152, !7, i64 160, !7, i64 164, !7, i64 168, !13, i64 176, !7, i64 184, !14, i64 192, !12, i64 200, !12, i64 208, !7, i64 216, !13, i64 224, !8, i64 232, !7, i64 233, !7, i64 233, !7, i64 233, !7, i64 233, !7, i64 233, !7, i64 233, !7, i64 233, !7, i64 233, !8, i64 234, !8, i64 235, !7, i64 236, !13, i64 240, !13, i64 248, !13, i64 256, !13, i64 264, !13, i64 272, !7, i64 280, !12, i64 288, !7, i64 296, !7, i64 300, !12, i64 304, !12, i64 312, !12, i64 320, !12, i64 328, !7, i64 336}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!"double", !8, i64 0}
!15 = !{!11, !12, i64 80}
!16 = !{!12, !12, i64 0}
!17 = !{!8, !8, i64 0}
!18 = distinct !{!18, !19, !20, !21}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !19, !21, !20}
!23 = distinct !{!23, !19}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass