	.file	"extr_websocketclient.c_ws_connect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"/"
.LC1:
	.string	"ws_connect called\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"ws_connect ws_info argument is null!"
	.section	.rodata.str1.1
.LC3:
	.string	"url is null!"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"Failed to extract protocol from: %s\n"
	.section	.rodata.str1.1
.LC5:
	.string	"Hostname too large"
.LC6:
	.string	"Invalid port number\n"
.LC7:
	.string	"Failed to extract hostname\n"
.LC8:
	.string	"secure protocol = %d\n"
.LC9:
	.string	"hostname = %s\n"
.LC10:
	.string	"port = %d\n"
.LC11:
	.string	"path = %s\n"
.LC12:
	.string	"DNS pending\n"
	.text
	.p2align 4
	.globl	ws_connect
	.type	ws_connect, @function
ws_connect:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	lea	rdi, .LC1[rip]
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 312
	.cfi_def_cfa_offset 368
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 296[rsp], rax
	xor	eax, eax
	call	NODE_DBG@PLT
	test	rbp, rbp
	je	.L37
	test	r12, r12
	je	.L38
	mov	r13, QWORD PTR PROTOCOL_SECURE[rip]
	mov	rdi, r13
	call	strlen@PLT
	mov	rsi, r13
	mov	rdi, r12
	mov	rdx, rax
	call	strncasecmp@PLT
	mov	rbx, rax
	test	rax, rax
	jne	.L5
	mov	rdi, QWORD PTR PROTOCOL_SECURE[rip]
	call	strlen@PLT
	add	r12, rax
.L6:
	mov	esi, 47
	mov	rdi, r12
	call	strchr@PLT
	mov	r13, rax
	test	rax, rax
	je	.L9
	mov	r15, rax
	sub	r15, r12
	cmp	r15, 255
	ja	.L39
	lea	r14, 32[rsp]
	mov	rdx, r15
	mov	rsi, r12
	mov	rdi, r14
	call	memcpy@PLT
	mov	BYTE PTR 32[rsp+r15], 0
.L12:
	mov	esi, 58
	mov	rdi, r14
	call	strchr@PLT
	test	rax, rax
	je	.L13
	lea	rdi, 1[rax]
	mov	QWORD PTR 8[rsp], rax
	call	atoi@PLT
	mov	r15d, eax
	test	eax, eax
	jle	.L14
	cmp	DWORD PTR PORT_MAX_VALUE[rip], eax
	mov	r8, QWORD PTR 8[rsp]
	mov	r12, r14
	jl	.L14
.L16:
	mov	edx, DWORD PTR [r12]
	add	r12, 4
	lea	eax, -16843009[rdx]
	not	edx
	and	eax, edx
	and	eax, -2139062144
	je	.L16
	mov	edx, eax
	mov	rdi, r8
	shr	edx, 16
	test	eax, 32896
	cmove	eax, edx
	lea	rdx, 2[r12]
	cmove	r12, rdx
	mov	ecx, eax
	add	cl, al
	sbb	r12, 3
	call	strlen@PLT
	sub	r12, r14
	sub	r12, rax
	mov	BYTE PTR 32[rsp+r12], 0
	cmp	BYTE PTR 32[rsp], 0
	je	.L40
