	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_write                       ## -- Begin function do_write
	.p2align	4, 0x90
_do_write:                              ## @do_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$2088, %rsp                     ## imm = 0x828
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -2112(%rbp)               ## 8-byte Spill
	movq	%rdx, -2120(%rbp)               ## 8-byte Spill
	movq	%rsi, %r15
	movl	%edi, %ebx
	movq	%rsp, -2128(%rbp)               ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXHOSTNAMELEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_openat
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	__PATH_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rcx
	callq	_err
LBB0_2:
	movq	_stdout@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_fclose
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	callq	_fdopen
	movq	%rax, (%rbx)
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	__PATH_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rcx
	callq	_err
LBB0_4:
	movq	_SIGINT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_done@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_signal
	movq	_SIGHUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_signal
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_gethostname
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcpy
LBB0_6:
	xorl	%edi, %edi
	callq	_time
	movl	%eax, -2100(%rbp)
	leaq	-2100(%rbp), %rdi
	callq	_ctime
	movb	$0, 16(%rax)
	leaq	11(%rax), %r8
	leaq	L_.str.4(%rip), %rdi
	movq	-2112(%rbp), %rsi               ## 8-byte Reload
	movq	%r12, %rdx
	movq	-2120(%rbp), %rcx               ## 8-byte Reload
	callq	_printf
	movq	_stdin@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	-2096(%rbp), %rdi
	movl	$512, %esi                      ## imm = 0x200
	callq	_fgetws
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	leaq	-2096(%rbp), %rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_wr_fputs
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	$512, %esi                      ## imm = 0x200
	callq	_fgetws
	testq	%rax, %rax
	jne	LBB0_8
LBB0_9:
	movq	-2128(%rbp), %rsp               ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXHOSTNAMELEN,4,2             ## @MAXHOSTNAMELEN
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"openat(%s%s)"

	.comm	__PATH_DEV,4,2                  ## @_PATH_DEV
	.comm	_stdout,8,3                     ## @stdout
L_.str.1:                               ## @.str.1
	.asciz	"w"

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

	.comm	_SIGINT,4,2                     ## @SIGINT
	.comm	_done,4,2                       ## @done
	.comm	_SIGHUP,4,2                     ## @SIGHUP
L_.str.3:                               ## @.str.3
	.asciz	"???"

L_.str.4:                               ## @.str.4
	.asciz	"\r\n\007\007\007Message from %s@%s on %s at %s ...\r\n"

	.comm	_stdin,4,2                      ## @stdin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_write                       ; -- Begin function do_write
	.p2align	2
_do_write:                              ; @do_write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #2064
	mov	x19, sp
	mov	x21, x3
	mov	x20, x2
	mov	x24, x1
	mov	x26, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAXHOSTNAMELEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXHOSTNAMELEN@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	mov	x9, x23
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x23, #15
	and	x9, x9, #0x1fffffff0
	sub	x22, x8, x9
	mov	sp, x22
Lloh8:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	bl	_openat
	mov	x25, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh11:
	adrp	x8, __PATH_DEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, __PATH_DEV@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x3, x24
	bl	_err
LBB0_2:
Lloh16:
	adrp	x27, _stdout@GOTPAGE
Lloh17:
	ldr	x27, [x27, _stdout@GOTPAGEOFF]
	ldr	x0, [x27]
	bl	_fclose
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x25
	bl	_fdopen
	str	x0, [x27]
	cbnz	x0, LBB0_4
; %bb.3:
Lloh20:
	adrp	x8, __PATH_DEV@GOTPAGE
Lloh21:
	ldr	x8, [x8, __PATH_DEV@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x3, x24
	bl	_err
LBB0_4:
Lloh25:
	adrp	x8, _SIGINT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SIGINT@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x24, _done@GOTPAGE
Lloh29:
	ldr	x24, [x24, _done@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_signal
Lloh30:
	adrp	x8, _SIGHUP@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SIGHUP@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	ldr	w1, [x24]
	bl	_signal
	mov	x0, x22
	mov	x1, x23
	bl	_gethostname
	tbz	x0, #63, LBB0_6
; %bb.5:
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	bl	_strcpy
LBB0_6:
	mov	x0, #0
	bl	_time
	str	w0, [x19, #4]
	add	x0, x19, #4
	bl	_ctime
	strb	wzr, [x0, #16]
	add	x4, x0, #11
Lloh35:
	adrp	x0, l_.str.4@PAGE
Lloh36:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	mov	x3, x20
	bl	_printf
Lloh37:
	adrp	x20, _stdin@GOTPAGE
Lloh38:
	ldr	x20, [x20, _stdin@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x20]
	add	x0, x19, #8
	mov	w1, #512
	bl	_fgetws
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x0, x19, #8
	bl	_wr_fputs
	b	LBB0_7
LBB0_9:
	mov	sp, x26
	ldur	x8, [x29, #-88]
Lloh39:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh40:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXHOSTNAMELEN,4,2             ; @MAXHOSTNAMELEN
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"openat(%s%s)"

	.comm	__PATH_DEV,4,2                  ; @_PATH_DEV
	.comm	_stdout,8,3                     ; @stdout
l_.str.1:                               ; @.str.1
	.asciz	"w"

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

	.comm	_SIGINT,4,2                     ; @SIGINT
	.comm	_done,4,2                       ; @done
	.comm	_SIGHUP,4,2                     ; @SIGHUP
l_.str.3:                               ; @.str.3
	.asciz	"???"

l_.str.4:                               ; @.str.4
	.asciz	"\r\n\007\007\007Message from %s@%s on %s at %s ...\r\n"

	.comm	_stdin,4,2                      ; @stdin
.subsections_via_symbols
