	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function common_open
_common_open:                           ## @common_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	testq	%rsi, %rsi
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_error
LBB0_2:
	movq	%rbx, %rdi
	callq	_buildargv
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	callq	_nomem
LBB0_4:
	movq	%rbx, %rdi
	callq	_make_cleanup_freeargv
	movq	(%rbx), %rdi
	callq	_xstrdup
	movq	%rax, %r14
	movq	8(%rbx), %r13
	testq	%r13, %r13
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.6:
	movq	16(%rbx), %r12
	jmp	LBB0_7
LBB0_5:
	xorl	%r12d, %r12d
LBB0_7:
	movl	%r15d, %edi
	callq	_target_preopen
	movq	_mips_is_open@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_current_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_unpush_target
LBB0_9:
	movq	%r14, %rdi
	callq	_serial_open
	movq	_mips_desc@GOTPCREL(%rip), %rbx
	movq	%rax, (%rbx)
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_perror_with_name
LBB0_11:
	movq	_baud_rate@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	$-1, %esi
	je	LBB0_14
## %bb.12:
	movq	(%rbx), %rdi
	callq	_serial_setbaudrate
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	(%rbx), %rdi
	callq	_serial_close
	movq	%r14, %rdi
	callq	_perror_with_name
LBB0_14:
	movq	(%rbx), %rdi
	callq	_serial_raw
	testq	%r13, %r13
	je	LBB0_26
## %bb.15:
	movq	%r13, %rdi
	movl	$35, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	movq	%r13, %rdi
	callq	_serial_open
	movq	_udp_desc@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_udp_in_use@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	jne	LBB0_25
## %bb.17:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror_with_name
	jmp	LBB0_25
LBB0_18:
	movq	_tftp_name@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.19:
	callq	_xfree
LBB0_20:
	movq	_tftp_localname@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.21:
	callq	_xfree
LBB0_22:
	testq	%r12, %r12
	jne	LBB0_24
## %bb.23:
	movq	%r13, %rdi
	movl	$58, %esi
	callq	_strchr
	leaq	1(%rax), %r12
	testq	%rax, %rax
	cmoveq	%rax, %r12
LBB0_24:
	testq	%r12, %r12
	cmoveq	%r13, %r12
	movq	%r13, %rdi
	callq	_xstrdup
	movq	%rax, (%rbx)
	movq	%r12, %rdi
	callq	_xstrdup
	movq	_tftp_localname@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_tftp_in_use@GOTPCREL(%rip), %rbx
LBB0_25:
	movl	$1, (%rbx)
LBB0_26:
	movq	_current_ops@GOTPCREL(%rip), %rax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, (%rax)
	movq	_mips_is_open@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_mips_monitor_prompt@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	jne	LBB0_28
## %bb.27:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_xstrdup
	movq	%rax, (%r12)
LBB0_28:
	movq	_mips_monitor@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	xorl	%eax, %eax
	callq	_mips_initialize
	testl	%r15d, %r15d
	je	LBB0_30
## %bb.29:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	callq	_printf_unfiltered
LBB0_30:
	movq	%rbx, %rdi
	callq	_push_target
	xorl	%eax, %eax
	callq	_deprecated_mips_set_processor_regs_hack
	xorl	%eax, %eax
	callq	_flush_cached_frames
	xorl	%eax, %eax
	callq	_registers_changed
	xorl	%eax, %eax
	callq	_read_pc
	movq	_stop_pc@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_get_selected_frame
	movl	%eax, %edi
	movl	$-1, %esi
	movl	$1, %edx
	callq	_print_stack_frame
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"To open a MIPS remote debugging connection, you need to specify what serial\ndevice is attached to the target board (e.g., /dev/ttya).\nIf you want to use TFTP to download to the board, specify the name of a\ntemporary file to be used by GDB for downloads as the second argument.\nThis filename must be in the form host:filename, where host is the name\nof the host running the TFTP server, and the file must be readable by the\nworld.  If the local name of the temporary file differs from the name as\nseen from the board via TFTP, specify that name as the third parameter.\n"

	.comm	_mips_is_open,4,2               ## @mips_is_open
	.comm	_current_ops,8,3                ## @current_ops
	.comm	_mips_desc,8,3                  ## @mips_desc
	.comm	_baud_rate,4,2                  ## @baud_rate
	.comm	_udp_desc,8,3                   ## @udp_desc
