	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flac_write_audio_packet
_flac_write_audio_packet:               ## @flac_write_audio_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, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movq	_AV_PKT_DATA_NEW_EXTRADATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_av_packet_get_side_data
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r12
	movl	-44(%rbp), %eax
	movq	_FLAC_STREAMINFO_SIZE@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jne	LBB0_5
## %bb.2:
	movq	%r15, %rdi
	callq	_av_freep
	movl	(%r13), %edi
	callq	_av_malloc
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	(%r13), %edx
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_memcpy
LBB0_5:
	movq	(%rbx), %rdx
	xorl	%r15d, %r15d
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.6:
	movl	(%r14), %edi
	movl	8(%rbx), %esi
	callq	_avio_write
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r15d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PKT_DATA_NEW_EXTRADATA,4,2  ## @AV_PKT_DATA_NEW_EXTRADATA
	.comm	_FLAC_STREAMINFO_SIZE,4,2       ## @FLAC_STREAMINFO_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_flac_write_audio_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_audio_packet
_flac_write_audio_packet:               ; @flac_write_audio_packet
	.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, x1
	mov	x20, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x8, _AV_PKT_DATA_NEW_EXTRADATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_PKT_DATA_NEW_EXTRADATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_av_packet_get_side_data
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x23, _FLAC_STREAMINFO_SIZE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _FLAC_STREAMINFO_SIZE@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.2:
	mov	x22, x0
	mov	x0, x21
	bl	_av_freep
	ldr	w0, [x23]
	bl	_av_malloc
	str	w0, [x21]
	cbz	w0, LBB0_8
; %bb.3:
	ldr	w2, [x23]
	mov	x1, x22
	bl	_memcpy
LBB0_4:
	ldr	x2, [x19]
	cbz	x2, LBB0_6
; %bb.5:
	ldr	w0, [x20]
	ldr	w1, [x19, #8]
	bl	_avio_write
LBB0_6:
	mov	w0, #0
LBB0_7:
	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_8:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PKT_DATA_NEW_EXTRADATA,4,2  ; @AV_PKT_DATA_NEW_EXTRADATA
	.comm	_FLAC_STREAMINFO_SIZE,4,2       ; @FLAC_STREAMINFO_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_flac_write_audio_packet
.subsections_via_symbols
