	.file	"extr_mqtt.c_mqtt_socket_unsubscribe.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"enter mqtt_socket_unsubscribe.\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"mqtt.socket"
.LC2:
	.string	"mqtt.socket expected"
.LC3:
	.string	"userdata is nil.\n"
.LC4:
	.string	"mud->pesp_conn is NULL.\n"
.LC5:
	.string	"not connected"
.LC6:
	.string	"unsubscribe table\n"
.LC7:
	.string	"topic: %s - length: %d\n"
	.section	.rodata.str1.8
	.align 8
.LC8:
	.string	"buffer overflow, can't enqueue all unsubscriptions"
	.section	.rodata.str1.1
.LC9:
	.string	"no topics found"
.LC10:
	.string	"unsubscribe string\n"
.LC11:
	.string	"need topic name"
	.section	.rodata.str1.8
	.align 8
.LC12:
	.string	"topic: %s - id: %d - qos: %d, length: %d\n"
	.align 8
.LC13:
	.string	"msg_size: %d, event_timeout: %d\n"
	.section	.rodata.str1.1
.LC14:
	.string	"unsubscribe, queue size: %d\n"
	.section	.rodata.str1.8
	.align 8
.LC15:
	.string	"leave mqtt_socket_unsubscribe.\n"
	.text
	.p2align 4
	.type	mqtt_socket_unsubscribe, @function
mqtt_socket_unsubscribe:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rdi
	lea	rdi, .LC0[rip]
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	call	NODE_DBG@PLT
	lea	rdx, .LC1[rip]
	mov	rdi, r12
	mov	esi, 1
	mov	DWORD PTR -68[rbp], 0
	call	luaL_checkudata@PLT
	mov	rdi, r12
	mov	edx, 1
	lea	rcx, .LC2[rip]
	mov	r14, rax
	mov	rsi, rax
	call	luaL_argcheck@PLT
	lea	rdi, .LC3[rip]
	test	r14, r14
	je	.L27
	cmp	QWORD PTR 8[r14], 0
	je	.L29
	mov	eax, DWORD PTR 24[r14]
	test	eax, eax
	je	.L30
	movsx	rax, DWORD PTR MQTT_BUF_SIZE[rip]
	mov	rbx, rsp
	mov	r8, rax
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rbx, rax
	and	rdx, -16
	mov	rax, rbx
	cmp	rsp, rax
	je	.L7
.L31:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L31
.L7:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L8
	or	QWORD PTR -8[rsp+rdx], 0
.L8:
	lea	r15, 4[r14]
	mov	rsi, rsp
	mov	edx, r8d
	mov	rdi, r15
	call	mqtt_msg_init@PLT
	mov	esi, 2
	mov	rdi, r12
	call	lua_istable@PLT
	test	rax, rax
	je	.L9
	lea	rdi, .LC6[rip]
	xor	eax, eax
	xor	ebx, ebx
	call	NODE_DBG@PLT
	mov	rdi, r12
	call	lua_pushnil@PLT
	lea	rax, -68[rbp]
	mov	QWORD PTR -96[rbp], rax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rsi, r13
	mov	rdi, r15
	add	ebx, 1
	call	mqtt_msg_unsubscribe_topic@PLT
	mov	rsi, r13
	lea	rdi, .LC7[rip]
	mov	rdx, QWORD PTR [rax]
	mov	QWORD PTR -88[rbp], rax
	xor	eax, eax
	call	NODE_DBG@PLT
	mov	rcx, QWORD PTR -88[rbp]
	mov	esi, 1
	mov	rdi, r12
	cmp	QWORD PTR [rcx], 0
	je	.L32
	call	lua_pop@PLT
.L10:
	mov	esi, 2
	mov	rdi, r12
	call	lua_next@PLT
	test	rax, rax
	je	.L33
	mov	esi, -2
	mov	rdi, r12
	call	luaL_checkstring@PLT
	mov	r13, rax
	test	ebx, ebx
	jne	.L11
	mov	rsi, QWORD PTR -96[rbp]
	mov	rdi, r15
	call	mqtt_msg_unsubscribe_init@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L30:
	lea	rsi, .LC5[rip]
	mov	rdi, r12
	call	luaL_error@PLT
	xor	esi, esi
	mov	rdi, r12
	call	lua_pushboolean@PLT
	mov	eax, 1
