	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda18271_powerscan
_tda18271_powerscan:                    ## @tda18271_powerscan
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	(%rax), %r13
	movq	(%rsi), %rax
	movq	%rax, -56(%rbp)
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_tda18271_calc_rf_band
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_tda18271_calc_rf_cal
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_tda18271_calc_gain_taper
	leaq	-41(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_tda18271_lookup_cid_target
	movq	_R_EP2@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_tda18271_write_regs
	movq	_R_EB14@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_tda18271_write_regs
	movl	$1000000, %r14d                 ## imm = 0xF4240
	movq	-56(%rbp), %rsi
	addq	%r14, %rsi
	movq	%rsi, -56(%rbp)
	movq	%r12, %rdi
	callq	_tda18271_calc_main_pll
	movq	_R_MPD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_tda18271_write_regs
	movl	$5, %edi
	callq	_msleep
	movq	_R_EP4@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	andb	$-4, (%r13,%rcx)
	movq	(%rax), %rcx
	orb	$1, (%r13,%rcx)
	movq	(%rax), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_tda18271_write_regs
	movq	(%rbx), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_tda18271_write_regs
	movq	%r12, %rdi
	callq	_tda18271_read_extended
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_tda_fail
	testq	%rax, %rax
	jne	LBB0_17
## %bb.1:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	%rax, (%rsi)
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_R_EB10@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movzbl	(%rcx,%rax), %edx
	andb	$63, %dl
	movzbl	-41(%rbp), %ecx
	cmpb	%cl, %dl
	jae	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rsi, %r13
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	addq	%r14, %rsi
	movq	%rsi, -56(%rbp)
	movq	%r12, %rdi
	callq	_tda18271_calc_main_pll
	movq	_R_MPD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_tda18271_write_regs
	movl	$100, %edi
	callq	_udelay
	movq	_R_EP2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_tda18271_write_regs
	movq	%r12, %rdi
	callq	_tda18271_read_extended
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_tda_fail
	testq	%rax, %rax
	jne	LBB0_17
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	-60(%rbp), %rax
	leaq	200(%r14), %rcx
	addq	$-999800, %r14                  ## imm = 0xFFF0BE88
	cmpq	%rax, %r14
	movq	%rcx, %r14
	movq	%r13, %rsi
	jle	LBB0_2
## %bb.5:
	movl	$200, %r14d
	movl	$999800, %r15d                  ## imm = 0xF4178
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_R_EB10@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movzbl	(%rcx,%rax), %edx
	andb	$63, %dl
	movzbl	-41(%rbp), %ecx
	cmpb	%cl, %dl
	jae	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movq	%rsi, -56(%rbp)
	movq	%r12, %rdi
	callq	_tda18271_calc_main_pll
	movq	_R_MPD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_tda18271_write_regs
	testb	$1, %bl
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$100, %edi
	callq	_udelay
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	$5, %edi
	callq	_msleep
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_R_EP2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_tda18271_write_regs
	movq	%r12, %rdi
	callq	_tda18271_read_extended
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_tda_fail
	testq	%rax, %rax
	jne	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	addq	$200, %r14
	movslq	-60(%rbp), %rax
	addq	$-200, %r15
	movb	$1, %bl
	cmpq	%rax, %r14
	movq	%r13, %rsi
	jle	LBB0_6
## %bb.12:
	movq	_R_EB10@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	-41(%rbp), %cl
LBB0_13:
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movb	(%rdx,%rax), %al
	andb	$63, %al
	cmpb	%cl, %al
	jae	LBB0_15
## %bb.14:
	movq	(%rsi), %rcx
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r8
	jmp	LBB0_16
LBB0_15:
	movq	-56(%rbp), %r8
	leaq	-1000000(%r8), %rcx
	movq	%rcx, (%rsi)
	movl	$1, %ebx
LBB0_16:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_tda_cal
LBB0_17:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R_EP2,8,3                      ## @R_EP2
	.comm	_R_EB14,8,3                     ## @R_EB14
	.comm	_R_MPD,8,3                      ## @R_MPD
	.comm	_R_EP4,8,3                      ## @R_EP4
	.comm	_R_EB10,8,3                     ## @R_EB10
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bcal = %d, freq_in = %d, freq_out = %d (freq = %d)\n"

	.no_dead_strip	_tda18271_powerscan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda18271_powerscan
_tda18271_powerscan:                    ; @tda18271_powerscan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	mov	w26, #16960
	movk	w26, #15, lsl #16
	ldr	x8, [x0]
	ldr	x23, [x8]
	ldr	x8, [x1]
	str	x8, [sp]
	mov	x1, sp
	bl	_tda18271_calc_rf_band
	mov	x1, sp
	mov	x0, x21
	bl	_tda18271_calc_rf_cal
	mov	x1, sp
	mov	x0, x21
	bl	_tda18271_calc_gain_taper
	mov	x1, sp
	add	x2, sp, #15
	add	x3, sp, #8
	mov	x0, x21
	bl	_tda18271_lookup_cid_target
Lloh0:
	adrp	x24, _R_EP2@GOTPAGE
Lloh1:
	ldr	x24, [x24, _R_EP2@GOTPAGEOFF]
	ldr	x1, [x24]
	mov	x0, x21
	mov	w2, #1
	bl	_tda18271_write_regs
Lloh2:
	adrp	x8, _R_EB14@GOTPAGE
Lloh3:
	ldr	x8, [x8, _R_EB14@GOTPAGEOFF]
Lloh4:
	ldr	x1, [x8]
	mov	x0, x21
	mov	w2, #1
	bl	_tda18271_write_regs
	ldr	x8, [sp]
	add	x1, x8, x26
	str	x1, [sp]
	mov	x0, x21
	bl	_tda18271_calc_main_pll
Lloh5:
	adrp	x25, _R_MPD@GOTPAGE
Lloh6:
	ldr	x25, [x25, _R_MPD@GOTPAGEOFF]
	ldr	x1, [x25]
	mov	x0, x21
	mov	w2, #4
	bl	_tda18271_write_regs
	mov	w0, #5
	bl	_msleep
Lloh7:
	adrp	x8, _R_EP4@GOTPAGE
Lloh8:
	ldr	x8, [x8, _R_EP4@GOTPAGEOFF]
	ldr	x9, [x8]
	ldrb	w10, [x23, x9]
	and	w10, w10, #0xfc
	strb	w10, [x23, x9]
	ldr	x9, [x8]
	ldrb	w10, [x23, x9]
	orr	w10, w10, #0x1
	strb	w10, [x23, x9]
	ldr	x1, [x8]
	mov	x0, x21
	mov	w2, #1
	bl	_tda18271_write_regs
	ldr	x1, [x24]
	mov	x0, x21
	mov	w2, #1
	bl	_tda18271_write_regs
	mov	x0, x21
	bl	_tda18271_read_extended
	mov	x22, x0
	bl	_tda_fail
	cbnz	x0, LBB0_17
; %bb.1:
	mov	x28, #0
	ldr	x8, [x19]
	str	x8, [x20]
Lloh9:
	adrp	x27, _R_EB10@GOTPAGE
Lloh10:
	ldr	x27, [x27, _R_EB10@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27]
	ldrb	w9, [x23, x8]
	and	w10, w9, #0x3f
	ldrb	w9, [sp, #15]
	cmp	w10, w9
	b.hs	LBB0_13
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	add	x9, x28, x26
	add	x1, x9, x8
	str	x1, [sp]
	mov	x0, x21
	bl	_tda18271_calc_main_pll
	ldr	x1, [x25]
	mov	x0, x21
	mov	w2, #4
	bl	_tda18271_write_regs
	mov	w0, #100
	bl	_udelay
	ldr	x1, [x24]
	mov	x0, x21
	mov	w2, #1
	bl	_tda18271_write_regs
	mov	x0, x21
	bl	_tda18271_read_extended
	mov	x22, x0
	bl	_tda_fail
	cbnz	x0, LBB0_17
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x28, x28, #200
	ldrsw	x8, [sp, #8]
	cmp	x28, x8
	b.le	LBB0_2
; %bb.5:
	mov	w22, #0
	sub	x26, x26, #200
	mov	w28, #200
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27]
	ldrb	w9, [x23, x8]
	and	w10, w9, #0x3f
	ldrb	w9, [sp, #15]
	cmp	w10, w9
	b.hs	LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19]
	add	x1, x26, x8
	str	x1, [sp]
	mov	x0, x21
	bl	_tda18271_calc_main_pll
	ldr	x1, [x25]
	mov	x0, x21
	mov	w2, #4
	bl	_tda18271_write_regs
	tbz	w22, #0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #100
	bl	_udelay
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #5
	bl	_msleep
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [x24]
	mov	x0, x21
	mov	w2, #1
	bl	_tda18271_write_regs
	mov	x0, x21
	bl	_tda18271_read_extended
	mov	x22, x0
	bl	_tda_fail
	cbnz	x0, LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x28, x28, #200
	ldrsw	x8, [sp, #8]
	sub	x26, x26, #200
	mov	w22, #1
	cmp	x28, x8
	b.le	LBB0_6
; %bb.12:
	ldr	x8, [x27]
	ldrb	w9, [sp, #15]
LBB0_13:
	ldrb	w8, [x23, x8]
	and	w8, w8, #0x3f
	cmp	w8, w9
	b.hs	LBB0_15
; %bb.14:
	mov	w22, #0
	ldr	x3, [x20]
	ldr	x4, [sp]
	b	LBB0_16
LBB0_15:
	ldr	x4, [sp]
	sub	x8, x4, #244, lsl #12           ; =999424
	sub	x3, x8, #576
	str	x3, [x20]
	mov	w22, #1
LBB0_16:
	ldr	x2, [x19]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_tda_cal
LBB0_17:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_R_EP2,8,3                      ; @R_EP2
	.comm	_R_EB14,8,3                     ; @R_EB14
	.comm	_R_MPD,8,3                      ; @R_MPD
	.comm	_R_EP4,8,3                      ; @R_EP4
	.comm	_R_EB10,8,3                     ; @R_EB10
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bcal = %d, freq_in = %d, freq_out = %d (freq = %d)\n"

	.no_dead_strip	_tda18271_powerscan
.subsections_via_symbols
