	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flac_write_packet
_flac_write_packet:                     ## @flac_write_packet
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movq	(%rsi), %rcx
	cmpq	(%rbx), %rcx
	jne	LBB0_5
## %bb.1:
	cmpq	$0, 8(%rbx)
	je	LBB0_4
## %bb.2:
	leaq	20(%rbx), %rdi
	leaq	16(%rbx), %rsi
	movq	_FF_PACKETLIST_FLAG_REF_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdx
	callq	_ff_packet_list_put
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jns	LBB0_15
## %bb.3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	$0, 8(%rbx)
	movq	%r14, %rdi
	callq	_flac_queue_flush
	testl	%eax, %eax
	js	LBB0_14
LBB0_4:
	movq	%r14, %rdi
	movq	%r12, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_flac_write_audio_packet        ## TAILCALL
LBB0_5:
	xorl	%r15d, %r15d
	cmpq	$0, 8(%rbx)
	je	LBB0_15
## %bb.6:
	movq	(%r14), %rax
	movq	(%rax,%rcx,8), %r13
	movq	_AV_DISPOSITION_ATTACHED_PIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_15
## %bb.7:
	movl	4(%r13), %eax
	cmpl	$1, %eax
	jne	LBB0_9
## %bb.8:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	4(%r13), %eax
LBB0_9:
	testl	%eax, %eax
	jg	LBB0_15
## %bb.10:
	movq	%r12, %rdi
	callq	_av_packet_clone
	movl	%eax, 8(%r13)
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_12:
	xorl	%r15d, %r15d
	decq	8(%rbx)
	jne	LBB0_15
## %bb.13:
	movq	%r14, %rdi
	callq	_flac_queue_flush
	testl	%eax, %eax
	jns	LBB0_15
LBB0_14:
	movl	%eax, %r15d
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FF_PACKETLIST_FLAG_REF_PACKET,4,2 ## @FF_PACKETLIST_FLAG_REF_PACKET
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of memory in packet queue; skipping attached pictures\n"

	.comm	_AV_DISPOSITION_ATTACHED_PIC,4,2 ## @AV_DISPOSITION_ATTACHED_PIC
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"Got more than one picture in stream %d, ignoring.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Out of memory queueing an attached picture; skipping\n"

	.no_dead_strip	_flac_write_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flac_write_packet
_flac_write_packet:                     ; @flac_write_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	ldr	x8, [x1]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_4
; %bb.2:
	add	x0, x21, #20
	add	x1, x21, #16
Lloh0:
	adrp	x8, _FF_PACKETLIST_FLAG_REF_PACKET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FF_PACKETLIST_FLAG_REF_PACKET@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x2, x20
	bl	_ff_packet_list_put
	tbz	w0, #31, LBB0_14
; %bb.3:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	str	xzr, [x21, #8]
	mov	x0, x19
	bl	_flac_queue_flush
	tbnz	w0, #31, LBB0_15
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_flac_write_audio_packet
LBB0_5:
	ldr	x9, [x21, #8]
	cbz	x9, LBB0_14
; %bb.6:
	ldr	x9, [x19]
	ldr	x22, [x9, x8, lsl #3]
	ldr	w9, [x22]
Lloh8:
	adrp	x10, _AV_DISPOSITION_ATTACHED_PIC@GOTPAGE
Lloh9:
	ldr	x10, [x10, _AV_DISPOSITION_ATTACHED_PIC@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_14
; %bb.7:
	ldr	w9, [x22, #4]
	cmp	w9, #1
	b.ne	LBB0_9
; %bb.8:
Lloh11:
	adrp	x9, _AV_LOG_WARNING@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	ldr	w9, [x22, #4]
LBB0_9:
	cmp	w9, #0
	b.gt	LBB0_14
; %bb.10:
	mov	x0, x20
	bl	_av_packet_clone
	str	w0, [x22, #8]
	cbnz	w0, LBB0_12
; %bb.11:
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_12:
	ldr	x8, [x21, #8]
	subs	x8, x8, #1
	str	x8, [x21, #8]
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_flac_queue_flush
	tbnz	w0, #31, LBB0_15
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_FF_PACKETLIST_FLAG_REF_PACKET,4,2 ; @FF_PACKETLIST_FLAG_REF_PACKET
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of memory in packet queue; skipping attached pictures\n"

	.comm	_AV_DISPOSITION_ATTACHED_PIC,4,2 ; @AV_DISPOSITION_ATTACHED_PIC
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"Got more than one picture in stream %d, ignoring.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Out of memory queueing an attached picture; skipping\n"

	.no_dead_strip	_flac_write_packet
.subsections_via_symbols
