	.file	"1004490.c"
	.intel_syntax noprefix
	.text
	.globl	W
	.bss
	.align 32
	.type	W, @object
	.size	W, 360000
W:
	.zero	360000
	.section	.rodata
.LC0:
	.string	"P1\n%d %d\n"
.LC1:
	.string	"%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, 32
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	BYTE PTR W[rip+180300], 1
	mov	DWORD PTR -24[rbp], 0
	jmp	.L2
.L14:
	nop
.L3:
.L4:
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1838648207
	shr	rdx, 32
	sar	edx, 8
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 598
	sub	eax, ecx
	mov	edx, eax
	lea	eax, 1[rdx]
	mov	DWORD PTR -20[rbp], eax
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1838648207
	shr	rdx, 32
	sar	edx, 8
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 598
	sub	eax, ecx
	mov	edx, eax
	lea	eax, 1[rdx]
	mov	DWORD PTR -16[rbp], eax
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -16[rbp]
	imul	rax, rax, 600
	add	rdx, rax
	lea	rax, W[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L4
	jmp	.L5
.L8:
	call	rand@PLT
	cdq
	shr	edx, 29
	add	eax, edx
	and	eax, 7
	sub	eax, edx
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 3
	jbe	.L6
	add	DWORD PTR -12[rbp], 1
.L6:
	mov	ecx, DWORD PTR -12[rbp]
	mov	edx, ecx
	mov	eax, 2863311531
	imul	rax, rdx
	shr	rax, 32
	mov	edx, eax
	shr	edx
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	sub	ecx, eax
	mov	edx, ecx
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	sub	eax, 1
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, eax
	mov	eax, 2863311531
	imul	rax, rdx
	shr	rax, 32
	mov	edx, eax
	shr	edx
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	sub	eax, 1
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	je	.L4
	cmp	DWORD PTR -20[rbp], 598
	ja	.L4
	cmp	DWORD PTR -16[rbp], 0
	je	.L4
	cmp	DWORD PTR -16[rbp], 598
	jbe	.L5
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -16[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	ecx, eax
	mov	eax, edx
	imul	rax, rax, 600
	lea	rdx, [rax+rcx]
	lea	rax, W[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	eax, DWORD PTR -16[rbp]
	lea	ecx, -1[rax]
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, ecx
	imul	rcx, rcx, 600
	add	rcx, rax
	lea	rax, W[rip]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	lea	ecx, -1[rax]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	mov	esi, eax
	mov	eax, ecx
	imul	rax, rax, 600
	lea	rcx, [rax+rsi]
	lea	rax, W[rip]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	ecx, eax
	mov	eax, DWORD PTR -16[rbp]
	imul	rax, rax, 600
	add	rcx, rax
	lea	rax, W[rip]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	mov	ecx, eax
	mov	eax, DWORD PTR -16[rbp]
	imul	rax, rax, 600
	add	rcx, rax
	lea	rax, W[rip]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	esi, eax
	mov	eax, ecx
	imul	rax, rax, 600
	lea	rcx, [rax+rsi]
	lea	rax, W[rip]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	lea	ecx, [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, edx
	imul	rdx, rdx, 600
	add	rdx, rax
	lea	rax, W[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	lea	edx, [rcx+rax]
	mov	eax, DWORD PTR -16[rbp]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	mov	esi, eax
	mov	eax, ecx
	imul	rax, rax, 600
	lea	rcx, [rax+rsi]
	lea	rax, W[rip]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	eax, edx
	test	eax, eax
	je	.L8
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -16[rbp]
	imul	rax, rax, 600
	add	rdx, rax
	lea	rax, W[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 1
	add	DWORD PTR -24[rbp], 1
.L2:
	cmp	DWORD PTR -24[rbp], 9999
	jle	.L14
	mov	edx, 600
	mov	esi, 600
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L9
.L12:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	imul	rax, rax, 600
	add	rdx, rax
	lea	rax, W[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L10:
	cmp	DWORD PTR -4[rbp], 599
	jle	.L11
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L9:
	cmp	DWORD PTR -8[rbp], 599
	jle	.L12
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"1004490.c"
	.text
	.comm	W,360000,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"P1\012%d %d\012\000"
	.align	2
.LC1:
	.ascii	"%d \000"
	.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
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r3, .L14
	add	r3, r3, #180224
	mov	r2, #1
	strb	r2, [r3, #76]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L2
.L13:
	nop
.L3:
	bl	rand
	ldr	r3, .L14+4
	smull	r2, r3, r0, r3
	asr	r2, r3, #8
	asr	r3, r0, #31
	sub	r1, r2, r3
	mov	r2, r1
	lsl	r2, r2, #2
	add	r2, r2, r1
	lsl	r3, r2, #4
	sub	r3, r3, r2
	lsl	r3, r3, #2
	sub	r3, r3, r1
	lsl	r3, r3, #1
	sub	r1, r0, r3
	add	r3, r1, #1
	str	r3, [fp, #-24]
	bl	rand
	ldr	r3, .L14+4
	smull	r2, r3, r0, r3
	asr	r2, r3, #8
	asr	r3, r0, #31
	sub	r1, r2, r3
	mov	r2, r1
	lsl	r2, r2, #2
	add	r2, r2, r1
	lsl	r3, r2, #4
	sub	r3, r3, r2
	lsl	r3, r3, #2
	sub	r3, r3, r1
	lsl	r3, r3, #1
	sub	r1, r0, r3
	add	r3, r1, #1
	str	r3, [fp, #-20]
	ldr	r1, .L14
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r2, r1, r2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L13
	b	.L4
.L7:
	bl	rand
	mov	r3, r0
	rsbs	r2, r3, #0
	and	r3, r3, #7
	and	r2, r2, #7
	rsbpl	r3, r2, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	bls	.L5
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L5:
	ldr	r1, [fp, #-16]
	ldr	r3, .L14+8
	umull	r2, r3, r1, r3
	lsr	r2, r3, #1
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r2, r1, r3
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-16]
	ldr	r2, .L14+8
	umull	r1, r3, r2, r3
	lsr	r2, r3, #1
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-24]
	ldr	r2, .L14+12
	cmp	r3, r2
	bhi	.L3
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-20]
	ldr	r2, .L14+12
	cmp	r3, r2
	bls	.L4
	b	.L3
.L4:
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	ldr	r3, [fp, #-24]
	sub	r1, r3, #1
	ldr	r0, .L14
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r3, r0, r2
	add	r3, r3, r1
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	ldr	r1, .L14
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r2, r1, r2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r1, r0, r3
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	ldr	r3, [fp, #-24]
	add	r0, r3, #1
	ldr	ip, .L14
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r3, ip, r2
	add	r3, r3, r0
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r1, r1, r3
	ldr	r3, [fp, #-24]
	sub	r0, r3, #1
	ldr	ip, .L14
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r3, ip, r2
	add	r3, r3, r0
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r1, r1, r3
	ldr	r3, [fp, #-24]
	add	r0, r3, #1
	ldr	ip, .L14
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r3, ip, r2
	add	r3, r3, r0
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r1, r1, r3
	ldr	r3, [fp, #-20]
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	sub	r0, r3, #1
	ldr	ip, .L14
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r3, ip, r2
	add	r3, r3, r0
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r1, r1, r3
	ldr	r3, [fp, #-20]
	add	r2, r3, #1
	ldr	r0, .L14
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r2, r0, r2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r1, r1, r3
	ldr	r3, [fp, #-20]
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	add	r0, r3, #1
	ldr	ip, .L14
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r3, ip, r2
	add	r3, r3, r0
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r3, r1, r3
	cmp	r3, #0
	beq	.L7
	ldr	r1, .L14
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r2, r1, r2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #1
	strb	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L2:
	ldr	r3, [fp, #-28]
	ldr	r2, .L14+16
	cmp	r3, r2
	ble	.L13
	mov	r2, #600
	mov	r1, #600
	ldr	r0, .L14+20
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L8
.L11:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L9
.L10:
	ldr	r1, .L14
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r2, r1, r2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L14+24
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L9:
	ldr	r3, [fp, #-8]
	cmp	r3, #600
	blt	.L10
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L8:
	ldr	r3, [fp, #-12]
	cmp	r3, #600
	blt	.L11
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	W
	.word	1838648207
	.word	-1431655765
	.word	598
	.word	9999
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
