	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvt_rx_carrier_detect
_nvt_rx_carrier_detect:                 ## @nvt_rx_carrier_detect
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_CIR_FCCL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_nvt_cir_reg_read
	movl	%eax, %r15d
	movq	_CIR_FCCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_nvt_cir_reg_read
	movl	%eax, %r14d
	shll	$8, %r14d
	orl	%r15d, %r14d
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	8(%rbx), %rcx
	movq	_BUF_PULSE_BIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r10d
	movq	_BUF_LEN_MASK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	cmpl	$8, %eax
	jae	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_4:
	movl	%eax, %edi
	andl	$-8, %edi
	movd	%r10d, %xmm0
	pshufd	$0, %xmm0, %xmm10               ## xmm10 = xmm0[0,0,0,0]
	movd	%r9d, %xmm1
	pshufd	$0, %xmm1, %xmm9                ## xmm9 = xmm1[0,0,0,0]
	leaq	-8(%rdi), %rsi
	movq	%rsi, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.6:
	movq	%r8, %rsi
	andq	$-2, %rsi
	pxor	%xmm8, %xmm8
	xorl	%ebx, %ebx
	pxor	%xmm2, %xmm2
	pxor	%xmm3, %xmm3
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rbx,4), %xmm1
	movdqu	16(%rcx,%rbx,4), %xmm0
	movdqu	32(%rcx,%rbx,4), %xmm4
	movdqu	48(%rcx,%rbx,4), %xmm5
	movdqa	%xmm10, %xmm7
	pand	%xmm1, %xmm7
	movdqa	%xmm10, %xmm6
	pand	%xmm0, %xmm6
	pand	%xmm9, %xmm1
	pand	%xmm9, %xmm0
	pcmpeqd	%xmm8, %xmm7
	pandn	%xmm1, %xmm7
	paddd	%xmm2, %xmm7
	pcmpeqd	%xmm8, %xmm6
	pandn	%xmm0, %xmm6
	paddd	%xmm3, %xmm6
	movdqa	%xmm10, %xmm2
	pand	%xmm4, %xmm2
	movdqa	%xmm10, %xmm3
	pand	%xmm5, %xmm3
	pand	%xmm9, %xmm4
	pand	%xmm9, %xmm5
	pcmpeqd	%xmm8, %xmm2
	pandn	%xmm4, %xmm2
	paddd	%xmm7, %xmm2
	pcmpeqd	%xmm8, %xmm3
	pandn	%xmm5, %xmm3
	paddd	%xmm6, %xmm3
	addq	$16, %rbx
	addq	$-2, %rsi
	jne	LBB0_7
## %bb.8:
	testb	$1, %r8b
	je	LBB0_10
LBB0_9:
	movdqu	(%rcx,%rbx,4), %xmm0
	movdqu	16(%rcx,%rbx,4), %xmm1
	movdqa	%xmm10, %xmm4
	pand	%xmm0, %xmm4
	pand	%xmm1, %xmm10
	pxor	%xmm5, %xmm5
	pand	%xmm9, %xmm0
	pand	%xmm1, %xmm9
	pcmpeqd	%xmm5, %xmm4
	pandn	%xmm0, %xmm4
	paddd	%xmm4, %xmm2
	pcmpeqd	%xmm5, %xmm10
	pandn	%xmm9, %xmm10
	paddd	%xmm10, %xmm3
LBB0_10:
	paddd	%xmm3, %xmm2
	pshufd	$238, %xmm2, %xmm0              ## xmm0 = xmm2[2,3,2,3]
	paddd	%xmm2, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	cmpq	%rax, %rdi
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdi,4), %esi
	movl	%r10d, %edx
	andl	%esi, %edx
	andl	%r9d, %esi
	testl	%edx, %edx
	cmovel	%edx, %esi
	addl	%esi, %ebx
	incq	%rdi
	cmpq	%rdi, %rax
	jne	LBB0_11
LBB0_12:
	movq	_SAMPLE_PERIOD@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.13:
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.15:
	movl	%r14d, %edi
	callq	_MS_TO_NS
	cltd
	idivl	%ebx
	movl	%eax, %r15d
	movq	_MAX_CARRIER@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jg	LBB0_17
## %bb.16:
	movq	_MIN_CARRIER@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jge	LBB0_18
LBB0_17:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_nvt_dbg
LBB0_18:
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_nvt_dbg
	jmp	LBB0_19
LBB0_14:
	movq	_KERN_NOTICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_nvt_pr
	xorl	%r15d, %r15d
LBB0_19:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	pxor	%xmm2, %xmm2
	xorl	%ebx, %ebx
	pxor	%xmm3, %xmm3
	testb	$1, %r8b
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_CIR_FCCL,4,2                   ## @CIR_FCCL
	.comm	_CIR_FCCH,4,2                   ## @CIR_FCCH
	.comm	_BUF_PULSE_BIT,4,2              ## @BUF_PULSE_BIT
	.comm	_BUF_LEN_MASK,4,2               ## @BUF_LEN_MASK
	.comm	_SAMPLE_PERIOD,4,2              ## @SAMPLE_PERIOD
	.comm	_KERN_NOTICE,4,2                ## @KERN_NOTICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to determine carrier! (c:%u, d:%u)"

	.comm	_MAX_CARRIER,4,2                ## @MAX_CARRIER
	.comm	_MIN_CARRIER,4,2                ## @MIN_CARRIER
