	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ac97_recmask_io
_ac97_recmask_io:                       ## @ac97_recmask_io
	.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, %rbx
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_AC97_RECORD_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	*(%rbx)
                                        ## kill: def $eax killed $eax def $rax
	movq	_ac97_rm2oss@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	$7, %eax
	movb	(%rcx,%rax,4), %cl
	movl	$1, %eax
	shll	%cl, %eax
	jmp	LBB0_3
LBB0_2:
	movl	%edx, %r14d
	movq	_ac97_rm2oss@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_AC97_RECORD_SELECT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	*(%rbx)
                                        ## kill: def $eax killed $eax def $rax
	andl	$7, %eax
	movb	(%r12,%rax,4), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movl	$-2, %edx
	roll	%cl, %edx
	cmpl	%r14d, %eax
	movl	$-1, %eax
	cmovel	%eax, %edx
	andl	%r14d, %edx
	bsfl	%edx, %ecx
	movq	_ac97_oss_rm@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmovel	%eax, %ecx
	movl	(%rdx,%rcx,4), %eax
	movl	%eax, %edx
	shll	$8, %edx
	orl	%eax, %edx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	*8(%rbx)
	xorl	%eax, %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC97_RECORD_SELECT,4,2         ## @AC97_RECORD_SELECT
	.comm	_ac97_rm2oss,8,3                ## @ac97_rm2oss
	.comm	_ac97_oss_rm,8,3                ## @ac97_oss_rm
	.no_dead_strip	_ac97_recmask_io
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ac97_recmask_io
_ac97_recmask_io:                       ; @ac97_recmask_io
	.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
	cbz	w1, LBB0_2
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _AC97_RECORD_SELECT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AC97_RECORD_SELECT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x19
	blr	x8
Lloh3:
	adrp	x8, _ac97_rm2oss@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ac97_rm2oss@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	and	w9, w0, #0x7
	ldr	w8, [x8, w9, uxtw #2]
	mov	w9, #1
	lsl	w0, w9, w8
	b	LBB0_3
LBB0_2:
	mov	x20, x2
Lloh6:
	adrp	x8, _ac97_rm2oss@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ac97_rm2oss@GOTPAGEOFF]
Lloh8:
	ldr	x21, [x8]
	ldr	x8, [x19]
Lloh9:
	adrp	x22, _AC97_RECORD_SELECT@GOTPAGE
Lloh10:
	ldr	x22, [x22, _AC97_RECORD_SELECT@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	blr	x8
	and	w8, w0, #0x7
	ldr	w8, [x21, w8, uxtw #2]
	mov	w9, #1
	lsl	w8, w9, w8
	cmp	w8, w20
	mov	w9, #-1
	csinv	w8, w9, w8, eq
	ands	w8, w8, w20
	rbit	w8, w8
	clz	w8, w8
Lloh11:
	adrp	x9, _ac97_oss_rm@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ac97_oss_rm@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	csinv	w8, w8, wzr, ne
	ldr	w8, [x9, w8, uxtw #2]
	orr	w2, w8, w8, lsl #8
	ldr	x8, [x19, #8]
	ldr	w1, [x22]
	mov	x0, x19
	blr	x8
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AC97_RECORD_SELECT,4,2         ; @AC97_RECORD_SELECT
	.comm	_ac97_rm2oss,8,3                ; @ac97_rm2oss
	.comm	_ac97_oss_rm,8,3                ; @ac97_oss_rm
	.no_dead_strip	_ac97_recmask_io
.subsections_via_symbols
