	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function coda9_set_frame_cache
_coda9_set_frame_cache:                 ## @coda9_set_frame_cache
	.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, %r15
	movq	(%rdi), %r12
	movq	_GDI_LINEAR_FRAME_MAP@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	cmpq	%r13, %r12
	movq	_CODA9_CACHE_PAGEMERGE_OFFSET@GOTPCREL(%rip), %rax
	movl	$539369508, %ecx                ## imm = 0x20262024
	movl	$38011459, %esi                 ## imm = 0x2440243
	cmoveq	%rcx, %rsi
	movl	(%rax), %r14d
	movl	8(%rdi), %edi
	movq	_CODA9_CMD_SET_FRAME_CACHE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_coda_write
	movq	_V4L2_PIX_FMT_NV12@GOTPCREL(%rip), %rax
	movq	_CODA9_CACHE_LUMA_BUFFER_SIZE_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$32, %edx
	shll	%cl, %edx
	movq	_CODA9_CACHE_CR_BUFFER_SIZE_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpq	%rbx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_V4L2_PIX_FMT_YUYV@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	je	LBB0_2
## %bb.3:
	movl	$8, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	movl	$8, %eax
	orl	%edx, %esi
	movq	_CODA9_CACHE_CB_BUFFER_SIZE_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%esi, %eax
	jmp	LBB0_4
LBB0_2:
	movl	$16, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	orl	%edx, %eax
LBB0_4:
	xorl	%edx, %edx
	cmpq	%r13, %r12
	sete	%dl
	incl	%edx
	movl	%r14d, %ecx
	shll	%cl, %edx
	orl	%eax, %edx
	movslq	%edx, %rsi
	movl	8(%r15), %edi
	movq	_CODA9_CMD_SET_FRAME_CACHE_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_coda_write                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GDI_LINEAR_FRAME_MAP,8,3       ## @GDI_LINEAR_FRAME_MAP
	.comm	_CODA9_CACHE_PAGEMERGE_OFFSET,4,2 ## @CODA9_CACHE_PAGEMERGE_OFFSET
	.comm	_CODA9_CMD_SET_FRAME_CACHE_SIZE,4,2 ## @CODA9_CMD_SET_FRAME_CACHE_SIZE
	.comm	_V4L2_PIX_FMT_NV12,8,3          ## @V4L2_PIX_FMT_NV12
	.comm	_V4L2_PIX_FMT_YUYV,8,3          ## @V4L2_PIX_FMT_YUYV
	.comm	_CODA9_CACHE_LUMA_BUFFER_SIZE_OFFSET,4,2 ## @CODA9_CACHE_LUMA_BUFFER_SIZE_OFFSET
	.comm	_CODA9_CACHE_CR_BUFFER_SIZE_OFFSET,4,2 ## @CODA9_CACHE_CR_BUFFER_SIZE_OFFSET
	.comm	_CODA9_CACHE_CB_BUFFER_SIZE_OFFSET,4,2 ## @CODA9_CACHE_CB_BUFFER_SIZE_OFFSET
	.comm	_CODA9_CMD_SET_FRAME_CACHE_CONFIG,4,2 ## @CODA9_CMD_SET_FRAME_CACHE_CONFIG
	.no_dead_strip	_coda9_set_frame_cache
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function coda9_set_frame_cache
_coda9_set_frame_cache:                 ; @coda9_set_frame_cache
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _GDI_LINEAR_FRAME_MAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GDI_LINEAR_FRAME_MAP@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
Lloh3:
	adrp	x8, _CODA9_CACHE_PAGEMERGE_OFFSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CODA9_CACHE_PAGEMERGE_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	w8, #579
	movk	w8, #580, lsl #16
	mov	w9, #8228
	movk	w9, #8230, lsl #16
	cmp	x21, x23
	csel	x1, x9, x8, eq
	ldr	w0, [x0, #8]
Lloh6:
	adrp	x8, _CODA9_CMD_SET_FRAME_CACHE_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CODA9_CMD_SET_FRAME_CACHE_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_coda_write
Lloh9:
	adrp	x8, _V4L2_PIX_FMT_NV12@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_PIX_FMT_NV12@GOTPAGEOFF]
Lloh11:
	adrp	x9, _V4L2_PIX_FMT_YUYV@GOTPAGE
Lloh12:
	ldr	x9, [x9, _V4L2_PIX_FMT_YUYV@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x8]
Lloh14:
	ldr	x11, [x9]
Lloh15:
	adrp	x8, _CODA9_CACHE_LUMA_BUFFER_SIZE_OFFSET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CODA9_CACHE_LUMA_BUFFER_SIZE_OFFSET@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	mov	w9, #32
	lsl	w8, w9, w8
Lloh18:
	adrp	x9, _CODA9_CACHE_CR_BUFFER_SIZE_OFFSET@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CODA9_CACHE_CR_BUFFER_SIZE_OFFSET@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	x10, x20
	ccmp	x11, x20, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	w10, #16
	lsl	w9, w10, w9
	orr	w8, w9, w8
	b	LBB0_3
LBB0_2:
	mov	w10, #8
	lsl	w9, w10, w9
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _CODA9_CACHE_CB_BUFFER_SIZE_OFFSET@GOTPAGE
Lloh22:
	ldr	x9, [x9, _CODA9_CACHE_CB_BUFFER_SIZE_OFFSET@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	lsl	w9, w10, w9
	orr	w8, w8, w9
LBB0_3:
	cmp	x21, x23
	mov	w9, #1
	cinc	w9, w9, eq
	lsl	w9, w9, w22
	orr	w8, w8, w9
	sxtw	x1, w8
	ldr	w0, [x19, #8]
Lloh24:
	adrp	x8, _CODA9_CMD_SET_FRAME_CACHE_CONFIG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CODA9_CMD_SET_FRAME_CACHE_CONFIG@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_coda_write
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_GDI_LINEAR_FRAME_MAP,8,3       ; @GDI_LINEAR_FRAME_MAP
	.comm	_CODA9_CACHE_PAGEMERGE_OFFSET,4,2 ; @CODA9_CACHE_PAGEMERGE_OFFSET
	.comm	_CODA9_CMD_SET_FRAME_CACHE_SIZE,4,2 ; @CODA9_CMD_SET_FRAME_CACHE_SIZE
	.comm	_V4L2_PIX_FMT_NV12,8,3          ; @V4L2_PIX_FMT_NV12
	.comm	_V4L2_PIX_FMT_YUYV,8,3          ; @V4L2_PIX_FMT_YUYV
	.comm	_CODA9_CACHE_LUMA_BUFFER_SIZE_OFFSET,4,2 ; @CODA9_CACHE_LUMA_BUFFER_SIZE_OFFSET
	.comm	_CODA9_CACHE_CR_BUFFER_SIZE_OFFSET,4,2 ; @CODA9_CACHE_CR_BUFFER_SIZE_OFFSET
	.comm	_CODA9_CACHE_CB_BUFFER_SIZE_OFFSET,4,2 ; @CODA9_CACHE_CB_BUFFER_SIZE_OFFSET
	.comm	_CODA9_CMD_SET_FRAME_CACHE_CONFIG,4,2 ; @CODA9_CMD_SET_FRAME_CACHE_CONFIG
	.no_dead_strip	_coda9_set_frame_cache
.subsections_via_symbols
