	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function su3000_frontend_attach
_su3000_frontend_attach:                ## @su3000_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, %r14
	movq	8(%rdi), %r12
	movq	8(%r12), %rbx
	leaq	4(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rcx
	movabsq	$549755813902, %rax             ## imm = 0x800000000E
	movq	%rax, (%rcx)
	movl	$0, 8(%rcx)
	movq	%r12, %rdi
	movq	%rcx, %rsi
	movl	$3, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_dvb_usb_generic_rw
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_err
LBB0_2:
	movq	(%rbx), %rcx
	movabsq	$8589934606, %rax               ## imm = 0x20000000E
	movq	%rax, (%rcx)
	movl	$1, 8(%rcx)
	movq	%r12, %rdi
	movq	%rcx, %rsi
	movl	$3, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_dvb_usb_generic_rw
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_err
LBB0_4:
	movl	$300, %edi                      ## imm = 0x12C
	callq	_msleep
	movq	(%rbx), %rcx
	movabsq	$562640715790, %r13             ## imm = 0x830000000E
	movq	%r13, (%rcx)
	movl	$0, 8(%rcx)
	movq	%r12, %rdi
	movq	%rcx, %rsi
	movl	$3, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_dvb_usb_generic_rw
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_err
LBB0_6:
	movq	(%rbx), %rcx
	movq	%r13, (%rcx)
	movl	$1, 8(%rcx)
	movq	%r12, %rdi
	movq	%rcx, %rsi
	movl	$3, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_dvb_usb_generic_rw
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rdi
	callq	_err
LBB0_8:
	movq	(%rbx), %rcx
	movl	$81, (%rcx)
	movq	%r12, %rdi
	movq	%rcx, %rsi
	movl	$1, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_dvb_usb_generic_rw
	testq	%rax, %rax
	jns	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	callq	_err
LBB0_10:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_ds3000_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_su3000_ds3000_config@GOTPCREL(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_dvb_attach
	movq	(%r14), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	_ts2020_attach@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_dw2104_ts2020_config@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%rax, %rsi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_dvb_attach
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.2(%rip), %rdi
	callq	_info
	jmp	LBB0_16
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_14:
	leaq	L_.str.3(%rip), %rdi
	callq	_info
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_15:
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"command 0x0e transfer failed."

L_.str.1:                               ## @.str.1
	.asciz	"command 0x51 transfer failed."

	.comm	_ds3000_attach,4,2              ## @ds3000_attach
	.comm	_su3000_ds3000_config,4,2       ## @su3000_ds3000_config
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ts2020_attach,4,2              ## @ts2020_attach
	.comm	_dw2104_ts2020_config,4,2       ## @dw2104_ts2020_config
L_.str.2:                               ## @.str.2
	.asciz	"Attached DS3000/TS2020!"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to attach DS3000/TS2020!"

	.no_dead_strip	_su3000_frontend_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function su3000_frontend_attach
lCPI0_0:
	.long	14                              ; 0xe
	.long	128                             ; 0x80
lCPI0_1:
	.long	14                              ; 0xe
	.long	2                               ; 0x2
lCPI0_2:
	.long	14                              ; 0xe
	.long	131                             ; 0x83
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_su3000_frontend_attach:                ; @su3000_frontend_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset b8, -72
	.cfi_offset b9, -80
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	x22, [x19, #8]
	add	x21, x19, #4
	mov	x0, x21
	bl	_mutex_lock
	ldr	x1, [x22]
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x1]
	str	wzr, [x1, #8]
	mov	w23, #1
	mov	x0, x19
	mov	w2, #3
	mov	x3, x1
	mov	w4, #1
	mov	w5, #0
	bl	_dvb_usb_generic_rw
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
LBB0_2:
	ldr	x1, [x22]
Lloh4:
	adrp	x8, lCPI0_1@PAGE
Lloh5:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [x1]
	str	w23, [x1, #8]
	mov	x0, x19
	mov	w2, #3
	mov	x3, x1
	mov	w4, #1
	mov	w5, #0
	bl	_dvb_usb_generic_rw
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
LBB0_4:
	mov	w0, #300
	bl	_msleep
	ldr	x1, [x22]
Lloh8:
	adrp	x8, lCPI0_2@PAGE
Lloh9:
	ldr	d8, [x8, lCPI0_2@PAGEOFF]
	str	d8, [x1]
	str	wzr, [x1, #8]
	mov	w23, #1
	mov	x0, x19
	mov	w2, #3
	mov	x3, x1
	mov	w4, #1
	mov	w5, #0
	bl	_dvb_usb_generic_rw
	tbz	x0, #63, LBB0_6
; %bb.5:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
LBB0_6:
	ldr	x1, [x22]
	str	d8, [x1]
	str	w23, [x1, #8]
	mov	x0, x19
	mov	w2, #3
	mov	x3, x1
	mov	w4, #1
	mov	w5, #0
	bl	_dvb_usb_generic_rw
	tbz	x0, #63, LBB0_8
; %bb.7:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
LBB0_8:
	ldr	x1, [x22]
	mov	w8, #81
	str	w8, [x1]
	mov	x0, x19
	mov	w2, #1
	mov	x3, x1
	mov	w4, #1
	mov	w5, #0
	bl	_dvb_usb_generic_rw
	tbz	x0, #63, LBB0_10
; %bb.9:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_err
LBB0_10:
	mov	x0, x21
	bl	_mutex_unlock
Lloh16:
	adrp	x8, _ds3000_attach@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ds3000_attach@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, _su3000_ds3000_config@GOTPAGE
Lloh20:
	ldr	x1, [x1, _su3000_ds3000_config@GOTPAGEOFF]
	mov	x2, x19
	bl	_dvb_attach
	ldr	x8, [x20]
	str	x0, [x8]
	cbz	x0, LBB0_14
; %bb.11:
	mov	x1, x0
Lloh21:
	adrp	x8, _ts2020_attach@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ts2020_attach@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh24:
	adrp	x2, _dw2104_ts2020_config@GOTPAGE
Lloh25:
	ldr	x2, [x2, _dw2104_ts2020_config@GOTPAGEOFF]
	bl	_dvb_attach
	cbz	x0, LBB0_13
; %bb.12:
Lloh26:
	adrp	x0, l_.str.2@PAGE
Lloh27:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_info
	mov	w0, #0
	b	LBB0_15
LBB0_13:
Lloh28:
	adrp	x0, l_.str.3@PAGE
Lloh29:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_info
LBB0_14:
Lloh30:
	adrp	x8, _EIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdr	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"command 0x0e transfer failed."

l_.str.1:                               ; @.str.1
	.asciz	"command 0x51 transfer failed."

	.comm	_ds3000_attach,4,2              ; @ds3000_attach
	.comm	_su3000_ds3000_config,4,2       ; @su3000_ds3000_config
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ts2020_attach,4,2              ; @ts2020_attach
	.comm	_dw2104_ts2020_config,4,2       ; @dw2104_ts2020_config
l_.str.2:                               ; @.str.2
	.asciz	"Attached DS3000/TS2020!"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to attach DS3000/TS2020!"

	.no_dead_strip	_su3000_frontend_attach
.subsections_via_symbols
