	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mips_expect_timeout
_mips_expect_timeout:                   ## @mips_expect_timeout
	.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	%esi, %r14d
	movq	%rdi, %r13
	movq	_remote_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf_unfiltered
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_fputs_readable
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_fprintf_unfiltered
LBB0_2:
	movq	_immediate_quit@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	_mips_desc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_serial_readchar
	movq	_SERIAL_TIMEOUT@GOTPCREL(%rip), %r12
	cmpl	(%r12), %eax
	jne	LBB0_3
LBB0_9:
	xorl	%ebx, %ebx
	movq	_remote_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.10:
	leaq	L_.str.2(%rip), %rsi
LBB0_11:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fprintf_unfiltered
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%eax, %ebx
	movq	%r13, %r15
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movsbl	(%r13), %eax
	xorl	%r15d, %r15d
	cmpl	%eax, %ebx
	sete	%r15b
	addq	%r13, %r15
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_mips_desc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_serial_readchar
	movl	%eax, %ebx
	cmpl	(%r12), %eax
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_remote_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_fputc_readable
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movsbl	(%r15), %eax
	cmpl	%eax, %ebx
	jne	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$0, 1(%r15)
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r15
	jmp	LBB0_16
LBB0_13:
	movq	_immediate_quit@GOTPCREL(%rip), %rax
	decl	(%rax)
	movl	$1, %ebx
	movq	_remote_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.14:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_remote_debug,8,3               ## @remote_debug
	.comm	_gdb_stdlog,4,2                 ## @gdb_stdlog
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Expected \""

L_.str.1:                               ## @.str.1
	.asciz	"\", got \""

	.comm	_immediate_quit,4,2             ## @immediate_quit
	.comm	_mips_desc,4,2                  ## @mips_desc
	.comm	_SERIAL_TIMEOUT,4,2             ## @SERIAL_TIMEOUT
L_.str.2:                               ## @.str.2
	.asciz	"\": FAIL\n"

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

	.no_dead_strip	_mips_expect_timeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mips_expect_timeout
_mips_expect_timeout:                   ; @mips_expect_timeout
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _remote_debug@GOTPAGE
Lloh1:
	ldr	x23, [x23, _remote_debug@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh2:
	adrp	x22, _gdb_stdlog@GOTPAGE
Lloh3:
	ldr	x22, [x22, _gdb_stdlog@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x22]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf_unfiltered
	ldr	w1, [x22]
	mov	x0, x20
	bl	_fputs_readable
	ldr	w0, [x22]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf_unfiltered
LBB0_2:
Lloh8:
	adrp	x24, _immediate_quit@GOTPAGE
Lloh9:
	ldr	x24, [x24, _immediate_quit@GOTPAGEOFF]
	ldr	w8, [x24]
	add	w8, w8, #1
	str	w8, [x24]
Lloh10:
	adrp	x25, _mips_desc@GOTPAGE
Lloh11:
	ldr	x25, [x25, _mips_desc@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	x1, x19
	bl	_serial_readchar
Lloh12:
	adrp	x26, _SERIAL_TIMEOUT@GOTPAGE
Lloh13:
	ldr	x26, [x26, _SERIAL_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_7
LBB0_3:
	mov	w19, #0
	ldr	x8, [x23]
	cbz	x8, LBB0_6
; %bb.4:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_5:
	ldr	w0, [x22]
	bl	_fprintf_unfiltered
LBB0_6:
	mov	x0, x19
	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
	ret
LBB0_7:
	mov	x21, x0
	mov	x27, x20
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	x8, x20
	ldrsb	w9, [x8], #1
	cmp	w21, w9
	csel	x27, x20, x8, ne
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x25]
	mov	x1, x19
	bl	_serial_readchar
	mov	x21, x0
	ldr	w8, [x26]
	cmp	w0, w8
	b.eq	LBB0_3
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	cbz	x8, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w1, [x22]
	mov	x0, x21
	bl	_fputc_readable
LBB0_12:                                ;   in Loop: Header=BB0_10 Depth=1
	ldrsb	w8, [x27]
	cmp	w21, w8
	b.ne	LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldrb	w8, [x27, #1]!
	cbnz	w8, LBB0_9
; %bb.14:
	ldr	w8, [x24]
	sub	w8, w8, #1
	str	w8, [x24]
	ldr	x8, [x23]
	mov	w19, #1
	cbz	x8, LBB0_6
; %bb.15:
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_remote_debug,8,3               ; @remote_debug
	.comm	_gdb_stdlog,4,2                 ; @gdb_stdlog
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Expected \""

l_.str.1:                               ; @.str.1
	.asciz	"\", got \""

	.comm	_immediate_quit,4,2             ; @immediate_quit
	.comm	_mips_desc,4,2                  ; @mips_desc
	.comm	_SERIAL_TIMEOUT,4,2             ; @SERIAL_TIMEOUT
l_.str.2:                               ; @.str.2
	.asciz	"\": FAIL\n"

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

	.no_dead_strip	_mips_expect_timeout
.subsections_via_symbols
