	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ds3000_frontend_attach
_ds3000_frontend_attach:                ## @ds3000_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	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdx
	movq	8(%rdx), %r15
	movabsq	$4294967303, %rax               ## imm = 0x100000007
	movq	%rax, -32(%rbp)
	movq	_ds3000_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$4, %rdx
	movq	_s660_ds3000_config@GOTPCREL(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dvb_attach
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_ts2020_attach@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	(%rbx), %rcx
	addq	$4, %rcx
	movq	_s660_ts2020_config@GOTPCREL(%rip), %rdx
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_dvb_attach
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%r15)
	movq	_s660_set_voltage@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_DW210X_WRITE_MSG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	leaq	-32(%rbp), %r8
	movl	$138, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$2, %r9d
	callq	_dw210x_op_rw
	leaq	L_.str(%rip), %rdi
	callq	_info
	jmp	LBB0_3
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ds3000_attach,4,2              ## @ds3000_attach
	.comm	_s660_ds3000_config,4,2         ## @s660_ds3000_config
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ts2020_attach,4,2              ## @ts2020_attach
	.comm	_s660_ts2020_config,4,2         ## @s660_ts2020_config
	.comm	_s660_set_voltage,4,2           ## @s660_set_voltage
	.comm	_DW210X_WRITE_MSG,4,2           ## @DW210X_WRITE_MSG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attached ds3000+ts2020!"

	.no_dead_strip	_ds3000_frontend_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ds3000_frontend_attach
_ds3000_frontend_attach:                ; @ds3000_frontend_attach
	.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, x0
	ldr	x8, [x0]
	ldr	x20, [x8, #8]
	mov	x9, #7
	movk	x9, #1, lsl #32
	str	x9, [sp, #8]
Lloh0:
	adrp	x9, _ds3000_attach@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ds3000_attach@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x9]
	add	x2, x8, #4
Lloh3:
	adrp	x1, _s660_ds3000_config@GOTPAGE
Lloh4:
	ldr	x1, [x1, _s660_ds3000_config@GOTPAGEOFF]
	bl	_dvb_attach
	ldr	x8, [x19, #8]
	str	x0, [x8]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x1, x0
Lloh5:
	adrp	x8, _ts2020_attach@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ts2020_attach@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	x8, [x19]
	add	x8, x8, #4
	str	x8, [sp]
Lloh8:
	adrp	x2, _s660_ts2020_config@GOTPAGE
Lloh9:
	ldr	x2, [x2, _s660_ts2020_config@GOTPAGEOFF]
	bl	_dvb_attach
	ldp	x9, x8, [x19]
	ldr	x8, [x8]
	ldr	w10, [x8]
	str	w10, [x20]
Lloh10:
	adrp	x10, _s660_set_voltage@GOTPAGE
Lloh11:
	ldr	x10, [x10, _s660_set_voltage@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	str	w10, [x8]
	ldr	w0, [x9]
Lloh13:
	adrp	x8, _DW210X_WRITE_MSG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DW210X_WRITE_MSG@GOTPAGEOFF]
Lloh15:
	ldr	w6, [x8]
	add	x4, sp, #8
	mov	w1, #138
	mov	w2, #0
	mov	w3, #0
	mov	w5, #2
	bl	_dw210x_op_rw
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_info
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ds3000_attach,4,2              ; @ds3000_attach
	.comm	_s660_ds3000_config,4,2         ; @s660_ds3000_config
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ts2020_attach,4,2              ; @ts2020_attach
	.comm	_s660_ts2020_config,4,2         ; @s660_ts2020_config
	.comm	_s660_set_voltage,4,2           ; @s660_set_voltage
	.comm	_DW210X_WRITE_MSG,4,2           ; @DW210X_WRITE_MSG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attached ds3000+ts2020!"

	.no_dead_strip	_ds3000_frontend_attach
.subsections_via_symbols
