	.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
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	cmpq	$0, 8(%r14)
	jne	LBB0_1
## %bb.2:
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	callq	_open
	movq	_pfd@GOTPCREL(%rip), %r12
	movq	%rax, (%r12)
	testq	%rax, %rax
	js	LBB0_4
LBB0_11:
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_delay
	movq	(%r12), %rdi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_setty
LBB0_13:
	movl	(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pstatus                        ## TAILCALL
LBB0_4:
	movl	$1, %ebx
	movq	_ENOENT@GOTPCREL(%rip), %r15
	movq	_O_RDWR@GOTPCREL(%rip), %r13
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rax), %esi
	callq	_open
	movq	%rax, (%r12)
	testq	%rax, %rax
	jns	LBB0_11
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%r15), %rax
	je	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$1, %ebx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r14), %edx
	movq	%r14, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_pstatus
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %edi
	callq	_sleep
	cmpl	$32, %ebx
	setl	%cl
	shll	%cl, %ebx
	movl	4(%r14), %edi
	cmpq	$0, 8(%r14)
	movq	%r13, %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_14:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_syslog
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_pfd,8,3                        ## @pfd
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: %m"

L_.str.1:                               ## @.str.1
	.asciz	"waiting for %s to become ready (offline?)"

L_.str.2:                               ## @.str.2
	.asciz	"%s is ready and printing"

	.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:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x22, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _O_RDWR@GOTPAGEOFF]
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x23, _O_WRONLY@GOTPAGE
Lloh3:
	ldr	x23, [x23, _O_WRONLY@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x23, x22, eq
	ldr	w1, [x8]
	bl	_open
Lloh4:
	adrp	x24, _pfd@GOTPAGE
Lloh5:
	ldr	x24, [x24, _pfd@GOTPAGEOFF]
	str	x0, [x24]
	tbnz	x0, #63, LBB0_4
LBB0_1:
	mov	w0, #500
	bl	_delay
	ldr	x0, [x24]
	bl	_isatty
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_setty
LBB0_3:
	ldr	w2, [x19]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_pstatus
LBB0_4:
	mov	w20, #1
Lloh8:
	adrp	x25, _errno@GOTPAGE
Lloh9:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
Lloh10:
	adrp	x26, _ENOENT@GOTPAGE
Lloh11:
	ldr	x26, [x26, _ENOENT@GOTPAGEOFF]
Lloh12:
	adrp	x21, l_.str.1@PAGE
Lloh13:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	bl	_sleep
	cmp	w20, #32
	cset	w8, lt
	lsl	w20, w20, w8
	ldr	w0, [x19, #4]
	ldr	x8, [x19, #8]
	cmp	x8, #0
	csel	x8, x23, x22, eq
	ldr	w1, [x8]
	bl	_open
	str	x0, [x24]
	tbz	x0, #63, LBB0_1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w20, #1
	b.ne	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w2, [x19]
	mov	x0, x19
	mov	x1, x21
	bl	_pstatus
	b	LBB0_5
LBB0_9:
Lloh14:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w2, [x19, #4]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_syslog
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_pfd,8,3                        ; @pfd
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: %m"

l_.str.1:                               ; @.str.1
	.asciz	"waiting for %s to become ready (offline?)"

l_.str.2:                               ; @.str.2
	.asciz	"%s is ready and printing"

	.no_dead_strip	_opentty
.subsections_via_symbols
