	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_D_DoAdvanceDemo                ## -- Begin function D_DoAdvanceDemo
	.p2align	4, 0x90
_D_DoAdvanceDemo:                       ## @D_DoAdvanceDemo
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_PST_LIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_players@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_consoleplayer@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movq	_advancedemo@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_usergame@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_paused@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_ga_nothing@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_gameaction@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_gamemode@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_retail@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	xorl	%edi, %edi
	cmpq	%rsi, %r8
	sete	%dil
	movq	_demosequence@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	incl	%eax
	orl	$6, %edi
	cltd
	idivl	%edi
                                        ## kill: def $edx killed $edx def $rdx
	movl	%edx, (%rcx)
	cmpl	$6, %edx
	ja	LBB0_14
## %bb.1:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rdx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_2:
	movq	_commercial@GOTPCREL(%rip), %rax
	movq	_GS_DEMOSCREEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_gamestate@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	leaq	L_.str(%rip), %rcx
	movq	_pagename@GOTPCREL(%rip), %rdx
	movq	%rcx, (%rdx)
	movl	$385, %ecx                      ## imm = 0x181
	movl	$170, %edx
	cmpq	(%rax), %r8
	cmovel	%ecx, %edx
	movq	_pagetic@GOTPCREL(%rip), %rax
	movl	%edx, (%rax)
	je	LBB0_3
## %bb.5:
	movq	_mus_intro@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_9:
	movq	_GS_DEMOSCREEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_gamestate@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_commercial@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r8
	jne	LBB0_11
## %bb.10:
	movq	_pagetic@GOTPCREL(%rip), %rax
	movl	$385, (%rax)                    ## imm = 0x181
	leaq	L_.str(%rip), %rax
	movq	_pagename@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_3:
	movq	_mus_dm2ttl@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edi
	popq	%rbp
	jmp	_S_StartMusic                   ## TAILCALL
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	popq	%rbp
	jmp	_G_DeferedPlayDemo              ## TAILCALL
LBB0_7:
	movq	_pagetic@GOTPCREL(%rip), %rax
	movl	$200, (%rax)
	movq	_GS_DEMOSCREEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_gamestate@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_12
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	popq	%rbp
	jmp	_G_DeferedPlayDemo              ## TAILCALL
LBB0_16:
	leaq	L_.str.5(%rip), %rdi
	popq	%rbp
	jmp	_G_DeferedPlayDemo              ## TAILCALL
LBB0_17:
	leaq	L_.str.6(%rip), %rdi
	popq	%rbp
	jmp	_G_DeferedPlayDemo              ## TAILCALL
LBB0_11:
	movq	_pagetic@GOTPCREL(%rip), %rax
	movl	$200, (%rax)
	cmpq	%rsi, %r8
	jne	LBB0_15
LBB0_12:
	leaq	L_.str.2(%rip), %rax
LBB0_13:
	movq	_pagename@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_14:
	popq	%rbp
	retq
LBB0_15:
	leaq	L_.str.4(%rip), %rax
	jmp	LBB0_13
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_16
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_PST_LIVE,4,2                   ## @PST_LIVE
	.comm	_players,8,3                    ## @players
	.comm	_consoleplayer,8,3              ## @consoleplayer
	.comm	_advancedemo,4,2                ## @advancedemo
	.comm	_usergame,4,2                   ## @usergame
	.comm	_paused,4,2                     ## @paused
	.comm	_ga_nothing,4,2                 ## @ga_nothing
	.comm	_gameaction,4,2                 ## @gameaction
	.comm	_gamemode,8,3                   ## @gamemode
	.comm	_retail,8,3                     ## @retail
	.comm	_demosequence,4,2               ## @demosequence
	.comm	_commercial,8,3                 ## @commercial
	.comm	_pagetic,4,2                    ## @pagetic
	.comm	_GS_DEMOSCREEN,4,2              ## @GS_DEMOSCREEN
	.comm	_gamestate,4,2                  ## @gamestate
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TITLEPIC"

	.comm	_pagename,8,3                   ## @pagename
	.comm	_mus_dm2ttl,4,2                 ## @mus_dm2ttl
	.comm	_mus_intro,4,2                  ## @mus_intro
L_.str.1:                               ## @.str.1
	.asciz	"demo1"

L_.str.2:                               ## @.str.2
	.asciz	"CREDIT"

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

L_.str.4:                               ## @.str.4
	.asciz	"HELP2"

L_.str.5:                               ## @.str.5
	.asciz	"demo3"

L_.str.6:                               ## @.str.6
	.asciz	"demo4"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_D_DoAdvanceDemo                ; -- Begin function D_DoAdvanceDemo
	.p2align	2
_D_DoAdvanceDemo:                       ; @D_DoAdvanceDemo
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _PST_LIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PST_LIVE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _players@GOTPAGE
Lloh4:
	ldr	x9, [x9, _players@GOTPAGEOFF]
Lloh5:
	adrp	x10, _consoleplayer@GOTPAGE
