	.file	"825380.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"virtual memory exhausted\n"
	.text
	.type	memory_out, @function
memory_out:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, 25
	lea	rsi, .LC0[rip]
	mov	edi, 2
	mov	eax, 0
	call	write@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	memory_out, .-memory_out
	.type	xmalloc, @function
xmalloc:
.LFB1:
	.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, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	mov	eax, 0
	call	malloc@PLT
	mov	rbx, rax
	test	rbx, rbx
	jne	.L3
	mov	eax, 0
	call	memory_out
.L3:
	mov	rax, rbx
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	xmalloc, .-xmalloc
	.type	xrealloc, @function
xrealloc:
.LFB2:
	.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, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	mov	eax, 0
	call	realloc@PLT
	mov	rbx, rax
	test	rbx, rbx
	jne	.L6
	mov	eax, 0
	call	memory_out
.L6:
	mov	rax, rbx
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	xrealloc, .-xrealloc
	.local	term_entry
	.comm	term_entry,8,8
	.type	find_capability, @function
find_capability:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, rdi
	mov	rdx, rsi
	jmp	.L9
.L12:
	movzx	ecx, BYTE PTR [rax]
	cmp	cl, 58
	jne	.L10
	lea	rcx, 1[rax]
	movzx	esi, BYTE PTR [rcx]
	movzx	ecx, BYTE PTR [rdx]
	cmp	sil, cl
	jne	.L10
	lea	rcx, 2[rax]
	movzx	esi, BYTE PTR [rcx]
	lea	rcx, 1[rdx]
	movzx	ecx, BYTE PTR [rcx]
	cmp	sil, cl
	jne	.L10
	add	rax, 4
	jmp	.L11
.L10:
	add	rax, 1
.L9:
	movzx	ecx, BYTE PTR [rax]
	test	cl, cl
	jne	.L12
	mov	eax, 0
.L11:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	find_capability, .-find_capability
	.globl	tgetnum
	.type	tgetnum, @function
tgetnum:
.LFB4:
	.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, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR term_entry[rip]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	find_capability
	mov	rbx, rax
	test	rbx, rbx
	je	.L14
	lea	rax, -1[rbx]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 35
	je	.L15
.L14:
	mov	eax, -1
	jmp	.L16
.L15:
	mov	rdi, rbx
	mov	eax, 0
	call	atoi@PLT
.L16:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	tgetnum, .-tgetnum
	.globl	tgetflag
	.type	tgetflag, @function
