	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mousevsc_probe
_mousevsc_probe:                        ## @mousevsc_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_mousevsc_alloc_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	(%r12), %edi
	movq	_INPUTVSC_SEND_RING_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_INPUTVSC_RECV_RING_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_mousevsc_on_channel_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r12, (%rsp)
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_vmbus_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.3:
	movq	%r12, %rdi
	callq	_mousevsc_connect_to_vsp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	movq	(%r14), %rax
	cmpl	$37, 56(%rax)
	jne	LBB0_6
## %bb.5:
	movl	$41, 56(%rax)
LBB0_6:
	xorl	%eax, %eax
	callq	_hid_allocate_device
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_8:
	movq	_mousevsc_ll_driver@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r15)
	movq	_mousevsc_hid_driver@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r15)
	movq	_BUS_VIRTUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movl	32(%r14), %eax
	movl	%eax, 12(%r15)
	movl	28(%r14), %eax
	movl	%eax, 8(%r15)
	movl	24(%r14), %eax
	movl	%eax, 4(%r15)
	movq	%r15, 16(%r14)
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	callq	_sprintf
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_hid_set_drvdata
	movq	%r15, %rdi
	callq	_hid_add_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	movq	%r15, %rdi
	callq	_hid_parse
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_13
LBB0_11:
	movq	_HID_CONNECT_HIDINPUT@GOTPCREL(%rip), %rax
	movq	_HID_CONNECT_HIDDEV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	_hid_hw_start
	testl	%eax, %eax
	je	LBB0_17
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
LBB0_13:
	movq	%r15, %rdi
	callq	_hid_err
	movq	%r15, %rdi
	callq	_hid_destroy_device
LBB0_14:
	movl	(%r12), %edi
	callq	_vmbus_close
LBB0_15:
	movq	%r14, %rdi
	callq	_mousevsc_free_device
LBB0_16:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	addq	$4, %r12
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 8(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_INPUTVSC_SEND_RING_BUFFER_SIZE,4,2 ## @INPUTVSC_SEND_RING_BUFFER_SIZE
	.comm	_INPUTVSC_RECV_RING_BUFFER_SIZE,4,2 ## @INPUTVSC_RECV_RING_BUFFER_SIZE
	.comm	_mousevsc_on_channel_callback,4,2 ## @mousevsc_on_channel_callback
	.comm	_mousevsc_ll_driver,4,2         ## @mousevsc_ll_driver
	.comm	_mousevsc_hid_driver,4,2        ## @mousevsc_hid_driver
	.comm	_BUS_VIRTUAL,4,2                ## @BUS_VIRTUAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"Microsoft Vmbus HID-compliant Mouse"

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

	.comm	_HID_CONNECT_HIDINPUT,4,2       ## @HID_CONNECT_HIDINPUT
	.comm	_HID_CONNECT_HIDDEV,4,2         ## @HID_CONNECT_HIDDEV
L_.str.3:                               ## @.str.3
	.asciz	"hw start failed\n"

	.no_dead_strip	_mousevsc_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mousevsc_probe
_mousevsc_probe:                        ; @mousevsc_probe
	.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	x20, x0
	bl	_mousevsc_alloc_device
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	w0, [x20]
Lloh0:
	adrp	x8, _INPUTVSC_SEND_RING_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INPUTVSC_SEND_RING_BUFFER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _INPUTVSC_RECV_RING_BUFFER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INPUTVSC_RECV_RING_BUFFER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _mousevsc_on_channel_callback@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mousevsc_on_channel_callback@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
	mov	x3, #0
	mov	w4, #0
	mov	x6, x20
	bl	_vmbus_open
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.2:
	mov	x0, x20
	bl	_mousevsc_connect_to_vsp
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.3:
	ldr	x8, [x19]
	ldr	w9, [x8, #56]
	cmp	w9, #37
	b.ne	LBB0_5
; %bb.4:
	mov	w9, #41
	str	w9, [x8, #56]
LBB0_5:
	bl	_hid_allocate_device
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_14
LBB0_7:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_16
LBB0_8:
Lloh12:
	adrp	x8, _mousevsc_ll_driver@GOTPAGE
Lloh13:
	ldr	x8, [x8, _mousevsc_ll_driver@GOTPAGEOFF]
Lloh14:
	adrp	x9, _mousevsc_hid_driver@GOTPAGE
Lloh15:
	ldr	x9, [x9, _mousevsc_hid_driver@GOTPAGEOFF]
	stp	x9, x8, [x21, #24]
Lloh16:
	adrp	x8, _BUS_VIRTUAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BUS_VIRTUAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [x19, #32]
	stp	w9, w8, [x21, #12]
	ldr	d0, [x19, #24]
	stur	d0, [x21, #4]
	str	x21, [x19, #16]
	ldr	w0, [x21]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
Lloh21:
	adrp	x2, l_.str.1@PAGE
Lloh22:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_sprintf
	mov	x0, x21
	mov	x1, x20
	bl	_hid_set_drvdata
	mov	x0, x21
	bl	_hid_add_device
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.9:
	mov	x0, x21
	bl	_hid_parse
	cbz	w0, LBB0_11
; %bb.10:
	mov	x22, x0
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_11:
Lloh25:
	adrp	x8, _HID_CONNECT_HIDINPUT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _HID_CONNECT_HIDINPUT@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _HID_CONNECT_HIDDEV@GOTPAGE
Lloh29:
	ldr	x9, [x9, _HID_CONNECT_HIDDEV@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x21
	bl	_hid_hw_start
	mov	x22, x0
	cbz	w0, LBB0_17
; %bb.12:
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_13:
	mov	x0, x21
	bl	_hid_err
	mov	x0, x21
	bl	_hid_destroy_device
LBB0_14:
	ldr	w0, [x20]
	bl	_vmbus_close
LBB0_15:
	mov	x0, x19
	bl	_mousevsc_free_device
LBB0_16:
	mov	x0, x22
	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
LBB0_17:
	add	x0, x20, #4
	mov	w1, #1
	bl	_device_init_wakeup
	movi.2s	v0, #1
	str	d0, [x19, #8]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_INPUTVSC_SEND_RING_BUFFER_SIZE,4,2 ; @INPUTVSC_SEND_RING_BUFFER_SIZE
	.comm	_INPUTVSC_RECV_RING_BUFFER_SIZE,4,2 ; @INPUTVSC_RECV_RING_BUFFER_SIZE
	.comm	_mousevsc_on_channel_callback,4,2 ; @mousevsc_on_channel_callback
	.comm	_mousevsc_ll_driver,4,2         ; @mousevsc_ll_driver
	.comm	_mousevsc_hid_driver,4,2        ; @mousevsc_hid_driver
	.comm	_BUS_VIRTUAL,4,2                ; @BUS_VIRTUAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"Microsoft Vmbus HID-compliant Mouse"

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

	.comm	_HID_CONNECT_HIDINPUT,4,2       ; @HID_CONNECT_HIDINPUT
	.comm	_HID_CONNECT_HIDDEV,4,2         ; @HID_CONNECT_HIDDEV
l_.str.3:                               ; @.str.3
	.asciz	"hw start failed\n"

	.no_dead_strip	_mousevsc_probe
.subsections_via_symbols
