	.file	"154211.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage:  %s image.tap {file1 ...}\n"
	.align 8
.LC1:
	.string	"Extract records from image.tap to file1, file2, ....\n"
.LC2:
	.string	"rb"
.LC3:
	.string	"Error opening file: %s\n"
.LC4:
	.string	"wb"
.LC5:
	.string	"Processing file %s ... "
	.align 8
.LC6:
	.string	"Invalid record size, record %d, size = 0x%02X%02X%02X%02X\n"
	.align 8
.LC7:
	.string	"end of file, record count = %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
	lea	r11, -65536[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 80
	mov	DWORD PTR -65604[rbp], edi
	mov	QWORD PTR -65616[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -65556[rbp], 0
	mov	rax, QWORD PTR -65616[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -65584[rbp], rax
	cmp	DWORD PTR -65604[rbp], 1
	jg	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -65584[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 53
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	edi, 0
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -65616[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -65576[rbp], rax
	cmp	QWORD PTR -65576[rbp], 0
	jne	.L3
	mov	rax, QWORD PTR -65616[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L3:
	mov	DWORD PTR -65600[rbp], 2
	jmp	.L4
.L16:
	mov	eax, DWORD PTR -65600[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -65616[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -65568[rbp], rax
	cmp	QWORD PTR -65568[rbp], 0
	jne	.L5
	mov	eax, DWORD PTR -65600[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -65616[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -65600[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -65616[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -65592[rbp], 0
.L15:
	mov	rdx, QWORD PTR -65576[rbp]
	lea	rax, -65556[rbp]
	mov	rcx, rdx
	mov	edx, 4
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -65596[rbp], eax
	cmp	DWORD PTR -65596[rbp], 0
	je	.L19
	movzx	edx, BYTE PTR -65554[rbp]
	movzx	eax, BYTE PTR -65553[rbp]
	or	eax, edx
	test	al, al
	je	.L8
	movzx	eax, BYTE PTR -65556[rbp]
	movzx	edi, al
	movzx	eax, BYTE PTR -65555[rbp]
	movzx	esi, al
	movzx	eax, BYTE PTR -65554[rbp]
	movzx	ecx, al
	movzx	eax, BYTE PTR -65553[rbp]
	movzx	edx, al
	mov	eax, DWORD PTR -65592[rbp]
	mov	r9d, edi
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L8:
	movzx	eax, BYTE PTR -65555[rbp]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	movzx	eax, BYTE PTR -65556[rbp]
	movzx	eax, al
	or	eax, edx
	mov	DWORD PTR -65588[rbp], eax
	mov	eax, DWORD PTR -65588[rbp]
	add	eax, 1
	and	eax, -2
	mov	DWORD PTR -65588[rbp], eax
	cmp	DWORD PTR -65588[rbp], 0
	je	.L9
	mov	eax, DWORD PTR -65588[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -65576[rbp]
	lea	rax, -65552[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -65596[rbp], eax
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -65596[rbp]
	cdqe
	mov	BYTE PTR -65552[rbp+rax], 0
	add	DWORD PTR -65596[rbp], 1
.L10:
	mov	eax, DWORD PTR -65596[rbp]
	cmp	eax, DWORD PTR -65588[rbp]
	jl	.L11
	mov	eax, DWORD PTR -65588[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -65568[rbp]
	lea	rax, -65552[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rdx, QWORD PTR -65576[rbp]
	lea	rax, -65556[rbp]
	mov	rcx, rdx
	mov	edx, 4
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -65596[rbp], eax
	add	DWORD PTR -65592[rbp], 1
	jmp	.L15
.L9:
	cmp	DWORD PTR -65592[rbp], 0
	je	.L20
	mov	eax, DWORD PTR -65592[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -65592[rbp], 0
	jmp	.L15
.L19:
	nop
	jmp	.L7
.L20:
	nop
.L7:
	mov	rax, QWORD PTR -65568[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	DWORD PTR -65600[rbp], 1
.L4:
	mov	eax, DWORD PTR -65600[rbp]
	cmp	eax, DWORD PTR -65604[rbp]
	jl	.L16
	mov	rax, QWORD PTR -65576[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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	"154211.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage:  %s image.tap {file1 ...}\012\000"
	.align	2
.LC1:
	.ascii	"Extract records from image.tap to file1, file2, ..."
	.ascii	".\012\000"
	.align	2
.LC2:
	.ascii	"rb\000"
	.align	2
.LC3:
	.ascii	"Error opening file: %s\012\000"
	.align	2
.LC4:
	.ascii	"wb\000"
	.align	2
.LC5:
	.ascii	"Processing file %s ... \000"
	.align	2
.LC6:
	.ascii	"Invalid record size, record %d, size = 0x%02X%02X%0"
	.ascii	"2X%02X\012\000"
	.align	2
.LC7:
	.ascii	"end of file, record count = %d\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 65584
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #65536
	sub	sp, sp, #60
	sub	r3, fp, #65536
	sub	r3, r3, #12
	str	r0, [r3, #-44]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	str	r1, [r3, #-48]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-8]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-48]
	ldr	r3, [r3]
	str	r3, [r2, #-24]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-44]
	cmp	r3, #1
	bgt	.L2
	ldr	r3, .L21+4
	ldr	r3, [r3]
	sub	r2, fp, #65536
	sub	r2, r2, #12
	ldr	r2, [r2, #-24]
	ldr	r1, .L21+8
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L21+4
	ldr	r3, [r3]
	mov	r2, #53
	mov	r1, #1
	ldr	r0, .L21+12
	bl	fwrite
	mov	r0, #0
	bl	exit
.L2:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-48]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #65536
	sub	r2, r2, #12
	mov	r4, r2
	ldr	r1, .L21+16
	mov	r0, r3
	bl	fopen
	str	r0, [r4, #-20]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	bne	.L3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-48]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L21+20
	bl	printf
	mov	r0, #0
	bl	exit
.L3:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #2
	str	r3, [r2, #-36]
	b	.L4
.L16:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-36]
	lsl	r3, r3, #2
	sub	r2, fp, #65536
	sub	r2, r2, #12
	ldr	r2, [r2, #-48]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #65536
	sub	r2, r2, #12
	mov	r4, r2
	ldr	r1, .L21+24
	mov	r0, r3
	bl	fopen
	str	r0, [r4, #-16]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmp	r3, #0
	bne	.L5
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-36]
	lsl	r3, r3, #2
	sub	r2, fp, #65536
	sub	r2, r2, #12
	ldr	r2, [r2, #-48]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L21+20
	bl	printf
	mov	r0, #0
	bl	exit
.L5:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-36]
	lsl	r3, r3, #2
	sub	r2, fp, #65536
	sub	r2, r2, #12
	ldr	r2, [r2, #-48]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L21+28
	bl	printf
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-28]
.L15:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r0, fp, #65536
	sub	r0, r0, #12
	sub	r0, r0, #8
	ldr	r3, [r3, #-20]
	mov	r2, #4
	mov	r1, #1
	bl	fread
	mov	r3, r0
	sub	r2, fp, #65536
	sub	r2, r2, #12
	str	r3, [r2, #-32]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	cmp	r3, #0
	beq	.L19
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldrb	r2, [r3, #-6]	@ zero_extendqisi2
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldrb	r3, [r3, #-5]	@ zero_extendqisi2
	orr	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L8
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldrb	r3, [r3, #-5]	@ zero_extendqisi2
	mov	r0, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldrb	r3, [r3, #-6]	@ zero_extendqisi2
	mov	ip, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldrb	r3, [r3, #-7]	@ zero_extendqisi2
	sub	r2, fp, #65536
	sub	r2, r2, #12
	ldrb	r2, [r2, #-8]	@ zero_extendqisi2
	sub	r1, fp, #65536
	sub	r1, r1, #12
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r1, [r1, #-28]
	ldr	r0, .L21+32
	bl	printf
	b	.L7
.L8:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldrb	r3, [r3, #-7]	@ zero_extendqisi2
	lsl	r3, r3, #8
	sub	r2, fp, #65536
	sub	r2, r2, #12
	ldrb	r2, [r2, #-8]	@ zero_extendqisi2
	orr	r3, r3, r2
	sub	r2, fp, #65536
	sub	r2, r2, #12
	str	r3, [r2, #-12]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	add	r3, r3, #1
	sub	r2, fp, #65536
	sub	r2, r2, #12
	bic	r3, r3, #1
	str	r3, [r2, #-12]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	beq	.L9
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r2, [r3, #-12]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r0, fp, #65536
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, [r3, #-20]
	mov	r1, #1
	bl	fread
	mov	r3, r0
	sub	r2, fp, #65536
	sub	r2, r2, #12
	str	r3, [r2, #-32]
	b	.L10
.L11:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r2, r3
	sub	r3, r3, #4
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #1
	str	r3, [r2, #-32]
.L10:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r2, [r2, #-32]
	ldr	r3, [r3, #-12]
	cmp	r2, r3
	blt	.L11
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r2, [r3, #-12]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r0, fp, #65536
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, [r3, #-16]
	mov	r1, #1
	bl	fwrite
	sub	r3, fp, #65536
	sub	r3, r3, #12
	sub	r0, fp, #65536
	sub	r0, r0, #12
	sub	r0, r0, #8
	ldr	r3, [r3, #-20]
	mov	r2, #4
	mov	r1, #1
	bl	fread
	mov	r3, r0
	sub	r2, fp, #65536
	sub	r2, r2, #12
	str	r3, [r2, #-32]
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-28]
	add	r3, r3, #1
	str	r3, [r2, #-28]
	b	.L15
.L9:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-28]
	cmp	r3, #0
	beq	.L20
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r1, [r3, #-28]
	ldr	r0, .L21+36
	bl	printf
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-28]
	b	.L15
.L19:
	nop
	b	.L7
.L20:
	nop
.L7:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	fclose
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r3, [r3, #-36]
	add	r3, r3, #1
	str	r3, [r2, #-36]
.L4:
	sub	r3, fp, #65536
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r2, [r2, #-36]
	ldr	r3, [r3, #-44]
	cmp	r2, r3
	blt	.L16
	sub	r3, fp, #65536
	sub	r3, r3, #12
	ldr	r0, [r3, #-20]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC8
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
