	.file	"extr_httpd_main.c_httpd_stop.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"sent control msg to stop server"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"server stopped"
	.text
	.p2align 4
	.globl	httpd_stop
	.type	httpd_stop, @function
httpd_stop:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR ESP_ERR_INVALID_ARG[rip]
	test	rdi, rdi
	jne	.L22
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L23
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	lea	r12, 4[rsp]
	mov	rbp, rdi
	xor	esi, esi
	mov	edx, 4
	mov	rdi, r12
	call	memset@PLT
	mov	esi, DWORD PTR 32[rbp]
	mov	edi, DWORD PTR 48[rbp]
	mov	ecx, 4
	mov	eax, DWORD PTR HTTPD_CTRL_SHUTDOWN[rip]
	mov	rdx, r12
	mov	DWORD PTR 4[rsp], eax
	call	cs_send_to_ctrl_sock@PLT
	lea	rdi, .LC0[rip]
	call	LOG_FMT@PLT
	mov	edi, DWORD PTR TAG[rip]
	mov	esi, eax
	call	ESP_LOGD@PLT
	mov	rax, QWORD PTR 40[rbp]
	cmp	QWORD PTR THREAD_STOPPED[rip], rax
	je	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, 100
	call	httpd_os_thread_sleep@PLT
	mov	rax, QWORD PTR THREAD_STOPPED[rip]
	cmp	QWORD PTR 40[rbp], rax
	jne	.L5
.L4:
	mov	rdi, QWORD PTR 16[rbp]
	test	rdi, rdi
	je	.L6
	mov	rax, QWORD PTR 24[rbp]
	test	rax, rax
	je	.L7
	call	rax
.L8:
	mov	QWORD PTR 16[rbp], 0
.L6:
	mov	rdi, QWORD PTR 0[rbp]
	test	rdi, rdi
	je	.L9
	mov	rax, QWORD PTR 8[rbp]
	test	rax, rax
	je	.L10
	call	rax
.L11:
	mov	QWORD PTR 0[rbp], 0
.L9:
	lea	rdi, .LC1[rip]
	call	LOG_FMT@PLT
	mov	edi, DWORD PTR TAG[rip]
	mov	esi, eax
	call	ESP_LOGD@PLT
	mov	rdi, rbp
	call	httpd_delete@PLT
	mov	eax, DWORD PTR ESP_OK[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	call	free@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L10:
	call	free@PLT
	jmp	.L11
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	httpd_stop, .-httpd_stop
	.comm	THREAD_STOPPED,8,8
	.comm	TAG,4,4
	.comm	HTTPD_CTRL_SHUTDOWN,4,4
	.comm	ESP_OK,4,4
	.comm	ESP_ERR_INVALID_ARG,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_httpd_main.c_httpd_stop.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"sent control msg to stop server\000"
	.align	2
.LC1:
	.ascii	"server stopped\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	httpd_stop
	.syntax unified
	.arm
	.fpu softvfp
	.type	httpd_stop, %function
httpd_stop:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L23
	sub	sp, sp, #12
	subs	r4, r0, #0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bne	.L2
	ldr	r3, .L23+4
	ldr	r0, [r3]
.L1:
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L2:
	ldr	r3, .L23+8
	mov	r2, sp
	ldr	r0, [r3]
	ldr	r1, [r4, #16]
	mov	r3, #4
	str	r0, [sp]
	ldr	r6, .L23+12
	ldr	r0, [r4, #24]
	bl	cs_send_to_ctrl_sock
	ldr	r0, .L23+16
	ldr	r7, [r6]
	bl	LOG_FMT
	ldr	r5, .L23+20
	mov	r1, r0
	mov	r0, r7
	bl	ESP_LOGD
	ldr	r2, [r5]
	ldr	r3, [r4, #20]
	cmp	r2, r3
	beq	.L4
.L5:
	mov	r0, #100
	bl	httpd_os_thread_sleep
	ldr	r2, [r4, #20]
	ldr	r3, [r5]
	cmp	r2, r3
	bne	.L5
.L4:
	ldr	r0, [r4, #8]
	cmp	r0, #0
	beq	.L6
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L7
	blx	r3
.L8:
	mov	r3, #0
	str	r3, [r4, #8]
.L6:
	ldr	r0, [r4]
	cmp	r0, #0
	beq	.L9
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L10
	blx	r3
.L11:
	mov	r3, #0
	str	r3, [r4]
.L9:
	ldr	r0, .L23+24
	ldr	r5, [r6]
	bl	LOG_FMT
	mov	r1, r0
	mov	r0, r5
	bl	ESP_LOGD
	mov	r0, r4
	bl	httpd_delete
	ldr	r3, .L23+28
	ldr	r0, [r3]
	b	.L1
.L7:
	bl	free
	b	.L8
.L10:
	bl	free
	b	.L11
.L22:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	.LC2
	.word	ESP_ERR_INVALID_ARG
	.word	HTTPD_CTRL_SHUTDOWN
	.word	TAG
	.word	.LC0
	.word	THREAD_STOPPED
	.word	.LC1
	.word	ESP_OK
	.size	httpd_stop, .-httpd_stop
	.comm	THREAD_STOPPED,4,4
	.comm	TAG,4,4
	.comm	HTTPD_CTRL_SHUTDOWN,4,4
	.comm	ESP_OK,4,4
	.comm	ESP_ERR_INVALID_ARG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
