	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_ac97_set_rate              ## -- Begin function snd_ac97_set_rate
	.p2align	4, 0x90
_snd_ac97_set_rate:                     ## @snd_ac97_set_rate
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r12
	cmpl	$48001, %edx                    ## imm = 0xBB81
	jb	LBB0_9
## %bb.1:
	movq	_AC97_DOUBLE_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_2
## %bb.4:
	cmpl	$133, %r15d
	jne	LBB0_2
## %bb.5:
	movq	%r12, %rdi
	movl	$133, %esi
	movl	$1, %edx
	callq	_snd_ac97_update_power
	jmp	LBB0_6
LBB0_9:
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	$1, %edx
	callq	_snd_ac97_update_power
	leal	-128(%r15), %eax
	cmpl	$5, %eax
	ja	LBB0_2
## %bb.10:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	movq	8(%r12), %rax
	movq	_AC97_EXTENDED_STATUS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_AC97_EA_VRA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rax,%rcx,4)
	jne	LBB0_15
## %bb.7:
	cmpl	$48000, %r14d                   ## imm = 0xBB80
	je	LBB0_15
## %bb.8:
	cmpl	$96000, %r14d                   ## imm = 0x17700
	je	LBB0_15
	jmp	LBB0_2
LBB0_24:
	movq	%r12, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_spdif_rate                 ## TAILCALL
LBB0_13:
	movq	_AC97_SCAP_SURROUND_DAC@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	cmpl	$48000, %r14d                   ## imm = 0xBB80
	je	LBB0_15
## %bb.12:
	movq	8(%r12), %rax
	movq	_AC97_EXTENDED_STATUS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_AC97_EA_VRM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	(%rax,%rcx,4), %edx
	je	LBB0_2
	jmp	LBB0_15
LBB0_25:
	movq	_AC97_SCAP_CENTER_LFE_DAC@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	testl	%eax, 16(%r12)
	je	LBB0_2
LBB0_15:
	cmpl	$48001, %r14d                   ## imm = 0xBB81
	setae	%cl
	movl	%r14d, %eax
	shrl	%cl, %eax
	movq	24(%r12), %rcx
	imull	(%rcx), %eax
	cmpl	$-1149239296, %eax              ## imm = 0xBB800000
	jb	LBB0_16
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	imulq	$91625969, %rax, %rbx           ## imm = 0x57619F1
	shrq	$42, %rbx
	movq	_AC97_EI_DRA@GOTPCREL(%rip), %r13
	cmpl	$133, %r15d
	jne	LBB0_19
## %bb.17:
	movl	(%r13), %eax
	andl	20(%r12), %eax
	je	LBB0_19
## %bb.18:
	xorl	%ecx, %ecx
	cmpl	$48001, %r14d                   ## imm = 0xBB81
	movq	_AC97_EXTENDED_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AC97_EA_DRA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmovael	%edx, %ecx
	movq	%r12, %rdi
	callq	_snd_ac97_update_bits
LBB0_19:
	movzwl	%bx, %edx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_snd_ac97_update
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_snd_ac97_read
	xorl	%ebx, %ebx
	cmpl	$133, %r15d
	jne	LBB0_3
## %bb.20:
	movl	(%r13), %eax
	andl	20(%r12), %eax
	je	LBB0_3
## %bb.21:
	xorl	%ebx, %ebx
	movq	_AC97_GENERAL_PURPOSE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_AC97_GP_DRSS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, %ecx
	cmpl	$48001, %r14d                   ## imm = 0xBB81
	jb	LBB0_23
## %bb.22:
	movq	_AC97_GP_DRSS_78@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_23:
	movq	%r12, %rdi
	callq	_snd_ac97_update_bits
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_snd_ac97_read
	jmp	LBB0_3
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_24, LBB0_24-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
LJTI0_0:
	.long	L0_0_set_24
	.long	L0_0_set_13
	.long	L0_0_set_11
	.long	L0_0_set_6
	.long	L0_0_set_25
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_AC97_DOUBLE_RATE,4,2           ## @AC97_DOUBLE_RATE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AC97_EXTENDED_STATUS,8,3       ## @AC97_EXTENDED_STATUS
	.comm	_AC97_EA_VRM,4,2                ## @AC97_EA_VRM
	.comm	_AC97_EA_VRA,4,2                ## @AC97_EA_VRA
	.comm	_AC97_SCAP_SURROUND_DAC,4,2     ## @AC97_SCAP_SURROUND_DAC
	.comm	_AC97_SCAP_CENTER_LFE_DAC,4,2   ## @AC97_SCAP_CENTER_LFE_DAC
	.comm	_AC97_EI_DRA,4,2                ## @AC97_EI_DRA
	.comm	_AC97_EA_DRA,4,2                ## @AC97_EA_DRA
	.comm	_AC97_GENERAL_PURPOSE,4,2       ## @AC97_GENERAL_PURPOSE
	.comm	_AC97_GP_DRSS_MASK,4,2          ## @AC97_GP_DRSS_MASK
	.comm	_AC97_GP_DRSS_78,4,2            ## @AC97_GP_DRSS_78
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_ac97_set_rate              ; -- Begin function snd_ac97_set_rate
	.p2align	2
_snd_ac97_set_rate:                     ; @snd_ac97_set_rate
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w8, #48001
	cmp	w2, w8
	b.lo	LBB0_4
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _AC97_DOUBLE_RATE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AC97_DOUBLE_RATE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.2:
	cmp	w21, #133
	b.ne	LBB0_14
