	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_linux_terminal_init            ## -- Begin function linux_terminal_init
	.p2align	4, 0x90
_linux_terminal_init:                   ## @linux_terminal_init
	.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	_oldKbmd@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	$65535, (%rax)                  ## imm = 0xFFFF
	jne	LBB0_4
## %bb.1:
	movq	_oldTerm@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	%r14, %rsi
	callq	_tcgetattr
	testq	%rax, %rax
	js	LBB0_4
## %bb.2:
	movups	(%r14), %xmm0
	movq	_newTerm@GOTPCREL(%rip), %rax
	movups	%xmm0, (%rax)
	movq	_ECHO@GOTPCREL(%rip), %rcx
	movq	_ICANON@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_ISIG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	notl	%edx
	andl	%edx, (%rax)
	movq	_ISTRIP@GOTPCREL(%rip), %rcx
	movq	_IGNCR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_ICRNL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_INLCR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_IXOFF@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_IXON@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	notl	%edx
	andl	%edx, 4(%rax)
	movq	8(%rax), %rax
	movq	_VMIN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	_VTIME@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	_KDGKBMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_oldKbmd@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_4
## %bb.3:
	movq	_TCSAFLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_newTerm@GOTPCREL(%rip), %rdx
	xorl	%edi, %edi
	callq	_tcsetattr
	movq	%rax, %rbx
	shrq	$63, %rbx
	xorl	$1, %ebx
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_oldKbmd,4,2                    ## @oldKbmd
	.comm	_oldTerm,16,3                   ## @oldTerm
	.comm	_newTerm,16,3                   ## @newTerm
	.comm	_ECHO,4,2                       ## @ECHO
	.comm	_ICANON,4,2                     ## @ICANON
	.comm	_ISIG,4,2                       ## @ISIG
	.comm	_ISTRIP,4,2                     ## @ISTRIP
	.comm	_IGNCR,4,2                      ## @IGNCR
	.comm	_ICRNL,4,2                      ## @ICRNL
	.comm	_INLCR,4,2                      ## @INLCR
	.comm	_IXOFF,4,2                      ## @IXOFF
	.comm	_IXON,4,2                       ## @IXON
	.comm	_VMIN,8,3                       ## @VMIN
	.comm	_VTIME,8,3                      ## @VTIME
	.comm	_KDGKBMODE,4,2                  ## @KDGKBMODE
	.comm	_TCSAFLUSH,4,2                  ## @TCSAFLUSH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_linux_terminal_init            ; -- Begin function linux_terminal_init
	.p2align	2
_linux_terminal_init:                   ; @linux_terminal_init
	.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
Lloh0:
	adrp	x8, _oldKbmd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _oldKbmd@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #65535
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.1:
Lloh3:
	adrp	x19, _oldTerm@GOTPAGE
Lloh4:
	ldr	x19, [x19, _oldTerm@GOTPAGEOFF]
	mov	w0, #0
	mov	x1, x19
	bl	_tcgetattr
	tbnz	x0, #63, LBB0_4
; %bb.2:
	ldr	q0, [x19]
Lloh5:
	adrp	x8, _newTerm@GOTPAGE
Lloh6:
	ldr	x8, [x8, _newTerm@GOTPAGEOFF]
	str	q0, [x8]
Lloh7:
	adrp	x9, _ECHO@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ECHO@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _ICANON@GOTPAGE
Lloh11:
	ldr	x10, [x10, _ICANON@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh13:
	adrp	x10, _ISIG@GOTPAGE
Lloh14:
	ldr	x10, [x10, _ISIG@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w9, w9, w10
	ldp	w10, w11, [x8]
	bic	w9, w10, w9
Lloh16:
	adrp	x10, _ISTRIP@GOTPAGE
Lloh17:
	ldr	x10, [x10, _ISTRIP@GOTPAGEOFF]
Lloh18:
	adrp	x12, _IGNCR@GOTPAGE
Lloh19:
	ldr	x12, [x12, _IGNCR@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
Lloh21:
	ldr	w12, [x12]
	orr	w10, w12, w10
Lloh22:
	adrp	x12, _ICRNL@GOTPAGE
Lloh23:
	ldr	x12, [x12, _ICRNL@GOTPAGEOFF]
Lloh24:
	ldr	w12, [x12]
	orr	w10, w10, w12
Lloh25:
	adrp	x12, _INLCR@GOTPAGE
Lloh26:
	ldr	x12, [x12, _INLCR@GOTPAGEOFF]
Lloh27:
	ldr	w12, [x12]
Lloh28:
	adrp	x13, _IXOFF@GOTPAGE
Lloh29:
	ldr	x13, [x13, _IXOFF@GOTPAGEOFF]
	orr	w10, w10, w12
Lloh30:
	ldr	w12, [x13]
	orr	w10, w10, w12
Lloh31:
	adrp	x12, _IXON@GOTPAGE
Lloh32:
	ldr	x12, [x12, _IXON@GOTPAGEOFF]
Lloh33:
	ldr	w12, [x12]
	orr	w10, w10, w12
	bic	w10, w11, w10
	stp	w9, w10, [x8]
Lloh34:
	adrp	x9, _VMIN@GOTPAGE
Lloh35:
	ldr	x9, [x9, _VMIN@GOTPAGEOFF]
	ldr	x8, [x8, #8]
Lloh36:
	ldr	x9, [x9]
	str	xzr, [x8, x9, lsl #3]
Lloh37:
	adrp	x9, _VTIME@GOTPAGE
Lloh38:
	ldr	x9, [x9, _VTIME@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	str	xzr, [x8, x9, lsl #3]
Lloh40:
	adrp	x8, _KDGKBMODE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _KDGKBMODE@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x2, _oldKbmd@GOTPAGE
Lloh44:
	ldr	x2, [x2, _oldKbmd@GOTPAGEOFF]
	mov	w0, #0
	bl	_ioctl
	tbnz	x0, #63, LBB0_4
; %bb.3:
Lloh45:
	adrp	x8, _TCSAFLUSH@GOTPAGE
Lloh46:
	ldr	x8, [x8, _TCSAFLUSH@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
Lloh48:
	adrp	x2, _newTerm@GOTPAGE
Lloh49:
	ldr	x2, [x2, _newTerm@GOTPAGEOFF]
	mov	w0, #0
	bl	_tcsetattr
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_oldKbmd,4,2                    ; @oldKbmd
	.comm	_oldTerm,16,3                   ; @oldTerm
	.comm	_newTerm,16,3                   ; @newTerm
	.comm	_ECHO,4,2                       ; @ECHO
	.comm	_ICANON,4,2                     ; @ICANON
	.comm	_ISIG,4,2                       ; @ISIG
	.comm	_ISTRIP,4,2                     ; @ISTRIP
	.comm	_IGNCR,4,2                      ; @IGNCR
	.comm	_ICRNL,4,2                      ; @ICRNL
	.comm	_INLCR,4,2                      ; @INLCR
	.comm	_IXOFF,4,2                      ; @IXOFF
	.comm	_IXON,4,2                       ; @IXON
	.comm	_VMIN,8,3                       ; @VMIN
	.comm	_VTIME,8,3                      ; @VTIME
	.comm	_KDGKBMODE,4,2                  ; @KDGKBMODE
	.comm	_TCSAFLUSH,4,2                  ; @TCSAFLUSH
.subsections_via_symbols
