	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_dvb_frontend_init
_pvr2_dvb_frontend_init:                ## @pvr2_dvb_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	24(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r13
	testq	%r13, %r13
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	leaq	24(%rdi), %r14
	movq	_PVR2_CVAL_INPUT_DTV@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %esi
	shll	%cl, %esi
	movq	%r14, %rdi
	callq	_pvr2_channel_limit_inputs
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movq	_PVR2_TRACE_ERROR_LEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pvr2_trace
	jmp	LBB0_25
LBB0_1:
	movq	_PVR2_TRACE_ERROR_LEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pvr2_trace
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_25
LBB0_4:
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r15, %rdi
	callq	*%rax
	testq	%rax, %rax
	je	LBB0_7
LBB0_26:
	movq	_PVR2_TRACE_ERROR_LEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pvr2_trace
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_25
LBB0_5:
	movq	_PVR2_TRACE_ERROR_LEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pvr2_trace
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_21:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pvr2_channel_limit_inputs
	jmp	LBB0_25
LBB0_7:
	movq	16(%r15), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_26
## %bb.8:
	leaq	32(%r15), %r12
	movq	%r12, %rdi
	callq	_dvb_register_frontend
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_PVR2_TRACE_ERROR_LEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_pvr2_trace
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_24
LBB0_10:
	movq	16(%r15), %rax
	movq	(%rax), %rdi
	movq	16(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.11:
	callq	*%rcx
	movq	16(%r15), %rax
	movq	(%rax), %rdi
LBB0_12:
	movq	_PVR2_TRACE_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rdi), %edx
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_pvr2_trace
	movq	_pvr2_dvb_bus_ctrl@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	16(%r15), %rax
	movq	(%rax), %rdx
	movq	%rcx, 8(%rdx)
	movq	8(%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.13:
	movq	%r15, %rdi
	callq	*%rcx
	testq	%rax, %rax
	je	LBB0_14
## %bb.22:
	movq	_PVR2_TRACE_ERROR_LEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_pvr2_trace
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_23
LBB0_14:
	movq	16(%r15), %rax
LBB0_15:
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.16:
	movl	$1, (%rdi)
	movq	(%rax), %rsi
	movl	32(%rsi), %eax
	movl	%eax, 32(%rdi)
	addq	$24, %rdi
	addq	$24, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	16(%r15), %rax
	movq	8(%rax), %rsi
	movq	%r12, %rdi
	callq	_dvb_register_frontend
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	_PVR2_TRACE_ERROR_LEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_pvr2_trace
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	16(%r15), %rax
	movq	8(%rax), %rdi
	callq	_dvb_frontend_detach
	movq	16(%r15), %rax
	movq	$0, 8(%rax)
LBB0_23:
	movq	16(%r15), %rax
	movq	(%rax), %rdi
	callq	_dvb_unregister_frontend
LBB0_24:
	negl	%ebx
	movq	16(%r15), %rax
	movq	(%rax), %rdi
	callq	_dvb_frontend_detach
	movq	16(%r15), %rax
	movq	$0, (%rax)
	movl	8(%r15), %edi
	callq	_dvb_module_release
	movq	(%r15), %rax
	movl	4(%rax), %edi
	callq	_dvb_module_release
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_dvb_module_release
LBB0_25:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movl	$1, 32(%r15)
	movq	16(%r15), %rax
	movq	8(%rax), %rdi
	movq	16(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.19:
	callq	*%rcx
	movq	16(%r15), %rax
	movq	8(%rax), %rdi
LBB0_20:
	movq	_PVR2_TRACE_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rdi), %edx
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_pvr2_trace
	movq	_pvr2_dvb_bus_ctrl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%r15), %rcx
	movq	8(%rcx), %rcx
	movq	%rax, 8(%rcx)
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_PVR2_TRACE_ERROR_LEGS,4,2      ## @PVR2_TRACE_ERROR_LEGS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fe_props not defined!"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PVR2_CVAL_INPUT_DTV,4,2        ## @PVR2_CVAL_INPUT_DTV
L_.str.1:                               ## @.str.1
	.asciz	"failed to grab control of dtv input (code=%d)"

