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

; 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.logLuvState = type { i32, i32, i32, ptr, i32, ptr, ptr, ptr }

@TIFFInitSGILog.module = external hidden constant [15 x i8], align 1
@.str = external hidden unnamed_addr constant [63 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@__PRETTY_FUNCTION__.TIFFInitSGILog = external hidden unnamed_addr constant [32 x i8], align 1
@LogLuvFieldInfo = external hidden constant [2 x %struct.TIFFFieldInfo], align 16
@.str.2 = external hidden unnamed_addr constant [36 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @TIFFInitSGILog(ptr noundef %0, i32 noundef %1) #1 {
  %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, 34677
  br i1 %9, label %13, label %10

10:                                               ; preds = %2
  %11 = load i32, ptr %5, align 4, !tbaa !9
  %12 = icmp eq i32 %11, 34676
  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 1561, ptr noundef @__PRETTY_FUNCTION__.TIFFInitSGILog) #5
  unreachable

15:                                               ; preds = %13
  %16 = call ptr @_TIFFmalloc(i32 noundef 56)
  %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 %74

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
  call void @_TIFFmemset(ptr noundef %28, i32 noundef 0, i32 noundef 56)
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.logLuvState, ptr %29, i32 0, i32 0
  store i32 -1, ptr %30, align 8, !tbaa !20
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = icmp eq i32 %31, 34677
  %33 = zext i1 %32 to i64
  %34 = select i1 %32, i32 1, i32 0
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.logLuvState, ptr %35, i32 0, i32 1
  store i32 %34, ptr %36, align 4, !tbaa !22
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.logLuvState, ptr %37, i32 0, i32 5
  store ptr @_logLuvNop, ptr %38, align 8, !tbaa !23
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.tiff, ptr %39, i32 0, i32 23
  store ptr @LogLuvSetupDecode, ptr %40, align 8, !tbaa !24
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.tiff, ptr %41, i32 0, i32 31
  store ptr @LogLuvDecodeStrip, ptr %42, align 8, !tbaa !25
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.tiff, ptr %43, i32 0, i32 33
  store ptr @LogLuvDecodeTile, ptr %44, align 8, !tbaa !26
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.tiff, ptr %45, i32 0, i32 25
  store ptr @LogLuvSetupEncode, ptr %46, align 8, !tbaa !27
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.tiff, ptr %47, i32 0, i32 32
  store ptr @LogLuvEncodeStrip, ptr %48, align 8, !tbaa !28
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.tiff, ptr %49, i32 0, i32 34
  store ptr @LogLuvEncodeTile, ptr %50, align 8, !tbaa !29
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.tiff, ptr %51, i32 0, i32 35
  store ptr @LogLuvClose, ptr %52, align 8, !tbaa !30
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.tiff, ptr %53, i32 0, i32 37
  store ptr @LogLuvCleanup, ptr %54, align 8, !tbaa !31
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  call void @TIFFMergeFieldInfo(ptr noundef %55, ptr noundef @LogLuvFieldInfo, i32 noundef 2)
  %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 1
  %59 = load ptr, ptr %58, align 8, !tbaa !32
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.logLuvState, ptr %60, i32 0, i32 6
  store ptr %59, ptr %61, align 8, !tbaa !33
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.tiff, ptr %62, i32 0, i32 61
  %64 = getelementptr inbounds %struct.TIFFTagMethods, ptr %63, i32 0, i32 1
  store ptr @LogLuvVGetField, ptr %64, align 8, !tbaa !32
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.tiff, ptr %65, i32 0, i32 61
  %67 = getelementptr inbounds %struct.TIFFTagMethods, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !34
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.logLuvState, ptr %69, i32 0, i32 7
  store ptr %68, ptr %70, align 8, !tbaa !35
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.tiff, ptr %71, i32 0, i32 61
  %73 = getelementptr inbounds %struct.TIFFTagMethods, ptr %72, i32 0, i32 0
  store ptr @LogLuvVSetField, ptr %73, align 8, !tbaa !34
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %81

74:                                               ; preds = %23
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.tiff, ptr %75, i32 0, i32 51
  %77 = load ptr, ptr %76, align 8, !tbaa !36
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.tiff, ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !37
  call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %77, ptr noundef @TIFFInitSGILog.module, ptr noundef @.str.2, ptr noundef %80)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %81

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

