	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_I_GetEvent                     ## -- Begin function I_GetEvent
	.p2align	4, 0x90
_I_GetEvent:                            ## @I_GetEvent
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	_X_display@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_X_event@GOTPCREL(%rip), %rbx
	movq	%rbx, %rsi
	callq	_XNextEvent
	movl	(%rbx), %eax
	leal	-128(%rax), %ecx
	cmpl	$6, %ecx
	ja	LBB0_14
## %bb.1:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rcx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_9:
	movq	_ev_mouse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	_Button1Mask@GOTPCREL(%rip), %rcx
	movl	4(%rbx), %edx
	movl	8(%rbx), %eax
	movl	(%rcx), %ecx
	andl	%edx, %ecx
	movq	_Button2Mask@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	movl	(%rsi), %esi
	andl	%edx, %esi
	setne	%dil
	addl	%edi, %edi
	orl	%ecx, %edi
	movq	_Button3Mask@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	andl	(%rcx), %edx
	setne	%sil
	shll	$2, %esi
	orl	%edi, %esi
	movl	%esi, -32(%rbp)
	movq	_lastmousex@GOTPCREL(%rip), %r8
	movl	%eax, %edi
	subl	(%r8), %edi
	shll	$2, %edi
	movl	%edi, -28(%rbp)
	movq	_lastmousey@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edx
	movl	12(%rbx), %ecx
	subl	%ecx, %edx
	shll	$2, %edx
	movl	%edx, -24(%rbp)
	orl	%edi, %edx
	je	LBB0_18
## %bb.10:
	movl	%eax, (%r8)
	movl	%ecx, (%rsi)
	movq	_X_width@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %esi
	shrl	$31, %esi
	addl	%edx, %esi
	sarl	%esi
	cmpl	%esi, %eax
	je	LBB0_13
## %bb.11:
	movq	_X_height@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	cmpl	%edx, %ecx
	jne	LBB0_12
LBB0_13:
	movq	_mousemoved@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_14:
	movq	_doShm@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_18
## %bb.15:
	movq	_X_shmeventtype@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_18
## %bb.16:
	movq	_shmFinished@GOTPCREL(%rip), %rax
LBB0_17:
	movl	$1, (%rax)
	jmp	LBB0_18
LBB0_4:
	movq	_ev_keyup@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_ev_keydown@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	xorl	%eax, %eax
	callq	_xlatekey
	movl	%eax, -32(%rbp)
	jmp	LBB0_7
LBB0_8:
	movq	_ev_mouse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	_Button1Mask@GOTPCREL(%rip), %rcx
	movl	16(%rbx), %edx
	movl	20(%rbx), %eax
	movl	(%rcx), %ecx
	andl	%edx, %ecx
	movq	_Button2Mask@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	movl	(%rsi), %esi
	andl	%edx, %esi
	setne	%dil
	addl	%edi, %edi
	orl	%ecx, %edi
	movq	_Button3Mask@GOTPCREL(%rip), %rsi
	xorl	%ecx, %ecx
	andl	(%rsi), %edx
	setne	%cl
	shll	$2, %ecx
	orl	%edi, %ecx
	movq	_Button1@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	cmpl	(%rdx), %eax
	sete	%sil
	movq	_Button2@GOTPCREL(%rip), %rdx
	xorl	%edi, %edi
	cmpl	(%rdx), %eax
	sete	%dil
	addl	%edi, %edi
	xorl	%esi, %edi
	movq	_Button3@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	cmpl	(%rdx), %eax
	sete	%sil
	shll	$2, %esi
	xorl	%edi, %esi
	xorl	%ecx, %esi
	movl	%esi, -32(%rbp)
	jmp	LBB0_6
