	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mips_receive_header
_mips_receive_header:                   ## @mips_receive_header
	.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
	movl	%ecx, %r13d
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_SYN@GOTPCREL(%rip), %r12
	movq	_SERIAL_TIMEOUT@GOTPCREL(%rip), %r15
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
LBB0_1:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%eax, %r14d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jge	LBB0_28
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	cmpl	(%r12), %ebx
	je	LBB0_18
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %edi
	callq	_mips_readchar
	cmpl	(%r15), %eax
	je	LBB0_26
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ebx
	cmpl	(%r12), %eax
	je	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_mips_initializing@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_remote_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_12
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	callq	_isprint
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	callq	_isspace
	testq	%rax, %rax
	je	LBB0_24
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_gdb_stdtarg@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_fputc_unfiltered
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_gdb_stdtarg@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gdb_flush
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	callq	_isprint
	testq	%rax, %rax
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	callq	_isspace
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	incl	(%r14)
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_mips_syn_garbage@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, %esi
	jle	LBB0_3
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%esi, (%r14)
	jle	LBB0_3
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_mips_error
	jmp	LBB0_3
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %r14d
	cmpl	$2, %eax
	jl	LBB0_2
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r13d, %edi
	callq	_mips_readchar
	cmpl	(%r15), %eax
	je	LBB0_26
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=2
	movl	%eax, %ebx
	cmpl	(%r12), %eax
	je	LBB0_1
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=2
	movl	%ebx, %edi
	callq	_HDR_CHECK
	testl	%eax, %eax
	je	LBB0_1
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movb	%bl, (%rax,%r14)
	incq	%r14
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r14
	jl	LBB0_20
	jmp	LBB0_1
LBB0_24:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_gdb_stdtarg@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_fputc_readable
	jmp	LBB0_11
LBB0_26:
	movl	$-1, %eax
LBB0_27:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	xorl	%eax, %eax
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_SYN,4,2                        ## @SYN
	.comm	_SERIAL_TIMEOUT,4,2             ## @SERIAL_TIMEOUT
	.comm	_mips_initializing,4,2          ## @mips_initializing
	.comm	_remote_debug,8,3               ## @remote_debug
	.comm	_gdb_stdtarg,4,2                ## @gdb_stdtarg
	.comm	_mips_syn_garbage,4,2           ## @mips_syn_garbage
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Debug protocol failure:  more than %d characters before a sync."

	.comm	_HDR_LENGTH,4,2                 ## @HDR_LENGTH
	.no_dead_strip	_mips_receive_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mips_receive_header
_mips_receive_header:                   ; @mips_receive_header
	.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, x3
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x24, _SYN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SYN@GOTPAGEOFF]
Lloh2:
	adrp	x26, _SERIAL_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x26, [x26, _SERIAL_TIMEOUT@GOTPAGEOFF]
Lloh4:
	adrp	x27, _mips_initializing@GOTPAGE
Lloh5:
	ldr	x27, [x27, _mips_initializing@GOTPAGEOFF]
Lloh6:
	adrp	x28, _remote_debug@GOTPAGE
Lloh7:
	ldr	x28, [x28, _remote_debug@GOTPAGEOFF]
Lloh8:
	adrp	x22, _gdb_stdtarg@GOTPAGE
Lloh9:
	ldr	x22, [x22, _gdb_stdtarg@GOTPAGEOFF]
Lloh10:
	adrp	x25, l_.str@PAGE
Lloh11:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh12:
	adrp	x8, _HDR_LENGTH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HDR_LENGTH@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	w27, w8
	mov	x27, x28
	mov	x28, x22
	mov	x22, x25
Lloh15:
	adrp	x25, l_.str@PAGE
Lloh16:
	add	x25, x25, l_.str@PAGEOFF
	b.ge	LBB0_25
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
	ldr	w8, [x24]
	cmp	w23, w8
	b.eq	LBB0_17
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_mips_readchar
	ldr	w8, [x26]
	cmp	w0, w8
	b.eq	LBB0_23
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27]
	ldr	x9, [x28]
	cmp	w8, #0
	ccmp	x9, #1, #0, ne
	b.lt	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_isprint
	cbnz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_isspace
	cbz	x0, LBB0_22
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x22]
	mov	x0, x23
	bl	_fputc_unfiltered
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x22]
	bl	_gdb_flush
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_isprint
	cbnz	x0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_isspace
	cbnz	x0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh17:
	adrp	x8, _mips_syn_garbage@GOTPAGE
Lloh18:
	ldr	x8, [x8, _mips_syn_garbage@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	cmp	w1, #1
	b.lt	LBB0_3
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20]
	cmp	w8, w1
	b.le	LBB0_3
; %bb.16:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	bl	_mips_error
	b	LBB0_3
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x22
	mov	x22, x28
	mov	x28, x27
Lloh20:
	adrp	x8, _HDR_LENGTH@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HDR_LENGTH@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	mov	w27, #1
	cmp	w8, #2
	b.lt	LBB0_2
LBB0_18:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	bl	_mips_readchar
	ldr	w8, [x26]
	cmp	w0, w8
	b.eq	LBB0_23
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
	mov	x23, x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.eq	LBB0_1
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=2
	mov	x0, x23
	bl	_HDR_CHECK
	cbz	w0, LBB0_1
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=2
	strb	w23, [x21, x27]
	add	x27, x27, #1
Lloh23:
	adrp	x8, _HDR_LENGTH@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HDR_LENGTH@GOTPAGEOFF]
Lloh25:
	ldrsw	x8, [x8]
	cmp	x27, x8
	b.lt	LBB0_18
	b	LBB0_1
LBB0_22:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x22]
	mov	x0, x23
	bl	_fputc_readable
	b	LBB0_10
LBB0_23:
	mov	w0, #-1
LBB0_24:
	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_25:
	mov	w0, #0
	b	LBB0_24
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_SYN,4,2                        ; @SYN
	.comm	_SERIAL_TIMEOUT,4,2             ; @SERIAL_TIMEOUT
	.comm	_mips_initializing,4,2          ; @mips_initializing
	.comm	_remote_debug,8,3               ; @remote_debug
	.comm	_gdb_stdtarg,4,2                ; @gdb_stdtarg
	.comm	_mips_syn_garbage,4,2           ; @mips_syn_garbage
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Debug protocol failure:  more than %d characters before a sync."

	.comm	_HDR_LENGTH,4,2                 ; @HDR_LENGTH
	.no_dead_strip	_mips_receive_header
.subsections_via_symbols
