	.file	"958540.c"
	.intel_syntax noprefix
	.text
	.local	mtdev
	.comm	mtdev,256,32
	.local	o_mtdev
	.comm	o_mtdev,256,32
	.local	iobuf
	.comm	iobuf,262144,32
	.local	cmdbuf
	.comm	cmdbuf,512,32
	.local	tokbuf
	.comm	tokbuf,512,32
	.local	logfile
	.comm	logfile,256,32
	.local	rbufsz
	.comm	rbufsz,4,4
	.local	wbufsz
	.comm	wbufsz,4,4
	.local	t_fileno
	.comm	t_fileno,4,4
	.local	t_blkno
	.comm	t_blkno,4,4
	.local	t_acmode
	.comm	t_acmode,4,4
	.local	verbose
	.comm	verbose,4,4
	.local	status
	.comm	status,4,4
	.local	stack
	.comm	stack,160,32
	.local	logfp
	.comm	logfp,8,8
	.local	tp
	.comm	tp,8,8
	.local	tape
	.comm	tape,4,4
	.local	sp
	.comm	sp,4,4
	.section	.rodata
.LC0:
	.string	"quit"
.LC1:
	.string	"?"
.LC2:
	.string	"help"
.LC3:
	.string	"status"
.LC4:
	.string	"verbose"
.LC5:
	.string	"log"
.LC6:
	.string	"logging disabled"
.LC7:
	.string	"a"
.LC8:
	.string	"cannot open logfile %s\n"
.LC9:
	.string	"logging output to %s\n"
.LC10:
	.string	"# --- BEGIN ---\n"
.LC11:
	.string	"run"
.LC12:
	.string	"r"
.LC13:
	.string	"cannot run %s\n"
.LC14:
	.string	"open"
.LC15:
	.string	"."
.LC16:
	.string	"TAPE"
.LC17:
	.string	"no tape device specified\n"
.LC18:
	.string	"cannot open device %s\n"
	.align 8
.LC19:
	.string	"device %s open on descriptor %d\n"
.LC20:
	.string	"close"
.LC21:
	.string	"rew"
.LC22:
	.string	"weof"
.LC23:
	.string	"fsf"
.LC24:
	.string	"fsr"
.LC25:
	.string	"bsf"
.LC26:
	.string	"bsr"
.LC27:
	.string	"read"
.LC28:
	.string	"  ERR\n"
.LC29:
	.string	"  EOF\n"
.LC30:
	.string	"write"
.LC31:
	.string	"file %d, record %d\n"
.LC32:
	.string	"seek"
