	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_canon                          ## -- Begin function canon
	.p2align	4, 0x90
_canon:                                 ## @canon
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rbx
	movq	%rbx, %rsi
	callq	_strcmp
	leaq	L_.str.2(%rip), %r12
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %r13
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$2, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	cmpb	$47, (%r14)
	cmoveq	%rbx, %r13
	movq	%r13, %r12
LBB0_3:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_strcpy
	movq	%r15, %rdi
	callq	_strlen
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_strlen
	addq	%rbx, %rax
	cmpq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	jb	LBB0_5
## %bb.4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_fprintf
	movl	$1, %edi
	callq	_done
LBB0_5:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_strcat
	movb	(%r15), %cl
	movq	%r15, %rax
	testb	%cl, %cl
	je	LBB0_11
## %bb.6:
	movq	%r15, %rdx
	movq	%r15, %rax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	incq	%rax
	testb	%cl, %cl
	je	LBB0_11
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	%ecx, %ebx
	movb	%cl, (%rax)
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	1(%rdx), %ecx
	incq	%rdx
	cmpb	$47, %bl
	jne	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	cmpb	$47, %cl
	je	LBB0_9
	jmp	LBB0_7
LBB0_11:
	movb	$0, (%rax)
	cmpb	$47, -1(%rax)
	jne	LBB0_13
## %bb.12:
	movb	$0, -1(%rax)
LBB0_13:
	cmpb	$0, (%r15)
	je	LBB0_32
## %bb.14:
	xorl	%r13d, %r13d
	leaq	L_.str.4(%rip), %r14
	movq	%r15, %rdi
	jmp	LBB0_18
LBB0_15:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	%rax, %rbx
LBB0_16:                                ##   in Loop: Header=BB0_18 Depth=1
	leaq	(%r15,%rbx), %rdi
	movq	%r12, %rsi
	callq	_strcpy
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_18 Depth=1
	leaq	(%r15,%rbx), %rdi
	cmpb	$0, (%r15,%rbx)
	movq	%rbx, %r13
	je	LBB0_32
LBB0_18:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
                                        ##     Child Loop BB0_30 Depth 2
	leaq	1(%r13), %rax
	movl	$1, %ecx
	movq	%rax, %rbx
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%r15,%rbx), %edx
	testb	%dl, %dl
	je	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=2
	cmpb	$47, %dl
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=2
	incq	%rbx
	decq	%rcx
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_18 Depth=1
	testq	%rcx, %rcx
	jne	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpb	$46, (%r15,%rax)
	jne	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_18 Depth=1
	addq	%r15, %rbx
	movq	%rbx, %rsi
	callq	_strcpy
	movq	%r13, %rbx
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	%rax, %r13
LBB0_27:                                ##   in Loop: Header=BB0_18 Depth=1
	leaq	(%r15,%rbx), %r12
	leaq	(%r15,%r13), %rdi
	movq	%r12, %rax
	subq	%rdi, %rax
	cmpq	$2, %rax
	jne	LBB0_17
## %bb.28:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r14, %rsi
	movl	$2, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_17
## %bb.29:                              ##   in Loop: Header=BB0_18 Depth=1
	decq	%r13
	testq	%r13, %r13
	movl	$1, %eax
	cmovleq	%r13, %rax
	.p2align	4, 0x90
LBB0_30:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	$2, %r13
	jl	LBB0_15
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=2
	leaq	-1(%r13), %rbx
	cmpb	$47, -1(%r15,%r13)
	movq	%rbx, %r13
	jne	LBB0_30
	jmp	LBB0_16
LBB0_32:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

L_.str.1:                               ## @.str.1
	.asciz	"./"

L_.str.2:                               ## @.str.2
	.space	1

	.comm	_stderr,4,2                     ## @stderr
L_.str.3:                               ## @.str.3
	.asciz	"canonname: not enough buffer space\n"

L_.str.4:                               ## @.str.4
	.asciz	".."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_canon                          ; -- Begin function canon
	.p2align	2
