	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_csi_set_dest               ## -- Begin function ipu_csi_set_dest
	.p2align	4, 0x90
_ipu_csi_set_dest:                      ## @ipu_csi_set_dest
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_IPU_CSI_DEST_IDMAC@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_CSI_DATA_DEST_IDMAC@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_CSI_DATA_DEST_IC@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_CSI_SENS_CONF@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_ipu_csi_read
	movq	_CSI_SENS_CONF_DATA_DEST_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_CSI_SENS_CONF_DATA_DEST_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	shll	%cl, %ebx
	notl	%edx
	andl	%eax, %edx
	orl	%edx, %ebx
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ipu_csi_write
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPU_CSI_DEST_IDMAC,4,2         ## @IPU_CSI_DEST_IDMAC
	.comm	_CSI_DATA_DEST_IDMAC,4,2        ## @CSI_DATA_DEST_IDMAC
	.comm	_CSI_DATA_DEST_IC,4,2           ## @CSI_DATA_DEST_IC
	.comm	_CSI_SENS_CONF,4,2              ## @CSI_SENS_CONF
	.comm	_CSI_SENS_CONF_DATA_DEST_MASK,4,2 ## @CSI_SENS_CONF_DATA_DEST_MASK
	.comm	_CSI_SENS_CONF_DATA_DEST_SHIFT,4,2 ## @CSI_SENS_CONF_DATA_DEST_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_csi_set_dest               ; -- Begin function ipu_csi_set_dest
	.p2align	2
_ipu_csi_set_dest:                      ; @ipu_csi_set_dest
	.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	x8, _IPU_CSI_DEST_IDMAC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPU_CSI_DEST_IDMAC@GOTPAGEOFF]
Lloh2:
	adrp	x9, _CSI_DATA_DEST_IDMAC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CSI_DATA_DEST_IDMAC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x10, _CSI_DATA_DEST_IC@GOTPAGE
Lloh6:
	ldr	x10, [x10, _CSI_DATA_DEST_IC@GOTPAGEOFF]
	cmp	w8, w1
	csel	x8, x9, x10, eq
	ldr	w20, [x8]
	bl	_spin_lock_irqsave
Lloh7:
	adrp	x21, _CSI_SENS_CONF@GOTPAGE
Lloh8:
	ldr	x21, [x21, _CSI_SENS_CONF@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ipu_csi_read
Lloh9:
	adrp	x8, _CSI_SENS_CONF_DATA_DEST_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CSI_SENS_CONF_DATA_DEST_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh12:
	adrp	x9, _CSI_SENS_CONF_DATA_DEST_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CSI_SENS_CONF_DATA_DEST_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	lsl	w9, w20, w9
	orr	w1, w9, w8
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ipu_csi_write
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	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
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IPU_CSI_DEST_IDMAC,4,2         ; @IPU_CSI_DEST_IDMAC
	.comm	_CSI_DATA_DEST_IDMAC,4,2        ; @CSI_DATA_DEST_IDMAC
	.comm	_CSI_DATA_DEST_IC,4,2           ; @CSI_DATA_DEST_IC
	.comm	_CSI_SENS_CONF,4,2              ; @CSI_SENS_CONF
	.comm	_CSI_SENS_CONF_DATA_DEST_MASK,4,2 ; @CSI_SENS_CONF_DATA_DEST_MASK
	.comm	_CSI_SENS_CONF_DATA_DEST_SHIFT,4,2 ; @CSI_SENS_CONF_DATA_DEST_SHIFT
.subsections_via_symbols
