	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gdb_readable
_gdb_readable:                          ## @gdb_readable
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	movq	_FIONREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	-28(%rbp), %esi
	testl	%esi, %esi
	jne	LBB0_4
## %bb.3:
	movl	$1, -28(%rbp)
	movl	$1, %esi
LBB0_4:
	movq	_cur_comm@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_io_buffer_grow
	movq	%r14, %rdi
	callq	_io_buffer_avail
	xorl	%edi, %edi
	cmpl	-28(%rbp), %eax
	setge	%dil
	callq	_assert
	movq	%r14, %rdi
	callq	_io_buffer_tail
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_io_buffer_avail
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_read
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.5:
	testl	%eax, %eax
	je	LBB0_6
## %bb.9:
	addl	%eax, (%r14)
	movq	_gdb_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_pthread_mutex_lock
	movl	%r15d, %edi
	callq	_check_command
	movq	%rbx, %rdi
	callq	_pthread_mutex_unlock
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_warn
	jmp	LBB0_10
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
LBB0_6:
	xorl	%eax, %eax
	callq	_close_connection
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIONREAD,4,2                   ## @FIONREAD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FIONREAD on GDB socket"

	.comm	_cur_comm,4,2                   ## @cur_comm
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
L_.str.1:                               ## @.str.1
	.asciz	"Read from GDB socket"

	.comm	_gdb_lock,4,2                   ## @gdb_lock
	.no_dead_strip	_gdb_readable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gdb_readable
_gdb_readable:                          ; @gdb_readable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _FIONREAD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FIONREAD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.1:
	ldr	w1, [sp, #12]
	cbnz	w1, LBB0_3
; %bb.2:
	mov	w1, #1
	str	w1, [sp, #12]
LBB0_3:
Lloh3:
	adrp	x20, _cur_comm@GOTPAGE
Lloh4:
	ldr	x20, [x20, _cur_comm@GOTPAGEOFF]
	mov	x0, x20
	bl	_io_buffer_grow
	mov	x0, x20
	bl	_io_buffer_avail
	ldr	w8, [sp, #12]
	cmp	w0, w8
	cset	w0, ge
	bl	_assert
	mov	x0, x20
	bl	_io_buffer_tail
	mov	x21, x0
	mov	x0, x20
	bl	_io_buffer_avail
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_read
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.4:
	cbnz	w0, LBB0_9
; %bb.5:
	bl	_close_connection
	b	LBB0_10
LBB0_6:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
	b	LBB0_10
LBB0_7:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.8:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	bl	_close_connection
	b	LBB0_10
LBB0_9:
	ldr	w8, [x20]
	add	w8, w8, w0
	str	w8, [x20]
Lloh15:
	adrp	x20, _gdb_lock@GOTPAGE
Lloh16:
	ldr	x20, [x20, _gdb_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_pthread_mutex_lock
	mov	x0, x19
	bl	_check_command
	mov	x0, x20
	bl	_pthread_mutex_unlock
LBB0_10:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_FIONREAD,4,2                   ; @FIONREAD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FIONREAD on GDB socket"

	.comm	_cur_comm,4,2                   ; @cur_comm
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
l_.str.1:                               ; @.str.1
	.asciz	"Read from GDB socket"

	.comm	_gdb_lock,4,2                   ; @gdb_lock
	.no_dead_strip	_gdb_readable
.subsections_via_symbols
