	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_D_QuitNetGame                  ## -- Begin function D_QuitNetGame
	.p2align	4, 0x90
_D_QuitNetGame:                         ## @D_QuitNetGame
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_debugfile@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_fclose
LBB0_2:
	movq	_netgame@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_27
## %bb.3:
	movq	_usergame@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_27
## %bb.4:
	movq	_consoleplayer@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$-1, %eax
	je	LBB0_27
## %bb.5:
	movq	_demoplayback@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	jne	LBB0_27
## %bb.6:
	movq	_netbuffer@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	$0, 8(%rcx)
	movq	_doomcom@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	cmpl	$2, (%rax)
	jl	LBB0_11
## %bb.7:
	movl	$1, %ebx
	movq	_nodeingame@GOTPCREL(%rip), %r15
	movq	_NCMD_EXIT@GOTPCREL(%rip), %r12
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movslq	(%rax), %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_HSendPacket
	movq	(%r14), %rax
	jmp	LBB0_10
LBB0_27:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	$1, %edi
	callq	_I_WaitVBL
	movq	(%r14), %rax
	cmpl	$2, (%rax)
	jl	LBB0_16
## %bb.12:
	movl	$1, %ebx
	movq	_nodeingame@GOTPCREL(%rip), %r15
	movq	_NCMD_EXIT@GOTPCREL(%rip), %r12
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rbx
	movslq	(%rax), %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_HSendPacket
	movq	(%r14), %rax
	jmp	LBB0_15
LBB0_16:
	movl	$1, %edi
	callq	_I_WaitVBL
	movq	(%r14), %rax
	cmpl	$2, (%rax)
	jl	LBB0_21
## %bb.17:
	movl	$1, %ebx
	movq	_nodeingame@GOTPCREL(%rip), %r15
	movq	_NCMD_EXIT@GOTPCREL(%rip), %r12
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	incq	%rbx
	movslq	(%rax), %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_21
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_HSendPacket
	movq	(%r14), %rax
	jmp	LBB0_20
LBB0_21:
	movl	$1, %edi
	callq	_I_WaitVBL
	movq	(%r14), %rax
	cmpl	$2, (%rax)
	jl	LBB0_26
## %bb.22:
	movl	$1, %ebx
	movq	_nodeingame@GOTPCREL(%rip), %r15
	movq	_NCMD_EXIT@GOTPCREL(%rip), %r12
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_23 Depth=1
	incq	%rbx
	movslq	(%rax), %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_26
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=1
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_HSendPacket
	movq	(%r14), %rax
	jmp	LBB0_25
LBB0_26:
	movl	$1, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I_WaitVBL                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_debugfile,8,3                  ## @debugfile
	.comm	_netgame,4,2                    ## @netgame
	.comm	_usergame,4,2                   ## @usergame
	.comm	_consoleplayer,4,2              ## @consoleplayer
	.comm	_demoplayback,8,3               ## @demoplayback
	.comm	_netbuffer,8,3                  ## @netbuffer
	.comm	_doomcom,8,3                    ## @doomcom
	.comm	_nodeingame,8,3                 ## @nodeingame
	.comm	_NCMD_EXIT,4,2                  ## @NCMD_EXIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_D_QuitNetGame                  ; -- Begin function D_QuitNetGame
	.p2align	2
_D_QuitNetGame:                         ; @D_QuitNetGame
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _debugfile@GOTPAGE
Lloh1:
	ldr	x8, [x8, _debugfile@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_fclose
LBB0_2:
Lloh3:
	adrp	x8, _netgame@GOTPAGE
Lloh4:
	ldr	x8, [x8, _netgame@GOTPAGEOFF]
Lloh5:
	adrp	x9, _usergame@GOTPAGE
Lloh6:
	ldr	x9, [x9, _usergame@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x8]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x8, _consoleplayer@GOTPAGE
Lloh10:
	ldr	x8, [x8, _consoleplayer@GOTPAGEOFF]
Lloh11:
	adrp	x11, _demoplayback@GOTPAGE
Lloh12:
	ldr	x11, [x11, _demoplayback@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	ldr	x11, [x11]
	cmp	w10, #0
	ccmp	w9, #0, #4, ne
	ccmn	w8, #1, #4, ne
	ccmp	x11, #0, #0, ne
	b.eq	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh15:
	adrp	x9, _netbuffer@GOTPAGE
Lloh16:
	ldr	x9, [x9, _netbuffer@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	str	w8, [x9]
	str	xzr, [x9, #8]
Lloh18:
	adrp	x20, _doomcom@GOTPAGE
Lloh19:
	ldr	x20, [x20, _doomcom@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	w9, [x8]
Lloh20:
	adrp	x21, _nodeingame@GOTPAGE
Lloh21:
	ldr	x21, [x21, _nodeingame@GOTPAGEOFF]
Lloh22:
	adrp	x22, _NCMD_EXIT@GOTPAGE
Lloh23:
	ldr	x22, [x22, _NCMD_EXIT@GOTPAGEOFF]
	cmp	w9, #2
	b.lt	LBB0_9
; %bb.5:
	mov	w19, #1
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x19, x19, #1
	ldrsw	x9, [x8]
	cmp	x19, x9
	b.ge	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21]
	ldr	x9, [x9, x19, lsl #3]
	cbz	x9, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_HSendPacket
	ldr	x8, [x20]
	b	LBB0_6
LBB0_9:
	mov	w0, #1
	bl	_I_WaitVBL
	ldr	x8, [x20]
	ldr	w9, [x8]
	cmp	w9, #2
	b.lt	LBB0_14
; %bb.10:
	mov	w19, #1
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x19, x19, #1
	ldrsw	x9, [x8]
	cmp	x19, x9
	b.ge	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21]
	ldr	x9, [x9, x19, lsl #3]
	cbz	x9, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_HSendPacket
	ldr	x8, [x20]
	b	LBB0_11
LBB0_14:
	mov	w0, #1
	bl	_I_WaitVBL
	ldr	x8, [x20]
	ldr	w9, [x8]
	cmp	w9, #2
	b.lt	LBB0_19
; %bb.15:
	mov	w19, #1
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x19, x19, #1
	ldrsw	x9, [x8]
	cmp	x19, x9
	b.ge	LBB0_19
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21]
	ldr	x9, [x9, x19, lsl #3]
	cbz	x9, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_HSendPacket
	ldr	x8, [x20]
	b	LBB0_16
LBB0_19:
	mov	w0, #1
	bl	_I_WaitVBL
	ldr	x8, [x20]
	ldr	w9, [x8]
	cmp	w9, #2
	b.lt	LBB0_24
; %bb.20:
	mov	w19, #1
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	add	x19, x19, #1
	ldrsw	x9, [x8]
	cmp	x19, x9
	b.ge	LBB0_24
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21]
	ldr	x9, [x9, x19, lsl #3]
	cbz	x9, LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_HSendPacket
	ldr	x8, [x20]
	b	LBB0_21
LBB0_24:
	mov	w0, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_I_WaitVBL
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_debugfile,8,3                  ; @debugfile
	.comm	_netgame,4,2                    ; @netgame
	.comm	_usergame,4,2                   ; @usergame
	.comm	_consoleplayer,4,2              ; @consoleplayer
	.comm	_demoplayback,8,3               ; @demoplayback
	.comm	_netbuffer,8,3                  ; @netbuffer
	.comm	_doomcom,8,3                    ; @doomcom
	.comm	_nodeingame,8,3                 ; @nodeingame
	.comm	_NCMD_EXIT,4,2                  ; @NCMD_EXIT
.subsections_via_symbols
