	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si2165_set_frontend_dvbc
_si2165_set_frontend_dvbc:              ## @si2165_set_frontend_dvbc
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %r14
	cmpl	$0, (%r14)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	testq	%r15, %r15
	je	LBB0_1
## %bb.3:
	movq	%r14, %rdi
	movl	$14, %esi
	callq	_si2165_adjust_pll_divl
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_si2165_set_oversamp
	testl	%eax, %eax
	js	LBB0_10
## %bb.5:
	movl	8(%rbx), %eax
	addl	$-128, %eax
	movl	$11, %edx
	cmpl	$5, %eax
	ja	LBB0_7
## %bb.6:
	cltq
	leaq	l_switch.table.si2165_set_frontend_dvbc(%rip), %rcx
	movl	(%rcx,%rax,4), %edx
LBB0_7:
	movq	_REG_REQ_CONSTELLATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_si2165_writereg8
	testl	%eax, %eax
	js	LBB0_10
## %bb.8:
	movq	_REG_LOCK_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$8000000, %edx                  ## imm = 0x7A1200
	callq	_si2165_writereg32
	testl	%eax, %eax
	js	LBB0_10
## %bb.9:
	movq	_dvbc_regs@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_si2165_write_reg_list
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_REG_REQ_CONSTELLATION,4,2      ## @REG_REQ_CONSTELLATION
	.comm	_REG_LOCK_TIMEOUT,4,2           ## @REG_LOCK_TIMEOUT
	.comm	_dvbc_regs,4,2                  ## @dvbc_regs
	.no_dead_strip	_si2165_set_frontend_dvbc
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.si2165_set_frontend_dvbc
l_switch.table.si2165_set_frontend_dvbc:
	.long	3                               ## 0x3
	.long	9                               ## 0x9
	.long	8                               ## 0x8
	.long	11                              ## 0xb
	.long	7                               ## 0x7
	.long	10                              ## 0xa

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si2165_set_frontend_dvbc
_si2165_set_frontend_dvbc:              ; @si2165_set_frontend_dvbc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x19, [x0, #16]
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	x21, [x0]
	cbz	x21, LBB0_6
; %bb.2:
	mov	x0, x19
	mov	w1, #14
	bl	_si2165_adjust_pll_divl
	tbnz	w0, #31, LBB0_7
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	bl	_si2165_set_oversamp
	tbnz	w0, #31, LBB0_7
; %bb.4:
	ldr	w8, [x20, #8]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_8
; %bb.5:
Lloh0:
	adrp	x9, l_switch.table.si2165_set_frontend_dvbc@PAGE
Lloh1:
	add	x9, x9, l_switch.table.si2165_set_frontend_dvbc@PAGEOFF
	ldr	w2, [x9, w8, sxtw #2]
	b	LBB0_9
LBB0_6:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	w2, #11
LBB0_9:
Lloh5:
	adrp	x8, _REG_REQ_CONSTELLATION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REG_REQ_CONSTELLATION@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_si2165_writereg8
	tbnz	w0, #31, LBB0_7
; %bb.10:
Lloh8:
	adrp	x8, _REG_LOCK_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_LOCK_TIMEOUT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #4608
	movk	w2, #122, lsl #16
	bl	_si2165_writereg32
	tbnz	w0, #31, LBB0_7
; %bb.11:
Lloh11:
	adrp	x8, _dvbc_regs@GOTPAGE
Lloh12:
	ldr	x8, [x8, _dvbc_regs@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x8]
	mov	x0, x20
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_si2165_write_reg_list
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_REG_REQ_CONSTELLATION,4,2      ; @REG_REQ_CONSTELLATION
	.comm	_REG_LOCK_TIMEOUT,4,2           ; @REG_LOCK_TIMEOUT
	.comm	_dvbc_regs,4,2                  ; @dvbc_regs
	.no_dead_strip	_si2165_set_frontend_dvbc
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.si2165_set_frontend_dvbc
l_switch.table.si2165_set_frontend_dvbc:
	.long	3                               ; 0x3
	.long	9                               ; 0x9
	.long	8                               ; 0x8
	.long	11                              ; 0xb
	.long	7                               ; 0x7
	.long	10                              ; 0xa

.subsections_via_symbols