tgetflag:
.LFB5:
	.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	QWORD PTR -16[rbp], rdi
	mov	rax, QWORD PTR term_entry[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	find_capability
	mov	rbx, rax
	test	rbx, rbx
	je	.L18
	lea	rax, -1[rbx]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 58
	jne	.L18
	mov	eax, 1
	jmp	.L20
.L18:
	mov	eax, 0
.L20:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	tgetflag, .-tgetflag
	.globl	tgetstr
	.type	tgetstr, @function
tgetstr:
.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, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR term_entry[rip]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	find_capability
	mov	rbx, rax
	test	rbx, rbx
	je	.L22
	lea	rax, -1[rbx]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 61
	je	.L23
	lea	rax, -1[rbx]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 126
	je	.L23
.L22:
	mov	eax, 0
	jmp	.L24
.L23:
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	mov	rdi, rbx
	mov	eax, 0
	call	tgetst1
.L24:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	tgetstr, .-tgetstr
	.data
	.align 32
	.type	esctab, @object
	.size	esctab, 33
esctab:
	.string	" \007\b  \033\f       \n   \r \t \013         "
	.text
	.type	tgetst1, @function
tgetst1:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 40
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	cmp	QWORD PTR -72[rbp], 0
	jne	.L26
	mov	eax, 0
	jmp	.L27
.L26:
	cmp	QWORD PTR -80[rbp], 0
	jne	.L28
	mov	r12, QWORD PTR -72[rbp]
	nop
.L30:
	mov	rax, r12
	lea	r12, 1[rax]
	movzx	eax, BYTE PTR [rax]
	movsx	ebx, al
	test	ebx, ebx
	je	.L29
	cmp	ebx, 58
	je	.L29
	cmp	ebx, 10
	jne	.L30
.L29:
	mov	rax, r12
	sub	rax, QWORD PTR -72[rbp]
	add	rax, 1
	mov	rdi, rax
	mov	eax, 0
	call	xmalloc
	mov	QWORD PTR -56[rbp], rax
	jmp	.L31
.L28:
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -56[rbp], rax
.L31:
	mov	r12, QWORD PTR -72[rbp]
	mov	r14, QWORD PTR -56[rbp]
	jmp	.L32
.L41:
	cmp	ebx, 94
	jne	.L33
	mov	rax, r12
	lea	r12, 1[rax]
	movzx	eax, BYTE PTR [rax]
	movsx	ebx, al
	cmp	ebx, 63
	jne	.L34
	mov	ebx, 127
	jmp	.L35
.L34:
	and	ebx, 31
	jmp	.L35
.L33:
	cmp	ebx, 92
	jne	.L35
	mov	rax, r12
	lea	r12, 1[rax]
	movzx	eax, BYTE PTR [rax]
	movsx	ebx, al
	cmp	ebx, 47
	jle	.L36
	cmp	ebx, 55
	jg	.L36
	sub	ebx, 48
	mov	r15d, 0
	jmp	.L37
.L39:
	sal	ebx, 3
	lea	eax, -48[r13]
	add	ebx, eax
	add	r12, 1
.L37:
	add	r15d, 1
	cmp	r15d, 2
	jg	.L43
	movzx	eax, BYTE PTR [r12]
	movsx	r13d, al
	cmp	r13d, 47
	jle	.L43
	cmp	r13d, 55
	jle	.L39
	jmp	.L43
.L36:
	cmp	ebx, 63
	jle	.L35
	cmp	ebx, 127
	jg	.L35
	mov	eax, ebx
	and	eax, -33
	sub	eax, 64
	cdqe
	lea	rdx, esctab[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	r13d, al
	cmp	r13d, 32
	je	.L35
	mov	ebx, r13d
	jmp	.L35
.L43:
	nop
.L35:
	mov	rax, r14
	lea	r14, 1[rax]
	mov	edx, ebx
	mov	BYTE PTR [rax], dl
.L32:
	mov	rax, r12
	lea	r12, 1[rax]
	movzx	eax, BYTE PTR [rax]
	movsx	ebx, al
	test	ebx, ebx
	je	.L40
	cmp	ebx, 58
	je	.L40
	cmp	ebx, 10
	jne	.L41
.L40:
	mov	BYTE PTR [r14], 0
	cmp	QWORD PTR -80[rbp], 0
	je	.L42
	lea	rdx, 1[r14]
	mov	rax, QWORD PTR -80[rbp]
	mov	QWORD PTR [rax], rdx
.L42:
	mov	rax, QWORD PTR -56[rbp]
.L27:
	add	rsp, 40
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	tgetst1, .-tgetst1
	.globl	ospeed
	.bss
	.align 2
	.type	ospeed, @object
	.size	ospeed, 2
ospeed:
	.zero	2
	.globl	tputs_baud_rate
	.align 4
	.type	tputs_baud_rate, @object
	.size	tputs_baud_rate, 4
tputs_baud_rate:
	.zero	4
	.globl	PC
	.type	PC, @object
	.size	PC, 1
PC:
	.zero	1
	.data
	.align 32
	.type	speeds, @object
	.size	speeds, 76
speeds:
	.long	0
	.long	50
	.long	75
	.long	110
	.long	135
	.long	150
	.long	-2
	.long	-3
	.long	-6
	.long	-12
	.long	-18
	.long	-24
	.long	-48
	.long	-96
	.long	-192
	.long	-288
	.long	-384
	.long	-576
	.long	-1152
	.text
	.globl	tputs
	.type	tputs, @function
tputs:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 16
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	r12, rdi
	mov	DWORD PTR -36[rbp], esi
	mov	r14, rdx
	mov	ebx, 0
	movzx	eax, WORD PTR ospeed[rip]
	test	ax, ax
	jne	.L45
	mov	r13d, DWORD PTR tputs_baud_rate[rip]
	jmp	.L46
.L45:
	movzx	eax, WORD PTR ospeed[rip]
	test	ax, ax
	jle	.L47
	movzx	eax, WORD PTR ospeed[rip]
	cmp	ax, 18
	ja	.L47
	movzx	eax, WORD PTR ospeed[rip]
	cwde
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, speeds[rip]
	mov	r13d, DWORD PTR [rdx+rax]
	jmp	.L46
.L47:
	mov	r13d, 0
.L46:
	test	r12, r12
	je	.L61
	jmp	.L50
.L52:
	mov	rax, r12
	lea	r12, 1[rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	add	ebx, eax
	mov	eax, ebx
	sal	eax, 2
	add	eax, ebx
	add	eax, eax
	mov	ebx, eax
.L50:
	movzx	eax, BYTE PTR [r12]
	cmp	al, 47
	jle	.L51
	movzx	eax, BYTE PTR [r12]
	cmp	al, 57
	jle	.L52
.L51:
	movzx	eax, BYTE PTR [r12]
	cmp	al, 46
	jne	.L53
	add	r12, 1
	mov	rax, r12
	lea	r12, 1[rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	add	ebx, eax
.L53:
	movzx	eax, BYTE PTR [r12]
	cmp	al, 42
	jne	.L55
	add	r12, 1
	imul	ebx, DWORD PTR -36[rbp]
	jmp	.L55
.L56:
	mov	rax, r12
	lea	r12, 1[rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	mov	eax, 0
	call	r14
.L55:
	movzx	eax, BYTE PTR [r12]
	test	al, al
	jne	.L56
	imul	ebx, r13d
	add	ebx, 500
	movsx	rax, ebx
	imul	rax, rax, 274877907
	shr	rax, 32
	sar	eax, 6
	mov	edx, ebx
	sar	edx, 31
	sub	eax, edx
	mov	ebx, eax
	test	r13d, r13d
	jns	.L57
	neg	ebx
	jmp	.L59
.L57:
	add	ebx, 50
	movsx	rax, ebx
	imul	rax, rax, 1374389535
	shr	rax, 32
	sar	eax, 5
	mov	edx, ebx
	sar	edx, 31
	sub	eax, edx
	mov	ebx, eax
	jmp	.L59
.L60:
	movzx	eax, BYTE PTR PC[rip]
	movsx	eax, al
	mov	edi, eax
	mov	eax, 0
	call	r14
.L59:
	mov	eax, ebx
	lea	ebx, -1[rax]
	test	eax, eax
	jg	.L60
	jmp	.L44
.L61:
	nop
.L44:
	add	rsp, 16
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	tputs, .-tputs
	.section	.rodata
.LC1:
	.string	"TERMCAP"
.LC2:
	.string	"TERM"
.LC3:
	.string	"tc"
.LC4:
	.string	"/etc/termcap"
	.text
	.globl	tgetent
	.type	tgetent, @function
tgetent:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 112
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	QWORD PTR -136[rbp], rdi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -120[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	cmp	QWORD PTR -136[rbp], 0
	je	.L63
	mov	rax, QWORD PTR -136[rbp]
	mov	QWORD PTR term_entry[rip], rax
.L63:
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	getenv@PLT
	mov	rbx, rax
	test	rbx, rbx
	je	.L64
	movzx	eax, BYTE PTR [rbx]
	test	al, al
	jne	.L64
	mov	ebx, 0
.L64:
	test	rbx, rbx
	je	.L65
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 47
	jne	.L65
	mov	eax, 1
	jmp	.L66
.L65:
	mov	eax, 0
.L66:
	mov	DWORD PTR -116[rbp], eax
	test	rbx, rbx
	je	.L67
	cmp	DWORD PTR -116[rbp], 0
	jne	.L67
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	getenv@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -144[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L67
	lea	rsi, .LC3[rip]
	mov	rdi, rbx
	mov	eax, 0
	call	find_capability
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	tgetst1
	mov	QWORD PTR -88[rbp], rax
	cmp	QWORD PTR -88[rbp], 0
	jne	.L68
	cmp	QWORD PTR -136[rbp], 0
	jne	.L69
	mov	QWORD PTR -136[rbp], rbx
	jmp	.L71
.L69:
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rbx
	mov	rdi, rax
	call	strcpy@PLT
	jmp	.L71
.L68:
	mov	QWORD PTR -96[rbp], rbx
	mov	ebx, 0
.L67:
	test	rbx, rbx
	je	.L72
	cmp	DWORD PTR -116[rbp], 0
	jne	.L73
.L72:
	lea	rbx, .LC4[rip]
.L73:
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rbx
	mov	eax, 0
	call	open@PLT
	mov	r13d, eax
	test	r13d, r13d
	jns	.L74
	mov	eax, -1
	jmp	.L91
.L74:
	mov	DWORD PTR -72[rbp], 2048
	mov	eax, DWORD PTR -72[rbp]
	add	eax, 1
	mov	edi, eax
	mov	eax, 0
	call	xmalloc
	mov	QWORD PTR -80[rbp], rax
	cmp	QWORD PTR -88[rbp], 0
	je	.L76
	mov	rax, QWORD PTR -88[rbp]
	jmp	.L77
.L76:
	mov	rax, QWORD PTR -144[rbp]
.L77:
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -136[rbp], 0
	jne	.L78
	cmp	QWORD PTR -88[rbp], 0
	je	.L79
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	eax, 1
	jmp	.L80
.L79:
	mov	eax, DWORD PTR -72[rbp]
.L80:
	mov	DWORD PTR -120[rbp], eax
	mov	eax, DWORD PTR -120[rbp]
	mov	edi, eax
	mov	eax, 0
	call	xmalloc
	mov	QWORD PTR -136[rbp], rax
.L78:
	mov	r12, QWORD PTR -136[rbp]
	mov	QWORD PTR -112[rbp], r12
	cmp	QWORD PTR -88[rbp], 0
	je	.L82
	mov	rdx, QWORD PTR -96[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	r12, rax
	jmp	.L82
.L90:
	lea	rdx, -80[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, r13d
	mov	rdi, rax
	mov	eax, 0
	call	scan_file
	test	eax, eax
	jne	.L83
	mov	edi, r13d
	mov	eax, 0
	call	close@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	free@PLT
	cmp	DWORD PTR -120[rbp], 0
	je	.L84
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	free@PLT
.L84:
	mov	eax, 0
	jmp	.L91
.L83:
	mov	rax, QWORD PTR -104[rbp]
	cmp	rax, QWORD PTR -144[rbp]
	je	.L85
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	free@PLT
.L85:
	cmp	DWORD PTR -120[rbp], 0
	je	.L86
	mov	rax, r12
	sub	rax, QWORD PTR -136[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -72[rbp]
	add	eax, edx
	mov	DWORD PTR -120[rbp], eax
	mov	edx, DWORD PTR -120[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	esi, edx
	mov	rdi, rax
	mov	eax, 0
	call	xrealloc
	mov	rbx, rax
	mov	rax, rbx
	sub	rax, QWORD PTR -136[rbp]
	add	r12, rax
	mov	rax, rbx
	sub	rax, QWORD PTR -136[rbp]
	add	QWORD PTR -112[rbp], rax
	mov	QWORD PTR -136[rbp], rbx
.L86:
	mov	rbx, QWORD PTR -64[rbp]
	jmp	.L87
.L89:
	cmp	r14d, 92
	jne	.L87
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 10
	jne	.L87
	sub	r12, 1
	add	rbx, 1
.L87:
	mov	rax, rbx
	lea	rbx, 1[rax]
	movzx	eax, BYTE PTR [rax]
	movsx	r14d, al
	mov	rax, r12
	lea	r12, 1[rax]
	mov	edx, r14d
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L88
	cmp	r14d, 10
	jne	.L89
.L88:
	mov	BYTE PTR [r12], 0
	mov	rax, QWORD PTR -112[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	find_capability
	mov	QWORD PTR -112[rbp], rax
	mov	rax, QWORD PTR -112[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	tgetst1
	mov	QWORD PTR -104[rbp], rax
.L82:
	cmp	QWORD PTR -104[rbp], 0
	jne	.L90
	mov	edi, r13d
	mov	eax, 0
	call	close@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	free@PLT
	cmp	DWORD PTR -120[rbp], 0
	je	.L93
	mov	rax, r12
	sub	rax, QWORD PTR -136[rbp]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	xrealloc
	mov	QWORD PTR -136[rbp], rax
	jmp	.L71
.L93:
	nop
.L71:
	mov	rax, QWORD PTR -136[rbp]
	mov	QWORD PTR term_entry[rip], rax
	mov	eax, 1
.L91:
	mov	rcx, QWORD PTR -40[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L92
	call	__stack_chk_fail@PLT
.L92:
	add	rsp, 112
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	tgetent, .-tgetent
	.type	scan_file, @function
scan_file:
.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
	sub	rsp, 16
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	rbx, rdx
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR 16[rbx], rax
	mov	DWORD PTR 28[rbx], 0
	mov	DWORD PTR 24[rbx], 0
	mov	rax, QWORD PTR 16[rbx]
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	lseek@PLT
	jmp	.L95
.L100:
	mov	r12d, 0
.L97:
	mov	eax, DWORD PTR -28[rbp]
	mov	rdx, r12
	mov	rsi, rbx
	mov	edi, eax
	mov	eax, 0
	call	gobble_line
	mov	r12, rax
	mov	eax, DWORD PTR 24[rbx]
	test	eax, eax
	jne	.L96
	lea	rax, -2[r12]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 92
	je	.L97
.L96:
	mov	rax, QWORD PTR 16[rbx]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 35
	je	.L98
	mov	rax, QWORD PTR 16[rbx]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	name_match
	test	eax, eax
	je	.L98
	mov	eax, 1
	jmp	.L99
.L98:
	mov	QWORD PTR 16[rbx], r12
.L95:
	mov	eax, DWORD PTR 24[rbx]
	test	eax, eax
	je	.L100
	mov	eax, 0
.L99:
	add	rsp, 16
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	scan_file, .-scan_file
	.type	name_match, @function
name_match:
.LFB11:
	.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, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	compare_contin
	test	eax, eax
	jne	.L102
	mov	eax, 1
	jmp	.L103
.L102:
	mov	rbx, QWORD PTR -24[rbp]
	jmp	.L104
.L107:
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 124
	jne	.L105
	lea	rax, 1[rbx]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	compare_contin
	test	eax, eax
	jne	.L105
	mov	eax, 1
	jmp	.L103
.L105:
	add	rbx, 1
.L104:
	movzx	eax, BYTE PTR [rbx]
	test	al, al
	je	.L106
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 10
	je	.L106
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 58
	jne	.L107
.L106:
	mov	eax, 0
.L103:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	name_match, .-name_match
	.type	compare_contin, @function
compare_contin:
.LFB12:
	.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
	mov	rax, rdi
	mov	rdx, rsi
.L118:
	mov	rcx, rax
	lea	rax, 1[rcx]
	movzx	ecx, BYTE PTR [rcx]
	movsx	ebx, cl
	mov	rcx, rdx
	lea	rdx, 1[rcx]
	movzx	ecx, BYTE PTR [rcx]
	movsx	r12d, cl
	jmp	.L109
.L112:
	add	rax, 1
	nop
.L110:
	mov	rcx, rax
	lea	rax, 1[rcx]
	movzx	ecx, BYTE PTR [rcx]
	movsx	ebx, cl
	cmp	ebx, 32
	je	.L110
	cmp	ebx, 9
	je	.L110
.L109:
	cmp	ebx, 92
	jne	.L111
	movzx	ecx, BYTE PTR [rax]
	cmp	cl, 10
	je	.L112
.L111:
	test	r12d, r12d
	jne	.L113
	cmp	ebx, 124
	je	.L114
	cmp	ebx, 58
	jne	.L115
.L114:
	mov	eax, 0
	jmp	.L116
.L115:
	mov	eax, 1
	jmp	.L116
.L113:
	cmp	ebx, r12d
	je	.L118
	mov	eax, 1
.L116:
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	compare_contin, .-compare_contin
	.type	gobble_line, @function
gobble_line:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	push	rbx
	sub	rsp, 24
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	DWORD PTR -36[rbp], edi
	mov	rbx, rsi
	mov	QWORD PTR -48[rbp], rdx
	mov	r12, QWORD PTR [rbx]
	cmp	QWORD PTR -48[rbp], 0
	jne	.L131
	mov	rax, QWORD PTR 16[rbx]
	mov	QWORD PTR -48[rbp], rax
.L131:
	mov	r13, QWORD PTR -48[rbp]
	jmp	.L121
.L123:
	add	r13, 1
.L121:
	movzx	eax, BYTE PTR 0[r13]
	test	al, al
	je	.L122
	movzx	eax, BYTE PTR 0[r13]
	cmp	al, 10
	jne	.L123
.L122:
	movzx	eax, BYTE PTR 0[r13]
	test	al, al
	jne	.L133
	mov	eax, DWORD PTR 24[rbx]
	test	eax, eax
	je	.L126
	mov	eax, DWORD PTR 28[rbx]
	cdqe
	add	rax, r12
	jmp	.L127
.L126:
	mov	rax, QWORD PTR 16[rbx]
	cmp	r12, rax
	jne	.L128
	mov	edx, DWORD PTR 28[rbx]
	mov	eax, DWORD PTR 8[rbx]
	cmp	edx, eax
	jne	.L129
	mov	eax, DWORD PTR 8[rbx]
	add	eax, eax
	mov	DWORD PTR 8[rbx], eax
	mov	eax, DWORD PTR 8[rbx]
	add	eax, 1
	mov	esi, eax
	mov	rdi, r12
	mov	eax, 0
	call	xrealloc
	mov	r13, rax
	mov	rax, QWORD PTR 16[rbx]
	sub	rax, r12
	add	rax, r13
	mov	QWORD PTR 16[rbx], rax
	mov	rax, QWORD PTR -48[rbp]
	sub	rax, r12
	add	rax, r13
	mov	QWORD PTR -48[rbp], rax
	mov	r12, r13
	mov	QWORD PTR [rbx], r12
	jmp	.L129
.L128:
	mov	rax, QWORD PTR 16[rbx]
	sub	rax, r12
	neg	rax
	add	QWORD PTR -48[rbp], rax
	mov	eax, DWORD PTR 28[rbx]
	mov	edx, eax
	mov	rax, QWORD PTR 16[rbx]
	sub	rax, r12
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR 28[rbx], eax
	mov	eax, DWORD PTR 28[rbx]
	movsx	rdx, eax
	mov	rax, QWORD PTR 16[rbx]
	mov	rsi, rax
	mov	rdi, r12
	call	memmove@PLT
	mov	QWORD PTR 16[rbx], r12
.L129:
	mov	eax, DWORD PTR 8[rbx]
	mov	ecx, DWORD PTR 28[rbx]
	sub	eax, ecx
	mov	edx, eax
	mov	eax, DWORD PTR 28[rbx]
	cdqe
	lea	rcx, [r12+rax]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	r13d, eax
	test	r13d, r13d
	jne	.L130
	mov	DWORD PTR 24[rbx], 1
.L130:
	mov	eax, DWORD PTR 28[rbx]
	add	eax, r13d
	mov	DWORD PTR 28[rbx], eax
	mov	eax, DWORD PTR 28[rbx]
	cdqe
	add	rax, r12
	mov	BYTE PTR [rax], 0
	jmp	.L131
.L133:
	nop
	lea	rax, 1[r13]
.L127:
	add	rsp, 24
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	gobble_line, .-gobble_line
	.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	"825380.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"virtual memory exhausted\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	memory_out, %function
memory_out:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r2, #25
	ldr	r1, .L2
	mov	r0, #2
	bl	write
	mov	r0, #1
	bl	exit
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	memory_out, .-memory_out
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xmalloc, %function
xmalloc:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	malloc
	mov	r4, r0
	cmp	r4, #0
	bne	.L5
	bl	memory_out
.L5:
	mov	r3, r4
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	xmalloc, .-xmalloc
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xrealloc, %function
xrealloc:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	realloc
	mov	r4, r0
	cmp	r4, #0
	bne	.L8
	bl	memory_out
.L8:
	mov	r3, r4
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	xrealloc, .-xrealloc
	.local	term_entry
	.comm	term_entry,4,4
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_capability, %function
find_capability:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	mov	r3, r0
	mov	r2, r1
	b	.L11
.L14:
	ldrb	r1, [r3]	@ zero_extendqisi2
	cmp	r1, #58
	bne	.L12
	add	r1, r3, #1
	ldrb	r0, [r1]	@ zero_extendqisi2
	ldrb	r1, [r2]	@ zero_extendqisi2
	cmp	r0, r1
	bne	.L12
	add	r1, r3, #2
	ldrb	r0, [r1]	@ zero_extendqisi2
	add	r1, r2, #1
	ldrb	r1, [r1]	@ zero_extendqisi2
	cmp	r0, r1
	bne	.L12
	add	r3, r3, #4
	b	.L13
.L12:
	add	r3, r3, #1
.L11:
	ldrb	r1, [r3]	@ zero_extendqisi2
	cmp	r1, #0
	bne	.L14
	mov	r3, #0
.L13:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	find_capability, .-find_capability
	.align	2
	.global	tgetnum
	.syntax unified
	.arm
	.fpu softvfp
	.type	tgetnum, %function
tgetnum:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, .L19
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	find_capability
	mov	r4, r0
	cmp	r4, #0
	beq	.L16
	sub	r3, r4, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #35
	beq	.L17
.L16:
	mvn	r3, #0
	b	.L18
.L17:
	mov	r0, r4
	bl	atoi
	mov	r3, r0
.L18:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L20:
	.align	2
.L19:
	.word	term_entry
	.size	tgetnum, .-tgetnum
	.align	2
	.global	tgetflag
	.syntax unified
	.arm
	.fpu softvfp
	.type	tgetflag, %function
tgetflag:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, .L25
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	find_capability
	mov	r4, r0
	cmp	r4, #0
	beq	.L22
	sub	r3, r4, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #58
	bne	.L22
	mov	r3, #1
	b	.L24
.L22:
	mov	r3, #0
.L24:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L26:
	.align	2
.L25:
	.word	term_entry
	.size	tgetflag, .-tgetflag
	.align	2
	.global	tgetstr
	.syntax unified
	.arm
	.fpu softvfp
	.type	tgetstr, %function
tgetstr:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, .L31
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	find_capability
	mov	r4, r0
	cmp	r4, #0
	beq	.L28
	sub	r3, r4, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #61
	beq	.L29
	sub	r3, r4, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #126
	beq	.L29
.L28:
	mov	r3, #0
	b	.L30
.L29:
	ldr	r1, [fp, #-20]
	mov	r0, r4
	bl	tgetst1
	mov	r3, r0
.L30:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L32:
	.align	2
.L31:
	.word	term_entry
	.size	tgetstr, .-tgetstr
	.data
	.align	2
	.type	esctab, %object
	.size	esctab, 33
esctab:
	.ascii	" \007\010  \033\014       \012   \015 \011 \013    "
	.ascii	"     \000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tgetst1, %function
tgetst1:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #20
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L34
	mov	r3, #0
	b	.L35
.L34:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L36
	ldr	r5, [fp, #-40]
	nop
.L38:
	mov	r3, r5
	add	r5, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r3
	cmp	r4, #0
	beq	.L37
	cmp	r4, #58
	beq	.L37
	cmp	r4, #10
	bne	.L38
.L37:
	ldr	r3, [fp, #-40]
	sub	r3, r5, r3
	add	r3, r3, #1
	mov	r0, r3
	bl	xmalloc
	str	r0, [fp, #-32]
	b	.L39
.L36:
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	str	r3, [fp, #-32]
.L39:
	ldr	r5, [fp, #-40]
	ldr	r7, [fp, #-32]
	b	.L40
.L49:
	cmp	r4, #94
	bne	.L41
	mov	r3, r5
	add	r5, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r3
	cmp	r4, #63
	bne	.L42
	mov	r4, #127
	b	.L43
.L42:
	and	r4, r4, #31
	b	.L43
.L41:
	cmp	r4, #92
	bne	.L43
	mov	r3, r5
	add	r5, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r3
	cmp	r4, #47
	ble	.L44
	cmp	r4, #55
	bgt	.L44
	sub	r4, r4, #48
	mov	r8, #0
	b	.L45
.L47:
	lsl	r4, r4, #3
	sub	r3, r6, #48
	add	r4, r4, r3
	add	r5, r5, #1
.L45:
	add	r8, r8, #1
	cmp	r8, #2
	bgt	.L51
	ldrb	r3, [r5]	@ zero_extendqisi2
	mov	r6, r3
	cmp	r6, #47
	ble	.L51
	cmp	r6, #55
	ble	.L47
	b	.L51
.L44:
	cmp	r4, #63
	ble	.L43
	cmp	r4, #127
	bgt	.L43
	bic	r3, r4, #32
	sub	r3, r3, #64
	ldr	r2, .L52
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r6, r3
	cmp	r6, #32
	beq	.L43
	mov	r4, r6
	b	.L43
.L51:
	nop
.L43:
	mov	r3, r7
	add	r7, r3, #1
	and	r2, r4, #255
	strb	r2, [r3]
.L40:
	mov	r3, r5
	add	r5, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r3
	cmp	r4, #0
	beq	.L48
	cmp	r4, #58
	beq	.L48
	cmp	r4, #10
	bne	.L49
.L48:
	mov	r3, #0
	strb	r3, [r7]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L50
	add	r2, r7, #1
	ldr	r3, [fp, #-44]
	str	r2, [r3]
.L50:
	ldr	r3, [fp, #-32]
.L35:
	mov	r0, r3
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L53:
	.align	2
.L52:
	.word	esctab
	.size	tgetst1, .-tgetst1
	.comm	ospeed,2,2
	.comm	tputs_baud_rate,4,4
	.comm	PC,1,1
	.data
	.align	2
	.type	speeds, %object
	.size	speeds, 76
speeds:
	.word	0
	.word	50
	.word	75
	.word	110
	.word	135
	.word	150
	.word	-2
	.word	-3
	.word	-6
	.word	-12
	.word	-18
	.word	-24
	.word	-48
	.word	-96
	.word	-192
	.word	-288
	.word	-384
	.word	-576
	.word	-1152
	.text
	.align	2
	.global	tputs
	.syntax unified
	.arm
	.fpu softvfp
	.type	tputs, %function
tputs:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #8
	mov	r5, r0
	str	r1, [fp, #-24]
	mov	r7, r2
	mov	r4, #0
	ldr	r3, .L72
	ldrsh	r3, [r3]
	cmp	r3, #0
	bne	.L55
	ldr	r3, .L72+4
	ldr	r6, [r3]
	b	.L56
.L55:
	ldr	r3, .L72
	ldrsh	r3, [r3]
	cmp	r3, #0
	ble	.L57
	ldr	r3, .L72
	ldrsh	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	cmp	r3, #18
	bhi	.L57
	ldr	r3, .L72
	ldrsh	r3, [r3]
	mov	r2, r3
	ldr	r3, .L72+8
	ldr	r6, [r3, r2, lsl #2]
	b	.L56
.L57:
	mov	r6, #0
.L56:
	cmp	r5, #0
	beq	.L71
	b	.L60
.L62:
	mov	r3, r5
	add	r5, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	add	r4, r4, r3
	mov	r3, r4
	lsl	r3, r3, #2
	add	r3, r3, r4
	lsl	r3, r3, #1
	mov	r4, r3
.L60:
	ldrb	r3, [r5]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L61
	ldrb	r3, [r5]	@ zero_extendqisi2
	cmp	r3, #57
	bls	.L62
.L61:
	ldrb	r3, [r5]	@ zero_extendqisi2
	cmp	r3, #46
	bne	.L63
	add	r5, r5, #1
	mov	r3, r5
	add	r5, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	add	r4, r4, r3
.L63:
	ldrb	r3, [r5]	@ zero_extendqisi2
	cmp	r3, #42
	bne	.L65
	add	r5, r5, #1
	ldr	r3, [fp, #-24]
	mul	r4, r3, r4
	b	.L65
.L66:
	mov	r3, r5
	add	r5, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	blx	r7
.L65:
	ldrb	r3, [r5]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L66
	mul	r4, r6, r4
	add	r4, r4, #500
	ldr	r3, .L72+12
	smull	r2, r3, r4, r3
	asr	r2, r3, #6
	asr	r3, r4, #31
	sub	r3, r2, r3
	mov	r4, r3
	cmp	r6, #0
	bge	.L67
	rsb	r4, r4, #0
	b	.L69
.L67:
	add	r4, r4, #50
	ldr	r3, .L72+16
	smull	r2, r3, r4, r3
	asr	r2, r3, #5
	asr	r3, r4, #31
	sub	r3, r2, r3
	mov	r4, r3
	b	.L69
.L70:
	ldr	r3, .L72+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	blx	r7
.L69:
	mov	r3, r4
	sub	r4, r3, #1
	cmp	r3, #0
	bgt	.L70
	b	.L54
.L71:
	nop
.L54:
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L73:
	.align	2
.L72:
	.word	ospeed
	.word	tputs_baud_rate
	.word	speeds
	.word	274877907
	.word	1374389535
	.word	PC
	.size	tputs, .-tputs
	.section	.rodata
	.align	2
.LC1:
	.ascii	"TERMCAP\000"
	.align	2
.LC2:
	.ascii	"TERM\000"
	.align	2
.LC3:
	.ascii	"tc\000"
	.align	2
.LC4:
	.ascii	"/etc/termcap\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	tgetent
	.syntax unified
	.arm
	.fpu softvfp
	.type	tgetent, %function
tgetent:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #56
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L106
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	beq	.L75
	ldr	r2, .L106+4
	ldr	r3, [fp, #-72]
	str	r3, [r2]
.L75:
	ldr	r0, .L106+8
	bl	getenv
	mov	r4, r0
	cmp	r4, #0
	beq	.L76
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L76
	mov	r4, #0
.L76:
	cmp	r4, #0
	beq	.L77
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L77
	mov	r3, #1
	b	.L78
.L77:
	mov	r3, #0
.L78:
	str	r3, [fp, #-48]
	cmp	r4, #0
	beq	.L79
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L79
	ldr	r0, .L106+12
	bl	getenv
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L79
	ldr	r1, .L106+16
	mov	r0, r4
	bl	find_capability
	mov	r3, r0
	mov	r1, #0
	mov	r0, r3
	bl	tgetst1
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bne	.L80
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L81
	str	r4, [fp, #-72]
	b	.L83
.L81:
	mov	r1, r4
	ldr	r0, [fp, #-72]
	bl	strcpy
	b	.L83
.L80:
	str	r4, [fp, #-56]
	mov	r4, #0
.L79:
	cmp	r4, #0
	beq	.L84
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L85
.L84:
	ldr	r4, .L106+20
.L85:
	mov	r2, #0
	mov	r1, #0
	mov	r0, r4
	bl	open
	mov	r6, r0
	cmp	r6, #0
	bge	.L86
	mvn	r3, #0
	b	.L103
.L86:
	mov	r3, #2048
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	mov	r0, r3
	bl	xmalloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L88
	ldr	r3, [fp, #-52]
	b	.L89
.L88:
	ldr	r3, [fp, #-76]
.L89:
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L90
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L91
	ldr	r0, [fp, #-56]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	b	.L92
.L91:
	ldr	r3, [fp, #-40]
.L92:
	str	r3, [fp, #-60]
	ldr	r0, [fp, #-60]
	bl	xmalloc
	str	r0, [fp, #-72]
.L90:
	ldr	r5, [fp, #-72]
	str	r5, [fp, #-68]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L94
	ldr	r1, [fp, #-56]
	ldr	r0, [fp, #-72]
	bl	strcpy
	ldr	r0, [fp, #-56]
	bl	strlen
	mov	r3, r0
	add	r5, r5, r3
	b	.L94
.L102:
	sub	r3, fp, #44
	mov	r2, r3
	mov	r1, r6
	ldr	r0, [fp, #-64]
	bl	scan_file
	mov	r3, r0
	cmp	r3, #0
	bne	.L95
	mov	r0, r6
	bl	close
	ldr	r3, [fp, #-44]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	beq	.L96
	ldr	r0, [fp, #-72]
	bl	free
.L96:
	mov	r3, #0
	b	.L103
.L95:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-76]
	cmp	r2, r3
	beq	.L97
	ldr	r0, [fp, #-64]
	bl	free
.L97:
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	beq	.L98
	ldr	r3, [fp, #-72]
	sub	r2, r5, r3
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	str	r3, [fp, #-60]
	ldr	r1, [fp, #-60]
	ldr	r0, [fp, #-72]
	bl	xrealloc
	mov	r4, r0
	ldr	r3, [fp, #-72]
	sub	r3, r4, r3
	add	r5, r5, r3
	ldr	r3, [fp, #-72]
	sub	r3, r4, r3
	mov	r2, r3
	ldr	r3, [fp, #-68]
	add	r3, r3, r2
	str	r3, [fp, #-68]
	str	r4, [fp, #-72]
.L98:
	ldr	r4, [fp, #-36]
	b	.L99
.L101:
	cmp	r7, #92
	bne	.L99
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L99
	sub	r5, r5, #1
	add	r4, r4, #1
.L99:
	mov	r3, r4
	add	r4, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r7, r3
	mov	r3, r5
	add	r5, r3, #1
	and	r2, r7, #255
	strb	r2, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L100
	cmp	r7, #10
	bne	.L101
.L100:
	mov	r3, #0
	strb	r3, [r5]
	ldr	r1, .L106+16
	ldr	r0, [fp, #-68]
	bl	find_capability
	str	r0, [fp, #-68]
	mov	r1, #0
	ldr	r0, [fp, #-68]
	bl	tgetst1
	str	r0, [fp, #-64]
.L94:
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L102
	mov	r0, r6
	bl	close
	ldr	r3, [fp, #-44]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	beq	.L105
	ldr	r3, [fp, #-72]
	sub	r3, r5, r3
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	xrealloc
	str	r0, [fp, #-72]
	b	.L83
.L105:
	nop
.L83:
	ldr	r2, .L106+4
	ldr	r3, [fp, #-72]
	str	r3, [r2]
	mov	r3, #1
.L103:
	ldr	r2, .L106
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L104
	bl	__stack_chk_fail
.L104:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L107:
	.align	2
.L106:
	.word	.LC5
	.word	term_entry
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	tgetent, .-tgetent
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	scan_file, %function
scan_file:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r4, r2
	ldr	r3, [r4]
	str	r3, [r4, #8]
	mov	r3, #0
	str	r3, [r4, #16]
	mov	r3, #0
	str	r3, [r4, #12]
	ldr	r3, [r4, #8]
	mov	r2, #0
	strb	r2, [r3]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-20]
	bl	lseek
	b	.L109
.L114:
	mov	r5, #0
.L111:
	mov	r2, r5
	mov	r1, r4
	ldr	r0, [fp, #-20]
	bl	gobble_line
	mov	r5, r0
	ldr	r3, [r4, #12]
	cmp	r3, #0
	bne	.L110
	sub	r3, r5, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #92
	beq	.L111
.L110:
	ldr	r3, [r4, #8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #35
	beq	.L112
	ldr	r3, [r4, #8]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	name_match
	mov	r3, r0
	cmp	r3, #0
	beq	.L112
	mov	r3, #1
	b	.L113
.L112:
	str	r5, [r4, #8]
.L109:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L114
	mov	r3, #0
.L113:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	scan_file, .-scan_file
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	name_match, %function
name_match:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	compare_contin
	mov	r3, r0
	cmp	r3, #0
	bne	.L116
	mov	r3, #1
	b	.L117
.L116:
	ldr	r4, [fp, #-16]
	b	.L118
.L121:
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #124
	bne	.L119
	add	r3, r4, #1
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	compare_contin
	mov	r3, r0
	cmp	r3, #0
	bne	.L119
	mov	r3, #1
	b	.L117
.L119:
	add	r4, r4, #1
.L118:
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L120
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L120
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #58
	bne	.L121
.L120:
	mov	r3, #0
.L117:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	name_match, .-name_match
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	compare_contin, %function
compare_contin:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	push	{r4, r5, fp}
	add	fp, sp, #8
	mov	r3, r0
.L132:
	mov	r2, r3
	add	r3, r2, #1
	ldrb	r2, [r2]	@ zero_extendqisi2
	mov	r4, r2
	mov	r2, r1
	add	r1, r2, #1
	ldrb	r2, [r2]	@ zero_extendqisi2
	mov	r5, r2
	b	.L123
.L126:
	add	r3, r3, #1
	nop
.L124:
	mov	r2, r3
	add	r3, r2, #1
	ldrb	r2, [r2]	@ zero_extendqisi2
	mov	r4, r2
	cmp	r4, #32
	beq	.L124
	cmp	r4, #9
	beq	.L124
.L123:
	cmp	r4, #92
	bne	.L125
	ldrb	r2, [r3]	@ zero_extendqisi2
	cmp	r2, #10
	beq	.L126
.L125:
	cmp	r5, #0
	bne	.L127
	cmp	r4, #124
	beq	.L128
	cmp	r4, #58
	bne	.L129
.L128:
	mov	r3, #0
	b	.L130
.L129:
	mov	r3, #1
	b	.L130
.L127:
	cmp	r4, r5
	beq	.L132
	mov	r3, #1
.L130:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, r5, fp}
	bx	lr
	.size	compare_contin, .-compare_contin
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gobble_line, %function
gobble_line:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #12
	str	r0, [fp, #-24]
	mov	r4, r1
	str	r2, [fp, #-28]
	ldr	r5, [r4]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L145
	ldr	r3, [r4, #8]
	str	r3, [fp, #-28]
.L145:
	ldr	r6, [fp, #-28]
	b	.L135
.L137:
	add	r6, r6, #1
.L135:
	ldrb	r3, [r6]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L136
	ldrb	r3, [r6]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L137
.L136:
	ldrb	r3, [r6]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L147
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L140
	ldr	r3, [r4, #16]
	add	r3, r5, r3
	b	.L141
.L140:
	ldr	r3, [r4, #8]
	cmp	r5, r3
	bne	.L142
	ldr	r2, [r4, #16]
	ldr	r3, [r4, #4]
	cmp	r2, r3
	bne	.L143
	ldr	r3, [r4, #4]
	lsl	r3, r3, #1
	str	r3, [r4, #4]
	ldr	r3, [r4, #4]
	add	r3, r3, #1
	mov	r1, r3
	mov	r0, r5
	bl	xrealloc
	mov	r6, r0
	ldr	r3, [r4, #8]
	sub	r3, r3, r5
	add	r3, r6, r3
	str	r3, [r4, #8]
	ldr	r3, [fp, #-28]
	sub	r3, r3, r5
	add	r3, r6, r3
	str	r3, [fp, #-28]
	mov	r5, r6
	str	r5, [r4]
	b	.L143
.L142:
	ldr	r3, [r4, #8]
	sub	r3, r3, r5
	rsb	r3, r3, #0
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r1, [r4, #8]
	ldr	r2, [r4, #16]
	ldr	r3, [r4, #8]
	sub	r3, r3, r5
	sub	r3, r2, r3
	str	r3, [r4, #16]
	ldr	r3, [r4, #16]
	mov	r2, r3
	mov	r0, r5
	bl	memmove
	str	r5, [r4, #8]
.L143:
	ldr	r3, [r4, #16]
	add	r1, r5, r3
	ldr	r2, [r4, #4]
	ldr	r3, [r4, #16]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r0, [fp, #-24]
	bl	read
	mov	r6, r0
	cmp	r6, #0
	bne	.L144
	mov	r3, #1
	str	r3, [r4, #12]
.L144:
	ldr	r3, [r4, #16]
	add	r3, r6, r3
	str	r3, [r4, #16]
	ldr	r3, [r4, #16]
	add	r3, r5, r3
	mov	r2, #0
	strb	r2, [r3]
	b	.L145
.L147:
	nop
	add	r3, r6, #1
.L141:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
	.size	gobble_line, .-gobble_line
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
