	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SendReadRepl                   ## -- Begin function SendReadRepl
	.p2align	4, 0x90
_SendReadRepl:                          ## @SendReadRepl
	.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	%rdi, %r12
	callq	_FindConn
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movl	16(%r12), %edi
	callq	_ntohs
	movq	8(%r14), %rcx
	movq	_RMP_BOOT_REPL@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	cmpq	(%rdx), %rcx
	movq	%rax, %rbx
	sete	%sil
	shlq	$5, %rsi
	movl	32(%rsi,%r14), %edi
	callq	_ntohs
	cmpq	%rax, %rbx
	jne	LBB0_5
## %bb.6:
	movl	24(%r12), %edi
	callq	_ntohs
	movq	_RMPREADDATA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	cmpq	%rdi, %rax
	jle	LBB0_8
## %bb.7:
	callq	_htons
	movl	%eax, 24(%r12)
LBB0_8:
	movl	20(%r12), %edi
	xorl	%esi, %esi
	callq	_GETWORD
	movl	4(%r14), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_lseek
	testq	%rax, %rax
	js	LBB0_9
## %bb.10:
	movl	4(%r14), %ebx
	leaq	56(%r14), %r15
	movl	24(%r12), %edi
	callq	_ntohs
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_12
## %bb.11:
	movq	_RMP_E_OKAY@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_16
LBB0_1:
	movq	%r12, %rdi
	callq	_NewConn
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r13
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_EnetStr
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_syslog
	xorl	%ebx, %ebx
	movl	$1, %r15d
	movq	_RMP_E_ABORT@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_5:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_EnetStr
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_syslog
	xorl	%ebx, %ebx
	movl	$1, %r15d
	movq	_RMP_E_BADSID@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_2:
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_9:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_EnetStr
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_syslog
	xorl	%ebx, %ebx
	movl	$1, %r15d
	movq	_RMP_E_ABORT@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_12:
	js	LBB0_14
## %bb.13:
	xorl	%ebx, %ebx
	movq	_RMP_E_EOF@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_14:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r12, %rdi
	callq	_EnetStr
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	callq	_syslog
	movq	_RMP_E_ABORT@GOTPCREL(%rip), %rax
LBB0_15:
	movl	$1, %r15d
LBB0_16:
	movq	%r14, %r13
LBB0_17:
	movq	(%rax), %rax
	movq	%rax, 48(%r13)
	movq	_RMP_READ_REPL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r13)
	movl	20(%r12), %edi
	movl	36(%r13), %esi
	callq	_COPYWORD
	movl	16(%r12), %eax
	movl	%eax, 32(%r13)
	movl	%ebx, %edi
	callq	_RMPREADSIZE
	movl	%eax, (%r13)
	movq	%r13, %rdi
	callq	_SendPacket
	movl	%eax, %ebx
	andl	%r15d, %ebx
	testq	%r14, %r14
	jne	LBB0_19
## %bb.18:
	movq	%r13, %rdi
	callq	_FreeConn
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SendReadRepl: no active connection (%s)"

	.comm	_RMP_E_ABORT,8,3                ## @RMP_E_ABORT
	.comm	_RMP_BOOT_REPL,8,3              ## @RMP_BOOT_REPL
L_.str.1:                               ## @.str.1
	.asciz	"SendReadRepl: bad session id (%s)"

	.comm	_RMP_E_BADSID,8,3               ## @RMP_E_BADSID
	.comm	_RMPREADDATA,8,3                ## @RMPREADDATA
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.2:                               ## @.str.2
	.asciz	"SendReadRepl: lseek: %m (%s)"

L_.str.3:                               ## @.str.3
	.asciz	"SendReadRepl: read: %m (%s)"

	.comm	_RMP_E_EOF,8,3                  ## @RMP_E_EOF
	.comm	_RMP_E_OKAY,8,3                 ## @RMP_E_OKAY
	.comm	_RMP_READ_REPL,4,2              ## @RMP_READ_REPL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SendReadRepl                   ; -- Begin function SendReadRepl
	.p2align	2
