; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode/modules/juce_core/zip/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, 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 }
%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: nounwind uwtable
declare dso_local i32 @z_deflateEnd(ptr noundef) #1

; 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 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: nounwind uwtable
define dso_local i32 @z_deflateCopy(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  %11 = icmp eq ptr %10, null
  br i1 %11, label %20, label %12

12:                                               ; preds = %2
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %20, label %15

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

20:                                               ; preds = %15, %12, %2
  store i32 -2, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %216

21:                                               ; preds = %15
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.z_stream_s, ptr %22, i32 0, i32 7
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  store ptr %24, ptr %7, align 8, !tbaa !5
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %26, i64 112, i1 false)
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.z_stream_s, ptr %27, i32 0, i32 8
  %29 = load ptr, ptr %28, align 8, !tbaa !13
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.z_stream_s, ptr %30, i32 0, i32 10
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  %33 = call ptr %29(ptr noundef %32, i32 noundef 1, i32 noundef 5928)
  store ptr %33, ptr %6, align 8, !tbaa !5
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %37

36:                                               ; preds = %21
  store i32 -4, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %216

37:                                               ; preds = %21
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.z_stream_s, ptr %39, i32 0, i32 7
  store ptr %38, ptr %40, align 8, !tbaa !9
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %41, ptr align 8 %42, i64 5928, i1 false)
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.internal_state, ptr %44, i32 0, i32 0
  store ptr %43, ptr %45, align 8, !tbaa !15
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.z_stream_s, ptr %46, i32 0, i32 8
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.z_stream_s, ptr %49, i32 0, i32 10
  %51 = load ptr, ptr %50, align 8, !tbaa !14
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.internal_state, ptr %52, i32 0, i32 11
  %54 = load i32, ptr %53, align 4, !tbaa !19
  %55 = call ptr %48(ptr noundef %51, i32 noundef %54, i32 noundef 2)
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.internal_state, ptr %56, i32 0, i32 14
  store ptr %55, ptr %57, align 8, !tbaa !20
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.z_stream_s, ptr %58, i32 0, i32 8
  %60 = load ptr, ptr %59, align 8, !tbaa !13
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.z_stream_s, ptr %61, i32 0, i32 10
  %63 = load ptr, ptr %62, align 8, !tbaa !14
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.internal_state, ptr %64, i32 0, i32 11
  %66 = load i32, ptr %65, align 4, !tbaa !19
  %67 = call ptr %60(ptr noundef %63, i32 noundef %66, i32 noundef 2)
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.internal_state, ptr %68, i32 0, i32 16
  store ptr %67, ptr %69, align 8, !tbaa !21
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.z_stream_s, ptr %70, i32 0, i32 8
  %72 = load ptr, ptr %71, align 8, !tbaa !13
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.z_stream_s, ptr %73, i32 0, i32 10
  %75 = load ptr, ptr %74, align 8, !tbaa !14
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.internal_state, ptr %76, i32 0, i32 19
  %78 = load i32, ptr %77, align 4, !tbaa !22
  %79 = call ptr %72(ptr noundef %75, i32 noundef %78, i32 noundef 2)
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.internal_state, ptr %80, i32 0, i32 17
  store ptr %79, ptr %81, align 8, !tbaa !23
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.z_stream_s, ptr %82, i32 0, i32 8
  %84 = load ptr, ptr %83, align 8, !tbaa !13
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.z_stream_s, ptr %85, i32 0, i32 10
  %87 = load ptr, ptr %86, align 8, !tbaa !14
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.internal_state, ptr %88, i32 0, i32 49
  %90 = load i32, ptr %89, align 8, !tbaa !24
  %91 = call ptr %84(ptr noundef %87, i32 noundef %90, i32 noundef 4)
  store ptr %91, ptr %8, align 8, !tbaa !5
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.internal_state, ptr %93, i32 0, i32 2
  store ptr %92, ptr %94, align 8, !tbaa !25
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.internal_state, ptr %95, i32 0, i32 14
  %97 = load ptr, ptr %96, align 8, !tbaa !20
  %98 = icmp eq ptr %97, null
  br i1 %98, label %114, label %99

99:                                               ; preds = %37
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.internal_state, ptr %100, i32 0, i32 16
  %102 = load ptr, ptr %101, align 8, !tbaa !21
  %103 = icmp eq ptr %102, null
  br i1 %103, label %114, label %104

