; LLVM IR from mkazhdan/DMG :: Util/ZLIB (deflate)

; 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.z_stream_s = type { ptr, i32, i64, ptr, i32, i64, ptr, ptr, ptr, ptr, ptr, i32, i64, i64 }
%struct.internal_state = type { ptr, i32, ptr, i64, ptr, i32, i32, i8, i8, i32, i32, i32, i32, ptr, i64, ptr, ptr, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [573 x %struct.ct_data_s], [61 x %struct.ct_data_s], [39 x %struct.ct_data_s], %struct.tree_desc_s, %struct.tree_desc_s, %struct.tree_desc_s, [16 x i16], [573 x i32], i32, i32, [573 x i8], ptr, i32, i32, ptr, i64, i64, i32, i32, i16, i32 }
%struct.ct_data_s = type { %union.anon, %union.anon.0 }
%union.anon = type { i16 }
%union.anon.0 = type { i16 }
%struct.tree_desc_s = type { ptr, i32, ptr }

; 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
define dso_local i32 @deflateSetDictionary(ptr noundef %0, ptr noundef %1, i32 noundef %2) #1 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %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
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %13 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %13, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %31, label %16

16:                                               ; preds = %3
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.z_stream_s, ptr %17, i32 0, i32 7
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = icmp eq ptr %19, null
  br i1 %20, label %31, label %21

21:                                               ; preds = %16
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %31, label %24

24:                                               ; preds = %21
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.z_stream_s, ptr %25, i32 0, i32 7
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = getelementptr inbounds %struct.internal_state, ptr %27, i32 0, i32 1
  %29 = load i32, ptr %28, align 8, !tbaa !14
  %30 = icmp ne i32 %29, 42
  br i1 %30, label %31, label %32

31:                                               ; preds = %24, %21, %16, %3
  store i32 -2, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %175

32:                                               ; preds = %24
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.z_stream_s, ptr %33, i32 0, i32 7
  %35 = load ptr, ptr %34, align 8, !tbaa !11
  store ptr %35, ptr %8, align 8, !tbaa !5
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.z_stream_s, ptr %36, i32 0, i32 12
  %38 = load i64, ptr %37, align 8, !tbaa !18
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = call i64 @adler32(i64 noundef %38, ptr noundef %39, i32 noundef %40)
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.z_stream_s, ptr %42, i32 0, i32 12
  store i64 %41, ptr %43, align 8, !tbaa !18
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = icmp ult i32 %44, 3
  br i1 %45, label %46, label %47

46:                                               ; preds = %32
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %175

47:                                               ; preds = %32
  %48 = load i32, ptr %9, align 4, !tbaa !9
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.internal_state, ptr %49, i32 0, i32 10
  %51 = load i32, ptr %50, align 8, !tbaa !19
  %52 = sub i32 %51, 262
  %53 = icmp ugt i32 %48, %52
  br i1 %53, label %54, label %65

54:                                               ; preds = %47
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.internal_state, ptr %55, i32 0, i32 10
  %57 = load i32, ptr %56, align 8, !tbaa !19
  %58 = sub i32 %57, 262
  store i32 %58, ptr %9, align 4, !tbaa !9
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = sub i32 %59, %60
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = zext i32 %61 to i64
  %64 = getelementptr inbounds i8, ptr %62, i64 %63
  store ptr %64, ptr %6, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %54, %47
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.internal_state, ptr %66, i32 0, i32 13
  %68 = load ptr, ptr %67, align 8, !tbaa !20
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %68, ptr align 1 %69, i64 %71, i1 false)
  %72 = load i32, ptr %9, align 4, !tbaa !9
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.internal_state, ptr %73, i32 0, i32 26
  store i32 %72, ptr %74, align 4, !tbaa !21
  %75 = load i32, ptr %9, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.internal_state, ptr %77, i32 0, i32 22
  store i64 %76, ptr %78, align 8, !tbaa !22
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.internal_state, ptr %79, i32 0, i32 13
  %81 = load ptr, ptr %80, align 8, !tbaa !20
  %82 = getelementptr inbounds i8, ptr %81, i64 0
  %83 = load i8, ptr %82, align 1, !tbaa !23
  %84 = zext i8 %83 to i32
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.internal_state, ptr %85, i32 0, i32 17
  store i32 %84, ptr %86, align 8, !tbaa !24
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.internal_state, ptr %87, i32 0, i32 17
  %89 = load i32, ptr %88, align 8, !tbaa !24
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.internal_state, ptr %90, i32 0, i32 21
  %92 = load i32, ptr %91, align 8, !tbaa !25
  %93 = shl i32 %89, %92
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.internal_state, ptr %94, i32 0, i32 13
  %96 = load ptr, ptr %95, align 8, !tbaa !20
  %97 = getelementptr inbounds i8, ptr %96, i64 1
  %98 = load i8, ptr %97, align 1, !tbaa !23
  %99 = zext i8 %98 to i32
  %100 = xor i32 %93, %99
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.internal_state, ptr %101, i32 0, i32 20
  %103 = load i32, ptr %102, align 4, !tbaa !26
  %104 = and i32 %100, %103
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.internal_state, ptr %105, i32 0, i32 17
  store i32 %104, ptr %106, align 8, !tbaa !24
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %167, %65
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = sub i32 %109, 3
  %111 = icmp ule i32 %108, %110
  br i1 %111, label %112, label %170

