	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftp_authenticate
_ftp_authenticate:                      ## @ftp_authenticate
	.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	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXHOSTNAMELEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MAXLOGNAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	(%rax,%rcx), %r12d
	incl	%r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rbx
	cmpb	$0, (%rbx)
	jne	LBB0_5
## %bb.1:
	movq	%r13, %rdi
	callq	_fetch_netrc_auth
	movq	(%r13), %rbx
	cmpb	$0, (%rbx)
	jne	LBB0_5
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %rdi
	movq	%rax, %rsi
	callq	_DEBUGF
	cmpb	$0, (%rbx)
	jne	LBB0_5
LBB0_4:
	movq	_FTP_ANONYMOUS_USER@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_5:
	testq	%r15, %r15
	je	LBB0_9
## %bb.6:
	movl	16(%r13), %r15d
	movl	24(%r13), %edi
	callq	_fetch_default_port
	movl	20(%r13), %ecx
	cmpl	%eax, %r15d
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_ftp_cmd
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_ftp_cmd
	jmp	LBB0_10
LBB0_8:
	movl	16(%r13), %r8d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_ftp_cmd
LBB0_10:
	movq	_FTP_NEED_PASSWORD@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_18
## %bb.11:
	movq	8(%r13), %rbx
	cmpb	$0, (%rbx)
	jne	LBB0_17
## %bb.12:
	leaq	L_.str.5(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%rax, %rbx
	leaq	L_.str.6(%rip), %rdi
	movq	%rax, %rsi
	callq	_DEBUGF
	cmpb	$0, (%rbx)
	jne	LBB0_17
LBB0_14:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_getlogin
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:
	movq	_FTP_ANONYMOUS_USER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_16:
	movq	_MAXLOGNAME@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	incl	%esi
	leaq	L_.str.7(%rip), %rdx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%rax, %rcx
	callq	_snprintf
	movl	(%r13), %ecx
	cmpl	%ecx, %eax
	cmovll	%eax, %ecx
	testl	%eax, %eax
	cmovsl	%r15d, %ecx
	movslq	%ecx, %rax
	movq	%rbx, %rdi
	addq	%rax, %rdi
	subl	%eax, %r12d
	movl	%r12d, %esi
	callq	_gethostname
LBB0_17:
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_ftp_cmd
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_20
## %bb.19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXHOSTNAMELEN,4,2             ## @MAXHOSTNAMELEN
	.comm	_MAXLOGNAME,4,2                 ## @MAXLOGNAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FTP_LOGIN"

L_.str.1:                               ## @.str.1
	.asciz	"FTP_LOGIN=%s\n"

	.comm	_FTP_ANONYMOUS_USER,8,3         ## @FTP_ANONYMOUS_USER
L_.str.2:                               ## @.str.2
	.asciz	"USER %s@%s"

L_.str.3:                               ## @.str.3
	.asciz	"USER %s@%s@%d"

L_.str.4:                               ## @.str.4
	.asciz	"USER %s"

	.comm	_FTP_NEED_PASSWORD,4,2          ## @FTP_NEED_PASSWORD
L_.str.5:                               ## @.str.5
	.asciz	"FTP_PASSWORD"

L_.str.6:                               ## @.str.6
	.asciz	"FTP_PASSWORD=%s\n"

L_.str.7:                               ## @.str.7
	.asciz	"%s@"

L_.str.8:                               ## @.str.8
	.asciz	"PASS %s"

	.no_dead_strip	_ftp_authenticate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftp_authenticate
_ftp_authenticate:                      ; @ftp_authenticate
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x24, x2
	mov	x22, 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, #-72]
Lloh3:
	adrp	x8, _MAXHOSTNAMELEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXHOSTNAMELEN@GOTPAGEOFF]
Lloh5:
	adrp	x25, _MAXLOGNAME@GOTPAGE
Lloh6:
	ldr	x25, [x25, _MAXLOGNAME@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x25]
	add	w8, w8, w9
	add	w20, w8, #1
	add	x8, x20, #15
	and	x8, x8, #0x1fffffff0
	mov	x9, x20
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x21, x9, x8
	mov	sp, x21
	ldr	x23, [x1]
	ldrb	w8, [x23]
	cbnz	w8, LBB0_5
