	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hvc_remove                     ## -- Begin function hvc_remove
	.p2align	4, 0x90
_hvc_remove:                            ## @hvc_remove
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	12(%rdi), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	16(%rbx), %edi
	callq	_tty_kref_get
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	_MAX_NR_HVC_CONSOLES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_2
## %bb.1:
	movq	_vtermnos@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$-1, (%rcx,%rax,4)
LBB0_2:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	addq	$8, %rbx
	movq	_destroy_hvc_struct@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kref_put
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_tty_vhangup
	movq	%r14, %rdi
	callq	_tty_kref_put
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_NR_HVC_CONSOLES,8,3        ## @MAX_NR_HVC_CONSOLES
	.comm	_vtermnos,8,3                   ## @vtermnos
	.comm	_destroy_hvc_struct,4,2         ## @destroy_hvc_struct
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hvc_remove                     ; -- Begin function hvc_remove
	.p2align	2
_hvc_remove:                            ; @hvc_remove
	.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	x20, x0
	add	x21, x0, #12
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w0, [x20, #16]
	bl	_tty_kref_get
	mov	x19, x0
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _MAX_NR_HVC_CONSOLES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_NR_HVC_CONSOLES@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _vtermnos@GOTPAGE
Lloh4:
	ldr	x9, [x9, _vtermnos@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	mov	w10, #-1
	str	w10, [x9, x8, lsl #2]
LBB0_2:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	add	x0, x20, #8
Lloh6:
	adrp	x8, _destroy_hvc_struct@GOTPAGE
Lloh7:
	ldr	x8, [x8, _destroy_hvc_struct@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_kref_put
	cbz	x19, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_tty_vhangup
	mov	x0, x19
	bl	_tty_kref_put
LBB0_4:
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_NR_HVC_CONSOLES,8,3        ; @MAX_NR_HVC_CONSOLES
	.comm	_vtermnos,8,3                   ; @vtermnos
	.comm	_destroy_hvc_struct,4,2         ; @destroy_hvc_struct
.subsections_via_symbols
