	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib9000_get_snr
_dib9000_get_snr:                       ## @dib9000_get_snr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rbx
	movq	8(%rbx), %r14
	movq	%rbx, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	_FE_SYNC_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dib9000_fw_memmbx_sync
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movq	_FE_MM_R_FE_MONITOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movl	$32, %ecx
	callq	_dib9000_risc_mem_read
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	28(%r14), %ecx
	movl	32(%r14), %eax
	movl	%ecx, %edx
	shrl	$4, %edx
	movzbl	%dl, %edi
	movl	%ecx, %edx
	andl	$15, %edx
	movl	%eax, %esi
	shrl	$14, %esi
	andl	$3, %esi
	leal	(%rsi,%rdx,4), %edx
	leal	-64(%rdx), %esi
	testb	$8, %cl
	movzbl	%sil, %ecx
	cmovel	%edx, %ecx
	addb	$16, %cl
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edi
	testl	%edi, %edi
	jle	LBB0_5
## %bb.6:
	movl	%eax, %ecx
	shll	$26, %ecx
	sarl	$31, %ecx
	movl	%eax, %edx
	andl	$63, %edx
	andl	$192, %ecx
	orl	%edx, %ecx
	shrl	$6, %eax
	movzbl	%al, %esi
	addb	$16, %cl
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	movl	%esi, %eax
	cltd
	idivl	%edi
	movl	%eax, %ecx
	shll	$16, %ecx
	shll	$16, %esi
	movl	%ecx, %eax
	imull	%edi, %eax
	subl	%eax, %esi
	movl	%esi, %eax
	cltd
	idivl	%edi
	addl	%ecx, %eax
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_3:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movl	$-1, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not get the lock\n"

	.comm	_FE_SYNC_CHANNEL,4,2            ## @FE_SYNC_CHANNEL
	.comm	_FE_MM_R_FE_MONITOR,4,2         ## @FE_MM_R_FE_MONITOR
	.no_dead_strip	_dib9000_get_snr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib9000_get_snr
_dib9000_get_snr:                       ; @dib9000_get_snr
	.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
	ldr	x20, [x0]
	ldr	x19, [x20, #8]
	mov	x0, x20
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _FE_SYNC_CHANNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FE_SYNC_CHANNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_dib9000_fw_memmbx_sync
	tbnz	x0, #63, LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _FE_MM_R_FE_MONITOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FE_MM_R_FE_MONITOR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x19
	mov	w3, #32
	bl	_dib9000_risc_mem_read
	mov	x0, x20
	bl	_mutex_unlock
	ldp	w9, w8, [x19, #28]
	ubfx	w10, w9, #4, #8
	ubfiz	w11, w9, #2, #4
	bfxil	w11, w8, #14, #2
	orr	w12, w11, #0xffffffc0
	tst	w9, #0x8
	csel	w9, w11, w12, eq
	add	w9, w9, #16
	lsl	w9, w10, w9
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.3:
	sbfx	w10, w8, #5, #1
	ubfx	w11, w8, #6, #8
	bfxil	w10, w8, #0, #6
	add	w8, w10, #16
	lsl	w8, w11, w8
	sdiv	w10, w8, w9
	lsl	w10, w10, #16
	lsl	w8, w8, #16
	msub	w8, w10, w9, w8
	sdiv	w8, w8, w9
	add	w0, w10, w8
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not get the lock\n"

	.comm	_FE_SYNC_CHANNEL,4,2            ; @FE_SYNC_CHANNEL
	.comm	_FE_MM_R_FE_MONITOR,4,2         ; @FE_MM_R_FE_MONITOR
	.no_dead_strip	_dib9000_get_snr
.subsections_via_symbols
