	.file	"extr_ldm.c_ldm_parse_privhead.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Vista"
.LC1:
	.string	"2000/XP"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"Cannot find PRIVHEAD structure. LDM database is corrupt. Aborting."
	.align 8
.LC3:
	.string	"Expected PRIVHEAD version 2.11 or 2.12, got %d.%d. Aborting."
	.align 8
.LC4:
	.string	"PRIVHEAD version %d.%d (Windows %s)."
	.align 8
.LC5:
	.string	"Database is normally %u bytes, it claims to be %llu bytes."
	.align 8
.LC6:
	.string	"PRIVHEAD disk size doesn't match real disk size"
	.align 8
.LC7:
	.string	"PRIVHEAD contains an invalid GUID."
	.section	.rodata.str1.1
.LC8:
	.string	"Parsed PRIVHEAD successfully."
	.text
	.p2align 4
	.type	ldm_parse_privhead, @function
ldm_parse_privhead:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	test	rdi, rdi
	sete	dil
	test	rsi, rsi
	sete	al
	or	edi, eax
	movzx	edi, dil
	call	BUG_ON@PLT
	mov	rdi, rbp
	call	get_unaligned_be64@PLT
	cmp	rax, QWORD PTR MAGIC_PRIVHEAD[rip]
	je	.L2
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	ldm_error@PLT
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	lea	rdi, 48[rbp]
	call	get_unaligned_be16@PLT
	lea	rdi, 56[rbp]
	mov	DWORD PTR [rbx], eax
	call	get_unaligned_be16@PLT
	lea	rdi, 1132[rbp]
	mov	DWORD PTR 4[rbx], eax
	call	get_unaligned_be64@PLT
	lea	rdi, 1164[rbp]
	mov	QWORD PTR 8[rbx], rax
	call	get_unaligned_be64@PLT
	lea	rdi, 1196[rbp]
	mov	QWORD PTR 16[rbx], rax
	call	get_unaligned_be64@PLT
	lea	rdi, 1228[rbp]
	mov	QWORD PTR 24[rbx], rax
	call	get_unaligned_be64@PLT
	mov	esi, DWORD PTR [rbx]
	movabs	rdx, 51539607554
	mov	QWORD PTR 32[rbx], rax
	mov	rax, QWORD PTR [rbx]
	cmp	rax, rdx
	mov	edx, DWORD PTR 4[rbx]
	je	.L4
	movabs	rdi, 47244640258
	lea	rcx, .LC1[rip]
	cmp	rax, rdi
	jne	.L16
.L5:
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	ldm_debug@PLT
	mov	rdx, QWORD PTR 32[rbx]
	mov	rsi, QWORD PTR LDM_DB_SIZE[rip]
	cmp	rdx, rsi
	jne	.L17
.L6:
	mov	rax, QWORD PTR 16[rbx]
	test	rax, rax
	je	.L7
	add	rax, QWORD PTR 8[rbx]
	cmp	rax, QWORD PTR 24[rbx]
	jle	.L8
