	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setttymode
_setttymode:                            ## @setttymode
	.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
	movl	%edi, %r14d
	movl	$0, -28(%rbp)
	movq	_STDIN_FILENO@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_TCIOFLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tcflush
	movl	(%r15), %edi
	movq	_FIONBIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rbx
	movq	%rbx, %rdx
	callq	_ioctl
	movl	(%r15), %edi
	movq	_FIOASYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_ioctl
	movq	_IS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	movq	_SP@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
LBB0_2:
	callq	_speed
	movq	_tmode@GOTPCREL(%rip), %rdi
	movl	%eax, %esi
	callq	_cfsetispeed
LBB0_3:
	movq	_OS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	jne	LBB0_5
## %bb.4:
	movq	_SP@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
LBB0_5:
	callq	_speed
	movq	_tmode@GOTPCREL(%rip), %rdi
	movl	%eax, %esi
	callq	_cfsetospeed
LBB0_6:
	xorl	%edi, %edi
	callq	_set_flags
	xorl	%eax, %eax
	callq	_setchars
	testl	%r14d, %r14d
	je	LBB0_8
## %bb.7:
	movq	_tmode@GOTPCREL(%rip), %rdi
	callq	_cfmakeraw
LBB0_8:
	movl	(%r15), %edi
	movq	_TCSANOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_tmode@GOTPCREL(%rip), %rdx
	callq	_tcsetattr
	testq	%rax, %rax
	js	LBB0_10
## %bb.9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ttyn@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_syslog
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_TCIOFLUSH,4,2                  ## @TCIOFLUSH
	.comm	_FIONBIO,4,2                    ## @FIONBIO
	.comm	_FIOASYNC,4,2                   ## @FIOASYNC
	.comm	_IS,8,3                         ## @IS
	.comm	_tmode,4,2                      ## @tmode
	.comm	_SP,8,3                         ## @SP
	.comm	_OS,8,3                         ## @OS
	.comm	_TCSANOW,4,2                    ## @TCSANOW
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tcsetattr %s: %m"

	.comm	_ttyn,4,2                       ## @ttyn
	.no_dead_strip	_setttymode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setttymode
_setttymode:                            ; @setttymode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x20, _STDIN_FILENO@GOTPAGE
Lloh1:
	ldr	x20, [x20, _STDIN_FILENO@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _TCIOFLUSH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TCIOFLUSH@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_tcflush
	ldr	w0, [x20]
Lloh5:
	adrp	x8, _FIONBIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FIONBIO@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_ioctl
	ldr	w0, [x20]
Lloh8:
	adrp	x8, _FIOASYNC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FIOASYNC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_ioctl
Lloh11:
	adrp	x8, _IS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IS@GOTPAGEOFF]
Lloh13:
	ldr	x0, [x8]
	cbnz	x0, LBB0_2
; %bb.1:
Lloh14:
	adrp	x8, _SP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SP@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
	cbz	x0, LBB0_3
LBB0_2:
	bl	_speed
	mov	x1, x0
Lloh17:
	adrp	x0, _tmode@GOTPAGE
Lloh18:
	ldr	x0, [x0, _tmode@GOTPAGEOFF]
	bl	_cfsetispeed
LBB0_3:
Lloh19:
	adrp	x8, _OS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _OS@GOTPAGEOFF]
Lloh21:
	ldr	x0, [x8]
	cbnz	x0, LBB0_5
; %bb.4:
Lloh22:
	adrp	x8, _SP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SP@GOTPAGEOFF]
Lloh24:
	ldr	x0, [x8]
	cbz	x0, LBB0_6
LBB0_5:
	bl	_speed
	mov	x1, x0
Lloh25:
	adrp	x0, _tmode@GOTPAGE
Lloh26:
	ldr	x0, [x0, _tmode@GOTPAGEOFF]
	bl	_cfsetospeed
LBB0_6:
	mov	w0, #0
	bl	_set_flags
	bl	_setchars
	cbz	w19, LBB0_8
; %bb.7:
Lloh27:
	adrp	x0, _tmode@GOTPAGE
Lloh28:
	ldr	x0, [x0, _tmode@GOTPAGEOFF]
	bl	_cfmakeraw
LBB0_8:
	ldr	w0, [x20]
Lloh29:
	adrp	x8, _TCSANOW@GOTPAGE
Lloh30:
	ldr	x8, [x8, _TCSANOW@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x2, _tmode@GOTPAGE
Lloh33:
	ldr	x2, [x2, _tmode@GOTPAGEOFF]
	bl	_tcsetattr
	tbnz	x0, #63, LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_10:
Lloh34:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh35:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x8, _ttyn@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ttyn@GOTPAGEOFF]
Lloh39:
	ldr	w2, [x8]
Lloh40:
	adrp	x1, l_.str@PAGE
Lloh41:
	add	x1, x1, l_.str@PAGEOFF
	bl	_syslog
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_TCIOFLUSH,4,2                  ; @TCIOFLUSH
	.comm	_FIONBIO,4,2                    ; @FIONBIO
	.comm	_FIOASYNC,4,2                   ; @FIOASYNC
	.comm	_IS,8,3                         ; @IS
	.comm	_tmode,4,2                      ; @tmode
	.comm	_SP,8,3                         ; @SP
	.comm	_OS,8,3                         ; @OS
	.comm	_TCSANOW,4,2                    ; @TCSANOW
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tcsetattr %s: %m"

	.comm	_ttyn,4,2                       ; @ttyn
	.no_dead_strip	_setttymode
.subsections_via_symbols
