	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wide_read                      ## -- Begin function wide_read
	.p2align	4, 0x90
_wide_read:                             ## @wide_read
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %rbx
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BUFSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	incl	%r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpq	%rbx, %r12
	setae	%dil
	callq	_assert
	movl	%r14d, %edi
	callq	_USE
	cmpq	%rbx, %r12
	jbe	LBB0_3
## %bb.4:
	movq	%rbx, %rcx
	xorl	%esi, %esi
	xorl	%r14d, %r14d
	movl	%r15d, %edi
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rsi, %r15
	addq	%rax, %rsi
	movl	%edi, %r13d
	movq	%rbx, %rdx
	callq	_xread
	movq	%rax, %rdx
	movq	%r15, %rax
	orq	%rdx, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rsi
	addq	%rdx, %rsi
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%r14), %rdi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addq	%r15, %rax
	movq	%r14, %r13
	movq	%rsi, %r14
	subq	%r15, %r14
	movq	%rdi, -120(%rbp)                ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_normal_mbtowc
	movl	%eax, %r12d
	cmpl	$-1, %eax
	jne	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	xorl	%eax, %eax
	callq	_reset_mbtowc
	movq	_MB_LEN_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jae	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=2
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=2
	movq	_INVALID_BYTE@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	orb	(%rcx), %al
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movb	%al, (%rcx)
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=2
	cmpl	$2, %r12d
	movl	$1, %eax
	cmovll	%eax, %r12d
	addq	%r12, %r15
	incq	%r13
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	-1(%rax), %r12
	cmpq	%r15, %rbx
	movq	%r13, %r14
	movq	%rbx, %rsi
	jbe	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=2
	cmpq	$1, %rax
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_11
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	xorl	%r15d, %r15d
	movl	%r13d, %edi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	subq	%r15, %rsi
	jmp	LBB0_22
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r13, %r14
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rbx
	movq	%rsi, %r14
	subq	%r15, %r14
	jne	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rcx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%rbx, %r14
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	subq	%r15, %rsi
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	addq	%rdi, %r15
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memmove
	movq	%r12, %rcx
	movq	%r14, %rsi
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%rbx, %r14
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
LBB0_22:                                ##   in Loop: Header=BB0_6 Depth=1
	testq	%rsi, %rsi
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_6 Depth=1
	testq	%rcx, %rcx
	je	LBB0_24
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rcx, %rbx
	subq	%rsi, %rbx
	movl	$1, %eax
	cmovbeq	%rax, %rbx
	leaq	(%rbx,%rsi), %rax
	cmpq	%r12, %rax
	jb	LBB0_6
	jmp	LBB0_24
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_3:
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r14d, %r14d
	movl	%r15d, %edi
	jmp	LBB0_24
LBB0_7:
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r13d, %edi
LBB0_24:
	movq	%r14, %rbx
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
	negl	%esi
	movq	_L_INCR@GOTPCREL(%rip), %rax
	movq	%rdx, %r12
	movl	(%rax), %edx
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_lseek
	movq	%r12, %rax
	movl	%r15d, (%r14)
	testq	%rbx, %rbx
	cmovneq	%rbx, %rax
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_27
## %bb.26:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFSIZE,4,2                    ## @BUFSIZE
	.comm	_MB_LEN_MAX,8,3                 ## @MB_LEN_MAX
	.comm	_INVALID_BYTE,1,0               ## @INVALID_BYTE
	.comm	_errno,4,2                      ## @errno
	.comm	_L_INCR,4,2                     ## @L_INCR
	.comm	_fclens,8,3                     ## @fclens
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wide_read                      ; -- Begin function wide_read
	.p2align	2
_wide_read:                             ; @wide_read
	.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, #32
	mov	x23, x3
	mov	x25, x2
	mov	x20, x1
	mov	x26, x0
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, _BUFSIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BUFSIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w27, w8, #1
	mov	x9, x27
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x27, #15
	and	x9, x9, #0x1fffffff0
	sub	x22, x8, x9
	mov	sp, x22
	cbz	x2, LBB0_16
