	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r3900_open
_r3900_open:                            ## @r3900_open
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %edx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_r3900_cmds@GOTPCREL(%rip), %rsi
	callq	_monitor_open
	leaq	L_.str(%rip), %rdi
	callq	_monitor_printf_noecho
	movq	_r3900_inits@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movl	$8, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	callq	_monitor_printf
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_monitor_expect_prompt
	movq	(%r14), %rax
	movq	(%rax,%rbx), %rdi
	addq	$8, %rbx
	testq	%rdi, %rdi
	jne	LBB0_2
LBB0_3:
	movq	_ethernet@GOTPCREL(%rip), %rbx
	movl	$0, (%rbx)
	leaq	L_.str.1(%rip), %rdi
	callq	_monitor_printf
	leaq	L_.str.2(%rip), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_monitor_expect
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.4:
	leaq	L_.str.3(%rip), %rdi
	leaq	-96(%rbp), %rsi
	movl	$64, %edx
	callq	_monitor_expect
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.4(%rip), %rsi
	leaq	-96(%rbp), %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	$1, (%rbx)
LBB0_7:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_monitor_expect_prompt
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_r3900_cmds,4,2                 ## @r3900_cmds
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\r\r"

	.comm	_r3900_inits,8,3                ## @r3900_inits
	.comm	_ethernet,4,2                   ## @ethernet
L_.str.1:                               ## @.str.1
	.asciz	"v\r"

L_.str.2:                               ## @.str.2
	.asciz	"console device :"

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

L_.str.4:                               ## @.str.4
	.asciz	"ethernet"

	.no_dead_strip	_r3900_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r3900_open
_r3900_open:                            ; @r3900_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x2, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x1, _r3900_cmds@GOTPAGE
Lloh4:
	ldr	x1, [x1, _r3900_cmds@GOTPAGEOFF]
	bl	_monitor_open
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_monitor_printf_noecho
Lloh7:
	adrp	x19, _r3900_inits@GOTPAGE
Lloh8:
	ldr	x19, [x19, _r3900_inits@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x0, [x8]
	cbz	x0, LBB0_3
; %bb.1:
	mov	w20, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	bl	_monitor_printf
	mov	x0, #0
	mov	w1, #0
	bl	_monitor_expect_prompt
	ldr	x8, [x19]
	ldr	x0, [x8, x20]
	add	x20, x20, #8
	cbnz	x0, LBB0_2
LBB0_3:
Lloh9:
	adrp	x19, _ethernet@GOTPAGE
Lloh10:
	ldr	x19, [x19, _ethernet@GOTPAGEOFF]
	str	wzr, [x19]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_monitor_printf
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, #0
	mov	w2, #0
	bl	_monitor_expect
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.4:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	add	x1, sp, #8
	mov	w2, #64
	bl	_monitor_expect
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.5:
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x0, sp, #8
	bl	_strstr
	cbz	x0, LBB0_7
; %bb.6:
	mov	w8, #1
	str	w8, [x19]
LBB0_7:
	mov	x0, #0
	mov	w1, #0
	bl	_monitor_expect_prompt
	ldur	x8, [x29, #-24]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_r3900_cmds,4,2                 ; @r3900_cmds
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\r\r"

	.comm	_r3900_inits,8,3                ; @r3900_inits
	.comm	_ethernet,4,2                   ; @ethernet
l_.str.1:                               ; @.str.1
	.asciz	"v\r"

l_.str.2:                               ; @.str.2
	.asciz	"console device :"

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

l_.str.4:                               ; @.str.4
	.asciz	"ethernet"

	.no_dead_strip	_r3900_open
.subsections_via_symbols
