	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_spatial_dither
_set_spatial_dither:                    ## @set_spatial_dither
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	_FMT_BIT_DEPTH_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_FMT_SPATIAL_DITHER_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FMT_SPATIAL_DITHER_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_FMT_SPATIAL_DITHER_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$0, (%rsp)
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_REG_UPDATE_3
	movl	(%r12), %edi
	movq	_FMT_HIGHPASS_RANDOM_ENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_FMT_FRAME_RANDOM_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_FMT_RGB_RANDOM_ENABLE@GOTPCREL(%rip), %r13
	movl	(%r13), %r9d
	movl	$0, (%rsp)
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_REG_UPDATE_3
	movl	(%r12), %edi
	movq	_FMT_TEMPORAL_DITHER_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_REG_UPDATE
	cmpq	$0, (%rbx)
	je	LBB0_10
## %bb.1:
	movl	8(%rbx), %eax
	cmpl	$2, %eax
	je	LBB0_10
## %bb.2:
	movq	(%r14), %rcx
	cmpq	$0, 8(%rcx)
	je	LBB0_9
## %bb.3:
	cmpq	$0, (%rcx)
	je	LBB0_9
## %bb.4:
	cmpl	$1, 12(%rbx)
	jne	LBB0_7
## %bb.5:
	cmpl	$1, %eax
	ja	LBB0_10
## %bb.6:
	movq	_FMT_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_FMT_SPATIAL_DITHER_FRAME_COUNTER_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FMT_SPATIAL_DITHER_FRAME_COUNTER_BIT_SWAP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$15, %edx
	movl	$2, %r8d
	jmp	LBB0_8
LBB0_7:
	movq	_FMT_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_FMT_SPATIAL_DITHER_FRAME_COUNTER_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FMT_SPATIAL_DITHER_FRAME_COUNTER_BIT_SWAP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edx, %edx
	xorl	%r8d, %r8d
LBB0_8:
	callq	_REG_UPDATE_2
LBB0_9:
	movq	_FMT_DITHER_RAND_R_SEED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_FMT_RAND_R_SEED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	40(%rbx), %edx
	callq	_REG_UPDATE
	movq	_FMT_DITHER_RAND_G_SEED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_FMT_RAND_G_SEED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	36(%rbx), %edx
	callq	_REG_UPDATE
	movq	_FMT_DITHER_RAND_B_SEED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_FMT_RAND_B_SEED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	32(%rbx), %edx
	callq	_REG_UPDATE
	movl	(%r12), %edi
	movl	(%r15), %esi
	movl	12(%rbx), %r8d
	movl	16(%rbx), %edx
	movq	_FMT_FRAME_RANDOM_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r13), %r9d
	movl	20(%rbx), %eax
	movl	%eax, (%rsp)
	callq	_REG_UPDATE_3
	movl	(%r12), %edi
	movq	_FMT_SPATIAL_DITHER_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FMT_SPATIAL_DITHER_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	8(%rbx), %edx
	movl	24(%rbx), %r8d
	movq	_FMT_SPATIAL_DITHER_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$1, (%rsp)
	callq	_REG_UPDATE_3
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FMT_BIT_DEPTH_CONTROL,4,2      ## @FMT_BIT_DEPTH_CONTROL
	.comm	_FMT_SPATIAL_DITHER_EN,4,2      ## @FMT_SPATIAL_DITHER_EN
	.comm	_FMT_SPATIAL_DITHER_DEPTH,4,2   ## @FMT_SPATIAL_DITHER_DEPTH
	.comm	_FMT_SPATIAL_DITHER_MODE,4,2    ## @FMT_SPATIAL_DITHER_MODE
	.comm	_FMT_HIGHPASS_RANDOM_ENABLE,4,2 ## @FMT_HIGHPASS_RANDOM_ENABLE
	.comm	_FMT_FRAME_RANDOM_ENABLE,4,2    ## @FMT_FRAME_RANDOM_ENABLE
	.comm	_FMT_RGB_RANDOM_ENABLE,4,2      ## @FMT_RGB_RANDOM_ENABLE
	.comm	_FMT_TEMPORAL_DITHER_EN,4,2     ## @FMT_TEMPORAL_DITHER_EN
	.comm	_FMT_CONTROL,4,2                ## @FMT_CONTROL
	.comm	_FMT_SPATIAL_DITHER_FRAME_COUNTER_MAX,4,2 ## @FMT_SPATIAL_DITHER_FRAME_COUNTER_MAX
	.comm	_FMT_SPATIAL_DITHER_FRAME_COUNTER_BIT_SWAP,4,2 ## @FMT_SPATIAL_DITHER_FRAME_COUNTER_BIT_SWAP
	.comm	_FMT_DITHER_RAND_R_SEED,4,2     ## @FMT_DITHER_RAND_R_SEED
	.comm	_FMT_RAND_R_SEED,4,2            ## @FMT_RAND_R_SEED
	.comm	_FMT_DITHER_RAND_G_SEED,4,2     ## @FMT_DITHER_RAND_G_SEED
	.comm	_FMT_RAND_G_SEED,4,2            ## @FMT_RAND_G_SEED
	.comm	_FMT_DITHER_RAND_B_SEED,4,2     ## @FMT_DITHER_RAND_B_SEED
	.comm	_FMT_RAND_B_SEED,4,2            ## @FMT_RAND_B_SEED
	.no_dead_strip	_set_spatial_dither
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_spatial_dither
_set_spatial_dither:                    ; @set_spatial_dither
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _FMT_BIT_DEPTH_CONTROL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _FMT_BIT_DEPTH_CONTROL@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x21, _FMT_SPATIAL_DITHER_EN@GOTPAGE
Lloh3:
	ldr	x21, [x21, _FMT_SPATIAL_DITHER_EN@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh4:
	adrp	x23, _FMT_SPATIAL_DITHER_DEPTH@GOTPAGE
Lloh5:
	ldr	x23, [x23, _FMT_SPATIAL_DITHER_DEPTH@GOTPAGEOFF]
	ldr	w3, [x23]
Lloh6:
	adrp	x24, _FMT_SPATIAL_DITHER_MODE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _FMT_SPATIAL_DITHER_MODE@GOTPAGEOFF]
	ldr	w5, [x24]
	mov	w2, #0
	mov	w4, #0
	mov	w6, #0
	bl	_REG_UPDATE_3
	ldr	w0, [x22]
