	.file	"58615.c"
	.intel_syntax noprefix
	.text
	.globl	EINTR
	.bss
	.align 4
	.type	EINTR, @object
	.size	EINTR, 4
EINTR:
	.zero	4
	.globl	EINVAL
	.align 4
	.type	EINVAL, @object
	.size	EINVAL, 4
EINVAL:
	.zero	4
	.globl	ERESTART
	.align 4
	.type	ERESTART, @object
	.size	ERESTART, 4
ERESTART:
	.zero	4
	.globl	EWOULDBLOCK
	.align 4
	.type	EWOULDBLOCK, @object
	.size	EWOULDBLOCK, 4
EWOULDBLOCK:
	.zero	4
	.globl	FD_SETSIZE
	.align 4
	.type	FD_SETSIZE, @object
	.size	FD_SETSIZE, 4
FD_SETSIZE:
	.zero	4
	.globl	INT32_MAX
	.align 4
	.type	INT32_MAX, @object
	.size	INT32_MAX, 4
INT32_MAX:
	.zero	4
	.globl	M_TEMP
	.align 4
	.type	M_TEMP, @object
	.size	M_TEMP, 4
M_TEMP:
	.zero	4
	.globl	M_WAITOK
	.align 4
	.type	M_WAITOK, @object
	.size	M_WAITOK, 4
M_WAITOK:
	.zero	4
	.globl	SIG_SETMASK
	.align 4
	.type	SIG_SETMASK, @object
	.size	SIG_SETMASK, 4
SIG_SETMASK:
	.zero	4
	.globl	TDF_ASTPENDING
	.align 4
	.type	TDF_ASTPENDING, @object
	.size	TDF_ASTPENDING, 4
TDF_ASTPENDING:
	.zero	4
	.globl	TDP_OLDMASK
	.align 4
	.type	TDP_OLDMASK, @object
	.size	TDP_OLDMASK, 4
TDP_OLDMASK:
	.zero	4
	.globl	maxfilesperproc
	.align 4
	.type	maxfilesperproc, @object
	.size	maxfilesperproc, 4
maxfilesperproc:
	.zero	4
	.globl	tc_precexp
	.align 4
	.type	tc_precexp, @object
	.size	tc_precexp, 4
tc_precexp:
	.zero	4
	.globl	tc_tick_sbt
	.align 8
	.type	tc_tick_sbt, @object
	.size	tc_tick_sbt, 8
tc_tick_sbt:
	.zero	8
	.text
	.globl	kern_poll
	.type	kern_poll, @function
