	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ttymsg_check
_ttymsg_check:                          ## @ttymsg_check
	.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	%ecx, %r14d
	movq	%rdx, %r13
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	__PATH_DEV@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	_ttymsg_check.device(%rip), %rbx
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movq	%r13, %r8
	callq	_snprintf
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	_S_IWGRP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_3
## %bb.4:
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r13, %rdx
	movl	%r14d, %ecx
	callq	_ttymsg
	movq	%rax, %rbx
	jmp	LBB0_5
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	_ttymsg_check.errbuf(%rip), %rbx
	leaq	L_.str.1(%rip), %rdx
	leaq	_ttymsg_check.device(%rip), %rcx
	movq	%rbx, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movq	%rax, %r8
	callq	_snprintf
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_ttymsg_check.device,1024,4 ## @ttymsg_check.device
.zerofill __DATA,__bss,_ttymsg_check.errbuf,1024,4 ## @ttymsg_check.errbuf
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%s"

	.comm	__PATH_DEV,8,3                  ## @_PATH_DEV
L_.str.1:                               ## @.str.1
	.asciz	"%s: %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_S_IWGRP,4,2                    ## @S_IWGRP
	.no_dead_strip	_ttymsg_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ttymsg_check
_ttymsg_check:                          ; @ttymsg_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, __PATH_DEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, __PATH_DEV@GOTPAGEOFF]
Lloh2:
	ldr	x3, [x8]
Lloh3:
	adrp	x23, _ttymsg_check.device@PAGE
Lloh4:
	add	x23, x23, _ttymsg_check.device@PAGEOFF
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	mov	w1, #1024
	mov	x4, x20
	bl	_snprintf
	add	x1, sp, #8
	mov	x0, x23
	bl	_stat
	tbnz	x0, #63, LBB0_3
; %bb.1:
	ldr	w8, [sp, #8]
Lloh7:
	adrp	x9, _S_IWGRP@GOTPAGE
Lloh8:
	ldr	x9, [x9, _S_IWGRP@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_ttymsg
	mov	x19, x0
	b	LBB0_5
LBB0_3:
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_strerror
	mov	x4, x0
Lloh13:
	adrp	x19, _ttymsg_check.errbuf@PAGE
Lloh14:
	add	x19, x19, _ttymsg_check.errbuf@PAGEOFF
Lloh15:
	adrp	x2, l_.str.1@PAGE
Lloh16:
	add	x2, x2, l_.str.1@PAGEOFF
Lloh17:
	adrp	x3, _ttymsg_check.device@PAGE
Lloh18:
	add	x3, x3, _ttymsg_check.device@PAGEOFF
	mov	x0, x19
	mov	w1, #1024
	bl	_snprintf
	b	LBB0_5
LBB0_4:
	mov	x19, #0
LBB0_5:
	mov	x0, x19
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_ttymsg_check.device,1024,0 ; @ttymsg_check.device
.zerofill __DATA,__bss,_ttymsg_check.errbuf,1024,0 ; @ttymsg_check.errbuf
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%s"

	.comm	__PATH_DEV,8,3                  ; @_PATH_DEV
l_.str.1:                               ; @.str.1
	.asciz	"%s: %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_S_IWGRP,4,2                    ; @S_IWGRP
	.no_dead_strip	_ttymsg_check
.subsections_via_symbols
