	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TIFFAppendToStrip
_TIFFAppendToStrip:                     ## @TIFFAppendToStrip
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	32(%rdi), %rax
	cmpq	$0, (%rax,%rsi,8)
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %r12
	movq	$-1, %r13
	testq	%r12, %r12
	jne	LBB0_11
LBB0_2:
	movq	%rdx, %r12
	xorl	%edi, %edi
	cmpq	$0, 40(%rbx)
	setg	%dil
	callq	_assert
	movq	48(%rbx), %rax
	movq	(%rax,%r15,8), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	32(%rbx), %rcx
	movq	(%rcx,%r15,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.4:
	cmpq	%r14, %rax
	jl	LBB0_9
## %bb.5:
	movq	%rbx, %rdi
	callq	_SeekOK
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	32(%rbx), %rax
	movq	(%rax,%r15,8), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_TIFFSeekFile
	movq	32(%rbx), %rcx
	movq	%rax, (%rcx,%r15,8)
	movq	_TIFF_DIRTYSTRIP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%rbx)
LBB0_10:
	movq	%r12, %rdx
	movq	%rax, (%rbx)
	movq	48(%rbx), %rax
	movq	(%rax,%r15,8), %r13
	movq	$0, (%rax,%r15,8)
	movq	(%rbx), %r12
LBB0_11:
	movq	%r12, %rax
	orq	%r14, %rax
	js	LBB0_12
## %bb.13:
	movq	%rbx, %rdi
	movq	%rdx, %rsi
	movq	%r14, %rdx
	callq	_WriteOK
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	addq	%r14, %r12
	movq	%r12, (%rbx)
	movq	48(%rbx), %rax
	addq	(%rax,%r15,8), %r14
	movq	%r14, (%rax,%r15,8)
	movl	$1, %r15d
	cmpq	%r13, %r14
	je	LBB0_17
## %bb.16:
	movq	_TIFF_DIRTYSTRIP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	jmp	LBB0_17
LBB0_12:
	movl	24(%rbx), %edi
	leaq	_TIFFAppendToStrip.module(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_TIFFErrorExt
	jmp	LBB0_17
LBB0_14:
	movl	24(%rbx), %edi
	movq	16(%rbx), %rcx
	leaq	_TIFFAppendToStrip.module(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_8
LBB0_7:
	movl	24(%rbx), %edi
	movq	16(%rbx), %rcx
	leaq	_TIFFAppendToStrip.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
LBB0_8:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_TIFFErrorExt
LBB0_17:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @TIFFAppendToStrip.module
_TIFFAppendToStrip.module:
	.asciz	"TIFFAppendToStrip"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Seek error at scanline %lu"

	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_TIFF_DIRTYSTRIP,4,2            ## @TIFF_DIRTYSTRIP
	.comm	_TIFF_BIGTIFF,4,2               ## @TIFF_BIGTIFF
L_.str.1:                               ## @.str.1
	.asciz	"Maximum TIFF file size exceeded"

L_.str.2:                               ## @.str.2
	.asciz	"Write error at scanline %lu"

	.no_dead_strip	_TIFFAppendToStrip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TIFFAppendToStrip
_TIFFAppendToStrip:                     ; @TIFFAppendToStrip
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	x8, [x8, x1, lsl #3]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x24, [x19]
	cbz	x24, LBB0_4
; %bb.2:
	mov	x23, #-1
	orr	x8, x24, x20
	tbz	x8, #63, LBB0_10
LBB0_3:
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x1, _TIFFAppendToStrip.module@PAGE
Lloh1:
	add	x1, x1, _TIFFAppendToStrip.module@PAGEOFF
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_4:
	ldr	x8, [x19, #40]
	cmp	x8, #0
	cset	w0, gt
	bl	_assert
	ldr	x8, [x19, #48]
	ldr	x8, [x8, x21, lsl #3]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	x9, [x19, #32]
	ldr	x1, [x9, x21, lsl #3]
	cmp	x1, #0
	ccmp	x8, x20, #8, ne
	b.ge	LBB0_7
LBB0_6:
Lloh4:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_TIFFSeekFile
	ldr	x8, [x19, #32]
	str	x0, [x8, x21, lsl #3]
Lloh7:
	adrp	x8, _TIFF_DIRTYSTRIP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TIFF_DIRTYSTRIP@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_SeekOK
	cbz	w0, LBB0_15
; %bb.8:
	ldr	x8, [x19, #32]
	ldr	x0, [x8, x21, lsl #3]
LBB0_9:
	str	x0, [x19]
	ldr	x8, [x19, #48]
	lsl	x9, x21, #3
	ldr	x23, [x8, x9]
	str	xzr, [x8, x9]
	ldr	x24, [x19]
	orr	x8, x24, x20
	tbnz	x8, #63, LBB0_3
LBB0_10:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_WriteOK
	cbz	w0, LBB0_14
; %bb.11:
	add	x8, x24, x20
	str	x8, [x19]
	ldr	x8, [x19, #48]
	lsl	x9, x21, #3
	ldr	x10, [x8, x9]
	add	x10, x10, x20
	cmp	x10, x23
	str	x10, [x8, x9]
	b.eq	LBB0_13
; %bb.12:
Lloh10:
	adrp	x8, _TIFF_DIRTYSTRIP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TIFF_DIRTYSTRIP@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_13:
	mov	w0, #1
	b	LBB0_17
LBB0_14:
	ldr	w0, [x19, #24]
	ldr	x8, [x19, #16]
Lloh13:
	adrp	x1, _TIFFAppendToStrip.module@PAGE
Lloh14:
	add	x1, x1, _TIFFAppendToStrip.module@PAGEOFF
	str	x8, [sp]
Lloh15:
	adrp	x2, l_.str.2@PAGE
Lloh16:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_15:
	ldr	w0, [x19, #24]
	ldr	x8, [x19, #16]
Lloh17:
	adrp	x1, _TIFFAppendToStrip.module@PAGE
Lloh18:
	add	x1, x1, _TIFFAppendToStrip.module@PAGEOFF
	str	x8, [sp]
Lloh19:
	adrp	x2, l_.str@PAGE
Lloh20:
	add	x2, x2, l_.str@PAGEOFF
LBB0_16:
	bl	_TIFFErrorExt
	mov	w0, #0
LBB0_17:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFAppendToStrip.module:              ; @TIFFAppendToStrip.module
	.asciz	"TIFFAppendToStrip"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Seek error at scanline %lu"

	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_TIFF_DIRTYSTRIP,4,2            ; @TIFF_DIRTYSTRIP
	.comm	_TIFF_BIGTIFF,4,2               ; @TIFF_BIGTIFF
l_.str.1:                               ; @.str.1
	.asciz	"Maximum TIFF file size exceeded"

l_.str.2:                               ; @.str.2
	.asciz	"Write error at scanline %lu"

	.no_dead_strip	_TIFFAppendToStrip
.subsections_via_symbols
