	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_term_chk                       ## -- Begin function term_chk
	.p2align	4, 0x90
_term_chk:                              ## @term_chk
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r13d
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %rbx
	leaq	-48(%rbp), %rdx
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	callq	_fstatat
	testq	%rax, %rax
	js	LBB0_1
## %bb.3:
	movq	_S_IWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	sarl	$3, %eax
	xorl	%ecx, %ecx
	andl	-48(%rbp), %eax
	setne	%cl
	movl	%ecx, (%r15)
	movl	-44(%rbp), %eax
	movl	%eax, (%r14)
	jmp	LBB0_4
LBB0_1:
	movl	$1, %r12d
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.2:
	movq	__PATH_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rdx
	callq	_warn
LBB0_4:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%s"

	.comm	__PATH_DEV,4,2                  ## @_PATH_DEV
	.comm	_S_IWRITE,4,2                   ## @S_IWRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_term_chk                       ; -- Begin function term_chk
	.p2align	2
_term_chk:                              ; @term_chk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	add	x2, sp, #8
	mov	w3, #0
	bl	_fstatat
	tbnz	x0, #63, LBB0_2
; %bb.1:
	mov	w0, #0
Lloh0:
	adrp	x8, _S_IWRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _S_IWRITE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w9, w10, [sp, #8]
	tst	w9, w8, asr #3
	cset	w8, ne
	str	w8, [x20]
	str	w10, [x19]
	b	LBB0_5
LBB0_2:
	cbz	w22, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, __PATH_DEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, __PATH_DEV@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x21
	bl	_warn
LBB0_4:
	mov	w0, #1
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%s"

	.comm	__PATH_DEV,4,2                  ; @_PATH_DEV
	.comm	_S_IWRITE,4,2                   ; @S_IWRITE
.subsections_via_symbols
