	.file	"extr_vfs_syscalls.c_kern_posix_fadvise.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	kern_posix_fadvise
	.type	kern_posix_fadvise, @function
kern_posix_fadvise:
.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
	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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	test	rdx, rdx
	js	.L5
	mov	rbx, rcx
	test	rcx, rcx
	js	.L5
	mov	rax, QWORD PTR OFF_MAX[rip]
	mov	rbp, rdx
	sub	rax, rcx
	cmp	rax, rdx
	jge	.L3
.L5:
	mov	r12d, DWORD PTR EINVAL[rip]
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L59
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L3:
	.cfi_restore_state
	mov	r14d, r8d
	mov	r13, rdi
	mov	edi, r8d
	mov	r12d, esi
	call	AUDIT_ARG_VALUE@PLT
	lea	r15d, -128[r14]
	cmp	r15d, 5
	ja	.L5
	lea	rcx, .L7[rip]
	mov	edx, r15d
	movsx	rax, DWORD PTR [rcx+rdx*4]
	add	rax, rcx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L7:
	.long	.L36-.L7
	.long	.L8-.L7
	.long	.L8-.L7
	.long	.L36-.L7
	.long	.L8-.L7
	.long	.L36-.L7
	.text
	.p2align 4,,10
	.p2align 3
.L36:
	mov	QWORD PTR 8[rsp], 0
.L6:
	mov	edi, r12d
	call	AUDIT_ARG_FD@PLT
	mov	esi, r12d
	lea	rcx, 16[rsp]
	mov	rdi, r13
	lea	rdx, cap_no_rights[rip]
	call	fget@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L9
	mov	edi, DWORD PTR 0[r13]
	mov	rsi, QWORD PTR 16[rsp]
	call	AUDIT_ARG_FILE@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	rax, QWORD PTR 24[rdi]
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR DFLAG_SEEKABLE[rip], eax
	je	.L60
	mov	rax, QWORD PTR DTYPE_VNODE[rip]
	cmp	QWORD PTR [rdi], rax
	je	.L12
.L13:
	mov	r12d, DWORD PTR ENODEV[rip]
.L29:
	mov	rsi, r13
	call	fdrop@PLT
.L28:
	mov	esi, DWORD PTR M_FADVISE[rip]
	mov	rdi, QWORD PTR 8[rsp]
	call	free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edx, DWORD PTR M_WAITOK[rip]
	mov	esi, DWORD PTR M_FADVISE[rip]
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR 8[rsp], rax
	jmp	.L6
.L16:
	mov	rsi, rdi
	mov	edi, DWORD PTR mtxpool_sleep[rip]
	call	mtx_pool_lock@PLT
	mov	rsi, QWORD PTR 16[rsp]
	mov	rax, QWORD PTR 8[rsi]
	test	rax, rax
	je	.L17
	cmp	DWORD PTR [rax], r14d
	je	.L61
.L17:
	mov	rcx, QWORD PTR 8[rsp]
	mov	QWORD PTR 8[rsp], rax
	mov	DWORD PTR [rcx], r14d
	mov	QWORD PTR 8[rcx], rbp
	mov	QWORD PTR 16[rcx], rbx
	mov	QWORD PTR 8[rsi], rcx
