	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function monitor_fetch_register
_monitor_fetch_register:                ## @monitor_fetch_register
	.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
	movl	%edi, %r15d
	movq	_MAX_REGISTER_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	leal	(%rax,%rax), %edi
	incl	%edi
	callq	_alloca
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_alloca
	movq	%rax, %r12
	movl	(%rbx), %edx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_current_monitor@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movq	(%rcx), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	%r15d, %edi
	callq	*%rax
	movq	%rax, %rbx
	jmp	LBB0_3
LBB0_2:
	movq	8(%rcx), %rax
	movslq	%r15d, %rcx
	movq	(%rax,%rcx,8), %rbx
LBB0_3:
	testq	%rbx, %rbx
	leaq	L_.str.1(%rip), %rdx
	cmovneq	%rbx, %rdx
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_monitor_debug
	testq	%rbx, %rbx
	je	LBB0_31
## %bb.4:
	cmpb	$0, (%rbx)
	je	LBB0_31
## %bb.5:
	movq	(%r13), %rax
	movslq	48(%rax), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_monitor_printf
	movq	(%r13), %rax
	cmpq	$0, 40(%rax)
	je	LBB0_10
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_monitor_debug
	movq	(%r13), %rax
	movq	40(%rax), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_monitor_expect
	movq	(%r13), %rax
	movq	_MO_32_REGS_PAIRED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 16(%rax)
	je	LBB0_10
## %bb.7:
	cmpl	$31, %r15d
	jg	LBB0_10
## %bb.8:
	movl	%r15d, %ecx
	andl	$1, %ecx
	je	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_monitor_debug
	movq	(%r13), %rax
	movq	40(%rax), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_monitor_expect
	movq	(%r13), %rax
LBB0_10:
	movq	_MO_HEX_PREFIX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 16(%rax)
	je	LBB0_16
## %bb.11:
	movq	_timeout@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_readchar
	cmpl	$32, %eax
	je	LBB0_12
## %bb.13:
	cmpl	$48, %eax
	jne	LBB0_15
## %bb.14:
	movl	(%rbx), %edi
	callq	_readchar
	cmpl	$120, %eax
	je	LBB0_16
LBB0_15:
	leaq	L_.str.4(%rip), %rdi
	movl	%r15d, %esi
	callq	_error
LBB0_16:
	movl	%r15d, %edi
	callq	_DEPRECATED_REGISTER_RAW_SIZE
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jle	LBB0_23
## %bb.17:
	movq	_timeout@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_18:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
	movl	(%r13), %edi
	callq	_readchar
	movl	%eax, %ebx
	cmpl	$32, %eax
	jne	LBB0_21
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %edi
	callq	_readchar
	cmpl	$32, %eax
	je	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	%eax, %ebx
LBB0_21:                                ##   in Loop: Header=BB0_18 Depth=1
	movl	%ebx, %edi
	callq	_isxdigit
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_18 Depth=1
	movb	%bl, (%r14,%r12)
	incq	%r12
	movl	%r15d, %edi
	callq	_DEPRECATED_REGISTER_RAW_SIZE
	addl	%eax, %eax
	cltq
	cmpq	%rax, %r12
	jl	LBB0_18
