; LLVM IR from mkazhdan/DMG :: Util/TIFF (tif_zip)

; 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.TIFFFieldInfo = type { i32, i16, i16, i32, i16, i8, i8, ptr }
%struct.tiff = type { ptr, i32, i32, i32, i32, i32, ptr, i16, %struct.TIFFDirectory, %struct.TIFFHeader, ptr, ptr, i32, i16, i32, i32, i32, i16, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, %struct.TIFFTagMethods, ptr }
%struct.TIFFDirectory = type { [4 x i64], i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16, i16, i16, i32, i16, i16, double, double, float, float, i16, i16, float, float, [2 x i16], [3 x ptr], [2 x i16], i16, ptr, i32, i32, ptr, ptr, i32, i16, ptr, [2 x i16], i16, [3 x ptr], i32, ptr, i32, ptr }
%struct.TIFFHeader = type { i16, i16, i32 }
%struct.TIFFTagMethods = type { ptr, ptr, ptr }
%struct.ZIPState = type { %struct.TIFFPredictorState, %struct.z_stream_s, i32, i32, ptr, ptr }
%struct.TIFFPredictorState = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.z_stream_s = type { ptr, i32, i64, ptr, i32, i64, ptr, ptr, ptr, ptr, ptr, i32, i64, i64 }

