	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function utf8_fill
_utf8_fill:                             ## @utf8_fill
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	movq	8(%rbx), %rax
	leaq	(%rdi,%rax), %rsi
	movq	16(%rbx), %rdx
	subq	%rax, %rdx
	callq	_memmove
	movq	16(%rbx), %rax
	subq	8(%rbx), %rax
	leaq	-2048(%rax), %rcx
	negq	%rcx
	movq	%rax, 16(%rbx)
	movq	$0, 8(%rbx)
	movq	%rcx, -64(%rbp)
	movl	$1, %r14d
	cmpq	$2048, %rax                     ## imm = 0x800
	je	LBB0_20
## %bb.1:
	leaq	-72(%rbp), %r12
	leaq	-48(%rbp), %r13
	leaq	-64(%rbp), %r15
	xorl	%r14d, %r14d
	jmp	LBB0_2
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_hb_error
	incl	28(%rbx)
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, -64(%rbp)
	je	LBB0_13
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	24(%rbx), %eax
	movl	28(%rbx), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%rbx), %rdi
	movl	44(%rbx), %ecx
	movl	$1, %esi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_fread
	movl	$0, 28(%rbx)
	movl	%eax, 24(%rbx)
	testl	%eax, %eax
	je	LBB0_20
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ecx, %ecx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ecx, %rcx
	movq	32(%rbx), %rdx
	addq	%rcx, %rdx
	movq	%rdx, -56(%rbp)
	movq	(%rbx), %rdx
	addq	16(%rbx), %rdx
	movq	%rdx, -48(%rbp)
	subl	%ecx, %eax
	cltq
	movq	%rax, -72(%rbp)
	movl	48(%rbx), %edi
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	%r15, %r8
	callq	_iconv
	movq	-48(%rbp), %rdx
	movq	(%rbx), %rcx
	movq	16(%rbx), %rsi
	addq	%rcx, %rsi
	cmpq	%rsi, %rdx
	movl	$1, %esi
	cmovnel	%esi, %r14d
	movq	32(%rbx), %rdi
	subq	%rcx, %rdx
	movq	%rdx, 16(%rbx)
	movq	-56(%rbp), %rsi
	movl	%esi, %r8d
	subl	%edi, %r8d
	movl	%r8d, 28(%rbx)
	cmpl	$0, 40(%rbx)
	je	LBB0_6
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$-1, %rax
	jne	LBB0_12
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$239, (%rcx)
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$187, 4(%rcx)
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$191, 8(%rcx)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	$3, 8(%rbx)
	cmpq	$3, %rdx
	movl	$0, %ecx
	cmovel	%ecx, %r14d
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, 40(%rbx)
	cmpq	$-1, %rax
	jne	LBB0_12
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	24(%rbx), %rdx
	movslq	%r8d, %rax
	subq	%rax, %rdx
	callq	_memmove
	movslq	28(%rbx), %rax
	movslq	24(%rbx), %rdi
	subq	%rax, %rdi
	movl	%edi, 24(%rbx)
	movl	$0, 28(%rbx)
	movl	$1024, %edx                     ## imm = 0x400
	subl	%edi, %edx
	addq	32(%rbx), %rdi
	movl	44(%rbx), %ecx
	movl	$1, %esi
	callq	_fread
	testl	%eax, %eax
	je	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	addl	%eax, 24(%rbx)
	jmp	LBB0_12
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_EILSEQ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_E2BIG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
	jmp	LBB0_20
LBB0_13:
	movl	$1, %r14d