L_.str.1:                               ## @.str.1
	.asciz	"WTF? Carrier frequency out of range!"

L_.str.2:                               ## @.str.2
	.asciz	"Carrier frequency: %u (count %u, duration %u)"

	.no_dead_strip	_nvt_rx_carrier_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvt_rx_carrier_detect
_nvt_rx_carrier_detect:                 ; @nvt_rx_carrier_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x0
Lloh0:
	adrp	x8, _CIR_FCCL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CIR_FCCL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_nvt_cir_reg_read
	mov	x19, x0
Lloh3:
	adrp	x8, _CIR_FCCH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CIR_FCCH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nvt_cir_reg_read
	orr	w19, w19, w0, lsl #8
	ldr	w10, [x20]
	cmp	w10, #1
	b.lt	LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _BUF_PULSE_BIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BUF_PULSE_BIT@GOTPAGEOFF]
	ldr	x11, [x20, #8]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _BUF_LEN_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BUF_LEN_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w10, #16
	b.hs	LBB0_4
; %bb.2:
	mov	x12, #0
	mov	w13, #0
	b	LBB0_7
LBB0_3:
	mov	w13, #0
	b	LBB0_9
LBB0_4:
	and	x12, x10, #0xfffffff0
	dup.4s	v0, w8
	dup.4s	v1, w9
	add	x13, x11, #32
	movi.2d	v2, #0000000000000000
	mov	x14, x12
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
	movi.2d	v5, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q6, q7, [x13, #-32]
	ldp	q16, q17, [x13], #64
	and.16b	v18, v0, v6
	and.16b	v19, v0, v7
	and.16b	v20, v0, v16
	and.16b	v21, v0, v17
	cmeq.4s	v18, v18, #0
	cmeq.4s	v19, v19, #0
	cmeq.4s	v20, v20, #0
	cmeq.4s	v21, v21, #0
	and.16b	v6, v1, v6
	and.16b	v7, v1, v7
	and.16b	v16, v1, v16
	and.16b	v17, v1, v17
	bic.16b	v6, v6, v18
	bic.16b	v7, v7, v19
	bic.16b	v16, v16, v20
	bic.16b	v17, v17, v21
	add.4s	v2, v6, v2
	add.4s	v3, v7, v3
	add.4s	v4, v16, v4
	add.4s	v5, v17, v5
	subs	x14, x14, #16
	b.ne	LBB0_5
; %bb.6:
	add.4s	v0, v3, v2
	add.4s	v0, v4, v0
	add.4s	v0, v5, v0
	addv.4s	s0, v0
	fmov	w13, s0
	cmp	x12, x10
	b.eq	LBB0_9
LBB0_7:
	add	x11, x11, x12, lsl #2
	sub	x10, x10, x12
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11], #4
	and	w14, w9, w12
	tst	w8, w12
	csel	w12, wzr, w14, eq
	add	w13, w12, w13
	subs	x10, x10, #1
	b.ne	LBB0_8
LBB0_9:
Lloh12:
	adrp	x8, _SAMPLE_PERIOD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SAMPLE_PERIOD@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mul	w20, w8, w13
	cmp	w19, #0
	ccmp	w20, #0, #4, ne
	b.ne	LBB0_11
; %bb.10:
Lloh15:
	adrp	x8, _KERN_NOTICE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KERN_NOTICE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x20
	bl	_nvt_pr
	mov	w21, #0
	b	LBB0_14
LBB0_11:
	mov	x0, x19
	bl	_MS_TO_NS
	sdiv	w21, w0, w20
Lloh20:
	adrp	x8, _MAX_CARRIER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MAX_CARRIER@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _MIN_CARRIER@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MIN_CARRIER@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w21, w8
	ccmp	w21, w9, #8, le
	b.ge	LBB0_13
; %bb.12:
Lloh26:
	adrp	x0, l_.str.1@PAGE
Lloh27:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_nvt_dbg
LBB0_13:
	stp	x19, x20, [sp, #8]
	str	x21, [sp]
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_nvt_dbg
LBB0_14:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_CIR_FCCL,4,2                   ; @CIR_FCCL
	.comm	_CIR_FCCH,4,2                   ; @CIR_FCCH
	.comm	_BUF_PULSE_BIT,4,2              ; @BUF_PULSE_BIT
	.comm	_BUF_LEN_MASK,4,2               ; @BUF_LEN_MASK
	.comm	_SAMPLE_PERIOD,4,2              ; @SAMPLE_PERIOD
	.comm	_KERN_NOTICE,4,2                ; @KERN_NOTICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to determine carrier! (c:%u, d:%u)"

	.comm	_MAX_CARRIER,4,2                ; @MAX_CARRIER
	.comm	_MIN_CARRIER,4,2                ; @MIN_CARRIER
l_.str.1:                               ; @.str.1
	.asciz	"WTF? Carrier frequency out of range!"

l_.str.2:                               ; @.str.2
	.asciz	"Carrier frequency: %u (count %u, duration %u)"

	.no_dead_strip	_nvt_rx_carrier_detect
.subsections_via_symbols
