	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda18271_set_analog_params
_tda18271_set_analog_params:            ## @tda18271_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	%rdi, %r14
	movq	(%rdi), %r13
	movl	8(%rsi), %eax
	movq	_V4L2_TUNER_RADIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	movl	$1, %edx
	movl	$1000, %edi                     ## imm = 0x3E8
	cmovel	%edx, %edi
	imull	(%rsi), %edi
	imull	$125, %edi, %edx
	movl	%edx, %r12d
	shrl	$31, %r12d
	addl	%edx, %r12d
	sarl	%r12d
	movq	_TDA18271_ANALOG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 20(%r13)
	cmpl	%ecx, %eax
	jne	LBB0_2
## %bb.1:
	leaq	52(%r13), %r15
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_17
LBB0_2:
	movl	4(%rsi), %eax
	movq	_V4L2_STD_MN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	leaq	48(%r13), %r15
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_17
LBB0_4:
	movq	_V4L2_STD_B@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	leaq	44(%r13), %r15
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_17
LBB0_6:
	movq	_V4L2_STD_GH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	leaq	40(%r13), %r15
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_17
LBB0_8:
	leaq	24(%r13), %r15
	movq	_V4L2_STD_PAL_I@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_17
LBB0_10:
	movq	_V4L2_STD_DK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:
	leaq	36(%r13), %r15
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_17
LBB0_12:
	movq	_V4L2_STD_SECAM_L@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.13:
	leaq	32(%r13), %r15
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_17
LBB0_14:
	movq	_V4L2_STD_SECAM_LC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
## %bb.15:
	leaq	28(%r13), %r15
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_17
LBB0_16:
	leaq	L_.str.8(%rip), %rsi
LBB0_17:
	leaq	L_.str.9(%rip), %rdi
	callq	_tda_dbg
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	_tda18271_tune
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_tda_fail
	testq	%rax, %rax
	jne	LBB0_19
## %bb.18:
	movl	(%r15), %eax
	movl	%eax, 16(%r13)
	movl	%r12d, (%r13)
	movq	$0, 8(%r13)
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_TUNER_RADIO,4,2           ## @V4L2_TUNER_RADIO
	.comm	_TDA18271_ANALOG,4,2            ## @TDA18271_ANALOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fm"

	.comm	_V4L2_STD_MN,4,2                ## @V4L2_STD_MN
L_.str.1:                               ## @.str.1
	.asciz	"MN"

	.comm	_V4L2_STD_B,4,2                 ## @V4L2_STD_B
L_.str.2:                               ## @.str.2
	.asciz	"B"

	.comm	_V4L2_STD_GH,4,2                ## @V4L2_STD_GH
L_.str.3:                               ## @.str.3
	.asciz	"GH"

	.comm	_V4L2_STD_PAL_I,4,2             ## @V4L2_STD_PAL_I
L_.str.4:                               ## @.str.4
	.asciz	"I"

	.comm	_V4L2_STD_DK,4,2                ## @V4L2_STD_DK
L_.str.5:                               ## @.str.5
	.asciz	"DK"

	.comm	_V4L2_STD_SECAM_L,4,2           ## @V4L2_STD_SECAM_L
L_.str.6:                               ## @.str.6
	.asciz	"L"

	.comm	_V4L2_STD_SECAM_LC,4,2          ## @V4L2_STD_SECAM_LC
L_.str.7:                               ## @.str.7
	.asciz	"L'"

L_.str.8:                               ## @.str.8
	.asciz	"xx"

L_.str.9:                               ## @.str.9
	.asciz	"setting tda18271 to system %s\n"

	.no_dead_strip	_tda18271_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 tda18271_set_analog_params
