	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sb16_audio_output_block
_sb16_audio_output_block:               ## @sb16_audio_output_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	_audio_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rbx
	cmpq	$0, 32(%rbx)
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rax
	movq	_AFMT_S16_LE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
LBB0_2:
	movq	_IMODE_OUTPUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%rbx)
	movl	$1, 8(%rbx)
	jmp	LBB0_4
LBB0_3:
	movq	_IMODE_OUTPUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%rbx)
	movl	$1, 12(%rbx)
LBB0_4:
	leaq	24(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%rbx), %r12
	cmpq	$0, 32(%rbx)
	je	LBB0_8
## %bb.5:
	movq	_AFMT_S16_LE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %r12
	jne	LBB0_7
## %bb.6:
	movq	_AFMT_U8@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_7:
	movq	%rax, (%rbx)
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movslq	%r15d, %rdx
	movq	(%rbx), %rax
	movq	_AFMT_S16_LE@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	sete	%cl
	shrq	%cl, %rdx
	decl	%edx
	movq	%rdx, %r13
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	movl	$65, %esi
	callq	_sb_dsp_command
	movzbl	17(%rbx), %esi
	movq	%rbx, %rdi
	callq	_sb_dsp_command
	movzbl	16(%rbx), %esi
	movq	%rbx, %rdi
	callq	_sb_dsp_command
	movq	(%rbx), %rax
	xorl	%esi, %esi
	cmpq	(%r15), %rax
	setne	%sil
	shll	$4, %esi
	addl	$182, %esi
	movq	%rbx, %rdi
	callq	_sb_dsp_command
	cmpl	$2, 20(%rbx)
	sete	%al
	shlb	$5, %al
	movq	(%rbx), %rcx
	cmpq	(%r15), %rcx
	sete	%cl
	shlb	$4, %cl
	orb	%al, %cl
	movzbl	%cl, %esi
	movq	%rbx, %rdi
	callq	_sb_dsp_command
	movzbl	%r13b, %esi
	movq	%rbx, %rdi
	callq	_sb_dsp_command
	movq	%r13, %rax
	movzbl	%ah, %esi
	movq	%rbx, %rdi
	callq	_sb_dsp_command
	movq	%r12, (%rbx)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.comm	_AFMT_S16_LE,8,3                ## @AFMT_S16_LE
	.comm	_IMODE_OUTPUT,8,3               ## @IMODE_OUTPUT
	.comm	_AFMT_U8,8,3                    ## @AFMT_U8
	.no_dead_strip	_sb16_audio_output_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sb16_audio_output_block
_sb16_audio_output_block:               ; @sb16_audio_output_block
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x2
Lloh0:
	adrp	x8, _audio_devs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _audio_devs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
	ldr	x19, [x8]
	ldr	x8, [x19, #32]
Lloh3:
	adrp	x22, _AFMT_S16_LE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _AFMT_S16_LE@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _IMODE_OUTPUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IMODE_OUTPUT@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x19, #48]
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _IMODE_OUTPUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IMODE_OUTPUT@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x19, #40]
	mov	w8, #1
	str	w8, [x19, #12]
LBB0_4:
	add	x20, x19, #24
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x23, [x19]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	x8, [x22]
Lloh11:
	adrp	x9, _AFMT_U8@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AFMT_U8@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x23, x8
	csel	x8, x9, x8, eq
	str	x8, [x19]
LBB0_6:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	sxtw	x8, w21
	ldr	x9, [x19]
	ldr	x10, [x22]
	cmp	x9, x10
	cset	w9, eq
	lsr	x8, x8, x9
	sub	w21, w8, #1
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	w1, #65
	bl	_sb_dsp_command
	ldrb	w1, [x19, #17]
	mov	x0, x19
	bl	_sb_dsp_command
	ldrb	w1, [x19, #16]
	mov	x0, x19
	bl	_sb_dsp_command
	ldr	x8, [x19]
	ldr	x9, [x22]
	cmp	x8, x9
	mov	w8, #198
	mov	w9, #182
	csel	w1, w9, w8, eq
	mov	x0, x19
	bl	_sb_dsp_command
	ldr	w8, [x19, #20]
	cmp	w8, #2
	cset	w8, eq
	lsl	w1, w8, #5
	ldr	x8, [x19]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w8, eq
	bfi	w1, w8, #4, #1
	mov	x0, x19
	bl	_sb_dsp_command
	and	w1, w21, #0xff
	mov	x0, x19
	bl	_sb_dsp_command
	ubfx	w1, w21, #8, #8
	mov	x0, x19
	bl	_sb_dsp_command
	str	x23, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_AFMT_S16_LE,8,3                ; @AFMT_S16_LE
	.comm	_IMODE_OUTPUT,8,3               ; @IMODE_OUTPUT
	.comm	_AFMT_U8,8,3                    ; @AFMT_U8
	.no_dead_strip	_sb16_audio_output_block
.subsections_via_symbols
