	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function csi2_ctx_config
_csi2_ctx_config:                       ## @csi2_ctx_config
	.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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rsi), %ebx
	movl	24(%rdx), %edi
	callq	_ISPCSI2_CTX_CTRL1
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_isp_reg_readl
	movq	_ISPCSI2_CTX_CTRL1_EOF_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	orl	%eax, %edx
	notl	%ecx
	andl	%eax, %ecx
	cmpq	$0, 64(%r12)
	cmovnel	%edx, %ecx
	movq	_ISPCSI2_CTX_CTRL1_EOL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	orl	%ecx, %edx
	notl	%eax
	andl	%ecx, %eax
	cmpq	$0, 56(%r12)
	cmovnel	%edx, %eax
	movq	_ISPCSI2_CTX_CTRL1_CS_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%ebx, %ecx
	orl	%eax, %ecx
	notl	%ebx
	andl	%eax, %ebx
	cmpq	$0, 48(%r12)
	cmovnel	%ecx, %ebx
	movl	(%r15), %r13d
	movl	24(%r12), %edi
	callq	_ISPCSI2_CTX_CTRL1
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_isp_reg_writel
	movl	(%r15), %ebx
	movl	24(%r12), %edi
	callq	_ISPCSI2_CTX_CTRL2
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_isp_reg_readl
	movq	_ISPCSI2_CTX_CTRL2_VIRTUAL_ID_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	_ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	(%r12), %eax
	movl	4(%r12), %edi
	shll	%cl, %eax
	orl	%edx, %eax
	movq	_ISPCSI2_CTX_CTRL2_FORMAT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	movq	_ISPCSI2_CTX_CTRL2_FORMAT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%edi, %ebx
	shll	%cl, %ebx
	andl	%eax, %edx
	orl	%edx, %ebx
	cmpq	$0, 40(%r12)
	je	LBB0_4
## %bb.1:
	cmpq	$0, 32(%r12)
	movq	_ISPCSI2_CTX_CTRL2_DPCM_PRED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	je	LBB0_3
## %bb.2:
	orl	%eax, %ebx
	jmp	LBB0_4
LBB0_3:
	notl	%eax
	andl	%eax, %ebx
LBB0_4:
	callq	_is_usr_def_mapping
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_ISPCSI2_CTX_CTRL2_USER_DEF_MAP_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	movq	_ISPCSI2_CTX_CTRL2_USER_DEF_MAP_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$2, %eax
	shll	%cl, %eax
	orl	%eax, %ebx
LBB0_6:
	movl	(%r15), %r13d
	movl	24(%r12), %edi
	callq	_ISPCSI2_CTX_CTRL2
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_isp_reg_writel
	movl	(%r15), %ebx
	movl	24(%r12), %edi
	callq	_ISPCSI2_CTX_CTRL3
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_isp_reg_readl
	movq	_ISPCSI2_CTX_CTRL3_ALPHA_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	movq	_ISPCSI2_CTX_CTRL3_ALPHA_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	8(%r12), %ebx
	shll	%cl, %ebx
	andl	%eax, %edx
	movl	24(%r12), %edi
	orl	%edx, %ebx
	movl	(%r15), %r13d
	callq	_ISPCSI2_CTX_CTRL3
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_isp_reg_writel
	movl	(%r15), %ebx
	movl	24(%r12), %edi
	callq	_ISPCSI2_CTX_DAT_OFST
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_isp_reg_readl
	movq	_ISPCSI2_CTX_DAT_OFST_OFST_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	movq	_ISPCSI2_CTX_DAT_OFST_OFST_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	12(%r12), %ebx
	shll	%cl, %ebx
	andl	%eax, %edx
	movl	24(%r12), %edi
	orl	%edx, %ebx
	movl	(%r15), %r13d
	callq	_ISPCSI2_CTX_DAT_OFST
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_isp_reg_writel
	movl	(%r15), %r13d
	movl	16(%r12), %ebx
	movl	24(%r12), %edi
	callq	_ISPCSI2_CTX_DAT_PING_ADDR
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_isp_reg_writel
	movl	(%r15), %r15d
	movl	20(%r12), %ebx
	movl	24(%r12), %edi
	callq	_ISPCSI2_CTX_DAT_PONG_ADDR
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_isp_reg_writel                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ISPCSI2_CTX_CTRL1_EOF_EN,4,2   ## @ISPCSI2_CTX_CTRL1_EOF_EN
	.comm	_ISPCSI2_CTX_CTRL1_EOL_EN,4,2   ## @ISPCSI2_CTX_CTRL1_EOL_EN
	.comm	_ISPCSI2_CTX_CTRL1_CS_EN,4,2    ## @ISPCSI2_CTX_CTRL1_CS_EN
	.comm	_ISPCSI2_CTX_CTRL2_VIRTUAL_ID_MASK,4,2 ## @ISPCSI2_CTX_CTRL2_VIRTUAL_ID_MASK
	.comm	_ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT,4,2 ## @ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT
	.comm	_ISPCSI2_CTX_CTRL2_FORMAT_MASK,4,2 ## @ISPCSI2_CTX_CTRL2_FORMAT_MASK
	.comm	_ISPCSI2_CTX_CTRL2_FORMAT_SHIFT,4,2 ## @ISPCSI2_CTX_CTRL2_FORMAT_SHIFT
	.comm	_ISPCSI2_CTX_CTRL2_DPCM_PRED,4,2 ## @ISPCSI2_CTX_CTRL2_DPCM_PRED
	.comm	_ISPCSI2_CTX_CTRL2_USER_DEF_MAP_MASK,4,2 ## @ISPCSI2_CTX_CTRL2_USER_DEF_MAP_MASK
	.comm	_ISPCSI2_CTX_CTRL2_USER_DEF_MAP_SHIFT,4,2 ## @ISPCSI2_CTX_CTRL2_USER_DEF_MAP_SHIFT
	.comm	_ISPCSI2_CTX_CTRL3_ALPHA_MASK,4,2 ## @ISPCSI2_CTX_CTRL3_ALPHA_MASK
	.comm	_ISPCSI2_CTX_CTRL3_ALPHA_SHIFT,4,2 ## @ISPCSI2_CTX_CTRL3_ALPHA_SHIFT
	.comm	_ISPCSI2_CTX_DAT_OFST_OFST_MASK,4,2 ## @ISPCSI2_CTX_DAT_OFST_OFST_MASK
	.comm	_ISPCSI2_CTX_DAT_OFST_OFST_SHIFT,4,2 ## @ISPCSI2_CTX_DAT_OFST_OFST_SHIFT
	.no_dead_strip	_csi2_ctx_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function csi2_ctx_config
