	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SimpleFlood                    ## -- Begin function SimpleFlood
	.p2align	4, 0x90
_SimpleFlood:                           ## @SimpleFlood
	.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
	movq	_leafs@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movslq	%esi, %rdx
	shlq	$4, %rdx
	movl	(%rcx,%rdx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_7
## %bb.1:
	movq	%rdi, %r15
	leaq	(%rcx,%rdx), %r14
	leaq	(%rcx,%rdx), %r12
	addq	$8, %r12
	xorl	%ebx, %ebx
	movq	_portals@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%r8d, %rax
	cmpq	%rax, %rbx
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdx
	cmpq	$0, 24(%rdx)
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, %rcx
	subq	(%r13), %rcx
	shrq	$5, %rcx
	movq	(%r15), %rax
	movl	%ecx, %edi
	sarl	$3, %edi
	andb	$7, %cl
	movl	$1, %esi
	shll	%cl, %esi
	movslq	%edi, %rdi
	movl	(%rax,%rdi,4), %eax
	movzbl	%cl, %ecx
	btl	%ecx, %eax
	jae	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rcx
	movl	(%rcx,%rdi,4), %eax
	testl	%esi, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	orl	%esi, %eax
	movl	%eax, (%rcx,%rdi,4)
	movl	16(%rdx), %esi
	movq	%r15, %rdi
	callq	_SimpleFlood
	movl	(%r14), %r8d
	jmp	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_leafs,8,3                      ## @leafs
	.comm	_portals,8,3                    ## @portals
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SimpleFlood                    ; -- Begin function SimpleFlood
	.p2align	2
_SimpleFlood:                           ; @SimpleFlood
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
                                        ; kill: def $w1 killed $w1 def $x1
Lloh0:
	adrp	x8, _leafs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _leafs@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	add	x20, x9, w1, sxtw #4
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x21, #0
	sxtw	x10, w1
	add	x9, x9, x10, lsl #4
	add	x22, x9, #8
Lloh3:
	adrp	x23, _portals@GOTPAGE
Lloh4:
	ldr	x23, [x23, _portals@GOTPAGEOFF]
	mov	w24, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, sxtw
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22]
	ldr	x9, [x9, x21, lsl #3]
	ldr	x10, [x9, #24]
	cbnz	x10, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x23]
	sub	x10, x9, x10
	lsr	x11, x10, #5
	ldr	x12, [x19]
	asr	w13, w11, #3
	ldr	w12, [x12, w13, sxtw #2]
	ubfx	x10, x10, #5, #3
	lsl	w10, w24, w10
	tst	w10, w12
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
                                        ; kill: def $w11 killed $w11 killed $x11 def $x11
	sbfx	x11, x11, #3, #29
	ldr	x12, [x19, #8]
	ldr	w13, [x12, x11, lsl #2]
	tst	w13, w10
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	orr	w8, w13, w10
	str	w8, [x12, x11, lsl #2]
	ldr	w1, [x9, #16]
	mov	x0, x19
	bl	_SimpleFlood
	ldr	w8, [x20]
	b	LBB0_2
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_leafs,8,3                      ; @leafs
	.comm	_portals,8,3                    ; @portals
.subsections_via_symbols
