	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function monitor_read_memory
_monitor_read_memory:                   ## @monitor_read_memory
	.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	$568, %rsp                      ## imm = 0x238
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testl	%edx, %edx
	jle	LBB0_1
## %bb.2:
	movl	%edx, %ebx
	movq	%rsi, %r13
	movl	%edi, %r12d
	callq	_paddr_nz
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movq	%r13, %rdx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_monitor_debug
	movq	_current_monitor@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	(%rax), %eax
	movq	_MO_ADDR_BITS_REMOVE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movl	%r12d, %edi
	callq	_ADDR_BITS_REMOVE
	movl	%eax, %r12d
	movq	(%r15), %rax
	movl	(%rax), %eax
LBB0_4:
	movq	_MO_GETMEM_READ_SINGLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_60
## %bb.6:
	movl	%r12d, %edi
	movq	%r13, %rsi
	movl	%ebx, %edx
	addq	$568, %rsp                      ## imm = 0x238
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_monitor_read_memory_single     ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_monitor_debug
LBB0_58:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_60
## %bb.59:
	movl	%r14d, %eax
	addq	$568, %rsp                      ## imm = 0x238
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%ebx, %edi
	movl	$16, %esi
	callq	_min
                                        ## kill: def $eax killed $eax def $rax
	movq	(%r15), %rcx
	movl	(%rcx), %ebx
	movq	_MO_EXACT_DUMPADDR@GOTPCREL(%rip), %rsi
	movl	%r12d, %edx
	andl	$-16, %edx
	testl	%ebx, (%rsi)
	cmovnel	%r12d, %edx
	movl	%edx, -576(%rbp)                ## 4-byte Spill
	leal	(%rax,%r12), %edx
	leal	(%rax,%r12), %esi
	decl	%esi
	xorl	%r12d, %esi
	andl	$-16, %edx
	subl	%r12d, %edx
	cmpl	$16, %esi
	cmovbl	%eax, %edx
	movq	_MO_GETMEM_NEEDS_RANGE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	movq	%rdx, -584(%rbp)                ## 8-byte Spill
	je	LBB0_9
## %bb.8:
	movl	32(%rcx), %edi
	addl	%r12d, %edx
	movl	%r12d, %esi
LBB0_12:
	xorl	%eax, %eax
	callq	_monitor_printf
	jmp	LBB0_13
LBB0_9:
	movq	_MO_GETMEM_16_BOUNDARY@GOTPCREL(%rip), %rax
	movl	32(%rcx), %edi
	testl	%ebx, (%rax)
	je	LBB0_11
## %bb.10:
	movl	-576(%rbp), %esi                ## 4-byte Reload
	xorl	%eax, %eax
	callq	_monitor_printf