; 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 @_TIFFmemset(ptr noundef, i32 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @_logLuvNop(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @LogLuvSetupDecode(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @LogLuvSetupEncode(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
declare hidden void @LogLuvClose(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @LogLuvCleanup(ptr noundef) #1

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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, !10, i64 0}
!21 = !{!"logLuvState", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!22 = !{!21, !10, i64 4}
!23 = !{!21, !6, i64 32}
!24 = !{!12, !6, i64 392}
!25 = !{!12, !6, i64 456}
!26 = !{!12, !6, i64 472}
!27 = !{!12, !6, i64 408}
!28 = !{!12, !6, i64 464}
!29 = !{!12, !6, i64 480}
!30 = !{!12, !6, i64 488}
!31 = !{!12, !6, i64 504}
!32 = !{!12, !6, i64 696}
!33 = !{!21, !6, i64 40}
!34 = !{!12, !6, i64 688}
!35 = !{!21, !6, i64 48}
!36 = !{!12, !6, i64 608}
!37 = !{!12, !6, i64 0}


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

@TIFFInitSGILog.module = external hidden constant [15 x i8], align 1
@.str = external hidden unnamed_addr constant [63 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@__PRETTY_FUNCTION__.TIFFInitSGILog = external hidden unnamed_addr constant [32 x i8], align 1
@LogLuvFieldInfo = external hidden constant [2 x %struct.TIFFFieldInfo], align 16
@.str.2 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @TIFFInitSGILog(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = icmp eq i32 %1, 34677
  %4 = and i32 %1, -2
  %or.cond = icmp eq i32 %4, 34676
  br i1 %or.cond, label %6, label %5

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

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

10:                                               ; preds = %6
  tail call void @_TIFFmemset(ptr noundef nonnull %7, i32 noundef 0, i32 noundef 56) #4
  store i32 -1, ptr %7, align 8, !tbaa !18
  %11 = zext i1 %3 to i32
  %12 = getelementptr inbounds i8, ptr %7, i64 4
  store i32 %11, ptr %12, align 4, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %7, i64 32
  store ptr @_logLuvNop, ptr %13, align 8, !tbaa !21
  %14 = getelementptr inbounds i8, ptr %0, i64 392
  store ptr @LogLuvSetupDecode, ptr %14, align 8, !tbaa !22
  %15 = getelementptr inbounds i8, ptr %0, i64 456
  store ptr @LogLuvDecodeStrip, ptr %15, align 8, !tbaa !23
  %16 = getelementptr inbounds i8, ptr %0, i64 472
  store ptr @LogLuvDecodeTile, ptr %16, align 8, !tbaa !24
  %17 = getelementptr inbounds i8, ptr %0, i64 408
  store ptr @LogLuvSetupEncode, ptr %17, align 8, !tbaa !25
  %18 = getelementptr inbounds i8, ptr %0, i64 464
  store ptr @LogLuvEncodeStrip, ptr %18, align 8, !tbaa !26
  %19 = getelementptr inbounds i8, ptr %0, i64 480
  store ptr @LogLuvEncodeTile, ptr %19, align 8, !tbaa !27
  %20 = getelementptr inbounds i8, ptr %0, i64 488
  store ptr @LogLuvClose, ptr %20, align 8, !tbaa !28
  %21 = getelementptr inbounds i8, ptr %0, i64 504
  store ptr @LogLuvCleanup, ptr %21, align 8, !tbaa !29
  tail call void @TIFFMergeFieldInfo(ptr noundef nonnull %0, ptr noundef nonnull @LogLuvFieldInfo, i32 noundef 2) #4
  %22 = getelementptr inbounds i8, ptr %0, i64 688
  %23 = getelementptr inbounds i8, ptr %0, i64 696
  %24 = getelementptr inbounds i8, ptr %7, i64 40
  %25 = load <2 x ptr>, ptr %22, align 8, !tbaa !30
  store ptr @LogLuvVGetField, ptr %23, align 8, !tbaa !31
  %26 = shufflevector <2 x ptr> %25, <2 x ptr> poison, <2 x i32> <i32 1, i32 0>
  store <2 x ptr> %26, ptr %24, align 8, !tbaa !30
  store ptr @LogLuvVSetField, ptr %22, align 8, !tbaa !32
  br label %31

27:                                               ; preds = %6
  %28 = getelementptr inbounds i8, ptr %0, i64 608
  %29 = load ptr, ptr %28, align 8, !tbaa !33
  %30 = load ptr, ptr %0, align 8, !tbaa !34
  tail call void (ptr, ptr, ptr, ...) @TIFFErrorExt(ptr noundef %29, ptr noundef nonnull @TIFFInitSGILog.module, ptr noundef nonnull @.str.2, ptr noundef %30) #4
  br label %31

31:                                               ; preds = %27, %10
  %.0 = phi i32 [ 0, %27 ], [ 1, %10 ]
  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 @_TIFFmemset(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

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

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

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

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

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

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

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

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

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

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

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

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 = { noreturn nounwind }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 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 = !{!19, !10, i64 0}
!19 = !{!"logLuvState", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!20 = !{!19, !10, i64 4}
!21 = !{!19, !7, i64 32}
!22 = !{!6, !7, i64 392}
!23 = !{!6, !7, i64 456}
!24 = !{!6, !7, i64 472}
!25 = !{!6, !7, i64 408}
!26 = !{!6, !7, i64 464}
!27 = !{!6, !7, i64 480}
!28 = !{!6, !7, i64 488}
!29 = !{!6, !7, i64 504}
!30 = !{!7, !7, i64 0}
!31 = !{!6, !7, i64 696}
!32 = !{!6, !7, i64 688}
!33 = !{!6, !7, i64 608}
!34 = !{!6, !7, i64 0}


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