	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grow
_grow:                                  ## @grow
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movslq	(%rsi), %rax
	movl	4(%rsi), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_4
## %bb.1:
	movq	_CACHE_MAX_DEPTH@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	%rax, (%rcx)
	jle	LBB0_19
## %bb.2:
	callq	_send_grow
	testq	%rax, %rax
	je	LBB0_19
## %bb.3:
	incl	(%r12)
	movl	4(%r12), %ecx
LBB0_4:
	incb	%cl
	movl	$1, %ebx
	movl	$1, %edi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edi
	leaq	L_.str(%rip), %rsi
	callq	_khrn_platform_malloc
	movq	_CACHE_LOG2_BLOCK_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	4(%r12), %ecx
	movq	%rax, %r14
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	callq	_khrn_platform_malloc
	movq	%rax, %r15
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	testq	%r15, %r15
	je	LBB0_6
## %bb.7:
	movl	4(%r12), %esi
	incl	%esi
	movq	%r14, %rdi
	callq	_tree_init
	movl	4(%r12), %ecx
	testl	%ecx, %ecx
	je	LBB0_12
## %bb.8:
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	cmpl	$2, %eax
	jl	LBB0_11
## %bb.9:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %r13
	movl	%ebx, %edi
	callq	__msb
	movl	$3, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	xorl	%ebx, %edx
	movslq	%edx, %rax
	movq	%r13, (%r14,%rax,8)
	movzbl	4(%r12), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	incq	%rbx
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_10
LBB0_11:
	movq	24(%r14), %rax
	xorl	%ecx, %ecx
	cmpq	%rax, 16(%r14)
	sete	%cl
	addq	%rax, %rcx
	movq	%rcx, 8(%r14)
LBB0_12:
	movq	16(%r12), %rax
	movq	%rax, -64(%rbp)
	movq	%r15, -56(%rbp)
	leaq	56(%r12), %rdi
	movq	_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	callq	_khrn_pointer_map_iterate
	leaq	40(%r12), %r13
	movq	48(%r12), %rdi
	movq	%r13, (%rdi)
	leaq	24(%r12), %rbx
	cmpq	%rbx, %rdi
	je	LBB0_14
## %bb.13:
	leaq	-64(%rbp), %rsi
	callq	_relocate
	movq	%rax, 48(%r12)
LBB0_14:
	movq	(%rbx), %rdi
	movq	%rbx, 8(%rdi)
	cmpq	%r13, %rdi
	je	LBB0_16
## %bb.15:
	leaq	-64(%rbp), %rsi
	callq	_relocate
	movq	%rax, (%rbx)
LBB0_16:
	movq	16(%r12), %rsi
	testq	%rsi, %rsi
	movq	_CACHE_LOG2_BLOCK_SIZE@GOTPCREL(%rip), %rax
	je	LBB0_18
## %bb.17:
	movl	4(%r12), %ecx
	addl	(%rax), %ecx
	decb	%cl
	movl	$1, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	movq	%r15, %rdi
	callq	_platform_memcpy
LBB0_18:
	movq	8(%r12), %rdi
	callq	_khrn_platform_free
	movq	16(%r12), %rdi
	callq	_khrn_platform_free
	movq	%r14, 8(%r12)
	movq	%r15, 16(%r12)
	incl	4(%r12)
	movl	$1, %ebx
	jmp	LBB0_19
LBB0_6:
	movq	%r14, %rdi
	callq	_khrn_platform_free
	movq	%r15, %rdi
	callq	_khrn_platform_free
	xorl	%ebx, %ebx
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CACHE_MAX_DEPTH,8,3            ## @CACHE_MAX_DEPTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"KHRN_CACHE_T.tree"

	.comm	_CACHE_LOG2_BLOCK_SIZE,4,2      ## @CACHE_LOG2_BLOCK_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"KHRN_CACHE_T.data"

	.comm	_callback,4,2                   ## @callback
	.no_dead_strip	_grow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grow
