	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_net_recv               ## -- Begin function mbedtls_net_recv
	.p2align	4, 0x90
_mbedtls_net_recv:                      ## @mbedtls_net_recv
	.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
	testl	%edi, %edi
	js	LBB0_1
## %bb.2:
	callq	_read
	testl	%eax, %eax
	jns	LBB0_11
## %bb.3:
	movq	%rbx, %rdi
	callq	_net_would_block
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movq	_MBEDTLS_ERR_SSL_WANT_READ@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_1:
	movq	_MBEDTLS_ERR_NET_INVALID_CONTEXT@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EPIPE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	_ECONNRESET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.8:
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.9:
	movq	_MBEDTLS_ERR_NET_RECV_FAILED@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	movq	_MBEDTLS_ERR_NET_CONN_RESET@GOTPCREL(%rip), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ERR_NET_INVALID_CONTEXT,4,2 ## @MBEDTLS_ERR_NET_INVALID_CONTEXT
	.comm	_MBEDTLS_ERR_SSL_WANT_READ,4,2  ## @MBEDTLS_ERR_SSL_WANT_READ
	.comm	_errno,8,3                      ## @errno
	.comm	_EPIPE,8,3                      ## @EPIPE
	.comm	_ECONNRESET,8,3                 ## @ECONNRESET
	.comm	_MBEDTLS_ERR_NET_CONN_RESET,4,2 ## @MBEDTLS_ERR_NET_CONN_RESET
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_MBEDTLS_ERR_NET_RECV_FAILED,4,2 ## @MBEDTLS_ERR_NET_RECV_FAILED
	.comm	_WSAECONNRESET,8,3              ## @WSAECONNRESET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_net_recv               ; -- Begin function mbedtls_net_recv
	.p2align	2
_mbedtls_net_recv:                      ; @mbedtls_net_recv
	.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]
	tbnz	w0, #31, LBB0_4
; %bb.1:
	bl	_read
	tbz	w0, #31, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_net_would_block
	cbz	x0, LBB0_7
LBB0_3:
Lloh0:
	adrp	x8, _MBEDTLS_ERR_SSL_WANT_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_WANT_READ@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _MBEDTLS_ERR_NET_INVALID_CONTEXT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MBEDTLS_ERR_NET_INVALID_CONTEXT@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
LBB0_6:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh4:
	adrp	x8, _errno@GOTPAGE
Lloh5:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _EPIPE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _EPIPE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
Lloh10:
	adrp	x10, _ECONNRESET@GOTPAGE
Lloh11:
	ldr	x10, [x10, _ECONNRESET@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_9
; %bb.8:
Lloh13:
	adrp	x8, _MBEDTLS_ERR_NET_CONN_RESET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MBEDTLS_ERR_NET_CONN_RESET@GOTPAGEOFF]
	b	LBB0_5
LBB0_9:
Lloh15:
	adrp	x9, _EINTR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EINTR@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.10:
Lloh18:
	adrp	x8, _MBEDTLS_ERR_NET_RECV_FAILED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MBEDTLS_ERR_NET_RECV_FAILED@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ERR_NET_INVALID_CONTEXT,4,2 ; @MBEDTLS_ERR_NET_INVALID_CONTEXT
	.comm	_MBEDTLS_ERR_SSL_WANT_READ,4,2  ; @MBEDTLS_ERR_SSL_WANT_READ
	.comm	_errno,8,3                      ; @errno
	.comm	_EPIPE,8,3                      ; @EPIPE
	.comm	_ECONNRESET,8,3                 ; @ECONNRESET
	.comm	_MBEDTLS_ERR_NET_CONN_RESET,4,2 ; @MBEDTLS_ERR_NET_CONN_RESET
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_MBEDTLS_ERR_NET_RECV_FAILED,4,2 ; @MBEDTLS_ERR_NET_RECV_FAILED
	.comm	_WSAECONNRESET,8,3              ; @WSAECONNRESET
.subsections_via_symbols
