	.file	"527923.c"
	.intel_syntax noprefix
	.text
	.globl	bm
	.bss
	.align 8
	.type	bm, @object
	.size	bm, 8
bm:
	.zero	8
	.globl	h
	.align 8
	.type	h, @object
	.size	h, 8
h:
	.zero	8
	.globl	w
	.align 8
	.type	w, @object
	.size	w, 8
w:
	.zero	8
	.globl	factor
	.align 8
	.type	factor, @object
	.size	factor, 8
factor:
	.zero	8
	.section	.rodata
.LC0:
	.string	"Usage: squash factor [bits]\n"
.LC1:
	.string	"%x %x %x\n"
.LC2:
	.string	"CMIF"
.LC3:
	.string	"(%d,%d,%d)"
.LC4:
	.string	"%s: bad size spec: %s\n"
.LC5:
	.string	"%s: packed file\n"
.LC6:
	.string	"(%d,%d)"
.LC7:
	.string	"CMIF video 1.0\n(%d,%d,%d)\n"
.LC8:
	.string	"(%d,%d)\n"
.LC9:
	.string	"%s: No memory\n"
.LC10:
	.string	"%d,%d"
	.align 8
.LC11:
	.string	"Size changed from %d to %d: %s\n"
.LC12:
	.string	"%d, %d\n"
.LC13:
	.string	"Reading %d\n"
.LC14:
	.string	"%s: short read, %d wanted %d\n"
.LC15:
	.string	"skip %d %d %d %d\n"
.LC16:
	.string	"%d %d\n"
