	.file	"extr_sdl_snd.c_SNDDMA_AudioCallback.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	SNDDMA_AudioCallback, @function
SNDDMA_AudioCallback:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR dma[rip]
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	test	eax, eax
	lea	esi, 7[rax]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	cmovns	esi, eax
	mov	eax, DWORD PTR dmasize[rip]
	sar	esi, 3
	imul	esi, DWORD PTR dmapos[rip]
	cmp	eax, esi
	jg	.L2
	mov	DWORD PTR dmapos[rip], 0
	xor	esi, esi
.L2:
	mov	edx, DWORD PTR snd_inited[rip]
	test	edx, edx
	je	.L9
	sub	eax, esi
	movsx	rsi, esi
	add	rsi, QWORD PTR dma[rip+16]
	movsx	rbx, eax
	cmp	ebx, r12d
	jl	.L4
	mov	edx, r12d
	mov	rdi, rbp
	call	memcpy@PLT
	mov	eax, DWORD PTR dma[rip]
	test	eax, eax
	lea	ecx, 7[rax]
	cmovns	ecx, eax
	mov	eax, r12d
	cdq
	sar	ecx, 3
	idiv	ecx
	add	eax, DWORD PTR dmapos[rip]
	mov	DWORD PTR dmapos[rip], eax
.L5:
	cmp	DWORD PTR dmasize[rip], eax
	jg	.L1
	mov	DWORD PTR dmapos[rip], 0
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	edx, ebx
	mov	rdi, rbp
	sub	r12d, ebx
	call	memcpy@PLT
	mov	rsi, QWORD PTR dma[rip+16]
	mov	edx, r12d
	lea	rdi, 0[rbp+rbx*8]
	call	memcpy@PLT
	mov	eax, DWORD PTR dma[rip]
	test	eax, eax
	lea	ecx, 7[rax]
	cmovns	ecx, eax
	mov	eax, r12d
	cdq
	sar	ecx, 3
	idiv	ecx
	mov	DWORD PTR dmapos[rip], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	edx, r12d
	mov	rdi, rbp
	xor	esi, esi
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	memset@PLT
	.cfi_endproc
.LFE0:
	.size	SNDDMA_AudioCallback, .-SNDDMA_AudioCallback
	.comm	snd_inited,4,4
	.comm	sdlMasterGain,4,4
	.comm	dmasize,4,4
	.comm	dmapos,4,4
	.comm	dma,24,16
	.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_snd.c_SNDDMA_AudioCallback.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	SNDDMA_AudioCallback, %function
SNDDMA_AudioCallback:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r6, .L10
	ldr	r5, .L10+4
	ldr	r3, [r6]
	ldr	r7, .L10+8
	add	r0, r3, #7
	cmp	r3, #0
	movlt	r3, r0
	ldr	r0, [r5]
	asr	r3, r3, #3
	mul	r3, r0, r3
	ldr	ip, [r7]
	mov	r4, r2
	cmp	ip, r3
	movle	r2, #0
	movle	r3, r2
	strle	r2, [r5]
	ldr	r2, .L10+12
	mov	r8, r1
	ldr	r1, [r2]
	cmp	r1, #0
	beq	.L9
	ldr	r1, [r6, #8]
	sub	r9, ip, r3
	cmp	r9, r4
	add	r1, r3, r1
	blt	.L4
	mov	r2, r4
	mov	r0, r8
	bl	memcpy
	ldr	r1, [r6]
	mov	r0, r4
	add	r3, r1, #7
	cmp	r1, #0
	movlt	r1, r3
	asr	r1, r1, #3
	bl	__aeabi_idiv
	ldr	r3, [r5]
	add	r0, r0, r3
	str	r0, [r5]
.L5:
	ldr	r3, [r7]
	cmp	r3, r0
	movle	r3, #0
	strle	r3, [r5]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	mov	r2, r9
	sub	r4, r4, r9
	mov	r0, r8
	bl	memcpy
	mov	r2, r4
	ldr	r1, [r6, #8]
	add	r0, r8, r9, lsl #2
	bl	memcpy
	ldr	r1, [r6]
	mov	r0, r4
	add	r3, r1, #7
	cmp	r1, #0
	movlt	r1, r3
	asr	r1, r1, #3
	bl	__aeabi_idiv
	str	r0, [r5]
	b	.L5
.L9:
	mov	r2, r4
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	memset
.L11:
	.align	2
.L10:
	.word	dma
	.word	dmapos
	.word	dmasize
	.word	snd_inited
	.size	SNDDMA_AudioCallback, .-SNDDMA_AudioCallback
	.comm	snd_inited,4,4
	.comm	sdlMasterGain,4,4
	.comm	dmasize,4,4
	.comm	dmapos,4,4
	.comm	dma,12,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
