	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function monitor_rcmd
_monitor_rcmd:                          ## @monitor_rcmd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$1008, %rsp                     ## imm = 0x3F0
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_monitor_desc@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_error
LBB0_2:
	testq	%rbx, %rbx
	leaq	L_.str.2(%rip), %rsi
	cmovneq	%rbx, %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_monitor_printf
	leaq	-1024(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_monitor_expect_prompt
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_fputs_unfiltered
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	addq	$1008, %rsp                     ## imm = 0x3F0
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_monitor_desc,8,3               ## @monitor_desc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"monitor target not open."

	.comm	_current_monitor,8,3            ## @current_monitor
L_.str.1:                               ## @.str.1
	.asciz	"%s\r"

L_.str.2:                               ## @.str.2
	.space	1

	.no_dead_strip	_monitor_rcmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function monitor_rcmd
_monitor_rcmd:                          ; @monitor_rcmd
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -40
	.cfi_offset w28, -48
	sub	sp, sp, #1008
	mov	x19, x1
	mov	x20, x0
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, _monitor_desc@GOTPAGE
Lloh4:
	ldr	x8, [x8, _monitor_desc@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
LBB0_2:
Lloh8:
	adrp	x8, l_.str.2@PAGE
Lloh9:
	add	x8, x8, l_.str.2@PAGEOFF
	cmp	x20, #0
	csel	x1, x8, x20, eq
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_monitor_printf
	mov	x0, sp
	mov	w1, #1000
	bl	_monitor_expect_prompt
	mov	x0, sp
	mov	x1, x19
	bl	_fputs_unfiltered
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	add	sp, sp, #1008
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_monitor_desc,8,3               ; @monitor_desc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"monitor target not open."

	.comm	_current_monitor,8,3            ; @current_monitor
l_.str.1:                               ; @.str.1
	.asciz	"%s\r"

l_.str.2:                               ; @.str.2
	.space	1

	.no_dead_strip	_monitor_rcmd
.subsections_via_symbols
