	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tsearch                        ## -- Begin function tsearch
	.p2align	4, 0x90
_tsearch:                               ## @tsearch
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.1:
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r12
	leaq	-48(%rbp), %rdi
	callq	_path_init
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	leaq	-48(%rbp), %r14
	movq	%rbx, %r15
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_path_taking_left
	movq	(%r15), %r15
	addq	$16, %r15
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_path_init
	movq	(%r15), %rax
	movq	%r15, %rbx
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rax), %rsi
	movq	%r12, %rdi
	callq	*%r13
	testl	%eax, %eax
	js	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	je	LBB0_24
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_path_taking_right
	movq	(%r15), %r15
	addq	$24, %r15
	jmp	LBB0_4
LBB0_11:
	movq	%rbx, %r15
LBB0_12:
	movl	$32, %edi
	callq	_malloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.13:
	movq	%rax, %r14
	movq	%r12, 8(%rax)
	movq	$0, (%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rax)
	movq	%rbx, %r13
	movq	(%rbx), %rbx
	cmpq	(%r15), %rbx
	je	LBB0_20
## %bb.14:
	leaq	-48(%rbp), %r12
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_17 Depth=1
	decq	%rcx
	movq	%rcx, (%rbx)
	addq	$24, %rbx
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	(%rbx), %rbx
	cmpq	(%r15), %rbx
	je	LBB0_19
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_path_took_left
	movq	(%rbx), %rcx
	testq	%rax, %rax
	je	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	incq	%rcx
	movq	%rcx, (%rbx)
	addq	$16, %rbx
	jmp	LBB0_16
LBB0_10:
	xorl	%r14d, %r14d
	jmp	LBB0_32
LBB0_19:
	movq	(%r13), %rbx
LBB0_20:
	movq	(%rbx), %rax
	cmpq	$2, %rax
	jl	LBB0_25
## %bb.21:
	movq	16(%rbx), %rax
	cmpq	$0, (%rax)
	movq	24(%rax), %rcx
	js	LBB0_28
## %bb.22:
	movq	%rcx, 16(%rbx)
	movq	%rbx, 24(%rax)
	jmp	LBB0_31
LBB0_24:
	movq	(%r15), %r14
	jmp	LBB0_32
LBB0_25:
	cmpq	$-2, %rax
	jg	LBB0_32
## %bb.26:
	movq	24(%rbx), %rax
	cmpq	$0, (%rax)
	movq	16(%rax), %rcx
	jle	LBB0_30
## %bb.27:
	movq	16(%rcx), %rdx
	movq	%rdx, 24(%rbx)
	movq	%rbx, 16(%rcx)
	movq	24(%rcx), %rdx
	movq	%rdx, 16(%rax)
	movq	%rax, 24(%rcx)
	movq	%rcx, (%r13)
	movq	(%rcx), %rdx
	shrq	$63, %rdx
	movq	%rdx, (%rbx)
	xorl	%edx, %edx
	cmpq	$0, (%rcx)
	setg	%dl
	negq	%rdx
	jmp	LBB0_29
LBB0_28:
	movq	16(%rcx), %rdx
	movq	%rdx, 24(%rax)
	movq	%rax, 16(%rcx)
	movq	24(%rcx), %rdx
	movq	%rdx, 16(%rbx)
	movq	%rbx, 24(%rcx)
	movq	%rcx, (%r13)
	xorl	%edx, %edx
	cmpq	$0, (%rcx)
	setg	%dl
	negq	%rdx
	movq	%rdx, (%rbx)
	movq	(%rcx), %rdx
	shrq	$63, %rdx
LBB0_29:
	movq	%rdx, (%rax)
	movq	$0, (%rcx)
	jmp	LBB0_32
LBB0_30:
	movq	%rcx, 24(%rbx)
	movq	%rbx, 16(%rax)
