	.file	"extr_lj_snap.c_lj_snap_add.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	lj_snap_add
	.type	lj_snap_add, @function
lj_snap_add:
.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
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	ebx, DWORD PTR [rdi]
	mov	r12d, DWORD PTR 4[rdi]
	test	ebx, ebx
	jle	.L2
	movsx	rax, ebx
	mov	rcx, QWORD PTR 8[rdi]
	sal	rax, 4
	add	rax, QWORD PTR 16[rdi]
	cmp	QWORD PTR -16[rax], rcx
	je	.L6
.L2:
	cmp	QWORD PTR 32[rbp], 0
	jne	.L15
.L7:
	lea	r13d, 1[rbx]
	mov	rdi, rbp
	mov	esi, r13d
	call	lj_snap_grow_buf@PLT
	movsx	rsi, ebx
	mov	DWORD PTR 0[rbp], r13d
	mov	rbx, rsi
	mov	rsi, QWORD PTR 16[rbp]
	sal	rbx, 4
	add	rsi, rbx
.L8:
	mov	QWORD PTR 32[rbp], 0
	mov	edx, r12d
	mov	rdi, rbp
	mov	QWORD PTR 24[rbp], 0
	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
	jmp	snapshot_stack@PLT
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	rdi, QWORD PTR 24[rbp]
	call	irt_isguard@PLT
	test	eax, eax
	jne	.L7
.L6:
	cmp	ebx, 1
	je	.L16
	lea	esi, -1[rbx]
	movsx	rsi, esi
	sal	rsi, 4
	add	rsi, QWORD PTR 16[rbp]
	mov	r12d, DWORD PTR 8[rsi]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L16:
	mov	esi, DWORD PTR IRT_NIL[rip]
	mov	edi, DWORD PTR IR_NOP[rip]
	call	IRT@PLT
	xor	edx, edx
	xor	esi, esi
	mov	edi, eax
	call	emitir_raw@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	lj_snap_add, .-lj_snap_add
	.comm	IR_NOP,4,4
	.comm	IRT_NIL,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_snap.c_lj_snap_add.c"
	.text
	.align	2
	.global	lj_snap_add
	.syntax unified
	.arm
	.fpu softvfp
	.type	lj_snap_add, %function
lj_snap_add:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldm	r0, {r5, r6}
	cmp	r5, #0
	mov	r4, r0
	ble	.L2
	ldr	r3, [r0, #12]
	sub	r2, r5, #-536870911
	ldr	r2, [r3, r2, lsl #3]
	ldr	r3, [r0, #8]
	cmp	r2, r3
	beq	.L6
.L2:
	ldr	r3, [r4, #20]
	cmp	r3, #0
	bne	.L18
.L7:
	add	r7, r5, #1
	mov	r1, r7
	mov	r0, r4
	bl	lj_snap_grow_buf
	ldr	r3, [r4, #12]
	str	r7, [r4]
	add	r1, r3, r5, lsl #3
.L8:
	mov	r3, #0
	mov	r2, r6
	mov	r0, r4
	str	r3, [r4, #20]
	str	r3, [r4, #16]
	pop	{r4, r5, r6, r7, r8, lr}
	b	snapshot_stack
.L18:
	ldr	r0, [r4, #16]
	bl	irt_isguard
	cmp	r0, #0
	bne	.L7
.L6:
	cmp	r5, #1
	beq	.L19
	ldr	r1, [r4, #12]
	sub	r5, r5, #1
	add	r1, r1, r5, lsl #3
	ldr	r6, [r1, #4]
	b	.L8
.L19:
	ldr	r2, .L20
	ldr	r3, .L20+4
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	IRT
	mov	r2, #0
	mov	r1, r2
	bl	emitir_raw
	b	.L7
.L21:
	.align	2
.L20:
	.word	IRT_NIL
	.word	IR_NOP
	.size	lj_snap_add, .-lj_snap_add
	.comm	IR_NOP,4,4
	.comm	IRT_NIL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
