	.file	"extr_lj_record.c_lj_record_setup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	lj_record_setup
	.type	lj_record_setup, @function
lj_record_setup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	edx, 8
	xor	esi, esi
	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
	xor	ebx, ebx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rdi, QWORD PTR 184[rdi]
	call	memset@PLT
	mov	rdi, QWORD PTR 216[rbp]
	mov	edx, 8
	xor	esi, esi
	call	memset@PLT
	mov	rdi, QWORD PTR 200[rbp]
	mov	edx, 8
	xor	esi, esi
	call	memset@PLT
	mov	rax, QWORD PTR REF_NIL[rip]
	mov	edi, DWORD PTR 96[rbp]
	xor	esi, esi
	mov	QWORD PTR 104[rbp], rax
	call	setmref@PLT
	mov	rax, QWORD PTR LJ_FR2[rip]
	mov	r13, QWORD PTR 32[rbp]
	mov	QWORD PTR 168[rbp], 0
	mov	rdx, QWORD PTR JIT_P_instunroll[rip]
	mov	esi, DWORD PTR IRT_PGC[rip]
	mov	QWORD PTR 160[rbp], 0
	add	rax, 1
	mov	edi, DWORD PTR IR_BASE[rip]
	mov	r12, QWORD PTR 24[rbp]
	mov	QWORD PTR 152[rbp], 0
	mov	QWORD PTR 176[rbp], rax
	add	rax, QWORD PTR 184[rbp]
	mov	QWORD PTR 192[rbp], rax
	mov	rax, QWORD PTR 8[rbp]
	mov	rdx, QWORD PTR [rax+rdx*8]
	mov	QWORD PTR 0[rbp], rdx
	mov	rdx, QWORD PTR JIT_P_loopunroll[rip]
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	DWORD PTR 120[rbp], -1
	mov	QWORD PTR 144[rbp], 0
	mov	QWORD PTR 16[rbp], rax
	mov	QWORD PTR 136[rbp], 0
	mov	QWORD PTR 128[rbp], 0
	call	IRT@PLT
	mov	rdx, r13
	mov	rsi, r12
	mov	edi, eax
	call	emitir_raw@PLT
.L2:
	mov	rdi, QWORD PTR REF_NIL[rip]
	sub	rdi, rbx
	call	IR@PLT
	mov	rdx, QWORD PTR IRT_NIL[rip]
	mov	QWORD PTR 24[rax], 0
	add	rdx, rbx
	add	rbx, 1
	mov	QWORD PTR 16[rax], rdx
	mov	edx, DWORD PTR IR_KPRI[rip]
	mov	QWORD PTR [rax], 0
	mov	DWORD PTR 8[rax], edx
	cmp	rbx, 3
	jne	.L2
	mov	rsi, QWORD PTR 112[rbp]
	mov	eax, DWORD PTR REF_TRUE[rip]
	mov	edi, DWORD PTR 84[rbp]
	mov	QWORD PTR 64[rbp], rsi
	mov	DWORD PTR 88[rbp], eax
	call	setmref@PLT
	mov	rsi, QWORD PTR 24[rbp]
	test	rsi, rsi
	je	.L3
	mov	rdi, rbp
	call	traceref@PLT
	mov	r12, QWORD PTR [rax]
	mov	rbx, rax
	test	r12, r12
	je	.L18
.L4:
	mov	QWORD PTR 72[rbp], r12
	mov	edi, DWORD PTR BC_JMP[rip]
	xor	edx, edx
	xor	esi, esi
	call	BCINS_AD@PLT
	cmp	QWORD PTR 32[rbp], 0
	mov	DWORD PTR 80[rbp], eax
	je	.L19
.L5:
	mov	QWORD PTR 64[rbp], 0
.L7:
	mov	rsi, rbx
	mov	rdi, rbp
	call	lj_snap_replay@PLT
