	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_dvbt2_check_demod_lock ## -- Begin function cxd2880_tnrdmd_dvbt2_check_demod_lock
	.p2align	4, 0x90
_cxd2880_tnrdmd_dvbt2_check_demod_lock: ## @cxd2880_tnrdmd_dvbt2_check_demod_lock
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	$0, -20(%rbp)
	movl	$0, -32(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -28(%rbp)
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_SUB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.4:
	movq	8(%rbx), %rax
	movq	_CXD2880_TNRDMD_STATE_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.5:
	leaq	-20(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	leaq	-24(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_cxd2880_tnrdmd_dvbt2_mon_sync_stat
	testl	%eax, %eax
	jne	LBB0_18
## %bb.6:
	movq	(%rbx), %rcx
	movq	_CXD2880_TNRDMD_DIVERMODE_SINGLE@GOTPCREL(%rip), %rdx
	movl	-20(%rbp), %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_11
## %bb.7:
	cmpl	$6, %eax
	je	LBB0_8
## %bb.9:
	cmpl	$0, -24(%rbp)
	je	LBB0_16
LBB0_10:
	movq	_CXD2880_TNRDMD_LOCK_RESULT_UNLOCKED@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	cmpl	$6, %eax
	jne	LBB0_12
LBB0_8:
	movq	_CXD2880_TNRDMD_LOCK_RESULT_LOCKED@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_12:
	leaq	-20(%rbp), %rsi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_cxd2880_tnrdmd_dvbt2_mon_sync_stat_sub
	testl	%eax, %eax
	jne	LBB0_18
## %bb.13:
	cmpl	$6, -20(%rbp)
	je	LBB0_8
## %bb.14:
	cmpl	$0, -24(%rbp)
	je	LBB0_16
## %bb.15:
	cmpl	$0, -28(%rbp)
	jne	LBB0_10
LBB0_16:
	movq	_CXD2880_TNRDMD_LOCK_RESULT_NOTDETECT@GOTPCREL(%rip), %rax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CXD2880_TNRDMD_DIVERMODE_SUB,8,3 ## @CXD2880_TNRDMD_DIVERMODE_SUB
	.comm	_CXD2880_TNRDMD_STATE_ACTIVE,8,3 ## @CXD2880_TNRDMD_STATE_ACTIVE
	.comm	_CXD2880_TNRDMD_DIVERMODE_SINGLE,8,3 ## @CXD2880_TNRDMD_DIVERMODE_SINGLE
	.comm	_CXD2880_TNRDMD_LOCK_RESULT_LOCKED,4,2 ## @CXD2880_TNRDMD_LOCK_RESULT_LOCKED
	.comm	_CXD2880_TNRDMD_LOCK_RESULT_UNLOCKED,4,2 ## @CXD2880_TNRDMD_LOCK_RESULT_UNLOCKED
	.comm	_CXD2880_TNRDMD_LOCK_RESULT_NOTDETECT,4,2 ## @CXD2880_TNRDMD_LOCK_RESULT_NOTDETECT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_dvbt2_check_demod_lock ; -- Begin function cxd2880_tnrdmd_dvbt2_check_demod_lock
	.p2align	2
_cxd2880_tnrdmd_dvbt2_check_demod_lock: ; @cxd2880_tnrdmd_dvbt2_check_demod_lock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	stp	xzr, xzr, [sp]
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_9
; %bb.2:
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CXD2880_TNRDMD_DIVERMODE_SUB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CXD2880_TNRDMD_DIVERMODE_SUB@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.3:
	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.4:
	add	x1, sp, #12
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x20
	bl	_cxd2880_tnrdmd_dvbt2_mon_sync_stat
	cbnz	w0, LBB0_10
; %bb.5:
	ldr	x9, [x20]
Lloh6:
	adrp	x8, _CXD2880_TNRDMD_DIVERMODE_SINGLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CXD2880_TNRDMD_DIVERMODE_SINGLE@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x8]
	ldr	w8, [sp, #12]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.6:
	cmp	w8, #6
	b.eq	LBB0_12
; %bb.7:
	ldr	w8, [sp, #4]
	cbz	w8, LBB0_18
LBB0_8:
	mov	w0, #0
Lloh9:
	adrp	x8, _CXD2880_TNRDMD_LOCK_RESULT_UNLOCKED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CXD2880_TNRDMD_LOCK_RESULT_UNLOCKED@GOTPAGEOFF]
	b	LBB0_13
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, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_11:
	cmp	w8, #6
	b.ne	LBB0_14
LBB0_12:
	mov	w0, #0
Lloh14:
	adrp	x8, _CXD2880_TNRDMD_LOCK_RESULT_LOCKED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CXD2880_TNRDMD_LOCK_RESULT_LOCKED@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_10
LBB0_14:
	add	x1, sp, #12
	mov	x2, sp
	mov	x0, x20
	bl	_cxd2880_tnrdmd_dvbt2_mon_sync_stat_sub
	cbnz	w0, LBB0_10
; %bb.15:
	ldr	w8, [sp, #12]
	cmp	w8, #6
	b.eq	LBB0_12
; %bb.16:
	ldr	w8, [sp, #4]
	cbz	w8, LBB0_18
; %bb.17:
	ldr	w8, [sp]
	cbnz	w8, LBB0_8
LBB0_18:
	mov	w0, #0
Lloh16:
	adrp	x8, _CXD2880_TNRDMD_LOCK_RESULT_NOTDETECT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CXD2880_TNRDMD_LOCK_RESULT_NOTDETECT@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CXD2880_TNRDMD_DIVERMODE_SUB,8,3 ; @CXD2880_TNRDMD_DIVERMODE_SUB
	.comm	_CXD2880_TNRDMD_STATE_ACTIVE,8,3 ; @CXD2880_TNRDMD_STATE_ACTIVE
	.comm	_CXD2880_TNRDMD_DIVERMODE_SINGLE,8,3 ; @CXD2880_TNRDMD_DIVERMODE_SINGLE
	.comm	_CXD2880_TNRDMD_LOCK_RESULT_LOCKED,4,2 ; @CXD2880_TNRDMD_LOCK_RESULT_LOCKED
	.comm	_CXD2880_TNRDMD_LOCK_RESULT_UNLOCKED,4,2 ; @CXD2880_TNRDMD_LOCK_RESULT_UNLOCKED
	.comm	_CXD2880_TNRDMD_LOCK_RESULT_NOTDETECT,4,2 ; @CXD2880_TNRDMD_LOCK_RESULT_NOTDETECT
.subsections_via_symbols
