	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda827xa_set_analog_params
_tda827xa_set_analog_params:            ## @tda827xa_set_analog_params
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rbx
	leaq	-59(%rbp), %rax
	movq	%rax, -96(%rbp)
	movq	$0, -80(%rbp)
	movl	12(%rbx), %eax
	movl	%eax, -72(%rbp)
	movl	(%rsi), %r15d
	callq	_tda827x_set_std
	movq	%r13, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	callq	_tda827xa_lna_gain
	movl	$10, %edi
	callq	_msleep
	movq	8(%r14), %rax
	movq	_V4L2_TUNER_RADIO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	%r15d, %eax
	imulq	$274877907, %rax, %r15          ## imm = 0x10624DD3
	shrq	$38, %r15
LBB0_2:
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	addl	(%rbx), %r15d
	movq	_tda827xa_analog@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r15, %r8
	imull	$62500, %r15d, %ecx             ## imm = 0xF424
	movl	(%rax), %esi
	leaq	24(%rax), %rdx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdi, %rbx
	cmpl	%ecx, %esi
	jge	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	1(%rbx), %rdi
	movl	(%rdx), %esi
	addq	$24, %rdx
	testl	%esi, %esi
	jne	LBB0_3
LBB0_5:
	movl	%ebx, %ecx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	leaq	(,%rcx,8), %rcx
	leaq	(%rcx,%rcx,2), %r12
	movb	4(%rax,%r12), %cl
	movq	%r8, %rdx
	shll	%cl, %edx
	movb	$0, -59(%rbp)
	movb	%dh, -58(%rbp)
	movb	%dl, -57(%rbp)
	movw	$5632, -56(%rbp)                ## imm = 0x1600
	movl	4(%rax,%r12), %ecx
	movl	8(%rax,%r12), %edx
	shll	$5, %ecx
	leal	(%rcx,%rdx,8), %ecx
	addl	12(%rax,%r12), %ecx
	movb	%cl, -54(%rbp)
	movb	16(%rax,%r12), %al
	shlb	$4, %al
	addb	$-117, %al
	movb	%al, -53(%rbp)
	movl	$2098204, -52(%rbp)             ## imm = 0x20041C
	movl	$11, -88(%rbp)
	leaq	-96(%rbp), %r15
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_tuner_transfer
	movl	$14745488, -59(%rbp)            ## imm = 0xE0FF90
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movb	4(%rbx), %al
	addb	%al, %al
	addb	$-103, %al
	movb	%al, -55(%rbp)
	movl	$5, -88(%rbp)
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_tuner_transfer
	movw	$-16224, -59(%rbp)              ## imm = 0xC0A0
	movl	$2, -88(%rbp)
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_tuner_transfer
	movb	$48, -59(%rbp)
	movq	_tda827xa_analog@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	20(%rax,%r12), %al
	addb	$16, %al
	movb	%al, -58(%rbp)
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_tuner_transfer
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_tuner_transfer
	movq	$0, -80(%rbp)
	movb	-58(%rbp), %al
	shrb	$4, %al
	movb	%al, -58(%rbp)
	movzbl	%al, %esi
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	cmpb	$0, -58(%rbp)
	jne	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_tda827xa_lna_gain
LBB0_7:
	movl	$100, %edi
	callq	_msleep
	movw	$15456, -59(%rbp)               ## imm = 0x3C60
	leaq	-96(%rbp), %r15
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_tuner_transfer
	movl	$163, %edi
	callq	_msleep
	movb	$80, -59(%rbp)
	movq	_tda827xa_analog@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rcx,2), %rcx
	movb	16(%rax,%rcx,8), %al
	shlb	$4, %al
	addb	$-113, %al
	movb	%al, -58(%rbp)
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_tuner_transfer
	movw	$10368, -59(%rbp)               ## imm = 0x2880
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_tuner_transfer
	movw	$432, -59(%rbp)                 ## imm = 0x1B0
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_tuner_transfer
	movb	$-64, -59(%rbp)
	movb	4(%rbx), %al
	addb	%al, %al
	addb	$25, %al
	movb	%al, -58(%rbp)
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_tuner_transfer
	movl	(%r14), %eax
	movl	%eax, 8(%rbx)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_TUNER_RADIO,8,3           ## @V4L2_TUNER_RADIO
	.comm	_tda827xa_analog,8,3            ## @tda827xa_analog
	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AGC2 gain is: %d\n"

	.no_dead_strip	_tda827xa_set_analog_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda827xa_set_analog_params
