	.file	"extr_bitwise.c_oggpack_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	oggpack_read
	.type	oggpack_read, @function
oggpack_read:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR 8[rdi]
	cmp	esi, 32
	ja	.L6
	mov	rdx, QWORD PTR mask[rip]
	movsx	rcx, esi
	mov	r9d, DWORD PTR [rdi]
	mov	r8d, DWORD PTR 4[rdi]
	mov	r11, QWORD PTR [rdx+rcx*8]
	lea	edx, -4[rax]
	add	esi, r9d
	cmp	r8d, edx
	lea	edx, 7[rsi]
	jl	.L3
	mov	ecx, edx
	mov	r10d, eax
	sar	ecx, 3
	sub	r10d, ecx
	cmp	r8d, r10d
	jg	.L6
	xor	eax, eax
	test	esi, esi
	je	.L18
.L3:
	mov	r10, QWORD PTR 16[rdi]
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	ecx, r9d
	mov	rax, QWORD PTR [r10]
	sar	rax, cl
	cmp	esi, 8
	jle	.L5
	mov	rbx, QWORD PTR 8[r10]
	mov	ecx, 8
	sub	ecx, r9d
	sal	rbx, cl
	or	rax, rbx
	cmp	esi, 16
	jle	.L5
	mov	rbx, QWORD PTR 16[r10]
	mov	ecx, 16
	sub	ecx, r9d
	sal	rbx, cl
	or	rax, rbx
	cmp	esi, 24
	jle	.L5
	mov	rbx, QWORD PTR 24[r10]
	mov	ecx, 24
	sub	ecx, r9d
	sal	rbx, cl
	or	rax, rbx
	cmp	esi, 32
	jle	.L5
	test	r9d, r9d
	jne	.L21
.L5:
	and	rax, r11
	test	esi, esi
	pop	rbx
	.cfi_def_cfa_offset 8
	cmovns	edx, esi
	and	esi, 7
	mov	DWORD PTR [rdi], esi
	sar	edx, 3
	movsx	rcx, edx
	add	edx, r8d
	lea	rcx, [r10+rcx*8]
	mov	DWORD PTR 4[rdi], edx
	mov	QWORD PTR 16[rdi], rcx
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore 3
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, QWORD PTR 32[r10]
	mov	ecx, 32
	sub	ecx, r9d
	sal	rbx, cl
	or	rax, rbx
	jmp	.L5
.L2:
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	mov	DWORD PTR 4[rdi], eax
	mov	rax, -1
	mov	QWORD PTR 16[rdi], 0
	mov	DWORD PTR [rdi], 1
	ret
	.cfi_endproc
.LFE0:
	.size	oggpack_read, .-oggpack_read
	.comm	mask,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_bitwise.c_oggpack_read.c"
	.text
	.align	2
	.global	oggpack_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	oggpack_read, %function
oggpack_read:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #32
	push	{r4, r5, r6, r7, lr}
	ldr	ip, [r0, #8]
	bhi	.L6
	ldr	r3, .L15
	ldr	r2, [r0, #4]
	ldr	lr, [r3]
	ldr	r4, [r0]
	sub	r3, ip, #4
	ldr	r5, [lr, r1, lsl #2]
	cmp	r2, r3
	add	r1, r4, r1
	add	r3, r1, #7
	blt	.L3
	sub	lr, ip, r3, asr #3
	cmp	r2, lr
	bgt	.L6
	cmp	r1, #0
	beq	.L7
.L3:
	ldr	ip, [r0, #12]
	cmp	r1, #8
	ldr	lr, [ip]
	asr	lr, lr, r4
	ble	.L5
	ldr	r7, [ip, #4]
	rsb	r6, r4, #8
	cmp	r1, #16
	orr	lr, lr, r7, lsl r6
	ble	.L5
	ldr	r7, [ip, #8]
	rsb	r6, r4, #16
	cmp	r1, #24
	orr	lr, lr, r7, lsl r6
	ble	.L5
	cmp	r4, #0
	cmpne	r1, #32
	ldr	r7, [ip, #12]
	rsb	r6, r4, #24
	orr	lr, lr, r7, lsl r6
	ldrgt	r6, [ip, #16]
	rsbgt	r4, r4, #32
	orrgt	lr, lr, r6, lsl r4
.L5:
	cmp	r1, #0
	movge	r3, r1
	asr	r3, r3, #3
	add	ip, ip, r3, lsl #2
	and	r1, r1, #7
	add	r3, r2, r3
	stm	r0, {r1, r3}
	str	ip, [r0, #12]
	and	r0, lr, r5
	pop	{r4, r5, r6, r7, pc}
.L7:
	mov	r0, r1
	pop	{r4, r5, r6, r7, pc}
.L2:
.L6:
	mov	r2, #0
	mov	r3, #1
	str	ip, [r0, #4]
	str	r2, [r0, #12]
	str	r3, [r0]
	mvn	r0, #0
	pop	{r4, r5, r6, r7, pc}
.L16:
	.align	2
.L15:
	.word	mask
	.size	oggpack_read, .-oggpack_read
	.comm	mask,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
