	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tty_buffer_alloc
_tty_buffer_alloc:                      ## @tty_buffer_alloc
	.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), %rax
	addq	%rsi, %rax
	cmpq	$65536, %rax                    ## imm = 0x10000
	ja	LBB0_4
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leal	(%rsi,%rsi), %edi
	addl	$64, %edi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, (%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rax)
	movups	%xmm0, 48(%rax)
	movq	24(%rax), %rcx
	movq	%rcx, 8(%rax)
	addq	%rbx, %rcx
	movq	%rcx, 16(%rax)
	addq	%rbx, (%r14)
	jmp	LBB0_5
LBB0_4:
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.no_dead_strip	_tty_buffer_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tty_buffer_alloc
_tty_buffer_alloc:                      ; @tty_buffer_alloc
	.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
	ldr	x8, [x0]
	add	x8, x8, x1
	cmp	x8, #16, lsl #12                ; =65536
	b.ls	LBB0_2
; %bb.1:
	mov	x0, #0
	b	LBB0_4
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	lsl	w8, w20, #1
	add	w0, w8, #64
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_4
; %bb.3:
	stp	xzr, xzr, [x0, #48]
	stp	xzr, xzr, [x0, #32]
	ldr	x8, [x0, #24]
	stp	x20, x8, [x0]
	add	x8, x8, x20
	str	x8, [x0, #16]
	ldr	x8, [x19]
	add	x8, x8, x20
	str	x8, [x19]
LBB0_4:
	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	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.no_dead_strip	_tty_buffer_alloc
.subsections_via_symbols
