	.file	"extr_vorbisfile.c__fetch_headers.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	_fetch_headers, @function
_fetch_headers:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, r8
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rcx
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	lea	rax, 16[rsp]
	mov	QWORD PTR 16[rsp], 0
	mov	QWORD PTR 24[rsp], 0
	mov	QWORD PTR 32[rsp], 0
	mov	QWORD PTR 40[rsp], 0
	mov	QWORD PTR 48[rsp], 0
	mov	QWORD PTR [rsp], rax
	test	r8, r8
	je	.L26
.L2:
	mov	rdi, r15
	call	ogg_page_serialno@PLT
	mov	rdi, QWORD PTR 8[r12]
	mov	esi, eax
	call	ogg_stream_reset_serialno@PLT
	test	rbx, rbx
	je	.L5
	mov	rax, QWORD PTR 8[r12]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rbx], eax
.L5:
	mov	eax, DWORD PTR STREAMSET[rip]
	mov	rdi, r13
	xor	ebx, ebx
	lea	rbp, 32[rsp]
	mov	DWORD PTR [r12], eax
	call	vorbis_info_init@PLT
	mov	rdi, r14
	call	vorbis_comment_init@PLT
.L11:
	mov	rdi, QWORD PTR 8[r12]
	mov	rsi, r15
	call	ogg_stream_pagein@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, QWORD PTR 8[r12]
	mov	rsi, rbp
	call	ogg_stream_packetout@PLT
	test	eax, eax
	je	.L6
	cmp	eax, -1
	je	.L12
	mov	rdx, rbp
	mov	rsi, r14
	mov	rdi, r13
	call	vorbis_synthesis_headerin@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L8
	add	ebx, 1
	cmp	ebx, 3
	jne	.L9
.L10:
	mov	rdi, rbp
	call	ogg_packet_release@PLT
	mov	rdi, QWORD PTR [rsp]
	call	ogg_page_release@PLT
	xor	r8d, r8d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	r8d, DWORD PTR OV_EBADHEADER[rip]
.L8:
	mov	rdi, rbp
	mov	DWORD PTR 12[rsp], r8d
	call	ogg_packet_release@PLT
	mov	rdi, QWORD PTR [rsp]
	call	ogg_page_release@PLT
	mov	rdi, r13
	call	vorbis_info_clear@PLT
	mov	rdi, r14
	call	vorbis_comment_clear@PLT
	mov	eax, DWORD PTR OPENED[rip]
	mov	r8d, DWORD PTR 12[rsp]
	mov	DWORD PTR [r12], eax
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, 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
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	mov	edx, DWORD PTR CHUNKSIZE[rip]
	mov	rsi, rax
	call	_get_next_page@PLT
	cmp	QWORD PTR OV_EREAD[rip], rax
	mov	r8d, eax
	je	.L1
	mov	r15, QWORD PTR [rsp]
	mov	r8d, DWORD PTR OV_ENOTVORBIS[rip]
	test	rax, rax
	jns	.L2
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edx, DWORD PTR CHUNKSIZE[rip]
	mov	rsi, r15
	mov	rdi, r12
	call	_get_next_page@PLT
	test	rax, rax
	js	.L12
	cmp	ebx, 2
	jle	.L11
	jmp	.L10
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	_fetch_headers, .-_fetch_headers
	.comm	STREAMSET,4,4
	.comm	OV_EREAD,8,8
	.comm	OV_ENOTVORBIS,4,4
	.comm	OV_EBADHEADER,4,4
	.comm	OPENED,4,4
	.comm	CHUNKSIZE,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_vorbisfile.c__fetch_headers.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_fetch_headers, %function
_fetch_headers:
	@ args = 4, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	sub	sp, sp, #48
	ldr	r8, [sp, #80]
	mov	r4, r3
	ldr	r3, .L25
	cmp	r8, ip
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	mov	r6, r1
	mov	r7, r2
	mov	r5, r0
	str	ip, [sp, #4]
	str	ip, [sp, #20]
	str	ip, [sp, #8]
	str	ip, [sp, #12]
	str	ip, [sp, #16]
	str	ip, [sp, #24]
	str	ip, [sp, #28]
	str	ip, [sp, #32]
	str	ip, [sp, #36]
	str	ip, [sp, #40]
	beq	.L23
.L2:
	mov	r0, r8
	ldr	r9, [r5, #4]
	bl	ogg_page_serialno
	mov	r1, r0
	mov	r0, r9
	bl	ogg_stream_reset_serialno
	cmp	r4, #0
	ldrne	r3, [r5, #4]
	mov	r0, r6
	ldrne	r3, [r3]
	ldr	r9, .L25+4
	strne	r3, [r4]
	ldr	r3, .L25+8
	mov	r4, #0
	ldr	r3, [r3]
	str	r3, [r5]
	bl	vorbis_info_init
	mov	r0, r7
	bl	vorbis_comment_init
.L10:
	mov	r1, r8
	ldr	r0, [r5, #4]
	bl	ogg_stream_pagein
.L8:
	ldr	r0, [r5, #4]
	add	r1, sp, #20
	bl	ogg_stream_packetout
	cmp	r0, #0
	beq	.L5
	cmn	r0, #1
	beq	.L11
	mov	r1, r7
	mov	r0, r6
	add	r2, sp, #20
	bl	vorbis_synthesis_headerin
	subs	r10, r0, #0
	bne	.L7
	add	r4, r4, #1
	cmp	r4, #3
	bne	.L8
.L9:
	add	r0, sp, #20
	bl	ogg_packet_release
	add	r0, sp, #4
	bl	ogg_page_release
	mov	r10, #0
	b	.L1
.L11:
	ldr	r3, .L25+12
	ldr	r10, [r3]
.L7:
	add	r0, sp, #20
	bl	ogg_packet_release
	add	r0, sp, #4
	bl	ogg_page_release
	mov	r0, r6
	bl	vorbis_info_clear
	mov	r0, r7
	bl	vorbis_comment_clear
	ldr	r3, .L25+16
	ldr	r3, [r3]
	str	r3, [r5]
.L1:
	ldr	r3, .L25
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	mov	r0, r10
	add	sp, sp, #48
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	ldr	r3, .L25+4
	add	r1, sp, #4
	ldr	r2, [r3]
	bl	_get_next_page
	ldr	r3, .L25+20
	mov	r10, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L1
	cmp	r0, #0
	addge	r8, sp, #4
	bge	.L2
	ldr	r3, .L25+24
	ldr	r10, [r3]
	b	.L1
.L5:
	mov	r1, r8
	mov	r0, r5
	ldr	r2, [r9]
	bl	_get_next_page
	cmp	r0, #0
	blt	.L11
	cmp	r4, #2
	ble	.L10
	b	.L9
.L24:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	.LC0
	.word	CHUNKSIZE
	.word	STREAMSET
	.word	OV_EBADHEADER
	.word	OPENED
	.word	OV_EREAD
	.word	OV_ENOTVORBIS
	.size	_fetch_headers, .-_fetch_headers
	.comm	STREAMSET,4,4
	.comm	OV_EREAD,4,4
	.comm	OV_ENOTVORBIS,4,4
	.comm	OV_EBADHEADER,4,4
	.comm	OPENED,4,4
	.comm	CHUNKSIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
