	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mips_send_packet
_mips_send_packet:                      ## @mips_send_packet
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -80(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_strlen
	movl	%eax, %r12d
	movq	_DATA_MAXLEN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jle	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_mips_error
LBB0_2:
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rcx
	movq	_TRLR_LENGTH@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	(%rcx), %ecx
	addl	%r12d, %ecx
	leal	(%rax,%rcx), %edi
	incl	%edi
	callq	_alloca
	movq	%rax, %rbx
	movq	_mips_send_seq@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	$1, %edi
	movl	%r12d, %esi
	callq	_HDR_SET_SYN
	movq	_HDR_INDX_SYN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movb	%al, (%rbx,%rcx)
	movl	(%r15), %edx
	movl	$1, %edi
	movl	%r12d, %esi
	callq	_HDR_SET_TYPE_LEN
	movq	_HDR_INDX_TYPE_LEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movb	%al, (%rbx,%rcx)
	movl	(%r15), %edx
	movl	$1, %edi
	movl	%r12d, %esi
	callq	_HDR_SET_LEN1
	movq	_HDR_INDX_LEN1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movb	%al, (%rbx,%rcx)
	movl	(%r15), %edx
	movl	$1, %edi
	movl	%r12d, %esi
	callq	_HDR_SET_SEQ
	movq	_HDR_INDX_SEQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movb	%al, (%rbx,%rcx)
	movq	_HDR_LENGTH@GOTPCREL(%rip), %r15
	movslq	(%r15), %rdi
	addq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movslq	(%r15), %rsi
	addq	%rbx, %rsi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_mips_cksum
	movq	%rax, %r14
	movl	%r14d, %edi
	callq	_TRLR_SET_CSUM1
	movslq	(%r15), %rcx
	movl	%r12d, %r15d
	movslq	%r12d, %r12
	addq	%r12, %rcx
	movq	_TRLR_INDX_CSUM1@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	addq	%rcx, %rdx
	movb	%al, (%rbx,%rdx)
	movl	%r14d, %edi
	callq	_TRLR_SET_CSUM2
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	addq	%r12, %rcx
	movq	_TRLR_INDX_CSUM2@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	addq	%rcx, %rdx
	movb	%al, (%rbx,%rdx)
	movl	%r14d, %edi
	movq	%rbx, %r14
	callq	_TRLR_SET_CSUM3
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rsi
	movslq	(%rsi), %rcx
	addq	%r12, %rcx
	movq	_TRLR_INDX_CSUM3@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	addq	%rcx, %rdx
	movb	%al, (%rbx,%rdx)
	movq	_mips_send_seq@GOTPCREL(%rip), %rdi
	movl	(%rdi), %eax
	incl	%eax
	movq	_SEQ_MODULOS@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%edx, (%rdi)
	movq	_mips_send_retries@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_37
## %bb.3:
	movl	%r15d, %ebx
	movq	%r14, %rax
	incq	%rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	-52(%rbp), %r12
	xorl	%r15d, %r15d
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %r14d
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-72(%rbp), %rsp                 ## 8-byte Reload
	movl	-84(%rbp), %r15d                ## 4-byte Reload
	incl	%r15d
	movl	%r14d, %ebx
	movq	_mips_send_retries@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	movq	-104(%rbp), %r14                ## 8-byte Reload
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rsi
	jge	LBB0_37
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
                                        ##       Child Loop BB0_20 Depth 3
	movq	_remote_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movslq	(%rsi), %rax
	movslq	%ebx, %rcx
	addq	%rax, %rcx
	movslq	(%r13), %rax
	addq	%rcx, %rax
	movb	$0, (%r14,%rax)
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_fprintf_unfiltered
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rsi
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_mips_desc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rsi), %edx
	addl	%ebx, %edx
	addl	(%r13), %edx
	movq	%r14, %rsi
	callq	_serial_write
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_safe_strerror
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_mips_error
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$0, -80(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_38
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%r15d, -84(%rbp)                ## 4-byte Spill
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movl	$0, -52(%rbp)
	movl	$0, -56(%rbp)
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movl	(%r13), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	-56(%rbp), %edx
	movq	_mips_retransmit_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_mips_receive_header
	testl	%eax, %eax
	jne	LBB0_4
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_17 Depth=2
	testl	%r14d, %r14d
	je	LBB0_24
## %bb.14:                              ##   in Loop: Header=BB0_17 Depth=2
	movl	%ebx, %r14d
	movq	%r12, %r13
	leaq	-52(%rbp), %r12
LBB0_15:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rax
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	-72(%rbp), %rsp                 ## 8-byte Reload
	movl	(%rax), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movl	(%r13), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movl	-56(%rbp), %edx
	movq	_mips_retransmit_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_mips_receive_header
	movl	%r14d, %ebx
	testl	%eax, %eax
	jne	LBB0_5
LBB0_17:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_20 Depth 3
	movq	%r13, %r12
	movl	$0, -56(%rbp)
	movq	%r15, %rdi
	callq	_HDR_IS_DATA
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_HDR_GET_LEN
	movl	%eax, %r14d
	testq	%r13, %r13
	je	LBB0_13
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=2
	testl	%r14d, %r14d
	movq	_remote_timeout@GOTPCREL(%rip), %r15
	jle	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=2
	xorl	%ebx, %ebx
	movq	%r12, %r13
	leaq	-52(%rbp), %r12
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_6 Depth=1
                                        ##     Parent Loop BB0_17 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%r15), %edi
	callq	_mips_readchar
	movq	_SYN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_26
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=3
	movq	_SERIAL_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_27
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=3
	incl	%ebx
	cmpl	%ebx, %r14d
	jne	LBB0_20
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_17 Depth=2
	xorl	%ebx, %ebx
	movq	%r12, %r13
	leaq	-52(%rbp), %r12
LBB0_27:                                ##   in Loop: Header=BB0_17 Depth=2
	cmpl	%r14d, %ebx
	jne	LBB0_15
	jmp	LBB0_28
LBB0_24:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	_mips_retransmit_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	leaq	-52(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	callq	_mips_receive_trailer
	testl	%eax, %eax
	movq	%r12, %r13
	je	LBB0_29
## %bb.25:                              ##   in Loop: Header=BB0_17 Depth=2
	movl	%ebx, %r14d
	cmpl	$-1, %eax
	leaq	-52(%rbp), %r12
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rax
	jne	LBB0_16
	jmp	LBB0_4
LBB0_26:                                ##   in Loop: Header=BB0_17 Depth=2
	movl	%eax, -56(%rbp)
	cmpl	%r14d, %ebx
	jne	LBB0_15
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_17 Depth=2
	movl	(%r15), %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	leaq	-56(%rbp), %rdx
	callq	_mips_receive_trailer
	jmp	LBB0_15
LBB0_29:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mips_cksum
	movq	%r14, %rdi
	movq	%rax, %r14
	callq	_TRLR_GET_CKSUM
	cmpq	%rax, %r14
	movl	%ebx, %r14d
	jne	LBB0_35
## %bb.30:                              ##   in Loop: Header=BB0_17 Depth=2
	movq	_remote_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rbx
	leaq	-52(%rbp), %r12
	jle	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_17 Depth=2
	movslq	(%rbx), %rax
	movb	$0, (%r15,%rax)
	movslq	(%r13), %rax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movb	$0, (%rbx,%rax)
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_HDR_GET_SEQ
	leaq	1(%r15), %rcx
	movl	-76(%rbp), %edi                 ## 4-byte Reload
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	movq	%rbx, %r8
	xorl	%eax, %eax
	callq	_fprintf_unfiltered
LBB0_32:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	%r15, %rdi
	callq	_HDR_GET_SEQ
	movq	_mips_send_seq@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	je	LBB0_40
## %bb.33:                              ##   in Loop: Header=BB0_17 Depth=2
	incl	%eax
	xorl	%edx, %edx
	movq	_SEQ_MODULOS@GOTPCREL(%rip), %rsi
	divl	(%rsi)
	cmpl	%ecx, %edx
	je	LBB0_5
## %bb.34:                              ##   in Loop: Header=BB0_17 Depth=2
	incl	-52(%rbp)
	jmp	LBB0_15
LBB0_35:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	_HDR_LENGTH@GOTPCREL(%rip), %rax
	leaq	-52(%rbp), %r12
	jmp	LBB0_16
LBB0_37:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_mips_error
LBB0_38:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_41
## %bb.39:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_40:
	movq	-72(%rbp), %rsp                 ## 8-byte Reload
	jmp	LBB0_38
LBB0_41:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DATA_MAXLEN,4,2                ## @DATA_MAXLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MIPS protocol data packet too long: %s"

	.comm	_HDR_LENGTH,4,2                 ## @HDR_LENGTH
	.comm	_TRLR_LENGTH,4,2                ## @TRLR_LENGTH
	.comm	_mips_send_seq,4,2              ## @mips_send_seq
	.comm	_HDR_INDX_SYN,8,3               ## @HDR_INDX_SYN
	.comm	_HDR_INDX_TYPE_LEN,8,3          ## @HDR_INDX_TYPE_LEN
	.comm	_HDR_INDX_LEN1,8,3              ## @HDR_INDX_LEN1
	.comm	_HDR_INDX_SEQ,8,3               ## @HDR_INDX_SEQ
	.comm	_TRLR_INDX_CSUM1,4,2            ## @TRLR_INDX_CSUM1
	.comm	_TRLR_INDX_CSUM2,4,2            ## @TRLR_INDX_CSUM2
	.comm	_TRLR_INDX_CSUM3,4,2            ## @TRLR_INDX_CSUM3
	.comm	_SEQ_MODULOS,4,2                ## @SEQ_MODULOS
	.comm	_mips_send_retries,4,2          ## @mips_send_retries
	.comm	_remote_debug,8,3               ## @remote_debug
	.comm	_gdb_stdlog,4,2                 ## @gdb_stdlog
L_.str.1:                               ## @.str.1
	.asciz	"Writing \"%s\"\n"

	.comm	_mips_desc,4,2                  ## @mips_desc
L_.str.2:                               ## @.str.2
	.asciz	"write to target failed: %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_mips_retransmit_wait,4,2       ## @mips_retransmit_wait
	.comm	_remote_timeout,4,2             ## @remote_timeout
	.comm	_SYN,4,2                        ## @SYN
	.comm	_SERIAL_TIMEOUT,4,2             ## @SERIAL_TIMEOUT
L_.str.3:                               ## @.str.3
	.asciz	"Got ack %d \"%s%s\"\n"

L_.str.4:                               ## @.str.4
	.asciz	"Remote did not acknowledge packet"

	.no_dead_strip	_mips_send_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mips_send_packet
_mips_send_packet:                      ; @mips_send_packet
	.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
	sub	sp, sp, #48
	stur	w1, [x29, #-104]                ; 4-byte Folded Spill
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_strlen
	mov	x21, x0
Lloh3:
	adrp	x8, _DATA_MAXLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DATA_MAXLEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.le	LBB0_2
; %bb.1:
	str	x22, [sp, #-16]!
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mips_error
	add	sp, sp, #16
LBB0_2:
Lloh8:
	adrp	x28, _HDR_LENGTH@GOTPAGE
Lloh9:
	ldr	x28, [x28, _HDR_LENGTH@GOTPAGEOFF]
	ldr	w8, [x28]
Lloh10:
	adrp	x20, _TRLR_LENGTH@GOTPAGE
Lloh11:
	ldr	x20, [x20, _TRLR_LENGTH@GOTPAGEOFF]
	ldr	w9, [x20]
	add	w8, w21, w8
	add	w8, w8, w9
	add	w0, w8, #1
	bl	_alloca
	mov	x23, x0
Lloh12:
	adrp	x24, _mips_send_seq@GOTPAGE
Lloh13:
	ldr	x24, [x24, _mips_send_seq@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	w0, #1
	mov	x1, x21
	bl	_HDR_SET_SYN
Lloh14:
	adrp	x8, _HDR_INDX_SYN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HDR_INDX_SYN@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	strb	w0, [x23, x8]
	ldr	w2, [x24]
	mov	w0, #1
	mov	x1, x21
	bl	_HDR_SET_TYPE_LEN
Lloh17:
	adrp	x8, _HDR_INDX_TYPE_LEN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HDR_INDX_TYPE_LEN@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	strb	w0, [x23, x8]
	ldr	w2, [x24]
	mov	w0, #1
	mov	x1, x21
	bl	_HDR_SET_LEN1
Lloh20:
	adrp	x8, _HDR_INDX_LEN1@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HDR_INDX_LEN1@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	strb	w0, [x23, x8]
	ldr	w2, [x24]
	mov	w0, #1
	mov	x1, x21
	bl	_HDR_SET_SEQ
Lloh23:
	adrp	x8, _HDR_INDX_SEQ@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HDR_INDX_SEQ@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	strb	w0, [x23, x8]
	ldrsw	x8, [x28]
	add	x0, x23, x8
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	ldrsw	x8, [x28]
	add	x1, x23, x8
	mov	x0, x23
	mov	x2, x21
	bl	_mips_cksum
	mov	x22, x0
	bl	_TRLR_SET_CSUM1
	ldrsw	x8, [x28]
Lloh26:
	adrp	x9, _TRLR_INDX_CSUM1@GOTPAGE
Lloh27:
	ldr	x9, [x9, _TRLR_INDX_CSUM1@GOTPAGEOFF]
	sxtw	x19, w21
Lloh28:
	ldrsw	x9, [x9]
	add	x8, x8, x19
	add	x8, x8, x9
	strb	w0, [x23, x8]
	mov	x0, x22
	bl	_TRLR_SET_CSUM2
Lloh29:
	adrp	x8, _TRLR_INDX_CSUM2@GOTPAGE
Lloh30:
	ldr	x8, [x8, _TRLR_INDX_CSUM2@GOTPAGEOFF]
	ldrsw	x9, [x28]
Lloh31:
	ldrsw	x8, [x8]
	add	x9, x9, x19
	add	x8, x9, x8
	strb	w0, [x23, x8]
	mov	x0, x22
	mov	x22, x20
	bl	_TRLR_SET_CSUM3
Lloh32:
	adrp	x8, _TRLR_INDX_CSUM3@GOTPAGE
Lloh33:
	ldr	x8, [x8, _TRLR_INDX_CSUM3@GOTPAGEOFF]
	ldrsw	x9, [x28]
Lloh34:
	ldrsw	x8, [x8]
	add	x9, x9, x19
	add	x8, x9, x8
	strb	w0, [x23, x8]
	ldr	w8, [x24]
	add	w8, w8, #1
Lloh35:
	adrp	x9, _SEQ_MODULOS@GOTPAGE
Lloh36:
	ldr	x9, [x9, _SEQ_MODULOS@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x24]
Lloh38:
	adrp	x8, _mips_send_retries@GOTPAGE
Lloh39:
	ldr	x8, [x8, _mips_send_retries@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_34
; %bb.3:
	mov	w19, #0
	add	x8, x23, #1
	stur	x8, [x29, #-120]                ; 8-byte Folded Spill
Lloh41:
	adrp	x20, _remote_timeout@GOTPAGE
Lloh42:
	ldr	x20, [x20, _remote_timeout@GOTPAGEOFF]
Lloh43:
	adrp	x24, _SYN@GOTPAGE
Lloh44:
	ldr	x24, [x24, _SYN@GOTPAGEOFF]
	stur	x23, [x29, #-112]               ; 8-byte Folded Spill
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x27, x21
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	sp, x19
	ldur	w19, [x29, #-100]               ; 4-byte Folded Reload
	add	w19, w19, #1
Lloh45:
	adrp	x8, _mips_send_retries@GOTPAGE
Lloh46:
	ldr	x8, [x8, _mips_send_retries@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	mov	x21, x27
	cmp	w19, w8
	ldur	x23, [x29, #-112]               ; 8-byte Folded Reload
	b.ge	LBB0_34
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
                                        ;       Child Loop BB0_18 Depth 3
Lloh48:
	adrp	x8, _remote_debug@GOTPAGE
Lloh49:
	ldr	x8, [x8, _remote_debug@GOTPAGEOFF]
Lloh50:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrsw	x8, [x28]
	add	x8, x8, w21, sxtw
	ldrsw	x9, [x22]
	add	x8, x8, x9
	strb	wzr, [x23, x8]
Lloh51:
	adrp	x8, _gdb_stdlog@GOTPAGE
Lloh52:
	ldr	x8, [x8, _gdb_stdlog@GOTPAGEOFF]
Lloh53:
	ldr	w0, [x8]
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	str	x8, [sp, #-16]!
Lloh54:
	adrp	x1, l_.str.1@PAGE
Lloh55:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf_unfiltered
	add	sp, sp, #16
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
Lloh56:
	adrp	x8, _mips_desc@GOTPAGE
Lloh57:
	ldr	x8, [x8, _mips_desc@GOTPAGEOFF]
Lloh58:
	ldr	w0, [x8]
	ldr	w8, [x28]
	ldr	w9, [x22]
	add	w8, w8, w21
	add	w2, w8, w9
	mov	x1, x23
	bl	_serial_write
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh59:
	adrp	x8, _errno@GOTPAGE
Lloh60:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh61:
	ldr	w0, [x8]
	bl	_safe_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh62:
	adrp	x0, l_.str.2@PAGE
Lloh63:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_mips_error
	add	sp, sp, #16
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldur	w8, [x29, #-104]                ; 4-byte Folded Reload
	cbz	w8, LBB0_35
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	stur	w19, [x29, #-100]               ; 4-byte Folded Spill
	mov	x19, sp
	stur	xzr, [x29, #-96]
	ldr	w8, [x28]
	add	w8, w8, #1
	mov	x9, x8
Lloh64:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh65:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x26, x9, x8
	mov	sp, x26
	ldr	w8, [x22]
	add	w8, w8, #1
	mov	x9, x8
Lloh66:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh67:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x25, x9, x8
	mov	sp, x25
	ldur	w2, [x29, #-96]
Lloh68:
	adrp	x8, _mips_retransmit_wait@GOTPAGE
Lloh69:
	ldr	x8, [x8, _mips_retransmit_wait@GOTPAGEOFF]
Lloh70:
	ldr	w3, [x8]
	sub	x1, x29, #92
	mov	x0, x26
	bl	_mips_receive_header
	cbnz	w0, LBB0_4
	b	LBB0_15
LBB0_12:                                ;   in Loop: Header=BB0_15 Depth=2
	cbz	w27, LBB0_23
; %bb.13:                               ;   in Loop: Header=BB0_15 Depth=2
	mov	x27, x21
	mov	x28, x22
	mov	x22, x23
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=2
	mov	sp, x19
	mov	x19, sp
	ldr	w8, [x28]
	add	w8, w8, #1
	mov	x9, x8
Lloh71:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh72:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x26, x9, x8
	mov	sp, x26
	ldr	w8, [x22]
	add	w8, w8, #1
	mov	x9, x8
Lloh73:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh74:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x25, x9, x8
	mov	sp, x25
	ldur	w2, [x29, #-96]
Lloh75:
	adrp	x8, _mips_retransmit_wait@GOTPAGE
Lloh76:
	ldr	x8, [x8, _mips_retransmit_wait@GOTPAGEOFF]
Lloh77:
	ldr	w3, [x8]
	sub	x1, x29, #92
	mov	x0, x26
	bl	_mips_receive_header
	mov	x21, x27
	cbnz	w0, LBB0_5
LBB0_15:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_18 Depth 3
	mov	x23, x22
	mov	x22, x28
	stur	wzr, [x29, #-96]
	mov	x0, x26
	bl	_HDR_IS_DATA
	mov	x28, x0
	mov	x0, x26
	bl	_HDR_GET_LEN
	mov	x27, x0
	cbz	x28, LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	cmp	w27, #1
	b.lt	LBB0_21
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=2
	mov	w21, #0
	mov	x28, x22
	mov	x22, x23
Lloh78:
	adrp	x23, _SERIAL_TIMEOUT@GOTPAGE
Lloh79:
	ldr	x23, [x23, _SERIAL_TIMEOUT@GOTPAGEOFF]
LBB0_18:                                ;   Parent Loop BB0_6 Depth=1
                                        ;     Parent Loop BB0_15 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w0, [x20]
	bl	_mips_readchar
	ldr	w8, [x24]
	cmp	w0, w8
	b.eq	LBB0_25
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=3
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_22
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=3
	add	w21, w21, #1
	cmp	w27, w21
	b.ne	LBB0_18
	b	LBB0_26
LBB0_21:                                ;   in Loop: Header=BB0_15 Depth=2
	mov	w21, #0
	mov	x28, x22
	mov	x22, x23
LBB0_22:                                ;   in Loop: Header=BB0_15 Depth=2
	cmp	w21, w27
	b.ne	LBB0_14
	b	LBB0_26
LBB0_23:                                ;   in Loop: Header=BB0_15 Depth=2
Lloh80:
	adrp	x8, _mips_retransmit_wait@GOTPAGE
Lloh81:
	ldr	x8, [x8, _mips_retransmit_wait@GOTPAGEOFF]
Lloh82:
	ldr	w3, [x8]
	sub	x1, x29, #92
	sub	x2, x29, #96
	mov	x0, x25
	bl	_mips_receive_trailer
	mov	x28, x22
	cbz	w0, LBB0_27
; %bb.24:                               ;   in Loop: Header=BB0_15 Depth=2
	mov	x27, x21
	cmn	w0, #1
	mov	x22, x23
	b.ne	LBB0_14
	b	LBB0_4
LBB0_25:                                ;   in Loop: Header=BB0_15 Depth=2
	stur	w0, [x29, #-96]
	cmp	w21, w27
	b.ne	LBB0_14
LBB0_26:                                ;   in Loop: Header=BB0_15 Depth=2
	ldr	w3, [x20]
	sub	x1, x29, #92
	sub	x2, x29, #96
	mov	x0, x25
	bl	_mips_receive_trailer
	b	LBB0_14
LBB0_27:                                ;   in Loop: Header=BB0_15 Depth=2
	mov	x0, x26
	mov	x1, #0
	mov	w2, #0
	bl	_mips_cksum
	mov	x27, x0
	mov	x0, x25
	bl	_TRLR_GET_CKSUM
	cmp	x27, x0
	mov	x22, x23
	b.ne	LBB0_33
; %bb.28:                               ;   in Loop: Header=BB0_15 Depth=2
Lloh83:
	adrp	x8, _remote_debug@GOTPAGE
Lloh84:
	ldr	x8, [x8, _remote_debug@GOTPAGEOFF]
Lloh85:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_15 Depth=2
	ldrsw	x8, [x28]
	strb	wzr, [x26, x8]
	ldrsw	x8, [x22]
	strb	wzr, [x25, x8]
Lloh86:
	adrp	x8, _gdb_stdlog@GOTPAGE
Lloh87:
	ldr	x8, [x8, _gdb_stdlog@GOTPAGEOFF]
Lloh88:
	ldr	w27, [x8]
	mov	x0, x26
	bl	_HDR_GET_SEQ
                                        ; kill: def $w0 killed $w0 def $x0
	add	x8, x26, #1
	sub	sp, sp, #32
	stp	x8, x25, [sp, #8]
	str	x0, [sp]
	mov	x0, x27
Lloh89:
	adrp	x1, l_.str.3@PAGE
Lloh90:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf_unfiltered
	add	sp, sp, #32
LBB0_30:                                ;   in Loop: Header=BB0_15 Depth=2
	mov	x0, x26
	bl	_HDR_GET_SEQ
Lloh91:
	adrp	x8, _mips_send_seq@GOTPAGE
Lloh92:
	ldr	x8, [x8, _mips_send_seq@GOTPAGEOFF]
Lloh93:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_37
; %bb.31:                               ;   in Loop: Header=BB0_15 Depth=2
	add	w9, w0, #1
Lloh94:
	adrp	x10, _SEQ_MODULOS@GOTPAGE
Lloh95:
	ldr	x10, [x10, _SEQ_MODULOS@GOTPAGEOFF]
Lloh96:
	ldr	w10, [x10]
	udiv	w11, w9, w10
	msub	w9, w11, w10, w9
	cmp	w9, w8
	b.eq	LBB0_4
; %bb.32:                               ;   in Loop: Header=BB0_15 Depth=2
	ldur	w8, [x29, #-92]
	add	w8, w8, #1
	stur	w8, [x29, #-92]
LBB0_33:                                ;   in Loop: Header=BB0_15 Depth=2
	mov	x27, x21
	b	LBB0_14
LBB0_34:
Lloh97:
	adrp	x0, l_.str.4@PAGE
Lloh98:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_mips_error
LBB0_35:
	ldur	x8, [x29, #-88]
Lloh99:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh100:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh101:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_38
; %bb.36:
	sub	sp, x29, #80
	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_37:
	mov	sp, x19
	b	LBB0_35
LBB0_38:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGot	Lloh73, Lloh74
	.loh AdrpLdrGot	Lloh71, Lloh72
	.loh AdrpLdrGot	Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpAdd	Lloh89, Lloh90
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh91, Lloh92, Lloh93
	.loh AdrpLdrGotLdr	Lloh94, Lloh95, Lloh96
	.loh AdrpAdd	Lloh97, Lloh98
	.loh AdrpLdrGotLdr	Lloh99, Lloh100, Lloh101
	.cfi_endproc
                                        ; -- End function
	.comm	_DATA_MAXLEN,4,2                ; @DATA_MAXLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MIPS protocol data packet too long: %s"

	.comm	_HDR_LENGTH,4,2                 ; @HDR_LENGTH
	.comm	_TRLR_LENGTH,4,2                ; @TRLR_LENGTH
	.comm	_mips_send_seq,4,2              ; @mips_send_seq
	.comm	_HDR_INDX_SYN,8,3               ; @HDR_INDX_SYN
	.comm	_HDR_INDX_TYPE_LEN,8,3          ; @HDR_INDX_TYPE_LEN
	.comm	_HDR_INDX_LEN1,8,3              ; @HDR_INDX_LEN1
	.comm	_HDR_INDX_SEQ,8,3               ; @HDR_INDX_SEQ
	.comm	_TRLR_INDX_CSUM1,4,2            ; @TRLR_INDX_CSUM1
	.comm	_TRLR_INDX_CSUM2,4,2            ; @TRLR_INDX_CSUM2
	.comm	_TRLR_INDX_CSUM3,4,2            ; @TRLR_INDX_CSUM3
	.comm	_SEQ_MODULOS,4,2                ; @SEQ_MODULOS
	.comm	_mips_send_retries,4,2          ; @mips_send_retries
	.comm	_remote_debug,8,3               ; @remote_debug
	.comm	_gdb_stdlog,4,2                 ; @gdb_stdlog
l_.str.1:                               ; @.str.1
	.asciz	"Writing \"%s\"\n"

	.comm	_mips_desc,4,2                  ; @mips_desc
l_.str.2:                               ; @.str.2
	.asciz	"write to target failed: %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_mips_retransmit_wait,4,2       ; @mips_retransmit_wait
	.comm	_remote_timeout,4,2             ; @remote_timeout
	.comm	_SYN,4,2                        ; @SYN
	.comm	_SERIAL_TIMEOUT,4,2             ; @SERIAL_TIMEOUT
l_.str.3:                               ; @.str.3
	.asciz	"Got ack %d \"%s%s\"\n"

l_.str.4:                               ; @.str.4
	.asciz	"Remote did not acknowledge packet"

	.no_dead_strip	_mips_send_packet
.subsections_via_symbols
