	.file	"extr_tree-log.c_start_log_trans.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	start_log_trans, @function
start_log_trans:
.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
	lea	r14, 12[rsi]
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	mov	rdi, r14
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r15, QWORD PTR 48[rsi]
	call	mutex_lock@PLT
	cmp	QWORD PTR 40[rbx], 0
	je	.L2
	mov	rdi, r12
	call	btrfs_need_log_full_commit@PLT
	mov	r13d, DWORD PTR EAGAIN[rip]
	neg	r13d
	test	rax, rax
	jne	.L4
	mov	rax, QWORD PTR [rbx]
	test	rax, rax
	je	.L12
	mov	rdx, QWORD PTR current[rip]
	cmp	rax, QWORD PTR [rdx]
	je	.L6
	mov	edi, DWORD PTR BTRFS_ROOT_MULTI_LOG_TASKS[rip]
	lea	rsi, 32[rbx]
	call	set_bit@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, r15
	call	mutex_lock@PLT
	mov	eax, DWORD PTR 4[r15]
	test	eax, eax
	je	.L7
	mov	rdi, r15
	call	mutex_unlock@PLT
.L8:
	mov	rsi, rbx
	mov	rdi, r12
	call	btrfs_add_log_tree@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L4
.L12:
	mov	edi, DWORD PTR BTRFS_ROOT_MULTI_LOG_TASKS[rip]
	lea	rsi, 32[rbx]
	call	clear_bit@PLT
	mov	rax, QWORD PTR current[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rbx], rax
.L6:
	lea	rdi, 28[rbx]
	xor	r13d, r13d
	call	atomic_inc@PLT
	lea	rdi, 24[rbx]
	call	atomic_inc@PLT
	test	rbp, rbp
	je	.L4
	mov	eax, DWORD PTR 8[rbx]
	lea	rdi, 4[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	and	eax, 1
	sub	eax, edx
	mov	rdx, QWORD PTR 16[rbx]
	cdqe
	lea	rsi, [rdx+rax*4]
	call	list_add_tail@PLT
	mov	eax, DWORD PTR 8[rbx]
	mov	DWORD PTR 0[rbp], eax
.L4:
	mov	rdi, r14
	call	mutex_unlock@PLT
	add	rsp, 8
	.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
.L7:
	.cfi_restore_state
	mov	rdi, r12
	mov	rsi, r15
	call	btrfs_init_log_root_tree@PLT
	mov	rdi, r15
	mov	r13d, eax
	call	mutex_unlock@PLT
	test	r13d, r13d
	jne	.L4
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	start_log_trans, .-start_log_trans
	.comm	current,8,8
	.comm	EAGAIN,4,4
	.comm	BTRFS_ROOT_MULTI_LOG_TASKS,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_tree-log.c_start_log_trans.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	start_log_trans, %function
start_log_trans:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r1
	add	r8, r1, #8
	mov	r6, r0
	mov	r0, r8
	mov	r5, r2
	ldr	r9, [r1, #32]
	bl	mutex_lock
	ldr	r3, [r4, #28]
	cmp	r3, #0
	beq	.L2
	mov	r0, r6
	bl	btrfs_need_log_full_commit
	cmp	r0, #0
	bne	.L13
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L11
	ldr	r2, .L14
	ldr	r2, [r2]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L6
	ldr	r3, .L14+4
	add	r1, r4, #24
	ldr	r0, [r3]
	bl	set_bit
	b	.L6
.L2:
	mov	r0, r9
	bl	mutex_lock
	ldr	r3, [r9, #4]
	cmp	r3, #0
	beq	.L7
	mov	r0, r9
	bl	mutex_unlock
.L8:
	mov	r0, r6
	mov	r1, r4
	bl	btrfs_add_log_tree
	subs	r7, r0, #0
	beq	.L11
.L4:
	mov	r0, r8
	bl	mutex_unlock
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	ldr	r3, .L14+4
	add	r1, r4, #24
	ldr	r0, [r3]
	bl	clear_bit
	ldr	r3, .L14
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [r4]
.L6:
	add	r0, r4, #20
	bl	atomic_inc
	add	r0, r4, #16
	bl	atomic_inc
	cmp	r5, #0
	moveq	r7, r5
	beq	.L4
	ldr	r1, [r4, #4]
	ldr	r3, [r4, #12]
	cmp	r1, #0
	and	r1, r1, #1
	rsblt	r1, r1, #0
	add	r1, r3, r1, lsl #2
	add	r0, r5, #4
	bl	list_add_tail
	ldr	r3, [r4, #4]
	mov	r7, #0
	str	r3, [r5]
	b	.L4
.L13:
	ldr	r3, .L14+8
	ldr	r7, [r3]
	rsb	r7, r7, #0
	b	.L4
.L7:
	mov	r1, r9
	mov	r0, r6
	bl	btrfs_init_log_root_tree
	mov	r7, r0
	mov	r0, r9
	bl	mutex_unlock
	cmp	r7, #0
	bne	.L4
	b	.L8
.L15:
	.align	2
.L14:
	.word	current
	.word	BTRFS_ROOT_MULTI_LOG_TASKS
	.word	EAGAIN
	.size	start_log_trans, .-start_log_trans
	.comm	current,4,4
	.comm	EAGAIN,4,4
	.comm	BTRFS_ROOT_MULTI_LOG_TASKS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
