	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gs_init_port                   ## -- Begin function gs_init_port
	.p2align	4, 0x90
_gs_init_port:                          ## @gs_init_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_func_enter
	movq	_ASYNC_INITIALIZED@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, 16(%rbx)
	jne	LBB0_10
## %bb.1:
	cmpq	$0, (%rbx)
	jne	LBB0_7
## %bb.2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_zeroed_page
	movq	%rax, %r15
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, (%rbx)
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_free_page
	jmp	LBB0_5
LBB0_4:
	movq	%r15, (%rbx)
LBB0_5:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	cmpq	$0, (%rbx)
	je	LBB0_6
LBB0_7:
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.8:
	movq	_TTY_IO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_clear_bit
LBB0_9:
	leaq	56(%rbx), %rdi
	callq	_mutex_init
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movq	$0, 48(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	24(%rbx), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_gs_set_termios
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	16(%rbx), %eax
	orl	(%r12), %eax
	movq	_GS_TX_INTEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, 16(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
LBB0_10:
	xorl	%eax, %eax
	callq	_func_exit
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_func_exit
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ASYNC_INITIALIZED,4,2          ## @ASYNC_INITIALIZED
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_TTY_IO_ERROR,4,2               ## @TTY_IO_ERROR
	.comm	_GS_TX_INTEN,4,2                ## @GS_TX_INTEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gs_init_port                   ; -- Begin function gs_init_port
	.p2align	2
_gs_init_port:                          ; @gs_init_port
	.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	x19, x0
	bl	_func_enter
	ldr	w8, [x19, #16]
Lloh0:
	adrp	x22, _ASYNC_INITIALIZED@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ASYNC_INITIALIZED@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.1:
	ldr	x8, [x19]
	cbnz	x8, LBB0_6
; %bb.2:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_get_zeroed_page
	mov	x21, x0
	add	x20, x19, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_free_page
	b	LBB0_5
LBB0_4:
	str	x21, [x19]
LBB0_5:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x8, [x19]
	cbz	x8, LBB0_11
LBB0_6:
	add	x20, x19, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x1, [x19, #24]
	cbz	x1, LBB0_8
; %bb.7:
Lloh5:
	adrp	x8, _TTY_IO_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TTY_IO_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_clear_bit
LBB0_8:
	add	x0, x19, #56
	bl	_mutex_init
	stp	xzr, xzr, [x19, #40]
	str	xzr, [x19, #32]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x0, [x19, #24]
	mov	x1, #0
	bl	_gs_set_termios
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x22]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _GS_TX_INTEN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GS_TX_INTEN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19, #16]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_9:
	bl	_func_exit
	mov	w0, #0
LBB0_10:
	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
LBB0_11:
	bl	_func_exit
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ASYNC_INITIALIZED,4,2          ; @ASYNC_INITIALIZED
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_TTY_IO_ERROR,4,2               ; @TTY_IO_ERROR
	.comm	_GS_TX_INTEN,4,2                ; @GS_TX_INTEN
.subsections_via_symbols
