	.file	"31388567.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"\nPlease enter the terms of the polynomial in the following format:"
	.align 8
.LC1:
	.string	"(a_n * x ^ n) + (a_n-1 * x ^ n-1) + ... + (a_1 * x) + a_0"
	.align 8
.LC2:
	.string	"\nWhere a_n to a_0 represent the coefficients in descending order \nand ^ n, ^ n-1 and so on represent the exponents in descending order.\n"
.LC3:
	.string	"The polynomial is "
.LC4:
	.string	" ."
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -24[rbp]
	mov	rdi, rax
	call	initList
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdx, -16[rbp]
	lea	rax, -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	insertEndList
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	displayPolynomial
	lea	rax, -24[rbp]
	mov	rdi, rax
	call	delList
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	initList
	.type	initList, @function
initList:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	initList, .-initList
	.section	.rodata
.LC5:
	.string	"Please enter the coefficient."
.LC6:
	.string	"%d"
.LC7:
	.string	"Please enter the exponent."
.LC8:
	.string	"Value inserted successfully."
	.align 8
.LC9:
	.string	"Do you wish to continue? (Y/N)"
.LC10:
	.string	" %c"
	.text
	.globl	insertEndList
	.type	insertEndList, @function
insertEndList:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -24[rbp], rax
.L8:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], edx
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L6
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
.L7:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rax, -33[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	movzx	eax, BYTE PTR -33[rbp]
	cmp	al, 121
	je	.L8
	movzx	eax, BYTE PTR -33[rbp]
	cmp	al, 89
	je	.L8
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	insertEndList, .-insertEndList
	.section	.rodata
.LC11:
	.string	"%dx^%d"
.LC12:
	.string	"%dx^%d + "
.LC13:
	.string	"x^%d + "
.LC14:
	.string	"%dx + "
	.text
	.globl	displayPolynomial
	.type	displayPolynomial, @function
displayPolynomial:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	jmp	.L11
.L19:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jne	.L12
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L12:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L14
	mov	edi, 48
	call	putchar@PLT
	jmp	.L10
.L14:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L15
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L15:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L16
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	je	.L16
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 1
	je	.L16
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
.L16:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 1
	jne	.L17
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L18
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 1
	jne	.L18
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
.L18:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
.L11:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L19
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	displayPolynomial, .-displayPolynomial
	.globl	delList
	.type	delList, @function
delList:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	jmp	.L21
.L22:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
.L21:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L22
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	delList, .-delList
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"31388567.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012Please enter the terms of the polynomial in the"
	.ascii	" following format:\000"
	.align	2
.LC1:
	.ascii	"(a_n * x ^ n) + (a_n-1 * x ^ n-1) + ... + (a_1 * x)"
	.ascii	" + a_0\000"
	.align	2
.LC2:
	.ascii	"\012Where a_n to a_0 represent the coefficients in "
	.ascii	"descending order \012and ^ n, ^ n-1 and so on repre"
	.ascii	"sent the exponents in descending order.\012\000"
	.align	2
.LC3:
	.ascii	"The polynomial is \000"
	.align	2
.LC4:
	.ascii	" .\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #16
	mov	r0, r3
	bl	initList
	ldr	r0, .L4+4
	bl	puts
	ldr	r0, .L4+8
	bl	puts
	ldr	r0, .L4+12
	bl	puts
	sub	r2, fp, #12
	sub	r3, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	insertEndList
	ldr	r0, .L4+16
	bl	printf
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	displayPolynomial
	sub	r3, fp, #16
	mov	r0, r3
	bl	delList
	ldr	r0, .L4+20
	bl	puts
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.align	2
	.global	initList
	.syntax unified
	.arm
	.fpu softvfp
	.type	initList, %function
initList:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	initList, .-initList
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Please enter the coefficient.\000"
	.align	2
.LC7:
	.ascii	"%d\000"
	.align	2
.LC8:
	.ascii	"Please enter the exponent.\000"
	.align	2
.LC9:
	.ascii	"Value inserted successfully.\000"
	.align	2
.LC10:
	.ascii	"Do you wish to continue? (Y/N)\000"
	.align	2
.LC11:
	.ascii	" %c\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	insertEndList
	.syntax unified
	.arm
	.fpu softvfp
	.type	insertEndList, %function
insertEndList:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	str	r3, [fp, #-16]
.L10:
	ldr	r0, .L12+4
	bl	puts
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L12+8
	bl	__isoc99_scanf
	ldr	r0, .L12+12
	bl	puts
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L12+8
	bl	__isoc99_scanf
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	b	.L9
.L8:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #8]
.L9:
	ldr	r0, .L12+16
	bl	puts
	ldr	r0, .L12+20
	bl	puts
	sub	r3, fp, #25
	mov	r1, r3
	ldr	r0, .L12+24
	bl	__isoc99_scanf
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	cmp	r3, #121
	beq	.L10
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	cmp	r3, #89
	beq	.L10
	nop
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC12
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	insertEndList, .-insertEndList
	.section	.rodata
	.align	2
.LC13:
	.ascii	"%dx^%d\000"
	.align	2
.LC14:
	.ascii	"%dx^%d + \000"
	.align	2
.LC15:
	.ascii	"x^%d + \000"
	.align	2
.LC16:
	.ascii	"%dx + \000"
	.text
	.align	2
	.global	displayPolynomial
	.syntax unified
	.arm
	.fpu softvfp
	.type	displayPolynomial, %function
displayPolynomial:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	b	.L15
.L23:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L16
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L24
	bl	printf
	b	.L14
.L16:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L18
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L18
	mov	r0, #48
	bl	putchar
	b	.L14
.L18:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L19
	ldr	r3, [fp, #-8]
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r0, .L24+4
	bl	printf
	b	.L14
.L19:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #1
	beq	.L20
	ldr	r3, [fp, #-8]
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r0, .L24+8
	bl	printf
.L20:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L21
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L24+12
	bl	printf
.L21:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L22
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #1
	bne	.L22
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L24+16
	bl	printf
.L22:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
.L15:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L23
.L14:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC7
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.size	displayPolynomial, .-displayPolynomial
	.align	2
	.global	delList
	.syntax unified
	.arm
	.fpu softvfp
	.type	delList, %function
delList:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	b	.L27
.L28:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r0, [fp, #-8]
	bl	free
.L27:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L28
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	delList, .-delList
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