L_.str.1:                               ## @.str.1
	.asciz	"Unable to open UDP port"

	.comm	_udp_in_use,4,2                 ## @udp_in_use
	.comm	_tftp_name,8,3                  ## @tftp_name
	.comm	_tftp_localname,8,3             ## @tftp_localname
	.comm	_tftp_in_use,4,2                ## @tftp_in_use
	.comm	_mips_monitor_prompt,8,3        ## @mips_monitor_prompt
	.comm	_mips_monitor,4,2               ## @mips_monitor
L_.str.2:                               ## @.str.2
	.asciz	"Remote MIPS debugging using %s\n"

	.comm	_stop_pc,4,2                    ## @stop_pc
	.no_dead_strip	_common_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function common_open
_common_open:                           ; @common_open
	.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
	mov	x23, x4
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	cbnz	x1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
LBB0_2:
	mov	x0, x20
	bl	_buildargv
	mov	x25, x0
	cbnz	x0, LBB0_4
; %bb.3:
	bl	_nomem
LBB0_4:
	mov	x0, x25
	bl	_make_cleanup_freeargv
	ldr	x0, [x25]
	bl	_xstrdup
	mov	x20, x0
	ldr	x24, [x25, #8]
	cbz	x24, LBB0_6
; %bb.5:
	ldr	x25, [x25, #16]
	b	LBB0_7
LBB0_6:
	mov	x25, #0
LBB0_7:
	mov	x0, x21
	bl	_target_preopen
Lloh2:
	adrp	x26, _mips_is_open@GOTPAGE
Lloh3:
	ldr	x26, [x26, _mips_is_open@GOTPAGEOFF]
	ldr	w8, [x26]
Lloh4:
	adrp	x27, _current_ops@GOTPAGE
Lloh5:
	ldr	x27, [x27, _current_ops@GOTPAGEOFF]
	cbz	w8, LBB0_9
; %bb.8:
	ldr	x0, [x27]
	bl	_unpush_target
LBB0_9:
	mov	x0, x20
	bl	_serial_open
Lloh6:
	adrp	x28, _mips_desc@GOTPAGE
Lloh7:
	ldr	x28, [x28, _mips_desc@GOTPAGEOFF]
	str	x0, [x28]
	cbnz	x0, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_perror_with_name
LBB0_11:
Lloh8:
	adrp	x8, _baud_rate@GOTPAGE
Lloh9:
	ldr	x8, [x8, _baud_rate@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	cmn	w1, #1
	b.eq	LBB0_14
; %bb.12:
	ldr	x0, [x28]
	bl	_serial_setbaudrate
	cbz	x0, LBB0_14
; %bb.13:
	ldr	x0, [x28]
	bl	_serial_close
	mov	x0, x20
	bl	_perror_with_name
LBB0_14:
	ldr	x0, [x28]
	bl	_serial_raw
	cbz	x24, LBB0_27
; %bb.15:
	mov	x0, x24
	mov	w1, #35
	bl	_strchr
	cbz	x0, LBB0_19
; %bb.16:
	mov	x0, x24
	bl	_serial_open
Lloh11:
	adrp	x8, _udp_desc@GOTPAGE
Lloh12:
	ldr	x8, [x8, _udp_desc@GOTPAGEOFF]
Lloh13:
	str	x0, [x8]
	cbnz	x0, LBB0_18
; %bb.17:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror_with_name
LBB0_18:
Lloh16:
	adrp	x8, _udp_in_use@GOTPAGE
Lloh17:
	ldr	x8, [x8, _udp_in_use@GOTPAGEOFF]
	b	LBB0_26
LBB0_19:
Lloh18:
	adrp	x8, _tftp_name@GOTPAGE
Lloh19:
	ldr	x8, [x8, _tftp_name@GOTPAGEOFF]
Lloh20:
	ldr	x0, [x8]
	cbz	x0, LBB0_21
; %bb.20:
	bl	_xfree
LBB0_21:
Lloh21:
	adrp	x28, _tftp_localname@GOTPAGE
Lloh22:
	ldr	x28, [x28, _tftp_localname@GOTPAGEOFF]
	ldr	x0, [x28]
	cbz	x0, LBB0_23
; %bb.22:
	bl	_xfree
LBB0_23:
	cbnz	x25, LBB0_25
; %bb.24:
	mov	x0, x24
	mov	w1, #58
	bl	_strchr
	cmp	x0, #0
	csinc	x25, xzr, x0, eq
LBB0_25:
	cmp	x25, #0
	csel	x25, x24, x25, eq
	mov	x0, x24
	bl	_xstrdup
Lloh23:
	adrp	x8, _tftp_name@GOTPAGE
Lloh24:
	ldr	x8, [x8, _tftp_name@GOTPAGEOFF]
Lloh25:
	str	x0, [x8]
	mov	x0, x25
	bl	_xstrdup
	str	x0, [x28]
Lloh26:
	adrp	x8, _tftp_in_use@GOTPAGE
Lloh27:
	ldr	x8, [x8, _tftp_in_use@GOTPAGEOFF]
LBB0_26:
	mov	w9, #1
	str	w9, [x8]
LBB0_27:
	str	x19, [x27]
	mov	w8, #1
	str	w8, [x26]
Lloh28:
	adrp	x24, _mips_monitor_prompt@GOTPAGE
Lloh29:
	ldr	x24, [x24, _mips_monitor_prompt@GOTPAGEOFF]
	ldr	x8, [x24]
	cbnz	x8, LBB0_29
; %bb.28:
	mov	x0, x23
	bl	_xstrdup
	str	x0, [x24]
LBB0_29:
Lloh30:
	adrp	x8, _mips_monitor@GOTPAGE
Lloh31:
	ldr	x8, [x8, _mips_monitor@GOTPAGEOFF]
Lloh32:
	str	w22, [x8]
	bl	_mips_initialize
	cbz	w21, LBB0_31
; %bb.30:
Lloh33:
	adrp	x0, l_.str.2@PAGE
Lloh34:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_printf_unfiltered
LBB0_31:
	mov	x0, x19
	bl	_push_target
	bl	_deprecated_mips_set_processor_regs_hack
	bl	_flush_cached_frames
	bl	_registers_changed
	bl	_read_pc
Lloh35:
	adrp	x8, _stop_pc@GOTPAGE
Lloh36:
	ldr	x8, [x8, _stop_pc@GOTPAGEOFF]
Lloh37:
	str	w0, [x8]
	bl	_get_selected_frame
	mov	w1, #-1
	mov	w2, #1
	bl	_print_stack_frame
	mov	x0, x20
	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	_xfree
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotStr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotStr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"To open a MIPS remote debugging connection, you need to specify what serial\ndevice is attached to the target board (e.g., /dev/ttya).\nIf you want to use TFTP to download to the board, specify the name of a\ntemporary file to be used by GDB for downloads as the second argument.\nThis filename must be in the form host:filename, where host is the name\nof the host running the TFTP server, and the file must be readable by the\nworld.  If the local name of the temporary file differs from the name as\nseen from the board via TFTP, specify that name as the third parameter.\n"

	.comm	_mips_is_open,4,2               ; @mips_is_open
	.comm	_current_ops,8,3                ; @current_ops
	.comm	_mips_desc,8,3                  ; @mips_desc
	.comm	_baud_rate,4,2                  ; @baud_rate
	.comm	_udp_desc,8,3                   ; @udp_desc
l_.str.1:                               ; @.str.1
	.asciz	"Unable to open UDP port"

	.comm	_udp_in_use,4,2                 ; @udp_in_use
	.comm	_tftp_name,8,3                  ; @tftp_name
	.comm	_tftp_localname,8,3             ; @tftp_localname
	.comm	_tftp_in_use,4,2                ; @tftp_in_use
	.comm	_mips_monitor_prompt,8,3        ; @mips_monitor_prompt
	.comm	_mips_monitor,4,2               ; @mips_monitor
l_.str.2:                               ; @.str.2
	.asciz	"Remote MIPS debugging using %s\n"

	.comm	_stop_pc,4,2                    ; @stop_pc
	.no_dead_strip	_common_open
.subsections_via_symbols
