	.file	"146566.c"
	.intel_syntax noprefix
	.text
	.globl	tape
	.data
	.align 4
	.type	tape, @object
	.size	tape, 4
tape:
	.long	-1
	.globl	record
	.bss
	.align 8
	.type	record, @object
	.size	record, 8
record:
	.zero	8
	.globl	maxrecsize
	.data
	.align 4
	.type	maxrecsize, @object
	.size	maxrecsize, 4
maxrecsize:
	.long	-1
	.globl	device
	.bss
	.align 32
	.type	device, @object
	.size	device, 64
device:
	.zero	64
	.globl	count
	.align 32
	.type	count, @object
	.size	count, 64
count:
	.zero	64
	.globl	mode
	.align 32
	.type	mode, @object
	.size	mode, 64
mode:
	.zero	64
	.globl	pos
	.align 32
	.type	pos, @object
	.size	pos, 64
pos:
	.zero	64
	.globl	op
	.align 32
	.type	op, @object
	.size	op, 64
op:
	.zero	64
	.globl	resp
	.align 32
	.type	resp, @object
	.size	resp, 8192
resp:
	.zero	8192
	.globl	debug
	.align 8
	.type	debug, @object
	.size	debug, 8
debug:
	.zero	8
	.section	.rodata
.LC0:
	.string	"w"
.LC1:
	.string	"rmtd: O %s %s\n"
.LC2:
	.string	"rmtd: C\n"
.LC3:
	.string	"rmtd: L %s %s\n"
.LC4:
	.string	"rmtd: W %s\n"
.LC5:
	.string	"rmtd: premature eof\n"
.LC6:
	.string	"rmtd: R %s\n"
.LC7:
	.string	"A%d\n"
.LC8:
	.string	"rmtd: I %s %s\n"
.LC9:
	.string	"rmtd: S\n"
.LC10:
	.string	"rmtd: V %s\n"
.LC11:
	.string	"rmtd: garbage command %c\n"
