	.file	"677098.c"
	.intel_syntax noprefix
	.text
	.globl	top
	.bss
	.align 8
	.type	top, @object
	.size	top, 8
top:
	.zero	8
	.section	.rodata
.LC0:
	.string	"1.Push"
.LC1:
	.string	"2.Pop"
.LC2:
	.string	"3.Display item at the top"
	.align 8
.LC3:
	.string	"4.Display all items of the stack"
.LC4:
	.string	"5.Quit"
.LC5:
	.string	"Enter your choice: "
.LC6:
	.string	"%d"
.LC7:
	.string	"Enter the item to be pushed: "
.LC8:
	.string	"Popped item is: %d\n"
.LC9:
	.string	"Item at the top is %d\n"
.LC10:
	.string	"Wrong 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
.L10:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	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]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, 5
	ja	.L2
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L4[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L4[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L2-.L4
	.long	.L8-.L4
	.long	.L7-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
.L8:
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	push
	jmp	.L9
.L7:
	mov	eax, 0
	call	pop
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L6:
	mov	eax, 0
	call	peek
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L5:
	mov	eax, 0
	call	display
	jmp	.L9
.L3:
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rdi, .LC10[rip]
	call	puts@PLT
.L9:
	jmp	.L10
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC11:
	.string	"Stack Overflow"
	.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L13
	lea	rdi, .LC11[rip]
	call	puts@PLT
	jmp	.L12
.L13:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	rdx, QWORD PTR top[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR top[rip], rax
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	push, .-push
	.section	.rodata
.LC12:
	.string	"Stack Underflow"
	.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
	sub	rsp, 16
	mov	eax, 0
	call	isEmpty
	test	eax, eax
	je	.L16
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	rax, QWORD PTR top[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR top[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR top[rip], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pop, .-pop
	.globl	peek
	.type	peek, @function
peek:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	isEmpty
	test	eax, eax
	je	.L19
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	mov	rax, QWORD PTR top[rip]
	mov	eax, DWORD PTR [rax]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	peek, .-peek
	.globl	isEmpty
	.type	isEmpty, @function
isEmpty:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR top[rip]
	test	rax, rax
	jne	.L22
	mov	eax, 1
	jmp	.L23
.L22:
	mov	eax, 0
.L23:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	isEmpty, .-isEmpty
	.section	.rodata
.LC13:
	.string	"Stack is empty"
.LC14:
	.string	"Stack elements: "
.LC15:
	.string	" %d\n"
	.text
	.globl	display
	.type	display, @function
display:
.LFB11:
	.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 top[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, 0
	call	isEmpty
	test	eax, eax
	je	.L25
	lea	rdi, .LC13[rip]
	call	puts@PLT
	jmp	.L24
.L25:
	lea	rdi, .LC14[rip]
	call	puts@PLT
	jmp	.L27
.L28:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
.L27:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L28
	mov	edi, 10
	call	putchar@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	"677098.c"
	.text
	.global	top
	.bss
	.align	2
	.type	top, %object
	.size	top, 4
top:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"1.Push\000"
	.align	2
.LC1:
	.ascii	"2.Pop\000"
	.align	2
.LC2:
	.ascii	"3.Display item at the top\000"
	.align	2
.LC3:
	.ascii	"4.Display all items of the stack\000"
	.align	2
.LC4:
	.ascii	"5.Quit\000"
	.align	2
.LC5:
	.ascii	"Enter your choice: \000"
	.align	2
.LC6:
	.ascii	"%d\000"
	.align	2
.LC7:
	.ascii	"Enter the item to be pushed: \000"
	.align	2
.LC8:
	.ascii	"Popped item is: %d\012\000"
	.align	2
.LC9:
	.ascii	"Item at the top is %d\012\000"
	.align	2
.LC10:
	.ascii	"Wrong choice\000"
	.align	2
.LC11:
	.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, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L10:
	ldr	r0, .L12+4
	bl	puts
	ldr	r0, .L12+8
	bl	puts
	ldr	r0, .L12+12
	bl	puts
	ldr	r0, .L12+16
	bl	puts
	ldr	r0, .L12+20
	bl	puts
	ldr	r0, .L12+24
	bl	printf
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L12+28
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L8:
	ldr	r0, .L12+32
	bl	printf
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L12+28
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	push
	b	.L9
.L7:
	bl	pop
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L12+36
	bl	printf
	b	.L9
.L6:
	bl	peek
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L12+40
	bl	printf
.L5:
	bl	display
	b	.L9
.L3:
	mov	r0, #1
	bl	exit
.L2:
	ldr	r0, .L12+44
	bl	puts
.L9:
	b	.L10
.L13:
	.align	2
.L12:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.section	.rodata
	.align	2
.LC12:
	.ascii	"Stack Overflow\000"
	.text
	.align	2
	.global	push
	.syntax unified
	.arm
	.fpu softvfp
	.type	push, %function
push:
	@ 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]
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L15
	ldr	r0, .L17
	bl	puts
	b	.L14
.L15:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, .L17+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r2, .L17+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
.L14:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC12
	.word	top
	.size	push, .-push
	.section	.rodata
	.align	2
.LC13:
	.ascii	"Stack Underflow\000"
	.text
	.align	2
	.global	pop
	.syntax unified
	.arm
	.fpu softvfp
	.type	pop, %function
pop:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	isEmpty
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	ldr	r0, .L22
	bl	puts
	mov	r0, #1
	bl	exit
.L20:
	ldr	r3, .L22+4
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, .L22+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r2, .L22+4
	str	r3, [r2]
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC13
	.word	top
	.size	pop, .-pop
	.align	2
	.global	peek
	.syntax unified
	.arm
	.fpu softvfp
	.type	peek, %function
peek:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	isEmpty
	mov	r3, r0
	cmp	r3, #0
	beq	.L25
	ldr	r0, .L27
	bl	puts
	mov	r0, #1
	bl	exit
.L25:
	ldr	r3, .L27+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r0, r3
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC13
	.word	top
	.size	peek, .-peek
	.align	2
	.global	isEmpty
	.syntax unified
	.arm
	.fpu softvfp
	.type	isEmpty, %function
isEmpty:
	@ 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, .L32
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L30
	mov	r3, #1
	b	.L31
.L30:
	mov	r3, #0
.L31:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L33:
	.align	2
.L32:
	.word	top
	.size	isEmpty, .-isEmpty
	.section	.rodata
	.align	2
.LC14:
	.ascii	"Stack is empty\000"
	.align	2
.LC15:
	.ascii	"Stack elements: \000"
	.align	2
.LC16:
	.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, .L39
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	bl	isEmpty
	mov	r3, r0
	cmp	r3, #0
	beq	.L35
	ldr	r0, .L39+4
	bl	puts
	b	.L34
.L35:
	ldr	r0, .L39+8
	bl	puts
	b	.L37
.L38:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L39+12
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
.L37:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L38
	mov	r0, #10
	bl	putchar
.L34:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	top
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.size	display, .-display
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