.L9:
	mov	rsi, QWORD PTR 72[rbp]
	mov	rdi, rbp
	call	traceref@PLT
	mov	rdx, QWORD PTR 8[rbp]
	mov	rcx, QWORD PTR JIT_P_maxside[rip]
	mov	rcx, QWORD PTR [rdx+rcx*8]
	cmp	QWORD PTR 8[rax], rcx
	jge	.L10
	mov	rax, QWORD PTR 32[rbp]
	mov	rcx, QWORD PTR JIT_P_tryside[rip]
	mov	rsi, QWORD PTR JIT_P_hotexit[rip]
	sal	rax, 4
	add	rax, QWORD PTR 16[rbx]
	mov	rcx, QWORD PTR [rdx+rcx*8]
	add	rcx, QWORD PTR [rdx+rsi*8]
	cmp	QWORD PTR 8[rax], rcx
	jl	.L1
.L10:
	mov	esi, DWORD PTR LJ_TRLINK_INTERP[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	xor	edx, edx
	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	lj_record_stop@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rax, QWORD PTR 112[rbp]
	mov	QWORD PTR 72[rbp], 0
	mov	rdi, rbp
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 80[rbp], eax
	call	rec_setup_root@PLT
	mov	rdi, rbp
	mov	QWORD PTR 112[rbp], rax
	call	lj_snap_add@PLT
	mov	edi, DWORD PTR 80[rbp]
	call	bc_op@PLT
	cmp	rax, QWORD PTR BC_FORL[rip]
	je	.L20
	mov	edi, DWORD PTR 80[rbp]
	call	bc_op@PLT
	cmp	rax, QWORD PTR BC_ITERC[rip]
	jne	.L13
	mov	QWORD PTR 64[rbp], 0
.L13:
	mov	rax, QWORD PTR 56[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	cmp	rax, QWORD PTR LJ_MAX_JSLOTS[rip]
	jge	.L21
.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
.L19:
	.cfi_restore_state
	mov	rax, QWORD PTR 16[rbx]
	cmp	QWORD PTR [rax], 0
	jne	.L5
	mov	rdi, QWORD PTR 56[rbp]
	mov	r13, QWORD PTR 112[rbp]
	call	proto_bc@PLT
	cmp	r13, rax
	jbe	.L7
	mov	rax, QWORD PTR 112[rbp]
	mov	edi, DWORD PTR -4[rax]
	call	bc_op@PLT
	cmp	rax, QWORD PTR BC_JFORI[rip]
	jne	.L7
	mov	r13, QWORD PTR 112[rbp]
	mov	edi, DWORD PTR -4[r13]
	call	bc_j@PLT
	cdqe
	mov	edi, DWORD PTR -4[r13+rax*4]
	call	bc_d@PLT
	cmp	rax, r12
	jne	.L7
	mov	rdi, rbp
	call	lj_snap_add@PLT
	mov	rax, QWORD PTR 112[rbp]
	lea	rdx, 96[rbp]
	mov	rdi, rbp
	mov	ecx, 1
	lea	rsi, -4[rax]
	call	rec_for_loop@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L18:
	mov	r12, QWORD PTR 24[rbp]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rax, QWORD PTR 112[rbp]
	lea	rdx, 96[rbp]
	mov	ecx, 1
	mov	rdi, rbp
	lea	rsi, -4[rax]
	call	rec_for_loop@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L21:
	mov	esi, DWORD PTR LJ_TRERR_STACKOV[rip]
	add	rsp, 8
	.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	lj_trace_err@PLT
	.cfi_endproc
.LFE0:
	.size	lj_record_setup, .-lj_record_setup
	.comm	REF_TRUE,4,4
	.comm	REF_NIL,8,8
	.comm	LUA_MASKLINE,4,4
	.comm	LUA_MASKCOUNT,4,4
	.comm	LJ_TRLINK_INTERP,4,4
	.comm	LJ_TRERR_STACKOV,4,4
	.comm	LJ_MAX_JSLOTS,8,8
	.comm	LJ_FR2,8,8
	.comm	JIT_P_tryside,8,8
	.comm	JIT_P_maxside,8,8
	.comm	JIT_P_loopunroll,8,8
	.comm	JIT_P_instunroll,8,8
	.comm	JIT_P_hotexit,8,8
	.comm	IR_XLOAD,4,4
	.comm	IR_KPRI,4,4
	.comm	IR_EQ,4,4
	.comm	IR_BASE,4,4
	.comm	IR_BAND,4,4
	.comm	IRXLOAD_VOLATILE,4,4
	.comm	IRT_U8,4,4
	.comm	IRT_PGC,4,4
	.comm	IRT_NIL,8,8
	.comm	BC_JMP,4,4
	.comm	BC_JFORI,8,8
	.comm	BC_ITERC,8,8
	.comm	BC_FORL,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_record.c_lj_record_setup.c"
	.text
	.align	2
	.global	lj_record_setup
	.syntax unified
	.arm
	.fpu softvfp
	.type	lj_record_setup, %function
lj_record_setup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, #0
	mov	r4, r0
	mov	r2, #4
	mov	r1, r6
	ldr	r0, [r0, #96]
	bl	memset
	ldr	r7, .L20
	mov	r2, #4
	mov	r1, r6
	ldr	r0, [r4, #112]
	bl	memset
	mov	r2, #4
	mov	r1, r6
	ldr	r0, [r4, #104]
	bl	memset
	ldr	r3, [r7]
	mov	r1, r6
	str	r3, [r4, #56]
	ldr	r0, [r4, #52]
	bl	setmref
	mvn	r1, #0
	ldr	r3, .L20+4
	ldr	r2, [r4, #96]
	ldr	r3, [r3]
	ldr	r0, .L20+8
	add	r3, r3, #1
	str	r3, [r4, #92]
	ldr	r0, [r0]
	add	r2, r2, r3
	ldr	r3, [r4, #4]
	str	r2, [r4, #100]
	str	r6, [r4, #88]
	str	r6, [r4, #84]
	str	r6, [r4, #80]
	ldr	r2, .L20+12
	ldr	r0, [r3, r0, lsl #2]
	ldr	r2, [r2]
	str	r0, [r4]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, .L20+16
	str	r3, [r4, #8]
	ldr	r3, .L20+20
	str	r1, [r4, #64]
	ldr	r0, [r3]
	ldr	r1, [r2]
	str	r6, [r4, #76]
	str	r6, [r4, #72]
	str	r6, [r4, #68]
	bl	IRT
	ldr	r2, [r4, #16]
	ldr	r1, [r4, #12]
	mov	r5, r6
	bl	emitir_raw
	ldr	r9, .L20+24
	ldr	r8, .L20+28
.L2:
	ldr	r0, [r7]
	sub	r0, r0, r5
	bl	IR
	ldr	r3, [r9]
	ldr	r2, [r8]
	add	r3, r3, r5
	add	r5, r5, #1
	cmp	r5, #3
	stmib	r0, {r2, r3, r6}
	str	r6, [r0]
	bne	.L2
	ldr	r3, .L20+32
	ldr	r1, [r4, #60]
	ldr	r3, [r3]
	ldr	r0, [r4, #44]
	str	r1, [r4, #32]
	str	r3, [r4, #48]
	bl	setmref
	ldr	r5, [r4, #12]
	cmp	r5, #0
	beq	.L3
	mov	r1, r5
	mov	r0, r4
	bl	traceref
	mov	r2, #0
	ldr	r6, [r0]
	ldr	r3, .L20+36
	cmp	r6, #0
	ldreq	r6, [r4, #12]
	mov	r5, r0
	mov	r1, r2
	ldr	r0, [r3]
	str	r6, [r4, #36]
	bl	BCINS_AD
	ldr	r3, [r4, #16]
	str	r0, [r4, #40]
	cmp	r3, #0
	beq	.L18
.L5:
	mov	r3, #0
	str	r3, [r4, #32]
.L7:
	mov	r1, r5
	mov	r0, r4
	bl	lj_snap_replay
.L9:
	ldr	r1, [r4, #36]
	mov	r0, r4
	bl	traceref
	ldr	r2, .L20+40
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	ldr	r1, [r0, #4]
	ldr	r2, [r3, r2, lsl #2]
	cmp	r1, r2
	bge	.L10
	ldr	r2, .L20+44
	ldr	r0, .L20+48
	ldr	r1, [r5, #8]
	ldr	ip, [r4, #16]
	ldr	r2, [r2]
	ldr	r0, [r0]
	ldr	r2, [r3, r2, lsl #2]
	add	r1, r1, ip, lsl #3
	ldr	r3, [r3, r0, lsl #2]
	ldr	r1, [r1, #4]
	add	r3, r2, r3
	cmp	r1, r3
	poplt	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	ldr	r3, .L20+52
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r2, #0
	ldr	r1, [r3]
	b	lj_record_stop
.L3:
	ldr	r3, [r4, #60]
	mov	r0, r4
	ldr	r3, [r3]
	str	r5, [r4, #36]
	str	r3, [r4, #40]
	bl	rec_setup_root
	mov	r3, r0
	mov	r0, r4
	str	r3, [r4, #60]
	bl	lj_snap_add
	ldr	r0, [r4, #40]
	bl	bc_op
	ldr	r3, .L20+56
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L19
	ldr	r0, [r4, #40]
	bl	bc_op
	ldr	r3, .L20+60
	ldr	r3, [r3]
	cmp	r0, r3
	streq	r5, [r4, #32]
.L13:
	ldr	r3, [r4, #28]
	ldr	r2, .L20+64
	ldr	r3, [r3]
	ldr	r2, [r2]
	add	r3, r3, #1
	cmp	r3, r2
	poplt	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r3, .L20+68
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r1, [r3]
	b	lj_trace_err
.L18:
	ldr	r3, [r5, #8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L5
	ldr	r0, [r4, #28]
	ldr	r7, [r4, #60]
	bl	proto_bc
	cmp	r7, r0
	bls	.L7
	ldr	r3, [r4, #60]
	ldr	r0, [r3, #-4]
	bl	bc_op
	ldr	r3, .L20+72
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L7
	ldr	r7, [r4, #60]
	ldr	r0, [r7, #-4]
	bl	bc_j
	sub	r3, r0, #-1073741823
	ldr	r0, [r7, r3, lsl #2]
	bl	bc_d
	cmp	r0, r6
	bne	.L7
	mov	r0, r4
	bl	lj_snap_add
	ldr	r1, [r4, #60]
	mov	r3, #1
	mov	r0, r4
	sub	r1, r1, #4
	add	r2, r4, #52
	bl	rec_for_loop
	b	.L9
.L19:
	ldr	r1, [r4, #60]
	mov	r3, #1
	mov	r0, r4
	sub	r1, r1, #4
	add	r2, r4, #52
	bl	rec_for_loop
	b	.L13
.L21:
	.align	2
.L20:
	.word	REF_NIL
	.word	LJ_FR2
	.word	JIT_P_instunroll
	.word	JIT_P_loopunroll
	.word	IRT_PGC
	.word	IR_BASE
	.word	IRT_NIL
	.word	IR_KPRI
	.word	REF_TRUE
	.word	BC_JMP
	.word	JIT_P_maxside
	.word	JIT_P_hotexit
	.word	JIT_P_tryside
	.word	LJ_TRLINK_INTERP
	.word	BC_FORL
	.word	BC_ITERC
	.word	LJ_MAX_JSLOTS
	.word	LJ_TRERR_STACKOV
	.word	BC_JFORI
	.size	lj_record_setup, .-lj_record_setup
	.comm	REF_TRUE,4,4
	.comm	REF_NIL,4,4
	.comm	LUA_MASKLINE,4,4
	.comm	LUA_MASKCOUNT,4,4
	.comm	LJ_TRLINK_INTERP,4,4
	.comm	LJ_TRERR_STACKOV,4,4
	.comm	LJ_MAX_JSLOTS,4,4
	.comm	LJ_FR2,4,4
	.comm	JIT_P_tryside,4,4
	.comm	JIT_P_maxside,4,4
	.comm	JIT_P_loopunroll,4,4
	.comm	JIT_P_instunroll,4,4
	.comm	JIT_P_hotexit,4,4
	.comm	IR_XLOAD,4,4
	.comm	IR_KPRI,4,4
	.comm	IR_EQ,4,4
	.comm	IR_BASE,4,4
	.comm	IR_BAND,4,4
	.comm	IRXLOAD_VOLATILE,4,4
	.comm	IRT_U8,4,4
	.comm	IRT_PGC,4,4
	.comm	IRT_NIL,4,4
	.comm	BC_JMP,4,4
	.comm	BC_JFORI,4,4
	.comm	BC_ITERC,4,4
	.comm	BC_FORL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
