	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ftp_request                    ## -- Begin function ftp_request
	.p2align	4, 0x90
_ftp_request:                           ## @ftp_request
	.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	%r8, %rbx
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r13
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.1:
	movq	%rcx, %r14
	movq	(%rcx), %rdi
	movq	_SCHEME_HTTP@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	(%r14), %rdi
	movq	_SCHEME_HTTPS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_9
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_7
LBB0_9:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdx
	callq	_ftp_cached_connect
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_fetchFreeURL
	testq	%rbx, %rbx
	jne	LBB0_11
	jmp	LBB0_24
LBB0_8:
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdx
	callq	_ftp_cached_connect
	movq	%rax, %rbx
	testq	%rbx, %rbx
	je	LBB0_24
LBB0_11:
	movl	12(%r13), %esi
	movq	%rbx, %rdi
	callq	_ftp_cwd
	cmpl	$-1, %eax
	je	LBB0_23
## %bb.12:
	testq	%r12, %r12
	je	LBB0_16
## %bb.13:
	movl	12(%r13), %esi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_ftp_stat
	cmpl	$-1, %eax
	je	LBB0_14
LBB0_16:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_20
LBB0_21:
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_17:
	decl	(%rbx)
	movq	%rbx, %rdi
	callq	_ftp_disconnect
	movl	$1, %eax
	jmp	LBB0_25
LBB0_7:
	leaq	L_.str.3(%rip), %rsi
LBB0_5:
	movq	%r13, %rdi
	movq	%r12, %rdx
	movq	%r14, %rcx
	movq	%rbx, %r8
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_http_request                   ## TAILCALL
LBB0_14:
	movq	_fetchLastErrCode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_FETCH_PROTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.15:
	movq	_FETCH_UNAVAIL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_16
LBB0_23:
	movq	%rbx, %rdi
	callq	_ftp_disconnect
LBB0_24:
	xorl	%eax, %eax
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %ecx
	movl	8(%r13), %r8d
	movl	12(%r13), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ftp_transfer                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SCHEME_HTTP,8,3                ## @SCHEME_HTTP
	.comm	_SCHEME_HTTPS,8,3               ## @SCHEME_HTTPS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"STAT"

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

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

L_.str.3:                               ## @.str.3
	.asciz	"GET"

	.comm	_fetchLastErrCode,8,3           ## @fetchLastErrCode
	.comm	_FETCH_PROTO,8,3                ## @FETCH_PROTO
	.comm	_FETCH_UNAVAIL,8,3              ## @FETCH_UNAVAIL
L_.str.4:                               ## @.str.4
	.asciz	"STOR"

L_.str.5:                               ## @.str.5
	.asciz	"APPE"

	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ftp_request                    ; -- Begin function ftp_request
	.p2align	2
_ftp_request:                           ; @ftp_request
	.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	x19, x4
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	cbz	x3, LBB0_6
; %bb.1:
	mov	x24, x3
	ldr	x0, [x3]
Lloh0:
	adrp	x8, _SCHEME_HTTP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCHEME_HTTP@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
	bl	_strcmp
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x0, [x24]
Lloh3:
	adrp	x8, _SCHEME_HTTPS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCHEME_HTTPS@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x8]
	bl	_strcmp
	cbnz	x0, LBB0_5
LBB0_3:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbz	x0, LBB0_18
; %bb.4:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbz	x0, LBB0_20
LBB0_5:
	mov	x0, x20
	mov	x1, x24
	mov	x2, x19
	bl	_ftp_cached_connect
	mov	x23, x0
	mov	x0, x24
	bl	_fetchFreeURL
	cbnz	x23, LBB0_7
	b	LBB0_16
LBB0_6:
	mov	x0, x20
	mov	x1, #0
	mov	x2, x19
	bl	_ftp_cached_connect
	mov	x23, x0
	cbz	x23, LBB0_16
LBB0_7:
	ldr	w1, [x20, #12]
	mov	x0, x23
	bl	_ftp_cwd
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.8:
	cbz	x22, LBB0_11
; %bb.9:
	ldr	w1, [x20, #12]
	mov	x0, x23
	mov	x2, x22
	bl	_ftp_stat
	cmn	w0, #1
	b.ne	LBB0_11
; %bb.10:
Lloh10:
	adrp	x8, _fetchLastErrCode@GOTPAGE
Lloh11:
	ldr	x8, [x8, _fetchLastErrCode@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _FETCH_PROTO@GOTPAGE
Lloh14:
	ldr	x9, [x9, _FETCH_PROTO@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
Lloh16:
	adrp	x10, _FETCH_UNAVAIL@GOTPAGE
Lloh17:
	ldr	x10, [x10, _FETCH_UNAVAIL@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_15
LBB0_11:
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbz	x0, LBB0_19
; %bb.12:
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_strcmp
Lloh23:
	adrp	x22, _O_WRONLY@GOTPAGE
Lloh24:
	ldr	x22, [x22, _O_WRONLY@GOTPAGEOFF]
	cbz	x0, LBB0_14
; %bb.13:
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_strcmp
Lloh27:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
	cmp	x0, #0
	csel	x22, x22, x8, eq
LBB0_14:
	ldr	w3, [x22]
	ldp	w4, w2, [x20, #8]
	mov	x0, x23
	mov	x1, x21
	mov	x5, x19
	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	_ftp_transfer
LBB0_15:
	mov	x0, x23
	bl	_ftp_disconnect
LBB0_16:
	mov	x0, #0
LBB0_17:
	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
LBB0_18:
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_21
LBB0_19:
	ldr	w8, [x23]
	sub	w8, w8, #1
	str	w8, [x23]
	mov	x0, x23
	bl	_ftp_disconnect
	mov	w0, #1
	b	LBB0_17
LBB0_20:
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_21:
	mov	x0, x20
	mov	x2, x22
	mov	x3, x24
	mov	x4, x19
	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	_http_request
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_SCHEME_HTTP,8,3                ; @SCHEME_HTTP
	.comm	_SCHEME_HTTPS,8,3               ; @SCHEME_HTTPS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"STAT"

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

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

l_.str.3:                               ; @.str.3
	.asciz	"GET"

	.comm	_fetchLastErrCode,8,3           ; @fetchLastErrCode
	.comm	_FETCH_PROTO,8,3                ; @FETCH_PROTO
	.comm	_FETCH_UNAVAIL,8,3              ; @FETCH_UNAVAIL
l_.str.4:                               ; @.str.4
	.asciz	"STOR"

l_.str.5:                               ; @.str.5
	.asciz	"APPE"

	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
.subsections_via_symbols
