	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_checkredirect                  ## -- Begin function checkredirect
	.p2align	4, 0x90
_checkredirect:                         ## @checkredirect
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	_STDERR_FILENO@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movl	(%rbx), %edi
	leaq	-32(%rbp), %rsi
	callq	_fstat
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	(%r14), %edi
	leaq	-24(%rbp), %rsi
	callq	_fstat
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_6
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_warnx                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stdout appears redirected, but stdin is the control descriptor"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_checkredirect                  ; -- Begin function checkredirect
	.p2align	2
_checkredirect:                         ; @checkredirect
	.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
Lloh0:
	adrp	x20, _STDOUT_FILENO@GOTPAGE
Lloh1:
	ldr	x20, [x20, _STDOUT_FILENO@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_isatty
	cbz	x0, LBB0_5
; %bb.1:
Lloh2:
	adrp	x19, _STDERR_FILENO@GOTPAGE
Lloh3:
	ldr	x19, [x19, _STDERR_FILENO@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_isatty
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w0, [x20]
	add	x1, sp, #8
	bl	_fstat
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x19]
	mov	x1, sp
	bl	_fstat
	cbnz	w0, LBB0_5
; %bb.4:
	ldp	x9, x8, [sp]
	cmp	x8, x9
	b.ne	LBB0_6
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_warnx
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stdout appears redirected, but stdin is the control descriptor"

.subsections_via_symbols