104:                                              ; preds = %99
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.internal_state, ptr %105, i32 0, i32 17
  %107 = load ptr, ptr %106, align 8, !tbaa !23
  %108 = icmp eq ptr %107, null
  br i1 %108, label %114, label %109

109:                                              ; preds = %104
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.internal_state, ptr %110, i32 0, i32 2
  %112 = load ptr, ptr %111, align 8, !tbaa !25
  %113 = icmp eq ptr %112, null
  br i1 %113, label %114, label %117

114:                                              ; preds = %109, %104, %99, %37
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = call i32 @z_deflateEnd(ptr noundef %115)
  store i32 -4, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %216

117:                                              ; preds = %109
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.internal_state, ptr %118, i32 0, i32 14
  %120 = load ptr, ptr %119, align 8, !tbaa !20
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.internal_state, ptr %121, i32 0, i32 14
  %123 = load ptr, ptr %122, align 8, !tbaa !20
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.internal_state, ptr %124, i32 0, i32 11
  %126 = load i32, ptr %125, align 4, !tbaa !19
  %127 = mul i32 %126, 2
  %128 = zext i32 %127 to i64
  %129 = mul i64 %128, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %120, ptr align 1 %123, i64 %129, i1 false)
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.internal_state, ptr %130, i32 0, i32 16
  %132 = load ptr, ptr %131, align 8, !tbaa !21
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.internal_state, ptr %133, i32 0, i32 16
  %135 = load ptr, ptr %134, align 8, !tbaa !21
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.internal_state, ptr %136, i32 0, i32 11
  %138 = load i32, ptr %137, align 4, !tbaa !19
  %139 = zext i32 %138 to i64
  %140 = mul i64 %139, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %132, ptr align 2 %135, i64 %140, i1 false)
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.internal_state, ptr %141, i32 0, i32 17
  %143 = load ptr, ptr %142, align 8, !tbaa !23
  %144 = load ptr, ptr %7, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.internal_state, ptr %144, i32 0, i32 17
  %146 = load ptr, ptr %145, align 8, !tbaa !23
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.internal_state, ptr %147, i32 0, i32 19
  %149 = load i32, ptr %148, align 4, !tbaa !22
  %150 = zext i32 %149 to i64
  %151 = mul i64 %150, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %143, ptr align 2 %146, i64 %151, i1 false)
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.internal_state, ptr %152, i32 0, i32 2
  %154 = load ptr, ptr %153, align 8, !tbaa !25
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.internal_state, ptr %155, i32 0, i32 2
  %157 = load ptr, ptr %156, align 8, !tbaa !25
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.internal_state, ptr %158, i32 0, i32 3
  %160 = load i64, ptr %159, align 8, !tbaa !26
  %161 = trunc i64 %160 to i32
  %162 = zext i32 %161 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %154, ptr align 1 %157, i64 %162, i1 false)
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.internal_state, ptr %163, i32 0, i32 2
  %165 = load ptr, ptr %164, align 8, !tbaa !25
  %166 = load ptr, ptr %7, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.internal_state, ptr %166, i32 0, i32 4
  %168 = load ptr, ptr %167, align 8, !tbaa !27
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.internal_state, ptr %169, i32 0, i32 2
  %171 = load ptr, ptr %170, align 8, !tbaa !25
  %172 = ptrtoint ptr %168 to i64
  %173 = ptrtoint ptr %171 to i64
  %174 = sub i64 %172, %173
  %175 = getelementptr inbounds i8, ptr %165, i64 %174
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.internal_state, ptr %176, i32 0, i32 4
  store ptr %175, ptr %177, align 8, !tbaa !27
  %178 = load ptr, ptr %8, align 8, !tbaa !5
  %179 = load ptr, ptr %6, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.internal_state, ptr %179, i32 0, i32 49
  %181 = load i32, ptr %180, align 8, !tbaa !24
  %182 = zext i32 %181 to i64
  %183 = udiv i64 %182, 2
  %184 = getelementptr inbounds i16, ptr %178, i64 %183
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.internal_state, ptr %185, i32 0, i32 51
  store ptr %184, ptr %186, align 8, !tbaa !28
  %187 = load ptr, ptr %6, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.internal_state, ptr %187, i32 0, i32 2
  %189 = load ptr, ptr %188, align 8, !tbaa !25
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.internal_state, ptr %190, i32 0, i32 49
  %192 = load i32, ptr %191, align 8, !tbaa !24
  %193 = zext i32 %192 to i64
  %194 = mul i64 3, %193
  %195 = getelementptr inbounds i8, ptr %189, i64 %194
  %196 = load ptr, ptr %6, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.internal_state, ptr %196, i32 0, i32 48
  store ptr %195, ptr %197, align 8, !tbaa !29
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.internal_state, ptr %198, i32 0, i32 37
  %200 = getelementptr inbounds [573 x %struct.ct_data_s], ptr %199, i64 0, i64 0
  %201 = load ptr, ptr %6, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.internal_state, ptr %201, i32 0, i32 40
  %203 = getelementptr inbounds %struct.tree_desc_s, ptr %202, i32 0, i32 0
  store ptr %200, ptr %203, align 8, !tbaa !30
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.internal_state, ptr %204, i32 0, i32 38
  %206 = getelementptr inbounds [61 x %struct.ct_data_s], ptr %205, i64 0, i64 0
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.internal_state, ptr %207, i32 0, i32 41
  %209 = getelementptr inbounds %struct.tree_desc_s, ptr %208, i32 0, i32 0
  store ptr %206, ptr %209, align 8, !tbaa !31
  %210 = load ptr, ptr %6, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.internal_state, ptr %210, i32 0, i32 39
  %212 = getelementptr inbounds [39 x %struct.ct_data_s], ptr %211, i64 0, i64 0
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.internal_state, ptr %213, i32 0, i32 42
  %215 = getelementptr inbounds %struct.tree_desc_s, ptr %214, i32 0, i32 0
  store ptr %212, ptr %215, align 8, !tbaa !32
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %216

