	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_tty_buffer
_alloc_tty_buffer:                      ## @alloc_tty_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_hvc_iucv_mempool@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_mempool_alloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	testq	%r14, %r14
	je	LBB0_7
## %bb.2:
	movq	%r14, %rdi
	callq	_MSG_SIZE
	movl	%eax, 8(%rbx)
	movq	_GFP_DMA@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r15d
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_kmalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_MSG_VERSION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax)
	movq	_MSG_TYPE_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	%r14, (%rax)
	jmp	LBB0_7
LBB0_5:
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_mempool_free
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hvc_iucv_mempool,4,2           ## @hvc_iucv_mempool
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.comm	_MSG_VERSION,4,2                ## @MSG_VERSION
	.comm	_MSG_TYPE_DATA,4,2              ## @MSG_TYPE_DATA
	.no_dead_strip	_alloc_tty_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_tty_buffer
_alloc_tty_buffer:                      ; @alloc_tty_buffer
	.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	x20, x0
Lloh0:
	adrp	x22, _hvc_iucv_mempool@GOTPAGE
Lloh1:
	ldr	x22, [x22, _hvc_iucv_mempool@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_mempool_alloc
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	cbz	x20, LBB0_5
; %bb.2:
	mov	x0, x20
	bl	_MSG_SIZE
	str	w0, [x19, #8]
Lloh2:
	adrp	x8, _GFP_DMA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_DMA@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w1, w8, w21
	bl	_kmalloc
	str	x0, [x19]
	cbz	x0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _MSG_VERSION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSG_VERSION@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MSG_TYPE_DATA@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MSG_TYPE_DATA@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #8]
	str	x20, [x0]
	b	LBB0_5
LBB0_4:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mempool_free
	mov	x19, #0
LBB0_5:
	mov	x0, x19
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_hvc_iucv_mempool,4,2           ; @hvc_iucv_mempool
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.comm	_MSG_VERSION,4,2                ; @MSG_VERSION
	.comm	_MSG_TYPE_DATA,4,2              ; @MSG_TYPE_DATA
	.no_dead_strip	_alloc_tty_buffer
.subsections_via_symbols
