	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_emu8000_update_chorus_mode ## -- Begin function snd_emu8000_update_chorus_mode
	.p2align	4, 0x90
_snd_emu8000_update_chorus_mode:        ## @snd_emu8000_update_chorus_mode
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	_SNDRV_EMU8000_CHORUS_NUMBERS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_4
## %bb.2:
	movq	%rdi, %rbx
	movq	_SNDRV_EMU8000_CHORUS_PREDEFINED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_5
## %bb.3:
	movq	_chorus_defined@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	$0, (%rcx,%rax,4)
	je	LBB0_4
LBB0_5:
	movq	_chorus_parm@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	shlq	$2, %rax
	leaq	(%rax,%rax,4), %r15
	movl	16(%rcx,%r15), %edx
	movq	%rbx, %rdi
	movl	$9, %esi
	callq	_EMU8000_INIT3_WRITE
	movq	(%r14), %rax
	movl	12(%rax,%r15), %edx
	movq	%rbx, %rdi
	movl	$12, %esi
	callq	_EMU8000_INIT3_WRITE
	movq	(%r14), %rax
	movl	8(%rax,%r15), %edx
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_EMU8000_INIT4_WRITE
	movq	(%r14), %rax
	movl	4(%rax,%r15), %esi
	movq	%rbx, %rdi
	callq	_EMU8000_HWCF4_WRITE
	movq	(%r14), %rax
	movl	(%rax,%r15), %esi
	movq	%rbx, %rdi
	callq	_EMU8000_HWCF5_WRITE
	movq	%rbx, %rdi
	movl	$32768, %esi                    ## imm = 0x8000
	callq	_EMU8000_HWCF6_WRITE
	movq	%rbx, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_EMU8000_HWCF7_WRITE            ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_EMU8000_CHORUS_NUMBERS,4,2 ## @SNDRV_EMU8000_CHORUS_NUMBERS
	.comm	_SNDRV_EMU8000_CHORUS_PREDEFINED,4,2 ## @SNDRV_EMU8000_CHORUS_PREDEFINED
	.comm	_chorus_defined,8,3             ## @chorus_defined
	.comm	_chorus_parm,8,3                ## @chorus_parm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_emu8000_update_chorus_mode ; -- Begin function snd_emu8000_update_chorus_mode
	.p2align	2
_snd_emu8000_update_chorus_mode:        ; @snd_emu8000_update_chorus_mode
	.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
	ldr	w8, [x0]
	tbnz	w8, #31, LBB0_5
; %bb.1:
Lloh0:
	adrp	x9, _SNDRV_EMU8000_CHORUS_NUMBERS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SNDRV_EMU8000_CHORUS_NUMBERS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_5
; %bb.2:
	mov	x19, x0
Lloh3:
	adrp	x9, _SNDRV_EMU8000_CHORUS_PREDEFINED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SNDRV_EMU8000_CHORUS_PREDEFINED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_4
; %bb.3:
Lloh6:
	adrp	x9, _chorus_defined@GOTPAGE
Lloh7:
	ldr	x9, [x9, _chorus_defined@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	w9, [x9, x8, lsl #2]
	cbz	w9, LBB0_5
LBB0_4:
Lloh9:
	adrp	x20, _chorus_parm@GOTPAGE
Lloh10:
	ldr	x20, [x20, _chorus_parm@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x8, x8, x8, lsl #2
	lsl	x21, x8, #2
	add	x8, x9, x21
	ldr	w2, [x8, #16]
	mov	x0, x19
	mov	w1, #9
	bl	_EMU8000_INIT3_WRITE
	ldr	x8, [x20]
	add	x8, x8, x21
	ldr	w2, [x8, #12]
	mov	x0, x19
	mov	w1, #12
	bl	_EMU8000_INIT3_WRITE
	ldr	x8, [x20]
	add	x8, x8, x21
	ldr	w2, [x8, #8]
	mov	x0, x19
	mov	w1, #3
	bl	_EMU8000_INIT4_WRITE
	ldr	x8, [x20]
	add	x8, x8, x21
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_EMU8000_HWCF4_WRITE
	ldr	x8, [x20]
	ldr	w1, [x8, x21]
	mov	x0, x19
	bl	_EMU8000_HWCF5_WRITE
	mov	x0, x19
	mov	w1, #32768
	bl	_EMU8000_HWCF6_WRITE
	mov	x0, x19
	mov	w1, #0
	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
	b	_EMU8000_HWCF7_WRITE
LBB0_5:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_EMU8000_CHORUS_NUMBERS,4,2 ; @SNDRV_EMU8000_CHORUS_NUMBERS
	.comm	_SNDRV_EMU8000_CHORUS_PREDEFINED,4,2 ; @SNDRV_EMU8000_CHORUS_PREDEFINED
	.comm	_chorus_defined,8,3             ; @chorus_defined
	.comm	_chorus_parm,8,3                ; @chorus_parm
.subsections_via_symbols