_SendReadRepl:                          ; @SendReadRepl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	bl	_FindConn
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
	ldr	w0, [x20, #16]
	bl	_ntohs
	mov	x21, x0
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _RMP_BOOT_REPL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RMP_BOOT_REPL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	mov	w10, #32
	mov	w11, #64
	cmp	x8, x9
	csel	x8, x11, x10, eq
	ldr	w0, [x19, x8]
	bl	_ntohs
	cmp	x21, x0
	b.ne	LBB0_9
; %bb.2:
	ldr	w0, [x20, #24]
	bl	_ntohs
	mov	x8, x0
Lloh3:
	adrp	x9, _RMPREADDATA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RMPREADDATA@GOTPAGEOFF]
Lloh5:
	ldr	x0, [x9]
	cmp	x8, x0
	b.le	LBB0_4
; %bb.3:
	bl	_htons
	str	w0, [x20, #24]
LBB0_4:
	ldr	w0, [x20, #20]
	mov	w1, #0
	bl	_GETWORD
	ldr	w0, [x19, #4]
Lloh6:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_lseek
	tbnz	x0, #63, LBB0_11
; %bb.5:
	ldr	w21, [x19, #4]
	add	x22, x19, #56
	ldr	w0, [x20, #24]
	bl	_ntohs
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_read
	mov	x21, x0
	cmp	w0, #0
	b.le	LBB0_13
; %bb.6:
	mov	w23, #0
Lloh9:
	adrp	x8, _RMP_E_OKAY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RMP_E_OKAY@GOTPAGEOFF]
	b	LBB0_15
LBB0_7:
	mov	x0, x20
	bl	_NewConn
	cbz	x0, LBB0_10
; %bb.8:
	mov	x22, x0
Lloh11:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_EnetStr
	mov	x2, x0
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_syslog
	mov	w21, #0
	mov	w23, #1
Lloh16:
	adrp	x8, _RMP_E_ABORT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RMP_E_ABORT@GOTPAGEOFF]
	b	LBB0_16
LBB0_9:
Lloh18:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh20:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_EnetStr
	mov	x2, x0
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_syslog
	mov	w21, #0
	mov	w23, #1
Lloh23:
	adrp	x8, _RMP_E_BADSID@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RMP_E_BADSID@GOTPAGEOFF]
	b	LBB0_15
LBB0_10:
	mov	w20, #0
	b	LBB0_18
LBB0_11:
Lloh25:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh27:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_EnetStr
	mov	x2, x0
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_syslog
	mov	w21, #0
LBB0_12:
	mov	w23, #1
Lloh30:
	adrp	x8, _RMP_E_ABORT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _RMP_E_ABORT@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
	tbnz	w21, #31, LBB0_19
; %bb.14:
	mov	w21, #0
	mov	w23, #1
Lloh32:
	adrp	x8, _RMP_E_EOF@GOTPAGE
Lloh33:
	ldr	x8, [x8, _RMP_E_EOF@GOTPAGEOFF]
LBB0_15:
	mov	x22, x19
LBB0_16:
	ldr	x8, [x8]
	str	x8, [x22, #48]
Lloh34:
	adrp	x8, _RMP_READ_REPL@GOTPAGE
Lloh35:
	ldr	x8, [x8, _RMP_READ_REPL@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	str	w8, [x22, #40]
	ldr	w0, [x20, #20]
	ldr	w1, [x22, #36]
	bl	_COPYWORD
	ldr	w8, [x20, #16]
	str	w8, [x22, #32]
	mov	x0, x21
	bl	_RMPREADSIZE
	str	w0, [x22]
	mov	x0, x22
	bl	_SendPacket
	and	w20, w0, w23
	cbnz	x19, LBB0_18
; %bb.17:
	mov	x0, x22
	bl	_FreeConn
LBB0_18:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_19:
Lloh37:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh39:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_EnetStr
	mov	x2, x0
Lloh40:
	adrp	x1, l_.str.3@PAGE
Lloh41:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	bl	_syslog
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SendReadRepl: no active connection (%s)"

	.comm	_RMP_E_ABORT,8,3                ; @RMP_E_ABORT
	.comm	_RMP_BOOT_REPL,8,3              ; @RMP_BOOT_REPL
l_.str.1:                               ; @.str.1
	.asciz	"SendReadRepl: bad session id (%s)"

	.comm	_RMP_E_BADSID,8,3               ; @RMP_E_BADSID
	.comm	_RMPREADDATA,8,3                ; @RMPREADDATA
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.2:                               ; @.str.2
	.asciz	"SendReadRepl: lseek: %m (%s)"

l_.str.3:                               ; @.str.3
	.asciz	"SendReadRepl: read: %m (%s)"

	.comm	_RMP_E_EOF,8,3                  ; @RMP_E_EOF
	.comm	_RMP_E_OKAY,8,3                 ; @RMP_E_OKAY
	.comm	_RMP_READ_REPL,4,2              ; @RMP_READ_REPL
.subsections_via_symbols
