	.file	"extr_bitreader.c_FLAC__bitreader_read_rice_signed_block.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	FLAC__bitreader_read_rice_signed_block
	.type	FLAC__bitreader_read_rice_signed_block, @function
FLAC__bitreader_read_rice_signed_block:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	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	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	lea	rbp, [r15+rbp*4]
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	test	rdi, rdi
	setne	dil
	movzx	edi, dil
	call	FLAC__ASSERT@PLT
	xor	edi, edi
	cmp	QWORD PTR [rbx], 0
	setne	dil
	call	FLAC__ASSERT@PLT
	xor	edi, edi
	cmp	DWORD PTR FLAC__BITS_PER_WORD[rip], 31
	setg	dil
	call	FLAC__ASSERT@PLT
	xor	edi, edi
	cmp	r12d, 31
	setbe	dil
	call	FLAC__ASSERT@PLT
	test	r12d, r12d
	jne	.L2
	lea	r12, 36[rsp]
	cmp	r15, rbp
	jb	.L3
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edx, DWORD PTR 36[rsp]
	add	r15, 4
	mov	eax, edx
	shr	edx
	and	eax, 1
	neg	eax
	xor	eax, edx
	mov	DWORD PTR -4[r15], eax
	cmp	rbp, r15
	jbe	.L48
.L3:
	mov	rsi, r12
	mov	rdi, rbx
	call	FLAC__bitreader_read_unary_unsigned@PLT
	test	eax, eax
	jne	.L5
