	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netconn_disconnect
_netconn_disconnect:                    ## @netconn_disconnect
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -32(%rbp)
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_MEMP_API_MSG@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_memp_malloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	movq	_APIMSG_DISCONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	%rbx, (%r14)
	movq	%r14, %rdi
	callq	_apimsg_post
	movl	4(%rbx), %edi
	leaq	-32(%rbp), %rsi
	movq	_MQ_MSG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_MQ_Receive
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_memp_free
	jmp	LBB0_5
LBB0_1:
	movq	_ERR_VAL@GOTPCREL(%rip), %rbx
	jmp	LBB0_5
LBB0_3:
	movq	_ERR_MEM@GOTPCREL(%rip), %rbx
LBB0_5:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR_VAL,4,2                    ## @ERR_VAL
	.comm	_MEMP_API_MSG,4,2               ## @MEMP_API_MSG
	.comm	_ERR_MEM,4,2                    ## @ERR_MEM
	.comm	_APIMSG_DISCONNECT,4,2          ## @APIMSG_DISCONNECT
	.comm	_MQ_MSG_BLOCK,4,2               ## @MQ_MSG_BLOCK
	.no_dead_strip	_netconn_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netconn_disconnect
_netconn_disconnect:                    ; @netconn_disconnect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	str	xzr, [sp, #8]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x21, _MEMP_API_MSG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MEMP_API_MSG@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_memp_malloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x20, x0
Lloh2:
	adrp	x8, _APIMSG_DISCONNECT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _APIMSG_DISCONNECT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	str	x19, [x0]
	bl	_apimsg_post
	ldr	w0, [x19, #4]
Lloh5:
	adrp	x8, _MQ_MSG_BLOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MQ_MSG_BLOCK@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	add	x1, sp, #8
	bl	_MQ_Receive
	ldr	w0, [x21]
	mov	x1, x20
	bl	_memp_free
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x19, _ERR_VAL@GOTPAGE
Lloh9:
	ldr	x19, [x19, _ERR_VAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x19, _ERR_MEM@GOTPAGE
Lloh11:
	ldr	x19, [x19, _ERR_MEM@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR_VAL,4,2                    ; @ERR_VAL
	.comm	_MEMP_API_MSG,4,2               ; @MEMP_API_MSG
	.comm	_ERR_MEM,4,2                    ; @ERR_MEM
	.comm	_APIMSG_DISCONNECT,4,2          ; @APIMSG_DISCONNECT
	.comm	_MQ_MSG_BLOCK,4,2               ; @MQ_MSG_BLOCK
	.no_dead_strip	_netconn_disconnect
.subsections_via_symbols
