	.file	"extr_lj_gc.c_gc_onestep.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	gc_onestep, @function
gc_onestep:
.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
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	G@PLT
	mov	rbp, rax
	mov	eax, DWORD PTR 8[rax]
	add	eax, -128
	cmp	eax, 5
	ja	.L2
	lea	rdx, .L4[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L9-.L4
	.long	.L8-.L4
	.long	.L7-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR 40[rbp]
	call	gcref@PLT
	test	rax, rax
	je	.L17
	mov	edi, DWORD PTR 56[rbp]
	call	tvref@PLT
	test	eax, eax
	je	.L18
.L20:
	mov	rax, QWORD PTR LJ_MAX_MEM[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
.L3:
	.cfi_restore_state
	mov	edi, DWORD PTR 56[rbp]
	call	tvref@PLT
	test	eax, eax
	jne	.L20
	mov	rsi, r12
	mov	rdi, rbp
	call	atomic@PLT
	mov	QWORD PTR 8[rbp], 128
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	movsx	rsi, DWORD PTR 12[rbp]
	mov	rax, QWORD PTR 64[rbp]
	mov	rdi, rbp
	mov	r12, QWORD PTR 16[rbp]
	lea	edx, 1[rsi]
	lea	rsi, [rax+rsi*4]
	mov	DWORD PTR 12[rbp], edx
	call	gc_fullsweep@PLT
	mov	eax, DWORD PTR 0[rbp]
	cmp	DWORD PTR 12[rbp], eax
	jle	.L13
	mov	DWORD PTR 8[rbp], 129
.L13:
	xor	edi, edi
	cmp	QWORD PTR 16[rbp], r12
	setbe	dil
	call	lua_assert@PLT
	mov	rax, QWORD PTR 16[rbp]
	add	rax, QWORD PTR 24[rbp]
	sub	rax, r12
	mov	QWORD PTR 24[rbp], rax
	mov	rax, QWORD PTR GCSWEEPCOST[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
.L8:
	.cfi_restore_state
	mov	edi, DWORD PTR 44[rbp]
	mov	esi, DWORD PTR GCRef[rip]
	mov	r13, QWORD PTR GCSWEEPMAX[rip]
	mov	rbx, QWORD PTR 16[rbp]
	call	mref@PLT
	mov	rdi, rbp
	mov	rdx, r13
	mov	rsi, rax
	call	gc_sweep@PLT
	mov	edi, DWORD PTR 44[rbp]
	mov	esi, eax
	call	setmref@PLT
	xor	edi, edi
	cmp	QWORD PTR 16[rbp], rbx
	setbe	dil
	call	lua_assert@PLT
	mov	rax, QWORD PTR 16[rbp]
	add	rax, QWORD PTR 24[rbp]
	sub	rax, rbx
	mov	edi, DWORD PTR 44[rbp]
	mov	esi, DWORD PTR GCRef[rip]
	mov	QWORD PTR 24[rbp], rax
	call	mref@PLT
	mov	edi, DWORD PTR [rax]
	call	gcref@PLT
	test	rax, rax
	je	.L22
.L14:
	mov	rax, QWORD PTR GCSWEEPMAX[rip]
	imul	rax, QWORD PTR GCSWEEPCOST[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
.L7:
	.cfi_restore_state
	mov	edi, DWORD PTR 48[rbp]
	call	gcref@PLT
	test	rax, rax
	jne	.L23
	mov	DWORD PTR 8[rbp], 133
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, rbp
	call	gc_mark_start@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L2:
	.cfi_restore_state
	xor	edi, edi
	call	lua_assert@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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	DWORD PTR 8[rbp], 131
	xor	eax, eax
	mov	DWORD PTR 36[rbp], 0
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	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
	jmp	propagatemark@PLT
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	esi, DWORD PTR 0[rbp]
	mov	eax, esi
	sar	eax, 2
	cmp	DWORD PTR 4[rbp], eax
	jg	.L15
	mov	eax, DWORD PTR LJ_MIN_STRTAB[rip]
	add	eax, eax
	cmp	esi, eax
	jge	.L24
.L15:
	mov	edi, DWORD PTR 40[rbp]
	call	gcref@PLT
	test	rax, rax
	je	.L16
	mov	DWORD PTR 8[rbp], 132
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, r12
	call	gc_finalize@PLT
	mov	rdx, QWORD PTR 24[rbp]
	mov	rax, QWORD PTR GCFINALIZECOST[rip]
	cmp	rdx, rax
	jbe	.L1
	sub	rdx, rax
	mov	QWORD PTR 24[rbp], rdx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	DWORD PTR 8[rbp], 131
	mov	DWORD PTR 36[rbp], 0
	jmp	.L14
.L24:
	sar	esi
	mov	rdi, r12
	call	lj_str_resize@PLT
	jmp	.L15
	.cfi_endproc
.LFE0:
	.size	gc_onestep, .-gc_onestep
	.comm	LJ_MIN_STRTAB,4,4
	.comm	LJ_MAX_MEM,8,8
	.comm	GCSWEEPMAX,8,8
	.comm	GCSWEEPCOST,8,8
	.comm	GCRef,4,4
	.comm	GCFINALIZECOST,8,8
	.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_gc.c_gc_onestep.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gc_onestep, %function
gc_onestep:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	bl	G
	ldr	r3, [r0, #8]
	mov	r4, r0
	sub	r3, r3, #128
	cmp	r3, #5
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L3:
	ldr	r0, [r0, #44]
	bl	tvref
	subs	r5, r0, #0
	bne	.L20
	mov	r1, r6
	mov	r0, r4
	bl	atomic
	mov	r3, #128
	mov	r0, r5
	str	r5, [r4, #12]
	str	r3, [r4, #8]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	ldr	r3, [r0, #12]
	ldr	r1, [r0, #48]
	add	r2, r3, #1
	add	r1, r1, r3, lsl #2
	str	r2, [r0, #12]
	ldr	r5, [r0, #16]
	bl	gc_fullsweep
	ldr	r3, [r4]
	ldr	r2, [r4, #12]
	ldr	r0, [r4, #16]
	cmp	r2, r3
	movgt	r3, #129
	strgt	r3, [r4, #8]
	cmp	r0, r5
	movhi	r0, #0
	movls	r0, #1
	bl	lua_assert
	ldr	r3, [r4, #20]
	ldr	r1, [r4, #16]
	ldr	r2, .L25
	add	r3, r3, r1
	sub	r3, r3, r5
	ldr	r0, [r2]
	str	r3, [r4, #20]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	ldr	r9, [r0, #36]
	ldr	r8, .L25+4
	mov	r0, r9
	ldr	r1, [r8]
	ldr	r7, [r4, #16]
	bl	mref
	ldr	r5, .L25+8
	mov	r1, r0
	ldr	r2, [r5]
	mov	r0, r4
	bl	gc_sweep
	mov	r1, r0
	mov	r0, r9
	bl	setmref
	ldr	r0, [r4, #16]
	cmp	r0, r7
	movhi	r0, #0
	movls	r0, #1
	bl	lua_assert
	ldr	r3, [r4, #20]
	ldr	r2, [r4, #16]
	ldr	r1, [r8]
	add	r3, r3, r2
	sub	r3, r3, r7
	str	r3, [r4, #20]
	ldr	r0, [r4, #36]
	bl	mref
	ldr	r0, [r0]
	bl	gcref
	cmp	r0, #0
	beq	.L22
.L14:
	ldr	r3, .L25
	ldr	r0, [r5]
	ldr	r3, [r3]
	mul	r0, r3, r0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	ldr	r0, [r0, #40]
	bl	gcref
	cmp	r0, #0
	bne	.L23
	mov	r3, #133
	str	r3, [r4, #8]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L6:
	bl	gc_mark_start
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	ldr	r0, [r0, #32]
	bl	gcref
	subs	r3, r0, #0
	beq	.L17
	ldr	r0, [r4, #44]
	bl	tvref
	cmp	r0, #0
	beq	.L18
.L20:
	ldr	r3, .L25+12
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L17:
	mov	r2, #131
	mov	r0, r3
	str	r3, [r4, #28]
	str	r2, [r4, #8]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	propagatemark
.L22:
	ldm	r4, {r1, r3}
	cmp	r3, r1, asr #2
	bgt	.L15
	ldr	r3, .L25+16
	ldr	r3, [r3]
	cmp	r1, r3, lsl #1
	bge	.L24
.L15:
	ldr	r0, [r4, #32]
	bl	gcref
	cmp	r0, #0
	movne	r3, #132
	moveq	r3, #131
	streq	r0, [r4, #28]
	str	r3, [r4, #8]
	b	.L14
.L18:
	mov	r0, r6
	bl	gc_finalize
	ldr	r2, .L25+20
	ldr	r3, [r4, #20]
	ldr	r0, [r2]
	cmp	r3, r0
	popls	{r4, r5, r6, r7, r8, r9, r10, pc}
	sub	r3, r3, r0
	str	r3, [r4, #20]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L24:
	mov	r0, r6
	asr	r1, r1, #1
	bl	lj_str_resize
	b	.L15
.L2:
	mov	r0, #0
	bl	lua_assert
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L26:
	.align	2
.L25:
	.word	GCSWEEPCOST
	.word	GCRef
	.word	GCSWEEPMAX
	.word	LJ_MAX_MEM
	.word	LJ_MIN_STRTAB
	.word	GCFINALIZECOST
	.size	gc_onestep, .-gc_onestep
	.comm	LJ_MIN_STRTAB,4,4
	.comm	LJ_MAX_MEM,4,4
	.comm	GCSWEEPMAX,4,4
	.comm	GCSWEEPCOST,4,4
	.comm	GCRef,4,4
	.comm	GCFINALIZECOST,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
