	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vp702x_frontend_attach
_vp702x_frontend_attach:                ## @vp702x_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movw	$0, -40(%rbp)
	movq	$0, -48(%rbp)
	movl	(%rdi), %edi
	movq	_SET_TUNER_POWER_REQ@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	movl	$7, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_vp702x_usb_out_op
	movl	(%rbx), %edi
	movq	_GET_SYSTEM_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$10, (%rsp)
	leaq	-48(%rbp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$10, %r9d
	callq	_vp702x_usb_inout_cmd
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	movb	$0, -39(%rbp)
	leaq	-47(%rbp), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_info
	movq	%rbx, %rdi
	callq	_vp702x_init_pid_filter
	movl	(%rbx), %edi
	callq	_vp702x_fe_attach
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	(%rbx), %edi
	movl	(%r15), %esi
	movl	$1, %edx
	movl	$7, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_vp702x_usb_out_op
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SET_TUNER_POWER_REQ,4,2        ## @SET_TUNER_POWER_REQ
	.comm	_GET_SYSTEM_STRING,4,2          ## @GET_SYSTEM_STRING
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"system string: %s"

	.no_dead_strip	_vp702x_frontend_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vp702x_frontend_attach
_vp702x_frontend_attach:                ; @vp702x_frontend_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	strh	wzr, [sp, #16]
	str	xzr, [sp, #8]
	ldr	w0, [x0]
Lloh3:
	adrp	x20, _SET_TUNER_POWER_REQ@GOTPAGE
Lloh4:
	ldr	x20, [x20, _SET_TUNER_POWER_REQ@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w2, #0
	mov	w3, #7
	mov	x4, #0
	mov	w5, #0
	bl	_vp702x_usb_out_op
	ldr	w0, [x19]
Lloh5:
	adrp	x8, _GET_SYSTEM_STRING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GET_SYSTEM_STRING@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x21, sp, #8
	add	x4, sp, #8
	mov	x2, #0
	mov	w3, #0
	mov	w5, #10
	mov	w6, #10
	bl	_vp702x_usb_inout_cmd
	cbz	x0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	strb	wzr, [sp, #17]
	orr	x1, x21, #0x1
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_info
	mov	x0, x19
	bl	_vp702x_init_pid_filter
	ldr	w0, [x19]
	bl	_vp702x_fe_attach
	ldr	x8, [x19, #8]
	str	w0, [x8]
	ldr	w0, [x19]
	ldr	w1, [x20]
	mov	w2, #1
	mov	w3, #7
	mov	x4, #0
	mov	w5, #0
	bl	_vp702x_usb_out_op
	mov	w0, #0
LBB0_3:
	ldr	x8, [sp, #24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	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
	add	sp, sp, #80
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_SET_TUNER_POWER_REQ,4,2        ; @SET_TUNER_POWER_REQ
	.comm	_GET_SYSTEM_STRING,4,2          ; @GET_SYSTEM_STRING
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"system string: %s"

	.no_dead_strip	_vp702x_frontend_attach
.subsections_via_symbols
