	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MsgRead                        ## -- Begin function MsgRead
	.p2align	4, 0x90
_MsgRead:                               ## @MsgRead
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsp, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_NG_PATHSIZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_csock@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_NgAllocRecvMsg
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	(%r15), %edi
	movq	_NGM_GENERIC_COOKIE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_NGM_BINARY2ASCII@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-40(%rbp), %r8
	movq	8(%r8), %r9
	addq	$32, %r9
	movq	%rbx, %rsi
	callq	_NgSendMsg
	testq	%rax, %rax
	js	LBB0_4
## %bb.3:
	movl	(%r15), %edi
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_NgAllocRecvMsg
	testq	%rax, %rax
	js	LBB0_4
## %bb.8:
	movq	-40(%rbp), %rdi
	callq	_free
	movq	-48(%rbp), %rax
	movq	(%rax), %r15
	movq	_NGF_RESP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	16(%r15), %eax
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	24(%r15), %rdx
	movl	20(%r15), %ecx
	leaq	L_.str.5(%rip), %rdi
	movq	%rbx, %r8
	xorl	%eax, %eax
	callq	_printf
	movq	(%r15), %rsi
	cmpb	$0, (%rsi)
	je	LBB0_10
## %bb.9:
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_11
LBB0_4:
	movq	-40(%rbp), %rax
	movq	_NGF_RESP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	16(%rax), %ecx
	leaq	L_.str.3(%rip), %rcx
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rcx, %rsi
	movl	20(%rax), %edx
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_printf
	movq	-40(%rbp), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.6:
	movq	(%rax), %rdi
	callq	_DumpAscii
	movq	-40(%rbp), %rdi
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_warn
	jmp	LBB0_13
LBB0_5:
	leaq	L_str.7(%rip), %rdi
	callq	_puts
	movq	-40(%rbp), %rdi
	jmp	LBB0_12
LBB0_10:
	leaq	L_str.7(%rip), %rdi
	callq	_puts
LBB0_11:
	movq	-48(%rbp), %rdi
LBB0_12:
	callq	_free
LBB0_13:
	movq	%r14, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NG_PATHSIZ,4,2                 ## @NG_PATHSIZ
	.comm	_csock,4,2                      ## @csock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"recv incoming message"

	.comm	_NGM_GENERIC_COOKIE,4,2         ## @NGM_GENERIC_COOKIE
	.comm	_NGM_BINARY2ASCII,4,2           ## @NGM_BINARY2ASCII
L_.str.1:                               ## @.str.1
	.asciz	"Rec'd %s %d from \"%s\":\n"

	.comm	_NGF_RESP,4,2                   ## @NGF_RESP
L_.str.2:                               ## @.str.2
	.asciz	"response"

L_.str.3:                               ## @.str.3
	.asciz	"command"

L_.str.5:                               ## @.str.5
	.asciz	"Rec'd %s \"%s\" (%d) from \"%s\":\n"

L_.str.6:                               ## @.str.6
	.asciz	"Args:\t%s\n"

L_str.7:                                ## @str.7
	.asciz	"No arguments"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MsgRead                        ; -- Begin function MsgRead
	.p2align	2
_MsgRead:                               ; @MsgRead
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #32
	mov	x20, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _NG_PATHSIZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NG_PATHSIZ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh8:
	adrp	x21, _csock@GOTPAGE
Lloh9:
	ldr	x21, [x21, _csock@GOTPAGEOFF]
	ldr	w0, [x21]
	sub	x1, x29, #48
	mov	x2, x19
	bl	_NgAllocRecvMsg
	tbnz	x0, #63, LBB0_7
; %bb.1:
	ldr	w0, [x21]
