	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_exwrite                        ## -- Begin function exwrite
	.p2align	4, 0x90
_exwrite:                               ## @exwrite
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_printf
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
LBB0_2:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	testq	%rax, %rax
	js	LBB0_7
## %bb.3:
	movl	-48(%rbp), %edi
	callq	_S_ISREG
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$-1, %r14d
	jmp	LBB0_13
LBB0_7:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_Fopen
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:
	movq	%rax, %r12
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	_EOF@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_getc
	cmpl	(%r14), %eax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	xorl	%ecx, %ecx
	cmpl	$10, %eax
	sete	%cl
	addl	%ecx, %r13d
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_putc
	movq	%r12, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_9
## %bb.11:
	leaq	L_.str.4(%rip), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_warnx
	movq	%r12, %rdi
	callq	_Fclose
	movl	$-1, %r14d
	jmp	LBB0_13
LBB0_14:
	xorl	%edi, %edi
	callq	_warn
	movl	$-1, %r14d
	jmp	LBB0_13
LBB0_12:
	movq	%r12, %rdi
	callq	_Fclose
	leaq	L_.str.5(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%r13d, %esi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_printf
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
LBB0_13:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\"%s\" "

	.comm	_stdout,4,2                     ## @stdout
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"%s: "

L_.str.2:                               ## @.str.2
	.asciz	"File exists\n"

L_.str.3:                               ## @.str.3
	.asciz	"w"

	.comm	_EOF,4,2                        ## @EOF
L_.str.4:                               ## @.str.4
	.asciz	"%s"

L_.str.5:                               ## @.str.5
	.asciz	"%d/%ld\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_exwrite                        ; -- Begin function exwrite
	.p2align	2
_exwrite:                               ; @exwrite
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	cbz	w2, LBB0_2
; %bb.1:
	str	x19, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
Lloh2:
	adrp	x8, _stdout@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_fflush
LBB0_2:
	add	x1, sp, #24
	mov	x0, x19
	bl	_stat
	tbnz	x0, #63, LBB0_7
; %bb.3:
	ldr	w0, [sp, #24]
	bl	_S_ISREG
	cbz	x0, LBB0_7
; %bb.4:
Lloh5:
	adrp	x20, _stderr@GOTPAGE
Lloh6:
	ldr	x20, [x20, _stderr@GOTPAGEOFF]
	cbnz	w21, LBB0_6
; %bb.5:
	ldr	w0, [x20]
	str	x19, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
LBB0_6:
	ldr	w0, [x20]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
	mov	w0, #-1
	b	LBB0_14
LBB0_7:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_Fopen
	cbz	x0, LBB0_12
; %bb.8:
	mov	x21, x0
	mov	w22, #0
	mov	x23, #0
Lloh13:
	adrp	x24, _EOF@GOTPAGE
Lloh14:
	ldr	x24, [x24, _EOF@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_getc
	ldr	w8, [x24]
	cmp	w0, w8
	b.eq	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x23, x23, #1
	cmp	w0, #10
	cinc	w22, w22, eq
	mov	x1, x21
	bl	_putc
	mov	x0, x21
	bl	_ferror
	cbz	x0, LBB0_9
; %bb.11:
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x19
	bl	_warnx
	mov	x0, x21
	bl	_Fclose
	mov	w0, #-1
	b	LBB0_14
LBB0_12:
	bl	_warn
	mov	w0, #-1
	b	LBB0_14
LBB0_13:
	mov	x0, x21
	bl	_Fclose
	stp	x22, x23, [sp]
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printf
Lloh19:
	adrp	x8, _stdout@GOTPAGE
Lloh20:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_fflush
	mov	w0, #0
LBB0_14:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\"%s\" "

	.comm	_stdout,4,2                     ; @stdout
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"%s: "

l_.str.2:                               ; @.str.2
	.asciz	"File exists\n"

l_.str.3:                               ; @.str.3
	.asciz	"w"

	.comm	_EOF,4,2                        ; @EOF
l_.str.4:                               ; @.str.4
	.asciz	"%s"

l_.str.5:                               ; @.str.5
	.asciz	"%d/%ld\n"

.subsections_via_symbols