.L24:
	mov	edi, DWORD PTR mtxpool_sleep[rip]
	call	mtx_pool_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, QWORD PTR 16[rsp]
	test	rdi, rdi
	je	.L28
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L12:
	mov	r9, QWORD PTR 16[rdi]
	mov	rax, QWORD PTR VREG[rip]
	cmp	QWORD PTR [r9], rax
	jne	.L13
	lea	rdx, -1[rbp+rbx]
	test	rbx, rbx
	mov	rbx, rdx
	cmove	rbx, QWORD PTR OFF_MAX[rip]
	cmp	r15d, 5
	ja	.L29
	lea	rdx, .L34[rip]
	mov	r8d, r15d
	movsx	rax, DWORD PTR [rdx+r8*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L34:
	.long	.L27-.L34
	.long	.L16-.L34
	.long	.L16-.L34
	.long	.L23-.L34
	.long	.L16-.L34
	.long	.L27-.L34
	.text
.L27:
	mov	ecx, r14d
	mov	rdx, rbx
	mov	rsi, rbp
	mov	rdi, r9
	call	VOP_ADVISE@PLT
	mov	r12d, eax
	jmp	.L9
.L23:
	mov	rsi, rdi
	mov	edi, DWORD PTR mtxpool_sleep[rip]
	call	mtx_pool_lock@PLT
	mov	rsi, QWORD PTR 16[rsp]
	mov	rax, QWORD PTR 8[rsi]
	test	rax, rax
	je	.L24
	mov	rdx, QWORD PTR 8[rax]
	mov	rcx, QWORD PTR 16[rax]
	cmp	rdx, rbp
	jl	.L25
	cmp	rbx, rcx
	jge	.L57
	cmp	rdx, rbx
	jg	.L32
	add	rbx, 1
	mov	QWORD PTR 8[rax], rbx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L60:
	mov	r12d, DWORD PTR ESPIPE[rip]
	jmp	.L29
.L25:
	cmp	rbx, rcx
	jl	.L32
	cmp	rbp, rcx
	jle	.L62
.L32:
	cmp	rdx, rbp
	jg	.L24
	cmp	rbx, rcx
	jg	.L24
.L57:
	mov	QWORD PTR 8[rsi], 0
	mov	QWORD PTR 8[rsp], rax
	jmp	.L24
.L61:
	mov	rcx, QWORD PTR 8[rax]
	cmp	rcx, rbx
	jg	.L18
	cmp	QWORD PTR 16[rax], rbp
	jl	.L18
.L19:
	cmp	rcx, rbp
	jle	.L21
	mov	QWORD PTR 8[rax], rbp
.L21:
	cmp	QWORD PTR 16[rax], rbx
	jge	.L24
	mov	QWORD PTR 16[rax], rbx
	jmp	.L24
.L18:
	mov	rdi, QWORD PTR OFF_MAX[rip]
	cmp	rdi, rbx
	je	.L20
	lea	rdx, 1[rbx]
	cmp	rcx, rdx
	je	.L19
.L20:
	mov	rdx, QWORD PTR 16[rax]
	cmp	rdi, rdx
	je	.L17
	add	rdx, 1
	cmp	rdx, rbp
	jne	.L17
	jmp	.L19
.L59:
	call	__stack_chk_fail@PLT
.L62:
	sub	rbp, 1
	mov	QWORD PTR 16[rax], rbp
	jmp	.L24
	.cfi_endproc
.LFE0:
	.size	kern_posix_fadvise, .-kern_posix_fadvise
	.comm	mtxpool_sleep,4,4
	.comm	cap_no_rights,4,4
	.comm	VREG,8,8
	.comm	OFF_MAX,8,8
	.comm	M_WAITOK,4,4
	.comm	M_FADVISE,4,4
	.comm	ESPIPE,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.comm	DTYPE_VNODE,8,8
	.comm	DFLAG_SEEKABLE,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_vfs_syscalls.c_kern_posix_fadvise.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	kern_posix_fadvise
	.syntax unified
	.arm
	.fpu softvfp
	.type	kern_posix_fadvise, %function
kern_posix_fadvise:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r3
	orrs	r3, r2, r4
	ldr	r3, .L56
	sub	sp, sp, #12
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bmi	.L5
	ldr	r8, .L56+4
	mov	r5, r2
	ldr	r3, [r8]
	sub	r3, r3, r4
	cmp	r3, r2
	bge	.L3
.L5:
	ldr	r3, .L56+8
	ldr	r7, [r3]
.L1:
	ldr	r3, .L56
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L53
	mov	r0, r7
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	mov	r6, r0
	ldr	r0, [sp, #48]
	mov	r7, r1
	sub	r9, r0, #128
	bl	AUDIT_ARG_VALUE
	cmp	r9, #5
	ldrls	pc, [pc, r9, asl #2]
	b	.L5
.L7:
	.word	.L35
	.word	.L8
	.word	.L8
	.word	.L35
	.word	.L8
	.word	.L35
.L35:
	mov	r10, #0
	ldr	fp, .L56+12
.L6:
	mov	r0, r7
	bl	AUDIT_ARG_FD
	mov	r1, r7
	mov	r3, sp
	mov	r0, r6
	ldr	r2, .L56+16
	bl	fget
	subs	r7, r0, #0
	bne	.L9
	ldr	r1, [sp]
	ldr	r0, [r6]
	bl	AUDIT_ARG_FILE
	ldr	r0, [sp]
	ldr	r3, .L56+20
	ldr	r2, [r0, #12]
	ldr	r3, [r3]
	ldr	r2, [r2]
	tst	r2, r3
	beq	.L54
	ldr	r3, .L56+24
	ldr	r2, [r0]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L12
.L13:
	ldr	r3, .L56+28
	ldr	r7, [r3]
.L29:
	mov	r1, r6
	bl	fdrop
.L28:
	mov	r0, r10
	ldr	r1, [fp]
	bl	free
	b	.L1
.L8:
	ldr	r3, .L56+32
	ldr	fp, .L56+12
	mov	r0, #12
	ldr	r2, [r3]
	ldr	r1, [fp]
	bl	malloc
	mov	r10, r0
	b	.L6
.L16:
	ldr	r9, .L56+36
	mov	r1, r0
	ldr	r0, [r9]
	bl	mtx_pool_lock
	ldr	r1, [sp]
	ldr	r3, [r1, #4]
	cmp	r3, #0
	beq	.L17
	ldr	r2, [r3]
	ldr	r0, [sp, #48]
	cmp	r2, r0
	beq	.L55
.L17:
	ldr	r2, [sp, #48]
	str	r4, [r10, #8]
	stm	r10, {r2, r5}
	str	r10, [r1, #4]
	mov	r10, r3
.L24:
	ldr	r0, [r9]
	bl	mtx_pool_unlock
.L9:
	ldr	r0, [sp]
	cmp	r0, #0
	beq	.L28
	b	.L29
.L12:
	ldr	r3, [r0, #8]
	ldr	r2, .L56+40
	ldr	r1, [r3]
	ldr	r2, [r2]
	cmp	r1, r2
	bne	.L13
	cmp	r4, #0
	addne	r4, r5, r4
	ldreq	r4, [r8]
	subne	r4, r4, #1
	cmp	r9, #5
	ldrls	pc, [pc, r9, asl #2]
	b	.L29
.L33:
	.word	.L27
	.word	.L16
	.word	.L16
	.word	.L23
	.word	.L16
	.word	.L27
.L27:
	mov	r0, r3
	mov	r2, r4
	mov	r1, r5
	ldr	r3, [sp, #48]
	bl	VOP_ADVISE
	mov	r7, r0
	b	.L9
.L23:
	ldr	r9, .L56+36
	mov	r1, r0
	ldr	r0, [r9]
	bl	mtx_pool_lock
	ldr	r1, [sp]
	ldr	r3, [r1, #4]
	cmp	r3, #0
	beq	.L24
	ldr	r2, [r3, #4]
	ldr	r0, [r3, #8]
	cmp	r2, r5
	blt	.L25
	cmp	r4, r0
	bge	.L51
	cmp	r2, r4
	addle	r4, r4, #1
	strle	r4, [r3, #4]
	ble	.L24
.L31:
	cmp	r2, r5
	cmple	r4, r0
	bgt	.L24
.L51:
	mov	r2, #0
	mov	r10, r3
	str	r2, [r1, #4]
	b	.L24
.L54:
	ldr	r3, .L56+44
	ldr	r7, [r3]
	b	.L29
.L25:
	cmp	r4, r0
	movlt	ip, #0
	movge	ip, #1
	cmp	r5, r0
	movgt	ip, #0
	cmp	ip, #0
	beq	.L31
	sub	r5, r5, #1
	str	r5, [r3, #8]
	b	.L24
.L55:
	ldmib	r3, {r0, r2}
	cmp	r0, r4
	bgt	.L18
	cmp	r2, r5
	blt	.L18
.L19:
	cmp	r0, r5
	strgt	r5, [r3, #4]
	cmp	r2, r4
	strlt	r4, [r3, #8]
	b	.L24
.L18:
	ldr	ip, [r8]
	cmp	ip, r4
	beq	.L20
	add	lr, r4, #1
	cmp	r0, lr
	beq	.L19
.L20:
	cmp	ip, r2
	beq	.L17
	add	ip, r2, #1
	cmp	ip, r5
	bne	.L17
	b	.L19
.L53:
	bl	__stack_chk_fail
.L57:
	.align	2
.L56:
	.word	.LC0
	.word	OFF_MAX
	.word	EINVAL
	.word	M_FADVISE
	.word	cap_no_rights
	.word	DFLAG_SEEKABLE
	.word	DTYPE_VNODE
	.word	ENODEV
	.word	M_WAITOK
	.word	mtxpool_sleep
	.word	VREG
	.word	ESPIPE
	.size	kern_posix_fadvise, .-kern_posix_fadvise
	.comm	mtxpool_sleep,4,4
	.comm	cap_no_rights,4,4
	.comm	VREG,4,4
	.comm	OFF_MAX,4,4
	.comm	M_WAITOK,4,4
	.comm	M_FADVISE,4,4
	.comm	ESPIPE,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.comm	DTYPE_VNODE,4,4
	.comm	DFLAG_SEEKABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
