	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_listree_get_kth                ## -- Begin function listree_get_kth
	.p2align	4, 0x90
_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	$-1, %eax
	testl	%esi, %esi
	js	LBB0_14
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	16(%rdi), %rdi
	movl	(%r14), %r10d
	movl	(%rdi), %ecx
	addl	%r10d, %ecx
	cmpl	%esi, %ecx
	jle	LBB0_14
## %bb.2:
	movq	_NIL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdi
	je	LBB0_10
## %bb.3:
	movq	_TF_MINUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_y_to_delta@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r9
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	addl	(%r9,%rdx,8), %esi
	subl	%esi, %ebx
	movq	16(%rdi), %rdx
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rdx, %rdi
	cmpq	%rax, %rdx
	je	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r10d, %ecx
	subl	4(%rdi), %ecx
	movq	24(%rdi), %rdx
	movl	(%rdx), %esi
	addl	%esi, %ecx
	cmpl	%ecx, %ebx
	jl	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%rdi), %edx
	andl	$3, %edx
	cmpl	%ecx, %ebx
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%r8d, %edx
	je	LBB0_8
## %bb.7:
	addq	$12, %rdi
	jmp	LBB0_13
LBB0_10:
	cmpl	%r10d, %ebx
	setl	%al
	testl	%ebx, %ebx
	setns	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movslq	%ebx, %rcx
	leaq	(%rax,%rcx,4), %rdi
LBB0_13:
	movl	(%rdi), %eax
	jmp	LBB0_14
LBB0_11:
	movl	$-2, %eax
LBB0_14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NIL,8,3                        ## @NIL
	.comm	_TF_MINUS,4,2                   ## @TF_MINUS
	.comm	_y_to_delta,8,3                 ## @y_to_delta
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_listree_get_kth                ; -- Begin function listree_get_kth
	.p2align	2
_listree_get_kth:                       ; @listree_get_kth
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	tbnz	w1, #31, LBB0_8
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x10, [x0, #16]
	ldr	w8, [x0]
	ldr	w9, [x10]
	add	w9, w9, w8
	cmp	w9, w1
	b.le	LBB0_8
; %bb.2:
Lloh0:
	adrp	x9, _NIL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NIL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x10, x9
	b.eq	LBB0_9
; %bb.3:
Lloh3:
	adrp	x11, _TF_MINUS@GOTPAGE
Lloh4:
	ldr	x11, [x11, _TF_MINUS@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
Lloh6:
	adrp	x12, _y_to_delta@GOTPAGE
Lloh7:
	ldr	x12, [x12, _y_to_delta@GOTPAGEOFF]
Lloh8:
	ldr	x12, [x12]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x10, x13
	cmp	x13, x9
	b.eq	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w15, [x10, #4]
	ldr	x13, [x10, #24]
	ldr	w14, [x13]
	sub	w15, w8, w15
	add	w15, w14, w15
	cmp	w19, w15
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w13, [x10, #8]
	and	x13, x13, #0x3
	cmp	w19, w15
	ccmp	w13, w11, #4, eq
	b.ne	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x13, [x12, x13, lsl #3]
	add	w13, w14, w13
	sub	w19, w19, w13
	ldr	x13, [x10, #16]
	b	LBB0_4
LBB0_8:
	mov	w0, #-1
	b	LBB0_14
LBB0_9:
	cmp	w19, #0
	ccmp	w19, w8, #0, ge
	cset	w0, lt
	bl	_assert
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_11
; %bb.10:
	add	x8, x8, w19, sxtw #2
	b	LBB0_13
LBB0_11:
	mov	w0, #-2
	b	LBB0_14
LBB0_12:
	add	x8, x10, #12
LBB0_13:
	ldr	w0, [x8]
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NIL,8,3                        ; @NIL
	.comm	_TF_MINUS,4,2                   ; @TF_MINUS
	.comm	_y_to_delta,8,3                 ; @y_to_delta
.subsections_via_symbols
