	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readchar
_readchar:                              ## @readchar
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edi, %esi
	movq	_sds_desc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_serial_readchar
	movl	%eax, %ebx
	movq	_remote_debug@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jl	LBB0_3
## %bb.1:
	testl	%ebx, %ebx
	js	LBB0_3
## %bb.2:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%ebx, %ecx
	callq	_fprintf_unfiltered
LBB0_3:
	cmpl	$128, %ebx
	je	LBB0_9
## %bb.4:
	cmpl	$129, %ebx
	je	LBB0_7
## %bb.5:
	cmpl	$130, %ebx
	jne	LBB0_8
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	callq	_error
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	callq	_perror_with_name
	jmp	LBB0_9
LBB0_8:
	andl	$127, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sds_desc,4,2                   ## @sds_desc
	.comm	_remote_debug,4,2               ## @remote_debug
	.comm	_gdb_stdlog,4,2                 ## @gdb_stdlog
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%c(%x)"

L_.str.1:                               ## @.str.1
	.asciz	"Remote connection closed"

L_.str.2:                               ## @.str.2
	.asciz	"Remote communication error"

	.no_dead_strip	_readchar
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readchar
_readchar:                              ; @readchar
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x1, x0
Lloh0:
	adrp	x8, _sds_desc@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sds_desc@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_serial_readchar
	mov	x19, x0
Lloh3:
	adrp	x8, _remote_debug@GOTPAGE
Lloh4:
	ldr	x8, [x8, _remote_debug@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_3
; %bb.1:
	tbnz	w19, #31, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _gdb_stdlog@GOTPAGE
Lloh7:
	ldr	x8, [x8, _gdb_stdlog@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x19
	bl	_fprintf_unfiltered
LBB0_3:
	cmp	w19, #128
	b.eq	LBB0_9
; %bb.4:
	cmp	w19, #129
	b.eq	LBB0_7
; %bb.5:
	cmp	w19, #130
	b.ne	LBB0_8
; %bb.6:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_error
LBB0_7:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror_with_name
	b	LBB0_9
LBB0_8:
	and	w19, w19, #0x7f
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_sds_desc,4,2                   ; @sds_desc
	.comm	_remote_debug,4,2               ; @remote_debug
	.comm	_gdb_stdlog,4,2                 ; @gdb_stdlog
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%c(%x)"

l_.str.1:                               ; @.str.1
	.asciz	"Remote connection closed"

l_.str.2:                               ; @.str.2
	.asciz	"Remote communication error"

	.no_dead_strip	_readchar
.subsections_via_symbols
