	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_D_DoomLoop                     ## -- Begin function D_DoomLoop
	.p2align	4, 0x90
_D_DoomLoop:                            ## @D_DoomLoop
	.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
	movq	_demorecording@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_G_BeginRecording
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_M_CheckParm
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_consoleplayer@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_sprintf
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	callq	_printf
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	movq	_debugfile@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_4:
	xorl	%eax, %eax
	callq	_I_InitGraphics
	movq	_singletics@GOTPCREL(%rip), %r14
	movq	_players@GOTPCREL(%rip), %r15
	movq	_consoleplayer@GOTPCREL(%rip), %rbx
	movq	_maketic@GOTPCREL(%rip), %r13
	movq	_gametic@GOTPCREL(%rip), %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_TryRunTics
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rax
	movslq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_S_UpdateSounds
	xorl	%eax, %eax
	callq	_D_Display
	xorl	%eax, %eax
	callq	_I_UpdateSound
	xorl	%eax, %eax
	callq	_I_SubmitSound
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_I_StartFrame
	cmpq	$0, (%r14)
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_I_StartTic
	xorl	%eax, %eax
	callq	_D_ProcessEvents
	movq	_netcmds@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rbx), %rcx
	movq	(%rax,%rcx,8), %rcx
	movq	(%r13), %rax
	movq	_BACKUPTICS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	leaq	(%rcx,%rdx,4), %rdi
	callq	_G_BuildTiccmd
	movq	_advancedemo@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_D_DoAdvanceDemo
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_M_Ticker
	xorl	%eax, %eax
	callq	_G_Ticker
	incl	(%r12)
	incq	(%r13)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_demorecording,8,3              ## @demorecording
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-debugfile"

L_.str.1:                               ## @.str.1
	.asciz	"debug%i.txt"

	.comm	_consoleplayer,4,2              ## @consoleplayer
L_.str.2:                               ## @.str.2
	.asciz	"debug output to: %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"w"

	.comm	_debugfile,4,2                  ## @debugfile
	.comm	_singletics,8,3                 ## @singletics
	.comm	_netcmds,8,3                    ## @netcmds
	.comm	_maketic,8,3                    ## @maketic
	.comm	_BACKUPTICS,8,3                 ## @BACKUPTICS
	.comm	_advancedemo,8,3                ## @advancedemo
	.comm	_gametic,4,2                    ## @gametic
	.comm	_players,8,3                    ## @players
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_D_DoomLoop                     ; -- Begin function D_DoomLoop
	.p2align	2
_D_DoomLoop:                            ; @D_DoomLoop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, _demorecording@GOTPAGE
Lloh1:
	ldr	x8, [x8, _demorecording@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	bl	_G_BeginRecording
LBB0_2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_M_CheckParm
Lloh5:
	adrp	x19, _consoleplayer@GOTPAGE
Lloh6:
	ldr	x19, [x19, _consoleplayer@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w2, [x19]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #12
	bl	_sprintf
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x1, sp, #12
	bl	_printf
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x0, sp, #12
	bl	_fopen
Lloh13:
	adrp	x8, _debugfile@GOTPAGE
Lloh14:
	ldr	x8, [x8, _debugfile@GOTPAGEOFF]
Lloh15:
	str	w0, [x8]
LBB0_4:
	bl	_I_InitGraphics
Lloh16:
	adrp	x20, _singletics@GOTPAGE
Lloh17:
	ldr	x20, [x20, _singletics@GOTPAGEOFF]
Lloh18:
	adrp	x21, _players@GOTPAGE
Lloh19:
	ldr	x21, [x21, _players@GOTPAGEOFF]
Lloh20:
	adrp	x22, _netcmds@GOTPAGE
Lloh21:
	ldr	x22, [x22, _netcmds@GOTPAGEOFF]
Lloh22:
	adrp	x23, _maketic@GOTPAGE
Lloh23:
	ldr	x23, [x23, _maketic@GOTPAGEOFF]
Lloh24:
	adrp	x24, _BACKUPTICS@GOTPAGE
Lloh25:
	ldr	x24, [x24, _BACKUPTICS@GOTPAGEOFF]
Lloh26:
	adrp	x25, _advancedemo@GOTPAGE
Lloh27:
	ldr	x25, [x25, _advancedemo@GOTPAGEOFF]
Lloh28:
	adrp	x26, _gametic@GOTPAGE
Lloh29:
	ldr	x26, [x26, _gametic@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	bl	_TryRunTics
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x21]
	ldrsw	x9, [x19]
	ldr	w0, [x8, x9, lsl #2]
	bl	_S_UpdateSounds
	bl	_D_Display
	bl	_I_UpdateSound
	bl	_I_SubmitSound
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	bl	_I_StartFrame
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_I_StartTic
	bl	_D_ProcessEvents
	ldr	x8, [x22]
	ldrsw	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x9, [x23]
	ldr	x10, [x24]
	udiv	x11, x9, x10
	msub	x9, x11, x10, x9
	add	x0, x8, x9, lsl #2
	bl	_G_BuildTiccmd
	ldr	x8, [x25]
	cbz	x8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_D_DoAdvanceDemo
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_M_Ticker
	bl	_G_Ticker
	ldr	w8, [x26]
	add	w8, w8, #1
	str	w8, [x26]
	ldr	x8, [x23]
	add	x8, x8, #1
	str	x8, [x23]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_demorecording,8,3              ; @demorecording
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-debugfile"

l_.str.1:                               ; @.str.1
	.asciz	"debug%i.txt"

	.comm	_consoleplayer,4,2              ; @consoleplayer
l_.str.2:                               ; @.str.2
	.asciz	"debug output to: %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"w"

	.comm	_debugfile,4,2                  ; @debugfile
	.comm	_singletics,8,3                 ; @singletics
	.comm	_netcmds,8,3                    ; @netcmds
	.comm	_maketic,8,3                    ; @maketic
	.comm	_BACKUPTICS,8,3                 ; @BACKUPTICS
	.comm	_advancedemo,8,3                ; @advancedemo
	.comm	_gametic,4,2                    ; @gametic
	.comm	_players,8,3                    ; @players
.subsections_via_symbols
