	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_allocate                    ## -- Begin function vc_allocate
	.p2align	4, 0x90
_vc_allocate:                           ## @vc_allocate
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_WARN_CONSOLE_UNLOCKED
	movq	_MAX_NR_CONSOLES@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jbe	LBB0_9
## %bb.1:
	movq	_vc_cons@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	%ebx, %r13d
	shlq	$4, %r13
	cmpq	$0, (%rax,%r13)
	jne	LBB0_14
## %bb.2:
	movq	_MAX_NR_USER_CONSOLES@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	ja	LBB0_4
## %bb.3:
	movq	_CAP_SYS_RESOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_10
LBB0_4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, %r15
	movq	%rax, -48(%rbp)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	testq	%r15, %r15
	je	LBB0_12
## %bb.5:
	movq	(%r12), %rax
	movq	%r15, (%rax,%r13)
	movq	(%r12), %rax
	leaq	(%rax,%r13), %rdi
	addq	$8, %rdi
	movq	_vc_SAK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_visual_init
	movq	16(%r15), %rax
	cmpl	$0, (%rax)
	jne	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_con_set_default_unimap
LBB0_7:
	movl	12(%r15), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movl	%eax, 8(%r15)
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:
	movl	(%r15), %edx
	movl	4(%r15), %esi
	movq	%r15, %rdi
	movl	$1, %ecx
	callq	_vc_init
	movl	%ebx, %edi
	callq	_vcs_make_sysfs
	movq	_VT_ALLOCATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_vt_notifier_list@GOTPCREL(%rip), %rdi
	leaq	-48(%rbp), %rdx
	callq	_atomic_notifier_call_chain
	jmp	LBB0_14
LBB0_9:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	%r15, %rdi
	callq	_kfree
	movq	(%r12), %rax
	movq	$0, (%rax,%r13)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%r14d, %r14d
LBB0_13:
	subl	(%rax), %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_NR_CONSOLES,4,2            ## @MAX_NR_CONSOLES
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_vc_cons,8,3                    ## @vc_cons
	.comm	_MAX_NR_USER_CONSOLES,4,2       ## @MAX_NR_USER_CONSOLES
	.comm	_CAP_SYS_RESOURCE,4,2           ## @CAP_SYS_RESOURCE
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vc_SAK,4,2                     ## @vc_SAK
	.comm	_vt_notifier_list,4,2           ## @vt_notifier_list
	.comm	_VT_ALLOCATE,4,2                ## @VT_ALLOCATE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_allocate                    ; -- Begin function vc_allocate
	.p2align	2
_vc_allocate:                           ; @vc_allocate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_WARN_CONSOLE_UNLOCKED
Lloh0:
	adrp	x8, _MAX_NR_CONSOLES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_NR_CONSOLES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ls	LBB0_3
; %bb.1:
Lloh3:
	adrp	x21, _vc_cons@GOTPAGE
Lloh4:
	ldr	x21, [x21, _vc_cons@GOTPAGEOFF]
	ldr	x8, [x21]
	mov	w9, w19
	lsl	x22, x9, #4
	ldr	x8, [x8, x22]
	cbz	x8, LBB0_6
LBB0_2:
	mov	w0, #0
	b	LBB0_5
LBB0_3:
Lloh5:
	adrp	x8, _ENXIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
Lloh7:
	adrp	x8, _MAX_NR_USER_CONSOLES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAX_NR_USER_CONSOLES@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, w19
	b.hi	LBB0_8
; %bb.7:
Lloh10:
	adrp	x8, _CAP_SYS_RESOURCE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CAP_SYS_RESOURCE@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_13
LBB0_8:
Lloh13:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh14:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #24
	bl	_kzalloc
	str	x0, [sp, #8]
	cbz	x0, LBB0_15
; %bb.9:
	mov	x20, x0
	ldr	x8, [x21]
	str	x0, [x8, x22]
	ldr	x8, [x21]
	add	x8, x8, x22
	add	x0, x8, #8
Lloh15:
	adrp	x8, _vc_SAK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _vc_SAK@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_INIT_WORK
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	bl	_visual_init
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	cbnz	w8, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_con_set_default_unimap
LBB0_11:
	ldr	w0, [x20, #12]
	ldr	w1, [x23]
	bl	_kmalloc
	str	w0, [x20, #8]
	cbz	w0, LBB0_14
; %bb.12:
	ldp	w2, w1, [x20]
	mov	x0, x20
	mov	w3, #1
	bl	_vc_init
	mov	x0, x19
	bl	_vcs_make_sysfs
Lloh18:
	adrp	x8, _VT_ALLOCATE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VT_ALLOCATE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x0, _vt_notifier_list@GOTPAGE
Lloh22:
	ldr	x0, [x0, _vt_notifier_list@GOTPAGEOFF]
	add	x2, sp, #8
	bl	_atomic_notifier_call_chain
	b	LBB0_2
LBB0_13:
Lloh23:
	adrp	x8, _EPERM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_4
LBB0_14:
	mov	x0, x20
	bl	_kfree
	ldr	x8, [x21]
	str	xzr, [x8, x22]
LBB0_15:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_NR_CONSOLES,4,2            ; @MAX_NR_CONSOLES
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_vc_cons,8,3                    ; @vc_cons
	.comm	_MAX_NR_USER_CONSOLES,4,2       ; @MAX_NR_USER_CONSOLES
	.comm	_CAP_SYS_RESOURCE,4,2           ; @CAP_SYS_RESOURCE
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vc_SAK,4,2                     ; @vc_SAK
	.comm	_vt_notifier_list,4,2           ; @vt_notifier_list
	.comm	_VT_ALLOCATE,4,2                ; @VT_ALLOCATE
.subsections_via_symbols
