	.file	"extr_lwan-mod-lua.c_lua_handle_request.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	""
.LC1:
	.string	"Error from Lua script: %s"
	.text
	.p2align 4
	.type	lua_handle_request, @function
lua_handle_request:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	mov	rdi, rdx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	get_or_create_cache@PLT
	xor	edi, edi
	test	rax, rax
	mov	rbp, rax
	sete	dil
	call	UNLIKELY@PLT
	test	rax, rax
	je	.L2
.L14:
	mov	eax, DWORD PTR HTTP_INTERNAL_ERROR[rip]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR [r12]
	mov	rdi, rbp
	lea	rdx, .LC0[rip]
	mov	esi, DWORD PTR [rax]
	call	cache_coro_get_and_ref_entry@PLT
	xor	edi, edi
	test	rax, rax
	mov	rbp, rax
	sete	dil
	call	UNLIKELY@PLT
	test	rax, rax
	jne	.L15
	mov	rax, QWORD PTR [r12]
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, DWORD PTR [rax]
	call	push_newthread@PLT
	xor	edi, edi
	test	rax, rax
	mov	rbp, rax
	sete	dil
	call	UNLIKELY@PLT
	test	rax, rax
	jne	.L14
	mov	rdi, rbp
	mov	rsi, r12
	call	get_handler_function@PLT
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	UNLIKELY@PLT
	test	rax, rax
	jne	.L15
	mov	rsi, r12
	mov	rdi, rbp
	call	lwan_lua_state_push_request@PLT
	mov	eax, DWORD PTR [rbx]
	mov	esi, 1
	mov	DWORD PTR 0[r13], eax
.L9:
	mov	rdi, rbp
	call	lua_resume@PLT
	test	eax, eax
	je	.L7
	cmp	eax, 128
	je	.L17
	mov	rdi, rbp
	mov	esi, -1
	call	lua_tostring@PLT
	lea	rdi, .LC1[rip]
	mov	esi, eax
	call	lwan_status_error@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	mov	eax, DWORD PTR HTTP_NOT_FOUND[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rax, QWORD PTR [r12]
	mov	esi, DWORD PTR CONN_CORO_YIELD[rip]
	mov	edi, DWORD PTR [rax]
	call	coro_yield@PLT
	xor	esi, esi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	mov	esi, -1
	mov	rdi, rbp
	call	lua_isnil@PLT
	test	eax, eax
	je	.L10
	mov	eax, DWORD PTR HTTP_OK[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	esi, -1
	mov	rdi, rbp
	call	lua_isnumber@PLT
	test	eax, eax
	je	.L14
	mov	esi, -1
	mov	rdi, rbp
	call	lua_tointeger@PLT
	lea	edx, -100[rax]
	cmp	edx, 899
	ja	.L14
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	lua_handle_request, .-lua_handle_request
	.comm	HTTP_OK,4,4
	.comm	HTTP_NOT_FOUND,4,4
	.comm	HTTP_INTERNAL_ERROR,4,4
	.comm	CONN_CORO_YIELD,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_lwan-mod-lua.c_lua_handle_request.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"Error from Lua script: %s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lua_handle_request, %function
lua_handle_request:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	mov	r0, r2
	mov	r5, r2
	mov	r7, r1
	bl	get_or_create_cache
	mov	r4, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	UNLIKELY
	cmp	r0, #0
	beq	.L2
.L15:
	ldr	r3, .L19
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, [r6]
	mov	r0, r4
	ldr	r1, [r3]
	ldr	r2, .L19+4
	bl	cache_coro_get_and_ref_entry
	mov	r4, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	UNLIKELY
	cmp	r0, #0
	bne	.L16
	ldr	r3, [r6]
	ldr	r0, [r4]
	ldr	r1, [r3]
	bl	push_newthread
	mov	r4, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	UNLIKELY
	cmp	r0, #0
	bne	.L15
	mov	r1, r6
	mov	r0, r4
	bl	get_handler_function
	clz	r0, r0
	lsr	r0, r0, #5
	bl	UNLIKELY
	cmp	r0, #0
	bne	.L16
	mov	r1, r6
	mov	r0, r4
	bl	lwan_lua_state_push_request
	mov	r1, #1
	ldr	r3, [r5]
	ldr	r5, .L19+8
	str	r3, [r7]
.L9:
	mov	r0, r4
	bl	lua_resume
	cmp	r0, #0
	beq	.L7
	cmp	r0, #128
	beq	.L18
	mov	r0, r4
	mvn	r1, #0
	bl	lua_tostring
	mov	r1, r0
	ldr	r0, .L19+12
	bl	lwan_status_error
	b	.L15
.L16:
	ldr	r3, .L19+16
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L18:
	ldr	r3, [r6]
	ldr	r1, [r5]
	ldr	r0, [r3]
	bl	coro_yield
	mov	r1, #0
	b	.L9
.L7:
	mvn	r1, #0
	mov	r0, r4
	bl	lua_isnil
	cmp	r0, #0
	beq	.L10
	ldr	r3, .L19+20
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	mvn	r1, #0
	mov	r0, r4
	bl	lua_isnumber
	cmp	r0, #0
	beq	.L15
	mov	r0, r4
	mvn	r1, #0
	bl	lua_tointeger
	sub	r3, r0, #100
	cmp	r3, #900
	bcs	.L15
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	.align	2
.L19:
	.word	HTTP_INTERNAL_ERROR
	.word	.LC0
	.word	CONN_CORO_YIELD
	.word	.LC1
	.word	HTTP_NOT_FOUND
	.word	HTTP_OK
	.size	lua_handle_request, .-lua_handle_request
	.comm	HTTP_OK,4,4
	.comm	HTTP_NOT_FOUND,4,4
	.comm	HTTP_INTERNAL_ERROR,4,4
	.comm	CONN_CORO_YIELD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
