Program: checkers

x86 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$208, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	$0, -84(%rbp)
	movl	%edi, -88(%rbp)
	movq	%rsi, -96(%rbp)
	movq	_infile(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_libmin_mopen
	movl	$64, %edi
	callq	_libmin_malloc
	movq	%rax, -104(%rbp)
	movq	-104(%rbp), %rdi
	callq	_fill_print_initial
	movq	-104(%rbp), %rdi
	callq	_print_board
	movl	$1, -108(%rbp)
	movl	$1, -112(%rbp)
	leaq	-80(%rbp), %rdi
	movq	_infile(%rip), %rdx
	movl	$64, %esi
	callq	_libmin_mgets
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	leaq	-80(%rbp), %rdi
	leaq	L_.str.2(%rip), %rsi
	leaq	-117(%rbp), %rdx
	leaq	-118(%rbp), %rcx
	leaq	-119(%rbp), %r8
	leaq	-120(%rbp), %r9
	movb	$0, %al
	callq	_libmin_sscanf
	cmpl	$4, %eax
	jne	LBB0_14
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-104(%rbp), %rdi
	movb	-117(%rbp), %sil
	movb	-118(%rbp), %dl
	movb	-119(%rbp), %cl
	movb	-120(%rbp), %al
	movl	-108(%rbp), %r9d
	movsbl	%sil, %esi
	movsbl	%dl, %edx
	movsbl	%cl, %ecx
	movsbl	%al, %r8d
	callq	_check_move_error_1_to_5
	movl	%eax, -116(%rbp)
	cmpl	$0, -116(%rbp)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-116(%rbp), %edi
	callq	_print_error_message
	movl	-116(%rbp), %edi
	callq	_libmin_fail
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-104(%rbp), %rdi
	movb	-117(%rbp), %dl
	movb	-118(%rbp), %al
	movl	-108(%rbp), %r8d
	leaq	_main.valid_moves(%rip), %rcx
	movsbl	%dl, %esi
	movsbl	%al, %edx
	callq	_all_possible_moves
	movl	%eax, -124(%rbp)
	movl	$1, -128(%rbp)
	movl	$0, -132(%rbp)
LBB0_5:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	-132(%rbp), %eax
	cmpl	-124(%rbp), %eax
	jge	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movslq	-132(%rbp), %rcx
	leaq	_main.valid_moves(%rip), %rax
	movsbl	(%rax,%rcx,2), %eax
	movsbl	-119(%rbp), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movslq	-132(%rbp), %rcx
	leaq	_main.valid_moves(%rip), %rax
	movsbl	1(%rax,%rcx,2), %eax
	movsbl	-120(%rbp), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	$0, -128(%rbp)
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	jmp	LBB0_10
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	-132(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -132(%rbp)
	jmp	LBB0_5
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, -128(%rbp)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$6, %edi
	callq	_print_error_message
	movl	$6, %edi
	callq	_libmin_fail
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-104(%rbp), %rdi
	movb	-117(%rbp), %dl
	movb	-118(%rbp), %cl
	movb	-119(%rbp), %al
	movsbl	%dl, %esi
	movsbl	%cl, %edx
	movsbl	%al, %ecx
	movsbl	-120(%rbp), %r8d
	callq	_change_board
	movl	-108(%rbp), %esi
	movq	-104(%rbp), %rdx
	movsbl	-117(%rbp), %ecx
	movsbl	-118(%rbp), %r8d
	movsbl	-119(%rbp), %r9d
	movsbl	-120(%rbp), %r10d
	movl	-112(%rbp), %eax
	xorl	%edi, %edi
	movl	%r10d, (%rsp)
	movl	%eax, 8(%rsp)
	callq	_print_move_information
	movq	-104(%rbp), %rdi
	callq	_print_board
	cmpl	$0, -108(%rbp)
	setne	%al
	xorb	$-1, %al
	andb	$1, %al
	movzbl	%al, %eax
	movl	%eax, -108(%rbp)
	movl	-112(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -112(%rbp)
	leaq	-80(%rbp), %rdi
	movq	_infile(%rip), %rdx
	movl	$64, %esi
	callq	_libmin_mgets
	jmp	LBB0_1
LBB0_14:
	movb	-117(%rbp), %al
	movb	%al, -133(%rbp)
	movl	$0, -140(%rbp)
	movsbl	-133(%rbp), %eax
	cmpl	$65, %eax
	jne	LBB0_16
## %bb.15:
	movl	$1, -140(%rbp)
LBB0_16:
	movsbl	-133(%rbp), %eax
	cmpl	$80, %eax
	jne	LBB0_18
## %bb.17:
	movl	$100, -140(%rbp)
LBB0_18:
	movl	$0, -144(%rbp)
LBB0_19:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_21 Depth 2
                                        ##       Child Loop BB0_23 Depth 3
                                        ##     Child Loop BB0_34 Depth 2
	movl	-144(%rbp), %eax
	cmpl	-140(%rbp), %eax
	jge	LBB0_41
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	$96, %edi
	callq	_libmin_malloc
	movq	%rax, -152(%rbp)
	movq	-152(%rbp), %rax
	movl	$0, (%rax)
	movl	$0, -156(%rbp)
LBB0_21:                                ##   Parent Loop BB0_19 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_23 Depth 3
	cmpl	$8, -156(%rbp)
	jge	LBB0_28
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=2
	movl	$0, -160(%rbp)
LBB0_23:                                ##   Parent Loop BB0_19 Depth=1
                                        ##     Parent Loop BB0_21 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpl	$8, -160(%rbp)
	jge	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=3
	movq	-104(%rbp), %rax
	movslq	-156(%rbp), %rcx
	shlq	$3, %rcx
	addq	%rcx, %rax
	movslq	-160(%rbp), %rcx
	movb	(%rax,%rcx), %dl
	movq	-152(%rbp), %rax
	addq	$8, %rax
	movslq	-156(%rbp), %rcx
	shlq	$3, %rcx
	addq	%rcx, %rax
	movslq	-160(%rbp), %rcx
	movb	%dl, (%rax,%rcx)
## %bb.25:                              ##   in Loop: Header=BB0_23 Depth=3
	movl	-160(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -160(%rbp)
	jmp	LBB0_23
LBB0_26:                                ##   in Loop: Header=BB0_21 Depth=2
	jmp	LBB0_27
LBB0_27:                                ##   in Loop: Header=BB0_21 Depth=2
	movl	-156(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -156(%rbp)
	jmp	LBB0_21
LBB0_28:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	-108(%rbp), %ecx
	movq	-152(%rbp), %rax
	movl	%ecx, 72(%rax)
	movq	-152(%rbp), %rax
	movl	$0, 76(%rax)
	movq	-152(%rbp), %rax
	movq	_initial_children@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	%rdx, 80(%rax)
	movq	8(%rcx), %rcx
	movq	%rcx, 88(%rax)
	movq	-152(%rbp), %rdi
	callq	_generate_tree_depth_3
	movq	-152(%rbp), %rax
	cmpl	$0, 76(%rax)
	jne	LBB0_33
## %bb.29:                              ##   in Loop: Header=BB0_19 Depth=1
	cmpl	$0, -108(%rbp)
	je	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_19 Depth=1
	leaq	L_.str.3(%rip), %rdi
	movq	_WHITE@GOTPCREL(%rip), %rsi
	movb	$0, %al
	callq	_libmin_printf
	callq	_libmin_success
	jmp	LBB0_32
LBB0_31:                                ##   in Loop: Header=BB0_19 Depth=1
	leaq	L_.str.3(%rip), %rdi
	movq	_BLACK@GOTPCREL(%rip), %rsi
	movb	$0, %al
	callq	_libmin_printf
	callq	_libmin_success
LBB0_32:                                ##   in Loop: Header=BB0_19 Depth=1
	jmp	LBB0_33
LBB0_33:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	-152(%rbp), %rdi
	callq	_move_score_forced
	movl	%eax, -164(%rbp)
	movq	-152(%rbp), %rax
	movq	80(%rax), %rax
	movq	%rax, -176(%rbp)
	movq	$0, -184(%rbp)
	movl	$0, -188(%rbp)
LBB0_34:                                ##   Parent Loop BB0_19 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	-188(%rbp), %eax
	movq	-152(%rbp), %rcx
	cmpl	76(%rcx), %eax
	jge	LBB0_39
## %bb.35:                              ##   in Loop: Header=BB0_34 Depth=2
	movq	-176(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -184(%rbp)
	movq	-184(%rbp), %rdi
	callq	_move_score_forced
	cmpl	-164(%rbp), %eax
	jne	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_19 Depth=1
	jmp	LBB0_39
LBB0_37:                                ##   in Loop: Header=BB0_34 Depth=2
	movq	-176(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -176(%rbp)
## %bb.38:                              ##   in Loop: Header=BB0_34 Depth=2
	movl	-188(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -188(%rbp)
	jmp	LBB0_34
LBB0_39:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	-104(%rbp), %rdi
	movq	-184(%rbp), %rax
	movb	4(%rax), %sil
	movq	-184(%rbp), %rax
	movb	5(%rax), %dl
	movq	-184(%rbp), %rax
	movb	6(%rax), %cl
	movq	-184(%rbp), %rax
	movsbl	%sil, %esi
	movsbl	%dl, %edx
	movsbl	%cl, %ecx
	movsbl	7(%rax), %r8d
	callq	_change_board
	movl	-108(%rbp), %esi
	movq	-104(%rbp), %rdx
	movq	-184(%rbp), %rax
	movsbl	4(%rax), %ecx
	movq	-184(%rbp), %rax
	movsbl	5(%rax), %r8d
	movq	-184(%rbp), %rax
	movsbl	6(%rax), %r9d
	movq	-184(%rbp), %rax
	movsbl	7(%rax), %r10d
	movl	-112(%rbp), %eax
	movl	$1, %edi
	movl	%r10d, (%rsp)
	movl	%eax, 8(%rsp)
	callq	_print_move_information
	movq	-104(%rbp), %rdi
	callq	_print_board
	cmpl	$0, -108(%rbp)
	setne	%al
	xorb	$-1, %al
	andb	$1, %al
	movzbl	%al, %eax
	movl	%eax, -108(%rbp)
	movl	-112(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -112(%rbp)
	movq	-152(%rbp), %rdi
	callq	_free_tree
## %bb.40:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	-144(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -144(%rbp)
	jmp	LBB0_19
LBB0_41:
	movq	-104(%rbp), %rdi
	callq	_libmin_free
	callq	_libmin_success
	movl	-84(%rbp), %eax
	movl	%eax, -192(%rbp)                ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-8(%rbp), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_43
## %bb.42:
	movl	-192(%rbp), %eax                ## 4-byte Reload
	addq	$208, %rsp
	popq	%rbp
	retq
LBB0_43:
	callq	___stack_chk_fail
	ud2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.globl	___test0                        ## @__test0
	.p2align	4
___test0:
	.ascii	"G6-H5\nH3-G4\nH7-G6\nF3-E4\nH5-F3\nE2-G4\nG8-H7\nE4-F5\nG6-H5\nG2-F3\nP\n"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test0.txt"

	.section	__DATA,__data
	.globl	___infile                       ## @__infile
	.p2align	3
___infile:
	.quad	L_.str
	.quad	62                              ## 0x3e
	.quad	___test0
	.long	0                               ## 0x0
	.space	4

	.globl	_infile                         ## @infile
	.p2align	3
_infile:
	.quad	___infile

	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"r"

L_.str.2:                               ## @.str.2
	.asciz	"%c%c-%c%c\n"

.zerofill __DATA,__bss,_main.valid_moves,8,0 ## @main.valid_moves
L_.str.3:                               ## @.str.3
	.asciz	"%s WIN!\n"

.subsections_via_symbols


ARM64 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #272
	.cfi_def_cfa_offset 272
	stp	x28, x27, [sp, #240]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #256]            ; 16-byte Folded Spill
	add	x29, sp, #256
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w27, -24
	.cfi_offset w28, -32
	adrp	x8, ___stack_chk_guard@GOTPAGE
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	stur	wzr, [x29, #-92]
	stur	w0, [x29, #-96]
	stur	x1, [x29, #-104]
	adrp	x8, _infile@PAGE
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	ldr	x0, [x8, _infile@PAGEOFF]
	adrp	x1, l_.str.1@PAGE
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_libmin_mopen
	mov	x0, #64
	str	x0, [sp, #48]                   ; 8-byte Folded Spill
	bl	_libmin_malloc
	stur	x0, [x29, #-112]
	ldur	x0, [x29, #-112]
	bl	_fill_print_initial
	ldur	x0, [x29, #-112]
	bl	_print_board
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	ldr	x1, [sp, #48]                   ; 8-byte Folded Reload
	mov	w9, #1
	stur	w9, [x29, #-116]
	stur	w9, [x29, #-120]
	ldr	x2, [x8, _infile@PAGEOFF]
	sub	x0, x29, #88
	bl	_libmin_mgets
	b	LBB0_1
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	mov	x9, sp
	sub	x8, x29, #125
	str	x8, [x9]
	sub	x8, x29, #126
	str	x8, [x9, #8]
	sub	x8, x29, #127
	str	x8, [x9, #16]
	add	x8, sp, #128
	str	x8, [x9, #24]
	sub	x0, x29, #88
	adrp	x1, l_.str.2@PAGE
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_libmin_sscanf
	subs	w8, w0, #4
	cset	w8, ne
	tbnz	w8, #0, LBB0_14
	b	LBB0_2
LBB0_2:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldur	x0, [x29, #-112]
	ldursb	w1, [x29, #-125]
	ldursb	w2, [x29, #-126]
	ldursb	w3, [x29, #-127]
	ldrsb	w4, [sp, #128]
	ldur	w5, [x29, #-116]
	bl	_check_move_error_1_to_5
	stur	w0, [x29, #-124]
	ldur	w8, [x29, #-124]
	subs	w8, w8, #0
	cset	w8, eq
	tbnz	w8, #0, LBB0_4
	b	LBB0_3
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldur	w0, [x29, #-124]
	bl	_print_error_message
	ldur	w0, [x29, #-124]
	bl	_libmin_fail
	b	LBB0_4
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldur	x0, [x29, #-112]
	ldursb	w1, [x29, #-125]
	ldursb	w2, [x29, #-126]
	ldur	w4, [x29, #-116]
	adrp	x3, _main.valid_moves@PAGE
	add	x3, x3, _main.valid_moves@PAGEOFF
	bl	_all_possible_moves
	str	w0, [sp, #124]
	mov	w8, #1
	str	w8, [sp, #120]
	str	wzr, [sp, #116]
	b	LBB0_5
LBB0_5:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [sp, #116]
	ldr	w9, [sp, #124]
	subs	w8, w8, w9
	cset	w8, ge
	tbnz	w8, #0, LBB0_11
	b	LBB0_6
LBB0_6:                                 ;   in Loop: Header=BB0_5 Depth=2
	ldrsw	x8, [sp, #116]
	lsl	x9, x8, #1
	adrp	x8, _main.valid_moves@PAGE
	add	x8, x8, _main.valid_moves@PAGEOFF
	ldrsb	w8, [x8, x9]
	ldursb	w9, [x29, #-127]
	subs	w8, w8, w9
	cset	w8, ne
	tbnz	w8, #0, LBB0_9
	b	LBB0_7
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=2
	ldrsw	x9, [sp, #116]
	adrp	x8, _main.valid_moves@PAGE
	add	x8, x8, _main.valid_moves@PAGEOFF
	add	x8, x8, x9, lsl #1
	ldrsb	w8, [x8, #1]
	ldrsb	w9, [sp, #128]
	subs	w8, w8, w9
	cset	w8, ne
	tbnz	w8, #0, LBB0_9
	b	LBB0_8
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=2
	str	wzr, [sp, #120]
	b	LBB0_9
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=2
	b	LBB0_10
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w8, [sp, #116]
	add	w8, w8, #1
	str	w8, [sp, #116]
	b	LBB0_5
LBB0_11:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #120]
	subs	w8, w8, #0
	cset	w8, eq
	tbnz	w8, #0, LBB0_13
	b	LBB0_12
LBB0_12:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #6
	str	w0, [sp, #36]                   ; 4-byte Folded Spill
	bl	_print_error_message
	ldr	w0, [sp, #36]                   ; 4-byte Folded Reload
	bl	_libmin_fail
	b	LBB0_13
LBB0_13:                                ;   in Loop: Header=BB0_1 Depth=1
	ldur	x0, [x29, #-112]
	ldursb	w1, [x29, #-125]
	ldursb	w2, [x29, #-126]
	ldursb	w3, [x29, #-127]
	ldrsb	w4, [sp, #128]
	bl	_change_board
	ldur	w1, [x29, #-116]
	ldur	x2, [x29, #-112]
	ldursb	w3, [x29, #-125]
	ldursb	w4, [x29, #-126]
	ldursb	w5, [x29, #-127]
	ldrsb	w6, [sp, #128]
	ldur	w7, [x29, #-120]
	mov	w0, #0
	bl	_print_move_information
	ldur	x0, [x29, #-112]
	bl	_print_board
	ldur	w8, [x29, #-116]
	subs	w8, w8, #0
	cset	w8, eq
	and	w8, w8, #0x1
	stur	w8, [x29, #-116]
	ldur	w8, [x29, #-120]
	add	w8, w8, #1
	stur	w8, [x29, #-120]
	adrp	x8, _infile@PAGE
	ldr	x2, [x8, _infile@PAGEOFF]
	sub	x0, x29, #88
	mov	x1, #64
	bl	_libmin_mgets
	b	LBB0_1
LBB0_14:
	ldurb	w8, [x29, #-125]
	strb	w8, [sp, #115]
	str	wzr, [sp, #108]
	ldrsb	w8, [sp, #115]
	subs	w8, w8, #65
	cset	w8, ne
	tbnz	w8, #0, LBB0_16
	b	LBB0_15
LBB0_15:
	mov	w8, #1
	str	w8, [sp, #108]
	b	LBB0_16
LBB0_16:
	ldrsb	w8, [sp, #115]
	subs	w8, w8, #80
	cset	w8, ne
	tbnz	w8, #0, LBB0_18
	b	LBB0_17
LBB0_17:
	mov	w8, #100
	str	w8, [sp, #108]
	b	LBB0_18
LBB0_18:
	str	wzr, [sp, #104]
	b	LBB0_19
LBB0_19:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
                                        ;       Child Loop BB0_23 Depth 3
                                        ;     Child Loop BB0_34 Depth 2
	ldr	w8, [sp, #104]
	ldr	w9, [sp, #108]
	subs	w8, w8, w9
	cset	w8, ge
	tbnz	w8, #0, LBB0_41
	b	LBB0_20
LBB0_20:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, #96
	bl	_libmin_malloc
	str	x0, [sp, #96]
	ldr	x8, [sp, #96]
	str	wzr, [x8]
	str	wzr, [sp, #92]
	b	LBB0_21
LBB0_21:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_23 Depth 3
	ldr	w8, [sp, #92]
	subs	w8, w8, #8
	cset	w8, ge
	tbnz	w8, #0, LBB0_28
	b	LBB0_22
LBB0_22:                                ;   in Loop: Header=BB0_21 Depth=2
	str	wzr, [sp, #88]
	b	LBB0_23
LBB0_23:                                ;   Parent Loop BB0_19 Depth=1
                                        ;     Parent Loop BB0_21 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w8, [sp, #88]
	subs	w8, w8, #8
	cset	w8, ge
	tbnz	w8, #0, LBB0_26
	b	LBB0_24
LBB0_24:                                ;   in Loop: Header=BB0_23 Depth=3
	ldur	x8, [x29, #-112]
	ldrsw	x9, [sp, #92]
	add	x8, x8, x9, lsl #3
	ldrsw	x9, [sp, #88]
	add	x8, x8, x9
	ldrb	w8, [x8]
	ldr	x9, [sp, #96]
	add	x9, x9, #8
	ldrsw	x10, [sp, #92]
	add	x9, x9, x10, lsl #3
	ldrsw	x10, [sp, #88]
	add	x9, x9, x10
	strb	w8, [x9]
	b	LBB0_25
LBB0_25:                                ;   in Loop: Header=BB0_23 Depth=3
	ldr	w8, [sp, #88]
	add	w8, w8, #1
	str	w8, [sp, #88]
	b	LBB0_23
LBB0_26:                                ;   in Loop: Header=BB0_21 Depth=2
	b	LBB0_27
LBB0_27:                                ;   in Loop: Header=BB0_21 Depth=2
	ldr	w8, [sp, #92]
	add	w8, w8, #1
	str	w8, [sp, #92]
	b	LBB0_21
LBB0_28:                                ;   in Loop: Header=BB0_19 Depth=1
	ldur	w8, [x29, #-116]
	ldr	x9, [sp, #96]
	str	w8, [x9, #72]
	ldr	x8, [sp, #96]
	str	wzr, [x8, #76]
	ldr	x8, [sp, #96]
	adrp	x9, _initial_children@GOTPAGE
	ldr	x9, [x9, _initial_children@GOTPAGEOFF]
	ldr	q0, [x9]
	str	q0, [x8, #80]
	ldr	x0, [sp, #96]
	bl	_generate_tree_depth_3
	ldr	x8, [sp, #96]
	ldr	w8, [x8, #76]
	subs	w8, w8, #0
	cset	w8, ne
	tbnz	w8, #0, LBB0_33
	b	LBB0_29
LBB0_29:                                ;   in Loop: Header=BB0_19 Depth=1
	ldur	w8, [x29, #-116]
	subs	w8, w8, #0
	cset	w8, eq
	tbnz	w8, #0, LBB0_31
	b	LBB0_30
LBB0_30:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x9, sp
	adrp	x8, _WHITE@GOTPAGE
	ldr	x8, [x8, _WHITE@GOTPAGEOFF]
	str	x8, [x9]
	adrp	x0, l_.str.3@PAGE
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_libmin_printf
	bl	_libmin_success
	b	LBB0_32
LBB0_31:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x9, sp
	adrp	x8, _BLACK@GOTPAGE
	ldr	x8, [x8, _BLACK@GOTPAGEOFF]
	str	x8, [x9]
	adrp	x0, l_.str.3@PAGE
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_libmin_printf
	bl	_libmin_success
	b	LBB0_32
LBB0_32:                                ;   in Loop: Header=BB0_19 Depth=1
	b	LBB0_33
LBB0_33:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	x0, [sp, #96]
	bl	_move_score_forced
	str	w0, [sp, #84]
	ldr	x8, [sp, #96]
	ldr	x8, [x8, #80]
	str	x8, [sp, #72]
                                        ; kill: def $x8 killed $xzr
	str	xzr, [sp, #64]
	str	wzr, [sp, #60]
	b	LBB0_34
LBB0_34:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [sp, #60]
	ldr	x9, [sp, #96]
	ldr	w9, [x9, #76]
	subs	w8, w8, w9
	cset	w8, ge
	tbnz	w8, #0, LBB0_39
	b	LBB0_35
LBB0_35:                                ;   in Loop: Header=BB0_34 Depth=2
	ldr	x8, [sp, #72]
	ldr	x8, [x8]
	str	x8, [sp, #64]
	ldr	x0, [sp, #64]
	bl	_move_score_forced
	ldr	w8, [sp, #84]
	subs	w8, w0, w8
	cset	w8, ne
	tbnz	w8, #0, LBB0_37
	b	LBB0_36
LBB0_36:                                ;   in Loop: Header=BB0_19 Depth=1
	b	LBB0_39
LBB0_37:                                ;   in Loop: Header=BB0_34 Depth=2
	ldr	x8, [sp, #72]
	ldr	x8, [x8, #8]
	str	x8, [sp, #72]
	b	LBB0_38
LBB0_38:                                ;   in Loop: Header=BB0_34 Depth=2
	ldr	w8, [sp, #60]
	add	w8, w8, #1
	str	w8, [sp, #60]
	b	LBB0_34
LBB0_39:                                ;   in Loop: Header=BB0_19 Depth=1
	ldur	x0, [x29, #-112]
	ldr	x8, [sp, #64]
	ldrsb	w1, [x8, #4]
	ldr	x8, [sp, #64]
	ldrsb	w2, [x8, #5]
	ldr	x8, [sp, #64]
	ldrsb	w3, [x8, #6]
	ldr	x8, [sp, #64]
	ldrsb	w4, [x8, #7]
	bl	_change_board
	ldur	w1, [x29, #-116]
	ldur	x2, [x29, #-112]
	ldr	x8, [sp, #64]
	ldrsb	w3, [x8, #4]
	ldr	x8, [sp, #64]
	ldrsb	w4, [x8, #5]
	ldr	x8, [sp, #64]
	ldrsb	w5, [x8, #6]
	ldr	x8, [sp, #64]
	ldrsb	w6, [x8, #7]
	ldur	w7, [x29, #-120]
	mov	w0, #1
	bl	_print_move_information
	ldur	x0, [x29, #-112]
	bl	_print_board
	ldur	w8, [x29, #-116]
	subs	w8, w8, #0
	cset	w8, eq
	and	w8, w8, #0x1
	stur	w8, [x29, #-116]
	ldur	w8, [x29, #-120]
	add	w8, w8, #1
	stur	w8, [x29, #-120]
	ldr	x0, [sp, #96]
	bl	_free_tree
	b	LBB0_40
LBB0_40:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	w8, [sp, #104]
	add	w8, w8, #1
	str	w8, [sp, #104]
	b	LBB0_19
LBB0_41:
	ldur	x0, [x29, #-112]
	bl	_libmin_free
	bl	_libmin_success
	ldur	w8, [x29, #-92]
	str	w8, [sp, #32]                   ; 4-byte Folded Spill
	ldur	x9, [x29, #-24]
	adrp	x8, ___stack_chk_guard@GOTPAGE
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
	ldr	x8, [x8]
	subs	x8, x8, x9
	cset	w8, eq
	tbnz	w8, #0, LBB0_43
	b	LBB0_42
LBB0_42:
	bl	___stack_chk_fail
LBB0_43:
	ldr	w0, [sp, #32]                   ; 4-byte Folded Reload
	ldp	x29, x30, [sp, #256]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #240]            ; 16-byte Folded Reload
	add	sp, sp, #272
	ret
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.globl	___test0                        ; @__test0
___test0:
	.ascii	"G6-H5\nH3-G4\nH7-G6\nF3-E4\nH5-F3\nE2-G4\nG8-H7\nE4-F5\nG6-H5\nG2-F3\nP\n"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test0.txt"

	.section	__DATA,__data
	.globl	___infile                       ; @__infile
	.p2align	3
___infile:
	.quad	l_.str
	.quad	62                              ; 0x3e
	.quad	___test0
	.long	0                               ; 0x0
	.space	4

	.globl	_infile                         ; @infile
	.p2align	3
_infile:
	.quad	___infile

	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"r"

l_.str.2:                               ; @.str.2
	.asciz	"%c%c-%c%c\n"

.zerofill __DATA,__bss,_main.valid_moves,8,0 ; @main.valid_moves
l_.str.3:                               ; @.str.3
	.asciz	"%s WIN!\n"

.subsections_via_symbols