	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TIFFFetchDirectory
_TIFFFetchDirectory:                    ## @TIFFFetchDirectory
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	%rdx, %rdi
	callq	_assert
	movl	%ebx, (%r12)
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	movl	$0, (%r15)
LBB0_2:
	movq	%r12, %rdi
	callq	_isMapped
	movslq	(%r12), %rsi
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movq	_TIFF_BIGTIFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_17
## %bb.4:
	testl	%esi, %esi
	js	LBB0_19
## %bb.5:
	leaq	4(%rsi), %r13
	cmpq	8(%r12), %r13
	jg	LBB0_19
## %bb.6:
	addq	16(%r12), %rsi
	leaq	-48(%rbp), %rdi
	movl	$4, %edx
	callq	__TIFFmemcpy
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_8
## %bb.7:
	leaq	-48(%rbp), %rdi
	callq	_TIFFSwabLong8
LBB0_8:
	movl	-48(%rbp), %esi
	cmpl	$4097, %esi                     ## imm = 0x1001
	jge	LBB0_36
## %bb.9:
	movl	%esi, -44(%rbp)
	movl	$20, %ebx
	jmp	LBB0_39
LBB0_10:
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_SeekOK
	testl	%eax, %eax
	je	LBB0_20
## %bb.11:
	movq	_TIFF_BIGTIFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_21
## %bb.12:
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_ReadOK
	testl	%eax, %eax
	je	LBB0_31
## %bb.13:
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_15
## %bb.14:
	leaq	-48(%rbp), %rdi
	callq	_TIFFSwabLong8
LBB0_15:
	movl	-48(%rbp), %esi
	cmpl	$4097, %esi                     ## imm = 0x1001
	jge	LBB0_36
## %bb.16:
	movl	%esi, -44(%rbp)
	movl	$20, %ebx
	jmp	LBB0_25
LBB0_17:
	testl	%esi, %esi
	js	LBB0_19
## %bb.18:
	leaq	4(%rsi), %r13
	cmpq	8(%r12), %r13
	jle	LBB0_33
LBB0_19:
	movl	24(%r12), %edi
	leaq	_TIFFFetchDirectory.module(%rip), %rsi
	leaq	L_.str.5(%rip), %rdx
	jmp	LBB0_37
LBB0_20:
	movl	24(%r12), %edi
	movl	28(%r12), %ecx
	leaq	_TIFFFetchDirectory.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_32
LBB0_21:
	leaq	-44(%rbp), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_ReadOK
	testl	%eax, %eax
	je	LBB0_31
## %bb.22:
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_24
## %bb.23:
	leaq	-44(%rbp), %rdi
	callq	_TIFFSwabShort
LBB0_24:
	movl	-44(%rbp), %esi
	movl	$12, %ebx
	cmpl	$4097, %esi                     ## imm = 0x1001
	jge	LBB0_36
LBB0_25:
	leaq	L_.str.3(%rip), %rcx
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	__TIFFCheckMalloc
	testq	%rax, %rax
	je	LBB0_47
## %bb.26:
	imull	-44(%rbp), %ebx
	movq	%r12, %rdi
	movq	%rax, %rsi
	movl	%ebx, %edx
	movq	%rax, %r13
	callq	_ReadOK
	testl	%eax, %eax
	je	LBB0_48
## %bb.27:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	testq	%r15, %r15
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_65
## %bb.28:
	movq	_TIFF_BIGTIFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_54
## %bb.29:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_ReadOK
	testl	%eax, %eax
	jne	LBB0_63
	jmp	LBB0_30
