	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_id3v2_write_apic            ## -- Begin function ff_id3v2_write_apic
	.p2align	4, 0x90
_ff_id3v2_write_apic:                   ## @ff_id3v2_write_apic
	.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	8(%rdi), %rcx
	movq	(%rdx), %rbx
	movq	_ff_id3v2_mime_tags@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$3, (%rsi)
	jne	LBB0_1
## %bb.2:
	movq	_ID3v2_ENCODING_UTF16BOM@GOTPCREL(%rip), %r9
	jmp	LBB0_3
LBB0_1:
	movq	_ID3v2_ENCODING_UTF8@GOTPCREL(%rip), %r9
LBB0_3:
	movq	(%rcx,%rbx,8), %r14
	movq	_AV_CODEC_ID_NONE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	movq	(%rax), %rbx
	cmpq	%r8, %rbx
	je	LBB0_7
## %bb.4:
	movl	(%r9), %r9d
	movq	8(%r14), %rcx
	movq	(%rcx), %rcx
	addq	$16, %rax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rcx, %rbx
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rax), %rbx
	addq	$16, %rax
	cmpq	%r8, %rbx
	jne	LBB0_5
	jmp	LBB0_7
LBB0_8:
	movq	-8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r9d, %ebx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_av_dict_get
	testq	%rax, %rax
	je	LBB0_15
## %bb.10:
	movq	%rax, %r12
	movq	_ff_id3v2_picture_types@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_FF_ARRAY_ELEMS
	testl	%eax, %eax
	jle	LBB0_15
## %bb.11:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movq	(%r15), %rax
	movl	(%rax,%r13,4), %esi
	callq	_av_strcasecmp
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%r13
	movq	(%r15), %rdi
	callq	_FF_ARRAY_ELEMS
	cltq
	cmpq	%rax, %r13
	jl	LBB0_12
## %bb.14:
	xorl	%r13d, %r13d
LBB0_15:
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_av_dict_get
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movq	(%rax), %r14
	jmp	LBB0_18
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %ecx
	leaq	L_.str.1(%rip), %rdx
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_16:
	leaq	L_.str(%rip), %r14
LBB0_18:
	movq	_ID3v2_ENCODING_UTF16BOM@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_21
## %bb.19:
	movq	%r14, %rdi
	callq	_string_is_ascii
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	_ID3v2_ENCODING_ISO8859@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_21:
	leaq	-48(%rbp), %rdi
	callq	_avio_open_dyn_buf
	testq	%rax, %rax
	js	LBB0_22