LBB0_13:
	movq	(%r15), %rax
	movq	24(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.14:
	leaq	-560(%rbp), %rsi
	movl	$512, %edx                      ## imm = 0x200
	callq	_monitor_expect
	movl	%eax, -564(%rbp)                ## 4-byte Spill
	testl	%eax, %eax
	jg	LBB0_16
## %bb.15:
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.3(%rip), %rsi
	leaq	-560(%rbp), %r8
	movl	%r12d, %edx
	movl	-564(%rbp), %ecx                ## 4-byte Reload
	xorl	%r9d, %r9d
	callq	_monitor_error
LBB0_16:
	movq	(%r15), %rax
	movq	8(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_19
## %bb.17:
	movq	_monitor_desc@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_strlen
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_serial_write
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_monitor_expect_prompt
	jmp	LBB0_19
LBB0_18:
	leaq	-560(%rbp), %rdi
	movl	$512, %esi                      ## imm = 0x200
	callq	_monitor_expect_prompt
	movl	%eax, -564(%rbp)                ## 4-byte Spill
LBB0_19:
	movq	-584(%rbp), %rbx                ## 8-byte Reload
	movq	(%r15), %rax
	movq	16(%rax), %rsi
	testq	%rsi, %rsi
	movq	%r12, -592(%rbp)                ## 8-byte Spill
	je	LBB0_20
## %bb.21:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_monitor_debug
	leaq	-600(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	leaq	-560(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	_getmem_resp_delim_pattern@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movl	%eax, %r8d
	movq	%r14, %r9
	callq	_re_search
	testl	%eax, %eax
	jns	LBB0_23
## %bb.22:
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.5(%rip), %rsi
	leaq	-560(%rbp), %r8
	movl	%r12d, %edx
	movl	-564(%rbp), %ecx                ## 4-byte Reload
	xorl	%r9d, %r9d
	callq	_monitor_error
LBB0_23:
	movq	-600(%rbp), %rax
	movslq	(%rax), %rax
	leaq	(%rax,%rbp), %r12
	addq	$-560, %r12                     ## imm = 0xFDD0
	movq	-584(%rbp), %rbx                ## 8-byte Reload
	jmp	LBB0_24
LBB0_20:
	leaq	-560(%rbp), %r12
LBB0_24:
	leaq	L_.str.6(%rip), %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_monitor_debug
	movq	(%r15), %rax
	movq	_MO_GETMEM_16_BOUNDARY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_44
## %bb.25:
	movb	(%r12), %al
	cmpb	$13, %al
	je	LBB0_41
## %bb.26:
	testb	%al, %al
	je	LBB0_41
## %bb.27:
	cmpb	$10, %al
	je	LBB0_41
## %bb.28:
	movq	%rbx, %r15
	testl	%r15d, %r15d
	jle	LBB0_41
## %bb.29:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movsbl	%al, %ebx
	movl	%ebx, %edi
	callq	_isxdigit
	testq	%rax, %rax
	je	LBB0_36
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=1
	movl	-576(%rbp), %eax                ## 4-byte Reload
	cmpl	-592(%rbp), %eax                ## 4-byte Folded Reload
	jl	LBB0_35
## %bb.32:                              ##   in Loop: Header=BB0_30 Depth=1
	movl	%ebx, %edi
	callq	_fromhex
	movl	%eax, %ebx
	shll	$4, %ebx
	movsbl	1(%r12), %edi
	callq	_fromhex
	addl	%ebx, %eax
	movb	%al, (%r13)
	movq	_monitor_debug_p@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_remote_debug@GOTPCREL(%rip), %rdx
	orq	(%rdx), %rcx
	je	LBB0_34
## %bb.33:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	_gdb_stdlog@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.7(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf_unfiltered
LBB0_34:                                ##   in Loop: Header=BB0_30 Depth=1
	incq	%r13
	decl	%r15d
	incl	%r14d
LBB0_35:                                ##   in Loop: Header=BB0_30 Depth=1
	incl	-576(%rbp)                      ## 4-byte Folded Spill
	incq	%r12
LBB0_36:                                ##   in Loop: Header=BB0_30 Depth=1
	movzbl	1(%r12), %eax
	cmpb	$13, %al
	je	LBB0_40
## %bb.37:                              ##   in Loop: Header=BB0_30 Depth=1
	testb	%al, %al
	je	LBB0_40
## %bb.38:                              ##   in Loop: Header=BB0_30 Depth=1
	cmpb	$10, %al
	je	LBB0_40
## %bb.39:                              ##   in Loop: Header=BB0_30 Depth=1
	incq	%r12
	testl	%r15d, %r15d
	jg	LBB0_30
LBB0_40:
	testl	%r14d, %r14d
	jne	LBB0_42
LBB0_41:
	leaq	L_.str.8(%rip), %rdi
	callq	_error
	xorl	%r14d, %r14d
LBB0_42:
	movq	_monitor_debug_p@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_remote_debug@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	je	LBB0_58
## %bb.43:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.9(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf_unfiltered
	jmp	LBB0_58
LBB0_44:
	leaq	L_.str.10(%rip), %rdi
	xorl	%eax, %eax
	callq	_monitor_debug
	testl	%ebx, %ebx
	jle	LBB0_45
## %bb.46:
	movq	%r13, -576(%rbp)                ## 8-byte Spill
	movl	%ebx, %r13d
	movl	-564(%rbp), %ebx                ## 4-byte Reload
	jmp	LBB0_47
	.p2align	4, 0x90
LBB0_56:                                ##   in Loop: Header=BB0_47 Depth=1
	movq	-576(%rbp), %rax                ## 8-byte Reload
	movb	%r14b, (%rax)
	incq	%rax
	movq	%rax, -576(%rbp)                ## 8-byte Spill
	leal	-1(%r13), %eax
	cmpl	$1, %r13d
	movl	%eax, %r13d
	jle	LBB0_57
LBB0_47:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_49 Depth 2
	movsbl	(%r12), %edi
	callq	_isxdigit
	movq	%r12, %r15
	testq	%rax, %rax
	je	LBB0_48
LBB0_53:                                ##   in Loop: Header=BB0_47 Depth=1
	movq	%r15, %rdi
	leaq	-600(%rbp), %rsi
	movl	$16, %edx
	callq	_strtoul
	movl	%eax, %r14d
	movq	-600(%rbp), %r12
	testl	%eax, %eax
	jne	LBB0_56
## %bb.54:                              ##   in Loop: Header=BB0_47 Depth=1
	cmpq	%r12, %r15
	jne	LBB0_56
## %bb.55:                              ##   in Loop: Header=BB0_47 Depth=1
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.12(%rip), %rsi
	movq	-592(%rbp), %rdx                ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	-564(%rbp), %ecx                ## 4-byte Reload
	leaq	-560(%rbp), %r8
	xorl	%r9d, %r9d
	callq	_monitor_error
	jmp	LBB0_56
	.p2align	4, 0x90
LBB0_48:                                ##   in Loop: Header=BB0_47 Depth=1
	movq	-592(%rbp), %r14                ## 8-byte Reload
	movl	$9217, %r12d                    ## imm = 0x2401
	jmp	LBB0_49
	.p2align	4, 0x90
LBB0_52:                                ##   in Loop: Header=BB0_49 Depth=2
	movsbl	1(%r15), %edi
	incq	%r15
	callq	_isxdigit
	testq	%rax, %rax
	jne	LBB0_53
LBB0_49:                                ##   Parent Loop BB0_47 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%r15), %eax
	cmpq	$13, %rax
	ja	LBB0_52
## %bb.50:                              ##   in Loop: Header=BB0_49 Depth=2
	btq	%rax, %r12
	jae	LBB0_52
## %bb.51:                              ##   in Loop: Header=BB0_49 Depth=2
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.11(%rip), %rsi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	leaq	-560(%rbp), %r8
	xorl	%r9d, %r9d
	callq	_monitor_error
	jmp	LBB0_52
LBB0_57:
	movq	-584(%rbp), %rax                ## 8-byte Reload
	movl	%eax, %r14d
	jmp	LBB0_58
LBB0_11:
	movl	%r12d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	jmp	LBB0_12
LBB0_45:
	movl	%ebx, %r14d
	jmp	LBB0_58
LBB0_60:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Zero length call to monitor_read_memory\n"

L_.str.1:                               ## @.str.1
	.asciz	"MON read block ta(%s) ha(%lx) %d\n"

	.comm	_current_monitor,8,3            ## @current_monitor
	.comm	_MO_ADDR_BITS_REMOVE,4,2        ## @MO_ADDR_BITS_REMOVE
	.comm	_MO_GETMEM_READ_SINGLE,4,2      ## @MO_GETMEM_READ_SINGLE
	.comm	_MO_EXACT_DUMPADDR,4,2          ## @MO_EXACT_DUMPADDR
	.comm	_MO_GETMEM_NEEDS_RANGE,4,2      ## @MO_GETMEM_NEEDS_RANGE
	.comm	_MO_GETMEM_16_BOUNDARY,4,2      ## @MO_GETMEM_16_BOUNDARY
L_.str.2:                               ## @.str.2
	.asciz	"monitor_read_memory"

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

	.comm	_monitor_desc,4,2               ## @monitor_desc
L_.str.4:                               ## @.str.4
	.asciz	"MON getmem.resp_delim %s\n"

	.comm	_getmem_resp_delim_pattern,4,2  ## @getmem_resp_delim_pattern
L_.str.5:                               ## @.str.5
	.asciz	"bad response from monitor"

L_.str.6:                               ## @.str.6
	.asciz	"MON scanning  %d ,%lx '%s'\n"

	.comm	_monitor_debug_p,8,3            ## @monitor_debug_p
	.comm	_remote_debug,8,3               ## @remote_debug
	.comm	_gdb_stdlog,4,2                 ## @gdb_stdlog
L_.str.7:                               ## @.str.7
	.asciz	"[%02x]"

L_.str.8:                               ## @.str.8
	.asciz	"Failed to read via monitor"

L_.str.9:                               ## @.str.9
	.asciz	"\n"

L_.str.10:                              ## @.str.10
	.asciz	"MON scanning bytes\n"

L_.str.11:                              ## @.str.11
	.asciz	"badly terminated response from monitor"

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

	.no_dead_strip	_monitor_read_memory
.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
_monitor_read_memory:                   ; @monitor_read_memory
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #576
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	cmp	w2, #0
	b.le	LBB0_6
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_paddr_nz
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x21, [sp, #8]
	str	x0, [sp]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_monitor_debug
Lloh5:
	adrp	x25, _current_monitor@GOTPAGE
Lloh6:
	ldr	x25, [x25, _current_monitor@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _MO_ADDR_BITS_REMOVE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MO_ADDR_BITS_REMOVE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_ADDR_BITS_REMOVE
	mov	x20, x0
	ldr	x8, [x25]
	ldr	w8, [x8]
LBB0_3:
Lloh10:
	adrp	x9, _MO_GETMEM_READ_SINGLE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MO_GETMEM_READ_SINGLE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.4:
	ldur	x8, [x29, #-96]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_55
; %bb.5:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	add	sp, sp, #576
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_monitor_read_memory_single
LBB0_6:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_monitor_debug
	mov	w22, #0
LBB0_7:
	ldur	x8, [x29, #-96]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_55
; %bb.8:
	mov	x0, x22
	add	sp, sp, #576
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x21
	mov	w1, #16
	bl	_min
	ldr	x8, [x25]
Lloh21:
	adrp	x10, _MO_EXACT_DUMPADDR@GOTPAGE
Lloh22:
	ldr	x10, [x10, _MO_EXACT_DUMPADDR@GOTPAGEOFF]
	ldr	w9, [x8]
Lloh23:
	ldr	w10, [x10]
	and	w11, w20, #0xfffffff0
	tst	w10, w9
	csel	w21, w11, w20, eq
	add	w10, w0, w20
	sub	w11, w10, #1
	eor	w11, w11, w20
	and	w10, w10, #0xfffffff0
	sub	w10, w10, w20
	cmp	w11, #16
	csel	w27, w0, w10, lo
Lloh24:
	adrp	x10, _MO_GETMEM_NEEDS_RANGE@GOTPAGE
Lloh25:
	ldr	x10, [x10, _MO_GETMEM_NEEDS_RANGE@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
Lloh27:
	adrp	x26, _MO_GETMEM_16_BOUNDARY@GOTPAGE
Lloh28:
	ldr	x26, [x26, _MO_GETMEM_16_BOUNDARY@GOTPAGEOFF]
	tst	w10, w9
	str	w20, [sp, #36]                  ; 4-byte Folded Spill
	b.eq	LBB0_11
; %bb.10:
	ldr	w0, [x8, #32]
	add	w8, w27, w20
	str	x8, [sp]
	mov	x1, x20
	b	LBB0_14
LBB0_11:
	ldr	w10, [x26]
	ldr	w0, [x8, #32]
	tst	w10, w9
	b.eq	LBB0_13
; %bb.12:
	mov	x1, x21
	b	LBB0_14
LBB0_13:
	mov	x8, x27
	str	x8, [sp]
	ldr	w1, [sp, #36]                   ; 4-byte Folded Reload
LBB0_14:
	bl	_monitor_printf
	ldr	x8, [x25]
	ldr	x0, [x8, #24]
	cbz	x0, LBB0_19
; %bb.15:
	add	x1, sp, #48
	mov	w2, #512
	bl	_monitor_expect
	mov	x22, x0
	cmp	w0, #0
	b.gt	LBB0_17
; %bb.16:
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x4, sp, #48
	ldr	w2, [sp, #36]                   ; 4-byte Folded Reload
	mov	x3, x22
	mov	w5, #0
	bl	_monitor_error
LBB0_17:
	ldr	x8, [x25]
	ldr	x23, [x8, #8]
	cbz	x23, LBB0_20
; %bb.18:
Lloh33:
	adrp	x8, _monitor_desc@GOTPAGE
Lloh34:
	ldr	x8, [x8, _monitor_desc@GOTPAGEOFF]
Lloh35:
	ldr	w24, [x8]
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	mov	x0, x24
	mov	x1, x23
	bl	_serial_write
	mov	x0, #0
	mov	w1, #0
	bl	_monitor_expect_prompt
	b	LBB0_20
LBB0_19:
	add	x0, sp, #48
	mov	w1, #512
	bl	_monitor_expect_prompt
	mov	x22, x0
LBB0_20:
	ldr	x8, [x25]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_24
; %bb.21:
	str	x8, [sp]
Lloh36:
	adrp	x0, l_.str.4@PAGE
Lloh37:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_monitor_debug
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	x23, sp, #48
	add	x0, sp, #48
	bl	_strlen
	mov	x2, x0
Lloh38:
	adrp	x0, _getmem_resp_delim_pattern@GOTPAGE
Lloh39:
	ldr	x0, [x0, _getmem_resp_delim_pattern@GOTPAGEOFF]
	add	x1, sp, #48
	add	x5, sp, #40
	mov	w3, #0
	mov	x4, x2
	bl	_re_search
	tbz	w0, #31, LBB0_23
; %bb.22:
Lloh40:
	adrp	x0, l_.str.2@PAGE
Lloh41:
	add	x0, x0, l_.str.2@PAGEOFF
Lloh42:
	adrp	x1, l_.str.5@PAGE
Lloh43:
	add	x1, x1, l_.str.5@PAGEOFF
	add	x4, sp, #48
	ldr	w2, [sp, #36]                   ; 4-byte Folded Reload
	mov	x3, x22
	mov	w5, #0
	bl	_monitor_error
LBB0_23:
	ldr	x8, [sp, #40]
	ldrsw	x8, [x8]
	add	x23, x23, x8
	b	LBB0_25
LBB0_24:
	add	x23, sp, #48
LBB0_25:
	stp	x23, x23, [sp, #8]
	str	x27, [sp]
Lloh44:
	adrp	x0, l_.str.6@PAGE
Lloh45:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_monitor_debug
	ldr	x8, [x25]
	ldr	w8, [x8]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_38
; %bb.26:
	ldrb	w8, [x23]
Lloh46:
	adrp	x26, _monitor_debug_p@GOTPAGE
Lloh47:
	ldr	x26, [x26, _monitor_debug_p@GOTPAGEOFF]
Lloh48:
	adrp	x28, _remote_debug@GOTPAGE
Lloh49:
	ldr	x28, [x28, _remote_debug@GOTPAGEOFF]
	cmp	w8, #13
	b.eq	LBB0_50
; %bb.27:
	cbz	w8, LBB0_50
; %bb.28:
	cmp	w8, #10
	b.eq	LBB0_50
; %bb.29:
	cmp	w27, #1
	b.lt	LBB0_50
; %bb.30:
	mov	w22, #0
Lloh50:
	adrp	x20, _gdb_stdlog@GOTPAGE
Lloh51:
	ldr	x20, [x20, _gdb_stdlog@GOTPAGEOFF]
Lloh52:
	adrp	x24, l_.str.7@PAGE
Lloh53:
	add	x24, x24, l_.str.7@PAGEOFF
	b	LBB0_34
LBB0_31:                                ;   in Loop: Header=BB0_34 Depth=1
	sub	w27, w27, #1
	add	w22, w22, #1
LBB0_32:                                ;   in Loop: Header=BB0_34 Depth=1
	add	w21, w21, #1
	add	x23, x23, #1
LBB0_33:                                ;   in Loop: Header=BB0_34 Depth=1
	ldrb	w8, [x23, #1]!
	cmp	w8, #13
	ccmp	w8, #0, #4, ne
	ccmp	w8, #10, #4, ne
	ccmp	w27, #0, #4, ne
	b.le	LBB0_49
LBB0_34:                                ; =>This Inner Loop Header: Depth=1
	sxtb	w25, w8
	mov	x0, x25
	bl	_isxdigit
	cbz	x0, LBB0_33
; %bb.35:                               ;   in Loop: Header=BB0_34 Depth=1
	ldr	w8, [sp, #36]                   ; 4-byte Folded Reload
	cmp	w21, w8
	b.lt	LBB0_32
; %bb.36:                               ;   in Loop: Header=BB0_34 Depth=1
	mov	x0, x25
	bl	_fromhex
	mov	x25, x0
	ldrsb	w0, [x23, #1]
	bl	_fromhex
	add	w8, w0, w25, lsl #4
	strb	w8, [x19], #1
	ldr	x9, [x26]
	ldr	x10, [x28]
	orr	x9, x9, x10
	cbz	x9, LBB0_31
; %bb.37:                               ;   in Loop: Header=BB0_34 Depth=1
	ldr	w0, [x20]
	str	x8, [sp]
	mov	x1, x24
	bl	_fprintf_unfiltered
	b	LBB0_31
LBB0_38:
Lloh54:
	adrp	x0, l_.str.10@PAGE
Lloh55:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_monitor_debug
	cmp	w27, #1
	b.lt	LBB0_54
; %bb.39:
	mov	x20, x19
	mov	w28, #1
Lloh56:
	adrp	x21, l_.str.2@PAGE
Lloh57:
	add	x21, x21, l_.str.2@PAGEOFF
	mov	w25, #9217
Lloh58:
	adrp	x24, l_.str.11@PAGE
Lloh59:
	add	x24, x24, l_.str.11@PAGEOFF
	str	x27, [sp, #24]                  ; 8-byte Folded Spill
                                        ; kill: def $w27 killed $w27 killed $x27
	b	LBB0_41
LBB0_40:                                ;   in Loop: Header=BB0_41 Depth=1
	strb	w26, [x20], #1
	mov	x23, x19
	subs	w27, w27, #1
	b.le	LBB0_53
LBB0_41:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_47 Depth 2
	ldrsb	w0, [x23]
	bl	_isxdigit
	cbz	x0, LBB0_45
LBB0_42:                                ;   in Loop: Header=BB0_41 Depth=1
	add	x1, sp, #40
	mov	x0, x23
	mov	w2, #16
	bl	_strtoul
	mov	x26, x0
	ldr	x19, [sp, #40]
	cbnz	w0, LBB0_40
; %bb.43:                               ;   in Loop: Header=BB0_41 Depth=1
	cmp	x23, x19
	b.ne	LBB0_40
; %bb.44:                               ;   in Loop: Header=BB0_41 Depth=1
	add	x4, sp, #48
	mov	x0, x21
Lloh60:
	adrp	x1, l_.str.12@PAGE
Lloh61:
	add	x1, x1, l_.str.12@PAGEOFF
	ldr	w2, [sp, #36]                   ; 4-byte Folded Reload
	mov	x3, x22
	mov	w5, #0
	bl	_monitor_error
	b	LBB0_40
LBB0_45:                                ;   in Loop: Header=BB0_41 Depth=1
	ldr	w19, [sp, #36]                  ; 4-byte Folded Reload
	b	LBB0_47
LBB0_46:                                ;   in Loop: Header=BB0_47 Depth=2
	ldrsb	w0, [x23, #1]!
	bl	_isxdigit
	cbnz	x0, LBB0_42
LBB0_47:                                ;   Parent Loop BB0_41 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w8, [x23]
	cmp	w8, #13
	lsl	w8, w28, w8
	and	w8, w8, w25
	ccmp	w8, #0, #4, ls
	b.eq	LBB0_46
; %bb.48:                               ;   in Loop: Header=BB0_47 Depth=2
	add	x4, sp, #48
	mov	x0, x21
	mov	x1, x24
	mov	x2, x19
	mov	x3, x22
	mov	w5, #0
	bl	_monitor_error
	b	LBB0_46
LBB0_49:
	cbnz	w22, LBB0_51
LBB0_50:
Lloh62:
	adrp	x0, l_.str.8@PAGE
Lloh63:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_error
	mov	w22, #0
LBB0_51:
	ldr	x8, [x26]
	ldr	x9, [x28]
	orr	x8, x8, x9
	cbz	x8, LBB0_7
; %bb.52:
Lloh64:
	adrp	x8, _gdb_stdlog@GOTPAGE
Lloh65:
	ldr	x8, [x8, _gdb_stdlog@GOTPAGEOFF]
Lloh66:
	ldr	w0, [x8]
Lloh67:
	adrp	x1, l_.str.9@PAGE
Lloh68:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_fprintf_unfiltered
	b	LBB0_7
LBB0_53:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	mov	x22, x8
	b	LBB0_7
LBB0_54:
	mov	x22, x27
	b	LBB0_7
LBB0_55:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Zero length call to monitor_read_memory\n"

l_.str.1:                               ; @.str.1
	.asciz	"MON read block ta(%s) ha(%lx) %d\n"

	.comm	_current_monitor,8,3            ; @current_monitor
	.comm	_MO_ADDR_BITS_REMOVE,4,2        ; @MO_ADDR_BITS_REMOVE
	.comm	_MO_GETMEM_READ_SINGLE,4,2      ; @MO_GETMEM_READ_SINGLE
	.comm	_MO_EXACT_DUMPADDR,4,2          ; @MO_EXACT_DUMPADDR
	.comm	_MO_GETMEM_NEEDS_RANGE,4,2      ; @MO_GETMEM_NEEDS_RANGE
	.comm	_MO_GETMEM_16_BOUNDARY,4,2      ; @MO_GETMEM_16_BOUNDARY
l_.str.2:                               ; @.str.2
	.asciz	"monitor_read_memory"

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

	.comm	_monitor_desc,4,2               ; @monitor_desc
l_.str.4:                               ; @.str.4
	.asciz	"MON getmem.resp_delim %s\n"

	.comm	_getmem_resp_delim_pattern,4,2  ; @getmem_resp_delim_pattern
l_.str.5:                               ; @.str.5
	.asciz	"bad response from monitor"

l_.str.6:                               ; @.str.6
	.asciz	"MON scanning  %d ,%lx '%s'\n"

	.comm	_monitor_debug_p,8,3            ; @monitor_debug_p
	.comm	_remote_debug,8,3               ; @remote_debug
	.comm	_gdb_stdlog,4,2                 ; @gdb_stdlog
l_.str.7:                               ; @.str.7
	.asciz	"[%02x]"

l_.str.8:                               ; @.str.8
	.asciz	"Failed to read via monitor"

l_.str.9:                               ; @.str.9
	.asciz	"\n"

l_.str.10:                              ; @.str.10
	.asciz	"MON scanning bytes\n"

l_.str.11:                              ; @.str.11
	.asciz	"badly terminated response from monitor"

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

	.no_dead_strip	_monitor_read_memory
.subsections_via_symbols
