	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adjust_directions
_adjust_directions:                     ## @adjust_directions
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -104(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	cmpl	$1, %edx
	sbbl	%eax, %eax
	orl	$1, %eax
	addl	%esi, %eax
	js	LBB0_28
## %bb.1:
	movl	%edx, %r12d
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	cmpl	(%rdx), %eax
	jge	LBB0_28
## %bb.2:
	movl	%eax, %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	shlq	$4, %rbx
	cmpl	$0, (%rax,%rbx)
	jle	LBB0_28
## %bb.3:
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	xorl	%edx, %edx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movl	%r12d, -92(%rbp)                ## 4-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
LBB0_25:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_get_anode
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-128(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	callq	_get_anode
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_26:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
LBB0_27:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movslq	(%rax,%rbx), %rcx
	cmpq	%rcx, %r13
	jge	LBB0_28
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
                                        ##     Child Loop BB0_21 Depth 2
	movq	8(%rax,%rbx), %rax
	movq	(%rax,%r13,8), %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_get_anode
	testq	%rax, %rax
	je	LBB0_27
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 16(%rax)
	je	LBB0_27
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %edi
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_r_graph_innodes
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_r_list_get_n
	jmp	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_r_graph_nth_neighbour
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movq	%rax, %rdi
	callq	_get_anode
	testq	%rax, %rax
	je	LBB0_26
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	cmpq	$0, 16(%rax)
	je	LBB0_26
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	testq	%r14, %r14
	je	LBB0_25
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	%r15, %rsi
	callq	_hash_get_int
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edx
	incl	%edx
	cmpl	(%rbx), %edx
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	jge	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movslq	%edx, %r12
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=2
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	incq	%r12
	movslq	(%rbx), %rax
	cmpq	%rax, %r12
	jge	LBB0_18
LBB0_14:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	8(%rcx), %rcx
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rax
	movq	(%rax,%r12,8), %r15
	movq	%r15, %rdi
	callq	_get_anode
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	cmpq	$0, 16(%rax)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	%r15, %rsi
	callq	_hash_get_int
	andl	%eax, -60(%rbp)                 ## 4-byte Folded Spill
	jmp	LBB0_17
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	movq	-120(%rbp), %r15                ## 8-byte Reload
	movl	-92(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_25
## %bb.19:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_hash_set
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	incl	%eax
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	cmpl	(%rcx), %eax
	jge	LBB0_25
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	movslq	%eax, %rbx
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_21 Depth=2
	incq	%rbx
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_25
LBB0_21:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rax
	movq	(%rax,%rbx,8), %r14
	movq	%r14, %rdi
	callq	_get_anode
	testq	%rax, %rax
	je	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=2
	cmpq	$0, 16(%rax)
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=2
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_hash_set
	jmp	LBB0_24
LBB0_28:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_adjust_directions
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adjust_directions
_adjust_directions:                     ; @adjust_directions
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	str	x4, [sp, #32]                   ; 8-byte Folded Spill
	sub	w8, w1, #1
	str	w2, [sp, #44]                   ; 4-byte Folded Spill
	cmp	w2, #0
	csinc	w21, w8, w1, eq
	tbnz	w21, #31, LBB0_28
; %bb.1:
	mov	x22, x0
	ldr	w8, [x0]
	cmp	w21, w8
	b.ge	LBB0_28
; %bb.2:
	ldr	x8, [x22, #8]
	lsl	x26, x21, #4
	ldr	w9, [x8, x26]
	cmp	w9, #1
	b.lt	LBB0_28
; %bb.3:
	mov	x23, #0
	mov	x28, #0
	mov	x25, #0
	stp	xzr, xzr, [sp, #48]             ; 16-byte Folded Spill
	stp	x3, x26, [sp, #8]               ; 16-byte Folded Spill
	str	x21, [sp, #24]                  ; 8-byte Folded Spill
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x20, x25
	mov	x24, x28
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	ldr	x8, [x22, #8]
	ldrsw	x9, [x8, x26]
	mov	x28, x24
	mov	x25, x20
	cmp	x23, x9
	b.ge	LBB0_28
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
                                        ;     Child Loop BB0_24 Depth 2
	add	x8, x8, x21, lsl #4
	ldr	x8, [x8, #8]
	ldr	x24, [x8, x23, lsl #3]
	mov	x0, x24
	bl	_get_anode
	cbz	x0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x27, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x22, #16]
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x1, x24
	bl	_r_graph_innodes
	mov	w1, #0
	bl	_r_list_get_n
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x1, x24
	mov	w2, #0
	bl	_r_graph_nth_neighbour
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x20, x0
	bl	_get_anode
	cbz	x0, LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_4
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	cbz	x28, LBB0_27
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
	mov	x1, x25
	bl	_hash_get_int
	mov	x25, x0
	ldr	x10, [sp, #56]                  ; 8-byte Folded Reload
	ldr	w8, [x10]
	add	w8, w8, #1
	ldr	w9, [x19]
	cmp	w8, w9
	b.ge	LBB0_20
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	sxtw	x26, w8
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=2
	ldr	x10, [sp, #56]                  ; 8-byte Folded Reload
	add	x26, x26, #1
	ldrsw	x8, [x19]
	cmp	x26, x8
	b.ge	LBB0_20
LBB0_17:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22, #8]
	ldr	x9, [x10, #8]
	add	x8, x8, x9, lsl #4
	ldr	x8, [x8, #8]
	ldr	x21, [x8, x26, lsl #3]
	mov	x0, x21
	bl	_get_anode
	cbz	x0, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=2
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_16
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=2
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
	mov	x1, x21
	bl	_hash_get_int
	and	w25, w0, w25
	b	LBB0_16
LBB0_20:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x26, [sp, #8]                   ; 8-byte Folded Reload
	cbz	w25, LBB0_27
; %bb.21:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x26
	mov	x1, x28
	ldr	w2, [sp, #44]                   ; 4-byte Folded Reload
	bl	_hash_set
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	ldr	w8, [x8]
	add	w8, w8, #1
	ldr	w9, [x27]
	cmp	w8, w9
	b.ge	LBB0_27
; %bb.22:                               ;   in Loop: Header=BB0_6 Depth=1
	sxtw	x21, w8
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=2
	add	x21, x21, #1
	ldrsw	x8, [x27]
	cmp	x21, x8
	b.ge	LBB0_27
LBB0_24:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22, #8]
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	ldr	x9, [x9, #8]
	add	x8, x8, x9, lsl #4
	ldr	x8, [x8, #8]
	ldr	x19, [x8, x21, lsl #3]
	mov	x0, x19
	bl	_get_anode
	cbz	x0, LBB0_23
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=2
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_23
; %bb.26:                               ;   in Loop: Header=BB0_24 Depth=2
	mov	x0, x26
	mov	x1, x19
	ldr	w2, [sp, #44]                   ; 4-byte Folded Reload
	bl	_hash_set
	b	LBB0_23
LBB0_27:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x24
	bl	_get_anode
	str	x0, [sp, #48]                   ; 8-byte Folded Spill
	mov	x0, x20
	bl	_get_anode
	str	x0, [sp, #56]                   ; 8-byte Folded Spill
	ldp	x26, x21, [sp, #16]             ; 16-byte Folded Reload
	b	LBB0_5
LBB0_28:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_adjust_directions
.subsections_via_symbols
