	.file	"extr_snd_dma.c_S_ClearSoundBuffer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	S_ClearSoundBuffer
	.type	S_ClearSoundBuffer, @function
S_ClearSoundBuffer:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR s_soundStarted[rip]
	test	eax, eax
	jne	.L13
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	mov	eax, DWORD PTR MAX_GENTITIES[rip]
	mov	edi, DWORD PTR loopSounds[rip]
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	esi, esi
	xor	ebp, ebp
	lea	edx, 0[0+rax*4]
	call	Com_Memset@PLT
	mov	eax, DWORD PTR MAX_CHANNELS[rip]
	mov	edi, DWORD PTR loop_channels[rip]
	xor	esi, esi
	lea	edx, 0[0+rax*4]
	call	Com_Memset@PLT
	xor	eax, eax
	mov	QWORD PTR numLoopChannels[rip], 0
	call	S_ChannelSetup@PLT
	cmp	DWORD PTR dma[rip], 8
	mov	QWORD PTR s_rawend[rip], 0
	sete	bpl
	xor	eax, eax
	call	SNDDMA_BeginPainting@PLT
	mov	rdi, QWORD PTR dma[rip+8]
	sal	ebp, 7
	test	rdi, rdi
	jne	.L14
	xor	eax, eax
	pop	rbp
	.cfi_remember_state
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	SNDDMA_Submit@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	edx, DWORD PTR dma[rip+4]
	mov	eax, DWORD PTR dma[rip]
	mov	esi, ebp
	imul	eax, edx
	test	eax, eax
	lea	edx, 7[rax]
	cmovns	edx, eax
	sar	edx, 3
	call	Snd_Memset@PLT
	xor	eax, eax
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	SNDDMA_Submit@PLT
	.cfi_endproc
.LFE0:
	.size	S_ClearSoundBuffer, .-S_ClearSoundBuffer
	.comm	s_soundStarted,4,4
	.comm	s_rawend,8,8
	.comm	numLoopChannels,8,8
	.comm	loop_channels,4,4
	.comm	loopSounds,4,4
	.comm	dma,16,16
	.comm	MAX_GENTITIES,4,4
	.comm	MAX_CHANNELS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_snd_dma.c_S_ClearSoundBuffer.c"
	.text
	.align	2
	.global	S_ClearSoundBuffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	S_ClearSoundBuffer, %function
S_ClearSoundBuffer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L14
	ldr	r3, [r3]
	cmp	r3, #0
	bxeq	lr
	push	{r4, r5, r6, lr}
	mov	r5, #0
	ldr	r2, .L14+4
	ldr	r3, .L14+8
	ldr	r2, [r2]
	mov	r1, r5
	ldr	r0, [r3]
	lsl	r2, r2, #2
	bl	Com_Memset
	ldr	r2, .L14+12
	ldr	r3, .L14+16
	ldr	r2, [r2]
	mov	r1, r5
	lsl	r2, r2, #2
	ldr	r0, [r3]
	bl	Com_Memset
	ldr	r4, .L14+20
	ldr	r3, .L14+24
	str	r5, [r3]
	bl	S_ChannelSetup
	ldr	r2, [r4]
	ldr	r3, .L14+28
	cmp	r2, #8
	str	r5, [r3]
	moveq	r5, #128
	bl	SNDDMA_BeginPainting
	ldr	r0, [r4, #8]
	cmp	r0, #0
	bne	.L13
	pop	{r4, r5, r6, lr}
	b	SNDDMA_Submit
.L13:
	ldr	r3, [r4]
	ldr	r2, [r4, #4]
	mov	r1, r5
	mul	r2, r3, r2
	add	r3, r2, #7
	cmp	r2, #0
	movlt	r2, r3
	asr	r2, r2, #3
	bl	Snd_Memset
	pop	{r4, r5, r6, lr}
	b	SNDDMA_Submit
.L15:
	.align	2
.L14:
	.word	s_soundStarted
	.word	MAX_GENTITIES
	.word	loopSounds
	.word	MAX_CHANNELS
	.word	loop_channels
	.word	dma
	.word	numLoopChannels
	.word	s_rawend
	.size	S_ClearSoundBuffer, .-S_ClearSoundBuffer
	.comm	s_soundStarted,4,4
	.comm	s_rawend,4,4
	.comm	numLoopChannels,4,4
	.comm	loop_channels,4,4
	.comm	loopSounds,4,4
	.comm	dma,12,4
	.comm	MAX_GENTITIES,4,4
	.comm	MAX_CHANNELS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
