; LLVM IR from niessner/Matterport :: code/gaps/pkgs/png (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, ptr, i32, 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, i64 }
%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 %45, 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 %45, label %21

21:                                               ; preds = %16
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %45, 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 6
  %29 = load i32, ptr %28, align 4, !tbaa !14
  %30 = icmp eq i32 %29, 2
  br i1 %30, label %45, label %31

31:                                               ; preds = %24
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.z_stream_s, ptr %32, i32 0, i32 7
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds %struct.internal_state, ptr %34, i32 0, i32 6
  %36 = load i32, ptr %35, align 4, !tbaa !14
  %37 = icmp eq i32 %36, 1
  br i1 %37, label %38, label %46

38:                                               ; preds = %31
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.z_stream_s, ptr %39, i32 0, i32 7
  %41 = load ptr, ptr %40, align 8, !tbaa !11
  %42 = getelementptr inbounds %struct.internal_state, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 8, !tbaa !18
  %44 = icmp ne i32 %43, 42
  br i1 %44, label %45, label %46

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

46:                                               ; preds = %38, %31
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.z_stream_s, ptr %47, i32 0, i32 7
  %49 = load ptr, ptr %48, align 8, !tbaa !11
  store ptr %49, ptr %8, align 8, !tbaa !5
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.internal_state, ptr %50, i32 0, i32 6
  %52 = load i32, ptr %51, align 4, !tbaa !14
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %63

54:                                               ; preds = %46
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.z_stream_s, ptr %55, i32 0, i32 12
  %57 = load i64, ptr %56, align 8, !tbaa !19
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = call i64 @adler32(i64 noundef %57, ptr noundef %58, i32 noundef %59)
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.z_stream_s, ptr %61, i32 0, i32 12
  store i64 %60, ptr %62, align 8, !tbaa !19
  br label %63

63:                                               ; preds = %54, %46
  %64 = load i32, ptr %9, align 4, !tbaa !9
  %65 = icmp ult i32 %64, 3
  br i1 %65, label %66, label %67

66:                                               ; preds = %63
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %192

67:                                               ; preds = %63
  %68 = load i32, ptr %9, align 4, !tbaa !9
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.internal_state, ptr %69, i32 0, i32 11
  %71 = load i32, ptr %70, align 4, !tbaa !20
  %72 = icmp ugt i32 %68, %71
  br i1 %72, label %73, label %83

73:                                               ; preds = %67
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.internal_state, ptr %74, i32 0, i32 11
  %76 = load i32, ptr %75, align 4, !tbaa !20
  store i32 %76, ptr %9, align 4, !tbaa !9
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = load i32, ptr %9, align 4, !tbaa !9
  %79 = sub i32 %77, %78
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = zext i32 %79 to i64
  %82 = getelementptr inbounds i8, ptr %80, i64 %81
  store ptr %82, ptr %6, align 8, !tbaa !5
  br label %83

