	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_dvbt2_mon_snr_diver ## -- Begin function cxd2880_tnrdmd_dvbt2_mon_snr_diver
	.p2align	4, 0x90
_cxd2880_tnrdmd_dvbt2_mon_snr_diver:    ## @cxd2880_tnrdmd_dvbt2_mon_snr_diver
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -40(%rbp)
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.2:
	movq	%rdx, %rbx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.3:
	movq	%rcx, %r15
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.5:
	movq	%rdi, %r12
	movl	$-1000000, (%r14)               ## imm = 0xFFF0BDC0
	movl	$-1000000, (%rbx)               ## imm = 0xFFF0BDC0
	movl	$-1000000, (%r15)               ## imm = 0xFFF0BDC0
	movq	(%rdi), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.6:
	movq	8(%r12), %rax
	movq	_CXD2880_TNRDMD_STATE_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.7:
	movq	16(%r12), %rax
	movq	_CXD2880_DTV_SYS_DVBT2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.8:
	leaq	-40(%rbp), %rsi
	movq	%r12, %rdi
	callq	_dvbt2_read_snr_reg
	testl	%eax, %eax
	je	LBB0_9
## %bb.11:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	jne	LBB0_19
	jmp	LBB0_12
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	-40(%rbp), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_dvbt2_calc_snr
	testl	%eax, %eax
	je	LBB0_10
LBB0_12:
	movq	$0, -40(%rbp)
	xorl	%ebx, %ebx
LBB0_13:
	movq	24(%r12), %rdi
	leaq	-40(%rbp), %rsi
	callq	_dvbt2_read_snr_reg
	testl	%eax, %eax
	je	LBB0_14
## %bb.16:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	jne	LBB0_19
	jmp	LBB0_17
LBB0_14:
	movq	24(%r12), %rdi
	movq	-40(%rbp), %rsi
	movq	%r15, %rdx
	callq	_dvbt2_calc_snr
	testl	%eax, %eax
	je	LBB0_15
LBB0_17:
	movq	$0, -40(%rbp)
	xorl	%esi, %esi
	jmp	LBB0_18
LBB0_10:
	movq	-40(%rbp), %rbx
	jmp	LBB0_13
LBB0_15:
	movq	-40(%rbp), %rsi
LBB0_18:
	addq	%rbx, %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_dvbt2_calc_snr
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CXD2880_TNRDMD_DIVERMODE_MAIN,8,3 ## @CXD2880_TNRDMD_DIVERMODE_MAIN
	.comm	_CXD2880_TNRDMD_STATE_ACTIVE,8,3 ## @CXD2880_TNRDMD_STATE_ACTIVE
	.comm	_CXD2880_DTV_SYS_DVBT2,8,3      ## @CXD2880_DTV_SYS_DVBT2
	.comm	_EAGAIN,4,2                     ## @EAGAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_dvbt2_mon_snr_diver ; -- Begin function cxd2880_tnrdmd_dvbt2_mon_snr_diver
	.p2align	2
_cxd2880_tnrdmd_dvbt2_mon_snr_diver:    ; @cxd2880_tnrdmd_dvbt2_mon_snr_diver
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	str	xzr, [sp, #8]
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_9
; %bb.2:
	mov	x22, x2
	cbz	x2, LBB0_9
; %bb.3:
	mov	x21, x3
	cbz	x3, LBB0_9
; %bb.4:
	mov	x20, x0
	mov	w8, #48576
	movk	w8, #65520, lsl #16
	str	w8, [x19]
	str	w8, [x22]
	str	w8, [x21]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.5:
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x9, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.6:
	ldr	x8, [x20, #16]
Lloh6:
	adrp	x9, _CXD2880_DTV_SYS_DVBT2@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CXD2880_DTV_SYS_DVBT2@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	add	x1, sp, #8
	mov	x0, x20
	bl	_dvbt2_read_snr_reg
Lloh9:
	adrp	x23, _EAGAIN@GOTPAGE
Lloh10:
	ldr	x23, [x23, _EAGAIN@GOTPAGEOFF]
	cbz	w0, LBB0_11
; %bb.8:
	ldr	w8, [x23]
	cmn	w0, w8
	b.ne	LBB0_10
	b	LBB0_12
LBB0_9:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
	ldr	x1, [sp, #8]
	mov	x0, x20
	mov	x2, x22
	bl	_dvbt2_calc_snr
	cbz	w0, LBB0_17
LBB0_12:
	mov	x22, #0
	str	xzr, [sp, #8]
LBB0_13:
	ldr	x0, [x20, #24]
	add	x1, sp, #8
	bl	_dvbt2_read_snr_reg
	cbz	w0, LBB0_15
; %bb.14:
	ldr	w8, [x23]
	cmn	w0, w8
	b.ne	LBB0_10
	b	LBB0_16
LBB0_15:
	ldr	x0, [x20, #24]
	ldr	x1, [sp, #8]
	mov	x2, x21
	bl	_dvbt2_calc_snr
	cbz	w0, LBB0_18
LBB0_16:
	mov	x8, #0
	str	xzr, [sp, #8]
	b	LBB0_19
LBB0_17:
	ldr	x22, [sp, #8]
	b	LBB0_13
LBB0_18:
	ldr	x8, [sp, #8]
LBB0_19:
	add	x1, x8, x22
	mov	x0, x20
	mov	x2, x19
	bl	_dvbt2_calc_snr
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CXD2880_TNRDMD_DIVERMODE_MAIN,8,3 ; @CXD2880_TNRDMD_DIVERMODE_MAIN
	.comm	_CXD2880_TNRDMD_STATE_ACTIVE,8,3 ; @CXD2880_TNRDMD_STATE_ACTIVE
	.comm	_CXD2880_DTV_SYS_DVBT2,8,3      ; @CXD2880_DTV_SYS_DVBT2
	.comm	_EAGAIN,4,2                     ; @EAGAIN
.subsections_via_symbols
