	.file	"extr_mkjournal.c_write_journal_file.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	write_journal_file, @function
write_journal_file:
.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
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edx
	mov	edx, r13d
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	esi, ebp
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	r15, rsp
	mov	QWORD PTR [rsp], 0
	mov	rcx, r15
	call	ext2fs_create_journal_superblock@PLT
	mov	r12, rax
	test	rax, rax
	je	.L17
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
.L17:
	.cfi_restore_state
	mov	esi, DWORD PTR O_WRONLY[rip]
	mov	rdi, r14
	call	open@PLT
	mov	r12, QWORD PTR errno[rip]
	mov	r14d, eax
	test	eax, eax
	js	.L4
	mov	rdx, QWORD PTR [rbx]
	mov	rsi, QWORD PTR [rsp]
	mov	edi, eax
	mov	r12, QWORD PTR EXT2_ET_SHORT_WRITE[rip]
	call	write@PLT
	test	eax, eax
	js	.L15
	mov	rdx, QWORD PTR [rbx]
	cmp	eax, edx
	je	.L19
.L6:
	mov	edi, r14d
	call	close@PLT
.L4:
	mov	rdi, r15
	call	ext2fs_free_mem@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, QWORD PTR [rsp]
	xor	esi, esi
	call	memset@PLT
	test	DWORD PTR EXT2_MKJOURNAL_LAZYINIT[rip], r13d
	jne	.L8
	cmp	ebp, 1
	jle	.L8
	mov	rdx, QWORD PTR [rbx]
	mov	r13d, 1
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdx, QWORD PTR [rbx]
	cmp	eax, edx
	jne	.L6
	add	r13d, 1
	cmp	ebp, r13d
	je	.L8
.L10:
	mov	rsi, QWORD PTR [rsp]
	mov	edi, r14d
	call	write@PLT
	test	eax, eax
	jns	.L9
	.p2align 4,,10
	.p2align 3
.L15:
	mov	r12, QWORD PTR errno[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	xor	r12d, r12d
	jmp	.L6
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	write_journal_file, .-write_journal_file
	.comm	errno,8,8
	.comm	O_WRONLY,4,4
	.comm	EXT2_MKJOURNAL_LAZYINIT,4,4
	.comm	EXT2_ET_SHORT_WRITE,8,8
	.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_mkjournal.c_write_journal_file.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_journal_file, %function
write_journal_file:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, r2
	mov	ip, #0
	sub	sp, sp, #12
	ldr	lr, .L20
	mov	r2, r3
	mov	r6, r3
	mov	r8, r1
	mov	r3, sp
	mov	r1, r5
	ldr	lr, [lr]
	str	lr, [sp, #4]
	mov	lr,#0
	mov	r7, r0
	str	ip, [sp]
	bl	ext2fs_create_journal_superblock
	subs	r4, r0, #0
	beq	.L16
.L1:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L16:
	ldr	r3, .L20+4
	mov	r0, r8
	ldr	r1, [r3]
	bl	open
	subs	r8, r0, #0
	blt	.L18
	ldr	r3, .L20+8
	ldr	r2, [r7]
	ldr	r1, [sp]
	ldr	r9, [r3]
	bl	write
	cmp	r0, #0
	blt	.L14
	ldr	r2, [r7]
	cmp	r2, r0
	beq	.L19
.L6:
	mov	r0, r8
	bl	close
	mov	r4, r9
.L4:
	mov	r0, sp
	bl	ext2fs_free_mem
	b	.L1
.L18:
	ldr	r3, .L20+12
	ldr	r4, [r3]
	b	.L4
.L19:
	mov	r1, r4
	ldr	r0, [sp]
	bl	memset
	ldr	r3, .L20+16
	ldr	r3, [r3]
	tst	r6, r3
	bne	.L8
	cmp	r5, #1
	ble	.L8
	mov	r4, #1
	ldr	r2, [r7]
	b	.L10
.L9:
	ldr	r3, [r7]
	cmp	r3, r2
	bne	.L6
	add	r4, r4, #1
	cmp	r5, r4
	beq	.L8
.L10:
	mov	r0, r8
	ldr	r1, [sp]
	bl	write
	subs	r2, r0, #0
	bge	.L9
.L14:
	ldr	r3, .L20+12
	ldr	r9, [r3]
	b	.L6
.L8:
	mov	r9, #0
	b	.L6
.L17:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC0
	.word	O_WRONLY
	.word	EXT2_ET_SHORT_WRITE
	.word	errno
	.word	EXT2_MKJOURNAL_LAZYINIT
	.size	write_journal_file, .-write_journal_file
	.comm	errno,4,4
	.comm	O_WRONLY,4,4
	.comm	EXT2_MKJOURNAL_LAZYINIT,4,4
	.comm	EXT2_ET_SHORT_WRITE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
