	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	-1(%rdi), %r14
	movq	_sds_timeout@GOTPCREL(%rip), %rbx
	movq	_PBUFSIZ@GOTPCREL(%rip), %r13
	movq	%rdi, %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_readchar
	cmpl	$13, %eax
	je	LBB0_1
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$10, %eax
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$36, %eax
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$128, %eax
	je	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	(%r13), %rcx
	addq	%r14, %rcx
	cmpq	%rcx, %r12
	jae	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movb	%al, (%r12)
	incq	%r12
	jmp	LBB0_1
LBB0_7:
	movb	$0, (%r12)
	movq	_remote_debug@GOTPCREL(%rip), %rax
	movl	$1, %r14d
	cmpl	$0, (%rax)
	je	LBB0_14
## %bb.8:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdx
	callq	_fprintf_unfiltered
	jmp	LBB0_14
LBB0_9:
	movq	_remote_debug@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	$0, (%rax)
	je	LBB0_14
## %bb.10:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_13
LBB0_11:
	movq	_remote_debug@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	$0, (%rax)
	je	LBB0_14
## %bb.12:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
LBB0_13:
	callq	_fputs_filtered
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movb	$0, (%r12)
	leaq	L_.str.3(%rip), %rdi
	callq	_puts_filtered
	movq	%r15, %rdi
	callq	_puts_filtered
	leaq	L_.str.4(%rip), %rdi
	callq	_puts_filtered
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_sds_timeout,4,2                ## @sds_timeout
	.comm	_remote_debug,4,2               ## @remote_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout in mid-message, 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	"Received encoded: \"%s\"\n"

	.comm	_PBUFSIZ,4,2                    ## @PBUFSIZ
L_.str.3:                               ## @.str.3
	.asciz	"Message too long: "

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

	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	sub	x21, x0, #1
Lloh0:
	adrp	x22, _sds_timeout@GOTPAGE
Lloh1:
	ldr	x22, [x22, _sds_timeout@GOTPAGEOFF]
Lloh2:
	adrp	x23, _PBUFSIZ@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PBUFSIZ@GOTPAGEOFF]
	mov	x20, x0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_readchar
	cmp	w0, #13
	b.eq	LBB0_1
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #10
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #36
	b.eq	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #128
	b.eq	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldrsw	x8, [x23]
	add	x8, x21, x8
	cmp	x20, x8
	b.hs	LBB0_17
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	strb	w0, [x20], #1
	b	LBB0_1
LBB0_7:
	strb	wzr, [x20]
Lloh4:
	adrp	x8, _remote_debug@GOTPAGE
Lloh5:
	ldr	x8, [x8, _remote_debug@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cbz	w8, LBB0_16
; %bb.8:
Lloh7:
	adrp	x8, _gdb_stdlog@GOTPAGE
Lloh8:
	ldr	x8, [x8, _gdb_stdlog@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_fprintf_unfiltered
	mov	w0, #1
	b	LBB0_15
LBB0_9:
Lloh12:
	adrp	x8, _remote_debug@GOTPAGE
Lloh13:
	ldr	x8, [x8, _remote_debug@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cbz	w8, LBB0_14
; %bb.10:
Lloh15:
	adrp	x8, _gdb_stdlog@GOTPAGE
Lloh16:
	ldr	x8, [x8, _gdb_stdlog@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_11:
Lloh20:
	adrp	x8, _remote_debug@GOTPAGE
Lloh21:
	ldr	x8, [x8, _remote_debug@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cbz	w8, LBB0_14
; %bb.12:
Lloh23:
	adrp	x8, _gdb_stdlog@GOTPAGE
Lloh24:
	ldr	x8, [x8, _gdb_stdlog@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x0, l_.str@PAGE
Lloh27:
	add	x0, x0, l_.str@PAGEOFF
LBB0_13:
	bl	_fputs_filtered
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_16:
	mov	w0, #1
	b	LBB0_15
LBB0_17:
	strb	wzr, [x20]
Lloh28:
	adrp	x0, l_.str.3@PAGE
Lloh29:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_puts_filtered
	mov	x0, x19
	bl	_puts_filtered
Lloh30:
	adrp	x0, l_.str.4@PAGE
Lloh31:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_puts_filtered
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.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 AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_sds_timeout,4,2                ; @sds_timeout
	.comm	_remote_debug,4,2               ; @remote_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout in mid-message, 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	"Received encoded: \"%s\"\n"

	.comm	_PBUFSIZ,4,2                    ; @PBUFSIZ
l_.str.3:                               ; @.str.3
	.asciz	"Message too long: "

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

	.no_dead_strip	_read_frame
.subsections_via_symbols
