	.file	"78955.c"
	.intel_syntax noprefix
	.text
	.globl	tokenize
	.type	tokenize, @function
tokenize:
.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, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	edi, 512
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	edi, 64
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -40[rbp], 0
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -44[rbp], 0
	jmp	.L2
.L7:
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -45[rbp], al
	cmp	BYTE PTR -45[rbp], 32
	je	.L3
	cmp	BYTE PTR -45[rbp], 10
	je	.L3
	cmp	BYTE PTR -45[rbp], 9
	jne	.L4
.L3:
	mov	eax, DWORD PTR -40[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	cmp	DWORD PTR -40[rbp], 0
	je	.L6
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	lea	rbx, [rdx+rax]
	mov	edi, 64
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -36[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -36[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	DWORD PTR -40[rbp], 0
	jmp	.L6
.L4:
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -40[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -45[rbp]
	mov	BYTE PTR [rdx], al
.L6:
	add	DWORD PTR -44[rbp], 1
.L2:
	mov	eax, DWORD PTR -44[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L7
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	tokenize, .-tokenize
	.section	.rodata
.LC0:
	.string	"turtle>"
.LC1:
	.string	"Token: %s \n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 1056
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L14:
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 128
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	BYTE PTR -1040[rbp+rax], 10
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	tokenize
	mov	QWORD PTR -1048[rbp], rax
	mov	rax, QWORD PTR -1048[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L16
	mov	DWORD PTR -1052[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -1052[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1048[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -1052[rbp], 1
.L12:
	mov	eax, DWORD PTR -1052[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1048[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L13
	jmp	.L14
.L16:
	nop
	jmp	.L14
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"78955.c"
	.text
	.align	2
	.global	tokenize
	.syntax unified
	.arm
	.fpu softvfp
	.type	tokenize, %function
tokenize:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	mov	r0, #256
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r0, #64
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L2
.L7:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-33]
	ldrb	r3, [fp, #-33]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L3
	ldrb	r3, [fp, #-33]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L3
	ldrb	r3, [fp, #-33]	@ zero_extendqisi2
	cmp	r3, #9
	bne	.L4
.L3:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r4, r2, r3
	mov	r0, #64
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-24]
	add	r2, r3, #1
	str	r2, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	strcpy
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L6
.L4:
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	str	r2, [fp, #-28]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldrb	r2, [fp, #-33]
	strb	r2, [r3]
.L6:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L2:
	ldr	r0, [fp, #-40]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bhi	.L7
	ldr	r0, [fp, #-16]
	bl	free
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	tokenize, .-tokenize
	.section	.rodata
	.align	2
.LC0:
	.ascii	"turtle>\000"
	.align	2
.LC1:
	.ascii	"Token: %s \012\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 = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L14:
	ldr	r0, .L17+4
	bl	printf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #1024
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, .L17+8
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #10
	strb	r2, [r3, #-1028]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	tokenize
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L16
	mov	r3, #0
	str	r3, [fp, #-1040]
	b	.L12
.L13:
	ldr	r3, [fp, #-1040]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1036]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L17+12
	bl	printf
	ldr	r3, [fp, #-1040]
	add	r3, r3, #1
	str	r3, [fp, #-1040]
.L12:
	ldr	r3, [fp, #-1040]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1036]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L13
	b	.L14
.L16:
	nop
	b	.L14
.L18:
	.align	2
.L17:
	.word	.LC2
	.word	.LC0
	.word	stdin
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
