	.file	"3125.c"
	.intel_syntax noprefix
	.text
	.globl	is_valid
	.type	is_valid, @function
is_valid:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L2
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -16[rbp], eax
	jge	.L2
	mov	eax, 1
	jmp	.L4
.L2:
	mov	eax, 0
.L4:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	is_valid, .-is_valid
	.globl	view
	.type	view, @function
view:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, 1
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	add	rax, 1
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	view, .-view
	.globl	set
	.type	set, @function
set:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	DWORD PTR -20[rbp], ecx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, 1
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	add	rax, 1
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rdx], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	set, .-set
	.globl	make_field
	.type	make_field, @function
make_field:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	DWORD PTR -68[rbp], edi
	mov	DWORD PTR -72[rbp], esi
	mov	QWORD PTR -80[rbp], rdx
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -68[rbp]
	add	eax, 2
	mov	esi, eax
	mov	edi, 8
	call	calloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -52[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -72[rbp]
	add	eax, 2
	mov	edx, DWORD PTR -52[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rbx, [rcx+rdx]
	mov	esi, eax
	mov	edi, 4
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -52[rbp], 1
.L9:
	mov	eax, DWORD PTR -68[rbp]
	add	eax, 1
	cmp	DWORD PTR -52[rbp], eax
	jle	.L10
	cmp	QWORD PTR -80[rbp], 0
	jne	.L11
	mov	DWORD PTR -48[rbp], 1
	jmp	.L12
.L15:
	mov	DWORD PTR -44[rbp], 1
	jmp	.L13
.L14:
	mov	eax, 0
	call	rand@PLT
	mov	edx, DWORD PTR -48[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	mov	ecx, eax
	sar	ecx, 31
	shr	ecx, 31
	add	eax, ecx
	and	eax, 1
	sub	eax, ecx
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -44[rbp], 1
.L13:
	mov	eax, DWORD PTR -72[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jge	.L14
	add	DWORD PTR -48[rbp], 1
.L12:
	mov	eax, DWORD PTR -68[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jge	.L15
	jmp	.L16
.L11:
	mov	DWORD PTR -40[rbp], 1
	jmp	.L17
.L20:
	mov	DWORD PTR -36[rbp], 1
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR -40[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -36[rbp], 1
.L18:
	mov	eax, DWORD PTR -72[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jge	.L19
	add	DWORD PTR -40[rbp], 1
.L17:
	mov	eax, DWORD PTR -68[rbp]
	cmp	eax, DWORD PTR -40[rbp]
	jge	.L20
.L16:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -68[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -72[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	make_field, .-make_field
	.globl	free_field
	.type	free_field, @function
free_field:
.LFB4:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L23
.L24:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -4[rbp], 1
.L23:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	add	eax, 1
	cmp	DWORD PTR -4[rbp], eax
	jle	.L24
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	free_field, .-free_field
	.globl	to_char
	.type	to_char, @function
to_char:
.LFB5:
	.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
	cmp	DWORD PTR -4[rbp], 0
	je	.L26
	mov	eax, 35
	jmp	.L27
.L26:
	mov	eax, 95
.L27:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	to_char, .-to_char
	.section	.rodata
.LC0:
	.string	"%c"
.LC1:
	.string	"\n"
	.text
	.globl	print_field
	.type	print_field, @function
print_field:
.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L29
.L32:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L30
.L31:
	mov	edx, DWORD PTR -4[rbp]
	mov	ecx, DWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	view
	mov	edi, eax
	call	to_char
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L30:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L31
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -8[rbp], 1
.L29:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L32
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_field, .-print_field
	.globl	next_state
	.type	next_state, @function
next_state:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 32
	.cfi_offset 3, -24
	mov	QWORD PTR -32[rbp], rdi
	mov	DWORD PTR -36[rbp], esi
	mov	DWORD PTR -40[rbp], edx
	mov	DWORD PTR -12[rbp], 0
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -36[rbp]
	lea	ecx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	view
	mov	edx, DWORD PTR -12[rbp]
	lea	ebx, [rax+rdx]
	mov	eax, DWORD PTR -36[rbp]
	lea	ecx, -1[rax]
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	view
	add	ebx, eax
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -36[rbp]
	lea	ecx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	view
	add	eax, ebx
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, -1[rax]
	mov	ecx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	view
	mov	edx, DWORD PTR -12[rbp]
	lea	ebx, [rax+rdx]
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 1[rax]
	mov	ecx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	view
	add	eax, ebx
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -36[rbp]
	lea	ecx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	view
	mov	edx, DWORD PTR -12[rbp]
	lea	ebx, [rax+rdx]
	mov	eax, DWORD PTR -36[rbp]
	lea	ecx, 1[rax]
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	view
	add	ebx, eax
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -36[rbp]
	lea	ecx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	view
	add	eax, ebx
	mov	DWORD PTR -12[rbp], eax
	mov	edx, DWORD PTR -40[rbp]
	mov	ecx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	view
	test	eax, eax
	je	.L34
	cmp	DWORD PTR -12[rbp], 2
	je	.L35
	cmp	DWORD PTR -12[rbp], 3
	jne	.L36
.L35:
	mov	eax, 1
	jmp	.L38
.L36:
	mov	eax, 0
	jmp	.L38
.L34:
	cmp	DWORD PTR -12[rbp], 3
	sete	al
	movzx	eax, al
.L38:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	next_state, .-next_state
	.globl	update_field
	.type	update_field, @function
update_field:
.LFB8:
	.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	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, ecx
	mov	edi, eax
	call	make_field
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L40
.L43:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L41
.L42:
	mov	edx, DWORD PTR -16[rbp]
	mov	ecx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	next_state
	mov	DWORD PTR -12[rbp], eax
	mov	ecx, DWORD PTR -12[rbp]
	mov	edx, DWORD PTR -16[rbp]
	mov	esi, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	set
	add	DWORD PTR -16[rbp], 1
.L41:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L42
	add	DWORD PTR -20[rbp], 1
.L40:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L43
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free_field
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	update_field, .-update_field
	.section	.rodata
.LC2:
	.string	"usage: %s x y times\n"
.LC3:
	.string	"%d"
.LC4:
	.string	"-"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 0
	mov	eax, 0
	call	time@PLT
	mov	rdi, rax
	mov	eax, 0
	call	srand@PLT
	cmp	DWORD PTR -52[rbp], 4
	je	.L45
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L45:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -36[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sscanf@PLT
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rdx, -32[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sscanf@PLT
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	lea	rdx, -28[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sscanf@PLT
	mov	ecx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 0
	mov	esi, ecx
	mov	edi, eax
	call	make_field
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	print_field
	mov	DWORD PTR -24[rbp], 0
	jmp	.L46
.L49:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L47
.L48:
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -20[rbp], 1
.L47:
	mov	eax, DWORD PTR -32[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L48
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	mov	eax, 0
	call	sleep@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	update_field
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	print_field
	add	DWORD PTR -24[rbp], 1
.L46:
	mov	eax, DWORD PTR -28[rbp]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L49
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free_field
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L51
	call	__stack_chk_fail@PLT
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"3125.c"
	.text
	.align	2
	.global	is_valid
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_valid, %function
is_valid:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L2
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bge	.L2
	mov	r3, #1
	b	.L4
.L2:
	mov	r3, #0
.L4:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_valid, .-is_valid
	.align	2
	.global	view
	.syntax unified
	.arm
	.fpu softvfp
	.type	view, %function
view:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	view, .-view
	.align	2
	.global	set
	.syntax unified
	.arm
	.fpu softvfp
	.type	set, %function
set:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	set, .-set
	.align	2
	.global	make_field
	.syntax unified
	.arm
	.fpu softvfp
	.type	make_field, %function
make_field:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-48]
	add	r3, r3, #2
	mov	r1, r3
	mov	r0, #4
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L9
.L10:
	ldr	r3, [fp, #-52]
	add	r1, r3, #2
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	mov	r0, #4
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L9:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	ble	.L10
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L11
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L12
.L15:
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L13
.L14:
	bl	rand
	mov	r3, r0
	ldr	r2, [fp, #-36]
	lsl	r2, r2, #2
	ldr	r1, [fp, #-16]
	add	r2, r1, r2
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	lsl	r2, r2, #2
	add	r2, r1, r2
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	str	r3, [r2]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L13:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bge	.L14
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L12:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bge	.L15
	b	.L16
.L11:
	mov	r3, #1
	str	r3, [fp, #-28]
	b	.L17
.L20:
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L18
.L19:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L18:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bge	.L19
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L17:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bge	.L20
.L16:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-48]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-52]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	make_field, .-make_field
	.align	2
	.global	free_field
	.syntax unified
	.arm
	.fpu softvfp
	.type	free_field, %function
free_field:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L23
.L24:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L23:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L24
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-16]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	free_field, .-free_field
	.align	2
	.global	to_char
	.syntax unified
	.arm
	.fpu softvfp
	.type	to_char, %function
to_char:
	@ 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, [fp, #-8]
	cmp	r3, #0
	beq	.L26
	mov	r3, #35
	b	.L27
.L26:
	mov	r3, #95
.L27:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	to_char, .-to_char
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%c\000"
	.align	2
.LC1:
	.ascii	"\012\000"
	.text
	.align	2
	.global	print_field
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_field, %function
print_field:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L29
.L32:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L30
.L31:
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	view
	mov	r3, r0
	mov	r0, r3
	bl	to_char
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L33
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L30:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L31
	ldr	r0, .L33+4
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L29:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L32
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC0
	.word	.LC1
	.size	print_field, .-print_field
	.align	2
	.global	next_state
	.syntax unified
	.arm
	.fpu softvfp
	.type	next_state, %function
next_state:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	sub	r1, r3, #1
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r0, [fp, #-24]
	bl	view
	mov	r2, r0
	ldr	r3, [fp, #-16]
	add	r4, r2, r3
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	ldr	r2, [fp, #-32]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	view
	mov	r3, r0
	add	r4, r4, r3
	ldr	r3, [fp, #-28]
	sub	r1, r3, #1
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r0, [fp, #-24]
	bl	view
	mov	r3, r0
	add	r3, r4, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	view
	mov	r2, r0
	ldr	r3, [fp, #-16]
	add	r4, r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	view
	mov	r3, r0
	add	r3, r4, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	add	r1, r3, #1
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r0, [fp, #-24]
	bl	view
	mov	r2, r0
	ldr	r3, [fp, #-16]
	add	r4, r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	ldr	r2, [fp, #-32]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	view
	mov	r3, r0
	add	r4, r4, r3
	ldr	r3, [fp, #-28]
	add	r1, r3, #1
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r0, [fp, #-24]
	bl	view
	mov	r3, r0
	add	r3, r4, r3
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	view
	mov	r3, r0
	cmp	r3, #0
	beq	.L36
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	beq	.L37
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	bne	.L38
.L37:
	mov	r3, #1
	b	.L40
.L38:
	mov	r3, #0
	b	.L40
.L36:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
.L40:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	next_state, .-next_state
	.align	2
	.global	update_field
	.syntax unified
	.arm
	.fpu softvfp
	.type	update_field, %function
update_field:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldr	r0, [r3]
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r2, r3
	bl	make_field
	str	r0, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L42
.L45:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L43
.L44:
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-12]
	bl	next_state
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	set
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L43:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L44
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L42:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L45
	ldr	r0, [fp, #-12]
	bl	free_field
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	update_field, .-update_field
	.section	.rodata
	.align	2
.LC2:
	.ascii	"usage: %s x y times\012\000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"-\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
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L54
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r3, [fp, #-40]
	cmp	r3, #4
	beq	.L47
	ldr	r3, .L54+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L54+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L47:
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #32
	ldr	r1, .L54+12
	mov	r0, r3
	bl	sscanf
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	sub	r2, fp, #28
	ldr	r1, .L54+12
	mov	r0, r3
	bl	sscanf
	ldr	r3, [fp, #-44]
	add	r3, r3, #12
	ldr	r3, [r3]
	sub	r2, fp, #24
	ldr	r1, .L54+12
	mov	r0, r3
	bl	sscanf
	ldr	r3, [fp, #-32]
	ldr	r1, [fp, #-28]
	mov	r2, #0
	mov	r0, r3
	bl	make_field
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	print_field
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L48
.L51:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L49
.L50:
	ldr	r0, .L54+16
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L49:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L50
	ldr	r0, .L54+20
	bl	printf
	mov	r0, #1
	bl	sleep
	ldr	r0, [fp, #-12]
	bl	update_field
	ldr	r0, [fp, #-12]
	bl	print_field
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L48:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L51
	ldr	r0, [fp, #-12]
	bl	free_field
	mov	r3, #0
	ldr	r2, .L54
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L53
	bl	__stack_chk_fail
.L53:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L55:
	.align	2
.L54:
	.word	.LC5
	.word	stderr
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
