	.file	"37770.c"
	.intel_syntax noprefix
	.text
	.globl	maxSize
	.bss
	.align 4
	.type	maxSize, @object
	.size	maxSize, 4
maxSize:
	.zero	4
	.text
	.globl	isEmpty
	.type	isEmpty, @function
isEmpty:
.LFB6:
	.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
	cmp	DWORD PTR -4[rbp], -1
	sete	al
	movzx	eax, al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	isEmpty, .-isEmpty
	.section	.rodata
.LC0:
	.string	"\nStack is Empty!"
.LC1:
	.string	"Stack -> "
.LC2:
	.string	" %d"
	.text
	.globl	display
	.type	display, @function
display:
.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	isEmpty
	test	eax, eax
	je	.L4
	lea	rdi, .LC0[rip]
	call	puts@PLT
	jmp	.L3
.L4:
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L6
.L7:
	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, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L6:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jle	.L7
	mov	edi, 10
	call	putchar@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	display, .-display
	.section	.rodata
.LC3:
	.string	"\nStack full!"
	.text
	.globl	push
	.type	push, @function
push:
.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, 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]
	mov	edx, DWORD PTR maxSize[rip]
	sub	edx, 1
	cmp	eax, edx
	jl	.L9
	lea	rdi, .LC3[rip]
	call	puts@PLT
	jmp	.L8
.L9:
	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
	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	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rdx], eax
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	push, .-push
	.globl	pop
	.type	pop, @function
pop:
.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
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	isEmpty
	test	eax, eax
	je	.L12
	lea	rdi, .LC0[rip]
	call	puts@PLT
	jmp	.L11
.L12:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	lea	ecx, -1[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	DWORD PTR [rdx], ecx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	pop, .-pop
	.globl	reverseStack
	.type	reverseStack, @function
reverseStack:
.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
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L16
.L17:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	pop
	mov	edx, eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rcx, 8[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rcx
	mov	rdi, rax
	call	push
	add	DWORD PTR -8[rbp], 1
.L16:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jle	.L17
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR 8[rax], edx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	reverseStack, .-reverseStack
	.section	.rodata
.LC4:
	.string	"Enter max size of stack: "
.LC5:
	.string	"%d"
.LC6:
	.string	"Enter element to enter: "
	.align 8
.LC7:
	.string	"Press 1 to continue or 0 to exit: "
.LC8:
	.string	"Intial stack: "
.LC9:
	.string	"The reversed stack: "
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -40[rbp], -1
	mov	DWORD PTR -24[rbp], -1
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, maxSize[rip]
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR maxSize[rip]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -48[rbp], rax
	mov	eax, DWORD PTR maxSize[rip]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
.L21:
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -52[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, -48[rbp]
	add	rcx, 8
	mov	rsi, rcx
	mov	rdi, rax
	call	push
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -52[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -52[rbp]
	test	eax, eax
	je	.L24
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR maxSize[rip]
	cmp	edx, eax
	jl	.L21
	jmp	.L20
.L24:
	nop
.L20:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	display
	lea	rdx, -32[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	reverseStack
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	edx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	display
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	"37770.c"
	.text
	.global	maxSize
	.bss
	.align	2
	.type	maxSize, %object
	.size	maxSize, 4
maxSize:
	.space	4
	.text
	.align	2
	.global	isEmpty
	.syntax unified
	.arm
	.fpu softvfp
	.type	isEmpty, %function
isEmpty:
	@ 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]
	cmn	r3, #1
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	isEmpty, .-isEmpty
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012Stack is Empty!\000"
	.align	2
.LC1:
	.ascii	"Stack -> \000"
	.align	2
.LC2:
	.ascii	" %d\000"
	.text
	.align	2
	.global	display
	.syntax unified
	.arm
	.fpu softvfp
	.type	display, %function
display:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	isEmpty
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r0, .L8
	bl	puts
	b	.L3
.L4:
	ldr	r0, .L8+4
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L6
.L7:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L8+8
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L6:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	ble	.L7
	mov	r0, #10
	bl	putchar
.L3:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	display, .-display
	.section	.rodata
	.align	2
.LC3:
	.ascii	"\012Stack 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]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, .L13
	ldr	r3, [r3]
	sub	r3, r3, #1
	cmp	r2, r3
	blt	.L11
	ldr	r0, .L13+4
	bl	puts
	b	.L10
.L11:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3]
.L10:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	maxSize
	.word	.LC3
	.size	push, .-push
	.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
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r0, r3
	bl	isEmpty
	mov	r3, r0
	cmp	r3, #0
	beq	.L16
	ldr	r0, .L19
	bl	puts
	b	.L15
.L16:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	sub	r1, r3, #1
	ldr	r2, [fp, #-12]
	str	r1, [r2]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r3]
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC0
	.size	pop, .-pop
	.align	2
	.global	reverseStack
	.syntax unified
	.arm
	.fpu softvfp
	.type	reverseStack, %function
reverseStack:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L22
.L23:
	ldr	r3, [fp, #-28]
	ldr	r4, [r3]
	ldr	r3, [fp, #-28]
	add	r5, r3, #4
	ldr	r3, [fp, #-24]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	pop
	mov	r3, r0
	mov	r2, r3
	mov	r1, r5
	mov	r0, r4
	bl	push
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L22:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L23
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	reverseStack, .-reverseStack
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Enter max size of stack: \000"
	.align	2
.LC5:
	.ascii	"%d\000"
	.align	2
.LC6:
	.ascii	"Enter element to enter: \000"
	.align	2
.LC7:
	.ascii	"Press 1 to continue or 0 to exit: \000"
	.align	2
.LC8:
	.ascii	"Intial stack: \000"
	.align	2
.LC9:
	.ascii	"The reversed stack: \000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-20]
	mvn	r3, #0
	str	r3, [fp, #-12]
	ldr	r0, .L31+4
	bl	printf
	ldr	r1, .L31+8
	ldr	r0, .L31+12
	bl	__isoc99_scanf
	ldr	r3, .L31+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, .L31+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
.L27:
	ldr	r0, .L31+16
	bl	printf
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L31+12
	bl	__isoc99_scanf
	ldr	r0, [fp, #-24]
	ldr	r2, [fp, #-28]
	sub	r3, fp, #24
	add	r3, r3, #4
	mov	r1, r3
	bl	push
	ldr	r0, .L31+20
	bl	printf
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L31+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L30
	ldr	r2, [fp, #-20]
	ldr	r3, .L31+8
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L27
	b	.L26
.L30:
	nop
.L26:
	ldr	r0, .L31+24
	bl	puts
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	mov	r1, r2
	mov	r0, r3
	bl	display
	sub	r2, fp, #16
	sub	r3, fp, #24
	mov	r1, r2
	mov	r0, r3
	bl	reverseStack
	ldr	r0, .L31+28
	bl	puts
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	mov	r1, r2
	mov	r0, r3
	bl	display
	mov	r3, #0
	ldr	r2, .L31
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC10
	.word	.LC4
	.word	maxSize
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