_canon:                                 ; @canon
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
	mov	x1, x22
	bl	_strcmp
	cbz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x23
	mov	w2, #2
	bl	_strncmp
	cbz	x0, LBB0_3
; %bb.2:
	ldrb	w8, [x20]
	cmp	w8, #47
	csel	x1, x22, x23, eq
	b	LBB0_4
LBB0_3:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_strcpy
	mov	x0, x19
	bl	_strlen
	mov	x22, x0
	mov	x0, x20
	bl	_strlen
	add	x8, x0, x22
	cmp	x8, x21
	b.lo	LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	bl	_done
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_strcat
	ldrb	w9, [x19]
	mov	x8, x19
	cbz	w9, LBB0_12
; %bb.7:
	mov	x10, x19
	mov	x8, x19
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x8, #1
	mov	x9, x11
	cbz	w11, LBB0_12
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	strb	w9, [x8]
LBB0_10:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w11, [x10, #1]!
	cmp	w9, #47
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	cmp	w11, #47
	b.eq	LBB0_10
	b	LBB0_8
LBB0_12:
	strb	wzr, [x8]
	ldurb	w9, [x8, #-1]
	cmp	w9, #47
	b.ne	LBB0_14
; %bb.13:
	sturb	wzr, [x8, #-1]
LBB0_14:
	ldrb	w8, [x19]
	cbz	w8, LBB0_31
; %bb.15:
	mov	x23, #0
	sub	x22, x19, #2
	mov	x0, x19
Lloh11:
	adrp	x20, l_.str.4@PAGE
Lloh12:
	add	x20, x20, l_.str.4@PAGEOFF
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x0, x19, x24
	mov	x1, x21
	bl	_strcpy
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x0, x19, x24
	ldrb	w8, [x0]
	mov	x23, x24
	cbz	w8, LBB0_31
LBB0_18:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
                                        ;     Child Loop BB0_28 Depth 2
	add	x8, x23, #1
	mov	w9, #1
	mov	x24, x8
	ldrb	w10, [x19, x24]
	cbz	w10, LBB0_21
LBB0_19:                                ;   Parent Loop BB0_18 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w10, #47
	b.eq	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=2
	add	x24, x24, #1
	sub	x9, x9, #1
	ldrb	w10, [x19, x24]
	cbnz	w10, LBB0_19
LBB0_21:                                ;   in Loop: Header=BB0_18 Depth=1
	cbnz	x9, LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_18 Depth=1
	ldrb	w9, [x19, x8]
	cmp	w9, #46
	b.ne	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_18 Depth=1
	add	x1, x19, x24
	bl	_strcpy
	mov	x24, x23
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_18 Depth=1
	mov	x23, x8
LBB0_25:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x21, x19, x24
	add	x0, x19, x23
	sub	x8, x21, x0
	cmp	x8, #2
	b.ne	LBB0_17
; %bb.26:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x1, x20
	mov	w2, #2
	bl	_strncmp
	cbnz	x0, LBB0_17
; %bb.27:                               ;   in Loop: Header=BB0_18 Depth=1
	sub	x8, x23, #1
	cmp	x8, #1
	csinc	x24, x8, xzr, lt
LBB0_28:                                ;   Parent Loop BB0_18 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	x8, x23, #1
	cmp	x8, #2
	b.lt	LBB0_16
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=2
	ldrb	w9, [x22, x23]
	mov	x23, x8
	cmp	w9, #47
	b.ne	LBB0_28
; %bb.30:                               ;   in Loop: Header=BB0_18 Depth=1
	sub	x24, x8, #1
	b	LBB0_16
LBB0_31:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

l_.str.1:                               ; @.str.1
	.asciz	"./"

l_.str.2:                               ; @.str.2
	.space	1

	.comm	_stderr,4,2                     ; @stderr
l_.str.3:                               ; @.str.3
	.asciz	"canonname: not enough buffer space\n"

l_.str.4:                               ; @.str.4
	.asciz	".."

.subsections_via_symbols