@.str = external hidden unnamed_addr constant [73 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@__PRETTY_FUNCTION__.TIFFInitZIP = external hidden unnamed_addr constant [29 x i8], align 1
@zipFieldInfo = external hidden constant [1 x %struct.TIFFFieldInfo], align 16
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @TIFFInitZIP(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %8 = load i32, ptr %5, align 4, !tbaa !9
  %9 = icmp eq i32 %8, 32946
  br i1 %9, label %13, label %10

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

13:                                               ; preds = %10, %2
  br label %15

14:                                               ; preds = %10
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 323, ptr noundef @__PRETTY_FUNCTION__.TIFFInitZIP) #5
  unreachable

15:                                               ; preds = %13
  %16 = call ptr @_TIFFmalloc(i32 noundef 224)
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.tiff, ptr %17, i32 0, i32 40
  store ptr %16, ptr %18, align 8, !tbaa !11
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.tiff, ptr %19, i32 0, i32 40
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %15
  br label %89

24:                                               ; preds = %15
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.tiff, ptr %25, i32 0, i32 40
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  store ptr %27, ptr %6, align 8, !tbaa !5
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.ZIPState, ptr %28, i32 0, i32 1
  %30 = getelementptr inbounds %struct.z_stream_s, ptr %29, i32 0, i32 8
  store ptr null, ptr %30, align 8, !tbaa !20
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.ZIPState, ptr %31, i32 0, i32 1
  %33 = getelementptr inbounds %struct.z_stream_s, ptr %32, i32 0, i32 9
  store ptr null, ptr %33, align 8, !tbaa !24
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ZIPState, ptr %34, i32 0, i32 1
  %36 = getelementptr inbounds %struct.z_stream_s, ptr %35, i32 0, i32 10
  store ptr null, ptr %36, align 8, !tbaa !25
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ZIPState, ptr %37, i32 0, i32 1
  %39 = getelementptr inbounds %struct.z_stream_s, ptr %38, i32 0, i32 11
  store i32 0, ptr %39, align 8, !tbaa !26
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  call void @TIFFMergeFieldInfo(ptr noundef %40, ptr noundef @zipFieldInfo, i32 noundef 1)
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.tiff, ptr %41, i32 0, i32 61
  %43 = getelementptr inbounds %struct.TIFFTagMethods, ptr %42, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !27
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ZIPState, ptr %45, i32 0, i32 4
  store ptr %44, ptr %46, align 8, !tbaa !28
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.tiff, ptr %47, i32 0, i32 61
  %49 = getelementptr inbounds %struct.TIFFTagMethods, ptr %48, i32 0, i32 1
  store ptr @ZIPVGetField, ptr %49, align 8, !tbaa !27
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.tiff, ptr %50, i32 0, i32 61
  %52 = getelementptr inbounds %struct.TIFFTagMethods, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !29
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.ZIPState, ptr %54, i32 0, i32 5
  store ptr %53, ptr %55, align 8, !tbaa !30
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.tiff, ptr %56, i32 0, i32 61
  %58 = getelementptr inbounds %struct.TIFFTagMethods, ptr %57, i32 0, i32 0
  store ptr @ZIPVSetField, ptr %58, align 8, !tbaa !29
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ZIPState, ptr %59, i32 0, i32 2
  store i32 -1, ptr %60, align 8, !tbaa !31
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ZIPState, ptr %61, i32 0, i32 3
  store i32 0, ptr %62, align 4, !tbaa !32
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.tiff, ptr %63, i32 0, i32 23
  store ptr @ZIPSetupDecode, ptr %64, align 8, !tbaa !33
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.tiff, ptr %65, i32 0, i32 24
  store ptr @ZIPPreDecode, ptr %66, align 8, !tbaa !34
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.tiff, ptr %67, i32 0, i32 29
  store ptr @ZIPDecode, ptr %68, align 8, !tbaa !35
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.tiff, ptr %69, i32 0, i32 31
  store ptr @ZIPDecode, ptr %70, align 8, !tbaa !36
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.tiff, ptr %71, i32 0, i32 33
  store ptr @ZIPDecode, ptr %72, align 8, !tbaa !37
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.tiff, ptr %73, i32 0, i32 25
  store ptr @ZIPSetupEncode, ptr %74, align 8, !tbaa !38
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.tiff, ptr %75, i32 0, i32 27
  store ptr @ZIPPreEncode, ptr %76, align 8, !tbaa !39
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.tiff, ptr %77, i32 0, i32 28
  store ptr @ZIPPostEncode, ptr %78, align 8, !tbaa !40
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.tiff, ptr %79, i32 0, i32 30
  store ptr @ZIPEncode, ptr %80, align 8, !tbaa !41
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.tiff, ptr %81, i32 0, i32 32
  store ptr @ZIPEncode, ptr %82, align 8, !tbaa !42
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.tiff, ptr %83, i32 0, i32 34
  store ptr @ZIPEncode, ptr %84, align 8, !tbaa !43
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.tiff, ptr %85, i32 0, i32 37
  store ptr @ZIPCleanup, ptr %86, align 8, !tbaa !44
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = call i32 @TIFFPredictorInit(ptr noundef %87)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %93

89:                                               ; preds = %23
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.tiff, ptr %90, i32 0, i32 51
  %92 = load ptr, ptr %91, align 8, !tbaa !45
  call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %92, ptr noundef @.str.2, ptr noundef @.str.3)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %93

93:                                               ; preds = %89, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %94 = load i32, ptr %3, align 4
  ret i32 %94
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare ptr @_TIFFmalloc(i32 noundef) #3

