	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftp_write
_ftp_write:                             ## @ftp_write
	.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
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	leaq	L_.str(%rip), %rsi
	callq	_ff_dlog
	movq	(%r15), %rax
	movq	_DISCONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_ftp_connect_data_connection
	testl	%eax, %eax
	js	LBB0_11
## %bb.2:
	movq	(%r15), %rax
LBB0_3:
	movq	_READY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_ftp_store
	testl	%eax, %eax
	js	LBB0_11
LBB0_5:
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.6:
	movq	(%r15), %rax
	movq	_UPLOADING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_ffurl_write
	movl	%eax, %r13d
	testl	%eax, %eax
	jle	LBB0_12
## %bb.8:
	movl	8(%r15), %esi
	addl	%r13d, %esi
	movl	%esi, 8(%r15)
	movl	12(%r15), %edi
	callq	_FFMAX
	movl	%eax, 12(%r15)
	jmp	LBB0_12
LBB0_9:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_11:
	movl	%eax, %r13d
LBB0_12:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ftp protocol write %d bytes\n"

	.comm	_DISCONNECTED,8,3               ## @DISCONNECTED
	.comm	_READY,8,3                      ## @READY
	.comm	_UPLOADING,8,3                  ## @UPLOADING
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"FTP write failed\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ftp_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftp_write
_ftp_write:                             ; @ftp_write
	.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, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x19, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ff_dlog
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _DISCONNECTED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DISCONNECTED@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_ftp_connect_data_connection
	tbnz	w0, #31, LBB0_10
; %bb.2:
	ldr	x8, [x19]
LBB0_3:
Lloh5:
	adrp	x9, _READY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _READY@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_ftp_store
	tbnz	w0, #31, LBB0_10
LBB0_5:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_9
; %bb.6:
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _UPLOADING@GOTPAGE
Lloh9:
	ldr	x9, [x9, _UPLOADING@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	mov	x1, x22
	mov	x2, x20
	bl	_ffurl_write
	mov	x23, x0
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.8:
	ldp	w8, w0, [x19, #8]
	add	w1, w8, w23
	str	w1, [x19, #8]
	bl	_FFMAX
	str	w0, [x19, #12]
	b	LBB0_11
LBB0_9:
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_av_log
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_10:
	mov	x23, x0
LBB0_11:
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ftp protocol write %d bytes\n"

	.comm	_DISCONNECTED,8,3               ; @DISCONNECTED
	.comm	_READY,8,3                      ; @READY
	.comm	_UPLOADING,8,3                  ; @UPLOADING
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"FTP write failed\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ftp_write
.subsections_via_symbols
