	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function monitor_load
_monitor_load:                          ## @monitor_load
	.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	%rbx
	subq	$152, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_monitor_debug
	movq	_current_monitor@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	24(%rax), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_monitor_desc@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_hashmark@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rsi
	callq	*%rax
	jmp	LBB0_9
LBB0_2:
	leaq	-160(%rbp), %r14
	leaq	L_.str.1(%rip), %rsi
	leaq	-168(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jg	LBB0_4
## %bb.3:
	movq	$0, -168(%rbp)
	movq	%rbx, %r14
LBB0_4:
	movq	(%r15), %rax
	movl	16(%rax), %edi
	callq	_monitor_printf
	movq	(%r15), %rax
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_monitor_expect
	movq	(%r15), %rax
LBB0_6:
	movq	_monitor_desc@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	-168(%rbp), %edx
	movq	_SREC_ALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_hashmark@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_MO_SREC_ACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	$0, %ecx
	andl	(%rax), %esi
	je	LBB0_8
## %bb.7:
	movq	_monitor_wait_srec_ack@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_8:
	movq	%rcx, (%rsp)
	movq	%r14, %rsi
	movl	$32, %ecx
	callq	_load_srec
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_monitor_expect_prompt
LBB0_9:
	movq	_exec_bfd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:
	callq	_bfd_get_start_address
	movl	%eax, %edi
	callq	_write_pc
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	addq	$152, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MON load\n"

	.comm	_current_monitor,8,3            ## @current_monitor
	.comm	_monitor_desc,4,2               ## @monitor_desc
	.comm	_hashmark,4,2                   ## @hashmark
L_.str.1:                               ## @.str.1
	.asciz	"%s 0x%lx"

	.comm	_SREC_ALL,4,2                   ## @SREC_ALL
	.comm	_MO_SREC_ACK,4,2                ## @MO_SREC_ACK
	.comm	_monitor_wait_srec_ack,8,3      ## @monitor_wait_srec_ack
	.comm	_exec_bfd,8,3                   ## @exec_bfd
	.no_dead_strip	_monitor_load
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function monitor_load
_monitor_load:                          ; @monitor_load
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	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	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_monitor_debug
Lloh5:
	adrp	x21, _current_monitor@GOTPAGE
Lloh6:
	ldr	x21, [x21, _current_monitor@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_2
; %bb.1:
Lloh7:
	adrp	x9, _monitor_desc@GOTPAGE
Lloh8:
	ldr	x9, [x9, _monitor_desc@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x9]
Lloh10:
	adrp	x9, _hashmark@GOTPAGE
Lloh11:
	ldr	x9, [x9, _hashmark@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x9]
	mov	x1, x20
	blr	x8
	b	LBB0_7
LBB0_2:
	add	x19, sp, #8
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	mov	x3, sp
	mov	x0, x20
	bl	_sscanf
	cmp	w0, #1
	b.gt	LBB0_4
; %bb.3:
	str	xzr, [sp]
	mov	x19, x20
LBB0_4:
	ldr	x8, [x21]
	ldr	w0, [x8, #16]
	bl	_monitor_printf
	ldr	x8, [x21]
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_6
; %bb.5:
	mov	x1, #0
	mov	w2, #0
	bl	_monitor_expect
	ldr	x8, [x21]
LBB0_6:
Lloh15:
	adrp	x9, _monitor_desc@GOTPAGE
Lloh16:
	ldr	x9, [x9, _monitor_desc@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x9]
	ldr	w2, [sp]
Lloh18:
	adrp	x9, _SREC_ALL@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SREC_ALL@GOTPAGEOFF]
Lloh20:
	ldr	w4, [x9]
Lloh21:
	adrp	x9, _hashmark@GOTPAGE
Lloh22:
	ldr	x9, [x9, _hashmark@GOTPAGEOFF]
Lloh23:
	ldr	w5, [x9]
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _MO_SREC_ACK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MO_SREC_ACK@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _monitor_wait_srec_ack@GOTPAGE
Lloh28:
	ldr	x10, [x10, _monitor_wait_srec_ack@GOTPAGEOFF]
Lloh29:
	ldr	x10, [x10]
	tst	w9, w8
	csel	x6, xzr, x10, eq
	mov	x1, x19
	mov	w3, #32
	bl	_load_srec
	mov	x0, #0
	mov	w1, #0
	bl	_monitor_expect_prompt
LBB0_7:
Lloh30:
	adrp	x8, _exec_bfd@GOTPAGE
Lloh31:
	ldr	x8, [x8, _exec_bfd@GOTPAGEOFF]
Lloh32:
	ldr	x0, [x8]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_bfd_get_start_address
	bl	_write_pc
LBB0_9:
	ldur	x8, [x29, #-40]
Lloh33:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh34:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MON load\n"

	.comm	_current_monitor,8,3            ; @current_monitor
	.comm	_monitor_desc,4,2               ; @monitor_desc
	.comm	_hashmark,4,2                   ; @hashmark
l_.str.1:                               ; @.str.1
	.asciz	"%s 0x%lx"

	.comm	_SREC_ALL,4,2                   ; @SREC_ALL
	.comm	_MO_SREC_ACK,4,2                ; @MO_SREC_ACK
	.comm	_monitor_wait_srec_ack,8,3      ; @monitor_wait_srec_ack
	.comm	_exec_bfd,8,3                   ; @exec_bfd
	.no_dead_strip	_monitor_load
.subsections_via_symbols