_tda18271_set_analog_params:            ; @tda18271_set_analog_params
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w8, [x1]
	ldr	w9, [x1, #8]
Lloh0:
	adrp	x10, _V4L2_TUNER_RADIO@GOTPAGE
Lloh1:
	ldr	x10, [x10, _V4L2_TUNER_RADIO@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w9, w10
	mov	w11, #1000
	csinc	w11, w11, wzr, ne
	mul	w8, w8, w11
	mov	w11, #125
	mul	w8, w8, w11
	ldr	x22, [x0]
Lloh3:
	adrp	x11, _TDA18271_ANALOG@GOTPAGE
Lloh4:
	ldr	x11, [x11, _TDA18271_ANALOG@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	str	w11, [x22, #20]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w20, w8, #1
	cmp	w9, w10
	b.ne	LBB0_2
; %bb.1:
	add	x21, x22, #52
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_15
LBB0_2:
	ldr	w8, [x1, #4]
Lloh8:
	adrp	x9, _V4L2_STD_MN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _V4L2_STD_MN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	add	x21, x22, #48
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_4:
Lloh13:
	adrp	x9, _V4L2_STD_B@GOTPAGE
Lloh14:
	ldr	x9, [x9, _V4L2_STD_B@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	add	x21, x22, #44
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_6:
Lloh18:
	adrp	x9, _V4L2_STD_GH@GOTPAGE
Lloh19:
	ldr	x9, [x9, _V4L2_STD_GH@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	add	x21, x22, #40
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_8:
	add	x21, x22, #24
Lloh23:
	adrp	x9, _V4L2_STD_PAL_I@GOTPAGE
Lloh24:
	ldr	x9, [x9, _V4L2_STD_PAL_I@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_15
LBB0_10:
Lloh28:
	adrp	x9, _V4L2_STD_DK@GOTPAGE
Lloh29:
	ldr	x9, [x9, _V4L2_STD_DK@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	add	x21, x22, #36
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_15
LBB0_12:
Lloh33:
	adrp	x9, _V4L2_STD_SECAM_L@GOTPAGE
Lloh34:
	ldr	x9, [x9, _V4L2_STD_SECAM_L@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	add	x21, x22, #32
Lloh36:
	adrp	x1, l_.str.6@PAGE
Lloh37:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh38:
	adrp	x9, _V4L2_STD_SECAM_LC@GOTPAGE
Lloh39:
	ldr	x9, [x9, _V4L2_STD_SECAM_LC@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
Lloh41:
	adrp	x10, l_.str.8@PAGE
Lloh42:
	add	x10, x10, l_.str.8@PAGEOFF
	tst	w9, w8
	add	x8, x22, #28
Lloh43:
	adrp	x9, l_.str.7@PAGE
Lloh44:
	add	x9, x9, l_.str.7@PAGEOFF
	csel	x1, x10, x9, eq
	csel	x21, x21, x8, eq
LBB0_15:
Lloh45:
	adrp	x0, l_.str.9@PAGE
Lloh46:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_tda_dbg
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
	bl	_tda18271_tune
	mov	x19, x0
	bl	_tda_fail
	cbnz	x0, LBB0_17
; %bb.16:
	ldr	w8, [x21]
	str	w8, [x22, #16]
	str	w20, [x22]
	str	xzr, [x22, #8]
LBB0_17:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_TUNER_RADIO,4,2           ; @V4L2_TUNER_RADIO
	.comm	_TDA18271_ANALOG,4,2            ; @TDA18271_ANALOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fm"

	.comm	_V4L2_STD_MN,4,2                ; @V4L2_STD_MN
l_.str.1:                               ; @.str.1
	.asciz	"MN"

	.comm	_V4L2_STD_B,4,2                 ; @V4L2_STD_B
l_.str.2:                               ; @.str.2
	.asciz	"B"

	.comm	_V4L2_STD_GH,4,2                ; @V4L2_STD_GH
l_.str.3:                               ; @.str.3
	.asciz	"GH"

	.comm	_V4L2_STD_PAL_I,4,2             ; @V4L2_STD_PAL_I
l_.str.4:                               ; @.str.4
	.asciz	"I"

	.comm	_V4L2_STD_DK,4,2                ; @V4L2_STD_DK
l_.str.5:                               ; @.str.5
	.asciz	"DK"

	.comm	_V4L2_STD_SECAM_L,4,2           ; @V4L2_STD_SECAM_L
l_.str.6:                               ; @.str.6
	.asciz	"L"

	.comm	_V4L2_STD_SECAM_LC,4,2          ; @V4L2_STD_SECAM_LC
l_.str.7:                               ; @.str.7
	.asciz	"L'"

l_.str.8:                               ; @.str.8
	.asciz	"xx"

l_.str.9:                               ; @.str.9
	.asciz	"setting tda18271 to system %s\n"

	.no_dead_strip	_tda18271_set_analog_params
.subsections_via_symbols
