	.file	"147197.c"
	.intel_syntax noprefix
	.text
	.globl	board
	.data
	.align 8
	.type	board, @object
	.size	board, 8
board:
	.quad	-1125899906842624
	.globl	piece_def
	.align 32
	.type	piece_def, @object
	.size	piece_def, 40
piece_def:
	.string	""
	.string	""
	.string	""
	.ascii	"\002"
	.string	"\002"
	.string	"\n"
	.string	""
	.string	""
	.ascii	"\002\004"
	.string	""
	.string	""
	.ascii	"\004\002"
	.string	"\002"
	.ascii	"\n\003"
	.string	""
	.string	""
	.string	"\004"
	.string	""
	.ascii	"\002\002\n"
	.string	""
	.ascii	"\002\002\006"
	.string	""
	.string	"\002"
	.string	""
	.string	""
	.string	""
	.string	""
	.ascii	"\004"
	.globl	pieces
	.bss
	.align 32
	.type	pieces, @object
	.size	pieces, 48000
pieces:
	.zero	48000
	.globl	piece_counts
	.align 32
	.type	piece_counts, @object
	.size	piece_counts, 2000
piece_counts:
	.zero	2000
	.globl	next_cell
	.align 32
	.type	next_cell, @object
	.size	next_cell, 6000
next_cell:
	.zero	6000
	.text
	.globl	rotate
	.type	rotate, @function
rotate:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	BYTE PTR -4[rbp], al
	movsx	eax, BYTE PTR -4[rbp]
	lea	edx, 2[rax]
	movsx	rax, edx
	imul	rax, rax, 715827883
	shr	rax, 32
	sar	eax
	mov	esi, edx
	sar	esi, 31
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	add	eax, eax
	add	eax, ecx
	sal	eax, 2
	sub	edx, eax
	mov	ecx, edx
	mov	eax, ecx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	rotate, .-rotate
	.globl	flip
	.type	flip, @function
flip:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	BYTE PTR -4[rbp], al
	movsx	eax, BYTE PTR -4[rbp]
	mov	edx, 12
	sub	edx, eax
	movsx	rax, edx
	imul	rax, rax, 715827883
	shr	rax, 32
	sar	eax
	mov	esi, edx
	sar	esi, 31
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	add	eax, eax
	add	eax, ecx
	sal	eax, 2
	mov	ecx, edx
	sub	ecx, eax
	mov	eax, ecx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	flip, .-flip
	.globl	shift
	.type	shift, @function
