	.file	"extr_recovery.c_nilfs_search_super_root.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	nilfs_search_super_root
	.type	nilfs_search_super_root, @function
nilfs_search_super_root:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 136
	.cfi_def_cfa_offset 192
	mov	edi, DWORD PTR segments[rip]
	mov	QWORD PTR 48[rsp], rdx
	mov	QWORD PTR 24[rsp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 120[rsp], rax
	xor	eax, eax
	call	LIST_HEAD@PLT
	mov	r15, QWORD PTR 0[r13]
	mov	rax, QWORD PTR 16[r13]
	mov	rdi, r13
	mov	rbx, QWORD PTR 32[r13]
	mov	rsi, r15
	mov	QWORD PTR 64[rsp], rax
	mov	r14, r15
	call	nilfs_get_segnum_of_block@PLT
	lea	rdx, 80[rsp]
	mov	rdi, r13
	mov	r12, rax
	lea	rax, 88[rsp]
	mov	QWORD PTR 32[rsp], rdx
	mov	rcx, rax
	mov	rsi, r12
	mov	QWORD PTR 40[rsp], rax
	call	nilfs_get_segment_range@PLT
	lea	rax, 96[rsp]
	mov	DWORD PTR 12[rsp], 0
	mov	DWORD PTR 16[rsp], 0
	mov	r15, rax
	mov	QWORD PTR 72[rsp], 0
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L37:
	cmp	DWORD PTR NILFS_SEG_FAIL_IO[rip], eax
	je	.L34
.L5:
	mov	ecx, DWORD PTR 12[rsp]
	test	ecx, ecx
	je	.L34
.L18:
	endbr64
	mov	eax, DWORD PTR 16[rsp]
	test	eax, eax
	jne	.L17
.L14:
	mov	rsi, r12
	lea	rdi, segments[rip]
	call	nilfs_segment_list_add@PLT
	mov	edi, eax
	mov	DWORD PTR 12[rsp], eax
	call	unlikely@PLT
	mov	edx, DWORD PTR 12[rsp]
	test	rax, rax
	jne	.L34
	mov	rcx, QWORD PTR 40[rsp]
	mov	rdx, QWORD PTR 32[rsp]
	mov	rsi, rbp
	mov	rdi, r13
	add	rbx, 1
	mov	r12, rbp
	call	nilfs_get_segment_range@PLT
	mov	DWORD PTR 16[rsp], 1
	mov	r14, QWORD PTR 80[rsp]
.L13:
	mov	DWORD PTR 12[rsp], 1
.L2:
	mov	rdi, QWORD PTR 24[rsp]
	mov	rdx, rbx
	mov	rcx, r15
	mov	rsi, r14
	mov	r8d, 1
	call	load_segment_summary@PLT
	mov	edx, eax
	test	eax, eax
	jne	.L37
	mov	rax, QWORD PTR 96[rsp]
	xor	edi, edi
	add	rax, r14
	sub	rax, 1
	cmp	QWORD PTR 88[rsp], rax
	setl	dil
	mov	QWORD PTR 56[rsp], rax
	call	unlikely@PLT
	mov	edx, DWORD PTR NILFS_SEG_FAIL_CONSISTENCY[rip]
	test	rax, rax
	jne	.L5
	mov	rax, QWORD PTR 48[rsp]
	mov	rsi, QWORD PTR 104[rsp]
	mov	rdi, r13
	mov	QWORD PTR 72[rax], r14
	mov	QWORD PTR 64[rax], rbx
	mov	QWORD PTR 56[rax], r12
	call	nilfs_get_segnum_of_block@PLT
	mov	rdi, r15
	mov	rbp, rax
	mov	rax, QWORD PTR 48[rsp]
	mov	QWORD PTR 48[rax], rbp
	call	NILFS_SEG_HAS_SR@PLT
	mov	DWORD PTR 16[rsp], eax
	test	eax, eax
	jne	.L7
	mov	edi, DWORD PTR 12[rsp]
	test	edi, edi
	je	.L38
	mov	rax, QWORD PTR 48[rsp]
	cmp	QWORD PTR 24[rax], 0
	je	.L39
.L10:
	mov	rdi, r15
	call	NILFS_SEG_LOGEND@PLT
	test	rax, rax
	je	.L12
	mov	rax, QWORD PTR 48[rsp]
	mov	QWORD PTR 16[rax], r14
.L12:
	add	r14, QWORD PTR 96[rsp]
	cmp	QWORD PTR 88[rsp], r14
	jle	.L14
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR 48[rsp]
	mov	rcx, QWORD PTR 64[rsp]
	lea	rdi, segments[rip]
	lea	rdx, 1[rcx]
	mov	QWORD PTR [rax], rcx
	mov	rcx, QWORD PTR 56[rsp]
	mov	QWORD PTR 16[rax], 0
	mov	QWORD PTR 32[rax], rcx
	mov	QWORD PTR 24[rax], 0
	mov	QWORD PTR 16[rsp], rdx
	call	nilfs_dispose_segment_list@PLT
	mov	rcx, QWORD PTR 96[rsp]
	mov	rdx, QWORD PTR 16[rsp]
	mov	QWORD PTR 24[r13], rbx
	mov	esi, DWORD PTR 12[rsp]
	mov	QWORD PTR 64[r13], r12
	add	rcx, r14
	mov	QWORD PTR 56[r13], rdx
	mov	rax, rcx
	sub	rcx, QWORD PTR 80[rsp]
	mov	QWORD PTR 40[r13], rbp
	mov	QWORD PTR 72[r13], rcx
	mov	ecx, DWORD PTR 112[rsp]
	mov	DWORD PTR 48[r13], ecx
	test	esi, esi
	jne	.L40
	mov	ecx, DWORD PTR 8[r13]
	test	DWORD PTR NILFS_VALID_FS[rip], ecx
	jne	.L21
	cmp	rax, QWORD PTR 88[rsp]
	jl	.L22
.L43:
	mov	QWORD PTR 64[rsp], rdx
	mov	QWORD PTR 72[rsp], r14
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L34:
	mov	r14d, edx
.L4:
	lea	rdi, segments[rip]
	call	nilfs_dispose_segment_list@PLT
	test	r14d, r14d
	jns	.L41
.L1:
	mov	rax, QWORD PTR 120[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L42
	add	rsp, 136
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
.L39:
	.cfi_restore_state
	mov	rdi, r15
	call	NILFS_SEG_LOGBGN@PLT
	test	rax, rax
	je	.L10
	mov	rax, QWORD PTR 48[rsp]
	mov	QWORD PTR 24[rax], r14
	mov	QWORD PTR 40[rax], rbx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L40:
	mov	ecx, DWORD PTR NILFS_RECOVERY_SR_UPDATED[rip]
	mov	rsi, QWORD PTR 48[rsp]
	mov	DWORD PTR 12[rsi], ecx
	cmp	rax, QWORD PTR 88[rsp]
	jge	.L43
.L22:
	mov	QWORD PTR 72[rsp], r14
	mov	r14, rax
	mov	DWORD PTR 16[rsp], 0
	mov	QWORD PTR 64[rsp], rdx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L41:
	mov	edi, r14d
	call	nilfs_warn_segment_error@PLT
	mov	r14d, eax
	jmp	.L1
.L21:
	mov	QWORD PTR 72[rsp], r14
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rbx, QWORD PTR 48[rsp]
	lea	rdi, segments[rip]
	xor	r14d, r14d
	mov	esi, DWORD PTR 8[rbx]
	call	list_splice@PLT
	mov	rax, QWORD PTR 72[rsp]
	mov	QWORD PTR 0[r13], rax
	mov	rax, QWORD PTR 24[r13]
	mov	QWORD PTR 32[r13], rax
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR 16[r13], rax
	jmp	.L1
.L38:
	mov	r14d, DWORD PTR NILFS_SEG_FAIL_CONSISTENCY[rip]
	jmp	.L4
.L42:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nilfs_search_super_root, .-nilfs_search_super_root
	.comm	segments,4,4
	.comm	NILFS_VALID_FS,4,4
	.comm	NILFS_SEG_FAIL_IO,4,4
	.comm	NILFS_SEG_FAIL_CONSISTENCY,4,4
	.comm	NILFS_RECOVERY_SR_UPDATED,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_recovery.c_nilfs_search_super_root.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	nilfs_search_super_root
	.syntax unified
	.arm
	.fpu softvfp
	.type	nilfs_search_super_root, %function
nilfs_search_super_root:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, r0
	ldr	r6, .L44
	sub	sp, sp, #60
	ldr	r3, .L44+4
	str	r2, [sp, #16]
	str	r1, [sp, #8]
	ldr	r0, [r6]
	ldr	r3, [r3]
	str	r3, [sp, #52]
	mov	r3,#0
	bl	LIST_HEAD
	ldr	r5, [fp]
	ldr	r3, [fp, #8]
	mov	r1, r5
	mov	r0, fp
	str	r3, [sp, #24]
	ldr	r4, [fp, #16]
	bl	nilfs_get_segnum_of_block
	mov	r9, #0
	mov	r1, r0
	mov	r8, r0
	add	r3, sp, #36
	mov	r0, fp
	add	r2, sp, #32
	str	r6, [sp, #12]
	mov	r7, r9
	bl	nilfs_get_segment_range
	mov	r6, r9
	str	r9, [sp, #28]
	b	.L2
.L37:
	ldr	r3, .L44+8
	ldr	r3, [r3]
	cmp	r3, r10
	beq	.L4
.L5:
	cmp	r9, #0
	beq	.L4
.L38:
.L18:
	cmp	r7, #0
	bne	.L17
.L14:
	mov	r1, r8
	ldr	r0, [sp, #12]
	bl	nilfs_segment_list_add
	mov	r10, r0
	bl	unlikely
	cmp	r0, #0
	bne	.L4
	mov	r8, r6
	mov	r7, #1
	mov	r1, r6
	mov	r0, fp
	add	r3, sp, #36
	add	r2, sp, #32
	bl	nilfs_get_segment_range
	ldr	r5, [sp, #32]
	add	r4, r4, #1
.L13:
	mov	r9, #1
.L2:
	mov	r3, #1
	mov	r2, r4
	str	r3, [sp]
	mov	r1, r5
	ldr	r0, [sp, #8]
	add	r3, sp, #40
	bl	load_segment_summary
	subs	r10, r0, #0
	bne	.L37
	ldr	r10, [sp, #40]
	ldr	r0, [sp, #36]
	add	r10, r5, r10
	sub	r10, r10, #1
	cmp	r0, r10
	movge	r0, #0
	movlt	r0, #1
	bl	unlikely
	subs	r3, r0, #0
	beq	.L6
	ldr	r3, .L44+12
	cmp	r9, #0
	ldr	r10, [r3]
	bne	.L38
.L4:
	ldr	r0, .L44
	bl	nilfs_dispose_segment_list
	cmp	r10, #0
	bge	.L39
.L1:
	ldr	r3, .L44+4
	ldr	r2, [r3]
	ldr	r3, [sp, #52]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L40
	mov	r0, r10
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	ldr	r7, [sp, #16]
	ldr	r1, [sp, #44]
	str	r5, [r7, #40]
	str	r4, [r7, #36]
	str	r8, [r7, #32]
	mov	r0, fp
	str	r3, [sp, #20]
	bl	nilfs_get_segnum_of_block
	mov	r6, r0
	add	r0, sp, #40
	str	r6, [r7, #28]
	bl	NILFS_SEG_HAS_SR
	subs	r7, r0, #0
	ldr	r3, [sp, #20]
	bne	.L7
	cmp	r9, #0
	beq	.L41
	ldr	r3, [sp, #16]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	beq	.L42
.L10:
	add	r0, sp, #40
	bl	NILFS_SEG_LOGEND
	cmp	r0, #0
	ldrne	r3, [sp, #16]
	ldr	r2, [sp, #40]
	strne	r5, [r3, #12]
	ldr	r3, [sp, #36]
	add	r5, r5, r2
	cmp	r3, r5
	ble	.L14
	b	.L13
.L7:
	ldr	r7, [sp, #16]
	ldr	r2, [sp, #24]
	str	r3, [r7, #12]
	str	r2, [r7]
	str	r3, [r7, #16]
	ldr	r0, [sp, #12]
	str	r10, [r7, #20]
	bl	nilfs_dispose_segment_list
	ldr	r3, [sp, #40]
	ldr	r2, [sp, #32]
	ldr	r0, [sp, #24]
	ldr	r1, [sp, #48]
	add	r3, r5, r3
	add	r0, r0, #1
	sub	r2, r3, r2
	cmp	r9, #0
	str	r0, [fp, #28]
	str	r4, [fp, #12]
	str	r8, [fp, #32]
	str	r6, [fp, #20]
	str	r2, [fp, #36]
	str	r1, [fp, #24]
	bne	.L43
	ldr	r2, .L44+16
	ldr	r1, [fp, #4]
	ldr	r2, [r2]
	tst	r1, r2
	bne	.L21
.L16:
	ldr	r2, [sp, #36]
	cmp	r3, r2
	strge	r0, [sp, #24]
	strge	r5, [sp, #28]
	bge	.L14
	str	r5, [sp, #28]
	mov	r7, #0
	mov	r5, r3
	str	r0, [sp, #24]
	b	.L13
.L42:
	add	r0, sp, #40
	bl	NILFS_SEG_LOGBGN
	cmp	r0, #0
	ldrne	r3, [sp, #16]
	strne	r5, [r3, #16]
	strne	r4, [r3, #24]
	b	.L10
.L43:
	ldr	r2, .L44+20
	ldr	r2, [r2]
	str	r2, [r7, #8]
	b	.L16
.L39:
	mov	r0, r10
	bl	nilfs_warn_segment_error
	mov	r10, r0
	b	.L1
.L21:
	str	r5, [sp, #28]
.L17:
	ldr	r4, [sp, #16]
	ldr	r0, .L44
	ldr	r1, [r4, #4]
	bl	list_splice
	ldr	r2, [r4]
	ldr	r3, [fp, #12]
	str	r2, [fp, #8]
	ldr	r2, [sp, #28]
	mov	r10, #0
	str	r2, [fp]
	str	r3, [fp, #16]
	b	.L1
.L41:
	ldr	r3, .L44+12
	ldr	r10, [r3]
	b	.L4
.L40:
	bl	__stack_chk_fail
.L45:
	.align	2
.L44:
	.word	segments
	.word	.LC0
	.word	NILFS_SEG_FAIL_IO
	.word	NILFS_SEG_FAIL_CONSISTENCY
	.word	NILFS_VALID_FS
	.word	NILFS_RECOVERY_SR_UPDATED
	.size	nilfs_search_super_root, .-nilfs_search_super_root
	.comm	segments,4,4
	.comm	NILFS_VALID_FS,4,4
	.comm	NILFS_SEG_FAIL_IO,4,4
	.comm	NILFS_SEG_FAIL_CONSISTENCY,4,4
	.comm	NILFS_RECOVERY_SR_UPDATED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
