	.file	"951185.c"
	.intel_syntax noprefix
	.text
	.globl	string
	.section	.rodata
	.align 8
.LC0:
	.ascii	"In olden times when wishing still helped one, there lived a "
	.ascii	"king whose daughters were all beautiful, but the youngest wa"
	.ascii	"s so beautiful that the sun itself, which has seen so much, "
	.ascii	"was astonished whenever it shone-in-her-face.  Close-by-the-"
	.ascii	"king's castle lay a great dark forest, and under an old lime"
	.ascii	"-tree in the forest was "
	.string	"a well, and when the day was very warm, the king's child went out into the forest and sat down by the side of the cool-fountain, and when she was bored she took a golden ball, and threw it up on high and caught it, and this ball was her favorite plaything."
	.section	.data.rel.local,"aw"
	.align 8
	.type	string, @object
	.size	string, 8
string:
	.quad	.LC0
	.text
	.globl	make_word_list
	.type	make_word_list, @function
make_word_list:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -12[rbp], 0
	mov	QWORD PTR -8[rbp], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], 0
	jmp	.L2
.L4:
	add	QWORD PTR -24[rbp], 1
.L2:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L3
	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, 8192
	test	eax, eax
	jne	.L4
.L3:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L15
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jg	.L7
	sal	DWORD PTR -12[rbp]
	cmp	DWORD PTR -12[rbp], 0
	jne	.L8
	mov	DWORD PTR -12[rbp], 2
.L8:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -8[rbp], rax
.L7:
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rdx], rax
	jmp	.L9
.L11:
	add	QWORD PTR -24[rbp], 1
.L9:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L10
	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, 8192
	test	eax, eax
	je	.L11
.L10:
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, rcx
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 4
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rcx
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], edx
	jmp	.L2
.L15:
	nop
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	make_word_list, .-make_word_list
	.globl	greedy_wrap
	.type	greedy_wrap, @function
greedy_wrap:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -48[rbp], edx
	mov	QWORD PTR -56[rbp], rcx
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -12[rbp], eax
.L24:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jne	.L17
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -8[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rdx], eax
	jmp	.L26
.L17:
	cmp	DWORD PTR -16[rbp], 0
	jne	.L19
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -12[rbp], edx
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -16[rbp], eax
	jmp	.L20
.L19:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	cmp	DWORD PTR -48[rbp], eax
	jle	.L21
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -12[rbp], edx
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 8[rax]
	add	eax, 1
	add	DWORD PTR -16[rbp], eax
	jmp	.L20