LBB0_5:
	movq	_Button1Mask@GOTPCREL(%rip), %rcx
	movl	16(%rbx), %edx
	movl	20(%rbx), %eax
	movl	(%rcx), %esi
	andl	%edx, %esi
	movq	_Button2Mask@GOTPCREL(%rip), %rdi
	xorl	%ecx, %ecx
	movl	(%rdi), %edi
	andl	%edx, %edi
	setne	%cl
	addl	%ecx, %ecx
	orl	%esi, %ecx
	movq	_Button3Mask@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	andl	(%rsi), %edx
	setne	%dil
	shll	$2, %edi
	movq	_Button1@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	cmpl	(%rdx), %eax
	movq	_ev_mouse@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, -16(%rbp)
	sete	%sil
	orl	%edi, %esi
	orl	%ecx, %esi
	movq	_Button2@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpl	(%rcx), %eax
	sete	%dl
	addl	%edx, %edx
	movq	_Button3@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	sete	%dil
	shll	$2, %edi
	orl	%edx, %edi
	orl	%esi, %edi
	movl	%edi, -32(%rbp)
LBB0_6:
	movq	$0, -28(%rbp)
LBB0_7:
	leaq	-32(%rbp), %rdi
	callq	_D_PostEvent
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_12:
	leaq	-32(%rbp), %rdi
	callq	_D_PostEvent
	movq	_mousemoved@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	jmp	LBB0_18
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_4
	.long	L0_0_set_2
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_8
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_X_display,4,2                  ## @X_display
	.comm	_X_event,24,2                   ## @X_event
	.comm	_ev_keydown,8,3                 ## @ev_keydown
	.comm	_ev_keyup,8,3                   ## @ev_keyup
	.comm	_ev_mouse,8,3                   ## @ev_mouse
	.comm	_Button1Mask,4,2                ## @Button1Mask
	.comm	_Button2Mask,4,2                ## @Button2Mask
	.comm	_Button3Mask,4,2                ## @Button3Mask
	.comm	_Button1,4,2                    ## @Button1
	.comm	_Button2,4,2                    ## @Button2
	.comm	_Button3,4,2                    ## @Button3
	.comm	_lastmousex,4,2                 ## @lastmousex
	.comm	_lastmousey,4,2                 ## @lastmousey
	.comm	_X_width,4,2                    ## @X_width
	.comm	_X_height,4,2                   ## @X_height
	.comm	_mousemoved,4,2                 ## @mousemoved
	.comm	_doShm,4,2                      ## @doShm
	.comm	_X_shmeventtype,4,2             ## @X_shmeventtype
	.comm	_shmFinished,4,2                ## @shmFinished
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_I_GetEvent                     ; -- Begin function I_GetEvent
	.p2align	2
_I_GetEvent:                            ; @I_GetEvent
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
Lloh0:
	adrp	x8, _X_display@GOTPAGE