.LC33:
	.string	"unrecognized command\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	r12
	push	rbx
	sub	rsp, 880
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	DWORD PTR -884[rbp], edi
	mov	QWORD PTR -896[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR errno[rip], 0
	mov	DWORD PTR t_blkno[rip], 0
	mov	DWORD PTR t_fileno[rip], 0
	mov	DWORD PTR rbufsz[rip], 64512
	mov	DWORD PTR wbufsz[rip], 1024
	movabs	rax, 8391735725735829876
	mov	QWORD PTR logfile[rip], rax
	mov	BYTE PTR logfile[rip+8], 0
	cmp	DWORD PTR -884[rbp], 1
	jle	.L2
	mov	rax, QWORD PTR -896[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, o_mtdev[rip]
	call	strcpy@PLT
.L2:
	mov	rax, QWORD PTR stdin[rip]
	mov	QWORD PTR -848[rbp], rax
	mov	DWORD PTR sp[rip], 0
	jmp	.L3
.L97:
	mov	rax, QWORD PTR stdin[rip]
	cmp	QWORD PTR -848[rbp], rax
	jne	.L4
	mov	rbx, QWORD PTR stdout[rip]
	call	prompt
	mov	rsi, rbx
	mov	rdi, rax
	call	fputs@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L4:
	mov	rax, QWORD PTR -848[rbp]
	mov	rdi, rax
	call	nextcmd
	test	rax, rax
	jne	.L5
	nop
	jmp	.L6
.L100:
	nop
.L6:
	mov	rax, QWORD PTR stdin[rip]
	cmp	QWORD PTR -848[rbp], rax
	je	.L7
	mov	rax, QWORD PTR -848[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L7:
	mov	eax, DWORD PTR sp[rip]
	sub	eax, 1
	mov	DWORD PTR sp[rip], eax
	mov	eax, DWORD PTR sp[rip]
	test	eax, eax
	js	.L3
	mov	eax, DWORD PTR sp[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, stack[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	QWORD PTR -848[rbp], rax
	jmp	.L3
.L5:
	mov	rax, QWORD PTR tp[rip]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 33
	jne	.L9
	mov	rax, QWORD PTR tp[rip]
	add	rax, 1
	mov	rdi, rax
	call	system@PLT
	jmp	.L3
.L9:
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	jne	.L10
	jmp	.L3
.L10:
	mov	rax, QWORD PTR stdin[rip]
	cmp	QWORD PTR -848[rbp], rax
	jne	.L11
	mov	rax, QWORD PTR logfp[rip]
	test	rax, rax
	je	.L12
	mov	rax, QWORD PTR logfp[rip]
	mov	rsi, rax
	lea	rdi, cmdbuf[rip]
	call	fputs@PLT
	jmp	.L12
.L11:
	lea	rdi, cmdbuf[rip]
	call	output
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L12:
	mov	rax, QWORD PTR -824[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	edx, BYTE PTR .LC0[rip]
	movzx	eax, al
	movzx	edx, dl
	sub	eax, edx
	test	eax, eax
	je	.L100
	mov	rax, QWORD PTR -824[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L14
	mov	rax, QWORD PTR -824[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L15
.L14:
	call	phelp
	jmp	.L3
.L15:
	mov	rax, QWORD PTR -824[rbp]
	mov	edx, 2
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L16
	call	pstatus
	jmp	.L3
.L16:
	mov	rax, QWORD PTR -824[rbp]
	mov	edx, 3
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L17
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	sete	al
	movzx	eax, al
	mov	DWORD PTR verbose[rip], eax
	jmp	.L3
.L17:
	mov	rax, QWORD PTR -824[rbp]
	mov	edx, 3
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L18
	mov	rax, QWORD PTR stdin[rip]
	cmp	QWORD PTR -848[rbp], rax
	je	.L19
	jmp	.L3
.L19:
	mov	rax, QWORD PTR logfp[rip]
	test	rax, rax
	je	.L20
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	rax, QWORD PTR logfp[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR logfp[rip], 0
	jmp	.L3
.L20:
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L22
	mov	rax, QWORD PTR -824[rbp]
	mov	rsi, rax
	lea	rdi, logfile[rip]
	call	strcpy@PLT
.L22:
	lea	rsi, .LC7[rip]
	lea	rdi, logfile[rip]
	call	fopen@PLT
	mov	QWORD PTR logfp[rip], rax
	mov	rax, QWORD PTR logfp[rip]
	test	rax, rax
	jne	.L23
	lea	rsi, logfile[rip]
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L23:
	lea	rsi, logfile[rip]
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR logfp[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	jmp	.L3
.L18:
	mov	rax, QWORD PTR -824[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L24
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L25
	mov	rax, QWORD PTR -824[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -808[rbp], rax
	cmp	QWORD PTR -808[rbp], 0
	jne	.L26
.L25:
	cmp	QWORD PTR -824[rbp], 0
	je	.L27
	mov	rax, QWORD PTR -824[rbp]
	jmp	.L28
.L27:
	lea	rax, .LC1[rip]
.L28:
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L29
.L26:
	mov	eax, DWORD PTR sp[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR sp[rip], edx
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rdx, stack[rip]
	mov	rax, QWORD PTR -848[rbp]
	mov	QWORD PTR [rcx+rdx], rax
	mov	rax, QWORD PTR -808[rbp]
	mov	QWORD PTR -848[rbp], rax
.L29:
	jmp	.L3
.L24:
	mov	rax, QWORD PTR -824[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	edx, BYTE PTR .LC14[rip]
	movzx	eax, al
	movzx	edx, dl
	sub	eax, edx
	test	eax, eax
	jne	.L30
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L31
	mov	rax, QWORD PTR -824[rbp]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L32
.L31:
	movzx	eax, BYTE PTR o_mtdev[rip]
	test	al, al
	jne	.L33
	lea	rdi, .LC16[rip]
	call	getenv@PLT
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L33
	mov	rax, QWORD PTR -824[rbp]
	mov	rsi, rax
	lea	rdi, mtdev[rip]
	call	strcpy@PLT
	jmp	.L35
.L33:
	lea	rsi, o_mtdev[rip]
	lea	rdi, mtdev[rip]
	call	strcpy@PLT
	jmp	.L35
.L32:
	mov	rax, QWORD PTR -824[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L35
	mov	rax, QWORD PTR -824[rbp]
	mov	rsi, rax
	lea	rdi, mtdev[rip]
	call	strcpy@PLT
.L35:
	movzx	eax, BYTE PTR mtdev[rip]
	test	al, al
	jne	.L36
	lea	rdi, .LC17[rip]
	call	output
	jmp	.L3
.L36:
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L37
	mov	rax, QWORD PTR -824[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 119
	jne	.L37
	mov	eax, 2
	jmp	.L38
.L37:
	mov	eax, 0
.L38:
	mov	DWORD PTR t_acmode[rip], eax
	mov	eax, DWORD PTR t_acmode[rip]
	mov	esi, eax
	lea	rdi, mtdev[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR tape[rip], eax
	mov	eax, DWORD PTR tape[rip]
	cmp	eax, -1
	jne	.L39
	lea	rax, -800[rbp]
	lea	rdx, mtdev[rip]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -800[rbp]
	mov	rdi, rax
	call	output
	mov	BYTE PTR mtdev[rip], 0
	jmp	.L3
.L39:
	mov	edx, DWORD PTR tape[rip]
	lea	rax, -800[rbp]
	mov	ecx, edx
	lea	rdx, mtdev[rip]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -800[rbp]
	mov	rdi, rax
	call	output
	lea	rsi, mtdev[rip]
	lea	rdi, o_mtdev[rip]
	call	strcpy@PLT
	jmp	.L40
.L30:
	mov	rax, QWORD PTR -824[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	edx, BYTE PTR .LC20[rip]
	movzx	eax, al
	movzx	edx, dl
	sub	eax, edx
	test	eax, eax
	jne	.L41
	mov	eax, DWORD PTR tape[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR t_acmode[rip]
	test	eax, eax
	je	.L42
	mov	eax, DWORD PTR t_fileno[rip]
	add	eax, 1
	mov	DWORD PTR t_fileno[rip], eax
	mov	DWORD PTR t_blkno[rip], 0
.L42:
	mov	BYTE PTR mtdev[rip], 0
	mov	DWORD PTR errno[rip], 0
	jmp	.L40
.L41:
	mov	rax, QWORD PTR -824[rbp]
	mov	edx, 3
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L43
	mov	esi, 1
	mov	edi, 6
	call	mtop
	mov	DWORD PTR t_fileno[rip], 0
	mov	DWORD PTR t_blkno[rip], 0
	mov	DWORD PTR errno[rip], 0
	jmp	.L40
.L43:
	mov	rax, QWORD PTR -824[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L44
	mov	esi, 1
	mov	edi, 5
	call	mtop
	mov	eax, DWORD PTR t_fileno[rip]
	add	eax, 1
	mov	DWORD PTR t_fileno[rip], eax
	mov	DWORD PTR t_blkno[rip], 0
	jmp	.L40
.L44:
	mov	rax, QWORD PTR -824[rbp]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L45
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L46
	mov	rax, QWORD PTR -824[rbp]
	mov	rdi, rax
	call	atoi@PLT
	jmp	.L47
.L46:
	mov	eax, 1
.L47:
	mov	esi, eax
	mov	edi, 1
	call	mtop
	jmp	.L40
.L45:
	mov	rax, QWORD PTR -824[rbp]
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L48
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L49
	mov	rax, QWORD PTR -824[rbp]
	mov	rdi, rax
	call	atoi@PLT
	jmp	.L50
.L49:
	mov	eax, 1
.L50:
	mov	esi, eax
	mov	edi, 3
	call	mtop
	jmp	.L40
.L48:
	mov	rax, QWORD PTR -824[rbp]
	lea	rsi, .LC25[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L51
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L52
	mov	rax, QWORD PTR -824[rbp]
	mov	rdi, rax
	call	atoi@PLT
	jmp	.L53
.L52:
	mov	eax, 1
.L53:
	mov	esi, eax
	mov	edi, 2
	call	mtop
	jmp	.L40
.L51:
	mov	rax, QWORD PTR -824[rbp]
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L54
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L55
	mov	rax, QWORD PTR -824[rbp]
	mov	rdi, rax
	call	atoi@PLT
	jmp	.L56
.L55:
	mov	eax, 1
.L56:
	mov	esi, eax
	mov	edi, 4
	call	mtop
	jmp	.L40
.L54:
	mov	rax, QWORD PTR -824[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	edx, BYTE PTR .LC27[rip]
	movzx	eax, al
	movzx	edx, dl
	sub	eax, edx
	test	eax, eax
	jne	.L57
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L58
	mov	rax, QWORD PTR -824[rbp]
	mov	rdi, rax
	call	atoi@PLT
	jmp	.L59
.L58:
	mov	eax, 1
.L59:
	mov	DWORD PTR -852[rbp], eax
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L60
	mov	rax, QWORD PTR -824[rbp]
	mov	rdi, rax
	call	atoi@PLT
	jmp	.L61
.L60:
	mov	eax, DWORD PTR rbufsz[rip]
.L61:
	mov	DWORD PTR rbufsz[rip], eax
	mov	eax, DWORD PTR rbufsz[rip]
	mov	DWORD PTR -868[rbp], eax
	mov	r12d, 0
	jmp	.L62
.L72:
	mov	ebx, 0
	jmp	.L63
.L64:
	movsx	rax, ebx
	lea	rdx, iobuf[rip]
	mov	BYTE PTR [rax+rdx], 0
	add	ebx, 1
.L63:
	cmp	ebx, DWORD PTR -868[rbp]
	jl	.L64
	mov	eax, DWORD PTR -868[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR tape[rip]
	lea	rsi, iobuf[rip]
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR status[rip], eax
	call	pstatus
	mov	eax, DWORD PTR status[rip]
	test	eax, eax
	jns	.L65
	lea	rdi, .LC28[rip]
	call	output
	jmp	.L66
.L65:
	mov	eax, DWORD PTR status[rip]
	test	eax, eax
	jne	.L67
	lea	rdi, .LC29[rip]
	call	output
	jmp	.L66
.L67:
	mov	eax, DWORD PTR status[rip]
	test	eax, eax
	jle	.L66
	lea	rax, -544[rbp]
	mov	QWORD PTR -840[rbp], rax
	mov	rax, QWORD PTR -840[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -840[rbp], rdx
	mov	BYTE PTR [rax], 32
	mov	rax, QWORD PTR -840[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -840[rbp], rdx
	mov	BYTE PTR [rax], 32
	mov	ebx, 0
	lea	rax, iobuf[rip]
	mov	QWORD PTR -816[rbp], rax
	jmp	.L68
.L71:
	movsx	rdx, ebx
	mov	rax, QWORD PTR -816[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -869[rbp], al
	cmp	BYTE PTR -869[rbp], 32
	jle	.L69
	cmp	BYTE PTR -869[rbp], 127
	je	.L69
	movsx	rdx, ebx
	mov	rax, QWORD PTR -816[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -840[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -840[rbp], rdx
	movzx	edx, BYTE PTR [rcx]
	mov	BYTE PTR [rax], dl
.L69:
	add	ebx, 1
.L68:
	mov	eax, DWORD PTR status[rip]
	cmp	ebx, eax
	jge	.L70
	lea	rdx, -544[rbp]
	mov	rax, QWORD PTR -840[rbp]
	sub	rax, rdx
	cmp	rax, 77
	jle	.L71
.L70:
	mov	rax, QWORD PTR -840[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -840[rbp], rdx
	mov	BYTE PTR [rax], 10
	mov	rax, QWORD PTR -840[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -840[rbp], rdx
	mov	BYTE PTR [rax], 0
	lea	rax, -544[rbp]
	mov	rdi, rax
	call	output
.L66:
	add	r12d, 1
.L62:
	cmp	r12d, DWORD PTR -852[rbp]
	jl	.L72
	jmp	.L3
.L57:
	mov	rax, QWORD PTR -824[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	edx, BYTE PTR .LC30[rip]
	movzx	eax, al
	movzx	edx, dl
	sub	eax, edx
	test	eax, eax
	jne	.L73
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L74
	mov	rax, QWORD PTR -824[rbp]
	mov	rdi, rax
	call	atoi@PLT
	jmp	.L75
.L74:
	mov	eax, 1
.L75:
	mov	DWORD PTR -852[rbp], eax
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L76
	mov	rax, QWORD PTR -824[rbp]
	mov	rdi, rax
	call	atoi@PLT
	jmp	.L77
.L76:
	mov	eax, DWORD PTR wbufsz[rip]
.L77:
	mov	DWORD PTR wbufsz[rip], eax
	mov	eax, DWORD PTR wbufsz[rip]
	mov	DWORD PTR -868[rbp], eax
	cmp	DWORD PTR -868[rbp], 262144
	jle	.L78
	mov	DWORD PTR -868[rbp], 262144
.L78:
	mov	ebx, 0
	jmp	.L79
.L80:
	movsx	rax, ebx
	lea	rdx, iobuf[rip]
	mov	BYTE PTR [rax+rdx], 0
	add	ebx, 1
.L79:
	cmp	ebx, DWORD PTR -868[rbp]
	jl	.L80
	mov	ebx, 0
	jmp	.L81
.L82:
	mov	edx, DWORD PTR t_blkno[rip]
	mov	eax, DWORD PTR t_fileno[rip]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC31[rip]
	lea	rdi, iobuf[rip]
	mov	eax, 0
	call	sprintf@PLT
	mov	eax, DWORD PTR -868[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR tape[rip]
	lea	rsi, iobuf[rip]
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR status[rip], eax
	mov	eax, DWORD PTR t_blkno[rip]
	add	eax, 1
	mov	DWORD PTR t_blkno[rip], eax
	call	pstatus
	add	ebx, 1
.L81:
	cmp	ebx, DWORD PTR -852[rbp]
	jl	.L82
	jmp	.L3
.L73:
	mov	rax, QWORD PTR -824[rbp]
	mov	edx, 2
	lea	rsi, .LC32[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L83
	call	gettok
	mov	QWORD PTR -824[rbp], rax
	cmp	QWORD PTR -824[rbp], 0
	je	.L84
	mov	rax, QWORD PTR -824[rbp]
	mov	QWORD PTR -832[rbp], rax
	mov	DWORD PTR -860[rbp], 0
	mov	eax, DWORD PTR -860[rbp]
	mov	DWORD PTR -864[rbp], eax
	mov	rax, QWORD PTR -832[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	jne	.L85
	add	DWORD PTR -860[rbp], 1
	add	QWORD PTR -832[rbp], 1
	jmp	.L86
.L85:
	mov	rax, QWORD PTR -832[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 43
	jne	.L86
	add	DWORD PTR -864[rbp], 1
	add	QWORD PTR -832[rbp], 1
.L86:
	mov	DWORD PTR -856[rbp], 0
	jmp	.L87
.L88:
	mov	edx, DWORD PTR -856[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	edx, eax
	mov	rax, QWORD PTR -832[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	add	eax, edx
	mov	DWORD PTR -856[rbp], eax
	add	QWORD PTR -832[rbp], 1
.L87:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -832[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L88
	mov	rax, QWORD PTR -832[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	eax, 109
	je	.L89
	cmp	eax, 109
	jg	.L90
	cmp	eax, 98
	je	.L91
	cmp	eax, 107
	je	.L92
	jmp	.L90
.L91:
	mov	eax, DWORD PTR rbufsz[rip]
	mov	edx, DWORD PTR -856[rbp]
	imul	eax, edx
	mov	DWORD PTR -856[rbp], eax
	jmp	.L90
.L92:
	sal	DWORD PTR -856[rbp], 10
	jmp	.L90
.L89:
	sal	DWORD PTR -856[rbp], 20
	nop
.L90:
	cmp	DWORD PTR -864[rbp], 0
	je	.L93
	mov	eax, DWORD PTR -856[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR tape[rip]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	DWORD PTR status[rip], eax
	jmp	.L94
.L93:
	cmp	DWORD PTR -860[rbp], 0
	je	.L95
	mov	eax, DWORD PTR -856[rbp]
	cdqe
	neg	rax
	mov	rcx, rax
	mov	eax, DWORD PTR tape[rip]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	DWORD PTR status[rip], eax
	jmp	.L94
.L95:
	mov	eax, DWORD PTR -856[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR tape[rip]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	DWORD PTR status[rip], eax
.L94:
	call	pstatus
	jmp	.L40
.L84:
	mov	eax, DWORD PTR tape[rip]
	mov	edx, 1
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	mov	DWORD PTR status[rip], eax
	call	pstatus
	jmp	.L40
.L83:
	lea	rdi, .LC33[rip]
	call	output
.L40:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L96
	call	pstatus
.L96:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L3:
	mov	eax, DWORD PTR sp[rip]
	test	eax, eax
	jns	.L97
	mov	eax, 0
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L99
	call	__stack_chk_fail@PLT
.L99:
	add	rsp, 880
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	mtop
	.type	mtop, @function
mtop:
.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -20[rbp]
	mov	WORD PTR -16[rbp], ax
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR tape[rip]
	lea	rdx, -16[rbp]
	mov	esi, 1074294017
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR status[rip], eax
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	jne	.L104
	mov	eax, DWORD PTR status[rip]
	test	eax, eax
	jns	.L104
	call	pstatus
.L104:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L103
	call	__stack_chk_fail@PLT
.L103:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	mtop, .-mtop
	.globl	nextcmd
	.type	nextcmd, @function
nextcmd:
.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	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	mov	esi, 512
	lea	rdi, cmdbuf[rip]
	call	fgets@PLT
	test	rax, rax
	jne	.L106
	mov	eax, 0
	jmp	.L107
.L106:
	lea	rax, cmdbuf[rip]
	mov	QWORD PTR tp[rip], rax
	mov	rax, QWORD PTR tp[rip]
.L107:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	nextcmd, .-nextcmd
	.globl	gettok
	.type	gettok, @function
gettok:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	jmp	.L109
.L111:
	mov	rax, QWORD PTR tp[rip]
	add	rax, 1
	mov	QWORD PTR tp[rip], rax
.L109:
	mov	rax, QWORD PTR tp[rip]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L110
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR tp[rip]
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L111
.L110:
	mov	rax, QWORD PTR tp[rip]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L112
	mov	rax, QWORD PTR tp[rip]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 35
	jne	.L113
.L112:
	mov	eax, 0
	jmp	.L114
.L113:
	lea	rbx, tokbuf[rip]
	jmp	.L115
.L117:
	mov	eax, r12d
	mov	BYTE PTR [rbx], al
	mov	rax, QWORD PTR tp[rip]
	add	rax, 1
	mov	QWORD PTR tp[rip], rax
	add	rbx, 1
.L115:
	mov	rax, QWORD PTR tp[rip]
	movzx	eax, BYTE PTR [rax]
	movsx	r12d, al
	test	r12d, r12d
	je	.L116
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	movsx	rax, r12d
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	je	.L117
.L116:
	mov	BYTE PTR [rbx], 0
	lea	rax, tokbuf[rip]
.L114:
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	gettok, .-gettok
	.section	.rodata
.LC34:
	.string	"(%s) "
	.text
	.globl	prompt
	.type	prompt, @function
prompt:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	lea	rbx, mtdev[rip]
	mov	r12, rbx
	jmp	.L119
.L121:
	movzx	eax, BYTE PTR [r12]
	cmp	al, 47
	jne	.L120
	lea	rbx, 1[r12]
.L120:
	add	r12, 1
.L119:
	movzx	eax, BYTE PTR [r12]
	test	al, al
	jne	.L121
	movzx	eax, BYTE PTR [rbx]
	test	al, al
	je	.L122
	mov	rdx, rbx
	lea	rsi, .LC34[rip]
	lea	rdi, prompt.1[rip]
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, prompt.1[rip]
	jmp	.L123
.L122:
	lea	rax, defp.0[rip]
.L123:
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	prompt, .-prompt
	.section	.rodata
.LC35:
	.string	"status %d (%d)\n"
	.text
	.globl	pstatus
	.type	pstatus, @function
pstatus:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 528
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	ecx, DWORD PTR errno[rip]
	mov	edx, DWORD PTR status[rip]
	lea	rax, -528[rbp]
	lea	rsi, .LC35[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -528[rbp]
	mov	rdi, rax
	call	output
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L125
	call	__stack_chk_fail@PLT
.L125:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	pstatus, .-pstatus
	.section	.rodata
.LC36:
	.string	"# "
	.text
	.globl	output
	.type	output, @function
output:
.LFB12:
	.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	rdx, QWORD PTR stdout[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	rax, QWORD PTR logfp[rip]
	test	rax, rax
	je	.L128
	mov	rax, QWORD PTR logfp[rip]
	mov	rcx, rax
	mov	edx, 2
	mov	esi, 1
	lea	rdi, .LC36[rip]
	call	fwrite@PLT
	mov	rdx, QWORD PTR logfp[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
.L128:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	output, .-output
	.globl	helptxt
	.section	.rodata
	.align 8
.LC37:
	.string	"Usage: tape [device].   The following commands are provided:\n"
.LC38:
	.string	"\n"
	.align 8
.LC39:
	.string	"    open [device [r|w]]    rewind                   fsf [n]\n"
	.align 8
.LC40:
	.string	"    close                  read [nrec [bufsz]]      fsr [n]\n"
	.align 8
.LC41:
	.string	"    log [file]             write [nrec [bufsz]]     bsf [n]\n"
	.align 8
.LC42:
	.string	"    run <file>             weof                     bsr [n]\n"
	.align 8
.LC43:
	.string	"    verbose                status                   quit\n"
	.section	.data.rel.local,"aw"
	.align 32
	.type	helptxt, @object
	.size	helptxt, 64
helptxt:
	.quad	.LC37
	.quad	.LC38
	.quad	.LC39
	.quad	.LC40
	.quad	.LC41
	.quad	.LC42
	.quad	.LC43
	.quad	0
	.text
	.globl	phelp
	.type	phelp, @function
phelp:
.LFB13:
	.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, 8
	.cfi_offset 3, -24
	mov	ebx, 0
	jmp	.L130
.L131:
	movsx	rax, ebx
	lea	rdx, 0[0+rax*8]
	lea	rax, helptxt[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	output
	add	ebx, 1
.L130:
	movsx	rax, ebx
	lea	rdx, 0[0+rax*8]
	lea	rax, helptxt[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	jne	.L131
	nop
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	phelp, .-phelp
	.local	prompt.1
	.comm	prompt.1,32,32
	.data
	.type	defp.0, @object
	.size	defp.0, 3
defp.0:
	.string	"% "
	.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	"958540.c"
	.text
	.local	mtdev
	.comm	mtdev,256,4
	.local	o_mtdev
	.comm	o_mtdev,256,4
	.local	iobuf
	.comm	iobuf,262144,4
	.local	cmdbuf
	.comm	cmdbuf,512,4
	.local	tokbuf
	.comm	tokbuf,512,4
	.local	logfile
	.comm	logfile,256,4
	.local	rbufsz
	.comm	rbufsz,4,4
	.local	wbufsz
	.comm	wbufsz,4,4
	.local	t_fileno
	.comm	t_fileno,4,4
	.local	t_blkno
	.comm	t_blkno,4,4
	.local	t_acmode
	.comm	t_acmode,4,4
	.local	verbose
	.comm	verbose,4,4
	.local	status
	.comm	status,4,4
	.local	stack
	.comm	stack,80,4
	.local	logfp
	.comm	logfp,4,4
	.local	tp
	.comm	tp,4,4
	.local	tape
	.comm	tape,4,4
	.local	sp
	.comm	sp,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"tape.out\000"
	.align	2
.LC1:
	.ascii	"quit\000"
	.align	2
.LC2:
	.ascii	"?\000"
	.align	2
.LC3:
	.ascii	"help\000"
	.align	2
.LC4:
	.ascii	"status\000"
	.align	2
.LC5:
	.ascii	"verbose\000"
	.align	2
.LC6:
	.ascii	"log\000"
	.align	2
.LC7:
	.ascii	"logging disabled\000"
	.align	2
.LC8:
	.ascii	"a\000"
	.align	2
.LC9:
	.ascii	"cannot open logfile %s\012\000"
	.align	2
.LC10:
	.ascii	"logging output to %s\012\000"
	.align	2
.LC11:
	.ascii	"# --- BEGIN ---\012\000"
	.align	2
.LC12:
	.ascii	"run\000"
	.align	2
.LC13:
	.ascii	"r\000"
	.align	2
.LC14:
	.ascii	"cannot run %s\012\000"
	.align	2
.LC15:
	.ascii	"open\000"
	.align	2
.LC16:
	.ascii	".\000"
	.align	2
.LC17:
	.ascii	"TAPE\000"
	.align	2
.LC18:
	.ascii	"no tape device specified\012\000"
	.align	2
.LC19:
	.ascii	"cannot open device %s\012\000"
	.align	2
.LC20:
	.ascii	"device %s open on descriptor %d\012\000"
	.align	2
.LC21:
	.ascii	"close\000"
	.align	2
.LC22:
	.ascii	"rew\000"
	.align	2
.LC23:
	.ascii	"weof\000"
	.align	2
.LC24:
	.ascii	"fsf\000"
	.align	2
.LC25:
	.ascii	"fsr\000"
	.align	2
.LC26:
	.ascii	"bsf\000"
	.align	2
.LC27:
	.ascii	"bsr\000"
	.align	2
.LC28:
	.ascii	"read\000"
	.align	2
.LC29:
	.ascii	"  ERR\012\000"
	.align	2
.LC30:
	.ascii	"  EOF\012\000"
	.align	2
.LC31:
	.ascii	"write\000"
	.align	2
.LC32:
	.ascii	"file %d, record %d\012\000"
	.align	2
.LC33:
	.ascii	"seek\000"
	.align	2
.LC34:
	.ascii	"unrecognized command\012\000"
	.align	2
.LC35:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 832
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #832
	str	r0, [fp, #-840]
	str	r1, [fp, #-844]
	ldr	r3, .L101
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L101+4
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L101+8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L101+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L101+16
	mov	r2, #64512
	str	r2, [r3]
	ldr	r3, .L101+20
	mov	r2, #1024
	str	r2, [r3]
	ldr	r3, .L101+24
	ldr	r2, .L101+28
	ldm	r2, {r0, r1, r2}
	stmia	r3!, {r0, r1}
	strb	r2, [r3]
	ldr	r3, [fp, #-840]
	cmp	r3, #1
	ble	.L2
	ldr	r3, [fp, #-844]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L101+32
	bl	strcpy
.L2:
	ldr	r3, .L101+36
	ldr	r3, [r3]
	str	r3, [fp, #-824]
	ldr	r3, .L101+40
	mov	r2, #0
	str	r2, [r3]
	b	.L3
.L97:
	ldr	r3, .L101+36
	ldr	r3, [r3]
	ldr	r2, [fp, #-824]
	cmp	r2, r3
	bne	.L4
	bl	prompt
	mov	r2, r0
	ldr	r3, .L101+44
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	fputs
	ldr	r3, .L101+44
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L4:
	ldr	r0, [fp, #-824]
	bl	nextcmd
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	nop
	b	.L6
.L100:
	nop
.L6:
	ldr	r3, .L101+36
	ldr	r3, [r3]
	ldr	r2, [fp, #-824]
	cmp	r2, r3
	beq	.L7
	ldr	r0, [fp, #-824]
	bl	fclose
.L7:
	ldr	r3, .L101+40
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L101+40
	str	r3, [r2]
	ldr	r3, .L101+40
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L3
	ldr	r3, .L101+40
	ldr	r3, [r3]
	ldr	r2, .L101+48
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-824]
	b	.L3
.L5:
	ldr	r3, .L101+52
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #33
	bne	.L9
	ldr	r3, .L101+52
	ldr	r3, [r3]
	add	r3, r3, #1
	mov	r0, r3
	bl	system
	b	.L3
.L9:
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	bne	.L10
	b	.L3
.L10:
	ldr	r3, .L101+36
	ldr	r3, [r3]
	ldr	r2, [fp, #-824]
	cmp	r2, r3
	bne	.L11
	ldr	r3, .L101+56
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L12
	ldr	r3, .L101+56
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L101+60
	bl	fputs
	b	.L12
.L11:
	ldr	r0, .L101+60
	bl	output
	ldr	r3, .L101+44
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L12:
	ldr	r3, [fp, #-800]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, .L101+64
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r2, r3
	cmp	r3, #0
	beq	.L100
	ldr	r1, .L101+68
	ldr	r0, [fp, #-800]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L14
	ldr	r1, .L101+72
	ldr	r0, [fp, #-800]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L15
.L14:
	bl	phelp
	b	.L3
.L15:
	mov	r2, #2
	ldr	r1, .L101+76
	ldr	r0, [fp, #-800]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L16
	bl	pstatus
	b	.L3
.L16:
	mov	r2, #3
	ldr	r1, .L101+80
	ldr	r0, [fp, #-800]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L101+84
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L101+84
	str	r2, [r3]
	b	.L3
.L17:
	mov	r2, #3
	ldr	r1, .L101+88
	ldr	r0, [fp, #-800]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L18
	ldr	r3, .L101+36
	ldr	r3, [r3]
	ldr	r2, [fp, #-824]
	cmp	r2, r3
	beq	.L19
	b	.L3
.L19:
	ldr	r3, .L101+56
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r0, .L101+92
	bl	puts
	ldr	r3, .L101+56
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L101+56
	mov	r2, #0
	str	r2, [r3]
	b	.L3
.L20:
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L22
	ldr	r1, [fp, #-800]
	ldr	r0, .L101+24
	bl	strcpy
.L22:
	ldr	r1, .L101+96
	ldr	r0, .L101+24
	bl	fopen
	mov	r3, r0
	ldr	r2, .L101+56
	str	r3, [r2]
	ldr	r3, .L101+56
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L23
	ldr	r1, .L101+24
	ldr	r0, .L101+100
	bl	printf
	b	.L3
.L23:
	ldr	r1, .L101+24
	ldr	r0, .L101+104
	bl	printf
	ldr	r3, .L101+56
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L101+108
	bl	fwrite
	b	.L3
.L18:
	ldr	r1, .L101+112
	ldr	r0, [fp, #-800]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L24
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L25
	ldr	r1, .L101+116
	ldr	r0, [fp, #-800]
	bl	fopen
	str	r0, [fp, #-788]
	ldr	r3, [fp, #-788]
	cmp	r3, #0
	bne	.L26
.L25:
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L27
	ldr	r3, [fp, #-800]
	b	.L28
.L27:
	ldr	r3, .L101+68
.L28:
	mov	r1, r3
	ldr	r0, .L101+120
	bl	printf
	b	.L29
.L26:
	ldr	r3, .L101+40
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L101+40
	str	r2, [r1]
	ldr	r1, .L101+48
	ldr	r2, [fp, #-824]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-788]
	str	r3, [fp, #-824]
.L29:
	b	.L3
.L24:
	ldr	r3, [fp, #-800]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, .L101+124
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r2, r3
	cmp	r3, #0
	bne	.L30
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L31
	ldr	r1, .L101+128
	ldr	r0, [fp, #-800]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L32
.L31:
	ldr	r3, .L101+32
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L33
	ldr	r0, .L101+132
	bl	getenv
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L33
	ldr	r1, [fp, #-800]
	ldr	r0, .L101+136
	bl	strcpy
	b	.L35
.L33:
	ldr	r1, .L101+32
	ldr	r0, .L101+136
	bl	strcpy
	b	.L35
.L32:
	ldr	r3, [fp, #-800]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L35
	ldr	r1, [fp, #-800]
	ldr	r0, .L101+136
	bl	strcpy
.L35:
	ldr	r3, .L101+136
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L36
	ldr	r0, .L101+140
	bl	output
	b	.L3
.L36:
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L37
	ldr	r3, [fp, #-800]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #119
	bne	.L37
	mov	r3, #2
	b	.L38
.L37:
	mov	r3, #0
.L38:
	ldr	r2, .L101+144
	str	r3, [r2]
	ldr	r3, .L101+144
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L101+136
	bl	open
	mov	r3, r0
	ldr	r2, .L101+148
	str	r3, [r2]
	ldr	r3, .L101+148
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L39
	sub	r3, fp, #784
	ldr	r2, .L101+136
	ldr	r1, .L101+152
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #784
	mov	r0, r3
	bl	output
	ldr	r3, .L101+136
	mov	r2, #0
	strb	r2, [r3]
	b	.L3
.L39:
	ldr	r3, .L101+148
	ldr	r3, [r3]
	sub	r0, fp, #784
	ldr	r2, .L101+136
	ldr	r1, .L101+156
	bl	sprintf
	sub	r3, fp, #784
	mov	r0, r3
	bl	output
	ldr	r1, .L101+136
	ldr	r0, .L101+32
	bl	strcpy
	b	.L40
.L30:
	ldr	r3, [fp, #-800]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, .L101+160
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r2, r3
	cmp	r3, #0
	bne	.L41
	ldr	r3, .L101+148
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L101+144
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L42
	ldr	r3, .L101+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L101+12
	str	r3, [r2]
	ldr	r3, .L101+8
	mov	r2, #0
	str	r2, [r3]
.L42:
	ldr	r3, .L101+136
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L101+4
	mov	r2, #0
	str	r2, [r3]
	b	.L40
.L41:
	mov	r2, #3
	ldr	r1, .L101+164
	ldr	r0, [fp, #-800]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L43
	mov	r1, #1
	mov	r0, #6
	bl	mtop
	ldr	r3, .L101+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L101+8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L101+4
	mov	r2, #0
	str	r2, [r3]
	b	.L40
.L43:
	ldr	r1, .L101+168
	ldr	r0, [fp, #-800]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L44
	mov	r1, #1
	mov	r0, #5
	bl	mtop
	ldr	r3, .L101+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L101+12
	str	r3, [r2]
	ldr	r3, .L101+8
	mov	r2, #0
	str	r2, [r3]
	b	.L40
.L44:
	ldr	r1, .L101+172
	ldr	r0, [fp, #-800]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L45
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L46
	ldr	r0, [fp, #-800]
	bl	atoi
	mov	r3, r0
	b	.L47
.L46:
	mov	r3, #1
.L47:
	mov	r1, r3
	mov	r0, #1
	bl	mtop
	b	.L40
.L45:
	ldr	r1, .L101+176
	ldr	r0, [fp, #-800]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L48
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L49
	ldr	r0, [fp, #-800]
	bl	atoi
	mov	r3, r0
	b	.L50
.L49:
	mov	r3, #1
.L50:
	mov	r1, r3
	mov	r0, #3
	bl	mtop
	b	.L40
.L48:
	ldr	r1, .L101+180
	ldr	r0, [fp, #-800]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L51
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L52
	ldr	r0, [fp, #-800]
	bl	atoi
	mov	r3, r0
	b	.L53
.L52:
	mov	r3, #1
.L53:
	mov	r1, r3
	mov	r0, #2
	bl	mtop
	b	.L40
.L51:
	ldr	r1, .L101+184
	ldr	r0, [fp, #-800]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L54
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L55
	ldr	r0, [fp, #-800]
	bl	atoi
	mov	r3, r0
	b	.L56
.L55:
	mov	r3, #1
.L56:
	mov	r1, r3
	mov	r0, #4
	bl	mtop
	b	.L40
.L54:
	ldr	r3, [fp, #-800]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, .L101+188
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r2, r3
	cmp	r3, #0
	bne	.L57
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L58
	ldr	r0, [fp, #-800]
	bl	atoi
	mov	r3, r0
	b	.L59
.L58:
	mov	r3, #1
.L59:
	str	r3, [fp, #-796]
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L60
	ldr	r0, [fp, #-800]
	bl	atoi
	mov	r3, r0
	b	.L61
.L60:
	ldr	r3, .L101+16
	ldr	r3, [r3]
.L61:
	ldr	r2, .L101+16
	str	r3, [r2]
	ldr	r3, .L101+16
	ldr	r3, [r3]
	str	r3, [fp, #-828]
	mov	r5, #0
	b	.L62
.L72:
	mov	r4, #0
	b	.L63
.L64:
	ldr	r3, .L101+192
	mov	r2, #0
	strb	r2, [r3, r4]
	add	r4, r4, #1
.L63:
	ldr	r3, [fp, #-828]
	cmp	r4, r3
	blt	.L64
	ldr	r3, .L101+148
	ldr	r3, [r3]
	ldr	r2, [fp, #-828]
	ldr	r1, .L101+192
	mov	r0, r3
	bl	read
	mov	r3, r0
	ldr	r2, .L101+196
	str	r3, [r2]
	bl	pstatus
	ldr	r3, .L101+196
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L65
	ldr	r0, .L101+200
	bl	output
	b	.L66
.L65:
	ldr	r3, .L101+196
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L67
	ldr	r0, .L101+204
	bl	output
	b	.L66
.L67:
	ldr	r3, .L101+196
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L66
	sub	r3, fp, #528
	str	r3, [fp, #-820]
	ldr	r3, [fp, #-820]
	add	r2, r3, #1
	str	r2, [fp, #-820]
	mov	r2, #32
	strb	r2, [r3]
	ldr	r3, [fp, #-820]
	add	r2, r3, #1
	str	r2, [fp, #-820]
	mov	r2, #32
	strb	r2, [r3]
	mov	r4, #0
	ldr	r3, .L101+192
	str	r3, [fp, #-792]
	b	.L68
.L71:
	mov	r2, r4
	ldr	r3, [fp, #-792]
	add	r3, r3, r2
	ldrb	r3, [r3]
	strb	r3, [fp, #-829]
	ldrb	r3, [fp, #-829]	@ zero_extendqisi2
	cmp	r3, #32
	bls	.L69
	ldrb	r3, [fp, #-829]	@ zero_extendqisi2
	cmp	r3, #126
	bhi	.L69
	mov	r2, r4
	ldr	r3, [fp, #-792]
	add	r2, r3, r2
	ldr	r3, [fp, #-820]
	add	r1, r3, #1
	str	r1, [fp, #-820]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L69:
	add	r4, r4, #1
.L68:
	ldr	r3, .L101+196
	ldr	r3, [r3]
	cmp	r4, r3
	bge	.L70
	sub	r3, fp, #528
	ldr	r2, [fp, #-820]
	sub	r3, r2, r3
	cmp	r3, #77
	ble	.L71
.L70:
	ldr	r3, [fp, #-820]
	add	r2, r3, #1
	str	r2, [fp, #-820]
	mov	r2, #10
	strb	r2, [r3]
	ldr	r3, [fp, #-820]
	add	r2, r3, #1
	str	r2, [fp, #-820]
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #528
	mov	r0, r3
	bl	output
.L66:
	add	r5, r5, #1
.L62:
	ldr	r3, [fp, #-796]
	cmp	r5, r3
	blt	.L72
	b	.L3
.L57:
	ldr	r3, [fp, #-800]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, .L101+208
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r2, r3
	cmp	r3, #0
	bne	.L73
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L74
	ldr	r0, [fp, #-800]
	bl	atoi
	mov	r3, r0
	b	.L75
.L74:
	mov	r3, #1
.L75:
	str	r3, [fp, #-796]
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L76
	ldr	r0, [fp, #-800]
	bl	atoi
	mov	r3, r0
	b	.L77
.L76:
	ldr	r3, .L101+20
	ldr	r3, [r3]
.L77:
	ldr	r2, .L101+20
	str	r3, [r2]
	ldr	r3, .L101+20
	ldr	r3, [r3]
	str	r3, [fp, #-828]
	ldr	r3, [fp, #-828]
	cmp	r3, #262144
	ble	.L78
	mov	r3, #262144
	str	r3, [fp, #-828]
.L78:
	mov	r4, #0
	b	.L79
.L80:
	ldr	r3, .L101+192
	mov	r2, #0
	strb	r2, [r3, r4]
	add	r4, r4, #1
.L79:
	ldr	r3, [fp, #-828]
	cmp	r4, r3
	blt	.L80
	mov	r4, #0
	b	.L81
.L82:
	ldr	r3, .L101+12
	ldr	r2, [r3]
	ldr	r3, .L101+8
	ldr	r3, [r3]
	ldr	r1, .L101+212
	ldr	r0, .L101+192
	bl	sprintf
	ldr	r3, .L101+148
	ldr	r3, [r3]
	ldr	r2, [fp, #-828]
	ldr	r1, .L101+192
	mov	r0, r3
	bl	write
	mov	r3, r0
	ldr	r2, .L101+196
	str	r3, [r2]
	ldr	r3, .L101+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L101+8
	str	r3, [r2]
	bl	pstatus
	add	r4, r4, #1
.L81:
	ldr	r3, [fp, #-796]
	cmp	r4, r3
	blt	.L82
	b	.L3
.L73:
	mov	r2, #2
	ldr	r1, .L101+216
	ldr	r0, [fp, #-800]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L83
	bl	gettok
	str	r0, [fp, #-800]
	ldr	r3, [fp, #-800]
	cmp	r3, #0
	beq	.L84
	ldr	r3, [fp, #-800]
	str	r3, [fp, #-816]
	mov	r3, #0
	str	r3, [fp, #-808]
	ldr	r3, [fp, #-808]
	str	r3, [fp, #-812]
	ldr	r3, [fp, #-816]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L85
	ldr	r3, [fp, #-808]
	add	r3, r3, #1
	str	r3, [fp, #-808]
	ldr	r3, [fp, #-816]
	add	r3, r3, #1
	str	r3, [fp, #-816]
	b	.L86
.L85:
	ldr	r3, [fp, #-816]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #43
	bne	.L86
	ldr	r3, [fp, #-812]
	add	r3, r3, #1
	str	r3, [fp, #-812]
	ldr	r3, [fp, #-816]
	add	r3, r3, #1
	str	r3, [fp, #-816]
.L86:
	mov	r3, #0
	str	r3, [fp, #-804]
	b	.L87
.L88:
	ldr	r2, [fp, #-804]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-816]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	add	r3, r2, r3
	str	r3, [fp, #-804]
	ldr	r3, [fp, #-816]
	add	r3, r3, #1
	str	r3, [fp, #-816]
.L87:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-816]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L88
	ldr	r3, [fp, #-816]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #109
	beq	.L89
	cmp	r3, #109
	bgt	.L90
	cmp	r3, #98
	beq	.L91
	cmp	r3, #107
	beq	.L92
	b	.L90
.L91:
	ldr	r3, .L101+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-804]
	mul	r3, r2, r3
	str	r3, [fp, #-804]
	b	.L90
.L92:
	ldr	r3, [fp, #-804]
	lsl	r3, r3, #10
	str	r3, [fp, #-804]
	b	.L90
.L89:
	ldr	r3, [fp, #-804]
	lsl	r3, r3, #20
	str	r3, [fp, #-804]
	nop
.L90:
	ldr	r3, [fp, #-812]
	cmp	r3, #0
	beq	.L93
	ldr	r3, .L101+148
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r1, [fp, #-804]
	mov	r0, r3
	bl	lseek
	mov	r3, r0
	ldr	r2, .L101+196
	str	r3, [r2]
	b	.L94
.L93:
	ldr	r3, [fp, #-808]
	cmp	r3, #0
	beq	.L95
	ldr	r3, .L101+148
	ldr	r0, [r3]
	ldr	r3, [fp, #-804]
	rsb	r3, r3, #0
	mov	r2, #1
	mov	r1, r3
	bl	lseek
	mov	r3, r0
	ldr	r2, .L101+196
	str	r3, [r2]
	b	.L94
.L95:
	ldr	r3, .L101+148
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, [fp, #-804]
	mov	r0, r3
	bl	lseek
	mov	r3, r0
	ldr	r2, .L101+196
	str	r3, [r2]
.L94:
	bl	pstatus
	b	.L40
.L84:
	ldr	r3, .L101+148
	ldr	r3, [r3]
	mov	r2, #1
	mov	r1, #0
	mov	r0, r3
	bl	lseek
	mov	r3, r0
	ldr	r2, .L101+196
	str	r3, [r2]
	bl	pstatus
	b	.L40
.L83:
	ldr	r0, .L101+220
	bl	output
.L40:
	ldr	r3, .L101+84
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L96
	bl	pstatus
.L96:
	ldr	r3, .L101+44
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L3:
	ldr	r3, .L101+40
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L97
	mov	r3, #0
	ldr	r2, .L101
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L99
	bl	__stack_chk_fail
.L99:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L102:
	.align	2
.L101:
	.word	.LC35
	.word	errno
	.word	t_blkno
	.word	t_fileno
	.word	rbufsz
	.word	wbufsz
	.word	logfile
	.word	.LC0
	.word	o_mtdev
	.word	stdin
	.word	sp
	.word	stdout
	.word	stack
	.word	tp
	.word	logfp
	.word	cmdbuf
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	verbose
	.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	mtdev
	.word	.LC18
	.word	t_acmode
	.word	tape
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	iobuf
	.word	status
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.size	main, .-main
	.section	.rodata
	.align	2
.LC36:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mtop
	.syntax unified
	.arm
	.fpu softvfp
	.type	mtop, %function
mtop:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L107
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #16
	asr	r3, r3, #16
	strh	r3, [fp, #-16]	@ movhi
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	ldr	r3, .L107+4
	ldr	r3, [r3]
	sub	r2, fp, #16
	ldr	r1, .L107+8
	mov	r0, r3
	bl	ioctl
	mov	r3, r0
	ldr	r2, .L107+12
	str	r3, [r2]
	ldr	r3, .L107+16
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L106
	ldr	r3, .L107+12
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L106
	bl	pstatus
.L106:
	nop
	ldr	r3, .L107
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L105
	bl	__stack_chk_fail
.L105:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L108:
	.align	2
.L107:
	.word	.LC36
	.word	tape
	.word	1074294017
	.word	status
	.word	verbose
	.size	mtop, .-mtop
	.align	2
	.global	nextcmd
	.syntax unified
	.arm
	.fpu softvfp
	.type	nextcmd, %function
nextcmd:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, .L112
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r2, [fp, #-8]
	mov	r1, #512
	ldr	r0, .L112+4
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L110
	mov	r3, #0
	b	.L111
.L110:
	ldr	r3, .L112+8
	ldr	r2, .L112+4
	str	r2, [r3]
	ldr	r3, .L112+8
	ldr	r3, [r3]
.L111:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L113:
	.align	2
.L112:
	.word	stdout
	.word	cmdbuf
	.word	tp
	.size	nextcmd, .-nextcmd
	.align	2
	.global	gettok
	.syntax unified
	.arm
	.fpu softvfp
	.type	gettok, %function
gettok:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	b	.L115
.L117:
	ldr	r3, .L124
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L124
	str	r3, [r2]
.L115:
	ldr	r3, .L124
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L116
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, .L124
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L117
.L116:
	ldr	r3, .L124
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L118
	ldr	r3, .L124
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #35
	bne	.L119
.L118:
	mov	r3, #0
	b	.L120
.L119:
	ldr	r4, .L124+4
	b	.L121
.L123:
	and	r3, r5, #255
	strb	r3, [r4]
	ldr	r3, .L124
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L124
	str	r3, [r2]
	add	r4, r4, #1
.L121:
	ldr	r3, .L124
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r5, r3
	cmp	r5, #0
	beq	.L122
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	mov	r3, r5
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	beq	.L123
.L122:
	mov	r3, #0
	strb	r3, [r4]
	ldr	r3, .L124+4
.L120:
	mov	r0, r3
	pop	{r4, r5, fp, pc}
.L125:
	.align	2
.L124:
	.word	tp
	.word	tokbuf
	.size	gettok, .-gettok
	.section	.rodata
	.align	2
.LC37:
	.ascii	"(%s) \000"
	.text
	.align	2
	.global	prompt
	.syntax unified
	.arm
	.fpu softvfp
	.type	prompt, %function
prompt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	ldr	r5, .L132
	mov	r4, r5
	b	.L127
.L129:
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L128
	add	r5, r4, #1
.L128:
	add	r4, r4, #1
.L127:
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L129
	ldrb	r3, [r5]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L130
	mov	r2, r5
	ldr	r1, .L132+4
	ldr	r0, .L132+8
	bl	sprintf
	ldr	r3, .L132+8
	b	.L131
.L130:
	ldr	r3, .L132+12
.L131:
	mov	r0, r3
	pop	{r4, r5, fp, pc}
.L133:
	.align	2
.L132:
	.word	mtdev
	.word	.LC37
	.word	prompt.6299
	.word	defp.6300
	.size	prompt, .-prompt
	.section	.rodata
	.align	2
.LC38:
	.ascii	"status %d (%d)\012\000"
	.align	2
.LC39:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	pstatus
	.syntax unified
	.arm
	.fpu softvfp
	.type	pstatus, %function
pstatus:
	@ args = 0, pretend = 0, frame = 520
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #520
	ldr	r3, .L136
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L136+4
	ldr	r2, [r3]
	ldr	r3, .L136+8
	ldr	r3, [r3]
	sub	r0, fp, #520
	ldr	r1, .L136+12
	bl	sprintf
	sub	r3, fp, #520
	mov	r0, r3
	bl	output
	ldr	r3, .L136+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	nop
	ldr	r3, .L136
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L135
	bl	__stack_chk_fail
.L135:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L137:
	.align	2
.L136:
	.word	.LC39
	.word	status
	.word	errno
	.word	.LC38
	.word	stdout
	.size	pstatus, .-pstatus
	.section	.rodata
	.align	2
.LC40:
	.ascii	"# \000"
	.text
	.align	2
	.global	output
	.syntax unified
	.arm
	.fpu softvfp
	.type	output, %function
output:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, .L141
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fputs
	ldr	r3, .L141+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L140
	ldr	r3, .L141+4
	ldr	r3, [r3]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, .L141+8
	bl	fwrite
	ldr	r3, .L141+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fputs
.L140:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L142:
	.align	2
.L141:
	.word	stdout
	.word	logfp
	.word	.LC40
	.size	output, .-output
	.global	helptxt
	.section	.rodata
	.align	2
.LC41:
	.ascii	"Usage: tape [device].   The following commands are "
	.ascii	"provided:\012\000"
	.align	2
.LC42:
	.ascii	"\012\000"
	.align	2
.LC43:
	.ascii	"    open [device [r|w]]    rewind                  "
	.ascii	" fsf [n]\012\000"
	.align	2
.LC44:
	.ascii	"    close                  read [nrec [bufsz]]     "
	.ascii	" fsr [n]\012\000"
	.align	2
.LC45:
	.ascii	"    log [file]             write [nrec [bufsz]]    "
	.ascii	" bsf [n]\012\000"
	.align	2
.LC46:
	.ascii	"    run <file>             weof                    "
	.ascii	" bsr [n]\012\000"
	.align	2
.LC47:
	.ascii	"    verbose                status                  "
	.ascii	" quit\012\000"
	.data
	.align	2
	.type	helptxt, %object
	.size	helptxt, 32
helptxt:
	.word	.LC41
	.word	.LC42
	.word	.LC43
	.word	.LC44
	.word	.LC45
	.word	.LC46
	.word	.LC47
	.word	0
	.text
	.align	2
	.global	phelp
	.syntax unified
	.arm
	.fpu softvfp
	.type	phelp, %function
phelp:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	mov	r4, #0
	b	.L144
.L145:
	ldr	r3, .L146
	ldr	r3, [r3, r4, lsl #2]
	mov	r0, r3
	bl	output
	add	r4, r4, #1
.L144:
	ldr	r3, .L146
	ldr	r3, [r3, r4, lsl #2]
	cmp	r3, #0
	bne	.L145
	nop
	nop
	pop	{r4, r5, fp, pc}
.L147:
	.align	2
.L146:
	.word	helptxt
	.size	phelp, .-phelp
	.local	prompt.6299
	.comm	prompt.6299,32,4
	.data
	.align	2
	.type	defp.6300, %object
	.size	defp.6300, 3
defp.6300:
	.ascii	"% \000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
