	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tty_perform_flush              ## -- Begin function tty_perform_flush
	.p2align	4, 0x90
_tty_perform_flush:                     ## @tty_perform_flush
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_tty_check_change
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movq	%r15, %rdi
	callq	_tty_ldisc_ref_wait
	movq	%rax, %r14
	cmpq	$128, %rbx
	je	LBB0_10
## %bb.2:
	cmpq	$129, %rbx
	je	LBB0_7
## %bb.3:
	cmpq	$130, %rbx
	jne	LBB0_13
## %bb.4:
	testq	%r14, %r14
	je	LBB0_11
## %bb.5:
	movq	(%r14), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	%r15, %rdi
	callq	*%rax
	jmp	LBB0_11
LBB0_7:
	testq	%r14, %r14
	je	LBB0_10
## %bb.8:
	movq	(%r14), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	*%rax
LBB0_10:
	movq	%r15, %rdi
	callq	_tty_driver_flush_buffer
LBB0_11:
	movq	%r14, %rdi
	callq	_tty_ldisc_deref
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_13:
	movq	%r14, %rdi
	callq	_tty_ldisc_deref
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tty_perform_flush              ; -- Begin function tty_perform_flush
	.p2align	2
_tty_perform_flush:                     ; @tty_perform_flush
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x19, x0
	bl	_tty_check_change
	cbnz	w0, LBB0_13
; %bb.1:
	mov	x0, x19
	bl	_tty_ldisc_ref_wait
	mov	x20, x0
	cmp	x21, #128
	b.eq	LBB0_10
; %bb.2:
	cmp	x21, #129
	b.eq	LBB0_7
; %bb.3:
	cmp	x21, #130
	b.ne	LBB0_12
; %bb.4:
	cbz	x20, LBB0_11
; %bb.5:
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.6:
	mov	x0, x19
	blr	x8
	b	LBB0_11
LBB0_7:
	cbz	x20, LBB0_10
; %bb.8:
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	blr	x8
LBB0_10:
	mov	x0, x19
	bl	_tty_driver_flush_buffer
LBB0_11:
	mov	x0, x20
	bl	_tty_ldisc_deref
	mov	w0, #0
	b	LBB0_13
LBB0_12:
	mov	x0, x20
	bl	_tty_ldisc_deref
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
