	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bwsfwrite                      ## -- Begin function bwsfwrite
	.p2align	4, 0x90
_bwsfwrite:                             ## @bwsfwrite
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_MB_CUR_MAX@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_8
## %bb.1:
	movq	(%r15), %r12
	movq	8(%r15), %rdi
	testl	%edx, %edx
	je	LBB0_2
## %bb.5:
	incq	%r12
	movq	%r12, %rsi
	movl	$1, %edx
	movq	%r14, %rcx
	callq	_fwrite
	testl	%eax, %eax
	jle	LBB0_7
## %bb.6:
	movq	%r12, %rbx
	jmp	LBB0_20
LBB0_8:
	xorl	%eax, %eax
	testl	%edx, %edx
	movl	$10, %edi
	cmovnel	%eax, %edi
	callq	_btowc
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_BWSLEN
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	leaq	l_.str.1(%rip), %r12
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	movslq	%r13d, %r13
LBB0_17:                                ##   in Loop: Header=BB0_11 Depth=1
	addq	%r13, %rbx
	movq	%r15, %rdi
	callq	_BWSLEN
	cmpq	%rax, %rbx
	jae	LBB0_18
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	cmpl	$0, (%rax,%rbx,4)
	je	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	leaq	(%rax,%rbx,4), %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fwprintf
	movl	%eax, %r13d
	testl	%eax, %eax
	jg	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$2, %edi
	xorl	%esi, %esi
	callq	_err
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r14, %rdi
	leaq	l_.str(%rip), %rsi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_fwprintf
	movl	$1, %r13d
	cmpl	$1, %eax
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$2, %edi
	xorl	%esi, %esi
	callq	_err
	jmp	LBB0_17
LBB0_18:
	incq	%rbx
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_19
LBB0_2:
	movb	$10, (%rdi,%r12)
	movq	8(%r15), %rdi
	leaq	1(%r12), %rbx
	movq	%rbx, %rsi
	movl	$1, %edx
	movq	%r14, %rcx
	callq	_fwrite
	testl	%eax, %eax
	jg	LBB0_4
## %bb.3:
	movl	$2, %edi
	xorl	%esi, %esi
	callq	_err
LBB0_4:
	movq	8(%r15), %rax
	movb	$0, (%rax,%r12)
	jmp	LBB0_20
LBB0_9:
	movl	$1, %ebx
LBB0_19:
	leaq	l_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_fwprintf
LBB0_20:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	$2, %edi
	xorl	%esi, %esi
	callq	_err
	movq	%r12, %rbx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_CUR_MAX,4,2                 ## @MB_CUR_MAX
	.section	__TEXT,__const
	.p2align	2                               ## @.str
l_.str:
	.long	37                              ## 0x25
	.long	108                             ## 0x6c
	.long	99                              ## 0x63
	.long	0                               ## 0x0

	.p2align	2                               ## @.str.1
l_.str.1:
	.long	37                              ## 0x25
	.long	108                             ## 0x6c
	.long	115                             ## 0x73
	.long	0                               ## 0x0

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bwsfwrite                      ; -- Begin function bwsfwrite
	.p2align	2
_bwsfwrite:                             ; @bwsfwrite
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _MB_CUR_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MB_CUR_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.1:
	ldp	x21, x0, [x20]
	cbz	w2, LBB0_15
; %bb.2:
	add	x22, x21, #1
	mov	x1, x22
	mov	w2, #1
	mov	x3, x19
	bl	_fwrite
	cmp	w0, #0
	b.gt	LBB0_20
; %bb.3:
	mov	w0, #2
	mov	x1, #0
	bl	_err
	b	LBB0_20
LBB0_4:
	mov	w8, #10
	cmp	w2, #0
	csel	w0, w8, wzr, eq
	bl	_btowc
	mov	x21, x0
	mov	x0, x20
	bl	_BWSLEN
	cbz	x0, LBB0_18
; %bb.5:
	mov	x25, #0
Lloh3:
	adrp	x22, l_.str@PAGE
Lloh4:
	add	x22, x22, l_.str@PAGEOFF
Lloh5:
	adrp	x23, l_.str.1@PAGE
Lloh6:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	sxtw	x8, w24
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x25, x25, x8
	mov	x0, x20
	bl	_BWSLEN
	cmp	x25, x0
	b.hs	LBB0_14
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	add	x8, x8, x25, lsl #2
	ldr	w9, [x8]
	cbz	w9, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	str	x8, [sp]
	mov	x0, x19
	mov	x1, x23
	bl	_fwprintf
	mov	x24, x0
	cmp	w0, #0
	b.gt	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	w0, #2
	mov	x1, #0
	bl	_err
	b	LBB0_6
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	str	xzr, [sp]
	mov	x0, x19
	mov	x1, x22
	bl	_fwprintf
	cmp	w0, #1
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	w8, #1
	b	LBB0_7
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w0, #2
	mov	x1, #0
	bl	_err
	mov	w8, #1
	b	LBB0_7
LBB0_14:
	add	x22, x25, #1
	b	LBB0_19
LBB0_15:
	mov	w8, #10
	strb	w8, [x0, x21]
	ldr	x0, [x20, #8]
	add	x22, x21, #1
	mov	x1, x22
	mov	w2, #1
	mov	x3, x19
	bl	_fwrite
	cmp	w0, #0
	b.gt	LBB0_17
; %bb.16:
	mov	w0, #2
	mov	x1, #0
	bl	_err
LBB0_17:
	ldr	x8, [x20, #8]
	strb	wzr, [x8, x21]
	b	LBB0_20
LBB0_18:
	mov	w22, #1
LBB0_19:
	str	x21, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fwprintf
LBB0_20:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_CUR_MAX,4,2                 ; @MB_CUR_MAX
	.section	__TEXT,__const
	.p2align	2                               ; @.str
l_.str:
	.long	37                              ; 0x25
	.long	108                             ; 0x6c
	.long	99                              ; 0x63
	.long	0                               ; 0x0

	.p2align	2                               ; @.str.1
l_.str.1:
	.long	37                              ; 0x25
	.long	108                             ; 0x6c
	.long	115                             ; 0x73
	.long	0                               ; 0x0

.subsections_via_symbols
