	.file	"extr_snd_adpcm.c_S_AdpcmEncode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	S_AdpcmEncode
	.type	S_AdpcmEncode, @function
S_AdpcmEncode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	rax, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, QWORD PTR stepsizeTable[rip]
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movsx	rax, DWORD PTR 4[rax]
	mov	r10d, DWORD PTR [r12+rax*4]
	mov	r8, rax
	mov	QWORD PTR -8[rsp], rcx
	mov	ecx, DWORD PTR [rcx]
	test	edx, edx
	jle	.L2
	lea	eax, -1[rdx]
	mov	ebx, 1
	xor	r13d, r13d
	mov	r14d, -32768
	lea	r15, 2[rdi+rax*2]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L18:
	sal	edx, 4
	mov	eax, ebx
	mov	r13d, edx
	xor	eax, 1
	cmp	rdi, r15
	je	.L11
.L19:
	mov	r12, QWORD PTR stepsizeTable[rip]
	mov	ebx, eax
.L12:
	movsx	eax, WORD PTR [rdi]
	mov	r11d, ecx
	add	rdi, 2
	mov	r9d, eax
	sub	r11d, eax
	mov	eax, r10d
	sub	r9d, ecx
	mov	edx, r9d
	sar	edx, 28
	and	edx, 8
	cmovne	r9d, r11d
	sar	eax, 3
	xor	r11d, r11d
	cmp	r9d, r10d
	jl	.L4
	sub	r9d, r10d
	add	eax, r10d
	mov	r11d, 4
.L4:
	mov	ebp, r10d
	sar	ebp
	cmp	r9d, ebp
	jl	.L5
	or	r11d, 2
	sub	r9d, ebp
	add	eax, ebp
.L5:
	sar	r10d, 2
	cmp	r9d, r10d
	jl	.L6
	or	r11d, 1
	add	eax, r10d
.L6:
	mov	r9d, ecx
	sub	r9d, eax
	add	eax, ecx
	test	edx, edx
	mov	ecx, 32767
	cmovne	eax, r9d
	cmp	eax, -32768
	cmovl	eax, r14d
	cmp	eax, 32767
	cmovle	ecx, eax
	mov	rax, QWORD PTR indexTable[rip]
	or	edx, r11d
	movsx	r9, edx
	add	r8d, DWORD PTR [rax+r9*8]
	mov	eax, 88
	cmp	r8d, 88
	cmovg	r8d, eax
	mov	eax, 0
	test	r8d, r8d
	cmovs	r8d, eax
	movsx	rax, r8d
	mov	r10d, DWORD PTR [r12+rax*4]
	test	ebx, ebx
	jne	.L18
	or	edx, r13d
	mov	eax, ebx
	add	rsi, 1
	mov	BYTE PTR -1[rsi], dl
	xor	eax, 1
	cmp	rdi, r15
	jne	.L19
.L11:
	cmp	ebx, 1
	jne	.L2
	mov	BYTE PTR [rsi], r13b
.L2:
	mov	rax, QWORD PTR -8[rsp]
	mov	DWORD PTR [rax], ecx
	mov	DWORD PTR 4[rax], r8d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	S_AdpcmEncode, .-S_AdpcmEncode
	.comm	stepsizeTable,8,8
	.comm	indexTable,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_snd_adpcm.c_S_AdpcmEncode.c"
	.text
	.align	2
	.global	S_AdpcmEncode
	.syntax unified
	.arm
	.fpu softvfp
	.type	S_AdpcmEncode, %function
S_AdpcmEncode:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	ip, .L21
	ldr	lr, [r3, #4]
	ldr	r7, [ip]
	sub	sp, sp, #20
	cmp	r2, #0
	ldr	r4, [r7, lr, lsl #2]
	ldr	ip, [r3]
	str	r3, [sp, #12]
	str	r1, [sp]
	ble	.L2
	mov	r3, #0
	mov	r6, #1
	str	r3, [sp, #4]
	add	r3, r0, r2, lsl r6
	ldr	fp, .L21+4
	ldr	r9, .L21+8
	ldr	r8, .L21+12
	str	r3, [sp, #8]
	b	.L12
.L20:
	mov	r6, r3
	ldr	r3, .L21
	ldr	r7, [r3]
.L12:
	ldrsh	r3, [r0], #2
	asr	r10, r4, #1
	sub	r1, r3, ip
	asr	r5, r1, #28
	ands	r5, r5, #8
	subne	r1, ip, r3
	cmp	r1, r4
	movge	r2, #4
	movlt	r2, #0
	asr	r3, r4, #3
	subge	r1, r1, r4
	addge	r3, r3, r4
	cmp	r1, r4, asr #1
	subge	r1, r1, r10
	addge	r3, r3, r10
	orrge	r2, r2, #2
	cmp	r1, r4, asr #2
	asr	r4, r4, #2
	addge	r3, r3, r4
	orrge	r2, r2, #1
	cmp	r5, #0
	subne	ip, ip, r3
	addeq	ip, r3, ip
	cmp	ip, r9
	movlt	ip, r9
	ldr	r3, [fp]
	orr	r2, r2, r5
	ldr	r3, [r3, r2, lsl #2]
	cmp	ip, r8
	add	lr, lr, r3
	movge	ip, r8
	cmp	lr, #88
	movge	lr, #88
	cmp	r6, #0
	ldreq	r1, [sp, #4]
	ldreq	r3, [sp]
	orreq	r2, r2, r1
	bic	lr, lr, lr, asr #31
	lslne	r3, r2, #4
	ldr	r4, [r7, lr, lsl #2]
	strbeq	r2, [r3], #1
	strne	r3, [sp, #4]
	streq	r3, [sp]
	ldr	r3, [sp, #8]
	cmp	r0, r3
	eor	r3, r6, #1
	bne	.L20
	cmp	r6, #1
	ldreq	r3, [sp]
	ldreq	r2, [sp, #4]
	strbeq	r2, [r3]
.L2:
	ldr	r3, [sp, #12]
	stm	r3, {ip, lr}
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	.align	2
.L21:
	.word	stepsizeTable
	.word	indexTable
	.word	-32768
	.word	32767
	.size	S_AdpcmEncode, .-S_AdpcmEncode
	.comm	stepsizeTable,4,4
	.comm	indexTable,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
