; LLVM IR from fwip/fastqz :: libzpaq.ll (ZN7libzpaq7Encoder8compressEi)

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

%"class.libzpaq::Encoder" = type { ptr, i32, i32, %"class.libzpaq::Predictor", %"class.libzpaq::Array.4" }
%"class.libzpaq::Predictor" = type <{ i32, i32, [256 x i32], [256 x i32], ptr, [256 x %"struct.libzpaq::Component"], [256 x i32], [1024 x i32], [4096 x i16], [32768 x i16], %"class.libzpaq::StateTable", ptr, i32, [4 x i8] }>
%"struct.libzpaq::Component" = type { i64, i64, i64, i64, i64, %"class.libzpaq::Array", %"class.libzpaq::Array.0", %"class.libzpaq::Array.2" }
%"class.libzpaq::Array" = type <{ ptr, i64, i32, [4 x i8] }>
%"class.libzpaq::Array.0" = type <{ ptr, i64, i32, [4 x i8] }>
%"class.libzpaq::Array.2" = type <{ ptr, i64, i32, [4 x i8] }>
%"class.libzpaq::StateTable" = type { [1024 x i8] }
%"class.libzpaq::Array.4" = type <{ ptr, i64, i32, [4 x i8] }>

; 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIcEixEm(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7libzpaq9Predictor9isModeledEv(ptr noundef nonnull align 8 dereferenceable(110620)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7libzpaq5ArrayIcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7libzpaq9Predictor7predictEv(ptr noundef nonnull align 8 dereferenceable(110620)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq9Predictor6updateEi(ptr noundef nonnull align 8 dereferenceable(110620), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664), i32 noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7libzpaq7Encoder8compressEi(ptr noundef nonnull align 8 dereferenceable(110664) %0, i32 noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %8 = load ptr, ptr %3, align 8
  %9 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 3
  %10 = call noundef zeroext i1 @_ZN7libzpaq9Predictor9isModeledEv(ptr noundef nonnull align 8 dereferenceable(110620) %9)
  br i1 %10, label %11, label %38

11:                                               ; preds = %2
  %12 = load i32, ptr %4, align 4, !tbaa !9
  %13 = icmp eq i32 %12, -1
  br i1 %13, label %14, label %15

14:                                               ; preds = %11
  call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %8, i32 noundef 1, i32 noundef 0)
  br label %37

15:                                               ; preds = %11
  call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %8, i32 noundef 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 7, ptr %5, align 4, !tbaa !9
  br label %16

16:                                               ; preds = %33, %15
  %17 = load i32, ptr %5, align 4, !tbaa !9
  %18 = icmp sge i32 %17, 0
  br i1 %18, label %20, label %19

19:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %36

20:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %21 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 3
  %22 = call noundef i32 @_ZN7libzpaq9Predictor7predictEv(ptr noundef nonnull align 8 dereferenceable(110620) %21)
  %23 = mul nsw i32 %22, 2
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %25 = load i32, ptr %4, align 4, !tbaa !9
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = ashr i32 %25, %26
  %28 = and i32 %27, 1
  store i32 %28, ptr %7, align 4, !tbaa !9
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %8, i32 noundef %29, i32 noundef %30)
  %31 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 3
  %32 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN7libzpaq9Predictor6updateEi(ptr noundef nonnull align 8 dereferenceable(110620) %31, i32 noundef %32)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %33

33:                                               ; preds = %20
  %34 = load i32, ptr %5, align 4, !tbaa !9
  %35 = add nsw i32 %34, -1
  store i32 %35, ptr %5, align 4, !tbaa !9
  br label %16, !llvm.loop !11

36:                                               ; preds = %19
  br label %37

37:                                               ; preds = %36, %14
  br label %107

38:                                               ; preds = %2
  %39 = load i32, ptr %4, align 4, !tbaa !9
  %40 = icmp slt i32 %39, 0
  br i1 %40, label %48, label %41

41:                                               ; preds = %38
  %42 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 1
  %43 = load i32, ptr %42, align 8, !tbaa !13
  %44 = zext i32 %43 to i64
  %45 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 4
  %46 = call noundef i64 @_ZNK7libzpaq5ArrayIcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %45)
  %47 = icmp eq i64 %44, %46
  br i1 %47, label %48, label %94

48:                                               ; preds = %41, %38
  %49 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !19
  %51 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 1
  %52 = load i32, ptr %51, align 8, !tbaa !13
  %53 = lshr i32 %52, 24
  %54 = and i32 %53, 255
  %55 = load ptr, ptr %50, align 8, !tbaa !20
  %56 = getelementptr inbounds ptr, ptr %55, i64 0
  %57 = load ptr, ptr %56, align 8
  call void %57(ptr noundef nonnull align 8 dereferenceable(8) %50, i32 noundef %54)
  %58 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !19
  %60 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 1
  %61 = load i32, ptr %60, align 8, !tbaa !13
  %62 = lshr i32 %61, 16
  %63 = and i32 %62, 255
  %64 = load ptr, ptr %59, align 8, !tbaa !20
  %65 = getelementptr inbounds ptr, ptr %64, i64 0
  %66 = load ptr, ptr %65, align 8
  call void %66(ptr noundef nonnull align 8 dereferenceable(8) %59, i32 noundef %63)
  %67 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !19
  %69 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 1
  %70 = load i32, ptr %69, align 8, !tbaa !13
  %71 = lshr i32 %70, 8
  %72 = and i32 %71, 255
  %73 = load ptr, ptr %68, align 8, !tbaa !20
  %74 = getelementptr inbounds ptr, ptr %73, i64 0
  %75 = load ptr, ptr %74, align 8
  call void %75(ptr noundef nonnull align 8 dereferenceable(8) %68, i32 noundef %72)
  %76 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !19
  %78 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 1
  %79 = load i32, ptr %78, align 8, !tbaa !13
  %80 = and i32 %79, 255
  %81 = load ptr, ptr %77, align 8, !tbaa !20
  %82 = getelementptr inbounds ptr, ptr %81, i64 0
  %83 = load ptr, ptr %82, align 8
  call void %83(ptr noundef nonnull align 8 dereferenceable(8) %77, i32 noundef %80)
  %84 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !19
  %86 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 4
  %87 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIcEixEm(ptr noundef nonnull align 8 dereferenceable(20) %86, i64 noundef 0)
  %88 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 1
  %89 = load i32, ptr %88, align 8, !tbaa !13
  %90 = load ptr, ptr %85, align 8, !tbaa !20
  %91 = getelementptr inbounds ptr, ptr %90, i64 1
  %92 = load ptr, ptr %91, align 8
  call void %92(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef %87, i32 noundef %89)
  %93 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 1
  store i32 0, ptr %93, align 8, !tbaa !13
  br label %94

94:                                               ; preds = %48, %41
  %95 = load i32, ptr %4, align 4, !tbaa !9
  %96 = icmp sge i32 %95, 0
  br i1 %96, label %97, label %106

97:                                               ; preds = %94
  %98 = load i32, ptr %4, align 4, !tbaa !9
  %99 = trunc i32 %98 to i8
  %100 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 4
  %101 = getelementptr inbounds %"class.libzpaq::Encoder", ptr %8, i32 0, i32 1
  %102 = load i32, ptr %101, align 8, !tbaa !13
  %103 = add i32 %102, 1
  store i32 %103, ptr %101, align 8, !tbaa !13
  %104 = zext i32 %102 to i64
  %105 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIcEixEm(ptr noundef nonnull align 8 dereferenceable(20) %100, i64 noundef %104)
  store i8 %99, ptr %105, align 1, !tbaa !22
  br label %106

106:                                              ; preds = %97, %94
  br label %107

107:                                              ; preds = %106, %37
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { mustprogress 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 }

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !10, i64 8}
!14 = !{!"_ZTSN7libzpaq7EncoderE", !6, i64 0, !10, i64 8, !10, i64 12, !15, i64 16, !17, i64 110640}
!15 = !{!"_ZTSN7libzpaq9PredictorE", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 1032, !6, i64 2056, !7, i64 2064, !7, i64 30736, !7, i64 31760, !7, i64 35856, !7, i64 44048, !16, i64 109584, !6, i64 110608, !10, i64 110616}
!16 = !{!"_ZTSN7libzpaq10StateTableE", !7, i64 0}
!17 = !{!"_ZTSN7libzpaq5ArrayIcEE", !6, i64 0, !18, i64 8, !10, i64 16}
!18 = !{!"long", !7, i64 0}
!19 = !{!14, !6, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"vtable pointer", !8, i64 0}
!22 = !{!7, !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIcEixEm(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7libzpaq9Predictor9isModeledEv(ptr noundef nonnull align 8 dereferenceable(110620)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7libzpaq5ArrayIcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7libzpaq9Predictor7predictEv(ptr noundef nonnull align 8 dereferenceable(110620)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq9Predictor6updateEi(ptr noundef nonnull align 8 dereferenceable(110620), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7libzpaq7Encoder8compressEi(ptr noundef nonnull align 8 dereferenceable(110664) %0, i32 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 16
  %4 = tail call noundef zeroext i1 @_ZN7libzpaq9Predictor9isModeledEv(ptr noundef nonnull align 8 dereferenceable(110620) %3)
  br i1 %4, label %5, label %47

5:                                                ; preds = %2
  %6 = icmp eq i32 %1, -1
  br i1 %6, label %7, label %.loopexit.loopexit

7:                                                ; preds = %5
  tail call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %0, i32 noundef 1, i32 noundef 0)
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %5
  tail call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %0, i32 noundef 0, i32 noundef 0)
  %8 = tail call noundef i32 @_ZN7libzpaq9Predictor7predictEv(ptr noundef nonnull align 8 dereferenceable(110620) %3)
  %9 = shl nsw i32 %8, 1
  %10 = or disjoint i32 %9, 1
  %11 = lshr i32 %1, 7
  %12 = and i32 %11, 1
  tail call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %0, i32 noundef %12, i32 noundef %10)
  tail call void @_ZN7libzpaq9Predictor6updateEi(ptr noundef nonnull align 8 dereferenceable(110620) %3, i32 noundef %12)
  %13 = tail call noundef i32 @_ZN7libzpaq9Predictor7predictEv(ptr noundef nonnull align 8 dereferenceable(110620) %3)
  %14 = shl nsw i32 %13, 1
  %15 = or disjoint i32 %14, 1
  %16 = lshr i32 %1, 6
  %17 = and i32 %16, 1
  tail call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %0, i32 noundef %17, i32 noundef %15)
  tail call void @_ZN7libzpaq9Predictor6updateEi(ptr noundef nonnull align 8 dereferenceable(110620) %3, i32 noundef %17)
  %18 = tail call noundef i32 @_ZN7libzpaq9Predictor7predictEv(ptr noundef nonnull align 8 dereferenceable(110620) %3)
  %19 = shl nsw i32 %18, 1
  %20 = or disjoint i32 %19, 1
  %21 = lshr i32 %1, 5
  %22 = and i32 %21, 1
  tail call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %0, i32 noundef %22, i32 noundef %20)
  tail call void @_ZN7libzpaq9Predictor6updateEi(ptr noundef nonnull align 8 dereferenceable(110620) %3, i32 noundef %22)
  %23 = tail call noundef i32 @_ZN7libzpaq9Predictor7predictEv(ptr noundef nonnull align 8 dereferenceable(110620) %3)
  %24 = shl nsw i32 %23, 1
  %25 = or disjoint i32 %24, 1
  %26 = lshr i32 %1, 4
  %27 = and i32 %26, 1
  tail call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %0, i32 noundef %27, i32 noundef %25)
  tail call void @_ZN7libzpaq9Predictor6updateEi(ptr noundef nonnull align 8 dereferenceable(110620) %3, i32 noundef %27)
  %28 = tail call noundef i32 @_ZN7libzpaq9Predictor7predictEv(ptr noundef nonnull align 8 dereferenceable(110620) %3)
  %29 = shl nsw i32 %28, 1
  %30 = or disjoint i32 %29, 1
  %31 = lshr i32 %1, 3
  %32 = and i32 %31, 1
  tail call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %0, i32 noundef %32, i32 noundef %30)
  tail call void @_ZN7libzpaq9Predictor6updateEi(ptr noundef nonnull align 8 dereferenceable(110620) %3, i32 noundef %32)
  %33 = tail call noundef i32 @_ZN7libzpaq9Predictor7predictEv(ptr noundef nonnull align 8 dereferenceable(110620) %3)
  %34 = shl nsw i32 %33, 1
  %35 = or disjoint i32 %34, 1
  %36 = lshr i32 %1, 2
  %37 = and i32 %36, 1
  tail call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %0, i32 noundef %37, i32 noundef %35)
  tail call void @_ZN7libzpaq9Predictor6updateEi(ptr noundef nonnull align 8 dereferenceable(110620) %3, i32 noundef %37)
  %38 = tail call noundef i32 @_ZN7libzpaq9Predictor7predictEv(ptr noundef nonnull align 8 dereferenceable(110620) %3)
  %39 = shl nsw i32 %38, 1
  %40 = or disjoint i32 %39, 1
  %41 = lshr i32 %1, 1
  %42 = and i32 %41, 1
  tail call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %0, i32 noundef %42, i32 noundef %40)
  tail call void @_ZN7libzpaq9Predictor6updateEi(ptr noundef nonnull align 8 dereferenceable(110620) %3, i32 noundef %42)
  %43 = tail call noundef i32 @_ZN7libzpaq9Predictor7predictEv(ptr noundef nonnull align 8 dereferenceable(110620) %3)
  %44 = shl nsw i32 %43, 1
  %45 = or disjoint i32 %44, 1
  %46 = and i32 %1, 1
  tail call void @_ZN7libzpaq7Encoder6encodeEii(ptr noundef nonnull align 8 dereferenceable(110664) %0, i32 noundef %46, i32 noundef %45)
  tail call void @_ZN7libzpaq9Predictor6updateEi(ptr noundef nonnull align 8 dereferenceable(110620) %3, i32 noundef %46)
  br label %.loopexit

