	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftp_connect
_ftp_connect:                           ## @ftp_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.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, %r14
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$100, %edi
	callq	_CHECK_FLAG
	movl	%eax, %ebx
	movl	$118, %edi
	callq	_CHECK_FLAG
	movl	%eax, %r12d
	movl	$52, %edi
	callq	_CHECK_FLAG
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_AF_INET@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movl	$54, %edi
	callq	_CHECK_FLAG
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	_AF_INET6@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r15d
LBB0_5:
	testl	%ebx, %ebx
	setne	%al
	testq	%r13, %r13
	sete	%cl
	xorl	%ebx, %ebx
	orb	%al, %cl
	movq	%r13, %rax
	cmovneq	%r14, %rax
	cmovneq	%rbx, %r13
	movl	(%rax), %esi
	movl	4(%rax), %edi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	callq	_fetch_connect
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_ftp_chkerr
	movq	_FTP_SERVICE_READY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.7:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_ftp_authenticate
	movq	_FTP_LOGGED_IN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.8:
	movq	%r15, %rbx
	jmp	LBB0_12
LBB0_9:
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %edi
	callq	_ftp_seterr
LBB0_11:
	movq	%r15, %rdi
	callq	_fetch_close
	xorl	%ebx, %ebx
LBB0_12:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_AF_INET6,4,2                   ## @AF_INET6
	.comm	_FTP_SERVICE_READY,4,2          ## @FTP_SERVICE_READY
	.comm	_FTP_LOGGED_IN,4,2              ## @FTP_LOGGED_IN
	.comm	_AF_UNSPEC,4,2                  ## @AF_UNSPEC
	.no_dead_strip	_ftp_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftp_connect
_ftp_connect:                           ; @ftp_connect
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x24, _AF_INET@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AF_INET@GOTPAGEOFF]
	ldr	w23, [x24]
	mov	w0, #100
	bl	_CHECK_FLAG
	mov	x22, x0
	mov	w0, #118
	bl	_CHECK_FLAG
	mov	x21, x0
	mov	w0, #52
	bl	_CHECK_FLAG
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w2, [x24]
	b	LBB0_3
LBB0_2:
	mov	w0, #54
	bl	_CHECK_FLAG
Lloh2:
	adrp	x8, _AF_INET6@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AF_INET6@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w2, w23, w8, eq
LBB0_3:
	cmp	x20, #0
	ccmp	w22, #0, #0, ne
	csel	x8, x19, x20, ne
	csel	x22, xzr, x20, ne
	ldp	w1, w0, [x8]
	mov	x3, x21
	bl	_fetch_connect
	mov	x20, x0
	cbz	x0, LBB0_9
; %bb.4:
	mov	x0, x20
	bl	_ftp_chkerr
Lloh5:
	adrp	x8, _FTP_SERVICE_READY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FTP_SERVICE_READY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	bl	_ftp_authenticate
Lloh8:
	adrp	x8, _FTP_LOGGED_IN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FTP_LOGGED_IN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_9
LBB0_6:
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.7:
	bl	_ftp_seterr
LBB0_8:
	mov	x0, x20
	bl	_fetch_close
	mov	x20, #0
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_AF_INET6,4,2                   ; @AF_INET6
	.comm	_FTP_SERVICE_READY,4,2          ; @FTP_SERVICE_READY
	.comm	_FTP_LOGGED_IN,4,2              ; @FTP_LOGGED_IN
	.comm	_AF_UNSPEC,4,2                  ; @AF_UNSPEC
	.no_dead_strip	_ftp_connect
.subsections_via_symbols
