	.file	"extr_Pack.c_AddElement.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	AddElement
	.type	AddElement, @function
AddElement:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L7
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	eax, eax
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	test	rsi, rsi
	je	.L1
	mov	rbx, rdi
	mov	edi, DWORD PTR [rdi]
	call	LIST_NUM@PLT
	cmp	rax, QWORD PTR MAX_ELEMENT_NUM[rip]
	jge	.L4
	mov	esi, DWORD PTR 12[rbp]
	mov	edx, DWORD PTR INFINITE[rip]
	mov	rdi, rbx
	call	GetElement@PLT
	test	rax, rax
	jne	.L4
	cmp	QWORD PTR 0[rbp], 0
	je	.L4
	mov	edx, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR 8[rbp]
	mov	esi, 4
	call	StrCpy@PLT
	mov	edi, DWORD PTR [rbx]
	mov	rsi, rbp
	call	Add@PLT
	mov	eax, 1
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdi, rbp
	call	FreeElement@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore 3
	.cfi_restore 6
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	AddElement, .-AddElement
	.comm	MAX_ELEMENT_NUM,8,8
	.comm	INFINITE,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_Pack.c_AddElement.c"
	.text
	.align	2
	.global	AddElement
	.syntax unified
	.arm
	.fpu softvfp
	.type	AddElement, %function
AddElement:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	cmpne	r0, #0
	bne	.L14
	mov	r0, #0
	bx	lr
.L14:
	push	{r4, r5, r6, lr}
	mov	r5, r0
	ldr	r0, [r0]
	mov	r4, r1
	bl	LIST_NUM
	ldr	r3, .L15
	ldr	r3, [r3]
	cmp	r0, r3
	bge	.L4
	ldr	r3, .L15+4
	mov	r0, r5
	ldr	r1, [r4, #8]
	ldr	r2, [r3]
	bl	GetElement
	cmp	r0, #0
	bne	.L4
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L4
	ldr	r2, [r5, #4]
	mov	r1, #4
	ldr	r0, [r4, #4]
	bl	StrCpy
	mov	r1, r4
	ldr	r0, [r5]
	bl	Add
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L4:
	mov	r0, r4
	bl	FreeElement
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L16:
	.align	2
.L15:
	.word	MAX_ELEMENT_NUM
	.word	INFINITE
	.size	AddElement, .-AddElement
	.comm	MAX_ELEMENT_NUM,4,4
	.comm	INFINITE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
