	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxusb_mygica_d689_frontend_attach
_cxusb_mygica_d689_frontend_attach:     ## @cxusb_mygica_d689_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movl	24(%r12), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_usb_set_interface
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_err
LBB0_2:
	movl	16(%r12), %esi
	movl	24(%r12), %ebx
	movl	%ebx, %edi
	callq	_usb_sndbulkpipe
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_usb_clear_halt
	movl	16(%r12), %esi
	movl	24(%r12), %ebx
	movl	%ebx, %edi
	callq	_usb_rcvbulkpipe
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_usb_clear_halt
	movl	24(%r12), %ebx
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_usb_rcvbulkpipe
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_usb_clear_halt
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	movl	$7, %esi
	xorl	%edx, %edx
	callq	_cxusb_d680_dmb_gpio_tuner
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movl	$100, %edi
	callq	_msleep
	movq	%r12, %rdi
	movl	$7, %esi
	movl	$1, %edx
	callq	_cxusb_d680_dmb_gpio_tuner
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movl	$100, %edi
	callq	_msleep
	movq	_atbm8830_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mygica_d689_atbm8830_cfg@GOTPCREL(%rip), %rsi
	movq	%r12, %rdx
	callq	_dvb_attach
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	callq	_err
LBB0_7:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
LBB0_8:
	subl	(%rax), %r15d
LBB0_9:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set interface failed"

L_.str.1:                               ## @.str.1
	.asciz	"clear tuner gpio failed"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"set tuner gpio failed"

	.comm	_atbm8830_attach,4,2            ## @atbm8830_attach
	.comm	_mygica_d689_atbm8830_cfg,4,2   ## @mygica_d689_atbm8830_cfg
	.no_dead_strip	_cxusb_mygica_d689_frontend_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxusb_mygica_d689_frontend_attach
_cxusb_mygica_d689_frontend_attach:     ; @cxusb_mygica_d689_frontend_attach
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	w0, [x20, #24]
	mov	w1, #0
	mov	w2, #0
	bl	_usb_set_interface
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
LBB0_2:
	ldr	w21, [x20, #24]
	ldr	w1, [x20, #16]
	mov	x0, x21
	bl	_usb_sndbulkpipe
	mov	x1, x0
	mov	x0, x21
	bl	_usb_clear_halt
	ldr	w21, [x20, #24]
	ldr	w1, [x20, #16]
	mov	x0, x21
	bl	_usb_rcvbulkpipe
	mov	x1, x0
	mov	x0, x21
	bl	_usb_clear_halt
	ldr	w21, [x20, #24]
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	w1, [x8]
	mov	x0, x21
	bl	_usb_rcvbulkpipe
	mov	x1, x0
	mov	x0, x21
	bl	_usb_clear_halt
	mov	x0, x20
	mov	w1, #7
	mov	w2, #0
	bl	_cxusb_d680_dmb_gpio_tuner
	tbnz	x0, #63, LBB0_6
; %bb.3:
	mov	w0, #100
	bl	_msleep
	mov	x0, x20
	mov	w1, #7
	mov	w2, #1
	bl	_cxusb_d680_dmb_gpio_tuner
	tbnz	x0, #63, LBB0_7
; %bb.4:
	mov	w0, #100
	bl	_msleep
Lloh2:
	adrp	x8, _atbm8830_attach@GOTPAGE
Lloh3:
	ldr	x8, [x8, _atbm8830_attach@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, _mygica_d689_atbm8830_cfg@GOTPAGE
Lloh6:
	ldr	x1, [x1, _mygica_d689_atbm8830_cfg@GOTPAGEOFF]
	mov	x2, x20
	bl	_dvb_attach
	ldr	x8, [x19]
	str	w0, [x8]
	cbz	w0, LBB0_9
; %bb.5:
	mov	w0, #0
	b	LBB0_10
LBB0_6:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	_err
LBB0_9:
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set interface failed"

l_.str.1:                               ; @.str.1
	.asciz	"clear tuner gpio failed"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"set tuner gpio failed"

	.comm	_atbm8830_attach,4,2            ; @atbm8830_attach
	.comm	_mygica_d689_atbm8830_cfg,4,2   ; @mygica_d689_atbm8830_cfg
	.no_dead_strip	_cxusb_mygica_d689_frontend_attach
.subsections_via_symbols
