	.file	"extr_lj_asm_x86.h_asm_stack_check.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	asm_stack_check, @function
asm_stack_check:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, r8d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r14d, DWORD PTR RID_BASE[rip]
	test	rdx, rdx
	je	.L3
	mov	r14d, DWORD PTR [rdx]
.L3:
	mov	ebx, DWORD PTR RID_EAX[rip]
	test	r12, r12
	jne	.L21
.L5:
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, r15d
	call	exitstub_addr@PLT
	mov	esi, DWORD PTR CC_B[rip]
	mov	rdi, rbp
	mov	edx, eax
	call	emit_jcc@PLT
	cmp	QWORD PTR RSET_EMPTY[rip], r12
	je	.L22
	mov	esi, ebx
	mov	rdi, rbp
	call	ra_modified@PLT
.L7:
	mov	edi, DWORD PTR XOg_CMP[rip]
	call	XG_ARITHi@PLT
	mov	rdi, rbp
	lea	ecx, 0[0+r13*8]
	mov	edx, ebx
	mov	esi, eax
	call	emit_gri@PLT
	mov	edi, r14d
	call	ra_hasreg@PLT
	test	rax, rax
	je	.L8
	cmp	r14d, ebx
	jne	.L23
.L8:
	mov	edi, DWORD PTR 0[rbp]
	call	J2G@PLT
	mov	rdi, rax
	call	ptr2addr@PLT
	mov	edi, DWORD PTR XOg_SUB[rip]
	mov	r14d, DWORD PTR RID_NONE[rip]
	mov	r13d, eax
	call	XO_ARITH@PLT
	mov	r8d, r13d
	mov	ecx, r14d
	mov	edx, ebx
	mov	esi, eax
	mov	rdi, rbp
	call	emit_rmro@PLT