shift:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, edi
	mov	eax, esi
	mov	BYTE PTR -4[rbp], dl
	mov	BYTE PTR -8[rbp], al
	movsx	eax, BYTE PTR -8[rbp]
	cmp	eax, 11
	ja	.L6
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L8[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L8[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L8:
	.long	.L19-.L8
	.long	.L18-.L8
	.long	.L17-.L8
	.long	.L16-.L8
	.long	.L15-.L8
	.long	.L14-.L8
	.long	.L13-.L8
	.long	.L12-.L8
	.long	.L11-.L8
	.long	.L10-.L8
	.long	.L9-.L8
	.long	.L7-.L8
	.text
.L19:
	movzx	eax, BYTE PTR -4[rbp]
	add	eax, 1
	jmp	.L20
.L18:
	movzx	eax, BYTE PTR -4[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	sar	al, 7
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	and	eax, 1
	test	al, al
	je	.L21
	movzx	eax, BYTE PTR -4[rbp]
	add	eax, 7
	jmp	.L20
.L21:
	movzx	eax, BYTE PTR -4[rbp]
	add	eax, 6
	jmp	.L20
.L17:
	movzx	eax, BYTE PTR -4[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	sar	al, 7
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	and	eax, 1
	test	al, al
	je	.L22
	movzx	eax, BYTE PTR -4[rbp]
	add	eax, 6
	jmp	.L20
.L22:
	movzx	eax, BYTE PTR -4[rbp]
	add	eax, 5
	jmp	.L20
.L16:
	movzx	eax, BYTE PTR -4[rbp]
	add	eax, 10
	jmp	.L20
.L15:
	movzx	eax, BYTE PTR -4[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	sar	al, 7
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	and	eax, 1
	test	al, al
	je	.L23
	movzx	eax, BYTE PTR -4[rbp]
	add	eax, 5
	jmp	.L20
.L23:
	movzx	eax, BYTE PTR -4[rbp]
	add	eax, 4
	jmp	.L20
.L14:
	movzx	eax, BYTE PTR -4[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	sar	al, 7
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	and	eax, 1
	test	al, al
	je	.L24
	movzx	eax, BYTE PTR -4[rbp]
	add	eax, 4
	jmp	.L20
.L24:
	movzx	eax, BYTE PTR -4[rbp]
	add	eax, 3
	jmp	.L20
.L13:
	movzx	eax, BYTE PTR -4[rbp]
	sub	eax, 1
	jmp	.L20
.L12:
	movzx	eax, BYTE PTR -4[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	sar	al, 7
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	and	eax, 1
	test	al, al
	je	.L25
	movzx	eax, BYTE PTR -4[rbp]
	sub	eax, 6
	jmp	.L20
.L25:
	movzx	eax, BYTE PTR -4[rbp]
	sub	eax, 7
	jmp	.L20
.L11:
	movzx	eax, BYTE PTR -4[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	sar	al, 7
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	and	eax, 1
	test	al, al
	je	.L26
	movzx	eax, BYTE PTR -4[rbp]
	sub	eax, 5
	jmp	.L20
.L26:
	movzx	eax, BYTE PTR -4[rbp]
	sub	eax, 6
	jmp	.L20
.L10:
	movzx	eax, BYTE PTR -4[rbp]
	sub	eax, 10
	jmp	.L20
.L9:
	movzx	eax, BYTE PTR -4[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	sar	al, 7
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	and	eax, 1
	test	al, al
	je	.L27
	movzx	eax, BYTE PTR -4[rbp]
	sub	eax, 4
	jmp	.L20
.L27:
	movzx	eax, BYTE PTR -4[rbp]
	sub	eax, 5
	jmp	.L20
.L7:
	movzx	eax, BYTE PTR -4[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	sar	al, 7
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	and	eax, 1
	test	al, al
	je	.L28
	movzx	eax, BYTE PTR -4[rbp]
	sub	eax, 3
	jmp	.L20
.L28:
	movzx	eax, BYTE PTR -4[rbp]
	sub	eax, 4
	jmp	.L20
.L6:
	movzx	eax, BYTE PTR -4[rbp]
.L20:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	shift, .-shift
	.globl	out_of_bounds
	.type	out_of_bounds, @function
out_of_bounds:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, edi
	mov	eax, esi
	mov	BYTE PTR -20[rbp], dl
	mov	BYTE PTR -24[rbp], al
	movsx	eax, BYTE PTR -24[rbp]
	cmp	eax, 11
	ja	.L30
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L32[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L32[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L32:
	.long	.L43-.L32
	.long	.L42-.L32
	.long	.L41-.L32
	.long	.L40-.L32
	.long	.L39-.L32
	.long	.L38-.L32
	.long	.L37-.L32
	.long	.L36-.L32
	.long	.L35-.L32
	.long	.L34-.L32
	.long	.L33-.L32
	.long	.L31-.L32
	.text
.L43:
	movzx	eax, BYTE PTR -20[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	mov	esi, eax
	sar	sil, 7
	mov	ecx, edx
	sub	ecx, esi
	mov	edx, ecx
	sal	edx, 2
	add	edx, ecx
	sub	eax, edx
	mov	ecx, eax
	cmp	cl, 4
	sete	al
	jmp	.L44
.L42:
	movzx	edx, BYTE PTR -20[rbp]
	movsx	ax, dl
	imul	eax, eax, 103
	shr	ax, 8
	sar	al, 2
	mov	esi, edx
	sar	sil, 7
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	add	eax, eax
	sub	edx, eax
	mov	BYTE PTR -1[rbp], dl
	cmp	BYTE PTR -1[rbp], 4
	je	.L45
	cmp	BYTE PTR -1[rbp], 8
	je	.L45
	cmp	BYTE PTR -1[rbp], 9
	je	.L45
	cmp	BYTE PTR -20[rbp], 44
	jle	.L46
.L45:
	mov	eax, 1
	jmp	.L44
.L46:
	mov	eax, 0
	jmp	.L44
.L41:
	movzx	edx, BYTE PTR -20[rbp]
	movsx	ax, dl
	imul	eax, eax, 103
	shr	ax, 8
	sar	al, 2
	mov	esi, edx
	sar	sil, 7
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	add	eax, eax
	mov	ecx, edx
	sub	ecx, eax
	cmp	cl, 9
	je	.L48
	cmp	BYTE PTR -20[rbp], 44
	jle	.L49
.L48:
	mov	eax, 1
	jmp	.L44
.L49:
	mov	eax, 0
	jmp	.L44
.L40:
	cmp	BYTE PTR -20[rbp], 39
	setg	al
	jmp	.L44
.L39:
	movzx	edx, BYTE PTR -20[rbp]
	movsx	ax, dl
	imul	eax, eax, 103
	shr	ax, 8
	sar	al, 2
	mov	esi, edx
	sar	sil, 7
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	add	eax, eax
	mov	ecx, edx
	sub	ecx, eax
	test	cl, cl
	je	.L51
	cmp	BYTE PTR -20[rbp], 44
	jle	.L52
.L51:
	mov	eax, 1
	jmp	.L44
.L52:
	mov	eax, 0
	jmp	.L44
.L38:
	movzx	edx, BYTE PTR -20[rbp]
	movsx	ax, dl
	imul	eax, eax, 103
	shr	ax, 8
	sar	al, 2
	mov	esi, edx
	sar	sil, 7
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	add	eax, eax
	sub	edx, eax
	mov	BYTE PTR -1[rbp], dl
	cmp	BYTE PTR -1[rbp], 0
	je	.L54
	cmp	BYTE PTR -1[rbp], 1
	je	.L54
	cmp	BYTE PTR -1[rbp], 5
	je	.L54
	cmp	BYTE PTR -20[rbp], 44
	jle	.L55
.L54:
	mov	eax, 1
	jmp	.L44
.L55:
	mov	eax, 0
	jmp	.L44
.L37:
	movzx	eax, BYTE PTR -20[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	mov	ecx, eax
	sar	cl, 7
	sub	edx, ecx
	mov	ecx, edx
	sal	ecx, 2
	add	ecx, edx
	sub	eax, ecx
	mov	edx, eax
	test	dl, dl
	sete	al
	jmp	.L44
.L36:
	movzx	edx, BYTE PTR -20[rbp]
	movsx	ax, dl
	imul	eax, eax, 103
	shr	ax, 8
	sar	al, 2
	mov	esi, edx
	sar	sil, 7
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	add	eax, eax
	sub	edx, eax
	mov	BYTE PTR -1[rbp], dl
	cmp	BYTE PTR -1[rbp], 0
	je	.L57
	cmp	BYTE PTR -1[rbp], 1
	je	.L57
	cmp	BYTE PTR -1[rbp], 5
	je	.L57
	cmp	BYTE PTR -20[rbp], 4
	jg	.L58
.L57:
	mov	eax, 1
	jmp	.L44
.L58:
	mov	eax, 0
	jmp	.L44
.L35:
	movzx	edx, BYTE PTR -20[rbp]
	movsx	ax, dl
	imul	eax, eax, 103
	shr	ax, 8
	sar	al, 2
	mov	esi, edx
	sar	sil, 7
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	add	eax, eax
	mov	ecx, edx
	sub	ecx, eax
	test	cl, cl
	je	.L60
	cmp	BYTE PTR -20[rbp], 4
	jg	.L61
.L60:
	mov	eax, 1
	jmp	.L44
.L61:
	mov	eax, 0
	jmp	.L44
.L34:
	cmp	BYTE PTR -20[rbp], 9
	setle	al
	jmp	.L44
.L33:
	movzx	edx, BYTE PTR -20[rbp]
	movsx	ax, dl
	imul	eax, eax, 103
	shr	ax, 8
	sar	al, 2
	mov	esi, edx
	sar	sil, 7
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	add	eax, eax
	mov	ecx, edx
	sub	ecx, eax
	cmp	cl, 9
	je	.L63
	cmp	BYTE PTR -20[rbp], 4
	jg	.L64
.L63:
	mov	eax, 1
	jmp	.L44
.L64:
	mov	eax, 0
	jmp	.L44
.L31:
	movzx	edx, BYTE PTR -20[rbp]
	movsx	ax, dl
	imul	eax, eax, 103
	shr	ax, 8
	sar	al, 2
	mov	esi, edx
	sar	sil, 7
	sub	eax, esi
	mov	ecx, eax
	mov	eax, ecx
	sal	eax, 2
	add	eax, ecx
	add	eax, eax
	sub	edx, eax
	mov	BYTE PTR -1[rbp], dl
	cmp	BYTE PTR -1[rbp], 4
	je	.L66
	cmp	BYTE PTR -1[rbp], 8
	je	.L66
	cmp	BYTE PTR -1[rbp], 9
	je	.L66
	cmp	BYTE PTR -20[rbp], 4
	jg	.L67
.L66:
	mov	eax, 1
	jmp	.L44
.L67:
	mov	eax, 0
	jmp	.L44
.L30:
	mov	eax, 0
.L44:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	out_of_bounds, .-out_of_bounds
	.globl	rotate_piece
	.type	rotate_piece, @function
rotate_piece:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L70
.L71:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	lea	rax, piece_def[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	rotate
	mov	edx, DWORD PTR -4[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rcx, rdx
	lea	rdx, piece_def[rip]
	add	rdx, rcx
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -4[rbp], 1
.L70:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L71
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	rotate_piece, .-rotate_piece
	.globl	flip_piece
	.type	flip_piece, @function
flip_piece:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L73
.L74:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	lea	rax, piece_def[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	flip
	mov	edx, DWORD PTR -4[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rcx, rdx
	lea	rdx, piece_def[rip]
	add	rdx, rcx
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -4[rbp], 1
.L73:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L74
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	flip_piece, .-flip_piece
	.globl	calc_cell_indices
	.type	calc_cell_indices, @function
calc_cell_indices:
.LFB12:
	.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, 16
	.cfi_offset 3, -24
	mov	QWORD PTR -16[rbp], rdi
	mov	DWORD PTR -20[rbp], esi
	mov	eax, edx
	mov	BYTE PTR -24[rbp], al
	mov	rax, QWORD PTR -16[rbp]
	movzx	edx, BYTE PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_def[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	edx, al
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	rcx, QWORD PTR -16[rbp]
	lea	rbx, 1[rcx]
	mov	esi, edx
	mov	edi, eax
	call	shift
	mov	BYTE PTR [rbx], al
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_def[rip+1]
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	edx, al
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	rcx, QWORD PTR -16[rbp]
	lea	rbx, 2[rcx]
	mov	esi, edx
	mov	edi, eax
	call	shift
	mov	BYTE PTR [rbx], al
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_def[rip+2]
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	edx, al
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	rcx, QWORD PTR -16[rbp]
	lea	rbx, 3[rcx]
	mov	esi, edx
	mov	edi, eax
	call	shift
	mov	BYTE PTR [rbx], al
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_def[rip+3]
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	edx, al
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	rcx, QWORD PTR -16[rbp]
	lea	rbx, 4[rcx]
	mov	esi, edx
	mov	edi, eax
	call	shift
	mov	BYTE PTR [rbx], al
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	calc_cell_indices, .-calc_cell_indices
	.globl	cells_fit_on_board
	.type	cells_fit_on_board, @function
cells_fit_on_board:
.LFB13:
	.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	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_def[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, edx
	mov	edi, eax
	call	out_of_bounds
	test	al, al
	jne	.L77
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_def[rip+1]
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, edx
	mov	edi, eax
	call	out_of_bounds
	test	al, al
	jne	.L77
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_def[rip+2]
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, edx
	mov	edi, eax
	call	out_of_bounds
	test	al, al
	jne	.L77
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_def[rip+3]
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, edx
	mov	edi, eax
	call	out_of_bounds
	test	al, al
	jne	.L77
	mov	eax, 1
	jmp	.L79
.L77:
	mov	eax, 0
.L79:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	cells_fit_on_board, .-cells_fit_on_board
	.globl	minimum_of_cells
	.type	minimum_of_cells, @function
minimum_of_cells:
.LFB14:
	.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 -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -1[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movzx	edx, BYTE PTR -1[rbp]
	cmp	BYTE PTR -1[rbp], al
	cmovle	eax, edx
	mov	BYTE PTR -1[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	movzx	edx, BYTE PTR -1[rbp]
	cmp	BYTE PTR -1[rbp], al
	cmovle	eax, edx
	mov	BYTE PTR -1[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	movzx	edx, BYTE PTR -1[rbp]
	cmp	BYTE PTR -1[rbp], al
	cmovle	eax, edx
	mov	BYTE PTR -1[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	movzx	eax, BYTE PTR [rax]
	movzx	edx, BYTE PTR -1[rbp]
	cmp	BYTE PTR -1[rbp], al
	cmovle	eax, edx
	mov	BYTE PTR -1[rbp], al
	movzx	eax, BYTE PTR -1[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	minimum_of_cells, .-minimum_of_cells
	.globl	first_empty_cell
	.type	first_empty_cell, @function
first_empty_cell:
.LFB15:
	.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 -24[rbp], rdi
	mov	eax, esi
	mov	BYTE PTR -28[rbp], al
	movzx	eax, BYTE PTR -28[rbp]
	mov	BYTE PTR -1[rbp], al
	jmp	.L83
.L84:
	movzx	eax, BYTE PTR -1[rbp]
	add	eax, 1
	mov	BYTE PTR -1[rbp], al
.L83:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -1[rbp], al
	je	.L84
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -1[rbp], al
	je	.L84
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -1[rbp], al
	je	.L84
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -1[rbp], al
	je	.L84
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -1[rbp], al
	je	.L84
	movzx	eax, BYTE PTR -1[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	first_empty_cell, .-first_empty_cell
	.globl	bitmask_from_cells
	.type	bitmask_from_cells, @function
bitmask_from_cells:
.LFB16:
	.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 -24[rbp], rdi
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L87
.L88:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	QWORD PTR -8[rbp], rax
	add	DWORD PTR -12[rbp], 1
.L87:
	cmp	DWORD PTR -12[rbp], 4
	jle	.L88
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	bitmask_from_cells, .-bitmask_from_cells
	.globl	record_piece
	.type	record_piece, @function
record_piece:
.LFB17:
	.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	DWORD PTR -8[rbp], esi
	mov	eax, edx
	mov	QWORD PTR -24[rbp], rcx
	mov	BYTE PTR -12[rbp], al
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rax
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_counts[rip]
	mov	eax, DWORD PTR [rdx+rax]
	movsx	rcx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	imul	rsi, rax, 600
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rsi
	add	rax, rcx
	lea	rcx, 0[0+rax*8]
	lea	rdx, pieces[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rcx+rdx], rax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rax
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_counts[rip]
	mov	eax, DWORD PTR [rdx+rax]
	movsx	rcx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	imul	rsi, rax, 600
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rsi
	lea	rdx, [rax+rcx]
	lea	rax, next_cell[rip]
	add	rdx, rax
	movzx	eax, BYTE PTR -12[rbp]
	mov	BYTE PTR [rdx], al
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rax
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_counts[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -8[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rax
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_counts[rip]
	mov	DWORD PTR [rdx+rax], ecx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	record_piece, .-record_piece
	.globl	fill_contiguous_space
	.type	fill_contiguous_space, @function
fill_contiguous_space:
.LFB18:
	.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	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 1
	je	.L99
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 1
	mov	eax, DWORD PTR -12[rbp]
	movsx	eax, al
	mov	esi, 0
	mov	edi, eax
	call	out_of_bounds
	test	al, al
	jne	.L94
	mov	eax, DWORD PTR -12[rbp]
	movsx	eax, al
	mov	esi, 0
	mov	edi, eax
	call	shift
	movsx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	fill_contiguous_space
.L94:
	mov	eax, DWORD PTR -12[rbp]
	movsx	eax, al
	mov	esi, 2
	mov	edi, eax
	call	out_of_bounds
	test	al, al
	jne	.L95
	mov	eax, DWORD PTR -12[rbp]
	movsx	eax, al
	mov	esi, 2
	mov	edi, eax
	call	shift
	movsx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	fill_contiguous_space
.L95:
	mov	eax, DWORD PTR -12[rbp]
	movsx	eax, al
	mov	esi, 4
	mov	edi, eax
	call	out_of_bounds
	test	al, al
	jne	.L96
	mov	eax, DWORD PTR -12[rbp]
	movsx	eax, al
	mov	esi, 4
	mov	edi, eax
	call	shift
	movsx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	fill_contiguous_space
.L96:
	mov	eax, DWORD PTR -12[rbp]
	movsx	eax, al
	mov	esi, 6
	mov	edi, eax
	call	out_of_bounds
	test	al, al
	jne	.L97
	mov	eax, DWORD PTR -12[rbp]
	movsx	eax, al
	mov	esi, 6
	mov	edi, eax
	call	shift
	movsx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	fill_contiguous_space
.L97:
	mov	eax, DWORD PTR -12[rbp]
	movsx	eax, al
	mov	esi, 8
	mov	edi, eax
	call	out_of_bounds
	test	al, al
	jne	.L98
	mov	eax, DWORD PTR -12[rbp]
	movsx	eax, al
	mov	esi, 8
	mov	edi, eax
	call	shift
	movsx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	fill_contiguous_space
.L98:
	mov	eax, DWORD PTR -12[rbp]
	movsx	eax, al
	mov	esi, 10
	mov	edi, eax
	call	out_of_bounds
	test	al, al
	jne	.L91
	mov	eax, DWORD PTR -12[rbp]
	movsx	eax, al
	mov	esi, 10
	mov	edi, eax
	call	shift
	movsx	edx, al
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	fill_contiguous_space
	jmp	.L91
.L99:
	nop
.L91:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	fill_contiguous_space, .-fill_contiguous_space
	.globl	has_island
	.type	has_island, @function
has_island:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	QWORD PTR -88[rbp], rdi
	mov	DWORD PTR -92[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -68[rbp], 0
	jmp	.L101
.L102:
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	mov	BYTE PTR -64[rbp+rax], 0
	add	DWORD PTR -68[rbp], 1
.L101:
	cmp	DWORD PTR -68[rbp], 49
	jle	.L102
	mov	DWORD PTR -68[rbp], 0
	jmp	.L103
.L104:
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cdqe
	mov	BYTE PTR -64[rbp+rax], 1
	add	DWORD PTR -68[rbp], 1
.L103:
	cmp	DWORD PTR -68[rbp], 4
	jle	.L104
	mov	DWORD PTR -68[rbp], 49
	jmp	.L105
.L106:
	sub	DWORD PTR -68[rbp], 1
.L105:
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	movzx	eax, BYTE PTR -64[rbp+rax]
	cmp	al, 1
	je	.L106
	mov	edx, DWORD PTR -68[rbp]
	lea	rax, -64[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	fill_contiguous_space
	mov	BYTE PTR -69[rbp], 0
	mov	DWORD PTR -68[rbp], 0
	jmp	.L107
.L109:
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	movzx	eax, BYTE PTR -64[rbp+rax]
	test	al, al
	jne	.L108
	movzx	eax, BYTE PTR -69[rbp]
	add	eax, 1
	mov	BYTE PTR -69[rbp], al
.L108:
	add	DWORD PTR -68[rbp], 1
.L107:
	cmp	DWORD PTR -68[rbp], 49
	jle	.L109
	cmp	BYTE PTR -69[rbp], 0
	je	.L110
	cmp	BYTE PTR -69[rbp], 5
	jne	.L111
	cmp	DWORD PTR -92[rbp], 8
	je	.L110
.L111:
	cmp	BYTE PTR -69[rbp], 40
	jne	.L112
	cmp	DWORD PTR -92[rbp], 8
	je	.L110
.L112:
	movzx	eax, BYTE PTR -69[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	mov	ecx, eax
	sar	cl, 7
	sub	edx, ecx
	mov	ecx, edx
	sal	ecx, 2
	add	ecx, edx
	sub	eax, ecx
	mov	edx, eax
	test	dl, dl
	jne	.L113
	cmp	DWORD PTR -92[rbp], 0
	jne	.L113
.L110:
	mov	eax, 0
	jmp	.L115
.L113:
	mov	eax, 1
.L115:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L116
	call	__stack_chk_fail@PLT
.L116:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	has_island, .-has_island
	.globl	calc_six_rotations
	.type	calc_six_rotations, @function
calc_six_rotations:
.LFB20:
	.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	edx, edi
	mov	eax, esi
	mov	BYTE PTR -36[rbp], dl
	mov	BYTE PTR -40[rbp], al
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -27[rbp], 0
	jmp	.L118
.L121:
	cmp	BYTE PTR -36[rbp], 3
	jne	.L119
	cmp	BYTE PTR -27[rbp], 2
	jg	.L120
.L119:
	movsx	edx, BYTE PTR -40[rbp]
	movsx	ecx, BYTE PTR -36[rbp]
	lea	rax, -13[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	calc_cell_indices
	movsx	edx, BYTE PTR -36[rbp]
	lea	rax, -13[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	cells_fit_on_board
	test	eax, eax
	je	.L120
	movsx	edx, BYTE PTR -36[rbp]
	lea	rax, -13[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	has_island
	test	eax, eax
	jne	.L120
	lea	rax, -13[rbp]
	mov	rdi, rax
	call	minimum_of_cells
	mov	BYTE PTR -26[rbp], al
	movsx	edx, BYTE PTR -26[rbp]
	lea	rax, -13[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	first_empty_cell
	mov	BYTE PTR -25[rbp], al
	lea	rax, -13[rbp]
	mov	rdi, rax
	call	bitmask_from_cells
	mov	QWORD PTR -24[rbp], rax
	movsx	edx, BYTE PTR -25[rbp]
	movsx	esi, BYTE PTR -26[rbp]
	movsx	eax, BYTE PTR -36[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	mov	edi, eax
	call	record_piece
.L120:
	movsx	eax, BYTE PTR -36[rbp]
	mov	edi, eax
	call	rotate_piece
	movzx	eax, BYTE PTR -27[rbp]
	add	eax, 1
	mov	BYTE PTR -27[rbp], al
.L118:
	cmp	BYTE PTR -27[rbp], 5
	jle	.L121
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L122
	call	__stack_chk_fail@PLT
.L122:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	calc_six_rotations, .-calc_six_rotations
	.globl	calc_pieces
	.type	calc_pieces, @function
calc_pieces:
.LFB21:
	.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	BYTE PTR -2[rbp], 0
	jmp	.L124
.L127:
	mov	BYTE PTR -1[rbp], 0
	jmp	.L125
.L126:
	movsx	edx, BYTE PTR -1[rbp]
	movsx	eax, BYTE PTR -2[rbp]
	mov	esi, edx
	mov	edi, eax
	call	calc_six_rotations
	movsx	eax, BYTE PTR -2[rbp]
	mov	edi, eax
	call	flip_piece
	movsx	edx, BYTE PTR -1[rbp]
	movsx	eax, BYTE PTR -2[rbp]
	mov	esi, edx
	mov	edi, eax
	call	calc_six_rotations
	movzx	eax, BYTE PTR -1[rbp]
	add	eax, 1
	mov	BYTE PTR -1[rbp], al
.L125:
	cmp	BYTE PTR -1[rbp], 49
	jle	.L126
	movzx	eax, BYTE PTR -2[rbp]
	add	eax, 1
	mov	BYTE PTR -2[rbp], al
.L124:
	cmp	BYTE PTR -2[rbp], 9
	jle	.L127
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	calc_pieces, .-calc_pieces
	.globl	all_rows
	.data
	.align 32
	.type	all_rows, @object
	.size	all_rows, 32
all_rows:
	.string	""
	.ascii	"\001\002\003\004\005\006\007\b\t\n\013\f\r\016\017\020\021\022"
	.ascii	"\023\024\025\026\027\030\031\032\033\034\035\036\037"
	.globl	bad_even_rows
	.bss
	.align 32
	.type	bad_even_rows, @object
	.size	bad_even_rows, 4096
bad_even_rows:
	.zero	4096
	.globl	bad_odd_rows
	.align 32
	.type	bad_odd_rows, @object
	.size	bad_odd_rows, 4096
bad_odd_rows:
	.zero	4096
	.globl	bad_even_triple
	.align 32
	.type	bad_even_triple, @object
	.size	bad_even_triple, 131072
bad_even_triple:
	.zero	131072
	.globl	bad_odd_triple
	.align 32
	.type	bad_odd_triple, @object
	.size	bad_odd_triple, 131072
bad_odd_triple:
	.zero	131072
	.text
	.globl	rows_bad
	.type	rows_bad, @function
rows_bad:
.LFB22:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	ecx, edi
	mov	eax, esi
	mov	DWORD PTR -28[rbp], edx
	mov	edx, ecx
	mov	BYTE PTR -20[rbp], dl
	mov	BYTE PTR -24[rbp], al
	cmp	DWORD PTR -28[rbp], 0
	je	.L129
	movsx	eax, BYTE PTR -24[rbp]
	add	eax, eax
	and	eax, 30
	or	eax, 1
	mov	BYTE PTR -14[rbp], al
	jmp	.L130
.L129:
	movzx	eax, BYTE PTR -24[rbp]
	sar	al
	or	eax, 16
	mov	BYTE PTR -14[rbp], al
.L130:
	movzx	eax, BYTE PTR -20[rbp]
	not	eax
	and	al, BYTE PTR -24[rbp]
	and	al, BYTE PTR -14[rbp]
	mov	BYTE PTR -13[rbp], al
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L131
.L137:
	movsx	edx, BYTE PTR -20[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	ecx, eax
	sar	edx, cl
	mov	eax, edx
	and	eax, 1
	test	eax, eax
	je	.L132
	cmp	DWORD PTR -8[rbp], 0
	je	.L133
	cmp	DWORD PTR -4[rbp], 0
	jne	.L134
	mov	eax, 1
	jmp	.L135
.L134:
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L133
.L132:
	cmp	DWORD PTR -8[rbp], 0
	jne	.L136
	mov	DWORD PTR -8[rbp], 1
.L136:
	movsx	edx, BYTE PTR -13[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	ecx, eax
	sar	edx, cl
	mov	eax, edx
	and	eax, 1
	test	eax, eax
	jne	.L133
	mov	DWORD PTR -4[rbp], 1
.L133:
	add	DWORD PTR -12[rbp], 1
.L131:
	cmp	DWORD PTR -12[rbp], 4
	jle	.L137
	cmp	DWORD PTR -8[rbp], 0
	je	.L138
	cmp	DWORD PTR -4[rbp], 0
	sete	al
	movzx	eax, al
	jmp	.L135
.L138:
	mov	eax, 0
.L135:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	rows_bad, .-rows_bad
	.globl	triple_is_okay
	.type	triple_is_okay, @function
triple_is_okay:
.LFB23:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edx
	mov	DWORD PTR -16[rbp], ecx
	mov	edx, edi
	mov	BYTE PTR -4[rbp], dl
	mov	edx, esi
	mov	BYTE PTR -8[rbp], dl
	mov	BYTE PTR -12[rbp], al
	cmp	DWORD PTR -16[rbp], 0
	je	.L140
	cmp	BYTE PTR -4[rbp], 3
	jne	.L141
	cmp	BYTE PTR -8[rbp], 11
	jne	.L141
	movsx	eax, BYTE PTR -12[rbp]
	and	eax, 28
	cmp	eax, 12
	je	.L142
.L141:
	cmp	BYTE PTR -4[rbp], 1
	jne	.L143
	cmp	BYTE PTR -8[rbp], 5
	jne	.L143
	cmp	BYTE PTR -12[rbp], 6
	je	.L142
.L143:
	cmp	BYTE PTR -4[rbp], 25
	jne	.L144
	cmp	BYTE PTR -8[rbp], 17
	je	.L142
.L144:
	cmp	BYTE PTR -4[rbp], 21
	jne	.L145
	cmp	BYTE PTR -8[rbp], 17
	jne	.L145
.L142:
	mov	eax, 1
	jmp	.L147
.L145:
	mov	eax, 0
	jmp	.L147
.L140:
	cmp	BYTE PTR -4[rbp], 19
	jne	.L148
	cmp	BYTE PTR -8[rbp], 17
	je	.L149
.L148:
	cmp	BYTE PTR -4[rbp], 21
	jne	.L150
	cmp	BYTE PTR -8[rbp], 17
	jne	.L150
.L149:
	mov	eax, 1
	jmp	.L147
.L150:
	mov	eax, 0
.L147:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	triple_is_okay, .-triple_is_okay
	.globl	calc_rows
	.type	calc_rows, @function
calc_rows:
.LFB24:
	.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	DWORD PTR -20[rbp], 0
	jmp	.L153
.L156:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L154
.L155:
	mov	eax, DWORD PTR -16[rbp]
	movsx	ecx, al
	mov	eax, DWORD PTR -20[rbp]
	movsx	eax, al
	mov	edx, 1
	mov	esi, ecx
	mov	edi, eax
	call	rows_bad
	mov	edx, DWORD PTR -16[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	sal	rdx, 5
	add	rdx, rcx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, bad_even_rows[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	ecx, al
	mov	eax, DWORD PTR -20[rbp]
	movsx	eax, al
	mov	edx, 0
	mov	esi, ecx
	mov	edi, eax
	call	rows_bad
	mov	edx, DWORD PTR -16[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	sal	rdx, 5
	add	rdx, rcx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, bad_odd_rows[rip]
	mov	DWORD PTR [rcx+rdx], eax
	add	DWORD PTR -16[rbp], 1
.L154:
	cmp	DWORD PTR -16[rbp], 31
	jle	.L155
	add	DWORD PTR -20[rbp], 1
.L153:
	cmp	DWORD PTR -20[rbp], 31
	jle	.L156
	mov	DWORD PTR -20[rbp], 0
	jmp	.L157
.L172:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L158
.L171:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L159
.L170:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, bad_even_rows[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 5
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, bad_odd_rows[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -8[rbp], 0
	jne	.L160
	cmp	DWORD PTR -4[rbp], 1
	jne	.L160
	mov	eax, DWORD PTR -12[rbp]
	movsx	edx, al
	mov	eax, DWORD PTR -16[rbp]
	movsx	esi, al
	mov	eax, DWORD PTR -20[rbp]
	movsx	eax, al
	mov	ecx, 1
	mov	edi, eax
	call	triple_is_okay
	test	eax, eax
	je	.L160
	mov	eax, DWORD PTR -16[rbp]
	sal	eax, 5
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	sal	eax, 10
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, bad_even_triple[rip]
	mov	DWORD PTR [rdx+rax], 0
	jmp	.L161
.L160:
	cmp	DWORD PTR -8[rbp], 0
	jne	.L162
	cmp	DWORD PTR -4[rbp], 0
	je	.L163
.L162:
	mov	ecx, 1
	jmp	.L164
.L163:
	mov	ecx, 0
.L164:
	mov	eax, DWORD PTR -16[rbp]
	sal	eax, 5
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	sal	eax, 10
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, bad_even_triple[rip]
	mov	DWORD PTR [rdx+rax], ecx
.L161:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, bad_odd_rows[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 5
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, bad_even_rows[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -8[rbp], 0
	jne	.L165
	cmp	DWORD PTR -4[rbp], 1
	jne	.L165
	mov	eax, DWORD PTR -12[rbp]
	movsx	edx, al
	mov	eax, DWORD PTR -16[rbp]
	movsx	esi, al
	mov	eax, DWORD PTR -20[rbp]
	movsx	eax, al
	mov	ecx, 0
	mov	edi, eax
	call	triple_is_okay
	test	eax, eax
	je	.L165
	mov	eax, DWORD PTR -16[rbp]
	sal	eax, 5
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	sal	eax, 10
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, bad_odd_triple[rip]
	mov	DWORD PTR [rdx+rax], 0
	jmp	.L166
.L165:
	cmp	DWORD PTR -8[rbp], 0
	jne	.L167
	cmp	DWORD PTR -4[rbp], 0
	je	.L168
.L167:
	mov	ecx, 1
	jmp	.L169
.L168:
	mov	ecx, 0
.L169:
	mov	eax, DWORD PTR -16[rbp]
	sal	eax, 5
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	sal	eax, 10
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, bad_odd_triple[rip]
	mov	DWORD PTR [rdx+rax], ecx
.L166:
	add	DWORD PTR -12[rbp], 1
.L159:
	cmp	DWORD PTR -12[rbp], 31
	jle	.L170
	add	DWORD PTR -16[rbp], 1
.L158:
	cmp	DWORD PTR -16[rbp], 31
	jle	.L171
	add	DWORD PTR -20[rbp], 1
.L157:
	cmp	DWORD PTR -20[rbp], 31
	jle	.L172
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	calc_rows, .-calc_rows
	.globl	boardHasIslands
	.type	boardHasIslands, @function
boardHasIslands:
.LFB25:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	BYTE PTR -20[rbp], al
	cmp	BYTE PTR -20[rbp], 39
	jle	.L174
	mov	eax, 0
	jmp	.L175
.L174:
	mov	rsi, QWORD PTR board[rip]
	movzx	eax, BYTE PTR -20[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	sar	al, 7
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	movsx	edx, al
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	mov	ecx, eax
	shr	rsi, cl
	mov	rax, rsi
	and	eax, 32767
	mov	DWORD PTR -4[rbp], eax
	movzx	eax, BYTE PTR -20[rbp]
	movsx	dx, al
	imul	edx, edx, 103
	shr	dx, 8
	sar	dl
	sar	al, 7
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	and	eax, 1
	test	al, al
	je	.L176
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, bad_odd_triple[rip]
	mov	eax, DWORD PTR [rdx+rax]
	jmp	.L175
.L176:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, bad_even_triple[rip]
	mov	eax, DWORD PTR [rdx+rax]
.L175:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	boardHasIslands, .-boardHasIslands
	.globl	avail
	.data
	.align 2
	.type	avail, @object
	.size	avail, 2
avail:
	.value	1023
	.globl	sol_nums
	.bss
	.align 8
	.type	sol_nums, @object
	.size	sol_nums, 10
sol_nums:
	.zero	10
	.globl	sol_masks
	.align 32
	.type	sol_masks, @object
	.size	sol_masks, 80
sol_masks:
	.zero	80
	.globl	solutions
	.align 32
	.type	solutions, @object
	.size	solutions, 105000
solutions:
	.zero	105000
	.globl	solution_count
	.align 4
	.type	solution_count, @object
	.size	solution_count, 4
solution_count:
	.zero	4
	.globl	max_solutions
	.data
	.align 4
	.type	max_solutions, @object
	.size	max_solutions, 4
max_solutions:
	.long	2100
	.text
	.globl	record_solution
	.type	record_solution, @function
record_solution:
.LFB26:
	.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 -16[rbp], 0
	jmp	.L178
.L182:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, sol_masks[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L179
.L181:
	mov	rax, QWORD PTR -8[rbp]
	and	eax, 1
	test	rax, rax
	je	.L180
	mov	ecx, DWORD PTR solution_count[rip]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, sol_nums[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rsi, eax
	movsx	rcx, ecx
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	add	rax, rcx
	add	rax, rax
	lea	rcx, [rax+rsi]
	lea	rax, solutions[rip]
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR solution_count[rip]
	lea	esi, 1[rax]
	mov	eax, 49
	sub	eax, DWORD PTR -12[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, sol_nums[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	movsx	rdi, ecx
	movsx	rcx, esi
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	add	rax, rcx
	add	rax, rax
	lea	rcx, [rax+rdi]
	lea	rax, solutions[rip]
	add	rax, rcx
	mov	BYTE PTR [rax], dl
.L180:
	shr	QWORD PTR -8[rbp]
	add	DWORD PTR -12[rbp], 1
.L179:
	cmp	DWORD PTR -12[rbp], 49
	jle	.L181
	add	DWORD PTR -16[rbp], 1
.L178:
	cmp	DWORD PTR -16[rbp], 9
	jle	.L182
	mov	eax, DWORD PTR solution_count[rip]
	add	eax, 2
	mov	DWORD PTR solution_count[rip], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	record_solution, .-record_solution
	.globl	solve
	.type	solve, @function
solve:
.LFB27:
	.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	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	edx, DWORD PTR solution_count[rip]
	mov	eax, DWORD PTR max_solutions[rip]
	cmp	edx, eax
	jge	.L197
	jmp	.L186
.L187:
	add	DWORD PTR -40[rbp], 1
.L186:
	mov	rdx, QWORD PTR board[rip]
	mov	eax, DWORD PTR -40[rbp]
	mov	ecx, eax
	shr	rdx, cl
	mov	rax, rdx
	and	eax, 1
	test	rax, rax
	jne	.L187
	mov	DWORD PTR -20[rbp], 0
	jmp	.L188
.L196:
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	WORD PTR -22[rbp], ax
	movzx	eax, WORD PTR avail[rip]
	and	ax, WORD PTR -22[rbp]
	test	ax, ax
	je	.L198
	movzx	eax, WORD PTR avail[rip]
	xor	ax, WORD PTR -22[rbp]
	mov	WORD PTR avail[rip], ax
	mov	eax, DWORD PTR -40[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rax
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, piece_counts[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 5
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	imul	rdx, rdx, 4800
	add	rdx, rax
	lea	rax, pieces[rip]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L191
.L195:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR board[rip]
	and	rax, rdx
	test	rax, rax
	jne	.L192
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, sol_nums[rip]
	mov	BYTE PTR [rax+rdx], cl
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	lea	rdx, sol_masks[rip]
	mov	QWORD PTR [rcx+rdx], rax
	cmp	DWORD PTR -36[rbp], 9
	jne	.L193
	call	record_solution
	movzx	eax, WORD PTR avail[rip]
	xor	ax, WORD PTR -22[rbp]
	mov	WORD PTR avail[rip], ax
	jmp	.L183
.L193:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR board[rip]
	or	rax, rdx
	mov	QWORD PTR board[rip], rax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	edx, DWORD PTR -40[rbp]
	movsx	rdx, edx
	imul	rsi, rax, 600
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rsi
	lea	rdx, [rax+rcx]
	lea	rax, next_cell[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	boardHasIslands
	test	eax, eax
	jne	.L194
	mov	eax, DWORD PTR -16[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	edx, DWORD PTR -40[rbp]
	movsx	rdx, edx
	imul	rsi, rax, 600
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rsi
	lea	rdx, [rax+rcx]
	lea	rax, next_cell[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, DWORD PTR -36[rbp]
	add	edx, 1
	mov	esi, eax
	mov	edi, edx
	call	solve
.L194:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR board[rip]
	xor	rax, rdx
	mov	QWORD PTR board[rip], rax
.L192:
	add	DWORD PTR -16[rbp], 1
.L191:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L195
	movzx	eax, WORD PTR avail[rip]
	xor	ax, WORD PTR -22[rbp]
	mov	WORD PTR avail[rip], ax
	jmp	.L190
.L198:
	nop
.L190:
	add	DWORD PTR -20[rbp], 1
.L188:
	cmp	DWORD PTR -20[rbp], 9
	jle	.L196
	jmp	.L183
.L197:
	nop
.L183:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE27:
	.size	solve, .-solve
	.globl	solution_sort
	.type	solution_sort, @function
solution_sort:
.LFB28:
	.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 -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L200
.L202:
	add	DWORD PTR -20[rbp], 1
.L200:
	cmp	DWORD PTR -20[rbp], 49
	jg	.L201
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	je	.L202
.L201:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edx, DWORD PTR -20[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	movzx	edx, BYTE PTR [rdx]
	movsx	edx, dl
	sub	eax, edx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE28:
	.size	solution_sort, .-solution_sort
	.section	.rodata
	.align 8
.LC0:
	.string	"%c %c %c %c %c \n %c %c %c %c %c \n"
	.text
	.globl	pretty
	.type	pretty, @function
pretty:
.LFB29:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 32
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -20[rbp], 0
	jmp	.L205
.L206:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 9[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	r10d, 48[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	r9d, 48[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 7[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	r8d, 48[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 6[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	edi, 48[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 5[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	esi, 48[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	ebx, 48[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 3[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	r11d, 48[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 2[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	ecx, 48[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	edx, 48[rax]
	mov	eax, DWORD PTR -20[rbp]
	movsx	r12, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, r12
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	add	eax, 48
	sub	rsp, 8
	push	r10
	push	r9
	push	r8
	push	rdi
	push	rsi
	mov	r9d, ebx
	mov	r8d, r11d
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 48
	add	DWORD PTR -20[rbp], 10
.L205:
	cmp	DWORD PTR -20[rbp], 49
	jle	.L206
	mov	edi, 10
	call	putchar@PLT
	nop
	lea	rsp, -16[rbp]
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE29:
	.size	pretty, .-pretty
	.section	.rodata
.LC1:
	.string	"%d solutions found\n\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB30:
	.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	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	cmp	DWORD PTR -4[rbp], 1
	jle	.L208
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR max_solutions[rip], eax
.L208:
	call	calc_pieces
	call	calc_rows
	mov	esi, 0
	mov	edi, 0
	call	solve
	mov	eax, DWORD PTR solution_count[rip]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR solution_count[rip]
	cdqe
	lea	rcx, solution_sort[rip]
	mov	edx, 50
	mov	rsi, rax
	lea	rdi, solutions[rip]
	call	qsort@PLT
	lea	rdi, solutions[rip]
	call	pretty
	mov	eax, DWORD PTR solution_count[rip]
	sub	eax, 1
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rax
	lea	rdx, solutions[rip]
	add	rax, rdx
	mov	rdi, rax
	call	pretty
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE30:
	.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	"147197.c"
	.text
	.global	board
	.data
	.align	3
	.type	board, %object
	.size	board, 8
board:
	.word	0
	.word	-262144
	.global	piece_def
	.align	2
	.type	piece_def, %object
	.size	piece_def, 40
piece_def:
	.ascii	"\000\000\000\002"
	.ascii	"\002\000\012\000"
	.ascii	"\000\000\002\004"
	.ascii	"\000\000\004\002"
	.ascii	"\002\000\012\003"
	.ascii	"\000\000\004\000"
	.ascii	"\000\002\002\012"
	.ascii	"\000\002\002\006"
	.ascii	"\000\002\000\000"
	.ascii	"\000\000\000\004"
	.comm	pieces,48000,8
	.comm	piece_counts,2000,4
	.comm	next_cell,6000,4
	.text
	.align	2
	.global	rotate
	.syntax unified
	.arm
	.fpu softvfp
	.type	rotate, %function
rotate:
	@ 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
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	add	r1, r3, #2
	ldr	r3, .L3
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	and	r3, r2, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L4:
	.align	2
.L3:
	.word	715827883
	.size	rotate, .-rotate
	.align	2
	.global	flip
	.syntax unified
	.arm
	.fpu softvfp
	.type	flip, %function
flip:
	@ 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
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	rsb	r1, r3, #12
	ldr	r3, .L7
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	and	r3, r2, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L8:
	.align	2
.L7:
	.word	715827883
	.size	flip, .-flip
	.align	2
	.global	shift
	.syntax unified
	.arm
	.fpu softvfp
	.type	shift, %function
shift:
	@ 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
	mov	r3, r0
	mov	r2, r1
	strb	r3, [fp, #-5]
	mov	r3, r2
	strb	r3, [fp, #-6]
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	cmp	r3, #11
	ldrls	pc, [pc, r3, asl #2]
	b	.L10
.L12:
	.word	.L23
	.word	.L22
	.word	.L21
	.word	.L20
	.word	.L19
	.word	.L18
	.word	.L17
	.word	.L16
	.word	.L15
	.word	.L14
	.word	.L13
	.word	.L11
.L23:
	ldrb	r3, [fp, #-5]
	add	r3, r3, #1
	and	r3, r3, #255
	b	.L24
.L22:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, .L33
	umull	r1, r3, r2, r3
	lsr	r3, r3, #2
	and	r3, r3, #255
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L25
	ldrb	r3, [fp, #-5]
	add	r3, r3, #7
	and	r3, r3, #255
	b	.L24
.L25:
	ldrb	r3, [fp, #-5]
	add	r3, r3, #6
	and	r3, r3, #255
	b	.L24
.L21:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, .L33
	umull	r1, r3, r2, r3
	lsr	r3, r3, #2
	and	r3, r3, #255
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L26
	ldrb	r3, [fp, #-5]
	add	r3, r3, #6
	and	r3, r3, #255
	b	.L24
.L26:
	ldrb	r3, [fp, #-5]
	add	r3, r3, #5
	and	r3, r3, #255
	b	.L24
.L20:
	ldrb	r3, [fp, #-5]
	add	r3, r3, #10
	and	r3, r3, #255
	b	.L24
.L19:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, .L33
	umull	r1, r3, r2, r3
	lsr	r3, r3, #2
	and	r3, r3, #255
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L27
	ldrb	r3, [fp, #-5]
	add	r3, r3, #5
	and	r3, r3, #255
	b	.L24
.L27:
	ldrb	r3, [fp, #-5]
	add	r3, r3, #4
	and	r3, r3, #255
	b	.L24
.L18:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, .L33
	umull	r1, r3, r2, r3
	lsr	r3, r3, #2
	and	r3, r3, #255
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L28
	ldrb	r3, [fp, #-5]
	add	r3, r3, #4
	and	r3, r3, #255
	b	.L24
.L28:
	ldrb	r3, [fp, #-5]
	add	r3, r3, #3
	and	r3, r3, #255
	b	.L24
.L17:
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #1
	and	r3, r3, #255
	b	.L24
.L16:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, .L33
	umull	r1, r3, r2, r3
	lsr	r3, r3, #2
	and	r3, r3, #255
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L29
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #6
	and	r3, r3, #255
	b	.L24
.L29:
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #7
	and	r3, r3, #255
	b	.L24
.L15:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, .L33
	umull	r1, r3, r2, r3
	lsr	r3, r3, #2
	and	r3, r3, #255
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L30
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #5
	and	r3, r3, #255
	b	.L24
.L30:
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #6
	and	r3, r3, #255
	b	.L24
.L14:
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #10
	and	r3, r3, #255
	b	.L24
.L13:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, .L33
	umull	r1, r3, r2, r3
	lsr	r3, r3, #2
	and	r3, r3, #255
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L31
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #4
	and	r3, r3, #255
	b	.L24
.L31:
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #5
	and	r3, r3, #255
	b	.L24
.L11:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, .L33
	umull	r1, r3, r2, r3
	lsr	r3, r3, #2
	and	r3, r3, #255
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L32
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #3
	and	r3, r3, #255
	b	.L24
.L32:
	ldrb	r3, [fp, #-5]
	sub	r3, r3, #4
	and	r3, r3, #255
	b	.L24
.L10:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
.L24:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L34:
	.align	2
.L33:
	.word	-858993459
	.size	shift, .-shift
	.align	2
	.global	out_of_bounds
	.syntax unified
	.arm
	.fpu softvfp
	.type	out_of_bounds, %function
out_of_bounds:
	@ 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
	mov	r3, r0
	mov	r2, r1
	strb	r3, [fp, #-13]
	mov	r3, r2
	strb	r3, [fp, #-14]
	ldrb	r3, [fp, #-14]	@ zero_extendqisi2
	cmp	r3, #11
	ldrls	pc, [pc, r3, asl #2]
	b	.L36
.L38:
	.word	.L49
	.word	.L48
	.word	.L47
	.word	.L46
	.word	.L45
	.word	.L44
	.word	.L43
	.word	.L42
	.word	.L41
	.word	.L40
	.word	.L39
	.word	.L37
.L49:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, .L75
	umull	r1, r3, r2, r3
	lsr	r1, r3, #2
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	sub	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #4
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	b	.L50
.L48:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, .L75
	umull	r1, r3, r2, r3
	lsr	r1, r3, #3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #1
	sub	r3, r2, r3
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #4
	beq	.L51
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #8
	beq	.L51
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L51
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #44
	bls	.L52
.L51:
	mov	r3, #1
	b	.L53
.L52:
	mov	r3, #0
.L53:
	and	r3, r3, #255
	b	.L50
.L47:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, .L75
	umull	r1, r3, r2, r3
	lsr	r1, r3, #3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #1
	sub	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #9
	beq	.L54
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #44
	bls	.L55
.L54:
	mov	r3, #1
	b	.L56
.L55:
	mov	r3, #0
.L56:
	and	r3, r3, #255
	b	.L50
.L46:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #39
	movhi	r3, #1
	movls	r3, #0
	and	r3, r3, #255
	b	.L50
.L45:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, .L75
	umull	r1, r3, r2, r3
	lsr	r1, r3, #3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #1
	sub	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L57
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #44
	bls	.L58
.L57:
	mov	r3, #1
	b	.L59
.L58:
	mov	r3, #0
.L59:
	and	r3, r3, #255
	b	.L50
.L44:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, .L75
	umull	r1, r3, r2, r3
	lsr	r1, r3, #3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #1
	sub	r3, r2, r3
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L60
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #1
	beq	.L60
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #5
	beq	.L60
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #44
	bls	.L61
.L60:
	mov	r3, #1
	b	.L62
.L61:
	mov	r3, #0
.L62:
	and	r3, r3, #255
	b	.L50
.L43:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, .L75
	umull	r1, r3, r2, r3
	lsr	r1, r3, #2
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	sub	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	b	.L50
.L42:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, .L75
	umull	r1, r3, r2, r3
	lsr	r1, r3, #3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #1
	sub	r3, r2, r3
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L63
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #1
	beq	.L63
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #5
	beq	.L63
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #4
	bhi	.L64
.L63:
	mov	r3, #1
	b	.L65
.L64:
	mov	r3, #0
.L65:
	and	r3, r3, #255
	b	.L50
.L41:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, .L75
	umull	r1, r3, r2, r3
	lsr	r1, r3, #3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #1
	sub	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L66
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #4
	bhi	.L67
.L66:
	mov	r3, #1
	b	.L68
.L67:
	mov	r3, #0
.L68:
	and	r3, r3, #255
	b	.L50
.L40:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #9
	movls	r3, #1
	movhi	r3, #0
	and	r3, r3, #255
	b	.L50
.L39:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, .L75
	umull	r1, r3, r2, r3
	lsr	r1, r3, #3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #1
	sub	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #9
	beq	.L69
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #4
	bhi	.L70
.L69:
	mov	r3, #1
	b	.L71
.L70:
	mov	r3, #0
.L71:
	and	r3, r3, #255
	b	.L50
.L37:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, .L75
	umull	r1, r3, r2, r3
	lsr	r1, r3, #3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #1
	sub	r3, r2, r3
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #4
	beq	.L72
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #8
	beq	.L72
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L72
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #4
	bhi	.L73
.L72:
	mov	r3, #1
	b	.L74
.L73:
	mov	r3, #0
.L74:
	and	r3, r3, #255
	b	.L50
.L36:
	mov	r3, #0
.L50:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L76:
	.align	2
.L75:
	.word	-858993459
	.size	out_of_bounds, .-out_of_bounds
	.align	2
	.global	rotate_piece
	.syntax unified
	.arm
	.fpu softvfp
	.type	rotate_piece, %function
rotate_piece:
	@ 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	.L78
.L79:
	ldr	r2, .L80
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	rotate
	mov	r3, r0
	mov	r1, r3
	ldr	r2, .L80
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L78:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L79
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L81:
	.align	2
.L80:
	.word	piece_def
	.size	rotate_piece, .-rotate_piece
	.align	2
	.global	flip_piece
	.syntax unified
	.arm
	.fpu softvfp
	.type	flip_piece, %function
flip_piece:
	@ 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	.L83
.L84:
	ldr	r2, .L85
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	flip
	mov	r3, r0
	mov	r1, r3
	ldr	r2, .L85
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L83:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L84
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L86:
	.align	2
.L85:
	.word	piece_def
	.size	flip_piece, .-flip_piece
	.align	2
	.global	calc_cell_indices
	.syntax unified
	.arm
	.fpu softvfp
	.type	calc_cell_indices, %function
calc_cell_indices:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, r2
	strb	r3, [fp, #-21]
	ldr	r3, [fp, #-16]
	ldrb	r2, [fp, #-21]
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, .L88
	ldr	r3, [fp, #-20]
	ldrb	r1, [r1, r3, lsl #2]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	add	r4, r3, #1
	mov	r0, r2
	bl	shift
	mov	r3, r0
	strb	r3, [r4]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, .L88
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrb	r1, [r3, #1]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	add	r4, r3, #2
	mov	r0, r2
	bl	shift
	mov	r3, r0
	strb	r3, [r4]
	ldr	r3, [fp, #-16]
	add	r3, r3, #2
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, .L88
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrb	r1, [r3, #2]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	add	r4, r3, #3
	mov	r0, r2
	bl	shift
	mov	r3, r0
	strb	r3, [r4]
	ldr	r3, [fp, #-16]
	add	r3, r3, #3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, .L88
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrb	r1, [r3, #3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	add	r4, r3, #4
	mov	r0, r2
	bl	shift
	mov	r3, r0
	strb	r3, [r4]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L89:
	.align	2
.L88:
	.word	piece_def
	.size	calc_cell_indices, .-calc_cell_indices
	.align	2
	.global	cells_fit_on_board
	.syntax unified
	.arm
	.fpu softvfp
	.type	cells_fit_on_board, %function
cells_fit_on_board:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, .L94
	ldr	r3, [fp, #-12]
	ldrb	r3, [r1, r3, lsl #2]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, r2
	bl	out_of_bounds
	mov	r3, r0
	cmp	r3, #0
	bne	.L91
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, .L94
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, r2
	bl	out_of_bounds
	mov	r3, r0
	cmp	r3, #0
	bne	.L91
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, .L94
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, r2
	bl	out_of_bounds
	mov	r3, r0
	cmp	r3, #0
	bne	.L91
	ldr	r3, [fp, #-8]
	add	r3, r3, #3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, .L94
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrb	r3, [r3, #3]	@ zero_extendqisi2
	mov	r1, r3
	mov	r0, r2
	bl	out_of_bounds
	mov	r3, r0
	cmp	r3, #0
	bne	.L91
	mov	r3, #1
	b	.L93
.L91:
	mov	r3, #0
.L93:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L95:
	.align	2
.L94:
	.word	piece_def
	.size	cells_fit_on_board, .-cells_fit_on_board
	.align	2
	.global	minimum_of_cells
	.syntax unified
	.arm
	.fpu softvfp
	.type	minimum_of_cells, %function
minimum_of_cells:
	@ 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, #-16]
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]
	strb	r3, [fp, #-5]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	cmp	r2, r3
	movcc	r3, r2
	movcs	r3, r3
	strb	r3, [fp, #-5]
	ldr	r3, [fp, #-16]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	cmp	r2, r3
	movcc	r3, r2
	movcs	r3, r3
	strb	r3, [fp, #-5]
	ldr	r3, [fp, #-16]
	add	r3, r3, #3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	cmp	r2, r3
	movcc	r3, r2
	movcs	r3, r3
	strb	r3, [fp, #-5]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	cmp	r2, r3
	movcc	r3, r2
	movcs	r3, r3
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	minimum_of_cells, .-minimum_of_cells
	.align	2
	.global	first_empty_cell
	.syntax unified
	.arm
	.fpu softvfp
	.type	first_empty_cell, %function
first_empty_cell:
	@ 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, #-16]
	mov	r3, r1
	strb	r3, [fp, #-17]
	ldrb	r3, [fp, #-17]
	strb	r3, [fp, #-5]
	b	.L99
.L100:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-5]
.L99:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L100
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L100
	ldr	r3, [fp, #-16]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L100
	ldr	r3, [fp, #-16]
	add	r3, r3, #3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L100
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L100
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	first_empty_cell, .-first_empty_cell
	.align	2
	.global	bitmask_from_cells
	.syntax unified
	.arm
	.fpu softvfp
	.type	bitmask_from_cells, %function
bitmask_from_cells:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #28
	str	r0, [fp, #-40]
	mov	r0, #0
	mov	r1, #0
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	mov	r1, #0
	str	r1, [fp, #-32]
	b	.L103
.L104:
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-40]
	add	r1, r0, r1
	ldrb	r1, [r1]	@ zero_extendqisi2
	mov	ip, r1
	mov	r0, #1
	mov	r1, #0
	sub	r6, ip, #32
	rsb	lr, ip, #32
	lsl	r3, r1, ip
	orr	r3, r3, r0, lsl r6
	orr	r3, r3, r0, lsr lr
	lsl	r2, r0, ip
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	orr	r4, r0, r2
	orr	r5, r1, r3
	str	r4, [fp, #-28]
	str	r5, [fp, #-24]
	ldr	r1, [fp, #-32]
	add	r1, r1, #1
	str	r1, [fp, #-32]
.L103:
	ldr	r1, [fp, #-32]
	cmp	r1, #4
	ble	.L104
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
	.size	bitmask_from_cells, .-bitmask_from_cells
	.align	2
	.global	record_piece
	.syntax unified
	.arm
	.fpu softvfp
	.type	record_piece, %function
record_piece:
	@ args = 8, 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]
	mov	r3, r2
	strb	r3, [fp, #-13]
	ldr	r1, .L107
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r0, [r1, r3, lsl #2]
	ldr	ip, .L107+4
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r1
	lsl	r2, r2, #2
	add	r2, r2, r1
	lsl	r1, r2, #4
	sub	r1, r1, r2
	lsl	r2, r1, #3
	mov	r1, r2
	add	r3, r3, r1
	add	r3, r3, r0
	lsl	r3, r3, #3
	add	r1, ip, r3
	ldmib	fp, {r2-r3}
	stm	r1, {r2-r3}
	ldr	r1, .L107
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r0, [r1, r3, lsl #2]
	ldr	ip, .L107+8
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r1
	lsl	r2, r2, #2
	add	r2, r2, r1
	lsl	r1, r2, #4
	sub	r1, r1, r2
	lsl	r2, r1, #3
	mov	r1, r2
	add	r3, r3, r1
	add	r3, ip, r3
	add	r3, r3, r0
	ldrb	r2, [fp, #-13]
	strb	r2, [r3]
	ldr	r1, .L107
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	add	r1, r3, #1
	ldr	r0, .L107
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	str	r1, [r0, r3, lsl #2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L108:
	.align	2
.L107:
	.word	piece_counts
	.word	pieces
	.word	next_cell
	.size	record_piece, .-record_piece
	.align	2
	.global	fill_contiguous_space
	.syntax unified
	.arm
	.fpu softvfp
	.type	fill_contiguous_space, %function
fill_contiguous_space:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #1
	beq	.L117
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #1
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #0
	mov	r0, r3
	bl	out_of_bounds
	mov	r3, r0
	cmp	r3, #0
	bne	.L112
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #0
	mov	r0, r3
	bl	shift
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fill_contiguous_space
.L112:
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #2
	mov	r0, r3
	bl	out_of_bounds
	mov	r3, r0
	cmp	r3, #0
	bne	.L113
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #2
	mov	r0, r3
	bl	shift
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fill_contiguous_space
.L113:
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #4
	mov	r0, r3
	bl	out_of_bounds
	mov	r3, r0
	cmp	r3, #0
	bne	.L114
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #4
	mov	r0, r3
	bl	shift
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fill_contiguous_space
.L114:
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #6
	mov	r0, r3
	bl	out_of_bounds
	mov	r3, r0
	cmp	r3, #0
	bne	.L115
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #6
	mov	r0, r3
	bl	shift
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fill_contiguous_space
.L115:
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #8
	mov	r0, r3
	bl	out_of_bounds
	mov	r3, r0
	cmp	r3, #0
	bne	.L116
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #8
	mov	r0, r3
	bl	shift
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fill_contiguous_space
.L116:
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #10
	mov	r0, r3
	bl	out_of_bounds
	mov	r3, r0
	cmp	r3, #0
	bne	.L109
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #10
	mov	r0, r3
	bl	shift
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fill_contiguous_space
	b	.L109
.L117:
	nop
.L109:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	fill_contiguous_space, .-fill_contiguous_space
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	has_island
	.syntax unified
	.arm
	.fpu softvfp
	.type	has_island, %function
has_island:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L135
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L119
.L120:
	sub	r2, fp, #60
	ldr	r3, [fp, #-64]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L119:
	ldr	r3, [fp, #-64]
	cmp	r3, #49
	ble	.L120
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L121
.L122:
	ldr	r3, [fp, #-64]
	ldr	r2, [fp, #-72]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #1
	strb	r2, [r3, #-56]
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L121:
	ldr	r3, [fp, #-64]
	cmp	r3, #4
	ble	.L122
	mov	r3, #49
	str	r3, [fp, #-64]
	b	.L123
.L124:
	ldr	r3, [fp, #-64]
	sub	r3, r3, #1
	str	r3, [fp, #-64]
.L123:
	sub	r2, fp, #60
	ldr	r3, [fp, #-64]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #1
	beq	.L124
	sub	r3, fp, #60
	ldr	r1, [fp, #-64]
	mov	r0, r3
	bl	fill_contiguous_space
	mov	r3, #0
	strb	r3, [fp, #-65]
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L125
.L127:
	sub	r2, fp, #60
	ldr	r3, [fp, #-64]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L126
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-65]
.L126:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L125:
	ldr	r3, [fp, #-64]
	cmp	r3, #49
	ble	.L127
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L128
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	cmp	r3, #5
	bne	.L129
	ldr	r3, [fp, #-76]
	cmp	r3, #8
	beq	.L128
.L129:
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	cmp	r3, #40
	bne	.L130
	ldr	r3, [fp, #-76]
	cmp	r3, #8
	beq	.L128
.L130:
	ldrb	r2, [fp, #-65]	@ zero_extendqisi2
	ldr	r3, .L135+4
	umull	r1, r3, r2, r3
	lsr	r1, r3, #2
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	sub	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	bne	.L131
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	bne	.L131
.L128:
	mov	r3, #0
	b	.L133
.L131:
	mov	r3, #1
.L133:
	ldr	r2, .L135
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L134
	bl	__stack_chk_fail
.L134:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L136:
	.align	2
.L135:
	.word	.LC0
	.word	-858993459
	.size	has_island, .-has_island
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	calc_six_rotations
	.syntax unified
	.arm
	.fpu softvfp
	.type	calc_six_rotations, %function
calc_six_rotations:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	mov	r3, r0
	mov	r2, r1
	strb	r3, [fp, #-37]
	mov	r3, r2
	strb	r3, [fp, #-38]
	ldr	r3, .L143
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strb	r3, [fp, #-31]
	b	.L138
.L141:
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	cmp	r3, #3
	bne	.L139
	ldrb	r3, [fp, #-31]	@ zero_extendqisi2
	cmp	r3, #2
	bhi	.L140
.L139:
	ldrb	r1, [fp, #-37]	@ zero_extendqisi2
	ldrb	r2, [fp, #-38]	@ zero_extendqisi2
	sub	r3, fp, #16
	mov	r0, r3
	bl	calc_cell_indices
	ldrb	r2, [fp, #-37]	@ zero_extendqisi2
	sub	r3, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	cells_fit_on_board
	mov	r3, r0
	cmp	r3, #0
	beq	.L140
	ldrb	r2, [fp, #-37]	@ zero_extendqisi2
	sub	r3, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	has_island
	mov	r3, r0
	cmp	r3, #0
	bne	.L140
	sub	r3, fp, #16
	mov	r0, r3
	bl	minimum_of_cells
	mov	r3, r0
	strb	r3, [fp, #-30]
	ldrb	r2, [fp, #-30]	@ zero_extendqisi2
	sub	r3, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	first_empty_cell
	mov	r3, r0
	strb	r3, [fp, #-29]
	sub	r3, fp, #16
	mov	r0, r3
	bl	bitmask_from_cells
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	ldrb	r0, [fp, #-37]	@ zero_extendqisi2
	ldrb	r1, [fp, #-30]	@ zero_extendqisi2
	ldrb	ip, [fp, #-29]	@ zero_extendqisi2
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	mov	r2, ip
	bl	record_piece
.L140:
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	mov	r0, r3
	bl	rotate_piece
	ldrb	r3, [fp, #-31]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-31]
.L138:
	ldrb	r3, [fp, #-31]	@ zero_extendqisi2
	cmp	r3, #5
	bls	.L141
	nop
	ldr	r3, .L143
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L142
	bl	__stack_chk_fail
.L142:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L144:
	.align	2
.L143:
	.word	.LC1
	.size	calc_six_rotations, .-calc_six_rotations
	.align	2
	.global	calc_pieces
	.syntax unified
	.arm
	.fpu softvfp
	.type	calc_pieces, %function
calc_pieces:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	strb	r3, [fp, #-6]
	b	.L146
.L149:
	mov	r3, #0
	strb	r3, [fp, #-5]
	b	.L147
.L148:
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	mov	r1, r2
	mov	r0, r3
	bl	calc_six_rotations
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	mov	r0, r3
	bl	flip_piece
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	mov	r1, r2
	mov	r0, r3
	bl	calc_six_rotations
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-5]
.L147:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #49
	bls	.L148
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-6]
.L146:
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	cmp	r3, #9
	bls	.L149
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	calc_pieces, .-calc_pieces
	.global	all_rows
	.data
	.align	2
	.type	all_rows, %object
	.size	all_rows, 32
all_rows:
	.ascii	"\000\001\002\003\004\005\006\007\010\011\012\013\014"
	.ascii	"\015\016\017\020\021\022\023\024\025\026\027\030\031"
	.ascii	"\032\033\034\035\036\037"
	.comm	bad_even_rows,4096,4
	.comm	bad_odd_rows,4096,4
	.comm	bad_even_triple,131072,4
	.comm	bad_odd_triple,131072,4
	.text
	.align	2
	.global	rows_bad
	.syntax unified
	.arm
	.fpu softvfp
	.type	rows_bad, %function
rows_bad:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	mov	r3, r0
	str	r2, [fp, #-28]
	strb	r3, [fp, #-21]
	mov	r3, r1
	strb	r3, [fp, #-22]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L151
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	lsl	r3, r3, #1
	lsl	r3, r3, #24
	asr	r3, r3, #24
	and	r3, r3, #30
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r3, #1
	lsl	r3, r3, #24
	asr	r3, r3, #24
	strb	r3, [fp, #-18]
	b	.L152
.L151:
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	lsr	r3, r3, #1
	and	r3, r3, #255
	orr	r3, r3, #16
	strb	r3, [fp, #-18]
.L152:
	ldrb	r3, [fp, #-21]
	mvn	r3, r3
	and	r2, r3, #255
	ldrb	r3, [fp, #-22]
	and	r3, r3, r2
	and	r2, r3, #255
	ldrb	r3, [fp, #-18]
	and	r3, r3, r2
	strb	r3, [fp, #-17]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L153
.L159:
	ldrb	r2, [fp, #-21]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	asr	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L154
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L155
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L156
	mov	r3, #1
	b	.L157
.L156:
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L155
.L154:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L158
	mov	r3, #1
	str	r3, [fp, #-12]
.L158:
	ldrb	r2, [fp, #-17]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	asr	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L155
	mov	r3, #1
	str	r3, [fp, #-8]
.L155:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L153:
	ldr	r3, [fp, #-16]
	cmp	r3, #4
	ble	.L159
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L160
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	b	.L157
.L160:
	mov	r3, #0
.L157:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	rows_bad, .-rows_bad
	.align	2
	.global	triple_is_okay
	.syntax unified
	.arm
	.fpu softvfp
	.type	triple_is_okay, %function
triple_is_okay:
	@ 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	r3, [fp, #-12]
	mov	r3, r0
	strb	r3, [fp, #-5]
	mov	r3, r1
	strb	r3, [fp, #-6]
	mov	r3, r2
	strb	r3, [fp, #-7]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L162
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #3
	bne	.L163
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	cmp	r3, #11
	bne	.L163
	ldrb	r3, [fp, #-7]	@ zero_extendqisi2
	and	r3, r3, #28
	cmp	r3, #12
	beq	.L164
.L163:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #1
	bne	.L165
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	cmp	r3, #5
	bne	.L165
	ldrb	r3, [fp, #-7]	@ zero_extendqisi2
	cmp	r3, #6
	beq	.L164
.L165:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #25
	bne	.L166
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	cmp	r3, #17
	beq	.L164
.L166:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #21
	bne	.L167
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	cmp	r3, #17
	bne	.L167
.L164:
	mov	r3, #1
	b	.L169
.L167:
	mov	r3, #0
	b	.L169
.L162:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #19
	bne	.L170
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	cmp	r3, #17
	beq	.L171
.L170:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #21
	bne	.L172
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	cmp	r3, #17
	bne	.L172
.L171:
	mov	r3, #1
	b	.L169
.L172:
	mov	r3, #0
.L169:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	triple_is_okay, .-triple_is_okay
	.align	2
	.global	calc_rows
	.syntax unified
	.arm
	.fpu softvfp
	.type	calc_rows, %function
calc_rows:
	@ 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	r3, #0
	str	r3, [fp, #-24]
	b	.L175
.L178:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L176
.L177:
	ldr	r3, [fp, #-24]
	and	r0, r3, #255
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	mov	r2, #1
	mov	r1, r3
	bl	rows_bad
	mov	r1, r0
	ldr	r0, .L195
	ldr	r3, [fp, #-24]
	lsl	r2, r3, #5
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	str	r1, [r0, r3, lsl #2]
	ldr	r3, [fp, #-24]
	and	r0, r3, #255
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	mov	r2, #0
	mov	r1, r3
	bl	rows_bad
	mov	r1, r0
	ldr	r0, .L195+4
	ldr	r3, [fp, #-24]
	lsl	r2, r3, #5
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	str	r1, [r0, r3, lsl #2]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L176:
	ldr	r3, [fp, #-20]
	cmp	r3, #31
	ble	.L177
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L175:
	ldr	r3, [fp, #-24]
	cmp	r3, #31
	ble	.L178
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L179
.L194:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L180
.L193:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L181
.L192:
	ldr	r1, .L195
	ldr	r3, [fp, #-24]
	lsl	r2, r3, #5
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	str	r3, [fp, #-12]
	ldr	r1, .L195+4
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #5
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L182
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bne	.L182
	ldr	r3, [fp, #-24]
	and	r0, r3, #255
	ldr	r3, [fp, #-20]
	and	r1, r3, #255
	ldr	r3, [fp, #-16]
	and	r2, r3, #255
	mov	r3, #1
	bl	triple_is_okay
	mov	r3, r0
	cmp	r3, #0
	beq	.L182
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #5
	ldr	r3, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #10
	add	r3, r2, r3
	ldr	r2, .L195+8
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	b	.L183
.L182:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L184
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L185
.L184:
	mov	r2, #1
	b	.L186
.L185:
	mov	r2, #0
.L186:
	ldr	r3, [fp, #-20]
	lsl	r1, r3, #5
	ldr	r3, [fp, #-24]
	add	r1, r1, r3
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #10
	add	r3, r1, r3
	ldr	r1, .L195+8
	str	r2, [r1, r3, lsl #2]
.L183:
	ldr	r1, .L195+4
	ldr	r3, [fp, #-24]
	lsl	r2, r3, #5
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	str	r3, [fp, #-12]
	ldr	r1, .L195
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #5
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L187
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bne	.L187
	ldr	r3, [fp, #-24]
	and	r0, r3, #255
	ldr	r3, [fp, #-20]
	and	r1, r3, #255
	ldr	r3, [fp, #-16]
	and	r2, r3, #255
	mov	r3, #0
	bl	triple_is_okay
	mov	r3, r0
	cmp	r3, #0
	beq	.L187
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #5
	ldr	r3, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #10
	add	r3, r2, r3
	ldr	r2, .L195+12
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	b	.L188
.L187:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L189
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L190
.L189:
	mov	r2, #1
	b	.L191
.L190:
	mov	r2, #0
.L191:
	ldr	r3, [fp, #-20]
	lsl	r1, r3, #5
	ldr	r3, [fp, #-24]
	add	r1, r1, r3
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #10
	add	r3, r1, r3
	ldr	r1, .L195+12
	str	r2, [r1, r3, lsl #2]
.L188:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L181:
	ldr	r3, [fp, #-16]
	cmp	r3, #31
	ble	.L192
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L180:
	ldr	r3, [fp, #-20]
	cmp	r3, #31
	ble	.L193
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L179:
	ldr	r3, [fp, #-24]
	cmp	r3, #31
	ble	.L194
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L196:
	.align	2
.L195:
	.word	bad_even_rows
	.word	bad_odd_rows
	.word	bad_even_triple
	.word	bad_odd_triple
	.size	calc_rows, .-calc_rows
	.align	2
	.global	boardHasIslands
	.syntax unified
	.arm
	.fpu softvfp
	.type	boardHasIslands, %function
boardHasIslands:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	mov	r1, r0
	strb	r1, [fp, #-21]
	ldrb	r1, [fp, #-21]	@ zero_extendqisi2
	cmp	r1, #39
	bls	.L198
	mov	r3, #0
	b	.L199
.L198:
	ldr	r1, .L201
	ldmia	r1, {r0-r1}
	ldrb	ip, [fp, #-21]	@ zero_extendqisi2
	ldr	lr, .L201+4
	umull	r4, ip, lr, ip
	lsr	ip, ip, #2
	and	ip, ip, #255
	mov	lr, ip
	mov	ip, lr
	lsl	ip, ip, #2
	add	ip, ip, lr
	rsb	r4, ip, #32
	sub	lr, ip, #32
	lsr	r2, r0, ip
	orr	r2, r2, r1, lsl r4
	orr	r2, r2, r1, lsr lr
	lsr	r3, r1, ip
	mov	r3, r2
	lsl	r3, r3, #17
	lsr	r3, r3, #17
	str	r3, [fp, #-16]
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	ldr	r2, .L201+4
	umull	r1, r3, r2, r3
	lsr	r3, r3, #2
	and	r3, r3, #255
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L200
	ldr	r2, .L201+8
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	b	.L199
.L200:
	ldr	r2, .L201+12
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
.L199:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L202:
	.align	2
.L201:
	.word	board
	.word	-858993459
	.word	bad_odd_triple
	.word	bad_even_triple
	.size	boardHasIslands, .-boardHasIslands
	.global	avail
	.data
	.align	1
	.type	avail, %object
	.size	avail, 2
avail:
	.short	1023
	.comm	sol_nums,10,4
	.comm	sol_masks,80,8
	.comm	solutions,105000,4
	.global	solution_count
	.bss
	.align	2
	.type	solution_count, %object
	.size	solution_count, 4
solution_count:
	.space	4
	.global	max_solutions
	.data
	.align	2
	.type	max_solutions, %object
	.size	max_solutions, 4
max_solutions:
	.word	2100
	.text
	.align	2
	.global	record_solution
	.syntax unified
	.arm
	.fpu softvfp
	.type	record_solution, %function
record_solution:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	push	{r4, r5, fp}
	add	fp, sp, #8
	sub	sp, sp, #20
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L204
.L208:
	ldr	r2, .L209
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L205
.L207:
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	mov	r0, #1
	mov	r1, #0
	and	r4, r2, r0
	and	r5, r3, r1
	orrs	r3, r4, r5
	beq	.L206
	ldr	r2, .L209+4
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldr	r2, .L209+8
	ldr	r2, [r2]
	lsl	r3, r3, #24
	asr	r0, r3, #24
	ldr	r1, .L209+12
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r2, r1, r3
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	mov	r2, r0
	strb	r2, [r3]
	ldr	r2, .L209+4
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldr	r2, .L209+8
	ldr	r2, [r2]
	add	r2, r2, #1
	ldr	r1, [fp, #-24]
	rsb	r1, r1, #49
	lsl	r3, r3, #24
	asr	ip, r3, #24
	ldr	r0, .L209+12
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r0, r3
	add	r3, r3, r1
	mov	r2, ip
	strb	r2, [r3]
.L206:
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	mov	r2, #0
	mov	r3, #0
	lsr	r2, r0, #1
	orr	r2, r2, r1, lsl #31
	lsr	r3, r1, #1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L205:
	ldr	r3, [fp, #-24]
	cmp	r3, #49
	ble	.L207
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L204:
	ldr	r3, [fp, #-28]
	cmp	r3, #9
	ble	.L208
	ldr	r3, .L209+8
	ldr	r3, [r3]
	add	r3, r3, #2
	ldr	r2, .L209+8
	str	r3, [r2]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, r5, fp}
	bx	lr
.L210:
	.align	2
.L209:
	.word	sol_masks
	.word	sol_nums
	.word	solution_count
	.word	solutions
	.size	record_solution, .-record_solution
	.align	2
	.global	solve
	.syntax unified
	.arm
	.fpu softvfp
	.type	solve, %function
solve:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #44
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r1, .L227
	ldr	r0, [r1]
	ldr	r1, .L227+4
	ldr	r1, [r1]
	cmp	r0, r1
	bge	.L225
	b	.L214
.L215:
	ldr	r1, [fp, #-68]
	add	r1, r1, #1
	str	r1, [fp, #-68]
.L214:
	ldr	r1, .L227+8
	ldmia	r1, {r0-r1}
	ldr	ip, [fp, #-68]
	rsb	r10, ip, #32
	sub	lr, ip, #32
	lsr	r2, r0, ip
	orr	r2, r2, r1, lsl r10
	orr	r2, r2, r1, lsr lr
	lsr	r3, r1, ip
	mov	r0, #1
	mov	r1, #0
	and	ip, r2, r0
	str	ip, [fp, #-76]
	and	r1, r3, r1
	str	r1, [fp, #-72]
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	orrs	r1, r0, r1
	bne	.L215
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L216
.L224:
	mov	r2, #1
	ldr	r3, [fp, #-52]
	lsl	r3, r2, r3
	strh	r3, [fp, #-54]	@ movhi
	ldr	r3, .L227+12
	ldrsh	r2, [r3]
	ldrh	r3, [fp, #-54]	@ movhi
	and	r3, r3, r2
	lsl	r3, r3, #16
	asr	r3, r3, #16
	cmp	r3, #0
	beq	.L226
	ldr	r3, .L227+12
	ldrsh	r2, [r3]
	ldrh	r3, [fp, #-54]	@ movhi
	eor	r3, r3, r2
	lsl	r3, r3, #16
	asr	r3, r3, #16
	ldr	r2, .L227+12
	strh	r3, [r2]	@ movhi
	ldr	r1, .L227+16
	ldr	r2, [fp, #-52]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-68]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	str	r3, [fp, #-44]
	ldr	r2, [fp, #-68]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #5
	ldr	r1, [fp, #-52]
	mov	r2, r1
	lsl	r2, r2, #2
	add	r2, r2, r1
	lsl	r1, r2, #4
	sub	r1, r1, r2
	lsl	r2, r1, #6
	mov	r1, r2
	add	r3, r3, r1
	ldr	r2, .L227+20
	add	r3, r3, r2
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L219
.L223:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, .L227+8
	ldmia	r3, {r2-r3}
	and	r4, r0, r2
	and	r5, r1, r3
	orrs	r3, r4, r5
	bne	.L220
	ldr	r3, [fp, #-52]
	and	r1, r3, #255
	ldr	r2, .L227+24
	ldr	r3, [fp, #-64]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	ldr	r0, .L227+28
	ldr	r1, [fp, #-64]
	lsl	r1, r1, #3
	add	r1, r0, r1
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-64]
	cmp	r3, #9
	bne	.L221
	bl	record_solution
	ldr	r3, .L227+12
	ldrsh	r2, [r3]
	ldrh	r3, [fp, #-54]	@ movhi
	eor	r3, r3, r2
	lsl	r3, r3, #16
	asr	r3, r3, #16
	ldr	r2, .L227+12
	strh	r3, [r2]	@ movhi
	b	.L211
.L221:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, .L227+8
	ldmia	r3, {r2-r3}
	orr	r6, r0, r2
	orr	r7, r1, r3
	ldr	r3, .L227+8
	stm	r3, {r6-r7}
	ldr	r0, .L227+32
	ldr	r2, [fp, #-68]
	ldr	r1, [fp, #-52]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r1
	lsl	r2, r2, #2
	add	r2, r2, r1
	lsl	r1, r2, #4
	sub	r1, r1, r2
	lsl	r2, r1, #3
	mov	r1, r2
	add	r3, r3, r1
	add	r2, r0, r3
	ldr	r3, [fp, #-48]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	boardHasIslands
	mov	r3, r0
	cmp	r3, #0
	bne	.L222
	ldr	r3, [fp, #-64]
	add	r0, r3, #1
	ldr	ip, .L227+32
	ldr	r2, [fp, #-68]
	ldr	r1, [fp, #-52]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r1
	lsl	r2, r2, #2
	add	r2, r2, r1
	lsl	r1, r2, #4
	sub	r1, r1, r2
	lsl	r2, r1, #3
	mov	r1, r2
	add	r3, r3, r1
	add	r2, ip, r3
	ldr	r3, [fp, #-48]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	bl	solve
.L222:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, .L227+8
	ldmia	r3, {r2-r3}
	eor	r8, r0, r2
	eor	r9, r1, r3
	ldr	r3, .L227+8
	stm	r3, {r8-r9}
.L220:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L219:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L223
	ldr	r3, .L227+12
	ldrsh	r2, [r3]
	ldrh	r3, [fp, #-54]	@ movhi
	eor	r3, r3, r2
	lsl	r3, r3, #16
	asr	r3, r3, #16
	ldr	r2, .L227+12
	strh	r3, [r2]	@ movhi
	b	.L218
.L226:
	nop
.L218:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L216:
	ldr	r3, [fp, #-52]
	cmp	r3, #9
	ble	.L224
	b	.L211
.L225:
	nop
.L211:
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L228:
	.align	2
.L227:
	.word	solution_count
	.word	max_solutions
	.word	board
	.word	avail
	.word	piece_counts
	.word	pieces
	.word	sol_nums
	.word	sol_masks
	.word	next_cell
	.size	solve, .-solve
	.align	2
	.global	solution_sort
	.syntax unified
	.arm
	.fpu softvfp
	.type	solution_sort, %function
solution_sort:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L230
.L232:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L230:
	ldr	r3, [fp, #-16]
	cmp	r3, #49
	bgt	.L231
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldrsb	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	ldrsb	r3, [r3]
	cmp	r2, r3
	beq	.L232
.L231:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldrsb	r3, [r3]
	mov	r1, r3
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrsb	r3, [r3]
	sub	r3, r1, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	solution_sort, .-solution_sort
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%c %c %c %c %c \012 %c %c %c %c %c \012\000"
	.text
	.align	2
	.global	pretty
	.syntax unified
	.arm
	.fpu softvfp
	.type	pretty, %function
pretty:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #52
	str	r0, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L235
.L236:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrsb	r3, [r3]
	add	r6, r3, #48
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrsb	r3, [r3]
	add	r7, r3, #48
	ldr	r3, [fp, #-32]
	add	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrsb	r3, [r3]
	add	r8, r3, #48
	ldr	r3, [fp, #-32]
	add	r3, r3, #3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrsb	r3, [r3]
	add	r3, r3, #48
	ldr	r2, [fp, #-32]
	add	r2, r2, #4
	ldr	r1, [fp, #-40]
	add	r2, r1, r2
	ldrsb	r2, [r2]
	add	r2, r2, #48
	ldr	r1, [fp, #-32]
	add	r1, r1, #5
	ldr	r0, [fp, #-40]
	add	r1, r0, r1
	ldrsb	r1, [r1]
	add	r1, r1, #48
	ldr	r0, [fp, #-32]
	add	r0, r0, #6
	ldr	ip, [fp, #-40]
	add	r0, ip, r0
	ldrsb	r0, [r0]
	add	r0, r0, #48
	ldr	ip, [fp, #-32]
	add	ip, ip, #7
	ldr	lr, [fp, #-40]
	add	ip, lr, ip
	ldrsb	ip, [ip]
	add	ip, ip, #48
	ldr	lr, [fp, #-32]
	add	lr, lr, #8
	ldr	r4, [fp, #-40]
	add	lr, r4, lr
	ldrsb	lr, [lr]
	add	lr, lr, #48
	ldr	r4, [fp, #-32]
	add	r4, r4, #9
	ldr	r5, [fp, #-40]
	add	r4, r5, r4
	ldrsb	r4, [r4]
	add	r4, r4, #48
	str	r4, [sp, #24]
	str	lr, [sp, #20]
	str	ip, [sp, #16]
	str	r0, [sp, #12]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, r8
	mov	r2, r7
	mov	r1, r6
	ldr	r0, .L237
	bl	printf
	ldr	r3, [fp, #-32]
	add	r3, r3, #10
	str	r3, [fp, #-32]
.L235:
	ldr	r3, [fp, #-32]
	cmp	r3, #49
	ble	.L236
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L238:
	.align	2
.L237:
	.word	.LC2
	.size	pretty, .-pretty
	.section	.rodata
	.align	2
.LC3:
	.ascii	"%d solutions found\012\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	ble	.L240
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L242
	str	r3, [r2]
.L240:
	bl	calc_pieces
	bl	calc_rows
	mov	r1, #0
	mov	r0, #0
	bl	solve
	ldr	r3, .L242+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L242+8
	bl	printf
	ldr	r3, .L242+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r3, .L242+12
	mov	r2, #50
	ldr	r0, .L242+16
	bl	qsort
	ldr	r0, .L242+16
	bl	pretty
	ldr	r3, .L242+4
	ldr	r3, [r3]
	sub	r2, r3, #1
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, .L242+16
	add	r3, r3, r2
	mov	r0, r3
	bl	pretty
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L243:
	.align	2
.L242:
	.word	max_solutions
	.word	solution_count
	.word	.LC3
	.word	solution_sort
	.word	solutions
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
