	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt2063_set_analog_params
_mt2063_set_analog_params:              ## @mt2063_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
	pushq	%rax
	.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, %rbx
	movq	(%rdi), %r13
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_dprintk
	cmpl	$0, 16(%r13)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_mt2063_init
	testl	%eax, %eax
	js	LBB0_13
LBB0_2:
	movl	(%r14), %eax
	cmpl	$129, %eax
	je	LBB0_5
## %bb.3:
	cmpl	$128, %eax
	jne	LBB0_10
## %bb.4:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_MT2063_OFFAIR_ANALOG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8000000, %r12d                 ## imm = 0x7A1200
	movl	$-4000000, %r14d                ## imm = 0xFFC2F700
	jmp	LBB0_7
LBB0_5:
	movq	_MT2063_CABLE_ANALOG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r14), %eax
	movq	_V4L2_STD_MN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	movl	$6000000, %r12d                 ## imm = 0x5B8D80
	movl	$-1250000, %r14d                ## imm = 0xFFECED30
	testl	%ecx, %eax
	jne	LBB0_7
## %bb.6:
	movq	_V4L2_STD_PAL_G@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movl	$8000000, %eax                  ## imm = 0x7A1200
	movl	$7000000, %r12d                 ## imm = 0x6ACFC0
	cmovel	%eax, %r12d
LBB0_7:
	movl	%r12d, %r15d
	shrl	%r15d
	addl	%r14d, %r15d
	movl	$38900000, %eax                 ## imm = 0x2519120
	subl	%r15d, %eax
	movl	$125000, 4(%r13)                ## imm = 0x1E848
	movl	%eax, 8(%r13)
	leal	750000(%r12), %eax
	movl	%eax, 12(%r13)
	movq	%r13, %rdi
	callq	_MT2063_SetReceiverMode
	testl	%eax, %eax
	js	LBB0_13
## %bb.8:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	$1, %edi
	movl	%r12d, %ecx
	movl	%r14d, %r8d
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_dprintk
	addl	8(%r14), %r15d
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_MT2063_Tune
	testl	%eax, %eax
	js	LBB0_13
## %bb.9:
	movl	8(%r14), %eax
	movl	%eax, (%r13)
	jmp	LBB0_14
LBB0_13:
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %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	"\n"

	.comm	_MT2063_OFFAIR_ANALOG,4,2       ## @MT2063_OFFAIR_ANALOG
	.comm	_MT2063_CABLE_ANALOG,4,2        ## @MT2063_CABLE_ANALOG
	.comm	_V4L2_STD_MN,4,2                ## @V4L2_STD_MN
	.comm	_V4L2_STD_PAL_G,4,2             ## @V4L2_STD_PAL_G
	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Tuning to frequency: %d, bandwidth %d, foffset %d\n"

	.no_dead_strip	_mt2063_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 mt2063_set_analog_params
_mt2063_set_analog_params:              ; @mt2063_set_analog_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_dprintk
	ldr	w8, [x20, #16]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_mt2063_init
	tbnz	w0, #31, LBB0_12
LBB0_2:
	ldr	w8, [x19]
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.3:
	cmp	w8, #128
	b.ne	LBB0_7
; %bb.4:
	mov	w22, #4608
	movk	w22, #122, lsl #16
Lloh2:
	adrp	x8, _MT2063_OFFAIR_ANALOG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MT2063_OFFAIR_ANALOG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w21, #63232
	movk	w21, #65474, lsl #16
	b	LBB0_9
LBB0_5:
	mov	w21, #60720
	movk	w21, #65516, lsl #16
Lloh5:
	adrp	x8, _MT2063_CABLE_ANALOG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MT2063_CABLE_ANALOG@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w8, [x19, #4]
Lloh8:
	adrp	x9, _V4L2_STD_MN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _V4L2_STD_MN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	bics	wzr, w8, w9
	b.eq	LBB0_8
; %bb.6:
	mov	w22, #36224
	movk	w22, #91, lsl #16
	b	LBB0_9
LBB0_7:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_8:
Lloh14:
	adrp	x9, _V4L2_STD_PAL_G@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V4L2_STD_PAL_G@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #53184
	movk	w8, #106, lsl #16
	mov	w9, #4608
	movk	w9, #122, lsl #16
	csel	w22, w9, w8, eq
LBB0_9:
	add	w23, w21, w22, lsr #1
	mov	w8, #37152
	movk	w8, #593, lsl #16
	sub	w8, w8, w23
	mov	w9, #59464
	movk	w9, #1, lsl #16
	stp	w9, w8, [x20, #4]
	add	w8, w22, #183, lsl #12          ; =749568
	add	w8, w8, #432
	str	w8, [x20, #12]
	mov	x0, x20
	bl	_MT2063_SetReceiverMode
	tbnz	w0, #31, LBB0_12
; %bb.10:
	ldr	w8, [x19, #8]
	stp	x22, x21, [sp, #8]
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_dprintk
	ldr	w8, [x19, #8]
	add	w1, w8, w23
	mov	x0, x20
	bl	_MT2063_Tune
	tbnz	w0, #31, LBB0_12
; %bb.11:
	mov	w0, #0
	ldr	w8, [x19, #8]
	str	w8, [x20]
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_MT2063_OFFAIR_ANALOG,4,2       ; @MT2063_OFFAIR_ANALOG
	.comm	_MT2063_CABLE_ANALOG,4,2        ; @MT2063_CABLE_ANALOG
	.comm	_V4L2_STD_MN,4,2                ; @V4L2_STD_MN
	.comm	_V4L2_STD_PAL_G,4,2             ; @V4L2_STD_PAL_G
	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Tuning to frequency: %d, bandwidth %d, foffset %d\n"

	.no_dead_strip	_mt2063_set_analog_params
.subsections_via_symbols
