	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TIFFWriteDirectoryTagData
_TIFFWriteDirectoryTagData:             ## @TIFFWriteDirectoryTagData
	.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, %r13
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	16(%rbp), %rdx
	cmpq	$0, (%rsi)
	je	LBB0_5
## %bb.1:
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%r14, %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	cmpq	%r13, (%r12)
	setne	%dil
	callq	_assert
	cmpq	%r13, (%r12)
	jg	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	movq	(%rbx), %rax
	addq	$32, %r12
	cmpq	%rax, %r15
	jb	LBB0_2
## %bb.4:
	cmpq	%r15, %rax
	ja	LBB0_7
	jmp	LBB0_12
LBB0_5:
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_6:
	movq	(%rbx), %rax
	cmpq	%r15, %rax
	jbe	LBB0_12
LBB0_7:
	movl	%eax, %esi
	subl	%r15d, %esi
	leaq	1(%r15), %rdx
	movq	%rax, %rcx
	testb	$1, %sil
	je	LBB0_9
## %bb.8:
	movq	%rax, %rsi
	shlq	$5, %rsi
	leaq	-1(%rax), %rcx
	movq	%rcx, %rdi
	shlq	$5, %rdi
	movups	(%r14,%rdi), %xmm0
	movups	16(%r14,%rdi), %xmm1
	movups	%xmm1, 16(%r14,%rsi)
	movups	%xmm0, (%r14,%rsi)
LBB0_9:
	cmpq	%rdx, %rax
	je	LBB0_12
## %bb.10:
	movq	%rcx, %rax
	shlq	$5, %rax
	addq	%r14, %rax
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movups	-64(%rax), %xmm0
	movups	-48(%rax), %xmm1
	movups	-32(%rax), %xmm2
	movups	-16(%rax), %xmm3
	movups	%xmm3, 16(%rax)
	movups	%xmm2, (%rax)
	addq	$-2, %rcx
	movups	%xmm0, -32(%rax)
	movups	%xmm1, -16(%rax)
	addq	$-64, %rax
	cmpq	%r15, %rcx
	ja	LBB0_11
LBB0_12:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	16(%rbp), %rdx
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
LBB0_13:
	movq	24(%rbp), %rsi
	shlq	$5, %r15
	movq	%r13, (%r14,%r15)
	movq	%r8, 24(%r14,%r15)
	movq	%r9, 8(%r14,%r15)
	movq	$0, 16(%r14,%r15)
	movq	_TIFF_BIGTIFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	testl	%eax, (%rdi)
	leaq	16(%r14,%r15), %r15
	setne	%cl
	leaq	4(,%rcx,4), %rax
	cmpq	%rdx, %rax
	jae	LBB0_21
## %bb.14:
	movq	8(%rdi), %r13
	movq	%r13, %r12
	addq	%rdx, %r12
	jb	LBB0_24
## %bb.15:
	cmpq	%rdx, %r12
	jb	LBB0_24
## %bb.16:
	movq	%rdx, %r14
	movq	%r13, %rsi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_SeekOK
	testl	%eax, %eax
	je	LBB0_25
## %bb.17:
	xorl	%edi, %edi
	testq	$-2147483648, %r14              ## imm = 0x80000000
	sete	%dil
	callq	_assert
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	24(%rbp), %rsi
	movl	%r14d, %edx
	callq	_WriteOK
	testl	%eax, %eax
	je	LBB0_25
## %bb.18:
	movl	%r12d, %eax
	andl	$1, %eax
	addq	%r12, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 8(%rcx)
	movl	(%rcx), %eax
	movq	_TIFF_BIGTIFF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_28
## %bb.19:
	movq	%r13, (%r15)
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_23
## %bb.20:
	movq	%r15, %rdi
	callq	_TIFFSwabLong8
	jmp	LBB0_23
LBB0_21:
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
LBB0_22:
	callq	__TIFFmemcpy
LBB0_23:
	incq	(%rbx)
	movl	$1, %eax
	jmp	LBB0_27
LBB0_24:
	movl	16(%rdi), %edi
	leaq	_TIFFWriteDirectoryTagData.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_26
