	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftp_cwd
_ftp_cwd:                               ## @ftp_cwd
	.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	%rsi, %r13
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%r13, %rdi
	movl	$47, %esi
	callq	_strrchr
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ftp_cmd
	movq	_FTP_WORKING_DIRECTORY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_26
## %bb.3:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ftp_pwd
	movq	_FTP_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_26
## %bb.4:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	subq	%r13, %rax
	movq	$-1, %r14
	cmovnsq	%rax, %r14
	leal	1(%r14), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	incq	%r14
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	%r15, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	movl	$0, %r12d
	testl	%eax, %eax
	js	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%eax
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%r12, %r14
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movzbl	(%r15,%r12), %ecx
	cmpb	(%r13,%r12), %cl
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=2
	incq	%r12
	cmpq	%r12, %rax
	jne	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %r12d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r12d
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, %ecx
	cmpb	$0, (%r15,%rcx)
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movslq	%r12d, %rax
	cmpb	$47, -1(%rax,%r13)
	je	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$47, (%r13,%rcx)
	je	LBB0_18
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_ftp_cmd
	movq	_FTP_FILE_ACTION_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_26
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_ftp_cmd
	movq	_FTP_WORKING_DIRECTORY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_26
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ftp_pwd
	movq	_FTP_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
LBB0_26:
	movl	%eax, %edi
	callq	_ftp_seterr
	movl	$-1, %eax
	jmp	LBB0_27
LBB0_1:
	xorl	%eax, %eax
LBB0_27:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_30
## %bb.28:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	addq	%r13, %rcx
	xorl	%eax, %eax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	cmpq	%r15, %rcx
	jae	LBB0_27
## %bb.19:
	incq	%r13
	leaq	L_.str.2(%rip), %r14
	.p2align	4, 0x90
LBB0_21:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_29 Depth 2
                                        ##     Child Loop BB0_23 Depth 2
	cmpb	$47, (%rcx)
	jne	LBB0_22
	.p2align	4, 0x90
LBB0_29:                                ##   Parent Loop BB0_21 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incl	%r12d
	cmpb	$47, 1(%rcx)
	leaq	1(%rcx), %rcx
	je	LBB0_29
LBB0_22:                                ##   in Loop: Header=BB0_21 Depth=1
	movslq	%r12d, %rax
	leal	1(%rax), %esi
	leaq	(%rax,%r13), %rdi
	addq	%r13, %rax
	subq	%rcx, %rax
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_21 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	%rax, %rdx
	cmpq	%r15, %rdi
	jae	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=2
	leal	1(%r12), %esi
	leaq	1(%rbx), %rdi
	leaq	1(%rdx), %rax
	cmpb	$47, (%rbx)
	jne	LBB0_23
LBB0_25:                                ##   in Loop: Header=BB0_21 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_ftp_cmd
	movq	_FTP_FILE_ACTION_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_26
## %bb.20:                              ##   in Loop: Header=BB0_21 Depth=1
	incq	%rbx
	xorl	%eax, %eax
	movq	%rbx, %rcx
	cmpq	%r15, %rbx
	jb	LBB0_21
	jmp	LBB0_27
LBB0_30:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PWD"

	.comm	_FTP_WORKING_DIRECTORY,4,2      ## @FTP_WORKING_DIRECTORY
	.comm	_FTP_OK,4,2                     ## @FTP_OK
L_.str.1:                               ## @.str.1
	.asciz	"CDUP"

	.comm	_FTP_FILE_ACTION_OK,4,2         ## @FTP_FILE_ACTION_OK
L_.str.2:                               ## @.str.2
	.asciz	"CWD %.*s"

	.no_dead_strip	_ftp_cwd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftp_cwd
_ftp_cwd:                               ; @ftp_cwd
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x9, x22
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x22, #15
	and	x9, x9, #0x1fffffff0
	sub	x23, x8, x9
	mov	sp, x23
	mov	x0, x1
	mov	w1, #47
	bl	_strrchr
	cbz	x0, LBB0_19
; %bb.1:
	mov	x20, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ftp_cmd
Lloh10:
	adrp	x27, _FTP_WORKING_DIRECTORY@GOTPAGE
Lloh11:
	ldr	x27, [x27, _FTP_WORKING_DIRECTORY@GOTPAGEOFF]
	ldr	w8, [x27]
	cmp	w0, w8
	b.ne	LBB0_18
; %bb.2:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_ftp_pwd
Lloh12:
	adrp	x28, _FTP_OK@GOTPAGE
