	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib8000_get_snr
_dib8000_get_snr:                       ## @dib8000_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
	xorl	%eax, %eax
	cmpl	$32912, (%rbx)                  ## imm = 0x8090
	sete	%al
	leal	(%rax,%rax), %esi
	addl	$542, %esi                      ## imm = 0x21E
	movq	%rbx, %rdi
	callq	_dib8000_read_word
	movl	%eax, %ecx
	shrl	$6, %ecx
	movzbl	%cl, %r14d
	movl	%eax, %ecx
	andl	$63, %ecx
	shll	$26, %eax
	sarl	$31, %eax
	andl	$192, %eax
	orl	%eax, %ecx
	addb	$16, %cl
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	xorl	%eax, %eax
	cmpl	$32912, (%rbx)                  ## imm = 0x8090
	sete	%al
	leal	(%rax,%rax), %esi
	addl	$543, %esi                      ## imm = 0x21F
	movq	%rbx, %rdi
	callq	_dib8000_read_word
	testl	%r14d, %r14d
	jle	LBB0_1
## %bb.2:
	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	%r14d
	movl	%eax, %ecx
	shll	$16, %ecx
	shll	$16, %esi
	movl	%ecx, %eax
	imull	%r14d, %eax
	subl	%eax, %esi
	movl	%esi, %eax
	cltd
	idivl	%r14d
	addl	%ecx, %eax
	jmp	LBB0_3
LBB0_1:
	movl	$-1, %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_dib8000_get_snr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib8000_get_snr
_dib8000_get_snr:                       ; @dib8000_get_snr
	.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
	ldr	x19, [x0]
	ldr	w8, [x19]
	mov	w21, #32912
	mov	w9, #542
	mov	w10, #544
	cmp	w8, w21
	csel	w1, w10, w9, eq
	mov	x0, x19
	bl	_dib8000_read_word
	ubfx	w8, w0, #6, #8
	sbfx	w9, w0, #5, #1
	bfxil	w9, w0, #0, #6
	add	w9, w9, #16
	lsl	w20, w8, w9
	ldr	w8, [x19]
	mov	w9, #543
	mov	w10, #545
	cmp	w8, w21
	csel	w1, w10, w9, eq
	mov	x0, x19
	bl	_dib8000_read_word
	cmp	w20, #1
	b.lt	LBB0_2
; %bb.1:
	sbfx	w8, w0, #5, #1
	ubfx	w9, w0, #6, #8
	bfxil	w8, w0, #0, #6
	add	w8, w8, #16
	lsl	w8, w9, w8
	sdiv	w9, w8, w20
	lsl	w9, w9, #16
	lsl	w8, w8, #16
	msub	w8, w9, w20, w8
	sdiv	w8, w8, w20
	add	w0, w9, w8
	b	LBB0_3
LBB0_2:
	mov	w0, #-1
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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_dib8000_get_snr
.subsections_via_symbols
