	.file	"extr_filemap.c_generic_file_direct_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	generic_file_direct_write
	.type	generic_file_direct_write, @function
generic_file_direct_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR 16[rdi]
	mov	r12, QWORD PTR [rdi]
	mov	rdi, rsi
	mov	r14, QWORD PTR [rax]
	mov	rax, QWORD PTR 16[r14]
	mov	QWORD PTR [rsp], rax
	call	iov_iter_count@PLT
	mov	rdx, QWORD PTR PAGE_SHIFT[rip]
	mov	rbx, rax
	lea	r13, -1[rax+r12]
	mov	eax, DWORD PTR 8[r15]
	mov	QWORD PTR 8[rsp], rdx
	test	DWORD PTR IOCB_NOWAIT[rip], eax
	je	.L2
	mov	rax, QWORD PTR [rsp]
	mov	rdx, r13
	mov	rsi, r12
	mov	edi, DWORD PTR 4[rax]
	call	filemap_range_has_page@PLT
	test	rax, rax
	jne	.L3
.L7:
	movzx	ecx, BYTE PTR 8[rsp]
	mov	rsi, r12
	mov	rdi, r14
	shr	r13, cl
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	rdx, r13
	shr	rsi, cl
	call	invalidate_inode_pages2_range@PLT
	mov	r8d, eax
	test	eax, eax
	je	.L17
	add	eax, DWORD PTR EBUSY[rip]
	mov	eax, 0
	cmove	r8d, eax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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	rax, QWORD PTR 8[r14]
	mov	rsi, rbp
	mov	rdi, r15
	call	[QWORD PTR [rax]]
	cmp	QWORD PTR [r14], 0
	mov	r8d, eax
	jne	.L18
.L8:
	test	r8d, r8d
	jg	.L19
.L9:
	mov	rdi, rbp
	mov	DWORD PTR [rsp], r8d
	call	iov_iter_count@PLT
	mov	rdi, rbp
	sub	rbx, rax
	mov	rsi, rbx
	call	iov_iter_revert@PLT
	mov	r8d, DWORD PTR [rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdx, r13
	mov	rsi, r12
	mov	rdi, r14
	call	filemap_write_and_wait_range@PLT
	mov	r8d, eax
	test	eax, eax
	je	.L7
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	r8d, DWORD PTR EAGAIN[rip]
	neg	r8d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, QWORD PTR [rsp]
	movsx	rax, r8d
	mov	DWORD PTR 8[rsp], r8d
	add	r12, rax
	sub	rbx, rax
	call	i_size_read@PLT
	mov	r8d, DWORD PTR 8[rsp]
	cmp	rax, r12
	jb	.L20
.L11:
	mov	QWORD PTR [r15], r12
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	rsi, r12
	mov	rdx, r13
	mov	rdi, r14
	mov	DWORD PTR 8[rsp], eax
	shr	rsi, cl
	call	invalidate_inode_pages2_range@PLT
	mov	r8d, DWORD PTR 8[rsp]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rax, QWORD PTR [rsp]
	mov	edi, DWORD PTR [rax]
	call	S_ISBLK@PLT
	mov	r8d, DWORD PTR 8[rsp]
	test	eax, eax
	jne	.L11
	mov	r14, QWORD PTR [rsp]
	mov	rsi, r12
	mov	rdi, r14
	call	i_size_write@PLT
	mov	rdi, r14
	call	mark_inode_dirty@PLT
	mov	r8d, DWORD PTR 8[rsp]
	jmp	.L11
	.cfi_endproc
.LFE0:
	.size	generic_file_direct_write, .-generic_file_direct_write
	.comm	PAGE_SHIFT,8,8
	.comm	IOCB_NOWAIT,4,4
	.comm	EBUSY,4,4
	.comm	EAGAIN,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_filemap.c_generic_file_direct_write.c"
	.text
	.align	2
	.global	generic_file_direct_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	generic_file_direct_write, %function
generic_file_direct_write:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r10, r0
	ldr	r2, [r0, #8]
	sub	sp, sp, #12
	ldr	r8, [r2]
	mov	r0, r1
	ldr	r4, [r8, #8]
	ldr	r7, [r10]
	mov	r5, r1
	str	r4, [sp, #4]
	bl	iov_iter_count
	mov	r6, r0
	ldr	r2, .L24
	ldr	r9, .L24+4
	ldr	r1, [r2]
	ldr	r0, [r10, #4]
	sub	r2, r7, #1
	ldr	r3, [r9]
	tst	r0, r1
	add	fp, r2, r6
	mov	r2, fp
	mov	r1, r7
	str	r3, [sp]
	beq	.L2
	ldr	r0, [r4, #4]
	bl	filemap_range_has_page
	cmp	r0, #0
	bne	.L3
.L7:
	ldr	r3, [sp]
	ldr	r1, [r9]
	lsr	fp, fp, r3
	mov	r2, fp
	mov	r0, r8
	lsr	r1, r7, r1
	bl	invalidate_inode_pages2_range
	subs	r4, r0, #0
	beq	.L20
	ldr	r3, .L24+8
	ldr	r3, [r3]
	cmn	r4, r3
	moveq	r4, #0
.L1:
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	ldr	r2, [r8, #4]
	mov	r1, r5
	ldr	r2, [r2]
	mov	r0, r10
	blx	r2
	ldr	r2, [r8]
	mov	r4, r0
	cmp	r2, #0
	bne	.L21
.L8:
	cmp	r4, #0
	bgt	.L22
.L9:
	mov	r0, r5
	bl	iov_iter_count
	mov	r1, r0
	mov	r0, r5
	sub	r1, r6, r1
	bl	iov_iter_revert
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r0, r8
	bl	filemap_write_and_wait_range
	subs	r4, r0, #0
	beq	.L7
	b	.L1
.L3:
	ldr	r3, .L24+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	ldr	r0, [sp, #4]
	bl	i_size_read
	add	r7, r4, r7
	cmp	r0, r7
	sub	r6, r6, r4
	bcc	.L23
.L11:
	str	r7, [r10]
	b	.L9
.L21:
	ldr	r1, [r9]
	mov	r2, fp
	mov	r0, r8
	lsr	r1, r7, r1
	bl	invalidate_inode_pages2_range
	b	.L8
.L23:
	ldr	r3, [sp, #4]
	ldr	r0, [r3]
	bl	S_ISBLK
	cmp	r0, #0
	bne	.L11
	ldr	r8, [sp, #4]
	mov	r1, r7
	mov	r0, r8
	bl	i_size_write
	mov	r0, r8
	bl	mark_inode_dirty
	b	.L11
.L25:
	.align	2
.L24:
	.word	IOCB_NOWAIT
	.word	PAGE_SHIFT
	.word	EBUSY
	.word	EAGAIN
	.size	generic_file_direct_write, .-generic_file_direct_write
	.comm	PAGE_SHIFT,4,4
	.comm	IOCB_NOWAIT,4,4
	.comm	EBUSY,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
