	.file	"112571.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Incorrect number of arguments."
.LC1:
	.string	"Words with line numbers"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1040
	mov	DWORD PTR -1028[rbp], edi
	mov	QWORD PTR -1040[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1024[rbp], 0
	mov	QWORD PTR -1016[rbp], 0
	jmp	.L2
.L3:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	movzx	eax, BYTE PTR -1008[rbp]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 1024
	test	eax, eax
	je	.L2
	mov	edx, DWORD PTR -1024[rbp]
	lea	rcx, -1008[rbp]
	mov	rax, QWORD PTR -1016[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	addtree
	mov	QWORD PTR -1016[rbp], rax
.L2:
	lea	rdx, -1024[rbp]
	lea	rax, -1008[rbp]
	mov	esi, 1000
	mov	rdi, rax
	call	mgetword
	cmp	eax, 120
	jne	.L3
	cmp	DWORD PTR -1028[rbp], 1
	jne	.L4
	mov	DWORD PTR -1020[rbp], 8
	jmp	.L5
.L4:
	cmp	DWORD PTR -1028[rbp], 2
	jne	.L6
	mov	rax, QWORD PTR -1040[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1020[rbp], eax
	jmp	.L5
.L6:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L8
.L5:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -1016[rbp]
	mov	rdi, rax
	call	treeprint
	mov	eax, 0
.L8:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	mgetword
	.type	mgetword, @function
mgetword:
.LFB7:
	.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, 72
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -28[rbp], 0
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -36[rbp], eax
	jmp	.L11
.L12:
	cmp	DWORD PTR -44[rbp], 10
	jne	.L11
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	DWORD PTR [rax], edx
.L11:
	call	__ctype_b_loc@PLT
	mov	rbx, QWORD PTR [rax]
	call	getch
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	add	rax, rax
	add	rax, rbx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L12
	cmp	DWORD PTR -44[rbp], 47
	jne	.L13
	call	getch
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 42
	jne	.L14
	mov	DWORD PTR -36[rbp], 1
	jmp	.L13
.L14:
	mov	DWORD PTR -36[rbp], 0
	mov	eax, DWORD PTR -40[rbp]
	mov	edi, eax
	call	ungetch
.L13:
	cmp	DWORD PTR -44[rbp], 34
	jne	.L15
	mov	DWORD PTR -32[rbp], 1
.L15:
	cmp	DWORD PTR -44[rbp], 35
	jne	.L16
	mov	DWORD PTR -28[rbp], 1
.L16:
	cmp	DWORD PTR -44[rbp], 92
	jne	.L17
	call	getch
	mov	DWORD PTR -44[rbp], eax
.L17:
	cmp	DWORD PTR -36[rbp], 0
	jne	.L18
	cmp	DWORD PTR -32[rbp], 0
	jne	.L18
	cmp	DWORD PTR -28[rbp], 0
	jne	.L18
	cmp	DWORD PTR -44[rbp], -1
	je	.L19
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, DWORD PTR -44[rbp]
	mov	BYTE PTR [rax], dl
.L19:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8
	test	eax, eax
	jne	.L22
	cmp	DWORD PTR -44[rbp], 95
	je	.L22
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -44[rbp]
	jmp	.L21
.L25:
	call	getch
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[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, 8
	test	eax, eax
	jne	.L23
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 95
	je	.L23
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	ungetch
	jmp	.L24
.L23:
	add	QWORD PTR -24[rbp], 1
.L22:
	sub	DWORD PTR -60[rbp], 1
	cmp	DWORD PTR -60[rbp], 0
	jg	.L25
.L24:
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -56[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	jmp	.L21
.L18:
	cmp	DWORD PTR -36[rbp], 1
	jne	.L26
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, DWORD PTR -44[rbp]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, DWORD PTR -40[rbp]
	mov	BYTE PTR [rax], dl
	jmp	.L27
.L30:
	cmp	DWORD PTR -44[rbp], 42
	jne	.L27
	call	getch
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], 47
	jne	.L28
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, DWORD PTR -44[rbp]
	mov	BYTE PTR [rax], dl
	mov	DWORD PTR -36[rbp], 0
	jmp	.L29
.L28:
	mov	eax, DWORD PTR -44[rbp]
	mov	edi, eax
	call	ungetch
.L27:
	call	getch
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, DWORD PTR -44[rbp]
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L30
.L29:
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], 0
	jmp	.L31
.L26:
	cmp	DWORD PTR -32[rbp], 1
	jne	.L32
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, DWORD PTR -44[rbp]
	mov	BYTE PTR [rax], dl
	jmp	.L33
.L34:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 92
	jne	.L33
	call	getch
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
.L33:
	call	getch
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR [rax]
	cmp	al, 34
	jne	.L34
	mov	DWORD PTR -32[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], 0
	jmp	.L31
.L32:
	cmp	DWORD PTR -28[rbp], 1
	jne	.L31
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, DWORD PTR -44[rbp]
	mov	BYTE PTR [rax], dl
	jmp	.L35
.L36:
	cmp	DWORD PTR -44[rbp], 92
	jne	.L35
	call	getch
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
.L35:
	call	getch
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L36
	mov	DWORD PTR -28[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], 0
.L31:
	mov	eax, DWORD PTR -44[rbp]
.L21:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	mgetword, .-mgetword
	.globl	addtree
	.type	addtree, @function
addtree:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	cmp	QWORD PTR -24[rbp], 0
	jne	.L38
	call	talloc
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	mstrdup
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 8[rax], 1
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	addlinenumber
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 32[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 32[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 24[rax], rdx
	jmp	.L39
.L38:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jne	.L40
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	addlinenumber
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rdx], rax
	jmp	.L39
.L40:
	cmp	DWORD PTR -4[rbp], 0
	jns	.L41
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	addtree
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 24[rdx], rax
	jmp	.L39
.L41:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	addtree
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 32[rdx], rax
.L39:
	mov	rax, QWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	addtree, .-addtree
	.globl	addlinenumber
	.type	addlinenumber, @function
addlinenumber:
.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	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	cmp	QWORD PTR -8[rbp], 0
	jne	.L44
	call	lnumberalloc
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	jmp	.L45
.L44:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	addlinenumber
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rdx], rax
.L45:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	addlinenumber, .-addlinenumber
	.globl	lnumberalloc
	.type	lnumberalloc, @function
lnumberalloc:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edi, 16
	call	malloc@PLT
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	lnumberalloc, .-lnumberalloc
	.section	.rodata
.LC2:
	.string	"\n%s :"
	.text
	.globl	treeprint
	.type	treeprint, @function
treeprint:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L51
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdi, rax
	call	treeprint
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	mov	eax, 0
	call	printnumbers
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	treeprint
.L51:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	treeprint, .-treeprint
	.section	.rodata
.LC3:
	.string	"%d,"
	.text
	.globl	printnumbers
	.type	printnumbers, @function
printnumbers:
.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
	cmp	QWORD PTR -8[rbp], 0
	je	.L54
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	printnumbers
.L54:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	printnumbers, .-printnumbers
	.globl	talloc
	.type	talloc, @function
talloc:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edi, 40
	call	malloc@PLT
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	talloc, .-talloc
	.globl	mstrdup
	.type	mstrdup, @function
mstrdup:
.LFB14:
	.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	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L58
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
.L58:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	mstrdup, .-mstrdup
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.globl	bufp
	.align 4
	.type	bufp, @object
	.size	bufp, 4
bufp:
	.zero	4
	.text
	.globl	getch
	.type	getch, @function
getch:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR bufp[rip]
	test	eax, eax
	jle	.L61
	mov	eax, DWORD PTR bufp[rip]
	sub	eax, 1
	mov	DWORD PTR bufp[rip], eax
	mov	eax, DWORD PTR bufp[rip]
	cdqe
	lea	rdx, buf[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	eax, al
	jmp	.L63
.L61:
	call	getchar@PLT
.L63:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	getch, .-getch
	.section	.rodata
.LC4:
	.string	"ungetch: too many characters"
	.text
	.globl	ungetch
	.type	ungetch, @function
ungetch:
.LFB16:
	.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	eax, DWORD PTR bufp[rip]
	cmp	eax, 99
	jle	.L65
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L64
.L65:
	mov	eax, DWORD PTR bufp[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR bufp[rip], edx
	mov	edx, DWORD PTR -4[rbp]
	mov	ecx, edx
	cdqe
	lea	rdx, buf[rip]
	mov	BYTE PTR [rax+rdx], cl
	nop
.L64:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	ungetch, .-ungetch
	.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	"112571.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Incorrect number of arguments.\000"
	.align	2
.LC1:
	.ascii	"Words with line numbers\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1024
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1024
	str	r0, [fp, #-1024]
	str	r1, [fp, #-1028]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1020]
	mov	r3, #0
	str	r3, [fp, #-1016]
	b	.L2
.L3:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldrb	r3, [fp, #-1008]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #1024
	cmp	r3, #0
	beq	.L2
	ldr	r2, [fp, #-1020]
	sub	r3, fp, #1008
	mov	r1, r3
	ldr	r0, [fp, #-1016]
	bl	addtree
	str	r0, [fp, #-1016]
.L2:
	sub	r2, fp, #1020
	sub	r3, fp, #1008
	mov	r1, #1000
	mov	r0, r3
	bl	mgetword
	mov	r3, r0
	cmp	r3, #120
	bne	.L3
	ldr	r3, [fp, #-1024]
	cmp	r3, #1
	bne	.L4
	mov	r3, #8
	str	r3, [fp, #-1012]
	b	.L5
.L4:
	ldr	r3, [fp, #-1024]
	cmp	r3, #2
	bne	.L6
	ldr	r3, [fp, #-1028]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-1012]
	b	.L5
.L6:
	ldr	r0, .L10+4
	bl	puts
	mov	r3, #1
	b	.L8
.L5:
	ldr	r0, .L10+8
	bl	puts
	ldr	r0, [fp, #-1016]
	bl	treeprint
	mov	r3, #0
.L8:
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.align	2
	.global	mgetword
	.syntax unified
	.arm
	.fpu softvfp
	.type	mgetword, %function
mgetword:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-28]
	b	.L13
.L14:
	ldr	r3, [fp, #-36]
	cmp	r3, #10
	bne	.L13
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-48]
	str	r2, [r3]
.L13:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r4, [r3]
	bl	getch
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #1
	add	r3, r4, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L14
	ldr	r3, [fp, #-36]
	cmp	r3, #47
	bne	.L15
	bl	getch
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #42
	bne	.L16
	mov	r3, #1
	str	r3, [fp, #-28]
	b	.L15
.L16:
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r0, [fp, #-32]
	bl	ungetch
.L15:
	ldr	r3, [fp, #-36]
	cmp	r3, #34
	bne	.L17
	mov	r3, #1
	str	r3, [fp, #-24]
.L17:
	ldr	r3, [fp, #-36]
	cmp	r3, #35
	bne	.L18
	mov	r3, #1
	str	r3, [fp, #-20]
.L18:
	ldr	r3, [fp, #-36]
	cmp	r3, #92
	bne	.L19
	bl	getch
	str	r0, [fp, #-36]
.L19:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-36]
	cmn	r3, #1
	beq	.L21
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-36]
	and	r2, r2, #255
	strb	r2, [r3]
.L21:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8
	cmp	r3, #0
	bne	.L24
	ldr	r3, [fp, #-36]
	cmp	r3, #95
	beq	.L24
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-36]
	b	.L23
.L27:
	bl	getch
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #95
	beq	.L25
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	ungetch
	b	.L26
.L25:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L24:
	ldr	r3, [fp, #-44]
	sub	r3, r3, #1
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bgt	.L27
.L26:
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	b	.L23
.L20:
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	bne	.L28
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-36]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-32]
	and	r2, r2, #255
	strb	r2, [r3]
	b	.L29
.L32:
	ldr	r3, [fp, #-36]
	cmp	r3, #42
	bne	.L29
	bl	getch
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #47
	bne	.L30
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-36]
	and	r2, r2, #255
	strb	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L31
.L30:
	ldr	r0, [fp, #-36]
	bl	ungetch
.L29:
	bl	getch
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-36]
	and	r2, r2, #255
	strb	r2, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L32
.L31:
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3]
	b	.L33
.L28:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L34
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-36]
	and	r2, r2, #255
	strb	r2, [r3]
	b	.L35
.L36:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #92
	bne	.L35
	bl	getch
	mov	r1, r0
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	and	r2, r1, #255
	strb	r2, [r3]
.L35:
	bl	getch
	mov	r1, r0
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	and	r2, r1, #255
	strb	r2, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #34
	bne	.L36
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3]
	b	.L33
.L34:
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L33
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-36]
	and	r2, r2, #255
	strb	r2, [r3]
	b	.L37
.L38:
	ldr	r3, [fp, #-36]
	cmp	r3, #92
	bne	.L37
	bl	getch
	mov	r1, r0
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	and	r2, r1, #255
	strb	r2, [r3]
.L37:
	bl	getch
	mov	r1, r0
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	and	r2, r1, #255
	strb	r2, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L38
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3]
.L33:
	ldr	r3, [fp, #-36]
.L23:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	mgetword, .-mgetword
	.align	2
	.global	addtree
	.syntax unified
	.arm
	.fpu softvfp
	.type	addtree, %function
addtree:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L40
	bl	talloc
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-20]
	bl	mstrdup
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	addlinenumber
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #16]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #12]
	b	.L41
.L40:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	strcmp
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L42
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	addlinenumber
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3, #8]
	b	.L41
.L42:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L43
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	addtree
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3, #12]
	b	.L41
.L43:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	addtree
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3, #16]
.L41:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	addtree, .-addtree
	.align	2
	.global	addlinenumber
	.syntax unified
	.arm
	.fpu softvfp
	.type	addlinenumber, %function
addlinenumber:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L46
	bl	lnumberalloc
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	b	.L47
.L46:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	addlinenumber
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
.L47:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	addlinenumber, .-addlinenumber
	.align	2
	.global	lnumberalloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	lnumberalloc, %function
lnumberalloc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	mov	r0, r3
	pop	{fp, pc}
	.size	lnumberalloc, .-lnumberalloc
	.section	.rodata
	.align	2
.LC3:
	.ascii	"\012%s :\000"
	.text
	.align	2
	.global	treeprint
	.syntax unified
	.arm
	.fpu softvfp
	.type	treeprint, %function
treeprint:
	@ 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, [fp, #-8]
	cmp	r3, #0
	beq	.L53
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	treeprint
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L54
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	printnumbers
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	treeprint
.L53:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L55:
	.align	2
.L54:
	.word	.LC3
	.size	treeprint, .-treeprint
	.section	.rodata
	.align	2
.LC4:
	.ascii	"%d,\000"
	.text
	.align	2
	.global	printnumbers
	.syntax unified
	.arm
	.fpu softvfp
	.type	printnumbers, %function
printnumbers:
	@ 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, [fp, #-8]
	cmp	r3, #0
	beq	.L58
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L59
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	printnumbers
.L58:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L60:
	.align	2
.L59:
	.word	.LC4
	.size	printnumbers, .-printnumbers
	.align	2
	.global	talloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	talloc, %function
talloc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r0, #20
	bl	malloc
	mov	r3, r0
	mov	r0, r3
	pop	{fp, pc}
	.size	talloc, .-talloc
	.align	2
	.global	mstrdup
	.syntax unified
	.arm
	.fpu softvfp
	.type	mstrdup, %function
mstrdup:
	@ 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	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L64
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	strcpy
.L64:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	mstrdup, .-mstrdup
	.comm	buf,100,4
	.global	bufp
	.bss
	.align	2
	.type	bufp, %object
	.size	bufp, 4
bufp:
	.space	4
	.text
	.align	2
	.global	getch
	.syntax unified
	.arm
	.fpu softvfp
	.type	getch, %function
getch:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L70
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L67
	ldr	r3, .L70
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L70
	str	r3, [r2]
	ldr	r3, .L70
	ldr	r3, [r3]
	ldr	r2, .L70+4
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	b	.L69
.L67:
	bl	getchar
	mov	r3, r0
.L69:
	mov	r0, r3
	pop	{fp, pc}
.L71:
	.align	2
.L70:
	.word	bufp
	.word	buf
	.size	getch, .-getch
	.section	.rodata
	.align	2
.LC5:
	.ascii	"ungetch: too many characters\000"
	.text
	.align	2
	.global	ungetch
	.syntax unified
	.arm
	.fpu softvfp
	.type	ungetch, %function
ungetch:
	@ 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, .L76
	ldr	r3, [r3]
	cmp	r3, #99
	ble	.L73
	ldr	r0, .L76+4
	bl	puts
	b	.L72
.L73:
	ldr	r3, .L76
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L76
	str	r2, [r1]
	ldr	r2, [fp, #-8]
	and	r1, r2, #255
	ldr	r2, .L76+8
	strb	r1, [r2, r3]
	nop
.L72:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L77:
	.align	2
.L76:
	.word	bufp
	.word	.LC5
	.word	buf
	.size	ungetch, .-ungetch
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