83:                                               ; preds = %73, %67
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.internal_state, ptr %84, i32 0, i32 14
  %86 = load ptr, ptr %85, align 8, !tbaa !21
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = load i32, ptr %9, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %86, ptr align 1 %87, i64 %89, i1 false)
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.internal_state, ptr %91, i32 0, i32 27
  store i32 %90, ptr %92, align 4, !tbaa !22
  %93 = load i32, ptr %9, align 4, !tbaa !9
  %94 = zext i32 %93 to i64
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.internal_state, ptr %95, i32 0, i32 23
  store i64 %94, ptr %96, align 8, !tbaa !23
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.internal_state, ptr %97, i32 0, i32 14
  %99 = load ptr, ptr %98, align 8, !tbaa !21
  %100 = getelementptr inbounds i8, ptr %99, i64 0
  %101 = load i8, ptr %100, align 1, !tbaa !24
  %102 = zext i8 %101 to i32
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.internal_state, ptr %103, i32 0, i32 18
  store i32 %102, ptr %104, align 8, !tbaa !25
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.internal_state, ptr %105, i32 0, i32 18
  %107 = load i32, ptr %106, align 8, !tbaa !25
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.internal_state, ptr %108, i32 0, i32 22
  %110 = load i32, ptr %109, align 8, !tbaa !26
  %111 = shl i32 %107, %110
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.internal_state, ptr %112, i32 0, i32 14
  %114 = load ptr, ptr %113, align 8, !tbaa !21
  %115 = getelementptr inbounds i8, ptr %114, i64 1
  %116 = load i8, ptr %115, align 1, !tbaa !24
  %117 = zext i8 %116 to i32
  %118 = xor i32 %111, %117
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.internal_state, ptr %119, i32 0, i32 21
  %121 = load i32, ptr %120, align 4, !tbaa !27
  %122 = and i32 %118, %121
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.internal_state, ptr %123, i32 0, i32 18
  store i32 %122, ptr %124, align 8, !tbaa !25
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %184, %83
  %126 = load i32, ptr %10, align 4, !tbaa !9
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = sub i32 %127, 3
  %129 = icmp ule i32 %126, %128
  br i1 %129, label %130, label %187

130:                                              ; preds = %125
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.internal_state, ptr %131, i32 0, i32 18
  %133 = load i32, ptr %132, align 8, !tbaa !25
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.internal_state, ptr %134, i32 0, i32 22
  %136 = load i32, ptr %135, align 8, !tbaa !26
  %137 = shl i32 %133, %136
  %138 = load ptr, ptr %8, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.internal_state, ptr %138, i32 0, i32 14
  %140 = load ptr, ptr %139, align 8, !tbaa !21
  %141 = load i32, ptr %10, align 4, !tbaa !9
  %142 = add i32 %141, 2
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds i8, ptr %140, i64 %143
  %145 = load i8, ptr %144, align 1, !tbaa !24
  %146 = zext i8 %145 to i32
  %147 = xor i32 %137, %146
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.internal_state, ptr %148, i32 0, i32 21
  %150 = load i32, ptr %149, align 4, !tbaa !27
  %151 = and i32 %147, %150
  %152 = load ptr, ptr %8, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.internal_state, ptr %152, i32 0, i32 18
  store i32 %151, ptr %153, align 8, !tbaa !25
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.internal_state, ptr %154, i32 0, i32 17
  %156 = load ptr, ptr %155, align 8, !tbaa !28
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.internal_state, ptr %157, i32 0, i32 18
  %159 = load i32, ptr %158, align 8, !tbaa !25
  %160 = zext i32 %159 to i64
  %161 = getelementptr inbounds i16, ptr %156, i64 %160
  %162 = load i16, ptr %161, align 2, !tbaa !29
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.internal_state, ptr %163, i32 0, i32 16
  %165 = load ptr, ptr %164, align 8, !tbaa !30
  %166 = load i32, ptr %10, align 4, !tbaa !9
  %167 = load ptr, ptr %8, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.internal_state, ptr %167, i32 0, i32 13
  %169 = load i32, ptr %168, align 4, !tbaa !31
  %170 = and i32 %166, %169
  %171 = zext i32 %170 to i64
  %172 = getelementptr inbounds i16, ptr %165, i64 %171
  store i16 %162, ptr %172, align 2, !tbaa !29
  %173 = zext i16 %162 to i32
  store i32 %173, ptr %11, align 4, !tbaa !9
  %174 = load i32, ptr %10, align 4, !tbaa !9
  %175 = trunc i32 %174 to i16
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.internal_state, ptr %176, i32 0, i32 17
  %178 = load ptr, ptr %177, align 8, !tbaa !28
  %179 = load ptr, ptr %8, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.internal_state, ptr %179, i32 0, i32 18
  %181 = load i32, ptr %180, align 8, !tbaa !25
  %182 = zext i32 %181 to i64
  %183 = getelementptr inbounds i16, ptr %178, i64 %182
  store i16 %175, ptr %183, align 2, !tbaa !29
  br label %184

