	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda18271_tune
_tda18271_tune:                         ## @tda18271_tune
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	8(%rsi), %edx
	movl	(%rsi), %r9d
	movl	4(%rsi), %r8d
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_tda_dbg
	movq	%r13, %rdi
	callq	_tda18271_agc
	movl	%eax, %edi
	callq	_tda_fail
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_tda_warn
LBB0_2:
	movq	%r13, %rdi
	callq	_tda18271_init
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_tda_fail
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	4(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_7
## %bb.5:
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_tda18271c1_rf_tracking_filter_calibration
	jmp	LBB0_7
LBB0_6:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_tda18271c2_rf_tracking_filters_correction
LBB0_7:
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_tda18271_channel_configuration
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"freq = %d, ifc = %d, bw = %d, agc_mode = %d, std = %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to configure agc\n"

	.no_dead_strip	_tda18271_tune
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda18271_tune
_tda18271_tune:                         ; @tda18271_tune
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x24, [x0]
	ldp	w4, w2, [x1, #4]
	ldr	w5, [x1]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_tda_dbg
	mov	x0, x22
	bl	_tda18271_agc
	bl	_tda_fail
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_tda_warn
LBB0_2:
	mov	x0, x22
	bl	_tda18271_init
	mov	x23, x0
	bl	_tda_fail
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x23
	b	LBB0_9
LBB0_4:
	add	x23, x24, #4
	mov	x0, x23
	bl	_mutex_lock
	ldr	w8, [x24]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.5:
	cmp	w8, #129
	b.ne	LBB0_8
; %bb.6:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_tda18271c1_rf_tracking_filter_calibration
	b	LBB0_8
LBB0_7:
	mov	x0, x22
	mov	x1, x20
	bl	_tda18271c2_rf_tracking_filters_correction
LBB0_8:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_tda18271_channel_configuration
	mov	x19, x0
	mov	x0, x23
	bl	_mutex_unlock
	mov	x0, x19
LBB0_9:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"freq = %d, ifc = %d, bw = %d, agc_mode = %d, std = %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to configure agc\n"

	.no_dead_strip	_tda18271_tune
.subsections_via_symbols
