	.file	"760181.c"
	.intel_syntax noprefix
	.text
	.globl	top
	.data
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.long	-1
	.globl	size
	.bss
	.align 4
	.type	size, @object
	.size	size, 4
size:
	.zero	4
	.globl	stack
	.align 32
	.type	stack, @object
	.size	stack, 400
stack:
	.zero	400
	.section	.rodata
	.align 8
.LC0:
	.string	"What is the size of the stack?"
.LC1:
	.string	"%d"
	.align 8
.LC2:
	.string	"\n\nEnter the number of your choice:"
.LC3:
	.string	"1. Insert"
.LC4:
	.string	"2. Delete"
.LC5:
	.string	"3. Display"
.LC6:
	.string	"4. Search"
.LC7:
	.string	"5. Exit"
.LC8:
	.string	"Stack overflow"
	.align 8
.LC9:
	.string	"Which element do you want to insert?"
.LC10:
	.string	"Stack underflow"
	.align 8
.LC11:
	.string	"Which element do you want to search for?"
.LC12:
	.string	"Invalid Input"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rsi, size[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -16[rbp], 0
	jmp	.L2
.L11:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, 1
	jne	.L3
	mov	eax, DWORD PTR size[rip]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR top[rip]
	cmp	edx, eax
	jne	.L4
	lea	rdi, .LC8[rip]
	call	puts@PLT
	jmp	.L2
.L4:
	mov	DWORD PTR -12[rbp], 0
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	insert
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, 2
	jne	.L5
	mov	eax, DWORD PTR top[rip]
	test	eax, eax
	jns	.L6
	lea	rdi, .LC10[rip]
	call	puts@PLT
	jmp	.L2
.L6:
	mov	eax, 0
	call	delete
	jmp	.L2
.L5:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, 3
	jne	.L7
	mov	eax, 0
	call	display
	jmp	.L2
.L7:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, 4
	jne	.L8
	mov	DWORD PTR -12[rbp], 0
	lea	rdi, .LC11[rip]
	call	puts@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	search
	jmp	.L2
.L8:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, 5
	je	.L13
	lea	rdi, .LC12[rip]
	call	puts@PLT
	nop
.L2:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, 5
	jne	.L11
	jmp	.L10
.L13:
	nop
.L10:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	insert
	.type	insert, @function
insert:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR top[rip]
	add	eax, 1
	mov	DWORD PTR top[rip], eax
	mov	eax, DWORD PTR top[rip]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, stack[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	insert, .-insert
	.globl	delete
	.type	delete, @function
delete:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR top[rip]
	sub	eax, 1
	mov	DWORD PTR top[rip], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	delete, .-delete
	.section	.rodata
.LC13:
	.string	"Stack:"
.LC14:
	.string	"Empty Stack"
.LC15:
	.string	"%d\t"
	.text
	.globl	display
	.type	display, @function
display:
.LFB3:
	.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
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	eax, DWORD PTR top[rip]
	test	eax, eax
	jns	.L17
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L21
.L17:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L19
.L20:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, stack[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L19:
	mov	eax, DWORD PTR top[rip]
	cmp	DWORD PTR -4[rbp], eax
	jle	.L20
	mov	edi, 10
	call	putchar@PLT
.L21:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	display, .-display
	.section	.rodata
.LC16:
	.string	"\n%d is present in the stack\n"
	.align 8
.LC17:
	.string	"\n%d is not present in the stack\n"
	.text
	.globl	search
	.type	search, @function
search:
.LFB4:
	.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -8[rbp], -1
	mov	DWORD PTR -4[rbp], 0
	jmp	.L23
.L26:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, stack[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L24
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -8[rbp], 1
	jmp	.L25
.L24:
	add	DWORD PTR -4[rbp], 1
.L23:
	mov	eax, DWORD PTR top[rip]
	cmp	DWORD PTR -4[rbp], eax
	jle	.L26
.L25:
	cmp	DWORD PTR -8[rbp], -1
	jne	.L28
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
.L28:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	search, .-search
	.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	"760181.c"
	.text
	.global	top
	.data
	.align	2
	.type	top, %object
	.size	top, 4
top:
	.word	-1
	.global	size
	.bss
	.align	2
	.type	size, %object
	.size	size, 4
size:
	.space	4
	.comm	stack,400,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"What is the size of the stack?\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"\012\012Enter the number of your choice:\000"
	.align	2
.LC3:
	.ascii	"1. Insert\000"
	.align	2
.LC4:
	.ascii	"2. Delete\000"
	.align	2
.LC5:
	.ascii	"3. Display\000"
	.align	2
.LC6:
	.ascii	"4. Search\000"
	.align	2
.LC7:
	.ascii	"5. Exit\000"
	.align	2
.LC8:
	.ascii	"Stack overflow\000"
	.align	2
.LC9:
	.ascii	"Which element do you want to insert?\000"
	.align	2
.LC10:
	.ascii	"Stack underflow\000"
	.align	2
.LC11:
	.ascii	"Which element do you want to search for?\000"
	.align	2
.LC12:
	.ascii	"Invalid Input\000"
	.align	2
.LC13:
	.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, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L14+4
	bl	puts
	ldr	r1, .L14+8
	ldr	r0, .L14+12
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L11:
	ldr	r0, .L14+16
	bl	puts
	ldr	r0, .L14+20
	bl	puts
	ldr	r0, .L14+24
	bl	puts
	ldr	r0, .L14+28
	bl	puts
	ldr	r0, .L14+32
	bl	puts
	ldr	r0, .L14+36
	bl	puts
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L14+12
	bl	__isoc99_scanf
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L3
	ldr	r3, .L14+8
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, .L14+40
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L4
	ldr	r0, .L14+44
	bl	puts
	b	.L2
.L4:
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r0, .L14+48
	bl	puts
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L14+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	insert
	b	.L2
.L3:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L5
	ldr	r3, .L14+40
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L14+52
	bl	puts
	b	.L2
.L6:
	bl	delete
	b	.L2
.L5:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	bne	.L7
	bl	display
	b	.L2
.L7:
	ldr	r3, [fp, #-16]
	cmp	r3, #4
	bne	.L8
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r0, .L14+56
	bl	puts
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L14+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	search
	b	.L2
.L8:
	ldr	r3, [fp, #-16]
	cmp	r3, #5
	beq	.L13
	ldr	r0, .L14+60
	bl	puts
	nop
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #5
	bne	.L11
	b	.L10
.L13:
	nop
.L10:
	nop
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC13
	.word	.LC0
	.word	size
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	top
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.align	2
	.global	insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert, %function
insert:
	@ 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, .L17
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L17
	str	r3, [r2]
	ldr	r3, .L17
	ldr	r3, [r3]
	ldr	r1, .L17+4
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L18:
	.align	2
.L17:
	.word	top
	.word	stack
	.size	insert, .-insert
	.align	2
	.global	delete
	.syntax unified
	.arm
	.fpu softvfp
	.type	delete, %function
delete:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L20
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L20
	str	r3, [r2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L21:
	.align	2
.L20:
	.word	top
	.size	delete, .-delete
	.section	.rodata
	.align	2
.LC14:
	.ascii	"Stack:\000"
	.align	2
.LC15:
	.ascii	"Empty Stack\000"
	.align	2
.LC16:
	.ascii	"%d\011\000"
	.text
	.align	2
	.global	display
	.syntax unified
	.arm
	.fpu softvfp
	.type	display, %function
display:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L28
	bl	puts
	ldr	r3, .L28+4
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L23
	ldr	r0, .L28+8
	bl	printf
	b	.L27
.L23:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L25
.L26:
	ldr	r2, .L28+12
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L28+16
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L25:
	ldr	r3, .L28+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L26
	mov	r0, #10
	bl	putchar
.L27:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	.LC14
	.word	top
	.word	.LC15
	.word	stack
	.word	.LC16
	.size	display, .-display
	.section	.rodata
	.align	2
.LC17:
	.ascii	"\012%d is present in the stack\012\000"
	.align	2
.LC18:
	.ascii	"\012%d is not present in the stack\012\000"
	.text
	.align	2
	.global	search
	.syntax unified
	.arm
	.fpu softvfp
	.type	search, %function
search:
	@ 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]
	mvn	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L31
.L34:
	ldr	r2, .L37
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L32
	ldr	r1, [fp, #-16]
	ldr	r0, .L37+4
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L33
.L32:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L31:
	ldr	r3, .L37+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L34
.L33:
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L36
	ldr	r1, [fp, #-16]
	ldr	r0, .L37+12
	bl	printf
.L36:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	stack
	.word	.LC17
	.word	top
	.word	.LC18
	.size	search, .-search
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
