	.file	"extr_sdl-sound.c_WriteSound.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	WriteSound
	.type	WriteSound, @function
WriteSound:
.LFB0:
	.cfi_startproc
	endbr64
	test	esi, esi
	je	.L12
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	lea	eax, -1[rsi]
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	lea	rbp, 4[rdi+rax*4]
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rcx, QWORD PTR BufferIn[rip]
	mov	rsi, QWORD PTR BufferSize[rip]
	.p2align 4,,10
	.p2align 3
.L3:
	cmp	rsi, rcx
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, 1
	call	SDL_Delay@PLT
	mov	rcx, QWORD PTR BufferIn[rip]
	mov	rsi, QWORD PTR BufferSize[rip]
	cmp	rcx, rsi
	je	.L4
.L5:
	mov	edi, DWORD PTR [rbx]
	mov	rax, QWORD PTR BufferWrite[rip]
	add	rcx, 1
	add	rbx, 4
	mov	rdx, QWORD PTR Buffer[rip]
	mov	DWORD PTR [rdx+rax*4], edi
	add	rax, 1
	xor	edx, edx
	div	rsi
	mov	QWORD PTR BufferIn[rip], rcx
	mov	QWORD PTR BufferWrite[rip], rdx
	cmp	rbp, rbx
	jne	.L3
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE0:
	.size	WriteSound, .-WriteSound
	.comm	BufferWrite,8,8
	.comm	BufferSize,8,8
	.comm	BufferIn,8,8
	.comm	Buffer,8,8
	.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_sdl-sound.c_WriteSound.c"
	.text
	.global	__aeabi_uidivmod
	.align	2
	.global	WriteSound
	.syntax unified
	.arm
	.fpu softvfp
	.type	WriteSound, %function
WriteSound:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r7, r1, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r8, r0
	ldr	r5, .L16
	ldr	r6, .L16+4
	ldr	r4, [r5]
	ldr	r9, .L16+8
	ldr	r10, .L16+12
.L3:
	ldr	r1, [r6]
	cmp	r1, r4
	bne	.L5
.L4:
	mov	r0, #1
	bl	SDL_Delay
	ldr	r4, [r5]
	ldr	r1, [r6]
	cmp	r4, r1
	beq	.L4
.L5:
	ldr	r2, [r8], #4
	ldr	r0, [r9]
	ldr	r3, [r10]
	sub	r7, r7, #1
	str	r2, [r3, r0, lsl #2]
	add	r0, r0, #1
	bl	__aeabi_uidivmod
	add	r4, r4, #1
	cmp	r7, #0
	str	r4, [r5]
	str	r1, [r9]
	bne	.L3
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L17:
	.align	2
.L16:
	.word	BufferIn
	.word	BufferSize
	.word	BufferWrite
	.word	Buffer
	.size	WriteSound, .-WriteSound
	.comm	BufferWrite,4,4
	.comm	BufferSize,4,4
	.comm	BufferIn,4,4
	.comm	Buffer,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
