	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpc_tty_flush_buffer
_cpc_tty_flush_buffer:                  ## @cpc_tty_flush_buffer
	.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
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	cmpq	%rbx, 16(%rax)
	jne	LBB0_6
## %bb.3:
	movq	(%rax), %rcx
	movq	_CPC_TTY_ST_OPEN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.4:
	movl	8(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_CPC_TTY_DBG
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_tty_wakeup                     ## TAILCALL
LBB0_5:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_CPC_TTY_DBG                    ## TAILCALL
LBB0_6:
	movl	8(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_CPC_TTY_DBG                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hdlcX-tty: no TTY to flush buffer\n"

	.comm	_CPC_TTY_ST_OPEN,8,3            ## @CPC_TTY_ST_OPEN
L_.str.1:                               ## @.str.1
	.asciz	"%s: TTY is not opened\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: call wake_up_interruptible\n"

	.no_dead_strip	_cpc_tty_flush_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpc_tty_flush_buffer
_cpc_tty_flush_buffer:                  ; @cpc_tty_flush_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	x9, [x8, #16]
	cmp	x9, x19
	b.ne	LBB0_6
; %bb.3:
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _CPC_TTY_ST_OPEN@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CPC_TTY_ST_OPEN@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [x8, #8]
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str.2@PAGE
Lloh4:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_CPC_TTY_DBG
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_tty_wakeup
LBB0_5:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_CPC_TTY_DBG
LBB0_6:
	ldr	w8, [x8, #8]
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_CPC_TTY_DBG
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hdlcX-tty: no TTY to flush buffer\n"

	.comm	_CPC_TTY_ST_OPEN,8,3            ; @CPC_TTY_ST_OPEN
l_.str.1:                               ; @.str.1
	.asciz	"%s: TTY is not opened\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: call wake_up_interruptible\n"

	.no_dead_strip	_cpc_tty_flush_buffer
.subsections_via_symbols
