	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_D_CheckNetGame                 ## -- Begin function D_CheckNetGame
	.p2align	4, 0x90
_D_CheckNetGame:                        ## @D_CheckNetGame
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_MAXNETNODES@GOTPCREL(%rip), %r8
	cmpl	$0, (%r8)
	jle	LBB0_3
## %bb.1:
	movq	_nodeingame@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_nettics@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_remoteresend@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	_resendto@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rcx,%rbx,4)
	movq	$0, (%rdx,%rbx,8)
	movl	$0, (%rsi,%rbx,4)
	movq	$0, (%rdi,%rbx,8)
	incq	%rbx
	movslq	(%r8), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	callq	_I_InitNetwork
	movq	_doomcom@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	(%rax), %rcx
	movq	_DOOMCOM_ID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_I_Error
	movq	(%rbx), %rax
LBB0_5:
	leaq	24(%rax), %rcx
	movq	_netbuffer@GOTPCREL(%rip), %rdx
	movq	%rcx, (%rdx)
	movl	8(%rax), %eax
	movq	_displayplayer@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_consoleplayer@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	movq	_netgame@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	_D_ArbitrateNetStart
LBB0_7:
	movq	_startskill@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_deathmatch@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_startmap@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_startepisode@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	(%rbx), %rsi
	movl	12(%rsi), %ecx
	movq	_ticdup@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movq	_BACKUPTICS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ecx, %ecx
	cltd
	idivl	%ecx
	cmpl	$3, %eax
	movl	$2, %ecx
	cmovgel	%eax, %ecx
	decl	%ecx
	movq	_maxsend@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movl	16(%rsi), %edx
	testl	%edx, %edx
	jle	LBB0_10
## %bb.8:
	movq	_playeringame@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, (%rax,%rcx,4)
	incq	%rcx
	movslq	16(%rsi), %rdx
	cmpq	%rdx, %rcx
	jl	LBB0_9
LBB0_10:
	movl	20(%rsi), %ecx
	testl	%ecx, %ecx
	jle	LBB0_14
## %bb.11:
	movq	_nodeingame@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, (%rax,%rdx,4)
	incq	%rdx
	movslq	20(%rsi), %rcx
	cmpq	%rcx, %rdx
	jl	LBB0_12
## %bb.13:
	movl	16(%rsi), %edx
LBB0_14:
	movl	(%r14), %esi
	incl	%esi
	leaq	L_.str.2(%rip), %rdi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_printf                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXNETNODES,4,2                ## @MAXNETNODES
	.comm	_nodeingame,8,3                 ## @nodeingame
	.comm	_nettics,8,3                    ## @nettics
	.comm	_remoteresend,8,3               ## @remoteresend
	.comm	_resendto,8,3                   ## @resendto
	.comm	_doomcom,8,3                    ## @doomcom
	.comm	_DOOMCOM_ID,8,3                 ## @DOOMCOM_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Doomcom buffer invalid!"

	.comm	_netbuffer,8,3                  ## @netbuffer
	.comm	_displayplayer,4,2              ## @displayplayer
	.comm	_consoleplayer,4,2              ## @consoleplayer
	.comm	_netgame,8,3                    ## @netgame
L_.str.1:                               ## @.str.1
	.asciz	"startskill %i  deathmatch: %i  startmap: %i  startepisode: %i\n"

	.comm	_startskill,4,2                 ## @startskill
	.comm	_deathmatch,4,2                 ## @deathmatch
	.comm	_startmap,4,2                   ## @startmap
	.comm	_startepisode,4,2               ## @startepisode
	.comm	_ticdup,4,2                     ## @ticdup
	.comm	_BACKUPTICS,4,2                 ## @BACKUPTICS
	.comm	_maxsend,4,2                    ## @maxsend
	.comm	_playeringame,8,3               ## @playeringame
L_.str.2:                               ## @.str.2
	.asciz	"player %i of %i (%i nodes)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_D_CheckNetGame                 ; -- Begin function D_CheckNetGame
	.p2align	2
_D_CheckNetGame:                        ; @D_CheckNetGame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _MAXNETNODES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAXNETNODES@GOTPAGEOFF]
	ldr	w9, [x8]
Lloh2:
	adrp	x19, _nodeingame@GOTPAGE
Lloh3:
	ldr	x19, [x19, _nodeingame@GOTPAGEOFF]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x9, #0
	ldr	x10, [x19]
Lloh4:
	adrp	x11, _nettics@GOTPAGE
Lloh5:
	ldr	x11, [x11, _nettics@GOTPAGEOFF]
Lloh6:
	ldr	x11, [x11]
Lloh7:
	adrp	x12, _remoteresend@GOTPAGE
Lloh8:
	ldr	x12, [x12, _remoteresend@GOTPAGEOFF]
Lloh9:
	ldr	x12, [x12]
Lloh10:
	adrp	x13, _resendto@GOTPAGE
Lloh11:
	ldr	x13, [x13, _resendto@GOTPAGEOFF]
Lloh12:
	ldr	x13, [x13]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x14, x9, #2
	str	wzr, [x10, x14]
	lsl	x15, x9, #3
	str	xzr, [x11, x15]
	str	wzr, [x12, x14]
	str	xzr, [x13, x15]
	add	x9, x9, #1
	ldrsw	x14, [x8]
	cmp	x9, x14
	b.lt	LBB0_2
LBB0_3:
	bl	_I_InitNetwork
Lloh13:
	adrp	x21, _doomcom@GOTPAGE
