	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TestMines
_TestMines:                             ## @TestMines
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ecx
	movq	%rsi, %rax
	movq	%rdi, %rbx
	shrq	$32, %rsi
	movq	_TRUE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r12
	movl	24(%rdi), %edx
	subl	%edx, %eax
	movq	_MINE_WIDTH@GOTPCREL(%rip), %rdi
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	(%rdi)
	movl	%eax, %r14d
	subl	28(%rbx), %esi
	movq	_MINE_HEIGHT@GOTPCREL(%rip), %rdi
	movl	%esi, %eax
	cltd
	idivl	(%rdi)
	addl	$-128, %ecx
	cmpl	$4, %ecx
	ja	LBB0_19
## %bb.1:
	movl	%eax, %r15d
	incl	%r14d
	incl	%r15d
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rcx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_18:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_AddFlag
	testq	%r12, %r12
	jne	LBB0_22
	jmp	LBB0_21
LBB0_13:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_PressBoxes
	jmp	LBB0_5
LBB0_2:
	movl	4(%rbx), %esi
	movl	8(%rbx), %edx
	cmpl	%r14d, %esi
	jne	LBB0_4
## %bb.3:
	cmpl	%r15d, %edx
	je	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	_UnpressBox
	movl	%r14d, 4(%rbx)
	movl	%r15d, 8(%rbx)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_PressBox
LBB0_5:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	jne	LBB0_22
	jmp	LBB0_21
LBB0_19:
	leaq	L_.str(%rip), %rdi
	callq	_WINE_TRACE
	testq	%r12, %r12
	jne	LBB0_22
	jmp	LBB0_21
LBB0_14:
	movl	4(%rbx), %esi
	movl	8(%rbx), %edx
	cmpl	%r14d, %esi
	jne	LBB0_16
## %bb.15:
	cmpl	%r15d, %edx
	je	LBB0_17
LBB0_16:
	movq	%rbx, %rdi
	callq	_UnpressBoxes
LBB0_17:
	movq	$0, 4(%rbx)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_CompleteBoxes
	testq	%r12, %r12
	je	LBB0_21
LBB0_22:
	movl	(%rbx), %edi
	movq	_RDW_INVALIDATE@GOTPCREL(%rip), %rax
	movq	_RDW_UPDATENOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	xorl	%esi, %esi
	xorl	%edx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RedrawWindow                   ## TAILCALL
LBB0_6:
	movl	4(%rbx), %esi
	movl	8(%rbx), %edx
	cmpl	%r14d, %esi
	jne	LBB0_8
## %bb.7:
	cmpl	%r15d, %edx
	je	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	callq	_UnpressBox
LBB0_9:
	movq	$0, 4(%rbx)
	movq	16(%rbx), %rax
	movslq	%r14d, %rcx
	movq	(%rax,%rcx,8), %rax
	movslq	%r15d, %rcx
	movl	(%rax,%rcx,4), %eax
	movq	_FLAG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_12
## %bb.10:
	movq	_PLAYING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, 12(%rbx)
	je	LBB0_12
## %bb.11:
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_PlaceMines
LBB0_12:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_CompleteBox
	testq	%r12, %r12
	jne	LBB0_22
LBB0_21:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_18
	.long	L0_0_set_14
	.long	L0_0_set_13
	.long	L0_0_set_6
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_MINE_WIDTH,4,2                 ## @MINE_WIDTH
	.comm	_MINE_HEIGHT,4,2                ## @MINE_HEIGHT
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_FLAG,4,2                       ## @FLAG
	.comm	_PLAYING,4,2                    ## @PLAYING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown message type received in TestMines\n"

	.comm	_RDW_INVALIDATE,4,2             ## @RDW_INVALIDATE
	.comm	_RDW_UPDATENOW,4,2              ## @RDW_UPDATENOW
	.no_dead_strip	_TestMines
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TestMines
_TestMines:                             ; @TestMines
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x8, _TRUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	sub	w8, w2, #128
	cmp	w8, #4
	b.hi	LBB0_7
; %bb.1:
	ldp	w9, w10, [x19, #24]
	sub	w9, w1, w9
Lloh3:
	adrp	x11, _MINE_WIDTH@GOTPAGE
Lloh4:
	ldr	x11, [x11, _MINE_WIDTH@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	sdiv	w9, w9, w11
	lsr	x11, x1, #32
	add	w21, w9, #1
	sub	w9, w11, w10
Lloh6:
	adrp	x10, _MINE_HEIGHT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MINE_HEIGHT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	sdiv	w9, w9, w10
	sxtw	x9, w9
	add	x20, x9, #1
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_AddFlag
	cbnz	x22, LBB0_11
	b	LBB0_18
LBB0_3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_PressBoxes
	b	LBB0_6
LBB0_4:
	ldp	w1, w2, [x19, #4]
	cmp	w1, w21
	ccmp	w2, w20, #0, eq
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_UnpressBox
	stp	w21, w20, [x19, #4]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_PressBox
LBB0_6:
Lloh11:
	adrp	x8, _FALSE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh13:
	ldr	x22, [x8]
	cbnz	x22, LBB0_11
	b	LBB0_18
LBB0_7:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WINE_TRACE
	cbnz	x22, LBB0_11
	b	LBB0_18
LBB0_8:
	ldp	w1, w2, [x19, #4]
	cmp	w1, w21
	ccmp	w2, w20, #0, eq
	b.eq	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_UnpressBoxes
LBB0_10:
	stp	wzr, wzr, [x19, #4]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_CompleteBoxes
	cbz	x22, LBB0_18
LBB0_11:
	ldr	w0, [x19]
Lloh16:
	adrp	x8, _RDW_INVALIDATE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RDW_INVALIDATE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _RDW_UPDATENOW@GOTPAGE
Lloh20:
	ldr	x9, [x9, _RDW_UPDATENOW@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x1, #0
	mov	w2, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_RedrawWindow
LBB0_12:
	ldp	w1, w2, [x19, #4]
	cmp	w1, w21
	ccmp	w2, w20, #0, eq
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_UnpressBox
LBB0_14:
	stp	wzr, wzr, [x19, #4]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, w21, sxtw #3]
	ldr	w8, [x8, x20, lsl #2]
Lloh22:
	adrp	x9, _FLAG@GOTPAGE
Lloh23:
	ldr	x9, [x9, _FLAG@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_17
; %bb.15:
	ldr	w9, [x19, #12]
Lloh25:
	adrp	x8, _PLAYING@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PLAYING@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w9, w8
	b.eq	LBB0_17
; %bb.16:
	str	w8, [x19, #12]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_PlaceMines
LBB0_17:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_CompleteBox
	cbnz	x22, LBB0_11
LBB0_18:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
                                        ; -- End function
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_MINE_WIDTH,4,2                 ; @MINE_WIDTH
	.comm	_MINE_HEIGHT,4,2                ; @MINE_HEIGHT
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_FLAG,4,2                       ; @FLAG
	.comm	_PLAYING,4,2                    ; @PLAYING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown message type received in TestMines\n"

	.comm	_RDW_INVALIDATE,4,2             ; @RDW_INVALIDATE
	.comm	_RDW_UPDATENOW,4,2              ; @RDW_UPDATENOW
	.no_dead_strip	_TestMines
.subsections_via_symbols
