	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function iso88591_to_utf8
LCPI0_0:
	.long	127                             ## 0x7f
	.long	127                             ## 0x7f
	.space	4
	.space	4
LCPI0_1:
	.quad	1                               ## 0x1
	.quad	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_iso88591_to_utf8:                      ## @iso88591_to_utf8
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.1:
	cmpq	$4, %r14
	jae	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	LBB0_10
LBB0_3:
	xorl	%ecx, %ecx
	jmp	LBB0_11
LBB0_4:
	movq	%r14, %rax
	andq	$-4, %rax
	leaq	-4(%rax), %rdx
	movq	%rdx, %rcx
	shrq	$2, %rcx
	incq	%rcx
	testq	%rdx, %rdx
	je	LBB0_23
## %bb.5:
	movq	%rcx, %rsi
	andq	$-2, %rsi
	pxor	%xmm0, %xmm0
	xorl	%edx, %edx
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = <127,127,u,u>
	movdqa	LCPI0_1(%rip), %xmm3            ## xmm3 = [1,1]
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx,%rdx,4), %xmm4            ## xmm4 = mem[0],zero
	movq	8(%rbx,%rdx,4), %xmm5           ## xmm5 = mem[0],zero
	pcmpgtd	%xmm2, %xmm4
	pmovzxdq	%xmm4, %xmm4                    ## xmm4 = xmm4[0],zero,xmm4[1],zero
	pand	%xmm3, %xmm4
	paddq	%xmm0, %xmm4
	pcmpgtd	%xmm2, %xmm5
	pmovzxdq	%xmm5, %xmm5                    ## xmm5 = xmm5[0],zero,xmm5[1],zero
	pand	%xmm3, %xmm5
	paddq	%xmm1, %xmm5
	movq	16(%rbx,%rdx,4), %xmm0          ## xmm0 = mem[0],zero
	movq	24(%rbx,%rdx,4), %xmm1          ## xmm1 = mem[0],zero
	pcmpgtd	%xmm2, %xmm0
	pmovzxdq	%xmm0, %xmm0                    ## xmm0 = xmm0[0],zero,xmm0[1],zero
	pand	%xmm3, %xmm0
	paddq	%xmm4, %xmm0
	pcmpgtd	%xmm2, %xmm1
	pmovzxdq	%xmm1, %xmm1                    ## xmm1 = xmm1[0],zero,xmm1[1],zero
	pand	%xmm3, %xmm1
	paddq	%xmm5, %xmm1
	addq	$8, %rdx
	addq	$-2, %rsi
	jne	LBB0_6
## %bb.7:
	testb	$1, %cl
	je	LBB0_9
LBB0_8:
	movq	(%rbx,%rdx,4), %xmm2            ## xmm2 = mem[0],zero
	movq	8(%rbx,%rdx,4), %xmm3           ## xmm3 = mem[0],zero
	movdqa	LCPI0_0(%rip), %xmm4            ## xmm4 = <127,127,u,u>
	pcmpgtd	%xmm4, %xmm2
	pmovzxdq	%xmm2, %xmm2                    ## xmm2 = xmm2[0],zero,xmm2[1],zero
	movdqa	LCPI0_1(%rip), %xmm5            ## xmm5 = [1,1]
	pand	%xmm5, %xmm2
	paddq	%xmm2, %xmm0
	pcmpgtd	%xmm4, %xmm3
	pmovzxdq	%xmm3, %xmm2                    ## xmm2 = xmm3[0],zero,xmm3[1],zero
	pand	%xmm5, %xmm2
	paddq	%xmm2, %xmm1
LBB0_9:
	paddq	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rcx
	cmpq	%r14, %rax
	je	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	xorl	%edx, %edx
	cmpl	$127, (%rbx,%rax,4)
	setg	%dl
	addq	%rdx, %rcx
	incq	%rax
	cmpq	%rax, %r14
	jne	LBB0_10
LBB0_11:
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%r14, %rax
	je	LBB0_24
## %bb.13:
	movq	%r14, %rdx
	notq	%rdx
	addq	%rdx, %rax
	cmpq	%rax, %rcx
	ja	LBB0_24
## %bb.15:
	leaq	(%r14,%rcx), %rdi
	incq	%rdi
	callq	_av_malloc
	testq	%rax, %rax
	je	LBB0_24
