	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function attach_xc3028
_attach_xc3028:                         ## @attach_xc3028
	.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	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	leaq	-40(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	leaq	16(%r14), %rax
	movq	%rax, -32(%rbp)
	movl	%r15d, -40(%rbp)
	movq	8(%r14), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.1:
	movq	_xc2028_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-40(%rbp), %rdx
	callq	_dvb_attach
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_em28xx_info
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_em28xx_errdev
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_em28xx_errdev
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	callq	_dvb_frontend_detach
	movq	8(%r14), %rax
	movq	$0, (%rax)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_5:
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/2: dvb frontend not attached. Can't attach xc3028\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_xc2028_attach,4,2              ## @xc2028_attach
L_.str.1:                               ## @.str.1
	.asciz	"/2: xc3028 attach failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s/2: xc3028 attached\n"

	.no_dead_strip	_attach_xc3028
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function attach_xc3028
_attach_xc3028:                         ; @attach_xc3028
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	add	x8, x19, #16
	str	x8, [sp, #8]
	str	w20, [sp]
	ldr	x8, [x19, #8]
	ldr	x1, [x8]
	cbz	x1, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _xc2028_attach@GOTPAGE
Lloh1:
	ldr	x8, [x8, _xc2028_attach@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x2, sp
	bl	_dvb_attach
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w1, [x19]
Lloh3:
	adrp	x0, l_.str.2@PAGE
Lloh4:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_em28xx_info
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_em28xx_errdev
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_em28xx_errdev
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	bl	_dvb_frontend_detach
	ldr	x8, [x19, #8]
	str	xzr, [x8]
LBB0_5:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/2: dvb frontend not attached. Can't attach xc3028\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_xc2028_attach,4,2              ; @xc2028_attach
l_.str.1:                               ; @.str.1
	.asciz	"/2: xc3028 attach failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s/2: xc3028 attached\n"

	.no_dead_strip	_attach_xc3028
.subsections_via_symbols
