	.file	"193894227.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"design.txt"
.LC1:
	.string	"pattern.txt"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -48[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	input
	test	eax, eax
	je	.L2
	mov	eax, 1
	jmp	.L11
.L2:
	lea	rax, -32[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	input
	test	eax, eax
	je	.L4
	mov	eax, 1
	jmp	.L11
.L4:
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -24[rbp]
	cmp	edx, eax
	je	.L5
	mov	edx, DWORD PTR -24[rbp]
	lea	rax, -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	adjust
.L5:
	lea	rdx, -32[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rcx
	mov	rsi, rax
	call	coloring
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rdx
	mov	rsi, rax
	mov	eax, 0
	call	output
	test	eax, eax
	je	.L6
	mov	eax, 1
	jmp	.L11
.L6:
	mov	DWORD PTR -52[rbp], 0
	jmp	.L7
.L8:
	mov	rdx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -52[rbp], 1
.L7:
	mov	eax, DWORD PTR -40[rbp]
	cmp	DWORD PTR -52[rbp], eax
	jl	.L8
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	DWORD PTR -52[rbp], 0
	jmp	.L9
.L10:
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -52[rbp], 1
.L9:
	mov	eax, DWORD PTR -24[rbp]
	cmp	DWORD PTR -52[rbp], eax
	jl	.L10
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC2:
	.string	"r"
.LC3:
	.string	"file %s can't be opened\n"
.LC4:
	.string	"%d"
.LC5:
	.string	"%s is invalid\n"
.LC6:
	.string	"allocating error in %s\n"
.LC7:
	.string	" %c"
	.text
	.globl	input
	.type	input, @function
input:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L14
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, 8[rax]
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	test	eax, eax
	jg	.L15
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L16
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	DWORD PTR -36[rbp], 0
	jmp	.L17
.L19:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	mov	rdx, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR [rbx]
	test	rax, rax
	jne	.L18
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	add	DWORD PTR -36[rbp], 1
.L17:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -36[rbp], eax
	jl	.L19
	mov	DWORD PTR -40[rbp], 0
	jmp	.L20
.L25:
	mov	DWORD PTR -36[rbp], 0
	jmp	.L21
.L24:
	lea	rdx, -41[rbp]
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	movzx	eax, BYTE PTR -41[rbp]
	sub	eax, 48
	mov	BYTE PTR -41[rbp], al
	movzx	eax, BYTE PTR -41[rbp]
	test	al, al
	js	.L22
	movzx	eax, BYTE PTR -41[rbp]
	cmp	al, 9
	jle	.L23
.L22:
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	add	rdx, rax
	movzx	eax, BYTE PTR -41[rbp]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -36[rbp], 1
.L21:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -36[rbp], eax
	jl	.L24
	add	DWORD PTR -40[rbp], 1
.L20:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -40[rbp], eax
	jl	.L25
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	input, .-input
	.section	.rodata
.LC8:
	.string	"temporary allocating error"
.LC9:
	.string	"allocating error"
.LC10:
	.string	"reallocating error"
	.text
	.globl	adjust
	.type	adjust, @function
adjust:
.LFB8:
	.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, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR -60[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L29
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L29:
	mov	DWORD PTR -32[rbp], 0
	jmp	.L30
.L32:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	mov	edx, DWORD PTR -32[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR [rbx]
	test	rax, rax
	jne	.L31
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L31:
	add	DWORD PTR -32[rbp], 1
.L30:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L32
	mov	DWORD PTR -36[rbp], 0
	jmp	.L33
.L36:
	mov	DWORD PTR -32[rbp], 0
	jmp	.L34
.L35:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	add	rax, rdx
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -32[rbp]
	movsx	rdx, edx
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -32[rbp], 1
.L34:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L35
	add	DWORD PTR -36[rbp], 1
.L33:
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L36
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	rdx, QWORD PTR -56[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L37
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L37:
	mov	DWORD PTR -32[rbp], 0
	jmp	.L38
.L40:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR [rcx]
	mov	ecx, DWORD PTR -32[rbp]
	movsx	rcx, ecx
	sal	rcx, 3
	lea	rbx, [rsi+rcx]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR [rbx]
	test	rax, rax
	jne	.L39
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L39:
	add	DWORD PTR -32[rbp], 1
.L38:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -32[rbp], eax
	jl	.L40
	mov	DWORD PTR -36[rbp], 0
	jmp	.L41
.L44:
	mov	DWORD PTR -32[rbp], 0
	jmp	.L42
.L43:
	mov	eax, DWORD PTR -36[rbp]
	cdq
	idiv	DWORD PTR -28[rbp]
	mov	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	cdq
	idiv	DWORD PTR -28[rbp]
	mov	eax, edx
	cdqe
	add	rcx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	add	rdx, rax
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -32[rbp], 1
.L42:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -32[rbp], eax
	jl	.L43
	add	DWORD PTR -36[rbp], 1
.L41:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -36[rbp], eax
	jl	.L44
	mov	DWORD PTR -32[rbp], 0
	jmp	.L45
.L46:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -32[rbp], 1
.L45:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L46
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	adjust, .-adjust
	.globl	coloring
	.type	coloring, @function
coloring:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	.cfi_offset 3, -24
	mov	rcx, rdi
	mov	rax, rsi
	mov	rbx, rax
	mov	QWORD PTR -48[rbp], rcx
	mov	QWORD PTR -40[rbp], rbx
	mov	QWORD PTR -56[rbp], rdx
	mov	DWORD PTR -24[rbp], 0
	jmp	.L48
.L53:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L49
.L52:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L54
	mov	rdx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rdx, rax
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
	jmp	.L51
.L54:
	nop
.L51:
	add	DWORD PTR -20[rbp], 1
.L49:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L52
	add	DWORD PTR -24[rbp], 1
.L48:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L53
	nop
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	coloring, .-coloring
	.section	.rodata
.LC11:
	.string	"wb"
.LC12:
	.string	"output.bmp"
.LC13:
	.string	"file opening process failed"
.LC14:
	.string	"BM"
	.text
	.globl	output
	.type	output, @function
output:
.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, 80
	mov	rax, rdi
	mov	rcx, rsi
	mov	rdx, rcx
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -20[rbp], 16774141
	mov	DWORD PTR -16[rbp], 14405862
	mov	DWORD PTR -12[rbp], 16634879
	mov	eax, DWORD PTR -72[rbp]
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	sal	eax, 5
	mov	DWORD PTR -44[rbp], eax
	lea	rsi, .LC11[rip]
	lea	rdi, .LC12[rip]
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L56
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L72
.L56:
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 2
	lea	rdi, .LC14[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -44[rbp]
	imul	eax, eax
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	add	eax, 74
	cdqe
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -40[rbp], 0
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -40[rbp], 74
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -40[rbp], 12
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fwrite@PLT
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -40[rbp], 1
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -40[rbp], 4
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -64[rbp], 0
	jmp	.L58
.L59:
	mov	QWORD PTR -40[rbp], 0
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	mov	eax, DWORD PTR -20[rbp+rax*4]
	cdqe
	movzx	eax, al
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	mov	eax, DWORD PTR -20[rbp+rax*4]
	cdqe
	and	eax, 65280
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	shr	rax, 8
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	mov	eax, DWORD PTR -20[rbp+rax*4]
	cdqe
	and	eax, 16711680
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	shr	rax, 16
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -64[rbp], 1
.L58:
	cmp	DWORD PTR -64[rbp], 2
	jle	.L59
	mov	DWORD PTR -64[rbp], 0
	jmp	.L60
.L61:
	mov	QWORD PTR -40[rbp], 0
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 3
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -64[rbp], 1
.L60:
	cmp	DWORD PTR -64[rbp], 12
	jle	.L61
	mov	DWORD PTR -64[rbp], 0
	jmp	.L62
.L71:
	mov	DWORD PTR -60[rbp], 0
	jmp	.L63
.L70:
	mov	DWORD PTR -56[rbp], 0
	jmp	.L64
.L69:
	mov	DWORD PTR -52[rbp], 0
	jmp	.L65
.L68:
	mov	rdx, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR -48[rbp]
	sub	eax, DWORD PTR -64[rbp]
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sal	eax, 4
	mov	ecx, eax
	mov	rdx, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR -48[rbp]
	sub	eax, DWORD PTR -64[rbp]
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	add	eax, ecx
	cdqe
	mov	QWORD PTR -40[rbp], rax
	cmp	DWORD PTR -60[rbp], 0
	jle	.L66
	cmp	DWORD PTR -60[rbp], 30
	jg	.L66
	cmp	DWORD PTR -52[rbp], 0
	jle	.L66
	cmp	DWORD PTR -52[rbp], 30
	jle	.L67
.L66:
	mov	QWORD PTR -40[rbp], 0
.L67:
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -52[rbp], 1
.L65:
	cmp	DWORD PTR -52[rbp], 15
	jle	.L68
	add	DWORD PTR -56[rbp], 1
.L64:
	mov	eax, DWORD PTR -56[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jl	.L69
	add	DWORD PTR -60[rbp], 1
.L63:
	cmp	DWORD PTR -60[rbp], 31
	jle	.L70
	add	DWORD PTR -64[rbp], 1
.L62:
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jl	.L71
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L72:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L73
	call	__stack_chk_fail@PLT
.L73:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	output, .-output
	.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	"193894227.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"design.txt\000"
	.align	2
.LC2:
	.ascii	"pattern.txt\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #24
	ldr	r1, .L13+4
	mov	r0, r3
	bl	input
	mov	r3, r0
	cmp	r3, #0
	beq	.L2
	mov	r3, #1
	b	.L11
.L2:
	sub	r3, fp, #16
	ldr	r1, .L13+8
	mov	r0, r3
	bl	input
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	mov	r3, #1
	b	.L11
.L4:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	beq	.L5
	ldr	r2, [fp, #-12]
	sub	r3, fp, #24
	mov	r1, r2
	mov	r0, r3
	bl	adjust
.L5:
	sub	r3, fp, #16
	mov	r2, r3
	sub	r3, fp, #24
	ldm	r3, {r0, r1}
	bl	coloring
	sub	r3, fp, #16
	ldm	r3, {r0, r1}
	bl	output
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	mov	r3, #1
	b	.L11
.L6:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L7
.L8:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L7:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L8
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	free
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L9
.L10:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L9:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L10
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	free
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC3
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
.LC4:
	.ascii	"r\000"
	.align	2
.LC5:
	.ascii	"file %s can't be opened\012\000"
	.align	2
.LC6:
	.ascii	"%d\000"
	.align	2
.LC7:
	.ascii	"%s is invalid\012\000"
	.align	2
.LC8:
	.ascii	"allocating error in %s\012\000"
	.align	2
.LC9:
	.ascii	" %c\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	input
	.syntax unified
	.arm
	.fpu softvfp
	.type	input, %function
input:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L29+4
	ldr	r0, [fp, #-44]
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L16
	ldr	r1, [fp, #-44]
	ldr	r0, .L29+8
	bl	printf
	mov	r0, #1
	bl	exit
.L16:
	ldr	r3, [fp, #-40]
	add	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L29+12
	ldr	r0, [fp, #-20]
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bgt	.L17
	ldr	r1, [fp, #-44]
	ldr	r0, .L29+16
	bl	printf
	mov	r0, #1
	bl	exit
.L17:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-40]
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L18
	ldr	r1, [fp, #-44]
	ldr	r0, .L29+20
	bl	printf
	mov	r0, #1
	bl	exit
.L18:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L19
.L21:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r3, [fp, #-40]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L20
	ldr	r1, [fp, #-44]
	ldr	r0, .L29+20
	bl	printf
	mov	r0, #1
	bl	exit
.L20:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L19:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L21
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L22
.L26:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L23
.L25:
	sub	r3, fp, #29
	mov	r2, r3
	ldr	r1, .L29+24
	ldr	r0, [fp, #-20]
	bl	__isoc99_fscanf
	ldrb	r3, [fp, #-29]	@ zero_extendqisi2
	sub	r3, r3, #48
	and	r3, r3, #255
	strb	r3, [fp, #-29]
	ldrb	r3, [fp, #-29]	@ zero_extendqisi2
	cmp	r3, #9
	bls	.L24
	ldr	r1, [fp, #-44]
	ldr	r0, .L29+16
	bl	printf
	mov	r0, #1
	bl	exit
.L24:
	ldr	r3, [fp, #-40]
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r2, [fp, #-29]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L23:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L25
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L22:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L26
	ldr	r0, [fp, #-20]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC10
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	input, .-input
	.section	.rodata
	.align	2
.LC11:
	.ascii	"temporary allocating error\000"
	.align	2
.LC12:
	.ascii	"allocating error\000"
	.align	2
.LC13:
	.ascii	"reallocating error\000"
	.global	__aeabi_idivmod
	.text
	.align	2
	.global	adjust
	.syntax unified
	.arm
	.fpu softvfp
	.type	adjust, %function
adjust:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-36]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L32
	ldr	r0, .L50
	bl	puts
	mov	r0, #1
	bl	exit
.L32:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L33
.L35:
	ldr	r1, [fp, #-20]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L34
	ldr	r0, .L50+4
	bl	puts
	mov	r0, #1
	bl	exit
.L34:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L33:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L35
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L36
.L39:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L37
.L38:
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L37:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L38
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L36:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L39
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #2
	mov	r1, r3
	mov	r0, r2
	bl	realloc
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L40
	ldr	r0, .L50+8
	bl	puts
	mov	r0, #1
	bl	exit
.L40:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L41
.L43:
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r4, r2, r3
	bl	realloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L42
	ldr	r0, .L50+8
	bl	puts
	mov	r0, #1
	bl	exit
.L42:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L41:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L43
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L44
.L47:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L45
.L46:
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r4, [r3]
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r2, r4, r3
	ldr	r3, [fp, #-32]
	ldr	r1, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L45:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L46
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L44:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L47
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L48
.L49:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L48:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L49
	ldr	r0, [fp, #-16]
	bl	free
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L51:
	.align	2
.L50:
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	adjust, .-adjust
	.align	2
	.global	coloring
	.syntax unified
	.arm
	.fpu softvfp
	.type	coloring, %function
coloring:
	@ 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
	sub	r3, fp, #20
	stm	r3, {r0, r1}
	str	r2, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L53
.L58:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L54
.L57:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L59
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	b	.L56
.L59:
	nop
.L56:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L54:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L57
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L53:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L58
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	coloring, .-coloring
	.section	.rodata
	.align	2
.LC14:
	.ascii	"wb\000"
	.align	2
.LC15:
	.ascii	"output.bmp\000"
	.align	2
.LC16:
	.ascii	"file opening process failed\000"
	.align	2
.LC17:
	.ascii	"BM\000"
	.align	2
.LC0:
	.word	16774141
	.word	14405862
	.word	16634879
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	output
	.syntax unified
	.arm
	.fpu softvfp
	.type	output, %function
output:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	sub	r3, fp, #60
	stm	r3, {r0, r1}
	ldr	r3, .L79
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L79+4
	sub	r3, fp, #20
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #5
	str	r3, [fp, #-28]
	ldr	r1, .L79+8
	ldr	r0, .L79+12
	bl	fopen
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L61
	ldr	r0, .L79+16
	bl	puts
	mov	r3, #1
	b	.L77
.L61:
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #2
	ldr	r0, .L79+20
	bl	fwrite
	ldr	r3, [fp, #-28]
	mov	r2, r3
	mul	r2, r3, r2
	mov	r3, r2
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	add	r3, r3, #74
	str	r3, [fp, #-52]
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	mov	r3, #0
	str	r3, [fp, #-52]
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	mov	r3, #74
	str	r3, [fp, #-52]
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	mov	r3, #12
	str	r3, [fp, #-52]
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-52]
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	mov	r3, #1
	str	r3, [fp, #-52]
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	mov	r3, #4
	str	r3, [fp, #-52]
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L63
.L64:
	mov	r3, #0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-16]
	and	r3, r3, #255
	str	r3, [fp, #-52]
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-16]
	and	r3, r3, #65280
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	lsr	r3, r3, #8
	str	r3, [fp, #-52]
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-16]
	and	r3, r3, #16711680
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	lsr	r3, r3, #16
	str	r3, [fp, #-52]
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L63:
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	ble	.L64
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L65
.L66:
	mov	r3, #0
	str	r3, [fp, #-52]
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #3
	bl	fwrite
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L65:
	ldr	r3, [fp, #-48]
	cmp	r3, #12
	ble	.L66
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L67
.L76:
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L68
.L75:
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L69
.L74:
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L70
.L73:
	ldr	r2, [fp, #-60]
	ldr	r1, [fp, #-32]
	ldr	r3, [fp, #-48]
	sub	r3, r1, r3
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #4
	ldr	r1, [fp, #-60]
	ldr	r0, [fp, #-32]
	ldr	r2, [fp, #-48]
	sub	r2, r0, r2
	sub	r2, r2, #-1073741823
	lsl	r2, r2, #2
	add	r2, r1, r2
	ldr	r1, [r2]
	ldr	r2, [fp, #-40]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	add	r3, r3, r2
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	ble	.L71
	ldr	r3, [fp, #-44]
	cmp	r3, #30
	bgt	.L71
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	ble	.L71
	ldr	r3, [fp, #-36]
	cmp	r3, #30
	ble	.L72
.L71:
	mov	r3, #0
	str	r3, [fp, #-52]
.L72:
	sub	r0, fp, #52
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L70:
	ldr	r3, [fp, #-36]
	cmp	r3, #15
	ble	.L73
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L69:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L74
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L68:
	ldr	r3, [fp, #-44]
	cmp	r3, #31
	ble	.L75
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L67:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L76
	ldr	r0, [fp, #-24]
	bl	fclose
	mov	r3, #0
.L77:
	ldr	r2, .L79
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L78
	bl	__stack_chk_fail
.L78:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L80:
	.align	2
.L79:
	.word	.LC18
	.word	.LC0
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	output, .-output
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
