	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_Start                        ## -- Begin function S_Start
	.p2align	4, 0x90
_S_Start:                               ## @S_Start
	.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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_numChannels@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	_channels@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_S_StopChannel
	movl	(%r14), %eax
	jmp	LBB0_4
LBB0_5:
	movq	_mus_paused@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_gamemode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_commercial@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	_mus_runnin@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_gamemap@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	(%rax,%rcx), %edi
	decl	%edi
	jmp	LBB0_10
LBB0_7:
	movq	_mus_e3m4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	_mus_e3m2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	movq	_mus_e3m3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	_mus_e1m5@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movq	_mus_e2m7@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_mus_e2m4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	_mus_e2m6@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_mus_e2m5@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_mus_e1m9@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_gameepisode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$3, %eax
	jg	LBB0_9
## %bb.8:
	movq	_mus_e1m1@GOTPCREL(%rip), %rcx
	leal	(%rax,%rax,8), %eax
	movq	_gamemap@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	addl	(%rcx), %eax
	leal	(%rdx,%rax), %edi
	addl	$-10, %edi
	jmp	LBB0_10
LBB0_9:
	movq	_gamemap@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movl	-84(%rbp,%rax,4), %edi
LBB0_10:
	movl	$1, %esi
	callq	_S_ChangeMusic
	movq	_nextcleanup@GOTPCREL(%rip), %rax
	movl	$15, (%rax)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_numChannels,4,2                ## @numChannels
	.comm	_channels,8,3                   ## @channels
	.comm	_mus_paused,8,3                 ## @mus_paused
	.comm	_gamemode,8,3                   ## @gamemode
	.comm	_commercial,8,3                 ## @commercial
	.comm	_mus_runnin,4,2                 ## @mus_runnin
	.comm	_gamemap,4,2                    ## @gamemap
	.comm	_mus_e3m4,4,2                   ## @mus_e3m4
	.comm	_mus_e3m2,4,2                   ## @mus_e3m2
	.comm	_mus_e3m3,4,2                   ## @mus_e3m3
	.comm	_mus_e1m5,4,2                   ## @mus_e1m5
	.comm	_mus_e2m7,4,2                   ## @mus_e2m7
	.comm	_mus_e2m4,4,2                   ## @mus_e2m4
	.comm	_mus_e2m6,4,2                   ## @mus_e2m6
	.comm	_mus_e2m5,4,2                   ## @mus_e2m5
	.comm	_mus_e1m9,4,2                   ## @mus_e1m9
	.comm	_gameepisode,4,2                ## @gameepisode
	.comm	_mus_e1m1,4,2                   ## @mus_e1m1
	.comm	_nextcleanup,4,2                ## @nextcleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_Start                        ; -- Begin function S_Start
	.p2align	2
_S_Start:                               ; @S_Start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
Lloh3:
	adrp	x20, _numChannels@GOTPAGE
