	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_tdmb7_tuner_set_params
_alps_tdmb7_tuner_set_params:           ## @alps_tdmb7_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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	8(%rdi), %rax
	movq	(%rax), %rbx
	movl	$97, -56(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, -48(%rbp)
	movq	$16, -40(%rbp)
	movl	16(%rdi), %eax
	leal	36166667(%rax), %ecx
	movslq	%ecx, %rcx
	imulq	$1688846483, %rcx, %rcx         ## imm = 0x64A9C093
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$48, %rcx
	addl	%edx, %ecx
	movl	%ecx, %edx
	shrl	$8, %edx
	andl	$127, %edx
	movl	%edx, -32(%rbp)
	movzbl	%cl, %edx
	movl	%edx, -28(%rbp)
	shrl	$10, %ecx
	andl	$96, %ecx
	orl	$133, %ecx
	movl	%ecx, -24(%rbp)
	xorl	%ecx, %ecx
	cmpl	$592000000, %eax                ## imm = 0x23493400
	setge	%cl
	shll	$6, %ecx
	addl	$64, %ecx
	movl	%ecx, -20(%rbp)
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	$1, %esi
	callq	*%rax
LBB0_2:
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%eax, %ecx
	movq	_EIO@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	xorl	%edx, %edx
	cmpl	$1, %ecx
	cmovel	%edx, %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	addq	$56, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_alps_tdmb7_tuner_set_params
.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 alps_tdmb7_tuner_set_params
lCPI0_0:
	.long	16                              ; 0x10
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_alps_tdmb7_tuner_set_params:           ; @alps_tdmb7_tuner_set_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldp	x8, x9, [x0]
	ldr	x19, [x9]
	mov	w9, #97
	str	w9, [sp]
	add	x9, sp, #24
	str	x9, [sp, #8]
Lloh3:
	adrp	x9, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	ldr	w9, [x0, #16]
	mov	w10, #56331
	movk	w10, #551, lsl #16
	add	w10, w9, w10
	mov	w11, #49299
	movk	w11, #25769, lsl #16
	smull	x10, w10, w11
	lsr	x11, x10, #63
	asr	x10, x10, #48
	add	w10, w10, w11
	ubfx	w11, w10, #8, #7
	and	w12, w10, #0xff
	stp	w11, w12, [sp, #24]
	lsr	w10, w10, #10
	and	w10, w10, #0x60
	mov	w11, #133
	orr	w10, w10, w11
	mov	w11, #13312
	movk	w11, #9033, lsl #16
	mov	w12, #128
	mov	w13, #64
	cmp	w9, w11
	csel	w9, w13, w12, lt
	str	d0, [sp, #16]
	stp	w10, w9, [sp, #32]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w1, #1
	blr	x8
LBB0_2:
	mov	x1, sp
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, #1
	csneg	w0, wzr, w8, eq
	ldur	x8, [x29, #-24]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_alps_tdmb7_tuner_set_params
.subsections_via_symbols
