	.file	"extr_websocket.c_ws_start.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"A signal was caught on select(2)\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Unable to select: %s."
	.section	.rodata.str1.8
	.align 8
.LC2:
	.string	"Handled self-pipe to close event loop.\n"
	.text
	.p2align 4
	.globl	ws_start
	.type	ws_start, @function
ws_start:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	edx, 8
	xor	esi, esi
	lea	r14, fdstate[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rbp, QWORD PTR 16[rdi]
	mov	r12, QWORD PTR 8[rdi]
	lea	rdi, fdstate[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 4[rsp], 0
	call	memset@PLT
	lea	rdi, 4[rsp]
	call	ws_socket@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	mov	esi, DWORD PTR [r12]
	mov	edi, DWORD PTR 4[rsp]
	call	MAX@PLT
	mov	rdi, r14
	mov	DWORD PTR max_file_fd[rip], eax
	call	FD_ZERO@PLT
	lea	rdi, fdstate[rip+4]
	call	FD_ZERO@PLT
	mov	edi, DWORD PTR 4[rsp]
	mov	rcx, r12
	mov	rdx, rbp
	mov	rsi, r13
	call	set_rfds_wfds@PLT
	mov	eax, DWORD PTR max_file_fd[rip]
	xor	r8d, r8d
	xor	ecx, ecx
	lea	rdx, fdstate[rip+4]
	mov	rsi, r14
	lea	edi, 1[rax]
	mov	DWORD PTR max_file_fd[rip], edi
	call	select@PLT
	cmp	eax, -1
	je	.L16
.L2:
	mov	rax, QWORD PTR 0[r13]
	mov	rsi, r14
	mov	edi, DWORD PTR [rax]
	call	FD_ISSET@PLT
	test	rax, rax
	jne	.L4
	mov	eax, DWORD PTR max_file_fd[rip]
	xor	ebx, ebx
	test	eax, eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	DWORD PTR 0[rbp], ebx
	je	.L7
	cmp	DWORD PTR [r12], ebx
	je	.L7
	mov	edi, DWORD PTR 4[rsp]
	mov	rdx, r13
	mov	esi, ebx
	call	ws_listen@PLT
.L7:
	add	ebx, 1
	cmp	DWORD PTR max_file_fd[rip], ebx
	jg	.L5
.L6:
	mov	rdx, r12
	mov	rsi, rbp
	mov	rdi, r13
	call	ws_fifos@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L16:
	mov	edi, DWORD PTR errno[rip]
	cmp	edi, 128
	je	.L17
	call	strerror@PLT
	lea	rdi, .LC1[rip]
	mov	esi, eax
	call	FATAL@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	lea	rdi, .LC0[rip]
	call	LOG@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	lea	rdi, .LC2[rip]
	call	LOG@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ws_start, .-ws_start
	.comm	wsconfig,24,16
	.comm	max_file_fd,4,4
	.comm	fdstate,8,8
	.comm	errno,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_websocket.c_ws_start.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"A signal was caught on select(2)\012\000"
	.align	2
.LC1:
	.ascii	"Unable to select: %s.\000"
	.align	2
.LC2:
	.ascii	"Handled self-pipe to close event loop.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ws_start
	.syntax unified
	.arm
	.fpu softvfp
	.type	ws_start, %function
ws_start:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r10, #0
	mov	r7, r0
	ldr	r3, .L19
	ldr	r2, .L19+4
	sub	sp, sp, #20
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	ldr	r6, [r7, #4]
	mov	r8, r3
	ldr	r5, [r7, #8]
	add	r0, sp, #8
	str	r10, [r3]
	str	r10, [r3, #4]
	str	r10, [sp, #8]
	bl	ws_socket
	ldr	r4, .L19+8
	add	r9, r8, #4
.L8:
	ldr	r1, [r6]
	ldr	r0, [sp, #8]
	bl	MAX
	mov	r3, r0
	mov	r0, r8
	str	r3, [r4]
	bl	FD_ZERO
	mov	r0, r9
	bl	FD_ZERO
	mov	r3, r6
	mov	r2, r5
	mov	r1, r7
	ldr	r0, [sp, #8]
	bl	set_rfds_wfds
	ldr	r0, [r4]
	mov	r3, #0
	add	r0, r0, #1
	mov	r2, r9
	ldr	r1, .L19
	str	r10, [sp]
	str	r0, [r4]
	bl	select
	cmn	r0, #1
	beq	.L16
.L2:
	ldr	r3, [r7]
	mov	r1, r8
	ldr	r0, [r3]
	bl	FD_ISSET
	subs	fp, r0, #0
	bne	.L4
	ldr	r3, [r4]
	cmp	r3, #0
	ble	.L6
.L5:
	ldr	r3, [r5]
	cmp	r3, fp
	beq	.L7
	ldr	r3, [r6]
	cmp	r3, fp
	beq	.L7
	mov	r2, r7
	mov	r1, fp
	ldr	r0, [sp, #8]
	bl	ws_listen
.L7:
	ldr	r3, [r4]
	add	fp, fp, #1
	cmp	r3, fp
	bgt	.L5
.L6:
	mov	r2, r6
	mov	r1, r5
	mov	r0, r7
	bl	ws_fifos
	b	.L8
.L16:
	ldr	r3, .L19+12
	ldr	r0, [r3]
	cmp	r0, #128
	beq	.L17
	bl	strerror
	mov	r1, r0
	ldr	r0, .L19+16
	bl	FATAL
	b	.L2
.L17:
	ldr	r0, .L19+20
	bl	LOG
	b	.L2
.L4:
	ldr	r0, .L19+24
	bl	LOG
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	fdstate
	.word	.LC3
	.word	max_file_fd
	.word	errno
	.word	.LC1
	.word	.LC0
	.word	.LC2
	.size	ws_start, .-ws_start
	.comm	wsconfig,12,4
	.comm	max_file_fd,4,4
	.comm	fdstate,8,4
	.comm	errno,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
