	.file	"extr_root-tree.c_btrfs_update_root.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"unable to find root key (%llu %u %llu) in tree %llu"
	.text
	.p2align 4
	.globl	btrfs_update_root
	.type	btrfs_update_root, @function
btrfs_update_root:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	eax, eax
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rbx, QWORD PTR 8[rsi]
	mov	QWORD PTR 8[rsp], rcx
	call	btrfs_alloc_path@PLT
	mov	r15d, DWORD PTR ENOMEM[rip]
	neg	r15d
	test	rax, rax
	je	.L1
	mov	r9d, 1
	xor	r8d, r8d
	mov	rcx, rax
	mov	rdx, r13
	mov	rsi, r12
	mov	rdi, r14
	mov	rbp, rax
	call	btrfs_search_slot@PLT
	mov	r15d, eax
	test	eax, eax
	js	.L4
	jne	.L14
	mov	rax, QWORD PTR 8[rbp]
	mov	rbx, QWORD PTR [rax]
	mov	rax, QWORD PTR 0[rbp]
	mov	esi, DWORD PTR [rax]
	mov	rdi, rbx
	mov	DWORD PTR 20[rsp], esi
	call	btrfs_item_ptr_offset@PLT
	mov	esi, DWORD PTR 20[rsp]
	mov	rdi, rbx
	mov	QWORD PTR 24[rsp], rax
	call	btrfs_item_size_nr@PLT
	cmp	eax, 3
	ja	.L6
	mov	rdi, rbp
	call	btrfs_release_path@PLT
	mov	rcx, rbp
	mov	rdx, r13
	mov	rsi, r12
	mov	r9d, 1
	mov	r8d, -1
	mov	rdi, r14
	call	btrfs_search_slot@PLT
	mov	r15d, eax
	test	eax, eax
	js	.L12
	mov	rdx, rbp
	mov	rsi, r12
	mov	rdi, r14
	call	btrfs_del_item@PLT
	mov	r15d, eax
	test	eax, eax
	js	.L12
	mov	rdi, rbp
	call	btrfs_release_path@PLT
	mov	rcx, r13
	mov	rdx, rbp
	mov	rsi, r12
	mov	r8d, 4
	mov	rdi, r14
	call	btrfs_insert_empty_item@PLT
	mov	r15d, eax
	test	eax, eax
	js	.L12
	mov	rax, QWORD PTR 8[rbp]
	mov	rbx, QWORD PTR [rax]
	mov	rax, QWORD PTR 0[rbp]
	mov	esi, DWORD PTR [rax]
	mov	rdi, rbx
	call	btrfs_item_ptr_offset@PLT
	mov	QWORD PTR 24[rsp], rax
.L6:
	mov	r14, QWORD PTR 8[rsp]
	mov	rdi, r14
	call	btrfs_root_generation@PLT
	mov	rdi, r14
	mov	esi, eax
	call	btrfs_set_root_generation_v2@PLT
	mov	rdx, QWORD PTR 24[rsp]
	mov	rdi, rbx
	mov	rsi, r14
	mov	ecx, 4
	call	write_extent_buffer@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, QWORD PTR [rax]
	call	btrfs_mark_buffer_dirty@PLT
.L4:
	mov	rdi, rbp
	call	btrfs_free_path@PLT
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L14:
	.cfi_restore_state
	mov	ecx, DWORD PTR 4[r13]
	mov	edx, DWORD PTR 8[r13]
	mov	rdi, rbx
	lea	rsi, .LC0[rip]
	mov	r9d, DWORD PTR [r12]
	mov	r8d, DWORD PTR 0[r13]
	call	btrfs_crit@PLT
	mov	r15d, DWORD PTR EUCLEAN[rip]
	mov	rdi, r14
	neg	r15d
	mov	esi, r15d
	call	btrfs_abort_transaction@PLT
	mov	rdi, rbp
	call	btrfs_free_path@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, r14
	mov	esi, r15d
	call	btrfs_abort_transaction@PLT
	mov	rdi, rbp
	call	btrfs_free_path@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	btrfs_update_root, .-btrfs_update_root
	.comm	EUCLEAN,4,4
	.comm	ENOMEM,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_root-tree.c_btrfs_update_root.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unable to find root key (%llu %u %llu) in tree %llu"
	.ascii	"\000"
	.text
	.align	2
	.global	btrfs_update_root
	.syntax unified
	.arm
	.fpu softvfp
	.type	btrfs_update_root, %function
