	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stb0899_search_carrier
_stb0899_search_carrier:                ## @stb0899_search_carrier
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_NOCARRIER@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, 8(%rdi)
	movq	16(%rdi), %rdx
	movq	24(%rdi), %rcx
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	cqto
	idivq	%rcx
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movzwl	32(%rbx), %r14d
	movq	_STB0899_CFD@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movq	_CFD_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	movl	$1, %edx
	callq	_STB0899_SETFIELD_VAL
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_stb0899_write_reg
	movswl	-64(%rbp), %eax                 ## 2-byte Folded Reload
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movw	$3, %ax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	_FE_DEBUG@GOTPCREL(%rip), %r15
	xorl	%r12d, %r12d
	movl	$0, -68(%rbp)                   ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	movl	(%r15), %esi
	movswl	%r14w, %r8d
	movq	24(%rbx), %r9
	movl	$1, %edx
	leaq	L_.str(%rip), %rcx
	xorl	%eax, %eax
	callq	_dprintk
	movq	%rbx, %rdi
	callq	_stb0899_check_carrier
	cmpq	(%r13), %rax
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	movl	36(%rbx), %r15d
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	imull	%eax, %r15d
	imull	40(%rbx), %r15d
	addl	%r14d, %r15d
	movl	%r15d, %eax
	negw	%ax
	cmovsw	%r15w, %ax
	movzwl	%ax, %eax
	xorl	%ecx, %ecx
	cmpl	%eax, -72(%rbp)                 ## 4-byte Folded Reload
	setl	%cl
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	subw	%cx, %ax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_STB0899_CFD@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r12d
	movq	_CFD_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	movl	$1, %edx
	callq	_STB0899_SETFIELD_VAL
	movl	(%r13), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_stb0899_write_reg
	movq	_CFRM@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	-56(%rbp), %r13d
	movzwl	44(%rbx), %eax
	imulw	%r15w, %ax
	movswl	%ax, %edi
	callq	_MSB
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_STB0899_SETFIELD_VAL
	movq	_CFRL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	-52(%rbp), %r13d
	movzwl	44(%rbx), %eax
	imulw	%r15w, %ax
	movswl	%ax, %edi
	callq	_LSB
	movl	%r12d, %edi
	movl	%r13d, %esi
	movq	_NOCARRIER@GOTPCREL(%rip), %r13
	movl	%eax, %edx
	callq	_STB0899_SETFIELD_VAL
	movq	_STB0899_CFRM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	leaq	-56(%rbp), %rdx
	movl	$2, %ecx
	callq	_stb0899_write_regs
	jmp	LBB0_8
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$0, -64(%rbp)                   ## 4-byte Folded Spill
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r14d, %r12d
	movl	%r15d, %r14d
	movq	_FE_DEBUG@GOTPCREL(%rip), %r15
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	negl	36(%rbx)
	movq	8(%rbx), %rax
	movq	_CARRIEROK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpw	$0, -64(%rbp)                   ## 2-byte Folded Reload
	jne	LBB0_4
LBB0_11:
	cmpq	%rcx, %rax
	jne	LBB0_13
## %bb.12:
	movq	_STB0899_CFRM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_stb0899_read_regs
	movzwl	44(%rbx), %r14d
	movl	-56(%rbp), %edi
	movl	-52(%rbp), %esi
	callq	_MAKEWORD16
	imulw	%r14w, %ax
	movw	%ax, 32(%rbx)
	movl	(%rbx), %edi
	movl	(%r15), %esi
	movswl	%ax, %r8d
	leaq	L_.str.1(%rip), %rcx
	movl	$1, %edx
	xorl	%eax, %eax
	callq	_dprintk
	movq	8(%rbx), %rax
	jmp	LBB0_14
LBB0_13:
	movw	%r12w, 32(%rbx)
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_16
## %bb.15:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NOCARRIER,8,3                  ## @NOCARRIER
	.comm	_STB0899_CFD,4,2                ## @STB0899_CFD
	.comm	_CFD_ON,4,2                     ## @CFD_ON
	.comm	_FE_DEBUG,4,2                   ## @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Derot Freq=%d, mclk=%d"

	.comm	_CFRM,4,2                       ## @CFRM
	.comm	_CFRL,4,2                       ## @CFRL
	.comm	_STB0899_CFRM,4,2               ## @STB0899_CFRM
	.comm	_CARRIEROK,8,3                  ## @CARRIEROK
