	.file	"extr_websocket.c_ws_read_headers.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Connection"
.LC1:
	.string	"Upgrade"
.LC2:
	.string	"WebSocket"
.LC3:
	.string	"Sec-WebSocket-Protocol"
.LC4:
	.string	"Sec-WebSocket-Version"
.LC5:
	.string	"Sec-WebSocket-Key"
.LC6:
	.string	"Host"
	.text
	.p2align 4
	.globl	ws_read_headers
	.type	ws_read_headers, @function
ws_read_headers:
.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
	lea	r13, .LC0[rip]
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	r14, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	lea	r12, 32[rsp]
	lea	rbp, 24[rsp]
	mov	DWORD PTR 8[rsp], 0
	mov	DWORD PTR 12[rsp], 0
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rdi, QWORD PTR 32[rsp]
	lea	rsi, .LC2[rip]
	call	strcasecmp@PLT
	test	eax, eax
	sete	al
	movzx	eax, al
	mov	DWORD PTR 8[rsp], eax
.L4:
	mov	rdi, r15
	call	free@PLT
	mov	rdi, QWORD PTR 32[rsp]
	call	free@PLT
.L10:
	mov	rdx, r12
	mov	rsi, rbp
	mov	rdi, rbx
	call	ws_read_http_header@PLT
	test	rax, rax
	jne	.L2
	mov	r15, QWORD PTR 24[rsp]
	test	r15, r15
	je	.L2
	mov	rsi, r13
	mov	rdi, r15
	call	strcasecmp@PLT
	lea	rsi, .LC1[rip]
	test	eax, eax
	je	.L24
	mov	rdi, r15
	call	strcasecmp@PLT
	test	eax, eax
	je	.L25
	lea	rsi, .LC3[rip]
	mov	rdi, r15
	call	strcasecmp@PLT
	test	eax, eax
	je	.L26
	lea	rsi, .LC4[rip]
	mov	rdi, r15
	call	strcasecmp@PLT
	test	eax, eax
	je	.L27
	lea	rsi, .LC5[rip]
	mov	rdi, r15
	call	strcasecmp@PLT
	test	eax, eax
	je	.L28
	lea	rsi, .LC6[rip]
	mov	rdi, r15
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L4
	mov	rdi, QWORD PTR 16[r14]
	call	free@PLT
	mov	rdi, QWORD PTR 32[rsp]
	mov	esi, 58
	call	strrchr@PLT
	test	rax, rax
	je	.L9
	mov	BYTE PTR [rax], 0
.L9:
	mov	rdi, QWORD PTR 32[rsp]
	call	strdup@PLT
	mov	r15, QWORD PTR 24[rsp]
	mov	QWORD PTR 16[r14], rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdi, QWORD PTR 32[rsp]
	call	strcasestr@PLT
	mov	r15, QWORD PTR 24[rsp]
	test	rax, rax
	setne	al
	movzx	eax, al
	mov	DWORD PTR 12[rsp], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r15d, DWORD PTR 12[rsp]
	and	r15d, DWORD PTR 8[rsp]
	jne	.L29
.L11:
	mov	DWORD PTR 24[r14], r15d
	mov	eax, DWORD PTR WS_SUCCESS[rip]
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L30
	add	rsp, 56
	.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
.L26:
	.cfi_restore_state
	mov	rdi, QWORD PTR [r14]
	call	free@PLT
	mov	rdi, QWORD PTR 32[rsp]
	call	strdup@PLT
	mov	r15, QWORD PTR 24[rsp]
	mov	QWORD PTR [r14], rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rdi, QWORD PTR 32[rsp]
	xor	edx, edx
	xor	esi, esi
	call	strtol@PLT
	mov	r15, QWORD PTR 24[rsp]
	mov	DWORD PTR 28[r14], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L29:
	xor	r15d, r15d
	cmp	QWORD PTR 8[r14], 0
	setne	r15b
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rdi, QWORD PTR 8[r14]
	call	free@PLT
	mov	rdi, QWORD PTR 32[rsp]
	call	strdup@PLT
	mov	r15, QWORD PTR 24[rsp]
	mov	QWORD PTR 8[r14], rax
	jmp	.L4
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ws_read_headers, .-ws_read_headers
	.comm	WS_SUCCESS,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_read_headers.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Connection\000"
	.align	2
