	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_write_char                     ## -- Begin function write_char
	.p2align	4, 0x90
_write_char:                            ## @write_char
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_alarmed@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	jne	LBB0_2
## %bb.1:
	callq	_put_char
	movl	$1, %ebx
	testq	%rax, %rax
	jns	LBB0_4
LBB0_2:
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_alarm
	movq	$0, (%r14)
	movq	_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINTR@GOTPCREL(%rip), %rcx
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	leaq	L_.str(%rip), %rdx
	leaq	L_.str.1(%rip), %rdi
	cmoveq	%rdx, %rdi
	cmpq	(%rcx), %rax
	cmoveq	%rdx, %rdi
	callq	_chat_logf
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_alarmed,8,3                    ## @alarmed
	.comm	_verbose,8,3                    ## @verbose
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_EWOULDBLOCK,8,3                ## @EWOULDBLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" -- write timed out"

L_.str.1:                               ## @.str.1
	.asciz	" -- write failed: %m"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_write_char                     ; -- Begin function write_char
	.p2align	2
_write_char:                            ; @write_char
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _alarmed@GOTPAGE
Lloh1:
	ldr	x19, [x19, _alarmed@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_4
LBB0_1:
	mov	w0, #0
	bl	_alarm
	str	xzr, [x19]
Lloh2:
	adrp	x8, _verbose@GOTPAGE
Lloh3:
	ldr	x8, [x8, _verbose@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _errno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh7:
	adrp	x9, _EINTR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _EINTR@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x10, _EWOULDBLOCK@GOTPAGE
Lloh12:
	ldr	x10, [x10, _EWOULDBLOCK@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
Lloh14:
	adrp	x8, l_.str.1@PAGE
Lloh15:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh16:
	adrp	x9, l_.str@PAGE
Lloh17:
	add	x9, x9, l_.str@PAGEOFF
	csel	x0, x9, x8, eq
	bl	_chat_logf
LBB0_3:
	mov	w0, #0
	b	LBB0_6
LBB0_4:
	bl	_put_char
	tbnz	x0, #63, LBB0_1
; %bb.5:
	mov	w0, #1
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_alarmed,8,3                    ; @alarmed
	.comm	_verbose,8,3                    ; @verbose
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_EWOULDBLOCK,8,3                ; @EWOULDBLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" -- write timed out"

l_.str.1:                               ; @.str.1
	.asciz	" -- write failed: %m"

.subsections_via_symbols
