	.file	"22026.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"rb"
.LC1:
	.string	"wb"
.LC2:
	.string	"0x%08X"
.LC3:
	.string	", "
.LC4:
	.string	",\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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	cmp	DWORD PTR -68[rbp], 2
	jg	.L2
	mov	eax, 1
	jmp	.L3
.L2:
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -64[rbp], 0
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 2
	mov	DWORD PTR -48[rbp], eax
	mov	DWORD PTR -60[rbp], 0
	jmp	.L4
.L11:
	mov	eax, DWORD PTR -60[rbp]
	add	eax, 2
	mov	eax, eax
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L5
	mov	eax, 1
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	test	eax, eax
	je	.L6
	mov	eax, 1
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L7
	mov	eax, 1
	jmp	.L3
.L7:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	rewind@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	add	rax, 4
	mov	QWORD PTR -32[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L8
	mov	eax, 1
	jmp	.L3
.L8:
	mov	rax, QWORD PTR -8[rbp]
	shr	rax, 2
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -64[rbp], edx
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -64[rbp]
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -40[rbp]
	lea	rdi, [rcx+rdx]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	mov	esi, 1
	call	fread@PLT
	mov	rdx, QWORD PTR -8[rbp]
	cmp	rax, rdx
	je	.L9
	mov	eax, 1
	jmp	.L3
.L9:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L10
	mov	eax, 1
	jmp	.L3
.L10:
	mov	eax, DWORD PTR -44[rbp]
	add	DWORD PTR -64[rbp], eax
	add	DWORD PTR -60[rbp], 1
.L4:
	mov	eax, DWORD PTR -60[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jb	.L11
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L12
	mov	eax, 1
	jmp	.L3
.L12:
	mov	DWORD PTR -56[rbp], 0
	mov	DWORD PTR -52[rbp], 0
	jmp	.L13
.L16:
	mov	eax, DWORD PTR -52[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -56[rbp], 1
	mov	ecx, DWORD PTR -56[rbp]
	mov	edx, ecx
	mov	eax, 2863311531
	imul	rax, rdx
	shr	rax, 32
	mov	edx, eax
	shr	edx, 2
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	test	edx, edx
	je	.L14
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 2
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	jmp	.L15
.L14:
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 2
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
.L15:
	add	DWORD PTR -52[rbp], 1
.L13:
	mov	eax, DWORD PTR -52[rbp]
	cmp	eax, DWORD PTR -64[rbp]
	jb	.L16
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	jne	.L17
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L18
.L17:
	mov	eax, 1
	jmp	.L3
.L18:
	mov	eax, 0
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"22026.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"rb\000"
	.align	2
.LC1:
	.ascii	"wb\000"
	.align	2
.LC2:
	.ascii	"0x%08X\000"
	.align	2
.LC3:
	.ascii	", \000"
	.align	2
.LC4:
	.ascii	",\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, [fp, #-56]
	cmp	r3, #2
	bgt	.L2
	mov	r3, #1
	b	.L3
.L2:
	mov	r3, #0
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-56]
	sub	r3, r3, #2
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L4
.L11:
	ldr	r3, [fp, #-36]
	add	r3, r3, #2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L19
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L5
	mov	r3, #1
	b	.L3
.L5:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	fseek
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	mov	r3, #1
	b	.L3
.L6:
	ldr	r0, [fp, #-16]
	bl	ftell
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L7
	mov	r3, #1
	b	.L3
.L7:
	ldr	r0, [fp, #-16]
	bl	rewind
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-44]
	add	r3, r2, r3
	add	r3, r3, #4
	str	r3, [fp, #-44]
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-48]
	bl	realloc
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L8
	mov	r3, #1
	b	.L3
.L8:
	ldr	r3, [fp, #-12]
	lsr	r3, r3, #2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-40]
	add	r2, r3, #1
	str	r2, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r0, r2, r3
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	mov	r1, #1
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	beq	.L9
	mov	r3, #1
	b	.L3
.L9:
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	mov	r3, #1
	b	.L3
.L10:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L4:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bcc	.L11
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L19+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L12
	mov	r3, #1
	b	.L3
.L12:
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L13
.L16:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L19+8
	ldr	r0, [fp, #-20]
	bl	fprintf
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	ldr	r1, [fp, #-32]
	ldr	r3, .L19+12
	umull	r2, r3, r1, r3
	lsr	r2, r3, #2
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	cmp	r2, #0
	beq	.L14
	ldr	r3, [fp, #-20]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, .L19+16
	bl	fwrite
	b	.L15
.L14:
	ldr	r3, [fp, #-20]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, .L19+20
	bl	fwrite
.L15:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L13:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bcc	.L16
	ldr	r1, [fp, #-20]
	mov	r0, #10
	bl	fputc
	ldr	r0, [fp, #-48]
	bl	free
	ldr	r0, [fp, #-20]
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	ldr	r0, [fp, #-20]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L18
.L17:
	mov	r3, #1
	b	.L3
.L18:
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	-1431655765
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