LBB0_31:
	movl	24(%r12), %edi
	movl	28(%r12), %ecx
	leaq	_TIFFFetchDirectory.module(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
LBB0_32:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_TIFFErrorExt
	jmp	LBB0_38
LBB0_33:
	addq	16(%r12), %rsi
	leaq	-44(%rbp), %rdi
	movl	$4, %edx
	callq	__TIFFmemcpy
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_35
## %bb.34:
	leaq	-44(%rbp), %rdi
	callq	_TIFFSwabShort
LBB0_35:
	movl	-44(%rbp), %esi
	movl	$12, %ebx
	cmpl	$4097, %esi                     ## imm = 0x1001
	jl	LBB0_39
LBB0_36:
	movl	24(%r12), %edi
	leaq	_TIFFFetchDirectory.module(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
LBB0_37:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_TIFFErrorExt
LBB0_38:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_39:
	testl	%esi, %esi
	je	LBB0_45
## %bb.40:
	leaq	L_.str.3(%rip), %rcx
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	__TIFFCheckMalloc
	testq	%rax, %rax
	je	LBB0_47
## %bb.41:
	movq	%rax, %rcx
	movl	-44(%rbp), %edx
	imull	%ebx, %edx
	testl	%edx, %edx
	js	LBB0_44
## %bb.42:
	testq	%r13, %r13
	js	LBB0_44
## %bb.43:
	movl	%edx, %eax
	addq	%r13, %rax
	cmpq	8(%r12), %rax
	jle	LBB0_49
LBB0_44:
	movl	24(%r12), %edi
	leaq	_TIFFFetchDirectory.module(%rip), %rsi
	leaq	L_.str.7(%rip), %rdx
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	movq	%rcx, %r14
	callq	_TIFFErrorExt
	movq	%r14, %rdi
	callq	__TIFFfree
	jmp	LBB0_38
LBB0_47:
	xorl	%ebx, %ebx
	jmp	LBB0_38
LBB0_45:
	movl	24(%r12), %edi
	leaq	_TIFFFetchDirectory.module(%rip), %rsi
	leaq	L_.str.6(%rip), %rdx
	jmp	LBB0_37
LBB0_48:
	movl	24(%r12), %edi
	movl	28(%r12), %ecx
	leaq	_TIFFFetchDirectory.module(%rip), %rsi
	leaq	L_.str.4(%rip), %rdx
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_TIFFErrorExt
	movq	%r13, %rdi
	callq	__TIFFfree
	jmp	LBB0_38
LBB0_49:
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movq	16(%r12), %rsi
	addq	%r13, %rsi
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rdi
	callq	__TIFFmemcpy
	testq	%r15, %r15
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_65
## %bb.50:
	movslq	-44(%rbp), %rax
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	imulq	%rax, %rcx
	addq	%rcx, %r13
	movl	4(%r12), %eax
	movq	_TIFF_BIGTIFF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_59
## %bb.51:
	testq	%r13, %r13
	js	LBB0_30
## %bb.52:
	leaq	4(%r13), %rax
	cmpq	8(%r12), %rax
	jle	LBB0_62
LBB0_30:
	movl	$0, (%r15)
LBB0_63:
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_65
## %bb.64:
	movq	%r15, %rdi
	callq	_TIFFSwabLong8
	jmp	LBB0_65
LBB0_54:
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_ReadOK
	testl	%eax, %eax
	jne	LBB0_56
## %bb.55:
	movl	$0, -48(%rbp)
LBB0_56:
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_58
LBB0_57:
	leaq	-48(%rbp), %rdi
	callq	_TIFFSwabLong
LBB0_58:
	movl	-48(%rbp), %eax
	movl	%eax, (%r15)
LBB0_65:
	movl	-44(%rbp), %esi
	leaq	L_.str.3(%rip), %rcx
	movq	%r12, %rdi
	movl	$24, %edx
	callq	__TIFFCheckMalloc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_81
## %bb.66:
	cmpl	$0, -44(%rbp)
	jle	LBB0_80
## %bb.67:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	addq	$16, %r15
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	32(%rax), %rbx
	xorl	%r14d, %r14d
	jmp	LBB0_70
	.p2align	4, 0x90
LBB0_68:                                ##   in Loop: Header=BB0_70 Depth=1
	movq	%rbx, %rdi
	callq	_TIFFReadUInt64
	movl	%eax, -8(%r15)
	leaq	16(%rbx), %rdi
	callq	_TIFFReadUInt64
	movq	%rax, (%r15)
LBB0_69:                                ##   in Loop: Header=BB0_70 Depth=1
	incl	%r14d
	addq	$24, %r15
	addq	$64, %rbx
	cmpl	-44(%rbp), %r14d
	jge	LBB0_80
LBB0_70:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%r12), %eax
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_72
## %bb.71:                              ##   in Loop: Header=BB0_70 Depth=1
	leaq	-32(%rbx), %rdi
	callq	_TIFFSwabShort
	movl	4(%r12), %eax
LBB0_72:                                ##   in Loop: Header=BB0_70 Depth=1
	movl	-32(%rbx), %ecx
	movl	%ecx, -16(%r15)
	leaq	-16(%rbx), %r13
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_74
## %bb.73:                              ##   in Loop: Header=BB0_70 Depth=1
	movq	%r13, %rdi
	callq	_TIFFSwabShort
	movl	4(%r12), %eax
LBB0_74:                                ##   in Loop: Header=BB0_70 Depth=1
	movl	(%r13), %ecx
	movl	%ecx, -12(%r15)
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_TIFF_BIGTIFF@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_77
## %bb.75:                              ##   in Loop: Header=BB0_70 Depth=1
	testl	%eax, %ecx
	je	LBB0_68
## %bb.76:                              ##   in Loop: Header=BB0_70 Depth=1
	movq	%rbx, %rdi
	callq	_TIFFSwabLong8
	jmp	LBB0_68
LBB0_77:                                ##   in Loop: Header=BB0_70 Depth=1
	testl	%eax, %ecx
	je	LBB0_79
## %bb.78:                              ##   in Loop: Header=BB0_70 Depth=1
	movq	%rbx, %rdi
	callq	_TIFFSwabLong
LBB0_79:                                ##   in Loop: Header=BB0_70 Depth=1
	movl	(%rbx), %eax
	movl	%eax, -8(%r15)
	movl	16(%rbx), %eax
	movl	%eax, (%r15)
	jmp	LBB0_69
LBB0_80:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	__TIFFfree
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movl	-44(%rbp), %ebx
	jmp	LBB0_38
LBB0_81:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	__TIFFfree
	xorl	%ebx, %ebx
	jmp	LBB0_38
LBB0_59:
	testq	%r13, %r13
	js	LBB0_61
## %bb.60:
	leaq	4(%r13), %rcx
	cmpq	8(%r12), %rcx
	jle	LBB0_82
LBB0_61:
	movl	$0, -48(%rbp)
	jmp	LBB0_83
LBB0_62:
	addq	16(%r12), %r13
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	$4, %edx
	callq	__TIFFmemcpy
	jmp	LBB0_63
LBB0_82:
	addq	16(%r12), %r13
	leaq	-48(%rbp), %rdi
	movq	%r13, %rsi
	movl	$4, %edx
	callq	__TIFFmemcpy
	movl	4(%r12), %eax
LBB0_83:
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_57
	jmp	LBB0_58
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @TIFFFetchDirectory.module
_TIFFFetchDirectory.module:
	.asciz	"TIFFFetchDirectory"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Seek error accessing TIFF directory"

	.comm	_TIFF_BIGTIFF,4,2               ## @TIFF_BIGTIFF
L_.str.1:                               ## @.str.1
	.asciz	"%s: Can not read TIFF directory count"

	.comm	_TIFF_SWAB,4,2                  ## @TIFF_SWAB
L_.str.2:                               ## @.str.2
	.asciz	"Sanity check on directory count failed, this is probably not a valid IFD offset"

L_.str.3:                               ## @.str.3
	.asciz	"to read TIFF directory"

L_.str.4:                               ## @.str.4
	.asciz	"%.100s: Can not read TIFF directory"

L_.str.5:                               ## @.str.5
	.asciz	"Can not read TIFF directory count"

L_.str.6:                               ## @.str.6
	.asciz	"Sanity check on directory count failed, zero tag directories not supported"

L_.str.7:                               ## @.str.7
	.asciz	"Can not read TIFF directory"

	.no_dead_strip	_TIFFFetchDirectory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TIFFFetchDirectory
_TIFFFetchDirectory:                    ; @TIFFFetchDirectory
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	mov	x0, x2
	bl	_assert
	str	w22, [x19]
	cbz	x21, LBB0_2
; %bb.1:
	str	wzr, [x21]
LBB0_2:
	mov	x0, x19
	bl	_isMapped
	ldrsw	x1, [x19]
	cbz	w0, LBB0_15
; %bb.3:
	ldr	w8, [x19, #4]
Lloh0:
	adrp	x24, _TIFF_BIGTIFF@GOTPAGE
Lloh1:
	ldr	x24, [x24, _TIFF_BIGTIFF@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_22
; %bb.4:
	tbnz	w1, #31, LBB0_24
; %bb.5:
	add	x25, x1, #4
	ldr	x8, [x19, #8]
	cmp	x25, x8
	b.gt	LBB0_24
; %bb.6:
	ldr	x8, [x19, #16]
	add	x1, x8, x1
	add	x0, sp, #8
	mov	w2, #4
	bl	__TIFFmemcpy
	ldr	w8, [x19, #4]
Lloh2:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	add	x0, sp, #8
	bl	_TIFFSwabLong8
LBB0_8:
	ldr	w1, [sp, #8]
	cmp	w1, #1, lsl #12                 ; =4096
	b.gt	LBB0_40
; %bb.9:
	str	w1, [sp, #12]
	mov	w23, #20
	cbz	w1, LBB0_45
LBB0_10:
Lloh5:
	adrp	x3, l_.str.3@PAGE
Lloh6:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	__TIFFCheckMalloc
	cbz	x0, LBB0_43
; %bb.11:
	mov	x22, x0
	ldr	w8, [sp, #12]
	mul	w2, w8, w23
	tbnz	w2, #31, LBB0_14
; %bb.12:
	tbnz	x25, #63, LBB0_14
; %bb.13:
	add	x8, x25, w2, uxtw
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.le	LBB0_48
LBB0_14:
	ldr	w0, [x19, #24]
Lloh7:
	adrp	x1, _TIFFFetchDirectory.module@PAGE
Lloh8:
	add	x1, x1, _TIFFFetchDirectory.module@PAGEOFF
Lloh9:
	adrp	x2, l_.str.7@PAGE
Lloh10:
	add	x2, x2, l_.str.7@PAGEOFF
	b	LBB0_47
LBB0_15:
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_SeekOK
	cbz	w0, LBB0_25
; %bb.16:
	ldr	w8, [x19, #4]
Lloh11:
	adrp	x24, _TIFF_BIGTIFF@GOTPAGE
Lloh12:
	ldr	x24, [x24, _TIFF_BIGTIFF@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_26
; %bb.17:
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #4
	bl	_ReadOK
	cbz	w0, LBB0_36
; %bb.18:
	ldr	w8, [x19, #4]
Lloh13:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_20
; %bb.19:
	add	x0, sp, #8
	bl	_TIFFSwabLong8
LBB0_20:
	ldr	w1, [sp, #8]
	cmp	w1, #1, lsl #12                 ; =4096
	b.gt	LBB0_40
; %bb.21:
	str	w1, [sp, #12]
	mov	w23, #20
	b	LBB0_31
LBB0_22:
	tbnz	w1, #31, LBB0_24
; %bb.23:
	add	x25, x1, #4
	ldr	x8, [x19, #8]
	cmp	x25, x8
	b.le	LBB0_37
LBB0_24:
	ldr	w0, [x19, #24]
Lloh16:
	adrp	x1, _TIFFFetchDirectory.module@PAGE
Lloh17:
	add	x1, x1, _TIFFFetchDirectory.module@PAGEOFF
Lloh18:
	adrp	x2, l_.str.5@PAGE
Lloh19:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_41
LBB0_25:
	ldp	w0, w8, [x19, #24]
Lloh20:
	adrp	x1, _TIFFFetchDirectory.module@PAGE
Lloh21:
	add	x1, x1, _TIFFFetchDirectory.module@PAGEOFF
	str	x8, [sp]
Lloh22:
	adrp	x2, l_.str@PAGE
Lloh23:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_41
LBB0_26:
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #4
	bl	_ReadOK
	cbz	w0, LBB0_36
; %bb.27:
	ldr	w8, [x19, #4]
Lloh24:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh25:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_29
; %bb.28:
	add	x0, sp, #12
	bl	_TIFFSwabShort
LBB0_29:
	ldr	w1, [sp, #12]
	cmp	w1, #1, lsl #12                 ; =4096
	b.gt	LBB0_40
; %bb.30:
	mov	w23, #12
LBB0_31:
Lloh27:
	adrp	x3, l_.str.3@PAGE
Lloh28:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	__TIFFCheckMalloc
	cbz	x0, LBB0_43
; %bb.32:
	mov	x22, x0
	ldr	w8, [sp, #12]
	mul	w2, w8, w23
	mov	x0, x19
	mov	x1, x22
	bl	_ReadOK
	cbz	w0, LBB0_46
; %bb.33:
	cbz	x21, LBB0_60
; %bb.34:
	ldr	w8, [x19, #4]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_55
; %bb.35:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #4
	bl	_ReadOK
	cbnz	w0, LBB0_53
	b	LBB0_52
LBB0_36:
	ldp	w0, w8, [x19, #24]
Lloh29:
	adrp	x1, _TIFFFetchDirectory.module@PAGE
Lloh30:
	add	x1, x1, _TIFFFetchDirectory.module@PAGEOFF
	str	x8, [sp]
Lloh31:
	adrp	x2, l_.str.1@PAGE
Lloh32:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_41
LBB0_37:
	ldr	x8, [x19, #16]
	add	x1, x8, x1
	add	x0, sp, #12
	mov	w2, #4
	bl	__TIFFmemcpy
	ldr	w8, [x19, #4]
Lloh33:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh34:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_39
; %bb.38:
	add	x0, sp, #12
	bl	_TIFFSwabShort
LBB0_39:
	ldr	w1, [sp, #12]
	cmp	w1, #1, lsl #12                 ; =4096
	b.le	LBB0_44
LBB0_40:
	ldr	w0, [x19, #24]
Lloh36:
	adrp	x1, _TIFFFetchDirectory.module@PAGE
Lloh37:
	add	x1, x1, _TIFFFetchDirectory.module@PAGEOFF
Lloh38:
	adrp	x2, l_.str.2@PAGE
Lloh39:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_41:
	bl	_TIFFErrorExt
LBB0_42:
	mov	w0, #0
LBB0_43:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_44:
	mov	w23, #12
	cbnz	w1, LBB0_10
LBB0_45:
	ldr	w0, [x19, #24]
Lloh40:
	adrp	x1, _TIFFFetchDirectory.module@PAGE
Lloh41:
	add	x1, x1, _TIFFFetchDirectory.module@PAGEOFF
Lloh42:
	adrp	x2, l_.str.6@PAGE
Lloh43:
	add	x2, x2, l_.str.6@PAGEOFF
	b	LBB0_41
LBB0_46:
	ldp	w0, w8, [x19, #24]
Lloh44:
	adrp	x1, _TIFFFetchDirectory.module@PAGE
Lloh45:
	add	x1, x1, _TIFFFetchDirectory.module@PAGEOFF
	str	x8, [sp]
Lloh46:
	adrp	x2, l_.str.4@PAGE
Lloh47:
	add	x2, x2, l_.str.4@PAGEOFF
LBB0_47:
	bl	_TIFFErrorExt
	b	LBB0_75
LBB0_48:
	ldr	x8, [x19, #16]
	add	x1, x8, x25
	mov	x0, x22
	bl	__TIFFmemcpy
	cbz	x21, LBB0_60
; %bb.49:
	ldrsw	x8, [sp, #12]
	mov	w9, w23
	madd	x8, x8, x9, x25
	ldr	w9, [x19, #4]
	ldr	w10, [x24]
	tst	w10, w9
	b.eq	LBB0_77
; %bb.50:
	tbnz	x8, #63, LBB0_52
; %bb.51:
	add	x9, x8, #4
	ldr	x10, [x19, #8]
	cmp	x9, x10
	b.le	LBB0_80
LBB0_52:
	str	wzr, [x21]
LBB0_53:
	ldr	w8, [x19, #4]
Lloh48:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh49:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh50:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_60
; %bb.54:
	mov	x0, x21
	bl	_TIFFSwabLong8
	b	LBB0_60
LBB0_55:
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #4
	bl	_ReadOK
	cbnz	w0, LBB0_57
; %bb.56:
	str	wzr, [sp, #8]
LBB0_57:
	ldr	w8, [x19, #4]
Lloh51:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh52:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_59
LBB0_58:
	add	x0, sp, #8
	bl	_TIFFSwabLong
LBB0_59:
	ldr	w8, [sp, #8]
	str	w8, [x21]
LBB0_60:
	ldr	w1, [sp, #12]
Lloh54:
	adrp	x3, l_.str.3@PAGE
Lloh55:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	w2, #24
	bl	__TIFFCheckMalloc
	cbz	x0, LBB0_75
; %bb.61:
	mov	x21, x0
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_76
; %bb.62:
	mov	w25, #0
	add	x26, x21, #16
Lloh56:
	adrp	x27, _TIFF_SWAB@GOTPAGE
Lloh57:
	ldr	x27, [x27, _TIFF_SWAB@GOTPAGEOFF]
Lloh58:
	adrp	x28, _TIFF_BIGTIFF@GOTPAGE
Lloh59:
	ldr	x28, [x28, _TIFF_BIGTIFF@GOTPAGEOFF]
	mov	x23, x22
	b	LBB0_65
LBB0_63:                                ;   in Loop: Header=BB0_65 Depth=1
	mov	x0, x24
	bl	_TIFFReadUInt64
	stur	w0, [x26, #-8]
	add	x0, x23, #48
	bl	_TIFFReadUInt64
	str	x0, [x26]
LBB0_64:                                ;   in Loop: Header=BB0_65 Depth=1
	add	x23, x23, #64
	add	w25, w25, #1
	ldr	w8, [sp, #12]
	add	x26, x26, #24
	cmp	w25, w8
	b.ge	LBB0_76
LBB0_65:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #4]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_67
; %bb.66:                               ;   in Loop: Header=BB0_65 Depth=1
	mov	x0, x23
	bl	_TIFFSwabShort
	ldr	w8, [x19, #4]
LBB0_67:                                ;   in Loop: Header=BB0_65 Depth=1
	mov	x0, x23
	ldr	w9, [x0], #16
	stur	w9, [x26, #-16]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_69
; %bb.68:                               ;   in Loop: Header=BB0_65 Depth=1
	bl	_TIFFSwabShort
	ldr	w8, [x19, #4]
LBB0_69:                                ;   in Loop: Header=BB0_65 Depth=1
	ldr	w9, [x23, #16]
	stur	w9, [x26, #-12]
	add	x24, x23, #32
	ldr	w10, [x28]
	ldr	w9, [x27]
	and	w9, w9, w8
	tst	w10, w8
	b.eq	LBB0_72
; %bb.70:                               ;   in Loop: Header=BB0_65 Depth=1
	cbz	w9, LBB0_63
; %bb.71:                               ;   in Loop: Header=BB0_65 Depth=1
	mov	x0, x24
	bl	_TIFFSwabLong8
	b	LBB0_63
LBB0_72:                                ;   in Loop: Header=BB0_65 Depth=1
	cbz	w9, LBB0_74
; %bb.73:                               ;   in Loop: Header=BB0_65 Depth=1
	mov	x0, x24
	bl	_TIFFSwabLong
LBB0_74:                                ;   in Loop: Header=BB0_65 Depth=1
	ldr	w8, [x23, #32]
	stur	w8, [x26, #-8]
	ldr	w8, [x23, #48]
	str	w8, [x26]
	b	LBB0_64
LBB0_75:
	mov	x0, x22
	bl	__TIFFfree
	b	LBB0_42
LBB0_76:
	mov	x0, x22
	bl	__TIFFfree
	str	x21, [x20]
	ldr	w0, [sp, #12]
	b	LBB0_43
LBB0_77:
	tbnz	x8, #63, LBB0_79
; %bb.78:
	add	x10, x8, #4
	ldr	x11, [x19, #8]
	cmp	x10, x11
	b.le	LBB0_81
LBB0_79:
	str	wzr, [sp, #8]
	b	LBB0_82
LBB0_80:
	ldr	x9, [x19, #16]
	add	x1, x9, x8
	mov	x0, x21
	mov	w2, #4
	bl	__TIFFmemcpy
	b	LBB0_53
LBB0_81:
	ldr	x9, [x19, #16]
	add	x1, x9, x8
	add	x0, sp, #8
	mov	w2, #4
	bl	__TIFFmemcpy
	ldr	w9, [x19, #4]
LBB0_82:
Lloh60:
	adrp	x8, _TIFF_SWAB@GOTPAGE
Lloh61:
	ldr	x8, [x8, _TIFF_SWAB@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
	tst	w8, w9
	b.ne	LBB0_58
	b	LBB0_59
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFFetchDirectory.module:             ; @TIFFFetchDirectory.module
	.asciz	"TIFFFetchDirectory"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Seek error accessing TIFF directory"

	.comm	_TIFF_BIGTIFF,4,2               ; @TIFF_BIGTIFF
l_.str.1:                               ; @.str.1
	.asciz	"%s: Can not read TIFF directory count"

	.comm	_TIFF_SWAB,4,2                  ; @TIFF_SWAB
l_.str.2:                               ; @.str.2
	.asciz	"Sanity check on directory count failed, this is probably not a valid IFD offset"

l_.str.3:                               ; @.str.3
	.asciz	"to read TIFF directory"

l_.str.4:                               ; @.str.4
	.asciz	"%.100s: Can not read TIFF directory"

l_.str.5:                               ; @.str.5
	.asciz	"Can not read TIFF directory count"

l_.str.6:                               ; @.str.6
	.asciz	"Sanity check on directory count failed, zero tag directories not supported"

l_.str.7:                               ; @.str.7
	.asciz	"Can not read TIFF directory"

	.no_dead_strip	_TIFFFetchDirectory
.subsections_via_symbols
