	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_audio_status              ## -- Begin function r600_audio_status
	.p2align	4, 0x90
_r600_audio_status:                     ## @r600_audio_status
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_R600_AUDIO_RATE_BPS_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movl	%eax, %ebx
	andl	$7, %eax
	incl	%eax
	movl	%eax, (%r14)
	movl	%ebx, %eax
	shrl	$4, %eax
	andl	$15, %eax
	cmpl	$5, %eax
	jae	LBB0_1
## %bb.2:
	movl	%eax, %eax
	leaq	l_switch.table.r600_audio_status(%rip), %rcx
	movl	(%rcx,%rax,4), %eax
	jmp	LBB0_3
LBB0_1:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	movl	$16, %eax
LBB0_3:
	movl	%eax, 4(%r14)
	testl	$16384, %ebx                    ## imm = 0x4000
	movl	$48000, %eax                    ## imm = 0xBB80
	movl	$44100, %ecx                    ## imm = 0xAC44
	cmovel	%eax, %ecx
	movl	%ebx, %eax
	shrl	$11, %eax
	andl	$7, %eax
	incl	%eax
	imull	%ecx, %eax
	shrl	$8, %ebx
	andl	$7, %ebx
	incl	%ebx
	xorl	%edx, %edx
	divl	%ebx
	movl	%eax, 8(%r14)
	movq	_R600_AUDIO_STATUS_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movzbl	%al, %ecx
	movl	%ecx, 12(%r14)
	movzbl	%ah, %eax
	movl	%eax, 16(%r14)
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R600_AUDIO_RATE_BPS_CHANNEL,4,2 ## @R600_AUDIO_RATE_BPS_CHANNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown bits per sample 0x%x, using 16\n"

	.comm	_R600_AUDIO_STATUS_BITS,4,2     ## @R600_AUDIO_STATUS_BITS
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.r600_audio_status
l_switch.table.r600_audio_status:
	.long	8                               ## 0x8
	.long	16                              ## 0x10
	.long	20                              ## 0x14
	.long	24                              ## 0x18
	.long	32                              ## 0x20

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_audio_status              ; -- Begin function r600_audio_status
	.p2align	2
_r600_audio_status:                     ; @r600_audio_status
	.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	x21, x0
	mov	x19, x8
Lloh0:
	adrp	x8, _R600_AUDIO_RATE_BPS_CHANNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R600_AUDIO_RATE_BPS_CHANNEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RREG32
	mov	x20, x0
	and	w8, w0, #0x7
	add	w8, w8, #1
	str	w8, [x19]
	ubfx	w8, w0, #4, #4
	cmp	w8, #5
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, l_switch.table.r600_audio_status@PAGE
Lloh4:
	add	x9, x9, l_switch.table.r600_audio_status@PAGEOFF
	ldr	w8, [x9, w8, uxtw #2]
	b	LBB0_3
LBB0_2:
	ldr	w0, [x21]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	mov	w8, #16
LBB0_3:
	tst	w20, #0x4000
	mov	w9, #44100
	mov	w10, #48000
	csel	w9, w10, w9, eq
	ubfx	w10, w20, #11, #3
	madd	w9, w9, w10, w9
	ubfx	w10, w20, #8, #3
	add	w10, w10, #1
	udiv	w9, w9, w10
	stp	w8, w9, [x19, #4]
Lloh7:
	adrp	x8, _R600_AUDIO_STATUS_BITS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _R600_AUDIO_STATUS_BITS@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_RREG32
	and	w8, w0, #0xff
	ubfx	w9, w0, #8, #8
	stp	w8, w9, [x19, #12]
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_R600_AUDIO_RATE_BPS_CHANNEL,4,2 ; @R600_AUDIO_RATE_BPS_CHANNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown bits per sample 0x%x, using 16\n"

	.comm	_R600_AUDIO_STATUS_BITS,4,2     ; @R600_AUDIO_STATUS_BITS
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.r600_audio_status
l_switch.table.r600_audio_status:
	.long	8                               ; 0x8
	.long	16                              ; 0x10
	.long	20                              ; 0x14
	.long	24                              ; 0x18
	.long	32                              ; 0x20

.subsections_via_symbols
