	.file	"108551.c"
	.intel_syntax noprefix
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	q
	.align 4
	.type	q, @object
	.size	q, 4
q:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 1000000
g:
	.zero	1000000
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\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
	lea	rcx, q[rip]
	lea	rdx, m[rip]
	lea	rsi, n[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR i[rip], 0
	jmp	.L2
.L5:
	mov	eax, DWORD PTR i[rip]
	add	eax, 1
	mov	DWORD PTR j[rip], eax
	jmp	.L3
.L4:
	mov	eax, DWORD PTR i[rip]
	mov	edx, DWORD PTR j[rip]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 500
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, g[rip]
	mov	DWORD PTR [rdx+rax], 2147483647
	mov	eax, DWORD PTR j[rip]
	mov	edx, DWORD PTR i[rip]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 500
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, g[rip]
	mov	DWORD PTR [rdx+rax], 2147483647
	mov	eax, DWORD PTR j[rip]
	add	eax, 1
	mov	DWORD PTR j[rip], eax
.L3:
	mov	edx, DWORD PTR j[rip]
	mov	eax, DWORD PTR n[rip]
	cmp	edx, eax
	jne	.L4
	mov	eax, DWORD PTR i[rip]
	add	eax, 1
	mov	DWORD PTR i[rip], eax
.L2:
	mov	edx, DWORD PTR i[rip]
	mov	eax, DWORD PTR n[rip]
	cmp	edx, eax
	jne	.L5
	jmp	.L6
.L7:
	lea	rcx, k[rip]
	lea	rdx, j[rip]
	lea	rsi, i[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR i[rip]
	mov	edx, DWORD PTR j[rip]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 500
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, g[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR k[rip]
	cmp	edx, eax
	jle	.L6
	mov	edx, DWORD PTR i[rip]
	mov	ecx, DWORD PTR j[rip]
	mov	eax, DWORD PTR k[rip]
	movsx	rcx, ecx
	movsx	rdx, edx
	imul	rdx, rdx, 500
	add	rdx, rcx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, g[rip]
	mov	DWORD PTR [rcx+rdx], eax
.L6:
	mov	eax, DWORD PTR m[rip]
	lea	edx, -1[rax]
	mov	DWORD PTR m[rip], edx
	test	eax, eax
	jne	.L7
	mov	DWORD PTR k[rip], 0
	jmp	.L8
.L14:
	mov	DWORD PTR i[rip], 0
	jmp	.L9
.L13:
	mov	DWORD PTR j[rip], 0
	jmp	.L10
.L12:
	mov	eax, DWORD PTR k[rip]
	mov	edx, DWORD PTR j[rip]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 500
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, g[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR i[rip]
	mov	ecx, DWORD PTR k[rip]
	movsx	rcx, ecx
	cdqe
	imul	rax, rax, 500
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	lea	rax, g[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	cmovge	eax, edx
	mov	DWORD PTR m[rip], eax
	mov	eax, DWORD PTR i[rip]
	mov	edx, DWORD PTR j[rip]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 500
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, g[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR m[rip]
	cmp	edx, eax
	jle	.L11
	mov	edx, DWORD PTR i[rip]
	mov	ecx, DWORD PTR j[rip]
	mov	eax, DWORD PTR m[rip]
	movsx	rcx, ecx
	movsx	rdx, edx
	imul	rdx, rdx, 500
	add	rdx, rcx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, g[rip]
	mov	DWORD PTR [rcx+rdx], eax
.L11:
	mov	eax, DWORD PTR j[rip]
	add	eax, 1
	mov	DWORD PTR j[rip], eax
.L10:
	mov	edx, DWORD PTR j[rip]
	mov	eax, DWORD PTR n[rip]
	cmp	edx, eax
	jne	.L12
	mov	eax, DWORD PTR i[rip]
	add	eax, 1
	mov	DWORD PTR i[rip], eax
.L9:
	mov	edx, DWORD PTR i[rip]
	mov	eax, DWORD PTR n[rip]
	cmp	edx, eax
	jne	.L13
	mov	eax, DWORD PTR k[rip]
	add	eax, 1
	mov	DWORD PTR k[rip], eax
.L8:
	mov	edx, DWORD PTR k[rip]
	mov	eax, DWORD PTR n[rip]
	cmp	edx, eax
	jne	.L14
	jmp	.L15
.L18:
	lea	rdx, j[rip]
	lea	rsi, i[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR j[rip]
	mov	edx, DWORD PTR i[rip]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 500
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, g[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR i[rip]
	mov	ecx, DWORD PTR j[rip]
	movsx	rcx, ecx
	cdqe
	imul	rax, rax, 500
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	lea	rax, g[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	cmovge	eax, edx
	mov	DWORD PTR m[rip], eax
	mov	eax, DWORD PTR m[rip]
	cmp	eax, 2147483647
	je	.L16
	mov	eax, DWORD PTR m[rip]
	jmp	.L17
.L16:
	mov	eax, -1
.L17:
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	mov	eax, DWORD PTR q[rip]
	lea	edx, -1[rax]
	mov	DWORD PTR q[rip], edx
	test	eax, eax
	jne	.L18
	mov	eax, 0
	pop	rbp
	.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	"108551.c"
	.text
	.comm	n,4,4
	.comm	m,4,4
	.comm	q,4,4
	.comm	i,4,4
	.comm	j,4,4
	.comm	k,4,4
	.comm	g,1000000,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d%d%d\000"
	.align	2
.LC1:
	.ascii	"%d%d\000"
	.align	2
.LC2:
	.ascii	"%d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L20
	ldr	r2, .L20+4
	ldr	r1, .L20+8
	ldr	r0, .L20+12
	bl	__isoc99_scanf
	ldr	r3, .L20+16
	mov	r2, #0
	str	r2, [r3]
	b	.L2
.L5:
	ldr	r3, .L20+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+20
	str	r3, [r2]
	b	.L3
.L4:
	ldr	r3, .L20+16
	ldr	r2, [r3]
	ldr	r3, .L20+20
	ldr	r1, [r3]
	ldr	r0, .L20+24
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r1
	mvn	r2, #-2147483648
	str	r2, [r0, r3, lsl #2]
	ldr	r3, .L20+20
	ldr	r2, [r3]
	ldr	r3, .L20+16
	ldr	r1, [r3]
	ldr	r0, .L20+24
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r1
	mvn	r2, #-2147483648
	str	r2, [r0, r3, lsl #2]
	ldr	r3, .L20+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+20
	str	r3, [r2]
.L3:
	ldr	r3, .L20+20
	ldr	r2, [r3]
	ldr	r3, .L20+8
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L4
	ldr	r3, .L20+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+16
	str	r3, [r2]
.L2:
	ldr	r3, .L20+16
	ldr	r2, [r3]
	ldr	r3, .L20+8
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L5
	b	.L6
.L7:
	ldr	r3, .L20+28
	ldr	r2, .L20+20
	ldr	r1, .L20+16
	ldr	r0, .L20+12
	bl	__isoc99_scanf
	ldr	r3, .L20+16
	ldr	r2, [r3]
	ldr	r3, .L20+20
	ldr	r1, [r3]
	ldr	r0, .L20+24
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r1
	ldr	r2, [r0, r3, lsl #2]
	ldr	r3, .L20+28
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L6
	ldr	r3, .L20+16
	ldr	r2, [r3]
	ldr	r3, .L20+20
	ldr	r0, [r3]
	ldr	r3, .L20+28
	ldr	r1, [r3]
	ldr	ip, .L20+24
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r0
	str	r1, [ip, r3, lsl #2]
.L6:
	ldr	r3, .L20+4
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r1, .L20+4
	str	r2, [r1]
	cmp	r3, #0
	bne	.L7
	ldr	r3, .L20+28
	mov	r2, #0
	str	r2, [r3]
	b	.L8
.L14:
	ldr	r3, .L20+16
	mov	r2, #0
	str	r2, [r3]
	b	.L9
.L13:
	ldr	r3, .L20+20
	mov	r2, #0
	str	r2, [r3]
	b	.L10
.L12:
	ldr	r3, .L20+28
	ldr	r2, [r3]
	ldr	r3, .L20+20
	ldr	r1, [r3]
	ldr	r0, .L20+24
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r1
	ldr	r1, [r0, r3, lsl #2]
	ldr	r3, .L20+16
	ldr	r2, [r3]
	ldr	r3, .L20+28
	ldr	r0, [r3]
	ldr	ip, .L20+24
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r0
	ldr	r3, [ip, r3, lsl #2]
	cmp	r1, r3
	movge	r3, r1
	movlt	r3, r3
	ldr	r2, .L20+4
	str	r3, [r2]
	ldr	r3, .L20+16
	ldr	r2, [r3]
	ldr	r3, .L20+20
	ldr	r1, [r3]
	ldr	r0, .L20+24
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r1
	ldr	r2, [r0, r3, lsl #2]
	ldr	r3, .L20+4
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L11
	ldr	r3, .L20+16
	ldr	r2, [r3]
	ldr	r3, .L20+20
	ldr	r0, [r3]
	ldr	r3, .L20+4
	ldr	r1, [r3]
	ldr	ip, .L20+24
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r0
	str	r1, [ip, r3, lsl #2]
.L11:
	ldr	r3, .L20+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+20
	str	r3, [r2]
.L10:
	ldr	r3, .L20+20
	ldr	r2, [r3]
	ldr	r3, .L20+8
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L12
	ldr	r3, .L20+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+16
	str	r3, [r2]
.L9:
	ldr	r3, .L20+16
	ldr	r2, [r3]
	ldr	r3, .L20+8
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L13
	ldr	r3, .L20+28
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+28
	str	r3, [r2]
.L8:
	ldr	r3, .L20+28
	ldr	r2, [r3]
	ldr	r3, .L20+8
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L14
	b	.L15
.L18:
	ldr	r2, .L20+20
	ldr	r1, .L20+16
	ldr	r0, .L20+32
	bl	__isoc99_scanf
	ldr	r3, .L20+20
	ldr	r2, [r3]
	ldr	r3, .L20+16
	ldr	r1, [r3]
	ldr	r0, .L20+24
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r1
	ldr	r1, [r0, r3, lsl #2]
	ldr	r3, .L20+16
	ldr	r2, [r3]
	ldr	r3, .L20+20
	ldr	r0, [r3]
	ldr	ip, .L20+24
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r0
	ldr	r3, [ip, r3, lsl #2]
	cmp	r1, r3
	movge	r3, r1
	movlt	r3, r3
	ldr	r2, .L20+4
	str	r3, [r2]
	ldr	r3, .L20+4
	ldr	r3, [r3]
	cmn	r3, #-2147483647
	beq	.L16
	ldr	r3, .L20+4
	ldr	r3, [r3]
	b	.L17
.L16:
	mvn	r3, #0
.L17:
	mov	r1, r3
	ldr	r0, .L20+36
	bl	printf
.L15:
	ldr	r3, .L20
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r1, .L20
	str	r2, [r1]
	cmp	r3, #0
	bne	.L18
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	q
	.word	m
	.word	n
	.word	.LC0
	.word	i
	.word	j
	.word	g
	.word	k
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