LBB0_23:
	movl	%r12d, %eax
	movb	$0, (%r14,%rax)
	leaq	L_.str.5(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_monitor_debug
	movq	_current_monitor@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	cmpq	$0, 32(%rax)
	je	LBB0_25
## %bb.24:
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_monitor_debug
	movq	(%rbx), %rax
	movq	32(%rax), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_monitor_expect
	movq	(%rbx), %rax
LBB0_25:
	cmpq	$0, 24(%rax)
	je	LBB0_27
## %bb.26:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_monitor_debug
	movq	(%rbx), %rax
	movq	24(%rax), %rdi
	xorl	%eax, %eax
	callq	_monitor_printf
	movq	(%rbx), %rax
LBB0_27:
	cmpq	$0, 32(%rax)
	je	LBB0_29
## %bb.28:
	cmpq	$0, 24(%rax)
	je	LBB0_30
LBB0_29:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_monitor_expect_prompt
LBB0_30:
	movl	%r15d, %edi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_monitor_supply_register        ## TAILCALL
LBB0_31:
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_monitor_debug
	movl	%r15d, %edi
	movq	%r12, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_supply_register                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_REGISTER_SIZE,4,2          ## @MAX_REGISTER_SIZE
	.comm	_current_monitor,8,3            ## @current_monitor
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MON fetchreg %d '%s'\n"

L_.str.1:                               ## @.str.1
	.asciz	"(null name)"

L_.str.2:                               ## @.str.2
	.asciz	"No register known for %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"EXP getreg.resp_delim\n"

	.comm	_MO_32_REGS_PAIRED,4,2          ## @MO_32_REGS_PAIRED
	.comm	_MO_HEX_PREFIX,4,2              ## @MO_HEX_PREFIX
	.comm	_timeout,4,2                    ## @timeout
L_.str.4:                               ## @.str.4
	.asciz	"Bad value returned from monitor while fetching register %x."

L_.str.5:                               ## @.str.5
	.asciz	"REGVAL '%s'\n"

L_.str.6:                               ## @.str.6
	.asciz	"EXP getreg.term\n"

L_.str.7:                               ## @.str.7
	.asciz	"EMIT getreg.term.cmd\n"

	.no_dead_strip	_monitor_fetch_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function monitor_fetch_register
_monitor_fetch_register:                ; @monitor_fetch_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
Lloh0:
	adrp	x22, _MAX_REGISTER_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_REGISTER_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	w0, #1
	bfi	w0, w8, #1, #31
	bl	_alloca
	mov	x20, x0
	ldr	w0, [x22]
	bl	_alloca
	mov	x21, x0
	ldr	w2, [x22]
	mov	w1, #0
	bl	_memset
Lloh2:
	adrp	x23, _current_monitor@GOTPAGE
Lloh3:
	ldr	x23, [x23, _current_monitor@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	x8, [x9]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	blr	x8
	mov	x22, x0
	b	LBB0_3
LBB0_2:
	ldr	x8, [x9, #8]
	ldr	x22, [x8, w19, sxtw #3]
LBB0_3:
Lloh4:
	adrp	x8, l_.str.1@PAGE
Lloh5:
	add	x8, x8, l_.str.1@PAGEOFF
	cmp	x22, #0
	csel	x8, x8, x22, eq
	stp	x19, x8, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_monitor_debug
	cbz	x22, LBB0_20
; %bb.4:
	ldrb	w8, [x22]
	cbz	w8, LBB0_20
; %bb.5:
	ldr	x8, [x23]
	ldrsw	x0, [x8, #48]
	str	x22, [sp]
	bl	_monitor_printf
	ldr	x8, [x23]
	ldr	x9, [x8, #40]
	cbz	x9, LBB0_8
; %bb.6:
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_monitor_debug
	ldr	x8, [x23]
	ldr	x0, [x8, #40]
	mov	x1, #0
	mov	w2, #0
	bl	_monitor_expect
	ldr	x8, [x23]
	ldr	w9, [x8, #16]
Lloh10:
	adrp	x10, _MO_32_REGS_PAIRED@GOTPAGE
Lloh11:
	ldr	x10, [x10, _MO_32_REGS_PAIRED@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	and	w9, w10, w9
	cmp	w9, #0
	and	w9, w19, #0x1
	ccmp	w19, #31, #0, ne
	ccmp	w9, #0, #4, le
	b.eq	LBB0_8
; %bb.7:
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_monitor_debug
	ldr	x8, [x23]
	ldr	x0, [x8, #40]
	mov	x1, #0
	mov	w2, #0
	bl	_monitor_expect
	ldr	x8, [x23]
LBB0_8:
	ldr	w8, [x8, #16]
Lloh15:
	adrp	x9, _MO_HEX_PREFIX@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MO_HEX_PREFIX@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x22, _timeout@GOTPAGE
Lloh19:
	ldr	x22, [x22, _timeout@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_13
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_readchar
	cmp	w0, #32
	b.eq	LBB0_9
; %bb.10:
	cmp	w0, #48
	b.ne	LBB0_12
; %bb.11:
	ldr	w0, [x22]
	bl	_readchar
	cmp	w0, #120
	b.eq	LBB0_13
LBB0_12:
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x19
	bl	_error
LBB0_13:
	mov	x0, x19
	bl	_DEPRECATED_REGISTER_RAW_SIZE
	cmp	w0, #1
	b.lt	LBB0_21
; %bb.14:
	mov	x24, #0
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	ldr	w0, [x22]
	bl	_readchar
	mov	x21, x0
	cmp	w0, #32
	b.ne	LBB0_18
LBB0_16:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x22]
	bl	_readchar
	cmp	w0, #32
	b.eq	LBB0_16
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x21, x0
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x21
	bl	_isxdigit
	cbz	w0, LBB0_22
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	strb	w21, [x20, x24]
	add	x24, x24, #1
	mov	x0, x19
	bl	_DEPRECATED_REGISTER_RAW_SIZE
	lsl	w8, w0, #1
	cmp	x24, w8, sxtw
	b.lt	LBB0_15
	b	LBB0_22
LBB0_20:
	mov	x8, x19
	str	x8, [sp]
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_monitor_debug
	mov	x0, x19
	mov	x1, x21
	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
	add	sp, sp, #80
	b	_supply_register
LBB0_21:
	mov	x24, #0
LBB0_22:
	strb	wzr, [x20, w24, uxtw]
	str	x20, [sp]
Lloh24:
	adrp	x0, l_.str.5@PAGE
Lloh25:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_monitor_debug
	ldr	x8, [x23]
	ldr	x9, [x8, #32]
	cbz	x9, LBB0_24
; %bb.23:
Lloh26:
	adrp	x0, l_.str.6@PAGE
Lloh27:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_monitor_debug
	ldr	x8, [x23]
	ldr	x0, [x8, #32]
	mov	x1, #0
	mov	w2, #0
	bl	_monitor_expect
	ldr	x8, [x23]
LBB0_24:
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_26
; %bb.25:
Lloh28:
	adrp	x0, l_.str.7@PAGE
Lloh29:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_monitor_debug
	ldr	x8, [x23]
	ldr	x0, [x8, #24]
	bl	_monitor_printf
	ldr	x8, [x23]
LBB0_26:
	ldr	x9, [x8, #32]
	cbz	x9, LBB0_28
; %bb.27:
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_29
LBB0_28:
	mov	x0, #0
	mov	w1, #0
	bl	_monitor_expect_prompt
LBB0_29:
	mov	x0, x19
	mov	x1, x20
	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
	add	sp, sp, #80
	b	_monitor_supply_register
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_REGISTER_SIZE,4,2          ; @MAX_REGISTER_SIZE
	.comm	_current_monitor,8,3            ; @current_monitor
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MON fetchreg %d '%s'\n"

l_.str.1:                               ; @.str.1
	.asciz	"(null name)"

l_.str.2:                               ; @.str.2
	.asciz	"No register known for %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"EXP getreg.resp_delim\n"

	.comm	_MO_32_REGS_PAIRED,4,2          ; @MO_32_REGS_PAIRED
	.comm	_MO_HEX_PREFIX,4,2              ; @MO_HEX_PREFIX
	.comm	_timeout,4,2                    ; @timeout
l_.str.4:                               ; @.str.4
	.asciz	"Bad value returned from monitor while fetching register %x."

l_.str.5:                               ; @.str.5
	.asciz	"REGVAL '%s'\n"

l_.str.6:                               ; @.str.6
	.asciz	"EXP getreg.term\n"

l_.str.7:                               ; @.str.7
	.asciz	"EMIT getreg.term.cmd\n"

	.no_dead_strip	_monitor_fetch_register
.subsections_via_symbols
