	.file	"570445.c"
	.intel_syntax noprefix
	.text
	.globl	stk
	.bss
	.align 16
	.type	stk, @object
	.size	stk, 24
stk:
	.zero	24
	.globl	top
	.data
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.long	-1
	.section	.rodata
	.align 8
.LC0:
	.string	"\nEnter the number of elements in the array:"
.LC1:
	.string	"%d"
	.align 8
.LC2:
	.string	"\nEnter the elements of the array sequentially:"
.LC3:
	.string	"\nThe reversed array is:"
.LC4:
	.string	"\n%d"
	.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -44[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -40[rbp], 0
	jmp	.L2
.L3:
	lea	rdx, -32[rbp]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -40[rbp], 1
.L2:
	mov	eax, DWORD PTR -44[rbp]
	cmp	DWORD PTR -40[rbp], eax
	jl	.L3
	mov	DWORD PTR -40[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	mov	edi, eax
	call	push
	add	DWORD PTR -40[rbp], 1
.L4:
	mov	eax, DWORD PTR -44[rbp]
	cmp	DWORD PTR -40[rbp], eax
	jl	.L5
	mov	DWORD PTR -40[rbp], 0
	jmp	.L6
.L7:
	mov	eax, 0
	call	pop
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	mov	edx, DWORD PTR -36[rbp]
	mov	DWORD PTR -32[rbp+rax*4], edx
	add	DWORD PTR -40[rbp], 1
.L6:
	mov	eax, DWORD PTR -44[rbp]
	cmp	DWORD PTR -40[rbp], eax
	jl	.L7
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -40[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -40[rbp], 1
.L8:
	mov	eax, DWORD PTR -44[rbp]
	cmp	DWORD PTR -40[rbp], eax
	jl	.L9
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC5:
	.string	"\nSTACK 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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR top[rip]
	cmp	eax, 5
	jne	.L13
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L13:
	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, stk[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	push, .-push
	.section	.rodata
.LC6:
	.string	"\nSTACK 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
	mov	eax, DWORD PTR top[rip]
	cmp	eax, -1
	jne	.L15
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	mov	eax, DWORD PTR top[rip]
	lea	edx, -1[rax]
	mov	DWORD PTR top[rip], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, stk[rip]
	mov	eax, DWORD PTR [rdx+rax]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pop, .-pop
	.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	"570445.c"
	.text
	.comm	stk,24,4
	.global	top
	.data
	.align	2
	.type	top, %object
	.size	top, 4
top:
	.word	-1
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012Enter the number of elements in the array:\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"\012Enter the elements of the array sequentially:\000"
	.align	2
.LC3:
	.ascii	"\012The reversed array is:\000"
	.align	2
.LC4:
	.ascii	"\012%d\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 = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L12+4
	bl	printf
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L12+8
	bl	__isoc99_scanf
	ldr	r0, .L12+12
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L2
.L3:
	sub	r2, fp, #32
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L12+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L2:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L3
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L4
.L5:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-28]
	mov	r0, r3
	bl	push
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L4:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L5
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L6
.L7:
	bl	pop
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	str	r2, [r3, #-28]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L6:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L7
	ldr	r0, .L12+16
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L8
.L9:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-28]
	mov	r1, r3
	ldr	r0, .L12+20
	bl	printf
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L8:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L9
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.section	.rodata
	.align	2
.LC6:
	.ascii	"\012STACK OVERFLOW\000"
	.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
	str	r0, [fp, #-8]
	ldr	r3, .L16
	ldr	r3, [r3]
	cmp	r3, #5
	bne	.L15
	ldr	r0, .L16+4
	bl	printf
.L15:
	ldr	r3, .L16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L16
	str	r3, [r2]
	ldr	r3, .L16
	ldr	r3, [r3]
	ldr	r1, .L16+8
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	top
	.word	.LC6
	.word	stk
	.size	push, .-push
	.section	.rodata
	.align	2
.LC7:
	.ascii	"\012STACK UNDERFLOW\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, .L21
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L19
	ldr	r0, .L21+4
	bl	printf
.L19:
	ldr	r3, .L21
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r1, .L21
	str	r2, [r1]
	ldr	r2, .L21+8
	ldr	r3, [r2, r3, lsl #2]
	mov	r0, r3
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	top
	.word	.LC7
	.word	stk
	.size	pop, .-pop
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
