	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_ac97_write                 ## -- Begin function snd_ac97_write
	.p2align	4, 0x90
_snd_ac97_write:                        ## @snd_ac97_write
	.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	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_snd_ac97_valid_reg
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movl	$-256, %eax
	andl	(%rbx), %eax
	movq	_AC97_ID_ALC100@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.2:
	movq	_AC97_MASTER@GOTPCREL(%rip), %rax
	cmpw	%r15w, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_AC97_HEADPHONE@GOTPCREL(%rip), %rax
	cmpw	%r15w, (%rax)
	jne	LBB0_5
LBB0_4:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	_AC97_RESET@GOTPCREL(%rip), %rcx
	movzwl	(%rcx), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	*(%rax)
LBB0_5:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movzwl	%r15w, %esi
	movzwl	%r14w, %edx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC97_ID_ALC100,4,2             ## @AC97_ID_ALC100
	.comm	_AC97_MASTER,2,1                ## @AC97_MASTER
	.comm	_AC97_HEADPHONE,2,1             ## @AC97_HEADPHONE
	.comm	_AC97_RESET,2,1                 ## @AC97_RESET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_ac97_write                 ; -- Begin function snd_ac97_write
	.p2align	2
_snd_ac97_write:                        ; @snd_ac97_write
	.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, x2
	mov	x20, x1
	mov	x21, x0
	bl	_snd_ac97_valid_reg
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w8, [x21]
	and	w8, w8, #0xffffff00
Lloh0:
	adrp	x9, _AC97_ID_ALC100@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AC97_ID_ALC100@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _AC97_MASTER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AC97_MASTER@GOTPAGEOFF]
	ldrh	w8, [x8]
Lloh5:
	adrp	x9, _AC97_HEADPHONE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AC97_HEADPHONE@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w20, #4, ne
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _AC97_RESET@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AC97_RESET@GOTPAGEOFF]
	ldrh	w1, [x9]
	mov	x0, x21
	mov	w2, #0
	blr	x8
LBB0_4:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	ldr	x3, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, 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
	br	x3
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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AC97_ID_ALC100,4,2             ; @AC97_ID_ALC100
	.comm	_AC97_MASTER,2,1                ; @AC97_MASTER
	.comm	_AC97_HEADPHONE,2,1             ; @AC97_HEADPHONE
	.comm	_AC97_RESET,2,1                 ; @AC97_RESET
.subsections_via_symbols
