	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pwd_init                       ## -- Begin function pwd_init
	.p2align	4, 0x90
_pwd_init:                              ## @pwd_init
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	leaq	L_.str(%rip), %rdi
	callq	_lookupvar
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	cmpb	$47, (%rax)
	jne	LBB0_9
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	leaq	-56(%rbp), %rsi
	callq	_stat
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.3:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.4:
	movq	-56(%rbp), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_9
## %bb.5:
	movq	-48(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_9
## %bb.6:
	movq	_curdir@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_ckfree
LBB0_8:
	movq	%rbx, %rdi
	callq	_savestr
	movq	%rax, (%r15)
LBB0_9:
	xorl	%eax, %eax
	callq	_getpwd
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.10:
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.2(%rip), %rdi
	callq	_out2fmt_flush
LBB0_12:
	movq	_curdir@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_VEXPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_setvar                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PWD"

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

	.comm	_curdir,8,3                     ## @curdir
L_.str.2:                               ## @.str.2
	.asciz	"sh: cannot determine working directory\n"

	.comm	_VEXPORT,4,2                    ## @VEXPORT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pwd_init                       ; -- Begin function pwd_init
	.p2align	2
_pwd_init:                              ; @pwd_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_lookupvar
Lloh2:
	adrp	x21, _curdir@GOTPAGE
Lloh3:
	ldr	x21, [x21, _curdir@GOTPAGEOFF]
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
	ldrb	w8, [x0]
	cmp	w8, #47
	b.ne	LBB0_9
; %bb.2:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x1, sp, #16
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.3:
	mov	x1, sp
	mov	x0, x20
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.4:
	ldr	x8, [sp, #16]
	ldr	x9, [sp]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.5:
	ldr	x8, [sp, #24]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.6:
	ldr	x0, [x21]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_ckfree
LBB0_8:
	mov	x0, x20
	bl	_savestr
	str	x0, [x21]
LBB0_9:
	bl	_getpwd
	cbz	w19, LBB0_12
; %bb.10:
	cbnz	x0, LBB0_12
; %bb.11:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_out2fmt_flush
LBB0_12:
	ldr	x1, [x21]
Lloh8:
	adrp	x8, _VEXPORT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VEXPORT@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_setvar
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PWD"

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

	.comm	_curdir,8,3                     ; @curdir
l_.str.2:                               ; @.str.2
	.asciz	"sh: cannot determine working directory\n"

	.comm	_VEXPORT,4,2                    ; @VEXPORT
.subsections_via_symbols
