	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zd1301_demod_read_status
_zd1301_demod_read_status:              ## @zd1301_demod_read_status
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	(%rdi), %r13
	movq	8(%r13), %r14
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movl	$27172, %esi                    ## imm = 0x6A24
	callq	_zd1301_demod_rreg
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_dbg
	movl	%ebx, %r15d
	jmp	LBB0_6
LBB0_1:
	movl	-44(%rbp), %edx
	leal	-1(%rdx), %ecx
	xorl	%r15d, %r15d
	movl	$0, %eax
	cmpl	$30, %ecx
	ja	LBB0_3
## %bb.2:
	movq	_FE_HAS_SIGNAL@GOTPCREL(%rip), %rcx
	movq	_FE_HAS_CARRIER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_FE_HAS_VITERBI@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FE_HAS_SYNC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FE_HAS_LOCK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
LBB0_3:
	movl	%eax, (%r12)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_dbg
	movq	_zd1301_demod_gain@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	cmpq	%rdx, (%r13)
	je	LBB0_6
## %bb.4:
	movq	%rdx, (%r13)
	movq	%r13, %rdi
	movl	$27203, %esi                    ## imm = 0x6A43
	callq	_zd1301_demod_wreg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FE_HAS_SIGNAL,4,2              ## @FE_HAS_SIGNAL
	.comm	_FE_HAS_CARRIER,4,2             ## @FE_HAS_CARRIER
	.comm	_FE_HAS_VITERBI,4,2             ## @FE_HAS_VITERBI
	.comm	_FE_HAS_SYNC,4,2                ## @FE_HAS_SYNC
	.comm	_FE_HAS_LOCK,4,2                ## @FE_HAS_LOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lock byte=%02x\n"

	.comm	_zd1301_demod_gain,8,3          ## @zd1301_demod_gain
L_.str.1:                               ## @.str.1
	.asciz	"failed=%d\n"

	.no_dead_strip	_zd1301_demod_read_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zd1301_demod_read_status
_zd1301_demod_read_status:              ; @zd1301_demod_read_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	ldr	x20, [x0]
	ldr	x19, [x20, #8]
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #27172
	bl	_zd1301_demod_rreg
	mov	x22, x0
	cbz	w0, LBB0_2
LBB0_1:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_dbg
	b	LBB0_8
LBB0_2:
	ldr	w2, [sp, #12]
	sub	w8, w2, #1
	cmp	w8, #30
	b.hi	LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _FE_HAS_SIGNAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FE_HAS_SIGNAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _FE_HAS_CARRIER@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FE_HAS_CARRIER@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _FE_HAS_VITERBI@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FE_HAS_VITERBI@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh11:
	adrp	x9, _FE_HAS_SYNC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _FE_HAS_SYNC@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _FE_HAS_LOCK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FE_HAS_LOCK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
	b	LBB0_5
LBB0_4:
	mov	w8, #0
LBB0_5:
	str	w8, [x21]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	x8, [x20]
Lloh19:
	adrp	x9, _zd1301_demod_gain@GOTPAGE
Lloh20:
	ldr	x9, [x9, _zd1301_demod_gain@GOTPAGEOFF]
Lloh21:
	ldr	x2, [x9]
	cmp	x8, x2
	b.ne	LBB0_7
; %bb.6:
	mov	w22, #0
	b	LBB0_8
LBB0_7:
	str	x2, [x20]
	mov	x0, x20
	mov	w1, #27203
	bl	_zd1301_demod_wreg
	mov	x22, x0
	cbnz	w0, LBB0_1
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_FE_HAS_SIGNAL,4,2              ; @FE_HAS_SIGNAL
	.comm	_FE_HAS_CARRIER,4,2             ; @FE_HAS_CARRIER
	.comm	_FE_HAS_VITERBI,4,2             ; @FE_HAS_VITERBI
	.comm	_FE_HAS_SYNC,4,2                ; @FE_HAS_SYNC
	.comm	_FE_HAS_LOCK,4,2                ; @FE_HAS_LOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lock byte=%02x\n"

	.comm	_zd1301_demod_gain,8,3          ; @zd1301_demod_gain
l_.str.1:                               ; @.str.1
	.asciz	"failed=%d\n"

	.no_dead_strip	_zd1301_demod_read_status
.subsections_via_symbols
