	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_plain_socket
_read_plain_socket:                     ## @read_plain_socket
	.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
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	xorl	%ecx, %ecx
	callq	_recv
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.2:
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_EAGAIN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.3:
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_4
LBB0_6:
	movq	_WS_ERR@GOTPCREL(%rip), %rcx
	movq	_WS_CLOSE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	jmp	LBB0_5
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	movq	_WS_READING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ws_set_status                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.comm	_EWOULDBLOCK,8,3                ## @EWOULDBLOCK
	.comm	_WS_READING,4,2                 ## @WS_READING
	.comm	_WS_ERR,4,2                     ## @WS_ERR
	.comm	_WS_CLOSE,4,2                   ## @WS_CLOSE
	.no_dead_strip	_read_plain_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_plain_socket
_read_plain_socket:                     ; @read_plain_socket
	.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
	mov	x19, x0
	ldr	w0, [x0]
	mov	w3, #0
	bl	_recv
	mov	x2, x0
	cbz	w0, LBB0_4
; %bb.1:
	cmn	w2, #1
	b.ne	LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _errno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _EWOULDBLOCK@GOTPAGE
Lloh7:
	ldr	x10, [x10, _EWOULDBLOCK@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _WS_READING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WS_READING@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _WS_ERR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WS_ERR@GOTPAGEOFF]
Lloh14:
	adrp	x9, _WS_CLOSE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _WS_CLOSE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ws_set_status
LBB0_6:
	mov	x0, x2
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.comm	_EWOULDBLOCK,8,3                ; @EWOULDBLOCK
	.comm	_WS_READING,4,2                 ; @WS_READING
	.comm	_WS_ERR,4,2                     ; @WS_ERR
	.comm	_WS_CLOSE,4,2                   ; @WS_CLOSE
	.no_dead_strip	_read_plain_socket
.subsections_via_symbols
