	.file	"extr_pdf-xref.c_pdf_read_start_xref.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"cannot find startxref"
.LC1:
	.string	"startxref"
.LC2:
	.string	"startxref too large"
	.text
	.p2align 4
	.type	pdf_read_start_xref, @function
pdf_read_start_xref:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	edx, edx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 1048
	.cfi_def_cfa_offset 1104
	mov	ecx, DWORD PTR SEEK_END[rip]
	mov	esi, DWORD PTR 4[rsi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 1032[rsp], rax
	xor	eax, eax
	mov	r12, rsp
	call	fz_seek@PLT
	mov	esi, DWORD PTR 4[rbp]
	mov	rdi, r14
	call	fz_tell@PLT
	xor	edi, edi
	mov	QWORD PTR 8[rbp], rax
	lea	rsi, -1024[rax]
	call	fz_maxi64@PLT
	mov	esi, DWORD PTR 4[rbp]
	mov	ecx, DWORD PTR SEEK_SET[rip]
	mov	rdi, r14
	mov	rdx, rax
	call	fz_seek@PLT
	mov	esi, DWORD PTR 4[rbp]
	mov	ecx, 1024
	mov	rdx, r12
	mov	rdi, r14
	call	fz_read@PLT
	mov	r13, rax
	cmp	rax, 8
	jbe	.L22
.L2:
	lea	rbx, -9[r13]
	lea	r15, .LC1[rip]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L3:
	lea	rax, -1[rbx]
	test	rbx, rbx
	je	.L7
	mov	rbx, rax
.L13:
	lea	rdi, [r12+rbx]
	mov	edx, 9
	mov	rsi, r15
	call	memcmp@PLT
	test	rax, rax
	jne	.L3
	add	rbx, 9
	cmp	r13, rbx
	ja	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	DWORD PTR 0[rbp], 0
.L7:
	mov	esi, DWORD PTR FZ_ERROR_GENERIC[rip]
	lea	rdx, .LC0[rip]
	mov	rdi, r14
	call	fz_throw@PLT
.L1:
	mov	rax, QWORD PTR 1032[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 1048
	.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
.L6:
	.cfi_restore_state
	add	rbx, 1
	cmp	r13, rbx
	jbe	.L5
.L4:
	movzx	edi, BYTE PTR [r12+rbx]
	call	iswhite@PLT
	test	rax, rax
	jne	.L6
	mov	DWORD PTR 0[rbp], 0
	cmp	r13, rbx
	jbe	.L7
	add	rbx, r12
	add	r12, r13
	lea	r13, .LC2[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	movzx	eax, BYTE PTR [rbx]
	lea	edx, [rcx+rcx*4]
	add	rbx, 1
	lea	eax, -48[rax+rdx*2]
	mov	DWORD PTR 0[rbp], eax
	cmp	r12, rbx
	je	.L10
.L8:
	movzx	edi, BYTE PTR [rbx]
	call	isdigit@PLT
	test	rax, rax
	je	.L24
	movsx	rax, DWORD PTR INT64_MAX[rip]
	mov	ecx, DWORD PTR 0[rbp]
	mov	rdx, rax
	imul	rax, rax, 1717986919
	sar	edx, 31
	sar	rax, 34
	sub	eax, edx
	cmp	ecx, eax
	jl	.L9
	mov	esi, DWORD PTR FZ_ERROR_GENERIC[rip]
	mov	rdx, r13
	mov	rdi, r14
	call	fz_throw@PLT
	mov	ecx, DWORD PTR 0[rbp]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L24:
	mov	eax, DWORD PTR 0[rbp]
.L10:
	test	eax, eax
	je	.L7
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	mov	esi, DWORD PTR FZ_ERROR_GENERIC[rip]
	lea	rdx, .LC0[rip]
	mov	rdi, r14
	call	fz_throw@PLT
	jmp	.L2
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pdf_read_start_xref, .-pdf_read_start_xref
	.comm	SEEK_SET,4,4
	.comm	SEEK_END,4,4
	.comm	INT64_MAX,4,4
	.comm	FZ_ERROR_GENERIC,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_pdf-xref.c_pdf_read_start_xref.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"cannot find startxref\000"
	.align	2
.LC1:
	.ascii	"startxref\000"
	.align	2
.LC2:
	.ascii	"startxref too large\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pdf_read_start_xref, %function
pdf_read_start_xref:
	@ args = 0, pretend = 0, frame = 1032
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r1
	mov	r7, r0
	ldr	r3, .L24
	ldr	ip, .L24+4
	sub	sp, sp, #1024
	sub	sp, sp, #12
	mov	r2, #0
	ldr	r3, [r3]
	ldr	r1, [r1, #4]
	ldr	ip, [ip]
	str	ip, [sp, #1028]
	mov	ip,#0
	bl	fz_seek
	ldr	r1, [r5, #4]
	mov	r0, r7
	bl	fz_tell
	mov	r1, r0
	mov	r0, #0
	str	r1, [r5, #8]
	sub	r1, r1, #1024
	bl	fz_maxi64
	ldr	r3, .L24+8
	mov	r2, r0
	ldr	r1, [r5, #4]
	ldr	r3, [r3]
	mov	r0, r7
	bl	fz_seek
	mov	r0, r7
	mov	r3, #1024
	ldr	r1, [r5, #4]
	add	r2, sp, #4
	bl	fz_read
	cmp	r0, #8
	mov	r6, r0
	bls	.L21
.L2:
	sub	r4, r6, #9
	add	r3, sp, #4
	ldr	r9, .L24+12
	add	r8, r3, r4
	b	.L13
.L3:
	cmp	r4, #0
	sub	r8, r8, #1
	sub	r4, r4, #1
	beq	.L7
.L13:
	mov	r2, #9
	mov	r1, r9
	mov	r0, r8
	bl	memcmp
	cmp	r0, #0
	bne	.L3
	add	r8, r4, #9
	cmp	r6, r8
	bls	.L4
	add	r4, r4, #8
	add	r3, sp, #4
	add	r4, r3, r4
	b	.L5
.L6:
	add	r8, r8, #1
	cmp	r6, r8
	bls	.L4
.L5:
	ldrb	r0, [r4, #1]!	@ zero_extendqisi2
	bl	iswhite
	cmp	r0, #0
	bne	.L6
	cmp	r6, r8
	str	r0, [r5]
	bls	.L7
	add	r3, sp, #4
	add	r4, r3, r8
	ldr	r9, .L24+16
	ldr	r8, .L24+20
	ldr	fp, .L24+24
	ldr	r10, .L24+28
	add	r6, r3, r6
	b	.L8
.L9:
	ldrb	r3, [r4, #-1]	@ zero_extendqisi2
	add	r2, r2, r2, lsl #2
	sub	r3, r3, #48
	add	r2, r3, r2, lsl #1
	cmp	r6, r4
	str	r2, [r5]
	beq	.L10
.L8:
	ldrb	r0, [r4], #1	@ zero_extendqisi2
	bl	isdigit
	cmp	r0, #0
	beq	.L22
	ldr	r3, [r9]
	ldr	r2, [r5]
	smull	r0, r1, r8, r3
	asr	r3, r3, #31
	rsb	r3, r3, r1, asr #2
	cmp	r2, r3
	blt	.L9
	mov	r2, r10
	mov	r0, r7
	ldr	r1, [fp]
	bl	fz_throw
	ldr	r2, [r5]
	b	.L9
.L4:
	mov	r3, #0
	str	r3, [r5]
.L7:
	ldr	r3, .L24+24
	mov	r0, r7
	ldr	r1, [r3]
	ldr	r2, .L24+32
	bl	fz_throw
.L1:
	ldr	r3, .L24+4
	ldr	r2, [r3]
	ldr	r3, [sp, #1028]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	add	sp, sp, #1024
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	ldr	r2, [r5]
.L10:
	cmp	r2, #0
	beq	.L7
	b	.L1
.L21:
	ldr	r3, .L24+24
	mov	r0, r7
	ldr	r2, .L24+32
	ldr	r1, [r3]
	bl	fz_throw
	b	.L2
.L23:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	SEEK_END
	.word	.LC3
	.word	SEEK_SET
	.word	.LC1
	.word	INT64_MAX
	.word	1717986919
	.word	FZ_ERROR_GENERIC
	.word	.LC2
	.word	.LC0
	.size	pdf_read_start_xref, .-pdf_read_start_xref
	.comm	SEEK_SET,4,4
	.comm	SEEK_END,4,4
	.comm	INT64_MAX,4,4
	.comm	FZ_ERROR_GENERIC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