L_.str.1:                               ## @.str.1
	.asciz	"----> CARRIER OK !, Derot Freq=%d"

	.no_dead_strip	_stb0899_search_carrier
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stb0899_search_carrier
_stb0899_search_carrier:                ; @stb0899_search_carrier
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x23, _NOCARRIER@GOTPAGE
Lloh4:
	ldr	x23, [x23, _NOCARRIER@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [x0, #8]
	ldp	x8, x9, [x0, #16]
	cmp	x8, #0
	cinc	x8, x8, lt
	asr	x8, x8, #1
	sdiv	x22, x8, x9
	ldrh	w26, [x0, #32]
Lloh5:
	adrp	x21, _STB0899_CFD@GOTPAGE
Lloh6:
	ldr	x21, [x21, _STB0899_CFD@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_stb0899_read_reg
	mov	x20, x0
Lloh7:
	adrp	x8, _CFD_ON@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CFD_ON@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	x1, x20
	mov	w2, #1
	bl	_STB0899_SETFIELD_VAL
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_stb0899_write_reg
	mov	w21, #0
	mov	w27, #0
	sxth	w8, w22
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	mov	x22, x23
	mov	w24, #3
Lloh10:
	adrp	x28, _FE_DEBUG@GOTPAGE
Lloh11:
	ldr	x28, [x28, _FE_DEBUG@GOTPAGEOFF]
Lloh12:
	adrp	x23, _CARRIEROK@GOTPAGE
Lloh13:
	ldr	x23, [x23, _CARRIEROK@GOTPAGEOFF]
Lloh14:
	adrp	x20, l_.str@PAGE
Lloh15:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x26
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19, #36]
	neg	w8, w8
	str	w8, [x19, #36]
	ldr	x0, [x19, #8]
	ldr	x8, [x23]
	cmp	x0, x8
	and	w9, w24, #0xffff
	ccmp	w9, #0, #4, ne
	mov	x26, x25
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	ldr	w1, [x28]
	sxth	w4, w26
	ldr	x8, [x19, #24]
	str	x8, [sp]
	mov	w2, #1
	mov	x3, x20
	bl	_dprintk
	mov	x0, x19
	bl	_stb0899_check_carrier
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w27, w27, #1
	ldp	w8, w9, [x19, #36]
	mul	w8, w8, w27
	madd	w25, w8, w9, w26
	sxth	w8, w25
	cmp	w8, #0
	cneg	w8, w8, mi
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w9, w8, uxth
	cset	w8, lt
	sub	w24, w24, w8
	tst	w24, #0xffff
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh16:
	adrp	x8, _STB0899_CFD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _STB0899_CFD@GOTPAGEOFF]
	mov	x20, x23
	mov	x23, x28
	mov	x28, x8
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stb0899_read_reg
	mov	x21, x0
Lloh18:
	adrp	x8, _CFD_ON@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CFD_ON@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	mov	x1, x21
	mov	w2, #1
	bl	_STB0899_SETFIELD_VAL
	ldr	w1, [x28]
	mov	x0, x19
	mov	x2, x21
	bl	_stb0899_write_reg
Lloh21:
	adrp	x8, _CFRM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CFRM@GOTPAGEOFF]
Lloh23:
	ldr	w21, [x8]
	mov	x28, x22
	ldr	w22, [sp, #16]
	ldrh	w8, [x19, #44]
	mul	w8, w8, w25
	sxth	w0, w8
	bl	_MSB
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_STB0899_SETFIELD_VAL
Lloh24:
	adrp	x8, _CFRL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CFRL@GOTPAGEOFF]
Lloh26:
	ldr	w21, [x8]
	ldr	w22, [sp, #20]
	ldrh	w8, [x19, #44]
	mul	w8, w8, w25
	sxth	w0, w8
	bl	_LSB
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	mov	x22, x28
	mov	x28, x23
	mov	x23, x20
Lloh27:
	adrp	x20, l_.str@PAGE
Lloh28:
	add	x20, x20, l_.str@PAGEOFF
	bl	_STB0899_SETFIELD_VAL
Lloh29:
	adrp	x8, _STB0899_CFRM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _STB0899_CFRM@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x19
	mov	w3, #2
	bl	_stb0899_write_regs
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w24, #0
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, x26
	b	LBB0_2
LBB0_8:
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.9:
Lloh32:
	adrp	x8, _STB0899_CFRM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _STB0899_CFRM@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x19
	mov	w3, #2
	bl	_stb0899_read_regs
	ldrh	w20, [x19, #44]
	ldp	w0, w1, [sp, #16]
	bl	_MAKEWORD16
	mul	w8, w20, w0
	strh	w8, [x19, #32]
	ldr	w0, [x19]
	ldr	w1, [x28]
	sxth	w4, w8
Lloh35:
	adrp	x3, l_.str.1@PAGE
Lloh36:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w2, #1
	bl	_dprintk
	ldr	x0, [x19, #8]
	b	LBB0_11
LBB0_10:
	strh	w21, [x19, #32]
LBB0_11:
	ldr	x8, [sp, #24]
Lloh37:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh38:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_NOCARRIER,8,3                  ; @NOCARRIER
	.comm	_STB0899_CFD,4,2                ; @STB0899_CFD
	.comm	_CFD_ON,4,2                     ; @CFD_ON
	.comm	_FE_DEBUG,4,2                   ; @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Derot Freq=%d, mclk=%d"

	.comm	_CFRM,4,2                       ; @CFRM
	.comm	_CFRL,4,2                       ; @CFRL
	.comm	_STB0899_CFRM,4,2               ; @STB0899_CFRM
	.comm	_CARRIEROK,8,3                  ; @CARRIEROK
l_.str.1:                               ; @.str.1
	.asciz	"----> CARRIER OK !, Derot Freq=%d"

	.no_dead_strip	_stb0899_search_carrier
.subsections_via_symbols
