	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gs_shutdown_port
_gs_shutdown_port:                      ## @gs_shutdown_port
	.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, %rbx
	xorl	%eax, %eax
	callq	_func_enter
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	movq	_ASYNC_INITIALIZED@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_7
## %bb.2:
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_free_page
	movq	$0, 32(%rbx)
LBB0_4:
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.5:
	movq	_TTY_IO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_bit
LBB0_6:
	movq	24(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_func_exit                      ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ASYNC_INITIALIZED,4,2          ## @ASYNC_INITIALIZED
	.comm	_TTY_IO_ERROR,4,2               ## @TTY_IO_ERROR
	.no_dead_strip	_gs_shutdown_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gs_shutdown_port
_gs_shutdown_port:                      ; @gs_shutdown_port
	.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
	mov	x19, x0
	bl	_func_enter
	cbz	x19, LBB0_7
; %bb.1:
	ldr	w8, [x19, #8]
Lloh0:
	adrp	x20, _ASYNC_INITIALIZED@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ASYNC_INITIALIZED@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_free_page
	str	xzr, [x19, #32]
LBB0_4:
	ldr	x1, [x19, #16]
	cbz	x1, LBB0_6
; %bb.5:
Lloh2:
	adrp	x8, _TTY_IO_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TTY_IO_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_set_bit
LBB0_6:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	ldr	w8, [x20]
	ldr	w9, [x19, #8]
	bic	w8, w9, w8
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_func_exit
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ASYNC_INITIALIZED,4,2          ; @ASYNC_INITIALIZED
	.comm	_TTY_IO_ERROR,4,2               ; @TTY_IO_ERROR
	.no_dead_strip	_gs_shutdown_port
.subsections_via_symbols
