	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_ic_task_graphics_init      ## -- Begin function ipu_ic_task_graphics_init
	.p2align	4, 0x90
_ipu_ic_task_graphics_init:             ## @ipu_ic_task_graphics_init
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	(%rdi), %rax
	movq	_IC_TASK_ENCODER@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_15
LBB0_2:
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movq	32(%rdi), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	_IC_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ipu_ic_read
	movl	%eax, %r12d
	movq	16(%rbx), %rax
	testl	%r12d, (%rax)
	je	LBB0_3
LBB0_5:
	movl	(%r13), %eax
	movl	%eax, 28(%rbx)
	movl	%eax, -44(%rbp)
	movl	24(%rbx), %eax
	movl	%eax, -48(%rbp)
	leaq	-48(%rbp), %rdi
	callq	___ipu_ic_calc_csc
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_init_csc
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	movq	_IC_CONF_IC_GLB_LOC_A@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.8:
	orl	%r12d, %r13d
	movq	_IC_CMBP_1@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_ipu_ic_read
	movq	16(%rbx), %rcx
	movb	4(%rcx), %cl
	movl	$255, %edx
	shll	%cl, %edx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	shll	%cl, %esi
	notl	%edx
	andl	%eax, %edx
	orl	%edx, %esi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_ipu_ic_write
	jmp	LBB0_10
LBB0_3:
	movq	_V4L2_YCBCR_ENC_601@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_V4L2_QUANTIZATION_FULL_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IPUV3_COLORSPACE_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%rsp)
	leaq	-48(%rbp), %rdi
	movl	%esi, %r8d
	movl	%edx, %r9d
	callq	_ipu_ic_calc_csc
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_init_csc
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_5
LBB0_9:
	notl	%r13d
	andl	%r12d, %r13d
LBB0_10:
	movq	_IC_CONF_KEY_COLOR_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_12
## %bb.11:
	orl	%r13d, %r14d
	movq	_IC_CMBP_2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	_ipu_ic_write
	jmp	LBB0_13
LBB0_12:
	notl	%r14d
	andl	%r13d, %r14d
LBB0_13:
	movq	_IC_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_ipu_ic_write
	movl	$1, 8(%rbx)
	xorl	%r14d, %r14d
LBB0_14:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
LBB0_15:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IC_TASK_ENCODER,8,3            ## @IC_TASK_ENCODER
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IC_CONF,4,2                    ## @IC_CONF
	.comm	_V4L2_YCBCR_ENC_601,4,2         ## @V4L2_YCBCR_ENC_601
	.comm	_V4L2_QUANTIZATION_FULL_RANGE,4,2 ## @V4L2_QUANTIZATION_FULL_RANGE
	.comm	_IPUV3_COLORSPACE_RGB,4,2       ## @IPUV3_COLORSPACE_RGB
	.comm	_IC_CONF_IC_GLB_LOC_A,4,2       ## @IC_CONF_IC_GLB_LOC_A
	.comm	_IC_CMBP_1,4,2                  ## @IC_CMBP_1
	.comm	_IC_CONF_KEY_COLOR_EN,4,2       ## @IC_CONF_KEY_COLOR_EN
	.comm	_IC_CMBP_2,4,2                  ## @IC_CMBP_2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_ic_task_graphics_init      ; -- Begin function ipu_ic_task_graphics_init
	.p2align	2