Lloh14:
	ldr	x21, [x21, _doomcom@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [x8]
Lloh15:
	adrp	x10, _DOOMCOM_ID@GOTPAGE
Lloh16:
	ldr	x10, [x10, _DOOMCOM_ID@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_5
; %bb.4:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_I_Error
	ldr	x8, [x21]
LBB0_5:
Lloh20:
	adrp	x9, _netbuffer@GOTPAGE
Lloh21:
	ldr	x9, [x9, _netbuffer@GOTPAGEOFF]
	add	x10, x8, #24
Lloh22:
	str	x10, [x9]
	ldr	w8, [x8, #8]
Lloh23:
	adrp	x9, _displayplayer@GOTPAGE
Lloh24:
	ldr	x9, [x9, _displayplayer@GOTPAGEOFF]
Lloh25:
	str	w8, [x9]
Lloh26:
	adrp	x20, _consoleplayer@GOTPAGE
Lloh27:
	ldr	x20, [x20, _consoleplayer@GOTPAGEOFF]
	str	w8, [x20]
Lloh28:
	adrp	x8, _netgame@GOTPAGE
Lloh29:
	ldr	x8, [x8, _netgame@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	bl	_D_ArbitrateNetStart
LBB0_7:
Lloh31:
	adrp	x8, _startskill@GOTPAGE
Lloh32:
	ldr	x8, [x8, _startskill@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x8, _deathmatch@GOTPAGE
Lloh35:
	ldr	x8, [x8, _deathmatch@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
Lloh37:
	adrp	x8, _startmap@GOTPAGE
Lloh38:
	ldr	x8, [x8, _startmap@GOTPAGEOFF]
Lloh39:
	ldr	w3, [x8]
Lloh40:
	adrp	x8, _startepisode@GOTPAGE
Lloh41:
	ldr	x8, [x8, _startepisode@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh43:
	adrp	x0, l_.str.1@PAGE
Lloh44:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	ldr	x8, [x21]
Lloh45:
	adrp	x9, _ticdup@GOTPAGE
Lloh46:
	ldr	x9, [x9, _ticdup@GOTPAGEOFF]
Lloh47:
	adrp	x10, _BACKUPTICS@GOTPAGE
Lloh48:
	ldr	x10, [x10, _BACKUPTICS@GOTPAGEOFF]
	ldp	w11, w2, [x8, #12]
Lloh49:
	str	w11, [x9]
Lloh50:
	ldr	w9, [x10]
	lsl	w10, w11, #1
	sdiv	w9, w9, w10
	mov	w10, #2
	cmp	w9, #2
	csel	w9, w9, w10, gt
	sub	w9, w9, #1
Lloh51:
	adrp	x10, _maxsend@GOTPAGE
Lloh52:
	ldr	x10, [x10, _maxsend@GOTPAGEOFF]
Lloh53:
	str	w9, [x10]
	cmp	w2, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x9, #0
Lloh54:
	adrp	x10, _playeringame@GOTPAGE
Lloh55:
	ldr	x10, [x10, _playeringame@GOTPAGEOFF]
Lloh56:
	ldr	x10, [x10]
	mov	w11, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	str	w11, [x10, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x2, [x8, #16]
	cmp	x9, x2
	b.lt	LBB0_9
LBB0_10:
	ldr	w3, [x8, #20]
	cmp	w3, #1
	b.lt	LBB0_14
; %bb.11:
	mov	x9, #0
	ldr	x10, [x19]
	mov	w11, #1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	str	w11, [x10, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x3, [x8, #20]
	cmp	x9, x3
	b.lt	LBB0_12
; %bb.13:
	ldr	w2, [x8, #16]
LBB0_14:
	ldr	w8, [x20]
	add	w1, w8, #1
Lloh57:
	adrp	x0, l_.str.2@PAGE
Lloh58:
	add	x0, x0, l_.str.2@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
                                        ; kill: def $w3 killed $w3 killed $x3
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_printf
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotStr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh50
	.loh AdrpLdrGotStr	Lloh45, Lloh46, Lloh49
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXNETNODES,4,2                ; @MAXNETNODES
	.comm	_nodeingame,8,3                 ; @nodeingame
	.comm	_nettics,8,3                    ; @nettics
	.comm	_remoteresend,8,3               ; @remoteresend
	.comm	_resendto,8,3                   ; @resendto
	.comm	_doomcom,8,3                    ; @doomcom
	.comm	_DOOMCOM_ID,8,3                 ; @DOOMCOM_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Doomcom buffer invalid!"

	.comm	_netbuffer,8,3                  ; @netbuffer
	.comm	_displayplayer,4,2              ; @displayplayer
	.comm	_consoleplayer,4,2              ; @consoleplayer
	.comm	_netgame,8,3                    ; @netgame
l_.str.1:                               ; @.str.1
	.asciz	"startskill %i  deathmatch: %i  startmap: %i  startepisode: %i\n"

	.comm	_startskill,4,2                 ; @startskill
	.comm	_deathmatch,4,2                 ; @deathmatch
	.comm	_startmap,4,2                   ; @startmap
	.comm	_startepisode,4,2               ; @startepisode
	.comm	_ticdup,4,2                     ; @ticdup
	.comm	_BACKUPTICS,4,2                 ; @BACKUPTICS
	.comm	_maxsend,4,2                    ; @maxsend
	.comm	_playeringame,8,3               ; @playeringame
l_.str.2:                               ; @.str.2
	.asciz	"player %i of %i (%i nodes)\n"

.subsections_via_symbols
