	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r3900_load
_r3900_load:                            ## @r3900_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	$0, -56(%rbp)
	movl	$0, -52(%rbp)
	movq	_ethernet@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.3:
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:
	cmpb	$0, (%rbx)
	jne	LBB0_6
LBB0_5:
	movl	$1, %edi
	callq	_get_exec_file
	movq	%rax, %rbx
LBB0_6:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_bfd_openr
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_error
LBB0_8:
	movq	_bfd_object@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bfd_check_format
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_error
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	callq	_monitor_printf
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ignore_packet
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_monitor_expect_prompt
	leaq	L_.str.3(%rip), %rdi
	callq	_monitor_printf
	xorl	%eax, %eax
	callq	_ignore_packet
	leaq	L_.str.4(%rip), %rsi
	movl	$97, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_send_packet
	movq	_count_section@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_bfd_map_over_sections
	movslq	-52(%rbp), %rsi
	leaq	-48(%rbp), %rdi
	callq	_write_long
	movq	_exec_bfd@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	leaq	-44(%rbp), %r15
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:
	callq	_bfd_get_start_address
	movq	%rax, %rbx
LBB0_12:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_write_long
	leaq	-48(%rbp), %rdi
	movl	$8, %esi
	callq	_process_read_request
	xorl	%edi, %edi
	callq	_time
	movl	%eax, %r15d
	movq	_load_section@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_bfd_map_over_sections
	xorl	%edi, %edi
	callq	_time
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_ignore_packet
	leaq	L_.str.4(%rip), %rsi
	movl	$97, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_send_packet
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_monitor_expect_prompt
	leaq	L_.str.5(%rip), %rdi
	callq	_monitor_printf
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_monitor_expect_prompt
	movq	%r14, %rdi
	callq	_bfd_get_start_address
	leaq	L_.str.6(%rip), %rdi
	movq	%rax, %rsi
	callq	_printf_filtered
	movl	-56(%rbp), %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_report_transfer_performance
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:
	callq	_bfd_get_start_address
	movq	%rax, %rdi
	callq	_write_pc
LBB0_14:
	movq	_null_ptid@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_inferior_ptid@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_clear_symtab_users
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_16
## %bb.2:
	movq	%rbx, %rdi
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_orig_monitor_load              ## TAILCALL
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ethernet,4,2                   ## @ethernet
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to open file %s\n"

	.comm	_bfd_object,4,2                 ## @bfd_object
L_.str.1:                               ## @.str.1
	.asciz	"File is not an object file\n"

L_.str.2:                               ## @.str.2
	.asciz	"vconsi\r"

L_.str.3:                               ## @.str.3
	.asciz	"Rm\r"

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

	.comm	_count_section,8,3              ## @count_section
	.comm	_exec_bfd,8,3                   ## @exec_bfd
	.comm	_load_section,8,3               ## @load_section
L_.str.5:                               ## @.str.5
	.asciz	"vconsx\r"

