	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netconn_new_with_proto_and_callback
_netconn_new_with_proto_and_callback:   ## @netconn_new_with_proto_and_callback
	.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
	movq	%rdx, %r15
	movl	%esi, %r14d
	movl	%edi, %r12d
	movq	$0, -48(%rbp)
	movq	_MEMP_NETCONN@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_memp_malloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	_ERR_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movl	%r12d, 8(%rbx)
	movq	$0, 96(%rbx)
	leaq	24(%rbx), %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_6
## %bb.2:
	movq	%rbx, %rdi
	addq	$88, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_LWP_SemInit
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.3:
	movq	_SYS_MBOX_NULL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 80(%rbx)
	movq	%rax, 72(%rbx)
	movq	_NETCONN_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	movq	%r15, 16(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rbx)
	movq	_MEMP_API_MSG@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_memp_malloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %r15
	movq	_APIMSG_NEWCONN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movl	%r14d, 40(%r15)
	movq	%rbx, 32(%r15)
	movq	%r15, %rdi
	callq	_apimsg_post
	movl	24(%rbx), %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	(%r12), %edi
	movq	%r15, %rsi
	callq	_memp_free
	movq	(%rbx), %rax
	movq	_ERR_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
LBB0_5:
	movl	24(%rbx), %edi
	callq	_MQ_Close
LBB0_6:
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_memp_free
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEMP_NETCONN,4,2               ## @MEMP_NETCONN
	.comm	_ERR_OK,8,3                     ## @ERR_OK
	.comm	_MQBOX_SIZE,4,2                 ## @MQBOX_SIZE
	.comm	_MQ_ERROR_SUCCESSFUL,8,3        ## @MQ_ERROR_SUCCESSFUL
	.comm	_SYS_MBOX_NULL,8,3              ## @SYS_MBOX_NULL
	.comm	_NETCONN_NONE,4,2               ## @NETCONN_NONE
	.comm	_MEMP_API_MSG,4,2               ## @MEMP_API_MSG
	.comm	_APIMSG_NEWCONN,4,2             ## @APIMSG_NEWCONN
	.comm	_MQ_MSG_BLOCK,4,2               ## @MQ_MSG_BLOCK
	.no_dead_strip	_netconn_new_with_proto_and_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netconn_new_with_proto_and_callback
_netconn_new_with_proto_and_callback:   ; @netconn_new_with_proto_and_callback
	.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	x21, x2
	mov	x20, x1
	mov	x22, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x23, _MEMP_NETCONN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MEMP_NETCONN@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_memp_malloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
Lloh2:
	adrp	x24, _ERR_OK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ERR_OK@GOTPAGEOFF]
	ldr	x8, [x24]
	str	x8, [x19]
	str	w22, [x19, #8]
	str	xzr, [x19, #96]
	add	x0, x19, #24
Lloh4:
	adrp	x8, _MQBOX_SIZE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MQBOX_SIZE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_MQ_Init
Lloh7:
	adrp	x8, _MQ_ERROR_SUCCESSFUL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MQ_ERROR_SUCCESSFUL@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.2:
	add	x0, x19, #88
	mov	w1, #0
	mov	w2, #1
	bl	_LWP_SemInit
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.3:
Lloh10:
	adrp	x8, _SYS_MBOX_NULL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SYS_MBOX_NULL@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #72]
Lloh13:
	adrp	x8, _NETCONN_NONE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NETCONN_NONE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x19, #64]
	str	x21, [x19, #16]
	stp	xzr, xzr, [x19, #48]
Lloh16:
	adrp	x22, _MEMP_API_MSG@GOTPAGE
Lloh17:
	ldr	x22, [x22, _MEMP_API_MSG@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_memp_malloc
	cbz	x0, LBB0_5
; %bb.4:
	mov	x21, x0
Lloh18:
	adrp	x8, _APIMSG_NEWCONN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _APIMSG_NEWCONN@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	str	w20, [x0, #40]
	str	x19, [x0, #32]
	bl	_apimsg_post
	ldr	w0, [x19, #24]
Lloh21:
	adrp	x8, _MQ_MSG_BLOCK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MQ_MSG_BLOCK@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	add	x1, sp, #8
	bl	_MQ_Receive
	ldr	w0, [x22]
	mov	x1, x21
	bl	_memp_free
	ldr	x8, [x19]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_7
LBB0_5:
	ldr	w0, [x19, #24]
	bl	_MQ_Close
LBB0_6:
	ldr	w0, [x23]
	mov	x1, x19
	bl	_memp_free
	mov	x19, #0
LBB0_7:
	mov	x0, x19
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MEMP_NETCONN,4,2               ; @MEMP_NETCONN
	.comm	_ERR_OK,8,3                     ; @ERR_OK
	.comm	_MQBOX_SIZE,4,2                 ; @MQBOX_SIZE
	.comm	_MQ_ERROR_SUCCESSFUL,8,3        ; @MQ_ERROR_SUCCESSFUL
	.comm	_SYS_MBOX_NULL,8,3              ; @SYS_MBOX_NULL
	.comm	_NETCONN_NONE,4,2               ; @NETCONN_NONE
	.comm	_MEMP_API_MSG,4,2               ; @MEMP_API_MSG
	.comm	_APIMSG_NEWCONN,4,2             ; @APIMSG_NEWCONN
	.comm	_MQ_MSG_BLOCK,4,2               ; @MQ_MSG_BLOCK
	.no_dead_strip	_netconn_new_with_proto_and_callback
.subsections_via_symbols