216:                                              ; preds = %117, %114, %36, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %217 = load i32, ptr %3, align 4
  ret i32 %217
}

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 56}
!10 = !{!"z_stream_s", !6, i64 0, !11, i64 8, !12, i64 16, !6, i64 24, !11, i64 32, !12, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !11, i64 88, !12, i64 96, !12, i64 104}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !6, i64 64}
!14 = !{!10, !6, i64 80}
!15 = !{!16, !6, i64 0}
!16 = !{!"internal_state", !6, i64 0, !11, i64 8, !6, i64 16, !12, i64 24, !6, i64 32, !11, i64 40, !11, i64 44, !6, i64 48, !11, i64 56, !7, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !6, i64 80, !12, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !12, i64 136, !11, i64 144, !11, i64 148, !11, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !11, i64 168, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !7, i64 196, !7, i64 2488, !7, i64 2732, !17, i64 2888, !17, i64 2912, !17, i64 2936, !7, i64 2960, !7, i64 2992, !11, i64 5284, !11, i64 5288, !7, i64 5292, !6, i64 5872, !11, i64 5880, !11, i64 5884, !6, i64 5888, !12, i64 5896, !12, i64 5904, !11, i64 5912, !11, i64 5916, !18, i64 5920, !11, i64 5924}
!17 = !{!"tree_desc_s", !6, i64 0, !11, i64 8, !6, i64 16}
!18 = !{!"short", !7, i64 0}
!19 = !{!16, !11, i64 68}
!20 = !{!16, !6, i64 80}
!21 = !{!16, !6, i64 96}
!22 = !{!16, !11, i64 116}
!23 = !{!16, !6, i64 104}
!24 = !{!16, !11, i64 5880}
!25 = !{!16, !6, i64 16}
!26 = !{!16, !12, i64 24}
!27 = !{!16, !6, i64 32}
!28 = !{!16, !6, i64 5888}
!29 = !{!16, !6, i64 5872}
!30 = !{!16, !6, i64 2888}
!31 = !{!16, !6, i64 2912}
!32 = !{!16, !6, i64 2936}


; 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
declare dso_local i32 @z_deflateEnd(ptr noundef) local_unnamed_addr #0

; 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) #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -4, 1) i32 @z_deflateCopy(ptr noundef %0, ptr noundef readonly %1) local_unnamed_addr #0 {
  %3 = icmp eq ptr %1, null
  %4 = icmp eq ptr %0, null
  %or.cond = or i1 %4, %3
  br i1 %or.cond, label %100, label %5

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %1, i64 56
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = icmp eq ptr %7, null
  br i1 %8, label %100, label %9

