	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function av1_frame_merge_filter
_av1_frame_merge_filter:                ## @av1_frame_merge_filter
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rbx
	movq	(%rbx), %r14
	movq	8(%rbx), %r13
	xorl	%eax, %eax
	testq	%r14, %r14
	sete	%al
	shlq	$4, %rax
	addq	%r13, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	32(%rbx), %r12
	movq	24(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	callq	_ff_bsf_get_packet_ref
	testl	%eax, %eax
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	js	LBB0_1
## %bb.3:
	shlq	$4, %r14
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	addq	%r13, %r14
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	16(%rbx), %edi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_ff_cbs_read_packet
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rcx
	testq	%rcx, %rcx
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_11
## %bb.9:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rbx,%rdx), %rdx
	movq	(%rdx), %rdx
	movq	_AV1_OBU_TEMPORAL_DELIMITER@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_10
LBB0_11:
	cmpq	$2, %rax
	jl	LBB0_16
## %bb.12:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rbx,%rdx), %rdx
	movq	_AV1_OBU_TEMPORAL_DELIMITER@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	addq	$16, %rdx
	leaq	-1(%rax), %rdi
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, (%rdx)
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_14 Depth=1
	addq	$16, %rdx
	decq	%rdi
	jne	LBB0_14
LBB0_16:
	testq	%rcx, %rcx
	jle	LBB0_22
## %bb.17:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rbx,%rcx), %rcx
	movq	(%rcx), %rcx
	movq	_AV1_OBU_TEMPORAL_DELIMITER@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_18
LBB0_22:
	testq	%rax, %rax
	jle	LBB0_27
## %bb.23:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%rbx, %rax
	addq	$8, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$12, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %edi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	-12(%rax,%rbx), %rcx
	movl	(%rax,%rbx), %r8d
	movl	-4(%rax,%rbx), %r9d
	movq	%r13, %rsi
	movl	$-1, %edx
	callq	_ff_cbs_insert_unit_content
	testl	%eax, %eax
	js	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_25 Depth=1
	incq	%r12
	addq	$16, %rbx
	cmpq	%r12, (%r14)
	jg	LBB0_25
LBB0_27:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r15d
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_28
LBB0_1:
	movl	%eax, %r15d
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_36
## %bb.2:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	cmpq	$0, (%r13)
	jle	LBB0_36
LBB0_18:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	16(%rbx), %edi
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_ff_cbs_write_packet
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_19
## %bb.21:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_av_packet_move_ref
	xorl	%eax, %eax
	cmpq	$0, (%rbx)
	sete	%al
	movq	%rax, (%rbx)
LBB0_28:
	cmpl	$0, 8(%r14)
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	jne	LBB0_31
## %bb.29:
	movq	(%rsi), %rax
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_30
LBB0_31:
	movq	%rsi, %rdi
	callq	_av_packet_unref
	jmp	LBB0_32
LBB0_4:
	movl	%eax, %r15d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_20
LBB0_6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_7
LBB0_19:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
LBB0_20:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
	jmp	LBB0_34
LBB0_15:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_7
LBB0_10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	testl	%r15d, %r15d
	jns	LBB0_36
	jmp	LBB0_34
LBB0_26:
	movl	%eax, %r15d
	jmp	LBB0_34
LBB0_30:
	movq	%r14, %rdi
	callq	_av_packet_move_ref
LBB0_32:
	movl	16(%rbx), %edi
	movq	(%rbx), %rsi
	shlq	$4, %rsi
	addq	8(%rbx), %rsi
	callq	_ff_cbs_fragment_reset
	testl	%r15d, %r15d
	jns	LBB0_36
LBB0_34:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	cmpl	%eax, %r15d
	je	LBB0_36
## %bb.35:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_av1_frame_merge_flush
LBB0_36:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read packet.\n"

L_.str.1:                               ## @.str.1
	.asciz	"No OBU in packet.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV1_OBU_TEMPORAL_DELIMITER,8,3 ## @AV1_OBU_TEMPORAL_DELIMITER
L_.str.2:                               ## @.str.2
	.asciz	"Missing Temporal Delimiter.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Temporal Delimiter in the middle of a packet.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to write packet.\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.no_dead_strip	_av1_frame_merge_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function av1_frame_merge_filter
_av1_frame_merge_filter:                ; @av1_frame_merge_filter
	.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	x24, x1
	mov	x19, x0
	ldr	x26, [x0]
	ldp	x28, x27, [x26]
	cmp	x28, #0
	cset	w8, eq
	add	x22, x27, w8, uxtw #4
	ldp	x21, x20, [x26, #24]
	mov	x1, x20
	bl	_ff_bsf_get_packet_ref
	tbnz	w0, #31, LBB0_16
; %bb.1:
	add	x25, x27, x28, lsl #4
	ldr	w0, [x26, #16]
	mov	x1, x25
	mov	x2, x20
	bl	_ff_cbs_read_packet
	tbnz	w0, #31, LBB0_22
; %bb.2:
	ldr	x8, [x25]
	cbz	x8, LBB0_23
; %bb.3:
	ldr	x9, [x22]
	cbnz	x9, LBB0_5
; %bb.4:
	add	x10, x27, x28, lsl #4
	ldr	x10, [x10, #8]
	ldr	x10, [x10]
Lloh0:
	adrp	x11, _AV1_OBU_TEMPORAL_DELIMITER@GOTPAGE
Lloh1:
	ldr	x11, [x11, _AV1_OBU_TEMPORAL_DELIMITER@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_27
LBB0_5:
	subs	x10, x8, #1
	b.le	LBB0_9
; %bb.6:
	add	x11, x27, x28, lsl #4
	ldr	x12, [x11, #8]
Lloh3:
	adrp	x11, _AV1_OBU_TEMPORAL_DELIMITER@GOTPAGE
Lloh4:
	ldr	x11, [x11, _AV1_OBU_TEMPORAL_DELIMITER@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	add	x12, x12, #16
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x12]
	cmp	x13, x11
	b.eq	LBB0_26
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x12, x12, #16
	subs	x10, x10, #1
	b.ne	LBB0_7
LBB0_9:
	cmp	x9, #1
	b.lt	LBB0_11
; %bb.10:
	add	x9, x27, x28, lsl #4
	ldr	x9, [x9, #8]
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _AV1_OBU_TEMPORAL_DELIMITER@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AV1_OBU_TEMPORAL_DELIMITER@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_18
LBB0_11:
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	cmp	x8, #1
	b.lt	LBB0_15
; %bb.12:
	mov	x24, #0
	mov	x21, #0
	add	x8, x27, x28, lsl #4
	add	x27, x8, #8
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x26, #16]
	ldr	x8, [x27]
	add	x8, x8, x24
	ldr	x3, [x8]
	ldp	w5, w4, [x8, #8]
	mov	x1, x22
	mov	w2, #-1
	bl	_ff_cbs_insert_unit_content
	tbnz	w0, #31, LBB0_29
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x21, x21, #1
	ldr	x8, [x25]
	add	x24, x24, #16
	cmp	x8, x21
	b.gt	LBB0_13
LBB0_15:
Lloh9:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x23, x0
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	ldr	w8, [x21, #8]
	cbnz	w8, LBB0_21
	b	LBB0_20
LBB0_16:
	mov	x23, x0
Lloh12:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_34
; %bb.17:
	ldr	x8, [x22]
	cmp	x8, #0
	b.le	LBB0_34
LBB0_18:
	ldr	w0, [x26, #16]
	mov	x1, x21
	mov	x2, x22
	bl	_ff_cbs_write_packet
	mov	x23, x0
	tbnz	w0, #31, LBB0_24
; %bb.19:
	mov	x0, x24
	mov	x1, x21
	bl	_av_packet_move_ref
	ldr	x8, [x26]
	cmp	x8, #0
	cset	w8, eq
	str	x8, [x26]
	ldr	w8, [x21, #8]
	cbnz	w8, LBB0_21
LBB0_20:
	ldr	x8, [x20]
Lloh15:
	adrp	x9, _AV_NOPTS_VALUE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_30
LBB0_21:
	mov	x0, x20
	bl	_av_packet_unref
	b	LBB0_31
LBB0_22:
	mov	x23, x0
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_25
LBB0_23:
Lloh23:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x2, l_.str.1@PAGE
Lloh27:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_28
LBB0_24:
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
LBB0_25:
	mov	x0, x19
	bl	_av_log
	b	LBB0_32
LBB0_26:
Lloh33:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	adrp	x2, l_.str.3@PAGE
Lloh37:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_28
LBB0_27:
Lloh38:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
Lloh41:
	adrp	x2, l_.str.2@PAGE
Lloh42:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_28:
	mov	x0, x19
	bl	_av_log
Lloh43:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh44:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh45:
	ldr	w23, [x8]
	tbz	w23, #31, LBB0_34
	b	LBB0_32
LBB0_29:
	mov	x23, x0
	b	LBB0_32
LBB0_30:
	mov	x0, x21
	mov	x1, x20
	bl	_av_packet_move_ref
LBB0_31:
	ldr	w0, [x26, #16]
	ldp	x9, x8, [x26]
	add	x1, x8, x9, lsl #4
	bl	_ff_cbs_fragment_reset
	tbz	w23, #31, LBB0_34
LBB0_32:
Lloh46:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
	bl	_AVERROR
	cmp	w23, w0
	b.eq	LBB0_34
; %bb.33:
	mov	x0, x19
	bl	_av1_frame_merge_flush
LBB0_34:
	mov	x0, x23
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read packet.\n"

l_.str.1:                               ; @.str.1
	.asciz	"No OBU in packet.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV1_OBU_TEMPORAL_DELIMITER,8,3 ; @AV1_OBU_TEMPORAL_DELIMITER
l_.str.2:                               ; @.str.2
	.asciz	"Missing Temporal Delimiter.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Temporal Delimiter in the middle of a packet.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to write packet.\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.no_dead_strip	_av1_frame_merge_filter
.subsections_via_symbols
