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

; 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.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 }

@.str.4 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @TIFFWriteCheck(ptr noundef %0, i32 noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %8 = load ptr, ptr %5, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.tiff, ptr %8, i32 0, i32 2
  %10 = load i32, ptr %9, align 4, !tbaa !11
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %20

12:                                               ; preds = %3
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.tiff, ptr %13, i32 0, i32 51
  %15 = load ptr, ptr %14, align 8, !tbaa !20
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.tiff, ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !21
  call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %15, ptr noundef %16, ptr noundef @.str.4, ptr noundef %19)
  store i32 0, ptr %4, align 4
  br label %135

20:                                               ; preds = %3
  %21 = load i32, ptr %6, align 4, !tbaa !9
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.tiff, ptr %22, i32 0, i32 3
  %24 = load i32, ptr %23, align 8, !tbaa !22
  %25 = and i32 %24, 1024
  %26 = icmp ne i32 %25, 0
  %27 = zext i1 %26 to i32
  %28 = xor i32 %21, %27
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %41

30:                                               ; preds = %20
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.tiff, ptr %31, i32 0, i32 51
  %33 = load ptr, ptr %32, align 8, !tbaa !20
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.tiff, ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !21
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = icmp ne i32 %37, 0
  %39 = zext i1 %38 to i64
  %40 = select i1 %38, ptr @.str.5, ptr @.str.6
  call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %33, ptr noundef %36, ptr noundef %40)
  store i32 0, ptr %4, align 4
  br label %135

41:                                               ; preds = %20
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.tiff, ptr %42, i32 0, i32 8
  %44 = getelementptr inbounds %struct.TIFFDirectory, ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds [4 x i64], ptr %44, i64 0, i64 0
  %46 = load i64, ptr %45, align 8, !tbaa !23
  %47 = and i64 %46, 2
  %48 = icmp ne i64 %47, 0
  br i1 %48, label %57, label %49

49:                                               ; preds = %41
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.tiff, ptr %50, i32 0, i32 51
  %52 = load ptr, ptr %51, align 8, !tbaa !20
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.tiff, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !21
  call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %52, ptr noundef %53, ptr noundef @.str.7, ptr noundef %56)
  store i32 0, ptr %4, align 4
  br label %135

57:                                               ; preds = %41
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.tiff, ptr %58, i32 0, i32 8
  %60 = getelementptr inbounds %struct.TIFFDirectory, ptr %59, i32 0, i32 15
  %61 = load i16, ptr %60, align 2, !tbaa !24
  %62 = zext i16 %61 to i32
  %63 = icmp eq i32 %62, 1
  br i1 %63, label %64, label %68

64:                                               ; preds = %57
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.tiff, ptr %65, i32 0, i32 8
  %67 = getelementptr inbounds %struct.TIFFDirectory, ptr %66, i32 0, i32 24
  store i16 1, ptr %67, align 2, !tbaa !25
  br label %85

68:                                               ; preds = %57
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.tiff, ptr %69, i32 0, i32 8
  %71 = getelementptr inbounds %struct.TIFFDirectory, ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds [4 x i64], ptr %71, i64 0, i64 0
  %73 = load i64, ptr %72, align 8, !tbaa !23
  %74 = and i64 %73, 1048576
  %75 = icmp ne i64 %74, 0
  br i1 %75, label %84, label %76

76:                                               ; preds = %68
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.tiff, ptr %77, i32 0, i32 51
  %79 = load ptr, ptr %78, align 8, !tbaa !20
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.tiff, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !21
  call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %79, ptr noundef %80, ptr noundef @.str.8, ptr noundef %83)
  store i32 0, ptr %4, align 4
  br label %135

84:                                               ; preds = %68
  br label %85

85:                                               ; preds = %84, %64
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.tiff, ptr %86, i32 0, i32 8
  %88 = getelementptr inbounds %struct.TIFFDirectory, ptr %87, i32 0, i32 34
  %89 = load ptr, ptr %88, align 8, !tbaa !26
  %90 = icmp eq ptr %89, null
  br i1 %90, label %91, label %113

91:                                               ; preds = %85
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = call i32 @TIFFSetupStrips(ptr noundef %92)
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %113, label %95