.L18:
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR 40[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L50
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, 1
	call	FLAC__ASSERT@PLT
	mov	eax, DWORD PTR 8[rbx]
	mov	ecx, DWORD PTR 12[rbx]
	mov	DWORD PTR 16[rsp], eax
	mov	DWORD PTR 24[rsp], ecx
	cmp	eax, ecx
	jnb	.L24
	mov	ecx, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR FLAC__BITS_PER_WORD[rip]
	mov	rdx, QWORD PTR [rbx]
	sub	esi, ecx
	mov	edx, DWORD PTR [rdx+rax*4]
	mov	DWORD PTR 28[rsp], esi
	sal	edx, cl
.L8:
	cmp	rbp, r15
	jbe	.L17
.L16:
	mov	edi, edx
	mov	DWORD PTR 8[rsp], edx
	call	COUNT_ZERO_MSBS2@PLT
	mov	esi, DWORD PTR FLAC__BITS_PER_WORD[rip]
	mov	edx, DWORD PTR 8[rsp]
	mov	r13d, eax
	cmp	esi, eax
	je	.L51
.L9:
	mov	ecx, eax
	mov	eax, DWORD PTR 28[rsp]
	mov	DWORD PTR 36[rsp], r13d
	sal	edx, cl
	mov	ecx, esi
	sub	eax, 1
	lea	edi, [rdx+rdx]
	xor	edx, edx
	sub	ecx, r12d
	sub	eax, r13d
	mov	r14d, edi
	div	esi
	shr	r14d, cl
	cmp	r12d, edx
	ja	.L12
	mov	ecx, r12d
	sub	edx, r12d
	sal	edi, cl
	mov	DWORD PTR 28[rsp], edx
	mov	edx, edi
.L13:
	mov	r9d, r13d
	mov	ecx, r12d
	mov	DWORD PTR 32[rsp], r14d
	add	r15, 4
	sal	r9d, cl
	or	r14d, r9d
	mov	r9d, r14d
	shr	r14d
	and	r9d, 1
	neg	r9d
	xor	r14d, r9d
	mov	DWORD PTR -4[r15], r14d
	cmp	rbp, r15
	ja	.L16
.L17:
	mov	eax, DWORD PTR 28[rsp]
	test	eax, eax
	jne	.L28
	mov	ecx, DWORD PTR 24[rsp]
	cmp	DWORD PTR 16[rsp], ecx
	jnb	.L28
	mov	r13d, DWORD PTR 16[rsp]
	mov	rax, QWORD PTR [rbx]
	mov	rdi, rbx
	mov	esi, DWORD PTR [rax+r13*4]
	lea	ebp, 1[r13]
	call	crc16_update_word_@PLT
	mov	DWORD PTR 16[rsp], ebp
	xor	eax, eax
.L22:
	mov	DWORD PTR 16[rbx], eax
	mov	eax, DWORD PTR 16[rsp]
	mov	DWORD PTR 8[rbx], eax
	.p2align 4,,10
	.p2align 3
.L48:
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	r13d, DWORD PTR 16[rsp]
	mov	rax, QWORD PTR [rbx]
	mov	rdi, rbx
	mov	DWORD PTR 8[rsp], edx
	mov	esi, DWORD PTR [rax+r13*4]
	lea	r8d, 1[r13]
	mov	DWORD PTR 16[rsp], r8d
	call	crc16_update_word_@PLT
	mov	r8d, DWORD PTR 16[rsp]
	cmp	r8d, DWORD PTR 24[rsp]
	mov	edx, DWORD PTR 8[rsp]
	jb	.L14
	mov	eax, r12d
	mov	DWORD PTR 16[rbx], 0
	mov	DWORD PTR 8[rbx], r8d
	sub	eax, edx
	mov	edx, eax
.L15:
	lea	rsi, 32[rsp]
	mov	rdi, rbx
	call	FLAC__bitreader_read_raw_uint32@PLT
	test	eax, eax
	je	.L18
	mov	eax, DWORD PTR 36[rsp]
	mov	ecx, r12d
	or	r14d, DWORD PTR 32[rsp]
	lea	rsi, 4[r15]
	mov	DWORD PTR 32[rsp], r14d
	xor	r13d, r13d
	sal	eax, cl
	or	r14d, eax
	mov	eax, r14d
	shr	r14d
	and	eax, 1
	neg	eax
	xor	r14d, eax
	mov	DWORD PTR [r15], r14d
	mov	eax, DWORD PTR 8[rbx]
	mov	ecx, DWORD PTR 12[rbx]
	mov	DWORD PTR 16[rsp], eax
	mov	DWORD PTR 24[rsp], ecx
	cmp	eax, ecx
	jb	.L27
	mov	r15, rsi
	cmp	rbp, rsi
	ja	.L7
.L27:
	mov	ecx, DWORD PTR 16[rbx]
	mov	eax, DWORD PTR FLAC__BITS_PER_WORD[rip]
	mov	r15, rsi
	mov	rdx, QWORD PTR [rbx]
	sub	eax, ecx
	mov	DWORD PTR 28[rsp], eax
	mov	eax, DWORD PTR 16[rsp]
	mov	edx, DWORD PTR [rdx+rax*4]
	sal	edx, cl
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rax, QWORD PTR [rbx]
	mov	ecx, r8d
	mov	r13d, DWORD PTR 36[rsp]
	mov	DWORD PTR 16[rsp], r8d
	mov	esi, DWORD PTR [rax+rcx*4]
	mov	eax, DWORD PTR FLAC__BITS_PER_WORD[rip]
	mov	ecx, eax
	sub	ecx, r12d
	lea	edi, [rcx+rdx]
	mov	edx, esi
	mov	ecx, edi
	sub	eax, edi
	mov	DWORD PTR 28[rsp], edi
	shr	edx, cl
	mov	ecx, eax
	sal	esi, cl
	or	r14d, edx
	mov	edx, esi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L24:
	xor	r13d, r13d
.L7:
	lea	rsi, 36[rsp]
	mov	rdi, rbx
	call	FLAC__bitreader_read_unary_unsigned@PLT
	test	eax, eax
	je	.L18
	add	DWORD PTR 36[rsp], r13d
	mov	edx, r12d
	xor	r14d, r14d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L51:
	mov	eax, DWORD PTR 16[rsp]
	mov	r13d, DWORD PTR 28[rsp]
	add	eax, 1
	mov	r14, rax
	sal	rax, 2
	mov	QWORD PTR 8[rsp], rax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR [rbx]
	mov	rcx, QWORD PTR 8[rsp]
	mov	edx, DWORD PTR [rax+rcx]
	mov	edi, edx
	mov	DWORD PTR 20[rsp], edx
	call	COUNT_ZERO_MSBS2@PLT
	mov	esi, DWORD PTR FLAC__BITS_PER_WORD[rip]
	add	QWORD PTR 8[rsp], 4
	add	r13d, eax
	mov	edx, DWORD PTR 20[rsp]
	cmp	esi, eax
	jne	.L9
	add	r14d, 1
.L11:
	mov	eax, DWORD PTR 16[rsp]
	mov	rdx, QWORD PTR [rbx]
	mov	rdi, rbx
	mov	DWORD PTR 16[rsp], r14d
	mov	esi, DWORD PTR [rdx+rax*4]
	call	crc16_update_word_@PLT
	cmp	r14d, DWORD PTR 24[rsp]
	jb	.L10
	mov	DWORD PTR 16[rbx], 0
	mov	DWORD PTR 8[rbx], r14d
	jmp	.L7
.L28:
	mov	eax, DWORD PTR FLAC__BITS_PER_WORD[rip]
	sub	eax, DWORD PTR 28[rsp]
	jmp	.L22
.L50:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	FLAC__bitreader_read_rice_signed_block, .-FLAC__bitreader_read_rice_signed_block
	.comm	FLAC__BITS_PER_WORD,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_bitreader.c_FLAC__bitreader_read_rice_signed_block.c"
	.text
	.global	__aeabi_uidivmod
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	FLAC__bitreader_read_rice_signed_block
	.syntax unified
	.arm
	.fpu softvfp
	.type	FLAC__bitreader_read_rice_signed_block, %function
FLAC__bitreader_read_rice_signed_block:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	mov	r8, r3
	mov	r4, r1
	mov	r6, r2
	ldr	r3, .L41
	subs	r0, r0, #0
	sub	sp, sp, #36
	movne	r0, #1
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	FLAC__ASSERT
	ldr	r0, [r5]
	ldr	r10, .L41+4
	subs	r0, r0, #0
	movne	r0, #1
	bl	FLAC__ASSERT
	ldr	r0, [r10]
	add	r6, r4, r6, lsl #2
	cmp	r0, #31
	movle	r0, #0
	movgt	r0, #1
	bl	FLAC__ASSERT
	cmp	r8, #31
	movhi	r0, #0
	movls	r0, #1
	bl	FLAC__ASSERT
	cmp	r8, #0
	bne	.L2
	cmp	r4, r6
	bcc	.L3
	b	.L6
.L5:
	ldr	r2, [sp, #24]
	ands	r3, r2, #1
	mvnne	r3, #0
	eor	r3, r3, r2, lsr #1
	str	r3, [r4], #4
	cmp	r6, r4
	bls	.L6
.L3:
	mov	r0, r5
	add	r1, sp, #24
	bl	FLAC__bitreader_read_unary_unsigned
	cmp	r0, #0
	bne	.L5
.L18:
	mov	r0, #0
.L1:
	ldr	r3, .L41
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L39
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	mov	r0, #1
	b	.L1
.L2:
	mov	r0, #1
	bl	FLAC__ASSERT
	ldr	r3, [r5, #8]
	ldr	fp, [r5, #4]
	str	r3, [sp, #8]
	cmp	fp, r3
	bcs	.L22
.L37:
	ldr	r1, [r5]
	ldr	r2, [r5, #12]
	ldr	r0, [r10]
	ldr	r1, [r1, fp, lsl #2]
	sub	r3, r0, r2
	cmp	r6, r4
	lsl	r1, r1, r2
	str	r3, [sp, #12]
	bls	.L17
.L16:
	mov	r0, r1
	str	r1, [sp, #4]
	bl	COUNT_ZERO_MSBS2
	ldr	r7, [r10]
	mov	ip, r0
	cmp	r7, r0
	movne	r9, r0
	ldr	r1, [sp, #4]
	beq	.L40
.L9:
	ldr	r3, [sp, #12]
	lsl	ip, r1, ip
	sub	r0, r3, #1
	mov	r1, r7
	lsl	r3, ip, #1
	sub	r0, r0, r9
	str	r3, [sp, #4]
	bl	__aeabi_uidivmod
	ldr	r3, [sp, #4]
	sub	r7, r7, r8
	cmp	r8, r1
	lsr	r7, r3, r7
	str	r9, [sp, #24]
	bhi	.L12
	sub	r2, r1, r8
	str	r2, [sp, #12]
	lsl	r1, r3, r8
.L13:
	orr	r9, r7, r9, lsl r8
	ands	r2, r9, #1
	mvnne	r2, #0
	eor	r9, r2, r9, lsr #1
	str	r9, [r4], #4
	cmp	r6, r4
	str	r7, [sp, #20]
	bhi	.L16
.L17:
	ldr	r3, [sp, #8]
	cmp	fp, r3
	ldr	r3, [sp, #12]
	movcs	r2, #0
	movcc	r2, #1
	cmp	r3, #0
	movne	r2, #0
	cmp	r2, #0
	bne	.L19
	ldr	r2, [r10]
	sub	r2, r2, r3
.L20:
	mov	r0, #1
	str	r2, [r5, #12]
	str	fp, [r5, #4]
	b	.L1
.L12:
	str	r1, [sp, #4]
	ldr	r1, [r5]
	mov	r0, r5
	ldr	r1, [r1, fp, lsl #2]
	bl	crc16_update_word_
	ldr	r3, [sp, #8]
	add	r9, fp, #1
	cmp	r9, r3
	ldr	r2, [sp, #4]
	lsl	ip, fp, #2
	bcc	.L14
	mov	r3, #0
	str	r9, [r5, #4]
	sub	r2, r8, r2
	str	r3, [r5, #12]
.L15:
	mov	r0, r5
	add	r1, sp, #20
	bl	FLAC__bitreader_read_raw_uint32
	cmp	r0, #0
	beq	.L18
	ldr	r2, [sp, #20]
	ldr	r3, [sp, #24]
	orr	r7, r7, r2
	orr	r3, r7, r3, lsl r8
	ands	r2, r3, #1
	mvnne	r2, #0
	eor	r3, r2, r3, lsr #1
	str	r3, [r4], #4
	ldr	r3, [r5, #8]
	ldr	fp, [r5, #4]
	mov	r9, #0
	cmp	fp, r3
	cmpcs	r6, r4
	str	r3, [sp, #8]
	str	r7, [sp, #20]
	bhi	.L7
	b	.L37
.L14:
	ldr	r1, [r10]
	ldr	r0, [r5]
	sub	lr, r1, r8
	add	r0, r0, ip
	add	r3, lr, r2
	ldr	r2, [r0, #4]
	sub	r1, r1, r3
	mov	fp, r9
	str	r3, [sp, #12]
	ldr	r9, [sp, #24]
	lsl	r1, r2, r1
	orr	r7, r7, r2, lsr r3
	b	.L13
.L22:
	mov	r9, #0
.L7:
	mov	r0, r5
	add	r1, sp, #24
	bl	FLAC__bitreader_read_unary_unsigned
	cmp	r0, #0
	beq	.L18
	ldr	r3, [sp, #24]
	mov	r2, r8
	add	r9, r3, r9
	mov	r7, #0
	str	r9, [sp, #24]
	b	.L15
.L40:
	ldr	r9, [sp, #12]
	b	.L11
.L10:
	ldr	r2, [r5]
	ldr	r1, [r2, fp, lsl #2]
	mov	r0, r1
	str	r1, [sp, #4]
	bl	COUNT_ZERO_MSBS2
	ldr	r7, [r10]
	mov	ip, r0
	cmp	r7, r0
	ldr	r1, [sp, #4]
	add	r9, r9, r0
	bne	.L9
.L11:
	ldr	r2, [r5]
	add	fp, fp, #1
	add	r2, r2, fp, lsl #2
	mov	r0, r5
	ldr	r1, [r2, #-4]
	bl	crc16_update_word_
	ldr	r3, [sp, #8]
	cmp	fp, r3
	bcc	.L10
	mov	r2, #0
	str	fp, [r5, #4]
	str	r2, [r5, #12]
	b	.L7
.L19:
	ldr	r1, [r5]
	add	r2, fp, #1
	ldr	r1, [r1, fp, lsl #2]
	mov	r0, r5
	mov	fp, r2
	bl	crc16_update_word_
	mov	r2, #0
	b	.L20
.L39:
	bl	__stack_chk_fail
.L42:
	.align	2
.L41:
	.word	.LC0
	.word	FLAC__BITS_PER_WORD
	.size	FLAC__bitreader_read_rice_signed_block, .-FLAC__bitreader_read_rice_signed_block
	.comm	FLAC__BITS_PER_WORD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
