	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_bsrv2_tuner_set_params
_alps_bsrv2_tuner_set_params:           ## @alps_bsrv2_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), %edx
	leal	479500(%rdx), %eax
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$35, %rax
	addl	%ecx, %eax
	movl	$240, %ecx
	cmpl	$2000000, %edx                  ## imm = 0x1E8480
	jg	LBB0_5
## %bb.1:
	movl	$176, %ecx
	cmpl	$1800000, %edx                  ## imm = 0x1B7740
	jg	LBB0_5
## %bb.2:
	movl	$112, %ecx
	cmpl	$1600000, %edx                  ## imm = 0x186A00
	jg	LBB0_5
## %bb.3:
	movl	$48, %ecx
	cmpl	$1200000, %edx                  ## imm = 0x124F80
	jg	LBB0_5
## %bb.4:
	xorl	%ecx, %ecx
	cmpl	$1100000, %edx                  ## imm = 0x10C8E0
	setl	%cl
	shll	$6, %ecx
	addl	$112, %ecx
LBB0_5:
	movl	%eax, %edx
	shrl	$8, %edx
	andl	$127, %edx
	movl	%edx, -32(%rbp)
	movzbl	%al, %edx
	movl	%edx, -28(%rbp)
	shrl	$10, %eax
	andl	$96, %eax
	orl	$149, %eax
	movl	%eax, -24(%rbp)
	movl	%ecx, -20(%rbp)
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	$1, %esi
	callq	*%rax
LBB0_7:
	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_9
## %bb.8:
	addq	$56, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_alps_bsrv2_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_bsrv2_tuner_set_params
lCPI0_0:
	.long	16                              ; 0x10
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_alps_bsrv2_tuner_set_params:           ; @alps_bsrv2_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]
	mov	w9, #97
	add	x10, sp, #24
	ldr	w11, [x0, #16]
	add	w8, w11, #117, lsl #12          ; =479232
	add	w8, w8, #268
	mov	w12, #19923
	movk	w12, #4194, lsl #16
	smull	x12, w8, w12
	ldp	x8, x13, [x0]
	ldr	x19, [x13]
	str	w9, [sp]
	str	x10, [sp, #8]
Lloh3:
	adrp	x9, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [sp, #16]
	lsr	x9, x12, #63
	asr	x10, x12, #35
	add	w9, w10, w9
	mov	w10, #240
	mov	w12, #33920
	movk	w12, #30, lsl #16
	mov	w13, #176
	mov	w14, #30528
	movk	w14, #27, lsl #16
	mov	w15, #112
	mov	w16, #27136
	movk	w16, #24, lsl #16
	mov	w17, #48
	mov	w1, #20352
	movk	w1, #18, lsl #16
	mov	w2, #51423
	movk	w2, #16, lsl #16
	cmp	w11, w2
	csel	w2, w15, w13, gt
	cmp	w11, w1
	csel	w17, w17, w2, gt
	cmp	w11, w16
	csel	w15, w15, w17, gt
	cmp	w11, w14
	csel	w13, w13, w15, gt
	cmp	w11, w12
	csel	w10, w10, w13, gt
	ubfx	w11, w9, #8, #7
	and	w12, w9, #0xff
	stp	w11, w12, [sp, #24]
	lsr	w9, w9, #10
	and	w9, w9, #0x60
	mov	w11, #149
	orr	w9, w9, w11
	stp	w9, w10, [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_bsrv2_tuner_set_params
.subsections_via_symbols
