	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_block
_encode_block:                          ## @encode_block
	.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	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_all_white
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	movslq	%r15d, %r15
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	shlq	$32, %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r12d, %edx
	callq	_all_black
	movq	_ff_xface_probranges_per_level@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	%r15d, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_XFACE_COLOR_GREY@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	(%rcx,%r15,8), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pq_push
	movl	%r14d, %r13d
	shrl	$31, %r13d
	addl	%r14d, %r13d
	sarl	%r13d
	movl	%r12d, %r14d
	shrl	$31, %r14d
	addl	%r12d, %r14d
	sarl	%r14d
	incq	%r15
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %ecx
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r14d, %edx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %r8
	callq	_encode_block
	movslq	%r13d, %r12
	leaq	(%rbx,%r12), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movq	%r15, %r8
	callq	_encode_block
	movq	_XFACE_WIDTH@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	movslq	%r14d, %r15
	imulq	%r15, %rdi
	addq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	callq	_encode_block
	movq	_XFACE_WIDTH@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	imulq	%r15, %rbx
	addq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	callq	_all_white
	movabsq	$4294967296, %rcx               ## imm = 0x100000000
	addq	%rcx, %r15
	movl	%r14d, %r12d
	movl	%r13d, %r14d
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_5:
	movq	_ff_xface_probranges_per_level@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movq	_XFACE_COLOR_WHITE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	shlq	$2, %rsi
	addq	(%rax,%rcx,8), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pq_push                        ## TAILCALL
LBB0_6:
	sarq	$29, %r15
	movq	_XFACE_COLOR_BLACK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	(%rcx,%r15), %rsi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_pq_push
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_push_greys                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_xface_probranges_per_level,8,3 ## @ff_xface_probranges_per_level
	.comm	_XFACE_COLOR_WHITE,8,3          ## @XFACE_COLOR_WHITE
	.comm	_XFACE_COLOR_BLACK,8,3          ## @XFACE_COLOR_BLACK
	.comm	_XFACE_COLOR_GREY,8,3           ## @XFACE_COLOR_GREY
	.comm	_XFACE_WIDTH,4,2                ## @XFACE_WIDTH
	.no_dead_strip	_encode_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_block
_encode_block:                          ; @encode_block
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
	bl	_all_white
	cbnz	x0, LBB0_4
; %bb.1:
	sbfiz	x26, x22, #32, #32
	sbfiz	x27, x22, #3, #32
Lloh0:
	adrp	x28, _XFACE_WIDTH@GOTPAGE
Lloh1:
	ldr	x28, [x28, _XFACE_WIDTH@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	bl	_all_black
Lloh2:
	adrp	x8, _ff_xface_probranges_per_level@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ff_xface_probranges_per_level@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x8, x27]
Lloh5:
	adrp	x9, _XFACE_COLOR_GREY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _XFACE_COLOR_GREY@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	bl	_pq_push
	cmp	w21, #0
	cinc	w8, w21, lt
	asr	w21, w8, #1
	cmp	w20, #0
	cinc	w25, w20, lt
	asr	w20, w25, #1
	add	w22, w22, #1
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	mov	x4, x19
	bl	_encode_block
	add	x24, x23, w21, sxtw
	mov	x0, x24
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	mov	x4, x19
	bl	_encode_block
	ldrsw	x8, [x28]
	sbfx	x25, x25, #1, #31
	madd	x0, x8, x25, x23
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	mov	x4, x19
	bl	_encode_block
	ldrsw	x8, [x28]
	madd	x23, x8, x25, x24
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	bl	_all_white
	mov	x8, #4294967296
	add	x26, x26, x8
	add	x27, x27, #8
	cbz	x0, LBB0_2
LBB0_4:
Lloh8:
	adrp	x8, _ff_xface_probranges_per_level@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ff_xface_probranges_per_level@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	x8, [x8, w22, sxtw #3]
Lloh11:
	adrp	x9, _XFACE_COLOR_WHITE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _XFACE_COLOR_WHITE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_pq_push
LBB0_5:
	asr	x9, x26, #29
	ldr	x8, [x8, x9]
Lloh14:
	adrp	x9, _XFACE_COLOR_BLACK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _XFACE_COLOR_BLACK@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	bl	_pq_push
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	mov	x3, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_push_greys
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_xface_probranges_per_level,8,3 ; @ff_xface_probranges_per_level
	.comm	_XFACE_COLOR_WHITE,8,3          ; @XFACE_COLOR_WHITE
	.comm	_XFACE_COLOR_BLACK,8,3          ; @XFACE_COLOR_BLACK
	.comm	_XFACE_COLOR_GREY,8,3           ; @XFACE_COLOR_GREY
	.comm	_XFACE_WIDTH,4,2                ; @XFACE_WIDTH
	.no_dead_strip	_encode_block
.subsections_via_symbols
