	.file	"extr_kern_event.c_kern_kqueue.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	kern_kqueue
	.type	kern_kqueue, @function
kern_kqueue:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rbp, QWORD PTR 8[rdi]
	mov	esi, DWORD PTR RLIMIT_KQUEUES[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 16[rdi]
	mov	r13, QWORD PTR [rax]
	call	lim_cur@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, 1
	mov	edx, eax
	call	chgkqcnt@PLT
	test	eax, eax
	jne	.L2
	mov	r12d, DWORD PTR ENOMEM[rip]
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L8
	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
.L2:
	.cfi_restore_state
	mov	ecx, r12d
	lea	rdx, 12[rsp]
	lea	rsi, 16[rsp]
	mov	r8, r14
	mov	rdi, rbx
	call	falloc_caps@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L9
	mov	esi, DWORD PTR M_KQUEUE[rip]
	mov	edx, DWORD PTR M_WAITOK[rip]
	mov	edi, 16
	or	edx, DWORD PTR M_ZERO[rip]
	call	malloc@PLT
	mov	r14, rax
	mov	rdi, rax
	call	kqueue_init@PLT
	mov	QWORD PTR 8[r14], r13
	mov	rdi, rbp
	call	crhold@PLT
	mov	rdi, r13
	mov	DWORD PTR [r14], eax
	call	FILEDESC_XLOCK@PLT
	mov	edx, DWORD PTR kq_list[rip]
	mov	rsi, r14
	mov	rdi, r13
	call	TAILQ_INSERT_HEAD@PLT
	mov	rdi, r13
	call	FILEDESC_XUNLOCK@PLT
	mov	edx, DWORD PTR DTYPE_KQUEUE[rip]
	mov	rcx, r14
	mov	rdi, QWORD PTR 16[rsp]
	mov	esi, DWORD PTR FREAD[rip]
	lea	r8, kqueueops[rip]
	or	esi, DWORD PTR FWRITE[rip]
	call	finit@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	rsi, rbx
	call	fdrop@PLT
	mov	rax, QWORD PTR [rbx]
	mov	edx, DWORD PTR 12[rsp]
	mov	DWORD PTR [rax], edx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, DWORD PTR 0[rbp]
	xor	edx, edx
	mov	esi, -1
	call	chgkqcnt@PLT
	jmp	.L1
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	kern_kqueue, .-kern_kqueue
	.comm	kqueueops,4,4
	.comm	kq_list,4,4
	.comm	RLIMIT_KQUEUES,4,4
	.comm	M_ZERO,4,4
	.comm	M_WAITOK,4,4
	.comm	M_KQUEUE,4,4
	.comm	FWRITE,4,4
	.comm	FREAD,4,4
	.comm	ENOMEM,4,4
	.comm	DTYPE_KQUEUE,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_kern_event.c_kern_kqueue.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	kern_kqueue
	.syntax unified
	.arm
	.fpu softvfp
	.type	kern_kqueue, %function
kern_kqueue:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L10
	ldr	ip, [r0, #8]
	ldr	r7, [r0, #4]
	mov	r5, r1
	ldr	r1, [r3]
	ldr	r3, .L10+4
	sub	sp, sp, #28
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r9, [r7]
	ldr	r8, [ip]
	mov	r4, r0
	bl	lim_cur
	mov	r1, #1
	mov	r2, r0
	mov	r0, r9
	bl	chgkqcnt
	cmp	r0, #0
	bne	.L2
	ldr	r3, .L10+8
	ldr	r5, [r3]
.L1:
	ldr	r3, .L10+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	mov	r0, r5
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	mov	r3, r5
	mov	r0, r4
	str	r6, [sp]
	add	r2, sp, #16
	add	r1, sp, #12
	bl	falloc_caps
	subs	r5, r0, #0
	bne	.L9
	ldr	r2, .L10+12
	ldr	r3, .L10+16
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L10+20
	orr	r2, r1, r2
	mov	r0, #8
	ldr	r1, [r3]
	bl	malloc
	mov	r6, r0
	bl	kqueue_init
	mov	r0, r7
	str	r8, [r6, #4]
	bl	crhold
	mov	r3, r0
	mov	r0, r8
	str	r3, [r6]
	bl	FILEDESC_XLOCK
	ldr	r3, .L10+24
	mov	r1, r6
	ldr	r2, [r3]
	mov	r0, r8
	bl	TAILQ_INSERT_HEAD
	mov	r0, r8
	bl	FILEDESC_XUNLOCK
	ldr	r2, .L10+28
	ldr	r3, .L10+32
	ldr	ip, [r2]
	ldr	r1, [r3]
	ldr	r0, .L10+36
	ldr	r2, .L10+40
	mov	r3, r6
	ldr	r2, [r2]
	orr	r1, ip, r1
	str	r0, [sp]
	ldr	r0, [sp, #12]
	bl	finit
	mov	r1, r4
	ldr	r0, [sp, #12]
	bl	fdrop
	ldr	r3, [r4]
	ldr	r2, [sp, #16]
	str	r2, [r3]
	b	.L1
.L9:
	mov	r2, #0
	mvn	r1, #0
	ldr	r0, [r7]
	bl	chgkqcnt
	b	.L1
.L8:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	RLIMIT_KQUEUES
	.word	.LC0
	.word	ENOMEM
	.word	M_WAITOK
	.word	M_ZERO
	.word	M_KQUEUE
	.word	kq_list
	.word	FREAD
	.word	FWRITE
	.word	kqueueops
	.word	DTYPE_KQUEUE
	.size	kern_kqueue, .-kern_kqueue
	.comm	kqueueops,4,4
	.comm	kq_list,4,4
	.comm	RLIMIT_KQUEUES,4,4
	.comm	M_ZERO,4,4
	.comm	M_WAITOK,4,4
	.comm	M_KQUEUE,4,4
	.comm	FWRITE,4,4
	.comm	FREAD,4,4
	.comm	ENOMEM,4,4
	.comm	DTYPE_KQUEUE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
