	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TIFFUnlinkDirectory            ## -- Begin function TIFFUnlinkDirectory
	.p2align	4, 0x90
_TIFFUnlinkDirectory:                   ## @TIFFUnlinkDirectory
	.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, %r12
	movq	(%rdi), %rax
	movq	_O_RDONLY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movl	96(%r12), %edi
	leaq	_TIFFUnlinkDirectory.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
LBB0_2:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_TIFFErrorExt
	jmp	LBB0_23
LBB0_3:
	movq	%rsi, %r14
	movq	_TIFF_BIGTIFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	andl	8(%r12), %eax
	setne	%cl
	sete	%dl
	leaq	4(,%rcx,4), %rax
	movq	104(%r12,%rdx,8), %rcx
	movq	%rcx, -48(%rbp)
	movq	%rax, -64(%rbp)
	leaq	1(%rsi), %r13
	leaq	-48(%rbp), %r15
	leaq	-64(%rbp), %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	decq	%r13
	cmpq	$2, %r13
	jl	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, -48(%rbp)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_TIFFAdvanceDirectory
	testl	%eax, %eax
	jne	LBB0_4
## %bb.8:
	xorl	%r15d, %r15d
	jmp	LBB0_23
LBB0_9:
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_TIFFAdvanceDirectory
	testl	%eax, %eax
	je	LBB0_23
## %bb.10:
	movq	-64(%rbp), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_TIFFSeekFile
	movl	8(%r12), %eax
	movq	_TIFF_BIGTIFF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.16:
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_18
## %bb.17:
	leaq	-48(%rbp), %rdi
	callq	_TIFFSwabLong8
LBB0_18:
	leaq	-48(%rbp), %rsi
	jmp	LBB0_14
LBB0_6:
	movl	96(%r12), %edi
	leaq	_TIFFUnlinkDirectory.module(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_TIFFErrorExt
	jmp	LBB0_23
LBB0_11:
	movq	-48(%rbp), %rax
	movq	%rax, -56(%rbp)
	movl	$1, %edi
	callq	_assert
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r12)
	je	LBB0_13
## %bb.12:
	leaq	-56(%rbp), %rdi
	callq	_TIFFSwabLong
LBB0_13:
	leaq	-56(%rbp), %rsi
LBB0_14:
	movq	%r12, %rdi
	movl	$8, %edx
	callq	_WriteOK
	testl	%eax, %eax
	je	LBB0_15
## %bb.19:
	movq	%r12, %rdi
	callq	*88(%r12)
	movl	8(%r12), %eax
	movq	_TIFF_MYBUFFER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_22
