	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netconn_recv
_netconn_recv:                          ## @netconn_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -64(%rbp)
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r12
	movq	(%rdi), %rdi
	movq	_SYS_MBOX_NULL@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rdi
	jne	LBB0_5
LBB0_2:
	movq	_ERR_CONN@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rax
	movq	%rax, 24(%r12)
	jmp	LBB0_4
LBB0_5:
	movq	24(%r12), %rax
	movq	_ERR_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
LBB0_4:
	xorl	%ebx, %ebx
LBB0_15:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	8(%r12), %rax
	movq	_NETCONN_TCP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.8:
	movq	48(%r12), %rax
	movq	(%rax), %rax
	movq	_LISTEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.9:
	movq	_MEMP_NETBUF@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_memp_malloc
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:
	movq	%rax, %r14
	movq	(%r12), %rdi
	leaq	-56(%rbp), %rsi
	movq	_MQ_MSG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_MQ_Receive
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.11:
	movl	(%rax), %r15d
	subl	%r15d, 40(%r12)
	jmp	LBB0_18
LBB0_12:
	leaq	-48(%rbp), %rsi
	movq	_MQ_MSG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_MQ_Receive
	movq	-48(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	subl	%edx, 40(%r12)
	movq	32(%r12), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_NETCONN_EVTRCVMINUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r12, %rdi
	callq	*%rax
LBB0_14:
	movq	_API_LIB_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%r12), %rsi
	callq	_LWIP_DEBUGF
	movq	-48(%rbp), %rbx
	jmp	LBB0_15
LBB0_16:
	movq	_ERR_MEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_17:
	xorl	%r15d, %r15d
