	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_apply_palette
_load_apply_palette:                    ## @load_apply_palette
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r12
	movq	8(%r12), %r15
	movq	16(%r12), %rax
	movq	(%rax), %r14
	movq	$0, -48(%rbp)
	leaq	-40(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	callq	_ff_framesync_dualinput_get_writable
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movq	-40(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.2:
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	cmpl	$0, (%r15)
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_load_palette
	movq	-40(%rbp), %rsi
LBB0_5:
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_apply_palette
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rsi
	callq	_ff_filter_frame
LBB0_7:
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_8:
	movq	_AVERROR_BUG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %ebx
LBB0_10:
	leaq	-40(%rbp), %rdi
	callq	_av_frame_free
LBB0_11:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_BUG,4,2                ## @AVERROR_BUG
	.no_dead_strip	_load_apply_palette
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_apply_palette
_load_apply_palette:                    ; @load_apply_palette
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	ldr	x22, [x0]
	ldp	x20, x8, [x22, #8]
	ldr	x19, [x8]
	str	xzr, [sp, #8]
	add	x1, sp, #24
	add	x2, sp, #16
	bl	_ff_framesync_dualinput_get_writable
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldp	x8, x1, [sp, #16]
	cmp	x1, #0
	ccmp	x8, #0, #4, ne
	b.ne	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _AVERROR_BUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_BUG@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	b	LBB0_9
LBB0_3:
	mov	x21, x0
	b	LBB0_10
LBB0_4:
	ldr	w9, [x20]
	cbnz	w9, LBB0_6
; %bb.5:
	mov	x0, x20
	mov	x1, x8
	bl	_load_palette
	ldr	x1, [sp, #24]
LBB0_6:
	add	x2, sp, #8
	mov	x0, x19
	bl	_apply_palette
	tbnz	w0, #31, LBB0_8
; %bb.7:
	ldr	x8, [x22]
	ldr	w0, [x8]
	ldr	x1, [sp, #8]
	bl	_ff_filter_frame
	mov	x21, x0
	b	LBB0_10
LBB0_8:
	mov	x21, x0
LBB0_9:
	add	x0, sp, #24
	bl	_av_frame_free
LBB0_10:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_BUG,4,2                ; @AVERROR_BUG
	.no_dead_strip	_load_apply_palette
.subsections_via_symbols
