	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function patch_yamaha_ymf7x3_3d
_patch_yamaha_ymf7x3_3d:                ## @patch_yamaha_ymf7x3_3d
	.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
	movq	%rdi, %r15
	movq	_snd_ac97_controls_3d@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r15, %rsi
	callq	_snd_ac97_cnew
	movq	%rax, %rbx
	movq	(%r15), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_snd_ctl_add
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movq	_AC97_3D_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	xorl	%r14d, %r14d
	movl	$9, %esi
	movl	$7, %edx
	xorl	%ecx, %ecx
	callq	_AC97_SINGLE_VALUE
	movl	%eax, (%rbx)
	movl	(%r12), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_snd_ac97_write_cache
	movq	(%r15), %rax
	movl	(%rax), %ebx
	movq	_snd_ac97_ymf7x3_controls_speaker@GOTPCREL(%rip), %rdi
	movq	%r15, %rsi
	callq	_snd_ac97_cnew
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_snd_ctl_add
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movq	_AC97_YMF7X3_3D_MODE_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$3072, %edx                     ## imm = 0xC00
	callq	_snd_ac97_write_cache
	jmp	LBB0_5
LBB0_4:
	movl	%eax, %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_snd_ac97_controls_3d,8,3       ## @snd_ac97_controls_3d
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"3D Control - Wide"

	.comm	_AC97_3D_CONTROL,4,2            ## @AC97_3D_CONTROL
	.comm	_snd_ac97_ymf7x3_controls_speaker,4,2 ## @snd_ac97_ymf7x3_controls_speaker
	.comm	_AC97_YMF7X3_3D_MODE_SEL,4,2    ## @AC97_YMF7X3_3D_MODE_SEL
	.no_dead_strip	_patch_yamaha_ymf7x3_3d
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function patch_yamaha_ymf7x3_3d
_patch_yamaha_ymf7x3_3d:                ; @patch_yamaha_ymf7x3_3d
	.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	x19, x0
Lloh0:
	adrp	x8, _snd_ac97_controls_3d@GOTPAGE
Lloh1:
	ldr	x8, [x8, _snd_ac97_controls_3d@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	mov	x1, x19
	bl	_snd_ac97_cnew
	mov	x20, x0
	ldr	x8, [x19]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_snd_ctl_add
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w0, [x20, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
Lloh5:
	adrp	x21, _AC97_3D_CONTROL@GOTPAGE
Lloh6:
	ldr	x21, [x21, _AC97_3D_CONTROL@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w1, #9
	mov	w2, #7
	mov	w3, #0
	bl	_AC97_SINGLE_VALUE
	str	w0, [x20]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_snd_ac97_write_cache
	ldr	x8, [x19]
	ldr	w20, [x8]
Lloh7:
	adrp	x0, _snd_ac97_ymf7x3_controls_speaker@GOTPAGE
Lloh8:
	ldr	x0, [x0, _snd_ac97_ymf7x3_controls_speaker@GOTPAGEOFF]
	mov	x1, x19
	bl	_snd_ac97_cnew
	mov	x1, x0
	mov	x0, x20
	bl	_snd_ctl_add
	tbnz	w0, #31, LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _AC97_YMF7X3_3D_MODE_SEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AC97_YMF7X3_3D_MODE_SEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #3072
	bl	_snd_ac97_write_cache
	mov	w0, #0
LBB0_3:
	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 AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_snd_ac97_controls_3d,8,3       ; @snd_ac97_controls_3d
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"3D Control - Wide"

	.comm	_AC97_3D_CONTROL,4,2            ; @AC97_3D_CONTROL
	.comm	_snd_ac97_ymf7x3_controls_speaker,4,2 ; @snd_ac97_ymf7x3_controls_speaker
	.comm	_AC97_YMF7X3_3D_MODE_SEL,4,2    ; @AC97_YMF7X3_3D_MODE_SEL
	.no_dead_strip	_patch_yamaha_ymf7x3_3d
.subsections_via_symbols
