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

; 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 }
%struct._TIFFTagValue = 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 void @TIFFFreeDirectory(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct.tiff, ptr %5, i32 0, i32 8
  store ptr %6, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.TIFFDirectory, ptr %7, i32 0, i32 0
  %9 = getelementptr inbounds [4 x i64], ptr %8, i64 0, i64 0
  call void @_TIFFmemset(ptr noundef %9, i32 noundef 0, i32 noundef 4)
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.TIFFDirectory, ptr %10, i32 0, i32 28
  %12 = getelementptr inbounds [3 x ptr], ptr %11, i64 0, i64 0
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %23

15:                                               ; preds = %1
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.TIFFDirectory, ptr %16, i32 0, i32 28
  %18 = getelementptr inbounds [3 x ptr], ptr %17, i64 0, i64 0
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_TIFFfree(ptr noundef %19)
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.TIFFDirectory, ptr %20, i32 0, i32 28
  %22 = getelementptr inbounds [3 x ptr], ptr %21, i64 0, i64 0
  store ptr null, ptr %22, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %15, %1
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.TIFFDirectory, ptr %24, i32 0, i32 28
  %26 = getelementptr inbounds [3 x ptr], ptr %25, i64 0, i64 1
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %37

29:                                               ; preds = %23
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.TIFFDirectory, ptr %30, i32 0, i32 28
  %32 = getelementptr inbounds [3 x ptr], ptr %31, i64 0, i64 1
  %33 = load ptr, ptr %32, align 8, !tbaa !5
  call void @_TIFFfree(ptr noundef %33)
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.TIFFDirectory, ptr %34, i32 0, i32 28
  %36 = getelementptr inbounds [3 x ptr], ptr %35, i64 0, i64 1
  store ptr null, ptr %36, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %29, %23
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.TIFFDirectory, ptr %38, i32 0, i32 28
  %40 = getelementptr inbounds [3 x ptr], ptr %39, i64 0, i64 2
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %51

43:                                               ; preds = %37
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.TIFFDirectory, ptr %44, i32 0, i32 28
  %46 = getelementptr inbounds [3 x ptr], ptr %45, i64 0, i64 2
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  call void @_TIFFfree(ptr noundef %47)
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.TIFFDirectory, ptr %48, i32 0, i32 28
  %50 = getelementptr inbounds [3 x ptr], ptr %49, i64 0, i64 2
  store ptr null, ptr %50, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %43, %37
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.TIFFDirectory, ptr %52, i32 0, i32 31
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %62

56:                                               ; preds = %51
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.TIFFDirectory, ptr %57, i32 0, i32 31
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  call void @_TIFFfree(ptr noundef %59)
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.TIFFDirectory, ptr %60, i32 0, i32 31
  store ptr null, ptr %61, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %56, %51
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.TIFFDirectory, ptr %63, i32 0, i32 38
  %65 = load ptr, ptr %64, align 8, !tbaa !15
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %73

67:                                               ; preds = %62
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.TIFFDirectory, ptr %68, i32 0, i32 38
  %70 = load ptr, ptr %69, align 8, !tbaa !15
  call void @_TIFFfree(ptr noundef %70)
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.TIFFDirectory, ptr %71, i32 0, i32 38
  store ptr null, ptr %72, align 8, !tbaa !15
  br label %73

73:                                               ; preds = %67, %62
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.TIFFDirectory, ptr %74, i32 0, i32 43
  %76 = load ptr, ptr %75, align 8, !tbaa !16
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %84

78:                                               ; preds = %73
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.TIFFDirectory, ptr %79, i32 0, i32 43
  %81 = load ptr, ptr %80, align 8, !tbaa !16
  call void @_TIFFfree(ptr noundef %81)
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.TIFFDirectory, ptr %82, i32 0, i32 43
  store ptr null, ptr %83, align 8, !tbaa !16
  br label %84

84:                                               ; preds = %78, %73
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.TIFFDirectory, ptr %85, i32 0, i32 41
  %87 = getelementptr inbounds [3 x ptr], ptr %86, i64 0, i64 0
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %98

90:                                               ; preds = %84
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.TIFFDirectory, ptr %91, i32 0, i32 41
  %93 = getelementptr inbounds [3 x ptr], ptr %92, i64 0, i64 0
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  call void @_TIFFfree(ptr noundef %94)
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.TIFFDirectory, ptr %95, i32 0, i32 41
  %97 = getelementptr inbounds [3 x ptr], ptr %96, i64 0, i64 0
  store ptr null, ptr %97, align 8, !tbaa !5
  br label %98

98:                                               ; preds = %90, %84
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.TIFFDirectory, ptr %99, i32 0, i32 41
  %101 = getelementptr inbounds [3 x ptr], ptr %100, i64 0, i64 1
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %112

104:                                              ; preds = %98
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.TIFFDirectory, ptr %105, i32 0, i32 41
  %107 = getelementptr inbounds [3 x ptr], ptr %106, i64 0, i64 1
  %108 = load ptr, ptr %107, align 8, !tbaa !5
  call void @_TIFFfree(ptr noundef %108)
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.TIFFDirectory, ptr %109, i32 0, i32 41
  %111 = getelementptr inbounds [3 x ptr], ptr %110, i64 0, i64 1
  store ptr null, ptr %111, align 8, !tbaa !5
  br label %112

112:                                              ; preds = %104, %98
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.TIFFDirectory, ptr %113, i32 0, i32 41
  %115 = getelementptr inbounds [3 x ptr], ptr %114, i64 0, i64 2
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = icmp ne ptr %116, null
  br i1 %117, label %118, label %126

118:                                              ; preds = %112
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.TIFFDirectory, ptr %119, i32 0, i32 41
  %121 = getelementptr inbounds [3 x ptr], ptr %120, i64 0, i64 2
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  call void @_TIFFfree(ptr noundef %122)
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.TIFFDirectory, ptr %123, i32 0, i32 41
  %125 = getelementptr inbounds [3 x ptr], ptr %124, i64 0, i64 2
  store ptr null, ptr %125, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %118, %112
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.TIFFDirectory, ptr %127, i32 0, i32 34
  %129 = load ptr, ptr %128, align 8, !tbaa !17
  %130 = icmp ne ptr %129, null
  br i1 %130, label %131, label %137

131:                                              ; preds = %126
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.TIFFDirectory, ptr %132, i32 0, i32 34
  %134 = load ptr, ptr %133, align 8, !tbaa !17
  call void @_TIFFfree(ptr noundef %134)
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.TIFFDirectory, ptr %135, i32 0, i32 34
  store ptr null, ptr %136, align 8, !tbaa !17
  br label %137

137:                                              ; preds = %131, %126
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.TIFFDirectory, ptr %138, i32 0, i32 35
  %140 = load ptr, ptr %139, align 8, !tbaa !18
  %141 = icmp ne ptr %140, null
  br i1 %141, label %142, label %148

142:                                              ; preds = %137
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.TIFFDirectory, ptr %143, i32 0, i32 35
  %145 = load ptr, ptr %144, align 8, !tbaa !18
  call void @_TIFFfree(ptr noundef %145)
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.TIFFDirectory, ptr %146, i32 0, i32 35
  store ptr null, ptr %147, align 8, !tbaa !18
  br label %148

148:                                              ; preds = %142, %137
  %149 = load ptr, ptr %2, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.tiff, ptr %149, i32 0, i32 8
  %151 = getelementptr inbounds %struct.TIFFDirectory, ptr %150, i32 0, i32 0
  %152 = getelementptr inbounds [4 x i64], ptr %151, i64 0, i64 1
  %153 = load i64, ptr %152, align 8, !tbaa !19
  %154 = and i64 %153, -129
  store i64 %154, ptr %152, align 8, !tbaa !19
  %155 = load ptr, ptr %2, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.tiff, ptr %155, i32 0, i32 8
  %157 = getelementptr inbounds %struct.TIFFDirectory, ptr %156, i32 0, i32 0
  %158 = getelementptr inbounds [4 x i64], ptr %157, i64 0, i64 1
  %159 = load i64, ptr %158, align 8, !tbaa !19
  %160 = and i64 %159, -257
  store i64 %160, ptr %158, align 8, !tbaa !19
  store i32 0, ptr %4, align 4, !tbaa !21
  br label %161

161:                                              ; preds = %187, %148
  %162 = load i32, ptr %4, align 4, !tbaa !21
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.TIFFDirectory, ptr %163, i32 0, i32 44
  %165 = load i32, ptr %164, align 8, !tbaa !22
  %166 = icmp slt i32 %162, %165
  br i1 %166, label %167, label %190

167:                                              ; preds = %161
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.TIFFDirectory, ptr %168, i32 0, i32 45
  %170 = load ptr, ptr %169, align 8, !tbaa !23
  %171 = load i32, ptr %4, align 4, !tbaa !21
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds %struct._TIFFTagValue, ptr %170, i64 %172
  %174 = getelementptr inbounds %struct._TIFFTagValue, ptr %173, i32 0, i32 2
  %175 = load ptr, ptr %174, align 8, !tbaa !24
  %176 = icmp ne ptr %175, null
  br i1 %176, label %177, label %186

177:                                              ; preds = %167
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.TIFFDirectory, ptr %178, i32 0, i32 45
  %180 = load ptr, ptr %179, align 8, !tbaa !23
  %181 = load i32, ptr %4, align 4, !tbaa !21
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds %struct._TIFFTagValue, ptr %180, i64 %182
  %184 = getelementptr inbounds %struct._TIFFTagValue, ptr %183, i32 0, i32 2
  %185 = load ptr, ptr %184, align 8, !tbaa !24
  call void @_TIFFfree(ptr noundef %185)
  br label %186

186:                                              ; preds = %177, %167
  br label %187

187:                                              ; preds = %186
  %188 = load i32, ptr %4, align 4, !tbaa !21
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %4, align 4, !tbaa !21
  br label %161, !llvm.loop !26

190:                                              ; preds = %161
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.TIFFDirectory, ptr %191, i32 0, i32 44
  store i32 0, ptr %192, align 8, !tbaa !22
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.TIFFDirectory, ptr %193, i32 0, i32 45
  %195 = load ptr, ptr %194, align 8, !tbaa !23
  %196 = icmp ne ptr %195, null
  br i1 %196, label %197, label %203

197:                                              ; preds = %190
  %198 = load ptr, ptr %3, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.TIFFDirectory, ptr %198, i32 0, i32 45
  %200 = load ptr, ptr %199, align 8, !tbaa !23
  call void @_TIFFfree(ptr noundef %200)
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.TIFFDirectory, ptr %201, i32 0, i32 45
  store ptr null, ptr %202, align 8, !tbaa !23
  br label %203

203:                                              ; preds = %197, %190
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret void
}