## %bb.20:
	movq	80(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.21:
	callq	__TIFFfree
	pxor	%xmm0, %xmm0
	movdqu	%xmm0, 56(%r12)
	movdqu	%xmm0, 72(%r12)
	movl	8(%r12), %eax
LBB0_22:
	movq	_TIFF_BEENWRITING@GOTPCREL(%rip), %rcx
	movq	_TIFF_BUFFERSETUP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_TIFF_POSTENCODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_TIFF_BUF4WRITE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	%edx, 8(%r12)
	movq	%r12, %rdi
	callq	_TIFFFreeDirectory
	movq	%r12, %rdi
	callq	_TIFFDefaultDirectory
	pxor	%xmm0, %xmm0
	movdqu	%xmm0, 32(%r12)
	movq	$0, 48(%r12)
	pcmpeqd	%xmm0, %xmm0
	movdqu	%xmm0, 16(%r12)
	movl	$1, %r15d
LBB0_23:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	96(%r12), %edi
	leaq	_TIFFUnlinkDirectory.module(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @TIFFUnlinkDirectory.module
_TIFFUnlinkDirectory.module:
	.asciz	"TIFFUnlinkDirectory"

	.comm	_O_RDONLY,8,3                   ## @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can not unlink directory in read-only file"

	.comm	_TIFF_BIGTIFF,4,2               ## @TIFF_BIGTIFF
L_.str.1:                               ## @.str.1
	.asciz	"Directory %d does not exist"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_TIFF_SWAB,4,2                  ## @TIFF_SWAB
L_.str.2:                               ## @.str.2
	.asciz	"Error writing directory link"

	.comm	_TIFF_MYBUFFER,4,2              ## @TIFF_MYBUFFER
	.comm	_TIFF_BEENWRITING,4,2           ## @TIFF_BEENWRITING
	.comm	_TIFF_BUFFERSETUP,4,2           ## @TIFF_BUFFERSETUP
	.comm	_TIFF_POSTENCODE,4,2            ## @TIFF_POSTENCODE
	.comm	_TIFF_BUF4WRITE,4,2             ## @TIFF_BUF4WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TIFFUnlinkDirectory            ; -- Begin function TIFFUnlinkDirectory
	.p2align	2
_TIFFUnlinkDirectory:                   ; @TIFFUnlinkDirectory
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19, #96]
Lloh3:
	adrp	x1, _TIFFUnlinkDirectory.module@PAGE
Lloh4:
	add	x1, x1, _TIFFUnlinkDirectory.module@PAGEOFF
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_12
LBB0_2:
	mov	x20, x1
	ldr	w8, [x19, #8]
Lloh7:
	adrp	x21, _TIFF_BIGTIFF@GOTPAGE
Lloh8:
	ldr	x21, [x21, _TIFF_BIGTIFF@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	mov	w8, #104
	mov	w9, #112
	csel	x8, x9, x8, eq
	mov	w9, #8
	mov	w10, #4
	ldr	x8, [x19, x8]
	csel	x9, x10, x9, eq
	stp	x9, x8, [sp, #16]
	add	x22, x1, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	x22, x22, #1
	cmp	x22, #2
	b.lt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #24
	add	x2, sp, #16
	mov	x0, x19
	bl	_TIFFAdvanceDirectory
	cbnz	w0, LBB0_3
	b	LBB0_13
LBB0_6:
	add	x1, sp, #24
	mov	x0, x19
	mov	x2, #0
	bl	_TIFFAdvanceDirectory
	cbz	w0, LBB0_13
; %bb.7:
	ldr	x1, [sp, #16]
Lloh9:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_TIFFSeekFile
	ldr	w8, [x19, #8]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.8:
Lloh12:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	add	x0, sp, #24
	bl	_TIFFSwabLong8
LBB0_10:
	add	x1, sp, #24
	b	LBB0_17
LBB0_11:
	ldr	w0, [x19, #96]
Lloh15:
	adrp	x1, _TIFFUnlinkDirectory.module@PAGE
Lloh16:
	add	x1, x1, _TIFFUnlinkDirectory.module@PAGEOFF
	str	x20, [sp]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_12:
	bl	_TIFFErrorExt
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
	ldr	x8, [sp, #24]
	str	x8, [sp, #8]
	mov	w0, #1
	bl	_assert
	ldr	w8, [x19, #8]
Lloh19:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh20:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.15:
	add	x0, sp, #8
	bl	_TIFFSwabLong
LBB0_16:
	add	x1, sp, #8
LBB0_17:
	mov	x0, x19
	mov	w2, #8
	bl	_WriteOK
	cbz	w0, LBB0_22
; %bb.18:
	ldr	x8, [x19, #88]
	mov	x0, x19
	blr	x8
	ldr	w8, [x19, #8]
Lloh22:
	adrp	x9, _TIFF_MYBUFFER@GOTPAGE
Lloh23:
	ldr	x9, [x9, _TIFF_MYBUFFER@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.19:
	ldr	x0, [x19, #80]
	cbz	x0, LBB0_21
; %bb.20:
	bl	__TIFFfree
	movi.2d	v0, #0000000000000000
	stur	q0, [x19, #56]
	stur	q0, [x19, #72]
	ldr	w8, [x19, #8]
LBB0_21:
Lloh25:
	adrp	x9, _TIFF_BEENWRITING@GOTPAGE
Lloh26:
	ldr	x9, [x9, _TIFF_BEENWRITING@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
Lloh28:
	adrp	x10, _TIFF_BUFFERSETUP@GOTPAGE
Lloh29:
	ldr	x10, [x10, _TIFF_BUFFERSETUP@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh31:
	adrp	x10, _TIFF_POSTENCODE@GOTPAGE
Lloh32:
	ldr	x10, [x10, _TIFF_POSTENCODE@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
	orr	w9, w9, w10
Lloh34:
	adrp	x10, _TIFF_BUF4WRITE@GOTPAGE
Lloh35:
	ldr	x10, [x10, _TIFF_BUF4WRITE@GOTPAGEOFF]
Lloh36:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bic	w8, w8, w9
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_TIFFFreeDirectory
	mov	x0, x19
	bl	_TIFFDefaultDirectory
	stp	xzr, xzr, [x19, #40]
	mov	x8, #-1
	mov	w0, #1
	str	x8, [x19, #16]
	stp	x8, xzr, [x19, #24]
	b	LBB0_13
LBB0_22:
	ldr	w0, [x19, #96]
Lloh37:
	adrp	x1, _TIFFUnlinkDirectory.module@PAGE
Lloh38:
	add	x1, x1, _TIFFUnlinkDirectory.module@PAGEOFF
Lloh39:
	adrp	x2, l_.str.2@PAGE
Lloh40:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFUnlinkDirectory.module:            ; @TIFFUnlinkDirectory.module
	.asciz	"TIFFUnlinkDirectory"

	.comm	_O_RDONLY,8,3                   ; @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can not unlink directory in read-only file"

	.comm	_TIFF_BIGTIFF,4,2               ; @TIFF_BIGTIFF
l_.str.1:                               ; @.str.1
	.asciz	"Directory %d does not exist"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_TIFF_SWAB,4,2                  ; @TIFF_SWAB
l_.str.2:                               ; @.str.2
	.asciz	"Error writing directory link"

	.comm	_TIFF_MYBUFFER,4,2              ; @TIFF_MYBUFFER
	.comm	_TIFF_BEENWRITING,4,2           ; @TIFF_BEENWRITING
	.comm	_TIFF_BUFFERSETUP,4,2           ; @TIFF_BUFFERSETUP
	.comm	_TIFF_POSTENCODE,4,2            ; @TIFF_POSTENCODE
	.comm	_TIFF_BUF4WRITE,4,2             ; @TIFF_BUF4WRITE
.subsections_via_symbols