btrfs_update_root:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	mov	r6, r1
	mov	r8, r0
	mov	r7, r2
	mov	r9, r3
	ldr	r10, [r1, #4]
	bl	btrfs_alloc_path
	subs	r4, r0, #0
	beq	.L14
	mov	r3, #0
	mov	r2, #1
	str	r3, [sp]
	str	r2, [sp, #4]
	mov	r3, r4
	mov	r2, r7
	mov	r1, r6
	mov	r0, r8
	bl	btrfs_search_slot
	subs	r5, r0, #0
	blt	.L4
	bne	.L15
	ldm	r4, {r2, r3}
	ldr	r10, [r2]
	ldr	fp, [r3]
	mov	r1, r10
	mov	r0, fp
	bl	btrfs_item_ptr_offset
	mov	r2, r0
	mov	r1, r10
	mov	r0, fp
	mov	r10, r2
	bl	btrfs_item_size_nr
	cmp	r0, #3
	bhi	.L6
	mov	r0, r4
	bl	btrfs_release_path
	mvn	r3, #0
	mov	r2, #1
	str	r3, [sp]
	str	r2, [sp, #4]
	mov	r3, r4
	mov	r2, r7
	mov	r1, r6
	mov	r0, r8
	bl	btrfs_search_slot
	subs	r5, r0, #0
	blt	.L12
	mov	r2, r4
	mov	r1, r6
	mov	r0, r8
	bl	btrfs_del_item
	subs	r5, r0, #0
	blt	.L12
	mov	r0, r4
	bl	btrfs_release_path
	mov	r2, #4
	mov	r3, r7
	str	r2, [sp]
	mov	r1, r6
	mov	r2, r4
	mov	r0, r8
	bl	btrfs_insert_empty_item
	subs	r5, r0, #0
	blt	.L12
	ldm	r4, {r2, r3}
	ldr	fp, [r3]
	ldr	r1, [r2]
	mov	r0, fp
	bl	btrfs_item_ptr_offset
	mov	r10, r0
.L6:
	mov	r0, r9
	bl	btrfs_root_generation
	mov	r1, r0
	mov	r0, r9
	bl	btrfs_set_root_generation_v2
	mov	r3, #4
	mov	r2, r10
	mov	r1, r9
	mov	r0, fp
	bl	write_extent_buffer
	ldr	r3, [r4, #4]
	ldr	r0, [r3]
	bl	btrfs_mark_buffer_dirty
.L4:
	mov	r0, r4
	bl	btrfs_free_path
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	ldr	r3, .L16
	ldr	r0, [r3]
	rsb	r5, r0, #0
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	ldr	r2, [r6]
	ldr	r3, [r7]
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r3, [r7, #4]
	mov	r0, r10
	ldr	r2, [r7, #8]
	ldr	r1, .L16+4
	bl	btrfs_crit
	ldr	r3, .L16+8
	mov	r0, r8
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r1, r5
	bl	btrfs_abort_transaction
	b	.L4
.L12:
	mov	r0, r8
	mov	r1, r5
	bl	btrfs_abort_transaction
	b	.L4
.L17:
	.align	2
.L16:
	.word	ENOMEM
	.word	.LC0
	.word	EUCLEAN
	.size	btrfs_update_root, .-btrfs_update_root
	.comm	EUCLEAN,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