112:                                              ; preds = %107
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.internal_state, ptr %113, i32 0, i32 17
  %115 = load i32, ptr %114, align 8, !tbaa !24
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.internal_state, ptr %116, i32 0, i32 21
  %118 = load i32, ptr %117, align 8, !tbaa !25
  %119 = shl i32 %115, %118
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.internal_state, ptr %120, i32 0, i32 13
  %122 = load ptr, ptr %121, align 8, !tbaa !20
  %123 = load i32, ptr %10, align 4, !tbaa !9
  %124 = add i32 %123, 2
  %125 = zext i32 %124 to i64
  %126 = getelementptr inbounds i8, ptr %122, i64 %125
  %127 = load i8, ptr %126, align 1, !tbaa !23
  %128 = zext i8 %127 to i32
  %129 = xor i32 %119, %128
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.internal_state, ptr %130, i32 0, i32 20
  %132 = load i32, ptr %131, align 4, !tbaa !26
  %133 = and i32 %129, %132
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.internal_state, ptr %134, i32 0, i32 17
  store i32 %133, ptr %135, align 8, !tbaa !24
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.internal_state, ptr %136, i32 0, i32 16
  %138 = load ptr, ptr %137, align 8, !tbaa !27
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.internal_state, ptr %139, i32 0, i32 17
  %141 = load i32, ptr %140, align 8, !tbaa !24
  %142 = zext i32 %141 to i64
  %143 = getelementptr inbounds i16, ptr %138, i64 %142
  %144 = load i16, ptr %143, align 2, !tbaa !28
  %145 = zext i16 %144 to i32
  store i32 %145, ptr %11, align 4, !tbaa !9
  %146 = trunc i32 %145 to i16
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.internal_state, ptr %147, i32 0, i32 15
  %149 = load ptr, ptr %148, align 8, !tbaa !29
  %150 = load i32, ptr %10, align 4, !tbaa !9
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.internal_state, ptr %151, i32 0, i32 12
  %153 = load i32, ptr %152, align 8, !tbaa !30
  %154 = and i32 %150, %153
  %155 = zext i32 %154 to i64
  %156 = getelementptr inbounds i16, ptr %149, i64 %155
  store i16 %146, ptr %156, align 2, !tbaa !28
  %157 = load i32, ptr %10, align 4, !tbaa !9
  %158 = trunc i32 %157 to i16
  %159 = load ptr, ptr %8, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.internal_state, ptr %159, i32 0, i32 16
  %161 = load ptr, ptr %160, align 8, !tbaa !27
  %162 = load ptr, ptr %8, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.internal_state, ptr %162, i32 0, i32 17
  %164 = load i32, ptr %163, align 8, !tbaa !24
  %165 = zext i32 %164 to i64
  %166 = getelementptr inbounds i16, ptr %161, i64 %165
  store i16 %158, ptr %166, align 2, !tbaa !28
  br label %167

167:                                              ; preds = %112
  %168 = load i32, ptr %10, align 4, !tbaa !9
  %169 = add i32 %168, 1
  store i32 %169, ptr %10, align 4, !tbaa !9
  br label %107, !llvm.loop !31

170:                                              ; preds = %107
  %171 = load i32, ptr %11, align 4, !tbaa !9
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %173, label %174

173:                                              ; preds = %170
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %174

174:                                              ; preds = %173, %170
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %175

