	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netconn_connect
_netconn_connect:                       ## @netconn_connect
	.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	$0, -48(%rbp)
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	_SYS_MBOX_NULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movq	_MQBOX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_MQ_Init
	movq	_MQ_ERROR_SUCCESSFUL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
LBB0_5:
	movq	_MEMP_API_MSG@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_memp_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %rbx
	movq	_APIMSG_CONNECT@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	12(%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	8(%r12), %eax
	jmp	LBB0_7
LBB0_1:
	movl	$-1, %eax
	jmp	LBB0_7
LBB0_4:
	movq	_ERR_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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_CONNECT,4,2             ## @APIMSG_CONNECT
	.comm	_MQ_MSG_BLOCK,4,2               ## @MQ_MSG_BLOCK
	.no_dead_strip	_netconn_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netconn_connect
_netconn_connect:                       ; @netconn_connect
	.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
	str	xzr, [sp, #8]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _SYS_MBOX_NULL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SYS_MBOX_NULL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _MQBOX_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MQBOX_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_MQ_Init
Lloh6:
	adrp	x8, _MQ_ERROR_SUCCESSFUL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MQ_ERROR_SUCCESSFUL@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
LBB0_3:
Lloh9:
	adrp	x23, _MEMP_API_MSG@GOTPAGE
Lloh10:
	ldr	x23, [x23, _MEMP_API_MSG@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_memp_malloc
	cbz	x0, LBB0_6
; %bb.4:
	mov	x22, x0
Lloh11:
	adrp	x8, _APIMSG_CONNECT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _APIMSG_CONNECT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	stp	x21, x19, [x0, #8]
	str	w20, [x0]
	bl	_apimsg_post
	ldr	w0, [x19, #12]
Lloh14:
	adrp	x8, _MQ_MSG_BLOCK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MQ_MSG_BLOCK@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	add	x1, sp, #8
	bl	_MQ_Receive
	ldr	w0, [x23]
	mov	x1, x22
	bl	_memp_free
	ldr	w0, [x19, #8]
	b	LBB0_7
LBB0_5:
	mov	w0, #-1
	b	LBB0_7
LBB0_6:
Lloh17:
	adrp	x8, _ERR_MEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERR_MEM@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.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_CONNECT,4,2             ; @APIMSG_CONNECT
	.comm	_MQ_MSG_BLOCK,4,2               ; @MQ_MSG_BLOCK
	.no_dead_strip	_netconn_connect
.subsections_via_symbols
