	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function philips_su1278_tt_tuner_set_params
_philips_su1278_tt_tuner_set_params:    ## @philips_su1278_tt_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	$96, -56(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, -48(%rbp)
	movq	$16, -40(%rbp)
	movl	16(%rdi), %eax
	leal	-2150001(%rax), %ecx
	cmpl	$-1200002, %ecx                 ## imm = 0xFFEDB07E
	ja	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_2:
	leal	499(%rax), %ecx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$37, %rdx
	movq	%rcx, %rsi
	shrq	$45, %rsi
	movl	%esi, -32(%rbp)
	movzbl	%dl, %edx
	movl	%edx, -28(%rbp)
	shrq	$47, %rcx
	andl	$96, %ecx
	orl	$130, %ecx
	movl	%ecx, -24(%rbp)
	xorl	%ecx, %ecx
	cmpl	$4000000, 20(%rdi)              ## imm = 0x3D0900
	setl	%cl
	orl	$32, %ecx
	movl	%ecx, -20(%rbp)
	cmpl	$1250000, %eax                  ## imm = 0x1312D0
	jb	LBB0_7
## %bb.3:
	movl	$64, %edx
	cmpl	$1550000, %eax                  ## imm = 0x17A6B0
	jb	LBB0_6
## %bb.4:
	movl	$128, %edx
	cmpl	$2050000, %eax                  ## imm = 0x1F47D0
	jb	LBB0_6
## %bb.5:
	movl	$192, %edx
	cmpl	$2149999, %eax                  ## imm = 0x20CE6F
	ja	LBB0_7
LBB0_6:
	orl	%edx, %ecx
	movl	%ecx, -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
	xorl	%eax, %eax
	cmpl	$1, %ecx
	je	LBB0_12
## %bb.10:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_11:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	addq	$56, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_philips_su1278_tt_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 philips_su1278_tt_tuner_set_params
lCPI0_0:
	.long	16                              ; 0x10
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_philips_su1278_tt_tuner_set_params:    ; @philips_su1278_tt_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, #96
	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]
	ldr	w8, [x0, #16]
	sub	w9, w8, #524, lsl #12           ; =2146304
	sub	w9, w9, #3697
	mov	w10, #45182
	movk	w10, #65517, lsl #16
	cmp	w9, w10
	b.hi	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_15
LBB0_2:
	add	w9, w8, #499
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	umull	x9, w9, w10
	ldr	w10, [x0, #20]
	mov	w11, #2304
	movk	w11, #61, lsl #16
	cmp	w10, w11
	lsr	x10, x9, #45
	ubfx	x11, x9, #37, #8
	stp	w10, w11, [sp, #24]
	lsr	x9, x9, #47
	and	w9, w9, #0x60
	mov	w10, #130
	orr	w10, w9, w10
	mov	w9, #32
	cinc	w9, w9, lt
	stp	w10, w9, [sp, #32]
	mov	w10, #4816
	movk	w10, #19, lsl #16
	cmp	w8, w10
	b.lo	LBB0_10
; %bb.3:
	mov	w10, #42672
	movk	w10, #23, lsl #16
	cmp	w8, w10
	b.hs	LBB0_5
; %bb.4:
	mov	w8, #64
	b	LBB0_9
LBB0_5:
	mov	w10, #18384
	movk	w10, #31, lsl #16
	cmp	w8, w10
	b.hs	LBB0_7
; %bb.6:
	mov	w8, #128
	b	LBB0_9
LBB0_7:
	mov	w10, #52847
	movk	w10, #32, lsl #16
	cmp	w8, w10
	b.hi	LBB0_10
; %bb.8:
	mov	w8, #192
LBB0_9:
	orr	w8, w9, w8
	str	w8, [sp, #36]
LBB0_10:
	ldr	x8, [x0]
	cbz	x8, LBB0_12
; %bb.11:
	mov	w1, #1
	blr	x8
LBB0_12:
	mov	x1, sp
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_14
; %bb.13:
	mov	w0, #0
	b	LBB0_16
LBB0_14:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	ldur	x8, [x29, #-24]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_philips_su1278_tt_tuner_set_params
.subsections_via_symbols