175:                                              ; preds = %174, %46, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %176 = load i32, ptr %4, align 4
  ret i32 %176
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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 = { "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 nounwind willreturn memory(argmem: readwrite) }
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 56}
!12 = !{!"z_stream_s", !6, i64 0, !10, i64 8, !13, i64 16, !6, i64 24, !10, i64 32, !13, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !13, i64 96, !13, i64 104}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !10, i64 8}
!15 = !{!"internal_state", !6, i64 0, !10, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !7, i64 48, !7, i64 49, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !6, i64 72, !13, i64 80, !6, i64 88, !6, i64 96, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !13, i64 128, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !7, i64 188, !7, i64 2480, !7, i64 2724, !16, i64 2880, !16, i64 2904, !16, i64 2928, !7, i64 2952, !7, i64 2984, !10, i64 5276, !10, i64 5280, !7, i64 5284, !6, i64 5864, !10, i64 5872, !10, i64 5876, !6, i64 5880, !13, i64 5888, !13, i64 5896, !10, i64 5904, !10, i64 5908, !17, i64 5912, !10, i64 5916}
!16 = !{!"tree_desc_s", !6, i64 0, !10, i64 8, !6, i64 16}
!17 = !{!"short", !7, i64 0}
!18 = !{!12, !13, i64 96}
!19 = !{!15, !10, i64 56}
!20 = !{!15, !6, i64 72}
!21 = !{!15, !10, i64 148}
!22 = !{!15, !13, i64 128}
!23 = !{!7, !7, i64 0}
!24 = !{!15, !10, i64 104}
!25 = !{!15, !10, i64 120}
!26 = !{!15, !10, i64 116}
!27 = !{!15, !6, i64 96}
!28 = !{!17, !17, i64 0}
!29 = !{!15, !6, i64 88}
!30 = !{!15, !10, i64 64}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


; 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: nounwind uwtable
define dso_local range(i32 -2, 1) i32 @deflateSetDictionary(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = icmp eq ptr %0, null
  br i1 %4, label %.loopexit, label %5

5:                                                ; preds = %3
  %6 = getelementptr inbounds i8, ptr %0, i64 56
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = icmp eq ptr %7, null
  %9 = icmp eq ptr %1, null
  %or.cond = or i1 %9, %8
  br i1 %or.cond, label %.loopexit, label %10

10:                                               ; preds = %5
  %11 = getelementptr inbounds i8, ptr %7, i64 8
  %12 = load i32, ptr %11, align 8, !tbaa !12
  %.not = icmp eq i32 %12, 42
  br i1 %.not, label %13, label %.loopexit

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %0, i64 96
  %15 = load i64, ptr %14, align 8, !tbaa !16
  %16 = tail call i64 @adler32(i64 noundef %15, ptr noundef nonnull %1, i32 noundef %2) #4
  store i64 %16, ptr %14, align 8, !tbaa !16
  %17 = icmp ult i32 %2, 3
  br i1 %17, label %.loopexit, label %18

18:                                               ; preds = %13
  %19 = getelementptr inbounds i8, ptr %7, i64 56
  %20 = load i32, ptr %19, align 8, !tbaa !17
  %21 = add i32 %20, -262
  %narrow = tail call i32 @llvm.usub.sat.i32(i32 %2, i32 %21)
  %.053.idx = zext i32 %narrow to i64
  %.053 = getelementptr inbounds i8, ptr %1, i64 %.053.idx
  %.051 = tail call i32 @llvm.umin.i32(i32 %21, i32 %2)
  %22 = getelementptr inbounds i8, ptr %7, i64 72
  %23 = load ptr, ptr %22, align 8, !tbaa !18
  %24 = zext i32 %.051 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %23, ptr align 1 %.053, i64 %24, i1 false)
  %25 = getelementptr inbounds i8, ptr %7, i64 148
  store i32 %.051, ptr %25, align 4, !tbaa !19
  %26 = getelementptr inbounds i8, ptr %7, i64 128
  store i64 %24, ptr %26, align 8, !tbaa !20
  %27 = load ptr, ptr %22, align 8, !tbaa !18
  %28 = load i8, ptr %27, align 1, !tbaa !21
  %29 = zext i8 %28 to i32
  %30 = getelementptr inbounds i8, ptr %7, i64 104
  store i32 %29, ptr %30, align 8, !tbaa !22
  %31 = getelementptr inbounds i8, ptr %7, i64 120
  %32 = load i32, ptr %31, align 8, !tbaa !23
  %33 = shl i32 %29, %32
  %34 = getelementptr inbounds i8, ptr %27, i64 1
  %35 = load i8, ptr %34, align 1, !tbaa !21
  %36 = zext i8 %35 to i32
  %37 = xor i32 %33, %36
  %38 = getelementptr inbounds i8, ptr %7, i64 116
  %39 = load i32, ptr %38, align 4, !tbaa !24
  %40 = and i32 %37, %39
  store i32 %40, ptr %30, align 8, !tbaa !22
  %41 = getelementptr inbounds i8, ptr %7, i64 96
  %42 = load ptr, ptr %41, align 8, !tbaa !25
  %43 = getelementptr inbounds i8, ptr %7, i64 88
  %44 = load ptr, ptr %43, align 8, !tbaa !26
  %45 = getelementptr inbounds i8, ptr %7, i64 64
  %46 = load i32, ptr %45, align 8, !tbaa !27
  %47 = add i32 %.051, -2
  %umax = tail call i32 @llvm.umax.i32(i32 %47, i32 1)
  %wide.trip.count = zext i32 %umax to i64
  br label %48