184:                                              ; preds = %130
  %185 = load i32, ptr %10, align 4, !tbaa !9
  %186 = add i32 %185, 1
  store i32 %186, ptr %10, align 4, !tbaa !9
  br label %125, !llvm.loop !32

187:                                              ; preds = %125
  %188 = load i32, ptr %11, align 4, !tbaa !9
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %191

190:                                              ; preds = %187
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %191

191:                                              ; preds = %190, %187
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %192

192:                                              ; preds = %191, %66, %45
  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
  %193 = load i32, ptr %4, align 4
  ret i32 %193
}

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 44}
!15 = !{!"internal_state", !6, i64 0, !10, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !6, i64 48, !10, i64 56, !7, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !6, i64 80, !13, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !13, i64 136, !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, !10, i64 188, !10, i64 192, !7, i64 196, !7, i64 2488, !7, i64 2732, !16, i64 2888, !16, i64 2912, !16, i64 2936, !7, i64 2960, !7, i64 2992, !10, i64 5284, !10, i64 5288, !7, i64 5292, !6, i64 5872, !10, i64 5880, !10, i64 5884, !6, i64 5888, !13, i64 5896, !13, i64 5904, !10, i64 5912, !10, i64 5916, !17, i64 5920, !10, i64 5924, !13, i64 5928}
!16 = !{!"tree_desc_s", !6, i64 0, !10, i64 8, !6, i64 16}
!17 = !{!"short", !7, i64 0}
!18 = !{!15, !10, i64 8}
!19 = !{!12, !13, i64 96}
!20 = !{!15, !10, i64 68}
!21 = !{!15, !6, i64 80}
!22 = !{!15, !10, i64 156}
!23 = !{!15, !13, i64 136}
!24 = !{!7, !7, i64 0}
!25 = !{!15, !10, i64 112}
!26 = !{!15, !10, i64 128}
!27 = !{!15, !10, i64 124}
!28 = !{!15, !6, i64 104}
!29 = !{!17, !17, i64 0}
!30 = !{!15, !6, i64 96}
!31 = !{!15, !10, i64 76}
!32 = distinct !{!32, !33}
!33 = !{!"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 44
  %12 = load i32, ptr %11, align 4, !tbaa !12
  switch i32 %12, label %.thread [
    i32 2, label %.loopexit
    i32 1, label %13
    i32 0, label %19
  ]

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

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

19:                                               ; preds = %10, %.thread
  %20 = icmp ult i32 %2, 3
  br i1 %20, label %.loopexit, label %21

21:                                               ; preds = %19
  %22 = getelementptr inbounds i8, ptr %7, i64 68
  %23 = load i32, ptr %22, align 4, !tbaa !18
  %narrow = tail call i32 @llvm.usub.sat.i32(i32 %2, i32 %23)
  %.056.idx = zext i32 %narrow to i64
  %.056 = getelementptr inbounds i8, ptr %1, i64 %.056.idx
  %.054 = tail call i32 @llvm.umin.i32(i32 %23, i32 %2)
  %24 = getelementptr inbounds i8, ptr %7, i64 80
  %25 = load ptr, ptr %24, align 8, !tbaa !19
  %26 = zext i32 %.054 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %25, ptr align 1 %.056, i64 %26, i1 false)
  %27 = getelementptr inbounds i8, ptr %7, i64 156
  store i32 %.054, ptr %27, align 4, !tbaa !20
  %28 = getelementptr inbounds i8, ptr %7, i64 136
  store i64 %26, ptr %28, align 8, !tbaa !21
  %29 = load ptr, ptr %24, align 8, !tbaa !19
  %30 = load i8, ptr %29, align 1, !tbaa !22
  %31 = zext i8 %30 to i32
  %32 = getelementptr inbounds i8, ptr %7, i64 112
  store i32 %31, ptr %32, align 8, !tbaa !23
  %33 = getelementptr inbounds i8, ptr %7, i64 128
  %34 = load i32, ptr %33, align 8, !tbaa !24
  %35 = shl i32 %31, %34
  %36 = getelementptr inbounds i8, ptr %29, i64 1
  %37 = load i8, ptr %36, align 1, !tbaa !22
  %38 = zext i8 %37 to i32
  %39 = xor i32 %35, %38
  %40 = getelementptr inbounds i8, ptr %7, i64 124
  %41 = load i32, ptr %40, align 4, !tbaa !25
  %42 = and i32 %39, %41
  store i32 %42, ptr %32, align 8, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %7, i64 104
  %44 = load ptr, ptr %43, align 8, !tbaa !26
  %45 = getelementptr inbounds i8, ptr %7, i64 96
  %46 = load ptr, ptr %45, align 8, !tbaa !27
  %47 = getelementptr inbounds i8, ptr %7, i64 76
  %48 = load i32, ptr %47, align 4, !tbaa !28
  %49 = add i32 %.054, -2
  %umax = tail call i32 @llvm.umax.i32(i32 %49, i32 1)
  %wide.trip.count = zext i32 %umax to i64
  br label %50

