	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vp2040_frontend_init
_vp2040_frontend_init:                  ## @vp2040_frontend_init
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	8(%rdi), %r15
	movq	_POWER_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mantis_frontend_power
	testl	%eax, %eax
	je	LBB0_1
## %bb.6:
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	(%r15), %ecx
	leaq	L_.str.4(%rip), %rdx
	xorl	%r14d, %r14d
	movl	$1, %esi
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_7
LBB0_1:
	movq	%rbx, %rdi
	callq	_mantis_frontend_soft_reset
	movl	$250, %edi
	callq	_msleep
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	xorl	%r14d, %r14d
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_tda10021_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_read_pwm
	movq	_vp2040_tda1002x_cu1216_config@GOTPCREL(%rip), %r12
	movl	%r13d, %edi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_dvb_attach
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %r13
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_5
LBB0_3:
	movq	_tda10023_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_read_pwm
	movq	_vp2040_tda10023_cu1216_config@GOTPCREL(%rip), %rsi
	movl	%r13d, %edi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_dvb_attach
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	%rax, %r13
	leaq	L_.str.2(%rip), %rdx
LBB0_5:
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	(%r12), %ecx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_tda1002x_cu1216_tuner_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rdx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	%r13, (%rbx)
	movq	_MANTIS_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rdx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	$-1, %r14d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_POWER_ON,4,2                   ## @POWER_ON
	.comm	_MANTIS_ERROR,4,2               ## @MANTIS_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Probing for CU1216 (DVB-C)"

	.comm	_tda10021_attach,4,2            ## @tda10021_attach
	.comm	_vp2040_tda1002x_cu1216_config,4,2 ## @vp2040_tda1002x_cu1216_config
L_.str.1:                               ## @.str.1
	.asciz	"found Philips CU1216 DVB-C frontend (TDA10021) @ 0x%02x"

	.comm	_tda10023_attach,4,2            ## @tda10023_attach
	.comm	_vp2040_tda10023_cu1216_config,4,2 ## @vp2040_tda10023_cu1216_config
L_.str.2:                               ## @.str.2
	.asciz	"found Philips CU1216 DVB-C frontend (TDA10023) @ 0x%02x"

	.comm	_tda1002x_cu1216_tuner_set,4,2  ## @tda1002x_cu1216_tuner_set
L_.str.3:                               ## @.str.3
	.asciz	"Mantis DVB-C Philips CU1216 frontend attach success"

L_.str.4:                               ## @.str.4
	.asciz	"Frontend on <%s> POWER ON failed! <%d>"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_MANTIS_DEBUG,4,2               ## @MANTIS_DEBUG
L_.str.5:                               ## @.str.5
	.asciz	"Done!"

	.no_dead_strip	_vp2040_frontend_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vp2040_frontend_init
_vp2040_frontend_init:                  ; @vp2040_frontend_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	add	x20, x0, #8
Lloh0:
	adrp	x8, _POWER_ON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POWER_ON@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_mantis_frontend_power
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MANTIS_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MANTIS_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x20]
	stp	x9, x0, [sp]
Lloh6:
	adrp	x2, l_.str.4@PAGE
Lloh7:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x8
	mov	w1, #1
	bl	_dprintk
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	mov	x0, x19
	bl	_mantis_frontend_soft_reset
	mov	w0, #250
	bl	_msleep
Lloh11:
	adrp	x23, _MANTIS_ERROR@GOTPAGE
Lloh12:
	ldr	x23, [x23, _MANTIS_ERROR@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh13:
	adrp	x2, l_.str@PAGE
Lloh14:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
Lloh15:
	adrp	x8, _tda10021_attach@GOTPAGE
Lloh16:
	ldr	x8, [x8, _tda10021_attach@GOTPAGEOFF]
Lloh17:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_read_pwm
	mov	x3, x0
Lloh18:
	adrp	x21, _vp2040_tda1002x_cu1216_config@GOTPAGE
Lloh19:
	ldr	x21, [x21, _vp2040_tda1002x_cu1216_config@GOTPAGEOFF]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_dvb_attach
	cbz	x0, LBB0_4
; %bb.3:
	mov	x22, x0
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh22:
	adrp	x8, _tda10023_attach@GOTPAGE
Lloh23:
	ldr	x8, [x8, _tda10023_attach@GOTPAGEOFF]
Lloh24:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_read_pwm
	mov	x3, x0
Lloh25:
	adrp	x1, _vp2040_tda10023_cu1216_config@GOTPAGE
Lloh26:
	ldr	x1, [x1, _vp2040_tda10023_cu1216_config@GOTPAGEOFF]
	mov	x0, x22
	mov	x2, x20
	bl	_dvb_attach
	cbz	x0, LBB0_8
; %bb.5:
	mov	x22, x0
Lloh27:
	adrp	x2, l_.str.2@PAGE
Lloh28:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_6:
	ldr	w0, [x23]
	ldr	w8, [x21]
	str	x8, [sp]
	mov	w1, #1
	bl	_dprintk
Lloh29:
	adrp	x8, _tda1002x_cu1216_tuner_set@GOTPAGE
Lloh30:
	ldr	x8, [x8, _tda1002x_cu1216_tuner_set@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	str	w8, [x22]
	ldr	w0, [x23]
Lloh32:
	adrp	x2, l_.str.3@PAGE
Lloh33:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	str	x22, [x19]
Lloh34:
	adrp	x8, _MANTIS_DEBUG@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MANTIS_DEBUG@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x2, l_.str.5@PAGE
Lloh38:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	mov	w0, #-1
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_POWER_ON,4,2                   ; @POWER_ON
	.comm	_MANTIS_ERROR,4,2               ; @MANTIS_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Probing for CU1216 (DVB-C)"

	.comm	_tda10021_attach,4,2            ; @tda10021_attach
	.comm	_vp2040_tda1002x_cu1216_config,4,2 ; @vp2040_tda1002x_cu1216_config
l_.str.1:                               ; @.str.1
	.asciz	"found Philips CU1216 DVB-C frontend (TDA10021) @ 0x%02x"

	.comm	_tda10023_attach,4,2            ; @tda10023_attach
	.comm	_vp2040_tda10023_cu1216_config,4,2 ; @vp2040_tda10023_cu1216_config
l_.str.2:                               ; @.str.2
	.asciz	"found Philips CU1216 DVB-C frontend (TDA10023) @ 0x%02x"

	.comm	_tda1002x_cu1216_tuner_set,4,2  ; @tda1002x_cu1216_tuner_set
l_.str.3:                               ; @.str.3
	.asciz	"Mantis DVB-C Philips CU1216 frontend attach success"

l_.str.4:                               ; @.str.4
	.asciz	"Frontend on <%s> POWER ON failed! <%d>"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_MANTIS_DEBUG,4,2               ; @MANTIS_DEBUG
l_.str.5:                               ; @.str.5
	.asciz	"Done!"

	.no_dead_strip	_vp2040_frontend_init
.subsections_via_symbols