48:                                               ; preds = %18, %48
  %indvars.iv = phi i64 [ 0, %18 ], [ %indvars.iv.next, %48 ]
  %49 = phi i32 [ %40, %18 ], [ %58, %48 ]
  %50 = shl i32 %49, %32
  %51 = trunc nuw i64 %indvars.iv to i32
  %52 = add nuw i64 %indvars.iv, 2
  %53 = and i64 %52, 4294967295
  %54 = getelementptr inbounds i8, ptr %27, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !21
  %56 = zext i8 %55 to i32
  %57 = xor i32 %50, %56
  %58 = and i32 %57, %39
  store i32 %58, ptr %30, align 8, !tbaa !22
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds i16, ptr %42, i64 %59
  %61 = load i16, ptr %60, align 2, !tbaa !28
  %62 = and i32 %46, %51
  %63 = zext i32 %62 to i64
  %64 = getelementptr inbounds i16, ptr %44, i64 %63
  store i16 %61, ptr %64, align 2, !tbaa !28
  %65 = trunc i64 %indvars.iv to i16
  store i16 %65, ptr %60, align 2, !tbaa !28
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond, label %.loopexit, label %48, !llvm.loop !29

.loopexit:                                        ; preds = %48, %13, %3, %5, %10
  %.052 = phi i32 [ -2, %10 ], [ -2, %5 ], [ -2, %3 ], [ 0, %13 ], [ 0, %48 ]
  ret i32 %.052
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.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 = { "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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !7, i64 56}
!6 = !{!"z_stream_s", !7, i64 0, !10, i64 8, !11, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !10, i64 88, !11, i64 96, !11, i64 104}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!13, !10, i64 8}
!13 = !{!"internal_state", !7, i64 0, !10, i64 8, !7, i64 16, !11, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !8, i64 48, !8, i64 49, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !7, i64 72, !11, i64 80, !7, i64 88, !7, i64 96, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !11, i64 128, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !8, i64 188, !8, i64 2480, !8, i64 2724, !14, i64 2880, !14, i64 2904, !14, i64 2928, !8, i64 2952, !8, i64 2984, !10, i64 5276, !10, i64 5280, !8, i64 5284, !7, i64 5864, !10, i64 5872, !10, i64 5876, !7, i64 5880, !11, i64 5888, !11, i64 5896, !10, i64 5904, !10, i64 5908, !15, i64 5912, !10, i64 5916}
!14 = !{!"tree_desc_s", !7, i64 0, !10, i64 8, !7, i64 16}
!15 = !{!"short", !8, i64 0}
!16 = !{!6, !11, i64 96}
!17 = !{!13, !10, i64 56}
!18 = !{!13, !7, i64 72}
!19 = !{!13, !10, i64 148}
!20 = !{!13, !11, i64 128}
!21 = !{!8, !8, i64 0}
!22 = !{!13, !10, i64 104}
!23 = !{!13, !10, i64 120}
!24 = !{!13, !10, i64 116}
!25 = !{!13, !7, i64 96}
!26 = !{!13, !7, i64 88}
!27 = !{!13, !10, i64 64}
!28 = !{!15, !15, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


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