L_.str.6:                               ## @.str.6
	.asciz	"Start address 0x%lx\n"

	.comm	_null_ptid,4,2                  ## @null_ptid
	.comm	_inferior_ptid,4,2              ## @inferior_ptid
	.no_dead_strip	_r3900_load
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r3900_load
_r3900_load:                            ; @r3900_load
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	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, #24]
	str	xzr, [sp, #8]
Lloh3:
	adrp	x8, _ethernet@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ethernet@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	w8, LBB0_10
; %bb.1:
	cbz	x20, LBB0_3
; %bb.2:
	ldrb	w8, [x20]
	cbnz	w8, LBB0_4
LBB0_3:
	mov	w0, #1
	bl	_get_exec_file
	mov	x20, x0
LBB0_4:
	mov	x0, x20
	mov	w1, #0
	bl	_bfd_openr
	mov	x19, x0
	cbnz	x0, LBB0_6
; %bb.5:
	str	x20, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
LBB0_6:
Lloh8:
	adrp	x8, _bfd_object@GOTPAGE
Lloh9:
	ldr	x8, [x8, _bfd_object@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bfd_check_format
	cbnz	x0, LBB0_8
; %bb.7:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_error
LBB0_8:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_monitor_printf
	bl	_ignore_packet
	mov	x0, #0
	mov	w1, #0
	bl	_monitor_expect_prompt
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_monitor_printf
	bl	_ignore_packet
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #97
	mov	w2, #0
	mov	w3, #0
	bl	_send_packet
Lloh19:
	adrp	x8, _count_section@GOTPAGE
Lloh20:
	ldr	x8, [x8, _count_section@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x8, sp, #8
	str	x8, [sp]
	mov	x0, x19
	bl	_bfd_map_over_sections
	ldrsw	x1, [sp, #8]
	add	x20, sp, #16
	add	x0, sp, #16
	bl	_write_long
Lloh22:
	adrp	x22, _exec_bfd@GOTPAGE
Lloh23:
	ldr	x22, [x22, _exec_bfd@GOTPAGEOFF]
	ldr	x0, [x22]
	add	x20, x20, #4
	cbz	x0, LBB0_12
; %bb.9:
	bl	_bfd_get_start_address
	mov	x1, x0
	b	LBB0_13
LBB0_10:
	ldr	x8, [sp, #24]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.11:
	mov	x0, 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
	add	sp, sp, #80
	b	_orig_monitor_load
LBB0_12:
	mov	x1, #0
LBB0_13:
	mov	x0, x20
	bl	_write_long
	add	x0, sp, #16
	mov	w1, #8
	bl	_process_read_request
	mov	x0, #0
	bl	_time
	mov	x20, x0
Lloh27:
	adrp	x8, _load_section@GOTPAGE
Lloh28:
	ldr	x8, [x8, _load_section@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	add	x8, sp, #12
	str	x8, [sp]
	mov	x0, x19
	bl	_bfd_map_over_sections
	mov	x0, #0
	bl	_time
	mov	x21, x0
	bl	_ignore_packet
Lloh30:
	adrp	x1, l_.str.4@PAGE
Lloh31:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #97
	mov	w2, #0
	mov	w3, #0
	bl	_send_packet
	mov	x0, #0
	mov	w1, #0
	bl	_monitor_expect_prompt
Lloh32:
	adrp	x0, l_.str.5@PAGE
Lloh33:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_monitor_printf
	mov	x0, #0
	mov	w1, #0
	bl	_monitor_expect_prompt
	mov	x0, x19
	bl	_bfd_get_start_address
	mov	x1, x0
Lloh34:
	adrp	x0, l_.str.6@PAGE
Lloh35:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_printf_filtered
	ldr	w0, [sp, #12]
	mov	x1, x20
	mov	x2, x21
	bl	_report_transfer_performance
	ldr	x0, [x22]
	cbz	x0, LBB0_15
; %bb.14:
	bl	_bfd_get_start_address
	bl	_write_pc
LBB0_15:
Lloh36:
	adrp	x8, _null_ptid@GOTPAGE
Lloh37:
	ldr	x8, [x8, _null_ptid@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
Lloh39:
	adrp	x9, _inferior_ptid@GOTPAGE
Lloh40:
	ldr	x9, [x9, _inferior_ptid@GOTPAGEOFF]
Lloh41:
	str	w8, [x9]
	bl	_clear_symtab_users
	ldr	x8, [sp, #24]
Lloh42:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	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
	add	sp, sp, #80
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotStr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_ethernet,4,2                   ; @ethernet
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to open file %s\n"

	.comm	_bfd_object,4,2                 ; @bfd_object
l_.str.1:                               ; @.str.1
	.asciz	"File is not an object file\n"

l_.str.2:                               ; @.str.2
	.asciz	"vconsi\r"

l_.str.3:                               ; @.str.3
	.asciz	"Rm\r"

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

	.comm	_count_section,8,3              ; @count_section
	.comm	_exec_bfd,8,3                   ; @exec_bfd
	.comm	_load_section,8,3               ; @load_section
l_.str.5:                               ; @.str.5
	.asciz	"vconsx\r"

l_.str.6:                               ; @.str.6
	.asciz	"Start address 0x%lx\n"

	.comm	_null_ptid,4,2                  ; @null_ptid
	.comm	_inferior_ptid,4,2              ; @inferior_ptid
	.no_dead_strip	_r3900_load
.subsections_via_symbols
