	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TIFFLinkDirectory
_TIFFLinkDirectory:                     ## @TIFFLinkDirectory
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_TIFFSeekFile
	incl	%eax
	andl	$-2, %eax
	movl	%eax, (%r14)
	movl	4(%r14), %ecx
	movq	_TIFF_INSUBIFD@GOTPCREL(%rip), %rbx
	movq	_TIFF_BIGTIFF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%ecx, (%rbx)
	je	LBB0_7
## %bb.1:
	testl	%ecx, %edx
	je	LBB0_23
## %bb.2:
	movl	%eax, -44(%rbp)
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	-44(%rbp), %rdi
	callq	_TIFFSwabLong8
LBB0_4:
	movl	8(%r14), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_TIFFSeekFile
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_WriteOK
	testl	%eax, %eax
	je	LBB0_28
## %bb.5:
	decq	48(%r14)
	je	LBB0_29
## %bb.6:
	addl	$8, 8(%r14)
	jmp	LBB0_30
LBB0_7:
	testl	%ecx, %edx
	je	LBB0_31
## %bb.8:
	movl	%eax, -44(%rbp)
	movq	_TIFF_SWAB@GOTPCREL(%rip), %r12
	testl	%ecx, (%r12)
	je	LBB0_10
## %bb.9:
	leaq	-44(%rbp), %rdi
	callq	_TIFFSwabLong8
LBB0_10:
	movl	32(%r14), %ebx
	testl	%ebx, %ebx
	je	LBB0_45
## %bb.11:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_SeekOK
	leaq	L_.str.2(%rip), %rdx
	testl	%eax, %eax
	je	LBB0_58
## %bb.12:
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$8, %edx
	callq	_ReadOK
	testl	%eax, %eax
	je	LBB0_53
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	(%r12), %eax
	testl	%eax, 4(%r14)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r15, %rdi
	callq	_TIFFSwabLong8
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	-48(%rbp), %eax
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	jg	LBB0_50
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	leal	(%rax,%rax,4), %eax
	leal	(%rbx,%rax,4), %r13d
	addl	$8, %r13d
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_TIFFSeekFile
	movq	%r14, %rdi
	leaq	-52(%rbp), %rsi
	movl	$8, %edx
	callq	_ReadOK
	testl	%eax, %eax
	je	LBB0_54
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	(%r12), %eax
	testl	%eax, 4(%r14)
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	-52(%rbp), %rdi
	callq	_TIFFSwabLong8
LBB0_20:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	-52(%rbp), %ebx
	testl	%ebx, %ebx
	je	LBB0_52
## %bb.21:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_SeekOK
	testl	%eax, %eax
	jne	LBB0_13
	jmp	LBB0_53
LBB0_23:
	movl	%eax, -44(%rbp)
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_25
## %bb.24:
	leaq	-44(%rbp), %rdi
	callq	_TIFFSwabLong
LBB0_25:
	movl	8(%r14), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_TIFFSeekFile
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_WriteOK
	testl	%eax, %eax
	je	LBB0_28
## %bb.26:
	decq	48(%r14)
	je	LBB0_29
## %bb.27:
	addl	$4, 8(%r14)
	jmp	LBB0_30
LBB0_28:
	movl	24(%r14), %edi
	leaq	_TIFFLinkDirectory.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_59
LBB0_29:
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, 4(%r14)
LBB0_30:
	movl	$1, %eax
	jmp	LBB0_60
LBB0_31:
	movl	%eax, -44(%rbp)
	movq	_TIFF_SWAB@GOTPCREL(%rip), %r12
	testl	%ecx, (%r12)
	je	LBB0_33
## %bb.32:
	leaq	-44(%rbp), %rdi
	callq	_TIFFSwabLong
LBB0_33:
	movq	40(%r14), %r15
	testq	%r15, %r15
	je	LBB0_46
## %bb.34:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_SeekOK
	leaq	L_.str.2(%rip), %rdx
	testl	%eax, %eax
	je	LBB0_58
## %bb.35:
	leaq	-52(%rbp), %r13
	.p2align	4, 0x90
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	leaq	-48(%rbp), %rsi
	movl	$2, %edx
	callq	_ReadOK
	testl	%eax, %eax
	je	LBB0_53
## %bb.37:                              ##   in Loop: Header=BB0_36 Depth=1
	movl	(%r12), %eax
	testl	%eax, 4(%r14)
	je	LBB0_39
## %bb.38:                              ##   in Loop: Header=BB0_36 Depth=1
	leaq	-48(%rbp), %rdi
	callq	_TIFFSwabShort
