	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5h1420_tuner_set_params
_s5h1420_tuner_set_params:              ## @s5h1420_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)
	movslq	16(%rdi), %rax
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movzbl	%cl, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	shrl	$8, %ecx
	andl	$127, %ecx
	movl	%ecx, -32(%rbp)
	movl	%edx, -28(%rbp)
	movl	$194, -24(%rbp)
	cmpq	$1449999, %rax                  ## imm = 0x16200F
	jg	LBB0_2
## %bb.1:
	movl	$0, -20(%rbp)
	jmp	LBB0_7
LBB0_2:
	cmpl	$1849999, %eax                  ## imm = 0x1C3A8F
	ja	LBB0_4
## %bb.3:
	movl	$64, -20(%rbp)
	jmp	LBB0_7
LBB0_4:
	cmpl	$1999999, %eax                  ## imm = 0x1E847F
	ja	LBB0_6
## %bb.5:
	movl	$128, -20(%rbp)
	jmp	LBB0_7
LBB0_6:
	movl	$192, -20(%rbp)
LBB0_7:
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	$1, %esi
	callq	*%rax
LBB0_9:
	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_11
## %bb.10:
	addq	$56, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_s5h1420_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 s5h1420_tuner_set_params
lCPI0_0:
	.long	16                              ; 0x10
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_s5h1420_tuner_set_params:              ; @s5h1420_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]
	ldr	x8, [x0, #8]
	ldr	x19, [x8]
	mov	w8, #97
	str	w8, [sp]
	add	x8, sp, #24
	str	x8, [sp, #8]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #16]
	ldrsw	x8, [x0, #16]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x9, x8, x9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	ubfx	w10, w9, #8, #7
	and	w9, w9, #0xff
	stp	w10, w9, [sp, #24]
	mov	w9, #194
	str	w9, [sp, #32]
	mov	w9, #8207
	movk	w9, #22, lsl #16
	cmp	w8, w9
	b.gt	LBB0_2
; %bb.1:
	str	wzr, [sp, #36]
	ldr	x8, [x0]
	cbnz	x8, LBB0_8
	b	LBB0_9
LBB0_2:
	mov	w9, #14991
	movk	w9, #28, lsl #16
	cmp	w8, w9
	b.hi	LBB0_4
; %bb.3:
	mov	w8, #64
	b	LBB0_7
LBB0_4:
	mov	w9, #33919
	movk	w9, #30, lsl #16
	cmp	w8, w9
	b.hi	LBB0_6
; %bb.5:
	mov	w8, #128
	b	LBB0_7
LBB0_6:
	mov	w8, #192
LBB0_7:
	str	w8, [sp, #36]
	ldr	x8, [x0]
	cbz	x8, LBB0_9
LBB0_8:
	mov	w1, #1
	blr	x8
LBB0_9:
	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_11
; %bb.10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
	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	_s5h1420_tuner_set_params
.subsections_via_symbols
