	.file	"1005086.c"
	.intel_syntax noprefix
	.text
	.globl	sack
	.bss
	.align 32
	.type	sack, @object
	.size	sack, 18060000
sack:
	.zero	18060000
	.globl	ndep
	.align 2
	.type	ndep, @object
	.size	ndep, 2
ndep:
	.zero	2
	.globl	ects
	.align 2
	.type	ects, @object
	.size	ects, 2
ects:
	.zero	2
	.section	.rodata
.LC0:
	.string	"%hd %hd"
.LC1:
	.string	"%hd"
.LC2:
	.string	"%hd\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	WORD PTR -22[rbp], 0
	lea	rdx, ects[rip]
	lea	rsi, ndep[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	WORD PTR -16[rbp], 1
	jmp	.L2
.L16:
	lea	rax, -22[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	WORD PTR -12[rbp], 0
	jmp	.L3
.L15:
	lea	rdx, -18[rbp]
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	WORD PTR -12[rbp], 0
	jne	.L4
	mov	WORD PTR -14[rbp], 0
	jmp	.L5
.L9:
	movzx	eax, WORD PTR -20[rbp]
	cwde
	movsx	edx, WORD PTR -14[rbp]
	add	edx, 1
	cmp	eax, edx
	jne	.L6
	movsx	eax, WORD PTR -16[rbp]
	lea	edx, -1[rax]
	movsx	eax, WORD PTR -14[rbp]
	movsx	rcx, eax
	movsx	rax, edx
	imul	rax, rax, 30000
	add	rax, rcx
	lea	rdx, [rax+rax]
	lea	rax, sack[rip]
	movzx	edx, WORD PTR [rdx+rax]
	movzx	eax, WORD PTR -18[rbp]
	cmp	dx, ax
	jge	.L6
	movsx	edx, WORD PTR -16[rbp]
	movsx	ecx, WORD PTR -14[rbp]
	movzx	eax, WORD PTR -18[rbp]
	movsx	rcx, ecx
	movsx	rdx, edx
	imul	rdx, rdx, 30000
	add	rdx, rcx
	lea	rcx, [rdx+rdx]
	lea	rdx, sack[rip]
	mov	WORD PTR [rcx+rdx], ax
	jmp	.L7
.L6:
	movzx	eax, WORD PTR -20[rbp]
	cmp	WORD PTR -14[rbp], ax
	jl	.L8
	movsx	eax, WORD PTR -16[rbp]
	lea	edx, -1[rax]
	movsx	eax, WORD PTR -14[rbp]
	movsx	rcx, eax
	movsx	rax, edx
	imul	rax, rax, 30000
	add	rax, rcx
	lea	rdx, [rax+rax]
	lea	rax, sack[rip]
	movzx	eax, WORD PTR [rdx+rax]
	movsx	edx, WORD PTR -16[rbp]
	lea	esi, -1[rdx]
	movsx	edx, WORD PTR -14[rbp]
	movzx	ecx, WORD PTR -20[rbp]
	movsx	ecx, cx
	sub	edx, ecx
	movsx	rcx, edx
	movsx	rdx, esi
	imul	rdx, rdx, 30000
	add	rdx, rcx
	lea	rcx, [rdx+rdx]
	lea	rdx, sack[rip]
	movzx	edx, WORD PTR [rcx+rdx]
	mov	ecx, edx
	movzx	edx, WORD PTR -18[rbp]
	add	edx, ecx
	mov	WORD PTR -10[rbp], dx
	cmp	WORD PTR -10[rbp], ax
	jle	.L8
	movsx	eax, WORD PTR -16[rbp]
	movsx	edx, WORD PTR -14[rbp]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 30000
	add	rax, rdx
	lea	rcx, [rax+rax]
	lea	rdx, sack[rip]
	movzx	eax, WORD PTR -10[rbp]
	mov	WORD PTR [rcx+rdx], ax
	jmp	.L7
.L8:
	movsx	eax, WORD PTR -16[rbp]
	lea	esi, -1[rax]
	movsx	eax, WORD PTR -14[rbp]
	movsx	edx, WORD PTR -16[rbp]
	movsx	ecx, WORD PTR -14[rbp]
	movsx	rdi, eax
	movsx	rax, esi
	imul	rax, rax, 30000
	add	rax, rdi
	lea	rsi, [rax+rax]
	lea	rax, sack[rip]
	movzx	eax, WORD PTR [rsi+rax]
	movsx	rcx, ecx
	movsx	rdx, edx
	imul	rdx, rdx, 30000
	add	rdx, rcx
	lea	rcx, [rdx+rdx]
	lea	rdx, sack[rip]
	mov	WORD PTR [rcx+rdx], ax
.L7:
	movzx	eax, WORD PTR -14[rbp]
	add	eax, 1
	mov	WORD PTR -14[rbp], ax
.L5:
	movzx	eax, WORD PTR ects[rip]
	cmp	WORD PTR -14[rbp], ax
	jl	.L9
	jmp	.L10
.L4:
	mov	WORD PTR -14[rbp], 0
	jmp	.L11
.L14:
	movzx	eax, WORD PTR -20[rbp]
	cwde
	movsx	edx, WORD PTR -14[rbp]
	add	edx, 1
	cmp	eax, edx
	jne	.L12
	movsx	eax, WORD PTR -16[rbp]
	movsx	edx, WORD PTR -14[rbp]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 30000
	add	rax, rdx
	lea	rdx, [rax+rax]
	lea	rax, sack[rip]
	movzx	edx, WORD PTR [rdx+rax]
	movzx	eax, WORD PTR -18[rbp]
	cmp	dx, ax
	jge	.L12
	movsx	edx, WORD PTR -16[rbp]
	movsx	ecx, WORD PTR -14[rbp]
	movzx	eax, WORD PTR -18[rbp]
	movsx	rcx, ecx
	movsx	rdx, edx
	imul	rdx, rdx, 30000
	add	rdx, rcx
	lea	rcx, [rdx+rdx]
	lea	rdx, sack[rip]
	mov	WORD PTR [rcx+rdx], ax
	jmp	.L13
.L12:
	movzx	eax, WORD PTR -20[rbp]
	cmp	WORD PTR -14[rbp], ax
	jl	.L13
	movsx	eax, WORD PTR -16[rbp]
	movsx	edx, WORD PTR -14[rbp]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 30000
	add	rax, rdx
	lea	rdx, [rax+rax]
	lea	rax, sack[rip]
	movzx	eax, WORD PTR [rdx+rax]
	movsx	edx, WORD PTR -16[rbp]
	lea	esi, -1[rdx]
	movsx	edx, WORD PTR -14[rbp]
	movzx	ecx, WORD PTR -20[rbp]
	movsx	ecx, cx
	sub	edx, ecx
	movsx	rcx, edx
	movsx	rdx, esi
	imul	rdx, rdx, 30000
	add	rdx, rcx
	lea	rcx, [rdx+rdx]
	lea	rdx, sack[rip]
	movzx	edx, WORD PTR [rcx+rdx]
	mov	ecx, edx
	movzx	edx, WORD PTR -18[rbp]
	add	edx, ecx
	mov	WORD PTR -10[rbp], dx
	cmp	WORD PTR -10[rbp], ax
	jle	.L13
	movsx	eax, WORD PTR -16[rbp]
	movsx	edx, WORD PTR -14[rbp]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 30000
	add	rax, rdx
	lea	rcx, [rax+rax]
	lea	rdx, sack[rip]
	movzx	eax, WORD PTR -10[rbp]
	mov	WORD PTR [rcx+rdx], ax
.L13:
	movzx	eax, WORD PTR -14[rbp]
	add	eax, 1
	mov	WORD PTR -14[rbp], ax
.L11:
	movzx	eax, WORD PTR ects[rip]
	cmp	WORD PTR -14[rbp], ax
	jl	.L14
.L10:
	movzx	eax, WORD PTR -12[rbp]
	add	eax, 1
	mov	WORD PTR -12[rbp], ax
.L3:
	movzx	eax, WORD PTR -22[rbp]
	cmp	WORD PTR -12[rbp], ax
	jl	.L15
	movzx	eax, WORD PTR -16[rbp]
	add	eax, 1
	mov	WORD PTR -16[rbp], ax
.L2:
	movzx	eax, WORD PTR ndep[rip]
	cmp	WORD PTR -16[rbp], ax
	jle	.L16
	movzx	eax, WORD PTR ndep[rip]
	cwde
	movzx	edx, WORD PTR ects[rip]
	movsx	edx, dx
	sub	edx, 1
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 30000
	add	rax, rdx
	lea	rdx, [rax+rax]
	lea	rax, sack[rip]
	movzx	eax, WORD PTR [rdx+rax]
	cwde
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"1005086.c"
	.text
	.comm	sack,18060000,4
	.comm	ndep,2,2
	.comm	ects,2,2
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%hd %hd\000"
	.align	2
.LC1:
	.ascii	"%hd\000"
	.align	2
.LC2:
	.ascii	"%hd\012\000"
	.align	2
.LC3:
	.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, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strh	r3, [fp, #-22]	@ movhi
	ldr	r2, .L19+4
	ldr	r1, .L19+8
	ldr	r0, .L19+12
	bl	__isoc99_scanf
	mov	r3, #1
	strh	r3, [fp, #-16]	@ movhi
	b	.L2
.L16:
	sub	r3, fp, #22
	mov	r1, r3
	ldr	r0, .L19+16
	bl	__isoc99_scanf
	mov	r3, #0
	strh	r3, [fp, #-12]	@ movhi
	b	.L3
.L15:
	sub	r2, fp, #18
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L19+12
	bl	__isoc99_scanf
	ldrsh	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L4
	mov	r3, #0
	strh	r3, [fp, #-14]	@ movhi
	b	.L5
.L9:
	ldrsh	r3, [fp, #-20]
	mov	r2, r3
	ldrsh	r3, [fp, #-14]
	add	r3, r3, #1
	cmp	r2, r3
	bne	.L6
	ldrsh	r3, [fp, #-16]
	sub	r2, r3, #1
	ldrsh	r1, [fp, #-14]
	ldr	r0, .L19+20
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, r1
	lsl	r3, r3, #1
	add	r3, r0, r3
	ldrsh	r2, [r3]
	ldrsh	r3, [fp, #-18]
	cmp	r2, r3
	bge	.L6
	ldrsh	r2, [fp, #-16]
	ldrsh	r0, [fp, #-14]
	ldrsh	r1, [fp, #-18]
	ldr	ip, .L19+20
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, r0
	lsl	r3, r3, #1
	add	r3, ip, r3
	strh	r1, [r3]	@ movhi
	b	.L7
.L6:
	ldrsh	r3, [fp, #-20]
	ldrsh	r2, [fp, #-14]
	cmp	r2, r3
	blt	.L8
	ldrsh	r3, [fp, #-16]
	sub	r2, r3, #1
	ldrsh	r1, [fp, #-14]
	ldr	r0, .L19+20
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, r1
	lsl	r3, r3, #1
	add	r3, r0, r3
	ldrsh	r1, [r3]
	ldrsh	r3, [fp, #-16]
	sub	r2, r3, #1
	ldrsh	r3, [fp, #-14]
	ldrsh	r0, [fp, #-20]
	sub	r0, r3, r0
	ldr	ip, .L19+20
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, r0
	lsl	r3, r3, #1
	add	r3, ip, r3
	ldrsh	r3, [r3]
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrsh	r3, [fp, #-18]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-10]	@ movhi
	ldrsh	r3, [fp, #-10]
	cmp	r3, r1
	ble	.L8
	ldrsh	r2, [fp, #-16]
	ldrsh	r1, [fp, #-14]
	ldr	r0, .L19+20
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, r1
	lsl	r3, r3, #1
	add	r3, r0, r3
	ldrh	r2, [fp, #-10]	@ movhi
	strh	r2, [r3]	@ movhi
	b	.L7
.L8:
	ldrsh	r3, [fp, #-16]
	sub	r2, r3, #1
	ldrsh	r0, [fp, #-14]
	ldrsh	r1, [fp, #-16]
	ldrsh	ip, [fp, #-14]
	ldr	lr, .L19+20
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, r0
	lsl	r3, r3, #1
	add	r3, lr, r3
	ldrsh	r0, [r3]
	ldr	lr, .L19+20
	mov	r3, r1
	lsl	r3, r3, #5
	sub	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, ip
	lsl	r3, r3, #1
	add	r3, lr, r3
	strh	r0, [r3]	@ movhi
.L7:
	ldrsh	r3, [fp, #-14]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-14]	@ movhi
.L5:
	ldr	r3, .L19+4
	ldrsh	r3, [r3]
	ldrsh	r2, [fp, #-14]
	cmp	r2, r3
	blt	.L9
	b	.L10
.L4:
	mov	r3, #0
	strh	r3, [fp, #-14]	@ movhi
	b	.L11
.L14:
	ldrsh	r3, [fp, #-20]
	mov	r2, r3
	ldrsh	r3, [fp, #-14]
	add	r3, r3, #1
	cmp	r2, r3
	bne	.L12
	ldrsh	r2, [fp, #-16]
	ldrsh	r1, [fp, #-14]
	ldr	r0, .L19+20
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, r1
	lsl	r3, r3, #1
	add	r3, r0, r3
	ldrsh	r2, [r3]
	ldrsh	r3, [fp, #-18]
	cmp	r2, r3
	bge	.L12
	ldrsh	r2, [fp, #-16]
	ldrsh	r0, [fp, #-14]
	ldrsh	r1, [fp, #-18]
	ldr	ip, .L19+20
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, r0
	lsl	r3, r3, #1
	add	r3, ip, r3
	strh	r1, [r3]	@ movhi
	b	.L13
.L12:
	ldrsh	r3, [fp, #-20]
	ldrsh	r2, [fp, #-14]
	cmp	r2, r3
	blt	.L13
	ldrsh	r2, [fp, #-16]
	ldrsh	r1, [fp, #-14]
	ldr	r0, .L19+20
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, r1
	lsl	r3, r3, #1
	add	r3, r0, r3
	ldrsh	r1, [r3]
	ldrsh	r3, [fp, #-16]
	sub	r2, r3, #1
	ldrsh	r3, [fp, #-14]
	ldrsh	r0, [fp, #-20]
	sub	r0, r3, r0
	ldr	ip, .L19+20
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, r0
	lsl	r3, r3, #1
	add	r3, ip, r3
	ldrsh	r3, [r3]
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrsh	r3, [fp, #-18]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-10]	@ movhi
	ldrsh	r3, [fp, #-10]
	cmp	r3, r1
	ble	.L13
	ldrsh	r2, [fp, #-16]
	ldrsh	r1, [fp, #-14]
	ldr	r0, .L19+20
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, r1
	lsl	r3, r3, #1
	add	r3, r0, r3
	ldrh	r2, [fp, #-10]	@ movhi
	strh	r2, [r3]	@ movhi
.L13:
	ldrsh	r3, [fp, #-14]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-14]	@ movhi
.L11:
	ldr	r3, .L19+4
	ldrsh	r3, [r3]
	ldrsh	r2, [fp, #-14]
	cmp	r2, r3
	blt	.L14
.L10:
	ldrsh	r3, [fp, #-12]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-12]	@ movhi
.L3:
	ldrsh	r3, [fp, #-22]
	ldrsh	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L15
	ldrsh	r3, [fp, #-16]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-16]	@ movhi
.L2:
	ldr	r3, .L19+8
	ldrsh	r3, [r3]
	ldrsh	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L16
	ldr	r3, .L19+8
	ldrsh	r3, [r3]
	mov	r2, r3
	ldr	r3, .L19+4
	ldrsh	r3, [r3]
	sub	r1, r3, #1
	ldr	r0, .L19+20
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #4
	mov	r2, r3
	add	r3, r2, r1
	lsl	r3, r3, #1
	add	r3, r0, r3
	ldrsh	r3, [r3]
	mov	r1, r3
	ldr	r0, .L19+24
	bl	printf
	mov	r3, #0
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC3
	.word	ects
	.word	ndep
	.word	.LC0
	.word	.LC1
	.word	sack
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
