	.file	"extr_linux_compat.c_linux_file_close.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	linux_file_close, @function
linux_file_close:
.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
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rbp, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rdi, rbp
	call	file_count@PLT
	mov	rdi, rbp
	mov	r14, rax
	call	file_count@PLT
	xor	edi, edi
	mov	rsi, r14
	test	rax, rax
	sete	dil
	xor	r14d, r14d
	call	KASSERT@PLT
	mov	eax, DWORD PTR [r12]
	mov	rdi, r13
	mov	DWORD PTR 20[rbp], eax
	call	linux_set_current@PLT
	mov	rdi, rbp
	call	linux_poll_wait_dequeue@PLT
	lea	rdx, 16[rsp]
	lea	rsi, 8[rsp]
	mov	rdi, rbp
	call	linux_get_fop@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L2
	mov	rdi, QWORD PTR 8[rbp]
	mov	rsi, rbp
	call	rax
	mov	rsi, r13
	mov	rdi, r12
	mov	edx, eax
	call	OPW@PLT
	neg	eax
	mov	r14d, eax
.L2:
	lea	rdi, 16[rbp]
	call	funsetown@PLT
	mov	rdi, QWORD PTR 8[rbp]
	test	rdi, rdi
	je	.L3
	call	vdrop@PLT
.L3:
	mov	rdi, QWORD PTR 16[rsp]
	call	linux_drop_fop@PLT
	mov	rdi, QWORD PTR 0[rbp]
	test	rdi, rdi
	je	.L4
	call	linux_cdev_deref@PLT
.L4:
	mov	rdi, rbp
	call	kfree@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r14d
	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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	linux_file_close, .-linux_file_close
	.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_close.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_close, %function
linux_file_close:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r4, [r0, #4]
	ldr	r3, .L16
	sub	sp, sp, #20
	mov	r5, r0
	mov	r0, r4
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	file_count
	mov	r7, r0
	mov	r0, r4
	bl	file_count
	mov	r1, r0
	clz	r0, r7
	lsr	r0, r0, #5
	bl	KASSERT
	ldr	r3, [r5]
	mov	r0, r6
	str	r3, [r4, #12]
	bl	linux_set_current
	mov	r0, r4
	bl	linux_poll_wait_dequeue
	mov	r0, r4
	add	r2, sp, #8
	add	r1, sp, #4
	bl	linux_get_fop
	ldr	r3, [sp, #4]
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r5, r3
	beq	.L2
	mov	r1, r4
	ldr	r0, [r4, #4]
	blx	r3
	mov	r1, r6
	mov	r2, r0
	mov	r0, r5
	bl	OPW
	rsb	r5, r0, #0
.L2:
	add	r0, r4, #8
	bl	funsetown
	ldr	r0, [r4, #4]
	cmp	r0, #0
	beq	.L3
	bl	vdrop
.L3:
	ldr	r0, [sp, #8]
	bl	linux_drop_fop
	ldr	r0, [r4]
	cmp	r0, #0
	beq	.L4
	bl	linux_cdev_deref
.L4:
	mov	r0, r4
	bl	kfree
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC0
	.size	linux_file_close, .-linux_file_close
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