.LC1:
	.ascii	"Upgrade\000"
	.align	2
.LC2:
	.ascii	"WebSocket\000"
	.align	2
.LC3:
	.ascii	"Sec-WebSocket-Protocol\000"
	.align	2
.LC4:
	.ascii	"Sec-WebSocket-Version\000"
	.align	2
.LC5:
	.ascii	"Sec-WebSocket-Key\000"
	.align	2
.LC6:
	.ascii	"Host\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ws_read_headers
	.syntax unified
	.arm
	.fpu softvfp
	.type	ws_read_headers, %function
ws_read_headers:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, #0
	ldr	r3, .L31
	sub	sp, sp, #28
	mov	r6, r0
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r5, r4
	ldr	r9, [r0]
	ldr	r7, .L31+4
	ldr	r8, .L31+8
	ldr	r10, .L31+12
	b	.L10
.L25:
	ldr	r1, .L31+16
	ldr	r0, [sp, #16]
	bl	strcasecmp
	clz	r4, r0
	lsr	r4, r4, #5
.L4:
	mov	r0, fp
	bl	free
	ldr	r0, [sp, #16]
	bl	free
.L10:
	mov	r0, r6
	add	r2, sp, #16
	add	r1, sp, #12
	bl	ws_read_http_header
	cmp	r0, #0
	bne	.L2
	ldr	fp, [sp, #12]
	cmp	fp, #0
	beq	.L2
	mov	r1, r7
	mov	r0, fp
	bl	strcasecmp
	cmp	r0, #0
	mov	r1, r8
	beq	.L24
	mov	r0, fp
	bl	strcasecmp
	cmp	r0, #0
	beq	.L25
	mov	r1, r10
	mov	r0, fp
	bl	strcasecmp
	cmp	r0, #0
	beq	.L26
	mov	r0, fp
	ldr	r1, .L31+20
	bl	strcasecmp
	subs	r2, r0, #0
	beq	.L27
	mov	r0, fp
	ldr	r1, .L31+24
	bl	strcasecmp
	cmp	r0, #0
	beq	.L28
	mov	r0, fp
	ldr	r1, .L31+28
	bl	strcasecmp
	subs	r3, r0, #0
	bne	.L4
	ldr	r0, [r9, #8]
	str	r3, [sp, #4]
	bl	free
	mov	r1, #58
	ldr	r0, [sp, #16]
	bl	strrchr
	cmp	r0, #0
	ldrne	r3, [sp, #4]
	strbne	r3, [r0]
	ldr	r0, [sp, #16]
	bl	strdup
	ldr	fp, [sp, #12]
	str	r0, [r9, #8]
	b	.L4
.L24:
	ldr	r0, [sp, #16]
	bl	strcasestr
	subs	r5, r0, #0
	movne	r5, #1
	ldr	fp, [sp, #12]
	b	.L4
.L2:
	ands	r4, r5, r4
	bne	.L29
.L11:
	ldr	r3, .L31+32
	str	r4, [r9, #12]
	ldr	r0, [r3]
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L30
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L26:
	ldr	r0, [r9]
	bl	free
	ldr	r0, [sp, #16]
	bl	strdup
	ldr	fp, [sp, #12]
	str	r0, [r9]
	b	.L4
.L27:
	mov	r1, r2
	ldr	r0, [sp, #16]
	bl	strtol
	ldr	fp, [sp, #12]
	str	r0, [r9, #16]
	b	.L4
.L29:
	ldr	r4, [r9, #4]
	subs	r4, r4, #0
	movne	r4, #1
	b	.L11
.L28:
	ldr	r0, [r9, #4]
	bl	free
	ldr	r0, [sp, #16]
	bl	strdup
	ldr	fp, [sp, #12]
	str	r0, [r9, #4]
	b	.L4
.L30:
	bl	__stack_chk_fail
.L32:
	.align	2
.L31:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC3
	.word	.LC2
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	WS_SUCCESS
	.size	ws_read_headers, .-ws_read_headers
	.comm	WS_SUCCESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