## %bb.16:
	movq	%rax, %rcx
	testq	%r14, %r14
	je	LBB0_22
## %bb.17:
	xorl	%edx, %edx
	movq	%rax, %rcx
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_20 Depth=1
	movl	%esi, (%rcx)
	addq	$4, %rcx
LBB0_19:                                ##   in Loop: Header=BB0_20 Depth=1
	incq	%rdx
	cmpq	%rdx, %r14
	je	LBB0_22
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rdx,4), %esi
	cmpl	$128, %esi
	jl	LBB0_18
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	shrl	$6, %esi
	orl	$192, %esi
	movl	%esi, (%rcx)
	movl	(%rbx,%rdx,4), %esi
	andl	$63, %esi
	orl	$128, %esi
	movl	%esi, 4(%rcx)
	addq	$8, %rcx
	jmp	LBB0_19
LBB0_24:
	xorl	%eax, %eax
LBB0_25:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_22:
	movl	$0, (%rcx)
	jmp	LBB0_25
LBB0_23:
	pxor	%xmm0, %xmm0
	xorl	%edx, %edx
	pxor	%xmm1, %xmm1
	testb	$1, %cl
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
	.no_dead_strip	_iso88591_to_utf8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iso88591_to_utf8
_iso88591_to_utf8:                      ; @iso88591_to_utf8
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	cbz	x1, LBB0_3
; %bb.1:
	cmp	x19, #8
	b.hs	LBB0_4
; %bb.2:
	mov	x8, #0
	mov	x9, #0
	b	LBB0_7
LBB0_3:
	mov	x9, #0
	b	LBB0_9
LBB0_4:
	and	x8, x19, #0xfffffffffffffff8
	add	x9, x20, #16
	movi.2d	v0, #0000000000000000
	movi.2s	v1, #127
	mov	w10, #1
	dup.2d	v2, x10
	mov	x10, x8
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
	movi.2d	v5, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	d6, d7, [x9, #-16]
	ldp	d16, d17, [x9], #32
	cmgt.2s	v6, v6, v1
	ushll.2d	v6, v6, #0
	and.16b	v6, v6, v2
	cmgt.2s	v7, v7, v1
	ushll.2d	v7, v7, #0
	and.16b	v7, v7, v2
	cmgt.2s	v16, v16, v1
	ushll.2d	v16, v16, #0
	and.16b	v16, v16, v2
	cmgt.2s	v17, v17, v1
	ushll.2d	v17, v17, #0
	and.16b	v17, v17, v2
	add.2d	v0, v0, v6
	add.2d	v3, v3, v7
	add.2d	v4, v4, v16
	add.2d	v5, v5, v17
	subs	x10, x10, #8
	b.ne	LBB0_5
; %bb.6:
	add.2d	v0, v3, v0
	add.2d	v0, v4, v0
	add.2d	v0, v5, v0
	addp.2d	d0, v0
	fmov	x9, d0
	cmp	x8, x19
	b.eq	LBB0_9
LBB0_7:
	sub	x10, x19, x8
	add	x8, x20, x8, lsl #2
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x8], #4
	cmp	w11, #127
	cinc	x9, x9, gt
	subs	x10, x10, #1
	b.ne	LBB0_8
LBB0_9:
Lloh0:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x19
	b.eq	LBB0_11
; %bb.10:
	mvn	x10, x19
	add	x8, x8, x10
	cmp	x9, x8
	b.ls	LBB0_13
LBB0_11:
	mov	x0, #0
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_13:
	add	x8, x19, x9
	add	x0, x8, #1
	bl	_av_malloc
	cbz	x0, LBB0_12
; %bb.14:
	mov	x8, x0
	cbz	x19, LBB0_20
; %bb.15:
	mov	x8, x0
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_18 Depth=1
	str	w9, [x8], #4
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x20, x20, #4
	subs	x19, x19, #1
	b.eq	LBB0_20
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x20]
	cmp	w9, #128
	b.lt	LBB0_16
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	lsr	w9, w9, #6
	orr	w9, w9, #0xc0
	str	w9, [x8]
	ldr	w9, [x20]
	mov	w10, #128
	bfxil	w10, w9, #0, #6
	str	w10, [x8, #4]
	add	x8, x8, #8
	b	LBB0_17
LBB0_20:
	str	wzr, [x8]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
	.no_dead_strip	_iso88591_to_utf8
.subsections_via_symbols