LBB0_31:
	movq	%rax, (%r13)
	movq	$0, (%rbx)
	movq	$0, (%rax)
LBB0_32:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tsearch                        ; -- Begin function tsearch
	.p2align	2
_tsearch:                               ; @tsearch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x1, LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	add	x0, sp, #8
	bl	_path_init
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.2:
	mov	x22, x19
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #8
	bl	_path_taking_left
	ldr	x8, [x22]
	add	x22, x8, #16
	ldr	x8, [x22]
	cbz	x8, LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8]
	cbz	x9, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #8
	bl	_path_init
	ldr	x8, [x22]
	mov	x19, x22
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x8, #8]
	mov	x0, x21
	blr	x20
	tbnz	w0, #31, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w0, LBB0_21
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #8
	bl	_path_taking_right
	ldr	x8, [x22]
	add	x22, x8, #24
	ldr	x8, [x22]
	cbnz	x8, LBB0_4
	b	LBB0_11
LBB0_9:
	mov	x20, #0
	b	LBB0_29
LBB0_10:
	mov	x22, x19
LBB0_11:
	mov	w0, #32
	bl	_malloc
	mov	x20, x0
	str	x0, [x22]
	cbz	x0, LBB0_29
; %bb.12:
	stp	xzr, x21, [x20]
	stp	xzr, xzr, [x20, #16]
	ldr	x21, [x19]
	ldr	x8, [x22]
	cmp	x21, x8
	b.ne	LBB0_15
	b	LBB0_18
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	sub	x8, x8, #1
	str	x8, [x21], #24
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	x21, [x21]
	ldr	x8, [x22]
	cmp	x21, x8
	b.eq	LBB0_17
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	bl	_path_took_left
	ldr	x8, [x21]
	cbz	x0, LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x8, x8, #1
	str	x8, [x21], #16
	b	LBB0_14
LBB0_17:
	ldr	x21, [x19]
LBB0_18:
	ldr	x8, [x21]
	cmp	x8, #2
	b.lt	LBB0_22
; %bb.19:
	ldr	x8, [x21, #16]
	ldr	x10, [x8]
	ldr	x9, [x8, #24]
	tbnz	x10, #63, LBB0_25
; %bb.20:
	str	x9, [x21, #16]
	str	x21, [x8, #24]
	b	LBB0_28
LBB0_21:
	ldr	x20, [x22]
	b	LBB0_29
LBB0_22:
	cmn	x8, #2
	b.gt	LBB0_29
; %bb.23:
	ldr	x8, [x21, #24]
	ldr	x10, [x8]
	ldr	x9, [x8, #16]
	cmp	x10, #1
	b.lt	LBB0_27
; %bb.24:
	ldr	x10, [x9, #16]
	str	x10, [x21, #24]
	ldr	x10, [x9, #24]
	str	x21, [x9, #16]
	str	x10, [x8, #16]
	str	x8, [x9, #24]
	str	x9, [x19]
	ldr	x10, [x9]
	lsr	x10, x10, #63
	str	x10, [x21]
	ldr	x10, [x9]
	cmp	x10, #0
	csetm	x10, gt
	b	LBB0_26
LBB0_25:
	ldr	x10, [x9, #16]
	str	x10, [x8, #24]
	ldr	x10, [x9, #24]
	str	x8, [x9, #16]
	str	x10, [x21, #16]
	str	x21, [x9, #24]
	str	x9, [x19]
	ldr	x10, [x9]
	cmp	x10, #0
	csetm	x10, gt
	str	x10, [x21]
	ldr	x10, [x9]
	lsr	x10, x10, #63
LBB0_26:
	str	x10, [x8]
	str	xzr, [x9]
	b	LBB0_29
LBB0_27:
	str	x9, [x21, #24]
	str	x21, [x8, #16]
LBB0_28:
	str	x8, [x19]
	str	xzr, [x21]
	str	xzr, [x8]
LBB0_29:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