_ipu_ic_task_graphics_init:             ; @ipu_ic_task_graphics_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _IC_TASK_ENCODER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IC_TASK_ENCODER@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_15
LBB0_2:
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x26, x1
	mov	x20, x0
	ldr	x19, [x0, #32]
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh6:
	adrp	x28, _IC_CONF@GOTPAGE
Lloh7:
	ldr	x28, [x28, _IC_CONF@GOTPAGEOFF]
	ldr	w1, [x28]
	mov	x0, x20
	bl	_ipu_ic_read
	mov	x25, x0
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_7
LBB0_3:
	ldr	w8, [x26]
	str	w8, [x20, #28]
	ldr	w9, [x20, #24]
	stp	w9, w8, [sp, #8]
	add	x0, sp, #8
	bl	___ipu_ic_calc_csc
	mov	x27, x0
	cbnz	w0, LBB0_14
; %bb.4:
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_init_csc
	mov	x27, x0
	cbnz	w0, LBB0_14
; %bb.5:
Lloh8:
	adrp	x8, _IC_CONF_IC_GLB_LOC_A@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IC_CONF_IC_GLB_LOC_A@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cbz	w24, LBB0_9
; %bb.6:
	orr	w24, w8, w25
Lloh11:
	adrp	x25, _IC_CMBP_1@GOTPAGE
Lloh12:
	ldr	x25, [x25, _IC_CMBP_1@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x20
	bl	_ipu_ic_read
	ldr	x8, [x20, #16]
	ldr	w8, [x8, #4]
	mov	w9, #255
	lsl	w9, w9, w8
	bic	w9, w0, w9
	lsl	w8, w23, w8
	orr	w1, w9, w8
	ldr	w2, [x25]
	mov	x0, x20
	bl	_ipu_ic_write
	b	LBB0_10
LBB0_7:
Lloh13:
	adrp	x8, _V4L2_YCBCR_ENC_601@GOTPAGE
Lloh14:
	ldr	x8, [x8, _V4L2_YCBCR_ENC_601@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _V4L2_QUANTIZATION_FULL_RANGE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _V4L2_QUANTIZATION_FULL_RANGE@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
Lloh19:
	adrp	x8, _IPUV3_COLORSPACE_RGB@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IPUV3_COLORSPACE_RGB@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	add	x0, sp, #8
	mov	x4, x1
	mov	x5, x2
	mov	x6, x3
	bl	_ipu_ic_calc_csc
	mov	x27, x0
	cbnz	w0, LBB0_14
; %bb.8:
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #0
	bl	_init_csc
	mov	x27, x0
	cbnz	w0, LBB0_14
	b	LBB0_3
LBB0_9:
	bic	w24, w25, w8
LBB0_10:
Lloh22:
	adrp	x8, _IC_CONF_KEY_COLOR_EN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IC_CONF_KEY_COLOR_EN@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cbz	w22, LBB0_12
; %bb.11:
	orr	w22, w8, w24
Lloh25:
	adrp	x8, _IC_CMBP_2@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IC_CMBP_2@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_ipu_ic_write
	b	LBB0_13
LBB0_12:
	bic	w22, w24, w8
LBB0_13:
	ldr	w2, [x28]
	mov	x0, x20
	mov	x1, x22
	bl	_ipu_ic_write
	mov	w27, #0
	mov	w8, #1
	str	w8, [x20, #8]
LBB0_14:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_15:
	mov	x0, x27
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_IC_TASK_ENCODER,8,3            ; @IC_TASK_ENCODER
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IC_CONF,4,2                    ; @IC_CONF
	.comm	_V4L2_YCBCR_ENC_601,4,2         ; @V4L2_YCBCR_ENC_601
	.comm	_V4L2_QUANTIZATION_FULL_RANGE,4,2 ; @V4L2_QUANTIZATION_FULL_RANGE
	.comm	_IPUV3_COLORSPACE_RGB,4,2       ; @IPUV3_COLORSPACE_RGB
	.comm	_IC_CONF_IC_GLB_LOC_A,4,2       ; @IC_CONF_IC_GLB_LOC_A
	.comm	_IC_CMBP_1,4,2                  ; @IC_CMBP_1
	.comm	_IC_CONF_KEY_COLOR_EN,4,2       ; @IC_CONF_KEY_COLOR_EN
	.comm	_IC_CMBP_2,4,2                  ; @IC_CMBP_2
.subsections_via_symbols