Lloh1:
	ldr	x8, [x8, _X_display@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x19, _X_event@GOTPAGE
Lloh4:
	ldr	x19, [x19, _X_event@GOTPAGEOFF]
	mov	x1, x19
	bl	_XNextEvent
	ldr	w8, [x19]
	sub	w9, w8, #128
	cmp	w9, #6
	b.hi	LBB0_6
; %bb.1:
Lloh5:
	adrp	x8, lJTI0_0@PAGE
Lloh6:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh7:
	adrp	x8, _ev_mouse@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ev_mouse@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh10:
	adrp	x8, _Button1Mask@GOTPAGE
Lloh11:
	ldr	x8, [x8, _Button1Mask@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x8]
	ldp	w10, w8, [x19, #4]
	and	w9, w9, w10
Lloh13:
	adrp	x11, _Button2Mask@GOTPAGE
Lloh14:
	ldr	x11, [x11, _Button2Mask@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
	tst	w11, w10
	cset	w11, ne
	orr	w9, w9, w11, lsl #1
Lloh16:
	adrp	x11, _Button3Mask@GOTPAGE
Lloh17:
	ldr	x11, [x11, _Button3Mask@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	tst	w11, w10
	cset	w10, ne
	orr	w9, w9, w10, lsl #2
Lloh19:
	adrp	x10, _lastmousex@GOTPAGE
Lloh20:
	ldr	x10, [x10, _lastmousex@GOTPAGEOFF]
	ldr	w11, [x10]
	sub	w11, w8, w11
	lsl	w12, w11, #2
	stp	w9, w12, [sp, #8]
Lloh21:
	adrp	x11, _lastmousey@GOTPAGE
Lloh22:
	ldr	x11, [x11, _lastmousey@GOTPAGEOFF]
	ldr	w13, [x11]
	ldr	w9, [x19, #12]
	sub	w13, w13, w9
	lsl	w13, w13, #2
	str	w13, [sp, #16]
	orr	w12, w12, w13
	cbz	w12, LBB0_16
; %bb.3:
	str	w8, [x10]
	str	w9, [x11]
Lloh23:
	adrp	x10, _X_width@GOTPAGE
Lloh24:
	ldr	x10, [x10, _X_width@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	cmp	w10, #0
	cinc	w10, w10, lt
	cmp	w8, w10, asr #1
	b.eq	LBB0_5
; %bb.4:
Lloh26:
	adrp	x8, _X_height@GOTPAGE
Lloh27:
	ldr	x8, [x8, _X_height@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w9, w8, asr #1
	b.ne	LBB0_17
LBB0_5:
Lloh29:
	adrp	x8, _mousemoved@GOTPAGE
Lloh30:
	ldr	x8, [x8, _mousemoved@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh31:
	adrp	x9, _doShm@GOTPAGE
Lloh32:
	ldr	x9, [x9, _doShm@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
Lloh34:
	adrp	x10, _X_shmeventtype@GOTPAGE
Lloh35:
	ldr	x10, [x10, _X_shmeventtype@GOTPAGEOFF]
Lloh36:
	ldr	w10, [x10]
	cmp	w9, #0
	ccmp	w8, w10, #0, ne
	b.ne	LBB0_16
; %bb.7:
Lloh37:
	adrp	x8, _shmFinished@GOTPAGE
Lloh38:
	ldr	x8, [x8, _shmFinished@GOTPAGEOFF]
LBB0_8:
	mov	w9, #1
	str	w9, [x8]
	b	LBB0_16
LBB0_9:
Lloh39:
	adrp	x8, _ev_keyup@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ev_keyup@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh41:
	adrp	x8, _ev_keydown@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ev_keydown@GOTPAGEOFF]
LBB0_11:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_xlatekey
	str	w0, [sp, #8]
	b	LBB0_15
LBB0_12:
Lloh43:
	adrp	x8, _ev_mouse@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ev_mouse@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh46:
	adrp	x8, _Button1Mask@GOTPAGE
Lloh47:
	ldr	x8, [x8, _Button1Mask@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	ldp	w9, w10, [x19, #16]
	and	w8, w8, w9
Lloh49:
	adrp	x11, _Button2Mask@GOTPAGE
Lloh50:
	ldr	x11, [x11, _Button2Mask@GOTPAGEOFF]
Lloh51:
	ldr	w11, [x11]
	tst	w11, w9
	cset	w11, ne
	orr	w8, w8, w11, lsl #1
Lloh52:
	adrp	x11, _Button3Mask@GOTPAGE
Lloh53:
	ldr	x11, [x11, _Button3Mask@GOTPAGEOFF]
Lloh54:
	ldr	w11, [x11]
	tst	w11, w9
	cset	w9, ne
	orr	w8, w8, w9, lsl #2
Lloh55:
	adrp	x9, _Button3@GOTPAGE
Lloh56:
	ldr	x9, [x9, _Button3@GOTPAGEOFF]
Lloh57:
	ldr	w9, [x9]
	cmp	w10, w9
	cset	w9, eq
Lloh58:
	adrp	x11, _Button2@GOTPAGE
Lloh59:
	ldr	x11, [x11, _Button2@GOTPAGEOFF]
Lloh60:
	ldr	w11, [x11]
	cmp	w10, w11
	cset	w11, eq
Lloh61:
	adrp	x12, _Button1@GOTPAGE
Lloh62:
	ldr	x12, [x12, _Button1@GOTPAGEOFF]
Lloh63:
	ldr	w12, [x12]
	cmp	w10, w12
	cset	w10, eq
	eor	w8, w8, w10
	eor	w8, w8, w11, lsl #1
	eor	w8, w8, w9, lsl #2
	b	LBB0_14
LBB0_13:
Lloh64:
	adrp	x8, _ev_mouse@GOTPAGE
Lloh65:
	ldr	x8, [x8, _ev_mouse@GOTPAGEOFF]
Lloh66:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh67:
	adrp	x8, _Button1Mask@GOTPAGE
Lloh68:
	ldr	x8, [x8, _Button1Mask@GOTPAGEOFF]
Lloh69:
	ldr	w8, [x8]
	ldp	w9, w10, [x19, #16]
	and	w8, w8, w9
Lloh70:
	adrp	x11, _Button2Mask@GOTPAGE
Lloh71:
	ldr	x11, [x11, _Button2Mask@GOTPAGEOFF]
Lloh72:
	ldr	w11, [x11]
	tst	w11, w9
	cset	w11, ne
	orr	w8, w8, w11, lsl #1
Lloh73:
	adrp	x11, _Button3Mask@GOTPAGE
Lloh74:
	ldr	x11, [x11, _Button3Mask@GOTPAGEOFF]
Lloh75:
	ldr	w11, [x11]
	tst	w11, w9
	cset	w9, ne
	orr	w8, w8, w9, lsl #2
Lloh76:
	adrp	x9, _Button3@GOTPAGE
Lloh77:
	ldr	x9, [x9, _Button3@GOTPAGEOFF]
Lloh78:
	ldr	w9, [x9]
	cmp	w10, w9
	cset	w9, eq
Lloh79:
	adrp	x11, _Button2@GOTPAGE
Lloh80:
	ldr	x11, [x11, _Button2@GOTPAGEOFF]
Lloh81:
	ldr	w11, [x11]
	cmp	w10, w11
	cset	w11, eq
Lloh82:
	adrp	x12, _Button1@GOTPAGE
Lloh83:
	ldr	x12, [x12, _Button1@GOTPAGEOFF]
Lloh84:
	ldr	w12, [x12]
	cmp	w10, w12
	cset	w10, eq
	orr	w8, w8, w10
	orr	w8, w8, w11, lsl #1
	orr	w8, w8, w9, lsl #2
LBB0_14:
	stp	wzr, wzr, [sp, #12]
	str	w8, [sp, #8]
LBB0_15:
	add	x0, sp, #8
	bl	_D_PostEvent
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_17:
	add	x0, sp, #8
	bl	_D_PostEvent
Lloh85:
	adrp	x8, _mousemoved@GOTPAGE
Lloh86:
	ldr	x8, [x8, _mousemoved@GOTPAGEOFF]
Lloh87:
	str	wzr, [x8]
	b	LBB0_16
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotStr	Lloh85, Lloh86, Lloh87
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_16-LBB0_2)>>2
	.byte	(LBB0_16-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
                                        ; -- End function
	.comm	_X_display,4,2                  ; @X_display
	.comm	_X_event,24,2                   ; @X_event
	.comm	_ev_keydown,8,3                 ; @ev_keydown
	.comm	_ev_keyup,8,3                   ; @ev_keyup
	.comm	_ev_mouse,8,3                   ; @ev_mouse
	.comm	_Button1Mask,4,2                ; @Button1Mask
	.comm	_Button2Mask,4,2                ; @Button2Mask
	.comm	_Button3Mask,4,2                ; @Button3Mask
	.comm	_Button1,4,2                    ; @Button1
	.comm	_Button2,4,2                    ; @Button2
	.comm	_Button3,4,2                    ; @Button3
	.comm	_lastmousex,4,2                 ; @lastmousex
	.comm	_lastmousey,4,2                 ; @lastmousey
	.comm	_X_width,4,2                    ; @X_width
	.comm	_X_height,4,2                   ; @X_height
	.comm	_mousemoved,4,2                 ; @mousemoved
	.comm	_doShm,4,2                      ; @doShm
	.comm	_X_shmeventtype,4,2             ; @X_shmeventtype
	.comm	_shmFinished,4,2                ; @shmFinished
.subsections_via_symbols
