	.file	"extr_lapi.c_index2addr.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"unacceptable index"
.LC1:
	.string	"invalid index"
.LC2:
	.string	"upvalue index too large"
	.text
	.p2align 4
	.type	index2addr, @function
index2addr:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movsx	rbx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r13, QWORD PTR 8[rdi]
	test	ebx, ebx
	jle	.L2
	mov	rax, QWORD PTR 0[r13]
	xor	esi, esi
	lea	rdx, 4[rax]
	lea	r12, [rax+rbx*4]
	mov	rax, QWORD PTR 8[r13]
	sub	rax, rdx
	lea	rdx, .LC0[rip]
	sar	rax, 2
	cmp	rbx, rax
	setle	sil
	call	api_check@PLT
	cmp	QWORD PTR 0[rbp], r12
	ja	.L1
.L12:
	mov	r12, QWORD PTR NONVALIDVALUE[rip]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	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	edi, ebx
	call	ispseudo@PLT
	test	eax, eax
	je	.L14
	mov	eax, DWORD PTR LUA_REGISTRYINDEX[rip]
	cmp	eax, ebx
	je	.L15
	sub	eax, ebx
	xor	esi, esi
	lea	rdx, .LC2[rip]
	mov	rdi, rbp
	movsx	rbx, eax
	mov	eax, DWORD PTR MAXUPVAL[rip]
	add	eax, 1
	cmp	eax, ebx
	setge	sil
	call	api_check@PLT
	mov	rdi, QWORD PTR 0[r13]
	call	ttislcf@PLT
	test	rax, rax
	jne	.L12
	mov	rdi, QWORD PTR 0[r13]
	call	clCvalue@PLT
	mov	r12, QWORD PTR NONVALIDVALUE[rip]
	cmp	DWORD PTR [rax], ebx
	jl	.L1
	mov	rax, QWORD PTR 8[rax]
	lea	r12, -4[rax+rbx*4]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	xor	esi, esi
	test	ebx, ebx
	je	.L5
	mov	rax, QWORD PTR 0[r13]
	mov	rcx, QWORD PTR 0[rbp]
	mov	edx, ebx
	xor	esi, esi
	neg	edx
	add	rax, 4
	movsx	rdx, edx
	sub	rcx, rax
	mov	rax, rcx
	sar	rax, 2
	cmp	rdx, rax
	setle	sil
.L5:
	mov	rdi, rbp
	lea	rdx, .LC1[rip]
	call	api_check@PLT
	mov	rax, QWORD PTR 0[rbp]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	lea	r12, [rax+rbx*4]
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	rdi, rbp
	call	G@PLT
	mov	r12, rax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	index2addr, .-index2addr
	.comm	NONVALIDVALUE,8,8
	.comm	MAXUPVAL,4,4
	.comm	LUA_REGISTRYINDEX,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_lapi.c_index2addr.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unacceptable index\000"
	.align	2
.LC1:
	.ascii	"invalid index\000"
	.align	2
.LC2:
	.ascii	"upvalue index too large\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	index2addr, %function
index2addr:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r4, r1, #0
	mov	r5, r0
	ldr	r6, [r0, #4]
	ble	.L2
	ldr	ip, [r6]
	ldr	r3, [r6, #4]
	add	r2, ip, #4
	sub	r3, r3, r2
	cmp	r4, r3, asr #2
	movle	r1, #1
	movgt	r1, #0
	ldr	r2, .L14
	add	r4, ip, r4, lsl #2
	bl	api_check
	ldr	r3, [r5]
	cmp	r3, r4
	bhi	.L1
.L8:
	ldr	r3, .L14+4
	ldr	r4, [r3]
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r4
	bl	ispseudo
	cmp	r0, #0
	beq	.L12
	ldr	r3, .L14+8
	ldr	r1, [r3]
	cmp	r1, r4
	beq	.L13
	ldr	r3, .L14+12
	sub	r4, r1, r4
	ldr	r1, [r3]
	ldr	r2, .L14+16
	add	r1, r1, #1
	cmp	r1, r4
	movlt	r1, #0
	movge	r1, #1
	mov	r0, r5
	bl	api_check
	ldr	r0, [r6]
	bl	ttislcf
	cmp	r0, #0
	bne	.L8
	ldr	r0, [r6]
	bl	clCvalue
	ldr	r3, [r0]
	cmp	r3, r4
	blt	.L8
	ldr	r0, [r0, #4]
	sub	r4, r4, #-1073741823
	add	r4, r0, r4, lsl #2
	b	.L1
.L12:
	cmp	r4, #0
	moveq	r1, r4
	beq	.L5
	ldr	r2, [r6]
	ldr	r3, [r5]
	add	r2, r2, #4
	sub	r3, r3, r2
	rsb	r2, r4, #0
	cmp	r2, r3, asr #2
	movle	r1, #1
	movgt	r1, #0
.L5:
	mov	r0, r5
	ldr	r2, .L14+20
	bl	api_check
	ldr	r0, [r5]
	add	r4, r0, r4, lsl #2
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L13:
	mov	r0, r5
	bl	G
	mov	r4, r0
	b	.L1
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	NONVALIDVALUE
	.word	LUA_REGISTRYINDEX
	.word	MAXUPVAL
	.word	.LC2
	.word	.LC1
	.size	index2addr, .-index2addr
	.comm	NONVALIDVALUE,4,4
	.comm	MAXUPVAL,4,4
	.comm	LUA_REGISTRYINDEX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