.L7:
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	ldm_error@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	lea	rdi, .LC5[rip]
	call	ldm_info@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	lea	rcx, .LC0[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	lea	rsi, 40[rbx]
	lea	rdi, 192[rbp]
	call	uuid_parse@PLT
	test	rax, rax
	jne	.L18
	lea	rdi, .LC8[rip]
	xor	eax, eax
	call	ldm_debug@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	ldm_error@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	lea	rdi, .LC7[rip]
	xor	eax, eax
	call	ldm_error@PLT
	xor	eax, eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ldm_parse_privhead, .-ldm_parse_privhead
	.comm	MAGIC_PRIVHEAD,8,8
	.comm	LDM_DB_SIZE,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_parse_privhead.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Vista\000"
	.align	2
.LC1:
	.ascii	"2000/XP\000"
	.align	2
.LC2:
	.ascii	"Cannot find PRIVHEAD structure. LDM database is cor"
	.ascii	"rupt. Aborting.\000"
	.align	2
.LC3:
	.ascii	"Expected PRIVHEAD version 2.11 or 2.12, got %d.%d. "
	.ascii	"Aborting.\000"
	.align	2
.LC4:
	.ascii	"PRIVHEAD version %d.%d (Windows %s).\000"
	.align	2
.LC5:
	.ascii	"Database is normally %u bytes, it claims to be %llu"
	.ascii	" bytes.\000"
	.align	2
.LC6:
	.ascii	"PRIVHEAD disk size doesn't match real disk size\000"
	.align	2
.LC7:
	.ascii	"PRIVHEAD contains an invalid GUID.\000"
	.align	2
.LC8:
	.ascii	"Parsed PRIVHEAD successfully.\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ldm_parse_privhead, %function
ldm_parse_privhead:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	clz	r3, r1
	push	{r4, r5, r6, lr}
	mov	r5, r0
	cmp	r0, #0
	lsr	r3, r3, #5
	movne	r0, r3
	moveq	r0, #1
	mov	r4, r1
	bl	BUG_ON
	mov	r0, r5
	bl	get_unaligned_be64
	ldr	r3, .L19
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L2
	ldr	r0, .L19+4
	bl	ldm_error
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L2:
	add	r0, r5, #48
	bl	get_unaligned_be16
	mov	r3, r0
	add	r0, r5, #56
	str	r3, [r4]
	bl	get_unaligned_be16
	mov	r3, r0
	add	r0, r5, #1120
	str	r3, [r4, #4]
	add	r0, r0, #12
	bl	get_unaligned_be64
	mov	r3, r0
	add	r0, r5, #1152
	str	r3, [r4, #8]
	add	r0, r0, #12
	bl	get_unaligned_be64
	mov	r3, r0
	add	r0, r5, #1184
	str	r3, [r4, #12]
	add	r0, r0, #12
	bl	get_unaligned_be64
	mov	r3, r0
	add	r0, r5, #1216
	str	r3, [r4, #16]
	add	r0, r0, #12
	bl	get_unaligned_be64
	ldr	r1, [r4]
	ldr	r2, [r4, #4]
	cmp	r1, #2
	str	r0, [r4, #20]
	beq	.L4
.L5:
	ldr	r0, .L19+8
	bl	ldm_error
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L4:
	cmp	r2, #12
	beq	.L11
	cmp	r2, #11
	bne	.L5
	ldr	r3, .L19+12
.L6:
	mov	r1, #2
	ldr	r0, .L19+16
	bl	ldm_debug
	ldr	r3, .L19+20
	ldr	r2, [r4, #20]
	ldr	r1, [r3]
	cmp	r2, r1
	beq	.L7
	ldr	r0, .L19+24
	asr	r3, r2, #31
	bl	ldm_info
.L7:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L8
	ldr	r1, [r4, #8]
	ldr	r2, [r4, #16]
	add	r3, r3, r1
	cmp	r3, r2
	bgt	.L8
	add	r1, r4, #24
	add	r0, r5, #192
	bl	uuid_parse
	cmp	r0, #0
	bne	.L18
	ldr	r0, .L19+28
	bl	ldm_debug
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r0, .L19+32
	bl	ldm_error
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L11:
	ldr	r3, .L19+36
	b	.L6
.L18:
	ldr	r0, .L19+40
	bl	ldm_error
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L20:
	.align	2
.L19:
	.word	MAGIC_PRIVHEAD
	.word	.LC2
	.word	.LC3
	.word	.LC1
	.word	.LC4
	.word	LDM_DB_SIZE
	.word	.LC5
	.word	.LC8
	.word	.LC6
	.word	.LC0
	.word	.LC7
	.size	ldm_parse_privhead, .-ldm_parse_privhead
	.comm	MAGIC_PRIVHEAD,4,4
	.comm	LDM_DB_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