LBB0_39:                                ##   in Loop: Header=BB0_36 Depth=1
	movl	-48(%rbp), %eax
	leal	(%rax,%rax,2), %eax
	leal	(%r15,%rax,4), %esi
	addl	$2, %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_TIFFSeekFile
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$4, %edx
	callq	_ReadOK
	testl	%eax, %eax
	je	LBB0_54
## %bb.40:                              ##   in Loop: Header=BB0_36 Depth=1
	movl	(%r12), %eax
	testl	%eax, 4(%r14)
	je	LBB0_42
## %bb.41:                              ##   in Loop: Header=BB0_36 Depth=1
	movq	%r13, %rdi
	callq	_TIFFSwabLong
LBB0_42:                                ##   in Loop: Header=BB0_36 Depth=1
	movl	-52(%rbp), %ebx
	testl	%ebx, %ebx
	je	LBB0_55
## %bb.43:                              ##   in Loop: Header=BB0_36 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_SeekOK
	movl	%ebx, %r15d
	testl	%eax, %eax
	jne	LBB0_36
LBB0_53:
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_58
LBB0_45:
	movl	(%r14), %eax
	movl	%eax, 32(%r14)
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_TIFFSeekFile
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	movl	$8, %edx
	jmp	LBB0_47
LBB0_46:
	movslq	(%r14), %rax
	movq	%rax, 40(%r14)
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_TIFFSeekFile
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
LBB0_47:
	callq	_WriteOK
	movl	%eax, %ecx
	movl	$1, %eax
	testl	%ecx, %ecx
	jne	LBB0_60
## %bb.48:
	movl	24(%r14), %edi
	movq	16(%r14), %rsi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_59
LBB0_54:
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_58
LBB0_50:
	leaq	L_.str.5(%rip), %rdx
	jmp	LBB0_58
LBB0_52:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_TIFFSeekFile
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	movl	$8, %edx
	jmp	LBB0_56
LBB0_55:
	addl	$2, %r15d
	movl	-48(%rbp), %eax
	leal	(%rax,%rax,2), %eax
	leal	(%r15,%rax,4), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_TIFFSeekFile
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
LBB0_56:
	callq	_WriteOK
	testl	%eax, %eax
	jne	LBB0_30
## %bb.57:
	leaq	L_.str.4(%rip), %rdx
LBB0_58:
	movl	24(%r14), %edi
	leaq	_TIFFLinkDirectory.module(%rip), %rsi
LBB0_59:
	callq	_TIFFErrorExt
	xorl	%eax, %eax
LBB0_60:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @TIFFLinkDirectory.module
_TIFFLinkDirectory.module:
	.asciz	"TIFFLinkDirectory"

	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_TIFF_INSUBIFD,4,2              ## @TIFF_INSUBIFD
	.comm	_TIFF_BIGTIFF,4,2               ## @TIFF_BIGTIFF
	.comm	_TIFF_SWAB,4,2                  ## @TIFF_SWAB
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error writing SubIFD directory link"

L_.str.1:                               ## @.str.1
	.asciz	"Error writing TIFF header"

L_.str.2:                               ## @.str.2
	.asciz	"Error fetching directory count"

L_.str.3:                               ## @.str.3
	.asciz	"Error fetching directory link"

L_.str.4:                               ## @.str.4
	.asciz	"Error writing directory link"

L_.str.5:                               ## @.str.5
	.asciz	"Sanity check on tag count failed, likely corrupt TIFF"

	.no_dead_strip	_TIFFLinkDirectory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TIFFLinkDirectory
_TIFFLinkDirectory:                     ; @TIFFLinkDirectory
	.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	x19, x0
Lloh0:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_TIFFSeekFile
	add	w8, w0, #1
	and	w9, w8, #0xfffffffe
	str	w9, [x19]
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x20, _TIFF_INSUBIFD@GOTPAGE
Lloh4:
	ldr	x20, [x20, _TIFF_INSUBIFD@GOTPAGEOFF]
	ldr	w11, [x20]
Lloh5:
	adrp	x10, _TIFF_BIGTIFF@GOTPAGE
