	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_stream_set_dither_option    ## -- Begin function dc_stream_set_dither_option
	.p2align	4, 0x90
_dc_stream_set_dither_option:           ## @dc_stream_set_dither_option
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MAX_PIPES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.1:
	movq	%rdi, %r12
	movq	8(%rdi), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %r15
	shlq	$5, %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r12, 24(%r15,%rbx)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$32, %rbx
	cmpq	%rbx, %rax
	jne	LBB0_2
	jmp	LBB0_9
LBB0_4:
	movq	_DITHER_OPTION_MAX@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jb	LBB0_9
## %bb.5:
	movl	%esi, (%r12)
	leaq	-40(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_resource_build_bit_depth_reduction_params
	movl	-40(%rbp), %eax
	movl	%eax, 4(%r12)
	movq	16(%r15,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.6:
	movq	(%rdi), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	addq	$4, %r12
	movl	8(%r15,%rbx), %esi
	movq	%r12, %rdx
	callq	*%rax
LBB0_8:
	movq	(%r15,%rbx), %rdi
	movq	(%rdi), %rax
	leaq	-40(%rbp), %rsi
	callq	*(%rax)
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PIPES,4,2                  ## @MAX_PIPES
	.comm	_DITHER_OPTION_MAX,4,2          ## @DITHER_OPTION_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_stream_set_dither_option    ; -- Begin function dc_stream_set_dither_option
	.p2align	2
_dc_stream_set_dither_option:           ; @dc_stream_set_dither_option
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _MAX_PIPES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_PIPES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x9, [x0, #8]
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	x9, [x9]
	add	x20, x9, #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #8]
	cmp	x9, x19
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #32
	subs	x8, x8, #1
	b.ne	LBB0_2
	b	LBB0_9
LBB0_4:
Lloh3:
	adrp	x8, _DITHER_OPTION_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DITHER_OPTION_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w1
	b.lo	LBB0_9
; %bb.5:
	str	w1, [x19]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	add	x1, sp, #8
	mov	x0, x19
	bl	_resource_build_bit_depth_reduction_params
	ldr	w8, [sp, #8]
	str	w8, [x19, #4]!
	ldr	x0, [x20]
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
	ldur	w1, [x20, #-8]
	mov	x2, x19
	blr	x8
LBB0_8:
	ldur	x0, [x20, #-16]
	ldr	x8, [x0]
	ldr	x8, [x8]
	add	x1, sp, #8
	blr	x8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PIPES,4,2                  ; @MAX_PIPES
	.comm	_DITHER_OPTION_MAX,4,2          ; @DITHER_OPTION_MAX
.subsections_via_symbols