; %bb.3:
	mov	x0, x19
	mov	w1, #133
	mov	w2, #1
	bl	_snd_ac97_update_power
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_snd_ac97_update_power
	sub	w8, w21, #128
	cmp	w8, #5
	b.hi	LBB0_14
; %bb.5:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_6
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_6:
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, _AC97_EXTENDED_STATUS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AC97_EXTENDED_STATUS@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
Lloh8:
	adrp	x9, _AC97_EA_VRA@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AC97_EA_VRA@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #0
	mov	w8, #48000
	ccmp	w20, w8, #4, eq
	mov	w8, #30464
	movk	w8, #1, lsl #16
	ccmp	w20, w8, #4, ne
	b.eq	LBB0_13
	b	LBB0_14
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_set_spdif_rate
LBB0_8:
	ldr	w8, [x19, #16]
Lloh11:
	adrp	x9, _AC97_SCAP_SURROUND_DAC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AC97_SCAP_SURROUND_DAC@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
	mov	w8, #48000
	cmp	w20, w8
	b.eq	LBB0_13
; %bb.10:
	ldr	x8, [x19, #8]
Lloh13:
	adrp	x9, _AC97_EXTENDED_STATUS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AC97_EXTENDED_STATUS@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
Lloh16:
	adrp	x9, _AC97_EA_VRM@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AC97_EA_VRM@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	and	w8, w9, w8
	cbz	w8, LBB0_14
	b	LBB0_13
LBB0_11:
	ldr	w8, [x19, #16]
Lloh19:
	adrp	x9, _AC97_SCAP_CENTER_LFE_DAC@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AC97_SCAP_CENTER_LFE_DAC@GOTPAGEOFF]
LBB0_12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
LBB0_13:
	mov	w8, #48000
	cmp	w20, w8
	cset	w8, hi
	lsr	w8, w20, w8
	ldr	x9, [x19, #24]
	ldr	w9, [x9]
	mul	w8, w9, w8
	lsr	w9, w8, #23
	cmp	w9, #375
	b.lo	LBB0_16
LBB0_14:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_16:
	mov	w9, #6641
	movk	w9, #1398, lsl #16
	umull	x8, w8, w9
	lsr	x23, x8, #42
Lloh24:
	adrp	x22, _AC97_EI_DRA@GOTPAGE
Lloh25:
	ldr	x22, [x22, _AC97_EI_DRA@GOTPAGEOFF]
	cmp	w21, #133
	b.ne	LBB0_19
; %bb.17:
	ldr	w8, [x19, #20]
	ldr	w9, [x22]
	and	w8, w9, w8
	cbz	w8, LBB0_19
; %bb.18:
Lloh26:
	adrp	x8, _AC97_EXTENDED_STATUS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AC97_EXTENDED_STATUS@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _AC97_EA_DRA@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AC97_EA_DRA@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	w8, #48000
	cmp	w20, w8
	csel	w3, w2, wzr, hi
	mov	x0, x19
	bl	_snd_ac97_update_bits
LBB0_19:
	and	w2, w23, #0xffff
	mov	x0, x19
	mov	x1, x21
	bl	_snd_ac97_update
	mov	x0, x19
	mov	x1, x21
	bl	_snd_ac97_read
	mov	w0, #0
	cmp	w21, #133
	b.ne	LBB0_15
; %bb.20:
	ldr	w8, [x19, #20]
	ldr	w9, [x22]
	and	w8, w9, w8
	cbz	w8, LBB0_15
; %bb.21:
Lloh32:
	adrp	x21, _AC97_GENERAL_PURPOSE@GOTPAGE
Lloh33:
	ldr	x21, [x21, _AC97_GENERAL_PURPOSE@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh34:
	adrp	x8, _AC97_GP_DRSS_MASK@GOTPAGE
Lloh35:
	ldr	x8, [x8, _AC97_GP_DRSS_MASK@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
Lloh37:
	adrp	x8, _AC97_GP_DRSS_78@GOTPAGE
Lloh38:
	ldr	x8, [x8, _AC97_GP_DRSS_78@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	mov	w9, #48000
	cmp	w20, w9
	csel	w3, w8, wzr, hi
	mov	x0, x19
	bl	_snd_ac97_update_bits
	ldr	w1, [x21]
	mov	x0, x19
	bl	_snd_ac97_read
	mov	w0, #0
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_9-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
                                        ; -- End function
	.comm	_AC97_DOUBLE_RATE,4,2           ; @AC97_DOUBLE_RATE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AC97_EXTENDED_STATUS,8,3       ; @AC97_EXTENDED_STATUS
	.comm	_AC97_EA_VRM,4,2                ; @AC97_EA_VRM
	.comm	_AC97_EA_VRA,4,2                ; @AC97_EA_VRA
	.comm	_AC97_SCAP_SURROUND_DAC,4,2     ; @AC97_SCAP_SURROUND_DAC
	.comm	_AC97_SCAP_CENTER_LFE_DAC,4,2   ; @AC97_SCAP_CENTER_LFE_DAC
	.comm	_AC97_EI_DRA,4,2                ; @AC97_EI_DRA
	.comm	_AC97_EA_DRA,4,2                ; @AC97_EA_DRA
	.comm	_AC97_GENERAL_PURPOSE,4,2       ; @AC97_GENERAL_PURPOSE
	.comm	_AC97_GP_DRSS_MASK,4,2          ; @AC97_GP_DRSS_MASK
	.comm	_AC97_GP_DRSS_78,4,2            ; @AC97_GP_DRSS_78
.subsections_via_symbols
