	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twok_move
_twok_move:                             ## @twok_move
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r10d, %r10d
	movq	_twok_buf@GOTPCREL(%rip), %r8
	movq	_score@GOTPCREL(%rip), %r9
	xorl	%r15d, %r15d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	incl	%r15d
	cmpl	$4, %r15d
	je	LBB0_12
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
                                        ##       Child Loop BB0_5 Depth 3
	movq	(%r8), %r14
	xorl	%r11d, %r11d
	jmp	LBB0_2
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=2
	movl	%ecx, (%r13,%rbx,4)
	movl	$0, (%r12,%rdx,4)
	decl	%r11d
	movl	$1, %r10d
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=2
	leal	1(%r11), %eax
	cmpl	$3, %r11d
	movl	%eax, %r11d
	jge	LBB0_11
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_5 Depth 3
	cmpl	$2, %r11d
	jg	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	leal	1(%r11), %eax
	movl	$2, %ebx
	subl	%r11d, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	testl	%esi, %esi
	movl	%eax, %ecx
	cmovel	%ebx, %ecx
	testl	%edi, %edi
	movl	%r15d, %edx
	cmovel	%ecx, %edx
	movslq	%edx, %rdx
	cmovel	%r15d, %ecx
	movq	(%r14,%rdx,8), %r12
	movslq	%ecx, %rdx
	movl	(%r12,%rdx,4), %ecx
	testl	%ecx, %ecx
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=3
	incl	%eax
	decl	%ebx
	cmpl	$4, %eax
	jne	LBB0_5
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=2
	movl	$3, %eax
	subl	%r11d, %eax
	testl	%esi, %esi
	cmovnel	%r11d, %eax
	testl	%edi, %edi
	movl	%r15d, %ebx
	cmovel	%eax, %ebx
	cmovel	%r15d, %eax
	movslq	%ebx, %rbx
	movq	(%r14,%rbx,8), %r13
	movslq	%eax, %rbx
	movl	(%r13,%rbx,4), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=2
	cmpl	%ecx, %eax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=2
	incl	%ecx
	movl	%ecx, (%r13,%rbx,4)
	movl	$1, %r10d
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	addl	%eax, (%r9)
	movl	$0, (%r12,%rdx,4)
	jmp	LBB0_10
LBB0_12:
	testl	%r10d, %r10d
	je	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	callq	_twok_add
	movq	_moves@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_twok_buf,8,3                   ## @twok_buf
	.comm	_score,4,2                      ## @score
	.comm	_moves,4,2                      ## @moves
	.no_dead_strip	_twok_move
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twok_move
_twok_move:                             ; @twok_move
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	w13, #0
	mov	w8, #0
Lloh0:
	adrp	x9, _twok_buf@GOTPAGE
Lloh1:
	ldr	x9, [x9, _twok_buf@GOTPAGEOFF]
	mov	w10, #2
	mov	w11, #3
Lloh2:
	adrp	x12, _score@GOTPAGE
Lloh3:
	ldr	x12, [x12, _score@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w8, #1
	cmp	w8, #4
	b.eq	LBB0_12
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;       Child Loop BB0_7 Depth 3
	mov	w14, #0
	ldr	x15, [x9]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=2
	str	w2, [x3, x4, lsl #2]
	str	wzr, [x16, x17, lsl #2]
	sub	w14, w14, #1
	mov	w13, #1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	add	w16, w14, #1
	cmp	w14, #3
	mov	x14, x16
	b.ge	LBB0_1
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_7 Depth 3
	cmp	w14, #2
	b.gt	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	add	w17, w14, #1
	sub	w3, w10, w14
LBB0_7:                                 ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	cmp	w1, #0
	csel	w2, w3, w17, eq
	cmp	w0, #0
	csel	w16, w2, w8, eq
	ldr	x16, [x15, w16, sxtw #3]
	csel	w4, w8, w2, eq
	ldr	w2, [x16, w4, sxtw #2]
	cbnz	w2, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=3
	add	w17, w17, #1
	sub	w3, w3, #1
	cmp	w17, #4
	b.ne	LBB0_7
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=2
	sxtw	x17, w4
	sub	w3, w11, w14
	cmp	w1, #0
	csel	w3, w3, w14, eq
	cmp	w0, #0
	csel	w4, w3, w8, eq
	csel	w5, w8, w3, eq
	ldr	x3, [x15, w4, sxtw #3]
	sxtw	x4, w5
	ldr	w5, [x3, w5, sxtw #2]
	cbz	w5, LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=2
	cmp	w5, w2
	b.ne	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=2
	add	w2, w2, #1
	str	w2, [x3, x4, lsl #2]
	mov	w13, #1
	lsl	w2, w13, w2
	ldr	w3, [x12]
	add	w2, w3, w2
	str	w2, [x12]
	str	wzr, [x16, x17, lsl #2]
	b	LBB0_4
LBB0_12:
	cbz	w13, LBB0_14
; %bb.13:
	bl	_twok_add
Lloh4:
	adrp	x8, _moves@GOTPAGE
Lloh5:
	ldr	x8, [x8, _moves@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_14:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_twok_buf,8,3                   ; @twok_buf
	.comm	_score,4,2                      ; @score
	.comm	_moves,4,2                      ; @moves
	.no_dead_strip	_twok_move
.subsections_via_symbols
