	.file	"extr_ldm.c_ldm_validate_vmdb.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Disk read failed."
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Database is not in a consistent state.  Aborting."
	.section	.rodata.str1.1
.LC2:
	.string	"VBLKs start at offset 0x%04x."
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"VMDB exceeds allowed size specified by TOCBLOCK.  Database is corrupt.  Aborting."
	.text
	.p2align 4
	.type	ldm_validate_vmdb, @function
ldm_validate_vmdb:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	rdi, rdi
	sete	dil
	test	rdx, rdx
	sete	al
	or	edi, eax
	movzx	edi, dil
	call	BUG_ON@PLT
	mov	rsi, QWORD PTR OFF_VMDB[rip]
	lea	rdx, 4[rsp]
	mov	rdi, r12
	add	rsi, rbp
	call	read_dev_sector@PLT
	test	rax, rax
	je	.L16
	lea	r13, 4[rbx]
	mov	rdi, rax
	mov	rbp, rax
	mov	rsi, r13
	call	ldm_parse_vmdb@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L17
.L4:
	mov	edi, DWORD PTR 4[rsp]
	call	put_dev_sector@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	lea	rdi, 64[rbp]
	call	get_unaligned_be16@PLT
	mov	r12d, eax
	cmp	eax, 1
	jne	.L19
	mov	esi, DWORD PTR 4[rbx]
	cmp	esi, 512
	jne	.L20
	mov	edx, DWORD PTR 8[rbx]
	mov	eax, DWORD PTR [rbx]
	imul	edx, DWORD PTR 12[rbx]
	sal	eax, 9
	cmp	edx, eax
	jle	.L4
.L21:
	lea	rdi, .LC3[rip]
	xor	r12d, r12d
	call	ldm_crit@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L20:
	lea	rdi, .LC2[rip]
	call	ldm_info@PLT
	mov	edx, DWORD PTR 8[rbx]
	mov	eax, DWORD PTR [rbx]
	imul	edx, DWORD PTR 12[rbx]
	sal	eax, 9
	cmp	edx, eax
	jle	.L4
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rdi, .LC0[rip]
	xor	r12d, r12d
	call	ldm_crit@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	lea	rdi, .LC1[rip]
	xor	r12d, r12d
	call	ldm_crit@PLT
	jmp	.L4
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ldm_validate_vmdb, .-ldm_validate_vmdb
	.comm	OFF_VMDB,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_ldm.c_ldm_validate_vmdb.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Disk read failed.\000"
	.align	2
.LC1:
	.ascii	"Database is not in a consistent state.  Aborting.\000"
	.align	2
.LC2:
	.ascii	"VBLKs start at offset 0x%04x.\000"
	.align	2
.LC3:
	.ascii	"VMDB exceeds allowed size specified by TOCBLOCK.  D"
	.ascii	"atabase is corrupt.  Aborting.\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ldm_validate_vmdb, %function
ldm_validate_vmdb:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	clz	r3, r2
	push	{r4, r5, r6, lr}
	mov	r6, r1
	mov	r4, r0
	cmp	r0, #0
	lsr	r3, r3, #5
	movne	r0, r3
	ldr	r3, .L21
	sub	sp, sp, #8
	moveq	r0, #1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r5, r2
	bl	BUG_ON
	ldr	r3, .L21+4
	mov	r0, r4
	ldr	r1, [r3]
	mov	r2, sp
	add	r1, r6, r1
	bl	read_dev_sector
	subs	r6, r0, #0
	beq	.L16
	add	r1, r5, #4
	bl	ldm_parse_vmdb
	subs	r4, r0, #0
	bne	.L17
.L4:
	ldr	r0, [sp]
	bl	put_dev_sector
.L1:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L17:
	add	r0, r6, #64
	bl	get_unaligned_be16
	cmp	r0, #1
	mov	r4, r0
	bne	.L19
	ldr	r1, [r5, #4]
	cmp	r1, #512
	bne	.L20
.L6:
	ldr	r3, [r5, #8]
	ldr	r1, [r5, #12]
	ldr	r2, [r5]
	mul	r3, r1, r3
	cmp	r3, r2, lsl #9
	ble	.L4
	ldr	r0, .L21+8
	bl	ldm_crit
	mov	r4, #0
	b	.L4
.L20:
	ldr	r0, .L21+12
	bl	ldm_info
	b	.L6
.L16:
	ldr	r0, .L21+16
	mov	r4, r6
	bl	ldm_crit
	b	.L1
.L19:
	ldr	r0, .L21+20
	bl	ldm_crit
	mov	r4, #0
	b	.L4
.L18:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	.LC4
	.word	OFF_VMDB
	.word	.LC3
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	ldm_validate_vmdb, .-ldm_validate_vmdb
	.comm	OFF_VMDB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
