	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generic_console_write          ## -- Begin function generic_console_write
	.p2align	4, 0x90
_generic_console_write:                 ## @generic_console_write
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movl	%edi, %r12d
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_sigemptyset
	movq	_SIGIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sigaddset
	movq	_SIG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-52(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_sigprocmask
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	leaq	-40(%rbp), %rsi
	movl	%r12d, %edi
	callq	_tcgetattr
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_CATCH_EINTR
	testl	%ebx, %ebx
	jne	LBB0_6
## %bb.3:
	movq	_OPOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	-40(%rbp), %eax
	movl	%eax, -48(%rbp)
	movq	_TCSAFLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movl	%r12d, %edi
	callq	_tcsetattr
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_CATCH_EINTR
	testl	%ebx, %ebx
	je	LBB0_4
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_4:
	movl	%r12d, %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_generic_write
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_TCSAFLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movl	%r12d, %edi
	callq	_tcsetattr
	movl	%eax, %edi
	callq	_CATCH_EINTR
	movq	_SIG_SETMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-52(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigprocmask
LBB0_7:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGIO,4,2                      ## @SIGIO
	.comm	_SIG_BLOCK,4,2                  ## @SIG_BLOCK
	.comm	_OPOST,4,2                      ## @OPOST
	.comm	_TCSAFLUSH,4,2                  ## @TCSAFLUSH
	.comm	_SIG_SETMASK,4,2                ## @SIG_SETMASK
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generic_console_write          ; -- Begin function generic_console_write
	.p2align	2
_generic_console_write:                 ; @generic_console_write
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_isatty
	cbz	x0, LBB0_5
; %bb.1:
	add	x0, sp, #24
	bl	_sigemptyset
Lloh0:
	adrp	x8, _SIGIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGIO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #24
	bl	_sigaddset
Lloh3:
	adrp	x8, _SIG_BLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIG_BLOCK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, sp, #24
	add	x2, sp, #28
	bl	_sigprocmask
	cbnz	x0, LBB0_4
; %bb.2:
	add	x1, sp, #16
	mov	x0, x19
	bl	_tcgetattr
	mov	x22, x0
	bl	_CATCH_EINTR
	cbnz	w22, LBB0_4
; %bb.3:
	ldr	w8, [sp, #16]
Lloh6:
	adrp	x9, _OPOST@GOTPAGE
Lloh7:
	ldr	x9, [x9, _OPOST@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #8]
Lloh9:
	adrp	x8, _TCSAFLUSH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TCSAFLUSH@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_tcsetattr
	mov	x22, x0
	bl	_CATCH_EINTR
	cbz	w22, LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	x3, #0
	bl	_generic_write
	mov	x20, x0
	mov	x0, x19
	bl	_isatty
	cbz	x0, LBB0_7
; %bb.6:
Lloh15:
	adrp	x8, _TCSAFLUSH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TCSAFLUSH@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x19
	bl	_tcsetattr
	bl	_CATCH_EINTR
Lloh18:
	adrp	x8, _SIG_SETMASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SIG_SETMASK@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	add	x1, sp, #28
	mov	x2, #0
	bl	_sigprocmask
LBB0_7:
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGIO,4,2                      ; @SIGIO
	.comm	_SIG_BLOCK,4,2                  ; @SIG_BLOCK
	.comm	_OPOST,4,2                      ; @OPOST
	.comm	_TCSAFLUSH,4,2                  ; @TCSAFLUSH
	.comm	_SIG_SETMASK,4,2                ; @SIG_SETMASK
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
