	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tty_Raw
_tty_Raw:                               ## @tty_Raw
	.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, %r15
	movl	32(%rdi), %edi
	callq	_device2tty
	movq	%rax, %r14
	movq	_LogDEBUG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	16(%r15), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movq	(%r15), %rax
	movq	_PHYS_DIRECT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.1:
	cmpq	$0, 8(%r15)
	js	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	_Online
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	(%rbx), %edi
	movl	16(%r15), %edx
	movq	8(%r15), %rcx
	movl	(%r14), %r8d
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
LBB0_4:
	movq	%r15, %rdi
	callq	_physical_IsSync
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	movq	%r15, %rdi
	callq	_LoadLineDiscipline
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	movq	8(%r15), %rdi
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_tcgetattr
	movq	%rbx, %rdi
	callq	_cfmakeraw
	cmpq	$0, 24(%r15)
	movq	_CLOCAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	je	LBB0_8
## %bb.7:
	movq	_CCTS_OFLOW@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_CRTS_IFLOW@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
LBB0_8:
	orl	-32(%rbp), %eax
	movl	%eax, -32(%rbp)
	movq	(%r15), %rcx
	movq	_PHYS_DEDICATED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_10
## %bb.9:
	movq	_HUPCL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -32(%rbp)
LBB0_10:
	movq	8(%r15), %rdi
	movq	_TCSANOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	callq	_tcsetattr
	cmpl	$-1, %eax
	jne	LBB0_12
## %bb.11:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
LBB0_12:
	movq	8(%r15), %rdi
	movq	_F_GETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_fcntl
	testl	%eax, %eax
	js	LBB0_14
## %bb.13:
	movq	8(%r15), %rdi
	movq	_F_SETFL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, %edx
	callq	_fcntl
	movl	$1, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LogDEBUG,4,2                   ## @LogDEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Entering tty_Raw\n"

	.comm	_PHYS_DIRECT,8,3                ## @PHYS_DIRECT
L_.str.1:                               ## @.str.1
	.asciz	"%s: Raw: descriptor = %d, mbits = %x\n"

	.comm	_CLOCAL,4,2                     ## @CLOCAL
	.comm	_CCTS_OFLOW,4,2                 ## @CCTS_OFLOW
	.comm	_CRTS_IFLOW,4,2                 ## @CRTS_IFLOW
	.comm	_PHYS_DEDICATED,8,3             ## @PHYS_DEDICATED
	.comm	_HUPCL,4,2                      ## @HUPCL
	.comm	_TCSANOW,4,2                    ## @TCSANOW
	.comm	_LogWARN,4,2                    ## @LogWARN
L_.str.2:                               ## @.str.2
	.asciz	"%s: tcsetattr: Failed configuring device\n"

	.comm	_F_GETFL,4,2                    ## @F_GETFL
	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.no_dead_strip	_tty_Raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tty_Raw
_tty_Raw:                               ; @tty_Raw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	ldr	w0, [x0, #32]
	bl	_device2tty
	mov	x20, x0
Lloh0:
	adrp	x21, _LogDEBUG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _LogDEBUG@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w2, [x19, #16]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_log_Printf
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _PHYS_DIRECT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PHYS_DIRECT@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
	tbnz	x8, #63, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_Online
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x21]
	ldr	w2, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w9, [x20]
	stp	x8, x9, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_log_Printf
LBB0_4:
	mov	x0, x19
	bl	_physical_IsSync
	cbnz	w0, LBB0_13
; %bb.5:
	mov	x0, x19
	bl	_LoadLineDiscipline
	cbnz	w0, LBB0_13
; %bb.6:
	ldr	x0, [x19, #8]
	add	x1, sp, #24
	bl	_tcgetattr
	add	x0, sp, #24
	bl	_cfmakeraw
	ldr	x9, [x19, #24]
Lloh9:
	adrp	x8, _CLOCAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CLOCAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cbz	x9, LBB0_8
; %bb.7:
Lloh12:
	adrp	x9, _CCTS_OFLOW@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CCTS_OFLOW@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _CRTS_IFLOW@GOTPAGE
Lloh16:
	ldr	x10, [x10, _CRTS_IFLOW@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh17:
	ldr	w9, [x10]
	orr	w8, w8, w9
	ldr	w9, [sp, #24]
	orr	w8, w8, w9
	b	LBB0_9
LBB0_8:
	ldr	w9, [sp, #24]
	orr	w8, w9, w8
LBB0_9:
	str	w8, [sp, #24]
	ldr	x9, [x19]
Lloh18:
	adrp	x10, _PHYS_DEDICATED@GOTPAGE
Lloh19:
	ldr	x10, [x10, _PHYS_DEDICATED@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_11
; %bb.10:
Lloh21:
	adrp	x9, _HUPCL@GOTPAGE
Lloh22:
	ldr	x9, [x9, _HUPCL@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [sp, #24]
LBB0_11:
	ldr	x0, [x19, #8]
Lloh24:
	adrp	x8, _TCSANOW@GOTPAGE
Lloh25:
	ldr	x8, [x8, _TCSANOW@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	add	x2, sp, #24
	bl	_tcsetattr
	cmn	w0, #1
	b.ne	LBB0_13
; %bb.12:
Lloh27:
	adrp	x8, _LogWARN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	ldr	w2, [x19, #16]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_log_Printf
LBB0_13:
	ldr	x0, [x19, #8]
Lloh32:
	adrp	x8, _F_GETFL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _F_GETFL@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_fcntl
	tbnz	w0, #31, LBB0_15
; %bb.14:
Lloh35:
	adrp	x9, _F_SETFL@GOTPAGE
Lloh36:
	ldr	x9, [x9, _F_SETFL@GOTPAGEOFF]
	ldr	x8, [x19, #8]
Lloh37:
	ldr	w1, [x9]
Lloh38:
	adrp	x9, _O_NONBLOCK@GOTPAGE
Lloh39:
	ldr	x9, [x9, _O_NONBLOCK@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	orr	w2, w9, w0
	mov	x0, x8
	bl	_fcntl
	mov	w0, #1
	b	LBB0_16
LBB0_15:
	mov	w0, #0
LBB0_16:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_LogDEBUG,4,2                   ; @LogDEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Entering tty_Raw\n"

	.comm	_PHYS_DIRECT,8,3                ; @PHYS_DIRECT
l_.str.1:                               ; @.str.1
	.asciz	"%s: Raw: descriptor = %d, mbits = %x\n"

	.comm	_CLOCAL,4,2                     ; @CLOCAL
	.comm	_CCTS_OFLOW,4,2                 ; @CCTS_OFLOW
	.comm	_CRTS_IFLOW,4,2                 ; @CRTS_IFLOW
	.comm	_PHYS_DEDICATED,8,3             ; @PHYS_DEDICATED
	.comm	_HUPCL,4,2                      ; @HUPCL
	.comm	_TCSANOW,4,2                    ; @TCSANOW
	.comm	_LogWARN,4,2                    ; @LogWARN
l_.str.2:                               ; @.str.2
	.asciz	"%s: tcsetattr: Failed configuring device\n"

	.comm	_F_GETFL,4,2                    ; @F_GETFL
	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.no_dead_strip	_tty_Raw
.subsections_via_symbols