declare void @_TIFFmemset(ptr noundef, i32 noundef, i32 noundef) #2

declare void @_TIFFfree(ptr noundef) #2

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 = { 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 160}
!10 = !{!"", !7, i64 0, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !12, i64 60, !12, i64 62, !12, i64 64, !12, i64 66, !12, i64 68, !12, i64 70, !12, i64 72, !12, i64 74, !11, i64 76, !12, i64 80, !12, i64 82, !13, i64 88, !13, i64 96, !14, i64 104, !14, i64 108, !12, i64 112, !12, i64 114, !14, i64 116, !14, i64 120, !7, i64 124, !7, i64 128, !7, i64 152, !12, i64 156, !6, i64 160, !11, i64 168, !11, i64 172, !6, i64 176, !6, i64 184, !11, i64 192, !12, i64 196, !6, i64 200, !7, i64 208, !12, i64 212, !7, i64 216, !11, i64 240, !6, i64 248, !11, i64 256, !6, i64 264}
!11 = !{!"int", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!10, !6, i64 200}
!16 = !{!10, !6, i64 248}
!17 = !{!10, !6, i64 176}
!18 = !{!10, !6, i64 184}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!11, !11, i64 0}
!22 = !{!10, !11, i64 256}
!23 = !{!10, !6, i64 264}
!24 = !{!25, !6, i64 16}
!25 = !{!"_TIFFTagValue", !6, i64 0, !11, i64 8, !6, i64 16}
!26 = distinct !{!26, !27}
!27 = !{!"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"

%struct._TIFFTagValue = type { ptr, i32, ptr }

; Function Attrs: nounwind uwtable
define dso_local void @TIFFFreeDirectory(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 48
  tail call void @_TIFFmemset(ptr noundef nonnull %2, i32 noundef 0, i32 noundef 4) #2
  %3 = getelementptr inbounds i8, ptr %0, i64 176
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %6, label %5

5:                                                ; preds = %1
  tail call void @_TIFFfree(ptr noundef nonnull %4) #2
  store ptr null, ptr %3, align 8, !tbaa !5
  br label %6

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

9:                                                ; preds = %6
  tail call void @_TIFFfree(ptr noundef nonnull %8) #2
  store ptr null, ptr %7, align 8, !tbaa !5
  br label %10

10:                                               ; preds = %9, %6
  %11 = getelementptr inbounds i8, ptr %0, i64 192
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %.not61 = icmp eq ptr %12, null
  br i1 %.not61, label %14, label %13

13:                                               ; preds = %10
  tail call void @_TIFFfree(ptr noundef nonnull %12) #2
  store ptr null, ptr %11, align 8, !tbaa !5
  br label %14

14:                                               ; preds = %13, %10
  %15 = getelementptr inbounds i8, ptr %0, i64 208
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %.not62 = icmp eq ptr %16, null
  br i1 %.not62, label %18, label %17

17:                                               ; preds = %14
  tail call void @_TIFFfree(ptr noundef nonnull %16) #2
  store ptr null, ptr %15, align 8, !tbaa !9
  br label %18

18:                                               ; preds = %17, %14
  %19 = getelementptr inbounds i8, ptr %0, i64 248
  %20 = load ptr, ptr %19, align 8, !tbaa !15
  %.not63 = icmp eq ptr %20, null
  br i1 %.not63, label %22, label %21

21:                                               ; preds = %18
  tail call void @_TIFFfree(ptr noundef nonnull %20) #2
  store ptr null, ptr %19, align 8, !tbaa !15
  br label %22

22:                                               ; preds = %21, %18
  %23 = getelementptr inbounds i8, ptr %0, i64 296
  %24 = load ptr, ptr %23, align 8, !tbaa !16
  %.not64 = icmp eq ptr %24, null
  br i1 %.not64, label %26, label %25

25:                                               ; preds = %22
  tail call void @_TIFFfree(ptr noundef nonnull %24) #2
  store ptr null, ptr %23, align 8, !tbaa !16
  br label %26

26:                                               ; preds = %25, %22
  %27 = getelementptr inbounds i8, ptr %0, i64 264
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %.not65 = icmp eq ptr %28, null
  br i1 %.not65, label %30, label %29

29:                                               ; preds = %26
  tail call void @_TIFFfree(ptr noundef nonnull %28) #2
  store ptr null, ptr %27, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %29, %26
  %31 = getelementptr inbounds i8, ptr %0, i64 272
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %.not66 = icmp eq ptr %32, null
  br i1 %.not66, label %34, label %33

33:                                               ; preds = %30
  tail call void @_TIFFfree(ptr noundef nonnull %32) #2
  store ptr null, ptr %31, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %33, %30
  %35 = getelementptr inbounds i8, ptr %0, i64 280
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %.not67 = icmp eq ptr %36, null
  br i1 %.not67, label %38, label %37

37:                                               ; preds = %34
  tail call void @_TIFFfree(ptr noundef nonnull %36) #2
  store ptr null, ptr %35, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %37, %34
  %39 = getelementptr inbounds i8, ptr %0, i64 224
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %.not68 = icmp eq ptr %40, null
  br i1 %.not68, label %42, label %41

41:                                               ; preds = %38
  tail call void @_TIFFfree(ptr noundef nonnull %40) #2
  store ptr null, ptr %39, align 8, !tbaa !17
  br label %42

42:                                               ; preds = %41, %38
  %43 = getelementptr inbounds i8, ptr %0, i64 232
  %44 = load ptr, ptr %43, align 8, !tbaa !18
  %.not69 = icmp eq ptr %44, null
  br i1 %.not69, label %46, label %45

45:                                               ; preds = %42
  tail call void @_TIFFfree(ptr noundef nonnull %44) #2
  store ptr null, ptr %43, align 8, !tbaa !18
  br label %46

46:                                               ; preds = %45, %42
  %47 = getelementptr inbounds i8, ptr %0, i64 56
  %48 = load i64, ptr %47, align 8, !tbaa !19
  %49 = and i64 %48, -385
  store i64 %49, ptr %47, align 8, !tbaa !19
  %50 = getelementptr inbounds i8, ptr %0, i64 304
  %51 = load i32, ptr %50, align 8, !tbaa !21
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %46
  %53 = getelementptr inbounds i8, ptr %0, i64 312
  br label %54

54:                                               ; preds = %.lr.ph, %60
  %55 = phi i32 [ %51, %.lr.ph ], [ %61, %60 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %60 ]
  %56 = load ptr, ptr %53, align 8, !tbaa !22
  %57 = getelementptr inbounds %struct._TIFFTagValue, ptr %56, i64 %indvars.iv, i32 2
  %58 = load ptr, ptr %57, align 8, !tbaa !23
  %.not71 = icmp eq ptr %58, null
  br i1 %.not71, label %60, label %59

59:                                               ; preds = %54
  tail call void @_TIFFfree(ptr noundef nonnull %58) #2
  %.pre = load i32, ptr %50, align 8, !tbaa !21
  br label %60

60:                                               ; preds = %54, %59
  %61 = phi i32 [ %55, %54 ], [ %.pre, %59 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %62 = sext i32 %61 to i64
  %63 = icmp slt i64 %indvars.iv.next, %62
  br i1 %63, label %54, label %._crit_edge, !llvm.loop !25

._crit_edge:                                      ; preds = %60, %46
  store i32 0, ptr %50, align 8, !tbaa !21
  %64 = getelementptr inbounds i8, ptr %0, i64 312
  %65 = load ptr, ptr %64, align 8, !tbaa !22
  %.not70 = icmp eq ptr %65, null
  br i1 %.not70, label %67, label %66

66:                                               ; preds = %._crit_edge
  tail call void @_TIFFfree(ptr noundef nonnull %65) #2
  store ptr null, ptr %64, align 8, !tbaa !22
  br label %67

67:                                               ; preds = %66, %._crit_edge
  ret void
}

declare void @_TIFFmemset(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @_TIFFfree(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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 160}
!10 = !{!"", !7, i64 0, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !12, i64 60, !12, i64 62, !12, i64 64, !12, i64 66, !12, i64 68, !12, i64 70, !12, i64 72, !12, i64 74, !11, i64 76, !12, i64 80, !12, i64 82, !13, i64 88, !13, i64 96, !14, i64 104, !14, i64 108, !12, i64 112, !12, i64 114, !14, i64 116, !14, i64 120, !7, i64 124, !7, i64 128, !7, i64 152, !12, i64 156, !6, i64 160, !11, i64 168, !11, i64 172, !6, i64 176, !6, i64 184, !11, i64 192, !12, i64 196, !6, i64 200, !7, i64 208, !12, i64 212, !7, i64 216, !11, i64 240, !6, i64 248, !11, i64 256, !6, i64 264}
!11 = !{!"int", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!10, !6, i64 200}
!16 = !{!10, !6, i64 248}
!17 = !{!10, !6, i64 176}
!18 = !{!10, !6, i64 184}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!10, !11, i64 256}
!22 = !{!10, !6, i64 264}
!23 = !{!24, !6, i64 16}
!24 = !{!"_TIFFTagValue", !6, i64 0, !11, i64 8, !6, i64 16}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


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