	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function csi2_ctx_enable
_csi2_ctx_enable:                       ## @csi2_ctx_enable
	.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	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	16(%rsi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	8(%rsi), %ebx
	movq	%rdx, %rdi
	callq	_ISPCSI2_CTX_CTRL1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_isp_reg_readl
	movl	%eax, %ebx
	testq	%r14, %r14
	je	LBB0_4
## %bb.1:
	movl	(%r13), %eax
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_CSI2_OUTPUT_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ecx, 4(%r13)
	setne	%al
LBB0_3:
	movq	_ISPCSI2_CTX_CTRL1_COUNT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	movq	_ISPCSI2_CTX_CTRL1_COUNT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	andl	%edx, %ebx
	movq	_ISPCSI2_CTX_CTRL1_COUNT_UNLOCK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movq	_ISPCSI2_CTX_CTRL1_CTX_EN@GOTPCREL(%rip), %rcx
	orl	%eax, %ebx
	orl	(%rcx), %ebx
	jmp	LBB0_5
LBB0_4:
	movq	_ISPCSI2_CTX_CTRL1_CTX_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_5:
	movl	8(%r13), %r13d
	movq	%r12, %rdi
	callq	_ISPCSI2_CTX_CTRL1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_isp_reg_writel
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax,%r12,8)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CSI2_OUTPUT_MEMORY,4,2         ## @CSI2_OUTPUT_MEMORY
	.comm	_ISPCSI2_CTX_CTRL1_COUNT_MASK,4,2 ## @ISPCSI2_CTX_CTRL1_COUNT_MASK
	.comm	_ISPCSI2_CTX_CTRL1_COUNT_UNLOCK,4,2 ## @ISPCSI2_CTX_CTRL1_COUNT_UNLOCK
	.comm	_ISPCSI2_CTX_CTRL1_COUNT_SHIFT,4,2 ## @ISPCSI2_CTX_CTRL1_COUNT_SHIFT
	.comm	_ISPCSI2_CTX_CTRL1_CTX_EN,4,2   ## @ISPCSI2_CTX_CTRL1_CTX_EN
	.no_dead_strip	_csi2_ctx_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function csi2_ctx_enable
_csi2_ctx_enable:                       ; @csi2_ctx_enable
	.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	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x24, [x1, #16]
	ldr	w23, [x1, #8]
	mov	x0, x2
	bl	_ISPCSI2_CTX_CTRL1
	mov	x2, x0
	mov	x0, x21
	mov	x1, x23
	bl	_isp_reg_readl
	cbz	x19, LBB0_4
; %bb.1:
	ldr	w8, [x22]
	cbnz	w8, LBB0_3
; %bb.2:
	ldr	w8, [x22, #4]
Lloh0:
	adrp	x9, _CSI2_OUTPUT_MEMORY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CSI2_OUTPUT_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
LBB0_3:
Lloh3:
	adrp	x9, _ISPCSI2_CTX_CTRL1_COUNT_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ISPCSI2_CTX_CTRL1_COUNT_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _ISPCSI2_CTX_CTRL1_COUNT_UNLOCK@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ISPCSI2_CTX_CTRL1_COUNT_UNLOCK@GOTPAGEOFF]
	bic	w9, w0, w9
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _ISPCSI2_CTX_CTRL1_COUNT_SHIFT@GOTPAGE
Lloh10:
	ldr	x11, [x11, _ISPCSI2_CTX_CTRL1_COUNT_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	lsl	w8, w8, w11
Lloh12:
	adrp	x11, _ISPCSI2_CTX_CTRL1_CTX_EN@GOTPAGE
Lloh13:
	ldr	x11, [x11, _ISPCSI2_CTX_CTRL1_CTX_EN@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	orr	w9, w9, w10
	orr	w8, w9, w8
	orr	w23, w8, w11
	b	LBB0_5
LBB0_4:
Lloh15:
	adrp	x8, _ISPCSI2_CTX_CTRL1_CTX_EN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ISPCSI2_CTX_CTRL1_CTX_EN@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	bic	w23, w0, w8
LBB0_5:
	ldr	w22, [x22, #8]
	mov	x0, x20
	bl	_ISPCSI2_CTX_CTRL1
	mov	x3, x0
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	bl	_isp_reg_writel
	str	x19, [x24, x20, lsl #3]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CSI2_OUTPUT_MEMORY,4,2         ; @CSI2_OUTPUT_MEMORY
	.comm	_ISPCSI2_CTX_CTRL1_COUNT_MASK,4,2 ; @ISPCSI2_CTX_CTRL1_COUNT_MASK
	.comm	_ISPCSI2_CTX_CTRL1_COUNT_UNLOCK,4,2 ; @ISPCSI2_CTX_CTRL1_COUNT_UNLOCK
	.comm	_ISPCSI2_CTX_CTRL1_COUNT_SHIFT,4,2 ; @ISPCSI2_CTX_CTRL1_COUNT_SHIFT
	.comm	_ISPCSI2_CTX_CTRL1_CTX_EN,4,2   ; @ISPCSI2_CTX_CTRL1_CTX_EN
	.no_dead_strip	_csi2_ctx_enable
.subsections_via_symbols
