	.file	"extr_lpeg.c_matchl.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	matchl, @function
matchl:
.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
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR IMAXCAPTURES[rip]
	mov	rbx, rsp
	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	.L3
.L17:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L17
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L18
.L4:
	xor	edx, edx
	mov	esi, 1
	mov	rdi, r12
	mov	rbx, rsp
	call	getpatt@PLT
	mov	esi, DWORD PTR SUBJIDX[rip]
	lea	rdx, -64[rbp]
	mov	rdi, r12
	mov	r15, rax
	call	luaL_checklstring@PLT
	mov	rdi, r12
	mov	r13, rax
	call	lua_gettop@PLT
	mov	edx, 1
	mov	esi, 3
	mov	rdi, r12
	mov	r14d, eax
	call	luaL_optinteger@PLT
	test	rax, rax
	jle	.L5
	mov	rcx, QWORD PTR -64[rbp]
	lea	rdx, -1[r13+rax]
	lea	rsi, 0[r13+rcx]
	cmp	rax, rcx
	cmova	rdx, rsi
.L7:
	mov	rdi, r12
	mov	QWORD PTR -72[rbp], rdx
	call	lua_pushnil@PLT
	mov	rsi, rbx
	mov	rdi, r12
	call	lua_pushlightuserdata@PLT
	mov	esi, 1
	mov	rdi, r12
	call	lua_getfenv@PLT
	sub	rsp, 8
	mov	rcx, QWORD PTR -64[rbp]
	mov	r9, rbx
	push	r14
	mov	rdx, QWORD PTR -72[rbp]
	mov	r8, r15
	mov	rsi, r13
	add	rcx, r13
	mov	rdi, r12
	call	match@PLT
	mov	rdx, rax
	pop	rax
	pop	rcx
	test	rdx, rdx
	je	.L19
	mov	ecx, r14d
	mov	rsi, r13
	mov	rdi, r12
	call	getcaptures@PLT
.L1:
	mov	rbx, QWORD PTR -56[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L20
	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
.L5:
	.cfi_restore_state
	mov	rdx, QWORD PTR -64[rbp]
	mov	rcx, rax
	neg	rcx
	add	rax, rdx
	add	rax, r13
	cmp	rcx, rdx
	cmova	rax, r13
	mov	rdx, rax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, r12
	call	lua_pushnil@PLT
	mov	eax, 1
	jmp	.L1
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	matchl, .-matchl
	.comm	SUBJIDX,4,4
	.comm	IMAXCAPTURES,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_lpeg.c_matchl.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	matchl, %function
matchl:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #24
	ldr	r3, .L13
	mov	r2, #0
	ldr	r3, [r3]
	mov	r1, #1
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L13+4
	mov	r4, r0
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	getpatt
	ldr	r3, .L13+8
	sub	r2, fp, #36
	ldr	r1, [r3]
	mov	r8, r0
	mov	r0, r4
	bl	luaL_checklstring
	mov	r6, r0
	mov	r0, r4
	bl	lua_gettop
	mov	r2, #1
	mov	r7, r0
	mov	r1, #3
	mov	r0, r4
	bl	luaL_optinteger
	subs	r3, r0, #0
	add	r9, sp, #16
	ble	.L2
	ldr	r5, [fp, #-36]
	cmp	r3, r5
	subls	r0, r3, #1
	addhi	r5, r6, r5
	addls	r5, r6, r0
.L4:
	mov	r0, r4
	bl	lua_pushnil
	mov	r1, r9
	mov	r0, r4
	bl	lua_pushlightuserdata
	mov	r1, #1
	mov	r0, r4
	bl	lua_getfenv
	ldr	r3, [fp, #-36]
	mov	r2, r5
	mov	r1, r6
	mov	r0, r4
	stm	sp, {r8, r9}
	str	r7, [sp, #8]
	add	r3, r6, r3
	bl	match
	subs	r2, r0, #0
	beq	.L11
	mov	r3, r7
	mov	r1, r6
	mov	r0, r4
	bl	getcaptures
.L1:
	ldr	r3, .L13+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L2:
	ldr	r0, [fp, #-36]
	rsb	r2, r3, #0
	cmp	r2, r0
	addls	r0, r3, r0
	movhi	r5, r6
	addls	r5, r6, r0
	b	.L4
.L11:
	mov	r0, r4
	bl	lua_pushnil
	mov	r0, #1
	b	.L1
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	IMAXCAPTURES
	.word	.LC0
	.word	SUBJIDX
	.size	matchl, .-matchl
	.comm	SUBJIDX,4,4
	.comm	IMAXCAPTURES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
