	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_frame
_read_frame:                            ## @read_frame
	.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	%rdi, %r14
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	leaq	-1(%rsi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	_remote_timeout@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_readchar
	cmpl	$41, %eax
	jle	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$42, %eax
	jne	LBB0_7
## %bb.24:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %edi
	callq	_readchar
                                        ## kill: def $eax killed $eax def $rax
	leal	-29(%rax), %edx
	leal	-30(%rax), %ecx
	cmpl	$254, %ecx
	ja	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_1 Depth=1
	testq	%r15, %r15
	jle	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_1 Depth=1
	movslq	%edx, %rbx
	addq	%r15, %rbx
	cmpq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	jge	LBB0_27
## %bb.28:                              ##   in Loop: Header=BB0_1 Depth=1
	addb	%al, %r13b
	addb	$42, %r13b
	leaq	(%r14,%r15), %rdi
	movsbl	-1(%r14,%r15), %esi
	callq	_memset
	movq	%rbx, %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$35, %eax
	je	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$36, %eax
	jne	LBB0_29
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$128, %eax
	je	LBB0_8
LBB0_29:                                ##   in Loop: Header=BB0_1 Depth=1
	cmpq	-56(%rbp), %r15                 ## 8-byte Folded Reload
	jge	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_1 Depth=1
	movb	%al, (%r14,%r15)
	incq	%r15
	addb	%al, %r13b
	jmp	LBB0_1
LBB0_27:
	movb	$0, (%r14,%r15)
	leaq	L_.str.6(%rip), %rdi
	movl	%edx, %esi
	callq	_printf_filtered
	jmp	LBB0_32
LBB0_10:
	movb	$0, (%r14,%r15)
	movl	(%r12), %edi
	callq	_readchar
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	movl	(%r12), %edi
	callq	_readchar
	movl	%eax, %r12d
	cmpl	$128, %ebx
	jne	LBB0_14
	jmp	LBB0_15
LBB0_4:
	movq	_remote_debug@GOTPCREL(%rip), %rax
	movq	$-1, %r15
	cmpl	$0, (%rax)
	je	LBB0_33
## %bb.5:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_fputs_filtered
	jmp	LBB0_33
LBB0_8:
	movq	_remote_debug@GOTPCREL(%rip), %rax
	movq	$-1, %r15
	cmpl	$0, (%rax)
	je	LBB0_33
## %bb.9:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_fputs_filtered
	jmp	LBB0_33
LBB0_31:
	movb	$0, (%r14,%r15)
	leaq	L_.str.7(%rip), %rdi
	callq	_puts_filtered
LBB0_32:
	movq	%r14, %rdi
	callq	_puts_filtered
	leaq	L_.str.5(%rip), %rdi
	callq	_puts_filtered
	movq	$-1, %r15
LBB0_33:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%r12d, %r12d
	cmpl	$128, %ebx
	je	LBB0_15
LBB0_14:
	cmpl	$128, %r12d
	je	LBB0_15
## %bb.17:
	testl	%ebx, %ebx
	js	LBB0_19
## %bb.18:
	testl	%r12d, %r12d
	js	LBB0_19
## %bb.21:
	movl	%ebx, %edi
	callq	_fromhex
	movl	%eax, %ebx
	shll	$4, %ebx
	movl	%r12d, %edi
	callq	_fromhex
	orl	%ebx, %eax
	cmpb	%al, %r13b
	je	LBB0_33
## %bb.22:
	movq	_remote_debug@GOTPCREL(%rip), %rcx
	movq	$-1, %r15
	cmpl	$0, (%rcx)
	je	LBB0_33
## %bb.23:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movzbl	%al, %edx
	movzbl	%r13b, %ecx
	leaq	L_.str.4(%rip), %rsi
	callq	_fprintf_filtered
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_fputs_filtered
	movl	(%rbx), %esi
	leaq	L_.str.5(%rip), %rdi
	callq	_fputs_filtered
	jmp	LBB0_33
LBB0_15:
	movq	_remote_debug@GOTPCREL(%rip), %rax
	movq	$-1, %r15
	cmpl	$0, (%rax)
	je	LBB0_33
## %bb.16:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_fputs_filtered
	jmp	LBB0_33
LBB0_19:
	movq	_remote_debug@GOTPCREL(%rip), %rax
	movq	$-1, %r15
	cmpl	$0, (%rax)
	je	LBB0_33
## %bb.20:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
	callq	_fputs_filtered
	jmp	LBB0_33
	.cfi_endproc
                                        ## -- End function
	.comm	_remote_timeout,4,2             ## @remote_timeout
	.comm	_remote_debug,4,2               ## @remote_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout in mid-packet, retrying\n"

	.comm	_gdb_stdlog,4,2                 ## @gdb_stdlog
L_.str.1:                               ## @.str.1
	.asciz	"Saw new packet start in middle of old one\n"

L_.str.2:                               ## @.str.2
	.asciz	"Timeout in checksum, retrying\n"

L_.str.3:                               ## @.str.3
	.asciz	"Communication error in checksum\n"

L_.str.4:                               ## @.str.4
	.asciz	"Bad checksum, sentsum=0x%x, csum=0x%x, buf="

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

L_.str.6:                               ## @.str.6
	.asciz	"Repeat count %d too large for buffer: "

L_.str.7:                               ## @.str.7
	.asciz	"Remote packet too long: "

	.no_dead_strip	_read_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_frame
_read_frame:                            ; @read_frame
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x1
	mov	x20, x0
	mov	x19, #0
	mov	w23, #0
	sub	x24, x1, #1
Lloh0:
	adrp	x22, _remote_timeout@GOTPAGE
Lloh1:
	ldr	x22, [x22, _remote_timeout@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_readchar
	cmp	w0, #41
	b.le	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #42
	b.ne	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x22]
	bl	_readchar
	sub	w2, w0, #29
	sub	w8, w0, #30
	cmp	w8, #254
	ccmp	x19, #1, #8, ls
	add	x25, x19, w2, sxtw
	ccmp	x25, x21, #0, ge
	b.ge	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w8, w23, w0
	add	w23, w8, #42
	add	x0, x20, x19
	ldursb	w1, [x0, #-1]
	bl	_memset
	mov	x19, x25
	b	LBB0_1
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #35
	b.eq	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #36
	b.ne	LBB0_8
	b	LBB0_13
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #128
	b.eq	LBB0_15
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	cmp	x19, x24
	b.ge	LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_1 Depth=1
	strb	w0, [x20, x19]
	add	x19, x19, #1
	add	w23, w23, w0
	b	LBB0_1
LBB0_10:
	strb	wzr, [x20, x19]
Lloh2:
	adrp	x0, l_.str.6@PAGE
Lloh3:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x2
	bl	_printf_filtered
	b	LBB0_18
LBB0_11:
	strb	wzr, [x20, x19]
	ldr	w0, [x22]
	bl	_readchar
	mov	x21, x0
	tbnz	w0, #31, LBB0_21
; %bb.12:
	ldr	w0, [x22]
	bl	_readchar
	mov	x22, x0
	cmp	w21, #128
	b.ne	LBB0_22
	b	LBB0_28
LBB0_13:
Lloh4:
	adrp	x8, _remote_debug@GOTPAGE
Lloh5:
	ldr	x8, [x8, _remote_debug@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cbz	w8, LBB0_19
; %bb.14:
Lloh7:
	adrp	x8, _gdb_stdlog@GOTPAGE
Lloh8:
	ldr	x8, [x8, _gdb_stdlog@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fputs_filtered
	b	LBB0_19
LBB0_15:
Lloh12:
	adrp	x8, _remote_debug@GOTPAGE
Lloh13:
	ldr	x8, [x8, _remote_debug@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cbz	w8, LBB0_19
; %bb.16:
Lloh15:
	adrp	x8, _gdb_stdlog@GOTPAGE
Lloh16:
	ldr	x8, [x8, _gdb_stdlog@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fputs_filtered
	b	LBB0_19
LBB0_17:
	strb	wzr, [x20, x19]
Lloh20:
	adrp	x0, l_.str.7@PAGE
Lloh21:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_puts_filtered
LBB0_18:
	mov	x0, x20
	bl	_puts_filtered
Lloh22:
	adrp	x0, l_.str.5@PAGE
Lloh23:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_puts_filtered
LBB0_19:
	mov	x19, #-1
LBB0_20:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_21:
	mov	w22, #0
	cmp	w21, #128
	b.eq	LBB0_28
LBB0_22:
	cmp	w22, #128
	b.eq	LBB0_28
; %bb.23:
	tbnz	w21, #31, LBB0_30
; %bb.24:
	tbnz	w22, #31, LBB0_30
; %bb.25:
	mov	x0, x21
	bl	_fromhex
	mov	x21, x0
	mov	x0, x22
	bl	_fromhex
	orr	w8, w0, w21, lsl #4
	and	w9, w23, #0xff
	cmp	w9, w8, uxtb
	b.eq	LBB0_20
; %bb.26:
Lloh24:
	adrp	x9, _remote_debug@GOTPAGE
Lloh25:
	ldr	x9, [x9, _remote_debug@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	cbz	w9, LBB0_19
; %bb.27:
Lloh27:
	adrp	x19, _gdb_stdlog@GOTPAGE
Lloh28:
	ldr	x19, [x19, _gdb_stdlog@GOTPAGEOFF]
	ldr	w0, [x19]
	and	w2, w8, #0xff
	and	w3, w23, #0xff
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf_filtered
	ldr	w1, [x19]
	mov	x0, x20
	bl	_fputs_filtered
	ldr	w1, [x19]
Lloh31:
	adrp	x0, l_.str.5@PAGE
Lloh32:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_fputs_filtered
	b	LBB0_19
LBB0_28:
Lloh33:
	adrp	x8, _remote_debug@GOTPAGE
Lloh34:
	ldr	x8, [x8, _remote_debug@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	cbz	w8, LBB0_19
; %bb.29:
Lloh36:
	adrp	x8, _gdb_stdlog@GOTPAGE
Lloh37:
	ldr	x8, [x8, _gdb_stdlog@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x0, l_.str.2@PAGE
Lloh40:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_fputs_filtered
	b	LBB0_19
LBB0_30:
Lloh41:
	adrp	x8, _remote_debug@GOTPAGE
Lloh42:
	ldr	x8, [x8, _remote_debug@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	cbz	w8, LBB0_19
; %bb.31:
Lloh44:
	adrp	x8, _gdb_stdlog@GOTPAGE
Lloh45:
	ldr	x8, [x8, _gdb_stdlog@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
Lloh47:
	adrp	x0, l_.str.3@PAGE
Lloh48:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_fputs_filtered
	b	LBB0_19
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_remote_timeout,4,2             ; @remote_timeout
	.comm	_remote_debug,4,2               ; @remote_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout in mid-packet, retrying\n"

	.comm	_gdb_stdlog,4,2                 ; @gdb_stdlog
l_.str.1:                               ; @.str.1
	.asciz	"Saw new packet start in middle of old one\n"

l_.str.2:                               ; @.str.2
	.asciz	"Timeout in checksum, retrying\n"

l_.str.3:                               ; @.str.3
	.asciz	"Communication error in checksum\n"

l_.str.4:                               ; @.str.4
	.asciz	"Bad checksum, sentsum=0x%x, csum=0x%x, buf="

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

l_.str.6:                               ; @.str.6
	.asciz	"Repeat count %d too large for buffer: "

l_.str.7:                               ; @.str.7
	.asciz	"Remote packet too long: "

	.no_dead_strip	_read_frame
.subsections_via_symbols