Lloh6:
	ldr	x10, [x10, _TIFF_BIGTIFF@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	and	w10, w10, w8
	tst	w11, w8
	b.eq	LBB0_7
; %bb.1:
	cbz	w10, LBB0_22
; %bb.2:
	str	w9, [sp, #12]
Lloh8:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	add	x0, sp, #12
	bl	_TIFFSwabLong8
LBB0_4:
	ldr	w1, [x19, #8]
Lloh11:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_TIFFSeekFile
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #8
	bl	_WriteOK
	cbz	w0, LBB0_27
; %bb.5:
	ldr	x8, [x19, #48]
	subs	x8, x8, #1
	str	x8, [x19, #48]
	b.eq	LBB0_28
; %bb.6:
	ldr	w8, [x19, #8]
	add	w8, w8, #8
	str	w8, [x19, #8]
	b	LBB0_51
LBB0_7:
	cbz	w10, LBB0_29
; %bb.8:
	str	w9, [sp, #12]
Lloh14:
	adrp	x23, _TIFF_SWAB@GOTPAGE
Lloh15:
	ldr	x23, [x23, _TIFF_SWAB@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	add	x0, sp, #12
	bl	_TIFFSwabLong8
LBB0_10:
	ldr	w21, [x19, #32]
	cbz	w21, LBB0_42
; %bb.11:
	mov	x0, x19
	mov	x1, x21
	bl	_SeekOK
Lloh16:
	adrp	x20, l_.str.2@PAGE
Lloh17:
	add	x20, x20, l_.str.2@PAGEOFF
	cbz	w0, LBB0_53
; %bb.12:
Lloh18:
	adrp	x24, l_.str.5@PAGE
Lloh19:
	add	x24, x24, l_.str.5@PAGEOFF
	mov	w26, #20
Lloh20:
	adrp	x25, _SEEK_SET@GOTPAGE
Lloh21:
	ldr	x25, [x25, _SEEK_SET@GOTPAGEOFF]
Lloh22:
	adrp	x27, l_.str.3@PAGE
Lloh23:
	add	x27, x27, l_.str.3@PAGEOFF
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #8
	bl	_ReadOK
	cbz	w0, LBB0_53
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x19, #4]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x0, sp, #8
	bl	_TIFFSwabLong8
LBB0_16:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [sp, #8]
	cmp	w8, #16, lsl #12                ; =65536
	b.ge	LBB0_45
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	madd	w8, w8, w26, w21
	add	w22, w8, #8
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x22
	bl	_TIFFSeekFile
	add	x1, sp, #4
	mov	x0, x19
	mov	w2, #8
	bl	_ReadOK
	cbz	w0, LBB0_46
; %bb.18:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x19, #4]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x0, sp, #4
	bl	_TIFFSwabLong8
LBB0_20:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w21, [sp, #4]
	cbz	w21, LBB0_47
; %bb.21:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_SeekOK
	cbnz	w0, LBB0_13
	b	LBB0_53
LBB0_22:
	str	w9, [sp, #12]
Lloh24:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh25:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_24
; %bb.23:
	add	x0, sp, #12
	bl	_TIFFSwabLong
LBB0_24:
	ldr	w1, [x19, #8]
Lloh27:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_TIFFSeekFile
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #4
	bl	_WriteOK
	cbz	w0, LBB0_27
; %bb.25:
	ldr	x8, [x19, #48]
	subs	x8, x8, #1
	str	x8, [x19, #48]
	b.eq	LBB0_28
; %bb.26:
	ldr	w8, [x19, #8]
	add	w8, w8, #4
	str	w8, [x19, #8]
	b	LBB0_51
LBB0_27:
	ldr	w0, [x19, #24]
Lloh30:
	adrp	x1, _TIFFLinkDirectory.module@PAGE
Lloh31:
	add	x1, x1, _TIFFLinkDirectory.module@PAGEOFF
Lloh32:
	adrp	x2, l_.str@PAGE
Lloh33:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_54
LBB0_28:
	ldr	w8, [x20]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_51
LBB0_29:
	str	w9, [sp, #12]
Lloh34:
	adrp	x22, _TIFF_SWAB@GOTPAGE
Lloh35:
	ldr	x22, [x22, _TIFF_SWAB@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_31
; %bb.30:
	add	x0, sp, #12
	bl	_TIFFSwabLong
LBB0_31:
	ldr	x21, [x19, #40]
	cbz	x21, LBB0_43
; %bb.32:
	mov	x0, x19
	mov	x1, x21
	bl	_SeekOK
Lloh36:
	adrp	x20, l_.str.2@PAGE
Lloh37:
	add	x20, x20, l_.str.2@PAGEOFF
	cbz	w0, LBB0_53
; %bb.33:
	mov	w24, #12
Lloh38:
	adrp	x23, _SEEK_SET@GOTPAGE
Lloh39:
	ldr	x23, [x23, _SEEK_SET@GOTPAGEOFF]
Lloh40:
	adrp	x25, l_.str.3@PAGE
Lloh41:
	add	x25, x25, l_.str.3@PAGEOFF
LBB0_34:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #2
	bl	_ReadOK
	cbz	w0, LBB0_53
; %bb.35:                               ;   in Loop: Header=BB0_34 Depth=1
	ldr	w8, [x19, #4]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_37
; %bb.36:                               ;   in Loop: Header=BB0_34 Depth=1
	add	x0, sp, #8
	bl	_TIFFSwabShort
LBB0_37:                                ;   in Loop: Header=BB0_34 Depth=1
	add	w26, w21, #2
	ldr	w8, [sp, #8]
	madd	w1, w8, w24, w26
	ldr	w2, [x23]
	mov	x0, x19
	bl	_TIFFSeekFile
	add	x1, sp, #4
	mov	x0, x19
	mov	w2, #4
	bl	_ReadOK
	cbz	w0, LBB0_48
; %bb.38:                               ;   in Loop: Header=BB0_34 Depth=1
	ldr	w8, [x19, #4]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_40
; %bb.39:                               ;   in Loop: Header=BB0_34 Depth=1
	add	x0, sp, #4
	bl	_TIFFSwabLong
LBB0_40:                                ;   in Loop: Header=BB0_34 Depth=1
	ldr	w21, [sp, #4]
	cbz	w21, LBB0_49
; %bb.41:                               ;   in Loop: Header=BB0_34 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_SeekOK
	cbnz	w0, LBB0_34
	b	LBB0_53
LBB0_42:
	ldr	w8, [x19]
	str	w8, [x19, #32]
Lloh42:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh43:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #8
	bl	_TIFFSeekFile
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #8
	bl	_WriteOK
	cbnz	w0, LBB0_51
	b	LBB0_44
LBB0_43:
	ldrsw	x8, [x19]
	str	x8, [x19, #40]
Lloh45:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh46:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh47:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #4
	bl	_TIFFSeekFile
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #4
	bl	_WriteOK
	cbnz	w0, LBB0_51
LBB0_44:
	ldr	w0, [x19, #24]
	ldr	x1, [x19, #16]
Lloh48:
	adrp	x2, l_.str.1@PAGE
Lloh49:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_54
LBB0_45:
	mov	x20, x24
	b	LBB0_53
LBB0_46:
	mov	x20, x27
	b	LBB0_53
LBB0_47:
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x22
	bl	_TIFFSeekFile
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #8
	b	LBB0_50
LBB0_48:
	mov	x20, x25
	b	LBB0_53
LBB0_49:
	ldr	w8, [sp, #8]
	mov	w9, #12
	madd	w1, w8, w9, w26
	ldr	w2, [x23]
	mov	x0, x19
	bl	_TIFFSeekFile
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #4
LBB0_50:
	bl	_WriteOK
	cbz	w0, LBB0_52
LBB0_51:
	mov	w0, #1
	b	LBB0_55
LBB0_52:
Lloh50:
	adrp	x20, l_.str.4@PAGE
Lloh51:
	add	x20, x20, l_.str.4@PAGEOFF
LBB0_53:
	ldr	w0, [x19, #24]
Lloh52:
	adrp	x1, _TIFFLinkDirectory.module@PAGE
Lloh53:
	add	x1, x1, _TIFFLinkDirectory.module@PAGEOFF
	mov	x2, x20
LBB0_54:
	bl	_TIFFErrorExt
	mov	w0, #0
LBB0_55:
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFLinkDirectory.module:              ; @TIFFLinkDirectory.module
	.asciz	"TIFFLinkDirectory"

	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_TIFF_INSUBIFD,4,2              ; @TIFF_INSUBIFD
	.comm	_TIFF_BIGTIFF,4,2               ; @TIFF_BIGTIFF
	.comm	_TIFF_SWAB,4,2                  ; @TIFF_SWAB
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error writing SubIFD directory link"

l_.str.1:                               ; @.str.1
	.asciz	"Error writing TIFF header"

l_.str.2:                               ; @.str.2
	.asciz	"Error fetching directory count"

l_.str.3:                               ; @.str.3
	.asciz	"Error fetching directory link"

l_.str.4:                               ; @.str.4
	.asciz	"Error writing directory link"

l_.str.5:                               ; @.str.5
	.asciz	"Sanity check on tag count failed, likely corrupt TIFF"

	.no_dead_strip	_TIFFLinkDirectory
.subsections_via_symbols
