	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st_write                       ## -- Begin function st_write
	.p2align	4, 0x90
_st_write:                              ## @st_write
	.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	%rdi, %r14
	leaq	-24(%rbp), %rdi
	xorl	%esi, %esi
	callq	_st_kim_ref
	movl	$1, %edi
	testq	%r14, %r14
	je	LBB0_3
## %bb.1:
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	sete	%dil
LBB0_3:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	jmp	LBB0_6
LBB0_5:
	movq	(%r14), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_debug
	movq	(%r14), %rbx
	movq	-24(%rbp), %rdi
	movq	%r14, %rsi
	callq	_st_int_enqueue
	movq	-24(%rbp), %rdi
	callq	_st_tx_wakeup
LBB0_6:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"data/tty unavailable to perform write"

	.comm	_EINVAL,8,3                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"%d to be written"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st_write                       ; -- Begin function st_write
	.p2align	2
_st_write:                              ; @st_write
	.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
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	bl	_st_kim_ref
	mov	w0, #1
	cbz	x19, LBB0_3
; %bb.1:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, eq
LBB0_3:
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	neg	x20, x8
	b	LBB0_6
LBB0_5:
	ldr	x1, [x19]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	ldr	x20, [x19]
	ldr	x0, [sp, #8]
	mov	x1, x19
	bl	_st_int_enqueue
	ldr	x0, [sp, #8]
	bl	_st_tx_wakeup
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"data/tty unavailable to perform write"

	.comm	_EINVAL,8,3                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"%d to be written"

.subsections_via_symbols