.L21:
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -8[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jge	.L22
	mov	eax, DWORD PTR -48[rbp]
	sub	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jle	.L23
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, eax
	add	DWORD PTR -20[rbp], eax
	jmp	.L22
.L23:
	cmp	DWORD PTR -4[rbp], 0
	jns	.L22
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, eax
	imul	eax, eax, 100
	add	DWORD PTR -20[rbp], eax
.L22:
	mov	DWORD PTR -16[rbp], 0
.L20:
	jmp	.L24
.L26:
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -8[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	mov	eax, DWORD PTR -20[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	greedy_wrap, .-greedy_wrap
	.type	test_wrap.0, @function
test_wrap.0:
.LFB9:
	.cfi_startproc
	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	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	DWORD PTR -44[rbp], edx
	mov	rbx, r10
	mov	QWORD PTR -56[rbp], r10
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -24[rbp], -1
	jmp	.L28
.L38:
	cmp	DWORD PTR -28[rbp], 0
	je	.L29
	add	DWORD PTR -28[rbp], 1
.L29:
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -40[rbp], edx
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR 16[rbx]
	add	rax, rdx
	mov	eax, DWORD PTR 8[rax]
	add	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR 32[rbx]
	sub	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR 28[rbx]
	cmp	DWORD PTR -40[rbp], eax
	jl	.L30
	cmp	DWORD PTR -20[rbp], 0
	jns	.L31
.L30:
	cmp	DWORD PTR -20[rbp], 0
	jle	.L32
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, eax
	mov	edx, eax
	mov	eax, DWORD PTR -44[rbp]
	add	eax, edx
	mov	DWORD PTR -24[rbp], eax
	jmp	.L34
.L32:
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, eax
	imul	edx, eax, 100
	mov	eax, DWORD PTR -44[rbp]
	add	eax, edx
	mov	DWORD PTR -24[rbp], eax
	jmp	.L34
.L31:
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -24[rbp], eax
.L34:
	mov	eax, DWORD PTR 24[rbx]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L35
	cmp	DWORD PTR -20[rbp], 0
	jle	.L39
	jmp	.L28
.L35:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR 8[rbx]
	add	rdx, rax
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -36[rbp]
	lea	ecx, 1[rax]
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	r10, rbx
	mov	esi, eax
	mov	edi, ecx
	call	test_wrap.0
.L28:
	mov	eax, DWORD PTR 28[rbx]
	cmp	DWORD PTR -40[rbp], eax
	jle	.L38
	cmp	DWORD PTR -24[rbp], 0
	js	.L27
	mov	eax, DWORD PTR 24[rbx]
	cmp	DWORD PTR -24[rbp], eax
	jge	.L27
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR 24[rbx], eax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR [rbx]
	mov	rcx, QWORD PTR 8[rbx]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	jmp	.L27
.L39:
	nop
.L27:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	test_wrap.0, .-test_wrap.0
	.globl	balanced_wrap
	.type	balanced_wrap, @function
balanced_wrap:
.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, 96
	mov	QWORD PTR -72[rbp], rdi
	mov	DWORD PTR -76[rbp], esi
	mov	DWORD PTR -80[rbp], edx
	mov	QWORD PTR -88[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, 16[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -80[rbp]
	mov	DWORD PTR -32[rbp], eax
	mov	rax, QWORD PTR -88[rbp]
	mov	QWORD PTR -64[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	rcx, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	greedy_wrap
	mov	DWORD PTR -40[rbp], eax
	lea	rax, -64[rbp]
	mov	r10, rax
	mov	edx, 0
	mov	esi, 0
	mov	edi, 0
	call	test_wrap.0
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	balanced_wrap, .-balanced_wrap
	.section	.rodata
.LC1:
	.string	"%.*s"
	.text
	.globl	show_wrap
	.type	show_wrap, @function
show_wrap:
.LFB10:
	.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	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -40[rbp], rdx
	mov	DWORD PTR -4[rbp], 0
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -8[rbp], eax
	jmp	.L44
.L47:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 4
	mov	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	sub	eax, 1
	cmp	DWORD PTR -4[rbp], eax
	jge	.L46
	mov	edi, 32
	call	putchar@PLT
.L46:
	add	DWORD PTR -4[rbp], 1
.L45:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L47
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L48
	mov	edi, 10
	call	putchar@PLT
.L48:
	add	DWORD PTR -8[rbp], 1
.L44:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jge	.L51
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L45
.L51:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	show_wrap, .-show_wrap
	.section	.rodata
	.align 8
.LC2:
	.string	"\n== greedy wrap at %d (score %d) ==\n\n"
	.align 8
.LC3:
	.string	"\n== balanced wrap at %d (score %d) ==\n\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR string[rip]
	lea	rdx, -36[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	make_word_list
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -32[rbp], 80
	mov	esi, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	greedy_wrap
	mov	DWORD PTR -28[rbp], eax
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	ecx, DWORD PTR -36[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	show_wrap
	mov	esi, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	balanced_wrap
	mov	DWORD PTR -28[rbp], eax
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	ecx, DWORD PTR -36[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	show_wrap
	mov	DWORD PTR -32[rbp], 32
	mov	esi, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	greedy_wrap
	mov	DWORD PTR -28[rbp], eax
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	ecx, DWORD PTR -36[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	show_wrap
	mov	esi, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	balanced_wrap
	mov	DWORD PTR -28[rbp], eax
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	ecx, DWORD PTR -36[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	show_wrap
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L54
	call	__stack_chk_fail@PLT
.L54:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	"951185.c"
	.text
	.global	string
	.section	.rodata
	.align	2
.LC0:
	.ascii	"In olden times when wishing still helped one, there"
	.ascii	" lived a king whose daughters were all beautiful, b"
	.ascii	"ut the youngest was so beautiful that the sun itsel"
	.ascii	"f, which has seen so much, was astonished whenever "
	.ascii	"it shone-in-her-face.  Close-by-the-king's castle l"
	.ascii	"ay a great dark forest, and under an old lime-tree "
	.ascii	"in the forest was a well, and when the day was very"
	.ascii	" warm, the king's child went out into the forest an"
	.ascii	"d sat down by the side of the cool-fountain, and wh"
	.ascii	"en she was bored she took a golden ball, and threw "
	.ascii	"it up on high and caught it, and this ball was her "
	.ascii	"favorite plaything.\000"
	.data
	.align	2
	.type	string, %object
	.size	string, 4
string:
	.word	.LC0
	.text
	.align	2
	.global	make_word_list
	.syntax unified
	.arm
	.fpu softvfp
	.type	make_word_list, %function
make_word_list:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	mov	r2, #0
	str	r2, [r3]
	b	.L2
.L4:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L3
	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, #8192
	cmp	r3, #0
	bne	.L4
.L3:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bgt	.L7
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L8
	mov	r3, #2
	str	r3, [fp, #-12]
.L8:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #3
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	realloc
	str	r0, [fp, #-8]
.L7:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	b	.L9
.L11:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L9:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L10
	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, #8192
	cmp	r3, #0
	beq	.L11
.L10:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	lsl	r3, r3, #3
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	ldr	r1, [fp, #-16]
	sub	r2, r1, r2
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	b	.L2
.L15:
	nop
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	make_word_list, .-make_word_list
	.align	2
	.global	greedy_wrap
	.syntax unified
	.arm
	.fpu softvfp
	.type	greedy_wrap, %function
greedy_wrap:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #44
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
.L24:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bne	.L17
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	b	.L26
.L17:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L19
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	str	r3, [fp, #-20]
	b	.L20
.L19:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	ble	.L21
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	add	r3, r3, #1
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-20]
	b	.L20
.L21:
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bge	.L22
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L23
	ldr	r3, [fp, #-8]
	mov	r2, r3
	mul	r2, r3, r2
	mov	r3, r2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	b	.L22
.L23:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L22
	ldr	r3, [fp, #-8]
	mul	r2, r3, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	str	r3, [fp, #-24]
.L22:
	mov	r3, #0
	str	r3, [fp, #-20]
.L20:
	b	.L24
.L26:
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	greedy_wrap, .-greedy_wrap
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_wrap.5442, %function
test_wrap.5442:
	@ Nested: function declared inside another function.
	@ 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, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	mov	r4, ip
	str	ip, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-24]
	mvn	r3, #0
	str	r3, [fp, #-20]
	b	.L28
.L38:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L29
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L29:
	ldr	r3, [fp, #-36]
	add	r2, r3, #1
	str	r2, [fp, #-36]
	lsl	r3, r3, #3
	ldr	r2, [r4, #20]
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r2, [r4, #16]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [r4, #12]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L30
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L31
.L30:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	ble	.L32
	ldr	r3, [fp, #-16]
	mov	r2, r3
	mul	r2, r3, r2
	mov	r3, r2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	str	r3, [fp, #-20]
	b	.L34
.L32:
	ldr	r3, [fp, #-16]
	mul	r2, r3, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-40]
	add	r3, r3, r2
	str	r3, [fp, #-20]
	b	.L34
.L31:
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-20]
.L34:
	ldr	r3, [r4, #8]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L35
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	ble	.L39
	b	.L28
.L35:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [r4, #4]
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	mov	ip, r4
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	test_wrap.5442
.L28:
	ldr	r3, [r4, #12]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	ble	.L38
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	blt	.L27
	ldr	r3, [r4, #8]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bge	.L27
	ldr	r3, [fp, #-20]
	str	r3, [r4, #8]
	ldr	r3, [fp, #-32]
	lsl	r2, r3, #2
	ldr	r3, [r4]
	ldr	r1, [r4, #4]
	mov	r0, r3
	bl	memcpy
	b	.L27
.L39:
	nop
.L27:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	test_wrap.5442, .-test_wrap.5442
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	balanced_wrap
	.syntax unified
	.arm
	.fpu softvfp
	.type	balanced_wrap, %function
balanced_wrap:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	str	r3, [fp, #-52]
	ldr	r3, .L43
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	add	r3, fp, #4
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-52]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r0, [fp, #-16]
	ldr	r1, [fp, #-24]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-36]
	bl	greedy_wrap
	mov	r3, r0
	str	r3, [fp, #-28]
	sub	r3, fp, #36
	mov	ip, r3
	mov	r2, #0
	mov	r1, #0
	mov	r0, #0
	bl	test_wrap.5442
	ldr	r3, [fp, #-32]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-28]
	ldr	r2, .L43
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L42
	bl	__stack_chk_fail
.L42:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L44:
	.align	2
.L43:
	.word	.LC1
	.size	balanced_wrap, .-balanced_wrap
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%.*s\000"
	.text
	.align	2
	.global	show_wrap
	.syntax unified
	.arm
	.fpu softvfp
	.type	show_wrap, %function
show_wrap:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-12]
	b	.L46
.L49:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r1, [r3, #4]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, .L54
	bl	printf
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L48
	mov	r0, #32
	bl	putchar
.L48:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L47:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L49
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L50
	mov	r0, #10
	bl	putchar
.L50:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L46:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bge	.L53
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L47
.L53:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L55:
	.align	2
.L54:
	.word	.LC2
	.size	show_wrap, .-show_wrap
	.section	.rodata
	.align	2
.LC3:
	.ascii	"\012== greedy wrap at %d (score %d) ==\012\012\000"
	.align	2
.LC4:
	.ascii	"\012== balanced wrap at %d (score %d) ==\012\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L59
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L59+4
	ldr	r3, [r3]
	sub	r2, fp, #28
	mov	r1, r2
	mov	r0, r3
	bl	make_word_list
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #80
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-28]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	greedy_wrap
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	ldr	r0, .L59+8
	bl	printf
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	show_wrap
	ldr	r1, [fp, #-28]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	balanced_wrap
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	ldr	r0, .L59+12
	bl	printf
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	show_wrap
	mov	r3, #32
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-28]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	greedy_wrap
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	ldr	r0, .L59+8
	bl	printf
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	show_wrap
	ldr	r1, [fp, #-28]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	balanced_wrap
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	ldr	r0, .L59+12
	bl	printf
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	show_wrap
	mov	r3, #0
	ldr	r2, .L59
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L58
	bl	__stack_chk_fail
.L58:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L60:
	.align	2
.L59:
	.word	.LC5
	.word	string
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
