	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getpathname                    ## -- Begin function getpathname
	.p2align	4, 0x90
_getpathname:                           ## @getpathname
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_UFS_ROOTINO@GOTPCREL(%rip), %r13
	cmpq	%rdx, %rsi
	jne	LBB0_4
## %bb.1:
	cmpq	%r12, (%r13)
	jne	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_4:
	cmpb	$0, _getpathname.busy(%rip)
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_INO_IS_DVALID
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movb	$1, _getpathname.busy(%rip)
	leaq	-80(%rbp), %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_IGNORE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rax,%r14), %r15
	decq	%r15
	movb	$0, -1(%rax,%r14)
	movq	%rbx, %rdi
	cmpq	%r12, %rbx
	je	LBB0_8
	jmp	LBB0_11
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	movq	%r14, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_strcpy                         ## TAILCALL
LBB0_8:
	cmpq	(%r13), %rbx
	je	LBB0_14
## %bb.9:
	movq	%rbx, -72(%rbp)
	movq	_findino@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	leaq	L_.str.2(%rip), %rdi
	callq	_strdup
	movq	%rax, -64(%rbp)
	movq	%rbx, %rdi
	callq	_ginode
	leaq	-80(%rbp), %rsi
	movl	%eax, %edi
	callq	_ckinode
	movq	_FOUND@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.10:
	movq	-80(%rbp), %rdi
	movq	%rbx, %r12
LBB0_11:
	movq	%rdi, -72(%rbp)
	movq	%r12, -80(%rbp)
	movq	_findname@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	%r14, -64(%rbp)
	callq	_ginode
	leaq	-80(%rbp), %rsi
	movl	%eax, %edi
	callq	_ckinode
	movq	_FOUND@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_strlen
	movslq	%eax, %rdx
	subq	%rdx, %r15
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_memmove
	movb	$47, -1(%r15)
	decq	%r15
	movq	_UFS_MAXNAMLEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r14, %rax
	cmpq	%rax, %r15
	jb	LBB0_13
## %bb.17:
	movq	-72(%rbp), %rbx
	jmp	LBB0_8
LBB0_13:
	movq	%r12, %rbx
LBB0_14:
	movb	$0, _getpathname.busy(%rip)
	cmpq	(%r13), %rbx
	je	LBB0_16
## %bb.15:
	movb	$63, -1(%r15)
	decq	%r15
LBB0_16:
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	addq	%r14, %rdx
	subq	%r15, %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_memmove
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_getpathname.busy,1,2 ## @getpathname.busy
	.comm	_UFS_ROOTINO,8,3                ## @UFS_ROOTINO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

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

	.comm	_DATA,4,2                       ## @DATA
	.comm	_IGNORE,4,2                     ## @IGNORE
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.comm	_findino,4,2                    ## @findino
L_.str.2:                               ## @.str.2
	.asciz	".."

	.comm	_FOUND,4,2                      ## @FOUND
	.comm	_findname,4,2                   ## @findname
	.comm	_UFS_MAXNAMLEN,8,3              ## @UFS_MAXNAMLEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getpathname                    ; -- Begin function getpathname
	.p2align	2
_getpathname:                           ; @getpathname
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _UFS_ROOTINO@GOTPAGE
Lloh1:
	ldr	x23, [x23, _UFS_ROOTINO@GOTPAGEOFF]
	cmp	x1, x2
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x23]
	cmp	x8, x22
	b.ne	LBB0_3
; %bb.2:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_3:
	adrp	x24, _getpathname.busy@PAGE
	ldrb	w8, [x24, _getpathname.busy@PAGEOFF]
	tbnz	w8, #0, LBB0_6
; %bb.4:
	mov	x0, x21
	bl	_INO_IS_DVALID
	cbz	w0, LBB0_6
; %bb.5:
	mov	w8, #1
	strb	w8, [x24, _getpathname.busy@PAGEOFF]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh4:
	adrp	x8, _DATA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DATA@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _IGNORE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _IGNORE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #36]
Lloh10:
	adrp	x25, _MAXPATHLEN@GOTPAGE
Lloh11:
	ldr	x25, [x25, _MAXPATHLEN@GOTPAGEOFF]
	ldrsw	x8, [x25]
	add	x20, x8, x19
	strb	wzr, [x20, #-1]!
Lloh12:
	adrp	x26, _FOUND@GOTPAGE
Lloh13:
	ldr	x26, [x26, _FOUND@GOTPAGEOFF]
	mov	x0, x21
	cmp	x21, x22
	b.eq	LBB0_8
	b	LBB0_11
LBB0_6:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_strcpy
LBB0_8:
	ldr	x8, [x23]
	cmp	x21, x8
	b.eq	LBB0_15
; %bb.9:
	str	x21, [sp, #16]
Lloh16:
	adrp	x8, _findino@GOTPAGE
Lloh17:
	ldr	x8, [x8, _findino@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [sp, #32]
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_strdup
	str	x0, [sp, #24]
	mov	x0, x21
	bl	_ginode
	add	x1, sp, #8
	bl	_ckinode
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.10:
	ldr	x0, [sp, #8]
	mov	x22, x21
LBB0_11:
	stp	x22, x0, [sp, #8]
Lloh21:
	adrp	x8, _findname@GOTPAGE
Lloh22:
	ldr	x8, [x8, _findname@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [sp, #32]
	str	x19, [sp, #24]
	bl	_ginode
	add	x1, sp, #8
	bl	_ckinode
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_14
; %bb.12:
	mov	x0, x19
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x2, w0
	sub	x20, x20, x2
	mov	x0, x20
	mov	x1, x19
	bl	_memmove
	mov	w8, #47
	strb	w8, [x20, #-1]!
Lloh24:
	adrp	x8, _UFS_MAXNAMLEN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _UFS_MAXNAMLEN@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	add	x8, x19, x8
	cmp	x20, x8
	b.lo	LBB0_14
; %bb.13:
	ldr	x21, [sp, #16]
	b	LBB0_8
LBB0_14:
	mov	x21, x22
LBB0_15:
	strb	wzr, [x24, _getpathname.busy@PAGEOFF]
	ldr	x8, [x23]
	cmp	x21, x8
	b.eq	LBB0_17
; %bb.16:
	mov	w8, #63
	strb	w8, [x20, #-1]!
LBB0_17:
	ldrsw	x8, [x25]
	add	x8, x19, x8
	sub	x2, x8, x20
	mov	x0, x19
	mov	x1, x20
	bl	_memmove
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_getpathname.busy,1,2 ; @getpathname.busy
	.comm	_UFS_ROOTINO,8,3                ; @UFS_ROOTINO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

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

	.comm	_DATA,4,2                       ; @DATA
	.comm	_IGNORE,4,2                     ; @IGNORE
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.comm	_findino,4,2                    ; @findino
l_.str.2:                               ; @.str.2
	.asciz	".."

	.comm	_FOUND,4,2                      ; @FOUND
	.comm	_findname,4,2                   ; @findname
	.comm	_UFS_MAXNAMLEN,8,3              ; @UFS_MAXNAMLEN
.subsections_via_symbols
