	.file	"extr_linux_compat.c_linux_file_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	linux_file_read, @function
linux_file_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	r14, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdi]
	cmp	DWORD PTR [rsi], 1
	mov	DWORD PTR [r14], eax
	mov	r12d, DWORD PTR EOPNOTSUPP[rip]
	jne	.L1
	mov	rax, QWORD PTR DEVFS_IOSIZE_MAX[rip]
	mov	r12d, DWORD PTR EINVAL[rip]
	mov	rbx, rsi
	cmp	QWORD PTR 8[rsi], rax
	jle	.L12
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	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
.L12:
	.cfi_restore_state
	mov	rbp, rdi
	mov	rdi, r8
	mov	r13, r8
	call	linux_set_current@PLT
	lea	rdx, 16[rsp]
	lea	rsi, 8[rsp]
	mov	rdi, r14
	call	linux_get_fop@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	r12d, DWORD PTR ENXIO[rip]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L7
	mov	rdx, QWORD PTR 16[rbx]
	mov	rdi, r14
	lea	rcx, 24[rbx]
	mov	rsi, QWORD PTR 8[rdx]
	mov	edx, DWORD PTR [rdx]
	call	rax
	mov	rsi, r13
	mov	rdi, rbp
	mov	edx, eax
	call	OPW@PLT
	test	eax, eax
	js	.L6
	mov	rdx, QWORD PTR 16[rbx]
	movsx	rcx, eax
	xor	r12d, r12d
	lea	rsi, 0[0+rcx*4]
	sub	DWORD PTR [rdx], eax
	add	QWORD PTR 8[rdx], rsi
	sub	QWORD PTR 8[rbx], rcx
.L7:
	mov	esi, DWORD PTR LINUX_KQ_FLAG_HAS_READ[rip]
	mov	rdi, r14
	call	linux_file_kqfilter_poll@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	linux_drop_fop@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	neg	eax
	mov	edi, DWORD PTR current[rip]
	mov	esi, eax
	call	linux_get_error@PLT
	mov	r12d, eax
	jmp	.L7
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	linux_file_read, .-linux_file_read
	.comm	current,4,4
	.comm	LINUX_KQ_FLAG_HAS_READ,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	ENXIO,4,4
	.comm	EINVAL,4,4
	.comm	DEVFS_IOSIZE_MAX,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_linux_compat.c_linux_file_read.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	linux_file_read, %function
linux_file_read:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldm	r0, {r3, r6}
	ldr	r2, [r1]
	sub	sp, sp, #16
	cmp	r2, #1
	ldr	r2, .L12
	ldr	r7, [sp, #40]
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	str	r3, [r6]
	beq	.L2
	ldr	r3, .L12+4
	ldr	r5, [r3]
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, .L12+8
	ldr	r2, [r1, #4]
	ldr	r3, [r3]
	mov	r4, r1
	cmp	r2, r3
	ldrgt	r3, .L12+12
	ldrgt	r5, [r3]
	bgt	.L1
.L4:
	mov	r5, r0
	mov	r0, r7
	bl	linux_set_current
	mov	r0, r6
	add	r2, sp, #8
	add	r1, sp, #4
	bl	linux_get_fop
	ldr	r3, [sp, #4]
	ldr	r8, [r3]
	cmp	r8, #0
	beq	.L5
	ldr	r1, [r4, #8]
	add	r3, r4, #12
	ldr	r2, [r1]
	mov	r0, r6
	ldr	r1, [r1, #4]
	blx	r8
	mov	r1, r7
	mov	r2, r0
	mov	r0, r5
	bl	OPW
	cmp	r0, #0
	blt	.L6
	ldmib	r4, {r1, r3}
	ldm	r3, {r2, ip}
	mov	r5, #0
	add	ip, ip, r0, lsl #2
	sub	r2, r2, r0
	sub	r0, r1, r0
	stm	r3, {r2, ip}
	str	r0, [r4, #4]
.L7:
	ldr	r3, .L12+16
	mov	r0, r6
	ldr	r1, [r3]
	bl	linux_file_kqfilter_poll
	ldr	r0, [sp, #8]
	bl	linux_drop_fop
	b	.L1
.L5:
	ldr	r3, .L12+20
	ldr	r5, [r3]
	b	.L7
.L6:
	ldr	r3, .L12+24
	rsb	r1, r0, #0
	ldr	r0, [r3]
	bl	linux_get_error
	mov	r5, r0
	b	.L7
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	EOPNOTSUPP
	.word	DEVFS_IOSIZE_MAX
	.word	EINVAL
	.word	LINUX_KQ_FLAG_HAS_READ
	.word	ENXIO
	.word	current
	.size	linux_file_read, .-linux_file_read
	.comm	current,4,4
	.comm	LINUX_KQ_FLAG_HAS_READ,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	ENXIO,4,4
	.comm	EINVAL,4,4
	.comm	DEVFS_IOSIZE_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
