	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_Init                         ## -- Begin function S_Init
	.p2align	4, 0x90
_S_Init:                                ## @S_Init
	.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
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_fprintf
	xorl	%eax, %eax
	callq	_I_SetChannels
	movl	%ebx, %edi
	callq	_S_SetSfxVolume
	movl	%r14d, %edi
	callq	_S_SetMusicVolume
	movq	_numChannels@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	shll	$3, %edi
	movq	_PU_STATIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_Z_Malloc
	movq	_channels@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	(%rbx), %esi
	testl	%esi, %esi
	jle	LBB0_2
## %bb.1:
	shlq	$3, %rsi
	movq	%rax, %rdi
	callq	___bzero
LBB0_2:
	movq	_mus_paused@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_NUMSFX@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jl	LBB0_5
## %bb.3:
	movq	_S_sfx@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$1, %edx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	$-1, (%rcx,%rdx,8)
	incq	%rdx
	movslq	(%rax), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_4
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"S_Init: default sfx volume %d\n"

	.comm	_numChannels,4,2                ## @numChannels
	.comm	_PU_STATIC,4,2                  ## @PU_STATIC
	.comm	_channels,8,3                   ## @channels
	.comm	_mus_paused,8,3                 ## @mus_paused
	.comm	_NUMSFX,4,2                     ## @NUMSFX
	.comm	_S_sfx,8,3                      ## @S_sfx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_Init                         ; -- Begin function S_Init
	.p2align	2
_S_Init:                                ; @S_Init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _stderr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_fprintf
	bl	_I_SetChannels
	mov	x0, x20
	bl	_S_SetSfxVolume
	mov	x0, x19
	bl	_S_SetMusicVolume
Lloh5:
	adrp	x19, _numChannels@GOTPAGE
Lloh6:
	ldr	x19, [x19, _numChannels@GOTPAGEOFF]
	ldr	w8, [x19]
	lsl	w0, w8, #3
Lloh7:
	adrp	x8, _PU_STATIC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PU_STATIC@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_Z_Malloc
Lloh10:
	adrp	x8, _channels@GOTPAGE
Lloh11:
	ldr	x8, [x8, _channels@GOTPAGEOFF]
Lloh12:
	str	x0, [x8]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.1:
	lsl	x1, x8, #3
	bl	_bzero
LBB0_2:
Lloh13:
	adrp	x8, _mus_paused@GOTPAGE
Lloh14:
	ldr	x8, [x8, _mus_paused@GOTPAGEOFF]
Lloh15:
	str	xzr, [x8]
Lloh16:
	adrp	x8, _NUMSFX@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NUMSFX@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.le	LBB0_5
; %bb.3:
Lloh18:
	adrp	x9, _S_sfx@GOTPAGE
Lloh19:
	ldr	x9, [x9, _S_sfx@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	mov	w10, #1
	movi.2d	v0, #0xffffffffffffffff
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	str	d0, [x9, x10, lsl #3]
	add	x10, x10, #1
	ldrsw	x11, [x8]
	cmp	x10, x11
	b.lt	LBB0_4
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"S_Init: default sfx volume %d\n"

	.comm	_numChannels,4,2                ; @numChannels
	.comm	_PU_STATIC,4,2                  ; @PU_STATIC
	.comm	_channels,8,3                   ; @channels
	.comm	_mus_paused,8,3                 ; @mus_paused
	.comm	_NUMSFX,4,2                     ; @NUMSFX
	.comm	_S_sfx,8,3                      ; @S_sfx
.subsections_via_symbols