L_.str.2:                               ## @.str.2
	.asciz	"frontend_attach not defined!"

L_.str.3:                               ## @.str.3
	.asciz	"frontend registration failed!"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_PVR2_TRACE_INFO,4,2            ## @PVR2_TRACE_INFO
L_.str.4:                               ## @.str.4
	.asciz	"transferring fe[%d] ts_bus_ctrl() to pvr2_dvb_bus_ctrl()"

	.comm	_pvr2_dvb_bus_ctrl,8,3          ## @pvr2_dvb_bus_ctrl
L_.str.5:                               ## @.str.5
	.asciz	"no frontend was attached!"

L_.str.6:                               ## @.str.6
	.asciz	"tuner attach failed"

	.no_dead_strip	_pvr2_dvb_frontend_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_dvb_frontend_init
_pvr2_dvb_frontend_init:                ; @pvr2_dvb_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	x20, x0
	ldr	x8, [x20, #24]!
	ldr	x8, [x8]
	ldr	x24, [x8]
	cbz	x24, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _PVR2_CVAL_INPUT_DTV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PVR2_CVAL_INPUT_DTV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w1, w9, w8
	mov	x0, x20
	bl	_pvr2_channel_limit_inputs
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
Lloh3:
	adrp	x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	str	x21, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_pvr2_trace
	b	LBB0_8
LBB0_3:
Lloh8:
	adrp	x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_pvr2_trace
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	ldr	x8, [x24]
	cbz	x8, LBB0_9
; %bb.5:
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_11
LBB0_6:
Lloh15:
	adrp	x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_pvr2_trace
Lloh20:
	adrp	x8, _ENODEV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	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_9:
Lloh22:
	adrp	x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_pvr2_trace
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x20
	mov	w1, #0
	bl	_pvr2_channel_limit_inputs
	b	LBB0_8
LBB0_11:
	ldr	x8, [x19, #16]
	ldr	x1, [x8]
	cbz	x1, LBB0_6
; %bb.12:
	add	x21, x19, #32
	mov	x0, x21
	bl	_dvb_register_frontend
	cbz	x0, LBB0_14
; %bb.13:
Lloh30:
	adrp	x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_pvr2_trace
Lloh35:
	adrp	x8, _ENODEV@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh37:
	ldr	w20, [x8]
	b	LBB0_24
LBB0_14:
	ldr	x8, [x19, #16]
	ldr	x0, [x8]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_16
; %bb.15:
	blr	x8
	ldr	x8, [x19, #16]
	ldr	x0, [x8]
LBB0_16:
Lloh38:
	adrp	x22, _PVR2_TRACE_INFO@GOTPAGE
Lloh39:
	ldr	x22, [x22, _PVR2_TRACE_INFO@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [x0]
	str	x9, [sp]
Lloh40:
	adrp	x1, l_.str.4@PAGE
Lloh41:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x8
	bl	_pvr2_trace
Lloh42:
	adrp	x23, _pvr2_dvb_bus_ctrl@GOTPAGE
Lloh43:
	ldr	x23, [x23, _pvr2_dvb_bus_ctrl@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	x8, [x19, #16]
	ldr	x10, [x8]
	str	x9, [x10, #8]
	ldr	x9, [x24, #8]
	cbz	x9, LBB0_20
; %bb.17:
	mov	x0, x19
	blr	x9
	cbz	x0, LBB0_19
; %bb.18:
Lloh44:
	adrp	x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGE
Lloh45:
	ldr	x8, [x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
Lloh47:
	adrp	x1, l_.str.6@PAGE
Lloh48:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_pvr2_trace
Lloh49:
	adrp	x8, _ENODEV@GOTPAGE
Lloh50:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh51:
	ldr	w20, [x8]
	b	LBB0_23
LBB0_19:
	ldr	x8, [x19, #16]
LBB0_20:
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_25
; %bb.21:
	mov	w24, #1
	str	w24, [x9]
	ldr	x8, [x8]
	ldr	w10, [x8, #32]
	str	w10, [x9, #32]
	add	x0, x9, #24
	add	x1, x8, #24
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x19, #16]
	ldr	x1, [x8, #8]
	mov	x0, x21
	bl	_dvb_register_frontend
	cbz	x0, LBB0_26
; %bb.22:
Lloh52:
	adrp	x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGE
Lloh53:
	ldr	x8, [x8, _PVR2_TRACE_ERROR_LEGS@GOTPAGEOFF]
Lloh54:
	ldr	w0, [x8]
Lloh55:
	adrp	x1, l_.str.3@PAGE
Lloh56:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_pvr2_trace
Lloh57:
	adrp	x8, _ENODEV@GOTPAGE
Lloh58:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh59:
	ldr	w20, [x8]
	ldr	x8, [x19, #16]
	ldr	x0, [x8, #8]
	bl	_dvb_frontend_detach
	ldr	x8, [x19, #16]
	str	xzr, [x8, #8]
LBB0_23:
	ldr	x8, [x19, #16]
	ldr	x0, [x8]
	bl	_dvb_unregister_frontend
LBB0_24:
	neg	w21, w20
	ldr	x8, [x19, #16]
	ldr	x0, [x8]
	bl	_dvb_frontend_detach
	ldr	x8, [x19, #16]
	str	xzr, [x8]
	ldr	w0, [x19, #8]
	bl	_dvb_module_release
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
	bl	_dvb_module_release
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_dvb_module_release
	b	LBB0_8
LBB0_25:
	mov	w21, #0
	b	LBB0_10
LBB0_26:
	str	w24, [x19, #32]
	ldr	x8, [x19, #16]
	ldr	x0, [x8, #8]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_28
; %bb.27:
	blr	x8
	ldr	x8, [x19, #16]
	ldr	x0, [x8, #8]
LBB0_28:
	ldr	w8, [x22]
	ldr	w9, [x0]
	str	x9, [sp]
Lloh60:
	adrp	x1, l_.str.4@PAGE
Lloh61:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x8
	bl	_pvr2_trace
	mov	w21, #0
	ldr	x8, [x23]
	ldr	x9, [x19, #16]
	ldr	x9, [x9, #8]
	str	x8, [x9, #8]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh60, Lloh61
	.cfi_endproc
                                        ; -- End function
	.comm	_PVR2_TRACE_ERROR_LEGS,4,2      ; @PVR2_TRACE_ERROR_LEGS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fe_props not defined!"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PVR2_CVAL_INPUT_DTV,4,2        ; @PVR2_CVAL_INPUT_DTV
l_.str.1:                               ; @.str.1
	.asciz	"failed to grab control of dtv input (code=%d)"

l_.str.2:                               ; @.str.2
	.asciz	"frontend_attach not defined!"

l_.str.3:                               ; @.str.3
	.asciz	"frontend registration failed!"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_PVR2_TRACE_INFO,4,2            ; @PVR2_TRACE_INFO
l_.str.4:                               ; @.str.4
	.asciz	"transferring fe[%d] ts_bus_ctrl() to pvr2_dvb_bus_ctrl()"

	.comm	_pvr2_dvb_bus_ctrl,8,3          ; @pvr2_dvb_bus_ctrl
l_.str.5:                               ; @.str.5
	.asciz	"no frontend was attached!"

l_.str.6:                               ; @.str.6
	.asciz	"tuner attach failed"

	.no_dead_strip	_pvr2_dvb_frontend_init
.subsections_via_symbols
