	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opentty
_opentty:                               ## @opentty
	.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	%esi, %r15d
	movq	%rdi, %r14
	callq	_open
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.1:
	movb	$1, %al
	movq	_errno@GOTPCREL(%rip), %r13
	movq	_ENOENT@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %ebx
	testb	$1, %al
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_syslog
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	(%r12), %ebx
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$60, %edi
	callq	_sleep
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_open
	movl	%eax, %ebx
	xorl	%eax, %eax
	cmpl	$-1, %ebx
	je	LBB0_2
LBB0_6:
	movl	%ebx, %edi
	callq	_login_tty
	movl	$1, %r15d
	testq	%rax, %rax
	jns	LBB0_13
## %bb.7:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_daemon
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	movl	%ebx, %edi
	callq	_login_tty
	testq	%rax, %rax
	jns	LBB0_13
## %bb.10:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_syslog
	jmp	LBB0_11
LBB0_8:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_syslog
LBB0_11:
	movl	%ebx, %edi
	callq	_close
LBB0_12:
	xorl	%r15d, %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open %s: %m"

	.comm	_ENOENT,4,2                     ## @ENOENT
L_.str.1:                               ## @.str.1
	.asciz	"daemon: %m"

L_.str.2:                               ## @.str.2
	.asciz	"login_tty %s: %m"

	.no_dead_strip	_opentty
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opentty
_opentty:                               ; @opentty
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
	bl	_open
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_7
; %bb.1:
	mov	w8, #1
Lloh0:
	adrp	x23, _errno@GOTPAGE
Lloh1:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh2:
	adrp	x24, _LOG_ERR@GOTPAGE
Lloh3:
	ldr	x24, [x24, _LOG_ERR@GOTPAGEOFF]
Lloh4:
	adrp	x22, l_.str@PAGE
Lloh5:
	add	x22, x22, l_.str@PAGEOFF
Lloh6:
	adrp	x25, _ENOENT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _ENOENT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x23]
	tbz	w8, #0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x24]
	str	x19, [sp]
	mov	x1, x22
	bl	_syslog
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	cmp	w20, w8
	b.eq	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #60
	bl	_sleep
	mov	x0, x19
	mov	x1, x21
	bl	_open
	mov	w8, #0
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.6:
	mov	x20, x0
LBB0_7:
	mov	x0, x20
	bl	_login_tty
	tbnz	x0, #63, LBB0_9
LBB0_8:
	mov	w0, #1
	b	LBB0_15
LBB0_9:
	mov	w0, #0
	mov	w1, #0
	bl	_daemon
	tbnz	x0, #63, LBB0_12
; %bb.10:
	mov	x0, x20
	bl	_login_tty
	tbz	x0, #63, LBB0_8
; %bb.11:
Lloh8:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh13:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_13:
	bl	_syslog
	mov	x0, x20
	bl	_close
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open %s: %m"

	.comm	_ENOENT,4,2                     ; @ENOENT
l_.str.1:                               ; @.str.1
	.asciz	"daemon: %m"

l_.str.2:                               ; @.str.2
	.asciz	"login_tty %s: %m"

	.no_dead_strip	_opentty
.subsections_via_symbols