Lloh6:
	ldr	x10, [x10, _consoleplayer@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
Lloh9:
	adrp	x8, _advancedemo@GOTPAGE
Lloh10:
	ldr	x8, [x8, _advancedemo@GOTPAGEOFF]
Lloh11:
	str	wzr, [x8]
Lloh12:
	adrp	x8, _usergame@GOTPAGE
Lloh13:
	ldr	x8, [x8, _usergame@GOTPAGEOFF]
Lloh14:
	str	wzr, [x8]
Lloh15:
	adrp	x8, _paused@GOTPAGE
Lloh16:
	ldr	x8, [x8, _paused@GOTPAGEOFF]
Lloh17:
	str	wzr, [x8]
Lloh18:
	adrp	x8, _ga_nothing@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ga_nothing@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _gameaction@GOTPAGE
Lloh22:
	ldr	x9, [x9, _gameaction@GOTPAGEOFF]
Lloh23:
	str	w8, [x9]
Lloh24:
	adrp	x8, _gamemode@GOTPAGE
Lloh25:
	ldr	x8, [x8, _gamemode@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
Lloh27:
	adrp	x9, _retail@GOTPAGE
Lloh28:
	ldr	x9, [x9, _retail@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
Lloh30:
	adrp	x11, _demosequence@GOTPAGE
Lloh31:
	ldr	x11, [x11, _demosequence@GOTPAGEOFF]
	ldr	w10, [x11]
	add	w10, w10, #1
	cmp	x8, x9
	mov	w12, #6
	cinc	w12, w12, eq
	sdiv	w13, w10, w12
	msub	w10, w13, w12, w10
	str	w10, [x11]
	cmp	w10, #6
	b.hi	LBB0_15
; %bb.1:
Lloh32:
	adrp	x11, lJTI0_0@PAGE
Lloh33:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_2
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_2:
Lloh34:
	adrp	x9, _commercial@GOTPAGE
Lloh35:
	ldr	x9, [x9, _commercial@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
Lloh37:
	adrp	x10, _GS_DEMOSCREEN@GOTPAGE
Lloh38:
	ldr	x10, [x10, _GS_DEMOSCREEN@GOTPAGEOFF]
Lloh39:
	ldr	w10, [x10]
Lloh40:
	adrp	x11, _gamestate@GOTPAGE
Lloh41:
	ldr	x11, [x11, _gamestate@GOTPAGEOFF]
Lloh42:
	str	w10, [x11]
Lloh43:
	adrp	x10, _pagename@GOTPAGE
Lloh44:
	ldr	x10, [x10, _pagename@GOTPAGEOFF]
Lloh45:
	adrp	x11, l_.str@PAGE
Lloh46:
	add	x11, x11, l_.str@PAGEOFF
Lloh47:
	str	x11, [x10]
	mov	w10, #170
	mov	w11, #385
	cmp	x8, x9
	csel	w8, w11, w10, eq
Lloh48:
	adrp	x9, _pagetic@GOTPAGE
Lloh49:
	ldr	x9, [x9, _pagetic@GOTPAGEOFF]
Lloh50:
	str	w8, [x9]
	b.eq	LBB0_6
; %bb.3:
Lloh51:
	adrp	x8, _mus_intro@GOTPAGE
Lloh52:
	ldr	x8, [x8, _mus_intro@GOTPAGEOFF]
Lloh53:
	ldr	w0, [x8]
	b	_S_StartMusic
LBB0_4:
Lloh54:
	adrp	x10, _GS_DEMOSCREEN@GOTPAGE
Lloh55:
	ldr	x10, [x10, _GS_DEMOSCREEN@GOTPAGEOFF]
Lloh56:
	adrp	x11, _gamestate@GOTPAGE
Lloh57:
	ldr	x11, [x11, _gamestate@GOTPAGEOFF]
Lloh58:
	ldr	w10, [x10]
Lloh59:
	str	w10, [x11]
Lloh60:
	adrp	x10, _commercial@GOTPAGE
Lloh61:
	ldr	x10, [x10, _commercial@GOTPAGEOFF]
Lloh62:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_12
; %bb.5:
Lloh63:
	adrp	x8, _pagetic@GOTPAGE
Lloh64:
	ldr	x8, [x8, _pagetic@GOTPAGEOFF]
	mov	w9, #385
Lloh65:
	adrp	x10, _pagename@GOTPAGE
Lloh66:
	ldr	x10, [x10, _pagename@GOTPAGEOFF]
Lloh67:
	adrp	x11, l_.str@PAGE
Lloh68:
	add	x11, x11, l_.str@PAGEOFF
Lloh69:
	str	w9, [x8]
Lloh70:
	str	x11, [x10]
LBB0_6:
Lloh71:
	adrp	x8, _mus_dm2ttl@GOTPAGE
Lloh72:
	ldr	x8, [x8, _mus_dm2ttl@GOTPAGEOFF]
Lloh73:
	ldr	w0, [x8]
	b	_S_StartMusic
LBB0_7:
Lloh74:
	adrp	x0, l_.str.1@PAGE
Lloh75:
	add	x0, x0, l_.str.1@PAGEOFF
	b	_G_DeferedPlayDemo
LBB0_8:
Lloh76:
	adrp	x8, _pagetic@GOTPAGE
Lloh77:
	ldr	x8, [x8, _pagetic@GOTPAGEOFF]
	mov	w9, #200
Lloh78:
	str	w9, [x8]
Lloh79:
	adrp	x8, _GS_DEMOSCREEN@GOTPAGE
Lloh80:
	ldr	x8, [x8, _GS_DEMOSCREEN@GOTPAGEOFF]
Lloh81:
	ldr	w8, [x8]
Lloh82:
	adrp	x9, _gamestate@GOTPAGE
Lloh83:
	ldr	x9, [x9, _gamestate@GOTPAGEOFF]
Lloh84:
	str	w8, [x9]
	b	LBB0_13
LBB0_9:
Lloh85:
	adrp	x0, l_.str.3@PAGE
Lloh86:
	add	x0, x0, l_.str.3@PAGEOFF
	b	_G_DeferedPlayDemo
LBB0_10:
Lloh87:
	adrp	x0, l_.str.5@PAGE
Lloh88:
	add	x0, x0, l_.str.5@PAGEOFF
	b	_G_DeferedPlayDemo
LBB0_11:
Lloh89:
	adrp	x0, l_.str.6@PAGE
Lloh90:
	add	x0, x0, l_.str.6@PAGEOFF
	b	_G_DeferedPlayDemo
LBB0_12:
Lloh91:
	adrp	x10, _pagetic@GOTPAGE
Lloh92:
	ldr	x10, [x10, _pagetic@GOTPAGEOFF]
	mov	w11, #200
Lloh93:
	str	w11, [x10]
	cmp	x8, x9
	b.ne	LBB0_16
LBB0_13:
Lloh94:
	adrp	x8, _pagename@GOTPAGE
Lloh95:
	ldr	x8, [x8, _pagename@GOTPAGEOFF]
Lloh96:
	adrp	x9, l_.str.2@PAGE
Lloh97:
	add	x9, x9, l_.str.2@PAGEOFF
LBB0_14:
	str	x9, [x8]
LBB0_15:
	ret
LBB0_16:
Lloh98:
	adrp	x8, _pagename@GOTPAGE
Lloh99:
	ldr	x8, [x8, _pagename@GOTPAGEOFF]
Lloh100:
	adrp	x9, l_.str.4@PAGE
Lloh101:
	add	x9, x9, l_.str.4@PAGEOFF
	b	LBB0_14
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotStr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotStr	Lloh43, Lloh44, Lloh47
	.loh AdrpLdrGotStr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotStr	Lloh56, Lloh57, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh58
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpLdrGotStr	Lloh65, Lloh66, Lloh70
	.loh AdrpLdrGotStr	Lloh63, Lloh64, Lloh69
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpLdrGotStr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotStr	Lloh76, Lloh77, Lloh78
	.loh AdrpAdd	Lloh85, Lloh86
	.loh AdrpAdd	Lloh87, Lloh88
	.loh AdrpAdd	Lloh89, Lloh90
	.loh AdrpLdrGotStr	Lloh91, Lloh92, Lloh93
	.loh AdrpAdd	Lloh96, Lloh97
	.loh AdrpLdrGot	Lloh94, Lloh95
	.loh AdrpAdd	Lloh100, Lloh101
	.loh AdrpLdrGot	Lloh98, Lloh99
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
                                        ; -- End function
	.comm	_PST_LIVE,4,2                   ; @PST_LIVE
	.comm	_players,8,3                    ; @players
	.comm	_consoleplayer,8,3              ; @consoleplayer
	.comm	_advancedemo,4,2                ; @advancedemo
	.comm	_usergame,4,2                   ; @usergame
	.comm	_paused,4,2                     ; @paused
	.comm	_ga_nothing,4,2                 ; @ga_nothing
	.comm	_gameaction,4,2                 ; @gameaction
	.comm	_gamemode,8,3                   ; @gamemode
	.comm	_retail,8,3                     ; @retail
	.comm	_demosequence,4,2               ; @demosequence
	.comm	_commercial,8,3                 ; @commercial
	.comm	_pagetic,4,2                    ; @pagetic
	.comm	_GS_DEMOSCREEN,4,2              ; @GS_DEMOSCREEN
	.comm	_gamestate,4,2                  ; @gamestate
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TITLEPIC"

	.comm	_pagename,8,3                   ; @pagename
	.comm	_mus_dm2ttl,4,2                 ; @mus_dm2ttl
	.comm	_mus_intro,4,2                  ; @mus_intro
l_.str.1:                               ; @.str.1
	.asciz	"demo1"

l_.str.2:                               ; @.str.2
	.asciz	"CREDIT"

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

l_.str.4:                               ; @.str.4
	.asciz	"HELP2"

l_.str.5:                               ; @.str.5
	.asciz	"demo3"

l_.str.6:                               ; @.str.6
	.asciz	"demo4"

.subsections_via_symbols
