	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flush
_flush:                                 ## @flush
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	16(%rdi), %r14
	cmpl	$4, 8(%r14)
	jl	LBB0_21
## %bb.1:
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movq	(%rax), %r12
	movq	16(%r14), %rdi
	callq	_AV_RL32
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_AV_RL32
	xorl	%ecx, %ecx
	cmpq	%rax, %rbx
	movl	$12, %r15d
	cmovnel	%ecx, %r15d
	leal	4(%r15), %eax
	cmpl	%eax, 8(%r14)
	jl	LBB0_21
## %bb.2:
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	%r15d, %ebx
	movq	16(%r14), %rdi
	addq	%rbx, %rdi
	callq	_AV_RL32
	movq	%rax, %r12
	leaq	L_.str.1(%rip), %rdi
	callq	_AV_RL32
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %r12
	jne	LBB0_4
## %bb.3:
	movq	16(%r14), %rax
	movsbl	8(%rax,%rbx), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r12
	addq	$8, %r12
	leaq	(%rax,%rbx), %rdi
	addq	$4, %rdi
	callq	_AV_RL32
	movq	%rax, %r15
	addl	%r12d, %r15d
	movq	-72(%rbp), %r12                 ## 8-byte Reload
LBB0_4:
	cmpl	$0, (%r14)
	je	LBB0_7
## %bb.5:
	movl	4(%r14), %eax
	jmp	LBB0_6
LBB0_7:
	movl	(%r13), %edi
	leaq	l_.str.2(%rip), %rsi
	movl	$12, %edx
	callq	_avio_write
	movl	$1, (%r14)
	movl	4(%r14), %eax
	cmpl	$2, %eax
	jl	LBB0_6
## %bb.8:
	leaq	4(%r14), %rbx
	movl	$1, (%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_9
LBB0_6:
	leaq	4(%r14), %rbx
	cmpl	$1, %eax
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	jne	LBB0_14
LBB0_9:
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	cmpq	-80(%rbp), %r12                 ## 8-byte Folded Reload
	jne	LBB0_12
LBB0_11:
	movq	%rbx, %r12
	movl	%ecx, %ebx
	orl	$18, %ebx
	testl	%eax, %eax
	cmovnel	%ecx, %ebx
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edx
	callq	_avio_write
	movl	(%r13), %edi
	movl	$10, %esi
	callq	_avio_wl32
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_avio_w8
	movl	(%r13), %edi
	xorl	%esi, %esi
	callq	_avio_wl24
	movl	(%r13), %edi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rax
	movq	(%rax), %rsi
	decq	%rsi
	callq	_avio_wl24
	movl	(%r13), %edi
	movq	(%rbx), %rax
	movq	%r12, %rbx
	movq	8(%rax), %rsi
	decq	%rsi
	callq	_avio_wl24
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_12:
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	$4, %edx
	callq	_avio_write
	movl	(%r13), %edi
	movl	$6, %esi
	callq	_avio_wl32
	movl	(%r13), %edi
	movl	$-1, %esi
	callq	_avio_wl32
	movl	(%r13), %edi
	movl	40(%r14), %esi
	callq	_avio_wl16
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_14:
	leaq	8(%r14), %r12
	cmpl	%eax, (%rbx)
	jle	LBB0_20
## %bb.15:
	movl	(%r13), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	$4, %edx
	callq	_avio_write
	movl	(%r13), %edi
	movl	8(%r14), %esi
	subl	%r15d, %esi
	addl	$16, %esi
	callq	_avio_wl32
	movl	(%r13), %edi
	xorl	%esi, %esi
	callq	_avio_wl24
	movl	(%r13), %edi
	xorl	%esi, %esi
	callq	_avio_wl24
	movl	(%r13), %edi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rax
	movq	(%rax), %rsi
	decq	%rsi
	callq	_avio_wl24
	movl	(%r13), %edi
	movq	(%rbx), %rax
	movq	8(%rax), %rsi
	decq	%rsi
	callq	_avio_wl24
	movq	24(%r14), %rax
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%r13), %edi
	cmpq	%rcx, %rax
	je	LBB0_18
## %bb.16:
	cmpq	-56(%rbp), %rcx                 ## 8-byte Folded Reload
	je	LBB0_18
## %bb.17:
	subq	%rax, -56(%rbp)                 ## 8-byte Folded Spill
	jmp	LBB0_19
