	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bwsfgetln                      ## -- Begin function bwsfgetln
	.p2align	4, 0x90
_bwsfgetln:                             ## @bwsfgetln
	.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	%rcx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r14
	testl	%edx, %edx
	je	LBB0_5
## %bb.1:
	xorl	%edi, %edi
	callq	_btowc
	movl	%eax, %r12d
LBB0_2:
	movq	$0, (%r15)
	movq	%r14, %rdi
	callq	_feof
	testq	%rax, %rax
	je	LBB0_3
LBB0_34:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	$10, %edi
	callq	_btowc
	movl	%eax, %r12d
	movq	_MB_CUR_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$2, %eax
	jl	LBB0_15
## %bb.6:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_fgetwln
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movq	(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.11:
	movslq	%r12d, %rcx
	cmpq	%rcx, -8(%rax,%rsi,8)
	jne	LBB0_13
## %bb.12:
	decq	%rsi
	movq	%rsi, (%r15)
	jmp	LBB0_13
LBB0_3:
	movl	(%r13), %eax
	cmpl	$3, %eax
	jge	LBB0_4
## %bb.22:
	leal	256(%rax), %ecx
	movl	%ecx, (%r13)
	movq	8(%r13), %rdi
	leal	2048(,%rax,8), %esi
	callq	_sort_realloc
	movq	%rax, 8(%r13)
	jmp	LBB0_23
LBB0_15:
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.16:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_fgetln
	testq	%rax, %rax
	je	LBB0_7
## %bb.17:
	movq	(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_18
## %bb.19:
	cmpb	$10, -1(%rax,%rsi)
	jne	LBB0_21
## %bb.20:
	decq	%rsi
	movq	%rsi, (%r15)
	jmp	LBB0_21
LBB0_4:
	movq	8(%r13), %rax
LBB0_23:
	movq	(%r15), %rcx
	movl	$0, (%rax,%rcx,4)
	movq	_MB_CUR_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_feof
	cmpl	$1, %ebx
	jne	LBB0_24
## %bb.30:
	testq	%rax, %rax
	jne	LBB0_42
## %bb.31:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_38:                                ##   in Loop: Header=BB0_32 Depth=1
	addl	$256, %edi                      ## imm = 0x100
	movl	%edi, (%r13)
	movq	8(%r13), %r12
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_SIZEOF_WCHAR_STRING
	movq	%r12, %rdi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%eax, %esi
	callq	_sort_realloc
	movq	%rax, 8(%r13)
	movq	(%r15), %rdx
	leaq	1(%rdx), %rcx
LBB0_39:                                ##   in Loop: Header=BB0_32 Depth=1
	movl	%ebx, (%rax,%rdx,4)
	movq	%rcx, (%r15)
	movl	$0, (%rax,%rcx,4)
	movq	%r14, %rdi
	callq	_feof
	testq	%rax, %rax
	jne	LBB0_42
LBB0_32:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_fgetc
	movl	%eax, %ebx
	movq	_EOF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_33
## %bb.35:                              ##   in Loop: Header=BB0_32 Depth=1
	cmpl	%r12d, %ebx
	je	LBB0_42
## %bb.36:                              ##   in Loop: Header=BB0_32 Depth=1
	movq	(%r15), %rdx
	leaq	1(%rdx), %rcx
	movslq	(%r13), %rdi
	cmpq	%rdi, %rcx
	jae	LBB0_38
## %bb.37:                              ##   in Loop: Header=BB0_32 Depth=1
	movq	8(%r13), %rax
	jmp	LBB0_39
LBB0_24:
	testq	%rax, %rax
	jne	LBB0_42
## %bb.25:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_40:                                ##   in Loop: Header=BB0_26 Depth=1
	addl	$256, %edi                      ## imm = 0x100
	movl	%edi, (%r13)
	movq	8(%r13), %r12
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_SIZEOF_WCHAR_STRING
	movq	%r12, %rdi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%eax, %esi
	callq	_sort_realloc
	movq	%rax, 8(%r13)
	movq	(%r15), %rdx
	leaq	1(%rdx), %rcx
LBB0_41:                                ##   in Loop: Header=BB0_26 Depth=1
	movl	%ebx, (%rax,%rdx,4)
	movq	%rcx, (%r15)
	movl	$0, (%rax,%rcx,4)
	movq	%r14, %rdi
	callq	_feof
	testq	%rax, %rax
	jne	LBB0_42
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_fgetwc
	movl	%eax, %ebx
	movq	_WEOF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_33
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	cmpl	%r12d, %ebx
	je	LBB0_42
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	(%r15), %rdx
	leaq	1(%rdx), %rcx
	movslq	(%r13), %rdi
	cmpq	%rdi, %rcx
	jae	LBB0_40
## %bb.29:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	8(%r13), %rax
	jmp	LBB0_41
LBB0_7:
	movq	%r14, %rdi
	callq	_feof
	testq	%rax, %rax
	jne	LBB0_34
## %bb.8:
	movl	$2, %edi
	xorl	%esi, %esi
	callq	_err
	jmp	LBB0_34
LBB0_10:
	xorl	%esi, %esi
LBB0_13:
	movq	%rax, %rdi
	jmp	LBB0_14
LBB0_33:
	cmpq	$0, (%r15)
	je	LBB0_34
LBB0_42:
	movq	8(%r13), %rdi
	movq	(%r15), %rsi
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bwssbdup                       ## TAILCALL
LBB0_18:
	xorl	%esi, %esi
LBB0_21:
	movq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bwscsbdup                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_CUR_MAX,4,2                 ## @MB_CUR_MAX
	.comm	_EOF,4,2                        ## @EOF
	.comm	_WEOF,4,2                       ## @WEOF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bwsfgetln                      ; -- Begin function bwsfgetln
	.p2align	2
_bwsfgetln:                             ; @bwsfgetln
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x3
	mov	x19, x1
	mov	x20, x0
	cbz	w2, LBB0_4
; %bb.1:
	mov	w0, #0
	bl	_btowc
	mov	x22, x0
LBB0_2:
	str	xzr, [x19]
	mov	x0, x20
	bl	_feof
	cbz	x0, LBB0_9
LBB0_3:
	mov	x0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	w0, #10
	bl	_btowc
	mov	x22, x0
Lloh0:
	adrp	x8, _MB_CUR_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MB_CUR_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_11
; %bb.5:
	mov	x0, x20
	mov	x1, x19
	bl	_fgetwln
	cbz	x0, LBB0_35
; %bb.6:
	ldr	x1, [x19]
	cbz	x1, LBB0_39
; %bb.7:
	sub	x8, x1, #1
	ldr	x9, [x0, x8, lsl #3]
	cmp	x9, w22, sxtw
	b.ne	LBB0_39
; %bb.8:
	str	x8, [x19]
	mov	x1, x8
	b	LBB0_39
LBB0_9:
	ldr	w8, [x21]
	cmp	w8, #3
	b.ge	LBB0_17
; %bb.10:
	add	w8, w8, #256
	str	w8, [x21]
	ldr	x0, [x21, #8]
	lsl	w1, w8, #3
	bl	_sort_realloc
	str	x0, [x21, #8]
	b	LBB0_18
LBB0_11:
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.12:
	mov	x0, x20
	mov	x1, x19
	bl	_fgetln
	cbz	x0, LBB0_35
; %bb.13:
	ldr	x1, [x19]
	cbz	x1, LBB0_16
; %bb.14:
	sub	x8, x1, #1
	ldrb	w9, [x0, x8]
	cmp	w9, #10
	b.ne	LBB0_16
; %bb.15:
	str	x8, [x19]
	mov	x1, x8
LBB0_16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_bwscsbdup
LBB0_17:
	ldr	x0, [x21, #8]
LBB0_18:
	ldr	x8, [x19]
	str	wzr, [x0, x8, lsl #2]
Lloh3:
	adrp	x8, _MB_CUR_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MB_CUR_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	mov	x0, x20
	bl	_feof
	cmp	w23, #1
	b.ne	LBB0_27
; %bb.19:
	cbnz	x0, LBB0_38
; %bb.20:
Lloh6:
	adrp	x25, _EOF@GOTPAGE
Lloh7:
	ldr	x25, [x25, _EOF@GOTPAGEOFF]
	b	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_23 Depth=1
	add	w0, w10, #256
	str	w0, [x21]
	ldr	x24, [x21, #8]
	bl	_SIZEOF_WCHAR_STRING
	mov	x1, x0
	mov	x0, x24
	bl	_sort_realloc
	str	x0, [x21, #8]
	ldr	x9, [x19]
	add	x8, x9, #1
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	str	w23, [x0, x9, lsl #2]
	str	x8, [x19]
	str	wzr, [x0, x8, lsl #2]
	mov	x0, x20
	bl	_feof
	cbnz	x0, LBB0_38
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_fgetc
	ldr	w8, [x25]
	cmp	w0, w8
	b.eq	LBB0_37
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	mov	x23, x0
	cmp	w0, w22
	b.eq	LBB0_38
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	x9, [x19]
	add	x8, x9, #1
	ldrsw	x10, [x21]
	cmp	x8, x10
	b.hs	LBB0_21
; %bb.26:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	x0, [x21, #8]
	b	LBB0_22
LBB0_27:
	cbnz	x0, LBB0_38
; %bb.28:
Lloh8:
	adrp	x25, _WEOF@GOTPAGE
Lloh9:
	ldr	x25, [x25, _WEOF@GOTPAGEOFF]
	b	LBB0_31
LBB0_29:                                ;   in Loop: Header=BB0_31 Depth=1
	add	w0, w10, #256
	str	w0, [x21]
	ldr	x24, [x21, #8]
	bl	_SIZEOF_WCHAR_STRING
	mov	x1, x0
	mov	x0, x24
	bl	_sort_realloc
	str	x0, [x21, #8]
	ldr	x9, [x19]
	add	x8, x9, #1
LBB0_30:                                ;   in Loop: Header=BB0_31 Depth=1
	str	w23, [x0, x9, lsl #2]
	str	x8, [x19]
	str	wzr, [x0, x8, lsl #2]
	mov	x0, x20
	bl	_feof
	cbnz	x0, LBB0_38
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_fgetwc
	ldr	w8, [x25]
	cmp	w0, w8
	b.eq	LBB0_37
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=1
	mov	x23, x0
	cmp	w0, w22
	b.eq	LBB0_38
; %bb.33:                               ;   in Loop: Header=BB0_31 Depth=1
	ldr	x9, [x19]
	add	x8, x9, #1
	ldrsw	x10, [x21]
	cmp	x8, x10
	b.hs	LBB0_29
; %bb.34:                               ;   in Loop: Header=BB0_31 Depth=1
	ldr	x0, [x21, #8]
	b	LBB0_30
LBB0_35:
	mov	x0, x20
	bl	_feof
	cbnz	x0, LBB0_3
; %bb.36:
	mov	w0, #2
	mov	x1, #0
	bl	_err
	b	LBB0_3
LBB0_37:
	ldr	x8, [x19]
	cbz	x8, LBB0_3
LBB0_38:
	ldr	x0, [x21, #8]
	ldr	x1, [x19]
LBB0_39:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_bwssbdup
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_CUR_MAX,4,2                 ; @MB_CUR_MAX
	.comm	_EOF,4,2                        ; @EOF
	.comm	_WEOF,4,2                       ; @WEOF
.subsections_via_symbols
