	.file	"extr_btree.c_nilfs_btree_do_lookup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nilfs_btree_do_lookup, @function
nilfs_btree_do_lookup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, r8d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, r9d
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 120
	.cfi_def_cfa_offset 176
	mov	DWORD PTR 16[rsp], edx
	mov	QWORD PTR 32[rsp], rcx
	mov	DWORD PTR 8[rsp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 104[rsp], rax
	xor	eax, eax
	call	nilfs_btree_get_root@PLT
	mov	rdi, rax
	mov	rbx, rax
	call	nilfs_btree_node_get_level@PLT
	cmp	eax, r14d
	jge	.L2
.L31:
	mov	eax, DWORD PTR ENOENT[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 104[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L33
	add	rsp, 120
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L2:
	.cfi_restore_state
	mov	rdi, rbx
	mov	ebp, eax
	call	nilfs_btree_node_get_nchildren@PLT
	test	rax, rax
	jle	.L31
	lea	rax, 76[rsp]
	mov	esi, DWORD PTR 16[rsp]
	mov	rdi, rbx
	mov	rdx, rax
	mov	QWORD PTR 24[rsp], rax
	call	nilfs_btree_node_lookup@PLT
	mov	edx, DWORD PTR NILFS_BTREE_ROOT_NCHILDREN_MAX[rip]
	mov	esi, DWORD PTR 76[rsp]
	mov	rdi, rbx
	mov	r14d, eax
	lea	ebx, -1[rbp]
	call	nilfs_btree_node_get_ptr@PLT
	movsx	rdx, ebp
	mov	esi, DWORD PTR 76[rsp]
	mov	rdi, r12
	sal	rdx, 4
	mov	DWORD PTR 20[rsp], eax
	lea	rax, [r15+rdx]
	mov	QWORD PTR 40[rsp], rdx
	mov	QWORD PTR 8[rax], 0
	mov	DWORD PTR [rax], esi
	call	nilfs_btree_nchildren_per_block@PLT
	cmp	DWORD PTR 8[rsp], ebx
	mov	r8d, DWORD PTR 20[rsp]
	mov	DWORD PTR 12[rsp], eax
	jg	.L5
	lea	rax, 80[rsp]
	mov	rdx, QWORD PTR 40[rsp]
	test	r13d, r13d
	mov	QWORD PTR 48[rsp], rax
	lea	rax, 88[rsp]
	mov	QWORD PTR 56[rsp], rax
	lea	rbp, -8[r15+rdx]
	setne	BYTE PTR 20[rsp]
	.p2align 4,,10
	.p2align 3
.L13:
	cmp	DWORD PTR NILFS_BTREE_LEVEL_NODE_MIN[rip], ebx
	lea	edx, 1[rbx]
	jne	.L16
	cmp	BYTE PTR 20[rsp], 0
	jne	.L34
.L16:
	xor	ecx, ecx
.L6:
	mov	rdx, rbp
	mov	esi, r8d
	mov	rdi, r12
	call	__nilfs_btree_get_block@PLT
	test	eax, eax
	js	.L1
	mov	esi, ebx
	mov	rdi, r15
	call	nilfs_btree_get_nonroot_node@PLT
	mov	edx, ebx
	mov	rdi, r12
	mov	rsi, rax
	mov	r13, rax
	call	nilfs_btree_bad_node@PLT
	test	rax, rax
	jne	.L35
	test	r14d, r14d
	je	.L36
	mov	eax, DWORD PTR 12[rsp]
	mov	DWORD PTR 76[rsp], 0
	test	eax, eax
	jle	.L18
	xor	esi, esi
.L9:
	mov	edx, DWORD PTR 12[rsp]
	mov	rdi, r13
	call	nilfs_btree_node_get_ptr@PLT
	mov	r8d, eax
.L12:
	mov	eax, DWORD PTR 76[rsp]
	sub	ebx, 1
	sub	rbp, 16
	mov	DWORD PTR 8[rbp], eax
	cmp	DWORD PTR 8[rsp], ebx
	jle	.L13
.L5:
	test	r14d, r14d
	je	.L31
	mov	rcx, QWORD PTR 32[rsp]
	xor	eax, eax
	test	rcx, rcx
	je	.L1
	mov	DWORD PTR [rcx], r8d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rcx, QWORD PTR 56[rsp]
	mov	rsi, r15
	mov	rdi, r12
	mov	DWORD PTR 40[rsp], r8d
	call	nilfs_btree_get_node@PLT
	mov	rcx, QWORD PTR 48[rsp]
	mov	r8d, DWORD PTR 40[rsp]
	mov	DWORD PTR 84[rsp], 7
	mov	DWORD PTR 92[rsp], eax
	mov	eax, DWORD PTR 76[rsp]
	mov	DWORD PTR 80[rsp], eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edi, 1
.L11:
	call	WARN_ON@PLT
	mov	r8d, DWORD PTR NILFS_BMAP_INVALID_PTR[rip]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L36:
	mov	esi, DWORD PTR 16[rsp]
	mov	rdx, QWORD PTR 24[rsp]
	mov	rdi, r13
	call	nilfs_btree_node_lookup@PLT
	mov	esi, DWORD PTR 76[rsp]
	mov	r14d, eax
	cmp	esi, DWORD PTR 12[rsp]
	jl	.L9
	test	eax, eax
	jne	.L18
	xor	edi, edi
	cmp	DWORD PTR NILFS_BTREE_LEVEL_NODE_MIN[rip], ebx
	setne	dil
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L35:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nilfs_btree_do_lookup, .-nilfs_btree_do_lookup
	.comm	NILFS_BTREE_ROOT_NCHILDREN_MAX,4,4
	.comm	NILFS_BTREE_LEVEL_NODE_MIN,4,4
	.comm	NILFS_BMAP_INVALID_PTR,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,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_btree.c_nilfs_btree_do_lookup.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nilfs_btree_do_lookup, %function
nilfs_btree_do_lookup:
	@ args = 8, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #44
	str	r3, [sp, #12]
	ldr	r3, .L30
	str	r2, [sp, #8]
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	mov	r8, r1
	mov	r6, r0
	bl	nilfs_btree_get_root
	mov	r4, r0
	bl	nilfs_btree_node_get_level
	ldr	r3, [sp, #80]
	cmp	r0, r3
	bge	.L2
.L24:
	ldr	r3, .L30+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L30
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L26
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r5, r0
	mov	r0, r4
	bl	nilfs_btree_node_get_nchildren
	cmp	r0, #0
	ble	.L24
	mov	r0, r4
	ldr	r1, [sp, #8]
	add	r2, sp, #16
	bl	nilfs_btree_node_lookup
	ldr	r3, .L30+8
	ldr	r1, [sp, #16]
	ldr	r2, [r3]
	mov	r9, r0
	mov	r0, r4
	bl	nilfs_btree_node_get_ptr
	mov	r1, #0
	ldr	r3, [sp, #16]
	add	r2, r8, r5, lsl #3
	str	r1, [r2, #4]
	mov	r7, r0
	str	r3, [r8, r5, lsl #3]
	mov	r0, r6
	bl	nilfs_btree_nchildren_per_block
	ldr	r3, [sp, #80]
	sub	r4, r5, #1
	cmp	r3, r4
	mov	r10, r0
	lsl	r5, r5, #3
	bgt	.L5
	ldr	r3, [sp, #84]
	sub	r5, r5, #4
	subs	r3, r3, #0
	movne	r3, #1
	ldr	fp, .L30+12
	str	r3, [sp, #4]
	add	r5, r8, r5
	b	.L13
.L9:
	mov	r0, r7
	mov	r2, r10
	bl	nilfs_btree_node_get_ptr
	mov	r7, r0
.L12:
	ldr	r2, [sp, #80]
	ldr	r3, [sp, #16]
	sub	r4, r4, #1
	cmp	r2, r4
	str	r3, [r5, #-4]
	sub	r5, r5, #8
	bgt	.L5
.L13:
	ldr	r3, [fp]
	ldr	r1, [sp, #4]
	add	r2, r4, #1
	cmp	r3, r4
	movne	r1, #0
	andeq	r1, r1, #1
	cmp	r1, #0
	mov	r3, r1
	bne	.L27
.L6:
	mov	r1, r7
	mov	r2, r5
	mov	r0, r6
	bl	__nilfs_btree_get_block
	cmp	r0, #0
	blt	.L1
	mov	r1, r4
	mov	r0, r8
	bl	nilfs_btree_get_nonroot_node
	mov	r2, r4
	mov	r1, r0
	mov	r7, r0
	mov	r0, r6
	bl	nilfs_btree_bad_node
	subs	r1, r0, #0
	bne	.L28
	cmp	r9, #0
	beq	.L29
	cmp	r10, #0
	str	r1, [sp, #16]
	bgt	.L9
.L18:
	mov	r0, #1
.L11:
	bl	WARN_ON
	ldr	r3, .L30+16
	ldr	r7, [r3]
	b	.L12
.L29:
	ldr	r1, [sp, #8]
	mov	r0, r7
	add	r2, sp, #16
	bl	nilfs_btree_node_lookup
	ldr	r1, [sp, #16]
	mov	r9, r0
	cmp	r1, r10
	blt	.L9
	cmp	r0, #0
	bne	.L18
	ldr	r0, [fp]
	subs	r0, r0, r4
	movne	r0, #1
	b	.L11
.L27:
	add	r3, sp, #28
	mov	r1, r8
	mov	r0, r6
	bl	nilfs_btree_get_node
	mov	r2, #7
	ldr	r3, [sp, #16]
	str	r0, [sp, #32]
	str	r3, [sp, #20]
	str	r2, [sp, #24]
	add	r3, sp, #20
	b	.L6
.L5:
	cmp	r9, #0
	beq	.L24
	ldr	r3, [sp, #12]
	cmp	r3, #0
	movne	r0, #0
	ldreq	r0, [sp, #12]
	strne	r7, [r3]
	b	.L1
.L28:
	ldr	r3, .L30+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L26:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	.LC0
	.word	ENOENT
	.word	NILFS_BTREE_ROOT_NCHILDREN_MAX
	.word	NILFS_BTREE_LEVEL_NODE_MIN
	.word	NILFS_BMAP_INVALID_PTR
	.word	EINVAL
	.size	nilfs_btree_do_lookup, .-nilfs_btree_do_lookup
	.comm	NILFS_BTREE_ROOT_NCHILDREN_MAX,4,4
	.comm	NILFS_BTREE_LEVEL_NODE_MIN,4,4
	.comm	NILFS_BMAP_INVALID_PTR,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
