	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __tty_buffer_request_room
___tty_buffer_request_room:             ## @__tty_buffer_request_room
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	movslq	(%r12), %rbx
	movslq	4(%r12), %rax
	subq	%rax, %rbx
	cmpq	%r15, %rbx
	jb	LBB0_4
	jmp	LBB0_9
LBB0_1:
	xorl	%ebx, %ebx
	cmpq	%r15, %rbx
	jae	LBB0_9
LBB0_4:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_tty_buffer_find
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	testq	%r12, %r12
	je	LBB0_7
## %bb.6:
	movq	%rax, 16(%r12)
	movl	4(%r12), %ecx
	movl	%ecx, 8(%r12)
	jmp	LBB0_8
LBB0_7:
	movq	%rax, 8(%r14)
LBB0_8:
	movq	%rax, (%r14)
LBB0_9:
	movq	%r15, %rbx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	___tty_buffer_request_room
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __tty_buffer_request_room
___tty_buffer_request_room:             ; @__tty_buffer_request_room
	.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	x19, x1
	mov	x20, x0
	ldr	x22, [x0]
	cbz	x22, LBB0_2
; %bb.1:
	ldpsw	x8, x9, [x22]
	sub	x21, x8, x9
	cmp	x21, x19
	b.lo	LBB0_3
	b	LBB0_8
LBB0_2:
	mov	x21, #0
	cmp	x21, x19
	b.hs	LBB0_8
LBB0_3:
	mov	x0, x20
	mov	x1, x19
	bl	_tty_buffer_find
	cbz	x0, LBB0_9
; %bb.4:
	cbz	x22, LBB0_6
; %bb.5:
	str	x0, [x22, #16]
	ldr	w8, [x22, #4]
	str	w8, [x22, #8]
	b	LBB0_7
LBB0_6:
	str	x0, [x20, #8]
LBB0_7:
	str	x0, [x20]
LBB0_8:
	mov	x21, x19
LBB0_9:
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	___tty_buffer_request_room
.subsections_via_symbols
