	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SendBootRepl                   ## -- Begin function SendBootRepl
	.p2align	4, 0x90
_SendBootRepl:                          ## @SendBootRepl
	.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	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_RMPBOOTDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%r13, %rdi
	callq	_FindConn
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %r15
	movq	_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_EnetStr
	leaq	L_.str(%rip), %rsi
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_syslog
	movq	%r15, %rdi
	callq	_RemoveConn
LBB0_2:
	movq	_RMP_BOOT_REPL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r13)
	movl	60(%rbx), %edi
	movl	48(%r13), %esi
	callq	_COPYWORD
	xorl	%eax, %eax
	callq	_GenSessID
	movl	%eax, %edi
	callq	_htons
	movq	%rax, 40(%r13)
	movq	_RMP_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movq	%rax, 32(%r13)
	movq	48(%rbx), %rcx
	movq	%rcx, 8(%r13)
	movq	%r12, %rax
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.3:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	56(%rbx,%rax), %ecx
	movb	%cl, 16(%r13,%rax)
	movb	%cl, (%r12,%rax)
	incq	%rax
	cmpq	48(%rbx), %rax
	jb	LBB0_4
## %bb.5:
	addq	%r12, %rax
LBB0_6:
	movb	$0, (%rax)
	movq	%r12, %rdi
	movl	$47, %esi
	callq	_strrchr
	leaq	1(%rax), %r15
	testq	%rax, %rax
	cmoveq	%r12, %r15
	movq	_C_MAXFILE@GOTPCREL(%rip), %r12
	movq	_RMP_E_NOFILE@GOTPCREL(%rip), %rdi
	cmpq	$0, (%r12)
	je	LBB0_7
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r15, %rdi
	callq	_STREQN
	testq	%rax, %rax
	jne	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	cmpq	(%r12), %rbx
	jb	LBB0_10
LBB0_11:
	xorl	%r14d, %r14d
	leaq	L_.str.3(%rip), %r12
	movq	_RMP_E_NOFILE@GOTPCREL(%rip), %rdi
	jmp	LBB0_19
LBB0_7:
	xorl	%r14d, %r14d
	leaq	L_.str.3(%rip), %r12
	jmp	LBB0_19
LBB0_13:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$384, %edx                      ## imm = 0x180
	callq	_open
	movl	%eax, 4(%r13)
	testl	%eax, %eax
	js	LBB0_15
## %bb.14:
	movl	$1, %r14d
	leaq	L_.str.2(%rip), %r12
	movq	_RMP_E_OKAY@GOTPCREL(%rip), %rdi
	jmp	LBB0_19
LBB0_15:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.16:
	movq	_EMFILE@GOTPCREL(%rip), %rcx
	movq	_ENFILE@GOTPCREL(%rip), %rsi
	movq	_RMP_E_BUSY@GOTPCREL(%rip), %rdx
	movq	%rdx, %rdi
	cmpq	(%rsi), %rax
	movl	$0, %r14d
	leaq	L_.str.3(%rip), %r12
	je	LBB0_18
## %bb.17:
	movq	_RMP_E_OPENFILE@GOTPCREL(%rip), %rdi
LBB0_18:
	cmpq	(%rcx), %rax
	cmoveq	%rdx, %rdi
LBB0_19:
	movq	(%rdi), %rax
	movq	%rax, 24(%r13)
	movq	_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_EnetStr
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	movq	%r15, %rcx
	movq	%r12, %r8
	xorl	%eax, %eax
	callq	_syslog
	movq	8(%r13), %rdi
	callq	_RMPBOOTSIZE
	movl	%eax, (%r13)
	movq	%r13, %rdi
	callq	_SendPacket
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_21
## %bb.20:
	andl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RMPBOOTDATA,4,2                ## @RMPBOOTDATA
	.comm	_LOG_WARNING,4,2                ## @LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: dropping existing connection"

	.comm	_RMP_BOOT_REPL,4,2              ## @RMP_BOOT_REPL
	.comm	_RMP_VERSION,4,2                ## @RMP_VERSION
	.comm	_C_MAXFILE,8,3                  ## @C_MAXFILE
	.comm	_RMP_E_NOFILE,8,3               ## @RMP_E_NOFILE
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_EMFILE,8,3                     ## @EMFILE
	.comm	_ENFILE,8,3                     ## @ENFILE
	.comm	_RMP_E_BUSY,8,3                 ## @RMP_E_BUSY
	.comm	_RMP_E_OPENFILE,8,3             ## @RMP_E_OPENFILE
	.comm	_RMP_E_OKAY,8,3                 ## @RMP_E_OKAY
	.comm	_LOG_INFO,4,2                   ## @LOG_INFO
