	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pctv340e_frontend_attach
_pctv340e_frontend_attach:              ## @pctv340e_frontend_attach
	.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
	movq	8(%rdi), %rax
	movq	16(%rdi), %r15
	movq	8(%rax), %r14
	movq	_dib7000p_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_dvb_attach
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rdi
	movq	_GPIO6@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_GPIO_OUT@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	callq	_dib0700_set_gpio
	movl	$50, %edi
	callq	_msleep
	movq	8(%rbx), %rdi
	movl	(%r12), %esi
	movl	(%r13), %edx
	movl	$1, %ecx
	callq	_dib0700_set_gpio
	movl	$100, %edi
	callq	_msleep
	movq	8(%rbx), %rdi
	movq	_GPIO10@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	(%r13), %edx
	xorl	%ecx, %ecx
	callq	_dib0700_set_gpio
	movl	$1, %edi
	callq	_msleep
	movq	8(%rbx), %rdi
	movl	(%r12), %esi
	movl	(%r13), %edx
	movl	$1, %ecx
	callq	_dib0700_set_gpio
	movq	8(%rbx), %rdi
	movq	_GPIO8@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movl	$1, %ecx
	callq	_dib0700_set_gpio
	movq	8(%rbx), %rdi
	movq	_GPIO2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movl	$1, %ecx
	callq	_dib0700_set_gpio
	movq	8(%rbx), %rdi
	movl	$72, %esi
	movl	$1, %edx
	callq	_dib0700_ctrl_clock
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msleep
	movq	8(%rbx), %rdi
	callq	*(%r15)
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	8(%rbx), %rdi
	movq	_pctv_340e_config@GOTPCREL(%rip), %rdx
	movl	$18, %esi
	callq	*8(%r15)
	movq	(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	$1, (%rcx)
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	subl	(%rcx), %edx
	testq	%rax, %rax
	cmovel	%edx, %r14d
	jmp	LBB0_6
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_5
LBB0_4:
	movl	16(%r15), %edi
	callq	_dvb_detach
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_5:
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dib7000p_attach,4,2            ## @dib7000p_attach
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GPIO6,4,2                      ## @GPIO6
	.comm	_GPIO_OUT,4,2                   ## @GPIO_OUT
	.comm	_GPIO10,4,2                     ## @GPIO10
	.comm	_GPIO8,4,2                      ## @GPIO8
	.comm	_GPIO2,4,2                      ## @GPIO2
	.comm	_pctv_340e_config,4,2           ## @pctv_340e_config
	.no_dead_strip	_pctv340e_frontend_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pctv340e_frontend_attach
_pctv340e_frontend_attach:              ; @pctv340e_frontend_attach
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldp	x8, x20, [x0, #8]
	ldr	x21, [x8, #8]
Lloh0:
	adrp	x8, _dib7000p_attach@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dib7000p_attach@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_dvb_attach
	cbz	w0, LBB0_4
; %bb.1:
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x22, _GPIO6@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GPIO6@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh5:
	adrp	x23, _GPIO_OUT@GOTPAGE
Lloh6:
	ldr	x23, [x23, _GPIO_OUT@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w3, #0
	bl	_dib0700_set_gpio
	mov	w0, #50
	bl	_msleep
	ldr	x0, [x19, #8]
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	w22, #1
	mov	w3, #1
	bl	_dib0700_set_gpio
	mov	w0, #100
	bl	_msleep
	ldr	x0, [x19, #8]
Lloh7:
	adrp	x24, _GPIO10@GOTPAGE
Lloh8:
	ldr	x24, [x24, _GPIO10@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	w2, [x23]
	mov	w3, #0
	bl	_dib0700_set_gpio
	mov	w0, #1
	bl	_msleep
	ldr	x0, [x19, #8]
	ldr	w1, [x24]
	ldr	w2, [x23]
	mov	w3, #1
	bl	_dib0700_set_gpio
	ldr	x0, [x19, #8]
Lloh9:
	adrp	x8, _GPIO8@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GPIO8@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x23]
	mov	w3, #1
	bl	_dib0700_set_gpio
	ldr	x0, [x19, #8]
Lloh12:
	adrp	x8, _GPIO2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GPIO2@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w2, [x23]
	mov	w3, #1
	bl	_dib0700_set_gpio
	ldr	x0, [x19, #8]
	mov	w1, #72
	mov	w2, #1
	bl	_dib0700_ctrl_clock
	mov	w0, #500
	bl	_msleep
	ldr	x8, [x20]
	ldr	x0, [x19, #8]
	blr	x8
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	x0, [x19, #8]
Lloh15:
	adrp	x2, _pctv_340e_config@GOTPAGE
Lloh16:
	ldr	x2, [x2, _pctv_340e_config@GOTPAGEOFF]
	mov	w1, #18
	blr	x8
	ldr	x8, [x19]
	str	x0, [x8]
	str	w22, [x21]
Lloh17:
	adrp	x8, _ENODEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	x0, #0
	csneg	w0, wzr, w8, ne
	b	LBB0_5
LBB0_3:
	ldr	w0, [x20, #16]
	bl	_dvb_detach
LBB0_4:
Lloh20:
	adrp	x8, _ENODEV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_dib7000p_attach,4,2            ; @dib7000p_attach
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GPIO6,4,2                      ; @GPIO6
	.comm	_GPIO_OUT,4,2                   ; @GPIO_OUT
	.comm	_GPIO10,4,2                     ; @GPIO10
	.comm	_GPIO8,4,2                      ; @GPIO8
	.comm	_GPIO2,4,2                      ; @GPIO2
	.comm	_pctv_340e_config,4,2           ; @pctv_340e_config
	.no_dead_strip	_pctv340e_frontend_attach
.subsections_via_symbols
