	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_audio_finish
_set_audio_finish:                      ## @set_audio_finish
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_cx88_stop_audio_dma
	movq	_AUD_RATE_THRES_DMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$192, %esi
	callq	_cx_write
	movq	%r12, %rdi
	callq	_cx88_start_audio_dma
	movq	_CX88_MPEG_BLACKBIRD@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, 4(%r12)
	je	LBB0_2
## %bb.1:
	movq	_AUD_I2SINPUTCNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$4, %esi
	callq	_cx_write
	movq	_AUD_BAUDRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_cx_write
	movq	_AUD_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EN_I2SOUT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_cx_set
	movq	_AUD_I2SOUTPUTCNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_cx_write
	movq	_AUD_I2SCNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_cx_write
LBB0_2:
	movq	_always_analog@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_4
## %bb.3:
	movl	(%r15), %eax
	testl	%eax, 4(%r12)
	jne	LBB0_5
LBB0_4:
	movq	_EN_DAC_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_AUD_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_cx_write
LBB0_5:
	movq	_AUD_SOFT_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_cx_write
	movq	_SHADOW_AUD_VOL_CTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_cx_sread
	movl	(%rbx), %edi
	movq	_AUD_VOL_CTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edx
	callq	_cx_swrite
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AUD_RATE_THRES_DMD,4,2         ## @AUD_RATE_THRES_DMD
	.comm	_CX88_MPEG_BLACKBIRD,4,2        ## @CX88_MPEG_BLACKBIRD
	.comm	_AUD_I2SINPUTCNTL,4,2           ## @AUD_I2SINPUTCNTL
	.comm	_AUD_BAUDRATE,4,2               ## @AUD_BAUDRATE
	.comm	_AUD_CTL,4,2                    ## @AUD_CTL
	.comm	_EN_I2SOUT_ENABLE,4,2           ## @EN_I2SOUT_ENABLE
	.comm	_AUD_I2SOUTPUTCNTL,4,2          ## @AUD_I2SOUTPUTCNTL
	.comm	_AUD_I2SCNTL,4,2                ## @AUD_I2SCNTL
	.comm	_always_analog,8,3              ## @always_analog
	.comm	_EN_DAC_ENABLE,4,2              ## @EN_DAC_ENABLE
	.comm	_AUD_SOFT_RESET,4,2             ## @AUD_SOFT_RESET
	.comm	_SHADOW_AUD_VOL_CTL,4,2         ## @SHADOW_AUD_VOL_CTL
	.comm	_AUD_VOL_CTL,4,2                ## @AUD_VOL_CTL
	.comm	_jiffies,4,2                    ## @jiffies
	.no_dead_strip	_set_audio_finish
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_audio_finish
_set_audio_finish:                      ; @set_audio_finish
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	bl	_cx88_stop_audio_dma
Lloh0:
	adrp	x8, _AUD_RATE_THRES_DMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AUD_RATE_THRES_DMD@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #192
	bl	_cx_write
	mov	x0, x19
	bl	_cx88_start_audio_dma
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x22, _CX88_MPEG_BLACKBIRD@GOTPAGE
Lloh4:
	ldr	x22, [x22, _CX88_MPEG_BLACKBIRD@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh5:
	adrp	x21, _AUD_CTL@GOTPAGE
Lloh6:
	ldr	x21, [x21, _AUD_CTL@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _AUD_I2SINPUTCNTL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AUD_I2SINPUTCNTL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	w1, #4
	bl	_cx_write
Lloh10:
	adrp	x8, _AUD_BAUDRATE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AUD_BAUDRATE@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_cx_write
	ldr	w0, [x21]
Lloh13:
	adrp	x8, _EN_I2SOUT_ENABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EN_I2SOUT_ENABLE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_cx_set
Lloh16:
	adrp	x8, _AUD_I2SOUTPUTCNTL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AUD_I2SOUTPUTCNTL@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_cx_write
Lloh19:
	adrp	x8, _AUD_I2SCNTL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AUD_I2SCNTL@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_cx_write
LBB0_2:
Lloh22:
	adrp	x8, _always_analog@GOTPAGE
Lloh23:
	ldr	x8, [x8, _always_analog@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	cbnz	x8, LBB0_4
; %bb.3:
	ldr	w8, [x19, #4]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_5
LBB0_4:
Lloh25:
	adrp	x8, _EN_DAC_ENABLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EN_DAC_ENABLE@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	orr	w1, w8, w20
	ldr	w0, [x21]
	bl	_cx_write
LBB0_5:
Lloh28:
	adrp	x8, _AUD_SOFT_RESET@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AUD_SOFT_RESET@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_cx_write
Lloh31:
	adrp	x20, _SHADOW_AUD_VOL_CTL@GOTPAGE
Lloh32:
	ldr	x20, [x20, _SHADOW_AUD_VOL_CTL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_cx_sread
	mov	x2, x0
	ldr	w0, [x20]
Lloh33:
	adrp	x8, _AUD_VOL_CTL@GOTPAGE
Lloh34:
	ldr	x8, [x8, _AUD_VOL_CTL@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	bl	_cx_swrite
Lloh36:
	adrp	x8, _jiffies@GOTPAGE
Lloh37:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	str	w8, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_AUD_RATE_THRES_DMD,4,2         ; @AUD_RATE_THRES_DMD
	.comm	_CX88_MPEG_BLACKBIRD,4,2        ; @CX88_MPEG_BLACKBIRD
	.comm	_AUD_I2SINPUTCNTL,4,2           ; @AUD_I2SINPUTCNTL
	.comm	_AUD_BAUDRATE,4,2               ; @AUD_BAUDRATE
	.comm	_AUD_CTL,4,2                    ; @AUD_CTL
	.comm	_EN_I2SOUT_ENABLE,4,2           ; @EN_I2SOUT_ENABLE
	.comm	_AUD_I2SOUTPUTCNTL,4,2          ; @AUD_I2SOUTPUTCNTL
	.comm	_AUD_I2SCNTL,4,2                ; @AUD_I2SCNTL
	.comm	_always_analog,8,3              ; @always_analog
	.comm	_EN_DAC_ENABLE,4,2              ; @EN_DAC_ENABLE
	.comm	_AUD_SOFT_RESET,4,2             ; @AUD_SOFT_RESET
	.comm	_SHADOW_AUD_VOL_CTL,4,2         ; @SHADOW_AUD_VOL_CTL
	.comm	_AUD_VOL_CTL,4,2                ; @AUD_VOL_CTL
	.comm	_jiffies,4,2                    ; @jiffies
	.no_dead_strip	_set_audio_finish
.subsections_via_symbols
