	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MarkVisibleSides               ## -- Begin function MarkVisibleSides
	.p2align	4, 0x90
_MarkVisibleSides:                      ## @MarkVisibleSides
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_Log_Print
	cmpl	%r15d, %ebx
	jge	LBB0_16
## %bb.1:
	movq	_mapbrushes@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movslq	%ebx, %rcx
	movslq	%r15d, %r8
	movq	_SFL_VISIBLE@GOTPCREL(%rip), %rsi
	pcmpeqd	%xmm0, %xmm0
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rcx
	cmpq	%r8, %rcx
	je	LBB0_16
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_15 Depth 2
	movq	%rcx, %rax
	shlq	$4, %rax
	movl	(%r9,%rax), %edi
	testl	%edi, %edi
	jle	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r9,%rax), %rbx
	cmpl	$8, %edi
	jb	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	4(%rsi), %rax
	cmpq	%rax, %rbx
	jae	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%rbx,%rdi,4), %rax
	cmpq	%rsi, %rax
	jbe	LBB0_9
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r10d, %r10d
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r10, %rdx
	testb	$1, %dil
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rsi), %eax
	notl	%eax
	andl	%eax, (%rbx,%r10,4)
	movq	%r10, %rdx
	orq	$1, %rdx
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	notq	%r10
	addq	%rdi, %r10
	je	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rsi), %eax
	notl	%eax
	andl	%eax, (%rbx,%rdx,4)
	movl	(%rsi), %eax
	notl	%eax
	andl	%eax, 4(%rbx,%rdx,4)
	addq	$2, %rdx
	cmpq	%rdx, %rdi
	jne	LBB0_15
	jmp	LBB0_2
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%edi, %r10d
	andl	$-8, %r10d
	movd	(%rsi), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	pshufd	$0, %xmm1, %xmm1                ## xmm1 = xmm1[0,0,0,0]
	pxor	%xmm0, %xmm1
	leaq	(,%rdi,4), %rdx
	andq	$-32, %rdx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rbx,%rax), %xmm2
	movdqu	16(%rbx,%rax), %xmm3
	pand	%xmm1, %xmm2
	pand	%xmm1, %xmm3
	movdqu	%xmm2, (%rbx,%rax)
	movdqu	%xmm3, 16(%rbx,%rax)
	addq	$32, %rax
	cmpq	%rax, %rdx
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rdi, %r10
	je	LBB0_2
	jmp	LBB0_12
LBB0_16:
	movl	(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_MarkVisibleSides_r             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"--- MarkVisibleSides ---\n"

	.comm	_mapbrushes,8,3                 ## @mapbrushes
	.comm	_SFL_VISIBLE,4,2                ## @SFL_VISIBLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MarkVisibleSides               ; -- Begin function MarkVisibleSides
	.p2align	2
_MarkVisibleSides:                      ; @MarkVisibleSides
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_Print
	cmp	w21, w20
	b.ge	LBB0_12
; %bb.1:
Lloh2:
	adrp	x8, _mapbrushes@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mapbrushes@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	sxtw	x9, w21
	sxtw	x10, w20
Lloh5:
	adrp	x11, _SFL_VISIBLE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _SFL_VISIBLE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	cmp	x9, x10
	b.eq	LBB0_12
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_11 Depth 2
	lsl	x12, x9, #4
	ldr	w12, [x8, x12]
	cmp	w12, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x13, x8, x9, lsl #4
	ldr	x13, [x13, #8]
	cmp	w12, #16
	b.lo	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x14, x13, x12, lsl #2
	add	x15, x11, #4
	cmp	x13, x15
	ccmp	x14, x11, #0, lo
	b.hi	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	and	x14, x12, #0xfffffff0
	ldr	s0, [x11]
	mvn.16b	v0, v0
	dup.4s	v0, v0[0]
	add	x15, x13, #32
	mov	x16, x14
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q1, q2, [x15, #-32]
	ldp	q3, q4, [x15]
	and.16b	v1, v1, v0
	and.16b	v2, v2, v0
	and.16b	v3, v3, v0
	and.16b	v4, v4, v0
	stp	q1, q2, [x15, #-32]
	stp	q3, q4, [x15], #64
	subs	x16, x16, #16
	b.ne	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x14, x12
	b.eq	LBB0_2
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x14, #0
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x13, x13, x14, lsl #2
	sub	x12, x12, x14
LBB0_11:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w14, [x11]
	ldr	w15, [x13]
	bic	w14, w15, w14
	str	w14, [x13], #4
	subs	x12, x12, #1
	b.ne	LBB0_11
	b	LBB0_2
LBB0_12:
	ldr	w0, [x19]
	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	_MarkVisibleSides_r
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"--- MarkVisibleSides ---\n"

	.comm	_mapbrushes,8,3                 ; @mapbrushes
	.comm	_SFL_VISIBLE,4,2                ; @SFL_VISIBLE
.subsections_via_symbols
