	.file	"161080437.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"The stack is already full. "
	.text
	.globl	push
	.type	push, @function
push:
.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, 32
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	DWORD PTR -8[rbp], ecx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	jne	.L2
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L4
	lea	rdi, .LC0[rip]
	call	puts@PLT
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
.L3:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	push, .-push
	.section	.rodata
.LC1:
	.string	"The stack is empty. "
.LC2:
	.string	"Element popped: %d \n"
	.text
	.globl	pop
	.type	pop, @function
pop:
.LFB1:
	.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 -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	jne	.L6
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -20[rbp]
	sub	edx, 1
	cmp	eax, edx
	jne	.L8
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], -1
	jmp	.L7
.L8:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], edx
.L7:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	pop, .-pop
	.section	.rodata
.LC3:
	.string	"Stack is empty"
.LC4:
	.string	"%d\n"
	.text
	.globl	traverse
	.type	traverse, @function
traverse:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	jne	.L10
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	sub	DWORD PTR -4[rbp], 1
.L12:
	cmp	DWORD PTR -4[rbp], -1
	jge	.L13
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	traverse, .-traverse
	.section	.rodata
	.align 8
.LC5:
	.string	"Select 1 for push operation \nSelect 2 for pop operation \nSelect 3 for traverse operation"
.LC6:
	.string	"Enter the value of n:"
.LC7:
	.string	"%d"
.LC8:
	.string	"Enter value to be pushed: "
.LC9:
	.string	"Element on top: %d\n"
.LC10:
	.string	"Element on top: %c\n"
.LC11:
	.string	"Top: %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	DWORD PTR -44[rbp], 4
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -40[rbp], rdx
	movsx	rdx, eax
	mov	r8, rdx
	mov	r9d, 0
	movsx	rdx, eax
	mov	rsi, rdx
	mov	edi, 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	edi, 16
	mov	edx, 0
	div	rdi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L15:
	cmp	rsp, rdx
	je	.L16
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L15
.L16:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L17
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L17:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -48[rbp], -1
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -52[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -52[rbp]
	cmp	eax, 3
	je	.L18
	cmp	eax, 3
	jg	.L25
	cmp	eax, 1
	je	.L20
	cmp	eax, 2
	je	.L21
	jmp	.L25
.L20:
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -56[rbp]
	mov	ecx, DWORD PTR -44[rbp]
	lea	rdx, -48[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	edi, eax
	call	push
	mov	edx, DWORD PTR -48[rbp]
	mov	rax, QWORD PTR -32[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -56[rbp]
	mov	ecx, DWORD PTR -44[rbp]
	lea	rdx, -48[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	edi, eax
	call	push
	mov	edx, DWORD PTR -48[rbp]
	mov	rax, QWORD PTR -32[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L22
.L21:
	mov	edx, DWORD PTR -44[rbp]
	lea	rcx, -48[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	pop
	mov	edx, DWORD PTR -48[rbp]
	mov	rax, QWORD PTR -32[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -44[rbp]
	lea	rcx, -48[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	pop
	mov	eax, DWORD PTR -48[rbp]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -44[rbp]
	lea	rcx, -48[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	pop
	jmp	.L22
.L18:
	mov	edx, DWORD PTR -44[rbp]
	lea	rcx, -48[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	traverse
	jmp	.L22
.L25:
	nop
.L22:
	mov	eax, 0
	mov	rsp, rbx
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.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	"161080437.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"The stack is already full. \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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L2
	ldr	r3, [fp, #-20]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	b	.L3
.L2:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L5
	bl	puts
	b	.L3
.L4:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3]
.L3:
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.size	push, .-push
	.section	.rodata
	.align	2
.LC1:
	.ascii	"The stack is empty. \000"
	.align	2
.LC2:
	.ascii	"Element popped: %d \012\000"
	.text
	.align	2
	.global	pop
	.syntax unified
	.arm
	.fpu softvfp
	.type	pop, %function
pop:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L11
	bl	puts
	b	.L9
.L8:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+4
	bl	printf
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	cmp	r2, r3
	bne	.L10
	ldr	r3, [fp, #-12]
	mvn	r2, #0
	str	r2, [r3]
	b	.L9
.L10:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-12]
	str	r2, [r3]
.L9:
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC1
	.word	.LC2
	.size	pop, .-pop
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Stack is empty\000"
	.align	2
.LC4:
	.ascii	"%d\012\000"
	.text
	.align	2
	.global	traverse
	.syntax unified
	.arm
	.fpu softvfp
	.type	traverse, %function
traverse:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L14
	ldr	r0, .L18
	bl	printf
	b	.L15
.L14:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L16
.L17:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L18+4
	bl	printf
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L16:
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bge	.L17
.L15:
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC3
	.word	.LC4
	.size	traverse, .-traverse
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Select 1 for push operation \012Select 2 for pop op"
	.ascii	"eration \012Select 3 for traverse operation\000"
	.align	2
.LC6:
	.ascii	"Enter the value of n:\000"
	.align	2
.LC7:
	.ascii	"%d\000"
	.align	2
.LC8:
	.ascii	"Enter value to be pushed: \000"
	.align	2
.LC9:
	.ascii	"Element on top: %d\012\000"
	.align	2
.LC10:
	.ascii	"Element on top: %c\012\000"
	.align	2
.LC11:
	.ascii	"Top: %d\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	mov	r3, #4
	str	r3, [fp, #-28]
	ldr	ip, [fp, #-28]
	sub	r3, ip, #1
	str	r3, [fp, #-24]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-20]
	mvn	r3, #0
	str	r3, [fp, #-32]
	ldr	r0, .L29+4
	bl	puts
	ldr	r0, .L29+8
	bl	printf
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L29+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-36]
	cmp	r3, #3
	beq	.L21
	cmp	r3, #3
	bgt	.L28
	cmp	r3, #1
	beq	.L23
	cmp	r3, #2
	beq	.L24
	b	.L28
.L23:
	ldr	r0, .L29+16
	bl	printf
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L29+12
	bl	__isoc99_scanf
	ldr	r0, [fp, #-40]
	sub	r2, fp, #32
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #-20]
	bl	push
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L29+20
	bl	printf
	ldr	r0, .L29+16
	bl	printf
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L29+12
	bl	__isoc99_scanf
	ldr	r0, [fp, #-40]
	sub	r2, fp, #32
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #-20]
	bl	push
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L29+20
	bl	printf
	b	.L25
.L24:
	sub	r3, fp, #32
	ldr	r2, [fp, #-28]
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	pop
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L29+24
	bl	printf
	sub	r3, fp, #32
	ldr	r2, [fp, #-28]
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	pop
	ldr	r3, [fp, #-32]
	mov	r1, r3
	ldr	r0, .L29+28
	bl	printf
	sub	r3, fp, #32
	ldr	r2, [fp, #-28]
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	pop
	b	.L25
.L21:
	sub	r3, fp, #32
	ldr	r2, [fp, #-28]
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	traverse
	b	.L25
.L28:
	nop
.L25:
	mov	r3, #0
	mov	sp, r4
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L27
	bl	__stack_chk_fail
.L27:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC12
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