; %bb.1:
	mov	x0, x22
	bl	_fetch_netrc_auth
	ldr	x23, [x22]
	ldrb	w8, [x23]
	cbnz	w8, LBB0_5
; %bb.2:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_4
; %bb.3:
	mov	x23, x0
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	bl	_DEBUGF
	ldrb	w8, [x23]
	cbnz	w8, LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _FTP_ANONYMOUS_USER@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FTP_ANONYMOUS_USER@GOTPAGEOFF]
Lloh16:
	ldr	x23, [x8]
LBB0_5:
	cbz	x24, LBB0_8
; %bb.6:
	ldr	w24, [x22, #16]
	ldr	w0, [x22, #24]
	bl	_fetch_default_port
	ldr	w8, [x22, #20]
	cmp	w24, w0
	b.ne	LBB0_9
; %bb.7:
	str	x8, [sp, #-16]!
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_ftp_cmd
	b	LBB0_11
LBB0_9:
	ldr	w9, [x22, #16]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x8, x9, [sp, #-16]!
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	mov	x0, x19
	mov	x2, x23
	bl	_ftp_cmd
	add	sp, sp, #16
LBB0_11:
Lloh23:
	adrp	x8, _FTP_NEED_PASSWORD@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FTP_NEED_PASSWORD@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_17
; %bb.12:
	ldr	x22, [x22, #8]
	ldrb	w8, [x22]
	cbnz	w8, LBB0_16
; %bb.13:
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_15
; %bb.14:
	mov	x22, x0
Lloh28:
	adrp	x0, l_.str.6@PAGE
Lloh29:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x22
	bl	_DEBUGF
	ldrb	w8, [x22]
	cbnz	w8, LBB0_16
LBB0_15:
	bl	_getlogin
Lloh30:
	adrp	x8, _FTP_ANONYMOUS_USER@GOTPAGE
Lloh31:
	ldr	x8, [x8, _FTP_ANONYMOUS_USER@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	cmp	x0, #0
	csel	x3, x8, x0, eq
	ldr	w8, [x25]
	add	w1, w8, #1
Lloh33:
	adrp	x2, l_.str.7@PAGE
Lloh34:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x21
	bl	_snprintf
	ldr	w8, [x25]
	cmp	w0, w8
	csel	w8, w0, w8, lt
	cmp	w0, #0
	csel	w8, wzr, w8, lt
	add	x0, x21, w8, sxtw
	sub	w1, w20, w8
	bl	_gethostname
	mov	x22, x21
LBB0_16:
Lloh35:
	adrp	x1, l_.str.8@PAGE
Lloh36:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_ftp_cmd
LBB0_17:
	ldur	x8, [x29, #-72]
Lloh37:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh38:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	sub	sp, x29, #64
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXHOSTNAMELEN,4,2             ; @MAXHOSTNAMELEN
	.comm	_MAXLOGNAME,4,2                 ; @MAXLOGNAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FTP_LOGIN"

l_.str.1:                               ; @.str.1
	.asciz	"FTP_LOGIN=%s\n"

	.comm	_FTP_ANONYMOUS_USER,8,3         ; @FTP_ANONYMOUS_USER
l_.str.2:                               ; @.str.2
	.asciz	"USER %s@%s"

l_.str.3:                               ; @.str.3
	.asciz	"USER %s@%s@%d"

l_.str.4:                               ; @.str.4
	.asciz	"USER %s"

	.comm	_FTP_NEED_PASSWORD,4,2          ; @FTP_NEED_PASSWORD
l_.str.5:                               ; @.str.5
	.asciz	"FTP_PASSWORD"

l_.str.6:                               ; @.str.6
	.asciz	"FTP_PASSWORD=%s\n"

l_.str.7:                               ; @.str.7
	.asciz	"%s@"

l_.str.8:                               ; @.str.8
	.asciz	"PASS %s"

	.no_dead_strip	_ftp_authenticate
.subsections_via_symbols
