	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dopopd                         ## -- Begin function dopopd
	.p2align	4, 0x90
_dopopd:                                ## @dopopd
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, -48(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	leaq	-48(%rbp), %rdi
	callq	_skipargs
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_USE
	movq	_printd@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_DIR_OLD@GOTPCREL(%rip), %rbx
	testl	%r14d, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	_STRowd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_varval
	testq	%rax, %rax
	je	LBB0_4
LBB0_5:
	testl	%r14d, (%rbx)
	je	LBB0_6
LBB0_8:
	movq	%rax, %rdi
	callq	_dfind
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	_ERR_NAME@GOTPCREL(%rip), %rax
	movq	_ERR_BADDIR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_stderror
	jmp	LBB0_10
LBB0_2:
	movq	-48(%rbp), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_5
LBB0_4:
	movq	_dcwd@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_10:
	movq	(%rbx), %rax
	cmpq	_dhead@GOTPCREL(%rip), %rax
	jne	LBB0_13
## %bb.11:
	movq	8(%rbx), %rax
	cmpq	_dhead@GOTPCREL(%rip), %rax
	jne	LBB0_13
## %bb.12:
	movq	_ERR_NAME@GOTPCREL(%rip), %rax
	movq	_ERR_EMPTY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	xorl	%eax, %eax
	callq	_stderror
LBB0_13:
	movq	_dcwd@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rbx
	je	LBB0_15
## %bb.14:
	xorl	%r15d, %r15d
	jmp	LBB0_19
LBB0_15:
	movq	(%rbx), %r15
	movq	_dhead@GOTPCREL(%rip), %rax
	cmpq	%rax, %r15
	jne	LBB0_17
## %bb.16:
	movq	(%rax), %r15
LBB0_17:
	movl	16(%r15), %edi
	callq	_short2str
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_chdir
	testq	%rax, %rax
	jns	LBB0_19
## %bb.18:
	movq	_ERR_SYSTEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_stderror
LBB0_19:
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movq	%rcx, 8(%rax)
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	%rbx, %rdi
	callq	_dfree
	cmpq	(%r13), %rbx
	je	LBB0_20
## %bb.21:
	movl	%r14d, %edi
	callq	_printdirs
	jmp	LBB0_22
LBB0_20:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_dnewcwd
	jmp	LBB0_22
LBB0_6:
	movq	-48(%rbp), %rcx
	cmpq	$0, 8(%rcx)
	je	LBB0_8
## %bb.7:
	movq	_ERR_NAME@GOTPCREL(%rip), %rax
	movq	_ERR_TOOMANY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	xorl	%eax, %eax
	callq	_stderror
LBB0_22:
	addq	$24, %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	"plvn"

L_.str.1:                               ## @.str.1
	.asciz	" [-|+<n>]"

	.comm	_printd,4,2                     ## @printd
	.comm	_DIR_OLD,4,2                    ## @DIR_OLD
	.comm	_STRowd,4,2                     ## @STRowd
	.comm	_dcwd,8,3                       ## @dcwd
	.comm	_ERR_NAME,4,2                   ## @ERR_NAME
	.comm	_ERR_TOOMANY,4,2                ## @ERR_TOOMANY
	.comm	_ERR_BADDIR,4,2                 ## @ERR_BADDIR
	.comm	_dhead,24,3                     ## @dhead
	.comm	_ERR_EMPTY,4,2                  ## @ERR_EMPTY
	.comm	_ERR_SYSTEM,4,2                 ## @ERR_SYSTEM
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dopopd                         ; -- Begin function dopopd
	.p2align	2
_dopopd:                                ; @dopopd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	str	x0, [sp, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #24
	bl	_skipargs
	mov	x19, x0
	mov	x0, x20
	bl	_USE
Lloh4:
	adrp	x8, _printd@GOTPAGE
Lloh5:
	ldr	x8, [x8, _printd@GOTPAGEOFF]
	mov	w9, #1
Lloh6:
	str	w9, [x8]
Lloh7:
	adrp	x20, _DIR_OLD@GOTPAGE
Lloh8:
	ldr	x20, [x20, _DIR_OLD@GOTPAGEOFF]
	ldr	w8, [x20]
	tst	w8, w19
	b.eq	LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _STRowd@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STRowd@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_varval
	b	LBB0_3
LBB0_2:
	ldr	x8, [sp, #24]
	ldr	x0, [x8]
LBB0_3:
Lloh12:
	adrp	x24, _dcwd@GOTPAGE
Lloh13:
	ldr	x24, [x24, _dcwd@GOTPAGEOFF]
	cbz	x0, LBB0_7
; %bb.4:
	ldr	w8, [x20]
	tst	w8, w19
	b.eq	LBB0_18
LBB0_5:
	bl	_dfind
	mov	x20, x0
	cbnz	x0, LBB0_8
; %bb.6:
Lloh14:
	adrp	x8, _ERR_NAME@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERR_NAME@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _ERR_BADDIR@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ERR_BADDIR@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_stderror
	b	LBB0_8
LBB0_7:
	ldr	x20, [x24]
LBB0_8:
	ldr	x8, [x20]
Lloh20:
	adrp	x21, _dhead@GOTPAGE
Lloh21:
	ldr	x21, [x21, _dhead@GOTPAGEOFF]
	cmp	x8, x21
	b.ne	LBB0_11
; %bb.9:
	ldr	x8, [x20, #8]
	cmp	x8, x21
	b.ne	LBB0_11
; %bb.10:
Lloh22:
	adrp	x8, _ERR_NAME@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ERR_NAME@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _ERR_EMPTY@GOTPAGE
Lloh26:
	ldr	x9, [x9, _ERR_EMPTY@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_stderror
LBB0_11:
	ldr	x8, [x24]
	cmp	x20, x8
	b.eq	LBB0_13
; %bb.12:
	mov	x21, #0
	b	LBB0_15
LBB0_13:
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x21
	csel	x21, x9, x8, eq
	ldr	w0, [x21, #16]
	bl	_short2str
	mov	x22, x0
	bl	_chdir
	tbz	x0, #63, LBB0_15
; %bb.14:
Lloh28:
	adrp	x8, _ERR_SYSTEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ERR_SYSTEM@GOTPAGEOFF]
Lloh30:
	ldr	w23, [x8]
Lloh31:
	adrp	x8, _errno@GOTPAGE
Lloh32:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
	mov	x0, x23
	bl	_stderror
LBB0_15:
	ldp	x9, x8, [x20]
	str	x8, [x9, #8]
	ldr	x8, [x20, #8]
	str	x9, [x8]
	mov	x0, x20
	bl	_dfree
	ldr	x8, [x24]
	cmp	x20, x8
	b.eq	LBB0_17
; %bb.16:
	mov	x0, x19
	bl	_printdirs
	b	LBB0_20
LBB0_17:
	mov	x0, x21
	mov	x1, x19
	bl	_dnewcwd
	b	LBB0_20
LBB0_18:
	ldr	x8, [sp, #24]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_5
; %bb.19:
Lloh34:
	adrp	x8, _ERR_NAME@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ERR_NAME@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _ERR_TOOMANY@GOTPAGE
Lloh38:
	ldr	x9, [x9, _ERR_TOOMANY@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_stderror
LBB0_20:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"plvn"

l_.str.1:                               ; @.str.1
	.asciz	" [-|+<n>]"

	.comm	_printd,4,2                     ; @printd
	.comm	_DIR_OLD,4,2                    ; @DIR_OLD
	.comm	_STRowd,4,2                     ; @STRowd
	.comm	_dcwd,8,3                       ; @dcwd
	.comm	_ERR_NAME,4,2                   ; @ERR_NAME
	.comm	_ERR_TOOMANY,4,2                ; @ERR_TOOMANY
	.comm	_ERR_BADDIR,4,2                 ; @ERR_BADDIR
	.comm	_dhead,24,3                     ; @dhead
	.comm	_ERR_EMPTY,4,2                  ; @ERR_EMPTY
	.comm	_ERR_SYSTEM,4,2                 ; @ERR_SYSTEM
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
