	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Com_EventLoop                  ## -- Begin function Com_EventLoop
	.p2align	4, 0x90
_Com_EventLoop:                         ## @Com_EventLoop
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_MSGLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rsi
	leal	(,%rbx,4), %edx
	leaq	-52(%rbp), %rdi
	callq	_MSG_Init
	leaq	-80(%rbp), %rdi
	xorl	%eax, %eax
	callq	_Com_GetEvent
	movl	-80(%rbp), %edx
	movl	-76(%rbp), %r13d
	movq	_SE_NONE@GOTPCREL(%rip), %r14
	cmpl	(%r14), %edx
	jne	LBB0_1
LBB0_4:
	movq	_NS_CLIENT@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	-80(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	callq	_NET_GetLoopPacket
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	leaq	-52(%rbp), %rbx
	leaq	-80(%rbp), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	-80(%rbp), %edi
	movq	%rbx, %rsi
	callq	_CL_PacketEvent
	movl	(%r15), %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_NET_GetLoopPacket
	testq	%rax, %rax
	jne	LBB0_6
LBB0_7:
	movq	_NS_SERVER@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	-80(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	callq	_NET_GetLoopPacket
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	movq	_com_sv_running@GOTPCREL(%rip), %r12
	leaq	-80(%rbp), %r14
	leaq	-52(%rbp), %rbx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r15), %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_NET_GetLoopPacket
	testq	%rax, %rax
	je	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_Com_RunAndTimeServerPacket
	jmp	LBB0_11
LBB0_12:
	movq	-88(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.13:
	movl	%r13d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	-72(%rbp), %rbx
	movl	-64(%rbp), %esi
	movl	-60(%rbp), %edi
	leaq	-80(%rbp), %r15
	leaq	LJTI0_0(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_Com_GetEvent
	movl	-80(%rbp), %edx
	movl	-76(%rbp), %r13d
	movq	-72(%rbp), %rbx
	movl	-64(%rbp), %esi
	movl	-60(%rbp), %edi
	cmpl	(%r14), %edx
	je	LBB0_4
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	-128(%rdx), %eax
	cmpl	$4, %eax
	ja	LBB0_19
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r12,%rax,4), %rax
	addq	%r12, %rax
	jmpq	*%rax
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %edx
	callq	_CL_MouseEvent
	testq	%rbx, %rbx
	jne	LBB0_21
	jmp	LBB0_22
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_ERR_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_Com_Error
	testq	%rbx, %rbx
	jne	LBB0_21
	jmp	LBB0_22
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %edx
	callq	_CL_KeyEvent
	testq	%rbx, %rbx
	jne	LBB0_21
	jmp	LBB0_22
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %edx
	callq	_CL_JoystickEvent
	testq	%rbx, %rbx
	jne	LBB0_21
	jmp	LBB0_22
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_Cbuf_AddText
	leaq	L_.str(%rip), %rdi
	callq	_Cbuf_AddText
	testq	%rbx, %rbx
	jne	LBB0_21
	jmp	LBB0_22
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	callq	_CL_CharEvent
	testq	%rbx, %rbx
	je	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_Z_Free
	jmp	LBB0_22
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
LJTI0_0:
	.long	L0_0_set_16
	.long	L0_0_set_14
	.long	L0_0_set_17
	.long	L0_0_set_18
	.long	L0_0_set_15
	.end_data_region
                                        ## -- End function
	.comm	_MAX_MSGLEN,4,2                 ## @MAX_MSGLEN
	.comm	_SE_NONE,4,2                    ## @SE_NONE
	.comm	_NS_CLIENT,4,2                  ## @NS_CLIENT
	.comm	_NS_SERVER,4,2                  ## @NS_SERVER
	.comm	_com_sv_running,8,3             ## @com_sv_running
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_ERR_FATAL,4,2                  ## @ERR_FATAL
L_.str.1:                               ## @.str.1
	.asciz	"Com_EventLoop: bad event type %i"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Com_EventLoop                  ; -- Begin function Com_EventLoop
	.p2align	2
_Com_EventLoop:                         ; @Com_EventLoop
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #48
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _MAX_MSGLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_MSGLEN@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	x8, x12, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x1, x9, x8
	mov	sp, x1
	lsl	w2, w12, #2
	sub	x0, x29, #76
	bl	_MSG_Init
	sub	x8, x29, #104
	bl	_Com_GetEvent
	ldp	w2, w19, [x29, #-104]
Lloh8:
	adrp	x24, _SE_NONE@GOTPAGE
Lloh9:
	ldr	x24, [x24, _SE_NONE@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w2, w8
	b.ne	LBB0_11
LBB0_1:
Lloh10:
	adrp	x20, _NS_CLIENT@GOTPAGE
Lloh11:
	ldr	x20, [x20, _NS_CLIENT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	sub	x1, x29, #104
	sub	x2, x29, #76
	bl	_NET_GetLoopPacket
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldur	w0, [x29, #-104]
	sub	x1, x29, #76
	bl	_CL_PacketEvent
	b	LBB0_2
LBB0_4:
Lloh12:
	adrp	x20, _NS_SERVER@GOTPAGE
Lloh13:
	ldr	x20, [x20, _NS_SERVER@GOTPAGEOFF]
	ldr	w0, [x20]
	sub	x1, x29, #104
	sub	x2, x29, #76
	bl	_NET_GetLoopPacket
	cbz	x0, LBB0_9
; %bb.5:
Lloh14:
	adrp	x21, _com_sv_running@GOTPAGE
Lloh15:
	ldr	x21, [x21, _com_sv_running@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x20]
	sub	x1, x29, #104
	sub	x2, x29, #76
	bl	_NET_GetLoopPacket
	cbz	x0, LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	sub	x0, x29, #104
	sub	x1, x29, #76
	bl	_Com_RunAndTimeServerPacket
	b	LBB0_6
LBB0_9:
	mov	sp, x23
	ldur	x8, [x29, #-72]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.10:
	mov	x0, x19
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldur	x22, [x29, #-96]
Lloh19:
	adrp	x20, l_.str.1@PAGE
Lloh20:
	add	x20, x20, l_.str.1@PAGEOFF
Lloh21:
	adrp	x25, lJTI0_0@PAGE
Lloh22:
	add	x25, x25, lJTI0_0@PAGEOFF
	ldp	w1, w0, [x29, #-88]
Lloh23:
	adrp	x21, l_.str@PAGE
Lloh24:
	add	x21, x21, l_.str@PAGEOFF
Lloh25:
	adrp	x26, _ERR_FATAL@GOTPAGE
Lloh26:
	ldr	x26, [x26, _ERR_FATAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	sub	x8, x29, #104
	bl	_Com_GetEvent
	ldp	w2, w19, [x29, #-104]
	ldur	x22, [x29, #-96]
	ldp	w1, w0, [x29, #-88]
	ldr	w8, [x24]
	cmp	w2, w8
	b.eq	LBB0_1
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sub	w8, w2, #128
	cmp	w8, #4
	b.hi	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	adr	x9, LBB0_15
	ldrb	w10, [x25, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_15:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x2, x19
	bl	_CL_MouseEvent
	cbnz	x22, LBB0_21
	b	LBB0_12
LBB0_16:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w0, [x26]
	mov	x1, x20
	bl	_Com_Error
	cbnz	x22, LBB0_21
	b	LBB0_12
LBB0_17:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x2, x19
	bl	_CL_KeyEvent
	cbnz	x22, LBB0_21
	b	LBB0_12
LBB0_18:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x2, x19
	bl	_CL_JoystickEvent
	cbnz	x22, LBB0_21
	b	LBB0_12
LBB0_19:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x22
	bl	_Cbuf_AddText
	mov	x0, x21
	bl	_Cbuf_AddText
	cbnz	x22, LBB0_21
	b	LBB0_12
LBB0_20:                                ;   in Loop: Header=BB0_13 Depth=1
	bl	_CL_CharEvent
	cbz	x22, LBB0_12
LBB0_21:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x22
	bl	_Z_Free
	b	LBB0_12
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_15-LBB0_15)>>2
	.byte	(LBB0_17-LBB0_15)>>2
	.byte	(LBB0_18-LBB0_15)>>2
	.byte	(LBB0_19-LBB0_15)>>2
	.byte	(LBB0_20-LBB0_15)>>2
                                        ; -- End function
	.comm	_MAX_MSGLEN,4,2                 ; @MAX_MSGLEN
	.comm	_SE_NONE,4,2                    ; @SE_NONE
	.comm	_NS_CLIENT,4,2                  ; @NS_CLIENT
	.comm	_NS_SERVER,4,2                  ; @NS_SERVER
	.comm	_com_sv_running,8,3             ; @com_sv_running
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_ERR_FATAL,4,2                  ; @ERR_FATAL
l_.str.1:                               ; @.str.1
	.asciz	"Com_EventLoop: bad event type %i"

.subsections_via_symbols
