	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsp, -72(%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	-64(%rbp), %rdi
	callq	_MSG_Init
	leaq	-104(%rbp), %r15
	leaq	LJTI0_0(%rip), %r13
	jmp	LBB0_1
LBB0_22:                                ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.2(%rip), %rdi
	callq	_Com_Printf
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_Com_GetEvent
	movl	-104(%rbp), %edx
	movq	-96(%rbp), %r14
	leal	-128(%rdx), %eax
	cmpl	$6, %eax
	ja	LBB0_13
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-100(%rbp), %r12d
	movl	-84(%rbp), %esi
	movl	-80(%rbp), %edi
	movslq	(%r13,%rax,4), %rax
	addq	%r13, %rax
	jmpq	*%rax
LBB0_19:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	-88(%rbp), %ebx
	movq	_com_dropsim@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	jle	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_1 Depth=1
	leaq	_Com_EventLoop.seed(%rip), %rdi
	callq	_Q_random
	movq	_com_dropsim@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_26
LBB0_21:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r14), %eax
	movl	%eax, -52(%rbp)
	addl	$-4, %ebx
	movl	%ebx, -60(%rbp)
	cmpl	-64(%rbp), %ebx
	ja	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	-56(%rbp), %edi
	leaq	4(%r14), %rsi
	movl	%ebx, %edx
	callq	_Com_Memcpy
	movq	_com_sv_running@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_1 Depth=1
	leaq	-52(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_Com_RunAndTimeServerPacket
	testq	%r14, %r14
	jne	LBB0_27
	jmp	LBB0_1
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%r12d, %edx
	callq	_CL_KeyEvent
	testq	%r14, %r14
	jne	LBB0_27
	jmp	LBB0_1
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%r12d, %edx
	callq	_CL_JoystickEvent
	testq	%r14, %r14
	jne	LBB0_27
	jmp	LBB0_1
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_Cbuf_AddText
	leaq	L_.str.1(%rip), %rdi
	callq	_Cbuf_AddText
	testq	%r14, %r14
	jne	LBB0_27
	jmp	LBB0_1
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_ERR_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_Com_Error
	testq	%r14, %r14
	jne	LBB0_27
	jmp	LBB0_1
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%r12d, %edx
	callq	_CL_MouseEvent
	testq	%r14, %r14
	jne	LBB0_27
	jmp	LBB0_1
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	callq	_CL_CharEvent
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_1 Depth=1
	testq	%r14, %r14
	je	LBB0_1
LBB0_27:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_Z_Free
	jmp	LBB0_1
LBB0_25:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	-52(%rbp), %edi
	leaq	-64(%rbp), %rsi
	callq	_CL_PacketEvent
	testq	%r14, %r14
	jne	LBB0_27
	jmp	LBB0_1
LBB0_3:
	movq	_NS_CLIENT@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	-52(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	callq	_NET_GetLoopPacket
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	leaq	-64(%rbp), %rbx
	leaq	-52(%rbp), %r14
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-52(%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_5
LBB0_6:
	movq	_NS_SERVER@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	-52(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	callq	_NET_GetLoopPacket
	testq	%rax, %rax
	movq	_com_sv_running@GOTPCREL(%rip), %r13
	je	LBB0_11
## %bb.7:
	leaq	-52(%rbp), %r14
	leaq	-64(%rbp), %rbx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r15), %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_NET_GetLoopPacket
	testq	%rax, %rax
	je	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_Com_RunAndTimeServerPacket
	jmp	LBB0_10
LBB0_11:
	movq	-72(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_28
## %bb.12:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.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_19
	.long	L0_0_set_3
	.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	_NS_CLIENT,4,2                  ## @NS_CLIENT
	.comm	_NS_SERVER,4,2                  ## @NS_SERVER
	.comm	_com_sv_running,8,3             ## @com_sv_running
	.comm	_ERR_FATAL,4,2                  ## @ERR_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Com_EventLoop: bad event type %i"

L_.str.1:                               ## @.str.1
	.asciz	"\n"

	.comm	_com_dropsim,8,3                ## @com_dropsim
.zerofill __DATA,__bss,_Com_EventLoop.seed,4,2 ## @Com_EventLoop.seed
L_.str.2:                               ## @.str.2
	.asciz	"Com_EventLoop: oversize packet\n"

.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	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #64
	mov	x8, sp
	stur	x8, [x29, #-144]                ; 8-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
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, #104
	bl	_MSG_Init
Lloh8:
	adrp	x27, _ERR_FATAL@GOTPAGE
Lloh9:
	ldr	x27, [x27, _ERR_FATAL@GOTPAGEOFF]
Lloh10:
	adrp	x19, l_.str@PAGE
Lloh11:
	add	x19, x19, l_.str@PAGEOFF
Lloh12:
	adrp	x28, lJTI0_0@PAGE
Lloh13:
	add	x28, x28, lJTI0_0@PAGEOFF
Lloh14:
	adrp	x25, _com_dropsim@GOTPAGE
Lloh15:
	ldr	x25, [x25, _com_dropsim@GOTPAGEOFF]
Lloh16:
	adrp	x20, _Com_EventLoop.seed@PAGE
Lloh17:
	add	x20, x20, _Com_EventLoop.seed@PAGEOFF
Lloh18:
	adrp	x21, l_.str.2@PAGE
Lloh19:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh20:
	adrp	x26, _com_sv_running@GOTPAGE
Lloh21:
	ldr	x26, [x26, _com_sv_running@GOTPAGEOFF]
Lloh22:
	adrp	x22, l_.str.1@PAGE
Lloh23:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_Com_Printf
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	x8, x29, #136
	bl	_Com_GetEvent
	ldur	w2, [x29, #-136]
	ldur	x23, [x29, #-128]
	sub	w8, w2, #128
	cmp	w8, #6
	b.hi	LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldur	w24, [x29, #-132]
	ldp	w1, w0, [x29, #-116]
	adr	x9, LBB0_4
	ldrb	w10, [x28, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldur	w24, [x29, #-120]
	ldr	x8, [x25]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_Q_random
	ldr	x8, [x25]
	ldr	w8, [x8]
	cmp	w0, w8
	b.lt	LBB0_15
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x23]
	stur	w8, [x29, #-92]
	sub	w2, w24, #4
	stur	w2, [x29, #-100]
	ldur	w8, [x29, #-104]
	cmp	w2, w8
	b.hi	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldur	w0, [x29, #-96]
	add	x1, x23, #4
	bl	_Com_Memcpy
	ldr	x8, [x26]
	ldr	x8, [x8]
	cbz	x8, LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x0, x29, #92
	sub	x1, x29, #104
	bl	_Com_RunAndTimeServerPacket
	cbnz	x23, LBB0_16
	b	LBB0_2
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x2, x24
	bl	_CL_KeyEvent
	cbnz	x23, LBB0_16
	b	LBB0_2
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x2, x24
	bl	_CL_JoystickEvent
	cbnz	x23, LBB0_16
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_Cbuf_AddText
	mov	x0, x22
	bl	_Cbuf_AddText
	cbnz	x23, LBB0_16
	b	LBB0_2
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x27]
	mov	x1, x19
	bl	_Com_Error
	cbnz	x23, LBB0_16
	b	LBB0_2
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x2, x24
	bl	_CL_MouseEvent
	cbnz	x23, LBB0_16
	b	LBB0_2
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_CL_CharEvent
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	x23, LBB0_2
LBB0_16:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_Z_Free
	b	LBB0_2
LBB0_17:                                ;   in Loop: Header=BB0_2 Depth=1
	ldur	w0, [x29, #-92]
	sub	x1, x29, #104
	bl	_CL_PacketEvent
	cbnz	x23, LBB0_16
	b	LBB0_2
LBB0_18:
Lloh24:
	adrp	x19, _NS_CLIENT@GOTPAGE
Lloh25:
	ldr	x19, [x19, _NS_CLIENT@GOTPAGEOFF]
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	sub	x1, x29, #92
	sub	x2, x29, #104
	bl	_NET_GetLoopPacket
	cbz	x0, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldur	w0, [x29, #-92]
	sub	x1, x29, #104
	bl	_CL_PacketEvent
	b	LBB0_19
LBB0_21:
Lloh26:
	adrp	x19, _NS_SERVER@GOTPAGE
Lloh27:
	ldr	x19, [x19, _NS_SERVER@GOTPAGEOFF]
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	sub	x1, x29, #92
	sub	x2, x29, #104
	bl	_NET_GetLoopPacket
	cbz	x0, LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	x8, [x26]
	ldr	x8, [x8]
	cbz	x8, LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_22 Depth=1
	sub	x0, x29, #92
	sub	x1, x29, #104
	bl	_Com_RunAndTimeServerPacket
	b	LBB0_22
LBB0_25:
	ldur	x8, [x29, #-144]                ; 8-byte Folded Reload
	mov	sp, x8
	ldur	x8, [x29, #-88]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.26:
	mov	x0, x24
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_18-LBB0_4)>>2
	.byte	(LBB0_13-LBB0_4)>>2
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_10-LBB0_4)>>2
	.byte	(LBB0_11-LBB0_4)>>2
	.byte	(LBB0_14-LBB0_4)>>2
                                        ; -- End function
	.comm	_MAX_MSGLEN,4,2                 ; @MAX_MSGLEN
	.comm	_NS_CLIENT,4,2                  ; @NS_CLIENT
	.comm	_NS_SERVER,4,2                  ; @NS_SERVER
	.comm	_com_sv_running,8,3             ; @com_sv_running
	.comm	_ERR_FATAL,4,2                  ; @ERR_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Com_EventLoop: bad event type %i"

l_.str.1:                               ; @.str.1
	.asciz	"\n"

	.comm	_com_dropsim,8,3                ; @com_dropsim
.zerofill __DATA,__bss,_Com_EventLoop.seed,4,2 ; @Com_EventLoop.seed
l_.str.2:                               ; @.str.2
	.asciz	"Com_EventLoop: oversize packet\n"

.subsections_via_symbols