95:                                               ; preds = %91
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.tiff, ptr %96, i32 0, i32 8
  %98 = getelementptr inbounds %struct.TIFFDirectory, ptr %97, i32 0, i32 33
  store i32 0, ptr %98, align 4, !tbaa !27
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.tiff, ptr %99, i32 0, i32 51
  %101 = load ptr, ptr %100, align 8, !tbaa !20
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.tiff, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !21
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.tiff, ptr %106, i32 0, i32 3
  %108 = load i32, ptr %107, align 8, !tbaa !22
  %109 = and i32 %108, 1024
  %110 = icmp ne i32 %109, 0
  %111 = zext i1 %110 to i64
  %112 = select i1 %110, ptr @.str.10, ptr @.str.11
  call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %101, ptr noundef %102, ptr noundef @.str.9, ptr noundef %105, ptr noundef %112)
  store i32 0, ptr %4, align 4
  br label %135

113:                                              ; preds = %91, %85
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.tiff, ptr %114, i32 0, i32 3
  %116 = load i32, ptr %115, align 8, !tbaa !22
  %117 = and i32 %116, 1024
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %119, label %122

119:                                              ; preds = %113
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = call i32 @TIFFTileSize(ptr noundef %120)
  br label %123

122:                                              ; preds = %113
  br label %123

123:                                              ; preds = %122, %119
  %124 = phi i32 [ %121, %119 ], [ -1, %122 ]
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.tiff, ptr %125, i32 0, i32 21
  store i32 %124, ptr %126, align 4, !tbaa !28
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = call i32 @TIFFScanlineSize(ptr noundef %127)
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.tiff, ptr %129, i32 0, i32 41
  store i32 %128, ptr %130, align 8, !tbaa !29
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.tiff, ptr %131, i32 0, i32 3
  %133 = load i32, ptr %132, align 8, !tbaa !22
  %134 = or i32 %133, 64
  store i32 %134, ptr %132, align 8, !tbaa !22
  store i32 1, ptr %4, align 4
  br label %135

135:                                              ; preds = %123, %95, %76, %49, %30, %12
  %136 = load i32, ptr %4, align 4
  ret i32 %136
}

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @TIFFSetupStrips(ptr noundef) #0

declare i32 @TIFFTileSize(ptr noundef) #1

declare i32 @TIFFScanlineSize(ptr noundef) #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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, !10, i64 12}
!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 = !{!12, !6, i64 608}
!21 = !{!12, !6, i64 0}
!22 = !{!12, !10, i64 16}
!23 = !{!18, !18, i64 0}
!24 = !{!12, !13, i64 122}
!25 = !{!12, !13, i64 162}
!26 = !{!12, !6, i64 224}
!27 = !{!12, !10, i64 220}
!28 = !{!12, !10, i64 380}
!29 = !{!12, !10, i64 536}


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

@.str.4 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @TIFFWriteCheck(ptr noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 12
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = icmp eq i32 %5, 0
  br i1 %6, label %7, label %11

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 608
  %9 = load ptr, ptr %8, align 8, !tbaa !18
  %10 = load ptr, ptr %0, align 8, !tbaa !19
  tail call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %9, ptr noundef %2, ptr noundef nonnull @.str.4, ptr noundef %10) #2
  br label %65

11:                                               ; preds = %3
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load i32, ptr %12, align 8, !tbaa !20
  %14 = lshr i32 %13, 10
  %.lobit = and i32 %14, 1
  %.not = icmp eq i32 %.lobit, %1
  br i1 %.not, label %20, label %15

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %0, i64 608
  %17 = load ptr, ptr %16, align 8, !tbaa !18
  %18 = load ptr, ptr %0, align 8, !tbaa !19
  %.not37 = icmp eq i32 %1, 0
  %19 = select i1 %.not37, ptr @.str.6, ptr @.str.5
  tail call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %17, ptr noundef %18, ptr noundef nonnull %19) #2
  br label %65

20:                                               ; preds = %11
  %21 = getelementptr inbounds i8, ptr %0, i64 48
  %22 = load i64, ptr %21, align 8, !tbaa !21
  %23 = and i64 %22, 2
  %.not32 = icmp eq i64 %23, 0
  br i1 %.not32, label %24, label %28

24:                                               ; preds = %20
  %25 = getelementptr inbounds i8, ptr %0, i64 608
  %26 = load ptr, ptr %25, align 8, !tbaa !18
  %27 = load ptr, ptr %0, align 8, !tbaa !19
  tail call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %26, ptr noundef %2, ptr noundef nonnull @.str.7, ptr noundef %27) #2
  br label %65