LBB0_18:
	movq	32(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_19:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_avio_wl24
	movl	(%r13), %edi
	xorl	%esi, %esi
	callq	_avio_w8
LBB0_20:
	movl	(%r13), %edi
	movslq	%r15d, %rsi
	addq	16(%r14), %rsi
	movl	8(%r14), %edx
	subl	%r15d, %edx
	callq	_avio_write
	movq	%r12, %rdi
	callq	_av_packet_unref
LBB0_21:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RIFF"

L_.str.1:                               ## @.str.1
	.asciz	"VP8X"

	.section	__TEXT,__const
l_.str.2:                               ## @.str.2
	.asciz	"RIFF\000\000\000\000WEBP"

	.section	__TEXT,__cstring,cstring_literals
L_.str.3:                               ## @.str.3
	.asciz	"ANIM"

L_.str.4:                               ## @.str.4
	.asciz	"ANMF"

	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.no_dead_strip	_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flush
_flush:                                 ; @flush
	.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	x25, [x0, #16]
	mov	x19, x25
	ldr	w8, [x19, #8]!
	cmp	w8, #4
	b.lt	LBB0_21
; %bb.1:
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x24, [x8]
	ldr	x0, [x25, #16]
	bl	_AV_RL32
	mov	x23, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_AV_RL32
	cmp	x23, x0
	mov	w8, #12
	csel	w26, w8, wzr, eq
	ldr	w8, [x25, #8]
	add	w9, w26, #4
	cmp	w8, w9
	b.lt	LBB0_21
; %bb.2:
	str	x24, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x8, [x25, #16]
	add	x0, x8, x26
	bl	_AV_RL32
	mov	x23, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_AV_RL32
	mov	x24, x0
	cmp	x23, x0
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x25, #16]
	add	x28, x26, #8
	ldrsb	w27, [x8, x28]
	add	x8, x8, x26
	add	x0, x8, #4
	bl	_AV_RL32
	add	w26, w28, w0
	ldr	w8, [x25]
	cbz	w8, LBB0_6
LBB0_4:
	ldr	w8, [x25, #4]
	b	LBB0_8
LBB0_5:
	mov	w27, #0
	ldr	w8, [x25]
	cbnz	w8, LBB0_4
LBB0_6:
	ldr	w0, [x20]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #12
	bl	_avio_write
	mov	w9, #1
	str	w9, [x25]
	mov	x28, x25
	ldr	w8, [x28, #4]!
	cmp	w8, #2
	b.lt	LBB0_8
; %bb.7:
	str	w9, [x28]
	b	LBB0_9
LBB0_8:
	add	x28, x25, #4
	cmp	w8, #1
	b.ne	LBB0_14
LBB0_9:
	cbz	w22, LBB0_11
; %bb.10:
	cmp	x23, x24
	b.ne	LBB0_12
LBB0_11:
	mov	w8, #18
	orr	w8, w27, w8
	cmp	w22, #0
	csel	w23, w8, w27, eq
	ldr	w0, [x20]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #4
	bl	_avio_write
	ldr	w0, [x20]
	mov	w1, #10
	bl	_avio_wl32
	ldr	w0, [x20]
	mov	x1, x23
	bl	_avio_w8
	ldr	w0, [x20]
	mov	x1, #0
	bl	_avio_wl24
	ldr	w0, [x20]
	ldr	x23, [sp, #8]                   ; 8-byte Folded Reload
	ldr	x8, [x23]
	ldr	x8, [x8]
	sub	x1, x8, #1
	bl	_avio_wl24
	ldr	w0, [x20]
	ldr	x8, [x23]
	ldr	x8, [x8, #8]
	sub	x1, x8, #1
	bl	_avio_wl24
LBB0_12:
	cbnz	w22, LBB0_14
; %bb.13:
	ldr	w0, [x20]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w2, #4
	bl	_avio_write
	ldr	w0, [x20]
	mov	w1, #6
	bl	_avio_wl32
	ldr	w0, [x20]
	mov	w1, #-1
	bl	_avio_wl32
	ldr	w0, [x20]
	ldr	w1, [x25, #40]
	bl	_avio_wl16
LBB0_14:
	ldr	w8, [x28]
	cmp	w8, w22
	b.le	LBB0_20
; %bb.15:
	ldr	w0, [x20]
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w2, #4
	bl	_avio_write
	ldr	w0, [x20]
	ldr	w8, [x25, #8]
	sub	w8, w8, w26
	add	w1, w8, #16
	bl	_avio_wl32
	ldr	w0, [x20]
	mov	x1, #0
	bl	_avio_wl24
	ldr	w0, [x20]
	mov	x1, #0
	bl	_avio_wl24
	ldr	w0, [x20]
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	ldr	x8, [x22]
	ldr	x8, [x8]
	sub	x1, x8, #1
	bl	_avio_wl24
	ldr	w0, [x20]
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	sub	x1, x8, #1
	bl	_avio_wl24
	ldr	x8, [x25, #24]
Lloh12:
	adrp	x9, _AV_NOPTS_VALUE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	w0, [x20]
	cmp	x8, x9
	b.eq	LBB0_18
; %bb.16:
	cmp	x9, x21
	b.eq	LBB0_18
; %bb.17:
	sub	x1, x21, x8
	b	LBB0_19
LBB0_18:
	ldr	x1, [x25, #32]
LBB0_19:
	bl	_avio_wl24
	ldr	w0, [x20]
	mov	w1, #0
	bl	_avio_w8
LBB0_20:
	ldr	w0, [x20]
	ldr	x8, [x25, #16]
	add	x1, x8, w26, sxtw
	ldr	w8, [x25, #8]
	sub	w2, w8, w26
	bl	_avio_write
	mov	x0, x19
	bl	_av_packet_unref
LBB0_21:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RIFF"

l_.str.1:                               ; @.str.1
	.asciz	"VP8X"

	.section	__TEXT,__const
l_.str.2:                               ; @.str.2
	.asciz	"RIFF\000\000\000\000WEBP"

	.section	__TEXT,__cstring,cstring_literals
l_.str.3:                               ; @.str.3
	.asciz	"ANIM"

l_.str.4:                               ; @.str.4
	.asciz	"ANMF"

	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.no_dead_strip	_flush
.subsections_via_symbols
