	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netconn_bind
_netconn_bind:                          ## @netconn_bind
	.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
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	$0, -48(%rbp)
	movq	_API_LIB_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_LWIP_DEBUGF
	testq	%r12, %r12
	je	LBB0_6
## %bb.1:
	movq	(%r12), %rax
	movq	_NETCONN_TCP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movq	8(%r12), %rax
	movq	_SYS_MBOX_NULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	leaq	8(%r12), %rdi
	movq	_MQBOX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MQ_Init
	movq	_MQ_ERROR_SUCCESSFUL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_4:
	movq	_MEMP_API_MSG@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_memp_malloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%rax, %rbx
	movq	_APIMSG_BIND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%r12, 16(%rbx)
	movq	%r15, 8(%rbx)
	movl	%r14d, (%rbx)
	movq	%rbx, %rdi
	callq	_apimsg_post
	movl	20(%r12), %edi
	leaq	-48(%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	%rbx, %rsi
	callq	_memp_free
	movl	16(%r12), %eax
	jmp	LBB0_10
LBB0_6:
	movq	_ERR_VAL@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	jmp	LBB0_10
LBB0_7:
	movq	_ERR_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ERR_MEM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_API_LIB_DEBUG,4,2              ## @API_LIB_DEBUG
	.comm	_ERR_VAL,4,2                    ## @ERR_VAL
	.comm	_NETCONN_TCP,8,3                ## @NETCONN_TCP
	.comm	_SYS_MBOX_NULL,8,3              ## @SYS_MBOX_NULL
	.comm	_MQBOX_SIZE,4,2                 ## @MQBOX_SIZE
	.comm	_MQ_ERROR_SUCCESSFUL,8,3        ## @MQ_ERROR_SUCCESSFUL
	.comm	_ERR_MEM,4,2                    ## @ERR_MEM
	.comm	_MEMP_API_MSG,4,2               ## @MEMP_API_MSG
	.comm	_APIMSG_BIND,4,2                ## @APIMSG_BIND
	.comm	_MQ_MSG_BLOCK,4,2               ## @MQ_MSG_BLOCK
	.no_dead_strip	_netconn_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netconn_bind
_netconn_bind:                          ; @netconn_bind
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _API_LIB_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _API_LIB_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_LWIP_DEBUGF
	cbz	x19, LBB0_6
; %bb.1:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _NETCONN_TCP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NETCONN_TCP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x19
	ldr	x8, [x0, #8]!
Lloh6:
	adrp	x9, _SYS_MBOX_NULL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SYS_MBOX_NULL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _MQBOX_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MQBOX_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_MQ_Init
Lloh12:
	adrp	x8, _MQ_ERROR_SUCCESSFUL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MQ_ERROR_SUCCESSFUL@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
LBB0_4:
Lloh15:
	adrp	x23, _MEMP_API_MSG@GOTPAGE
Lloh16:
	ldr	x23, [x23, _MEMP_API_MSG@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_memp_malloc
	cbz	x0, LBB0_8
; %bb.5:
	mov	x22, x0
Lloh17:
	adrp	x8, _APIMSG_BIND@GOTPAGE
Lloh18:
	ldr	x8, [x8, _APIMSG_BIND@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	stp	x21, x19, [x0, #8]
	str	w20, [x0]
	bl	_apimsg_post
	ldr	w0, [x19, #20]
Lloh20:
	adrp	x8, _MQ_MSG_BLOCK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MQ_MSG_BLOCK@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	add	x1, sp, #8
	bl	_MQ_Receive
	ldr	w0, [x23]
	mov	x1, x22
	bl	_memp_free
	ldr	w0, [x19, #16]
	b	LBB0_9
LBB0_6:
Lloh23:
	adrp	x8, _ERR_VAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ERR_VAL@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_8:
Lloh25:
	adrp	x8, _ERR_MEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ERR_MEM@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	str	w0, [x19, #16]
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
Lloh28:
	adrp	x8, _ERR_MEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ERR_MEM@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_API_LIB_DEBUG,4,2              ; @API_LIB_DEBUG
	.comm	_ERR_VAL,4,2                    ; @ERR_VAL
	.comm	_NETCONN_TCP,8,3                ; @NETCONN_TCP
	.comm	_SYS_MBOX_NULL,8,3              ; @SYS_MBOX_NULL
	.comm	_MQBOX_SIZE,4,2                 ; @MQBOX_SIZE
	.comm	_MQ_ERROR_SUCCESSFUL,8,3        ; @MQ_ERROR_SUCCESSFUL
	.comm	_ERR_MEM,4,2                    ; @ERR_MEM
	.comm	_MEMP_API_MSG,4,2               ; @MEMP_API_MSG
	.comm	_APIMSG_BIND,4,2                ; @APIMSG_BIND
	.comm	_MQ_MSG_BLOCK,4,2               ; @MQ_MSG_BLOCK
	.no_dead_strip	_netconn_bind
.subsections_via_symbols
