	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function listree_get_kth
_listree_get_kth:                       ## @listree_get_kth
	.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
	testl	%esi, %esi
	js	LBB0_10
## %bb.1:
	movl	%esi, %r15d
	movl	(%rdi), %r12d
	movq	8(%rdi), %rax
	movq	(%rax), %rbx
	movl	(%rbx), %eax
	addl	%r12d, %eax
	cmpl	%esi, %eax
	jle	LBB0_10
## %bb.2:
	movq	_NIL@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_3
LBB0_9:
	testl	%r15d, %r15d
	setns	%al
	cmpl	%r12d, %r15d
	setl	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_in_array                       ## TAILCALL
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r12d, %r15d
	movq	%r13, %r12
	movq	_rpos_to_delta@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%rbx, %rdi
	callq	_NODE_TYPE
	addl	(%r13,%rax,8), %r14d
	movq	%r12, %r13
	movl	%r15d, %r12d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	subl	%r14d, %r15d
	movq	8(%rbx), %rax
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	cmpq	(%r13), %rax
	je	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_NODE_RPOS
	movl	%r12d, %ecx
	subl	%eax, %ecx
	movq	16(%rbx), %rax
	addl	(%rax), %ecx
	cmpl	%ecx, %r15d
	jl	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_NODE_RPOS
	movl	%r12d, %ecx
	subl	%eax, %ecx
	movq	16(%rbx), %rax
	movl	(%rax), %r14d
	addl	%r14d, %ecx
	cmpl	%ecx, %r15d
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_NODE_TYPE
	movq	_TF_MINUS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rbx), %rax
	movl	(%rax), %r14d
	jmp	LBB0_7
LBB0_10:
	movl	$-1, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_in_tree                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NIL,8,3                        ## @NIL
	.comm	_TF_MINUS,8,3                   ## @TF_MINUS
	.comm	_rpos_to_delta,8,3              ## @rpos_to_delta
	.no_dead_strip	_listree_get_kth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function listree_get_kth
_listree_get_kth:                       ; @listree_get_kth
	.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
	tbnz	w1, #31, LBB0_10
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	w22, [x0]
	ldr	x8, [x0, #8]
	ldr	x21, [x8]
	ldr	w8, [x21]
	add	w8, w8, w22
	cmp	w8, w1
	b.le	LBB0_10
; %bb.2:
Lloh0:
	adrp	x23, _NIL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NIL@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x21, x8
	b.eq	LBB0_11
; %bb.3:
Lloh2:
	adrp	x24, _TF_MINUS@GOTPAGE
Lloh3:
	ldr	x24, [x24, _TF_MINUS@GOTPAGEOFF]
Lloh4:
	adrp	x25, _rpos_to_delta@GOTPAGE
Lloh5:
	ldr	x25, [x25, _rpos_to_delta@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x27, [x25]
	mov	x0, x21
	bl	_NODE_TYPE
	ldr	x8, [x27, x0, lsl #3]
	add	w8, w26, w8
	sub	w19, w19, w8
	ldr	x8, [x21, #8]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x23]
	mov	x21, x8
	cmp	x8, x9
	b.eq	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_NODE_RPOS
	ldr	x8, [x21, #16]
	ldr	w9, [x8]
	sub	w10, w22, w0
	add	w9, w10, w9
	cmp	w19, w9
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_NODE_RPOS
	ldr	x8, [x21, #16]
	ldr	w26, [x8]
	sub	w8, w22, w0
	add	w8, w8, w26
	cmp	w19, w8
	b.ne	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_NODE_TYPE
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x21, #16]
	ldr	w26, [x8]
	b	LBB0_4
LBB0_10:
	mov	w0, #-1
	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_11:
	cmp	w19, #0
	ccmp	w19, w22, #0, ge
	cset	w0, lt
	bl	_assert
	mov	x0, x20
	mov	x1, 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
	b	_in_array
LBB0_12:
	mov	x0, x21
	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	_in_tree
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_NIL,8,3                        ; @NIL
	.comm	_TF_MINUS,8,3                   ; @TF_MINUS
	.comm	_rpos_to_delta,8,3              ; @rpos_to_delta
	.no_dead_strip	_listree_get_kth
.subsections_via_symbols
