	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reorder_node_links
_reorder_node_links:                    ## @reorder_node_links
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	8(%rdi), %rbx
	movslq	%edx, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r12
	movl	(%r12), %r15d
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edi
	movl	$8, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edi
	movl	$4, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_37
## %bb.4:
	movq	%rax, %r9
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jle	LBB0_5
## %bb.13:
	xorl	%r10d, %r10d
	xorl	%r13d, %r13d
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%r10
	cmpq	-56(%rbp), %r10                 ## 8-byte Folded Reload
	je	LBB0_6
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_18 Depth 2
                                        ##     Child Loop BB0_26 Depth 2
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movslq	(%rax,%r10,4), %r14
	leal	(%r14,%r14), %r8d
	incl	%r8d
	movq	8(%r12), %rax
	cmpq	$0, (%rax,%r14,8)
	movq	%r10, -80(%rbp)                 ## 8-byte Spill
	jle	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r8d, %esi
	callq	_opposite
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %r8d
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	leal	(%r14,%r14), %eax
	testl	%r15d, %r15d
	jle	LBB0_22
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_18 Depth=2
	incq	%rcx
	cmpq	%rcx, %r15
	je	LBB0_22
LBB0_18:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	24(%r12), %rdx
	movq	(%rdx,%rcx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=2
	movq	16(%r12), %rbx
	cmpl	%r8d, (%rbx,%rcx,4)
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=2
	movslq	%r13d, %r13
	movq	%rsi, (%rdi,%r13,8)
	movl	%r8d, (%r9,%r13,4)
	movq	$0, (%rdx,%rcx,8)
	incl	%r13d
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_14 Depth=1
	addl	$2, %eax
	movq	8(%r12), %rcx
	cmpq	$0, (%rcx,%r14,8)
	jle	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_opposite
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_24:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	-80(%rbp), %r10                 ## 8-byte Reload
	testl	%r15d, %r15d
	jle	LBB0_30
## %bb.25:                              ##   in Loop: Header=BB0_14 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_26 Depth=2
	incq	%rcx
	cmpq	%rcx, %r15
	je	LBB0_30
LBB0_26:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	24(%r12), %rdx
	movq	(%rdx,%rcx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_29
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	16(%r12), %rbx
	cmpl	%eax, (%rbx,%rcx,4)
	jne	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=2
	movslq	%r13d, %r13
	movq	%rsi, (%rdi,%r13,8)
	movl	%eax, (%r9,%r13,4)
	movq	$0, (%rdx,%rcx,8)
	incl	%r13d
	jmp	LBB0_29
LBB0_1:
	movq	_OSM_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_2
LBB0_37:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	_OSM_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_2:
	movq	%rbx, %rdi
	callq	_OSM_LOG
	movl	$-1, %eax
	jmp	LBB0_36
LBB0_5:
	xorl	%r13d, %r13d
LBB0_6:
	testl	%r15d, %r15d
	jle	LBB0_35
## %bb.7:
	xorl	%eax, %eax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rax
	cmpq	%rax, %r15
	je	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rcx
	movq	(%rcx,%rax,8), %rdx
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movslq	%r13d, %r13
	movq	%rdx, (%rdi,%r13,8)
	movq	16(%r12), %rdx
	movl	(%rdx,%rax,4), %edx
	movl	%edx, (%r9,%r13,4)
	movq	$0, (%rcx,%rax,8)
	incl	%r13d
	jmp	LBB0_10
LBB0_11:
	cmpl	$1, %r15d
	jne	LBB0_31
## %bb.12:
	xorl	%eax, %eax
	jmp	LBB0_33
LBB0_31:
	movl	%r15d, %ecx
	andl	$-2, %ecx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_32:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rax,8), %rdx
	movq	24(%r12), %rsi
	movq	%rdx, (%rsi,%rax,8)
	movl	(%r9,%rax,4), %edx
	movq	16(%r12), %rsi
	movl	%edx, (%rsi,%rax,4)
	movq	8(%rdi,%rax,8), %rdx
	movq	24(%r12), %rsi
	movq	%rdx, 8(%rsi,%rax,8)
	movl	4(%r9,%rax,4), %edx
	movq	16(%r12), %rsi
	movl	%edx, 4(%rsi,%rax,4)
	addq	$2, %rax
	cmpq	%rax, %rcx
	jne	LBB0_32
LBB0_33:
	testb	$1, %r15b
	je	LBB0_35
## %bb.34:
	movq	(%rdi,%rax,8), %rcx
	movq	24(%r12), %rdx
	movq	%rcx, (%rdx,%rax,8)
	movl	(%r9,%rax,4), %ecx
	movq	16(%r12), %rdx
	movl	%ecx, (%rdx,%rax,4)
LBB0_35:
	movq	%r9, %rbx
	callq	_free
	movq	%rbx, %rdi
	callq	_free
	xorl	%eax, %eax
LBB0_36:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OSM_LOG_ERROR,4,2              ## @OSM_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed allocating links array - out of memory\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed allocating axes array - out of memory\n"

	.no_dead_strip	_reorder_node_links
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reorder_node_links
_reorder_node_links:                    ; @reorder_node_links
	.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
	mov	x22, x1
	ldp	x8, x24, [x0]
	ldr	x23, [x8, w2, sxtw #3]
	ldr	x25, [x23]
	ldr	w19, [x25]
	ldr	w26, [x1]
	mov	x0, x19
	mov	w1, #8
	bl	_calloc
	cbz	x0, LBB0_21
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	w1, #4
	bl	_calloc
	cbz	x0, LBB0_22
; %bb.2:
	mov	x21, x0
	cmp	w26, #1
	b.lt	LBB0_24
; %bb.3:
	mov	x27, #0
	mov	w24, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x27, x27, #1
	cmp	x27, x26
	b.eq	LBB0_25
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;     Child Loop BB0_18 Depth 2
	ldr	x8, [x22, #8]
	ldrsw	x28, [x8, x27, lsl #2]
	mov	w1, #1
	bfi	w1, w28, #1, #31
	ldr	x8, [x25, #8]
	ldr	x8, [x8, x28, lsl #3]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_opposite
	mov	x1, x0
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	w19, #1
	b.lt	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, #0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	x8, x8, #1
	cmp	x19, x8
	b.eq	LBB0_13
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x25, #24]
	ldr	x10, [x9, x8, lsl #3]
	cbz	x10, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x11, [x25, #16]
	ldr	w11, [x11, x8, lsl #2]
	cmp	w11, w1
	b.ne	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	str	x10, [x20, w24, sxtw #3]
	str	w1, [x21, w24, sxtw #2]
	add	w24, w24, #1
	str	xzr, [x9, x8, lsl #3]
	b	LBB0_9
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	lsl	w8, w28, #1
	add	w1, w8, #2
	ldr	x8, [x25, #8]
	ldr	x8, [x8, x28, lsl #3]
	cmp	x8, #1
	b.lt	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_opposite
	mov	x1, x0
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w19, #1
	b.lt	LBB0_4
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, #0
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=2
	add	x8, x8, #1
	cmp	x19, x8
	b.eq	LBB0_4
LBB0_18:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x25, #24]
	ldr	x10, [x9, x8, lsl #3]
	cbz	x10, LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
	ldr	x11, [x25, #16]
	ldr	w11, [x11, x8, lsl #2]
	cmp	w11, w1
	b.ne	LBB0_17
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=2
	str	x10, [x20, w24, sxtw #3]
	str	w1, [x21, w24, sxtw #2]
	add	w24, w24, #1
	str	xzr, [x9, x8, lsl #3]
	b	LBB0_17
LBB0_21:
Lloh0:
	adrp	x8, _OSM_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OSM_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_23
LBB0_22:
	mov	x0, x20
	bl	_free
Lloh5:
	adrp	x8, _OSM_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OSM_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_23:
	mov	x0, x24
	bl	_OSM_LOG
	mov	w0, #-1
	b	LBB0_33
LBB0_24:
	mov	w24, #0
LBB0_25:
	cmp	w19, #1
	b.lt	LBB0_32
; %bb.26:
	mov	x8, #0
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_28 Depth=1
	add	x8, x8, #1
	cmp	x19, x8
	b.eq	LBB0_30
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25, #24]
	ldr	x10, [x9, x8, lsl #3]
	cbz	x10, LBB0_27
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	str	x10, [x20, w24, sxtw #3]
	ldr	x10, [x25, #16]
	ldr	w10, [x10, x8, lsl #2]
	str	w10, [x21, w24, sxtw #2]
	str	xzr, [x9, x8, lsl #3]
	add	w24, w24, #1
	b	LBB0_27
LBB0_30:
	mov	x8, #0
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	lsl	x9, x8, #3
	ldr	x10, [x20, x9]
	ldr	x11, [x25, #24]
	str	x10, [x11, x9]
	lsl	x9, x8, #2
	ldr	w10, [x21, x9]
	ldr	x11, [x25, #16]
	str	w10, [x11, x9]
	add	x8, x8, #1
	cmp	x19, x8
	b.ne	LBB0_31
LBB0_32:
	mov	x0, x20
	bl	_free
	mov	x0, x21
	bl	_free
	mov	w0, #0
LBB0_33:
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_OSM_LOG_ERROR,4,2              ; @OSM_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed allocating links array - out of memory\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed allocating axes array - out of memory\n"

	.no_dead_strip	_reorder_node_links
.subsections_via_symbols