.LC12:
	.string	"rmtd: A %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
	push	rbx
	sub	rsp, 120
	.cfi_offset 3, -24
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	sub	DWORD PTR -116[rbp], 1
	add	QWORD PTR -128[rbp], 8
	cmp	DWORD PTR -116[rbp], 0
	jle	.L42
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR debug[rip], rax
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	jne	.L3
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR debug[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	jmp	.L32
.L42:
	nop
.L2:
.L32:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	DWORD PTR -96[rbp], 0
	lea	rax, -97[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	cmp	rax, 1
	je	.L4
	mov	edi, 0
	call	exit@PLT
.L4:
	movzx	eax, BYTE PTR -97[rbp]
	movsx	eax, al
	sub	eax, 67
	cmp	eax, 20
	ja	.L5
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L7[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L7[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L7:
	.long	.L14-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L13-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L12-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L11-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L10-.L7
	.long	.L9-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L8-.L7
	.long	.L6-.L7
	.text
.L11:
	mov	eax, DWORD PTR tape[rip]
	test	eax, eax
	js	.L15
	mov	eax, DWORD PTR tape[rip]
	mov	edi, eax
	call	close@PLT
.L15:
	lea	rdi, device[rip]
	call	getstring
	lea	rdi, mode[rip]
	call	getstring
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L16
	mov	rax, QWORD PTR debug[rip]
	lea	rcx, mode[rip]
	lea	rdx, device[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L16:
	lea	rdi, mode[rip]
	call	atoi@PLT
	mov	edx, 438
	mov	esi, eax
	lea	rdi, device[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR tape[rip], eax
	mov	eax, DWORD PTR tape[rip]
	test	eax, eax
	jns	.L43
	jmp	.L18
.L14:
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L20
	mov	rax, QWORD PTR debug[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
.L20:
	lea	rdi, device[rip]
	call	getstring
	mov	eax, DWORD PTR tape[rip]
	mov	edi, eax
	call	close@PLT
	test	eax, eax
	js	.L44
	mov	DWORD PTR tape[rip], -1
	jmp	.L19
.L12:
	lea	rdi, count[rip]
	call	getstring
	lea	rdi, pos[rip]
	call	getstring
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L22
	mov	rax, QWORD PTR debug[rip]
	lea	rcx, pos[rip]
	lea	rdx, count[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L22:
	lea	rdi, pos[rip]
	call	atoi@PLT
	mov	ebx, eax
	lea	rdi, count[rip]
	call	atol@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR tape[rip]
	mov	edx, ebx
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	DWORD PTR -96[rbp], eax
	cmp	DWORD PTR -96[rbp], 0
	jns	.L45
	jmp	.L18
.L6:
	lea	rdi, count[rip]
	call	getstring
	lea	rdi, count[rip]
	call	atoi@PLT
	mov	DWORD PTR -88[rbp], eax
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L24
	mov	rax, QWORD PTR debug[rip]
	lea	rdx, count[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L24:
	mov	rax, QWORD PTR record[rip]
	mov	edx, DWORD PTR -88[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	checkbuf
	mov	QWORD PTR record[rip], rax
	mov	DWORD PTR -92[rbp], 0
	jmp	.L25
.L28:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -92[rbp]
	cdqe
	mov	rcx, QWORD PTR record[rip]
	mov	edx, DWORD PTR -92[rbp]
	movsx	rdx, edx
	add	rcx, rdx
	mov	rdx, rax
	mov	rsi, rcx
	mov	edi, 0
	call	read@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	jg	.L26
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L27
	mov	rax, QWORD PTR debug[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
.L27:
	mov	edi, 2
	call	exit@PLT
.L26:
	mov	eax, DWORD PTR -84[rbp]
	add	DWORD PTR -92[rbp], eax
.L25:
	mov	eax, DWORD PTR -92[rbp]
	cmp	eax, DWORD PTR -88[rbp]
	jl	.L28
	mov	eax, DWORD PTR -88[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR record[rip]
	mov	eax, DWORD PTR tape[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -96[rbp], eax
	cmp	DWORD PTR -96[rbp], 0
	jns	.L46
	jmp	.L18
.L10:
	lea	rdi, count[rip]
	call	getstring
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L30
	mov	rax, QWORD PTR debug[rip]
	lea	rdx, count[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L30:
	lea	rdi, count[rip]
	call	atoi@PLT
	mov	DWORD PTR -88[rbp], eax
	mov	rax, QWORD PTR record[rip]
	mov	edx, DWORD PTR -88[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	checkbuf
	mov	QWORD PTR record[rip], rax
	mov	eax, DWORD PTR -88[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR record[rip]
	mov	eax, DWORD PTR tape[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -96[rbp], eax
	cmp	DWORD PTR -96[rbp], 0
	js	.L47
	mov	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	lea	rsi, .LC7[rip]
	lea	rdi, resp[rip]
	mov	eax, 0
	call	sprintf@PLT
	lea	rdi, resp[rip]
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, resp[rip]
	mov	edi, 1
	call	write@PLT
	mov	eax, DWORD PTR -96[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR record[rip]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	jmp	.L32
.L13:
	lea	rdi, op[rip]
	call	getstring
	lea	rdi, count[rip]
	call	getstring
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L33
	mov	rax, QWORD PTR debug[rip]
	lea	rcx, count[rip]
	lea	rdx, op[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L33:
	lea	rdi, op[rip]
	call	atoi@PLT
	mov	WORD PTR -80[rbp], ax
	lea	rdi, count[rip]
	call	atoi@PLT
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR tape[rip]
	lea	rdx, -80[rbp]
	mov	esi, 1074294017
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	js	.L48
	mov	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR -96[rbp], eax
	jmp	.L19
.L9:
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L35
	mov	rax, QWORD PTR debug[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
.L35:
	mov	eax, DWORD PTR tape[rip]
	lea	rdx, -80[rbp]
	mov	esi, 2150657282
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	js	.L49
	mov	DWORD PTR -96[rbp], 48
	cmp	DWORD PTR -96[rbp], 24
	jle	.L37
	mov	DWORD PTR -96[rbp], 24
.L37:
	mov	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	lea	rsi, .LC7[rip]
	lea	rdi, resp[rip]
	mov	eax, 0
	call	sprintf@PLT
	lea	rdi, resp[rip]
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, resp[rip]
	mov	edi, 1
	call	write@PLT
	mov	eax, DWORD PTR -96[rbp]
	movsx	rdx, eax
	lea	rax, -80[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	jmp	.L32
.L8:
	lea	rdi, op[rip]
	call	getstring
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L38
	mov	rax, QWORD PTR debug[rip]
	lea	rdx, op[rip]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L38:
	mov	DWORD PTR -96[rbp], 2
	jmp	.L19
.L5:
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L39
	movzx	eax, BYTE PTR -97[rbp]
	movsx	edx, al
	mov	rax, QWORD PTR debug[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L39:
	mov	edi, 3
	call	exit@PLT
.L43:
	nop
	jmp	.L19
.L45:
	nop
	jmp	.L19
.L46:
	nop
.L19:
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L40
	mov	rax, QWORD PTR debug[rip]
	mov	edx, DWORD PTR -96[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L40:
	mov	eax, DWORD PTR -96[rbp]
	mov	edx, eax
	lea	rsi, .LC7[rip]
	lea	rdi, resp[rip]
	mov	eax, 0
	call	sprintf@PLT
	lea	rdi, resp[rip]
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, resp[rip]
	mov	edi, 1
	call	write@PLT
	jmp	.L32
.L44:
	nop
	jmp	.L18
.L47:
	nop
	jmp	.L18
.L48:
	nop
	jmp	.L18
.L49:
	nop
.L18:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	error
	jmp	.L32
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	getstring
	.type	getstring, @function
getstring:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L51
.L55:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	cmp	rax, 1
	je	.L52
	mov	edi, 0
	call	exit@PLT
.L52:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	je	.L56
	add	DWORD PTR -12[rbp], 1
.L51:
	cmp	DWORD PTR -12[rbp], 63
	jle	.L55
	jmp	.L54
.L56:
	nop
.L54:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	getstring, .-getstring
	.section	.rodata
	.align 8
.LC13:
	.string	"rmtd: cannot allocate buffer space\n"
	.text
	.globl	checkbuf
	.type	checkbuf, @function
checkbuf:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR maxrecsize[rip]
	cmp	edx, eax
	jg	.L58
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L59
.L58:
	cmp	QWORD PTR -8[rbp], 0
	je	.L60
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
.L60:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L61
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L62
	mov	rax, QWORD PTR debug[rip]
	mov	rcx, rax
	mov	edx, 35
	mov	esi, 1
	lea	rdi, .LC13[rip]
	call	fwrite@PLT
.L62:
	mov	edi, 4
	call	exit@PLT
.L61:
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR maxrecsize[rip], eax
	jmp	.L63
.L65:
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, 1024
	mov	DWORD PTR -12[rbp], eax
.L63:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 1024
	jle	.L64
	lea	rax, -12[rbp]
	mov	r8d, 4
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	mov	edi, 0
	call	setsockopt@PLT
	test	eax, eax
	js	.L65
.L64:
	mov	rax, QWORD PTR -8[rbp]
.L59:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	checkbuf, .-checkbuf
	.section	.rodata
.LC14:
	.string	"rmtd: E %d (%s)\n"
.LC15:
	.string	"E%d\n%s\n"
	.text
	.globl	error
	.type	error, @function
error:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	rax, QWORD PTR debug[rip]
	test	rax, rax
	je	.L67
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR debug[rip]
	mov	edx, DWORD PTR -4[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L67:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	r8, rdx
	mov	ecx, eax
	lea	rdx, .LC15[rip]
	mov	esi, 8192
	lea	rdi, resp[rip]
	mov	eax, 0
	call	snprintf@PLT
	lea	rdi, resp[rip]
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, resp[rip]
	mov	edi, 1
	call	write@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	error, .-error
	.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	"146566.c"
	.text
	.global	tape
	.data
	.align	2
	.type	tape, %object
	.size	tape, 4
tape:
	.word	-1
	.comm	record,4,4
	.global	maxrecsize
	.align	2
	.type	maxrecsize, %object
	.size	maxrecsize, 4
maxrecsize:
	.word	-1
	.comm	device,64,4
	.comm	count,64,4
	.comm	mode,64,4
	.comm	pos,64,4
	.comm	op,64,4
	.comm	resp,8192,4
	.comm	debug,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"w\000"
	.align	2
.LC1:
	.ascii	"rmtd: O %s %s\012\000"
	.align	2
.LC2:
	.ascii	"rmtd: C\012\000"
	.align	2
.LC3:
	.ascii	"rmtd: L %s %s\012\000"
	.align	2
.LC4:
	.ascii	"rmtd: W %s\012\000"
	.align	2
.LC5:
	.ascii	"rmtd: premature eof\012\000"
	.align	2
.LC6:
	.ascii	"rmtd: R %s\012\000"
	.align	2
.LC7:
	.ascii	"A%d\012\000"
	.align	2
.LC8:
	.ascii	"rmtd: I %s %s\012\000"
	.align	2
.LC9:
	.ascii	"rmtd: S\012\000"
	.align	2
.LC10:
	.ascii	"rmtd: V %s\012\000"
	.align	2
.LC11:
	.ascii	"rmtd: garbage command %c\012\000"
	.align	2
.LC12:
	.ascii	"rmtd: A %d\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.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	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #64
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L50
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-72]
	sub	r3, r3, #1
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	ble	.L42
	ldr	r3, [fp, #-76]
	ldr	r3, [r3]
	ldr	r1, .L50+4
	mov	r0, r3
	bl	fopen
	mov	r3, r0
	ldr	r2, .L50+8
	str	r3, [r2]
	ldr	r3, .L50+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, .L50+8
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	b	.L32
.L42:
	nop
.L2:
.L32:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-60]
	sub	r3, fp, #61
	mov	r2, #1
	mov	r1, r3
	mov	r0, #0
	bl	read
	mov	r3, r0
	cmp	r3, #1
	beq	.L4
	mov	r0, #0
	bl	exit
.L4:
	ldrb	r3, [fp, #-61]	@ zero_extendqisi2
	sub	r3, r3, #67
	cmp	r3, #20
	ldrls	pc, [pc, r3, asl #2]
	b	.L5
.L7:
	.word	.L14
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L13
	.word	.L5
	.word	.L5
	.word	.L12
	.word	.L5
	.word	.L5
	.word	.L11
	.word	.L5
	.word	.L5
	.word	.L10
	.word	.L9
	.word	.L5
	.word	.L5
	.word	.L8
	.word	.L6
.L11:
	ldr	r3, .L50+12
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L15
	ldr	r3, .L50+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
.L15:
	ldr	r0, .L50+16
	bl	getstring
	ldr	r0, .L50+20
	bl	getstring
	ldr	r3, .L50+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L16
	ldr	r3, .L50+8
	ldr	r0, [r3]
	ldr	r3, .L50+20
	ldr	r2, .L50+16
	ldr	r1, .L50+24
	bl	fprintf
.L16:
	ldr	r0, .L50+20
	bl	atoi
	mov	r3, r0
	ldr	r2, .L50+28
	mov	r1, r3
	ldr	r0, .L50+16
	bl	open
	mov	r3, r0
	ldr	r2, .L50+12
	str	r3, [r2]
	ldr	r3, .L50+12
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L43
	b	.L18
.L14:
	ldr	r3, .L50+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r3, .L50+8
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L50+32
	bl	fwrite
.L20:
	ldr	r0, .L50+16
	bl	getstring
	ldr	r3, .L50+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r3, r0
	cmp	r3, #0
	blt	.L44
	ldr	r3, .L50+12
	mvn	r2, #0
	str	r2, [r3]
	b	.L19
.L12:
	ldr	r0, .L50+36
	bl	getstring
	ldr	r0, .L50+40
	bl	getstring
	ldr	r3, .L50+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L22
	ldr	r3, .L50+8
	ldr	r0, [r3]
	ldr	r3, .L50+40
	ldr	r2, .L50+36
	ldr	r1, .L50+44
	bl	fprintf
.L22:
	ldr	r3, .L50+12
	ldr	r4, [r3]
	ldr	r0, .L50+36
	bl	atol
	mov	r5, r0
	ldr	r0, .L50+40
	bl	atoi
	mov	r3, r0
	mov	r2, r3
	mov	r1, r5
	mov	r0, r4
	bl	lseek
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bge	.L45
	b	.L18
.L6:
	ldr	r0, .L50+36
	bl	getstring
	ldr	r0, .L50+36
	bl	atoi
	str	r0, [fp, #-52]
	ldr	r3, .L50+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L24
	ldr	r3, .L50+8
	ldr	r3, [r3]
	ldr	r2, .L50+36
	ldr	r1, .L50+48
	mov	r0, r3
	bl	fprintf
.L24:
	ldr	r3, .L50+52
	ldr	r3, [r3]
	ldr	r1, [fp, #-52]
	mov	r0, r3
	bl	checkbuf
	mov	r3, r0
	ldr	r2, .L50+52
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L25
.L28:
	ldr	r3, .L50+52
	ldr	r2, [r3]
	ldr	r3, [fp, #-56]
	add	r1, r2, r3
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-56]
	sub	r3, r2, r3
	mov	r2, r3
	mov	r0, #0
	bl	read
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bgt	.L26
	ldr	r3, .L50+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L27
	ldr	r3, .L50+8
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L50+56
	bl	fwrite
.L27:
	mov	r0, #2
	bl	exit
.L26:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-48]
	add	r3, r2, r3
	str	r3, [fp, #-56]
.L25:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	blt	.L28
	ldr	r3, .L50+12
	ldr	r3, [r3]
	ldr	r2, .L50+52
	ldr	r1, [r2]
	ldr	r2, [fp, #-52]
	mov	r0, r3
	bl	write
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bge	.L46
	b	.L18
.L10:
	ldr	r0, .L50+36
	bl	getstring
	ldr	r3, .L50+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L30
	ldr	r3, .L50+8
	ldr	r3, [r3]
	ldr	r2, .L50+36
	ldr	r1, .L50+60
	mov	r0, r3
	bl	fprintf
.L30:
	ldr	r0, .L50+36
	bl	atoi
	str	r0, [fp, #-52]
	ldr	r3, .L50+52
	ldr	r3, [r3]
	ldr	r1, [fp, #-52]
	mov	r0, r3
	bl	checkbuf
	mov	r3, r0
	ldr	r2, .L50+52
	str	r3, [r2]
	ldr	r3, .L50+12
	ldr	r3, [r3]
	ldr	r2, .L50+52
	ldr	r1, [r2]
	ldr	r2, [fp, #-52]
	mov	r0, r3
	bl	read
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	blt	.L47
	ldr	r2, [fp, #-60]
	ldr	r1, .L50+64
	ldr	r0, .L50+68
	bl	sprintf
	ldr	r0, .L50+68
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L50+68
	mov	r0, #1
	bl	write
	ldr	r3, .L50+52
	ldr	r3, [r3]
	ldr	r2, [fp, #-60]
	mov	r1, r3
	mov	r0, #1
	bl	write
	b	.L32
.L13:
	ldr	r0, .L50+72
	bl	getstring
	ldr	r0, .L50+36
	bl	getstring
	ldr	r3, .L50+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L33
	ldr	r3, .L50+8
	ldr	r0, [r3]
	ldr	r3, .L50+36
	ldr	r2, .L50+72
	ldr	r1, .L50+76
	bl	fprintf
.L33:
	ldr	r0, .L50+72
	bl	atoi
	mov	r3, r0
	lsl	r3, r3, #16
	asr	r3, r3, #16
	strh	r3, [fp, #-44]	@ movhi
	ldr	r0, .L50+36
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r3, .L50+12
	ldr	r3, [r3]
	sub	r2, fp, #44
	ldr	r1, .L50+80
	mov	r0, r3
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	blt	.L48
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-60]
	b	.L19
.L9:
	ldr	r3, .L50+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L35
	ldr	r3, .L50+8
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L50+84
	bl	fwrite
.L35:
	ldr	r3, .L50+12
	ldr	r3, [r3]
	sub	r2, fp, #44
	ldr	r1, .L50+88
	mov	r0, r3
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	blt	.L49
	mov	r3, #28
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #24
	ble	.L37
	mov	r3, #24
	str	r3, [fp, #-60]
.L37:
	ldr	r2, [fp, #-60]
	ldr	r1, .L50+64
	ldr	r0, .L50+68
	bl	sprintf
	ldr	r0, .L50+68
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L50+68
	mov	r0, #1
	bl	write
	ldr	r2, [fp, #-60]
	sub	r3, fp, #44
	mov	r1, r3
	mov	r0, #1
	bl	write
	b	.L32
.L8:
	ldr	r0, .L50+72
	bl	getstring
	ldr	r3, .L50+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L38
	ldr	r3, .L50+8
	ldr	r3, [r3]
	ldr	r2, .L50+72
	ldr	r1, .L50+92
	mov	r0, r3
	bl	fprintf
.L38:
	mov	r3, #2
	str	r3, [fp, #-60]
	b	.L19
.L5:
	ldr	r3, .L50+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L39
	ldr	r3, .L50+8
	ldr	r3, [r3]
	ldrb	r2, [fp, #-61]	@ zero_extendqisi2
	ldr	r1, .L50+96
	mov	r0, r3
	bl	fprintf
.L39:
	mov	r0, #3
	bl	exit
.L43:
	nop
	b	.L19
.L45:
	nop
	b	.L19
.L46:
	nop
.L19:
	ldr	r3, .L50+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L40
	ldr	r3, .L50+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-60]
	ldr	r1, .L50+100
	mov	r0, r3
	bl	fprintf
.L40:
	ldr	r2, [fp, #-60]
	ldr	r1, .L50+64
	ldr	r0, .L50+68
	bl	sprintf
	ldr	r0, .L50+68
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L50+68
	mov	r0, #1
	bl	write
	b	.L32
.L44:
	nop
	b	.L18
.L47:
	nop
	b	.L18
.L48:
	nop
	b	.L18
.L49:
	nop
.L18:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	error
	b	.L32
.L51:
	.align	2
.L50:
	.word	.LC13
	.word	.LC0
	.word	debug
	.word	tape
	.word	device
	.word	mode
	.word	.LC1
	.word	438
	.word	.LC2
	.word	count
	.word	pos
	.word	.LC3
	.word	.LC4
	.word	record
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	resp
	.word	op
	.word	.LC8
	.word	1074294017
	.word	.LC9
	.word	-2145620734
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.align	2
	.global	getstring
	.syntax unified
	.arm
	.fpu softvfp
	.type	getstring, %function
getstring:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L53
.L57:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #1
	mov	r1, r3
	mov	r0, #0
	bl	read
	mov	r3, r0
	cmp	r3, #1
	beq	.L54
	mov	r0, #0
	bl	exit
.L54:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L58
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L53:
	ldr	r3, [fp, #-12]
	cmp	r3, #63
	ble	.L57
	b	.L56
.L58:
	nop
.L56:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	getstring, .-getstring
	.section	.rodata
	.align	2
.LC14:
	.ascii	"rmtd: cannot allocate buffer space\012\000"
	.text
	.align	2
	.global	checkbuf
	.syntax unified
	.arm
	.fpu softvfp
	.type	checkbuf, %function
checkbuf:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, .L68
	ldr	r3, [r3]
	cmp	r2, r3
	bgt	.L60
	ldr	r3, [fp, #-8]
	b	.L61
.L60:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L62
	ldr	r0, [fp, #-8]
	bl	free
.L62:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L63
	ldr	r3, .L68+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L64
	ldr	r3, .L68+4
	ldr	r3, [r3]
	mov	r2, #35
	mov	r1, #1
	ldr	r0, .L68+8
	bl	fwrite
.L64:
	mov	r0, #4
	bl	exit
.L63:
	ldr	r3, [fp, #-12]
	ldr	r2, .L68
	str	r3, [r2]
	b	.L65
.L67:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1024
	str	r3, [fp, #-12]
.L65:
	ldr	r3, [fp, #-12]
	cmp	r3, #1024
	ble	.L66
	sub	r3, fp, #12
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #8
	mov	r1, #1
	mov	r0, #0
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	blt	.L67
.L66:
	ldr	r3, [fp, #-8]
.L61:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L69:
	.align	2
.L68:
	.word	maxrecsize
	.word	debug
	.word	.LC14
	.size	checkbuf, .-checkbuf
	.section	.rodata
	.align	2
.LC15:
	.ascii	"rmtd: E %d (%s)\012\000"
	.align	2
.LC16:
	.ascii	"E%d\012%s\012\000"
	.text
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	ldr	r3, .L72
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L71
	ldr	r3, .L72
	ldr	r4, [r3]
	ldr	r0, [fp, #-16]
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-16]
	ldr	r1, .L72+4
	mov	r0, r4
	bl	fprintf
.L71:
	ldr	r0, [fp, #-16]
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, [fp, #-16]
	ldr	r2, .L72+8
	mov	r1, #8192
	ldr	r0, .L72+12
	bl	snprintf
	ldr	r0, .L72+12
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L72+12
	mov	r0, #1
	bl	write
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L73:
	.align	2
.L72:
	.word	debug
	.word	.LC15
	.word	.LC16
	.word	resp
	.size	error, .-error
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