47:                                               ; preds = %2
  %48 = icmp slt i32 %1, 0
  br i1 %48, label %56, label %49

49:                                               ; preds = %47
  %50 = getelementptr inbounds i8, ptr %0, i64 8
  %51 = load i32, ptr %50, align 8, !tbaa !5
  %52 = zext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %0, i64 110640
  %54 = tail call noundef i64 @_ZNK7libzpaq5ArrayIcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %53)
  %55 = icmp eq i64 %54, %52
  br i1 %55, label %56, label %..thread_crit_edge

..thread_crit_edge:                               ; preds = %49
  %.pre = load i32, ptr %50, align 8, !tbaa !5
  br label %.thread

56:                                               ; preds = %47, %49
  %57 = load ptr, ptr %0, align 8, !tbaa !15
  %58 = getelementptr inbounds i8, ptr %0, i64 8
  %59 = load i32, ptr %58, align 8, !tbaa !5
  %60 = lshr i32 %59, 24
  %61 = load ptr, ptr %57, align 8, !tbaa !16
  %62 = load ptr, ptr %61, align 8
  tail call void %62(ptr noundef nonnull align 8 dereferenceable(8) %57, i32 noundef %60)
  %63 = load ptr, ptr %0, align 8, !tbaa !15
  %64 = load i32, ptr %58, align 8, !tbaa !5
  %65 = lshr i32 %64, 16
  %66 = and i32 %65, 255
  %67 = load ptr, ptr %63, align 8, !tbaa !16
  %68 = load ptr, ptr %67, align 8
  tail call void %68(ptr noundef nonnull align 8 dereferenceable(8) %63, i32 noundef %66)
  %69 = load ptr, ptr %0, align 8, !tbaa !15
  %70 = load i32, ptr %58, align 8, !tbaa !5
  %71 = lshr i32 %70, 8
  %72 = and i32 %71, 255
  %73 = load ptr, ptr %69, align 8, !tbaa !16
  %74 = load ptr, ptr %73, align 8
  tail call void %74(ptr noundef nonnull align 8 dereferenceable(8) %69, i32 noundef %72)
  %75 = load ptr, ptr %0, align 8, !tbaa !15
  %76 = load i32, ptr %58, align 8, !tbaa !5
  %77 = and i32 %76, 255
  %78 = load ptr, ptr %75, align 8, !tbaa !16
  %79 = load ptr, ptr %78, align 8
  tail call void %79(ptr noundef nonnull align 8 dereferenceable(8) %75, i32 noundef %77)
  %80 = load ptr, ptr %0, align 8, !tbaa !15
  %81 = getelementptr inbounds i8, ptr %0, i64 110640
  %82 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIcEixEm(ptr noundef nonnull align 8 dereferenceable(20) %81, i64 noundef 0)
  %83 = load i32, ptr %58, align 8, !tbaa !5
  %84 = load ptr, ptr %80, align 8, !tbaa !16
  %85 = getelementptr inbounds i8, ptr %84, i64 8
  %86 = load ptr, ptr %85, align 8
  tail call void %86(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef nonnull %82, i32 noundef %83)
  store i32 0, ptr %58, align 8, !tbaa !5
  %87 = icmp sgt i32 %1, -1
  br i1 %87, label %.thread, label %.loopexit

