	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_em28xx_write_ac97              ## -- Begin function em28xx_write_ac97
	.p2align	4, 0x90
_em28xx_write_ac97:                     ## @em28xx_write_ac97
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	andl	$127, %esi
	movl	%esi, -16(%rbp)
	movl	%edx, %edi
	callq	_cpu_to_le16
	movl	%eax, -12(%rbp)
	movq	%rbx, %rdi
	callq	_em28xx_is_ac97_ready
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	_EM28XX_R40_AC97LSB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_em28xx_write_regs
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movq	_EM28XX_R42_AC97ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_em28xx_write_regs
	movl	%eax, %ecx
	sarl	$31, %eax
	andl	%ecx, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EM28XX_R40_AC97LSB,4,2         ## @EM28XX_R40_AC97LSB
	.comm	_EM28XX_R42_AC97ADDR,4,2        ## @EM28XX_R42_AC97ADDR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_em28xx_write_ac97              ; -- Begin function em28xx_write_ac97
	.p2align	2
_em28xx_write_ac97:                     ; @em28xx_write_ac97
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	and	w8, w1, #0x7f
	str	w8, [sp, #12]
	mov	x0, x2
	bl	_cpu_to_le16
	str	w0, [sp, #8]
	mov	x0, x19
	bl	_em28xx_is_ac97_ready
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EM28XX_R40_AC97LSB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EM28XX_R40_AC97LSB@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #2
	bl	_em28xx_write_regs
	tbnz	w0, #31, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _EM28XX_R42_AC97ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EM28XX_R42_AC97ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #1
	bl	_em28xx_write_regs
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EM28XX_R40_AC97LSB,4,2         ; @EM28XX_R40_AC97LSB
	.comm	_EM28XX_R42_AC97ADDR,4,2        ; @EM28XX_R42_AC97ADDR
.subsections_via_symbols
