	.file	"extr_journal.c_journal_flush.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	journal_flush
	.type	journal_flush, @function
journal_flush:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	lea	r14, 24[rdi]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	mov	rdi, r14
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	spin_lock@PLT
	mov	rbx, QWORD PTR 48[rbp]
	test	rbx, rbx
	je	.L2
	mov	esi, DWORD PTR [rbx]
	mov	rdi, rbp
	call	__log_start_commit@PLT
.L3:
	mov	r12d, DWORD PTR [rbx]
	mov	rdi, r14
	call	spin_unlock@PLT
	mov	rdi, rbp
	mov	esi, r12d
	call	log_wait_commit@PLT
.L10:
	lea	r12, 56[rbp]
	lea	r13, 60[rbp]
	mov	rdi, r12
	call	spin_lock@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	cmp	QWORD PTR 32[rbp], 0
	je	.L8
	mov	rdi, r12
	call	spin_unlock@PLT
	mov	rdi, r13
	call	mutex_lock@PLT
	mov	rdi, rbp
	call	log_do_checkpoint@PLT
	mov	rdi, r13
	mov	ebx, eax
	call	mutex_unlock@PLT
	mov	rdi, r12
	call	spin_lock@PLT
	test	ebx, ebx
	je	.L4
.L8:
	mov	rdi, r12
	call	spin_unlock@PLT
	mov	rdi, rbp
	call	is_journal_aborted@PLT
	test	rax, rax
	je	.L16
	mov	eax, DWORD PTR EIO[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rdi, rbp
	call	cleanup_journal_tail@PLT
	mov	rdi, r14
	call	spin_lock@PLT
	mov	ebx, DWORD PTR 0[rbp]
	mov	DWORD PTR 0[rbp], 0
	mov	rdi, r14
	call	spin_unlock@PLT
	mov	esi, 1
	mov	rdi, rbp
	call	journal_update_superblock@PLT
	mov	rdi, r14
	call	spin_lock@PLT
	mov	DWORD PTR 0[rbp], ebx
	xor	edi, edi
	cmp	QWORD PTR 48[rbp], 0
	sete	dil
	call	J_ASSERT@PLT
	xor	edi, edi
	cmp	QWORD PTR 40[rbp], 0
	sete	dil
	call	J_ASSERT@PLT
	xor	edi, edi
	cmp	QWORD PTR 32[rbp], 0
	sete	dil
	call	J_ASSERT@PLT
	mov	eax, DWORD PTR 0[rbp]
	xor	edi, edi
	cmp	DWORD PTR 4[rbp], eax
	sete	dil
	call	J_ASSERT@PLT
	mov	rax, QWORD PTR 16[rbp]
	xor	edi, edi
	cmp	QWORD PTR 8[rbp], rax
	sete	dil
	call	J_ASSERT@PLT
	mov	rdi, r14
	call	spin_unlock@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rbx, QWORD PTR 40[rbp]
	test	rbx, rbx
	jne	.L3
	mov	rdi, r14
	call	spin_unlock@PLT
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	journal_flush, .-journal_flush
	.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_journal.c_journal_flush.c"
	.text
	.align	2
	.global	journal_flush
	.syntax unified
	.arm
	.fpu softvfp
	.type	journal_flush, %function
journal_flush:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	add	r8, r0, #16
	mov	r0, r8
	bl	spin_lock
	ldr	r4, [r5, #28]
	cmp	r4, #0
	beq	.L2
	mov	r0, r5
	ldr	r1, [r4]
	bl	__log_start_commit
.L3:
	ldr	r4, [r4]
	mov	r0, r8
	bl	spin_unlock
	mov	r1, r4
	mov	r0, r5
	bl	log_wait_commit
.L10:
	add	r6, r5, #32
	mov	r0, r6
	bl	spin_lock
	add	r7, r5, #36
.L4:
	ldr	r3, [r5, #20]
	cmp	r3, #0
	beq	.L8
	mov	r0, r6
	bl	spin_unlock
	mov	r0, r7
	bl	mutex_lock
	mov	r0, r5
	bl	log_do_checkpoint
	mov	r4, r0
	mov	r0, r7
	bl	mutex_unlock
	mov	r0, r6
	bl	spin_lock
	cmp	r4, #0
	beq	.L4
.L8:
	mov	r0, r6
	bl	spin_unlock
	mov	r0, r5
	bl	is_journal_aborted
	subs	r4, r0, #0
	beq	.L16
	ldr	r3, .L17
	ldr	r0, [r3]
	rsb	r4, r0, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	mov	r0, r5
	bl	cleanup_journal_tail
	mov	r0, r8
	bl	spin_lock
	ldr	r6, [r5]
	mov	r0, r8
	str	r4, [r5]
	bl	spin_unlock
	mov	r1, #1
	mov	r0, r5
	bl	journal_update_superblock
	mov	r0, r8
	bl	spin_lock
	ldr	r0, [r5, #28]
	str	r6, [r5]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	J_ASSERT
	ldr	r0, [r5, #24]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	J_ASSERT
	ldr	r0, [r5, #20]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	J_ASSERT
	ldr	r3, [r5]
	ldr	r0, [r5, #4]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	J_ASSERT
	ldr	r3, [r5, #12]
	ldr	r0, [r5, #8]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	J_ASSERT
	mov	r0, r8
	bl	spin_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r4, [r5, #24]
	cmp	r4, #0
	bne	.L3
	mov	r0, r8
	bl	spin_unlock
	b	.L10
.L18:
	.align	2
.L17:
	.word	EIO
	.size	journal_flush, .-journal_flush
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