declare void @TIFFMergeFieldInfo(ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPVGetField(ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPVSetField(ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPSetupDecode(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPPreDecode(ptr noundef, i16 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPDecode(ptr noundef, ptr noundef, i32 noundef, i16 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPSetupEncode(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPPreEncode(ptr noundef, i16 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPPostEncode(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPEncode(ptr noundef, ptr noundef, i32 noundef, i16 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden void @ZIPCleanup(ptr noundef) #0

declare i32 @TIFFPredictorInit(ptr noundef) #3

declare void @TIFFErrorExt(ptr noundef, ptr noundef, ptr noundef, ...) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 528}
!12 = !{!"tiff", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !6, i64 32, !13, i64 40, !14, i64 48, !17, i64 320, !6, i64 328, !6, i64 336, !10, i64 344, !13, i64 348, !10, i64 352, !10, i64 356, !10, i64 360, !13, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !10, i64 380, !10, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !10, i64 416, !6, i64 424, !6, i64 432, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !10, i64 536, !10, i64 540, !6, i64 544, !10, i64 552, !6, i64 560, !10, i64 568, !6, i64 576, !10, i64 584, !6, i64 592, !6, i64 600, !6, i64 608, !6, i64 616, !6, i64 624, !6, i64 632, !6, i64 640, !6, i64 648, !6, i64 656, !6, i64 664, !18, i64 672, !6, i64 680, !19, i64 688, !6, i64 712}
!13 = !{!"short", !7, i64 0}
!14 = !{!"", !7, i64 0, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !13, i64 60, !13, i64 62, !13, i64 64, !13, i64 66, !13, i64 68, !13, i64 70, !13, i64 72, !13, i64 74, !10, i64 76, !13, i64 80, !13, i64 82, !15, i64 88, !15, i64 96, !16, i64 104, !16, i64 108, !13, i64 112, !13, i64 114, !16, i64 116, !16, i64 120, !7, i64 124, !7, i64 128, !7, i64 152, !13, i64 156, !6, i64 160, !10, i64 168, !10, i64 172, !6, i64 176, !6, i64 184, !10, i64 192, !13, i64 196, !6, i64 200, !7, i64 208, !13, i64 212, !7, i64 216, !10, i64 240, !6, i64 248, !10, i64 256, !6, i64 264}
!15 = !{!"double", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!"", !13, i64 0, !13, i64 2, !10, i64 4}
!18 = !{!"long", !7, i64 0}
!19 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!21, !6, i64 152}
!21 = !{!"", !22, i64 0, !23, i64 88, !10, i64 200, !10, i64 204, !6, i64 208, !6, i64 216}
!22 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80}
!23 = !{!"z_stream_s", !6, i64 0, !10, i64 8, !18, i64 16, !6, i64 24, !10, i64 32, !18, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !18, i64 96, !18, i64 104}
!24 = !{!21, !6, i64 160}
!25 = !{!21, !6, i64 168}
!26 = !{!21, !10, i64 176}
!27 = !{!12, !6, i64 696}
!28 = !{!21, !6, i64 208}
!29 = !{!12, !6, i64 688}
!30 = !{!21, !6, i64 216}
!31 = !{!21, !10, i64 200}
!32 = !{!21, !10, i64 204}
!33 = !{!12, !6, i64 392}
!34 = !{!12, !6, i64 400}
!35 = !{!12, !6, i64 440}
!36 = !{!12, !6, i64 456}
!37 = !{!12, !6, i64 472}
!38 = !{!12, !6, i64 408}
!39 = !{!12, !6, i64 424}
!40 = !{!12, !6, i64 432}
!41 = !{!12, !6, i64 448}
!42 = !{!12, !6, i64 464}
!43 = !{!12, !6, i64 480}
!44 = !{!12, !6, i64 504}
!45 = !{!12, !6, i64 608}


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

%struct.TIFFFieldInfo = type { i32, i16, i16, i32, i16, i8, i8, ptr }

@.str = external hidden unnamed_addr constant [73 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@__PRETTY_FUNCTION__.TIFFInitZIP = external hidden unnamed_addr constant [29 x i8], align 1
@zipFieldInfo = external hidden constant [1 x %struct.TIFFFieldInfo], align 16
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @TIFFInitZIP(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  switch i32 %1, label %3 [
    i32 32946, label %4
    i32 8, label %4
  ]

3:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 323, ptr noundef nonnull @__PRETTY_FUNCTION__.TIFFInitZIP) #4
  unreachable

4:                                                ; preds = %2, %2
  %5 = tail call ptr @_TIFFmalloc(i32 noundef 224) #5
  %6 = getelementptr inbounds i8, ptr %0, i64 528
  store ptr %5, ptr %6, align 8, !tbaa !5
  %7 = icmp eq ptr %5, null
  br i1 %7, label %30, label %8

8:                                                ; preds = %4
  %9 = getelementptr inbounds i8, ptr %5, i64 152
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %9, i8 0, i64 28, i1 false)
  tail call void @TIFFMergeFieldInfo(ptr noundef nonnull %0, ptr noundef nonnull @zipFieldInfo, i32 noundef 1) #5
  %10 = getelementptr inbounds i8, ptr %0, i64 688
  %11 = getelementptr inbounds i8, ptr %0, i64 696
  %12 = getelementptr inbounds i8, ptr %5, i64 208
  %13 = load <2 x ptr>, ptr %10, align 8, !tbaa !18
  store ptr @ZIPVGetField, ptr %11, align 8, !tbaa !19
  %14 = shufflevector <2 x ptr> %13, <2 x ptr> poison, <2 x i32> <i32 1, i32 0>
  store <2 x ptr> %14, ptr %12, align 8, !tbaa !18
  store ptr @ZIPVSetField, ptr %10, align 8, !tbaa !20
  %15 = getelementptr inbounds i8, ptr %5, i64 200
  store i32 -1, ptr %15, align 8, !tbaa !21
  %16 = getelementptr inbounds i8, ptr %5, i64 204
  store i32 0, ptr %16, align 4, !tbaa !25
  %17 = getelementptr inbounds i8, ptr %0, i64 392
  store ptr @ZIPSetupDecode, ptr %17, align 8, !tbaa !26
  %18 = getelementptr inbounds i8, ptr %0, i64 400
  store ptr @ZIPPreDecode, ptr %18, align 8, !tbaa !27
  %19 = getelementptr inbounds i8, ptr %0, i64 440
  store ptr @ZIPDecode, ptr %19, align 8, !tbaa !28
  %20 = getelementptr inbounds i8, ptr %0, i64 456
  store ptr @ZIPDecode, ptr %20, align 8, !tbaa !29
  %21 = getelementptr inbounds i8, ptr %0, i64 472
  store ptr @ZIPDecode, ptr %21, align 8, !tbaa !30
  %22 = getelementptr inbounds i8, ptr %0, i64 408
  store ptr @ZIPSetupEncode, ptr %22, align 8, !tbaa !31
  %23 = getelementptr inbounds i8, ptr %0, i64 424
  store ptr @ZIPPreEncode, ptr %23, align 8, !tbaa !32
  %24 = getelementptr inbounds i8, ptr %0, i64 432
  store ptr @ZIPPostEncode, ptr %24, align 8, !tbaa !33
  %25 = getelementptr inbounds i8, ptr %0, i64 448
  store ptr @ZIPEncode, ptr %25, align 8, !tbaa !34
  %26 = getelementptr inbounds i8, ptr %0, i64 464
  store ptr @ZIPEncode, ptr %26, align 8, !tbaa !35
  %27 = getelementptr inbounds i8, ptr %0, i64 480
  store ptr @ZIPEncode, ptr %27, align 8, !tbaa !36
  %28 = getelementptr inbounds i8, ptr %0, i64 504
  store ptr @ZIPCleanup, ptr %28, align 8, !tbaa !37
  %29 = tail call i32 @TIFFPredictorInit(ptr noundef nonnull %0) #5
  br label %33

30:                                               ; preds = %4
  %31 = getelementptr inbounds i8, ptr %0, i64 608
  %32 = load ptr, ptr %31, align 8, !tbaa !38
  tail call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %32, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3) #5
  br label %33

33:                                               ; preds = %30, %8
  %.0 = phi i32 [ 0, %30 ], [ 1, %8 ]
  ret i32 %.0
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @_TIFFmalloc(i32 noundef) local_unnamed_addr #2

declare void @TIFFMergeFieldInfo(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPVGetField(ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPVSetField(ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPSetupDecode(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPPreDecode(ptr noundef, i16 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPDecode(ptr noundef, ptr noundef, i32 noundef, i16 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPSetupEncode(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPPreEncode(ptr noundef, i16 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPPostEncode(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @ZIPEncode(ptr noundef, ptr noundef, i32 noundef, i16 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden void @ZIPCleanup(ptr noundef) #0

declare i32 @TIFFPredictorInit(ptr noundef) local_unnamed_addr #2

declare void @TIFFErrorExt(ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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: write) }
attributes #4 = { noreturn nounwind }
attributes #5 = { 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 528}
!6 = !{!"tiff", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !7, i64 32, !11, i64 40, !12, i64 48, !15, i64 320, !7, i64 328, !7, i64 336, !10, i64 344, !11, i64 348, !10, i64 352, !10, i64 356, !10, i64 360, !11, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !10, i64 380, !10, i64 384, !7, i64 392, !7, i64 400, !7, i64 408, !10, i64 416, !7, i64 424, !7, i64 432, !7, i64 440, !7, i64 448, !7, i64 456, !7, i64 464, !7, i64 472, !7, i64 480, !7, i64 488, !7, i64 496, !7, i64 504, !7, i64 512, !7, i64 520, !7, i64 528, !10, i64 536, !10, i64 540, !7, i64 544, !10, i64 552, !7, i64 560, !10, i64 568, !7, i64 576, !10, i64 584, !7, i64 592, !7, i64 600, !7, i64 608, !7, i64 616, !7, i64 624, !7, i64 632, !7, i64 640, !7, i64 648, !7, i64 656, !7, i64 664, !16, i64 672, !7, i64 680, !17, i64 688, !7, i64 712}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"short", !8, i64 0}
!12 = !{!"", !8, i64 0, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !11, i64 60, !11, i64 62, !11, i64 64, !11, i64 66, !11, i64 68, !11, i64 70, !11, i64 72, !11, i64 74, !10, i64 76, !11, i64 80, !11, i64 82, !13, i64 88, !13, i64 96, !14, i64 104, !14, i64 108, !11, i64 112, !11, i64 114, !14, i64 116, !14, i64 120, !8, i64 124, !8, i64 128, !8, i64 152, !11, i64 156, !7, i64 160, !10, i64 168, !10, i64 172, !7, i64 176, !7, i64 184, !10, i64 192, !11, i64 196, !7, i64 200, !8, i64 208, !11, i64 212, !8, i64 216, !10, i64 240, !7, i64 248, !10, i64 256, !7, i64 264}
!13 = !{!"double", !8, i64 0}
!14 = !{!"float", !8, i64 0}
!15 = !{!"", !11, i64 0, !11, i64 2, !10, i64 4}
!16 = !{!"long", !8, i64 0}
!17 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16}
!18 = !{!7, !7, i64 0}
!19 = !{!6, !7, i64 696}
!20 = !{!6, !7, i64 688}
!21 = !{!22, !10, i64 200}
!22 = !{!"", !23, i64 0, !24, i64 88, !10, i64 200, !10, i64 204, !7, i64 208, !7, i64 216}
!23 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80}
!24 = !{!"z_stream_s", !7, i64 0, !10, i64 8, !16, i64 16, !7, i64 24, !10, i64 32, !16, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !10, i64 88, !16, i64 96, !16, i64 104}
!25 = !{!22, !10, i64 204}
!26 = !{!6, !7, i64 392}
!27 = !{!6, !7, i64 400}
!28 = !{!6, !7, i64 440}
!29 = !{!6, !7, i64 456}
!30 = !{!6, !7, i64 472}
!31 = !{!6, !7, i64 408}
!32 = !{!6, !7, i64 424}
!33 = !{!6, !7, i64 432}
!34 = !{!6, !7, i64 448}
!35 = !{!6, !7, i64 464}
!36 = !{!6, !7, i64 480}
!37 = !{!6, !7, i64 504}
!38 = !{!6, !7, i64 608}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass