	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TIFFWriteEncodedTile           ## -- Begin function TIFFWriteEncodedTile
	.p2align	4, 0x90
_TIFFWriteEncodedTile:                  ## @TIFFWriteEncodedTile
	.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, %r13
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	_TIFFWriteEncodedTile.module(%rip), %rsi
	callq	_WRITECHECKTILES
	movq	$-1, %r14
	testl	%eax, %eax
	je	LBB0_16
## %bb.1:
	movq	128(%rbx), %r8
	cmpq	%r15, %r8
	jbe	LBB0_10
## %bb.2:
	movq	%rbx, %rdi
	callq	_BUFFERCHECK
	testl	%eax, %eax
	je	LBB0_16
## %bb.3:
	movq	_TIFF_BUF4WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movq	%r15, 8(%rbx)
	movq	136(%rbx), %rax
	movq	(%rax,%r15,8), %rdi
	testq	%rdi, %rdi
	jle	LBB0_7
## %bb.4:
	cmpq	%rdi, 16(%rbx)
	jg	LBB0_6
## %bb.5:
	incl	%edi
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_TIFFroundup_64
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%rax, %rdx
	callq	_TIFFWriteBufferSetup
	testl	%eax, %eax
	je	LBB0_16
LBB0_6:
	movq	$0, 120(%rbx)
LBB0_7:
	movq	$0, 24(%rbx)
	movq	56(%rbx), %rax
	movq	144(%rbx), %rsi
	movq	%rax, 64(%rbx)
	movl	184(%rbx), %edi
	callq	_TIFFhowmany_32
	testq	%rax, %rax
	je	LBB0_15
## %bb.8:
	movq	%rax, %rcx
	orq	%r15, %rax
	shrq	$32, %rax
	je	LBB0_11
## %bb.9:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_12
LBB0_10:
	movl	112(%rbx), %edi
	leaq	_TIFFWriteEncodedTile.module(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_TIFFErrorExt
	jmp	LBB0_16
LBB0_11:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_12:
	imulq	144(%rbx), %rdx
	movq	%rdx, 32(%rbx)
	movl	180(%rbx), %edi
	movq	152(%rbx), %rsi
	callq	_TIFFhowmany_32
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movq	%rax, %rcx
	orq	%r15, %rax
	shrq	$32, %rax
	je	LBB0_17
## %bb.14:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_18
LBB0_15:
	movl	112(%rbx), %edi
	leaq	_TIFFWriteEncodedTile.module(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	xorl	%eax, %eax
	callq	_TIFFErrorExt
LBB0_16:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_18:
	imulq	152(%rbx), %rdx
	movq	%rdx, 40(%rbx)
	movl	(%rbx), %eax
	movq	_TIFF_CODERSETUP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_21
## %bb.19:
	movq	%rbx, %rdi
	callq	*104(%rbx)
	testl	%eax, %eax
	je	LBB0_16
## %bb.20:
	movl	(%rbx), %eax
	movq	_TIFF_CODERSETUP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
LBB0_21:
	movq	_TIFF_POSTENCODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, (%rbx)
	movq	48(%rbx), %rax
	cmpq	%r13, %rax
	movq	%r13, %rcx
	cmovlq	%rax, %rcx
	testq	%r13, %r13
	movq	%rcx, %r13
	cmovleq	%rax, %r13
	movq	160(%rbx), %rax
	movq	_COMPRESSION_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_28
## %bb.22:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	*88(%rbx)
	movl	176(%rbx), %esi
	movq	%rbx, %rdi
	callq	_isFillOrder
	testl	%eax, %eax
	jne	LBB0_25
## %bb.23:
	movq	_TIFF_NOBITREV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_25
## %bb.24:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_TIFFReverseBits
LBB0_25:
	testq	%r13, %r13
	jle	LBB0_30
## %bb.26:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	_TIFFAppendToStrip
	testl	%eax, %eax
	je	LBB0_16
LBB0_30:
	movq	%r13, %r14
	jmp	LBB0_16
LBB0_28:
	movq	168(%rbx), %rcx
	movq	%r15, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_31
## %bb.29:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_32
LBB0_31:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_32:
	movq	%rbx, %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	callq	*96(%rbx)
	testl	%eax, %eax
	je	LBB0_16
## %bb.33:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	*88(%rbx)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r13, %r12
	movq	%r13, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	*80(%rbx)
	testl	%eax, %eax
	je	LBB0_16
## %bb.34:
	movq	%rbx, %rdi
	callq	*72(%rbx)
	testl	%eax, %eax
	je	LBB0_16
## %bb.35:
	movl	176(%rbx), %esi
	movq	%rbx, %rdi
	callq	_isFillOrder
	testl	%eax, %eax
	jne	LBB0_38
## %bb.36:
	movq	_TIFF_NOBITREV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_38
## %bb.37:
	movq	24(%rbx), %rsi
	movq	56(%rbx), %rdi
	callq	_TIFFReverseBits
LBB0_38:
	movq	24(%rbx), %rcx
	testq	%rcx, %rcx
	jle	LBB0_40
## %bb.39:
	movq	56(%rbx), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_TIFFAppendToStrip
	testl	%eax, %eax
	je	LBB0_16
LBB0_40:
	movq	$0, 24(%rbx)
	movq	56(%rbx), %rax
	movq	%rax, 64(%rbx)
	movq	%r12, %r14
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @TIFFWriteEncodedTile.module
_TIFFWriteEncodedTile.module:
	.asciz	"TIFFWriteEncodedTile"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Tile %lu out of range, max %lu"

	.comm	_TIFF_BUF4WRITE,4,2             ## @TIFF_BUF4WRITE
L_.str.1:                               ## @.str.1
	.asciz	"Zero tiles"

	.comm	_TIFF_CODERSETUP,4,2            ## @TIFF_CODERSETUP
	.comm	_TIFF_POSTENCODE,4,2            ## @TIFF_POSTENCODE
	.comm	_COMPRESSION_NONE,8,3           ## @COMPRESSION_NONE
	.comm	_TIFF_NOBITREV,4,2              ## @TIFF_NOBITREV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TIFFWriteEncodedTile           ; -- Begin function TIFFWriteEncodedTile
	.p2align	2
_TIFFWriteEncodedTile:                  ; @TIFFWriteEncodedTile
	.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	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, _TIFFWriteEncodedTile.module@PAGE
Lloh1:
	add	x1, x1, _TIFFWriteEncodedTile.module@PAGEOFF
	bl	_WRITECHECKTILES
	cbz	w0, LBB0_21
; %bb.1:
	ldr	x8, [x19, #128]
	cmp	x8, x20
	b.ls	LBB0_18
; %bb.2:
	mov	x0, x19
	bl	_BUFFERCHECK
	cbz	w0, LBB0_21
; %bb.3:
Lloh2:
	adrp	x8, _TIFF_BUF4WRITE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TIFF_BUF4WRITE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	str	x20, [x19, #8]
	ldr	x8, [x19, #136]
	ldr	x8, [x8, x20, lsl #3]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.4:
	ldr	x9, [x19, #16]
	cmp	x9, x8
	b.gt	LBB0_6
; %bb.5:
	add	w0, w8, #1
	mov	w1, #1024
	bl	_TIFFroundup_64
	mov	x2, x0
	mov	x0, x19
	mov	x1, #0
	bl	_TIFFWriteBufferSetup
	cbz	w0, LBB0_21
LBB0_6:
	str	xzr, [x19, #120]
LBB0_7:
	str	xzr, [x19, #24]
	ldr	x8, [x19, #56]
	str	x8, [x19, #64]
	ldr	w0, [x19, #184]
	ldr	x1, [x19, #144]
	bl	_TIFFhowmany_32
	cbz	x0, LBB0_19
; %bb.8:
	udiv	x8, x20, x0
	msub	x8, x8, x0, x20
	ldp	x9, x1, [x19, #144]
	mul	x8, x9, x8
	str	x8, [x19, #32]
	ldr	w0, [x19, #180]
	bl	_TIFFhowmany_32
	cbz	x0, LBB0_19
; %bb.9:
	udiv	x8, x20, x0
	msub	x8, x8, x0, x20
	ldr	x9, [x19, #152]
	mul	x8, x9, x8
	str	x8, [x19, #40]
	ldr	w8, [x19]
Lloh5:
	adrp	x23, _TIFF_CODERSETUP@GOTPAGE
Lloh6:
	ldr	x23, [x23, _TIFF_CODERSETUP@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.10:
	ldr	x8, [x19, #104]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_21
; %bb.11:
	ldr	w8, [x23]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_12:
Lloh7:
	adrp	x9, _TIFF_POSTENCODE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TIFF_POSTENCODE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19]
	ldr	x8, [x19, #48]
	cmp	x8, x22
	ccmp	x22, #1, #8, ge
	csel	x22, x8, x22, lt
	ldr	x8, [x19, #160]
Lloh10:
	adrp	x9, _COMPRESSION_NONE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _COMPRESSION_NONE@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_23
; %bb.13:
	ldr	x8, [x19, #88]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	blr	x8
	ldr	w1, [x19, #176]
	mov	x0, x19
	bl	_isFillOrder
	cbnz	w0, LBB0_16
; %bb.14:
	ldr	w8, [x19]
Lloh13:
	adrp	x9, _TIFF_NOBITREV@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TIFF_NOBITREV@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x21
	mov	x1, x22
	bl	_TIFFReverseBits
LBB0_16:
	cmp	x22, #1
	b.lt	LBB0_22
; %bb.17:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_TIFFAppendToStrip
	cbnz	w0, LBB0_22
	b	LBB0_21
LBB0_18:
	ldr	w0, [x19, #112]
Lloh16:
	adrp	x1, _TIFFWriteEncodedTile.module@PAGE
Lloh17:
	add	x1, x1, _TIFFWriteEncodedTile.module@PAGEOFF
	stp	x20, x8, [sp]
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_20
LBB0_19:
	ldr	w0, [x19, #112]
Lloh20:
	adrp	x1, _TIFFWriteEncodedTile.module@PAGE
Lloh21:
	add	x1, x1, _TIFFWriteEncodedTile.module@PAGEOFF
Lloh22:
	adrp	x2, l_.str.1@PAGE
Lloh23:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_20:
	bl	_TIFFErrorExt
LBB0_21:
	mov	x22, #-1
LBB0_22:
	mov	x0, x22
	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
LBB0_23:
	ldr	x8, [x19, #168]
	ldr	x9, [x19, #96]
	udiv	x23, x20, x8
	mov	x0, x19
	mov	x1, x23
	blr	x9
	cbz	w0, LBB0_21
; %bb.24:
	ldr	x8, [x19, #88]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	blr	x8
	ldr	x8, [x19, #80]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	blr	x8
	cbz	w0, LBB0_21
; %bb.25:
	ldr	x8, [x19, #72]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_21
; %bb.26:
	ldr	w1, [x19, #176]
	mov	x0, x19
	bl	_isFillOrder
	cbnz	w0, LBB0_29
; %bb.27:
	ldr	w8, [x19]
Lloh24:
	adrp	x9, _TIFF_NOBITREV@GOTPAGE
Lloh25:
	ldr	x9, [x9, _TIFF_NOBITREV@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_29
; %bb.28:
	ldr	x0, [x19, #56]
	ldr	x1, [x19, #24]
	bl	_TIFFReverseBits
LBB0_29:
	ldr	x3, [x19, #24]
	cmp	x3, #1
	b.lt	LBB0_31
; %bb.30:
	ldr	x2, [x19, #56]
	mov	x0, x19
	mov	x1, x20
	bl	_TIFFAppendToStrip
	cbz	w0, LBB0_21
LBB0_31:
	str	xzr, [x19, #24]
	ldr	x8, [x19, #56]
	str	x8, [x19, #64]
	b	LBB0_22
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_TIFFWriteEncodedTile.module:           ; @TIFFWriteEncodedTile.module
	.asciz	"TIFFWriteEncodedTile"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Tile %lu out of range, max %lu"

	.comm	_TIFF_BUF4WRITE,4,2             ; @TIFF_BUF4WRITE
l_.str.1:                               ; @.str.1
	.asciz	"Zero tiles"

	.comm	_TIFF_CODERSETUP,4,2            ; @TIFF_CODERSETUP
	.comm	_TIFF_POSTENCODE,4,2            ; @TIFF_POSTENCODE
	.comm	_COMPRESSION_NONE,8,3           ; @COMPRESSION_NONE
	.comm	_TIFF_NOBITREV,4,2              ; @TIFF_NOBITREV
.subsections_via_symbols
