	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsort
_tsort:                                 ## @tsort
	.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
	movq	_graph@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_27
## %bb.1:
	movq	_NF_ACYCLIC@GOTPCREL(%rip), %r12
	xorl	%r15d, %r15d
	jmp	LBB0_2
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_errx
LBB0_26:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rdi
	movl	$0, %r15d
	testq	%rdi, %rdi
	je	LBB0_27
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_15 Depth 2
                                        ##     Child Loop BB0_21 Depth 2
	movq	16(%rdi), %rbx
	cmpq	$0, (%rdi)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_remove_node
	incl	%r15d
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	testq	%rbx, %rbx
	jne	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r15d, %r15d
	movl	$0, %r15d
	jne	LBB0_2
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%rdi, %rdi
	je	LBB0_27
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_cycle_buf@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%rdi), %rdi
	addl	$8, %ebx
	testq	%rdi, %rdi
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_malloc
	movq	_cycle_buf@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	movl	%ebx, %edi
	callq	_malloc
	movq	_longest_cycle@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	cmpq	$0, (%r15)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	testq	%rax, %rax
	jne	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	xorl	%esi, %esi
	callq	_err
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rbx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_15 Depth=2
	movl	(%r12), %eax
	orl	%eax, 8(%rbx)
	xorl	%eax, %eax
	callq	_clear_cycle
LBB0_24:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	16(%rbx), %rbx
LBB0_15:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testq	%rbx, %rbx
	je	LBB0_25
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	movl	(%r12), %eax
	testl	%eax, 8(%rbx)
	jne	LBB0_24
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_find_cycle
	testl	%eax, %eax
	je	LBB0_23
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r13d
	movq	_quiet@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movq	_longest_cycle@GOTPCREL(%rip), %r14
	jne	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	testl	%r13d, %r13d
	jle	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %r13d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r14), %rax
	movq	(%rax,%r15,8), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	incq	%r15
	cmpq	%r15, %r13
	jne	LBB0_21
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_remove_node
	xorl	%eax, %eax
	callq	_clear_cycle
	movq	_graph@GOTPCREL(%rip), %r14
	jmp	LBB0_26
LBB0_27:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_graph,8,3                      ## @graph
	.comm	_cycle_buf,8,3                  ## @cycle_buf
	.comm	_longest_cycle,8,3              ## @longest_cycle
	.comm	_NF_ACYCLIC,4,2                 ## @NF_ACYCLIC
	.comm	_quiet,4,2                      ## @quiet
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cycle in data"

L_.str.1:                               ## @.str.1
	.asciz	"%s"

L_.str.2:                               ## @.str.2
	.asciz	"internal error -- could not find cycle"

	.no_dead_strip	_tsort
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tsort
_tsort:                                 ; @tsort
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x24, _graph@GOTPAGE
Lloh1:
	ldr	x24, [x24, _graph@GOTPAGEOFF]
	ldr	x0, [x24]
	cbz	x0, LBB0_24
; %bb.1:
	mov	w22, #0
Lloh2:
	adrp	x25, _cycle_buf@GOTPAGE
Lloh3:
	ldr	x25, [x25, _cycle_buf@GOTPAGEOFF]
Lloh4:
	adrp	x26, _longest_cycle@GOTPAGE
Lloh5:
	ldr	x26, [x26, _longest_cycle@GOTPAGEOFF]
Lloh6:
	adrp	x19, l_.str.2@PAGE
Lloh7:
	add	x19, x19, l_.str.2@PAGEOFF
Lloh8:
	adrp	x27, _NF_ACYCLIC@GOTPAGE
Lloh9:
	ldr	x27, [x27, _NF_ACYCLIC@GOTPAGEOFF]
Lloh10:
	adrp	x28, _quiet@GOTPAGE
Lloh11:
	ldr	x28, [x28, _quiet@GOTPAGEOFF]
Lloh12:
	adrp	x21, l_.str.1@PAGE
Lloh13:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
	mov	x1, x19
	bl	_errx
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w22, #0
	ldr	x0, [x24]
	cbz	x0, LBB0_24
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
                                        ;     Child Loop BB0_17 Depth 2
                                        ;     Child Loop BB0_22 Depth 2
	ldr	x20, [x0, #16]
	ldr	x8, [x0]
	cbz	x8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	cbnz	x20, LBB0_4
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_remove_node
	add	w22, w22, #1
	mov	x0, x20
	cbnz	x20, LBB0_4
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x24]
	cmp	x0, #0
	ccmp	w22, #0, #4, ne
	mov	w22, #0
	b.ne	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x0, LBB0_24
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	cbnz	x8, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w22, #0
LBB0_11:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x0, #16]
	add	w22, w22, #8
	cbnz	x0, LBB0_11
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_malloc
	str	x0, [x25]
	mov	x0, x22
	bl	_malloc
	str	x0, [x26]
	ldr	x8, [x25]
	cmp	x8, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
	mov	x1, #0
	bl	_err
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x22, [x24]
	cbnz	x22, LBB0_17
	b	LBB0_2
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=2
	ldr	w8, [x27]
	ldr	w9, [x22, #8]
	orr	w8, w9, w8
	str	w8, [x22, #8]
	bl	_clear_cycle
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=2
	ldr	x22, [x22, #16]
	cbz	x22, LBB0_2
LBB0_17:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x22, #8]
	ldr	w9, [x27]
	tst	w9, w8
	b.ne	LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=2
	mov	x0, x22
	mov	x1, x22
	mov	w2, #0
	mov	w3, #0
	bl	_find_cycle
	cbz	w0, LBB0_15
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x28]
	cbnz	w8, LBB0_23
; %bb.20:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x0
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
	cmp	w23, #1
	b.lt	LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, #0
	mov	w8, w23
	lsl	x23, x8, #3
LBB0_22:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26]
	ldr	x8, [x8, x20]
	ldr	w8, [x8]
	str	x8, [sp]
	mov	x0, x21
	bl	_warnx
	add	x20, x20, #8
	cmp	x23, x20
	b.ne	LBB0_22
LBB0_23:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_remove_node
	bl	_clear_cycle
	b	LBB0_3
LBB0_24:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_graph,8,3                      ; @graph
	.comm	_cycle_buf,8,3                  ; @cycle_buf
	.comm	_longest_cycle,8,3              ; @longest_cycle
	.comm	_NF_ACYCLIC,4,2                 ; @NF_ACYCLIC
	.comm	_quiet,4,2                      ; @quiet
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cycle in data"

l_.str.1:                               ; @.str.1
	.asciz	"%s"

l_.str.2:                               ; @.str.2
	.asciz	"internal error -- could not find cycle"

	.no_dead_strip	_tsort
.subsections_via_symbols