.L9:
	mov	esi, DWORD PTR maxstack[rip]
	mov	edi, DWORD PTR lua_State[rip]
	call	offsetof@PLT
	mov	esi, DWORD PTR XO_MOV[rip]
	mov	ecx, ebx
	mov	edx, ebx
	mov	r8d, eax
	mov	rdi, rbp
	call	emit_rmro@PLT
	mov	edx, DWORD PTR cur_L[rip]
	mov	esi, ebx
	mov	rdi, rbp
	call	emit_getgl@PLT
	cmp	QWORD PTR RSET_EMPTY[rip], r12
	je	.L24
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	mov	edi, DWORD PTR XOg_SUB[rip]
	call	XO_ARITH@PLT
	mov	ecx, r14d
	mov	edx, ebx
	mov	rdi, rbp
	mov	esi, eax
	call	emit_rr@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edx, DWORD PTR REX_64[rip]
	mov	ecx, DWORD PTR RID_ESP[rip]
	xor	r8d, r8d
	mov	rdi, rbp
	mov	esi, DWORD PTR XO_MOV[rip]
	or	edx, ebx
	call	emit_rmro@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, r12
	call	rset_pickbot@PLT
	mov	ebx, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L24:
	or	ebx, DWORD PTR REX_64[rip]
	mov	ecx, DWORD PTR RID_ESP[rip]
	mov	rdi, rbp
	xor	r8d, r8d
	mov	esi, DWORD PTR XO_MOVto[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 56
	mov	edx, ebx
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	emit_rmro@PLT
	.cfi_endproc
.LFE0:
	.size	asm_stack_check, .-asm_stack_check
	.comm	maxstack,4,4
	.comm	lua_State,4,4
	.comm	cur_L,4,4
	.comm	XOg_SUB,4,4
	.comm	XOg_CMP,4,4
	.comm	XO_MOVto,4,4
	.comm	XO_MOV,4,4
	.comm	RSET_EMPTY,8,8
	.comm	RID_NONE,4,4
	.comm	RID_ESP,4,4
	.comm	RID_EAX,4,4
	.comm	RID_BASE,4,4
	.comm	REX_64,4,4
	.comm	CC_B,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_lj_asm_x86.h_asm_stack_check.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	asm_stack_check, %function
asm_stack_check:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r3
	cmp	r2, #0
	ldreq	r3, .L17
	ldrne	r8, [r2]
	ldreq	r8, [r3]
	sub	sp, sp, #8
	cmp	r6, #0
	mov	r4, r0
	mov	r7, r1
	ldr	r9, [sp, #40]
	bne	.L13
	ldr	r3, .L17+4
	ldr	r5, [r3]
.L5:
	ldr	r3, .L17+8
	mov	r1, r9
	ldr	r0, [r4]
	ldr	r10, [r3]
	bl	exitstub_addr
	ldr	r9, .L17+12
	mov	r2, r0
	mov	r1, r10
	mov	r0, r4
	bl	emit_jcc
	ldr	r3, [r9]
	cmp	r3, r6
	beq	.L14
	mov	r1, r5
	mov	r0, r4
	bl	ra_modified
	ldr	r10, .L17+16
.L7:
	ldr	r3, .L17+20
	ldr	r0, [r3]
	bl	XG_ARITHi
	lsl	r3, r7, #3
	mov	r1, r0
	mov	r2, r5
	mov	r0, r4
	bl	emit_gri
	mov	r0, r8
	bl	ra_hasreg
	cmp	r0, #0
	cmpne	r8, r5
	ldr	r3, .L17+24
	ldr	r0, [r3]
	bne	.L15
	bl	XO_ARITH
	ldr	r3, .L17+28
	mov	r7, r0
	ldr	r0, [r4]
	ldr	r8, [r3]
	bl	J2G
	bl	ptr2addr
	mov	r3, r8
	str	r0, [sp]
	mov	r1, r7
	mov	r2, r5
	mov	r0, r4
	bl	emit_rmro
.L9:
	ldr	r2, .L17+32
	ldr	r3, .L17+36
	ldr	r1, [r2]
	ldr	r0, [r3]
	ldr	r7, [r10]
	bl	offsetof
	mov	r1, r7
	mov	r3, r5
	mov	r2, r5
	str	r0, [sp]
	mov	r0, r4
	bl	emit_rmro
	ldr	r3, .L17+40
	mov	r1, r5
	ldr	r2, [r3]
	mov	r0, r4
	bl	emit_getgl
	ldr	r3, [r9]
	cmp	r3, r6
	beq	.L16
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L14:
	mov	r1, #0
	ldr	r2, .L17+44
	ldr	r10, .L17+16
	ldr	r2, [r2]
	ldr	r3, .L17+48
	str	r1, [sp]
	mov	r0, r4
	ldr	r3, [r3]
	ldr	r1, [r10]
	orr	r2, r5, r2
	bl	emit_rmro
	b	.L7
.L13:
	mov	r0, r6
	bl	rset_pickbot
	mov	r5, r0
	b	.L5
.L15:
	bl	XO_ARITH
	mov	r3, r8
	mov	r1, r0
	mov	r2, r5
	mov	r0, r4
	bl	emit_rr
	b	.L9
.L16:
	mov	ip, #0
	mov	r0, r4
	ldr	r2, .L17+44
	ldr	r3, .L17+48
	ldr	r1, .L17+52
	ldr	r2, [r2]
	str	ip, [sp, #40]
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r2, r5, r2
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	emit_rmro
.L18:
	.align	2
.L17:
	.word	RID_BASE
	.word	RID_EAX
	.word	CC_B
	.word	RSET_EMPTY
	.word	XO_MOV
	.word	XOg_CMP
	.word	XOg_SUB
	.word	RID_NONE
	.word	maxstack
	.word	lua_State
	.word	cur_L
	.word	REX_64
	.word	RID_ESP
	.word	XO_MOVto
	.size	asm_stack_check, .-asm_stack_check
	.comm	maxstack,4,4
	.comm	lua_State,4,4
	.comm	cur_L,4,4
	.comm	XOg_SUB,4,4
	.comm	XOg_CMP,4,4
	.comm	XO_MOVto,4,4
	.comm	XO_MOV,4,4
	.comm	RSET_EMPTY,4,4
	.comm	RID_NONE,4,4
	.comm	RID_ESP,4,4
	.comm	RID_EAX,4,4
	.comm	RID_BASE,4,4
	.comm	REX_64,4,4
	.comm	CC_B,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
