	.file	"723983.c"
	.intel_syntax noprefix
	.text
	.globl	eater_count
	.bss
	.align 4
	.type	eater_count, @object
	.size	eater_count, 4
eater_count:
	.zero	4
	.globl	all_eaters
	.align 32
	.type	all_eaters, @object
	.size	all_eaters, 80
all_eaters:
	.zero	80
	.text
	.globl	hash_from_eater
	.type	hash_from_eater, @function
hash_from_eater:
.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	DWORD PTR -4[rbp], 0
	jmp	.L2
.L5:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, all_eaters[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L3
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L4
.L3:
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR eater_count[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L5
	mov	eax, -1
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	hash_from_eater, .-hash_from_eater
	.globl	add_eater
	.type	add_eater, @function
add_eater:
.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	BYTE PTR -17[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	hash_from_eater
	mov	BYTE PTR -17[rbp], al
	cmp	BYTE PTR -17[rbp], -1
	jne	.L7
	mov	eax, DWORD PTR eater_count[rip]
	mov	BYTE PTR -17[rbp], al
	mov	ebx, DWORD PTR eater_count[rip]
	lea	eax, 1[rbx]
	mov	DWORD PTR eater_count[rip], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	rcx, rax
	movsx	rax, ebx
	lea	rdx, 0[0+rax*8]
	lea	rax, all_eaters[rip]
	mov	QWORD PTR [rdx+rax], rcx
.L7:
	movzx	eax, BYTE PTR -17[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	add_eater, .-add_eater
	.globl	happiness
	.bss
	.align 32
	.type	happiness, @object
	.size	happiness, 400
happiness:
	.zero	400
	.section	.rodata
	.align 8
.LC0:
	.string	"%s would lose %d happiness units by sitting next to %[^.].\n"
	.align 8
.LC1:
	.string	"%s would gain %d happiness units by sitting next to %[^.].\n"
	.align 8
.LC2:
	.string	"error: cannot parse input string: %s\n"
	.text
	.globl	parse_happiness
	.type	parse_happiness, @function
parse_happiness:
.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 -88[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -68[rbp], 0
	lea	rsi, -32[rbp]
	lea	rcx, -68[rbp]
	lea	rdx, -64[rbp]
	mov	rax, QWORD PTR -88[rbp]
	mov	r8, rsi
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 3
	jne	.L10
	mov	eax, DWORD PTR -68[rbp]
	neg	eax
	mov	DWORD PTR -68[rbp], eax
	jmp	.L11
.L10:
	lea	rsi, -32[rbp]
	lea	rcx, -68[rbp]
	lea	rdx, -64[rbp]
	mov	rax, QWORD PTR -88[rbp]
	mov	r8, rsi
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 3
	je	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -88[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L11:
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	add_eater
	mov	BYTE PTR -70[rbp], al
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	add_eater
	mov	BYTE PTR -69[rbp], al
	movsx	rcx, BYTE PTR -70[rbp]
	movsx	edx, BYTE PTR -69[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	cdqe
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, happiness[rip]
	add	rdx, rax
	mov	eax, DWORD PTR -68[rbp]
	mov	DWORD PTR [rdx], eax
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	parse_happiness, .-parse_happiness
	.globl	final_seating
	.bss
	.align 8
	.type	final_seating, @object
	.size	final_seating, 10
final_seating:
	.zero	10
	.globl	max_happiness
	.align 4
	.type	max_happiness, @object
	.size	max_happiness, 4
max_happiness:
	.zero	4
	.text
	.globl	calculate_happiness
	.type	calculate_happiness, @function
calculate_happiness:
.LFB9:
	.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 -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	rcx, al
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	edx, al
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	cdqe
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, happiness[rip]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	rsi, al
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	edx, al
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	cdqe
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, happiness[rip]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	add	eax, ecx
	add	DWORD PTR -8[rbp], eax
	add	DWORD PTR -4[rbp], 1
.L14:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L15
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	rcx, al
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	edx, al
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	cdqe
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, happiness[rip]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	rsi, al
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	edx, al
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	cdqe
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, happiness[rip]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	add	eax, ecx
	add	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	calculate_happiness, .-calculate_happiness
	.section	.rodata
.LC3:
	.string	"  "
.LC4:
	.string	"%s, "
	.text
	.globl	list_eaters
	.type	list_eaters, @function
list_eaters:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	ecx, DWORD PTR eater_count[rip]
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, all_eaters[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L18:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L19
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	ecx, DWORD PTR eater_count[rip]
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, all_eaters[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	list_eaters, .-list_eaters
	.globl	evaluations
	.bss
	.align 4
	.type	evaluations, @object
	.size	evaluations, 4
evaluations:
	.zero	4
	.text
	.globl	explore_journey
	.type	explore_journey, @function
explore_journey:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jne	.L21
	mov	eax, DWORD PTR evaluations[rip]
	add	eax, 1
	mov	DWORD PTR evaluations[rip], eax
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	calculate_happiness
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR max_happiness[rip]
	cmp	DWORD PTR -4[rbp], eax
	jle	.L25
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR max_happiness[rip], eax
	mov	eax, DWORD PTR -32[rbp]
	add	eax, 1
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, final_seating[rip]
	call	memcpy@PLT
	jmp	.L25
.L21:
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -8[rbp], eax
	jmp	.L23
.L24:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -10[rbp], al
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -8[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -10[rbp]
	mov	BYTE PTR [rdx], al
	mov	eax, DWORD PTR -28[rbp]
	lea	ecx, 1[rax]
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	explore_journey
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -9[rbp], al
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -8[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -9[rbp]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -8[rbp], 1
.L23:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jle	.L24
.L25:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	explore_journey, .-explore_journey
	.section	.rodata
.LC5:
	.string	"hash %d eater %s\n"
	.text
	.globl	dump_eaters
	.type	dump_eaters, @function
dump_eaters:
.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	DWORD PTR -4[rbp], 0
	jmp	.L27
.L28:
	mov	ecx, DWORD PTR eater_count[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, all_eaters[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L27:
	mov	eax, DWORD PTR eater_count[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L28
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	dump_eaters, .-dump_eaters
	.section	.rodata
.LC6:
	.string	"          : "
.LC7:
	.string	"%-7s : "
.LC8:
	.string	": %7s : "
.LC9:
	.string	"%3d"
.LC10:
	.string	"---"
.LC11:
	.string	"%7s : "
	.text
	.globl	dump_happiness_table
	.type	dump_happiness_table, @function
dump_happiness_table:
.LFB13:
	.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
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -48[rbp], 0
	jmp	.L30
.L31:
	mov	ecx, DWORD PTR eater_count[rip]
	mov	eax, DWORD PTR -48[rbp]
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, all_eaters[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -48[rbp], 1
.L30:
	mov	eax, DWORD PTR eater_count[rip]
	cmp	DWORD PTR -48[rbp], eax
	jl	.L31
	mov	edi, 10
	call	putchar@PLT
	mov	DWORD PTR -44[rbp], 0
	jmp	.L32
.L37:
	mov	ecx, DWORD PTR eater_count[rip]
	mov	eax, DWORD PTR -44[rbp]
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, all_eaters[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -40[rbp], 0
	jmp	.L33
.L36:
	mov	eax, DWORD PTR -44[rbp]
	movsx	rcx, eax
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	cdqe
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, happiness[rip]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -36[rbp], eax
	mov	edx, DWORD PTR -36[rbp]
	lea	rax, -32[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	cmp	DWORD PTR -36[rbp], 0
	je	.L34
	lea	rax, -32[rbp]
	jmp	.L35
.L34:
	lea	rax, .LC10[rip]
.L35:
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -40[rbp], 1
.L33:
	mov	eax, DWORD PTR eater_count[rip]
	cmp	DWORD PTR -40[rbp], eax
	jl	.L36
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -44[rbp], 1
.L32:
	mov	eax, DWORD PTR eater_count[rip]
	cmp	DWORD PTR -44[rbp], eax
	jl	.L37
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	dump_happiness_table, .-dump_happiness_table
	.section	.rodata
	.align 8
.LC12:
	.string	" \342\254\207\357\270\217  %3d\n ------ %3d\n \342\254\206\357\270\217  %3d\n"
	.text
	.globl	dump_seating
	.type	dump_seating, @function
dump_seating:
.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, 16
	mov	DWORD PTR -4[rbp], 0
	jmp	.L40
.L41:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, final_seating[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	eax, al
	mov	ecx, DWORD PTR eater_count[rip]
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, all_eaters[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	puts@PLT
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	ecx, DWORD PTR eater_count[rip]
	cdq
	idiv	ecx
	mov	eax, edx
	cdqe
	lea	rdx, final_seating[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	rcx, al
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, final_seating[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	edx, al
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	cdqe
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, happiness[rip]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, final_seating[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	rdi, al
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	esi, DWORD PTR eater_count[rip]
	cdq
	idiv	esi
	mov	eax, edx
	cdqe
	lea	rdx, final_seating[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	edx, al
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	cdqe
	add	rax, rdi
	lea	rdx, 0[0+rax*4]
	lea	rax, happiness[rip]
	add	rax, rdx
	mov	edi, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	esi, DWORD PTR eater_count[rip]
	cdq
	idiv	esi
	mov	eax, edx
	cdqe
	lea	rdx, final_seating[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	rsi, al
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, final_seating[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	edx, al
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	cdqe
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, happiness[rip]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	esi, [rdi+rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, final_seating[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	r8, al
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	edi, DWORD PTR eater_count[rip]
	cdq
	idiv	edi
	mov	eax, edx
	cdqe
	lea	rdx, final_seating[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	edx, al
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	cdqe
	add	rax, r8
	lea	rdx, 0[0+rax*4]
	lea	rax, happiness[rip]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edx, esi
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L40:
	mov	eax, DWORD PTR eater_count[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L41
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	dump_seating, .-dump_seating
	.section	.rodata
	.align 8
.LC13:
	.string	"Part 1: %d evaluations, greatest happiness %d:\n"
.LC14:
	.string	"Warren"
	.align 8
.LC15:
	.string	"Part 2: %d evaluations, greatest happiness %d:\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdin[rip]
	mov	QWORD PTR -160[rbp], rax
	jmp	.L43
.L44:
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	parse_happiness
.L43:
	mov	rdx, QWORD PTR -160[rbp]
	lea	rax, -144[rbp]
	mov	esi, 127
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L44
	mov	eax, DWORD PTR eater_count[rip]
	cdqe
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -152[rbp], rax
	mov	DWORD PTR -172[rbp], 0
	jmp	.L45
.L46:
	mov	eax, DWORD PTR -172[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -172[rbp]
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -172[rbp], 1
.L45:
	mov	eax, DWORD PTR eater_count[rip]
	cmp	DWORD PTR -172[rbp], eax
	jl	.L46
	mov	eax, DWORD PTR eater_count[rip]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -152[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	explore_journey
	mov	edx, DWORD PTR max_happiness[rip]
	mov	eax, DWORD PTR evaluations[rip]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR eater_count[rip]
	sub	eax, 1
	mov	esi, eax
	lea	rdi, final_seating[rip]
	call	list_eaters
	lea	rdi, .LC14[rip]
	call	add_eater
	mov	BYTE PTR -173[rbp], al
	mov	DWORD PTR -168[rbp], 0
	jmp	.L47
.L48:
	mov	eax, DWORD PTR -168[rbp]
	movsx	rcx, eax
	movsx	edx, BYTE PTR -173[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	cdqe
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, happiness[rip]
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	movsx	rcx, BYTE PTR -173[rbp]
	mov	edx, DWORD PTR -168[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	cdqe
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, happiness[rip]
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -168[rbp], 1
.L47:
	mov	eax, DWORD PTR eater_count[rip]
	sub	eax, 1
	cmp	DWORD PTR -168[rbp], eax
	jl	.L48
	mov	DWORD PTR max_happiness[rip], 0
	mov	eax, DWORD PTR eater_count[rip]
	cdqe
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -152[rbp], rax
	mov	DWORD PTR -164[rbp], 0
	jmp	.L49
.L50:
	mov	eax, DWORD PTR -164[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -164[rbp]
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -164[rbp], 1
.L49:
	mov	eax, DWORD PTR eater_count[rip]
	cmp	DWORD PTR -164[rbp], eax
	jl	.L50
	mov	eax, DWORD PTR eater_count[rip]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -152[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	explore_journey
	mov	edx, DWORD PTR max_happiness[rip]
	mov	eax, DWORD PTR evaluations[rip]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR eater_count[rip]
	sub	eax, 1
	mov	esi, eax
	lea	rdi, final_seating[rip]
	call	list_eaters
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L52
	call	__stack_chk_fail@PLT
.L52:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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	"723983.c"
	.text
	.global	eater_count
	.bss
	.align	2
	.type	eater_count, %object
	.size	eater_count, 4
eater_count:
	.space	4
	.comm	all_eaters,40,4
	.text
	.align	2
	.global	hash_from_eater
	.syntax unified
	.arm
	.fpu softvfp
	.type	hash_from_eater, %function
hash_from_eater:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L5:
	ldr	r2, .L6
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-8]
	and	r3, r3, #255
	b	.L4
.L3:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, .L6+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L5
	mov	r3, #255
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	all_eaters
	.word	eater_count
	.size	hash_from_eater, .-hash_from_eater
	.align	2
	.global	add_eater
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_eater, %function
add_eater:
	@ 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]
	mov	r3, #0
	strb	r3, [fp, #-5]
	ldr	r0, [fp, #-16]
	bl	hash_from_eater
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	add_eater, .-add_eater
	.comm	happiness,400,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s would lose %d happiness units by sitting next to"
	.ascii	" %[^.].\012\000"
	.align	2
.LC1:
	.ascii	"%s would gain %d happiness units by sitting next to"
	.ascii	" %[^.].\012\000"
	.align	2
.LC2:
	.ascii	"error: cannot parse input string: %s\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	parse_happiness
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_happiness, %function
parse_happiness:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-64]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-52]
	sub	r1, fp, #52
	sub	r2, fp, #48
	sub	r3, fp, #28
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L14+4
	ldr	r0, [fp, #-64]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #3
	bne	.L11
	ldr	r3, [fp, #-52]
	rsb	r3, r3, #0
	str	r3, [fp, #-52]
	b	.L12
.L11:
	sub	r1, fp, #52
	sub	r2, fp, #48
	sub	r3, fp, #28
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L14+8
	ldr	r0, [fp, #-64]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #3
	beq	.L12
	ldr	r3, .L14+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-64]
	ldr	r1, .L14+16
	mov	r0, r3
	bl	fprintf
.L12:
	sub	r3, fp, #48
	mov	r0, r3
	bl	add_eater
	mov	r3, r0
	strb	r3, [fp, #-54]
	sub	r3, fp, #28
	mov	r0, r3
	bl	add_eater
	mov	r3, r0
	strb	r3, [fp, #-53]
	ldrb	r1, [fp, #-54]	@ zero_extendqisi2
	ldrb	r2, [fp, #-53]	@ zero_extendqisi2
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	lsl	r3, r3, #2
	ldr	r2, .L14+20
	add	r3, r3, r2
	ldr	r2, [fp, #-52]
	str	r2, [r3]
	nop
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	stderr
	.word	.LC2
	.word	happiness
	.size	parse_happiness, .-parse_happiness
	.comm	final_seating,10,4
	.global	max_happiness
	.bss
	.align	2
	.type	max_happiness, %object
	.size	max_happiness, 4
max_happiness:
	.space	4
	.text
	.align	2
	.global	calculate_happiness
	.syntax unified
	.arm
	.fpu softvfp
	.type	calculate_happiness, %function
calculate_happiness:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L17
.L18:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	lsl	r3, r3, #2
	ldr	r2, .L20
	add	r3, r3, r2
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #1
	add	r3, r0, r3
	lsl	r3, r3, #2
	ldr	r1, .L20
	add	r3, r3, r1
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L17:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L18
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	lsl	r3, r3, #2
	ldr	r2, .L20
	add	r3, r3, r2
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #1
	add	r3, r0, r3
	lsl	r3, r3, #2
	ldr	r1, .L20
	add	r3, r3, r1
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L21:
	.align	2
.L20:
	.word	happiness
	.size	calculate_happiness, .-calculate_happiness
	.section	.rodata
	.align	2
.LC4:
	.ascii	"  \000"
	.global	__aeabi_idivmod
	.align	2
.LC5:
	.ascii	"%s, \000"
	.text
	.align	2
	.global	list_eaters
	.syntax unified
	.arm
	.fpu softvfp
	.type	list_eaters, %function
list_eaters:
	@ 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]
	ldr	r0, .L25
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L23
.L24:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L25+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, .L25+8
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L25+12
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L23:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L24
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L25+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, .L25+8
	ldr	r3, [r3, r2, lsl #2]
	mov	r0, r3
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC4
	.word	eater_count
	.word	all_eaters
	.word	.LC5
	.size	list_eaters, .-list_eaters
	.global	evaluations
	.bss
	.align	2
	.type	evaluations, %object
	.size	evaluations, 4
evaluations:
	.space	4
	.text
	.align	2
	.global	explore_journey
	.syntax unified
	.arm
	.fpu softvfp
	.type	explore_journey, %function
explore_journey:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bne	.L28
	ldr	r3, .L33
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L33
	str	r3, [r2]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-24]
	bl	calculate_happiness
	str	r0, [fp, #-8]
	ldr	r3, .L33+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L32
	ldr	r2, .L33+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-24]
	ldr	r0, .L33+8
	bl	memcpy
	b	.L32
.L28:
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	b	.L30
.L31:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-14]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r2, [fp, #-14]
	strb	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	ldr	r2, [fp, #-32]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	explore_journey
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-13]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r2, [fp, #-13]
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L30:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	ble	.L31
.L32:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	evaluations
	.word	max_happiness
	.word	final_seating
	.size	explore_journey, .-explore_journey
	.section	.rodata
	.align	2
.LC6:
	.ascii	"hash %d eater %s\012\000"
	.text
	.align	2
	.global	dump_eaters
	.syntax unified
	.arm
	.fpu softvfp
	.type	dump_eaters, %function
dump_eaters:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L36
.L37:
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, .L38+4
	ldr	r3, [r3, r2, lsl #2]
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, .L38+8
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L36:
	ldr	r3, .L38
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L37
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	eater_count
	.word	all_eaters
	.word	.LC6
	.size	dump_eaters, .-dump_eaters
	.section	.rodata
	.align	2
.LC7:
	.ascii	"          : \000"
	.align	2
.LC8:
	.ascii	"%-7s : \000"
	.align	2
.LC9:
	.ascii	": %7s : \000"
	.align	2
.LC10:
	.ascii	"%3d\000"
	.align	2
.LC11:
	.ascii	"---\000"
	.align	2
.LC12:
	.ascii	"%7s : \000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dump_happiness_table
	.syntax unified
	.arm
	.fpu softvfp
	.type	dump_happiness_table, %function
dump_happiness_table:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L50
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L50+4
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L41
.L42:
	ldr	r3, .L50+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, .L50+12
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L50+16
	bl	printf
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L41:
	ldr	r3, .L50+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L42
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L43
.L48:
	ldr	r3, .L50+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, .L50+12
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L50+20
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L44
.L47:
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, .L50+24
	add	r3, r3, r2
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	sub	r3, fp, #28
	ldr	r2, [fp, #-32]
	ldr	r1, .L50+28
	mov	r0, r3
	bl	sprintf
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L45
	sub	r3, fp, #28
	b	.L46
.L45:
	ldr	r3, .L50+32
.L46:
	mov	r1, r3
	ldr	r0, .L50+36
	bl	printf
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L44:
	ldr	r3, .L50+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L47
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L43:
	ldr	r3, .L50+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L48
	nop
	ldr	r3, .L50
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L49
	bl	__stack_chk_fail
.L49:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L51:
	.align	2
.L50:
	.word	.LC13
	.word	.LC7
	.word	eater_count
	.word	all_eaters
	.word	.LC8
	.word	.LC9
	.word	happiness
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	dump_happiness_table, .-dump_happiness_table
	.section	.rodata
	.align	2
.LC14:
	.ascii	" \342\254\207\357\270\217  %3d\012 ------ %3d\012 \342"
	.ascii	"\254\206\357\270\217  %3d\012\000"
	.text
	.align	2
	.global	dump_seating
	.syntax unified
	.arm
	.fpu softvfp
	.type	dump_seating, %function
dump_seating:
	@ 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
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L53
.L54:
	ldr	r2, .L55
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L55+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, .L55+8
	ldr	r3, [r3, r2, lsl #2]
	mov	r0, r3
	bl	puts
	ldr	r2, .L55
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldr	r2, .L55+4
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, .L55
	ldrb	r3, [r3, r2]	@ zero_extendqisi2
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r4, r3
	lsl	r3, r3, #2
	ldr	r2, .L55+12
	add	r3, r3, r2
	ldr	r5, [r3]
	ldr	r2, .L55
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldr	r2, .L55+4
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, .L55
	ldrb	r3, [r3, r2]	@ zero_extendqisi2
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r4, r3
	lsl	r3, r3, #2
	ldr	r2, .L55+12
	add	r3, r3, r2
	ldr	r4, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldr	r2, .L55+4
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, .L55
	ldrb	r3, [r3, r2]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r2, .L55
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	lsl	r3, r3, #2
	ldr	r2, .L55+12
	add	r3, r3, r2
	ldr	r3, [r3]
	add	r4, r4, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldr	r2, .L55+4
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, .L55
	ldrb	r3, [r3, r2]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r2, .L55
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	lsl	r3, r3, #2
	ldr	r2, .L55+12
	add	r3, r3, r2
	ldr	r3, [r3]
	mov	r2, r4
	mov	r1, r5
	ldr	r0, .L55+16
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L53:
	ldr	r3, .L55+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L54
	nop
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L56:
	.align	2
.L55:
	.word	final_seating
	.word	eater_count
	.word	all_eaters
	.word	happiness
	.word	.LC14
	.size	dump_seating, .-dump_seating
	.section	.rodata
	.align	2
.LC15:
	.ascii	"Part 1: %d evaluations, greatest happiness %d:\012\000"
	.align	2
.LC16:
	.ascii	"Warren\000"
	.align	2
.LC17:
	.ascii	"Part 2: %d evaluations, greatest happiness %d:\012\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #168
	str	r0, [fp, #-168]
	str	r1, [fp, #-172]
	ldr	r3, .L68
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L68+4
	ldr	r3, [r3]
	str	r3, [fp, #-144]
	b	.L58
.L59:
	sub	r3, fp, #136
	mov	r0, r3
	bl	parse_happiness
.L58:
	sub	r3, fp, #136
	ldr	r2, [fp, #-144]
	mov	r1, #127
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L59
	ldr	r3, .L68+8
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-140]
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L60
.L61:
	ldr	r3, [fp, #-156]
	ldr	r2, [fp, #-140]
	add	r3, r2, r3
	ldr	r2, [fp, #-156]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L60:
	ldr	r3, .L68+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-156]
	cmp	r2, r3
	blt	.L61
	ldr	r3, .L68+8
	ldr	r3, [r3]
	sub	r3, r3, #1
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-140]
	bl	explore_journey
	ldr	r3, .L68+12
	ldr	r3, [r3]
	ldr	r2, .L68+16
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L68+20
	bl	printf
	ldr	r3, .L68+8
	ldr	r3, [r3]
	sub	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L68+24
	bl	list_eaters
	ldr	r0, .L68+28
	bl	add_eater
	mov	r3, r0
	strb	r3, [fp, #-157]
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L62
.L63:
	ldrb	r2, [fp, #-157]	@ zero_extendqisi2
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-152]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, .L68+32
	add	r3, r3, r2
	mov	r2, #0
	str	r2, [r3]
	ldrb	r1, [fp, #-157]	@ zero_extendqisi2
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	lsl	r3, r3, #2
	ldr	r2, .L68+32
	add	r3, r3, r2
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L62:
	ldr	r3, .L68+8
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, [fp, #-152]
	cmp	r2, r3
	blt	.L63
	ldr	r3, .L68+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L68+8
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-140]
	mov	r3, #0
	str	r3, [fp, #-148]
	b	.L64
.L65:
	ldr	r3, [fp, #-148]
	ldr	r2, [fp, #-140]
	add	r3, r2, r3
	ldr	r2, [fp, #-148]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-148]
	add	r3, r3, #1
	str	r3, [fp, #-148]
.L64:
	ldr	r3, .L68+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-148]
	cmp	r2, r3
	blt	.L65
	ldr	r3, .L68+8
	ldr	r3, [r3]
	sub	r3, r3, #1
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-140]
	bl	explore_journey
	ldr	r3, .L68+12
	ldr	r3, [r3]
	ldr	r2, .L68+16
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L68+36
	bl	printf
	ldr	r3, .L68+8
	ldr	r3, [r3]
	sub	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L68+24
	bl	list_eaters
	mov	r3, #0
	ldr	r2, .L68
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L67
	bl	__stack_chk_fail
.L67:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L69:
	.align	2
.L68:
	.word	.LC18
	.word	stdin
	.word	eater_count
	.word	evaluations
	.word	max_happiness
	.word	.LC15
	.word	final_seating
	.word	.LC16
	.word	happiness
	.word	.LC17
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