.L1:
	mov	rbx, QWORD PTR -56[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L34
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L29:
	.cfi_restore_state
	lea	rdi, .LC4[rip]
.L27:
	xor	eax, eax
	call	NODE_DBG@PLT
	xor	esi, esi
	mov	rdi, r12
	call	lua_pushboolean@PLT
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	lea	rdi, .LC10[rip]
	xor	eax, eax
	call	NODE_DBG@PLT
	lea	rdx, -64[rbp]
	mov	esi, 2
	mov	rdi, r12
	call	luaL_checklstring@PLT
	mov	r13, rax
	test	rax, rax
	je	.L35
	mov	rdi, r15
	lea	rdx, -68[rbp]
	mov	rsi, rax
	call	mqtt_msg_unsubscribe@PLT
	mov	r15, rax
.L15:
	mov	esi, 3
	mov	rdi, r12
	call	lua_type@PLT
	cmp	rax, QWORD PTR LUA_TFUNCTION[rip]
	je	.L19
	mov	esi, 3
	mov	rdi, r12
	call	lua_type@PLT
	cmp	rax, QWORD PTR LUA_TLIGHTFUNCTION[rip]
	je	.L19
.L18:
	mov	edi, DWORD PTR 8[r15]
	call	mqtt_get_qos@PLT
	mov	edx, DWORD PTR -68[rbp]
	mov	rsi, r15
	mov	rdi, r14
	mov	ecx, DWORD PTR MQTT_MSG_TYPE_UNSUBSCRIBE[rip]
	mov	r8d, eax
	call	msg_enqueue@PLT
	mov	rsi, r13
	lea	rdi, .LC12[rip]
	mov	ecx, DWORD PTR 4[rax]
	mov	r8d, DWORD PTR [rax]
	mov	edx, DWORD PTR 8[rax]
	xor	eax, eax
	call	NODE_DBG@PLT
	mov	r13d, DWORD PTR 16[r14]
	mov	rdi, r14
	call	msg_size@PLT
	lea	rdi, .LC13[rip]
	mov	esi, eax
	mov	edx, r13d
	xor	eax, eax
	call	NODE_DBG@PLT
	mov	rdi, QWORD PTR 8[r14]
	call	mqtt_send_if_possible@PLT
	cmp	QWORD PTR ESPCONN_OK[rip], rax
	je	.L20
	xor	esi, esi
	mov	rdi, r12
	call	lua_pushboolean@PLT
.L21:
	mov	rdi, r14
	call	msg_size@PLT
	lea	rdi, .LC14[rip]
	mov	esi, eax
	xor	eax, eax
	call	NODE_DBG@PLT
	lea	rdi, .LC15[rip]
	xor	eax, eax
	call	NODE_DBG@PLT
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	esi, 3
	mov	rdi, r12
	call	lua_pushvalue@PLT
	mov	edx, DWORD PTR 20[r14]
	mov	esi, DWORD PTR LUA_REGISTRYINDEX[rip]
	mov	rdi, r12
	call	luaL_unref@PLT
	mov	esi, DWORD PTR LUA_REGISTRYINDEX[rip]
	mov	rdi, r12
	call	luaL_ref@PLT
	mov	DWORD PTR 20[r14], eax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L33:
	test	ebx, ebx
	je	.L36
	mov	rdi, r15
	call	mqtt_msg_unsubscribe_fini@PLT
	cmp	QWORD PTR [rax], 0
	mov	r15, rax
	jne	.L15
	lea	rsi, .LC8[rip]
	mov	rdi, r12
	call	luaL_error@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L32:
	call	lua_pop@PLT
	lea	rsi, .LC8[rip]
	mov	rdi, r12
	call	luaL_error@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	esi, 1
	mov	rdi, r12
	call	lua_pushboolean@PLT
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L36:
	lea	rsi, .LC9[rip]
	mov	rdi, r12
	call	luaL_error@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L35:
	lea	rsi, .LC11[rip]
	mov	rdi, r12
	call	luaL_error@PLT
	jmp	.L1
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mqtt_socket_unsubscribe, .-mqtt_socket_unsubscribe
	.comm	MQTT_MSG_TYPE_UNSUBSCRIBE,4,4
	.comm	MQTT_BUF_SIZE,4,4
	.comm	LUA_TLIGHTFUNCTION,8,8
	.comm	LUA_TFUNCTION,8,8
	.comm	LUA_REGISTRYINDEX,4,4
	.comm	ESPCONN_OK,8,8
	.comm	ESPCONN_IF,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_mqtt.c_mqtt_socket_unsubscribe.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"enter mqtt_socket_unsubscribe.\012\000"
	.align	2
.LC1:
	.ascii	"mqtt.socket\000"
	.align	2
.LC2:
	.ascii	"mqtt.socket expected\000"
	.align	2
.LC3:
	.ascii	"userdata is nil.\012\000"
	.align	2
.LC4:
	.ascii	"mud->pesp_conn is NULL.\012\000"
	.align	2
.LC5:
	.ascii	"not connected\000"
	.align	2
.LC6:
	.ascii	"unsubscribe table\012\000"
	.align	2
.LC7:
	.ascii	"topic: %s - length: %d\012\000"
	.align	2
.LC8:
	.ascii	"buffer overflow, can't enqueue all unsubscriptions\000"
	.align	2
.LC9:
	.ascii	"no topics found\000"
	.align	2
.LC10:
	.ascii	"unsubscribe string\012\000"
	.align	2
.LC11:
	.ascii	"need topic name\000"
	.align	2
.LC12:
	.ascii	"topic: %s - id: %d - qos: %d, length: %d\012\000"
	.align	2
.LC13:
	.ascii	"msg_size: %d, event_timeout: %d\012\000"
	.align	2
.LC14:
	.ascii	"unsubscribe, queue size: %d\012\000"
	.align	2
.LC15:
	.ascii	"leave mqtt_socket_unsubscribe.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mqtt_socket_unsubscribe, %function
mqtt_socket_unsubscribe:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #28
	mov	r4, r0
	mov	r8, #0
	ldr	r3, .L30
	ldr	r0, .L30+4
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	NODE_DBG
	mov	r1, #1
	ldr	r2, .L30+8
	mov	r0, r4
	str	r8, [fp, #-48]
	bl	luaL_checkudata
	mov	r7, r0
	mov	r2, #1
	mov	r0, r4
	mov	r1, r7
	ldr	r3, .L30+12
	bl	luaL_argcheck
	cmp	r7, r8
	beq	.L22
	ldr	r6, [r7, #8]
	cmp	r6, #0
	beq	.L23
	ldr	r6, [r7, #20]
	cmp	r6, #0
	beq	.L24
	ldr	r3, .L30+16
	add	r9, r7, #4
	ldr	r2, [r3]
	mov	r0, r9
	lsl	r3, r2, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	add	r1, sp, #8
	bl	mqtt_msg_init
	mov	r1, #2
	mov	r0, r4
	bl	lua_istable
	cmp	r0, #0
	beq	.L6
	ldr	r0, .L30+20
	bl	NODE_DBG
	mov	r0, r4
	bl	lua_pushnil
	ldr	r10, .L30+24
	b	.L7
.L8:
	mov	r1, r5
	mov	r0, r9
	bl	mqtt_msg_unsubscribe_topic
	mov	r6, r0
	mov	r1, r5
	ldr	r2, [r0]
	mov	r0, r10
	bl	NODE_DBG
	ldr	r3, [r6]
	mov	r1, #1
	cmp	r3, #0
	mov	r0, r4
	add	r8, r8, #1
	beq	.L25
	bl	lua_pop
.L7:
	mov	r1, #2
	mov	r0, r4
	bl	lua_next
	cmp	r0, #0
	beq	.L26
	mvn	r1, #1
	mov	r0, r4
	bl	luaL_checkstring
	cmp	r8, #0
	mov	r5, r0
	bne	.L8
	mov	r0, r9
	sub	r1, fp, #48
	bl	mqtt_msg_unsubscribe_init
	b	.L8
.L24:
	ldr	r1, .L30+28
	mov	r0, r4
	bl	luaL_error
	mov	r1, r6
	mov	r0, r4
	bl	lua_pushboolean
	mov	r0, #1
.L1:
	ldr	r3, .L30
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	ldr	r0, .L30+32
	bl	NODE_DBG
	mov	r1, #2
	mov	r0, r4
	sub	r2, fp, #44
	bl	luaL_checklstring
	subs	r5, r0, #0
	beq	.L28
	mov	r0, r9
	mov	r1, r5
	sub	r2, fp, #48
	bl	mqtt_msg_unsubscribe
	mov	r6, r0
.L12:
	mov	r1, #3
	mov	r0, r4
	bl	lua_type
	ldr	r3, .L30+36
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L16
	mov	r1, #3
	mov	r0, r4
	bl	lua_type
	ldr	r3, .L30+40
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L16
.L15:
	ldr	r3, .L30+44
	ldr	r0, [r6, #4]
	ldr	r9, [r3]
	ldr	r8, [fp, #-48]
	bl	mqtt_get_qos
	mov	r3, r9
	mov	r2, r8
	mov	r1, r6
	str	r0, [sp]
	mov	r0, r7
	bl	msg_enqueue
	ldr	r3, [r0, #4]
	ldr	r2, [r0, #8]
	ldr	r0, [r0]
	mov	r1, r5
	str	r0, [sp]
	ldr	r0, .L30+48
	bl	NODE_DBG
	mov	r0, r7
	bl	msg_size
	ldr	r2, [r7, #12]
	mov	r1, r0
	ldr	r0, .L30+52
	bl	NODE_DBG
	ldr	r0, [r7, #8]
	bl	mqtt_send_if_possible
	ldr	r3, .L30+56
	ldr	r3, [r3]
	cmp	r3, r0
	movne	r1, #0
	moveq	r1, #1
	mov	r0, r4
	bl	lua_pushboolean
	mov	r0, r7
	bl	msg_size
	mov	r1, r0
	ldr	r0, .L30+60
	bl	NODE_DBG
	ldr	r0, .L30+64
	bl	NODE_DBG
	mov	r0, #1
	b	.L1
.L22:
	ldr	r0, .L30+68
	bl	NODE_DBG
	mov	r1, r7
	mov	r0, r4
	bl	lua_pushboolean
	mov	r0, #1
	b	.L1
.L16:
	ldr	r8, .L30+72
	mov	r1, #3
	mov	r0, r4
	bl	lua_pushvalue
	ldr	r1, [r8]
	ldr	r2, [r7, #16]
	mov	r0, r4
	bl	luaL_unref
	mov	r0, r4
	ldr	r1, [r8]
	bl	luaL_ref
	str	r0, [r7, #16]
	b	.L15
.L26:
	cmp	r8, #0
	beq	.L29
	mov	r0, r9
	bl	mqtt_msg_unsubscribe_fini
	ldr	r3, [r0]
	mov	r6, r0
	cmp	r3, #0
	bne	.L12
	mov	r0, r4
	ldr	r1, .L30+76
	bl	luaL_error
	b	.L1
.L25:
	bl	lua_pop
	mov	r0, r4
	ldr	r1, .L30+76
	bl	luaL_error
	b	.L1
.L23:
	ldr	r0, .L30+80
	bl	NODE_DBG
	mov	r1, r6
	mov	r0, r4
	bl	lua_pushboolean
	mov	r0, #1
	b	.L1
.L28:
	mov	r0, r4
	ldr	r1, .L30+84
	bl	luaL_error
	b	.L1
.L29:
	mov	r0, r4
	ldr	r1, .L30+88
	bl	luaL_error
	b	.L1
.L27:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	.LC16
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	MQTT_BUF_SIZE
	.word	.LC6
	.word	.LC7
	.word	.LC5
	.word	.LC10
	.word	LUA_TFUNCTION
	.word	LUA_TLIGHTFUNCTION
	.word	MQTT_MSG_TYPE_UNSUBSCRIBE
	.word	.LC12
	.word	.LC13
	.word	ESPCONN_OK
	.word	.LC14
	.word	.LC15
	.word	.LC3
	.word	LUA_REGISTRYINDEX
	.word	.LC8
	.word	.LC4
	.word	.LC11
	.word	.LC9
	.size	mqtt_socket_unsubscribe, .-mqtt_socket_unsubscribe
	.comm	MQTT_MSG_TYPE_UNSUBSCRIBE,4,4
	.comm	MQTT_BUF_SIZE,4,4
	.comm	LUA_TLIGHTFUNCTION,4,4
	.comm	LUA_TFUNCTION,4,4
	.comm	LUA_REGISTRYINDEX,4,4
	.comm	ESPCONN_OK,4,4
	.comm	ESPCONN_IF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