Lloh13:
	ldr	x28, [x28, _FTP_OK@GOTPAGEOFF]
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_18
; %bb.3:
	sub	x8, x20, x21
	cmp	x8, #0
	csinv	x8, x8, xzr, ge
	add	w9, w8, #1
	stur	w9, [x29, #-92]                 ; 4-byte Folded Spill
	add	x26, x8, #1
Lloh14:
	adrp	x24, l_.str.1@PAGE
Lloh15:
	add	x24, x24, l_.str.1@PAGEOFF
Lloh16:
	adrp	x25, l_.str@PAGE
Lloh17:
	add	x25, x25, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	mov	x0, x23
	bl	_strlen
	tbnz	w0, #31, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, #0
	add	w9, w0, #1
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x26, x8
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldrb	w10, [x23, x8]
	ldrb	w11, [x21, x8]
	cmp	w10, w11
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x8, x8, #1
	cmp	x9, x8
	b.ne	LBB0_6
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #0
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	w9, [x29, #-92]                 ; 4-byte Folded Reload
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x9, x8
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, w9
	ldrb	w10, [x23, x8]
	cbnz	w10, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x21, w9, sxtw
	ldurb	w10, [x10, #-1]
	cmp	w10, #47
	b.eq	LBB0_21
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x21, x8]
	cmp	w8, #47
	b.eq	LBB0_21
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x24
	bl	_ftp_cmd
Lloh18:
	adrp	x8, _FTP_FILE_ACTION_OK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FTP_FILE_ACTION_OK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x25
	bl	_ftp_cmd
	ldr	w8, [x27]
	cmp	w0, w8
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_ftp_pwd
	ldr	w8, [x28]
	cmp	w0, w8
	b.eq	LBB0_4
LBB0_18:
	bl	_ftp_seterr
	mov	w0, #-1
LBB0_19:
	ldur	x8, [x29, #-88]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_31
; %bb.20:
	sub	sp, x29, #80
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_21:
	add	x8, x21, w9, uxtw
	cmp	x8, x20
	b.hs	LBB0_30
; %bb.22:
	add	x22, x21, #1
Lloh24:
	adrp	x21, l_.str.2@PAGE
Lloh25:
	add	x21, x21, l_.str.2@PAGEOFF
	mov	x23, x9
LBB0_23:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_24 Depth 2
                                        ;     Child Loop BB0_26 Depth 2
	ldrb	w9, [x8]
	cmp	w9, #47
	b.ne	LBB0_25
LBB0_24:                                ;   Parent Loop BB0_23 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w9, [x8, #1]!
	add	w23, w23, #1
	cmp	w9, #47
	b.eq	LBB0_24
LBB0_25:                                ;   in Loop: Header=BB0_23 Depth=1
	sxtw	x9, w23
	add	w11, w23, #1
	add	x9, x22, x9
	sub	x12, x9, x8
LBB0_26:                                ;   Parent Loop BB0_23 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x23, x11
	mov	x24, x9
	mov	x10, x12
	cmp	x9, x20
	b.hs	LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=2
	mov	x9, x24
	ldrb	w13, [x9], #1
	add	w11, w23, #1
	add	x12, x10, #1
	cmp	w13, #47
	b.ne	LBB0_26
LBB0_28:                                ;   in Loop: Header=BB0_23 Depth=1
	stp	x10, x8, [sp, #-16]!
	mov	x0, x19
	mov	x1, x21
	bl	_ftp_cmd
	add	sp, sp, #16
Lloh26:
	adrp	x8, _FTP_FILE_ACTION_OK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _FTP_FILE_ACTION_OK@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_18
; %bb.29:                               ;   in Loop: Header=BB0_23 Depth=1
	mov	w0, #0
	add	x8, x24, #1
	cmp	x8, x20
	b.lo	LBB0_23
	b	LBB0_19
LBB0_30:
	mov	w0, #0
	b	LBB0_19
LBB0_31:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PWD"

	.comm	_FTP_WORKING_DIRECTORY,4,2      ; @FTP_WORKING_DIRECTORY
	.comm	_FTP_OK,4,2                     ; @FTP_OK
l_.str.1:                               ; @.str.1
	.asciz	"CDUP"

	.comm	_FTP_FILE_ACTION_OK,4,2         ; @FTP_FILE_ACTION_OK
l_.str.2:                               ; @.str.2
	.asciz	"CWD %.*s"

	.no_dead_strip	_ftp_cwd
.subsections_via_symbols
