	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_text_chunk
_decode_text_chunk:                     ## @decode_text_chunk
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	(%rdi), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memchr
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movslq	%ebx, %rax
	leaq	(%r15,%rax,4), %r13
	leaq	4(%r12), %rbx
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.3:
	cmpq	%r13, %rbx
	je	LBB0_1
## %bb.4:
	cmpl	$0, 4(%r12)
	je	LBB0_5
LBB0_1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%rbx, -56(%rbp)
	subq	%rbx, %r13
	shrq	$2, %r13
LBB0_8:
	subq	%r15, %r12
	shrq	$2, %r12
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_iso88591_to_utf8
	movq	%rax, %r14
	movq	-56(%rbp), %rdi
	movl	%r13d, %esi
	callq	_iso88591_to_utf8
	movq	%rax, %r15
	movq	-56(%rbp), %rdi
	cmpq	%rbx, %rdi
	je	LBB0_10
## %bb.9:
	callq	_av_free
LBB0_10:
	testq	%r14, %r14
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_12
## %bb.11:
	testq	%r15, %r15
	je	LBB0_12
## %bb.13:
	movq	_AV_DICT_DONT_STRDUP_KEY@GOTPCREL(%rip), %rax
	movq	_AV_DICT_DONT_STRDUP_VAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_av_dict_set
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_12:
	movq	%r14, %rdi
	callq	_av_free
	movq	%r15, %rdi
	callq	_av_free
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_14
LBB0_5:
	leaq	8(%r12), %rbx
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_decode_zbuf
	testl	%eax, %eax
	js	LBB0_14
## %bb.6:
	movl	-48(%rbp), %r13d
	leaq	-48(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_av_bprint_finalize
	testl	%eax, %eax
	jns	LBB0_8
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_DICT_DONT_STRDUP_KEY,4,2    ## @AV_DICT_DONT_STRDUP_KEY
	.comm	_AV_DICT_DONT_STRDUP_VAL,4,2    ## @AV_DICT_DONT_STRDUP_VAL
	.no_dead_strip	_decode_text_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_text_chunk
_decode_text_chunk:                     ; @decode_text_chunk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x23, x2
	mov	x21, x1
	ldr	x20, [x0]
	mov	x0, x20
	mov	w1, #0
	mov	x2, x21
	bl	_memchr
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	add	x2, x20, w21, sxtw #2
	add	x21, x0, #4
	cbz	w23, LBB0_6
; %bb.2:
	cmp	x21, x2
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x22, #4]
	cbz	w8, LBB0_12
LBB0_4:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_5:
	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
	add	sp, sp, #80
	ret
LBB0_6:
	str	x21, [sp, #8]
	sub	x8, x2, x21
	lsr	x23, x8, #2
LBB0_7:
	sub	x8, x22, x20
	lsr	x1, x8, #2
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_iso88591_to_utf8
	mov	x20, x0
	ldr	x0, [sp, #8]
	mov	x1, x23
	bl	_iso88591_to_utf8
	mov	x22, x0
	ldr	x0, [sp, #8]
	cmp	x0, x21
	b.eq	LBB0_9
; %bb.8:
	bl	_av_free
LBB0_9:
	cmp	x20, #0
	ccmp	x22, #0, #4, ne
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_av_free
	mov	x0, x22
	bl	_av_free
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_5
LBB0_11:
Lloh6:
	adrp	x8, _AV_DICT_DONT_STRDUP_KEY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_DICT_DONT_STRDUP_KEY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _AV_DICT_DONT_STRDUP_VAL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AV_DICT_DONT_STRDUP_VAL@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_av_dict_set
	mov	w0, #0
	b	LBB0_5
LBB0_12:
	add	x21, x22, #8
	mov	x0, sp
	mov	x1, x21
	bl	_decode_zbuf
	tbnz	w0, #31, LBB0_5
; %bb.13:
	ldr	w23, [sp]
	mov	x0, sp
	add	x1, sp, #8
	bl	_av_bprint_finalize
	tbz	w0, #31, LBB0_7
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_DICT_DONT_STRDUP_KEY,4,2    ; @AV_DICT_DONT_STRDUP_KEY
	.comm	_AV_DICT_DONT_STRDUP_VAL,4,2    ; @AV_DICT_DONT_STRDUP_VAL
	.no_dead_strip	_decode_text_chunk
.subsections_via_symbols
