	.file	"159514726.c"
	.intel_syntax noprefix
	.text
	.globl	poll2select
	.type	poll2select, @function
poll2select:
.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, 352
	mov	QWORD PTR -344[rbp], rdi
	mov	DWORD PTR -348[rbp], esi
	mov	DWORD PTR -352[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -320[rbp], 0
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -272[rbp]
	mov	rdi, rdx
#APP
# 25 "the_stack_data/159514726.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -316[rbp], edx
	mov	DWORD PTR -312[rbp], eax
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -144[rbp]
	mov	rdi, rdx
#APP
# 26 "the_stack_data/159514726.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -308[rbp], edx
	mov	DWORD PTR -304[rbp], eax
	mov	DWORD PTR -324[rbp], 0
	jmp	.L2
.L7:
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	je	.L17
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR 4[rax]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L5
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -272[rbp+rax*8]
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -272[rbp+rax*8], rdx
.L5:
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR 4[rax]
	cwde
	and	eax, 4
	test	eax, eax
	je	.L6
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -144[rbp+rax*8], rdx
.L6:
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -320[rbp], eax
	jge	.L4
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -320[rbp], eax
	jmp	.L4
.L17:
	nop
.L4:
	add	DWORD PTR -324[rbp], 1
.L2:
	mov	eax, DWORD PTR -324[rbp]
	cmp	eax, DWORD PTR -348[rbp]
	jl	.L7
	lea	rax, -288[rbp]
	mov	QWORD PTR -296[rbp], rax
	cmp	DWORD PTR -352[rbp], -1
	jne	.L8
	mov	QWORD PTR -296[rbp], 0
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -352[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	cdqe
	mov	QWORD PTR -288[rbp], rax
	mov	QWORD PTR -280[rbp], 0
.L9:
	mov	eax, DWORD PTR -320[rbp]
	lea	edi, 1[rax]
	mov	rcx, QWORD PTR -296[rbp]
	lea	rdx, -144[rbp]
	lea	rax, -272[rbp]
	mov	r8, rcx
	mov	ecx, 0
	mov	rsi, rax
	call	select@PLT
	mov	DWORD PTR -300[rbp], eax
	mov	DWORD PTR -324[rbp], 0
	jmp	.L10
.L14:
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	WORD PTR 6[rax], 0
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	je	.L18
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -272[rbp+rax*8]
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L13
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	WORD PTR 6[rax], 1
.L13:
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L12
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rdx
	movzx	edx, WORD PTR 6[rax]
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -344[rbp]
	add	rax, rcx
	or	edx, 4
	mov	WORD PTR 6[rax], dx
	jmp	.L12
.L18:
	nop
.L12:
	add	DWORD PTR -324[rbp], 1
.L10:
	mov	eax, DWORD PTR -324[rbp]
	cmp	eax, DWORD PTR -348[rbp]
	jl	.L14
	mov	eax, DWORD PTR -300[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	poll2select, .-poll2select
	.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	"159514726.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	poll2select
	.syntax unified
	.arm
	.fpu softvfp
	.type	poll2select, %function
poll2select:
	@ args = 0, pretend = 0, frame = 320
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #328
	str	r0, [fp, #-312]
	str	r1, [fp, #-316]
	str	r2, [fp, #-320]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-300]
	sub	r3, fp, #264
	str	r3, [fp, #-284]
	mov	r3, #0
	str	r3, [fp, #-292]
	b	.L2
.L3:
	ldr	r3, [fp, #-284]
	ldr	r2, [fp, #-292]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-292]
	add	r3, r3, #1
	str	r3, [fp, #-292]
.L2:
	ldr	r3, [fp, #-292]
	cmp	r3, #31
	bls	.L3
	sub	r3, fp, #136
	str	r3, [fp, #-280]
	mov	r3, #0
	str	r3, [fp, #-288]
	b	.L4
.L5:
	ldr	r3, [fp, #-280]
	ldr	r2, [fp, #-288]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-288]
	add	r3, r3, #1
	str	r3, [fp, #-288]
.L4:
	ldr	r3, [fp, #-288]
	cmp	r3, #31
	bls	.L5
	mov	r3, #0
	str	r3, [fp, #-304]
	b	.L6
.L11:
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L21
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	ldrsh	r3, [r3, #4]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L9
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-260]
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r0, [fp, #-312]
	add	r3, r0, r3
	ldr	r3, [r3]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-260]
.L9:
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	ldrsh	r3, [r3, #4]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #4
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-132]
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r0, [fp, #-312]
	add	r3, r0, r3
	ldr	r3, [r3]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-132]
.L10:
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-300]
	cmp	r2, r3
	bge	.L8
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-300]
	b	.L8
.L21:
	nop
.L8:
	ldr	r3, [fp, #-304]
	add	r3, r3, #1
	str	r3, [fp, #-304]
.L6:
	ldr	r2, [fp, #-304]
	ldr	r3, [fp, #-316]
	cmp	r2, r3
	blt	.L11
	sub	r3, fp, #272
	str	r3, [fp, #-296]
	ldr	r3, [fp, #-320]
	cmn	r3, #1
	bne	.L12
	mov	r3, #0
	str	r3, [fp, #-296]
	b	.L13
.L12:
	ldr	r3, [fp, #-320]
	ldr	r2, .L23+4
	smull	r1, r2, r3, r2
	asr	r2, r2, #6
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-272]
	mov	r3, #0
	str	r3, [fp, #-268]
.L13:
	ldr	r3, [fp, #-300]
	add	r0, r3, #1
	sub	r2, fp, #136
	sub	r1, fp, #264
	ldr	r3, [fp, #-296]
	str	r3, [sp]
	mov	r3, #0
	bl	select
	str	r0, [fp, #-276]
	mov	r3, #0
	str	r3, [fp, #-304]
	b	.L14
.L18:
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	mov	r2, #0
	strh	r2, [r3, #6]	@ movhi
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L22
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-260]
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r1, [fp, #-312]
	add	r3, r1, r3
	ldr	r3, [r3]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L17
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	mov	r2, #1
	strh	r2, [r3, #6]	@ movhi
.L17:
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-132]
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r1, [fp, #-312]
	add	r3, r1, r3
	ldr	r3, [r3]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-312]
	add	r3, r2, r3
	ldrsh	r2, [r3, #6]
	ldr	r3, [fp, #-304]
	lsl	r3, r3, #3
	ldr	r1, [fp, #-312]
	add	r3, r1, r3
	orr	r2, r2, #4
	lsl	r2, r2, #16
	asr	r2, r2, #16
	strh	r2, [r3, #6]	@ movhi
	b	.L16
.L22:
	nop
.L16:
	ldr	r3, [fp, #-304]
	add	r3, r3, #1
	str	r3, [fp, #-304]
.L14:
	ldr	r2, [fp, #-304]
	ldr	r3, [fp, #-316]
	cmp	r2, r3
	blt	.L18
	ldr	r3, [fp, #-276]
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC0
	.word	274877907
	.size	poll2select, .-poll2select
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
