	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdsp_spdif_sample_rate
_hdsp_spdif_sample_rate:                ## @hdsp_spdif_sample_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_HDSP_statusRegister@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hdsp_read
	movq	(%rbx), %rdx
	movq	_H9632@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	cmpq	%rdi, %rdx
	jne	LBB0_1
## %bb.2:
	movq	_HDSP_spdifFrequencyMask_9632@GOTPCREL(%rip), %rsi
	jmp	LBB0_3
LBB0_1:
	movq	_HDSP_spdifFrequencyMask@GOTPCREL(%rip), %rsi
LBB0_3:
	movq	_HDSP_SPDIFErrorFlag@GOTPCREL(%rip), %rbx
	xorl	%ecx, %ecx
	testl	%eax, (%rbx)
	je	LBB0_4
LBB0_16:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	movl	(%rsi), %esi
	andl	%eax, %esi
	leal	-128(%rsi), %ebx
	cmpl	$8, %ebx
	ja	LBB0_15
## %bb.5:
	movl	$32000, %ecx                    ## imm = 0x7D00
	leaq	LJTI0_0(%rip), %r8
	movslq	(%r8,%rbx,4), %rbx
	addq	%r8, %rbx
	jmpq	*%rbx
LBB0_10:
	movl	$96000, %ecx                    ## imm = 0x17700
	jmp	LBB0_16
LBB0_9:
	movl	$88200, %ecx                    ## imm = 0x15888
	jmp	LBB0_16
LBB0_8:
	movl	$64000, %ecx                    ## imm = 0xFA00
	jmp	LBB0_16
LBB0_7:
	movl	$48000, %ecx                    ## imm = 0xBB80
	jmp	LBB0_16
LBB0_6:
	movl	$44100, %ecx                    ## imm = 0xAC44
	jmp	LBB0_16
LBB0_13:
	movl	$192000, %ecx                   ## imm = 0x2EE00
	jmp	LBB0_14
LBB0_12:
	movl	$176400, %ecx                   ## imm = 0x2B110
	jmp	LBB0_14
LBB0_11:
	movl	$128000, %ecx                   ## imm = 0x1F400
LBB0_14:
	cmpq	%rdi, %rdx
	je	LBB0_16
LBB0_15:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%eax, %edx
	callq	_snd_printk
	xorl	%ecx, %ecx
	jmp	LBB0_16
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_7
	.long	L0_0_set_6
	.long	L0_0_set_16
	.long	L0_0_set_13
	.long	L0_0_set_12
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_HDSP_statusRegister,4,2        ## @HDSP_statusRegister
	.comm	_HDSP_spdifFrequencyMask,4,2    ## @HDSP_spdifFrequencyMask
	.comm	_H9632,8,3                      ## @H9632
	.comm	_HDSP_spdifFrequencyMask_9632,4,2 ## @HDSP_spdifFrequencyMask_9632
	.comm	_HDSP_SPDIFErrorFlag,4,2        ## @HDSP_SPDIFErrorFlag
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Hammerfall-DSP: unknown spdif frequency status; bits = 0x%x, status = 0x%x\n"

	.no_dead_strip	_hdsp_spdif_sample_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdsp_spdif_sample_rate
_hdsp_spdif_sample_rate:                ; @hdsp_spdif_sample_rate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _HDSP_statusRegister@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDSP_statusRegister@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_hdsp_read
Lloh3:
	adrp	x9, _H9632@GOTPAGE
Lloh4:
	ldr	x9, [x9, _H9632@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _HDSP_spdifFrequencyMask_9632@GOTPAGE
Lloh7:
	ldr	x10, [x10, _HDSP_spdifFrequencyMask_9632@GOTPAGEOFF]
Lloh8:
	adrp	x11, _HDSP_spdifFrequencyMask@GOTPAGE
Lloh9:
	ldr	x11, [x11, _HDSP_spdifFrequencyMask@GOTPAGEOFF]
	cmp	x8, x9
	csel	x10, x10, x11, eq
Lloh10:
	adrp	x11, _HDSP_SPDIFErrorFlag@GOTPAGE
Lloh11:
	ldr	x11, [x11, _HDSP_SPDIFErrorFlag@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x11]
	tst	w11, w0
	b.eq	LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x2, x0
	ldr	w10, [x10]
	and	w1, w10, w0
	sub	w10, w1, #128
	cmp	w10, #8
	b.hi	LBB0_16
; %bb.4:
	mov	w0, #32000
Lloh13:
	adrp	x11, lJTI0_0@PAGE
Lloh14:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_2
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_5:
	mov	w0, #30464
	movk	w0, #1, lsl #16
	b	LBB0_2
LBB0_6:
	mov	w0, #22664
	movk	w0, #1, lsl #16
	b	LBB0_2
LBB0_7:
	mov	w0, #64000
	b	LBB0_2
LBB0_8:
	mov	w0, #48000
	b	LBB0_2
LBB0_9:
	mov	w0, #44100
	b	LBB0_2
LBB0_10:
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.11:
	mov	w0, #60928
	movk	w0, #2, lsl #16
	b	LBB0_2
LBB0_12:
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.13:
	mov	w0, #45328
	movk	w0, #2, lsl #16
	b	LBB0_2
LBB0_14:
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
	mov	w0, #62464
	movk	w0, #1, lsl #16
	b	LBB0_2
LBB0_16:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printk
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
                                        ; -- End function
	.comm	_HDSP_statusRegister,4,2        ; @HDSP_statusRegister
	.comm	_HDSP_spdifFrequencyMask,4,2    ; @HDSP_spdifFrequencyMask
	.comm	_H9632,8,3                      ; @H9632
	.comm	_HDSP_spdifFrequencyMask_9632,4,2 ; @HDSP_spdifFrequencyMask_9632
	.comm	_HDSP_SPDIFErrorFlag,4,2        ; @HDSP_SPDIFErrorFlag
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Hammerfall-DSP: unknown spdif frequency status; bits = 0x%x, status = 0x%x\n"

	.no_dead_strip	_hdsp_spdif_sample_rate
.subsections_via_symbols
