	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function philips_tdm1316l_tuner_set_params
_philips_tdm1316l_tuner_set_params:     ## @philips_tdm1316l_tuner_set_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	(%rax), %r14
	leaq	-64(%rbp), %rax
	movq	%rax, -96(%rbp)
	movq	$16, -88(%rbp)
	movl	4(%r14), %eax
	movl	%eax, -80(%rbp)
	movl	(%rsi), %eax
	cmpl	$50869999, %eax                 ## imm = 0x30836EF
	jle	LBB0_20
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	$1, %r12d
	movl	$96, %ecx
	cmpl	$93870000, %eax                 ## imm = 0x59857B0
	jb	LBB0_15
## %bb.2:
	cmpl	$123870000, %eax                ## imm = 0x7621B30
	jae	LBB0_4
LBB0_3:
	movl	$160, %ecx
	jmp	LBB0_15
LBB0_4:
	cmpl	$163870000, %eax                ## imm = 0x9C47530
	jae	LBB0_6
## %bb.5:
	cmpl	$159000000, %eax                ## imm = 0x97A25C0
	movl	$2, %r12d
	sbbl	$0, %r12d
	movl	$192, %ecx
	jmp	LBB0_15
LBB0_6:
	movl	$2, %r12d
	cmpl	$253870000, %eax                ## imm = 0xF21BFB0
	jb	LBB0_15
## %bb.7:
	cmpl	$383870000, %eax                ## imm = 0x16E16430
	jb	LBB0_3
## %bb.9:
	movl	$192, %ecx
	cmpl	$443870000, %eax                ## imm = 0x1A74EB30
	jb	LBB0_15
## %bb.10:
	cmpl	$583870000, %eax                ## imm = 0x22CD2630
	jae	LBB0_12
## %bb.11:
	movl	$96, %ecx
	cmpl	$444000000, %eax                ## imm = 0x1A76E700
	jae	LBB0_14
	jmp	LBB0_15
LBB0_12:
	movl	$160, %ecx
	cmpl	$793870000, %eax                ## imm = 0x2F517EB0
	jb	LBB0_14
## %bb.13:
	movl	$224, %ecx
	cmpl	$858870000, %eax                ## imm = 0x333150F0
	jae	LBB0_20
LBB0_14:
	movl	$4, %r12d
LBB0_15:
	movl	4(%rbx), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	jae	LBB0_20
## %bb.16:
	movslq	%eax, %r13
	leaq	l_switch.table.philips_tdm1316l_tuner_set_params(%rip), %rax
	movl	(%rax,%r13,4), %edx
	movq	%r15, %rdi
	movl	$12, %esi
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	callq	_tda1004x_writereg
	movslq	(%rbx), %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	leal	(%rax,%rax,2), %eax
	addl	%eax, %eax
	addl	$217280, %eax                   ## imm = 0x350C0
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movzbl	%al, %ecx
                                        ## kill: def $eax killed $eax killed $rax
	sarl	$8, %eax
	movl	%eax, -64(%rbp)
	movl	%ecx, -60(%rbp)
	orl	-68(%rbp), %r12d                ## 4-byte Folded Reload
	leaq	l_switch.table.philips_tdm1316l_tuner_set_params.1(%rip), %rax
	orl	(%rax,%r13,4), %r12d
	movl	$202, -56(%rbp)
	movl	%r12d, -52(%rbp)
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	*%rax
LBB0_18:
	leaq	-96(%rbp), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_24
## %bb.19:
	movl	$1, %edi
	callq	_msleep
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_20:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_21:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_25
## %bb.23:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_21
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_philips_tdm1316l_tuner_set_params
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.philips_tdm1316l_tuner_set_params
l_switch.table.philips_tdm1316l_tuner_set_params:
	.long	20                              ## 0x14
	.long	128                             ## 0x80
	.long	20                              ## 0x14

	.p2align	2                               ## @switch.table.philips_tdm1316l_tuner_set_params.1
