	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flac_write_picture
_flac_write_picture:                    ## @flac_write_picture
	.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
	cmpq	$0, 8(%rsi)
	je	LBB0_31
## %bb.1:
	movq	%rdi, %r15
	movq	(%rdi), %rcx
	movq	_ff_id3v2_mime_tags@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rsi), %rdx
	movq	(%rcx,%rdx,8), %rbx
	movq	_AV_CODEC_ID_NONE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax), %rdx
	cmpq	%rcx, %rdx
	je	LBB0_6
## %bb.2:
	movq	16(%r15), %r8
	movq	8(%r15), %r12
	movq	(%rbx), %rdi
	movq	(%rdi), %rdi
	addq	$16, %rax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdi, %rdx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rax), %rdx
	addq	$16, %rax
	cmpq	%rcx, %rdx
	jne	LBB0_3
	jmp	LBB0_6
LBB0_5:
	movq	-8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.9:
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_av_dict_get
	testq	%rax, %rax
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_15
## %bb.10:
	movq	%rax, %r14
	movq	_ff_id3v2_picture_types@GOTPCREL(%rip), %r12
	movq	(%r12), %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	(%r14), %rdi
	movq	(%r12), %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	(%r12), %rdi
	callq	_FF_ARRAY_ELEMS
	cltq
	cmpq	%rax, %r13
	jl	LBB0_12
## %bb.14:
	xorl	%r13d, %r13d
LBB0_15:
	movl	$1, %eax
	movl	%r13d, %ecx
	shll	%cl, %eax
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rsi), %ecx
	movl	%eax, %edx
	andl	%ecx, %edx
	testb	$6, %dl
	je	LBB0_17
## %bb.16:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ff_id3v2_picture_types@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r13d, %ecx
	movl	(%rax,%rcx,4), %ecx
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_7
LBB0_6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%rbx), %ecx
	leaq	L_.str.1(%rip), %rdx
LBB0_7:
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_8:
	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_17:
	cmpl	$1, %r13d
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_22
## %bb.18:
	movq	(%rbx), %rdx
	movq	(%rdx), %r8
	movq	_AV_CODEC_ID_PNG@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %r8
	jne	LBB0_21
## %bb.19:
	cmpl	$32, 8(%rdx)
	jne	LBB0_21
## %bb.20:
	cmpl	$32, 12(%rdx)
	jne	LBB0_21
