	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function n_tty_chars_in_buffer
_n_tty_chars_in_buffer:                 ## @n_tty_chars_in_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	cmpl	$0, 40(%rbx)
	je	LBB0_1
## %bb.2:
	cmpq	$0, 32(%rbx)
	je	LBB0_3
## %bb.4:
	movq	8(%rbx), %rax
	subq	16(%rbx), %rax
	jg	LBB0_5
## %bb.6:
	movq	_N_TTY_BUF_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	jmp	LBB0_7
LBB0_1:
	movq	(%rbx), %rbx
	jmp	LBB0_8
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	xorl	%ecx, %ecx
LBB0_7:
	leaq	(%rax,%rcx), %rbx
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_N_TTY_BUF_SIZE,8,3             ## @N_TTY_BUF_SIZE
	.no_dead_strip	_n_tty_chars_in_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function n_tty_chars_in_buffer
_n_tty_chars_in_buffer:                 ; @n_tty_chars_in_buffer
	.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	x20, x0
	add	x19, x0, #24
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20, #40]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_4
; %bb.2:
	ldp	x8, x9, [x20, #8]
Lloh0:
	adrp	x10, _N_TTY_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _N_TTY_BUF_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	subs	x8, x8, x9
	csel	x9, xzr, x10, gt
	add	x20, x8, x9
	b	LBB0_5
LBB0_3:
	ldr	x20, [x20]
	b	LBB0_5
LBB0_4:
	mov	x20, #0
LBB0_5:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_N_TTY_BUF_SIZE,8,3             ; @N_TTY_BUF_SIZE
	.no_dead_strip	_n_tty_chars_in_buffer
.subsections_via_symbols
