	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function viacam_ctlr_image
_viacam_ctlr_image:                     ## @viacam_ctlr_image
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_VCR_CAPINTC@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_VCR_CI_ENABLE@GOTPCREL(%rip), %rax
	movq	_VCR_CI_CLKEN@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	orl	(%rax), %edx
	notl	%edx
	callq	_viacam_write_reg
	movq	_VCR_HORRANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$102760736, %edx                ## imm = 0x6200120
	callq	_viacam_write_reg
	movq	_VCR_VERTRANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$31326208, %edx                 ## imm = 0x1DE0000
	callq	_viacam_write_reg
	movq	%rbx, %rdi
	callq	_viacam_set_scale
	movq	_VCR_MAXDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%rbx), %eax
	movl	28(%rbx), %edx
	shll	$16, %eax
	sarl	$3, %edx
	orl	%eax, %edx
	movq	%rbx, %rdi
	callq	_viacam_write_reg
	movq	_VCR_MAXVBI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_viacam_write_reg
	movq	_VCR_VSTRIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VCR_VS_STRIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	8(%rbx), %edx
	movq	%rbx, %rdi
	callq	_viacam_write_reg
	cmpl	$3, (%rbx)
	jne	LBB0_2
## %bb.1:
	movq	_VCR_CI_3BUFS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_2:
	movl	(%r15), %edx
	movq	_VCR_CI_FLDINV@GOTPCREL(%rip), %rdi
	movq	_VCR_CI_VREFINV@GOTPCREL(%rip), %rsi
	movq	_VCR_CI_DIBOTH@GOTPCREL(%rip), %r9
	movq	_VCR_CI_CCIR601_8@GOTPCREL(%rip), %r8
	movq	16(%rbx), %rax
	movq	_V4L2_PIX_FMT_YUYV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	_VCR_CI_YUYV@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_VCR_CI_UYVY@GOTPCREL(%rip), %rax
LBB0_5:
	orl	(%rdi), %edx
	orl	(%rsi), %edx
	orl	(%r9), %edx
	orl	(%r8), %edx
	orl	%r12d, %edx
	orl	(%rax), %edx
	orl	$134217728, %edx                ## imm = 0x8000000
	movl	(%r14), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_viacam_write_reg               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VCR_CAPINTC,4,2                ## @VCR_CAPINTC
	.comm	_VCR_CI_ENABLE,4,2              ## @VCR_CI_ENABLE
	.comm	_VCR_CI_CLKEN,4,2               ## @VCR_CI_CLKEN
	.comm	_VCR_HORRANGE,4,2               ## @VCR_HORRANGE
	.comm	_VCR_VERTRANGE,4,2              ## @VCR_VERTRANGE
	.comm	_VCR_MAXDATA,4,2                ## @VCR_MAXDATA
	.comm	_VCR_MAXVBI,4,2                 ## @VCR_MAXVBI
	.comm	_VCR_VSTRIDE,4,2                ## @VCR_VSTRIDE
	.comm	_VCR_VS_STRIDE,4,2              ## @VCR_VS_STRIDE
	.comm	_VCR_CI_FLDINV,4,2              ## @VCR_CI_FLDINV
	.comm	_VCR_CI_VREFINV,4,2             ## @VCR_CI_VREFINV
	.comm	_VCR_CI_DIBOTH,4,2              ## @VCR_CI_DIBOTH
	.comm	_VCR_CI_CCIR601_8,4,2           ## @VCR_CI_CCIR601_8
	.comm	_VCR_CI_3BUFS,4,2               ## @VCR_CI_3BUFS
	.comm	_V4L2_PIX_FMT_YUYV,8,3          ## @V4L2_PIX_FMT_YUYV
	.comm	_VCR_CI_YUYV,4,2                ## @VCR_CI_YUYV
	.comm	_VCR_CI_UYVY,4,2                ## @VCR_CI_UYVY
	.no_dead_strip	_viacam_ctlr_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function viacam_ctlr_image
_viacam_ctlr_image:                     ; @viacam_ctlr_image
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _VCR_CAPINTC@GOTPAGE
Lloh1:
	ldr	x20, [x20, _VCR_CAPINTC@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _VCR_CI_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VCR_CI_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x21, _VCR_CI_CLKEN@GOTPAGE
Lloh6:
	ldr	x21, [x21, _VCR_CI_CLKEN@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w8, w9, w8
	mvn	w2, w8
	bl	_viacam_write_reg
Lloh7:
	adrp	x8, _VCR_HORRANGE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VCR_HORRANGE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #288
	movk	w2, #1568, lsl #16
	bl	_viacam_write_reg
Lloh10:
	adrp	x8, _VCR_VERTRANGE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VCR_VERTRANGE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #31326208
	bl	_viacam_write_reg
	mov	x0, x19
	bl	_viacam_set_scale
Lloh13:
	adrp	x8, _VCR_MAXDATA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VCR_MAXDATA@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldp	w8, w9, [x19, #24]
	asr	w9, w9, #3
	orr	w2, w9, w8, lsl #16
	mov	x0, x19
	bl	_viacam_write_reg
Lloh16:
	adrp	x8, _VCR_MAXVBI@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VCR_MAXVBI@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_viacam_write_reg
Lloh19:
	adrp	x8, _VCR_VSTRIDE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VCR_VSTRIDE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w8, [x19, #8]
Lloh22:
	adrp	x9, _VCR_VS_STRIDE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _VCR_VS_STRIDE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	and	w2, w9, w8
	mov	x0, x19
	bl	_viacam_write_reg
	ldr	w8, [x21]
Lloh25:
	adrp	x9, _VCR_CI_FLDINV@GOTPAGE
Lloh26:
	ldr	x9, [x9, _VCR_CI_FLDINV@GOTPAGEOFF]
Lloh27:
	adrp	x10, _VCR_CI_VREFINV@GOTPAGE
Lloh28:
	ldr	x10, [x10, _VCR_CI_VREFINV@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
Lloh30:
	ldr	w10, [x10]
Lloh31:
	adrp	x11, _VCR_CI_DIBOTH@GOTPAGE
Lloh32:
	ldr	x11, [x11, _VCR_CI_DIBOTH@GOTPAGEOFF]
Lloh33:
	adrp	x12, _VCR_CI_CCIR601_8@GOTPAGE
Lloh34:
	ldr	x12, [x12, _VCR_CI_CCIR601_8@GOTPAGEOFF]
Lloh35:
	ldr	w11, [x11]
Lloh36:
	ldr	w12, [x12]
	ldr	w13, [x19]
Lloh37:
	adrp	x14, _VCR_CI_3BUFS@GOTPAGE
Lloh38:
	ldr	x14, [x14, _VCR_CI_3BUFS@GOTPAGEOFF]
Lloh39:
	ldr	w14, [x14]
	cmp	w13, #3
	csel	w13, w14, wzr, eq
	ldr	x14, [x19, #16]
Lloh40:
	adrp	x15, _V4L2_PIX_FMT_YUYV@GOTPAGE
Lloh41:
	ldr	x15, [x15, _V4L2_PIX_FMT_YUYV@GOTPAGEOFF]
Lloh42:
	ldr	x15, [x15]
Lloh43:
	adrp	x16, _VCR_CI_YUYV@GOTPAGE
Lloh44:
	ldr	x16, [x16, _VCR_CI_YUYV@GOTPAGEOFF]
Lloh45:
	adrp	x17, _VCR_CI_UYVY@GOTPAGE
Lloh46:
	ldr	x17, [x17, _VCR_CI_UYVY@GOTPAGEOFF]
	cmp	x14, x15
	csel	x14, x16, x17, eq
	ldr	w14, [x14]
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w8, w8, w12
	orr	w8, w8, w13
	orr	w8, w8, w14
	orr	w2, w8, #0x8000000
	ldr	w1, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_viacam_write_reg
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh35
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh29
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_VCR_CAPINTC,4,2                ; @VCR_CAPINTC
	.comm	_VCR_CI_ENABLE,4,2              ; @VCR_CI_ENABLE
	.comm	_VCR_CI_CLKEN,4,2               ; @VCR_CI_CLKEN
	.comm	_VCR_HORRANGE,4,2               ; @VCR_HORRANGE
	.comm	_VCR_VERTRANGE,4,2              ; @VCR_VERTRANGE
	.comm	_VCR_MAXDATA,4,2                ; @VCR_MAXDATA
	.comm	_VCR_MAXVBI,4,2                 ; @VCR_MAXVBI
	.comm	_VCR_VSTRIDE,4,2                ; @VCR_VSTRIDE
	.comm	_VCR_VS_STRIDE,4,2              ; @VCR_VS_STRIDE
	.comm	_VCR_CI_FLDINV,4,2              ; @VCR_CI_FLDINV
	.comm	_VCR_CI_VREFINV,4,2             ; @VCR_CI_VREFINV
	.comm	_VCR_CI_DIBOTH,4,2              ; @VCR_CI_DIBOTH
	.comm	_VCR_CI_CCIR601_8,4,2           ; @VCR_CI_CCIR601_8
	.comm	_VCR_CI_3BUFS,4,2               ; @VCR_CI_3BUFS
	.comm	_V4L2_PIX_FMT_YUYV,8,3          ; @V4L2_PIX_FMT_YUYV
	.comm	_VCR_CI_YUYV,4,2                ; @VCR_CI_YUYV
	.comm	_VCR_CI_UYVY,4,2                ; @VCR_CI_UYVY
	.no_dead_strip	_viacam_ctlr_image
.subsections_via_symbols
