	.file	"extr_blockcheck.c_ocfs2_block_check_validate_bhs.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"CRC32 failed: stored: %u, computed %u.  Applying ECC.\n"
	.align 8
.LC1:
	.string	"Fixed CRC32 failed: stored: %u, computed %u\n"
	.text
	.p2align 4
	.globl	ocfs2_block_check_validate_bhs
	.type	ocfs2_block_check_validate_bhs, @function
ocfs2_block_check_validate_bhs:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	mov	edi, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	shr	edi, 31
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 8[rsp], rdx
	mov	QWORD PTR 16[rsp], rcx
	call	BUG_ON@PLT
	test	r13d, r13d
	jne	.L29
.L16:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L29:
	.cfi_restore_state
	mov	rdi, r14
	call	ocfs2_blockcheck_inc_check@PLT
	mov	edi, DWORD PTR 4[rbx]
	call	le32_to_cpu@PLT
	mov	edi, DWORD PTR [rbx]
	mov	DWORD PTR 4[rsp], eax
	call	le16_to_cpu@PLT
	xor	esi, esi
	mov	edx, 8
	mov	rdi, rbx
	mov	DWORD PTR 24[rsp], eax
	call	memset@PLT
	test	r13d, r13d
	jle	.L3
	lea	r14d, -1[r13]
	mov	rbp, r12
	mov	rbx, r12
	mov	r8d, -1
	lea	r13, 8[r12+r14*8]
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR [rbx]
	mov	edi, r8d
	add	rbx, 8
	mov	esi, DWORD PTR 4[rax]
	mov	edx, DWORD PTR [rax]
	call	crc32_le@PLT
	mov	r8d, eax
	cmp	r13, rbx
	jne	.L4
	cmp	DWORD PTR 4[rsp], eax
	je	.L27
	mov	rdi, QWORD PTR 16[rsp]
	mov	DWORD PTR 28[rsp], r8d
	xor	ebx, ebx
	call	ocfs2_blockcheck_inc_failure@PLT
	mov	r8d, DWORD PTR 28[rsp]
	mov	edx, DWORD PTR 4[rsp]
	lea	rsi, .LC0[rip]
	mov	edi, DWORD PTR ML_ERROR[rip]
	mov	ecx, r8d
	call	mlog@PLT
	xor	edi, edi
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR [r12+rbx*8]
	mov	edx, DWORD PTR [rax]
	mov	esi, DWORD PTR 4[rax]
	mov	ecx, edx
	sal	edx, 3
	imul	ecx, ebx
	sal	ecx, 3
	call	ocfs2_hamming_encode@PLT
	mov	edi, eax
	mov	rax, rbx
	add	rbx, 1
	cmp	rax, r14
	jne	.L9
	mov	ebx, DWORD PTR 24[rsp]
	xor	r15d, r15d
	xor	ebx, edi
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR [r12+r15*8]
	mov	ecx, ebx
	mov	esi, DWORD PTR [rax]
	mov	edi, DWORD PTR 4[rax]
	mov	edx, esi
	sal	esi, 3
	imul	edx, r15d
	sal	edx, 3
	call	ocfs2_hamming_fix@PLT
	mov	rax, r15
	add	r15, 1
	cmp	rax, r14
	jne	.L11
	mov	edi, -1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rax, QWORD PTR 0[rbp]
	add	rbp, 8
	mov	esi, DWORD PTR 4[rax]
	mov	edx, DWORD PTR [rax]
	call	crc32_le@PLT
	mov	edi, eax
	cmp	rbp, r13
	jne	.L12
	cmp	DWORD PTR 4[rsp], eax
	je	.L30
.L8:
	mov	ecx, edi
	mov	edx, DWORD PTR 4[rsp]
	mov	edi, DWORD PTR ML_ERROR[rip]
	lea	rsi, .LC1[rip]
	call	mlog@PLT
	mov	r13d, DWORD PTR EIO[rip]
	neg	r13d
.L7:
	mov	edi, DWORD PTR 4[rsp]
	call	cpu_to_le32@PLT
	mov	rbx, QWORD PTR 8[rsp]
	mov	edi, DWORD PTR 24[rsp]
	mov	DWORD PTR 4[rbx], eax
	call	cpu_to_le16@PLT
	mov	DWORD PTR [rbx], eax
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L30:
	mov	rdi, QWORD PTR 16[rsp]
	call	ocfs2_blockcheck_inc_recover@PLT
.L27:
	xor	r13d, r13d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	cmp	DWORD PTR 4[rsp], -1
	je	.L27
	mov	rdi, QWORD PTR 16[rsp]
	call	ocfs2_blockcheck_inc_failure@PLT
	mov	edi, DWORD PTR ML_ERROR[rip]
	mov	edx, DWORD PTR 4[rsp]
	mov	ecx, -1
	lea	rsi, .LC0[rip]
	call	mlog@PLT
	mov	edi, -1
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	ocfs2_block_check_validate_bhs, .-ocfs2_block_check_validate_bhs
	.comm	ML_ERROR,4,4
	.comm	EIO,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_blockcheck.c_ocfs2_block_check_validate_bhs.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Fixed CRC32 failed: stored: %u, computed %u\012\000"
	.align	2
