	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Sys_QueEvent                   ## -- Begin function Sys_QueEvent
	.p2align	4, 0x90
_Sys_QueEvent:                          ## @Sys_QueEvent
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	_eventQue@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_eventHead@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	_MASK_QUED_EVENTS@GOTPCREL(%rip), %rdi
	movq	(%rdi), %r12
	movq	_eventTail@GOTPCREL(%rip), %rdi
	movq	%rax, %rbx
	subq	(%rdi), %rbx
	andq	%rax, %r12
	movq	_MAX_QUED_EVENTS@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rbx
	jb	LBB0_4
## %bb.1:
	movl	%esi, %ebx
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	callq	_Com_Printf
	movq	%r12, %rax
	shlq	$5, %rax
	movq	16(%r15,%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_Z_Free
LBB0_3:
	movq	_eventTail@GOTPCREL(%rip), %rax
	incq	(%rax)
	movq	(%r13), %rax
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %esi
LBB0_4:
	incq	%rax
	movq	%rax, (%r13)
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	%r8d, %ebx
	movl	%ecx, %r13d
	movl	%edx, %r14d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	callq	_Sys_Milliseconds
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movl	%eax, %r14d
LBB0_6:
	shlq	$5, %r12
	movl	%r14d, (%r15,%r12)
	movl	%esi, 24(%r15,%r12)
	movl	%edx, 4(%r15,%r12)
	movl	%ecx, 8(%r15,%r12)
	movl	%r8d, 12(%r15,%r12)
	movq	%r9, 16(%r15,%r12)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_eventQue,8,3                   ## @eventQue
	.comm	_eventHead,8,3                  ## @eventHead
	.comm	_MASK_QUED_EVENTS,8,3           ## @MASK_QUED_EVENTS
	.comm	_eventTail,8,3                  ## @eventTail
	.comm	_MAX_QUED_EVENTS,8,3            ## @MAX_QUED_EVENTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Sys_QueEvent: overflow\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Sys_QueEvent                   ; -- Begin function Sys_QueEvent
	.p2align	2
_Sys_QueEvent:                          ; @Sys_QueEvent
	.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
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _eventQue@GOTPAGE
Lloh1:
	ldr	x8, [x8, _eventQue@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
Lloh3:
	adrp	x27, _eventHead@GOTPAGE
Lloh4:
	ldr	x27, [x27, _eventHead@GOTPAGEOFF]
	ldr	x8, [x27]
Lloh5:
	adrp	x9, _MASK_QUED_EVENTS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MASK_QUED_EVENTS@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	and	x26, x9, x8
Lloh8:
	adrp	x28, _eventTail@GOTPAGE
Lloh9:
	ldr	x28, [x28, _eventTail@GOTPAGEOFF]
	ldr	x9, [x28]
Lloh10:
	adrp	x10, _MAX_QUED_EVENTS@GOTPAGE
Lloh11:
	ldr	x10, [x10, _MAX_QUED_EVENTS@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	sub	x9, x8, x9
	cmp	x9, x10
	b.lo	LBB0_4
; %bb.1:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Com_Printf
	add	x8, x25, x26, lsl #5
	ldr	x0, [x8, #16]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_Z_Free
LBB0_3:
	ldr	x8, [x28]
	add	x8, x8, #1
	str	x8, [x28]
	ldr	x8, [x27]
LBB0_4:
	add	x8, x8, #1
	str	x8, [x27]
	cbnz	w24, LBB0_6
; %bb.5:
	bl	_Sys_Milliseconds
	mov	x24, x0
LBB0_6:
	add	x8, x25, x26, lsl #5
	str	w23, [x8, #24]
	stp	w24, w22, [x8]
	stp	w21, w20, [x8, #8]
	str	x19, [x8, #16]
	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
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_eventQue,8,3                   ; @eventQue
	.comm	_eventHead,8,3                  ; @eventHead
	.comm	_MASK_QUED_EVENTS,8,3           ; @MASK_QUED_EVENTS
	.comm	_eventTail,8,3                  ; @eventTail
	.comm	_MAX_QUED_EVENTS,8,3            ; @MAX_QUED_EVENTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Sys_QueEvent: overflow\n"

.subsections_via_symbols