; %bb.1:
	cmp	x27, x25
	cset	w0, hs
	bl	_assert
	mov	x0, x23
	bl	_USE
	cmp	x27, x25
	b.ls	LBB0_17
; %bb.2:
	mov	x24, #0
	mov	x28, #0
	mov	x21, x25
	stur	w26, [x29, #-100]               ; 4-byte Folded Spill
	stur	x27, [x29, #-112]               ; 8-byte Folded Spill
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	add	x1, x22, x24
	mov	x0, x26
	mov	x2, x25
	bl	_xread
	orr	x8, x24, x0
	cbz	x8, LBB0_18
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	stur	x0, [x29, #-96]                 ; 8-byte Folded Spill
	mov	x23, #0
	adds	x19, x0, x24
	b.ne	LBB0_7
	b	LBB0_12
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=2
	ldrb	w8, [x25]
Lloh8:
	adrp	x9, _INVALID_BYTE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _INVALID_BYTE@GOTPAGEOFF]
	ldrb	w9, [x9]
	orr	w8, w9, w8
	strb	w8, [x24]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	cmp	w26, #1
	csinc	w8, w26, wzr, gt
	add	x28, x28, #1
	sub	x25, x21, #1
	add	x23, x23, x8
	cmp	x19, x23
	ccmp	x21, #1, #4, hi
	mov	x21, x25
	b.eq	LBB0_10
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x24, x20, x28
	add	x25, x22, x23
	sub	x27, x19, x23
	mov	x0, x24
	mov	x1, x25
	mov	x2, x27
	bl	_normal_mbtowc
	mov	x26, x0
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	bl	_reset_mbtowc
Lloh10:
	adrp	x8, _MB_LEN_MAX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MB_LEN_MAX@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x27, x8
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	ccmp	x8, #0, #4, lo
	b.eq	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x21
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	subs	x24, x19, x23
	b.ne	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, x25
	ldur	w26, [x29, #-100]               ; 4-byte Folded Reload
	ldur	x27, [x29, #-112]               ; 8-byte Folded Reload
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x24, x19, x23
	cbnz	x24, LBB0_14
	b	LBB0_19
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, x22, x23
	mov	x0, x22
	mov	x2, x24
	bl	_memmove
	mov	x21, x25
	ldur	w26, [x29, #-100]               ; 4-byte Folded Reload
	ldur	x27, [x29, #-112]               ; 8-byte Folded Reload
	cbz	x24, LBB0_19
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x21, LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	subs	x8, x21, x24
	csinc	x25, x8, xzr, hi
	add	x8, x25, x24
	cmp	x8, x27
	b.lo	LBB0_3
	b	LBB0_19
LBB0_16:
	mov	x0, #0
	b	LBB0_20
LBB0_17:
	mov	x24, #0
	stur	xzr, [x29, #-96]                ; 8-byte Folded Spill
	mov	x28, #0
	b	LBB0_19
LBB0_18:
	mov	x24, #0
	stur	xzr, [x29, #-96]                ; 8-byte Folded Spill
LBB0_19:
Lloh13:
	adrp	x19, _errno@GOTPAGE
Lloh14:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	ldr	w20, [x19]
	neg	w1, w24
Lloh15:
	adrp	x8, _L_INCR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _L_INCR@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x26
	bl	_lseek
	str	w20, [x19]
	cmp	x28, #0
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	csel	x0, x8, x28, eq
LBB0_20:
	ldur	x8, [x29, #-88]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	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_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFSIZE,4,2                    ; @BUFSIZE
	.comm	_MB_LEN_MAX,8,3                 ; @MB_LEN_MAX
	.comm	_INVALID_BYTE,1,0               ; @INVALID_BYTE
	.comm	_errno,4,2                      ; @errno
	.comm	_L_INCR,4,2                     ; @L_INCR
	.comm	_fclens,8,3                     ; @fclens
.subsections_via_symbols
