	.file	"extr_tty_ptmx.c_ptmx_kqfilter.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"ptmx kevent: unexpected filter: %d, kn = %p, tty = %p"
	.text
	.p2align 4
	.globl	ptmx_kqfilter
	.type	ptmx_kqfilter, @function
ptmx_kqfilter:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, QWORD PTR cdevsw[rip]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	call	major@PLT
	mov	rcx, QWORD PTR ptcopen[rip]
	cmp	QWORD PTR 0[r13+rax*8], rcx
	je	.L2
	mov	esi, DWORD PTR ENODEV[rip]
	mov	rdi, rbp
	xor	r12d, r12d
	call	knote_set_error@PLT
.L1:
	mov	eax, r12d
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, r12d
	call	minor@PLT
	xor	esi, esi
	mov	edi, eax
	call	ptmx_get_ioctl@PLT
	mov	r12, rax
	test	rax, rax
	je	.L10
	mov	r13, QWORD PTR 8[rax]
	mov	rdi, r13
	call	tty_lock@PLT
	mov	eax, DWORD PTR EVFILTID_PTMX[rip]
	mov	esi, DWORD PTR 0[rbp]
	mov	QWORD PTR 8[rbp], r12
	mov	DWORD PTR 16[rbp], eax
	cmp	esi, 128
	je	.L5
	cmp	esi, 129
	jne	.L6
	lea	rdi, 4[r12]
	mov	rsi, rbp
	call	KNOTE_ATTACH@PLT
.L7:
	mov	rdx, r13
	mov	rsi, r12
	mov	rdi, rbp
	call	ptmx_kqops_common@PLT
	mov	rdi, r13
	mov	r12d, eax
	call	ttyhold@PLT
	mov	rdi, r13
	call	tty_unlock@PLT
	mov	eax, r12d
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	esi, DWORD PTR ENXIO[rip]
	mov	rdi, rbp
	call	knote_set_error@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rsi, rbp
	mov	rdi, r12
	call	KNOTE_ATTACH@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rcx, r13
	mov	rdx, rbp
	lea	rdi, .LC0[rip]
	call	panic@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	ptmx_kqfilter, .-ptmx_kqfilter
	.comm	ptcopen,8,8
	.comm	cdevsw,8,8
	.comm	EVFILTID_PTMX,4,4
	.comm	ENXIO,4,4
	.comm	ENODEV,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_tty_ptmx.c_ptmx_kqfilter.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ptmx kevent: unexpected filter: %d, kn = %p, tty = "
	.ascii	"%p\000"
	.text
	.align	2
	.global	ptmx_kqfilter
	.syntax unified
	.arm
	.fpu softvfp
	.type	ptmx_kqfilter, %function
ptmx_kqfilter:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L11
	push	{r4, r5, r6, lr}
	ldr	r6, [r3]
	mov	r5, r1
	mov	r4, r0
	bl	major
	ldr	r3, .L11+4
	ldr	r2, [r6, r0, lsl #2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L2
	ldr	r3, .L11+8
	mov	r0, r5
	ldr	r1, [r3]
	bl	knote_set_error
	mov	r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r4
	bl	minor
	mov	r1, #0
	bl	ptmx_get_ioctl
	subs	r4, r0, #0
	beq	.L10
	ldr	r6, [r4, #8]
	mov	r0, r6
	bl	tty_lock
	ldr	r3, .L11+12
	ldr	r1, [r5]
	ldr	r3, [r3]
	cmp	r1, #128
	str	r4, [r5, #4]
	str	r3, [r5, #8]
	beq	.L5
	cmp	r1, #129
	bne	.L6
	mov	r1, r5
	add	r0, r4, #4
	bl	KNOTE_ATTACH
.L7:
	mov	r1, r4
	mov	r2, r6
	mov	r0, r5
	bl	ptmx_kqops_common
	mov	r4, r0
	mov	r0, r6
	bl	ttyhold
	mov	r0, r6
	bl	tty_unlock
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L10:
	ldr	r3, .L11+16
	mov	r0, r5
	ldr	r1, [r3]
	bl	knote_set_error
	b	.L1
.L5:
	mov	r1, r5
	mov	r0, r4
	bl	KNOTE_ATTACH
	b	.L7
.L6:
	mov	r3, r6
	mov	r2, r5
	ldr	r0, .L11+20
	bl	panic
	b	.L7
.L12:
	.align	2
.L11:
	.word	cdevsw
	.word	ptcopen
	.word	ENODEV
	.word	EVFILTID_PTMX
	.word	ENXIO
	.word	.LC0
	.size	ptmx_kqfilter, .-ptmx_kqfilter
	.comm	ptcopen,4,4
	.comm	cdevsw,4,4
	.comm	EVFILTID_PTMX,4,4
	.comm	ENXIO,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
