	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function validate_string
_validate_string:                       ## @validate_string
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	_AV_BPRINT_SIZE_UNLIMITED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_av_bprint_init
	movq	%r12, %rdi
	callq	_strlen
	movq	%r12, -64(%rbp)
	cmpb	$0, (%r12)
	je	LBB0_15
## %bb.1:
	movq	%r12, %rcx
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movslq	%eax, %r12
	addq	%rcx, %r12
	leaq	-48(%rbp), %rbx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rcx, %r15
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	-64(%rbp), %edx
	subl	%r15d, %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_av_bprint_append_data
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %r15
	cmpb	$0, (%r15)
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r13), %ecx
	leaq	-92(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdx
	callq	_av_utf8_decode
	testq	%rax, %rax
	jns	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_AV_BPRINT_SIZE_AUTOMATIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-88(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_av_bprint_init
	movl	-64(%rbp), %edx
	subl	%r15d, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_bprint_bytes
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-88(%rbp), %ecx
	movq	%r13, %rdi
	leaq	L_.str(%rip), %rdx
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	movl	(%r13), %eax
	cmpl	$128, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$129, %eax
	jne	LBB0_8
	jmp	LBB0_13
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%r13), %edx
	movq	%rbx, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_av_bprintf
	movl	(%r13), %eax
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	-52(%rbp)                       ## 4-byte Folded Spill
	movq	_WRITER_STRING_VALIDATION_IGNORE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_2
	jmp	LBB0_3
LBB0_9:
	xorl	%r14d, %r14d
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	je	LBB0_14
## %bb.10:
	cmpl	$128, (%r13)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	jne	LBB0_15
## %bb.11:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r13), %r9d
	leaq	L_.str.3(%rip), %rdx
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_15
LBB0_13:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_14:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
LBB0_15:
	leaq	-48(%rbp), %rdi
	movq	%r15, %rsi
	callq	_av_bprint_finalize
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_BPRINT_SIZE_UNLIMITED,4,2   ## @AV_BPRINT_SIZE_UNLIMITED
	.comm	_AV_BPRINT_SIZE_AUTOMATIC,4,2   ## @AV_BPRINT_SIZE_AUTOMATIC
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid UTF-8 sequence %s found in string '%s'\n"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Invalid UTF-8 sequence found in string '%s'\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.2:                               ## @.str.2
	.asciz	"%s"

	.comm	_WRITER_STRING_VALIDATION_IGNORE,4,2 ## @WRITER_STRING_VALIDATION_IGNORE
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.3:                               ## @.str.3
	.asciz	"%d invalid UTF-8 sequence(s) found in string '%s', replaced with '%s'\n"

	.no_dead_strip	_validate_string
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function validate_string
_validate_string:                       ; @validate_string
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _AV_BPRINT_SIZE_UNLIMITED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_BPRINT_SIZE_UNLIMITED@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x0, sp, #48
	mov	w1, #0
	bl	_av_bprint_init
	mov	x0, x21
	bl	_strlen
	str	x21, [sp, #56]
	ldrb	w8, [x21]
	cbz	w8, LBB0_12
; %bb.1:
	str	x19, [sp, #32]                  ; 8-byte Folded Spill
	mov	w26, #0
Lloh3:
	adrp	x27, _AV_BPRINT_SIZE_AUTOMATIC@GOTPAGE
Lloh4:
	ldr	x27, [x27, _AV_BPRINT_SIZE_AUTOMATIC@GOTPAGEOFF]
Lloh5:
	adrp	x28, _AV_LOG_DEBUG@GOTPAGE
Lloh6:
	ldr	x28, [x28, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh7:
	adrp	x22, l_.str@PAGE
Lloh8:
	add	x22, x22, l_.str@PAGEOFF
	add	x23, x21, w0, sxtw
Lloh9:
	adrp	x19, _WRITER_STRING_VALIDATION_IGNORE@GOTPAGE
Lloh10:
	ldr	x19, [x19, _WRITER_STRING_VALIDATION_IGNORE@GOTPAGEOFF]
	mov	x25, x21
Lloh11:
	adrp	x24, l_.str.2@PAGE
Lloh12:
	add	x24, x24, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #56]
	sub	w2, w8, w25
	add	x0, sp, #48
	mov	x1, x25
	bl	_av_bprint_append_data
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x25, [sp, #56]
	ldrb	w8, [x25]
	cbz	w8, LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x20, #8]
	add	x0, sp, #44
	add	x1, sp, #56
	mov	x2, x23
	bl	_av_utf8_decode
	tbz	x0, #63, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w2, [x27]
	add	x0, sp, #40
	mov	w1, #0
	bl	_av_bprint_init
	ldr	w8, [sp, #56]
	sub	w2, w8, w25
	add	x0, sp, #40
	mov	x1, x25
	bl	_bprint_bytes
	ldr	w1, [x28]
	ldr	w8, [sp, #40]
	stp	x8, x21, [sp]
	mov	x0, x20
	mov	x2, x22
	bl	_av_log
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, #129
	b.ne	LBB0_8
	b	LBB0_14
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w2, [x20, #4]
	add	x0, sp, #48
	mov	x1, x24
	bl	_av_bprintf
	ldr	w8, [x20]
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w26, #1
	ldr	w9, [x19]
	cmp	w8, w9
	b.eq	LBB0_2
	b	LBB0_3
LBB0_9:
	cbz	w26, LBB0_13
; %bb.10:
	ldr	w8, [x20]
	cmp	w8, #128
	ldr	x19, [sp, #32]                  ; 8-byte Folded Reload
	b.ne	LBB0_12
; %bb.11:
Lloh13:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	w8, [x20, #4]
	stp	x21, x8, [sp, #8]
	str	x26, [sp]
Lloh16:
	adrp	x2, l_.str.3@PAGE
Lloh17:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_av_log
LBB0_12:
	mov	w20, #0
	b	LBB0_16
LBB0_13:
	mov	w20, #0
	b	LBB0_15
LBB0_14:
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	str	x21, [sp]
Lloh21:
	adrp	x2, l_.str.1@PAGE
Lloh22:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh23:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh25:
	ldr	w20, [x8]
LBB0_15:
	ldr	x19, [sp, #32]                  ; 8-byte Folded Reload
LBB0_16:
	add	x0, sp, #48
	mov	x1, x19
	bl	_av_bprint_finalize
	mov	x0, x20
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_BPRINT_SIZE_UNLIMITED,4,2   ; @AV_BPRINT_SIZE_UNLIMITED
	.comm	_AV_BPRINT_SIZE_AUTOMATIC,4,2   ; @AV_BPRINT_SIZE_AUTOMATIC
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid UTF-8 sequence %s found in string '%s'\n"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Invalid UTF-8 sequence found in string '%s'\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.2:                               ; @.str.2
	.asciz	"%s"

	.comm	_WRITER_STRING_VALIDATION_IGNORE,4,2 ; @WRITER_STRING_VALIDATION_IGNORE
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.3:                               ; @.str.3
	.asciz	"%d invalid UTF-8 sequence(s) found in string '%s', replaced with '%s'\n"

	.no_dead_strip	_validate_string
.subsections_via_symbols
