	.file	"extr_qcow2-util.c_verify_header.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	verify_header, @function
verify_header:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	assert@PLT
	mov	rdi, rbp
	call	HEADER_MAGIC@PLT
	cmp	rax, QWORD PTR QCOW2_MAGIC[rip]
	je	.L2
.L14:
	mov	r12d, DWORD PTR EBADMSG[rip]
	neg	r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	call	HEADER_VERSION@PLT
	mov	edx, 3
	mov	esi, 2
	mov	edi, eax
	call	IN_SET@PLT
	test	eax, eax
	jne	.L4
.L15:
	mov	r12d, DWORD PTR EOPNOTSUPP[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdi, rbp
	call	HEADER_CRYPT_METHOD@PLT
	test	rax, rax
	jne	.L15
	mov	rdi, rbp
	call	HEADER_CLUSTER_BITS@PLT
	cmp	eax, 8
	jle	.L14
	mov	rdi, rbp
	call	HEADER_CLUSTER_BITS@PLT
	cmp	eax, 21
	jg	.L14
	mov	rdi, rbp
	call	HEADER_SIZE@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	HEADER_CLUSTER_SIZE@PLT
	mov	r8d, eax
	mov	eax, r12d
	cdq
	idiv	r8d
	mov	r12d, edx
	test	edx, edx
	jne	.L14
	mov	rdi, rbp
	call	HEADER_L1_SIZE@PLT
	cmp	eax, 33554432
	jg	.L14
	mov	rdi, rbp
	call	HEADER_VERSION@PLT
	cmp	eax, 3
	jne	.L1
	cmp	QWORD PTR 0[rbp], 0
	jne	.L15
	mov	rdi, rbp
	call	HEADER_HEADER_LENGTH@PLT
	cmp	eax, 7
	ja	.L1
	jmp	.L14
	.cfi_endproc
.LFE0:
	.size	verify_header, .-verify_header
	.comm	QCOW2_MAGIC,8,8
	.comm	EOPNOTSUPP,4,4
	.comm	EBADMSG,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_qcow2-util.c_verify_header.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	verify_header, %function
verify_header:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	assert
	mov	r0, r4
	bl	HEADER_MAGIC
	ldr	r3, .L17
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L2
.L14:
	ldr	r3, .L17+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r4
	bl	HEADER_VERSION
	mov	r2, #3
	mov	r1, #2
	bl	IN_SET
	cmp	r0, #0
	bne	.L4
.L15:
	ldr	r3, .L17+8
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L4:
	mov	r0, r4
	bl	HEADER_CRYPT_METHOD
	cmp	r0, #0
	bne	.L15
	mov	r0, r4
	bl	HEADER_CLUSTER_BITS
	cmp	r0, #8
	ble	.L14
	mov	r0, r4
	bl	HEADER_CLUSTER_BITS
	cmp	r0, #21
	bgt	.L14
	mov	r0, r4
	bl	HEADER_SIZE
	mov	r5, r0
	mov	r0, r4
	bl	HEADER_CLUSTER_SIZE
	mov	r1, r0
	mov	r0, r5
	bl	__aeabi_idivmod
	subs	r5, r1, #0
	bne	.L14
	mov	r0, r4
	bl	HEADER_L1_SIZE
	cmp	r0, #33554432
	bgt	.L14
	mov	r0, r4
	bl	HEADER_VERSION
	cmp	r0, #3
	bne	.L1
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L15
	mov	r0, r4
	bl	HEADER_HEADER_LENGTH
	cmp	r0, #3
	bhi	.L1
	b	.L14
.L18:
	.align	2
.L17:
	.word	QCOW2_MAGIC
	.word	EBADMSG
	.word	EOPNOTSUPP
	.size	verify_header, .-verify_header
	.comm	QCOW2_MAGIC,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	EBADMSG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