_csi2_ctx_config:                       ; @csi2_ctx_config
	.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, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w22, [x1]
	ldr	w0, [x2, #24]
	bl	_ISPCSI2_CTX_CTRL1
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_isp_reg_readl
Lloh0:
	adrp	x8, _ISPCSI2_CTX_CTRL1_EOF_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ISPCSI2_CTX_CTRL1_EOF_EN@GOTPAGEOFF]
	ldr	x9, [x20, #64]
Lloh2:
	ldr	w8, [x8]
	orr	w10, w8, w0
	bic	w8, w0, w8
	cmp	x9, #0
	csel	w8, w8, w10, eq
Lloh3:
	adrp	x9, _ISPCSI2_CTX_CTRL1_EOL_EN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ISPCSI2_CTX_CTRL1_EOL_EN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w10, w9, w8
	bic	w8, w8, w9
	ldp	x11, x9, [x20, #48]
	cmp	x9, #0
	csel	w8, w8, w10, eq
Lloh6:
	adrp	x9, _ISPCSI2_CTX_CTRL1_CS_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ISPCSI2_CTX_CTRL1_CS_EN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w10, w9, w8
	bic	w8, w8, w9
	cmp	x11, #0
	csel	w22, w8, w10, eq
	ldr	w23, [x21]
	ldr	w0, [x20, #24]
	bl	_ISPCSI2_CTX_CTRL1
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_isp_reg_writel
	ldr	w22, [x21]
	ldr	w0, [x20, #24]
	bl	_ISPCSI2_CTX_CTRL2
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_isp_reg_readl
Lloh9:
	adrp	x8, _ISPCSI2_CTX_CTRL2_VIRTUAL_ID_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ISPCSI2_CTX_CTRL2_VIRTUAL_ID_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh12:
	adrp	x9, _ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	ldp	w10, w0, [x20]
	lsl	w9, w10, w9
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _ISPCSI2_CTX_CTRL2_FORMAT_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ISPCSI2_CTX_CTRL2_FORMAT_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh18:
	adrp	x9, _ISPCSI2_CTX_CTRL2_FORMAT_SHIFT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ISPCSI2_CTX_CTRL2_FORMAT_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	lsl	w9, w0, w9
	orr	w22, w9, w8
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_2
; %bb.1:
Lloh21:
	adrp	x8, _ISPCSI2_CTX_CTRL2_DPCM_PRED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ISPCSI2_CTX_CTRL2_DPCM_PRED@GOTPAGEOFF]
	ldr	x9, [x20, #32]
Lloh23:
	ldr	w8, [x8]
	bic	w10, w22, w8
	orr	w8, w8, w22
	cmp	x9, #0
	csel	w22, w10, w8, eq
LBB0_2:
	bl	_is_usr_def_mapping
	cbz	x0, LBB0_4
; %bb.3:
Lloh24:
	adrp	x8, _ISPCSI2_CTX_CTRL2_USER_DEF_MAP_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ISPCSI2_CTX_CTRL2_USER_DEF_MAP_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	bic	w8, w22, w8
Lloh27:
	adrp	x9, _ISPCSI2_CTX_CTRL2_USER_DEF_MAP_SHIFT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _ISPCSI2_CTX_CTRL2_USER_DEF_MAP_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	mov	w10, #2
	lsl	w9, w10, w9
	orr	w22, w9, w8
LBB0_4:
	ldr	w23, [x21]
	ldr	w0, [x20, #24]
	bl	_ISPCSI2_CTX_CTRL2
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_isp_reg_writel
	ldr	w22, [x21]
	ldr	w0, [x20, #24]
	bl	_ISPCSI2_CTX_CTRL3
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_isp_reg_readl
Lloh30:
	adrp	x8, _ISPCSI2_CTX_CTRL3_ALPHA_MASK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ISPCSI2_CTX_CTRL3_ALPHA_MASK@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh33:
	adrp	x9, _ISPCSI2_CTX_CTRL3_ALPHA_SHIFT@GOTPAGE
Lloh34:
	ldr	x9, [x9, _ISPCSI2_CTX_CTRL3_ALPHA_SHIFT@GOTPAGEOFF]
	ldr	w10, [x20, #8]
Lloh35:
	ldr	w9, [x9]
	lsl	w9, w10, w9
	orr	w22, w9, w8
	ldr	w23, [x21]
	ldr	w0, [x20, #24]
	bl	_ISPCSI2_CTX_CTRL3
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_isp_reg_writel
	ldr	w22, [x21]
	ldr	w0, [x20, #24]
	bl	_ISPCSI2_CTX_DAT_OFST
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_isp_reg_readl
Lloh36:
	adrp	x8, _ISPCSI2_CTX_DAT_OFST_OFST_MASK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ISPCSI2_CTX_DAT_OFST_OFST_MASK@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh39:
	adrp	x9, _ISPCSI2_CTX_DAT_OFST_OFST_SHIFT@GOTPAGE
Lloh40:
	ldr	x9, [x9, _ISPCSI2_CTX_DAT_OFST_OFST_SHIFT@GOTPAGEOFF]
	ldr	w10, [x20, #12]
Lloh41:
	ldr	w9, [x9]
	lsl	w9, w10, w9
	orr	w22, w9, w8
	ldr	w23, [x21]
	ldr	w0, [x20, #24]
	bl	_ISPCSI2_CTX_DAT_OFST
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_isp_reg_writel
	ldr	w22, [x20, #16]
	ldr	w23, [x21]
	ldr	w0, [x20, #24]
	bl	_ISPCSI2_CTX_DAT_PING_ADDR
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_isp_reg_writel
	ldr	w21, [x21]
	ldp	w22, w0, [x20, #20]
	bl	_ISPCSI2_CTX_DAT_PONG_ADDR
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	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	_isp_reg_writel
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ISPCSI2_CTX_CTRL1_EOF_EN,4,2   ; @ISPCSI2_CTX_CTRL1_EOF_EN
	.comm	_ISPCSI2_CTX_CTRL1_EOL_EN,4,2   ; @ISPCSI2_CTX_CTRL1_EOL_EN
	.comm	_ISPCSI2_CTX_CTRL1_CS_EN,4,2    ; @ISPCSI2_CTX_CTRL1_CS_EN
	.comm	_ISPCSI2_CTX_CTRL2_VIRTUAL_ID_MASK,4,2 ; @ISPCSI2_CTX_CTRL2_VIRTUAL_ID_MASK
	.comm	_ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT,4,2 ; @ISPCSI2_CTX_CTRL2_VIRTUAL_ID_SHIFT
	.comm	_ISPCSI2_CTX_CTRL2_FORMAT_MASK,4,2 ; @ISPCSI2_CTX_CTRL2_FORMAT_MASK
	.comm	_ISPCSI2_CTX_CTRL2_FORMAT_SHIFT,4,2 ; @ISPCSI2_CTX_CTRL2_FORMAT_SHIFT
	.comm	_ISPCSI2_CTX_CTRL2_DPCM_PRED,4,2 ; @ISPCSI2_CTX_CTRL2_DPCM_PRED
	.comm	_ISPCSI2_CTX_CTRL2_USER_DEF_MAP_MASK,4,2 ; @ISPCSI2_CTX_CTRL2_USER_DEF_MAP_MASK
	.comm	_ISPCSI2_CTX_CTRL2_USER_DEF_MAP_SHIFT,4,2 ; @ISPCSI2_CTX_CTRL2_USER_DEF_MAP_SHIFT
	.comm	_ISPCSI2_CTX_CTRL3_ALPHA_MASK,4,2 ; @ISPCSI2_CTX_CTRL3_ALPHA_MASK
	.comm	_ISPCSI2_CTX_CTRL3_ALPHA_SHIFT,4,2 ; @ISPCSI2_CTX_CTRL3_ALPHA_SHIFT
	.comm	_ISPCSI2_CTX_DAT_OFST_OFST_MASK,4,2 ; @ISPCSI2_CTX_DAT_OFST_OFST_MASK
	.comm	_ISPCSI2_CTX_DAT_OFST_OFST_SHIFT,4,2 ; @ISPCSI2_CTX_DAT_OFST_OFST_SHIFT
	.no_dead_strip	_csi2_ctx_config
.subsections_via_symbols