50:                                               ; preds = %21, %50
  %indvars.iv = phi i64 [ 0, %21 ], [ %indvars.iv.next, %50 ]
  %51 = phi i32 [ %42, %21 ], [ %60, %50 ]
  %52 = shl i32 %51, %34
  %53 = trunc nuw i64 %indvars.iv to i32
  %54 = add nuw i64 %indvars.iv, 2
  %55 = and i64 %54, 4294967295
  %56 = getelementptr inbounds i8, ptr %29, i64 %55
  %57 = load i8, ptr %56, align 1, !tbaa !22
  %58 = zext i8 %57 to i32
  %59 = xor i32 %52, %58
  %60 = and i32 %59, %41
  store i32 %60, ptr %32, align 8, !tbaa !23
  %61 = zext i32 %60 to i64
  %62 = getelementptr inbounds i16, ptr %44, i64 %61
  %63 = load i16, ptr %62, align 2, !tbaa !29
  %64 = and i32 %48, %53
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds i16, ptr %46, i64 %65
  store i16 %63, ptr %66, align 2, !tbaa !29
  %67 = trunc i64 %indvars.iv to i16
  store i16 %67, ptr %62, align 2, !tbaa !29
  %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 %50, !llvm.loop !30

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

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 44}
!13 = !{!"internal_state", !7, i64 0, !10, i64 8, !7, i64 16, !11, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !7, i64 48, !10, i64 56, !8, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !7, i64 80, !11, i64 88, !7, i64 96, !7, i64 104, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !11, i64 136, !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, !10, i64 188, !10, i64 192, !8, i64 196, !8, i64 2488, !8, i64 2732, !14, i64 2888, !14, i64 2912, !14, i64 2936, !8, i64 2960, !8, i64 2992, !10, i64 5284, !10, i64 5288, !8, i64 5292, !7, i64 5872, !10, i64 5880, !10, i64 5884, !7, i64 5888, !11, i64 5896, !11, i64 5904, !10, i64 5912, !10, i64 5916, !15, i64 5920, !10, i64 5924, !11, i64 5928}
!14 = !{!"tree_desc_s", !7, i64 0, !10, i64 8, !7, i64 16}
!15 = !{!"short", !8, i64 0}
!16 = !{!13, !10, i64 8}
!17 = !{!6, !11, i64 96}
!18 = !{!13, !10, i64 68}
!19 = !{!13, !7, i64 80}
!20 = !{!13, !10, i64 156}
!21 = !{!13, !11, i64 136}
!22 = !{!8, !8, i64 0}
!23 = !{!13, !10, i64 112}
!24 = !{!13, !10, i64 128}
!25 = !{!13, !10, i64 124}
!26 = !{!13, !7, i64 104}
!27 = !{!13, !7, i64 96}
!28 = !{!13, !10, i64 76}
!29 = !{!15, !15, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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