kern_poll:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 240
	mov	QWORD PTR -200[rbp], rdi
	mov	QWORD PTR -208[rbp], rsi
	mov	DWORD PTR -212[rbp], edx
	mov	QWORD PTR -224[rbp], rcx
	mov	QWORD PTR -232[rbp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -184[rbp], 0
	cmp	QWORD PTR -224[rbp], 0
	je	.L2
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jns	.L3
	mov	eax, DWORD PTR EINVAL[rip]
	jmp	.L27
.L3:
	mov	rax, QWORD PTR -224[rbp]
	mov	eax, DWORD PTR 8[rax]
	test	eax, eax
	js	.L5
	mov	rax, QWORD PTR -224[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	eax, 999999999
	jle	.L6
.L5:
	mov	eax, DWORD PTR EINVAL[rip]
	jmp	.L27
.L6:
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L7
	mov	rax, QWORD PTR -224[rbp]
	mov	eax, DWORD PTR 8[rax]
	test	eax, eax
	jne	.L7
	mov	DWORD PTR -188[rbp], 0
	jmp	.L12
.L7:
	mov	rax, QWORD PTR -224[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -160[rbp], rax
	mov	QWORD PTR -152[rbp], rdx
	mov	rdx, QWORD PTR -160[rbp]
	mov	eax, DWORD PTR INT32_MAX[rip]
	mov	ecx, eax
	shr	ecx, 31
	add	eax, ecx
	sar	eax
	cdqe
	cmp	rdx, rax
	jle	.L9
	mov	rax, QWORD PTR -160[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR INT32_MAX[rip]
	mov	ecx, eax
	shr	ecx, 31
	add	eax, ecx
	sar	eax
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -176[rbp], eax
	mov	rax, QWORD PTR -160[rbp]
	mov	edx, DWORD PTR -176[rbp]
	movsx	rdx, edx
	sub	rax, rdx
	mov	QWORD PTR -160[rbp], rax
	jmp	.L10
.L9:
	mov	DWORD PTR -176[rbp], 0
.L10:
	mov	rdx, QWORD PTR -160[rbp]
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rdx
	mov	rsi, rax
	call	tstosbt@PLT
	mov	DWORD PTR -172[rbp], eax
	mov	eax, DWORD PTR -172[rbp]
	mov	DWORD PTR -184[rbp], eax
	mov	eax, DWORD PTR tc_precexp[rip]
	mov	ecx, eax
	sar	DWORD PTR -184[rbp], cl
	mov	edx, DWORD PTR -172[rbp]
	lea	rax, -188[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	TIMESEL@PLT
	test	rax, rax
	je	.L11
	mov	rax, QWORD PTR tc_tick_sbt[rip]
	mov	edx, eax
	mov	eax, DWORD PTR -188[rbp]
	add	eax, edx
	mov	DWORD PTR -188[rbp], eax
.L11:
	mov	edx, DWORD PTR -188[rbp]
	mov	eax, DWORD PTR -172[rbp]
	add	eax, edx
	mov	DWORD PTR -188[rbp], eax
	jmp	.L12
.L2:
	mov	DWORD PTR -188[rbp], -1
.L12:
	mov	eax, DWORD PTR maxfilesperproc[rip]
	cmp	DWORD PTR -212[rbp], eax
	jle	.L13
	mov	eax, DWORD PTR FD_SETSIZE[rip]
	cmp	DWORD PTR -212[rbp], eax
	jle	.L13
	mov	eax, DWORD PTR EINVAL[rip]
	jmp	.L27
.L13:
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	nitems@PLT
	cmp	DWORD PTR -212[rbp], eax
	jle	.L14
	mov	ecx, DWORD PTR M_WAITOK[rip]
	mov	edx, DWORD PTR M_TEMP[rip]
	mov	eax, DWORD PTR -212[rbp]
	mov	esi, 4
	mov	edi, eax
	call	mallocarray@PLT
	mov	QWORD PTR -168[rbp], rax
	jmp	.L15
.L14:
	lea	rax, -144[rbp]
	mov	QWORD PTR -168[rbp], rax
.L15:
	mov	eax, DWORD PTR -212[rbp]
	cdqe
	sal	eax, 2
	mov	edx, eax
	mov	rcx, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR -208[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	copyin@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], 0
	jne	.L29
	cmp	QWORD PTR -232[rbp], 0
	je	.L18
	mov	rax, QWORD PTR -200[rbp]
	lea	rcx, 16[rax]
	mov	esi, DWORD PTR SIG_SETMASK[rip]
	mov	rdx, QWORD PTR -232[rbp]
	mov	rax, QWORD PTR -200[rbp]
	mov	r8d, 0
	mov	rdi, rax
	call	kern_sigprocmask@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], 0
	jne	.L30
	mov	rax, QWORD PTR -200[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	eax, DWORD PTR TDP_OLDMASK[rip]
	or	edx, eax
	mov	rax, QWORD PTR -200[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	thread_lock@PLT
	mov	rax, QWORD PTR -200[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR TDF_ASTPENDING[rip]
	or	edx, eax
	mov	rax, QWORD PTR -200[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	thread_unlock@PLT
.L18:
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	seltdinit@PLT
.L22:
	mov	edx, DWORD PTR -212[rbp]
	mov	rcx, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR -200[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	pollscan@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], 0
	jne	.L20
	mov	rax, QWORD PTR -200[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L20
	mov	ecx, DWORD PTR -188[rbp]
	mov	edx, DWORD PTR -184[rbp]
	mov	rax, QWORD PTR -200[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	seltdwait@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], 0
	jne	.L31
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	pollrescan@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], 0
	jne	.L20
	mov	rax, QWORD PTR -200[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L20
	jmp	.L22
.L31:
	nop
.L20:
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	seltdclear@PLT
	jmp	.L17
.L29:
	nop
	jmp	.L17
.L30:
	nop
.L17:
	mov	eax, DWORD PTR ERESTART[rip]
	cmp	DWORD PTR -180[rbp], eax
	jne	.L23
	mov	eax, DWORD PTR EINTR[rip]
	mov	DWORD PTR -180[rbp], eax
.L23:
	mov	eax, DWORD PTR EWOULDBLOCK[rip]
	cmp	DWORD PTR -180[rbp], eax
	jne	.L24
	mov	DWORD PTR -180[rbp], 0
.L24:
	cmp	DWORD PTR -180[rbp], 0
	jne	.L32
	mov	ecx, DWORD PTR -212[rbp]
	mov	rdx, QWORD PTR -208[rbp]
	mov	rsi, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	pollout@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], 0
.L32:
	nop
.L25:
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	nitems@PLT
	cmp	DWORD PTR -212[rbp], eax
	jle	.L26
	mov	edx, DWORD PTR M_TEMP[rip]
	mov	rax, QWORD PTR -168[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	free@PLT
.L26:
	mov	eax, DWORD PTR -180[rbp]
.L27:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	kern_poll, .-kern_poll
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"58615.c"
	.text
	.comm	EINTR,4,4
	.comm	EINVAL,4,4
	.comm	ERESTART,4,4
	.comm	EWOULDBLOCK,4,4
	.comm	FD_SETSIZE,4,4
	.comm	INT32_MAX,4,4
	.comm	M_TEMP,4,4
	.comm	M_WAITOK,4,4
	.comm	SIG_SETMASK,4,4
	.comm	TDF_ASTPENDING,4,4
	.comm	TDP_OLDMASK,4,4
	.comm	maxfilesperproc,4,4
	.comm	tc_precexp,4,4
	.comm	tc_tick_sbt,4,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	kern_poll
	.syntax unified
	.arm
	.fpu softvfp
	.type	kern_poll, %function
kern_poll:
	@ args = 4, pretend = 0, frame = 192
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #200
	str	r0, [fp, #-176]
	str	r1, [fp, #-180]
	str	r2, [fp, #-184]
	str	r3, [fp, #-188]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-192]
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-160]
	ldr	r3, [fp, #-188]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-188]
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L3
	ldr	r3, .L33+4
	ldr	r3, [r3]
	b	.L27
.L3:
	ldr	r3, [fp, #-188]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	blt	.L5
	ldr	r3, [fp, #-188]
	ldr	r3, [r3, #4]
	ldr	r2, .L33+8
	cmp	r3, r2
	ble	.L6
.L5:
	ldr	r3, .L33+4
	ldr	r3, [r3]
	b	.L27
.L6:
	ldr	r3, [fp, #-188]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-188]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L7
	mov	r3, #0
	str	r3, [fp, #-168]
	b	.L12
.L7:
	ldr	r2, [fp, #-188]
	sub	r3, fp, #144
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r2, [fp, #-144]
	ldr	r3, .L33+12
	ldr	r3, [r3]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	cmp	r2, r3
	ble	.L9
	ldr	r2, [fp, #-144]
	ldr	r3, .L33+12
	ldr	r3, [r3]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	rsb	r3, r3, #0
	add	r3, r2, r3
	str	r3, [fp, #-152]
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-152]
	sub	r3, r2, r3
	str	r3, [fp, #-144]
	b	.L10
.L9:
	mov	r3, #0
	str	r3, [fp, #-152]
.L10:
	sub	r3, fp, #144
	ldm	r3, {r0, r1}
	bl	tstosbt
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-148]
	str	r3, [fp, #-160]
	ldr	r3, .L33+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-160]
	asr	r3, r2, r3
	str	r3, [fp, #-160]
	sub	r3, fp, #168
	ldr	r1, [fp, #-148]
	mov	r0, r3
	bl	TIMESEL
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	ldr	r2, [fp, #-168]
	ldr	r3, .L33+20
	ldr	r3, [r3]
	add	r3, r2, r3
	str	r3, [fp, #-168]
.L11:
	ldr	r2, [fp, #-168]
	ldr	r3, [fp, #-148]
	add	r3, r2, r3
	str	r3, [fp, #-168]
	b	.L12
.L2:
	mvn	r3, #0
	str	r3, [fp, #-168]
.L12:
	ldr	r3, .L33+24
	ldr	r3, [r3]
	ldr	r2, [fp, #-184]
	cmp	r2, r3
	ble	.L13
	ldr	r3, .L33+28
	ldr	r3, [r3]
	ldr	r2, [fp, #-184]
	cmp	r2, r3
	ble	.L13
	ldr	r3, .L33+4
	ldr	r3, [r3]
	b	.L27
.L13:
	sub	r3, fp, #136
	mov	r0, r3
	bl	nitems
	mov	r2, r0
	ldr	r3, [fp, #-184]
	cmp	r3, r2
	ble	.L14
	ldr	r3, .L33+32
	ldr	r2, [r3]
	ldr	r3, .L33+36
	ldr	r3, [r3]
	mov	r1, #4
	ldr	r0, [fp, #-184]
	bl	mallocarray
	str	r0, [fp, #-164]
	b	.L15
.L14:
	sub	r3, fp, #136
	str	r3, [fp, #-164]
.L15:
	ldr	r3, [fp, #-184]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, [fp, #-164]
	ldr	r0, [fp, #-180]
	bl	copyin
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L29
	ldr	r3, [fp, #-192]
	cmp	r3, #0
	beq	.L18
	ldr	r3, .L33+40
	ldr	r1, [r3]
	ldr	r3, [fp, #-176]
	add	r3, r3, #12
	mov	r2, #0
	str	r2, [sp]
	ldr	r2, [fp, #-192]
	ldr	r0, [fp, #-176]
	bl	kern_sigprocmask
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L30
	ldr	r3, [fp, #-176]
	ldr	r2, [r3, #8]
	ldr	r3, .L33+44
	ldr	r3, [r3]
	orr	r2, r2, r3
	ldr	r3, [fp, #-176]
	str	r2, [r3, #8]
	ldr	r0, [fp, #-176]
	bl	thread_lock
	ldr	r3, [fp, #-176]
	ldr	r2, [r3, #4]
	ldr	r3, .L33+48
	ldr	r3, [r3]
	orr	r2, r2, r3
	ldr	r3, [fp, #-176]
	str	r2, [r3, #4]
	ldr	r0, [fp, #-176]
	bl	thread_unlock
.L18:
	ldr	r0, [fp, #-176]
	bl	seltdinit
.L22:
	ldr	r2, [fp, #-184]
	ldr	r1, [fp, #-164]
	ldr	r0, [fp, #-176]
	bl	pollscan
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-176]
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-168]
	ldr	r2, [fp, #-160]
	mov	r1, r3
	ldr	r0, [fp, #-176]
	bl	seltdwait
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L31
	ldr	r0, [fp, #-176]
	bl	pollrescan
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-176]
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L20
	b	.L22
.L31:
	nop
.L20:
	ldr	r0, [fp, #-176]
	bl	seltdclear
	b	.L17
.L29:
	nop
	b	.L17
.L30:
	nop
.L17:
	ldr	r3, .L33+52
	ldr	r3, [r3]
	ldr	r2, [fp, #-156]
	cmp	r2, r3
	bne	.L23
	ldr	r3, .L33+56
	ldr	r3, [r3]
	str	r3, [fp, #-156]
.L23:
	ldr	r3, .L33+60
	ldr	r3, [r3]
	ldr	r2, [fp, #-156]
	cmp	r2, r3
	bne	.L24
	mov	r3, #0
	str	r3, [fp, #-156]
.L24:
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L32
	ldr	r3, [fp, #-184]
	ldr	r2, [fp, #-180]
	ldr	r1, [fp, #-164]
	ldr	r0, [fp, #-176]
	bl	pollout
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmp	r3, #0
.L32:
	nop
.L25:
	sub	r3, fp, #136
	mov	r0, r3
	bl	nitems
	mov	r2, r0
	ldr	r3, [fp, #-184]
	cmp	r3, r2
	ble	.L26
	ldr	r3, .L33+32
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-164]
	bl	free
.L26:
	ldr	r3, [fp, #-156]
.L27:
	ldr	r2, .L33
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC0
	.word	EINVAL
	.word	999999999
	.word	INT32_MAX
	.word	tc_precexp
	.word	tc_tick_sbt
	.word	maxfilesperproc
	.word	FD_SETSIZE
	.word	M_TEMP
	.word	M_WAITOK
	.word	SIG_SETMASK
	.word	TDP_OLDMASK
	.word	TDF_ASTPENDING
	.word	ERESTART
	.word	EINTR
	.word	EWOULDBLOCK
	.size	kern_poll, .-kern_poll
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