Lloh8:
	adrp	x25, _FMT_HIGHPASS_RANDOM_ENABLE@GOTPAGE
Lloh9:
	ldr	x25, [x25, _FMT_HIGHPASS_RANDOM_ENABLE@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh10:
	adrp	x26, _FMT_FRAME_RANDOM_ENABLE@GOTPAGE
Lloh11:
	ldr	x26, [x26, _FMT_FRAME_RANDOM_ENABLE@GOTPAGEOFF]
	ldr	w3, [x26]
Lloh12:
	adrp	x27, _FMT_RGB_RANDOM_ENABLE@GOTPAGE
Lloh13:
	ldr	x27, [x27, _FMT_RGB_RANDOM_ENABLE@GOTPAGEOFF]
	ldr	w5, [x27]
	mov	w2, #0
	mov	w4, #0
	mov	w6, #0
	bl	_REG_UPDATE_3
	ldr	w0, [x22]
Lloh14:
	adrp	x8, _FMT_TEMPORAL_DITHER_EN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FMT_TEMPORAL_DITHER_EN@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_REG_UPDATE
	ldr	x8, [x19]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.ne	LBB0_3
LBB0_2:
	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
	ret
LBB0_3:
	ldr	x9, [x20]
	ldr	x10, [x9, #8]
	cbz	x10, LBB0_10
; %bb.4:
	ldr	x9, [x9]
	cbz	x9, LBB0_10
; %bb.5:
	ldr	w9, [x19, #12]
	cmp	w9, #1
	b.ne	LBB0_8
; %bb.6:
	cmp	w8, #1
	b.hi	LBB0_2
; %bb.7:
Lloh17:
	adrp	x8, _FMT_CONTROL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _FMT_CONTROL@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x8, _FMT_SPATIAL_DITHER_FRAME_COUNTER_MAX@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FMT_SPATIAL_DITHER_FRAME_COUNTER_MAX@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _FMT_SPATIAL_DITHER_FRAME_COUNTER_BIT_SWAP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FMT_SPATIAL_DITHER_FRAME_COUNTER_BIT_SWAP@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
	mov	w2, #15
	mov	w4, #2
	b	LBB0_9
LBB0_8:
Lloh26:
	adrp	x8, _FMT_CONTROL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _FMT_CONTROL@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x8, _FMT_SPATIAL_DITHER_FRAME_COUNTER_MAX@GOTPAGE
Lloh30:
	ldr	x8, [x8, _FMT_SPATIAL_DITHER_FRAME_COUNTER_MAX@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _FMT_SPATIAL_DITHER_FRAME_COUNTER_BIT_SWAP@GOTPAGE
Lloh33:
	ldr	x8, [x8, _FMT_SPATIAL_DITHER_FRAME_COUNTER_BIT_SWAP@GOTPAGEOFF]
Lloh34:
	ldr	w3, [x8]
	mov	w2, #0
	mov	w4, #0
LBB0_9:
	bl	_REG_UPDATE_2
LBB0_10:
Lloh35:
	adrp	x8, _FMT_DITHER_RAND_R_SEED@GOTPAGE
Lloh36:
	ldr	x8, [x8, _FMT_DITHER_RAND_R_SEED@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
Lloh38:
	adrp	x8, _FMT_RAND_R_SEED@GOTPAGE
Lloh39:
	ldr	x8, [x8, _FMT_RAND_R_SEED@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	ldr	w2, [x19, #40]
	bl	_REG_UPDATE
Lloh41:
	adrp	x8, _FMT_DITHER_RAND_G_SEED@GOTPAGE
Lloh42:
	ldr	x8, [x8, _FMT_DITHER_RAND_G_SEED@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
Lloh44:
	adrp	x8, _FMT_RAND_G_SEED@GOTPAGE
Lloh45:
	ldr	x8, [x8, _FMT_RAND_G_SEED@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	ldr	w2, [x19, #36]
	bl	_REG_UPDATE
Lloh47:
	adrp	x8, _FMT_DITHER_RAND_B_SEED@GOTPAGE
Lloh48:
	ldr	x8, [x8, _FMT_DITHER_RAND_B_SEED@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
Lloh50:
	adrp	x8, _FMT_RAND_B_SEED@GOTPAGE
Lloh51:
	ldr	x8, [x8, _FMT_RAND_B_SEED@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	ldr	w2, [x19, #32]
	bl	_REG_UPDATE
	ldr	w0, [x22]
	ldr	w1, [x25]
	ldr	w3, [x26]
	ldp	w4, w2, [x19, #12]
	ldr	w5, [x27]
	ldr	w6, [x19, #20]
	bl	_REG_UPDATE_3
	ldr	w0, [x22]
	ldr	w1, [x23]
	ldr	w2, [x19, #8]
	ldr	w3, [x24]
	ldr	w4, [x19, #24]
	ldr	w5, [x21]
	mov	w6, #1
	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	_REG_UPDATE_3
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_FMT_BIT_DEPTH_CONTROL,4,2      ; @FMT_BIT_DEPTH_CONTROL
	.comm	_FMT_SPATIAL_DITHER_EN,4,2      ; @FMT_SPATIAL_DITHER_EN
	.comm	_FMT_SPATIAL_DITHER_DEPTH,4,2   ; @FMT_SPATIAL_DITHER_DEPTH
	.comm	_FMT_SPATIAL_DITHER_MODE,4,2    ; @FMT_SPATIAL_DITHER_MODE
	.comm	_FMT_HIGHPASS_RANDOM_ENABLE,4,2 ; @FMT_HIGHPASS_RANDOM_ENABLE
	.comm	_FMT_FRAME_RANDOM_ENABLE,4,2    ; @FMT_FRAME_RANDOM_ENABLE
	.comm	_FMT_RGB_RANDOM_ENABLE,4,2      ; @FMT_RGB_RANDOM_ENABLE
	.comm	_FMT_TEMPORAL_DITHER_EN,4,2     ; @FMT_TEMPORAL_DITHER_EN
	.comm	_FMT_CONTROL,4,2                ; @FMT_CONTROL
	.comm	_FMT_SPATIAL_DITHER_FRAME_COUNTER_MAX,4,2 ; @FMT_SPATIAL_DITHER_FRAME_COUNTER_MAX
	.comm	_FMT_SPATIAL_DITHER_FRAME_COUNTER_BIT_SWAP,4,2 ; @FMT_SPATIAL_DITHER_FRAME_COUNTER_BIT_SWAP
	.comm	_FMT_DITHER_RAND_R_SEED,4,2     ; @FMT_DITHER_RAND_R_SEED
	.comm	_FMT_RAND_R_SEED,4,2            ; @FMT_RAND_R_SEED
	.comm	_FMT_DITHER_RAND_G_SEED,4,2     ; @FMT_DITHER_RAND_G_SEED
	.comm	_FMT_RAND_G_SEED,4,2            ; @FMT_RAND_G_SEED
	.comm	_FMT_DITHER_RAND_B_SEED,4,2     ; @FMT_DITHER_RAND_B_SEED
	.comm	_FMT_RAND_B_SEED,4,2            ; @FMT_RAND_B_SEED
	.no_dead_strip	_set_spatial_dither
.subsections_via_symbols