.L20:
	test	rbx, rbx
	lea	rdi, .LC8[rip]
	sete	bl
	xor	eax, eax
	movzx	ebx, bl
	mov	esi, ebx
	call	NODE_DBG@PLT
	mov	rsi, r14
	lea	rdi, .LC9[rip]
	xor	eax, eax
	call	NODE_DBG@PLT
	mov	esi, r15d
	lea	rdi, .LC10[rip]
	xor	eax, eax
	call	NODE_DBG@PLT
	mov	rsi, r13
	lea	rdi, .LC11[rip]
	xor	eax, eax
	call	NODE_DBG@PLT
	mov	DWORD PTR 4[rbp], ebx
	mov	rdi, r14
	mov	DWORD PTR 0[rbp], 1
	call	strdup@PLT
	mov	DWORD PTR 8[rbp], r15d
	mov	rdi, r13
	mov	QWORD PTR 96[rbp], rax
	call	strdup@PLT
	mov	QWORD PTR 80[rbp], 0
	mov	esi, 24
	mov	edi, 1
	mov	QWORD PTR 88[rbp], rax
	mov	QWORD PTR 72[rbp], 0
	mov	QWORD PTR 64[rbp], 0
	mov	QWORD PTR 56[rbp], 0
	mov	QWORD PTR 48[rbp], 0
	mov	QWORD PTR 40[rbp], 0
	mov	QWORD PTR 32[rbp], 0
	mov	QWORD PTR 24[rbp], 0
	call	calloc@PLT
	mov	esi, 8
	mov	edi, 1
	mov	r12, rax
	mov	eax, DWORD PTR ESPCONN_TCP[rip]
	mov	DWORD PTR 20[r12], eax
	mov	eax, DWORD PTR ESPCONN_NONE[rip]
	mov	DWORD PTR 16[r12], eax
	call	calloc@PLT
	mov	QWORD PTR 8[r12], rax
	mov	rbx, rax
	xor	eax, eax
	call	espconn_port@PLT
	mov	edx, DWORD PTR 8[rbp]
	mov	rsi, r14
	mov	rdi, r12
	mov	DWORD PTR 4[rbx], eax
	mov	rax, QWORD PTR 8[r12]
	mov	rcx, QWORD PTR dns_callback@GOTPCREL[rip]
	mov	DWORD PTR [rax], edx
	mov	QWORD PTR [r12], rbp
	mov	QWORD PTR 16[rbp], r12
	lea	rbp, 28[rsp]
	mov	rdx, rbp
	call	espconn_gethostbyname@PLT
	cmp	QWORD PTR ESPCONN_INPROGRESS[rip], rax
	je	.L41
	mov	rdx, r12
	mov	rsi, rbp
	mov	rdi, r14
	call	dns_callback@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 296[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L42
	add	rsp, 312
	.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
.L5:
	.cfi_restore_state
	mov	r13, QWORD PTR PROTOCOL_INSECURE[rip]
	mov	rdi, r13
	call	strlen@PLT
	mov	rsi, r13
	mov	rdi, r12
	mov	rdx, rax
	call	strncasecmp@PLT
	test	rax, rax
	jne	.L43
	mov	rdi, QWORD PTR PROTOCOL_INSECURE[rip]
	call	strlen@PLT
	add	r12, rax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L13:
	test	rbx, rbx
	mov	r15d, DWORD PTR PORT_SECURE[rip]
	cmovne	r15d, DWORD PTR PORT_INSECURE[rip]
	cmp	BYTE PTR 32[rsp], 0
	jne	.L20
.L40:
	lea	rdi, .LC7[rip]
	xor	eax, eax
	call	NODE_DBG@PLT
	mov	rax, QWORD PTR 104[rbp]
	test	rax, rax
	je	.L1
	mov	esi, -4
	mov	rdi, rbp
	call	rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L41:
	lea	rdi, .LC12[rip]
	xor	eax, eax
	call	NODE_DBG@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	NODE_DBG@PLT
	mov	rax, QWORD PTR 104[rbp]
	test	rax, rax
	je	.L1
	mov	esi, -3
	mov	rdi, rbp
	call	rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L39:
	lea	rdi, .LC5[rip]
	xor	eax, eax
	call	NODE_DBG@PLT
	mov	rax, QWORD PTR 104[rbp]
	test	rax, rax
	je	.L1
	mov	esi, -2
	mov	rdi, rbp
	call	rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L38:
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	NODE_DBG@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, r12
	lea	r14, 32[rsp]
	lea	r13, .LC0[rip]
	call	strlen@PLT
	mov	rsi, r12
	mov	rdi, r14
	mov	rdx, rax
	call	memcpy@PLT
	mov	rdi, r12
	call	strlen@PLT
	mov	BYTE PTR 32[rsp+rax], 0
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L37:
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	NODE_DBG@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L43:
	mov	rsi, r12
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	NODE_DBG@PLT
	mov	rax, QWORD PTR 104[rbp]
	test	rax, rax
	je	.L1
	mov	esi, -1
	mov	rdi, rbp
	call	rax
	jmp	.L1
.L42:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ws_connect, .-ws_connect
	.comm	PROTOCOL_SECURE,8,8
	.comm	PROTOCOL_INSECURE,8,8
	.comm	PORT_SECURE,4,4
	.comm	PORT_MAX_VALUE,4,4
	.comm	PORT_INSECURE,4,4
	.comm	ESPCONN_TCP,4,4
	.comm	ESPCONN_NONE,4,4
	.comm	ESPCONN_INPROGRESS,8,8
	.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_websocketclient.c_ws_connect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"/\000"
	.align	2
.LC1:
	.ascii	"ws_connect called\012\000"
	.align	2
.LC2:
	.ascii	"ws_connect ws_info argument is null!\000"
	.align	2
.LC3:
	.ascii	"url is null!\000"
	.align	2
.LC4:
	.ascii	"Failed to extract protocol from: %s\012\000"
	.align	2
.LC5:
	.ascii	"Hostname too large\000"
	.align	2
.LC6:
	.ascii	"Invalid port number\012\000"
	.align	2
.LC7:
	.ascii	"Failed to extract hostname\012\000"
	.align	2
.LC8:
	.ascii	"secure protocol = %d\012\000"
	.align	2
.LC9:
	.ascii	"hostname = %s\012\000"
	.align	2
.LC10:
	.ascii	"port = %d\012\000"
	.align	2
.LC11:
	.ascii	"path = %s\012\000"
	.align	2
.LC12:
	.ascii	"DNS pending\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ws_connect
	.syntax unified
	.arm
	.fpu softvfp
	.type	ws_connect, %function
ws_connect:
	@ args = 0, pretend = 0, frame = 264
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	ldr	r3, .L38
	sub	sp, sp, #264
	ldr	r0, .L38+4
	mov	r5, r1
	ldr	r3, [r3]
	str	r3, [sp, #260]
	mov	r3,#0
	bl	NODE_DBG
	cmp	r4, #0
	beq	.L32
	cmp	r5, #0
	beq	.L33
	ldr	r3, .L38+8
	ldr	r6, [r3]
	mov	r0, r6
	bl	strlen
	mov	r1, r6
	mov	r2, r0
	mov	r7, r0
	mov	r0, r5
	bl	strncasecmp
	subs	r6, r0, #0
	bne	.L5
.L7:
	add	r5, r5, r7
	mov	r1, #47
	mov	r0, r5
	bl	strchr
	subs	r7, r0, #0
	beq	.L9
	sub	r8, r7, r5
	cmp	r8, #255
	bhi	.L34
	add	r9, sp, #4
	mov	r2, r8
	mov	r1, r5
	mov	r0, r9
	bl	memcpy
	mov	r3, #0
	add	r2, sp, #264
	add	r8, r2, r8
	strb	r3, [r8, #-260]
.L12:
	mov	r1, #58
	mov	r0, r9
	bl	strchr
	subs	r5, r0, #0
	beq	.L13
	add	r0, r5, #1
	bl	atoi
	subs	r8, r0, #0
	ble	.L14
	ldr	r3, .L38+12
	ldr	r3, [r3]
	cmp	r3, r8
	blt	.L14
	mov	r0, r9
	bl	strlen
	mov	r3, r0
	mov	r0, r5
	mov	r5, r3
	bl	strlen
	mov	r3, #0
	sub	r5, r5, r0
	add	r2, sp, #264
	add	r5, r2, r5
	strb	r3, [r5, #-260]
	ldrb	r3, [sp, #4]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L18
.L36:
	ldr	r0, .L38+16
	bl	NODE_DBG
	ldr	r3, [r4, #56]
	cmp	r3, #0
	beq	.L1
	mov	r0, r4
	mvn	r1, #3
	blx	r3
.L1:
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [sp, #260]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L35
	add	sp, sp, #264
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	ldr	r3, .L38+20
	ldr	r8, [r3]
	mov	r0, r8
	bl	strlen
	mov	r1, r8
	mov	r2, r0
	mov	r7, r0
	mov	r0, r5
	bl	strncasecmp
	cmp	r0, #0
	beq	.L7
	mov	r1, r5
	ldr	r0, .L38+24
	bl	NODE_DBG
	ldr	r3, [r4, #56]
	cmp	r3, #0
	beq	.L1
	mov	r0, r4
	mvn	r1, #0
	blx	r3
	b	.L1
.L34:
	ldr	r0, .L38+28
	bl	NODE_DBG
	ldr	r3, [r4, #56]
	cmp	r3, #0
	beq	.L1
	mov	r0, r4
	mvn	r1, #1
	blx	r3
	b	.L1
.L13:
	cmp	r6, #0
	ldreq	r3, .L38+32
	ldrne	r3, .L38+36
	ldr	r8, [r3]
	ldrb	r3, [sp, #4]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L36
.L18:
	clz	r6, r6
	mov	r10, #1
	lsr	r6, r6, #5
	mov	r1, r6
	ldr	r0, .L38+40
	bl	NODE_DBG
	mov	r1, r9
	ldr	r0, .L38+44
	bl	NODE_DBG
	mov	r1, r8
	ldr	r0, .L38+48
	bl	NODE_DBG
	mov	r1, r7
	ldr	r0, .L38+52
	bl	NODE_DBG
	str	r6, [r4, #4]
	mov	r0, r9
	str	r10, [r4]
	bl	strdup
	str	r8, [r4, #8]
	str	r0, [r4, #52]
	mov	r0, r7
	bl	strdup
	mov	r3, #0
	mov	r1, #16
	str	r0, [r4, #48]
	str	r3, [r4, #44]
	str	r3, [r4, #40]
	str	r3, [r4, #36]
	str	r3, [r4, #32]
	str	r3, [r4, #28]
	str	r3, [r4, #24]
	str	r3, [r4, #20]
	str	r3, [r4, #16]
	mov	r0, r10
	bl	calloc
	mov	r5, r0
	ldr	r2, .L38+56
	ldr	r3, .L38+60
	ldr	r2, [r2]
	ldr	r3, [r3]
	mov	r1, #8
	str	r2, [r5, #12]
	str	r3, [r5, #8]
	mov	r0, r10
	bl	calloc
	str	r0, [r5, #4]
	mov	r6, r0
	bl	espconn_port
	ldr	r3, [r5, #4]
	ldr	r2, [r4, #8]
	str	r0, [r6, #4]
	mov	r1, r9
	str	r2, [r3]
	mov	r0, r5
	ldr	r3, .L38+64
	mov	r2, sp
	str	r5, [r4, #12]
	str	r4, [r5]
	bl	espconn_gethostbyname
	ldr	r3, .L38+68
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L37
	mov	r2, r5
	mov	r1, sp
	mov	r0, r9
	bl	dns_callback
	b	.L1
.L37:
	ldr	r0, .L38+72
	bl	NODE_DBG
	b	.L1
.L14:
	ldr	r0, .L38+76
	bl	NODE_DBG
	ldr	r3, [r4, #56]
	cmp	r3, #0
	beq	.L1
	mov	r0, r4
	mvn	r1, #2
	blx	r3
	b	.L1
.L9:
	mov	r0, r5
	bl	strlen
	add	r9, sp, #4
	mov	r2, r0
	mov	r1, r5
	mov	r0, r9
	bl	memcpy
	mov	r0, r5
	bl	strlen
	add	r3, sp, #264
	add	r0, r3, r0
	strb	r7, [r0, #-260]
	ldr	r7, .L38+80
	b	.L12
.L32:
	ldr	r0, .L38+84
	bl	NODE_DBG
	b	.L1
.L33:
	ldr	r0, .L38+88
	bl	NODE_DBG
	b	.L1
.L35:
	bl	__stack_chk_fail
.L39:
	.align	2
.L38:
	.word	.LC13
	.word	.LC1
	.word	PROTOCOL_SECURE
	.word	PORT_MAX_VALUE
	.word	.LC7
	.word	PROTOCOL_INSECURE
	.word	.LC4
	.word	.LC5
	.word	PORT_SECURE
	.word	PORT_INSECURE
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	ESPCONN_TCP
	.word	ESPCONN_NONE
	.word	dns_callback
	.word	ESPCONN_INPROGRESS
	.word	.LC12
	.word	.LC6
	.word	.LC0
	.word	.LC2
	.word	.LC3
	.size	ws_connect, .-ws_connect
	.comm	PROTOCOL_SECURE,4,4
	.comm	PROTOCOL_INSECURE,4,4
	.comm	PORT_SECURE,4,4
	.comm	PORT_MAX_VALUE,4,4
	.comm	PORT_INSECURE,4,4
	.comm	ESPCONN_TCP,4,4
	.comm	ESPCONN_NONE,4,4
	.comm	ESPCONN_INPROGRESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
