	.file	"extr_imaadp32.c_init_wfx_ima_adpcm.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"wrong FT\n"
.LC1:
	.string	"wrong fmt\n"
	.text
	.p2align 4
	.type	init_wfx_ima_adpcm, @function
init_wfx_ima_adpcm:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR WAVE_FORMAT_IMA_ADPCM[rip]
	cmp	QWORD PTR 8[rdi], rax
	je	.L2
	lea	rdi, .LC0[rip]
	jmp	FIXME@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rdi
	lea	rdi, 8[rdi]
	call	ADPCM_GetFormatIndex@PLT
	cmp	eax, -1
	je	.L19
	mov	ecx, DWORD PTR 16[rbx]
	mov	edi, DWORD PTR 24[rbx]
	cmp	ecx, 22050
	je	.L4
	jg	.L5
	cmp	ecx, 8000
	je	.L6
	cmp	ecx, 11025
	jne	.L7
.L6:
	mov	r8d, edi
	sal	r8d, 8
	mov	DWORD PTR 20[rbx], r8d
.L9:
	lea	eax, 0[0+rdi*4]
	mov	esi, r8d
	mov	DWORD PTR 28[rbx], 4
	sub	esi, eax
	mov	eax, 2
	cdq
	idiv	edi
	imul	esi, eax
	mov	eax, ecx
	imul	eax, r8d
	add	esi, 1
	cdq
	mov	DWORD PTR [rbx], esi
	idiv	esi
	mov	DWORD PTR 32[rbx], eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	cmp	ecx, 44100
	jne	.L7
	mov	r8d, edi
	sal	r8d, 10
	mov	DWORD PTR 20[rbx], r8d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	mov	r8d, edi
	sal	r8d, 9
	mov	DWORD PTR 20[rbx], r8d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	mov	r8d, DWORD PTR 20[rbx]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L19:
	lea	rdi, .LC1[rip]
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 8
	jmp	FIXME@PLT
	.cfi_endproc
.LFE0:
	.size	init_wfx_ima_adpcm, .-init_wfx_ima_adpcm
	.comm	WAVE_FORMAT_IMA_ADPCM,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_imaadp32.c_init_wfx_ima_adpcm.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"wrong FT\012\000"
	.align	2
.LC1:
	.ascii	"wrong fmt\012\000"
	.global	__aeabi_idiv
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_wfx_ima_adpcm, %function
init_wfx_ima_adpcm:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L17
	ldr	r2, [r0, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L2
	ldr	r0, .L17+4
	b	FIXME
.L2:
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	add	r0, r0, #4
	bl	ADPCM_GetFormatIndex
	cmn	r0, #1
	beq	.L16
	ldr	r6, [r4, #8]
	ldr	r3, .L17+8
	ldr	r1, [r4, #16]
	cmp	r6, r3
	beq	.L4
	bgt	.L5
	cmp	r6, #8000
	beq	.L6
	ldr	r3, .L17+12
	cmp	r6, r3
	bne	.L7
.L6:
	lsl	r7, r1, #8
	str	r7, [r4, #12]
.L9:
	mov	r3, #4
	mov	r0, #2
	str	r3, [r4, #20]
	sub	r5, r7, r1, lsl r0
	bl	__aeabi_idiv
	mul	r1, r0, r5
	add	r1, r1, #1
	mul	r0, r7, r6
	str	r1, [r4]
	bl	__aeabi_idiv
	str	r0, [r4, #24]
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	ldr	r3, .L17+16
	cmp	r6, r3
	lsleq	r7, r1, #10
	streq	r7, [r4, #12]
	beq	.L9
.L7:
	ldr	r7, [r4, #12]
	b	.L9
.L4:
	lsl	r7, r1, #9
	str	r7, [r4, #12]
	b	.L9
.L16:
	ldr	r0, .L17+20
	pop	{r4, r5, r6, r7, r8, lr}
	b	FIXME
.L18:
	.align	2
.L17:
	.word	WAVE_FORMAT_IMA_ADPCM
	.word	.LC0
	.word	22050
	.word	11025
	.word	44100
	.word	.LC1
	.size	init_wfx_ima_adpcm, .-init_wfx_ima_adpcm
	.comm	WAVE_FORMAT_IMA_ADPCM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
