	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftp_cached_connect
_ftp_cached_connect:                    ## @ftp_cached_connect
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	callq	_fetch_default_port
	movq	%rax, 8(%rbx)
LBB0_2:
	movq	%rbx, %rdi
	callq	_ftp_isconnected
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_cached_connection@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_ftp_cmd
	movq	_FTP_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_11
## %bb.4:
	movq	_FTP_SYNTAX_ERROR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_11
LBB0_5:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_ftp_connect
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r14
	movq	_cached_connection@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_ftp_disconnect
LBB0_9:
	movq	%r14, %rdi
	callq	_fetch_ref
	movq	%rax, (%r15)
	movq	_cached_host@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	movl	$16, %edx
	callq	_memcpy
	jmp	LBB0_10
LBB0_11:
	movq	(%r12), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fetch_ref                      ## TAILCALL
LBB0_6:
	xorl	%r14d, %r14d
LBB0_10:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cached_connection,8,3          ## @cached_connection
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NOOP"

	.comm	_FTP_OK,4,2                     ## @FTP_OK
	.comm	_FTP_SYNTAX_ERROR,4,2           ## @FTP_SYNTAX_ERROR
	.comm	_cached_host,4,2                ## @cached_host
	.no_dead_strip	_ftp_cached_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftp_cached_connect
_ftp_cached_connect:                    ; @ftp_cached_connect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_fetch_default_port
	str	x0, [x19, #8]
LBB0_2:
	mov	x0, x19
	bl	_ftp_isconnected
Lloh0:
	adrp	x22, _cached_connection@GOTPAGE
Lloh1:
	ldr	x22, [x22, _cached_connection@GOTPAGEOFF]
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x0, [x22]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ftp_cmd
Lloh4:
	adrp	x8, _FTP_OK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FTP_OK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _FTP_SYNTAX_ERROR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _FTP_SYNTAX_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	b.ne	LBB0_5
; %bb.4:
	ldr	x0, [x22]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_fetch_ref
LBB0_5:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_ftp_connect
	mov	x20, x0
	cbz	x0, LBB0_9
; %bb.6:
	ldr	x0, [x22]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_ftp_disconnect
LBB0_8:
	mov	x0, x20
	bl	_fetch_ref
	str	x0, [x22]
Lloh10:
	adrp	x0, _cached_host@GOTPAGE
Lloh11:
	ldr	x0, [x0, _cached_host@GOTPAGEOFF]
	mov	x1, x19
	mov	w2, #16
	bl	_memcpy
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_cached_connection,8,3          ; @cached_connection
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NOOP"

	.comm	_FTP_OK,4,2                     ; @FTP_OK
	.comm	_FTP_SYNTAX_ERROR,4,2           ; @FTP_SYNTAX_ERROR
	.comm	_cached_host,4,2                ; @cached_host
	.no_dead_strip	_ftp_cached_connect
.subsections_via_symbols
