	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_ClearLoopingSounds           ## -- Begin function S_ClearLoopingSounds
	.p2align	4, 0x90
_S_ClearLoopingSounds:                  ## @S_ClearLoopingSounds
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MAX_GENTITIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.1:
	movq	%rdi, %r14
	xorl	%r12d, %r12d
	movq	_loopSounds@GOTPCREL(%rip), %r13
	movq	_qfalse@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	movq	%rax, (%rcx,%r12)
	movl	%ebx, %edi
	callq	_S_StopLoopingSound
	movq	_MAX_GENTITIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	addq	$16, %r12
	cmpq	%rcx, %rbx
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rcx
	testq	%r14, %r14
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rcx,%r12), %rdx
	movq	_qtrue@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rcx,%r12), %rdx
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, (%rdx)
	jne	LBB0_7
	jmp	LBB0_6
LBB0_8:
	movq	_numLoopChannels@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_GENTITIES,4,2              ## @MAX_GENTITIES
	.comm	_loopSounds,8,3                 ## @loopSounds
	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_qfalse,8,3                     ## @qfalse
	.comm	_numLoopChannels,8,3            ## @numLoopChannels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_ClearLoopingSounds           ; -- Begin function S_ClearLoopingSounds
	.p2align	2
_S_ClearLoopingSounds:                  ; @S_ClearLoopingSounds
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, _MAX_GENTITIES@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAX_GENTITIES@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x0
	mov	x22, #0
	mov	x20, #0
Lloh2:
	adrp	x23, _loopSounds@GOTPAGE
Lloh3:
	ldr	x23, [x23, _loopSounds@GOTPAGEOFF]
Lloh4:
	adrp	x24, _qtrue@GOTPAGE
Lloh5:
	ldr	x24, [x24, _qtrue@GOTPAGEOFF]
Lloh6:
	adrp	x25, _qfalse@GOTPAGE
Lloh7:
	ldr	x25, [x25, _qfalse@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	str	x8, [x9, x22]
	mov	x0, x20
	bl	_S_StopLoopingSound
	ldr	w8, [x21]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	add	x22, x22, #16
	cmp	x20, w8, sxtw
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23]
	cbnz	x19, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x9, x22]
	ldr	x11, [x24]
	cmp	x10, x11
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x9, x22
	ldr	x10, [x10, #8]
	cbz	x10, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x10]
	cbnz	x10, LBB0_3
	b	LBB0_2
LBB0_8:
Lloh8:
	adrp	x8, _numLoopChannels@GOTPAGE
Lloh9:
	ldr	x8, [x8, _numLoopChannels@GOTPAGEOFF]
Lloh10:
	str	xzr, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_GENTITIES,4,2              ; @MAX_GENTITIES
	.comm	_loopSounds,8,3                 ; @loopSounds
	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_qfalse,8,3                     ; @qfalse
	.comm	_numLoopChannels,8,3            ; @numLoopChannels
.subsections_via_symbols