_tda827xa_set_analog_params:            ; @tda827xa_set_analog_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x21, [x0]
	add	x8, sp, #45
	str	x8, [sp, #8]
	str	xzr, [sp, #24]
	ldr	w8, [x21, #12]
	str	w8, [sp, #32]
	ldr	w22, [x1]
	bl	_tda827x_set_std
	mov	x0, x20
	mov	w1, #1
	mov	x2, x19
	bl	_tda827xa_lna_gain
	mov	w0, #10
	bl	_msleep
	mov	x9, #0
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x10, _V4L2_TUNER_RADIO@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_TUNER_RADIO@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	mov	w11, #19923
	movk	w11, #4194, lsl #16
	mul	x11, x22, x11
	lsr	x11, x11, #38
	cmp	x8, x10
	csel	w8, w11, w22, eq
	ldr	w10, [x21]
	add	w8, w8, w10
Lloh6:
	adrp	x22, _tda827xa_analog@GOTPAGE
Lloh7:
	ldr	x22, [x22, _tda827xa_analog@GOTPAGEOFF]
	ldr	x10, [x22]
	mov	w11, #62500
	mul	w11, w8, w11
	mov	x12, x10
	ldr	w14, [x12], #24
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x13, x9
	cmp	w14, w11
	b.ge	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x9, x13, #1
	ldr	w14, [x12], #24
	cbnz	w14, LBB0_1
LBB0_3:
	and	x23, x13, #0xffffffff
	add	x9, x23, w13, uxtw #1
	lsl	x24, x9, #3
	add	x9, x10, x24
	ldr	w10, [x9, #4]
	lsl	w8, w8, w10
	strb	wzr, [sp, #45]
	lsr	w10, w8, #8
	strb	w10, [sp, #46]
	strb	w8, [sp, #47]
	mov	w8, #5632
	sturh	w8, [sp, #48]
	ldp	w8, w10, [x9, #4]
	lsl	w10, w10, #3
	add	w8, w10, w8, lsl #5
	ldr	w10, [x9, #12]
	add	w8, w8, w10
	strb	w8, [sp, #50]
	ldrb	w8, [x9, #16]
	lsl	w8, w8, #4
	sub	w8, w8, #117
	strb	w8, [sp, #51]
	mov	w8, #1052
	movk	w8, #32, lsl #16
	stur	w8, [sp, #52]
	mov	w8, #11
	str	w8, [sp, #16]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_transfer
	mov	w8, #65424
	movk	w8, #224, lsl #16
	stur	w8, [sp, #45]
	ldrb	w8, [x21, #4]
	lsl	w8, w8, #1
	sub	w8, w8, #103
	strb	w8, [sp, #49]
	mov	w8, #5
	str	w8, [sp, #16]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_transfer
	mov	w8, #49312
	sturh	w8, [sp, #45]
	mov	w8, #2
	str	w8, [sp, #16]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_transfer
	mov	w8, #48
	strb	w8, [sp, #45]
	ldr	x8, [x22]
	add	x8, x8, x24
	ldrb	w8, [x8, #20]
	add	w8, w8, #16
	strb	w8, [sp, #46]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_transfer
Lloh8:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_transfer
	str	xzr, [sp, #24]
	ldrb	w8, [sp, #46]
	lsr	w1, w8, #4
	strb	w1, [sp, #46]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	ldrb	w8, [sp, #46]
	cbnz	w8, LBB0_5
; %bb.4:
	mov	x0, x20
	mov	w1, #0
	mov	x2, x19
	bl	_tda827xa_lna_gain
LBB0_5:
	mov	w0, #100
	bl	_msleep
	mov	w8, #15456
	sturh	w8, [sp, #45]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_transfer
	mov	w0, #163
	bl	_msleep
	mov	w8, #80
	strb	w8, [sp, #45]
	ldr	x8, [x22]
	mov	w9, #24
	madd	x8, x23, x9, x8
	ldrb	w8, [x8, #16]
	lsl	w8, w8, #4
	sub	w8, w8, #113
	strb	w8, [sp, #46]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_transfer
	mov	w8, #10368
	sturh	w8, [sp, #45]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_transfer
	mov	w8, #432
	sturh	w8, [sp, #45]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_transfer
	mov	w8, #192
	strb	w8, [sp, #45]
	ldrb	w8, [x21, #4]
	lsl	w8, w8, #1
	add	w8, w8, #25
	strb	w8, [sp, #46]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_transfer
	ldr	w8, [x19]
	str	w8, [x21, #8]
	ldr	x8, [sp, #56]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	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
	add	sp, sp, #128
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_TUNER_RADIO,8,3           ; @V4L2_TUNER_RADIO
	.comm	_tda827xa_analog,8,3            ; @tda827xa_analog
	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AGC2 gain is: %d\n"

	.no_dead_strip	_tda827xa_set_analog_params
.subsections_via_symbols
