	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_route_torus                    ## -- Begin function route_torus
	.p2align	4, 0x90
_route_torus:                           ## @route_torus
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	cmpl	$0, 8(%rdi)
	jle	LBB0_4
## %bb.1:
	movl	$1, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	callq	_torus_lft
	testq	%rax, %rax
	setne	%al
	testl	%r15d, %r15d
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %r15d
	incq	%rbx
	movslq	8(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
## %bb.3:
	movl	$-1, %eax
	testb	%cl, %cl
	je	LBB0_5
LBB0_4:
	movq	%r14, %rdi
	callq	_torus_master_stree
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpq	$1, %rcx
	sbbl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	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	_route_torus                    ; -- Begin function route_torus
	.p2align	2
_route_torus:                           ; @route_torus
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w8, [x0, #8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x21, #0
	mov	w20, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	w1, [x8, x21, lsl #2]
	mov	x0, x19
	bl	_torus_lft
	cmp	x0, #0
	ccmp	w20, #0, #4, ne
	cset	w20, ne
	add	x21, x21, #1
	ldrsw	x8, [x19, #8]
	cmp	x21, x8
	b.lt	LBB0_2
; %bb.3:
	cbz	w20, LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_torus_master_stree
	cmp	x0, #0
	csetm	w0, eq
	b	LBB0_6
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
