	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_csi_set_test_generator     ## -- Begin function ipu_csi_set_test_generator
	.p2align	4, 0x90
_ipu_csi_set_test_generator:            ## @ipu_csi_set_test_generator
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r14d
	movl	%ecx, %r15d
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r12
	movl	4(%rdi), %edi
	callq	_clk_get_rate
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	_CSI_TST_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ipu_csi_read
	movl	%eax, %ebx
	testl	%r13d, %r13d
	je	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_ipu_csi_set_testgen_mclk
	movq	_CSI_TEST_GEN_R_MASK@GOTPCREL(%rip), %rax
	movq	_CSI_TEST_GEN_G_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_CSI_TEST_GEN_B_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	notl	%edx
	movq	_CSI_TEST_GEN_R_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	shll	%cl, %esi
	movq	_CSI_TEST_GEN_G_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	andl	%edx, %ebx
	movq	_CSI_TEST_GEN_MODE_EN@GOTPCREL(%rip), %rax
	orl	%esi, %r15d
	movq	_CSI_TEST_GEN_B_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r14d
	orl	%r15d, %r14d
	orl	(%rax), %ebx
	orl	%r14d, %ebx
	jmp	LBB0_3
LBB0_1:
	movq	_CSI_TEST_GEN_MODE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_3:
	movq	_CSI_TST_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_ipu_csi_write
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CSI_TST_CTRL,4,2               ## @CSI_TST_CTRL
	.comm	_CSI_TEST_GEN_MODE_EN,4,2       ## @CSI_TEST_GEN_MODE_EN
	.comm	_CSI_TEST_GEN_R_MASK,4,2        ## @CSI_TEST_GEN_R_MASK
	.comm	_CSI_TEST_GEN_G_MASK,4,2        ## @CSI_TEST_GEN_G_MASK
	.comm	_CSI_TEST_GEN_B_MASK,4,2        ## @CSI_TEST_GEN_B_MASK
	.comm	_CSI_TEST_GEN_R_SHIFT,4,2       ## @CSI_TEST_GEN_R_SHIFT
	.comm	_CSI_TEST_GEN_G_SHIFT,4,2       ## @CSI_TEST_GEN_G_SHIFT
	.comm	_CSI_TEST_GEN_B_SHIFT,4,2       ## @CSI_TEST_GEN_B_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_csi_set_test_generator     ; -- Begin function ipu_csi_set_test_generator
	.p2align	2
_ipu_csi_set_test_generator:            ; @ipu_csi_set_test_generator
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x23, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x26, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_clk_get_rate
	mov	x25, x0
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x27, _CSI_TST_CTRL@GOTPAGE
Lloh1:
	ldr	x27, [x27, _CSI_TST_CTRL@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	x0, x19
	bl	_ipu_csi_read
	mov	x24, x0
	cbz	w26, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x25
	bl	_ipu_csi_set_testgen_mclk
Lloh2:
	adrp	x8, _CSI_TEST_GEN_R_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CSI_TEST_GEN_R_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _CSI_TEST_GEN_G_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CSI_TEST_GEN_G_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _CSI_TEST_GEN_B_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CSI_TEST_GEN_B_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh11:
	adrp	x9, _CSI_TEST_GEN_MODE_EN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CSI_TEST_GEN_MODE_EN@GOTPAGEOFF]
	bic	w8, w24, w8
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _CSI_TEST_GEN_R_SHIFT@GOTPAGE
Lloh15:
	ldr	x10, [x10, _CSI_TEST_GEN_R_SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	lsl	w10, w22, w10
Lloh17:
	adrp	x11, _CSI_TEST_GEN_G_SHIFT@GOTPAGE
Lloh18:
	ldr	x11, [x11, _CSI_TEST_GEN_G_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w11, [x11]
	lsl	w11, w21, w11
Lloh20:
	adrp	x12, _CSI_TEST_GEN_B_SHIFT@GOTPAGE
Lloh21:
	ldr	x12, [x12, _CSI_TEST_GEN_B_SHIFT@GOTPAGEOFF]
Lloh22:
	ldr	w12, [x12]
	lsl	w12, w20, w12
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w1, w8, w12
	b	LBB0_3
LBB0_2:
Lloh23:
	adrp	x8, _CSI_TEST_GEN_MODE_EN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CSI_TEST_GEN_MODE_EN@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	bic	w1, w24, w8
LBB0_3:
	ldr	w2, [x27]
	mov	x0, x19
	bl	_ipu_csi_write
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_CSI_TST_CTRL,4,2               ; @CSI_TST_CTRL
	.comm	_CSI_TEST_GEN_MODE_EN,4,2       ; @CSI_TEST_GEN_MODE_EN
	.comm	_CSI_TEST_GEN_R_MASK,4,2        ; @CSI_TEST_GEN_R_MASK
	.comm	_CSI_TEST_GEN_G_MASK,4,2        ; @CSI_TEST_GEN_G_MASK
	.comm	_CSI_TEST_GEN_B_MASK,4,2        ; @CSI_TEST_GEN_B_MASK
	.comm	_CSI_TEST_GEN_R_SHIFT,4,2       ; @CSI_TEST_GEN_R_SHIFT
	.comm	_CSI_TEST_GEN_G_SHIFT,4,2       ; @CSI_TEST_GEN_G_SHIFT
	.comm	_CSI_TEST_GEN_B_SHIFT,4,2       ; @CSI_TEST_GEN_B_SHIFT
.subsections_via_symbols
