	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function umouse_event
_umouse_event:                          ## @umouse_event
	.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	%rcx, %rbx
	movl	%edx, %r14d
	movl	%esi, %r13d
	movl	%edi, %r12d
	xorl	%eax, %eax
	callq	_console_get_image
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r15
	leaq	16(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_pthread_mutex_lock
	movq	$0, 20(%rbx)
	testb	$7, %r12b
	je	LBB0_3
## %bb.2:
	movl	%r12d, %eax
	andl	$2, %eax
	movl	%r12d, %ecx
	andl	$1, %ecx
	leal	(%rcx,%rax,2), %eax
	movl	%r12d, %ecx
	shrl	%ecx
	andl	$2, %ecx
	orl	%eax, %ecx
	movl	%ecx, 20(%rbx)
LBB0_3:
	testb	$24, %r12b
	je	LBB0_5
## %bb.4:
	andl	$16, %r12d
	xorl	%eax, %eax
	negl	%r12d
	sbbl	%eax, %eax
	orl	$1, %eax
	movl	%eax, 24(%rbx)
LBB0_5:
	movq	_MOUSE_MAX_X@GOTPCREL(%rip), %rax
	imull	(%rax), %r13d
	movl	%r13d, %eax
	cltd
	idivl	(%r15)
	movl	%eax, 28(%rbx)
	movq	_MOUSE_MAX_Y@GOTPCREL(%rip), %rax
	imull	(%rax), %r14d
	movl	%r14d, %eax
	cltd
	idivl	4(%r15)
	movl	%eax, 32(%rbx)
	movl	$1, (%rbx)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pthread_mutex_unlock
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movq	8(%rbx), %rdi
	movq	_UE_DIR_IN@GOTPCREL(%rip), %rax
	movq	_UMOUSE_INTR_ENDPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	*(%rdi)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pthread_mutex_unlock           ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MOUSE_MAX_X,4,2                ## @MOUSE_MAX_X
	.comm	_MOUSE_MAX_Y,4,2                ## @MOUSE_MAX_Y
	.comm	_UE_DIR_IN,4,2                  ## @UE_DIR_IN
	.comm	_UMOUSE_INTR_ENDPT,4,2          ## @UMOUSE_INTR_ENDPT
	.no_dead_strip	_umouse_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function umouse_event
_umouse_event:                          ; @umouse_event
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x3
	mov	x20, x2
	mov	x23, x1
	mov	x24, x0
	bl	_console_get_image
	cbz	x0, LBB0_6
; %bb.1:
	mov	x22, x0
	add	x21, x19, #16
	mov	x0, x21
	bl	_pthread_mutex_lock
	stp	wzr, wzr, [x19, #20]
	tst	w24, #0x7
	b.eq	LBB0_3
; %bb.2:
	lsr	w8, w24, #1
	and	w9, w24, #0x1
	bfi	w9, w8, #2, #1
	and	w8, w8, #0x2
	orr	w8, w8, w9
	str	w8, [x19, #20]
LBB0_3:
	tst	w24, #0x18
	b.eq	LBB0_5
; %bb.4:
	tst	w24, #0x10
	mov	w8, #1
	cneg	w8, w8, ne
	str	w8, [x19, #24]
LBB0_5:
Lloh0:
	adrp	x8, _MOUSE_MAX_X@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MOUSE_MAX_X@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mul	w8, w8, w23
	ldp	w9, w10, [x22]
	sdiv	w8, w8, w9
Lloh3:
	adrp	x9, _MOUSE_MAX_Y@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MOUSE_MAX_Y@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	mul	w9, w9, w20
	sdiv	w9, w9, w10
	stp	w8, w9, [x19, #28]
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x21
	bl	_pthread_mutex_unlock
	add	x20, x19, #4
	mov	x0, x20
	bl	_pthread_mutex_lock
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x8, _UE_DIR_IN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UE_DIR_IN@GOTPAGEOFF]
	ldr	x9, [x0]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x10, _UMOUSE_INTR_ENDPT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _UMOUSE_INTR_ENDPT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w1, w10, w8
	blr	x9
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_pthread_mutex_unlock
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MOUSE_MAX_X,4,2                ; @MOUSE_MAX_X
	.comm	_MOUSE_MAX_Y,4,2                ; @MOUSE_MAX_Y
	.comm	_UE_DIR_IN,4,2                  ; @UE_DIR_IN
	.comm	_UMOUSE_INTR_ENDPT,4,2          ; @UMOUSE_INTR_ENDPT
	.no_dead_strip	_umouse_event
.subsections_via_symbols
