	.file	"57909.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"error %d\n"
.LC1:
	.string	"r"
.LC2:
	.string	"err %s\n"
.LC3:
	.string	"w"
.LC4:
	.string	"%d\n"
.LC5:
	.string	"%d %d %d %d\n"
.LC6:
	.string	"%s %d %d\n"
	.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, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	cmp	DWORD PTR -84[rbp], 5
	je	.L2
	mov	esi, 16
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -64[rbp], eax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	imul	eax, DWORD PTR -60[rbp]
	mov	edx, eax
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	mov	DWORD PTR -56[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L6
	mov	esi, 34
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L3
.L6:
	mov	eax, DWORD PTR -64[rbp]
	imul	eax, DWORD PTR -60[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -64[rbp]
	imul	eax, DWORD PTR -60[rbp]
	mov	ecx, eax
	shr	ecx, 31
	add	eax, ecx
	sar	eax
	add	eax, edx
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L7
	mov	esi, 40
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L3
.L7:
	mov	DWORD PTR -80[rbp], 0
.L24:
	mov	edx, DWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -56[rbp]
	cmp	QWORD PTR -16[rbp], rax
	je	.L8
	cmp	QWORD PTR -16[rbp], 0
	je	.L25
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, eax
	mov	edx, DWORD PTR -56[rbp]
	mov	eax, DWORD PTR -80[rbp]
	mov	r8d, edx
	mov	ecx, eax
	mov	edx, esi
	mov	esi, 48
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L25
.L8:
	mov	eax, DWORD PTR -64[rbp]
	imul	eax, DWORD PTR -60[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	DWORD PTR -76[rbp], 0
	jmp	.L11
.L16:
	mov	eax, DWORD PTR -76[rbp]
	and	eax, 1
	test	eax, eax
	je	.L12
	mov	DWORD PTR -72[rbp], 0
	jmp	.L13
.L15:
	mov	eax, DWORD PTR -72[rbp]
	and	eax, 1
	test	eax, eax
	je	.L14
	mov	eax, DWORD PTR -64[rbp]
	imul	eax, DWORD PTR -60[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -76[rbp]
	imul	eax, DWORD PTR -64[rbp]
	cdqe
	add	rdx, rax
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -64[rbp]
	imul	eax, DWORD PTR -60[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -76[rbp]
	mov	esi, eax
	shr	esi, 31
	add	eax, esi
	sar	eax
	mov	esi, eax
	mov	eax, DWORD PTR -64[rbp]
	mov	edi, eax
	shr	edi, 31
	add	eax, edi
	sar	eax
	imul	eax, esi
	cdqe
	add	rdx, rax
	mov	eax, DWORD PTR -72[rbp]
	mov	esi, eax
	shr	esi, 31
	add	eax, esi
	sar	eax
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
.L14:
	add	DWORD PTR -72[rbp], 1
.L13:
	mov	eax, DWORD PTR -72[rbp]
	cmp	eax, DWORD PTR -64[rbp]
	jl	.L15
.L12:
	add	DWORD PTR -76[rbp], 1
.L11:
	mov	eax, DWORD PTR -76[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L16
	mov	DWORD PTR -76[rbp], 0
	jmp	.L17
.L22:
	mov	eax, DWORD PTR -76[rbp]
	and	eax, 1
	test	eax, eax
	je	.L18
	mov	DWORD PTR -68[rbp], 0
	jmp	.L19
.L21:
	mov	eax, DWORD PTR -68[rbp]
	and	eax, 1
	test	eax, eax
	je	.L20
	mov	eax, DWORD PTR -64[rbp]
	imul	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, [rax+rax]
	mov	eax, DWORD PTR -76[rbp]
	imul	eax, DWORD PTR -64[rbp]
	cdqe
	add	rdx, rax
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -64[rbp]
	imul	eax, DWORD PTR -60[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -64[rbp]
	mov	esi, eax
	shr	esi, 31
	add	eax, esi
	sar	eax
	mov	esi, eax
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	shr	edi, 31
	add	eax, edi
	sar	eax
	imul	eax, esi
	cdqe
	add	rdx, rax
	mov	eax, DWORD PTR -76[rbp]
	mov	esi, eax
	shr	esi, 31
	add	eax, esi
	sar	eax
	mov	esi, eax
	mov	eax, DWORD PTR -64[rbp]
	mov	edi, eax
	shr	edi, 31
	add	eax, edi
	sar	eax
	imul	eax, esi
	cdqe
	add	rdx, rax
	mov	eax, DWORD PTR -68[rbp]
	mov	esi, eax
	shr	esi, 31
	add	eax, esi
	sar	eax
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
.L20:
	add	DWORD PTR -68[rbp], 1
.L19:
	mov	eax, DWORD PTR -68[rbp]
	cmp	eax, DWORD PTR -64[rbp]
	jl	.L21
.L18:
	add	DWORD PTR -76[rbp], 1
.L17:
	mov	eax, DWORD PTR -76[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L22
	mov	edx, DWORD PTR -52[rbp]
	mov	rcx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -52[rbp]
	cmp	QWORD PTR -8[rbp], rax
	je	.L23
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, eax
	mov	edx, 85
	lea	rsi, __FUNCTION__.0[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L3
.L23:
	add	DWORD PTR -80[rbp], 1
	jmp	.L24
.L25:
	nop
	mov	eax, 0
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.type	__FUNCTION__.0, @object
	.size	__FUNCTION__.0, 5
__FUNCTION__.0:
	.string	"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	"57909.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"error %d\012\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"err %s\012\000"
	.align	2
.LC3:
	.ascii	"w\000"
	.align	2
.LC4:
	.ascii	"%d\012\000"
	.align	2
.LC5:
	.ascii	"%d %d %d %d\012\000"
	.align	2
.LC6:
	.ascii	"%s %d %d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, [fp, #-64]
	cmp	r3, #5
	beq	.L2
	mov	r1, #16
	ldr	r0, .L26
	bl	printf
	mvn	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L26+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+8
	bl	printf
	mvn	r3, #0
	b	.L3
.L4:
	ldr	r3, [fp, #-68]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L26+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-68]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+8
	bl	printf
	mvn	r3, #0
	b	.L3
.L5:
	ldr	r3, [fp, #-68]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-68]
	add	r3, r3, #16
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	mul	r2, r3, r2
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	str	r3, [fp, #-28]
	ldr	r0, [fp, #-28]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L6
	mov	r1, #34
	ldr	r0, .L26+16
	bl	printf
	mov	r3, #0
	b	.L3
.L6:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	mul	r2, r3, r2
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-32]
	mul	r3, r1, r3
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L7
	mov	r1, #40
	ldr	r0, .L26+16
	bl	printf
	mov	r3, #0
	b	.L3
.L7:
	mov	r3, #0
	str	r3, [fp, #-60]
.L24:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-28]
	mov	r1, #1
	ldr	r0, [fp, #-24]
	bl	fread
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	beq	.L8
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L25
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-28]
	str	r3, [sp]
	ldr	r3, [fp, #-60]
	mov	r1, #48
	ldr	r0, .L26+20
	bl	printf
	b	.L25
.L8:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	memcpy
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L11
.L16:
	ldr	r3, [fp, #-56]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L12
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L13
.L15:
	ldr	r3, [fp, #-52]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L14
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	mul	r3, r2, r3
	mov	r1, r3
	ldr	r3, [fp, #-56]
	ldr	r2, [fp, #-36]
	mul	r3, r2, r3
	add	r2, r1, r3
	ldr	r3, [fp, #-52]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-32]
	mul	r3, r1, r3
	mov	r0, r3
	ldr	r3, [fp, #-56]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	mov	ip, r3
	ldr	r3, [fp, #-36]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	mul	r3, ip, r3
	add	r1, r0, r3
	ldr	r3, [fp, #-52]
	lsr	r0, r3, #31
	add	r3, r0, r3
	asr	r3, r3, #1
	add	r3, r1, r3
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L14:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L13:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L15
.L12:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L11:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L16
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L17
.L22:
	ldr	r3, [fp, #-56]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L18
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L19
.L21:
	ldr	r3, [fp, #-48]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	mul	r3, r2, r3
	lsl	r3, r3, #1
	ldr	r2, [fp, #-56]
	ldr	r1, [fp, #-36]
	mul	r2, r1, r2
	add	r2, r3, r2
	ldr	r3, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-32]
	mul	r3, r1, r3
	mov	r0, r3
	ldr	r3, [fp, #-36]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	mov	ip, r3
	ldr	r3, [fp, #-32]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	mul	r3, ip, r3
	add	r1, r0, r3
	ldr	r3, [fp, #-56]
	lsr	r0, r3, #31
	add	r3, r0, r3
	asr	r3, r3, #1
	mov	ip, r3
	ldr	r3, [fp, #-36]
	lsr	r0, r3, #31
	add	r3, r0, r3
	asr	r3, r3, #1
	mul	r3, ip, r3
	add	r1, r1, r3
	ldr	r3, [fp, #-48]
	lsr	r0, r3, #31
	add	r3, r0, r3
	asr	r3, r3, #1
	add	r3, r1, r3
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L20:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L19:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L21
.L18:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L17:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L22
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-20]
	mov	r1, #1
	ldr	r0, [fp, #-16]
	bl	fwrite
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	beq	.L23
	ldr	r3, [fp, #-8]
	mov	r2, #85
	ldr	r1, .L26+24
	ldr	r0, .L26+28
	bl	printf
	mvn	r3, #0
	b	.L3
.L23:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
	b	.L24
.L25:
	nop
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	__FUNCTION__.5350
	.word	.LC6
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__FUNCTION__.5350, %object
	.size	__FUNCTION__.5350, 5
__FUNCTION__.5350:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