LBB0_20:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_EILSEQ,8,3                     ## @EILSEQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid byte for codeset in input, discard byte"

	.comm	_E2BIG,8,3                      ## @E2BIG
	.no_dead_strip	_utf8_fill
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function utf8_fill
_utf8_fill:                             ; @utf8_fill
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
	ldr	x0, [x0]
	ldp	x8, x9, [x19, #8]
	add	x1, x0, x8
	sub	x2, x9, x8
	bl	_memmove
	ldp	x8, x9, [x19, #8]
	mov	w10, #2048
	sub	x8, x9, x8
	sub	x9, x10, x8
	stp	xzr, x8, [x19, #8]
	str	x9, [sp, #24]
	mov	w22, #1
	mov	w20, #1
	cmp	x8, #2048
	b.eq	LBB0_20
; %bb.1:
	mov	w20, #0
	mov	w23, #1024
	mov	w24, #3
Lloh0:
	adrp	x25, _errno@GOTPAGE
Lloh1:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
Lloh2:
	adrp	x26, _EINVAL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _EINVAL@GOTPAGEOFF]
Lloh4:
	adrp	x27, _EILSEQ@GOTPAGE
Lloh5:
	ldr	x27, [x27, _EILSEQ@GOTPAGEOFF]
Lloh6:
	adrp	x28, _E2BIG@GOTPAGE
Lloh7:
	ldr	x28, [x28, _E2BIG@GOTPAGEOFF]
Lloh8:
	adrp	x21, l_.str@PAGE
Lloh9:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_hb_error
	ldr	w8, [x19, #28]
	add	w8, w8, #1
	str	w8, [x19, #28]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_19
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w0, w8, [x19, #24]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #32]
	ldr	w3, [x19, #44]
	mov	w1, #1
	mov	w2, #1024
	bl	_fread
	stp	w0, wzr, [x19, #24]
	cbz	w0, LBB0_20
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #0
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x19, #32]
	add	x11, x9, w8, sxtw
	ldr	x9, [x19]
	ldr	x10, [x19, #16]
	add	x9, x9, x10
	stp	x9, x11, [sp, #8]
	sub	w8, w0, w8
	sxtw	x8, w8
	str	x8, [sp]
	ldr	w0, [x19, #48]
	add	x1, sp, #16
	mov	x2, sp
	add	x3, sp, #8
	add	x4, sp, #24
	bl	_iconv
	mov	x8, x0
	ldp	x9, x1, [sp, #8]
	ldr	x11, [x19]
	ldr	x10, [x19, #16]
	add	x10, x11, x10
	cmp	x9, x10
	csinc	w20, w20, wzr, eq
	sub	x10, x9, x11
	str	x10, [x19, #16]
	ldr	x0, [x19, #32]
	sub	w9, w1, w0
	str	w9, [x19, #28]
	ldr	w12, [x19, #40]
	cbz	w12, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	cmn	x8, #1
	b.ne	LBB0_3
	b	LBB0_14
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w12, [x11]
	cmp	w12, #239
	b.ne	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w12, [x11, #4]
	cmp	w12, #187
	b.ne	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w11, [x11, #8]
	cmp	w11, #191
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	str	x24, [x19, #8]
	cmp	x10, #3
	csel	w20, wzr, w20, eq
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w22, [x19, #40]
	cmn	x8, #1
	b.ne	LBB0_3
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	ldr	x10, [x26]
	cmp	x8, x10
	b.ne	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x8, [x19, #24]
	sub	x2, x8, w9, sxtw
	bl	_memmove
	ldpsw	x9, x8, [x19, #24]
	ldr	x10, [x19, #32]
	sub	x8, x9, x8
	add	x0, x10, x8
	stp	w8, wzr, [x19, #24]
	sub	w2, w23, w8
	ldr	w3, [x19, #44]
	mov	w1, #1
	bl	_fread
	cbz	w0, LBB0_20
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #24]
	add	w8, w8, w0
	str	w8, [x19, #24]
	b	LBB0_3
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x27]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_3
	b	LBB0_20
LBB0_19:
	mov	w20, #1
LBB0_20:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_EILSEQ,8,3                     ; @EILSEQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid byte for codeset in input, discard byte"

	.comm	_E2BIG,8,3                      ; @E2BIG
	.no_dead_strip	_utf8_fill
.subsections_via_symbols