28:                                               ; preds = %20
  %29 = getelementptr inbounds i8, ptr %0, i64 122
  %30 = load i16, ptr %29, align 2, !tbaa !22
  %31 = icmp eq i16 %30, 1
  br i1 %31, label %32, label %34

32:                                               ; preds = %28
  %33 = getelementptr inbounds i8, ptr %0, i64 162
  store i16 1, ptr %33, align 2, !tbaa !23
  br label %40

34:                                               ; preds = %28
  %35 = and i64 %22, 1048576
  %.not33 = icmp eq i64 %35, 0
  br i1 %.not33, label %36, label %40

36:                                               ; preds = %34
  %37 = getelementptr inbounds i8, ptr %0, i64 608
  %38 = load ptr, ptr %37, align 8, !tbaa !18
  %39 = load ptr, ptr %0, align 8, !tbaa !19
  tail call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %38, ptr noundef %2, ptr noundef nonnull @.str.8, ptr noundef %39) #2
  br label %65

40:                                               ; preds = %34, %32
  %41 = getelementptr inbounds i8, ptr %0, i64 224
  %42 = load ptr, ptr %41, align 8, !tbaa !24
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %53

44:                                               ; preds = %40
  %45 = tail call i32 @TIFFSetupStrips(ptr noundef nonnull %0)
  %.not34 = icmp eq i32 %45, 0
  %.pre = load i32, ptr %12, align 8, !tbaa !20
  br i1 %.not34, label %46, label %53

46:                                               ; preds = %44
  %47 = getelementptr inbounds i8, ptr %0, i64 220
  store i32 0, ptr %47, align 4, !tbaa !25
  %48 = getelementptr inbounds i8, ptr %0, i64 608
  %49 = load ptr, ptr %48, align 8, !tbaa !18
  %50 = load ptr, ptr %0, align 8, !tbaa !19
  %51 = and i32 %.pre, 1024
  %.not35 = icmp eq i32 %51, 0
  %52 = select i1 %.not35, ptr @.str.11, ptr @.str.10
  tail call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %49, ptr noundef %2, ptr noundef nonnull @.str.9, ptr noundef %50, ptr noundef nonnull %52) #2
  br label %65

53:                                               ; preds = %44, %40
  %54 = phi i32 [ %.pre, %44 ], [ %13, %40 ]
  %55 = and i32 %54, 1024
  %.not36 = icmp eq i32 %55, 0
  br i1 %.not36, label %58, label %56

56:                                               ; preds = %53
  %57 = tail call i32 @TIFFTileSize(ptr noundef nonnull %0) #2
  br label %58

58:                                               ; preds = %53, %56
  %59 = phi i32 [ %57, %56 ], [ -1, %53 ]
  %60 = getelementptr inbounds i8, ptr %0, i64 380
  store i32 %59, ptr %60, align 4, !tbaa !26
  %61 = tail call i32 @TIFFScanlineSize(ptr noundef nonnull %0) #2
  %62 = getelementptr inbounds i8, ptr %0, i64 536
  store i32 %61, ptr %62, align 8, !tbaa !27
  %63 = load i32, ptr %12, align 8, !tbaa !20
  %64 = or i32 %63, 64
  store i32 %64, ptr %12, align 8, !tbaa !20
  br label %65

65:                                               ; preds = %58, %46, %36, %24, %15, %7
  %.0 = phi i32 [ 0, %7 ], [ 0, %15 ], [ 1, %58 ], [ 0, %46 ], [ 0, %36 ], [ 0, %24 ]
  ret i32 %.0
}

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @TIFFSetupStrips(ptr noundef) local_unnamed_addr #0

declare i32 @TIFFTileSize(ptr noundef) local_unnamed_addr #1

declare i32 @TIFFScanlineSize(ptr noundef) local_unnamed_addr #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 = { "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 = { 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, !10, i64 12}
!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 = !{!6, !7, i64 608}
!19 = !{!6, !7, i64 0}
!20 = !{!6, !10, i64 16}
!21 = !{!16, !16, i64 0}
!22 = !{!6, !11, i64 122}
!23 = !{!6, !11, i64 162}
!24 = !{!6, !7, i64 224}
!25 = !{!6, !10, i64 220}
!26 = !{!6, !10, i64 380}
!27 = !{!6, !10, i64 536}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass