	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function coda_prepare_encode
_coda_prepare_encode:                   ## @coda_prepare_encode
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	56(%rdi), %r15
	callq	_coda_enc_param_change
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	56(%r14), %rdi
	addq	$8, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_v4l2_warn
LBB0_2:
	movl	72(%r14), %edi
	callq	_v4l2_m2m_next_src_buf
	movq	%rax, %rbx
	movl	72(%r14), %edi
	callq	_v4l2_m2m_next_dst_buf
	movq	%rax, %r12
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_get_q_data
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_get_q_data
	movl	(%rax), %edx
	movl	(%r14), %ecx
	movl	%ecx, (%rbx)
	movl	%ecx, (%r12)
	incl	%ecx
	movl	%ecx, (%r14)
	movl	28(%r14), %edi
	testl	%edi, %edi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.3:
	movl	$0, 28(%r14)
LBB0_8:
	movb	$1, %r13b
	movq	_V4L2_BUF_FLAG_PFRAME@GOTPCREL(%rip), %rcx
	movq	_V4L2_BUF_FLAG_KEYFRAME@GOTPCREL(%rip), %rsi
LBB0_9:
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	movl	8(%rbx), %eax
	orl	(%rsi), %eax
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, 8(%rbx)
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	_CODA_960@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_coda_set_gdi_regs
LBB0_11:
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rbx)
	setne	%r15b
	movl	%r13d, -68(%rbp)                ## 4-byte Spill
                                        ## kill: def $r13b killed $r13b killed $r13d
	notb	%r13b
	addq	$4, %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	testb	%r15b, %r13b
	jne	LBB0_13
## %bb.12:
	movq	8(%r14), %rsi
	movl	4(%rsi), %ecx
	movl	8(%rsi), %edx
	addl	(%rsi), %ecx
	addl	%ecx, %eax
	addl	%edx, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %r15d
	addl	%edx, %ecx
	subl	%ecx, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_vaddr
	movq	8(%r14), %rcx
	movq	64(%r14), %rdx
	movq	(%rdx), %rsi
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_memcpy
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_vaddr
	movq	8(%r14), %rcx
	movq	64(%r14), %rdx
	addl	(%rcx), %eax
	movq	8(%rdx), %rsi
	movl	4(%rcx), %edx
	movl	%eax, %edi
	callq	_memcpy
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_vaddr
	movq	8(%r14), %rcx
	movq	64(%r14), %rdx
	addl	(%rcx), %eax
	addl	4(%rcx), %eax
	movq	16(%rdx), %rsi
	movl	8(%rcx), %edx
	movl	%eax, %edi
	callq	_memcpy
	jmp	LBB0_14
LBB0_13:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %r15d
LBB0_14:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpb	$0, -68(%rbp)                   ## 1-byte Folded Reload
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_22
## %bb.15:
	cmpl	$128, %eax
	je	LBB0_20
## %bb.16:
	cmpl	$129, %eax
	je	LBB0_17
## %bb.18:
	cmpl	$130, %eax
	jne	LBB0_21
## %bb.19:
	movl	36(%r14), %r15d
	jmp	LBB0_28
LBB0_22:
	cmpl	$128, %eax
	je	LBB0_25
## %bb.23:
	cmpl	$130, %eax
	jne	LBB0_26
## %bb.24:
	movl	44(%r14), %r15d
	jmp	LBB0_28
LBB0_4:
	movl	32(%r14), %edi
	movq	_V4L2_BUF_FLAG_KEYFRAME@GOTPCREL(%rip), %rcx
	movq	_V4L2_BUF_FLAG_PFRAME@GOTPCREL(%rip), %rsi
	testl	%edi, %edi
	je	LBB0_5
## %bb.6:
	movl	(%rbx), %eax
	cltd
	idivl	%edi
	xorl	%r13d, %r13d
	movl	$0, %edi
	testl	%edx, %edx
	jne	LBB0_9
## %bb.7:
	movl	$1, %edi
	jmp	LBB0_8
LBB0_25:
	movl	48(%r14), %r15d
	jmp	LBB0_28
LBB0_26:
	movq	56(%r14), %rdi
	addq	$8, %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_27
LBB0_5:
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	jmp	LBB0_9
LBB0_20:
	movl	40(%r14), %r15d
	jmp	LBB0_28
LBB0_17:
	movl	$30, %r15d
	jmp	LBB0_28
LBB0_21:
	movq	56(%r14), %rdi
	addq	$8, %rdi
	leaq	L_.str.1(%rip), %rsi
LBB0_27:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_v4l2_warn
LBB0_28:
	movl	52(%r14), %eax
	movq	_CODA_ROT_MIR_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	%eax, %esi
	testl	%eax, %eax
	cmovel	%eax, %esi
	movq	_CODA_CMD_ENC_PIC_ROT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_coda_write
	movq	_CODA_CMD_ENC_PIC_QS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_coda_write
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_CODA_960@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_29
## %bb.30:
	movq	_CODA9_CMD_ENC_PIC_SRC_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_coda_write
	movl	8(%r12), %esi
	movq	_CODA9_CMD_ENC_PIC_SRC_STRIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_coda_write
	movq	_CODA9_CMD_ENC_PIC_SUB_FRAME_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_coda_write
	movq	_CODA9_CMD_ENC_PIC_SRC_ADDR_Y@GOTPCREL(%rip), %rax
	jmp	LBB0_31
LBB0_29:
	movq	_CODA_CMD_ENC_PIC_SRC_ADDR_Y@GOTPCREL(%rip), %rax
LBB0_31:
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_coda_write_base
	addl	%r13d, %r13d
	andl	$2, %r13d
	movq	_CODA_CMD_ENC_PIC_OPTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_coda_write
	movq	_CODA_CMD_ENC_PIC_BB_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_coda_write
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	1023(%rax), %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$10, %esi
	movq	_CODA_CMD_ENC_PIC_BB_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_coda_write
	cmpl	$0, 24(%r14)
	jne	LBB0_33
## %bb.32:
	movq	_CODA_BIT_STREAM_END_FLAG@GOTPCREL(%rip), %rax
	movl	16(%r14), %esi
	orl	(%rax), %esi
	movl	%esi, 16(%r14)
	movq	_CODA_REG_BIT_BIT_STREAM_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_coda_write
LBB0_33:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_CODA_DX6@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_35
## %bb.34:
	movl	20(%r14), %esi
	movq	_CODA7_REG_BIT_AXI_SRAM_USE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_coda_write
LBB0_35:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_trace_coda_enc_pic_run
	movq	_CODA_COMMAND_PIC_RUN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_coda_command_async
	xorl	%eax, %eax
	addq	$56, %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	"parameter change failed: %d\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_BUF_FLAG_PFRAME,4,2       ## @V4L2_BUF_FLAG_PFRAME
	.comm	_V4L2_BUF_FLAG_KEYFRAME,4,2     ## @V4L2_BUF_FLAG_KEYFRAME
	.comm	_CODA_960,8,3                   ## @CODA_960
L_.str.1:                               ## @.str.1
	.asciz	"cannot set intra qp, fmt not supported\n"

L_.str.2:                               ## @.str.2
	.asciz	"cannot set inter qp, fmt not supported\n"

	.comm	_CODA_ROT_MIR_ENABLE,4,2        ## @CODA_ROT_MIR_ENABLE
	.comm	_CODA_CMD_ENC_PIC_ROT_MODE,4,2  ## @CODA_CMD_ENC_PIC_ROT_MODE
	.comm	_CODA_CMD_ENC_PIC_QS,4,2        ## @CODA_CMD_ENC_PIC_QS
	.comm	_CODA9_CMD_ENC_PIC_SRC_INDEX,4,2 ## @CODA9_CMD_ENC_PIC_SRC_INDEX
	.comm	_CODA9_CMD_ENC_PIC_SRC_STRIDE,4,2 ## @CODA9_CMD_ENC_PIC_SRC_STRIDE
	.comm	_CODA9_CMD_ENC_PIC_SUB_FRAME_SYNC,4,2 ## @CODA9_CMD_ENC_PIC_SUB_FRAME_SYNC
	.comm	_CODA9_CMD_ENC_PIC_SRC_ADDR_Y,4,2 ## @CODA9_CMD_ENC_PIC_SRC_ADDR_Y
	.comm	_CODA_CMD_ENC_PIC_SRC_ADDR_Y,4,2 ## @CODA_CMD_ENC_PIC_SRC_ADDR_Y
	.comm	_CODA_CMD_ENC_PIC_OPTION,4,2    ## @CODA_CMD_ENC_PIC_OPTION
	.comm	_CODA_CMD_ENC_PIC_BB_START,4,2  ## @CODA_CMD_ENC_PIC_BB_START
	.comm	_CODA_CMD_ENC_PIC_BB_SIZE,4,2   ## @CODA_CMD_ENC_PIC_BB_SIZE
	.comm	_CODA_BIT_STREAM_END_FLAG,4,2   ## @CODA_BIT_STREAM_END_FLAG
	.comm	_CODA_REG_BIT_BIT_STREAM_PARAM,4,2 ## @CODA_REG_BIT_BIT_STREAM_PARAM
	.comm	_CODA_DX6,8,3                   ## @CODA_DX6
	.comm	_CODA7_REG_BIT_AXI_SRAM_USE,4,2 ## @CODA7_REG_BIT_AXI_SRAM_USE
	.comm	_CODA_COMMAND_PIC_RUN,4,2       ## @CODA_COMMAND_PIC_RUN
	.no_dead_strip	_coda_prepare_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function coda_prepare_encode
_coda_prepare_encode:                   ; @coda_prepare_encode
	.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	x19, x0
	ldr	x20, [x0, #56]
	bl	_coda_enc_param_change
                                        ; kill: def $w0 killed $w0 def $x0
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	x8, [x19, #56]
	add	x8, x8, #8
	str	x0, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_v4l2_warn
LBB0_2:
	ldr	w0, [x19, #72]
	bl	_v4l2_m2m_next_src_buf
	mov	x21, x0
	ldr	w0, [x19, #72]
	bl	_v4l2_m2m_next_dst_buf
	mov	x23, x0
Lloh2:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_get_q_data
	mov	x22, x0
Lloh5:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_get_q_data
	mov	x24, x0
	ldr	w28, [x0]
	ldr	w8, [x19]
	str	w8, [x21]
	str	w8, [x23]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	w26, [x19, #28]
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
	cbz	w26, LBB0_5
; %bb.3:
	str	wzr, [x19, #28]
LBB0_4:
	mov	w22, #1
Lloh8:
	adrp	x8, _V4L2_BUF_FLAG_PFRAME@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_BUF_FLAG_PFRAME@GOTPAGEOFF]
Lloh10:
	adrp	x9, _V4L2_BUF_FLAG_KEYFRAME@GOTPAGE
Lloh11:
	ldr	x9, [x9, _V4L2_BUF_FLAG_KEYFRAME@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_7
; %bb.6:
	ldr	w9, [x21]
	sdiv	w10, w9, w8
	msub	w8, w10, w8, w9
	cbz	w8, LBB0_34
LBB0_7:
	mov	w22, #0
	mov	w26, #0
Lloh12:
	adrp	x8, _V4L2_BUF_FLAG_KEYFRAME@GOTPAGE
Lloh13:
	ldr	x8, [x8, _V4L2_BUF_FLAG_KEYFRAME@GOTPAGEOFF]
Lloh14:
	adrp	x9, _V4L2_BUF_FLAG_PFRAME@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V4L2_BUF_FLAG_PFRAME@GOTPAGEOFF]
LBB0_8:
	ldr	w9, [x9]
	ldr	w10, [x21, #8]
	orr	w9, w10, w9
	ldr	w8, [x8]
	bic	w8, w9, w8
	str	w8, [x21, #8]
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _CODA_960@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CODA_960@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_coda_set_gdi_regs
LBB0_10:
	ldr	w8, [x21]
	cmp	w8, #0
	cset	w27, ne
	add	x25, x23, #4
	mov	x0, x25
	mov	w1, #0
	bl	_vb2_dma_contig_plane_dma_addr
	mov	x23, x0
	bic	w8, w27, w22
	tbnz	w8, #0, LBB0_15
; %bb.11:
	ldr	x8, [x19, #8]
	ldp	w9, w10, [x8]
	ldr	w8, [x8, #8]
	add	w9, w10, w9
	add	w10, w9, w23
	add	w23, w10, w8
	ldr	w10, [x24, #4]
	add	w8, w9, w8
	sub	w27, w10, w8
	mov	x0, x25
	mov	w1, #0
	bl	_vb2_plane_vaddr
	ldr	x8, [x19, #64]
	ldr	x1, [x8]
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
	bl	_memcpy
	mov	x0, x25
	mov	w1, #0
	bl	_vb2_plane_vaddr
	ldr	x8, [x19, #8]
	ldp	w9, w2, [x8]
	add	w0, w9, w0
	ldr	x8, [x19, #64]
	ldr	x1, [x8, #8]
	bl	_memcpy
	mov	x0, x25
	mov	w1, #0
	bl	_vb2_plane_vaddr
	ldr	x8, [x19, #8]
	ldp	w9, w10, [x8]
	add	w9, w9, w0
	add	w0, w9, w10
	ldr	x9, [x19, #64]
	ldr	x1, [x9, #16]
	ldr	w2, [x8, #8]
	bl	_memcpy
	cmp	w28, #128
	cbnz	w22, LBB0_16
LBB0_12:
	b.eq	LBB0_20
; %bb.13:
	cmp	w28, #130
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	b.ne	LBB0_21
; %bb.14:
	ldr	w24, [x19, #44]
	b	LBB0_26
LBB0_15:
	ldr	w27, [x24, #4]
	cmp	w28, #128
	cbz	w22, LBB0_12
LBB0_16:
	b.eq	LBB0_22
; %bb.17:
	cmp	w28, #129
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	b.eq	LBB0_23
; %bb.18:
	cmp	w28, #130
	b.ne	LBB0_24
; %bb.19:
	ldr	w24, [x19, #36]
	b	LBB0_26
LBB0_20:
	ldr	w24, [x19, #48]
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_26
LBB0_21:
	ldr	x8, [x19, #56]
	add	x0, x8, #8
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_25
LBB0_22:
	ldr	w24, [x19, #40]
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_26
LBB0_23:
	mov	w24, #30
	b	LBB0_26
LBB0_24:
	ldr	x8, [x19, #56]
	add	x0, x8, #8
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_25:
	bl	_v4l2_warn
	mov	w24, #0
LBB0_26:
Lloh23:
	adrp	x25, _CODA_960@GOTPAGE
Lloh24:
	ldr	x25, [x25, _CODA_960@GOTPAGEOFF]
	ldr	w8, [x19, #52]
Lloh25:
	adrp	x9, _CODA_ROT_MIR_ENABLE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _CODA_ROT_MIR_ENABLE@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w9, w9, w8
	cmp	w8, #0
	csel	w1, wzr, w9, eq
Lloh28:
	adrp	x8, _CODA_CMD_ENC_PIC_ROT_MODE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CODA_CMD_ENC_PIC_ROT_MODE@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_coda_write
Lloh31:
	adrp	x8, _CODA_CMD_ENC_PIC_QS@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CODA_CMD_ENC_PIC_QS@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x24
	bl	_coda_write
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh34:
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_28
; %bb.27:
Lloh35:
	adrp	x8, _CODA9_CMD_ENC_PIC_SRC_INDEX@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CODA9_CMD_ENC_PIC_SRC_INDEX@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #4
	bl	_coda_write
	ldr	w1, [x22, #8]
Lloh38:
	adrp	x8, _CODA9_CMD_ENC_PIC_SRC_STRIDE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _CODA9_CMD_ENC_PIC_SRC_STRIDE@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_coda_write
Lloh41:
	adrp	x8, _CODA9_CMD_ENC_PIC_SUB_FRAME_SYNC@GOTPAGE
Lloh42:
	ldr	x8, [x8, _CODA9_CMD_ENC_PIC_SUB_FRAME_SYNC@GOTPAGEOFF]
Lloh43:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_coda_write
Lloh44:
	adrp	x8, _CODA9_CMD_ENC_PIC_SRC_ADDR_Y@GOTPAGE
Lloh45:
	ldr	x8, [x8, _CODA9_CMD_ENC_PIC_SRC_ADDR_Y@GOTPAGEOFF]
	b	LBB0_29
LBB0_28:
Lloh46:
	adrp	x8, _CODA_CMD_ENC_PIC_SRC_ADDR_Y@GOTPAGE
Lloh47:
	ldr	x8, [x8, _CODA_CMD_ENC_PIC_SRC_ADDR_Y@GOTPAGEOFF]
LBB0_29:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_coda_write_base
	ubfiz	w1, w26, #1, #1
Lloh48:
	adrp	x8, _CODA_CMD_ENC_PIC_OPTION@GOTPAGE
Lloh49:
	ldr	x8, [x8, _CODA_CMD_ENC_PIC_OPTION@GOTPAGEOFF]
Lloh50:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_coda_write
Lloh51:
	adrp	x8, _CODA_CMD_ENC_PIC_BB_START@GOTPAGE
Lloh52:
	ldr	x8, [x8, _CODA_CMD_ENC_PIC_BB_START@GOTPAGEOFF]
Lloh53:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x23
	bl	_coda_write
	add	w8, w27, #1023
	cmp	w27, #0
	csel	w8, w8, w27, lt
	asr	w1, w8, #10
Lloh54:
	adrp	x8, _CODA_CMD_ENC_PIC_BB_SIZE@GOTPAGE
Lloh55:
	ldr	x8, [x8, _CODA_CMD_ENC_PIC_BB_SIZE@GOTPAGEOFF]
Lloh56:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_coda_write
	ldr	w8, [x19, #24]
	cbnz	w8, LBB0_31
; %bb.30:
Lloh57:
	adrp	x8, _CODA_BIT_STREAM_END_FLAG@GOTPAGE
Lloh58:
	ldr	x8, [x8, _CODA_BIT_STREAM_END_FLAG@GOTPAGEOFF]
Lloh59:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w1, w9, w8
	str	w1, [x19, #16]
Lloh60:
	adrp	x8, _CODA_REG_BIT_BIT_STREAM_PARAM@GOTPAGE
Lloh61:
	ldr	x8, [x8, _CODA_REG_BIT_BIT_STREAM_PARAM@GOTPAGEOFF]
Lloh62:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_coda_write
LBB0_31:
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh63:
	adrp	x9, _CODA_DX6@GOTPAGE
Lloh64:
	ldr	x9, [x9, _CODA_DX6@GOTPAGEOFF]
Lloh65:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_33
; %bb.32:
	ldr	w1, [x19, #20]
Lloh66:
	adrp	x8, _CODA7_REG_BIT_AXI_SRAM_USE@GOTPAGE
Lloh67:
	ldr	x8, [x8, _CODA7_REG_BIT_AXI_SRAM_USE@GOTPAGEOFF]
Lloh68:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_coda_write
LBB0_33:
	mov	x0, x19
	mov	x1, x21
	bl	_trace_coda_enc_pic_run
Lloh69:
	adrp	x8, _CODA_COMMAND_PIC_RUN@GOTPAGE
Lloh70:
	ldr	x8, [x8, _CODA_COMMAND_PIC_RUN@GOTPAGEOFF]
Lloh71:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_coda_command_async
	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
LBB0_34:
	mov	w26, #1
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh34
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"parameter change failed: %d\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_BUF_FLAG_PFRAME,4,2       ; @V4L2_BUF_FLAG_PFRAME
	.comm	_V4L2_BUF_FLAG_KEYFRAME,4,2     ; @V4L2_BUF_FLAG_KEYFRAME
	.comm	_CODA_960,8,3                   ; @CODA_960
l_.str.1:                               ; @.str.1
	.asciz	"cannot set intra qp, fmt not supported\n"

l_.str.2:                               ; @.str.2
	.asciz	"cannot set inter qp, fmt not supported\n"

	.comm	_CODA_ROT_MIR_ENABLE,4,2        ; @CODA_ROT_MIR_ENABLE
	.comm	_CODA_CMD_ENC_PIC_ROT_MODE,4,2  ; @CODA_CMD_ENC_PIC_ROT_MODE
	.comm	_CODA_CMD_ENC_PIC_QS,4,2        ; @CODA_CMD_ENC_PIC_QS
	.comm	_CODA9_CMD_ENC_PIC_SRC_INDEX,4,2 ; @CODA9_CMD_ENC_PIC_SRC_INDEX
	.comm	_CODA9_CMD_ENC_PIC_SRC_STRIDE,4,2 ; @CODA9_CMD_ENC_PIC_SRC_STRIDE
	.comm	_CODA9_CMD_ENC_PIC_SUB_FRAME_SYNC,4,2 ; @CODA9_CMD_ENC_PIC_SUB_FRAME_SYNC
	.comm	_CODA9_CMD_ENC_PIC_SRC_ADDR_Y,4,2 ; @CODA9_CMD_ENC_PIC_SRC_ADDR_Y
	.comm	_CODA_CMD_ENC_PIC_SRC_ADDR_Y,4,2 ; @CODA_CMD_ENC_PIC_SRC_ADDR_Y
	.comm	_CODA_CMD_ENC_PIC_OPTION,4,2    ; @CODA_CMD_ENC_PIC_OPTION
	.comm	_CODA_CMD_ENC_PIC_BB_START,4,2  ; @CODA_CMD_ENC_PIC_BB_START
	.comm	_CODA_CMD_ENC_PIC_BB_SIZE,4,2   ; @CODA_CMD_ENC_PIC_BB_SIZE
	.comm	_CODA_BIT_STREAM_END_FLAG,4,2   ; @CODA_BIT_STREAM_END_FLAG
	.comm	_CODA_REG_BIT_BIT_STREAM_PARAM,4,2 ; @CODA_REG_BIT_BIT_STREAM_PARAM
	.comm	_CODA_DX6,8,3                   ; @CODA_DX6
	.comm	_CODA7_REG_BIT_AXI_SRAM_USE,4,2 ; @CODA7_REG_BIT_AXI_SRAM_USE
	.comm	_CODA_COMMAND_PIC_RUN,4,2       ; @CODA_COMMAND_PIC_RUN
	.no_dead_strip	_coda_prepare_encode
.subsections_via_symbols
