	.file	"869370.c"
	.intel_syntax noprefix
	.text
	.globl	top
	.data
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.long	-1
	.globl	stack
	.bss
	.align 16
	.type	stack, @object
	.size	stack, 20
stack:
	.zero	20
	.section	.rodata
.LC0:
	.string	"\n*** Stack Menu ***"
	.align 8
.LC1:
	.string	"\n\n1.Push\n2.Pop\n3.Display\n4.Exit"
.LC2:
	.string	"\n\nEnter your choice(1-4):"
.LC3:
	.string	"%d"
.LC4:
	.string	"\nWrong Choice!!"
	.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L8:
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 4
	je	.L2
	cmp	eax, 4
	jg	.L3
	cmp	eax, 3
	je	.L4
	cmp	eax, 3
	jg	.L3
	cmp	eax, 1
	je	.L5
	cmp	eax, 2
	je	.L6
	jmp	.L3
.L5:
	mov	eax, 0
	call	push
	jmp	.L7
.L6:
	mov	eax, 0
	call	pop
	jmp	.L7
.L4:
	mov	eax, 0
	call	display
	jmp	.L7
.L2:
	mov	edi, 0
	call	exit@PLT
.L3:
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	jmp	.L8
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC5:
	.string	"\nStack is full!!"
.LC6:
	.string	"\nEnter element to push:"
	.text
	.globl	push
	.type	push, @function
push:
.LFB7:
	.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
	mov	eax, DWORD PTR top[rip]
	cmp	eax, 4
	jne	.L11
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L14
.L11:
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR top[rip]
	add	eax, 1
	mov	DWORD PTR top[rip], eax
	mov	edx, DWORD PTR top[rip]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, stack[rip]
	mov	DWORD PTR [rcx+rdx], eax
.L14:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	push, .-push
	.section	.rodata
.LC7:
	.string	"\nStack is empty!!"
.LC8:
	.string	"\nDeleted element is %d"
	.text
	.globl	pop
	.type	pop, @function
pop:
.LFB8:
	.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]
	cmp	eax, -1
	jne	.L16
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L18
.L16:
	mov	eax, DWORD PTR top[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, stack[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR top[rip]
	sub	eax, 1
	mov	DWORD PTR top[rip], eax
.L18:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pop, .-pop
	.section	.rodata
.LC9:
	.string	"\nStack is..."
.LC10:
	.string	"%d\n"
	.text
	.globl	display
	.type	display, @function
display:
.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	eax, DWORD PTR top[rip]
	cmp	eax, -1
	jne	.L20
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L24
.L20:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	eax, DWORD PTR top[rip]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L22
.L23:
	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, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	sub	DWORD PTR -4[rbp], 1
.L22:
	cmp	DWORD PTR -4[rbp], 0
	jns	.L23
.L24:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	display, .-display
	.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	"869370.c"
	.text
	.global	top
	.data
	.align	2
	.type	top, %object
	.size	top, 4
top:
	.word	-1
	.comm	stack,20,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012*** Stack Menu ***\000"
	.align	2
.LC1:
	.ascii	"\012\0121.Push\0122.Pop\0123.Display\0124.Exit\000"
	.align	2
.LC2:
	.ascii	"\012\012Enter your choice(1-4):\000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"\012Wrong Choice!!\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 = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L9:
	ldr	r0, .L11+4
	bl	printf
	ldr	r0, .L11+8
	bl	printf
	ldr	r0, .L11+12
	bl	printf
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L11+16
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L7:
	bl	push
	b	.L8
.L6:
	bl	pop
	b	.L8
.L5:
	bl	display
	b	.L8
.L3:
	mov	r0, #0
	bl	exit
.L2:
	ldr	r0, .L11+20
	bl	printf
.L8:
	b	.L9
.L12:
	.align	2
.L11:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.section	.rodata
	.align	2
.LC6:
	.ascii	"\012Stack is full!!\000"
	.align	2
.LC7:
	.ascii	"\012Enter element to push:\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	push
	.syntax unified
	.arm
	.fpu softvfp
	.type	push, %function
push:
	@ 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	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L18+4
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L14
	ldr	r0, .L18+8
	bl	printf
	b	.L17
.L14:
	ldr	r0, .L18+12
	bl	printf
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L18+16
	bl	__isoc99_scanf
	ldr	r3, .L18+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L18+4
	str	r3, [r2]
	ldr	r3, .L18+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L18+20
	str	r2, [r1, r3, lsl #2]
.L17:
	nop
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC8
	.word	top
	.word	.LC6
	.word	.LC7
	.word	.LC3
	.word	stack
	.size	push, .-push
	.section	.rodata
	.align	2
.LC9:
	.ascii	"\012Stack is empty!!\000"
	.align	2
.LC10:
	.ascii	"\012Deleted element is %d\000"
	.text
	.align	2
	.global	pop
	.syntax unified
	.arm
	.fpu softvfp
	.type	pop, %function
pop:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L24
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L21
	ldr	r0, .L24+4
	bl	printf
	b	.L23
.L21:
	ldr	r3, .L24
	ldr	r3, [r3]
	ldr	r2, .L24+8
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L24+12
	bl	printf
	ldr	r3, .L24
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L24
	str	r3, [r2]
.L23:
	nop
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	top
	.word	.LC9
	.word	stack
	.word	.LC10
	.size	pop, .-pop
	.section	.rodata
	.align	2
.LC11:
	.ascii	"\012Stack is...\000"
	.align	2
.LC12:
	.ascii	"%d\012\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	r3, .L32
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L27
	ldr	r0, .L32+4
	bl	printf
	b	.L31
.L27:
	ldr	r0, .L32+8
	bl	puts
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L29
.L30:
	ldr	r2, .L32+12
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L32+16
	bl	printf
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L29:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L30
.L31:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	top
	.word	.LC9
	.word	.LC11
	.word	stack
	.word	.LC12
	.size	display, .-display
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
