	.file	"470345.c"
	.intel_syntax noprefix
	.text
	.globl	line_no
	.bss
	.align 4
	.type	line_no, @object
	.size	line_no, 4
line_no:
	.zero	4
	.section	.rodata
	.align 8
.LC0:
	.string	"Unrecognized EPD format on line %u\n"
	.text
	.type	epd_error, @function
epd_error:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, DWORD PTR line_no[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	epd_error, .-epd_error
	.section	.rodata
	.align 8
.LC1:
	.string	"Multiple acn opcodes on line %u\n"
	.text
	.type	epd_error_multi_acn, @function
epd_error_multi_acn:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, DWORD PTR line_no[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE1:
	.size	epd_error_multi_acn, .-epd_error_multi_acn
	.local	engine_in
	.comm	engine_in,20,16
	.local	engine_out
	.comm	engine_out,20,16
	.local	best_moves
	.comm	best_moves,2048,32
	.local	best_move_count
	.comm	best_move_count,4,4
	.local	avoid_moves
	.comm	avoid_moves,2048,32
	.local	avoid_move_count
	.comm	avoid_move_count,4,4
	.local	board
	.comm	board,8,8
	.local	turn
	.comm	turn,8,8
	.local	castle_rights
	.comm	castle_rights,8,8
	.local	ep_target
	.comm	ep_target,8,8
	.local	half_moves
	.comm	half_moves,8,8
	.local	full_moves
	.comm	full_moves,8,8
	.local	id
	.comm	id,8,8
	.data
	.align 8
	.type	default_node_count_limit, @object
	.size	default_node_count_limit, 8
default_node_count_limit:
	.quad	10000000
	.local	node_count_limit
	.comm	node_count_limit,8,8
	.local	engine_command_line
	.comm	engine_command_line,65536,32
	.local	epd_path
	.comm	epd_path,8,8
	.local	engine_path
	.comm	engine_path,8,8
	.local	success_count
	.comm	success_count,4,4
	.section	.rodata
	.align 8
.LC2:
	.string	"Invalid node count on line %u\n"
.LC3:
	.string	"Invalid node count"
	.text
	.type	parse_acn, @function
parse_acn:
.LFB2:
	.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 -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rcx, -24[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	strtoull@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L4
	cmp	QWORD PTR -16[rbp], -1
	je	.L4
	cmp	QWORD PTR -16[rbp], 0
	je	.L4
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	jmp	.L9
.L4:
	mov	eax, DWORD PTR line_no[rip]
	test	eax, eax
	je	.L6
	mov	edx, DWORD PTR line_no[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L7
.L6:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 18
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
.L7:
	mov	edi, 1
	call	exit@PLT
.L9:
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	parse_acn, .-parse_acn
	.section	.rodata
.LC4:
	.string	"bm"
.LC5:
	.string	"am"
.LC6:
	.string	"acn"
.LC7:
	.string	"id"
.LC8:
	.string	" \n"
	.text
	.type	parse_next_opcode, @function
parse_next_opcode:
.LFB3:
	.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	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L11
	mov	eax, 1
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L13
	mov	eax, 2
	jmp	.L12
.L13:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L14
	mov	eax, 3
	jmp	.L12
.L14:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L15
	mov	eax, 4
	jmp	.L12
.L15:
	mov	rax, QWORD PTR half_moves[rip]
	test	rax, rax
	jne	.L16
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[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, 2048
	test	eax, eax
	jne	.L17
	call	epd_error
.L17:
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR half_moves[rip], rax
	lea	rsi, .LC8[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR full_moves[rip], rax
	mov	rax, QWORD PTR full_moves[rip]
	test	rax, rax
	jne	.L18
	call	epd_error
.L18:
	mov	eax, 0
	jmp	.L12
.L16:
	call	epd_error
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	parse_next_opcode, .-parse_next_opcode
	.section	.rodata
.LC9:
	.string	"\""
.LC10:
	.string	"0"
.LC11:
	.string	"1"
	.text
	.type	parse_line, @function
parse_line:
.LFB4:
	.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 -40[rbp], rdi
	mov	QWORD PTR node_count_limit[rip], 0
	mov	DWORD PTR best_move_count[rip], 0
	mov	DWORD PTR avoid_move_count[rip], 0
	mov	QWORD PTR id[rip], 0
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR board[rip], rax
	lea	rsi, .LC8[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR turn[rip], rax
	lea	rsi, .LC8[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR castle_rights[rip], rax
	lea	rsi, .LC8[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR ep_target[rip], rax
	mov	QWORD PTR half_moves[rip], 0
	mov	rax, QWORD PTR ep_target[rip]
	test	rax, rax
	jne	.L20
	call	epd_error
.L20:
	mov	QWORD PTR -24[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	jmp	.L21
.L33:
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 59
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L22
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L35
.L22:
	cmp	DWORD PTR -28[rbp], 3
	je	.L24
	cmp	DWORD PTR -28[rbp], 3
	ja	.L25
	cmp	DWORD PTR -28[rbp], 2
	je	.L26
	cmp	DWORD PTR -28[rbp], 2
	ja	.L25
	cmp	DWORD PTR -28[rbp], 0
	je	.L27
	cmp	DWORD PTR -28[rbp], 1
	je	.L28
	jmp	.L25
.L27:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	parse_next_opcode
	mov	DWORD PTR -28[rbp], eax
	jmp	.L29
.L28:
	mov	eax, DWORD PTR best_move_count[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR best_move_count[rip], edx
	mov	eax, eax
	lea	rcx, 0[0+rax*8]
	lea	rdx, best_moves[rip]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rcx+rdx], rax
	jmp	.L29
.L26:
	mov	eax, DWORD PTR avoid_move_count[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR avoid_move_count[rip], edx
	mov	eax, eax
	lea	rcx, 0[0+rax*8]
	lea	rdx, avoid_moves[rip]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rcx+rdx], rax
	jmp	.L29
.L24:
	mov	rax, QWORD PTR node_count_limit[rip]
	test	rax, rax
	je	.L30
	call	epd_error_multi_acn
.L30:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	parse_acn
	mov	QWORD PTR node_count_limit[rip], rax
	jmp	.L29
.L25:
	call	epd_error
.L29:
	cmp	DWORD PTR -28[rbp], 4
	jne	.L31
	lea	rsi, .LC9[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR id[rip], rax
	mov	rax, QWORD PTR id[rip]
	test	rax, rax
	jne	.L32
	call	epd_error
.L32:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L21
.L31:
	cmp	QWORD PTR -8[rbp], 0
	je	.L21
	mov	DWORD PTR -28[rbp], 0
.L21:
	lea	rsi, .LC8[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L23
	cmp	QWORD PTR -24[rbp], 0
	je	.L33
	jmp	.L23
.L35:
	nop
.L23:
	mov	rax, QWORD PTR half_moves[rip]
	test	rax, rax
	jne	.L36
	lea	rax, .LC10[rip]
	mov	QWORD PTR half_moves[rip], rax
	lea	rax, .LC11[rip]
	mov	QWORD PTR full_moves[rip], rax
.L36:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	parse_line, .-parse_line
	.section	.rodata
.LC12:
	.string	"w"
.LC13:
	.string	"force\n"
.LC14:
	.string	"nopost\n"
.LC15:
	.string	"setboard %s %s %s %s %s %s\n"
.LC16:
	.string	"nps %llu\n"
.LC17:
	.string	"st 1\n"
.LC18:
	.string	"search_sync\n"
	.text
	.type	generate_input, @function
generate_input:
.LFB5:
	.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
	lea	rsi, .LC12[rip]
	lea	rdi, engine_in[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L38
	lea	rdi, engine_in[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L38:
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 6
	mov	esi, 1
	lea	rdi, .LC13[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC14[rip]
	call	fwrite@PLT
	mov	rdi, QWORD PTR full_moves[rip]
	mov	rsi, QWORD PTR half_moves[rip]
	mov	r9, QWORD PTR ep_target[rip]
	mov	r8, QWORD PTR castle_rights[rip]
	mov	rcx, QWORD PTR turn[rip]
	mov	rdx, QWORD PTR board[rip]
	mov	rax, QWORD PTR -8[rbp]
	push	rdi
	push	rsi
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	rsp, 16
	mov	rdx, QWORD PTR node_count_limit[rip]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 5
	mov	esi, 1
	lea	rdi, .LC17[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 12
	mov	esi, 1
	lea	rdi, .LC18[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	generate_input, .-generate_input
	.section	.rodata
.LC19:
	.string	"--acn"
.LC20:
	.string	"--engine"
.LC21:
	.string	"--epd"
.LC22:
	.string	"./taltos"
	.text
	.type	process_args, @function
process_args:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	add	QWORD PTR -8[rbp], 8
	jmp	.L40
.L45:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L41
	add	QWORD PTR -8[rbp], 8
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	parse_acn
	mov	QWORD PTR default_node_count_limit[rip], rax
	jmp	.L42
.L41:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L43
	add	QWORD PTR -8[rbp], 8
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR engine_path[rip], rax
	jmp	.L42
.L43:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L44
	add	QWORD PTR -8[rbp], 8
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR epd_path[rip], rax
	jmp	.L42
.L44:
	mov	edi, 2
	call	exit@PLT
.L42:
	add	QWORD PTR -8[rbp], 8
.L40:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L45
	mov	rax, QWORD PTR engine_path[rip]
	test	rax, rax
	jne	.L47
	lea	rax, .LC22[rip]
	mov	QWORD PTR engine_path[rip], rax
.L47:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	process_args, .-process_args
	.section	.rodata
.LC23:
	.string	"#%u "
.LC24:
	.string	"\"%s\" "
.LC25:
	.string	": %s"
	.text
	.type	print_result, @function
print_result:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, DWORD PTR line_no[rip]
	mov	esi, eax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR id[rip]
	test	rax, rax
	je	.L49
	mov	rax, QWORD PTR id[rip]
	mov	rsi, rax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
.L49:
	mov	rdx, QWORD PTR stdout[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	cmp	QWORD PTR -16[rbp], 0
	je	.L50
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
.L50:
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	print_result, .-print_result
	.section	.rodata
.LC26:
	.string	"success"
	.text
	.type	print_success, @function
print_success:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	eax, DWORD PTR success_count[rip]
	add	eax, 1
	mov	DWORD PTR success_count[rip], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC26[rip]
	call	print_result
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	print_success, .-print_success
	.section	.rodata
.LC27:
	.string	"fail"
	.text
	.type	print_fail, @function
print_fail:
.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	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC27[rip]
	call	print_result
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	print_fail, .-print_fail
	.type	check_output_line, @function
check_output_line:
.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	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strtok@PLT
	test	rax, rax
	jne	.L54
	mov	eax, -1
	jmp	.L55
.L54:
	mov	rax, QWORD PTR turn[rip]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	tolower@PLT
	cmp	eax, 98
	jne	.L56
	lea	rsi, .LC8[rip]
	mov	edi, 0
	call	strtok@PLT
	test	rax, rax
	jne	.L56
	mov	eax, -1
	jmp	.L55
.L56:
	lea	rsi, .LC8[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L57
	mov	eax, -1
	jmp	.L55
.L57:
	mov	eax, DWORD PTR best_move_count[rip]
	test	eax, eax
	je	.L58
	mov	DWORD PTR -16[rbp], 0
	jmp	.L59
.L61:
	mov	eax, DWORD PTR -16[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, best_moves[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L60
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	print_success
	mov	eax, 0
	jmp	.L55
.L60:
	add	DWORD PTR -16[rbp], 1
.L59:
	mov	eax, DWORD PTR best_move_count[rip]
	cmp	DWORD PTR -16[rbp], eax
	jb	.L61
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	print_fail
	jmp	.L62
.L58:
	mov	eax, DWORD PTR avoid_move_count[rip]
	test	eax, eax
	je	.L63
	mov	DWORD PTR -12[rbp], 0
	jmp	.L64
.L66:
	mov	eax, DWORD PTR -12[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, avoid_moves[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L65
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	print_fail
	mov	eax, 0
	jmp	.L55
.L65:
	add	DWORD PTR -12[rbp], 1
.L64:
	mov	eax, DWORD PTR avoid_move_count[rip]
	cmp	DWORD PTR -12[rbp], eax
	jb	.L66
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	print_success
	jmp	.L62
.L63:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	print_success
.L62:
	mov	eax, 0
.L55:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	check_output_line, .-check_output_line
	.section	.rodata
.LC28:
	.string	"r"
.LC29:
	.string	"checking output"
.LC30:
	.string	"fail: invalid output"
	.text
	.type	check_output, @function
check_output:
.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, 288
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	lea	rsi, .LC28[rip]
	lea	rdi, engine_out[rip]
	call	fopen@PLT
	mov	QWORD PTR -280[rbp], rax
	cmp	QWORD PTR -280[rbp], 0
	jne	.L68
	lea	rdi, engine_out[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L68:
	mov	rdx, QWORD PTR -280[rbp]
	lea	rax, -272[rbp]
	mov	esi, 256
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L69
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L69
	lea	rdi, .LC29[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L69:
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	check_output_line
	test	eax, eax
	je	.L70
	mov	esi, 0
	lea	rdi, .LC30[rip]
	call	print_result
.L70:
	mov	rax, QWORD PTR -280[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L71
	call	__stack_chk_fail@PLT
.L71:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	check_output, .-check_output
	.section	.rodata
.LC31:
	.string	"%s < %s > %s"
.LC32:
	.string	"%u / %u\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 304
	mov	DWORD PTR -292[rbp], edi
	mov	QWORD PTR -304[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 -280[rbp], rax
	mov	rax, QWORD PTR -304[rbp]
	mov	rdi, rax
	call	process_args
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR epd_path[rip]
	test	rax, rax
	je	.L73
	mov	rax, QWORD PTR epd_path[rip]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -280[rbp], rax
	cmp	QWORD PTR -280[rbp], 0
	jne	.L73
	mov	rax, QWORD PTR epd_path[rip]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L73:
	lea	rdi, engine_in[rip]
	call	tmpnam@PLT
	test	rax, rax
	jne	.L74
	call	abort@PLT
.L74:
	lea	rdi, engine_out[rip]
	call	tmpnam@PLT
	test	rax, rax
	jne	.L75
	call	abort@PLT
.L75:
	mov	rax, QWORD PTR engine_path[rip]
	lea	r9, engine_out[rip]
	lea	r8, engine_in[rip]
	mov	rcx, rax
	lea	rdx, .LC31[rip]
	mov	esi, 65536
	lea	rdi, engine_command_line[rip]
	mov	eax, 0
	call	snprintf@PLT
	mov	DWORD PTR line_no[rip], 1
	jmp	.L76
.L81:
	mov	BYTE PTR -17[rbp], 0
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	parse_line
	mov	rax, QWORD PTR node_count_limit[rip]
	test	rax, rax
	jne	.L77
	mov	rax, QWORD PTR default_node_count_limit[rip]
	mov	QWORD PTR node_count_limit[rip], rax
.L77:
	mov	eax, DWORD PTR best_move_count[rip]
	test	eax, eax
	jne	.L78
	mov	eax, DWORD PTR avoid_move_count[rip]
	test	eax, eax
	je	.L79
.L78:
	call	generate_input
	lea	rdi, engine_command_line[rip]
	call	system@PLT
	test	eax, eax
	je	.L80
	mov	edi, 1
	call	exit@PLT
.L80:
	call	check_output
.L79:
	mov	eax, DWORD PTR line_no[rip]
	add	eax, 1
	mov	DWORD PTR line_no[rip], eax
.L76:
	mov	rdx, QWORD PTR -280[rbp]
	lea	rax, -272[rbp]
	mov	esi, 256
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L81
	mov	eax, DWORD PTR line_no[rip]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR success_count[rip]
	mov	esi, eax
	lea	rdi, .LC32[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L83
	call	__stack_chk_fail@PLT
.L83:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	"470345.c"
	.text
	.comm	line_no,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Unrecognized EPD format on line %u\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	epd_error, %function
epd_error:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L2
	ldr	r3, [r3]
	ldr	r2, .L2+4
	ldr	r2, [r2]
	ldr	r1, .L2+8
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	.align	2
.L2:
	.word	stderr
	.word	line_no
	.word	.LC0
	.size	epd_error, .-epd_error
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Multiple acn opcodes on line %u\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	epd_error_multi_acn, %function
epd_error_multi_acn:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L5
	ldr	r3, [r3]
	ldr	r2, .L5+4
	ldr	r2, [r2]
	ldr	r1, .L5+8
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L6:
	.align	2
.L5:
	.word	stderr
	.word	line_no
	.word	.LC1
	.size	epd_error_multi_acn, .-epd_error_multi_acn
	.local	engine_in
	.comm	engine_in,20,4
	.local	engine_out
	.comm	engine_out,20,4
	.local	best_moves
	.comm	best_moves,1024,4
	.local	best_move_count
	.comm	best_move_count,4,4
	.local	avoid_moves
	.comm	avoid_moves,1024,4
	.local	avoid_move_count
	.comm	avoid_move_count,4,4
	.local	board
	.comm	board,4,4
	.local	turn
	.comm	turn,4,4
	.local	castle_rights
	.comm	castle_rights,4,4
	.local	ep_target
	.comm	ep_target,4,4
	.local	half_moves
	.comm	half_moves,4,4
	.local	full_moves
	.comm	full_moves,4,4
	.local	id
	.comm	id,4,4
	.data
	.align	3
	.type	default_node_count_limit, %object
	.size	default_node_count_limit, 8
default_node_count_limit:
	.word	10000000
	.word	0
	.local	node_count_limit
	.comm	node_count_limit,8,8
	.local	engine_command_line
	.comm	engine_command_line,65536,4
	.local	epd_path
	.comm	epd_path,4,4
	.local	engine_path
	.comm	engine_path,4,4
	.local	success_count
	.comm	success_count,4,4
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Invalid node count on line %u\012\000"
	.align	2
.LC3:
	.ascii	"Invalid node count\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_acn, %function
parse_acn:
	@ 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, #-32]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	strtoull
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L8
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	mvn	r0, #0
	mvn	r1, #0
	cmp	r3, r1
	cmpeq	r2, r0
	beq	.L8
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	beq	.L8
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	ldr	r1, .L14
	ldr	r0, [r1]
	ldr	r1, [fp, #-8]
	eors	r0, r1, r0
	mov	r1, #0
	beq	.L12
	b	.L13
.L8:
	ldr	r3, .L14+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L14+8
	ldr	r3, [r3]
	ldr	r2, .L14+4
	ldr	r2, [r2]
	ldr	r1, .L14+12
	mov	r0, r3
	bl	fprintf
	b	.L11
.L10:
	ldr	r3, .L14+8
	ldr	r3, [r3]
	mov	r2, #18
	mov	r1, #1
	ldr	r0, .L14+16
	bl	fwrite
.L11:
	mov	r0, #1
	bl	exit
.L13:
	bl	__stack_chk_fail
.L12:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC4
	.word	line_no
	.word	stderr
	.word	.LC2
	.word	.LC3
	.size	parse_acn, .-parse_acn
	.section	.rodata
	.align	2
.LC5:
	.ascii	"bm\000"
	.align	2
.LC6:
	.ascii	"am\000"
	.align	2
.LC7:
	.ascii	"acn\000"
	.align	2
.LC8:
	.ascii	"id\000"
	.align	2
.LC9:
	.ascii	" \012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_next_opcode, %function
parse_next_opcode:
	@ 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	r1, .L25
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	mov	r3, #1
	b	.L18
.L17:
	ldr	r1, .L25+4
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L19
	mov	r3, #2
	b	.L18
.L19:
	ldr	r1, .L25+8
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L20
	mov	r3, #3
	b	.L18
.L20:
	ldr	r1, .L25+12
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L21
	mov	r3, #4
	b	.L18
.L21:
	ldr	r3, .L25+16
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L22
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L23
	bl	epd_error
.L23:
	ldr	r2, .L25+16
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r1, .L25+20
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	ldr	r2, .L25+24
	str	r3, [r2]
	ldr	r3, .L25+24
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L24
	bl	epd_error
.L24:
	mov	r3, #0
	b	.L18
.L22:
	bl	epd_error
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	half_moves
	.word	.LC9
	.word	full_moves
	.size	parse_next_opcode, .-parse_next_opcode
	.section	.rodata
	.align	2
.LC10:
	.ascii	"\"\000"
	.align	2
.LC11:
	.ascii	"0\000"
	.align	2
.LC12:
	.ascii	"1\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_line, %function
parse_line:
	@ 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, #-24]
	ldr	r1, .L46
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	ldr	r3, .L46+4
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L46+8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L46+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, .L46+16
	ldr	r0, [fp, #-24]
	bl	strtok
	mov	r3, r0
	ldr	r2, .L46+20
	str	r3, [r2]
	ldr	r1, .L46+16
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	ldr	r2, .L46+24
	str	r3, [r2]
	ldr	r1, .L46+16
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	ldr	r2, .L46+28
	str	r3, [r2]
	ldr	r1, .L46+16
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	ldr	r2, .L46+32
	str	r3, [r2]
	ldr	r3, .L46+36
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L46+32
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L28
	bl	epd_error
.L28:
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L29
.L42:
	mov	r1, #59
	ldr	r0, [fp, #-12]
	bl	strchr
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L30
	ldr	r3, [fp, #-8]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L44
.L30:
	ldr	r3, [fp, #-20]
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L32
.L34:
	.word	.L37
	.word	.L36
	.word	.L35
	.word	.L33
.L37:
	ldr	r0, [fp, #-12]
	bl	parse_next_opcode
	str	r0, [fp, #-20]
	b	.L38
.L36:
	ldr	r3, .L46+4
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L46+4
	str	r2, [r1]
	ldr	r1, .L46+40
	ldr	r2, [fp, #-12]
	str	r2, [r1, r3, lsl #2]
	b	.L38
.L35:
	ldr	r3, .L46+8
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L46+8
	str	r2, [r1]
	ldr	r1, .L46+44
	ldr	r2, [fp, #-12]
	str	r2, [r1, r3, lsl #2]
	b	.L38
.L33:
	ldr	r3, .L46
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	beq	.L39
	bl	epd_error_multi_acn
.L39:
	ldr	r0, [fp, #-12]
	bl	parse_acn
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L46
	stm	r1, {r2-r3}
	b	.L38
.L32:
	bl	epd_error
.L38:
	ldr	r3, [fp, #-20]
	cmp	r3, #4
	bne	.L40
	ldr	r1, .L46+48
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	ldr	r2, .L46+12
	str	r3, [r2]
	ldr	r3, .L46+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L41
	bl	epd_error
.L41:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L29
.L40:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L29
	mov	r3, #0
	str	r3, [fp, #-20]
.L29:
	ldr	r1, .L46+16
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L31
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L42
	b	.L31
.L44:
	nop
.L31:
	ldr	r3, .L46+36
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L45
	ldr	r3, .L46+36
	ldr	r2, .L46+52
	str	r2, [r3]
	ldr	r3, .L46+56
	ldr	r2, .L46+60
	str	r2, [r3]
.L45:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L47:
	.align	2
.L46:
	.word	node_count_limit
	.word	best_move_count
	.word	avoid_move_count
	.word	id
	.word	.LC9
	.word	board
	.word	turn
	.word	castle_rights
	.word	ep_target
	.word	half_moves
	.word	best_moves
	.word	avoid_moves
	.word	.LC10
	.word	.LC11
	.word	full_moves
	.word	.LC12
	.size	parse_line, .-parse_line
	.section	.rodata
	.align	2
.LC13:
	.ascii	"w\000"
	.align	2
.LC14:
	.ascii	"force\012\000"
	.align	2
.LC15:
	.ascii	"nopost\012\000"
	.align	2
.LC16:
	.ascii	"setboard %s %s %s %s %s %s\012\000"
	.align	2
.LC17:
	.ascii	"nps %llu\012\000"
	.align	2
.LC18:
	.ascii	"st 1\012\000"
	.align	2
.LC19:
	.ascii	"search_sync\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	generate_input, %function
generate_input:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r1, .L50
	ldr	r0, .L50+4
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L49
	ldr	r0, .L50+4
	bl	perror
	mov	r0, #1
	bl	exit
.L49:
	ldr	r3, [fp, #-8]
	mov	r2, #6
	mov	r1, #1
	ldr	r0, .L50+8
	bl	fwrite
	ldr	r3, [fp, #-8]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L50+12
	bl	fwrite
	ldr	r3, .L50+16
	ldr	ip, [r3]
	ldr	r3, .L50+20
	ldr	lr, [r3]
	ldr	r3, .L50+24
	ldr	r3, [r3]
	ldr	r2, .L50+28
	ldr	r2, [r2]
	ldr	r1, .L50+32
	ldr	r1, [r1]
	ldr	r0, .L50+36
	ldr	r0, [r0]
	str	r0, [sp, #12]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, lr
	mov	r2, ip
	ldr	r1, .L50+40
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, .L50+44
	ldmia	r3, {r2-r3}
	ldr	r1, .L50+48
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-8]
	mov	r2, #5
	mov	r1, #1
	ldr	r0, .L50+52
	bl	fwrite
	ldr	r3, [fp, #-8]
	mov	r2, #12
	mov	r1, #1
	ldr	r0, .L50+56
	bl	fwrite
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L51:
	.align	2
.L50:
	.word	.LC13
	.word	engine_in
	.word	.LC14
	.word	.LC15
	.word	board
	.word	turn
	.word	castle_rights
	.word	ep_target
	.word	half_moves
	.word	full_moves
	.word	.LC16
	.word	node_count_limit
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.size	generate_input, .-generate_input
	.section	.rodata
	.align	2
.LC20:
	.ascii	"--acn\000"
	.align	2
.LC21:
	.ascii	"--engine\000"
	.align	2
.LC22:
	.ascii	"--epd\000"
	.align	2
.LC23:
	.ascii	"./taltos\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_args, %function
process_args:
	@ 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]
	add	r3, r3, #4
	str	r3, [fp, #-8]
	b	.L53
.L58:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r1, .L61
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L54
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	parse_acn
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L61+4
	stm	r1, {r2-r3}
	b	.L55
.L54:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r1, .L61+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L56
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, .L61+12
	str	r3, [r2]
	b	.L55
.L56:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r1, .L61+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L57
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, .L61+20
	str	r3, [r2]
	b	.L55
.L57:
	mov	r0, #2
	bl	exit
.L55:
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	str	r3, [fp, #-8]
.L53:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L58
	ldr	r3, .L61+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L60
	ldr	r3, .L61+12
	ldr	r2, .L61+24
	str	r2, [r3]
.L60:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L62:
	.align	2
.L61:
	.word	.LC20
	.word	default_node_count_limit
	.word	.LC21
	.word	engine_path
	.word	.LC22
	.word	epd_path
	.word	.LC23
	.size	process_args, .-process_args
	.section	.rodata
	.align	2
.LC24:
	.ascii	"#%u \000"
	.align	2
.LC25:
	.ascii	"\"%s\" \000"
	.align	2
.LC26:
	.ascii	": %s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_result, %function
print_result:
	@ 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, .L66
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L66+4
	bl	printf
	ldr	r3, .L66+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L64
	ldr	r3, .L66+8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L66+12
	bl	printf
.L64:
	ldr	r3, .L66+16
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fputs
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L65
	ldr	r1, [fp, #-12]
	ldr	r0, .L66+20
	bl	printf
.L65:
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L67:
	.align	2
.L66:
	.word	line_no
	.word	.LC24
	.word	id
	.word	.LC25
	.word	stdout
	.word	.LC26
	.size	print_result, .-print_result
	.section	.rodata
	.align	2
.LC27:
	.ascii	"success\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_success, %function
print_success:
	@ 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, .L69
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L69
	str	r3, [r2]
	ldr	r1, [fp, #-8]
	ldr	r0, .L69+4
	bl	print_result
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L70:
	.align	2
.L69:
	.word	success_count
	.word	.LC27
	.size	print_success, .-print_success
	.section	.rodata
	.align	2
.LC28:
	.ascii	"fail\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_fail, %function
print_fail:
	@ 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	r1, [fp, #-8]
	ldr	r0, .L72
	bl	print_result
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L73:
	.align	2
.L72:
	.word	.LC28
	.size	print_fail, .-print_fail
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_output_line, %function
check_output_line:
	@ 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, #-24]
	ldr	r1, .L88
	ldr	r0, [fp, #-24]
	bl	strtok
	mov	r3, r0
	cmp	r3, #0
	bne	.L75
	mvn	r3, #0
	b	.L76
.L75:
	ldr	r3, .L88+4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	tolower
	mov	r3, r0
	cmp	r3, #98
	bne	.L77
	ldr	r1, .L88
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	cmp	r3, #0
	bne	.L77
	mvn	r3, #0
	b	.L76
.L77:
	ldr	r1, .L88
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L78
	mvn	r3, #0
	b	.L76
.L78:
	ldr	r3, .L88+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L79
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L80
.L82:
	ldr	r2, .L88+12
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L81
	ldr	r0, [fp, #-8]
	bl	print_success
	mov	r3, #0
	b	.L76
.L81:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L80:
	ldr	r3, .L88+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bcc	.L82
	ldr	r0, [fp, #-8]
	bl	print_fail
	b	.L83
.L79:
	ldr	r3, .L88+16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L84
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L85
.L87:
	ldr	r2, .L88+20
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L86
	ldr	r0, [fp, #-8]
	bl	print_fail
	mov	r3, #0
	b	.L76
.L86:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L85:
	ldr	r3, .L88+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bcc	.L87
	ldr	r0, [fp, #-8]
	bl	print_success
	b	.L83
.L84:
	ldr	r0, [fp, #-8]
	bl	print_success
.L83:
	mov	r3, #0
.L76:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L89:
	.align	2
.L88:
	.word	.LC9
	.word	turn
	.word	best_move_count
	.word	best_moves
	.word	avoid_move_count
	.word	avoid_moves
	.size	check_output_line, .-check_output_line
	.section	.rodata
	.align	2
.LC29:
	.ascii	"r\000"
	.align	2
.LC30:
	.ascii	"checking output\000"
	.align	2
.LC31:
	.ascii	"fail: invalid output\000"
	.align	2
.LC32:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_output, %function
check_output:
	@ args = 0, pretend = 0, frame = 264
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #264
	ldr	r3, .L95
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, .L95+4
	ldr	r0, .L95+8
	bl	fopen
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	bne	.L91
	ldr	r0, .L95+8
	bl	perror
	mov	r0, #1
	bl	exit
.L91:
	sub	r3, fp, #264
	ldr	r2, [fp, #-268]
	mov	r1, #256
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L92
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L92
	ldr	r0, .L95+12
	bl	perror
	mov	r0, #1
	bl	exit
.L92:
	sub	r3, fp, #264
	mov	r0, r3
	bl	check_output_line
	mov	r3, r0
	cmp	r3, #0
	beq	.L93
	mov	r1, #0
	ldr	r0, .L95+16
	bl	print_result
.L93:
	ldr	r0, [fp, #-268]
	bl	fclose
	nop
	ldr	r3, .L95
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L94
	bl	__stack_chk_fail
.L94:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L96:
	.align	2
.L95:
	.word	.LC32
	.word	.LC29
	.word	engine_out
	.word	.LC30
	.word	.LC31
	.size	check_output, .-check_output
	.section	.rodata
	.align	2
.LC33:
	.ascii	"%s < %s > %s\000"
	.align	2
.LC34:
	.ascii	"%u / %u\012\000"
	.align	2
.LC35:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 272
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #280
	str	r0, [fp, #-272]
	str	r1, [fp, #-276]
	ldr	r3, .L109
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L109+4
	ldr	r3, [r3]
	str	r3, [fp, #-268]
	ldr	r0, [fp, #-276]
	bl	process_args
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L109+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L98
	ldr	r3, .L109+8
	ldr	r3, [r3]
	ldr	r1, .L109+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	bne	.L98
	ldr	r3, .L109+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r0, #1
	bl	exit
.L98:
	ldr	r0, .L109+16
	bl	tmpnam
	mov	r3, r0
	cmp	r3, #0
	bne	.L99
	bl	abort
.L99:
	ldr	r0, .L109+20
	bl	tmpnam
	mov	r3, r0
	cmp	r3, #0
	bne	.L100
	bl	abort
.L100:
	ldr	r3, .L109+24
	ldr	r3, [r3]
	ldr	r2, .L109+20
	str	r2, [sp, #4]
	ldr	r2, .L109+16
	str	r2, [sp]
	ldr	r2, .L109+28
	mov	r1, #65536
	ldr	r0, .L109+32
	bl	snprintf
	ldr	r3, .L109+36
	mov	r2, #1
	str	r2, [r3]
	b	.L101
.L106:
	mov	r3, #0
	strb	r3, [fp, #-9]
	sub	r3, fp, #264
	mov	r0, r3
	bl	parse_line
	ldr	r3, .L109+40
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	bne	.L102
	ldr	r3, .L109+44
	ldmia	r3, {r2-r3}
	ldr	r1, .L109+40
	stm	r1, {r2-r3}
.L102:
	ldr	r3, .L109+48
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L103
	ldr	r3, .L109+52
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L104
.L103:
	bl	generate_input
	ldr	r0, .L109+32
	bl	system
	mov	r3, r0
	cmp	r3, #0
	beq	.L105
	mov	r0, #1
	bl	exit
.L105:
	bl	check_output
.L104:
	ldr	r3, .L109+36
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L109+36
	str	r3, [r2]
.L101:
	sub	r3, fp, #264
	ldr	r2, [fp, #-268]
	mov	r1, #256
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L106
	ldr	r3, .L109+56
	ldr	r1, [r3]
	ldr	r3, .L109+36
	ldr	r3, [r3]
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r0, .L109+60
	bl	printf
	mov	r3, #0
	ldr	r2, .L109
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L108
	bl	__stack_chk_fail
.L108:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L110:
	.align	2
.L109:
	.word	.LC35
	.word	stdin
	.word	epd_path
	.word	.LC29
	.word	engine_in
	.word	engine_out
	.word	engine_path
	.word	.LC33
	.word	engine_command_line
	.word	line_no
	.word	node_count_limit
	.word	default_node_count_limit
	.word	best_move_count
	.word	avoid_move_count
	.word	success_count
	.word	.LC34
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