l_switch.table.philips_tdm1316l_tuner_set_params.1:
	.long	8                               ## 0x8
	.long	0                               ## 0x0
	.long	0                               ## 0x0

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function philips_tdm1316l_tuner_set_params
lCPI0_0:
	.long	16                              ; 0x10
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_philips_tdm1316l_tuner_set_params:     ; @philips_tdm1316l_tuner_set_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x8, [x0, #8]
	ldr	x19, [x8]
	add	x8, sp, #24
	str	x8, [sp]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #8]
	ldr	w8, [x19, #4]
	str	w8, [sp, #16]
	ldr	w8, [x1]
	mov	w9, #14063
	movk	w9, #776, lsl #16
	cmp	w8, w9
	b.le	LBB0_26
; %bb.1:
	mov	x21, x1
	mov	x20, x0
	mov	w9, #22448
	movk	w9, #1432, lsl #16
	cmp	w8, w9
	b.hs	LBB0_3
; %bb.2:
	mov	w23, #1
	mov	w22, #96
	b	LBB0_21
LBB0_3:
	mov	w9, #6960
	movk	w9, #1890, lsl #16
	cmp	w8, w9
	b.hs	LBB0_5
; %bb.4:
	mov	w23, #1
	mov	w22, #160
	b	LBB0_21
LBB0_5:
	mov	w9, #30000
	movk	w9, #2500, lsl #16
	cmp	w8, w9
	b.hs	LBB0_7
; %bb.6:
	mov	w9, #9664
	movk	w9, #2426, lsl #16
	cmp	w8, w9
	mov	w8, #1
	cinc	w23, w8, hs
	mov	w22, #192
	b	LBB0_21
LBB0_7:
	mov	w9, #49072
	movk	w9, #3873, lsl #16
	cmp	w8, w9
	b.hs	LBB0_9
; %bb.8:
	mov	w23, #2
	mov	w22, #96
	b	LBB0_21
LBB0_9:
	mov	w9, #25648
	movk	w9, #5857, lsl #16
	cmp	w8, w9
	b.hs	LBB0_11
; %bb.10:
	mov	w23, #2
	mov	w22, #160
	b	LBB0_21
LBB0_11:
	mov	w9, #60208
	movk	w9, #6772, lsl #16
	cmp	w8, w9
	b.hs	LBB0_13
; %bb.12:
	mov	w23, #2
	mov	w22, #192
	b	LBB0_21
LBB0_13:
	mov	w9, #9776
	movk	w9, #8909, lsl #16
	cmp	w8, w9
	b.hs	LBB0_16
; %bb.14:
	mov	w22, #96
	mov	w9, #59136
	movk	w9, #6774, lsl #16
	cmp	w8, w9
	b.hs	LBB0_20
; %bb.15:
	mov	w23, #2
	b	LBB0_21
LBB0_16:
	mov	w9, #32432
	movk	w9, #12113, lsl #16
	cmp	w8, w9
	b.hs	LBB0_18
; %bb.17:
	mov	w22, #160
	b	LBB0_20
LBB0_18:
	mov	w9, #20720
	movk	w9, #13105, lsl #16
	cmp	w8, w9
	b.hs	LBB0_26
; %bb.19:
	mov	w22, #224
LBB0_20:
	mov	w23, #4
LBB0_21:
	ldr	w8, [x21, #4]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hs	LBB0_26
; %bb.22:
	sbfiz	x8, x8, #2, #32
Lloh5:
	adrp	x9, l_switch.table.philips_tdm1316l_tuner_set_params@PAGE
Lloh6:
	add	x9, x9, l_switch.table.philips_tdm1316l_tuner_set_params@PAGEOFF
	ldr	w2, [x9, x8]
Lloh7:
	adrp	x9, l_switch.table.philips_tdm1316l_tuner_set_params.1@PAGE
Lloh8:
	add	x9, x9, l_switch.table.philips_tdm1316l_tuner_set_params.1@PAGEOFF
	ldr	w24, [x9, x8]
	mov	x0, x20
	mov	w1, #12
	bl	_tda1004x_writereg
	ldrsw	x8, [x21]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x10, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w10
	mov	w10, #6
	mov	w11, #20672
	movk	w11, #3, lsl #16
	madd	w8, w8, w10, w11
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	asr	w9, w8, #8
	and	w8, w8, #0xff
	stp	w9, w8, [sp, #24]
	mov	w8, #202
	orr	w9, w23, w22
	orr	w9, w9, w24
	stp	w8, w9, [sp, #32]
	ldr	x8, [x20]
	cbz	x8, LBB0_24
; %bb.23:
	mov	x0, x20
	mov	w1, #1
	blr	x8
LBB0_24:
	mov	x1, sp
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_30
; %bb.25:
	bl	_msleep
	mov	w0, #0
	b	LBB0_28
LBB0_26:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_28:
	ldr	x8, [sp, #40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_31
; %bb.29:
	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
	add	sp, sp, #112
	ret
LBB0_30:
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_27
LBB0_31:
	bl	___stack_chk_fail
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_philips_tdm1316l_tuner_set_params
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.philips_tdm1316l_tuner_set_params
l_switch.table.philips_tdm1316l_tuner_set_params:
	.long	20                              ; 0x14
	.long	128                             ; 0x80
	.long	20                              ; 0x14

	.p2align	2                               ; @switch.table.philips_tdm1316l_tuner_set_params.1
l_switch.table.philips_tdm1316l_tuner_set_params.1:
	.long	8                               ; 0x8
	.long	0                               ; 0x0
	.long	0                               ; 0x0

.subsections_via_symbols