Lloh10:
	adrp	x8, _NGM_GENERIC_COOKIE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NGM_GENERIC_COOKIE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x8, _NGM_BINARY2ASCII@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NGM_BINARY2ASCII@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	ldur	x4, [x29, #-48]
	ldr	x8, [x4, #8]
	add	x5, x8, #32
	mov	x1, x19
	bl	_NgSendMsg
	tbnz	x0, #63, LBB0_5
; %bb.2:
	ldr	w0, [x21]
	sub	x1, x29, #56
	mov	x2, #0
	bl	_NgAllocRecvMsg
	tbnz	x0, #63, LBB0_5
; %bb.3:
	ldur	x0, [x29, #-48]
	bl	_free
	ldur	x8, [x29, #-56]
	ldr	x21, [x8]
Lloh16:
	adrp	x8, _NGF_RESP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NGF_RESP@GOTPAGEOFF]
Lloh18:
	adrp	x9, l_.str.2@PAGE
Lloh19:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh20:
	adrp	x10, l_.str.3@PAGE
Lloh21:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh22:
	ldr	w8, [x8]
	ldp	w11, w12, [x21, #16]
	tst	w8, w11
	csel	x8, x10, x9, eq
	ldr	x9, [x21, #24]
	sub	sp, sp, #32
	stp	x12, x19, [sp, #16]
	stp	x8, x9, [sp]
Lloh23:
	adrp	x0, l_.str.5@PAGE
Lloh24:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printf
	add	sp, sp, #32
	ldr	x8, [x21]
	ldrb	w9, [x8]
	cbz	w9, LBB0_9
; %bb.4:
	str	x8, [sp, #-16]!
Lloh25:
	adrp	x0, l_.str.6@PAGE
Lloh26:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_printf
	add	sp, sp, #16
	b	LBB0_10
LBB0_5:
	ldur	x8, [x29, #-48]
Lloh27:
	adrp	x9, _NGF_RESP@GOTPAGE
Lloh28:
	ldr	x9, [x9, _NGF_RESP@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
Lloh30:
	adrp	x10, l_.str.2@PAGE
Lloh31:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh32:
	adrp	x11, l_.str.3@PAGE
Lloh33:
	add	x11, x11, l_.str.3@PAGEOFF
	ldp	w12, w8, [x8, #16]
	tst	w9, w12
	csel	x9, x11, x10, eq
	sub	sp, sp, #32
	stp	x8, x19, [sp, #8]
	str	x9, [sp]
Lloh34:
	adrp	x0, l_.str.1@PAGE
Lloh35:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	add	sp, sp, #32
	ldur	x8, [x29, #-48]
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_8
; %bb.6:
	ldr	x0, [x8]
	bl	_DumpAscii
	ldur	x0, [x29, #-48]
	b	LBB0_11
LBB0_7:
Lloh36:
	adrp	x0, l_.str@PAGE
Lloh37:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
	b	LBB0_12
LBB0_8:
Lloh38:
	adrp	x0, l_str.7@PAGE
Lloh39:
	add	x0, x0, l_str.7@PAGEOFF
	bl	_puts
	ldur	x0, [x29, #-48]
	b	LBB0_11
LBB0_9:
Lloh40:
	adrp	x0, l_str.7@PAGE
Lloh41:
	add	x0, x0, l_str.7@PAGEOFF
	bl	_puts
LBB0_10:
	ldur	x0, [x29, #-56]
LBB0_11:
	bl	_free
LBB0_12:
	mov	sp, x20
	ldur	x8, [x29, #-40]
Lloh42:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_NG_PATHSIZ,4,2                 ; @NG_PATHSIZ
	.comm	_csock,4,2                      ; @csock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"recv incoming message"

	.comm	_NGM_GENERIC_COOKIE,4,2         ; @NGM_GENERIC_COOKIE
	.comm	_NGM_BINARY2ASCII,4,2           ; @NGM_BINARY2ASCII
l_.str.1:                               ; @.str.1
	.asciz	"Rec'd %s %d from \"%s\":\n"

	.comm	_NGF_RESP,4,2                   ; @NGF_RESP
l_.str.2:                               ; @.str.2
	.asciz	"response"

l_.str.3:                               ; @.str.3
	.asciz	"command"

l_.str.5:                               ; @.str.5
	.asciz	"Rec'd %s \"%s\" (%d) from \"%s\":\n"

l_.str.6:                               ; @.str.6
	.asciz	"Args:\t%s\n"

l_str.7:                                ; @str.7
	.asciz	"No arguments"

.subsections_via_symbols
