	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftp_read_dir
_ftp_read_dir:                          ## @ftp_read_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	%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
	movq	%rsi, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %r12
	movslq	8(%r13), %r14
	movq	%r14, %rbx
	addq	%r12, %rbx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_strchr
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	12(%r13), %edx
	subl	%r14d, %edx
	movl	%edx, 12(%r13)
	movl	$0, 8(%r13)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_memmove
	movq	(%r13), %r12
	movl	12(%r13), %edx
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	20(%r13), %edi
	movslq	%edx, %rdx
	addq	%rdx, %r12
	notl	%edx
	movq	_DIR_BUFFER_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %edx
	movq	%r12, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ffurl_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_18
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	je	LBB0_16
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	12(%r13), %rax
	movslq	%ebx, %rcx
	addq	%rax, %rcx
	movl	%ecx, 12(%r13)
	movq	(%r13), %rax
	movb	$0, (%rax,%rcx)
	movq	(%r13), %rbx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_19
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	8(%r13), %r14d
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ecx
	subl	%ebx, %ecx
	addl	%r14d, %ecx
	incl	%ecx
	movl	%ecx, 8(%r13)
	movb	$0, (%rax)
	cmpq	%rbx, %rax
	jbe	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpb	$13, -1(%rax)
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movb	$0, -1(%rax)
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_ff_alloc_dir_entry
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	16(%r13), %ecx
	movl	%ecx, (%rax)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ftp_parse_entry
	testl	%eax, %eax
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_avio_free_directory_entry
	testl	%ebx, %ebx
	jns	LBB0_1
	jmp	LBB0_18
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_16:
	movq	$0, (%r15)
LBB0_17:
	xorl	%ebx, %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_DIR_BUFFER_SIZE,4,2            ## @DIR_BUFFER_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ftp_read_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftp_read_dir
_ftp_read_dir:                          ; @ftp_read_dir
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x23, [x0]
Lloh0:
	adrp	x24, _DIR_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DIR_BUFFER_SIZE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x23]
	ldrsw	x25, [x23, #8]
	add	x21, x22, x25
	mov	x0, x21
	mov	w1, #10
	bl	_strchr
	cbnz	x0, LBB0_8
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x23, #12]
	subs	w2, w8, w25
	stp	wzr, w2, [x23, #8]
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_memmove
	ldr	x22, [x23]
	ldr	w2, [x23, #12]
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x23, #20]
	add	x1, x22, w2, sxtw
	ldr	w8, [x24]
	mvn	w9, w2
	add	w2, w8, w9
	bl	_ffurl_read
	mov	x21, x0
	tbnz	w0, #31, LBB0_16
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w21, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	ldrsw	x8, [x23, #12]
	add	x8, x8, w21, sxtw
	str	w8, [x23, #12]
	ldr	x9, [x23]
	strb	wzr, [x9, x8]
	ldr	x21, [x23]
	mov	x0, x21
	mov	w1, #10
	bl	_strchr
	cbz	x0, LBB0_17
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w25, [x23, #8]
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	sub	w8, w0, w21
	add	w8, w8, w25
	add	w8, w8, #1
	str	w8, [x23, #8]
	strb	wzr, [x0]
	cmp	x0, x21
	b.ls	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_1 Depth=1
	ldurb	w8, [x0, #-1]
	cmp	w8, #13
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	sturb	wzr, [x0, #-1]
LBB0_11:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_ff_alloc_dir_entry
	str	x0, [x19]
	cbz	x0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_1 Depth=1
	mov	x2, x0
	ldr	w8, [x23, #16]
	str	w8, [x0]
	mov	x0, x20
	mov	x1, x21
	bl	_ftp_parse_entry
	mov	x21, x0
	cbz	w0, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_avio_free_directory_entry
	tbz	w21, #31, LBB0_1
	b	LBB0_16
LBB0_14:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_18
LBB0_15:
	str	xzr, [x19]
LBB0_16:
	mov	x0, x21
	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_17:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
	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
	b	_AVERROR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_DIR_BUFFER_SIZE,4,2            ; @DIR_BUFFER_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ftp_read_dir
.subsections_via_symbols
