	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scan_tree
_scan_tree:                             ## @scan_tree
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edx killed $edx def $rdx
	movl	(%rsi), %r15d
	leal	1(%rdx), %eax
	movslq	%eax, %rcx
	movl	$65535, (%rsi,%rcx,4)           ## imm = 0xFFFF
	testl	%edx, %edx
	js	LBB0_20
## %bb.1:
	xorl	%ecx, %ecx
	testl	%r15d, %r15d
	sete	%cl
	movl	$138, %edx
	movl	$7, %r13d
	cmovel	%edx, %r13d
	movl	$4, %r14d
	subl	%ecx, %r14d
	movl	%eax, %r11d
	movl	$-1, %eax
	xorl	%r12d, %r12d
	movq	_REPZ_3_10@GOTPCREL(%rip), %r8
	movq	_REPZ_11_138@GOTPCREL(%rip), %r9
	movq	_REP_3_6@GOTPCREL(%rip), %r10
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %edx
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %ebx
	movl	%edx, %eax
	cmpq	%r12, %r11
	je	LBB0_20
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edx
	movl	4(%rsi,%r12,4), %r15d
	incq	%r12
	leal	1(%rbx), %ecx
	cmpl	%r13d, %ecx
	jge	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r15d, %edx
	je	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r14d, %ecx
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ecx, %rcx
	movslq	%edx, %rax
	shlq	$3, %rax
	addq	(%rdi), %rax
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%edx, %edx
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rdi), %rcx
	cmpl	%eax, %edx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%edx, %rax
	incq	(%rcx,%rax,8)
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r10), %rax
	leaq	(%rcx,%rax,8), %rax
	jmp	LBB0_15
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rdi), %rax
	cmpl	$9, %ebx
	jg	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r8), %rcx
	jmp	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r9), %rcx
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rax,%rcx,8), %rax
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %ecx
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	%rcx, (%rax)
	xorl	%ecx, %ecx
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
	cmpl	%r15d, %edx
	sete	%r13b
	movl	$4, %r14d
	subl	%r13d, %r14d
	xorl	$7, %r13d
	jmp	LBB0_19
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$3, %r14d
	movl	$138, %r13d
	jmp	LBB0_19
LBB0_20:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REP_3_6,8,3                    ## @REP_3_6
	.comm	_REPZ_3_10,8,3                  ## @REPZ_3_10
	.comm	_REPZ_11_138,8,3                ## @REPZ_11_138
	.no_dead_strip	_scan_tree
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scan_tree
_scan_tree:                             ; @scan_tree
	.cfi_startproc
; %bb.0:
	ldr	w10, [x1]
	add	w8, w2, #1
	mov	w9, #65535
	str	w9, [x1, w8, sxtw #2]
	tbnz	w2, #31, LBB0_17
; %bb.1:
	mov	w4, #0
	mov	w9, #3
	mov	w12, #7
	mov	w11, #138
	cmp	w10, #0
	csel	w2, w11, w12, eq
	cinc	w3, w9, ne
	add	x12, x1, #4
	mov	w1, #-1
	mov	w13, #6
Lloh0:
	adrp	x14, _REPZ_3_10@GOTPAGE
Lloh1:
	ldr	x14, [x14, _REPZ_3_10@GOTPAGEOFF]
Lloh2:
	adrp	x15, _REPZ_11_138@GOTPAGE
Lloh3:
	ldr	x15, [x15, _REPZ_11_138@GOTPAGEOFF]
Lloh4:
	adrp	x16, _REP_3_6@GOTPAGE
Lloh5:
	ldr	x16, [x16, _REP_3_6@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x10, x1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x10
	add	x12, x12, #4
	mov	x4, x5
	mov	x10, x17
	subs	x8, x8, #1
	b.eq	LBB0_17
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w17, [x12]
	add	w5, w4, #1
	cmp	w5, w2
	ccmp	w10, w17, #0, lt
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w5, w3
	b.ge	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x2, w5
	ldr	x1, [x0]
	add	x1, x1, w10, sxtw #3
	b	LBB0_16
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	w10, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x2, [x0]
	cmp	w10, w1
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	sbfiz	x1, x10, #3, #32
	ldr	x3, [x2, x1]
	add	x3, x3, #1
	str	x3, [x2, x1]
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x16]
	add	x1, x2, x1, lsl #3
	b	LBB0_15
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x0]
	cmp	w4, #9
	b.gt	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x2, [x14]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x2, [x15]
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x1, x1, x2, lsl #3
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w2, #1
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x3, [x1]
	add	x2, x3, x2
	str	x2, [x1]
	cmp	w10, w17
	cinc	w1, w13, ne
	cinc	w3, w9, ne
	cmp	w17, #0
	csel	w5, wzr, wzr, eq
	csel	w2, w11, w1, eq
	csel	w3, w9, w3, eq
	b	LBB0_3
LBB0_17:
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_REP_3_6,8,3                    ; @REP_3_6
	.comm	_REPZ_3_10,8,3                  ; @REPZ_3_10
	.comm	_REPZ_11_138,8,3                ; @REPZ_11_138
	.no_dead_strip	_scan_tree
.subsections_via_symbols