.LC17:
	.string	"Writing %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 240
	mov	DWORD PTR -228[rbp], edi
	mov	QWORD PTR -240[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -156[rbp], 0
	cmp	DWORD PTR -228[rbp], 2
	je	.L2
	cmp	DWORD PTR -228[rbp], 3
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	cdqe
	mov	QWORD PTR factor[rip], rax
	cmp	DWORD PTR -228[rbp], 2
	jle	.L3
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	DWORD PTR -152[rbp], eax
	mov	eax, DWORD PTR -152[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	sub	eax, 1
	mov	DWORD PTR -168[rbp], eax
	mov	eax, 8
	sub	eax, DWORD PTR -152[rbp]
	mov	ecx, eax
	sal	DWORD PTR -168[rbp], cl
	mov	eax, 7
	sub	eax, DWORD PTR -152[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	DWORD PTR -164[rbp], eax
	mov	eax, 8
	sub	eax, DWORD PTR -152[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	DWORD PTR -160[rbp], eax
	mov	rax, QWORD PTR stderr[rip]
	mov	esi, DWORD PTR -160[rbp]
	mov	ecx, DWORD PTR -164[rbp]
	mov	edx, DWORD PTR -168[rbp]
	mov	r8d, esi
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L4
.L3:
	mov	DWORD PTR -168[rbp], 255
	mov	DWORD PTR -164[rbp], 0
	mov	DWORD PTR -160[rbp], 0
.L4:
	lea	rax, -112[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	lea	rax, -112[rbp]
	mov	edx, 4
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L5
	mov	DWORD PTR -156[rbp], 1
	lea	rax, -112[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	lea	rdx, -212[rbp]
	lea	rax, -112[rbp]
	mov	r8, rdx
	lea	rcx, h[rip]
	lea	rdx, w[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 3
	je	.L6
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, -112[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	eax, DWORD PTR -212[rbp]
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	lea	rax, -112[rbp]
	lea	rcx, h[rip]
	lea	rdx, w[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 2
	je	.L7
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, -112[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	rax, QWORD PTR h[rip]
	mov	rsi, QWORD PTR factor[rip]
	cqo
	idiv	rsi
	mov	DWORD PTR -148[rbp], eax
	mov	rax, QWORD PTR w[rip]
	mov	rsi, QWORD PTR factor[rip]
	cqo
	idiv	rsi
	mov	DWORD PTR -144[rbp], eax
	cmp	DWORD PTR -156[rbp], 0
	je	.L8
	mov	edx, DWORD PTR -148[rbp]
	mov	eax, DWORD PTR -144[rbp]
	mov	ecx, 0
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L8:
	mov	edx, DWORD PTR -148[rbp]
	mov	eax, DWORD PTR -144[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
.L9:
	mov	rdx, QWORD PTR h[rip]
	mov	rax, QWORD PTR w[rip]
	imul	rax, rdx
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR bm[rip], rax
	mov	rax, QWORD PTR bm[rip]
	test	rax, rax
	jne	.L10
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	eax, DWORD PTR -148[rbp]
	imul	eax, DWORD PTR -144[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -128[rbp], rax
	cmp	QWORD PTR -128[rbp], 0
	jne	.L12
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L33:
	lea	rax, -112[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L35
	lea	rcx, -204[rbp]
	lea	rdx, -208[rbp]
	lea	rax, -112[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 2
	jne	.L15
	mov	eax, DWORD PTR -204[rbp]
	cdqe
	mov	rcx, QWORD PTR h[rip]
	mov	rdx, QWORD PTR w[rip]
	imul	rdx, rcx
	sal	rdx, 2
	cmp	rax, rdx
	je	.L16
	mov	edx, DWORD PTR -204[rbp]
	mov	rcx, QWORD PTR h[rip]
	mov	rax, QWORD PTR w[rip]
	imul	rax, rcx
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, -112[rbp]
	mov	r8, rcx
	mov	ecx, edx
	mov	rdx, rsi
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	eax, DWORD PTR -148[rbp]
	imul	eax, DWORD PTR -144[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -208[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L15:
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	puts@PLT
.L17:
	mov	rdx, QWORD PTR h[rip]
	mov	rax, QWORD PTR w[rip]
	imul	rax, rdx
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	mov	rcx, QWORD PTR h[rip]
	mov	rax, QWORD PTR w[rip]
	imul	rax, rcx
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR bm[rip]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -140[rbp], eax
	mov	eax, DWORD PTR -140[rbp]
	cdqe
	mov	rcx, QWORD PTR h[rip]
	mov	rdx, QWORD PTR w[rip]
	imul	rdx, rcx
	sal	rdx, 3
	cmp	rax, rdx
	je	.L18
	mov	rdx, QWORD PTR h[rip]
	mov	rax, QWORD PTR w[rip]
	imul	rax, rdx
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -140[rbp]
	mov	r8, rsi
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	mov	rax, QWORD PTR -128[rbp]
	mov	QWORD PTR -136[rbp], rax
	mov	DWORD PTR -196[rbp], 0
	jmp	.L19
.L31:
	mov	DWORD PTR -200[rbp], 0
	jmp	.L20
.L30:
	mov	DWORD PTR -172[rbp], 0
	mov	eax, DWORD PTR -172[rbp]
	mov	DWORD PTR -176[rbp], eax
	mov	eax, DWORD PTR -176[rbp]
	mov	DWORD PTR -180[rbp], eax
	mov	DWORD PTR -184[rbp], 0
	mov	DWORD PTR -192[rbp], 0
	jmp	.L21
.L26:
	mov	DWORD PTR -188[rbp], 0
	jmp	.L22
.L25:
	mov	eax, DWORD PTR -196[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR factor[rip]
	imul	rdx, rax
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR h[rip]
	cmp	rdx, rax
	jge	.L23
	mov	eax, DWORD PTR -200[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR factor[rip]
	imul	rdx, rax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR w[rip]
	cmp	rdx, rax
	jge	.L23
	add	DWORD PTR -184[rbp], 1
	mov	rcx, QWORD PTR bm[rip]
	mov	eax, DWORD PTR -196[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR factor[rip]
	imul	rdx, rax
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR w[rip]
	mov	rsi, rdx
	imul	rsi, rax
	mov	eax, DWORD PTR -200[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR factor[rip]
	imul	rdx, rax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	add	rax, rdx
	add	rax, rsi
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -120[rbp], rax
	mov	rax, QWORD PTR -120[rbp]
	movzx	edx, al
	mov	eax, DWORD PTR -180[rbp]
	add	eax, edx
	mov	DWORD PTR -180[rbp], eax
	mov	rax, QWORD PTR -120[rbp]
	sar	rax, 8
	movzx	edx, al
	mov	eax, DWORD PTR -176[rbp]
	add	eax, edx
	mov	DWORD PTR -176[rbp], eax
	mov	rax, QWORD PTR -120[rbp]
	sar	rax, 16
	movzx	edx, al
	mov	eax, DWORD PTR -172[rbp]
	add	eax, edx
	mov	DWORD PTR -172[rbp], eax
	jmp	.L24
.L23:
	mov	rax, QWORD PTR stderr[rip]
	mov	edi, DWORD PTR -188[rbp]
	mov	esi, DWORD PTR -196[rbp]
	mov	ecx, DWORD PTR -192[rbp]
	mov	edx, DWORD PTR -200[rbp]
	mov	r9d, edi
	mov	r8d, esi
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L24:
	add	DWORD PTR -188[rbp], 1
.L22:
	mov	eax, DWORD PTR -188[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR factor[rip]
	cmp	rdx, rax
	jl	.L25
	add	DWORD PTR -192[rbp], 1
.L21:
	mov	eax, DWORD PTR -192[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR factor[rip]
	cmp	rdx, rax
	jl	.L26
	mov	eax, DWORD PTR -180[rbp]
	cdq
	idiv	DWORD PTR -184[rbp]
	mov	DWORD PTR -180[rbp], eax
	mov	eax, DWORD PTR -176[rbp]
	cdq
	idiv	DWORD PTR -184[rbp]
	mov	DWORD PTR -176[rbp], eax
	mov	eax, DWORD PTR -172[rbp]
	cdq
	idiv	DWORD PTR -184[rbp]
	mov	DWORD PTR -172[rbp], eax
	mov	eax, DWORD PTR -180[rbp]
	and	eax, DWORD PTR -168[rbp]
	cmp	DWORD PTR -168[rbp], eax
	je	.L27
	mov	eax, DWORD PTR -180[rbp]
	and	eax, DWORD PTR -164[rbp]
	test	eax, eax
	je	.L27
	mov	eax, DWORD PTR -160[rbp]
	add	DWORD PTR -180[rbp], eax
.L27:
	mov	eax, DWORD PTR -176[rbp]
	and	eax, DWORD PTR -168[rbp]
	cmp	DWORD PTR -168[rbp], eax
	je	.L28
	mov	eax, DWORD PTR -176[rbp]
	and	eax, DWORD PTR -164[rbp]
	test	eax, eax
	je	.L28
	mov	eax, DWORD PTR -160[rbp]
	add	DWORD PTR -176[rbp], eax
.L28:
	mov	eax, DWORD PTR -172[rbp]
	and	eax, DWORD PTR -168[rbp]
	cmp	DWORD PTR -168[rbp], eax
	je	.L29
	mov	eax, DWORD PTR -172[rbp]
	and	eax, DWORD PTR -164[rbp]
	test	eax, eax
	je	.L29
	mov	eax, DWORD PTR -160[rbp]
	add	DWORD PTR -172[rbp], eax
.L29:
	mov	eax, DWORD PTR -176[rbp]
	sal	eax, 8
	or	eax, DWORD PTR -180[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -172[rbp]
	sal	eax, 16
	or	eax, edx
	cdqe
	mov	QWORD PTR -120[rbp], rax
	mov	rax, QWORD PTR -136[rbp]
	lea	rdx, 8[rax]
	mov	QWORD PTR -136[rbp], rdx
	mov	rdx, QWORD PTR -120[rbp]
	mov	QWORD PTR [rax], rdx
	add	DWORD PTR -200[rbp], 1
.L20:
	mov	eax, DWORD PTR -200[rbp]
	cmp	eax, DWORD PTR -144[rbp]
	jl	.L30
	add	DWORD PTR -196[rbp], 1
.L19:
	mov	eax, DWORD PTR -196[rbp]
	cmp	eax, DWORD PTR -148[rbp]
	jl	.L31
	mov	rax, QWORD PTR -136[rbp]
	sub	rax, QWORD PTR -128[rbp]
	sar	rax, 3
	mov	rdx, rax
	mov	eax, DWORD PTR -148[rbp]
	imul	eax, DWORD PTR -144[rbp]
	cdqe
	cmp	rdx, rax
	je	.L32
	mov	eax, DWORD PTR -148[rbp]
	imul	eax, DWORD PTR -144[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -136[rbp]
	sub	rax, QWORD PTR -128[rbp]
	sar	rax, 3
	mov	rsi, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, edx
	mov	rdx, rsi
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L32:
	mov	rax, QWORD PTR -136[rbp]
	sub	rax, QWORD PTR -128[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rdx, QWORD PTR stdout[rip]
	mov	rax, QWORD PTR -136[rbp]
	sub	rax, QWORD PTR -128[rbp]
	mov	rsi, rax
	mov	rax, QWORD PTR -128[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
.L12:
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L33
	jmp	.L14
.L35:
	nop
.L14:
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"527923.c"
	.text
	.comm	bm,4,4
	.comm	h,4,4
	.comm	w,4,4
	.comm	factor,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: squash factor [bits]\012\000"
	.align	2
.LC1:
	.ascii	"%x %x %x\012\000"
	.align	2
.LC2:
	.ascii	"CMIF\000"
	.align	2
.LC3:
	.ascii	"(%d,%d,%d)\000"
	.align	2
.LC4:
	.ascii	"%s: bad size spec: %s\012\000"
	.align	2
.LC5:
	.ascii	"%s: packed file\012\000"
	.align	2
.LC6:
	.ascii	"(%d,%d)\000"
	.global	__aeabi_idiv
	.align	2
.LC7:
	.ascii	"CMIF video 1.0\012(%d,%d,%d)\012\000"
	.align	2
.LC8:
	.ascii	"(%d,%d)\012\000"
	.align	2
.LC9:
	.ascii	"%s: No memory\012\000"
	.align	2
.LC10:
	.ascii	"%d,%d\000"
	.align	2
.LC11:
	.ascii	"Size changed from %d to %d: %s\012\000"
	.align	2
.LC12:
	.ascii	"%d, %d\012\000"
	.align	2
.LC13:
	.ascii	"Reading %d\012\000"
	.align	2
.LC14:
	.ascii	"%s: short read, %d wanted %d\012\000"
	.align	2
.LC15:
	.ascii	"skip %d %d %d %d\012\000"
	.align	2
.LC16:
	.ascii	"%d %d\012\000"
	.align	2
.LC17:
	.ascii	"Writing %d\012\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 200
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #208
	str	r0, [fp, #-200]
	str	r1, [fp, #-204]
	ldr	r3, .L36
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-136]
	ldr	r3, [fp, #-200]
	cmp	r3, #2
	beq	.L2
	ldr	r3, [fp, #-200]
	cmp	r3, #3
	beq	.L2
	ldr	r3, .L36+4
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L36+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-204]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L36+12
	str	r3, [r2]
	ldr	r3, [fp, #-200]
	cmp	r3, #2
	ble	.L3
	ldr	r3, [fp, #-204]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-132]
	mov	r2, #1
	ldr	r3, [fp, #-132]
	lsl	r3, r2, r3
	sub	r3, r3, #1
	str	r3, [fp, #-148]
	ldr	r3, [fp, #-132]
	rsb	r3, r3, #8
	ldr	r2, [fp, #-148]
	lsl	r3, r2, r3
	str	r3, [fp, #-148]
	ldr	r3, [fp, #-132]
	rsb	r3, r3, #7
	mov	r2, #1
	lsl	r3, r2, r3
	str	r3, [fp, #-144]
	ldr	r3, [fp, #-132]
	rsb	r3, r3, #8
	mov	r2, #1
	lsl	r3, r2, r3
	str	r3, [fp, #-140]
	ldr	r3, .L36+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-140]
	str	r3, [sp]
	ldr	r3, [fp, #-144]
	ldr	r2, [fp, #-148]
	ldr	r1, .L36+16
	bl	fprintf
	b	.L4
.L3:
	mov	r3, #255
	str	r3, [fp, #-148]
	mov	r3, #0
	str	r3, [fp, #-144]
	mov	r3, #0
	str	r3, [fp, #-140]
.L4:
	sub	r3, fp, #108
	mov	r0, r3
	bl	gets
	sub	r3, fp, #108
	mov	r2, #4
	ldr	r1, .L36+20
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	mov	r3, #1
	str	r3, [fp, #-136]
	sub	r3, fp, #108
	mov	r0, r3
	bl	gets
	sub	r0, fp, #108
	sub	r3, fp, #196
	str	r3, [sp]
	ldr	r3, .L36+24
	ldr	r2, .L36+28
	ldr	r1, .L36+32
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #3
	beq	.L6
	ldr	r3, .L36+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-204]
	ldr	r2, [r3]
	sub	r3, fp, #108
	ldr	r1, .L36+36
	bl	fprintf
	mov	r0, #1
	bl	exit
.L6:
	ldr	r3, [fp, #-196]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L36+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-204]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L36+40
	bl	fprintf
	mov	r0, #1
	bl	exit
.L5:
	sub	r0, fp, #108
	ldr	r3, .L36+24
	ldr	r2, .L36+28
	ldr	r1, .L36+44
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #2
	beq	.L7
	ldr	r3, .L36+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-204]
	ldr	r2, [r3]
	sub	r3, fp, #108
	ldr	r1, .L36+36
	bl	fprintf
	mov	r0, #1
	bl	exit
.L7:
	ldr	r3, .L36+24
	ldr	r3, [r3]
	ldr	r2, .L36+12
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-128]
	ldr	r3, .L36+28
	ldr	r3, [r3]
	ldr	r2, .L36+12
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-124]
	ldr	r3, [fp, #-136]
	cmp	r3, #0
	beq	.L8
	mov	r3, #0
	ldr	r2, [fp, #-128]
	ldr	r1, [fp, #-124]
	ldr	r0, .L36+48
	bl	printf
	b	.L9
.L8:
	ldr	r2, [fp, #-128]
	ldr	r1, [fp, #-124]
	ldr	r0, .L36+52
	bl	printf
.L9:
	ldr	r3, .L36+24
	ldr	r3, [r3]
	ldr	r2, .L36+28
	ldr	r2, [r2]
	mul	r3, r2, r3
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L36+56
	str	r2, [r3]
	ldr	r3, .L36+56
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L36+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-204]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L36+60
	bl	fprintf
	mov	r0, #1
	bl	exit
.L10:
	ldr	r3, [fp, #-128]
	ldr	r2, [fp, #-124]
	mul	r3, r2, r3
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L36+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-204]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L36+60
	bl	fprintf
	mov	r0, #1
	bl	exit
.L33:
	sub	r3, fp, #108
	mov	r0, r3
	bl	gets
	ldr	r3, .L36+64
	ldr	r3, [r3]
	mov	r0, r3
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L35
	sub	r3, fp, #188
	sub	r2, fp, #192
	sub	r0, fp, #108
	ldr	r1, .L36+68
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #2
	bne	.L15
	ldr	r3, .L36+24
	ldr	r3, [r3]
	ldr	r2, .L36+28
	ldr	r2, [r2]
	mul	r3, r2, r3
	lsl	r2, r3, #2
	ldr	r3, [fp, #-188]
	cmp	r2, r3
	beq	.L16
	ldr	r3, .L36+4
	ldr	r0, [r3]
	ldr	r3, .L36+24
	ldr	r3, [r3]
	ldr	r2, .L36+28
	ldr	r2, [r2]
	mul	r3, r2, r3
	lsl	r2, r3, #2
	ldr	r1, [fp, #-188]
	sub	r3, fp, #108
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L36+72
	bl	fprintf
	mov	r0, #1
	bl	exit
.L16:
	ldr	r1, [fp, #-192]
	ldr	r3, [fp, #-128]
	ldr	r2, [fp, #-124]
	mul	r3, r2, r3
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r0, .L36+76
	bl	printf
	b	.L17
.L15:
	sub	r3, fp, #108
	mov	r0, r3
	bl	puts
.L17:
	ldr	r3, .L36+4
	ldr	r0, [r3]
	ldr	r3, .L36+24
	ldr	r3, [r3]
	ldr	r2, .L36+28
	ldr	r2, [r2]
	mul	r3, r2, r3
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, .L36+80
	bl	fprintf
	ldr	r3, .L36+56
	ldr	r0, [r3]
	ldr	r3, .L36+24
	ldr	r3, [r3]
	ldr	r2, .L36+28
	ldr	r2, [r2]
	mul	r3, r2, r3
	lsl	r2, r3, #2
	ldr	r3, .L36+64
	ldr	r3, [r3]
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-116]
	ldr	r2, [fp, #-116]
	ldr	r3, .L36+24
	ldr	r3, [r3]
	ldr	r1, .L36+28
	ldr	r1, [r1]
	mul	r3, r1, r3
	lsl	r3, r3, #2
	cmp	r2, r3
	beq	.L18
	ldr	r3, .L36+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-204]
	ldr	r1, [r3]
	ldr	r3, .L36+24
	ldr	r3, [r3]
	ldr	r2, .L36+28
	ldr	r2, [r2]
	mul	r3, r2, r3
	lsl	r3, r3, #2
	str	r3, [sp]
	ldr	r3, [fp, #-116]
	mov	r2, r1
	ldr	r1, .L36+84
	bl	fprintf
	mov	r0, #1
	bl	exit
.L18:
	ldr	r3, [fp, #-120]
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-180]
	b	.L19
.L31:
	mov	r3, #0
	str	r3, [fp, #-184]
	b	.L20
.L30:
	mov	r3, #0
	str	r3, [fp, #-156]
	ldr	r3, [fp, #-156]
	str	r3, [fp, #-160]
	ldr	r3, [fp, #-160]
	str	r3, [fp, #-164]
	mov	r3, #0
	str	r3, [fp, #-168]
	mov	r3, #0
	str	r3, [fp, #-176]
	b	.L21
.L26:
	mov	r3, #0
	str	r3, [fp, #-172]
	b	.L22
.L25:
	ldr	r3, .L36+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-180]
	mul	r2, r3, r2
	ldr	r3, [fp, #-172]
	add	r2, r2, r3
	ldr	r3, .L36+24
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L23
	ldr	r3, .L36+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-184]
	mul	r2, r3, r2
	ldr	r3, [fp, #-176]
	add	r2, r2, r3
	ldr	r3, .L36+28
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L23
	ldr	r3, [fp, #-168]
	add	r3, r3, #1
	str	r3, [fp, #-168]
	ldr	r3, .L36+56
	ldr	r2, [r3]
	ldr	r3, .L36+12
	ldr	r3, [r3]
	ldr	r1, [fp, #-180]
	mul	r1, r3, r1
	ldr	r3, [fp, #-172]
	add	r3, r1, r3
	ldr	r1, .L36+28
	ldr	r1, [r1]
	mul	r1, r3, r1
	ldr	r3, .L36+12
	ldr	r3, [r3]
	ldr	r0, [fp, #-184]
	mul	r0, r3, r0
	ldr	r3, [fp, #-176]
	add	r3, r0, r3
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-112]
	and	r3, r3, #255
	ldr	r2, [fp, #-164]
	add	r3, r2, r3
	str	r3, [fp, #-164]
	ldr	r3, [fp, #-112]
	asr	r3, r3, #8
	and	r3, r3, #255
	ldr	r2, [fp, #-160]
	add	r3, r2, r3
	str	r3, [fp, #-160]
	ldr	r3, [fp, #-112]
	asr	r3, r3, #16
	and	r3, r3, #255
	ldr	r2, [fp, #-156]
	add	r3, r2, r3
	str	r3, [fp, #-156]
	b	.L24
.L23:
	ldr	r3, .L36+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-172]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-180]
	str	r3, [sp]
	ldr	r3, [fp, #-176]
	ldr	r2, [fp, #-184]
	ldr	r1, .L36+88
	bl	fprintf
.L24:
	ldr	r3, [fp, #-172]
	add	r3, r3, #1
	str	r3, [fp, #-172]
.L22:
	ldr	r3, .L36+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-172]
	cmp	r2, r3
	blt	.L25
	ldr	r3, [fp, #-176]
	add	r3, r3, #1
	str	r3, [fp, #-176]
.L21:
	ldr	r3, .L36+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-176]
	cmp	r2, r3
	blt	.L26
	ldr	r1, [fp, #-168]
	ldr	r0, [fp, #-164]
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-164]
	ldr	r1, [fp, #-168]
	ldr	r0, [fp, #-160]
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-160]
	ldr	r1, [fp, #-168]
	ldr	r0, [fp, #-156]
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-156]
	ldr	r2, [fp, #-164]
	ldr	r3, [fp, #-148]
	and	r3, r3, r2
	ldr	r2, [fp, #-148]
	cmp	r2, r3
	beq	.L27
	ldr	r2, [fp, #-164]
	ldr	r3, [fp, #-144]
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L27
	ldr	r2, [fp, #-164]
	ldr	r3, [fp, #-140]
	add	r3, r2, r3
	str	r3, [fp, #-164]
.L27:
	ldr	r2, [fp, #-160]
	ldr	r3, [fp, #-148]
	and	r3, r3, r2
	ldr	r2, [fp, #-148]
	cmp	r2, r3
	beq	.L28
	ldr	r2, [fp, #-160]
	ldr	r3, [fp, #-144]
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L28
	ldr	r2, [fp, #-160]
	ldr	r3, [fp, #-140]
	add	r3, r2, r3
	str	r3, [fp, #-160]
.L28:
	ldr	r2, [fp, #-156]
	ldr	r3, [fp, #-148]
	and	r3, r3, r2
	ldr	r2, [fp, #-148]
	cmp	r2, r3
	beq	.L29
	ldr	r2, [fp, #-156]
	ldr	r3, [fp, #-144]
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L29
	ldr	r2, [fp, #-156]
	ldr	r3, [fp, #-140]
	add	r3, r2, r3
	str	r3, [fp, #-156]
.L29:
	ldr	r3, [fp, #-160]
	lsl	r2, r3, #8
	ldr	r3, [fp, #-164]
	orr	r2, r2, r3
	ldr	r3, [fp, #-156]
	lsl	r3, r3, #16
	orr	r3, r2, r3
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-152]
	add	r2, r3, #4
	str	r2, [fp, #-152]
	ldr	r2, [fp, #-112]
	str	r2, [r3]
	ldr	r3, [fp, #-184]
	add	r3, r3, #1
	str	r3, [fp, #-184]
.L20:
	ldr	r2, [fp, #-184]
	ldr	r3, [fp, #-124]
	cmp	r2, r3
	blt	.L30
	ldr	r3, [fp, #-180]
	add	r3, r3, #1
	str	r3, [fp, #-180]
.L19:
	ldr	r2, [fp, #-180]
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	blt	.L31
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-120]
	sub	r3, r2, r3
	asr	r3, r3, #2
	mov	r1, r3
	ldr	r3, [fp, #-128]
	ldr	r2, [fp, #-124]
	mul	r3, r2, r3
	cmp	r1, r3
	beq	.L32
	ldr	r3, .L36+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-120]
	sub	r3, r2, r3
	asr	r3, r3, #2
	mov	r1, r3
	ldr	r3, [fp, #-128]
	ldr	r2, [fp, #-124]
	mul	r3, r2, r3
	mov	r2, r1
	ldr	r1, .L36+92
	bl	fprintf
.L32:
	ldr	r3, .L36+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-120]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r1, .L36+96
	bl	fprintf
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-120]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r3, .L36+100
	ldr	r3, [r3]
	mov	r1, #1
	ldr	r0, [fp, #-120]
	bl	fwrite
.L12:
	ldr	r3, .L36+64
	ldr	r3, [r3]
	mov	r0, r3
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L33
	b	.L14
.L35:
	nop
.L14:
	mov	r0, #0
	bl	exit
.L37:
	.align	2
.L36:
	.word	.LC18
	.word	stderr
	.word	.LC0
	.word	factor
	.word	.LC1
	.word	.LC2
	.word	h
	.word	w
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	bm
	.word	.LC9
	.word	stdin
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	stdout
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
