	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function monitor_read_memory_single
_monitor_read_memory_single:            ## @monitor_read_memory_single
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_monitor_debug
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	testb	$3, %bl
	jne	LBB0_3
## %bb.1:
	cmpl	$4, %r14d
	jl	LBB0_3
## %bb.2:
	movq	_current_monitor@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rdi
	movl	$4, %r15d
	testq	%rdi, %rdi
	jne	LBB0_7
LBB0_3:
	movq	_current_monitor@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testb	$1, -64(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_6
## %bb.4:
	cmpl	$2, %r14d
	jl	LBB0_6
## %bb.5:
	movq	24(%rax), %rdi
	movl	$2, %r15d
	testq	%rdi, %rdi
	jne	LBB0_7
LBB0_6:
	movq	32(%rax), %rdi
	movl	$1, %r15d
LBB0_7:
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_monitor_printf
	movq	_current_monitor@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	cmpq	$0, 56(%rax)
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	callq	_monitor_debug
	movq	_getmem_resp_delim_pattern@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_monitor_expect_regexp
	movq	(%rbx), %rax
LBB0_9:
	movq	_MO_HEX_PREFIX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_15
## %bb.10:
	movq	_timeout@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_readchar
	cmpl	$32, %eax
	je	LBB0_11
## %bb.12:
	cmpl	$48, %eax
	jne	LBB0_14
## %bb.13:
	movl	(%rbx), %edi
	callq	_readchar
	cmpl	$120, %eax
	je	LBB0_15
LBB0_14:
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_monitor_error
LBB0_15:
	movl	%r15d, -68(%rbp)                ## 4-byte Spill
	movl	%r15d, %eax
	addq	%rax, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_timeout@GOTPCREL(%rip), %r13
	leaq	L_.str.2(%rip), %r14
	leaq	L_.str.3(%rip), %r15
	jmp	LBB0_16
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=1
	movb	%r12b, -57(%rbp,%rbx)
	incq	%rbx
	cmpq	-80(%rbp), %rbx                 ## 8-byte Folded Reload
	je	LBB0_20
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	callq	_readchar
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_isxdigit
	testq	%rax, %rax
	jne	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$32, %r12d
	je	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	leaq	-57(%rbp), %r8
	xorl	%r9d, %r9d
	callq	_monitor_error
	jmp	LBB0_16
LBB0_20:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movb	$0, -57(%rbp,%rax)
	movq	_current_monitor@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	48(%rax), %rdi
	testq	%rdi, %rdi
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	leaq	-57(%rbp), %r15
	je	LBB0_23
## %bb.21:
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_monitor_expect
	movq	(%rbx), %rax
	movslq	40(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.22:
	xorl	%eax, %eax
	callq	_monitor_printf
LBB0_23:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_monitor_expect_prompt
LBB0_24:
	movq	%r15, -88(%rbp)
	leaq	-88(%rbp), %rsi
	movq	%r15, %rdi
	movl	$16, %edx
	callq	_strtoul
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_27
## %bb.25:
	cmpq	-88(%rbp), %r15
	jne	LBB0_27
## %bb.26:
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.4(%rip), %rsi
	leaq	-57(%rbp), %r8
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_monitor_error
LBB0_27:
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_store_unsigned_integer
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.28:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MON read single\n"

	.comm	_current_monitor,8,3            ## @current_monitor
L_.str.1:                               ## @.str.1
	.asciz	"EXP getmem.resp_delim\n"

	.comm	_getmem_resp_delim_pattern,4,2  ## @getmem_resp_delim_pattern
	.comm	_MO_HEX_PREFIX,4,2              ## @MO_HEX_PREFIX
	.comm	_timeout,4,2                    ## @timeout
L_.str.2:                               ## @.str.2
	.asciz	"monitor_read_memory_single"

L_.str.3:                               ## @.str.3
	.asciz	"bad response from monitor"

L_.str.4:                               ## @.str.4
	.asciz	"bad value from monitor"

	.no_dead_strip	_monitor_read_memory_single
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function monitor_read_memory_single
_monitor_read_memory_single:            ; @monitor_read_memory_single
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_monitor_debug
Lloh5:
	adrp	x26, _current_monitor@GOTPAGE
Lloh6:
	ldr	x26, [x26, _current_monitor@GOTPAGEOFF]
	tst	w20, #0x3
	b.ne	LBB0_4
; %bb.1:
	cmp	w21, #4
	b.lt	LBB0_4
; %bb.2:
	ldr	x8, [x26]
	ldr	x0, [x8, #16]
	cbz	x0, LBB0_4
; %bb.3:
	mov	w21, #4
	b	LBB0_9
LBB0_4:
	ldr	x8, [x26]
	tbnz	w20, #0, LBB0_8
; %bb.5:
	cmp	w21, #2
	b.lt	LBB0_8
; %bb.6:
	ldr	x0, [x8, #24]
	cbz	x0, LBB0_8
; %bb.7:
	mov	w21, #2
	b	LBB0_9
LBB0_8:
	ldr	x0, [x8, #32]
	mov	w21, #1
LBB0_9:
	str	x20, [sp]
	bl	_monitor_printf
	ldr	x8, [x26]
	ldr	x9, [x8, #56]
	cbz	x9, LBB0_11
; %bb.10:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_monitor_debug
Lloh9:
	adrp	x0, _getmem_resp_delim_pattern@GOTPAGE
Lloh10:
	ldr	x0, [x0, _getmem_resp_delim_pattern@GOTPAGEOFF]
	mov	x1, #0
	mov	w2, #0
	bl	_monitor_expect_regexp
	ldr	x8, [x26]
LBB0_11:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _MO_HEX_PREFIX@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MO_HEX_PREFIX@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x27, _timeout@GOTPAGE
Lloh15:
	ldr	x27, [x27, _timeout@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_16
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x27]
	bl	_readchar
	cmp	w0, #32
	b.eq	LBB0_12
; %bb.13:
	cmp	w0, #48
	b.ne	LBB0_15
; %bb.14:
	ldr	w0, [x27]
	bl	_readchar
	cmp	w0, #120
	b.eq	LBB0_16
LBB0_15:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	mov	w3, #0
	mov	x4, #0
	mov	w5, #0
	bl	_monitor_error
LBB0_16:
	mov	x22, #0
	mov	w8, w21
	lsl	x28, x8, #1
Lloh20:
	adrp	x23, l_.str.2@PAGE
Lloh21:
	add	x23, x23, l_.str.2@PAGEOFF
Lloh22:
	adrp	x24, l_.str.3@PAGE
Lloh23:
	add	x24, x24, l_.str.3@PAGEOFF
	add	x19, sp, #31
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	strb	w25, [x19, x22]
	add	x22, x22, #1
	cmp	x22, x28
	b.eq	LBB0_21
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x27]
	bl	_readchar
	mov	x25, x0
	bl	_isxdigit
	cbnz	x0, LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	cmp	w25, #32
	b.eq	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	add	x4, sp, #31
	mov	x0, x23
	mov	x1, x24
	mov	x2, x20
	mov	x3, x22
	mov	w5, #0
	bl	_monitor_error
	b	LBB0_18
LBB0_21:
	add	x8, sp, #31
	strb	wzr, [x8, x28]
	ldr	x8, [x26]
	ldr	x0, [x8, #48]
	cbz	x0, LBB0_24
; %bb.22:
	mov	x1, #0
	mov	w2, #0
	bl	_monitor_expect
	ldr	x8, [x26]
	ldrsw	x0, [x8, #40]
	cbz	w0, LBB0_25
; %bb.23:
	bl	_monitor_printf
LBB0_24:
	mov	x0, #0
	mov	w1, #0
	bl	_monitor_expect_prompt
LBB0_25:
	add	x19, sp, #31
	str	x19, [sp, #16]
	add	x0, sp, #31
	add	x1, sp, #16
	mov	w2, #16
	bl	_strtoul
	mov	x22, x0
	cbnz	w0, LBB0_28
; %bb.26:
	ldr	x8, [sp, #16]
	cmp	x19, x8
	b.ne	LBB0_28
; %bb.27:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x4, sp, #31
	mov	x2, x20
	mov	w3, #0
	mov	w5, #0
	bl	_monitor_error
LBB0_28:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x21
	mov	x2, x22
	bl	_store_unsigned_integer
	ldr	x8, [sp, #40]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.29:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_30:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MON read single\n"

	.comm	_current_monitor,8,3            ; @current_monitor
l_.str.1:                               ; @.str.1
	.asciz	"EXP getmem.resp_delim\n"

	.comm	_getmem_resp_delim_pattern,4,2  ; @getmem_resp_delim_pattern
	.comm	_MO_HEX_PREFIX,4,2              ; @MO_HEX_PREFIX
	.comm	_timeout,4,2                    ; @timeout
l_.str.2:                               ; @.str.2
	.asciz	"monitor_read_memory_single"

l_.str.3:                               ; @.str.3
	.asciz	"bad response from monitor"

l_.str.4:                               ; @.str.4
	.asciz	"bad value from monitor"

	.no_dead_strip	_monitor_read_memory_single
.subsections_via_symbols
