	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NgRecvAsciiMsg                 ## -- Begin function NgRecvAsciiMsg
	.p2align	4, 0x90
_NgRecvAsciiMsg:                        ## @NgRecvAsciiMsg
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	%edi, %r13d
	leal	32(%rdx), %r15d
	movl	%r15d, %edi
	callq	_malloc
	movq	%rax, %rbx
	movl	$-1, %eax
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.1:
	movq	8(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	movq	%r14, %rcx
	callq	_NgRecvMsg
	testq	%rax, %rax
	js	LBB0_6
## %bb.2:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	$16, %edx
	callq	_memcpy
	movq	_NGM_GENERIC_COOKIE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_NGM_BINARY2ASCII@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%rbx), %r9d
	addl	$16, %r9d
	movl	%r13d, %edi
	movq	%r14, %rsi
	movq	%rbx, %r8
	callq	_NgSendMsg
	testq	%rax, %rax
	js	LBB0_6
## %bb.3:
	movl	%r13d, %edi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_NgRecvMsg
	testq	%rax, %rax
	js	LBB0_6
## %bb.4:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx), %rdx
	leaq	16(%rdx), %rax
	cmpq	%r12, %rax
	jbe	LBB0_7
## %bb.5:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
	movq	%rbx, %rdi
	callq	_free
	movl	%r15d, (%r14)
	movl	$-1, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movq	8(%rcx), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_strncpy
	movq	%rbx, %rdi
	callq	_free
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_NGM_GENERIC_COOKIE,4,2         ## @NGM_GENERIC_COOKIE
	.comm	_NGM_BINARY2ASCII,4,2           ## @NGM_BINARY2ASCII
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NgRecvAsciiMsg                 ; -- Begin function NgRecvAsciiMsg
	.p2align	2
_NgRecvAsciiMsg:                        ; @NgRecvAsciiMsg
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	add	w23, w21, #32
	mov	x0, x23
	bl	_malloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	x25, [x0, #8]
	mov	x0, x22
	mov	x1, x19
	mov	x2, x23
	mov	x3, x24
	bl	_NgRecvMsg
Lloh0:
	adrp	x26, _errno@GOTPAGE
Lloh1:
	ldr	x26, [x26, _errno@GOTPAGEOFF]
	tbnz	x0, #63, LBB0_6
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #16
	bl	_memcpy
Lloh2:
	adrp	x8, _NGM_GENERIC_COOKIE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NGM_GENERIC_COOKIE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x8, _NGM_BINARY2ASCII@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NGM_BINARY2ASCII@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	ldr	w8, [x19]
	add	w5, w8, #16
	mov	x0, x22
	mov	x1, x24
	mov	x4, x19
	bl	_NgSendMsg
	tbnz	x0, #63, LBB0_6
; %bb.3:
	mov	x0, x22
	mov	x1, x19
	mov	x2, x23
	mov	x3, #0
	bl	_NgRecvMsg
	tbnz	x0, #63, LBB0_6
; %bb.4:
	ldrsw	x2, [x25]
	add	x8, x2, #16
	cmp	x8, x21
	b.ls	LBB0_9
; %bb.5:
Lloh8:
	adrp	x8, _ERANGE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x26]
LBB0_6:
	ldr	w20, [x26]
	mov	x0, x19
	bl	_free
	str	w20, [x26]
LBB0_7:
	mov	w0, #-1
LBB0_8:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	x0, [x20, #8]
	ldr	x1, [x25, #8]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_strncpy
	mov	x0, x19
	bl	_free
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_NGM_GENERIC_COOKIE,4,2         ; @NGM_GENERIC_COOKIE
	.comm	_NGM_BINARY2ASCII,4,2           ; @NGM_BINARY2ASCII
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