LBB0_22:
	orl	%eax, %ecx
	movl	%ecx, (%rsi)
	movl	8(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_av_dict_get
	testq	%rax, %rax
	je	LBB0_23
## %bb.24:
	movq	(%rax), %rdi
	jmp	LBB0_25
LBB0_21:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_8
LBB0_23:
	leaq	L_.str(%rip), %rdi
LBB0_25:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_strlen
	movl	%eax, %edx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %eax
	leal	(%rbx,%rdx), %ecx
	leal	(%rax,%rcx), %r14d
	addl	$32, %r14d
	cmpl	$16777216, %r14d                ## imm = 0x1000000
	jl	LBB0_27
## %bb.26:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	movl	$16777216, %r8d                 ## imm = 0x1000000
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_8
LBB0_27:
	movq	%r12, %rdi
	movl	$6, %esi
	movq	%rdx, %r15
	callq	_avio_w8
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_avio_wb24
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_avio_wb32
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_avio_wb32
	movq	%r12, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_avio_write
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_avio_wb32
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_avio_write
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rax
	movl	8(%rax), %esi
	movq	%r12, %rdi
	callq	_avio_wb32
	movq	(%rbx), %rax
	movl	12(%rax), %esi
	movq	%r12, %rdi
	callq	_avio_wb32
	movq	(%rbx), %rax
	movl	16(%rax), %edi
	callq	_av_pix_fmt_desc_get
	testq	%rax, %rax
	je	LBB0_28
## %bb.29:
	movq	%rax, %rdi
	callq	_av_get_bits_per_pixel
	movl	%eax, %esi
	jmp	LBB0_30
LBB0_28:
	xorl	%esi, %esi
LBB0_30:
	movq	%r12, %rdi
	callq	_avio_wb32
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_avio_wb32
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	16(%rbx), %esi
	movq	%r12, %rdi
	callq	_avio_wb32
	movq	8(%rbx), %rsi
	movl	16(%rbx), %edx
	movq	%r12, %rdi
	callq	_avio_write
LBB0_31:
	xorl	%eax, %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	_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	"Duplicate attachment for type '%s'\n"

	.comm	_AV_CODEC_ID_PNG,8,3            ## @AV_CODEC_ID_PNG
L_.str.4:                               ## @.str.4
	.asciz	"File icon attachment must be a 32x32 PNG"

L_.str.5:                               ## @.str.5
	.asciz	"title"

L_.str.6:                               ## @.str.6
	.asciz	"Picture block too big %d >= %d\n"

	.no_dead_strip	_flac_write_picture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flac_write_picture
_flac_write_picture:                    ; @flac_write_picture
	.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
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_30
; %bb.1:
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _ff_id3v2_mime_tags@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ff_id3v2_mime_tags@GOTPAGEOFF]
	ldr	x9, [x0]
	ldr	x10, [x1]
	ldr	x28, [x9, x10, lsl #3]
Lloh2:
	ldr	x10, [x8]
Lloh3:
	adrp	x8, _AV_CODEC_ID_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_CODEC_ID_NONE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x9, [x10]
	cmp	x9, x8
	b.eq	LBB0_14
; %bb.2:
	ldp	x20, x26, [x21, #8]
	ldr	x11, [x28]
	ldr	x11, [x11]
	add	x10, x10, #16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x9, x11
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x10], #16
	cmp	x9, x8
	b.ne	LBB0_3
	b	LBB0_14
LBB0_5:
	ldur	x22, [x10, #-8]
	cbz	x22, LBB0_14
; %bb.6:
	mov	x0, x22
	bl	_strlen
	mov	x23, x0
	ldr	w0, [x28, #8]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, #0
	mov	w3, #0
	bl	_av_dict_get
Lloh8:
	adrp	x27, _ff_id3v2_picture_types@GOTPAGE
Lloh9:
	ldr	x27, [x27, _ff_id3v2_picture_types@GOTPAGEOFF]
	cbz	x0, LBB0_11
; %bb.7:
	mov	x25, x0
	ldr	x0, [x27]
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.8:
	mov	x24, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	ldr	x8, [x27]
	ldr	w1, [x8, x24, lsl #2]
	bl	_av_strcasecmp
	cbz	w0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x24, x24, #1
	ldr	x0, [x27]
	bl	_FF_ARRAY_ELEMS
	cmp	x24, w0, sxtw
	b.lt	LBB0_9
LBB0_11:
	mov	w24, #0
LBB0_12:
	ldr	w8, [x26]
	mov	w9, #1
	lsl	w9, w9, w24
	and	w10, w9, w8
	tst	w10, #0x6
	b.eq	LBB0_16
; %bb.13:
Lloh10:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	x8, [x27]
	ldr	w8, [x8, w24, uxtw #2]
	str	x8, [sp]
Lloh13:
	adrp	x2, l_.str.3@PAGE
Lloh14:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w8, [x28, #12]
	str	x8, [sp]
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_15:
	mov	x0, x21
	bl	_av_log
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	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_16:
	cmp	w24, #1
	b.ne	LBB0_20
; %bb.17:
	ldr	x10, [x28]
	ldr	x11, [x10]
Lloh23:
	adrp	x12, _AV_CODEC_ID_PNG@GOTPAGE
Lloh24:
	ldr	x12, [x12, _AV_CODEC_ID_PNG@GOTPAGEOFF]
Lloh25:
	ldr	x12, [x12]
	cmp	x11, x12
	b.ne	LBB0_22
; %bb.18:
	ldr	w11, [x10, #8]
	cmp	w11, #32
	b.ne	LBB0_22
; %bb.19:
	ldr	w10, [x10, #12]
	cmp	w10, #32
	b.ne	LBB0_22
LBB0_20:
	orr	w8, w8, w9
	str	w8, [x26]
	ldr	w0, [x28, #8]
Lloh26:
	adrp	x1, l_.str.5@PAGE
Lloh27:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, #0
	mov	w3, #0
	bl	_av_dict_get
	cbz	x0, LBB0_23
; %bb.21:
	ldr	x25, [x0]
	b	LBB0_24
LBB0_22:
Lloh28:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x2, l_.str.4@PAGE
Lloh32:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_15
LBB0_23:
Lloh33:
	adrp	x25, l_.str@PAGE
Lloh34:
	add	x25, x25, l_.str@PAGEOFF
LBB0_24:
	mov	x0, x25
	bl	_strlen
	ldr	w8, [x19, #16]
	add	w9, w23, w0
	add	w8, w9, w8
	add	w27, w8, #32
	mov	w8, #16777216
	cmp	w27, w8
	b.lt	LBB0_26
; %bb.25:
Lloh35:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	w8, #16777216
	stp	x27, x8, [sp]
Lloh38:
	adrp	x2, l_.str.6@PAGE
Lloh39:
	add	x2, x2, l_.str.6@PAGEOFF
	b	LBB0_15
LBB0_26:
	mov	x26, x0
	mov	x0, x20
	mov	w1, #6
	bl	_avio_w8
	mov	x0, x20
	mov	x1, x27
	bl	_avio_wb24
	mov	x0, x20
	mov	x1, x24
	bl	_avio_wb32
	mov	x0, x20
	mov	x1, x23
	bl	_avio_wb32
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_avio_write
	mov	x0, x20
	mov	x1, x26
	bl	_avio_wb32
	mov	x0, x20
	mov	x1, x25
	mov	x2, x26
	bl	_avio_write
	ldr	x8, [x28]
	ldr	w1, [x8, #8]
	mov	x0, x20
	bl	_avio_wb32
	ldr	x8, [x28]
	ldr	w1, [x8, #12]
	mov	x0, x20
	bl	_avio_wb32
	ldr	x8, [x28]
	ldr	w0, [x8, #16]
	bl	_av_pix_fmt_desc_get
	cbz	x0, LBB0_28
; %bb.27:
	bl	_av_get_bits_per_pixel
	mov	x1, x0
	b	LBB0_29
LBB0_28:
	mov	w1, #0
LBB0_29:
	mov	x0, x20
	bl	_avio_wb32
	mov	x0, x20
	mov	w1, #0
	bl	_avio_wb32
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_avio_wb32
	ldr	x1, [x19, #8]
	ldr	w2, [x19, #16]
	mov	x0, x20
	bl	_avio_write
LBB0_30:
	mov	w0, #0
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.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	_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	"Duplicate attachment for type '%s'\n"

	.comm	_AV_CODEC_ID_PNG,8,3            ; @AV_CODEC_ID_PNG
l_.str.4:                               ; @.str.4
	.asciz	"File icon attachment must be a 32x32 PNG"

l_.str.5:                               ; @.str.5
	.asciz	"title"

l_.str.6:                               ; @.str.6
	.asciz	"Picture block too big %d >= %d\n"

	.no_dead_strip	_flac_write_picture
.subsections_via_symbols