.thread:                                          ; preds = %..thread_crit_edge, %56
  %88 = phi i32 [ %.pre, %..thread_crit_edge ], [ 0, %56 ]
  %89 = trunc i32 %1 to i8
  %90 = getelementptr inbounds i8, ptr %0, i64 110640
  %91 = getelementptr inbounds i8, ptr %0, i64 8
  %92 = add i32 %88, 1
  store i32 %92, ptr %91, align 8, !tbaa !5
  %93 = zext i32 %88 to i64
  %94 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIcEixEm(ptr noundef nonnull align 8 dereferenceable(20) %90, i64 noundef %93)
  store i8 %89, ptr %94, align 1, !tbaa !18
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %56, %.thread, %7
  ret void
}

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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" }

!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 8}
!6 = !{!"_ZTSN7libzpaq7EncoderE", !7, i64 0, !10, i64 8, !10, i64 12, !11, i64 16, !13, i64 110640}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSN7libzpaq9PredictorE", !10, i64 0, !10, i64 4, !8, i64 8, !8, i64 1032, !7, i64 2056, !8, i64 2064, !8, i64 30736, !8, i64 31760, !8, i64 35856, !8, i64 44048, !12, i64 109584, !7, i64 110608, !10, i64 110616}
!12 = !{!"_ZTSN7libzpaq10StateTableE", !8, i64 0}
!13 = !{!"_ZTSN7libzpaq5ArrayIcEE", !7, i64 0, !14, i64 8, !10, i64 16}
!14 = !{!"long", !8, i64 0}
!15 = !{!6, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !9, i64 0}
!18 = !{!8, !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass