	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftp_open_dir
_ftp_open_dir:                          ## @ftp_open_dir
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	(%rdi), %esi
	callq	_ftp_connect
	testl	%eax, %eax
	js	LBB0_11
## %bb.1:
	movq	%r14, %rdi
	callq	_ftp_set_dir
	testl	%eax, %eax
	js	LBB0_11
## %bb.2:
	movq	%rbx, %rdi
	callq	_ftp_connect_data_connection
	testl	%eax, %eax
	js	LBB0_11
## %bb.3:
	movq	%r14, %rdi
	callq	_ftp_list
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_12
## %bb.4:
	movq	_DIR_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_av_malloc
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	$0, (%rax)
	cmpq	$0, 8(%r14)
	je	LBB0_12
## %bb.6:
	movq	(%r14), %rcx
	movq	_LISTING_DIR@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_12
	jmp	LBB0_13
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_11:
	movl	%eax, %r15d
LBB0_12:
	leaq	16(%r14), %rdi
	callq	_ffurl_closep
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_ffurl_closep
	movl	%r15d, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DIR_BUFFER_SIZE,4,2            ## @DIR_BUFFER_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_LISTING_DIR,8,3                ## @LISTING_DIR
	.no_dead_strip	_ftp_open_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftp_open_dir
_ftp_open_dir:                          ; @ftp_open_dir
	.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
	mov	x21, x0
	ldr	x19, [x0, #8]
	ldr	w1, [x0]
	bl	_ftp_connect
	tbnz	w0, #31, LBB0_9
; %bb.1:
	mov	x0, x19
	bl	_ftp_set_dir
	tbnz	w0, #31, LBB0_9
; %bb.2:
	mov	x0, x21
	bl	_ftp_connect_data_connection
	tbnz	w0, #31, LBB0_9
; %bb.3:
	mov	x0, x19
	bl	_ftp_list
	mov	x20, x0
	tbnz	w0, #31, LBB0_10
; %bb.4:
Lloh0:
	adrp	x8, _DIR_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DIR_BUFFER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_av_malloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_8
; %bb.5:
	str	xzr, [x0]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.6:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _LISTING_DIR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LISTING_DIR@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:
	mov	w20, #0
	b	LBB0_11
LBB0_8:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_9:
	mov	x20, x0
LBB0_10:
	add	x0, x19, #16
	bl	_ffurl_closep
	add	x0, x19, #8
	bl	_ffurl_closep
LBB0_11:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DIR_BUFFER_SIZE,4,2            ; @DIR_BUFFER_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_LISTING_DIR,8,3                ; @LISTING_DIR
	.no_dead_strip	_ftp_open_dir
.subsections_via_symbols