LBB0_18:
	movq	32(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.19:
	movq	_NETCONN_EVTRCVMINUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	*%rcx
	movq	-56(%rbp), %rax
LBB0_20:
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	movq	%rax, (%r14)
	movq	-56(%rbp), %rax
	movq	-48(%rbp), %rbx
	movq	%rax, 48(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movq	_MEMP_API_MSG@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_memp_malloc
	testq	%rax, %rax
	je	LBB0_24
## %bb.22:
	movq	%rax, %r14
	movq	_APIMSG_RECV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	%r12, 16(%r14)
	movl	%r15d, 8(%r14)
	movq	%r14, %rdi
	callq	_apimsg_post
	movq	16(%r12), %rdi
	leaq	-64(%rbp), %rsi
	movq	_MQ_MSG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_MQ_Receive
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_memp_free
	jmp	LBB0_14
LBB0_23:
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_memp_free
	movq	(%r12), %rdi
	callq	_MQ_Close
	movq	(%rbx), %rax
	movq	%rax, (%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_24:
	movq	_ERR_MEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r12)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_MBOX_NULL,8,3              ## @SYS_MBOX_NULL
	.comm	_ERR_CONN,8,3                   ## @ERR_CONN
	.comm	_ERR_OK,8,3                     ## @ERR_OK
	.comm	_NETCONN_TCP,8,3                ## @NETCONN_TCP
	.comm	_LISTEN,8,3                     ## @LISTEN
	.comm	_MEMP_NETBUF,4,2                ## @MEMP_NETBUF
	.comm	_ERR_MEM,8,3                    ## @ERR_MEM
	.comm	_MQ_MSG_BLOCK,4,2               ## @MQ_MSG_BLOCK
	.comm	_NETCONN_EVTRCVMINUS,4,2        ## @NETCONN_EVTRCVMINUS
	.comm	_MEMP_API_MSG,4,2               ## @MEMP_API_MSG
	.comm	_APIMSG_RECV,4,2                ## @APIMSG_RECV
	.comm	_API_LIB_DEBUG,4,2              ## @API_LIB_DEBUG
	.no_dead_strip	_netconn_recv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netconn_recv
_netconn_recv:                          ; @netconn_recv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	str	xzr, [sp, #24]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x22, _SYS_MBOX_NULL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SYS_MBOX_NULL@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_4
LBB0_2:
	mov	x20, #0
Lloh2:
	adrp	x8, _ERR_CONN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERR_CONN@GOTPAGEOFF]
LBB0_3:
	ldr	x8, [x8]
	str	x8, [x19, #24]
	b	LBB0_6
LBB0_4:
	ldr	x8, [x19, #24]
Lloh4:
	adrp	x9, _ERR_OK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ERR_OK@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_7
LBB0_5:
	mov	x20, #0
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	ldr	x8, [x19, #8]
Lloh7:
	adrp	x9, _NETCONN_TCP@GOTPAGE
Lloh8:
	ldr	x9, [x9, _NETCONN_TCP@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.8:
	ldr	x8, [x19, #48]
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _LISTEN@GOTPAGE
Lloh11:
	ldr	x9, [x9, _LISTEN@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.9:
Lloh13:
	adrp	x24, _MEMP_NETBUF@GOTPAGE
Lloh14:
	ldr	x24, [x24, _MEMP_NETBUF@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_memp_malloc
	mov	x20, x0
	str	x0, [sp, #16]
	cbz	x0, LBB0_21
; %bb.10:
	ldr	x0, [x19]
Lloh15:
	adrp	x23, _MQ_MSG_BLOCK@GOTPAGE
Lloh16:
	ldr	x23, [x23, _MQ_MSG_BLOCK@GOTPAGEOFF]
	ldr	w2, [x23]
	add	x1, sp, #8
	bl	_MQ_Receive
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_15
; %bb.11:
	ldr	w21, [x8]
	ldr	w9, [x19, #40]
	sub	w9, w9, w21
	str	w9, [x19, #40]
	b	LBB0_16
LBB0_12:
Lloh17:
	adrp	x8, _MQ_MSG_BLOCK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MQ_MSG_BLOCK@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	add	x1, sp, #16
	bl	_MQ_Receive
	ldr	x8, [sp, #16]
	ldr	x8, [x8]
	ldr	w2, [x8]
	ldr	w8, [x19, #40]
	sub	w8, w8, w2
	str	w8, [x19, #40]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_14
; %bb.13:
Lloh20:
	adrp	x9, _NETCONN_EVTRCVMINUS@GOTPAGE
Lloh21:
	ldr	x9, [x9, _NETCONN_EVTRCVMINUS@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x9]
	mov	x0, x19
	blr	x8
LBB0_14:
Lloh23:
	adrp	x8, _API_LIB_DEBUG@GOTPAGE
Lloh24:
	ldr	x8, [x8, _API_LIB_DEBUG@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	ldr	x1, [x19, #24]
	bl	_LWIP_DEBUGF
	ldr	x20, [sp, #16]
	b	LBB0_6
LBB0_15:
	mov	w21, #0
LBB0_16:
	ldr	x9, [x19, #32]
	cbz	x9, LBB0_18
; %bb.17:
Lloh26:
	adrp	x8, _NETCONN_EVTRCVMINUS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _NETCONN_EVTRCVMINUS@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	blr	x9
	ldr	x8, [sp, #8]
LBB0_18:
	cbz	x8, LBB0_22
; %bb.19:
	str	x8, [x20]
	ldp	x8, x20, [sp, #8]
	stp	xzr, x8, [x20, #40]
	str	xzr, [x20, #32]
Lloh29:
	adrp	x24, _MEMP_API_MSG@GOTPAGE
Lloh30:
	ldr	x24, [x24, _MEMP_API_MSG@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_memp_malloc
	cbz	x0, LBB0_21
; %bb.20:
	mov	x22, x0
Lloh31:
	adrp	x8, _APIMSG_RECV@GOTPAGE
Lloh32:
	ldr	x8, [x8, _APIMSG_RECV@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	str	x19, [x0, #16]
	str	w21, [x0, #8]
	bl	_apimsg_post
	ldr	x0, [x19, #16]
	ldr	w2, [x23]
	add	x1, sp, #24
	bl	_MQ_Receive
	ldr	w0, [x24]
	mov	x1, x22
	bl	_memp_free
	b	LBB0_14
LBB0_21:
Lloh34:
	adrp	x8, _ERR_MEM@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ERR_MEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_22:
	ldr	w0, [x24]
	mov	x1, x20
	bl	_memp_free
	ldr	x0, [x19]
	bl	_MQ_Close
	mov	x20, #0
	ldr	x8, [x22]
	str	x8, [x19]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_MBOX_NULL,8,3              ; @SYS_MBOX_NULL
	.comm	_ERR_CONN,8,3                   ; @ERR_CONN
	.comm	_ERR_OK,8,3                     ; @ERR_OK
	.comm	_NETCONN_TCP,8,3                ; @NETCONN_TCP
	.comm	_LISTEN,8,3                     ; @LISTEN
	.comm	_MEMP_NETBUF,4,2                ; @MEMP_NETBUF
	.comm	_ERR_MEM,8,3                    ; @ERR_MEM
	.comm	_MQ_MSG_BLOCK,4,2               ; @MQ_MSG_BLOCK
	.comm	_NETCONN_EVTRCVMINUS,4,2        ; @NETCONN_EVTRCVMINUS
	.comm	_MEMP_API_MSG,4,2               ; @MEMP_API_MSG
	.comm	_APIMSG_RECV,4,2                ; @APIMSG_RECV
	.comm	_API_LIB_DEBUG,4,2              ; @API_LIB_DEBUG
	.no_dead_strip	_netconn_recv
.subsections_via_symbols
