	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftp_connect_control_connection
_ftp_connect_control_connection:        ## @ftp_connect_control_connection
	.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	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_CONTROL_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	$0, -56(%rbp)
	movq	$0, -64(%rbp)
	movq	16(%r14), %r15
	xorl	%r13d, %r13d
	cmpl	$0, 4(%r15)
	jne	LBB0_16
## %bb.1:
	leaq	4(%r15), %r13
	movl	8(%r15), %r9d
	movl	12(%r15), %r8d
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%ecx, %ecx
	pushq	$0
	callq	_ff_url_join
	addq	$16, %rsp
	movl	(%r15), %edx
	cmpl	$-1, %edx
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	leaq	-64(%rbp), %rdi
	xorl	%ecx, %ecx
	callq	_av_dict_set_int
LBB0_3:
	movq	_AVIO_FLAG_READ_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	12(%r14), %rcx
	movl	4(%r14), %eax
	movl	8(%r14), %r9d
	leaq	-64(%rbp), %rbx
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%rbx, %r8
	pushq	%r14
	pushq	%rax
	callq	_ffurl_open_whitelist
	addq	$16, %rsp
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_av_dict_free
	testl	%r13d, %r13d
	js	LBB0_4
## %bb.6:
	movq	_AVIO_FLAG_WRITE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	xorl	%ecx, %ecx
	andl	(%r14), %eax
	leaq	-56(%rbp), %rsi
	cmoveq	%rcx, %rsi
	leaq	_ftp_connect_control_connection.connect_codes(%rip), %rdx
	movq	%r15, %rdi
	callq	_ftp_status
	cmpl	$220, %eax
	jne	LBB0_7
## %bb.8:
	movl	(%rbx), %eax
	testl	%eax, (%r14)
	je	LBB0_11
## %bb.9:
	movq	-56(%rbp), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_av_stristr
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
LBB0_11:
	movq	-56(%rbp), %rdi
	callq	_av_free
	movq	%r15, %rdi
	callq	_ftp_auth
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:
	movq	%r15, %rdi
	callq	_ftp_type
	testl	%eax, %eax
	js	LBB0_14
## %bb.15:
	movq	%r15, %rdi
	callq	_ftp_features
	xorl	%r13d, %r13d
	jmp	LBB0_16
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_5
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movq	_EACCES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r13d
	jmp	LBB0_16
LBB0_12:
	movl	%eax, %r13d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	jmp	LBB0_5
LBB0_14:
	movl	%eax, %r13d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rdx
LBB0_5:
	movq	%r14, %rdi
	callq	_av_log
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movl	%r13d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CONTROL_BUFFER_SIZE,4,2        ## @CONTROL_BUFFER_SIZE
	.section	__TEXT,__const
	.p2align	2                               ## @ftp_connect_control_connection.connect_codes
_ftp_connect_control_connection.connect_codes:
	.long	220                             ## 0xdc
	.long	0                               ## 0x0

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tcp"

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

	.comm	_AVIO_FLAG_READ_WRITE,4,2       ## @AVIO_FLAG_READ_WRITE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"Cannot open control connection\n"

	.comm	_AVIO_FLAG_WRITE,4,2            ## @AVIO_FLAG_WRITE
L_.str.3:                               ## @.str.3
	.asciz	"FTP server not ready for new users\n"

	.comm	_EACCES,4,2                     ## @EACCES
L_.str.4:                               ## @.str.4
	.asciz	"pure-ftpd"

	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.5:                               ## @.str.5
	.asciz	"Pure-FTPd server is used as an output protocol. It is known issue this implementation may produce incorrect content and it cannot be fixed at this moment."

L_.str.6:                               ## @.str.6
	.asciz	"FTP authentication failed\n"

L_.str.7:                               ## @.str.7
	.asciz	"Set content type failed\n"

	.no_dead_strip	_ftp_connect_control_connection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftp_connect_control_connection
_ftp_connect_control_connection:        ; @ftp_connect_control_connection
	.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
	sub	sp, sp, #32
	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, #-40]
Lloh3:
	adrp	x8, _CONTROL_BUFFER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CONTROL_BUFFER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x9, x1
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	stp	xzr, xzr, [x29, #-56]
	ldr	x20, [x0, #16]
	mov	x22, x20
	ldr	w8, [x22, #4]!
	cbz	w8, LBB0_2
LBB0_1:
	mov	w21, #0
	b	LBB0_17
LBB0_2:
	ldp	w5, w4, [x20, #8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x3, #0
	mov	x6, #0
	bl	_ff_url_join
	ldr	w2, [x20]
	cmn	w2, #1
	b.eq	LBB0_4
; %bb.3:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	sub	x0, x29, #56
	mov	w3, #0
	bl	_av_dict_set_int
LBB0_4:
Lloh12:
	adrp	x8, _AVIO_FLAG_READ_WRITE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AVIO_FLAG_READ_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	add	x3, x19, #12
	ldp	w6, w5, [x19, #4]
	sub	x4, x29, #56
	mov	x0, x22
	mov	x1, x21
	mov	x7, x19
	bl	_ffurl_open_whitelist
	mov	x21, x0
	sub	x0, x29, #56
	bl	_av_dict_free
	tbnz	w21, #31, LBB0_12
; %bb.5:
	ldr	w8, [x19]
Lloh15:
	adrp	x21, _AVIO_FLAG_WRITE@GOTPAGE
Lloh16:
	ldr	x21, [x21, _AVIO_FLAG_WRITE@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	sub	x8, x29, #48
	csel	x1, xzr, x8, eq
Lloh17:
	adrp	x2, _ftp_connect_control_connection.connect_codes@PAGE
Lloh18:
	add	x2, x2, _ftp_connect_control_connection.connect_codes@PAGEOFF
	mov	x0, x20
	bl	_ftp_status
	cmp	w0, #220
	b.ne	LBB0_13
; %bb.6:
	ldr	w8, [x19]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
	ldur	x0, [x29, #-48]
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_av_stristr
	cbz	x0, LBB0_9
; %bb.8:
Lloh21:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x2, l_.str.5@PAGE
Lloh25:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_9:
	ldur	x0, [x29, #-48]
	bl	_av_free
	mov	x0, x20
	bl	_ftp_auth
	tbnz	w0, #31, LBB0_14
; %bb.10:
	mov	x0, x20
	bl	_ftp_type
	tbnz	w0, #31, LBB0_15
; %bb.11:
	mov	x0, x20
	bl	_ftp_features
	b	LBB0_1
LBB0_12:
Lloh26:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x2, l_.str.2@PAGE
Lloh30:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_13:
Lloh31:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x2, l_.str.3@PAGE
Lloh35:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh36:
	adrp	x8, _EACCES@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x21, x0
	b	LBB0_17
LBB0_14:
	mov	x21, x0
Lloh39:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh40:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x2, l_.str.6@PAGE
Lloh43:
	add	x2, x2, l_.str.6@PAGEOFF
	b	LBB0_16
LBB0_15:
	mov	x21, x0
Lloh44:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh45:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
Lloh47:
	adrp	x2, l_.str.7@PAGE
Lloh48:
	add	x2, x2, l_.str.7@PAGEOFF
LBB0_16:
	mov	x0, x19
	bl	_av_log
LBB0_17:
	ldur	x8, [x29, #-40]
Lloh49:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh50:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh51:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	mov	x0, x21
	sub	sp, x29, #32
	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
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_CONTROL_BUFFER_SIZE,4,2        ; @CONTROL_BUFFER_SIZE
	.section	__TEXT,__const
	.p2align	2                               ; @ftp_connect_control_connection.connect_codes
_ftp_connect_control_connection.connect_codes:
	.long	220                             ; 0xdc
	.long	0                               ; 0x0

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tcp"

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

	.comm	_AVIO_FLAG_READ_WRITE,4,2       ; @AVIO_FLAG_READ_WRITE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"Cannot open control connection\n"

	.comm	_AVIO_FLAG_WRITE,4,2            ; @AVIO_FLAG_WRITE
l_.str.3:                               ; @.str.3
	.asciz	"FTP server not ready for new users\n"

	.comm	_EACCES,4,2                     ; @EACCES
l_.str.4:                               ; @.str.4
	.asciz	"pure-ftpd"

	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.5:                               ; @.str.5
	.asciz	"Pure-FTPd server is used as an output protocol. It is known issue this implementation may produce incorrect content and it cannot be fixed at this moment."

l_.str.6:                               ; @.str.6
	.asciz	"FTP authentication failed\n"

l_.str.7:                               ; @.str.7
	.asciz	"Set content type failed\n"

	.no_dead_strip	_ftp_connect_control_connection
.subsections_via_symbols
