	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftp_readfn
_ftp_readfn:                            ## @ftp_readfn
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	cmpq	$0, 32(%rdi)
	je	LBB0_1
## %bb.3:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.4:
	movq	(%rbx), %rax
	movq	_O_WRONLY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_1:
	movq	_EBADF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$-1, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:
	xorl	%eax, %eax
	cmpl	$0, 16(%rbx)
	jne	LBB0_13
## %bb.8:
	callq	_fetch_read
	testl	%eax, %eax
	jg	LBB0_13
## %bb.9:
	je	LBB0_10
## %bb.11:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_EINTR@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_13
## %bb.12:
	movq	%rcx, 8(%rbx)
	jmp	LBB0_13
LBB0_10:
	movl	$1, 16(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EBADF,8,3                      ## @EBADF
	.comm	_errno,8,3                      ## @errno
	.comm	_O_WRONLY,8,3                   ## @O_WRONLY
	.comm	_EINTR,8,3                      ## @EINTR
	.no_dead_strip	_ftp_readfn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftp_readfn
_ftp_readfn:                            ; @ftp_readfn
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_4:
Lloh3:
	adrp	x8, _EBADF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
LBB0_5:
Lloh6:
	adrp	x9, _errno@GOTPAGE
Lloh7:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh8:
	str	x8, [x9]
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_5
; %bb.9:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_11
; %bb.10:
	mov	w0, #0
	b	LBB0_7
LBB0_11:
	bl	_fetch_read
	cmp	w0, #0
	b.gt	LBB0_7
; %bb.12:
	cbz	w0, LBB0_15
; %bb.13:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _EINTR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EINTR@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.14:
	str	x8, [x19, #8]
	b	LBB0_6
LBB0_15:
	mov	w8, #1
	str	w8, [x19, #16]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EBADF,8,3                      ; @EBADF
	.comm	_errno,8,3                      ; @errno
	.comm	_O_WRONLY,8,3                   ; @O_WRONLY
	.comm	_EINTR,8,3                      ; @EINTR
	.no_dead_strip	_ftp_readfn
.subsections_via_symbols