L_.str.1:                               ## @.str.1
	.asciz	"%s: request to boot %s (%s)"

L_.str.2:                               ## @.str.2
	.asciz	"granted"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SendBootRepl                   ; -- Begin function SendBootRepl
	.p2align	2
_SendBootRepl:                          ; @SendBootRepl
	.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
	sub	sp, sp, #16
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _RMPBOOTDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RMPBOOTDATA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w8, w8, #1
	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	x21, x9, x8
	mov	sp, x21
	mov	x0, x1
	bl	_FindConn
	cbz	x0, LBB0_2
; %bb.1:
	mov	x23, x0
Lloh8:
	adrp	x8, _LOG_WARNING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LOG_WARNING@GOTPAGEOFF]
Lloh10:
	ldr	w24, [x8]
	bl	_EnetStr
	mov	x2, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	bl	_syslog
	mov	x0, x23
	bl	_RemoveConn
LBB0_2:
Lloh13:
	adrp	x8, _RMP_BOOT_REPL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RMP_BOOT_REPL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x19, #52]
	ldr	w0, [x22, #60]
	ldr	w1, [x19, #48]
	bl	_COPYWORD
	bl	_GenSessID
	bl	_htons
	str	x0, [x19, #40]
Lloh16:
	adrp	x8, _RMP_VERSION@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RMP_VERSION@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_htons
	str	x0, [x19, #32]
	ldr	x9, [x22, #48]
	str	x9, [x19, #8]
	mov	x8, x21
	cbz	x9, LBB0_6
; %bb.3:
	mov	x8, #0
	add	x9, x19, #16
	add	x10, x22, #56
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x10, x8]
	strb	w11, [x9, x8]
	strb	w11, [x21, x8]
	add	x8, x8, #1
	ldr	x11, [x22, #48]
	cmp	x8, x11
	b.lo	LBB0_4
; %bb.5:
	add	x8, x21, x8
LBB0_6:
	strb	wzr, [x8]
	mov	x0, x21
	mov	w1, #47
	bl	_strrchr
	cmp	x0, #0
	csinc	x21, x21, x0, eq
Lloh19:
	adrp	x22, _C_MAXFILE@GOTPAGE
Lloh20:
	ldr	x22, [x22, _C_MAXFILE@GOTPAGEOFF]
	ldr	x8, [x22]
	cbz	x8, LBB0_15
; %bb.7:
	mov	x25, #0
Lloh21:
	adrp	x23, l_.str.3@PAGE
Lloh22:
	add	x23, x23, l_.str.3@PAGEOFF
Lloh23:
	adrp	x24, _RMP_E_NOFILE@GOTPAGE
Lloh24:
	ldr	x24, [x24, _RMP_E_NOFILE@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x20, x25, lsl #3]
	cbz	x1, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	bl	_STREQN
	cbnz	x0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x25, x25, #1
	ldr	x8, [x22]
	cmp	x25, x8
	b.lo	LBB0_8
LBB0_11:
	mov	w22, #0
	b	LBB0_16
LBB0_12:
Lloh25:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #384
	bl	_open
	str	w0, [x19, #4]
	tbnz	w0, #31, LBB0_14
; %bb.13:
	mov	w22, #1
Lloh28:
	adrp	x23, l_.str.2@PAGE
Lloh29:
	add	x23, x23, l_.str.2@PAGEOFF
Lloh30:
	adrp	x24, _RMP_E_OKAY@GOTPAGE
Lloh31:
	ldr	x24, [x24, _RMP_E_OKAY@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
Lloh32:
	adrp	x8, _errno@GOTPAGE
Lloh33:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
Lloh35:
	adrp	x9, _ENOENT@GOTPAGE
Lloh36:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
LBB0_15:
	mov	w22, #0
Lloh38:
	adrp	x23, l_.str.3@PAGE
Lloh39:
	add	x23, x23, l_.str.3@PAGEOFF
Lloh40:
	adrp	x24, _RMP_E_NOFILE@GOTPAGE
Lloh41:
	ldr	x24, [x24, _RMP_E_NOFILE@GOTPAGEOFF]
LBB0_16:
	ldr	x8, [x24]
	str	x8, [x19, #24]
Lloh42:
	adrp	x8, _LOG_INFO@GOTPAGE
Lloh43:
	ldr	x8, [x8, _LOG_INFO@GOTPAGEOFF]
Lloh44:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_EnetStr
	mov	x2, x0
	stp	x21, x23, [sp, #-16]!
Lloh45:
	adrp	x1, l_.str.1@PAGE
Lloh46:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_syslog
	add	sp, sp, #16
	ldr	x0, [x19, #8]
	bl	_RMPBOOTSIZE
	str	w0, [x19]
	mov	x0, x19
	bl	_SendPacket
	ldur	x8, [x29, #-72]
Lloh47:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh48:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh49:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.17:
	and	w0, w0, w22
	sub	sp, x29, #64
	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_18:
	mov	w22, #0
Lloh50:
	adrp	x9, _EMFILE@GOTPAGE
Lloh51:
	ldr	x9, [x9, _EMFILE@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
Lloh53:
	adrp	x10, _ENFILE@GOTPAGE
Lloh54:
	ldr	x10, [x10, _ENFILE@GOTPAGEOFF]
Lloh55:
	ldr	x10, [x10]
	cmp	x8, x10
Lloh56:
	adrp	x10, _RMP_E_OPENFILE@GOTPAGE
Lloh57:
	ldr	x10, [x10, _RMP_E_OPENFILE@GOTPAGEOFF]
	ccmp	x8, x9, #4, ne
Lloh58:
	adrp	x8, _RMP_E_BUSY@GOTPAGE
Lloh59:
	ldr	x8, [x8, _RMP_E_BUSY@GOTPAGEOFF]
	csel	x24, x8, x10, eq
Lloh60:
	adrp	x23, l_.str.3@PAGE
Lloh61:
	add	x23, x23, l_.str.3@PAGEOFF
	b	LBB0_16
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_RMPBOOTDATA,4,2                ; @RMPBOOTDATA
	.comm	_LOG_WARNING,4,2                ; @LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: dropping existing connection"

	.comm	_RMP_BOOT_REPL,4,2              ; @RMP_BOOT_REPL
	.comm	_RMP_VERSION,4,2                ; @RMP_VERSION
	.comm	_C_MAXFILE,8,3                  ; @C_MAXFILE
	.comm	_RMP_E_NOFILE,8,3               ; @RMP_E_NOFILE
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_EMFILE,8,3                     ; @EMFILE
	.comm	_ENFILE,8,3                     ; @ENFILE
	.comm	_RMP_E_BUSY,8,3                 ; @RMP_E_BUSY
	.comm	_RMP_E_OPENFILE,8,3             ; @RMP_E_OPENFILE
	.comm	_RMP_E_OKAY,8,3                 ; @RMP_E_OKAY
	.comm	_LOG_INFO,4,2                   ; @LOG_INFO
l_.str.1:                               ; @.str.1
	.asciz	"%s: request to boot %s (%s)"

l_.str.2:                               ; @.str.2
	.asciz	"granted"

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

.subsections_via_symbols
