	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dabusb_probe
_dabusb_probe:                          ## @dabusb_probe
	.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, %r15
	callq	_interface_to_usbdev
	movq	%rax, %r13
	movl	8(%rax), %edi
	callq	_le16_to_cpu
	movl	%eax, %r14d
	movl	4(%r13), %edi
	callq	_le16_to_cpu
	movq	8(%r15), %rcx
	movl	(%rcx), %ecx
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dbg
	cmpl	$1, (%r13)
	jne	LBB0_1
## %bb.2:
	movq	8(%r15), %rax
	movl	(%rax), %eax
	movq	__DABUSB_IF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
## %bb.3:
	movl	4(%r13), %edi
	callq	_le16_to_cpu
	cmpl	$39321, %eax                    ## imm = 0x9999
	je	LBB0_11
LBB0_4:
	movq	_dabusb@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	(%r15), %rbx
	shlq	$5, %rbx
	leaq	(%r14,%rbx), %r12
	addq	$16, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	$0, 24(%r14,%rbx)
	movq	%r13, 8(%r14,%rbx)
	movq	(%r15), %rax
	movq	%rax, (%r14,%rbx)
	movq	%r13, %rdi
	callq	_usb_reset_configuration
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	addq	%rbx, %r14
	movl	4(%r13), %edi
	callq	_le16_to_cpu
	cmpl	$8497, %eax                     ## imm = 0x2131
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dabusb_loadmem
	jmp	LBB0_10
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_5:
	addq	$16, %r15
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_10
LBB0_8:
	movq	%r12, %rbx
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dabusb_fpga_download
	movq	-8(%rbx), %rdi
	movq	__DABUSB_IF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_usb_set_interface
	testq	%rax, %rax
	js	LBB0_9
## %bb.12:
	movq	8(%r15), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_usb_set_intfdata
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	_dabusb_class@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_usb_register_dev
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_usb_set_intfdata
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_9:
	addq	$16, %r15
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	%rbx, %r12
LBB0_10:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	$0, -8(%r12)
LBB0_11:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
LBB0_14:
	subl	(%rax), %r12d
LBB0_15:
	movl	%r12d, %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	"dabusb: probe: vendor id 0x%x, device id 0x%x ifnum:%d"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	__DABUSB_IF,4,2                 ## @_DABUSB_IF
	.comm	_dabusb,8,3                     ## @dabusb
L_.str.1:                               ## @.str.1
	.asciz	"reset_configuration failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"set_interface failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"bound to interface: %d"

	.comm	_dabusb_class,4,2               ## @dabusb_class
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_dabusb_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dabusb_probe
_dabusb_probe:                          ; @dabusb_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_interface_to_usbdev
	mov	x21, x0
	ldr	w0, [x0, #8]
	bl	_le16_to_cpu
	mov	x20, x0
	ldr	w0, [x21, #4]
	bl	_le16_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	stp	x0, x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_dbg
	ldr	w8, [x21]
	cmp	w8, #1
	b.ne	LBB0_13
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh2:
	adrp	x24, __DABUSB_IF@GOTPAGE
Lloh3:
	ldr	x24, [x24, __DABUSB_IF@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, w9
	b.eq	LBB0_3
; %bb.2:
	ldr	w0, [x21, #4]
	bl	_le16_to_cpu
	mov	w8, #39321
	cmp	w0, w8
	b.eq	LBB0_13
LBB0_3:
Lloh4:
	adrp	x8, _dabusb@GOTPAGE
Lloh5:
	ldr	x8, [x8, _dabusb@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	x9, [x19]
	add	x22, x8, x9, lsl #5
	add	x20, x22, #16
	mov	x0, x20
	bl	_mutex_lock
	str	xzr, [x22, #24]
	mov	x23, x22
	str	x21, [x23, #8]!
	ldr	x8, [x19]
	str	x8, [x22]
	mov	x0, x21
	bl	_usb_reset_configuration
	tbnz	x0, #63, LBB0_6
; %bb.4:
	ldr	w0, [x21, #4]
	bl	_le16_to_cpu
	mov	w8, #8497
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x22
	mov	x1, #0
	bl	_dabusb_loadmem
	b	LBB0_12
LBB0_6:
	add	x0, x19, #16
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_7:
	mov	x0, x22
	mov	x1, #0
	bl	_dabusb_fpga_download
	ldr	x0, [x23]
	ldr	w1, [x24]
	mov	w2, #0
	bl	_usb_set_interface
	tbnz	x0, #63, LBB0_10
; %bb.8:
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dbg
	mov	x0, x19
	mov	x1, x22
	bl	_usb_set_intfdata
	mov	x0, x20
	bl	_mutex_unlock
Lloh11:
	adrp	x1, _dabusb_class@GOTPAGE
Lloh12:
	ldr	x1, [x1, _dabusb_class@GOTPAGEOFF]
	mov	x0, x19
	bl	_usb_register_dev
	cbz	w0, LBB0_15
; %bb.9:
	mov	x0, x19
	mov	x1, #0
	bl	_usb_set_intfdata
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
	add	x0, x19, #16
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_11:
	bl	_dev_err
LBB0_12:
	mov	x0, x20
	bl	_mutex_unlock
	str	xzr, [x23]
LBB0_13:
Lloh17:
	adrp	x8, _ENODEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dabusb: probe: vendor id 0x%x, device id 0x%x ifnum:%d"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	__DABUSB_IF,4,2                 ; @_DABUSB_IF
	.comm	_dabusb,8,3                     ; @dabusb
l_.str.1:                               ; @.str.1
	.asciz	"reset_configuration failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"set_interface failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"bound to interface: %d"

	.comm	_dabusb_class,4,2               ; @dabusb_class
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_dabusb_probe
.subsections_via_symbols
