	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_leave_raw_mode                 ## -- Begin function leave_raw_mode
	.p2align	4, 0x90
_leave_raw_mode:                        ## @leave_raw_mode
	.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	__in_raw_mode@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_5
## %bb.1:
	movl	%edi, %ebx
	movq	_stdin@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fileno
	movq	_TCSADRAIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	__saved_tio@GOTPCREL(%rip), %rdx
	movl	%eax, %edi
	callq	_tcsetattr
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.4:
	movq	$0, (%r14)
	jmp	LBB0_5
LBB0_2:
	testl	%ebx, %ebx
	je	LBB0_3
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_perror                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	__in_raw_mode,8,3               ## @_in_raw_mode
	.comm	_stdin,4,2                      ## @stdin
	.comm	_TCSADRAIN,4,2                  ## @TCSADRAIN
	.comm	__saved_tio,4,2                 ## @_saved_tio
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tcsetattr"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_leave_raw_mode                 ; -- Begin function leave_raw_mode
	.p2align	2
_leave_raw_mode:                        ; @leave_raw_mode
	.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	x20, __in_raw_mode@GOTPAGE
Lloh1:
	ldr	x20, [x20, __in_raw_mode@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x8, _stdin@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_fileno
Lloh5:
	adrp	x8, _TCSADRAIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TCSADRAIN@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, __saved_tio@GOTPAGE
Lloh9:
	ldr	x2, [x2, __saved_tio@GOTPAGEOFF]
	bl	_tcsetattr
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.2:
	str	xzr, [x20]
	b	LBB0_4
LBB0_3:
	cbz	w19, LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_perror
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	__in_raw_mode,8,3               ; @_in_raw_mode
	.comm	_stdin,4,2                      ; @stdin
	.comm	_TCSADRAIN,4,2                  ; @TCSADRAIN
	.comm	__saved_tio,4,2                 ; @_saved_tio
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tcsetattr"

.subsections_via_symbols
