	.file	"431561.c"
	.intel_syntax noprefix
	.text
	.globl	read_subimage
	.type	read_subimage, @function
read_subimage:
.LFB6:
	.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 -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -40[rbp], ecx
	mov	DWORD PTR -44[rbp], r8d
	mov	DWORD PTR -48[rbp], r9d
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 0
	div	DWORD PTR -44[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, 0
	div	DWORD PTR -48[rbp]
	imul	eax, ecx
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 0
	div	DWORD PTR -44[rbp]
	imul	eax, DWORD PTR 16[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR 24[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L2
.L5:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR 16[rbp]
	imul	eax, DWORD PTR -48[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	imul	eax, DWORD PTR -36[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR 24[rbp]
	imul	eax, DWORD PTR -44[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	eax, eax
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -32[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	imul	eax, DWORD PTR -44[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	eax, eax
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, WORD PTR [rcx]
	mov	WORD PTR [rdx], ax
	add	DWORD PTR -12[rbp], 1
.L3:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jb	.L4
	add	DWORD PTR -16[rbp], 1
.L2:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jb	.L5
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read_subimage, .-read_subimage
	.section	.rodata
.LC0:
	.string	"-i"
.LC1:
	.string	"-o"
.LC2:
	.string	"-filename_base_row"
.LC3:
	.string	"-filename_base_col"
.LC4:
	.string	"-input_w"
.LC5:
	.string	"-input_h"
.LC6:
	.string	"-div_h"
.LC7:
	.string	"-div_v"
.LC8:
	.string	"Divide into %d x %d images\n"
.LC9:
	.string	"Input: %s\n"
.LC10:
	.string	"Input dimension: (%d, %d)\n"
.LC11:
	.string	"Output will be:"
.LC12:
	.string	"%s_%d_%d.r16\t(%d, %d)\n"
.LC13:
	.string	"r"
.LC14:
	.string	"Opened: %s\n"
	.align 8
.LC15:
	.string	"Warning: bytes read(%d) inconsistent with dimension specified(%d, %d)\n"
.LC16:
	.string	"%s_%d_%d.r16"
.LC17:
	.string	"w"
.LC18:
	.string	"Successfully written to %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 416
	mov	DWORD PTR -404[rbp], edi
	mov	QWORD PTR -416[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -320[rbp], 0
	mov	QWORD PTR -312[rbp], 0
	mov	BYTE PTR -385[rbp], 0
	mov	DWORD PTR -384[rbp], 1
	mov	DWORD PTR -380[rbp], 1
	mov	DWORD PTR -376[rbp], 0
	mov	DWORD PTR -372[rbp], 0
	mov	DWORD PTR -368[rbp], 1
	mov	DWORD PTR -364[rbp], 1
	mov	DWORD PTR -360[rbp], 1
	jmp	.L7
.L16:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L8
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -320[rbp], rax
.L8:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L9
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -312[rbp], rax
.L9:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L10
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -368[rbp], eax
	add	DWORD PTR -360[rbp], 1
.L10:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L11
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -364[rbp], eax
	add	DWORD PTR -360[rbp], 1
.L11:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L12
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -376[rbp], eax
	add	DWORD PTR -360[rbp], 1
.L12:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L13
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -372[rbp], eax
	add	DWORD PTR -360[rbp], 1
.L13:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L14
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -384[rbp], eax
	add	DWORD PTR -360[rbp], 1
.L14:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L15
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -380[rbp], eax
	add	DWORD PTR -360[rbp], 1
.L15:
	add	DWORD PTR -360[rbp], 1
.L7:
	mov	eax, DWORD PTR -360[rbp]
	cmp	eax, DWORD PTR -404[rbp]
	jl	.L16
	mov	eax, DWORD PTR -376[rbp]
	mov	edx, 0
	div	DWORD PTR -384[rbp]
	mov	DWORD PTR -340[rbp], eax
	mov	eax, DWORD PTR -372[rbp]
	mov	edx, 0
	div	DWORD PTR -380[rbp]
	mov	DWORD PTR -336[rbp], eax
	mov	edx, DWORD PTR -380[rbp]
	mov	eax, DWORD PTR -384[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -372[rbp]
	mov	eax, DWORD PTR -376[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	DWORD PTR -356[rbp], 0
	jmp	.L17
.L20:
	mov	DWORD PTR -352[rbp], 0
	jmp	.L18
.L19:
	mov	edx, DWORD PTR -352[rbp]
	mov	eax, DWORD PTR -364[rbp]
	lea	ecx, [rdx+rax]
	mov	edx, DWORD PTR -356[rbp]
	mov	eax, DWORD PTR -368[rbp]
	add	edx, eax
	mov	edi, DWORD PTR -336[rbp]
	mov	esi, DWORD PTR -340[rbp]
	mov	rax, QWORD PTR -312[rbp]
	mov	r9d, edi
	mov	r8d, esi
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -352[rbp], 1
.L18:
	mov	eax, DWORD PTR -352[rbp]
	cmp	eax, DWORD PTR -384[rbp]
	jb	.L19
	add	DWORD PTR -356[rbp], 1
.L17:
	mov	eax, DWORD PTR -356[rbp]
	cmp	eax, DWORD PTR -380[rbp]
	jb	.L20
	mov	rax, QWORD PTR -320[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -304[rbp], rax
	cmp	QWORD PTR -304[rbp], 0
	je	.L21
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -376[rbp]
	imul	eax, DWORD PTR -372[rbp]
	add	eax, eax
	mov	DWORD PTR -332[rbp], eax
	mov	eax, DWORD PTR -332[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -296[rbp], rax
	mov	esi, DWORD PTR -332[rbp]
	mov	rdx, QWORD PTR -304[rbp]
	mov	rax, QWORD PTR -296[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -328[rbp], eax
	mov	rax, QWORD PTR -304[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	DWORD PTR -328[rbp], 1
	je	.L22
	mov	eax, DWORD PTR -328[rbp]
	imul	eax, DWORD PTR -332[rbp]
	mov	ecx, DWORD PTR -372[rbp]
	mov	edx, DWORD PTR -376[rbp]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
.L22:
	mov	DWORD PTR -348[rbp], 0
	jmp	.L23
.L27:
	mov	DWORD PTR -344[rbp], 0
	jmp	.L24
.L26:
	mov	eax, DWORD PTR -340[rbp]
	imul	eax, DWORD PTR -336[rbp]
	add	eax, eax
	mov	DWORD PTR -324[rbp], eax
	mov	eax, DWORD PTR -324[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -288[rbp], rax
	mov	r9d, DWORD PTR -336[rbp]
	mov	r8d, DWORD PTR -340[rbp]
	mov	ecx, DWORD PTR -372[rbp]
	mov	edx, DWORD PTR -376[rbp]
	mov	rsi, QWORD PTR -296[rbp]
	mov	rax, QWORD PTR -288[rbp]
	mov	edi, DWORD PTR -344[rbp]
	push	rdi
	mov	edi, DWORD PTR -348[rbp]
	push	rdi
	mov	rdi, rax
	call	read_subimage
	add	rsp, 16
	mov	edx, DWORD PTR -344[rbp]
	mov	eax, DWORD PTR -364[rbp]
	lea	esi, [rdx+rax]
	mov	edx, DWORD PTR -348[rbp]
	mov	eax, DWORD PTR -368[rbp]
	lea	ecx, [rdx+rax]
	mov	rdx, QWORD PTR -312[rbp]
	lea	rax, -272[rbp]
	mov	r8d, esi
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -272[rbp]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -280[rbp], rax
	cmp	QWORD PTR -280[rbp], 0
	je	.L25
	mov	esi, DWORD PTR -324[rbp]
	mov	rdx, QWORD PTR -280[rbp]
	mov	rax, QWORD PTR -288[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -280[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
.L25:
	mov	rax, QWORD PTR -288[rbp]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -344[rbp], 1
.L24:
	mov	eax, DWORD PTR -344[rbp]
	cmp	eax, DWORD PTR -384[rbp]
	jb	.L26
	add	DWORD PTR -348[rbp], 1
.L23:
	mov	eax, DWORD PTR -348[rbp]
	cmp	eax, DWORD PTR -380[rbp]
	jb	.L27
.L21:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"431561.c"
	.text
	.global	__aeabi_uidiv
	.align	2
	.global	read_subimage
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_subimage, %function
read_subimage:
	@ args = 16, 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, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	str	r3, [fp, #-44]
	ldr	r1, [fp, #4]
	ldr	r0, [fp, #-40]
	bl	__aeabi_uidiv
	mov	r3, r0
	mov	r4, r3
	ldr	r1, [fp, #8]
	ldr	r0, [fp, #-44]
	bl	__aeabi_uidiv
	mov	r3, r0
	mul	r3, r4, r3
	str	r3, [fp, #-20]
	ldr	r1, [fp, #4]
	ldr	r0, [fp, #-40]
	bl	__aeabi_uidiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #12]
	mul	r3, r2, r3
	ldr	r2, [fp, #16]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L2
.L5:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L3
.L4:
	ldr	r3, [fp, #12]
	ldr	r2, [fp, #8]
	mul	r2, r3, r2
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	mul	r2, r3, r2
	ldr	r3, [fp, #16]
	ldr	r1, [fp, #4]
	mul	r3, r1, r3
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	lsl	r3, r3, #1
	ldr	r2, [fp, #-36]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #4]
	mul	r1, r3, r1
	ldr	r3, [fp, #-24]
	add	r3, r1, r3
	lsl	r3, r3, #1
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldrh	r2, [r2]
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L3:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	bcc	.L4
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L2:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #8]
	cmp	r2, r3
	bcc	.L5
	nop
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	read_subimage, .-read_subimage
	.section	.rodata
	.align	2
.LC0:
	.ascii	"-i\000"
	.align	2
.LC1:
	.ascii	"-o\000"
	.align	2
.LC2:
	.ascii	"-filename_base_row\000"
	.align	2
.LC3:
	.ascii	"-filename_base_col\000"
	.align	2
.LC4:
	.ascii	"-input_w\000"
	.align	2
.LC5:
	.ascii	"-input_h\000"
	.align	2
.LC6:
	.ascii	"-div_h\000"
	.align	2
.LC7:
	.ascii	"-div_v\000"
	.align	2
.LC8:
	.ascii	"Divide into %d x %d images\012\000"
	.align	2
.LC9:
	.ascii	"Input: %s\012\000"
	.align	2
.LC10:
	.ascii	"Input dimension: (%d, %d)\012\000"
	.align	2
.LC11:
	.ascii	"Output will be:\000"
	.align	2
.LC12:
	.ascii	"%s_%d_%d.r16\011(%d, %d)\012\000"
	.align	2
.LC13:
	.ascii	"r\000"
	.align	2
.LC14:
	.ascii	"Opened: %s\012\000"
	.align	2
.LC15:
	.ascii	"Warning: bytes read(%d) inconsistent with dimension"
	.ascii	" specified(%d, %d)\012\000"
	.align	2
.LC16:
	.ascii	"%s_%d_%d.r16\000"
	.align	2
.LC17:
	.ascii	"w\000"
	.align	2
.LC18:
	.ascii	"Successfully written to %s\012\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 360
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #376
	str	r0, [fp, #-360]
	str	r1, [fp, #-364]
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-352]
	mov	r3, #0
	str	r3, [fp, #-348]
	mov	r3, #0
	strb	r3, [fp, #-353]
	mov	r3, #1
	str	r3, [fp, #-344]
	mov	r3, #1
	str	r3, [fp, #-340]
	mov	r3, #0
	str	r3, [fp, #-336]
	mov	r3, #0
	str	r3, [fp, #-332]
	mov	r3, #1
	str	r3, [fp, #-328]
	mov	r3, #1
	str	r3, [fp, #-324]
	mov	r3, #1
	str	r3, [fp, #-320]
	b	.L7
.L16:
	ldr	r3, [fp, #-320]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L30+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-352]
.L8:
	ldr	r3, [fp, #-320]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L30+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-348]
.L9:
	ldr	r3, [fp, #-320]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L30+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-328]
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	str	r3, [fp, #-320]
.L10:
	ldr	r3, [fp, #-320]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L30+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-324]
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	str	r3, [fp, #-320]
.L11:
	ldr	r3, [fp, #-320]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L30+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-336]
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	str	r3, [fp, #-320]
.L12:
	ldr	r3, [fp, #-320]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L30+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-332]
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	str	r3, [fp, #-320]
.L13:
	ldr	r3, [fp, #-320]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L30+28
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L14
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-344]
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	str	r3, [fp, #-320]
.L14:
	ldr	r3, [fp, #-320]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L30+32
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-364]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-340]
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	str	r3, [fp, #-320]
.L15:
	ldr	r3, [fp, #-320]
	add	r3, r3, #1
	str	r3, [fp, #-320]
.L7:
	ldr	r2, [fp, #-320]
	ldr	r3, [fp, #-360]
	cmp	r2, r3
	blt	.L16
	ldr	r1, [fp, #-344]
	ldr	r0, [fp, #-336]
	bl	__aeabi_uidiv
	mov	r3, r0
	str	r3, [fp, #-300]
	ldr	r1, [fp, #-340]
	ldr	r0, [fp, #-332]
	bl	__aeabi_uidiv
	mov	r3, r0
	str	r3, [fp, #-296]
	ldr	r2, [fp, #-340]
	ldr	r1, [fp, #-344]
	ldr	r0, .L30+36
	bl	printf
	ldr	r1, [fp, #-352]
	ldr	r0, .L30+40
	bl	printf
	ldr	r2, [fp, #-332]
	ldr	r1, [fp, #-336]
	ldr	r0, .L30+44
	bl	printf
	ldr	r0, .L30+48
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-316]
	b	.L17
.L20:
	mov	r3, #0
	str	r3, [fp, #-312]
	b	.L18
.L19:
	ldr	r2, [fp, #-316]
	ldr	r3, [fp, #-328]
	add	r1, r2, r3
	ldr	r2, [fp, #-312]
	ldr	r3, [fp, #-324]
	add	r2, r2, r3
	ldr	r3, [fp, #-296]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-300]
	str	r3, [sp]
	mov	r3, r2
	mov	r2, r1
	ldr	r1, [fp, #-348]
	ldr	r0, .L30+52
	bl	printf
	ldr	r3, [fp, #-312]
	add	r3, r3, #1
	str	r3, [fp, #-312]
.L18:
	ldr	r2, [fp, #-312]
	ldr	r3, [fp, #-344]
	cmp	r2, r3
	bcc	.L19
	ldr	r3, [fp, #-316]
	add	r3, r3, #1
	str	r3, [fp, #-316]
.L17:
	ldr	r2, [fp, #-316]
	ldr	r3, [fp, #-340]
	cmp	r2, r3
	bcc	.L20
	ldr	r1, .L30+56
	ldr	r0, [fp, #-352]
	bl	fopen
	str	r0, [fp, #-292]
	ldr	r3, [fp, #-292]
	cmp	r3, #0
	beq	.L21
	ldr	r1, [fp, #-352]
	ldr	r0, .L30+60
	bl	printf
	ldr	r3, [fp, #-336]
	ldr	r2, [fp, #-332]
	mul	r3, r2, r3
	lsl	r3, r3, #1
	str	r3, [fp, #-288]
	ldr	r0, [fp, #-288]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-284]
	ldr	r3, [fp, #-292]
	mov	r2, #1
	ldr	r1, [fp, #-288]
	ldr	r0, [fp, #-284]
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-280]
	ldr	r0, [fp, #-292]
	bl	fclose
	ldr	r3, [fp, #-280]
	cmp	r3, #1
	beq	.L22
	ldr	r3, [fp, #-280]
	ldr	r2, [fp, #-288]
	mul	r1, r2, r3
	ldr	r3, [fp, #-332]
	ldr	r2, [fp, #-336]
	ldr	r0, .L30+64
	bl	printf
.L22:
	mov	r3, #0
	str	r3, [fp, #-308]
	b	.L23
.L27:
	mov	r3, #0
	str	r3, [fp, #-304]
	b	.L24
.L26:
	ldr	r3, [fp, #-300]
	ldr	r2, [fp, #-296]
	mul	r3, r2, r3
	lsl	r3, r3, #1
	str	r3, [fp, #-276]
	ldr	r0, [fp, #-276]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-272]
	ldr	r3, [fp, #-304]
	str	r3, [sp, #12]
	ldr	r3, [fp, #-308]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-296]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-300]
	str	r3, [sp]
	ldr	r3, [fp, #-332]
	ldr	r2, [fp, #-336]
	ldr	r1, [fp, #-284]
	ldr	r0, [fp, #-272]
	bl	read_subimage
	ldr	r2, [fp, #-308]
	ldr	r3, [fp, #-328]
	add	r1, r2, r3
	ldr	r2, [fp, #-304]
	ldr	r3, [fp, #-324]
	add	r3, r2, r3
	sub	r0, fp, #264
	str	r3, [sp]
	mov	r3, r1
	ldr	r2, [fp, #-348]
	ldr	r1, .L30+68
	bl	sprintf
	sub	r3, fp, #264
	ldr	r1, .L30+72
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	beq	.L25
	ldr	r3, [fp, #-268]
	mov	r2, #1
	ldr	r1, [fp, #-276]
	ldr	r0, [fp, #-272]
	bl	fwrite
	ldr	r0, [fp, #-268]
	bl	fclose
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L30+76
	bl	printf
.L25:
	ldr	r0, [fp, #-272]
	bl	free
	ldr	r3, [fp, #-304]
	add	r3, r3, #1
	str	r3, [fp, #-304]
.L24:
	ldr	r2, [fp, #-304]
	ldr	r3, [fp, #-344]
	cmp	r2, r3
	bcc	.L26
	ldr	r3, [fp, #-308]
	add	r3, r3, #1
	str	r3, [fp, #-308]
.L23:
	ldr	r2, [fp, #-308]
	ldr	r3, [fp, #-340]
	cmp	r2, r3
	bcc	.L27
.L21:
	mov	r3, #0
	ldr	r2, .L30
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC19
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
