	.file	"extr_ngx_select_module.c_ngx_select_process_events.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"change max_fd: %i"
.LC1:
	.string	"select timer: %M"
.LC2:
	.string	"select ready %d"
.LC3:
	.string	"select() failed"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC4:
	.string	"select() returned no events without timeout"
	.section	.rodata.str1.1
.LC5:
	.string	"select write %d"
.LC6:
	.string	"select read %d"
.LC7:
	.string	"select ready != events: %d:%d"
	.text
	.p2align 4
	.type	ngx_select_process_events, @function
ngx_select_process_events:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r8d, DWORD PTR max_fd[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cmp	r8d, -1
	je	.L53
.L2:
	xor	r12d, r12d
	cmp	DWORD PTR NGX_TIMER_INFINITE[rip], ebx
	je	.L6
	movsx	rax, ebx
	mov	edx, ebx
	mov	ecx, ebx
	mov	r12, rsp
	imul	rax, rax, 274877907
	sar	edx, 31
	sar	rax, 38
	sub	eax, edx
	movsx	rdx, eax
	imul	eax, eax, 1000
	mov	QWORD PTR [rsp], rdx
	sub	ecx, eax
	imul	eax, ecx, 1000
	cdqe
	mov	QWORD PTR 8[rsp], rax
.L6:
	mov	rsi, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR NGX_LOG_DEBUG_EVENT[rip]
	mov	r8d, ebx
	xor	edx, edx
	lea	rcx, .LC1[rip]
	call	ngx_log_debug1@PLT
	mov	eax, DWORD PTR master_read_fd_set[rip]
	mov	r8, r12
	xor	ecx, ecx
	lea	rdx, work_write_fd_set[rip]
	lea	rsi, work_read_fd_set[rip]
	mov	DWORD PTR work_read_fd_set[rip], eax
	mov	eax, DWORD PTR master_write_fd_set[rip]
	mov	DWORD PTR work_write_fd_set[rip], eax
	mov	eax, DWORD PTR max_fd[rip]
	lea	edi, 1[rax]
	call	select@PLT
	mov	r12d, eax
	cmp	eax, -1
	je	.L54
	and	r13, QWORD PTR NGX_UPDATE_TIME[rip]
	or	r13, QWORD PTR ngx_event_timer_alarm[rip]
	jne	.L30
	mov	rsi, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR NGX_LOG_DEBUG_EVENT[rip]
	mov	r8d, r12d
	xor	edx, edx
	lea	rcx, .LC2[rip]
	call	ngx_log_debug1@PLT
.L9:
	test	r12d, r12d
	je	.L15
	xor	ebx, ebx
	xor	r13d, r13d
	cmp	QWORD PTR nevents[rip], 0
	jne	.L16
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L57:
	lea	rsi, work_write_fd_set[rip]
	call	FD_ISSET@PLT
	test	rax, rax
	jne	.L55
.L20:
	add	rbx, 1
	cmp	QWORD PTR nevents[rip], rbx
	jbe	.L56
.L16:
	mov	rax, QWORD PTR event_index[rip]
	mov	r14, QWORD PTR [rax+rbx*8]
	mov	r15, QWORD PTR 24[r14]
	cmp	QWORD PTR 16[r14], 0
	mov	edi, DWORD PTR [r15]
	jne	.L57
	lea	rsi, work_read_fd_set[rip]
	call	FD_ISSET@PLT
	test	rax, rax
	je	.L20
	mov	r8d, DWORD PTR [r15]
	mov	rsi, QWORD PTR 0[rbp]
	lea	rcx, .LC6[rip]
	xor	edx, edx
	mov	edi, DWORD PTR NGX_LOG_DEBUG_EVENT[rip]
	call	ngx_log_debug1@PLT
.L21:
	cmp	QWORD PTR 8[r14], 0
	lea	rax, ngx_posted_accept_events[rip]
	mov	rdi, r14
	mov	DWORD PTR [r14], 1
	lea	rsi, ngx_posted_events[rip]
	cmovne	rsi, rax
	add	r13d, 1
	add	rbx, 1
	call	ngx_post_event@PLT
	cmp	QWORD PTR nevents[rip], rbx
	ja	.L16
.L56:
	cmp	r13d, r12d
	jne	.L17
.L23:
	mov	eax, DWORD PTR NGX_OK[rip]
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L58
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L30:
	.cfi_restore_state
	xor	r14d, r14d
.L24:
	xor	eax, eax
	call	ngx_time_update@PLT
.L8:
	mov	rsi, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR NGX_LOG_DEBUG_EVENT[rip]
	xor	edx, edx
	mov	r8d, r12d
	lea	rcx, .LC2[rip]
	call	ngx_log_debug1@PLT
	test	r14d, r14d
	je	.L9
	cmp	DWORD PTR NGX_EINTR[rip], r14d
	jne	.L10
	cmp	QWORD PTR ngx_event_timer_alarm[rip], 0
	je	.L11
	mov	QWORD PTR ngx_event_timer_alarm[rip], 0
	mov	eax, DWORD PTR NGX_OK[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L54:
	and	r13, QWORD PTR NGX_UPDATE_TIME[rip]
	or	r13, QWORD PTR ngx_event_timer_alarm[rip]
	mov	r14d, DWORD PTR ngx_errno[rip]
	je	.L8
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L53:
	mov	rdx, QWORD PTR nevents[rip]
	test	rdx, rdx
	je	.L3
	mov	rax, QWORD PTR event_index[rip]
	lea	rcx, [rax+rdx*8]
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdx, QWORD PTR [rax]
	mov	rdx, QWORD PTR 24[rdx]
	mov	edx, DWORD PTR [rdx]
	cmp	edx, r8d
	jle	.L4
	mov	DWORD PTR max_fd[rip], edx
	mov	r8d, edx
.L4:
	add	rax, 8
	cmp	rcx, rax
	jne	.L5
.L3:
	mov	rsi, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR NGX_LOG_DEBUG_EVENT[rip]
	lea	rcx, .LC0[rip]
	xor	edx, edx
	call	ngx_log_debug1@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L55:
	mov	r8d, DWORD PTR [r15]
	mov	rsi, QWORD PTR 0[rbp]
	lea	rcx, .LC5[rip]
	xor	edx, edx
	mov	edi, DWORD PTR NGX_LOG_DEBUG_EVENT[rip]
	call	ngx_log_debug1@PLT
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L15:
	cmp	DWORD PTR NGX_TIMER_INFINITE[rip], ebx
	jne	.L23
	mov	rsi, QWORD PTR 0[rbp]
	mov	rdi, QWORD PTR NGX_LOG_ALERT[rip]
	xor	edx, edx
	xor	eax, eax
	lea	rcx, .LC4[rip]
	call	ngx_log_error@PLT
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, QWORD PTR NGX_LOG_ALERT[rip]
.L13:
	mov	rsi, QWORD PTR 0[rbp]
	xor	eax, eax
	lea	rcx, .LC3[rip]
	mov	edx, r14d
	call	ngx_log_error@PLT
	cmp	DWORD PTR NGX_EBADF[rip], r14d
	je	.L59
.L51:
	mov	eax, DWORD PTR NGX_ERROR[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, QWORD PTR NGX_LOG_INFO[rip]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rsi, QWORD PTR 0[rbp]
	mov	rdi, QWORD PTR NGX_LOG_ALERT[rip]
	mov	r9d, r13d
	xor	edx, edx
	mov	r8d, r12d
	lea	rcx, .LC7[rip]
	xor	eax, eax
	call	ngx_log_error@PLT
	mov	rdi, rbp
	call	ngx_select_repair_fd_sets@PLT
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L59:
	mov	rdi, rbp
	call	ngx_select_repair_fd_sets@PLT
	jmp	.L51
.L58:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ngx_select_process_events, .-ngx_select_process_events
	.comm	work_write_fd_set,4,4
	.comm	work_read_fd_set,4,4
	.comm	ngx_posted_events,4,4
	.comm	ngx_posted_accept_events,4,4
	.comm	ngx_event_timer_alarm,8,8
	.comm	ngx_errno,4,4
	.comm	nevents,8,8
	.comm	max_fd,4,4
	.comm	master_write_fd_set,4,4
	.comm	master_read_fd_set,4,4
	.comm	event_index,8,8
	.comm	NGX_UPDATE_TIME,8,8
	.comm	NGX_TIMER_INFINITE,4,4
	.comm	NGX_OK,4,4
	.comm	NGX_LOG_INFO,8,8
	.comm	NGX_LOG_DEBUG_EVENT,4,4
	.comm	NGX_LOG_DEBUG_ALL,4,4
	.comm	NGX_LOG_ALERT,8,8
	.comm	NGX_ERROR,4,4
	.comm	NGX_EINTR,4,4
	.comm	NGX_EBADF,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_ngx_select_module.c_ngx_select_process_events.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"change max_fd: %i\000"
	.align	2
.LC1:
	.ascii	"select timer: %M\000"
	.align	2
.LC2:
	.ascii	"select ready %d\000"
	.align	2
.LC3:
	.ascii	"select() failed\000"
	.align	2
.LC4:
	.ascii	"select() returned no events without timeout\000"
	.align	2
.LC5:
	.ascii	"select write %d\000"
	.align	2
.LC6:
	.ascii	"select read %d\000"
	.align	2
.LC7:
	.ascii	"select ready != events: %d:%d\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ngx_select_process_events, %function
ngx_select_process_events:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r7, .L60
	mov	r6, r0
	ldr	r0, [r7]
	ldr	r3, .L60+4
	sub	sp, sp, #36
	cmn	r0, #1
	mov	r4, r1
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	beq	.L49
	ldr	r8, .L60+8
.L2:
	ldr	r9, .L60+12
	ldr	r3, [r9]
	cmp	r3, r4
	moveq	r10, #0
	beq	.L6
	ldr	r3, .L60+16
	asr	r2, r4, #31
	smull	r1, r3, r4, r3
	rsb	r2, r2, r3, asr #6
	rsb	r3, r2, r2, lsl #5
	add	r3, r2, r3, lsl #2
	sub	r3, r4, r3, lsl #3
	rsb	r1, r3, r3, lsl #5
	add	r3, r3, r1, lsl #2
	lsl	r3, r3, #3
	str	r2, [sp, #20]
	str	r3, [sp, #24]
	add	r10, sp, #20
.L6:
	str	r4, [sp]
	mov	r2, #0
	ldr	r3, .L60+20
	ldr	r1, [r6]
	ldr	r0, [r8]
	bl	ngx_log_debug1
	ldr	r3, .L60+24
	ldr	ip, .L60+28
	ldr	r0, [r7]
	ldr	r3, [r3]
	ldr	ip, [ip]
	ldr	r1, .L60+32
	ldr	r2, .L60+36
	str	r10, [sp]
	add	r0, r0, #1
	str	r3, [r1]
	str	ip, [r2]
	mov	r3, #0
	bl	select
	cmn	r0, #1
	mov	r7, r0
	ldr	r3, .L60+40
	ldr	r10, .L60+44
	beq	.L54
	ldr	r3, [r3]
	ldr	r2, [r10]
	and	r5, r5, r3
	orrs	r2, r5, r2
	bne	.L30
	str	r7, [sp]
	ldr	r3, .L60+48
	ldr	r1, [r6]
	ldr	r0, [r8]
	bl	ngx_log_debug1
.L9:
	cmp	r7, #0
	beq	.L15
	ldr	r10, .L60+52
	ldr	r3, [r10]
	cmp	r3, #0
	streq	r3, [sp, #8]
	beq	.L17
	mov	r4, #0
	ldr	r9, .L60+56
	str	r4, [sp, #8]
	str	r7, [sp, #12]
	b	.L16
.L57:
	ldr	r1, .L60+36
	bl	FD_ISSET
	cmp	r0, #0
	bne	.L55
.L20:
	ldr	r3, [r10]
	add	r4, r4, #1
	cmp	r3, r4
	bls	.L56
.L16:
	ldr	r3, [r9]
	ldr	r5, [r3, r4, lsl #2]
	ldr	r7, [r5, #8]
	ldr	fp, [r5, #12]
	cmp	r7, #0
	ldr	r0, [fp]
	bne	.L57
	ldr	r1, .L60+32
	bl	FD_ISSET
	cmp	r0, #0
	beq	.L20
	ldr	r3, [fp]
	mov	r2, r7
	str	r3, [sp]
	ldr	r1, [r6]
	ldr	r3, .L60+60
	ldr	r0, [r8]
	bl	ngx_log_debug1
.L21:
	mov	r3, #1
	ldr	r1, [r5, #4]
	ldr	r2, .L60+64
	cmp	r1, #0
	str	r3, [r5]
	ldr	r3, .L60+68
	moveq	r3, r2
	mov	r0, r5
	mov	r1, r3
	bl	ngx_post_event
	ldr	r3, [sp, #8]
	add	r4, r4, #1
	add	r3, r3, #1
	str	r3, [sp, #8]
	ldr	r3, [r10]
	cmp	r3, r4
	bhi	.L16
.L56:
	ldr	r7, [sp, #12]
	ldr	r3, [sp, #8]
	cmp	r3, r7
	bne	.L17
.L23:
	ldr	r3, .L60+72
	ldr	r0, [r3]
.L1:
	ldr	r3, .L60+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L58
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L30:
	mov	r5, #0
.L24:
	bl	ngx_time_update
.L8:
	str	r7, [sp]
	mov	r2, #0
	ldr	r3, .L60+48
	ldr	r1, [r6]
	ldr	r0, [r8]
	bl	ngx_log_debug1
	cmp	r5, #0
	beq	.L9
	ldr	r3, .L60+76
	ldr	r3, [r3]
	cmp	r5, r3
	bne	.L10
	ldr	r3, [r10]
	cmp	r3, #0
	beq	.L11
	mov	r2, #0
	ldr	r3, .L60+72
	str	r2, [r10]
	ldr	r0, [r3]
	b	.L1
.L54:
	ldr	r2, [r3]
	ldr	r1, [r10]
	and	r5, r5, r2
	ldr	r3, .L60+80
	orrs	r2, r5, r1
	ldr	r5, [r3]
	beq	.L8
	b	.L24
.L49:
	ldr	r3, .L60+52
	ldr	r1, [r3]
	cmp	r1, #0
	beq	.L3
	ldr	r9, .L60+56
	ldr	r3, [r9]
	add	r1, r3, r1, lsl #2
	sub	r1, r1, #4
	sub	r3, r3, #4
.L5:
	ldr	r2, [r3, #4]!
	ldr	r2, [r2, #12]
	ldr	r2, [r2]
	cmp	r2, r0
	movgt	r0, r2
	strgt	r2, [r7]
	cmp	r1, r3
	bne	.L5
.L3:
	ldr	r8, .L60+8
	str	r0, [sp]
	mov	r2, #0
	ldr	r0, [r8]
	ldr	r3, .L60+84
	ldr	r1, [r6]
	bl	ngx_log_debug1
	b	.L2
.L55:
	ldr	r2, [fp]
	ldr	r3, .L60+88
	str	r2, [sp]
	ldr	r1, [r6]
	mov	r2, #0
	ldr	r0, [r8]
	bl	ngx_log_debug1
	b	.L21
.L15:
	ldr	r3, [r9]
	cmp	r3, r4
	bne	.L23
	ldr	r3, .L60+92
	mov	r2, r7
	ldr	r1, [r6]
	ldr	r0, [r3]
	ldr	r3, .L60+96
	bl	ngx_log_error
	b	.L52
.L10:
	ldr	r3, .L60+92
	ldr	r0, [r3]
.L13:
	ldr	r3, .L60+100
	mov	r2, r5
	ldr	r1, [r6]
	bl	ngx_log_error
	ldr	r3, .L60+104
	ldr	r3, [r3]
	cmp	r5, r3
	beq	.L59
.L52:
	ldr	r3, .L60+108
	ldr	r0, [r3]
	b	.L1
.L11:
	ldr	r3, .L60+112
	ldr	r0, [r3]
	b	.L13
.L17:
	ldr	r2, [sp, #8]
	ldr	r3, .L60+92
	str	r2, [sp, #4]
	str	r7, [sp]
	mov	r2, #0
	ldr	r0, [r3]
	ldr	r1, [r6]
	ldr	r3, .L60+116
	bl	ngx_log_error
	mov	r0, r6
	bl	ngx_select_repair_fd_sets
	b	.L23
.L59:
	mov	r0, r6
	bl	ngx_select_repair_fd_sets
	b	.L52
.L58:
	bl	__stack_chk_fail
.L61:
	.align	2
.L60:
	.word	max_fd
	.word	.LC8
	.word	NGX_LOG_DEBUG_EVENT
	.word	NGX_TIMER_INFINITE
	.word	274877907
	.word	.LC1
	.word	master_read_fd_set
	.word	master_write_fd_set
	.word	work_read_fd_set
	.word	work_write_fd_set
	.word	NGX_UPDATE_TIME
	.word	ngx_event_timer_alarm
	.word	.LC2
	.word	nevents
	.word	event_index
	.word	.LC6
	.word	ngx_posted_events
	.word	ngx_posted_accept_events
	.word	NGX_OK
	.word	NGX_EINTR
	.word	ngx_errno
	.word	.LC0
	.word	.LC5
	.word	NGX_LOG_ALERT
	.word	.LC4
	.word	.LC3
	.word	NGX_EBADF
	.word	NGX_ERROR
	.word	NGX_LOG_INFO
	.word	.LC7
	.size	ngx_select_process_events, .-ngx_select_process_events
	.comm	work_write_fd_set,4,4
	.comm	work_read_fd_set,4,4
	.comm	ngx_posted_events,4,4
	.comm	ngx_posted_accept_events,4,4
	.comm	ngx_event_timer_alarm,4,4
	.comm	ngx_errno,4,4
	.comm	nevents,4,4
	.comm	max_fd,4,4
	.comm	master_write_fd_set,4,4
	.comm	master_read_fd_set,4,4
	.comm	event_index,4,4
	.comm	NGX_UPDATE_TIME,4,4
	.comm	NGX_TIMER_INFINITE,4,4
	.comm	NGX_OK,4,4
	.comm	NGX_LOG_INFO,4,4
	.comm	NGX_LOG_DEBUG_EVENT,4,4
	.comm	NGX_LOG_DEBUG_ALL,4,4
	.comm	NGX_LOG_ALERT,4,4
	.comm	NGX_ERROR,4,4
	.comm	NGX_EINTR,4,4
	.comm	NGX_EBADF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