Lloh4:
	ldr	x20, [x20, _numChannels@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x19, #0
Lloh5:
	adrp	x21, _channels@GOTPAGE
Lloh6:
	ldr	x21, [x21, _channels@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x19, x19, #1
	cmp	x19, w8, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21]
	ldr	x9, [x9, x19, lsl #3]
	cbz	x9, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_S_StopChannel
	ldr	w8, [x20]
	b	LBB0_2
LBB0_5:
Lloh7:
	adrp	x8, _mus_paused@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mus_paused@GOTPAGEOFF]
Lloh9:
	adrp	x9, _gamemode@GOTPAGE
Lloh10:
	ldr	x9, [x9, _gamemode@GOTPAGEOFF]
Lloh11:
	str	xzr, [x8]
Lloh12:
	ldr	x8, [x9]
Lloh13:
	adrp	x9, _commercial@GOTPAGE
Lloh14:
	ldr	x9, [x9, _commercial@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
Lloh16:
	adrp	x8, _mus_runnin@GOTPAGE
Lloh17:
	ldr	x8, [x8, _mus_runnin@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _gamemap@GOTPAGE
Lloh20:
	ldr	x9, [x9, _gamemap@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	add	w8, w8, w9
	sub	w0, w8, #1
	b	LBB0_10
LBB0_7:
Lloh22:
	adrp	x8, _mus_e3m4@GOTPAGE
Lloh23:
	ldr	x8, [x8, _mus_e3m4@GOTPAGEOFF]
Lloh24:
	adrp	x9, _mus_e3m2@GOTPAGE
Lloh25:
	ldr	x9, [x9, _mus_e3m2@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #4]
Lloh28:
	adrp	x8, _mus_e3m3@GOTPAGE
Lloh29:
	ldr	x8, [x8, _mus_e3m3@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _mus_e1m5@GOTPAGE
Lloh32:
	ldr	x9, [x9, _mus_e1m5@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #12]
Lloh34:
	adrp	x8, _mus_e2m7@GOTPAGE
Lloh35:
	ldr	x8, [x8, _mus_e2m7@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _mus_e2m4@GOTPAGE
Lloh38:
	ldr	x9, [x9, _mus_e2m4@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #20]
Lloh40:
	adrp	x8, _mus_e2m6@GOTPAGE
Lloh41:
	ldr	x8, [x8, _mus_e2m6@GOTPAGEOFF]
Lloh42:
	adrp	x9, _mus_e2m5@GOTPAGE
Lloh43:
	ldr	x9, [x9, _mus_e2m5@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
Lloh45:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #28]
Lloh46:
	adrp	x8, _mus_e1m9@GOTPAGE
Lloh47:
	ldr	x8, [x8, _mus_e1m9@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	str	w8, [sp, #36]
Lloh49:
	adrp	x8, _gameepisode@GOTPAGE
Lloh50:
	ldr	x8, [x8, _gameepisode@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	cmp	w8, #3
	b.gt	LBB0_9
; %bb.8:
Lloh52:
	adrp	x9, _mus_e1m1@GOTPAGE
Lloh53:
	ldr	x9, [x9, _mus_e1m1@GOTPAGEOFF]
Lloh54:
	ldr	w9, [x9]
	add	w8, w8, w8, lsl #3
Lloh55:
	adrp	x10, _gamemap@GOTPAGE
Lloh56:
	ldr	x10, [x10, _gamemap@GOTPAGEOFF]
Lloh57:
	ldr	w10, [x10]
	add	w8, w8, w9
	add	w8, w8, w10
	sub	w0, w8, #10
	b	LBB0_10
LBB0_9:
Lloh58:
	adrp	x8, _gamemap@GOTPAGE
Lloh59:
	ldr	x8, [x8, _gamemap@GOTPAGEOFF]
Lloh60:
	ldrsw	x8, [x8]
	add	x9, sp, #4
	add	x8, x9, x8, lsl #2
	ldur	w0, [x8, #-4]
LBB0_10:
	mov	w1, #1
	bl	_S_ChangeMusic
Lloh61:
	adrp	x8, _nextcleanup@GOTPAGE
Lloh62:
	ldr	x8, [x8, _nextcleanup@GOTPAGEOFF]
	mov	w9, #15
Lloh63:
	str	w9, [x8]
	ldr	x8, [sp, #40]
Lloh64:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh65:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh66:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	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
	add	sp, sp, #96
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh44
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh26
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotStr	Lloh61, Lloh62, Lloh63
	.cfi_endproc
                                        ; -- End function
	.comm	_numChannels,4,2                ; @numChannels
	.comm	_channels,8,3                   ; @channels
	.comm	_mus_paused,8,3                 ; @mus_paused
	.comm	_gamemode,8,3                   ; @gamemode
	.comm	_commercial,8,3                 ; @commercial
	.comm	_mus_runnin,4,2                 ; @mus_runnin
	.comm	_gamemap,4,2                    ; @gamemap
	.comm	_mus_e3m4,4,2                   ; @mus_e3m4
	.comm	_mus_e3m2,4,2                   ; @mus_e3m2
	.comm	_mus_e3m3,4,2                   ; @mus_e3m3
	.comm	_mus_e1m5,4,2                   ; @mus_e1m5
	.comm	_mus_e2m7,4,2                   ; @mus_e2m7
	.comm	_mus_e2m4,4,2                   ; @mus_e2m4
	.comm	_mus_e2m6,4,2                   ; @mus_e2m6
	.comm	_mus_e2m5,4,2                   ; @mus_e2m5
	.comm	_mus_e1m9,4,2                   ; @mus_e1m9
	.comm	_gameepisode,4,2                ; @gameepisode
	.comm	_mus_e1m1,4,2                   ; @mus_e1m1
	.comm	_nextcleanup,4,2                ; @nextcleanup
.subsections_via_symbols