.LC1:
	.ascii	"CRC32 failed: stored: %u, computed %u.  Applying EC"
	.ascii	"C.\012\000"
	.text
	.align	2
	.global	ocfs2_block_check_validate_bhs
	.syntax unified
	.arm
	.fpu softvfp
	.type	ocfs2_block_check_validate_bhs, %function
ocfs2_block_check_validate_bhs:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r1
	sub	sp, sp, #20
	mov	r4, r0
	lsr	r0, r1, #31
	mov	r7, r2
	mov	r6, r3
	str	r3, [sp]
	bl	BUG_ON
	cmp	r5, #0
	bne	.L28
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L28:
	mov	r0, r6
	bl	ocfs2_blockcheck_inc_check
	ldr	r0, [r7, #4]
	bl	le32_to_cpu
	mov	r10, r0
	ldr	r0, [r7]
	bl	le16_to_cpu
	mov	r3, r0
	mov	r2, #8
	mov	r1, #0
	mov	r0, r7
	str	r3, [sp, #8]
	bl	memset
	cmp	r5, #0
	ble	.L3
	sub	r3, r4, #4
	mvn	r4, #0
	mov	r8, r3
	mov	r0, r4
	str	r3, [sp, #4]
	add	r6, r3, r5, lsl #2
.L4:
	ldr	r3, [r8, #4]!
	ldr	r2, [r3]
	ldr	r1, [r3, #4]
	bl	crc32_le
	cmp	r8, r6
	bne	.L4
	cmp	r10, r0
	mov	r4, r0
	beq	.L14
	ldr	r3, .L30
	ldr	r0, [sp]
	mov	r6, r3
	str	r3, [sp, #12]
	bl	ocfs2_blockcheck_inc_failure
	mov	r3, r4
	ldr	r0, [r6]
	mov	r2, r10
	ldr	r1, .L30+4
	bl	mlog
	mov	r0, #0
	ldr	fp, [sp, #4]
	mov	r4, r0
	mov	r6, fp
.L7:
	ldr	r3, [fp, #4]!
	mov	r8, r4
	ldr	r2, [r3]
	ldr	r1, [r3, #4]
	mul	r3, r4, r2
	lsl	r2, r2, #3
	lsl	r3, r3, #3
	add	r4, r4, #1
	bl	ocfs2_hamming_encode
	cmp	r5, r4
	bne	.L7
	mov	r5, #0
	ldr	r3, [sp, #8]
	ldr	fp, [sp, #4]
	eor	r9, r3, r0
.L9:
	ldr	r2, [fp, #4]!
	mov	r3, r9
	ldr	r1, [r2]
	ldr	r0, [r2, #4]
	mul	r2, r5, r1
	lsl	r1, r1, #3
	lsl	r2, r2, #3
	bl	ocfs2_hamming_fix
	cmp	r8, r5
	add	r5, r5, #1
	bne	.L9
	mvn	r0, #0
	ldr	r3, [sp, #4]
	add	r4, r3, r4, lsl #2
.L10:
	ldr	r3, [r6, #4]!
	ldr	r2, [r3]
	ldr	r1, [r3, #4]
	bl	crc32_le
	cmp	r4, r6
	bne	.L10
	cmp	r10, r0
	beq	.L29
.L11:
	ldr	r2, [sp, #12]
	mov	r3, r0
	ldr	r1, .L30+8
	ldr	r0, [r2]
	mov	r2, r10
	bl	mlog
	ldr	r3, .L30+12
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L5:
	mov	r0, r10
	bl	cpu_to_le32
	mov	r3, r0
	ldr	r0, [sp, #8]
	str	r3, [r7, #4]
	bl	cpu_to_le16
	str	r0, [r7]
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	cmn	r10, #1
	bne	.L25
.L14:
	mov	r5, #0
	b	.L5
.L29:
	ldr	r0, [sp]
	bl	ocfs2_blockcheck_inc_recover
	mov	r5, #0
	b	.L5
.L25:
	ldr	r3, .L30
	ldr	r0, [sp]
	mov	r4, r3
	str	r3, [sp, #12]
	bl	ocfs2_blockcheck_inc_failure
	mvn	r3, #0
	mov	r2, r10
	ldr	r0, [r4]
	ldr	r1, .L30+4
	bl	mlog
	mvn	r0, #0
	b	.L11
.L31:
	.align	2
.L30:
	.word	ML_ERROR
	.word	.LC1
	.word	.LC0
	.word	EIO
	.size	ocfs2_block_check_validate_bhs, .-ocfs2_block_check_validate_bhs
	.comm	ML_ERROR,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
