	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_UpdateSounds                 ## -- Begin function S_UpdateSounds
	.p2align	4, 0x90
_S_UpdateSounds:                        ## @S_UpdateSounds
	.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	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_numChannels@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_14
## %bb.1:
	movl	$16, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_S_StopChannel
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	addq	$24, %r12
	cmpq	%rax, %rbx
	jge	LBB0_14
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_channels@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	(%r14,%r12), %r13
	testq	%r13, %r13
	je	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-8(%r14,%r12), %edi
	callq	_I_SoundIsPlaying
	testq	%rax, %rax
	je	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_snd_SfxVolume@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_NORM_PITCH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -48(%rbp)
	movq	_NORM_SEP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -52(%rbp)
	cmpq	$0, 16(%r13)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %ecx
	movl	%ecx, -48(%rbp)
	movl	8(%r13), %ecx
	addl	%eax, %ecx
	movl	%ecx, -44(%rbp)
	testl	%ecx, %ecx
	jle	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%eax, %ecx
	jle	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, -44(%rbp)
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-16(%r14,%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	-64(%rbp), %rsi                 ## 8-byte Folded Reload
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	-44(%rbp), %rdx
	leaq	-52(%rbp), %rcx
	leaq	-48(%rbp), %r8
	callq	_S_AdjustSoundParams
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	-8(%r14,%r12), %edi
	movl	-44(%rbp), %esi
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %ecx
	callq	_I_UpdateSoundParams
	jmp	LBB0_13
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_numChannels,4,2                ## @numChannels
	.comm	_channels,8,3                   ## @channels
	.comm	_snd_SfxVolume,4,2              ## @snd_SfxVolume
	.comm	_NORM_PITCH,4,2                 ## @NORM_PITCH
	.comm	_NORM_SEP,4,2                   ## @NORM_SEP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_UpdateSounds                 ; -- Begin function S_UpdateSounds
	.p2align	2
_S_UpdateSounds:                        ; @S_UpdateSounds
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x21, _numChannels@GOTPAGE
Lloh1:
	ldr	x21, [x21, _numChannels@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x19, x0
	mov	x22, #0
	mov	x20, #0
Lloh2:
	adrp	x23, _channels@GOTPAGE
Lloh3:
	ldr	x23, [x23, _channels@GOTPAGEOFF]
Lloh4:
	adrp	x25, _NORM_PITCH@GOTPAGE
Lloh5:
	ldr	x25, [x25, _NORM_PITCH@GOTPAGEOFF]
Lloh6:
	adrp	x26, _NORM_SEP@GOTPAGE
Lloh7:
	ldr	x26, [x26, _NORM_SEP@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_S_StopChannel
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x21]
	add	x22, x22, #24
	cmp	x20, x8
	b.ge	LBB0_13
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x28, [x23]
	add	x27, x28, x22
	ldr	x24, [x27, #16]
	cbz	x24, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x27, #8]
	bl	_I_SoundIsPlaying
	cbz	x0, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh8:
	adrp	x8, _snd_SfxVolume@GOTPAGE
Lloh9:
	ldr	x8, [x8, _snd_SfxVolume@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x25]
	str	w9, [sp, #4]
	ldr	w9, [x26]
	stp	w9, w8, [sp, #8]
	ldr	x9, [x24, #16]
	cbz	x9, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x24]
	str	w9, [sp, #4]
	ldr	w9, [x24, #8]
	add	w9, w8, w9
	str	w9, [sp, #12]
	cmp	w9, #0
	b.le	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w9, w8
	b.le	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [sp, #12]
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x28, x22]
	cmp	x1, #0
	ccmp	x1, x19, #4, ne
	b.eq	LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x2, sp, #12
	add	x3, sp, #8
	add	x4, sp, #4
	mov	x0, x19
	bl	_S_AdjustSoundParams
	cbz	w0, LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x27, #8]
	ldp	w2, w1, [sp, #8]
	ldr	w3, [sp, #4]
	bl	_I_UpdateSoundParams
	b	LBB0_3
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_numChannels,4,2                ; @numChannels
	.comm	_channels,8,3                   ; @channels
	.comm	_snd_SfxVolume,4,2              ; @snd_SfxVolume
	.comm	_NORM_PITCH,4,2                 ; @NORM_PITCH
	.comm	_NORM_SEP,4,2                   ; @NORM_SEP
.subsections_via_symbols