_grow:                                  ; @grow
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldp	w8, w9, [x1]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.1:
Lloh3:
	adrp	x9, _CACHE_MAX_DEPTH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CACHE_MAX_DEPTH@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.le	LBB0_6
; %bb.2:
	bl	_send_grow
	cbz	x0, LBB0_19
; %bb.3:
	ldp	w8, w9, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_4:
	add	w8, w9, #1
	mov	w21, #1
	lsl	w0, w21, w8
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_khrn_platform_malloc
	mov	x20, x0
	ldr	w8, [x19, #4]
Lloh8:
	adrp	x23, _CACHE_LOG2_BLOCK_SIZE@GOTPAGE
Lloh9:
	ldr	x23, [x23, _CACHE_LOG2_BLOCK_SIZE@GOTPAGEOFF]
	ldr	w9, [x23]
	add	w8, w9, w8
	lsl	w0, w21, w8
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_khrn_platform_malloc
	mov	x21, x0
	cmp	x20, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_khrn_platform_free
	mov	x0, x21
	bl	_khrn_platform_free
LBB0_6:
	mov	w0, #0
	b	LBB0_19
LBB0_7:
	ldr	w8, [x19, #4]
	add	w1, w8, #1
	mov	x0, x20
	bl	_tree_init
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_12
; %bb.8:
	mov	w24, #1
	lsl	w8, w24, w8
	cmp	w8, #2
	b.lt	LBB0_11
; %bb.9:
	mov	w25, #3
	mov	w22, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x26, [x8, x22, lsl #3]
	mov	x0, x22
	bl	__msb
	lsl	w8, w25, w0
	eor	w8, w8, w22
	str	x26, [x20, w8, sxtw #3]
	add	x22, x22, #1
	ldr	w8, [x19, #4]
	lsl	w8, w24, w8
	cmp	x22, w8, sxtw
	b.lt	LBB0_10
LBB0_11:
	ldp	x9, x8, [x20, #16]
	cmp	x9, x8
	cinc	x8, x8, eq
	str	x8, [x20, #8]
LBB0_12:
	ldr	x8, [x19, #16]
	stp	x8, x21, [sp, #8]
	add	x0, x19, #56
Lloh12:
	adrp	x8, _callback@GOTPAGE
Lloh13:
	ldr	x8, [x8, _callback@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_khrn_pointer_map_iterate
	add	x24, x19, #40
	ldr	x0, [x19, #48]
	str	x24, [x0]
	add	x22, x19, #24
	cmp	x0, x22
	b.eq	LBB0_14
; %bb.13:
	add	x1, sp, #8
	bl	_relocate
	str	x0, [x19, #48]
LBB0_14:
	ldr	x0, [x22]
	str	x22, [x0, #8]
	cmp	x0, x24
	b.eq	LBB0_16
; %bb.15:
	add	x1, sp, #8
	bl	_relocate
	str	x0, [x22]
LBB0_16:
	ldr	x1, [x19, #16]
	cbz	x1, LBB0_18
; %bb.17:
	ldr	w8, [x19, #4]
	ldr	w9, [x23]
	add	w8, w8, w9
	sub	w8, w8, #1
	mov	w9, #1
	lsl	w2, w9, w8
	mov	x0, x21
	bl	_platform_memcpy
LBB0_18:
	ldr	x0, [x19, #8]
	bl	_khrn_platform_free
	ldr	x0, [x19, #16]
	bl	_khrn_platform_free
	stp	x20, x21, [x19, #8]
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	mov	w0, #1
LBB0_19:
	ldr	x8, [sp, #24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CACHE_MAX_DEPTH,8,3            ; @CACHE_MAX_DEPTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"KHRN_CACHE_T.tree"

	.comm	_CACHE_LOG2_BLOCK_SIZE,4,2      ; @CACHE_LOG2_BLOCK_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"KHRN_CACHE_T.data"

	.comm	_callback,4,2                   ; @callback
	.no_dead_strip	_grow
.subsections_via_symbols