LBB0_25:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %edi
	leaq	_TIFFWriteDirectoryTagData.module(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
LBB0_26:
	callq	_TIFFErrorExt
	xorl	%eax, %eax
LBB0_27:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	movq	%r13, -72(%rbp)
	movq	_TIFF_SWAB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_30
## %bb.29:
	leaq	-72(%rbp), %rdi
	callq	_TIFFSwabLong
LBB0_30:
	leaq	-72(%rbp), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @TIFFWriteDirectoryTagData.module
_TIFFWriteDirectoryTagData.module:
	.asciz	"TIFFWriteDirectoryTagData"

	.comm	_TIFF_BIGTIFF,4,2               ## @TIFF_BIGTIFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Maximum TIFF file size exceeded"

L_.str.1:                               ## @.str.1
	.asciz	"IO error writing tag data"

	.comm	_TIFF_SWAB,4,2                  ## @TIFF_SWAB
	.no_dead_strip	_TIFFWriteDirectoryTagData
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TIFFWriteDirectoryTagData
_TIFFWriteDirectoryTagData:             ; @TIFFWriteDirectoryTagData
	.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	x22, x7
	mov	x21, x6
	mov	x24, x5
	mov	x25, x4
	mov	x26, x3
	mov	x23, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x27, #0
	mov	x28, x23
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x28]
	cmp	x8, x26
	cset	w0, ne
	bl	_assert
	ldr	x8, [x28]
	cmp	x8, x26
	b.gt	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x27, x27, #1
	ldr	x8, [x19]
	add	x28, x28, #32
	cmp	x27, x8
	b.lo	LBB0_2
; %bb.4:
	cmp	x27, x8
	b.lo	LBB0_7
	b	LBB0_9
LBB0_5:
	mov	x27, #0
	b	LBB0_9
LBB0_6:
	ldr	x8, [x19]
	cmp	x27, x8
	b.hs	LBB0_9
LBB0_7:
	add	x9, x23, x8, lsl #5
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	sub	x8, x8, #1
	ldp	q0, q1, [x9, #-32]
	stp	q0, q1, [x9], #-32
	cmp	x8, x27
	b.hi	LBB0_8
LBB0_9:
	add	x23, x23, x27, lsl #5
	str	x25, [x23, #24]
	stp	x26, x24, [x23]
	str	xzr, [x23, #16]!
	ldr	w8, [x20]
Lloh0:
	adrp	x25, _TIFF_BIGTIFF@GOTPAGE
Lloh1:
	ldr	x25, [x25, _TIFF_BIGTIFF@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	mov	w8, #8
	mov	w9, #4
	csel	x8, x9, x8, eq
	cmp	x8, x21
	b.hs	LBB0_17
; %bb.10:
	ldr	x24, [x20, #8]
	adds	x26, x24, x21
	b.hs	LBB0_20
; %bb.11:
	cmp	x26, x21
	b.lo	LBB0_20
; %bb.12:
	mov	x0, x20
	mov	x1, x24
	bl	_SeekOK
	cbz	w0, LBB0_21
; %bb.13:
	lsr	x8, x21, #31
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_WriteOK
	cbz	w0, LBB0_21
; %bb.14:
	and	x8, x26, #0x1
	add	x8, x8, x26
	str	x8, [x20, #8]
	ldr	w8, [x20]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_24
; %bb.15:
	str	x24, [x23]
Lloh2:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.16:
	mov	x0, x23
	bl	_TIFFSwabLong8
	b	LBB0_19
LBB0_17:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
LBB0_18:
	bl	__TIFFmemcpy
LBB0_19:
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	mov	w0, #1
	b	LBB0_23
LBB0_20:
	ldr	w0, [x20, #16]
Lloh5:
	adrp	x1, _TIFFWriteDirectoryTagData.module@PAGE
Lloh6:
	add	x1, x1, _TIFFWriteDirectoryTagData.module@PAGEOFF
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_22
LBB0_21:
	ldr	w0, [x20, #16]
Lloh9:
	adrp	x1, _TIFFWriteDirectoryTagData.module@PAGE
Lloh10:
	add	x1, x1, _TIFFWriteDirectoryTagData.module@PAGEOFF
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_22:
	bl	_TIFFErrorExt
	mov	w0, #0
LBB0_23:
	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_24:
	str	x24, [sp, #8]
Lloh13:
	adrp	x9, _TIFF_SWAB@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TIFF_SWAB@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_26
; %bb.25:
	add	x0, sp, #8
	bl	_TIFFSwabLong
LBB0_26:
	add	x1, sp, #8
	mov	x0, x23
	mov	w2, #4
	b	LBB0_18
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFWriteDirectoryTagData.module:      ; @TIFFWriteDirectoryTagData.module
	.asciz	"TIFFWriteDirectoryTagData"

	.comm	_TIFF_BIGTIFF,4,2               ; @TIFF_BIGTIFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Maximum TIFF file size exceeded"

l_.str.1:                               ; @.str.1
	.asciz	"IO error writing tag data"

	.comm	_TIFF_SWAB,4,2                  ; @TIFF_SWAB
	.no_dead_strip	_TIFFWriteDirectoryTagData
.subsections_via_symbols
