	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	%rsp, -112(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_URL_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movl	(%rbx), %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r8
	movq	$0, -88(%rbp)
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rbx
	movq	_DISCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 84(%rbx)
	movq	_UNKNOWN_METHOD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%rbx)
	movl	$-1, (%rbx)
	leaq	4(%rbx), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, 64(%rbx)
	leaq	-58(%rbp), %rdi
	movl	$10, %esi
	movq	%r15, %rdx
	movl	%r12d, %ecx
	movq	%r8, -104(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r9d
	pushq	-80(%rbp)                       ## 8-byte Folded Reload
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	pushq	%r13
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	pushq	%rax
	callq	_av_url_split
	addq	$32, %rsp
	leaq	L_.str(%rip), %r12
	leaq	-88(%rbp), %r13
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_av_strtok
	movq	%rax, %r14
	movq	-88(%rbp), %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_av_strtok
	movq	%rax, %r13
	testq	%r14, %r14
	jne	LBB0_3
## %bb.1:
	movq	8(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_2
LBB0_3:
	testq	%r13, %r13
	jne	LBB0_5
LBB0_4:
	movq	16(%rbx), %r13
LBB0_5:
	movq	%r14, %rdi
	callq	_av_strdup
	movq	%rax, 40(%rbx)
	movq	%r13, %rdi
	callq	_av_strdup
	movq	%rax, 32(%rbx)
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_av_strdup
	movq	%rax, 48(%rbx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	cmpq	$0, 40(%rbx)
	je	LBB0_9
## %bb.7:
	testq	%r13, %r13
	je	LBB0_10
## %bb.8:
	cmpq	$0, 32(%rbx)
	je	LBB0_9
LBB0_10:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpl	$65536, (%rax)                  ## imm = 0x10000
	jb	LBB0_12
## %bb.11:
	movl	$21, (%rax)
LBB0_12:
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_ftp_connect_control_connection
	testl	%eax, %eax
	js	LBB0_16
## %bb.13:
	movq	%rbx, %rdi
	callq	_ftp_current_dir
	testl	%eax, %eax
	js	LBB0_16
## %bb.14:
	movq	24(%rbx), %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_av_append_path_component
	testq	%rax, %rax
	je	LBB0_9
## %bb.15:
	movq	%rax, %r14
	movq	24(%rbx), %rdi
	callq	_av_free
	movq	%r14, 24(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_16:
	movq	-112(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_18
## %bb.17:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	56(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_av_x_if_null
	movq	%rax, %r13
	leaq	L_.str.1(%rip), %r14
	testq	%r13, %r13
	jne	LBB0_5
	jmp	LBB0_4
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_URL_SIZE,4,2               ## @MAX_URL_SIZE
	.comm	_DISCONNECTED,4,2               ## @DISCONNECTED
	.comm	_UNKNOWN_METHOD,4,2             ## @UNKNOWN_METHOD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	":"

L_.str.1:                               ## @.str.1
	.asciz	"anonymous"

L_.str.2:                               ## @.str.2
	.asciz	"nopassword"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.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	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, #32
	mov	x20, x0
	mov	x27, sp
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	x12, _MAX_URL_SIZE@GOTPAGE
Lloh4:
	ldr	x12, [x12, _MAX_URL_SIZE@GOTPAGEOFF]
	ldr	w8, [x12]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x1fffffff0
	sub	x19, x9, x10
	mov	sp, x19
	ldr	w3, [x12]
	mov	x9, x3
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x3, #15
	and	x12, x10, #0x1fffffff0
	sub	x24, x9, x12
	mov	sp, x24
	mov	x9, x3
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x23, x9, x12
	mov	sp, x23
	stur	xzr, [x29, #-112]
Lloh11:
	adrp	x9, _DISCONNECTED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DISCONNECTED@GOTPAGEOFF]
	ldr	x21, [x0]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _UNKNOWN_METHOD@GOTPAGE
Lloh15:
	ldr	x10, [x10, _UNKNOWN_METHOD@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	stp	w10, w9, [x21, #80]
	mov	w9, #-1
	str	w9, [x21]
	add	x22, x21, #4
	stp	xzr, xzr, [x21, #64]
	sub	sp, sp, #16
	str	x1, [sp, #8]
	str	w8, [sp]
	sub	x0, x29, #98
	mov	w1, #10
	mov	x2, x24
	mov	x4, x23
	mov	x5, x3
	mov	x6, x22
	mov	x7, x19
	bl	_av_url_split
	add	sp, sp, #16
Lloh17:
	adrp	x26, l_.str@PAGE
Lloh18:
	add	x26, x26, l_.str@PAGEOFF
	sub	x2, x29, #112
	mov	x0, x24
	mov	x1, x26
	bl	_av_strtok
	mov	x25, x0
	ldur	x0, [x29, #-112]
	sub	x2, x29, #112
	mov	x1, x26
	bl	_av_strtok
	mov	x24, x0
	cbnz	x25, LBB0_2
; %bb.1:
	ldr	x25, [x21, #8]
	cbz	x25, LBB0_17
LBB0_2:
	cbnz	x24, LBB0_4
LBB0_3:
	ldr	x24, [x21, #16]
LBB0_4:
	mov	x0, x25
	bl	_av_strdup
	str	x0, [x21, #40]
	mov	x0, x24
	bl	_av_strdup
	str	x0, [x21, #32]
	mov	x0, x23
	bl	_av_strdup
	str	x0, [x21, #48]
	cbz	x0, LBB0_14
; %bb.5:
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_14
; %bb.6:
	cbz	x24, LBB0_8
; %bb.7:
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_14
LBB0_8:
	ldr	w8, [x22]
	cmp	w8, #16, lsl #12                ; =65536
	b.lo	LBB0_10
; %bb.9:
	mov	w8, #21
	str	w8, [x22]
LBB0_10:
	mov	x0, x20
	bl	_ftp_connect_control_connection
	tbnz	w0, #31, LBB0_15
; %bb.11:
	mov	x0, x21
	bl	_ftp_current_dir
	tbnz	w0, #31, LBB0_15
; %bb.12:
	ldr	x0, [x21, #24]
	mov	x1, x19
	bl	_av_append_path_component
	cbz	x0, LBB0_14
; %bb.13:
	mov	x19, x0
	ldr	x0, [x21, #24]
	bl	_av_free
	mov	w0, #0
	str	x19, [x21, #24]
	b	LBB0_15
LBB0_14:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_15:
	mov	sp, x27
	ldur	x8, [x29, #-88]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.16:
	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_17:
	ldr	w0, [x21, #56]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_av_x_if_null
	mov	x24, x0
Lloh27:
	adrp	x25, l_.str.1@PAGE
Lloh28:
	add	x25, x25, l_.str.1@PAGEOFF
	cbnz	x24, LBB0_4
	b	LBB0_3
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_URL_SIZE,4,2               ; @MAX_URL_SIZE
	.comm	_DISCONNECTED,4,2               ; @DISCONNECTED
	.comm	_UNKNOWN_METHOD,4,2             ; @UNKNOWN_METHOD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	":"

l_.str.1:                               ; @.str.1
	.asciz	"anonymous"

l_.str.2:                               ; @.str.2
	.asciz	"nopassword"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ftp_connect
.subsections_via_symbols