9:                                                ; preds = %5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(112) %1, i64 112, i1 false)
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  %11 = load ptr, ptr %10, align 8, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %0, i64 80
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %14 = tail call ptr %11(ptr noundef %13, i32 noundef 1, i32 noundef 5928) #2
  %15 = icmp eq ptr %14, null
  br i1 %15, label %100, label %16

16:                                               ; preds = %9
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %14, ptr %17, align 8, !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(5928) %14, ptr noundef nonnull align 8 dereferenceable(5928) %7, i64 5928, i1 false)
  store ptr %0, ptr %14, align 8, !tbaa !14
  %18 = load ptr, ptr %10, align 8, !tbaa !12
  %19 = load ptr, ptr %12, align 8, !tbaa !13
  %20 = getelementptr inbounds i8, ptr %14, i64 68
  %21 = load i32, ptr %20, align 4, !tbaa !18
  %22 = tail call ptr %18(ptr noundef %19, i32 noundef %21, i32 noundef 2) #2
  %23 = getelementptr inbounds i8, ptr %14, i64 80
  store ptr %22, ptr %23, align 8, !tbaa !19
  %24 = load ptr, ptr %10, align 8, !tbaa !12
  %25 = load ptr, ptr %12, align 8, !tbaa !13
  %26 = load i32, ptr %20, align 4, !tbaa !18
  %27 = tail call ptr %24(ptr noundef %25, i32 noundef %26, i32 noundef 2) #2
  %28 = getelementptr inbounds i8, ptr %14, i64 96
  store ptr %27, ptr %28, align 8, !tbaa !20
  %29 = load ptr, ptr %10, align 8, !tbaa !12
  %30 = load ptr, ptr %12, align 8, !tbaa !13
  %31 = getelementptr inbounds i8, ptr %14, i64 116
  %32 = load i32, ptr %31, align 4, !tbaa !21
  %33 = tail call ptr %29(ptr noundef %30, i32 noundef %32, i32 noundef 2) #2
  %34 = getelementptr inbounds i8, ptr %14, i64 104
  store ptr %33, ptr %34, align 8, !tbaa !22
  %35 = load ptr, ptr %10, align 8, !tbaa !12
  %36 = load ptr, ptr %12, align 8, !tbaa !13
  %37 = getelementptr inbounds i8, ptr %14, i64 5880
  %38 = load i32, ptr %37, align 8, !tbaa !23
  %39 = tail call ptr %35(ptr noundef %36, i32 noundef %38, i32 noundef 4) #2
  %40 = getelementptr inbounds i8, ptr %14, i64 16
  store ptr %39, ptr %40, align 8, !tbaa !24
  %41 = load ptr, ptr %23, align 8, !tbaa !19
  %42 = icmp eq ptr %41, null
  br i1 %42, label %50, label %43

43:                                               ; preds = %16
  %44 = load ptr, ptr %28, align 8, !tbaa !20
  %45 = icmp eq ptr %44, null
  br i1 %45, label %50, label %46

46:                                               ; preds = %43
  %47 = load ptr, ptr %34, align 8, !tbaa !22
  %48 = icmp eq ptr %47, null
  %49 = icmp eq ptr %39, null
  %or.cond72 = select i1 %48, i1 true, i1 %49
  br i1 %or.cond72, label %50, label %52

50:                                               ; preds = %46, %43, %16
  %51 = tail call i32 @z_deflateEnd(ptr noundef nonnull %0)
  br label %100

