	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function x_input_poll_mouse
_x_input_poll_mouse:                    ## @x_input_poll_mouse
	.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	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %eax
	movl	12(%rdi), %ecx
	movl	%eax, (%rdi)
	movl	%ecx, 8(%rdi)
	movl	28(%rdi), %edi
	movl	32(%rbx), %esi
	subq	$8, %rsp
	leaq	-36(%rbp), %rax
	leaq	-28(%rbp), %r10
	leaq	-32(%rbp), %r11
	leaq	-44(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	leaq	-52(%rbp), %r8
	leaq	-48(%rbp), %r9
	pushq	%rax
	pushq	%r10
	pushq	%r11
	callq	_XQueryPointer
	addq	$32, %rsp
	movq	_g_x11_entered@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.1:
	movl	-32(%rbp), %eax
	movl	%eax, 4(%rbx)
	movl	-28(%rbp), %eax
	movl	%eax, 12(%rbx)
	movl	-36(%rbp), %eax
	movq	_Button1Mask@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movl	%ecx, 16(%rbx)
	movq	_Button2Mask@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movl	%ecx, 20(%rbx)
	movq	_Button3Mask@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, 24(%rbx)
	cmpq	$0, 40(%rbx)
	je	LBB0_7
## %bb.2:
	xorl	%eax, %eax
	callq	_video_driver_has_focus
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movq	$0, -64(%rbp)
	leaq	-96(%rbp), %rdi
	callq	_video_driver_get_viewport_info
	movl	-96(%rbp), %r15d
	movl	-92(%rbp), %r14d
	sarl	%r15d
	sarl	%r14d
	cmpl	%r15d, 4(%rbx)
	jne	LBB0_5
## %bb.4:
	cmpl	%r14d, 12(%rbx)
	je	LBB0_6
LBB0_5:
	movq	_None@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	28(%rbx), %edi
	movl	32(%rbx), %edx
	subq	$8, %rsp
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r14
	pushq	%r15
	pushq	$0
	callq	_XWarpPointer
	addq	$32, %rsp
	movl	28(%rbx), %edi
	movq	_False@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XSync
LBB0_6:
	movl	%r15d, (%rbx)
	movl	%r14d, 8(%rbx)
LBB0_7:
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_x11_entered,8,3              ## @g_x11_entered
	.comm	_Button1Mask,4,2                ## @Button1Mask
	.comm	_Button2Mask,4,2                ## @Button2Mask
	.comm	_Button3Mask,4,2                ## @Button3Mask
	.comm	_None,4,2                       ## @None
	.comm	_False,4,2                      ## @False
	.no_dead_strip	_x_input_poll_mouse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function x_input_poll_mouse
_x_input_poll_mouse:                    ; @x_input_poll_mouse
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x0
	ldr	w8, [x0, #4]
	str	w8, [x0]
	ldr	w8, [x0, #12]
	str	w8, [x0, #8]
	ldr	w0, [x0, #28]
	ldr	w1, [x19, #32]
	sub	x8, x29, #36
	str	x8, [sp]
	sub	x2, x29, #56
	sub	x3, x29, #60
	sub	x4, x29, #40
	sub	x5, x29, #44
	sub	x6, x29, #48
	sub	x7, x29, #52
	bl	_XQueryPointer
Lloh0:
	adrp	x8, _g_x11_entered@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_x11_entered@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.1:
	ldur	w8, [x29, #-48]
	str	w8, [x19, #4]
	ldur	w8, [x29, #-52]
	ldur	w9, [x29, #-36]
Lloh3:
	adrp	x10, _Button1Mask@GOTPAGE
Lloh4:
	ldr	x10, [x10, _Button1Mask@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	and	w10, w10, w9
	stp	w8, w10, [x19, #12]
Lloh6:
	adrp	x8, _Button2Mask@GOTPAGE
Lloh7:
	ldr	x8, [x8, _Button2Mask@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x10, _Button3Mask@GOTPAGE
Lloh10:
	ldr	x10, [x10, _Button3Mask@GOTPAGEOFF]
	and	w8, w8, w9
Lloh11:
	ldr	w10, [x10]
	and	w9, w10, w9
	stp	w8, w9, [x19, #20]
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_7
; %bb.2:
	bl	_video_driver_has_focus
	cbz	x0, LBB0_7
; %bb.3:
	str	xzr, [sp, #48]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
	add	x0, sp, #16
	bl	_video_driver_get_viewport_info
	ldp	w8, w9, [sp, #16]
	asr	w20, w8, #1
	asr	w21, w9, #1
	ldr	w8, [x19, #4]
	cmp	w8, w20
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x19, #12]
	cmp	w8, w21
	b.eq	LBB0_6
LBB0_5:
Lloh12:
	adrp	x8, _None@GOTPAGE
Lloh13:
	ldr	x8, [x8, _None@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldp	w0, w2, [x19, #28]
	str	w21, [sp]
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	mov	x7, x20
	bl	_XWarpPointer
	ldr	w0, [x19, #28]
Lloh15:
	adrp	x8, _False@GOTPAGE
Lloh16:
	ldr	x8, [x8, _False@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_XSync
LBB0_6:
	str	w20, [x19]
	str	w21, [x19, #8]
LBB0_7:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_g_x11_entered,8,3              ; @g_x11_entered
	.comm	_Button1Mask,4,2                ; @Button1Mask
	.comm	_Button2Mask,4,2                ; @Button2Mask
	.comm	_Button3Mask,4,2                ; @Button3Mask
	.comm	_None,4,2                       ; @None
	.comm	_False,4,2                      ; @False
	.no_dead_strip	_x_input_poll_mouse
.subsections_via_symbols