## %bb.23:
	movq	-48(%rbp), %rdi
	movl	%ebx, %esi
	callq	_avio_w8
	movq	-48(%rbp), %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_avio_put_str
	movq	-48(%rbp), %rdi
	movl	%r13d, %esi
	callq	_avio_w8
	movq	-48(%rbp), %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_id3v2_encode_string
	movq	-48(%rbp), %rdi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rsi
	movl	8(%rax), %edx
	callq	_avio_write
	movq	-48(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_avio_close_dyn_buf
	movl	%eax, %r15d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %r12
	movl	$65, %edi
	movl	$80, %esi
	movl	$73, %edx
	movl	$67, %ecx
	callq	_MKBETAG
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_avio_wb32
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	cmpl	$3, (%r14)
	movq	(%rbx), %rdi
	movl	%r15d, %esi
	jne	LBB0_25
## %bb.24:
	callq	_avio_wb32
	jmp	LBB0_26
LBB0_22:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r12d
	jmp	LBB0_27
LBB0_25:
	callq	_id3v2_put_size
LBB0_26:
	movq	(%rbx), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	_avio_wb16
	movq	(%rbx), %rdi
	movq	-56(%rbp), %rsi
	movl	%r15d, %edx
	callq	_avio_write
	leaq	-56(%rbp), %rdi
	callq	_av_freep
	movq	_ID3v2_HEADER_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	addl	%r15d, 4(%r14)
LBB0_27:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_id3v2_mime_tags,8,3         ## @ff_id3v2_mime_tags
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_ID3v2_ENCODING_UTF16BOM,4,2    ## @ID3v2_ENCODING_UTF16BOM
	.comm	_ID3v2_ENCODING_UTF8,4,2        ## @ID3v2_ENCODING_UTF8
	.comm	_AV_CODEC_ID_NONE,8,3           ## @AV_CODEC_ID_NONE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"No mimetype is known for stream %d, cannot write an attached picture.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"comment"

	.comm	_ff_id3v2_picture_types,8,3     ## @ff_id3v2_picture_types
L_.str.3:                               ## @.str.3
	.asciz	"title"

	.comm	_ID3v2_ENCODING_ISO8859,4,2     ## @ID3v2_ENCODING_ISO8859
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ID3v2_HEADER_SIZE,8,3          ## @ID3v2_HEADER_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_id3v2_write_apic            ; -- Begin function ff_id3v2_write_apic
	.p2align	2
_ff_id3v2_write_apic:                   ; @ff_id3v2_write_apic
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x0
	ldr	x8, [x0, #8]
	ldr	x9, [x2]
	ldr	x27, [x8, x9, lsl #3]
Lloh0:
	adrp	x8, _ff_id3v2_mime_tags@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ff_id3v2_mime_tags@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
	ldr	w8, [x1]
Lloh3:
	adrp	x26, _ID3v2_ENCODING_UTF16BOM@GOTPAGE
Lloh4:
	ldr	x26, [x26, _ID3v2_ENCODING_UTF16BOM@GOTPAGEOFF]
Lloh5:
	adrp	x9, _ID3v2_ENCODING_UTF8@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ID3v2_ENCODING_UTF8@GOTPAGEOFF]
	cmp	w8, #3
	csel	x11, x26, x9, eq
Lloh7:
	adrp	x8, _AV_CODEC_ID_NONE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_CODEC_ID_NONE@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	x9, [x10]
	cmp	x9, x8
	b.eq	LBB0_13
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	ldr	w22, [x11]
	ldr	x11, [x27, #8]
	ldr	x11, [x11]
	add	x10, x10, #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x9, x11
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x10], #16
	cmp	x9, x8
	b.ne	LBB0_2
	b	LBB0_13
LBB0_4:
	ldur	x23, [x10, #-8]
	cbz	x23, LBB0_13
; %bb.5:
	ldr	w0, [x27]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, #0
	mov	w3, #0
	bl	_av_dict_get
	cbz	x0, LBB0_10
; %bb.6:
	mov	x25, x0
Lloh12:
	adrp	x28, _ff_id3v2_picture_types@GOTPAGE
Lloh13:
	ldr	x28, [x28, _ff_id3v2_picture_types@GOTPAGEOFF]
	ldr	x0, [x28]
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x24, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	ldr	x8, [x28]
	ldr	w1, [x8, x24, lsl #2]
	bl	_av_strcasecmp
	cbz	w0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x24, x24, #1
	ldr	x0, [x28]
	bl	_FF_ARRAY_ELEMS
	cmp	x24, w0, sxtw
	b.lt	LBB0_8
LBB0_10:
	mov	w24, #0
LBB0_11:
	ldr	w0, [x27]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, #0
	mov	w3, #0
	bl	_av_dict_get
	cbz	x0, LBB0_14
; %bb.12:
	ldr	x25, [x0]
	b	LBB0_15
LBB0_13:
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w3, [x27, #4]
Lloh19:
	adrp	x2, l_.str.1@PAGE
Lloh20:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_AVERROR
LBB0_14:
Lloh24:
	adrp	x25, l_.str@PAGE
Lloh25:
	add	x25, x25, l_.str@PAGEOFF
LBB0_15:
	ldr	w8, [x26]
	cmp	w22, w8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x25
	bl	_string_is_ascii
Lloh26:
	adrp	x8, _ID3v2_ENCODING_ISO8859@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ID3v2_ENCODING_ISO8859@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w22, w22, w8, eq
LBB0_17:
	add	x0, sp, #8
	bl	_avio_open_dyn_buf
	tbnz	x0, #63, LBB0_20
; %bb.18:
	ldr	x0, [sp, #8]
	mov	x1, x22
	bl	_avio_w8
	ldr	x0, [sp, #8]
	mov	x1, x23
	bl	_avio_put_str
	ldr	x0, [sp, #8]
	mov	x1, x24
	bl	_avio_w8
	ldr	x0, [sp, #8]
	mov	x1, x25
	mov	x2, x22
	bl	_id3v2_encode_string
	ldr	x0, [sp, #8]
	ldr	x1, [x21, #16]
	ldr	w2, [x21, #8]
	bl	_avio_write
	ldr	x0, [sp, #8]
	mov	x1, sp
	bl	_avio_close_dyn_buf
	mov	x21, x0
	ldr	x22, [x20]
	mov	w0, #65
	mov	w1, #80
	mov	w2, #73
	mov	w3, #67
	bl	_MKBETAG
	mov	x1, x0
	mov	x0, x22
	bl	_avio_wb32
	ldr	w8, [x19]
	ldr	x0, [x20]
	mov	x1, x21
	cmp	w8, #3
	b.ne	LBB0_21
; %bb.19:
	bl	_avio_wb32
	b	LBB0_22
LBB0_20:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_23
LBB0_21:
	bl	_id3v2_put_size
LBB0_22:
	ldr	x0, [x20]
	mov	w1, #0
	bl	_avio_wb16
	ldr	x0, [x20]
	ldr	x1, [sp]
	mov	x2, x21
	bl	_avio_write
	mov	x0, sp
	bl	_av_freep
	mov	w0, #0
Lloh32:
	adrp	x8, _ID3v2_HEADER_SIZE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ID3v2_HEADER_SIZE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	add	w8, w21, w8
	add	w8, w8, w9
	str	w8, [x19, #4]
LBB0_23:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_id3v2_mime_tags,8,3         ; @ff_id3v2_mime_tags
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_ID3v2_ENCODING_UTF16BOM,4,2    ; @ID3v2_ENCODING_UTF16BOM
	.comm	_ID3v2_ENCODING_UTF8,4,2        ; @ID3v2_ENCODING_UTF8
	.comm	_AV_CODEC_ID_NONE,8,3           ; @AV_CODEC_ID_NONE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"No mimetype is known for stream %d, cannot write an attached picture.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"comment"

	.comm	_ff_id3v2_picture_types,8,3     ; @ff_id3v2_picture_types
l_.str.3:                               ; @.str.3
	.asciz	"title"

	.comm	_ID3v2_ENCODING_ISO8859,4,2     ; @ID3v2_ENCODING_ISO8859
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ID3v2_HEADER_SIZE,8,3          ; @ID3v2_HEADER_SIZE
.subsections_via_symbols