52:                                               ; preds = %46
  %53 = getelementptr inbounds i8, ptr %7, i64 80
  %54 = load ptr, ptr %53, align 8, !tbaa !19
  %55 = load i32, ptr %20, align 4, !tbaa !18
  %56 = shl i32 %55, 1
  %57 = zext i32 %56 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %41, ptr align 1 %54, i64 %57, i1 false)
  %58 = load ptr, ptr %28, align 8, !tbaa !20
  %59 = getelementptr inbounds i8, ptr %7, i64 96
  %60 = load ptr, ptr %59, align 8, !tbaa !20
  %61 = load i32, ptr %20, align 4, !tbaa !18
  %62 = zext i32 %61 to i64
  %63 = shl nuw nsw i64 %62, 1
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 2 %58, ptr align 2 %60, i64 %63, i1 false)
  %64 = load ptr, ptr %34, align 8, !tbaa !22
  %65 = getelementptr inbounds i8, ptr %7, i64 104
  %66 = load ptr, ptr %65, align 8, !tbaa !22
  %67 = load i32, ptr %31, align 4, !tbaa !21
  %68 = zext i32 %67 to i64
  %69 = shl nuw nsw i64 %68, 1
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 2 %64, ptr align 2 %66, i64 %69, i1 false)
  %70 = load ptr, ptr %40, align 8, !tbaa !24
  %71 = getelementptr inbounds i8, ptr %7, i64 16
  %72 = load ptr, ptr %71, align 8, !tbaa !24
  %73 = getelementptr inbounds i8, ptr %14, i64 24
  %74 = load i64, ptr %73, align 8, !tbaa !25
  %75 = and i64 %74, 4294967295
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %70, ptr align 1 %72, i64 %75, i1 false)
  %76 = load ptr, ptr %40, align 8, !tbaa !24
  %77 = getelementptr inbounds i8, ptr %7, i64 32
  %78 = load ptr, ptr %77, align 8, !tbaa !26
  %79 = load ptr, ptr %71, align 8, !tbaa !24
  %80 = ptrtoint ptr %78 to i64
  %81 = ptrtoint ptr %79 to i64
  %82 = sub i64 %80, %81
  %83 = getelementptr inbounds i8, ptr %76, i64 %82
  %84 = getelementptr inbounds i8, ptr %14, i64 32
  store ptr %83, ptr %84, align 8, !tbaa !26
  %85 = load i32, ptr %37, align 8, !tbaa !23
  %86 = lshr i32 %85, 1
  %87 = zext nneg i32 %86 to i64
  %88 = getelementptr inbounds i16, ptr %39, i64 %87
  %89 = getelementptr inbounds i8, ptr %14, i64 5888
  store ptr %88, ptr %89, align 8, !tbaa !27
  %90 = zext i32 %85 to i64
  %91 = mul nuw nsw i64 %90, 3
  %92 = getelementptr inbounds i8, ptr %76, i64 %91
  %93 = getelementptr inbounds i8, ptr %14, i64 5872
  store ptr %92, ptr %93, align 8, !tbaa !28
  %94 = getelementptr inbounds i8, ptr %14, i64 196
  %95 = getelementptr inbounds i8, ptr %14, i64 2888
  store ptr %94, ptr %95, align 8, !tbaa !29
  %96 = getelementptr inbounds i8, ptr %14, i64 2488
  %97 = getelementptr inbounds i8, ptr %14, i64 2912
  store ptr %96, ptr %97, align 8, !tbaa !30
  %98 = getelementptr inbounds i8, ptr %14, i64 2732
  %99 = getelementptr inbounds i8, ptr %14, i64 2936
  store ptr %98, ptr %99, align 8, !tbaa !31
  br label %100

100:                                              ; preds = %9, %2, %5, %52, %50
  %.0 = phi i32 [ -4, %50 ], [ 0, %52 ], [ -2, %5 ], [ -2, %2 ], [ -4, %9 ]
  ret i32 %.0
}

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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 = !{!6, !7, i64 64}
!13 = !{!6, !7, i64 80}
!14 = !{!15, !7, i64 0}
!15 = !{!"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, !16, i64 2888, !16, i64 2912, !16, 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, !17, i64 5920, !10, i64 5924}
!16 = !{!"tree_desc_s", !7, i64 0, !10, i64 8, !7, i64 16}
!17 = !{!"short", !8, i64 0}
!18 = !{!15, !10, i64 68}
!19 = !{!15, !7, i64 80}
!20 = !{!15, !7, i64 96}
!21 = !{!15, !10, i64 116}
!22 = !{!15, !7, i64 104}
!23 = !{!15, !10, i64 5880}
!24 = !{!15, !7, i64 16}
!25 = !{!15, !11, i64 24}
!26 = !{!15, !7, i64 32}
!27 = !{!15, !7, i64 5888}
!28 = !{!15, !7, i64 5872}
!29 = !{!15, !7, i64 2888}
!30 = !{!15, !7, i64 2912}
!31 = !{!15, !7, i64 2936}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass