	.file	"410416.c"
	.intel_syntax noprefix
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	top
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.globl	Stack
	.align 32
	.type	Stack, @object
	.size	Stack, 320040
Stack:
	.zero	320040
	.globl	res
	.align 8
	.type	res, @object
	.size	res, 8
res:
	.zero	8
	.text
	.globl	Is_Empty
	.type	Is_Empty, @function
Is_Empty:
.LFB0:
	.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]
	test	eax, eax
	sete	al
	movzx	eax, al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Is_Empty, .-Is_Empty
	.globl	Push
	.type	Push, @function
Push:
.LFB1:
	.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
	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, Stack[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	Push, .-Push
	.globl	Pop
	.type	Pop, @function
Pop:
.LFB2:
	.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]
	sub	eax, 1
	mov	DWORD PTR top[rip], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	Pop, .-Pop
	.globl	Top
	.type	Top, @function
Top:
.LFB3:
	.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]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, Stack[rip]
	mov	eax, DWORD PTR [rdx+rax]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	Top, .-Top
	.globl	Size
	.type	Size, @function
Size:
.LFB4:
	.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]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	Size, .-Size
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB5:
	.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
	lea	rsi, N[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L10
.L14:
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L11
.L13:
	mov	eax, 0
	call	Pop
.L11:
	mov	eax, 0
	call	Is_Empty
	test	eax, eax
	jne	.L12
	mov	eax, 0
	call	Top
	mov	edx, DWORD PTR -16[rbp]
	cmp	eax, edx
	jle	.L13
.L12:
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	Push
	mov	eax, 0
	call	Size
	sub	eax, 1
	movsx	rdx, eax
	mov	rax, QWORD PTR res[rip]
	add	rax, rdx
	mov	QWORD PTR res[rip], rax
	add	DWORD PTR -12[rbp], 1
.L10:
	mov	eax, DWORD PTR N[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L14
	mov	rax, QWORD PTR res[rip]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.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	"410416.c"
	.text
	.comm	N,4,4
	.comm	top,4,4
	.comm	Stack,320040,4
	.comm	res,8,8
	.align	2
	.global	Is_Empty
	.syntax unified
	.arm
	.fpu softvfp
	.type	Is_Empty, %function
Is_Empty:
	@ 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, .L3
	ldr	r3, [r3]
	cmp	r3, #0
	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
.L4:
	.align	2
.L3:
	.word	top
	.size	Is_Empty, .-Is_Empty
	.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
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, .L6
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L6
	str	r3, [r2]
	ldr	r3, .L6
	ldr	r3, [r3]
	ldr	r1, .L6+4
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L7:
	.align	2
.L6:
	.word	top
	.word	Stack
	.size	Push, .-Push
	.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
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L9
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L9
	str	r3, [r2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L10:
	.align	2
.L9:
	.word	top
	.size	Pop, .-Pop
	.align	2
	.global	Top
	.syntax unified
	.arm
	.fpu softvfp
	.type	Top, %function
Top:
	@ 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, .L13
	ldr	r3, [r3]
	ldr	r2, .L13+4
	ldr	r3, [r2, r3, lsl #2]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L14:
	.align	2
.L13:
	.word	top
	.word	Stack
	.size	Top, .-Top
	.align	2
	.global	Size
	.syntax unified
	.arm
	.fpu softvfp
	.type	Size, %function
Size:
	@ 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, .L17
	ldr	r3, [r3]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L18:
	.align	2
.L17:
	.word	top
	.size	Size, .-Size
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"%lld\012\000"
	.align	2
.LC2:
	.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	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L27+4
	ldr	r0, .L27+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L20
.L24:
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L27+8
	bl	__isoc99_scanf
	b	.L21
.L23:
	bl	Pop
.L21:
	bl	Is_Empty
	mov	r3, r0
	cmp	r3, #0
	bne	.L22
	bl	Top
	mov	r2, r0
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	ble	.L23
.L22:
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	Push
	bl	Size
	mov	r3, r0
	sub	r3, r3, #1
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L27+12
	ldmia	r3, {r2-r3}
	adds	r4, r0, r2
	adc	r5, r1, r3
	ldr	r3, .L27+12
	stm	r3, {r4-r5}
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L20:
	ldr	r3, .L27+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L24
	ldr	r3, .L27+12
	ldmia	r3, {r2-r3}
	ldr	r0, .L27+16
	bl	printf
	mov	r3, #0
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC2
	.word	N
	.word	.LC0
	.word	res
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
