	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function halve
_halve:                                 ## @halve
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_tnode_child_length
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movl	16(%r15), %edi
	movl	(%r15), %esi
	movl	4(%r15), %edx
	decl	%edx
	callq	_tnode_new
	testq	%rax, %rax
	je	LBB0_24
## %bb.1:
	movq	%rax, %r13
	testl	%r14d, %r14d
	jle	LBB0_17
## %bb.2:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%r12d
	incl	%ebx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	cmpl	%r14d, %ebx
	jge	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_tnode_get_child
	movq	%rax, %r14
	incl	%ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_tnode_get_child
	testq	%r14, %r14
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %edi
	movl	4(%r13), %esi
	addl	(%r13), %esi
	movl	$1, %edx
	callq	_tnode_new
	testq	%rax, %rax
	je	LBB0_18
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%r12d, %edx
	movq	%rax, %rcx
	callq	_put_child
	jmp	LBB0_7
LBB0_8:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_tnode_get_child
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_put_child
	movq	%r13, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	_put_child
	movq	%r13, %rdi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	$1, %edx
	movq	%r15, %rcx
	callq	_put_child
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	callq	_resize
	movq	%r13, %rdi
	movq	%r14, %r13
	movq	%r14, %rsi
	movl	%ebx, %edx
	movq	%rax, %rcx
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	callq	_put_child
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=1
	incl	%ebx
	incl	%r12d
	cmpl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	jge	LBB0_17
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_tnode_get_child
	movq	%rax, %r14
	incl	%r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_tnode_get_child
	movq	%rax, %r15
	testq	%r14, %r14
	je	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	testq	%r15, %r15
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%ebx, %edx
	movq	%r14, %rcx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	testq	%r15, %r15
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%ebx, %edx
	movq	%r15, %rcx
	jmp	LBB0_15
LBB0_17:
	movq	%r15, %rdi
	callq	_tnode_free_safe
	movq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	%r13, %rdi
	callq	_tnode_child_length
	testl	%eax, %eax
	jle	LBB0_23
## %bb.19:
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_23
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	callq	_tnode_free
	jmp	LBB0_22
LBB0_23:
	movq	%r13, %rdi
	callq	_tnode_free
LBB0_24:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"In halve\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_halve
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function halve
_halve:                                 ; @halve
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_tnode_child_length
	mov	x22, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	ldr	w0, [x20, #16]
	ldp	w1, w8, [x20]
	sub	w2, w8, #1
	bl	_tnode_new
	cbz	x0, LBB0_24
; %bb.1:
	mov	x19, x0
	cmp	w22, #1
	b.lt	LBB0_17
; %bb.2:
	mov	w23, #0
	mov	w24, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w23, w23, #1
	add	w24, w24, #1
	cmp	w24, w22
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x24
	bl	_tnode_get_child
	mov	x25, x0
	add	w24, w24, #1
	mov	x0, x20
	mov	x1, x24
	bl	_tnode_get_child
	cbz	x25, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x25]
	ldp	w8, w9, [x19]
	add	w1, w9, w8
	mov	w2, #1
	bl	_tnode_new
	cbz	x0, LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x3, x0
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	bl	_put_child
	b	LBB0_3
LBB0_8:
	mov	w23, #0
	mov	w24, #0
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_tnode_get_child
	mov	x27, x0
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	mov	x3, #0
	bl	_put_child
	mov	x0, x21
	mov	x1, x27
	mov	w2, #0
	mov	x3, x26
	bl	_put_child
	mov	x0, x21
	mov	x1, x27
	mov	w2, #1
	mov	x3, x25
	bl	_put_child
	mov	x0, x21
	mov	x1, x27
	bl	_resize
	mov	x3, x0
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	bl	_put_child
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w23, w23, #1
	add	w24, w24, #1
	cmp	w24, w22
	b.ge	LBB0_17
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x24
	bl	_tnode_get_child
	mov	x26, x0
	add	w24, w24, #1
	mov	x0, x20
	mov	x1, x24
	bl	_tnode_get_child
	mov	x25, x0
	cbz	x26, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	cbnz	x25, LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	mov	x3, x26
	b	LBB0_10
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	cbz	x25, LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	mov	x3, x25
	b	LBB0_10
LBB0_17:
	mov	x0, x20
	bl	_tnode_free_safe
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_18:
	mov	x0, x19
	bl	_tnode_child_length
	cmp	w0, #1
	b.lt	LBB0_23
; %bb.19:
	mov	x20, #0
	mov	w8, w0
	lsl	x21, x8, #3
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=1
	add	x20, x20, #8
	cmp	x21, x20
	b.eq	LBB0_23
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x20]
	cbz	x0, LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	bl	_tnode_free
	b	LBB0_20
LBB0_23:
	mov	x0, x19
	bl	_tnode_free
LBB0_24:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_ERR_PTR
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"In halve\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_halve
.subsections_via_symbols
