	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipu_ic_init_prpenc
_ipu_ic_init_prpenc:                    ## @ipu_ic_init_prpenc
	.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	%edx, -56(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	16(%rsi), %esi
	movl	20(%rbx), %edi
	leaq	-44(%rbp), %r12
	leaq	-48(%rbp), %r13
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	_calc_resize_coeffs
	movl	-48(%rbp), %r15d
	movl	-44(%rbp), %r14d
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	_calc_resize_coeffs
	movl	-48(%rbp), %r12d
	movl	-44(%rbp), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %edi
	callq	_format_to_colorspace
	movl	%eax, %r13d
	movl	(%rbx), %edi
	callq	_format_to_colorspace
	cmpl	%eax, %r13d
	jne	LBB0_1
## %bb.2:
	shll	$30, %r15d
	shll	$16, %r14d
	orl	%r15d, %r14d
	orl	-52(%rbp), %r14d                ## 4-byte Folded Reload
	shll	$14, %r12d
	orl	%r14d, %r12d
	movq	_IC_PRP_ENC_RSC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_idmac_write_icreg
	movq	_IC_CONF@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_idmac_read_icreg
	movq	_IC_CONF_RWS_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, %ecx
	notl	%ecx
	andl	%eax, %ecx
	orl	%eax, %esi
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	cmovnel	%ecx, %esi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_idmac_write_icreg
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Colourspace conversion unsupported!\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_IC_PRP_ENC_RSC,4,2             ## @IC_PRP_ENC_RSC
	.comm	_IC_CONF,4,2                    ## @IC_CONF
	.comm	_IC_CONF_RWS_EN,4,2             ## @IC_CONF_RWS_EN
	.no_dead_strip	_ipu_ic_init_prpenc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipu_ic_init_prpenc
_ipu_ic_init_prpenc:                    ; @ipu_ic_init_prpenc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldp	w1, w0, [x1, #16]
	add	x2, sp, #8
	add	x3, sp, #12
	bl	_calc_resize_coeffs
	ldp	w24, w23, [sp, #8]
	ldp	w1, w0, [x21, #8]
	add	x2, sp, #8
	add	x3, sp, #12
	bl	_calc_resize_coeffs
	ldp	w26, w25, [sp, #8]
	ldr	w0, [x21, #4]
	bl	_format_to_colorspace
	mov	x22, x0
	ldr	w0, [x21]
	bl	_format_to_colorspace
	cmp	w22, w0
	b.ne	LBB0_2
; %bb.1:
	lsl	w8, w24, #16
	orr	w8, w8, w23, lsl #30
	orr	w8, w8, w26
	orr	w1, w8, w25, lsl #14
Lloh0:
	adrp	x8, _IC_PRP_ENC_RSC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IC_PRP_ENC_RSC@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_idmac_write_icreg
Lloh3:
	adrp	x21, _IC_CONF@GOTPAGE
Lloh4:
	ldr	x21, [x21, _IC_CONF@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_idmac_read_icreg
Lloh5:
	adrp	x8, _IC_CONF_RWS_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IC_CONF_RWS_EN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w9, w0, w8
	orr	w8, w8, w0
	cmp	w20, #0
	csel	w1, w8, w9, eq
	ldr	w2, [x21]
	mov	x0, x19
	bl	_idmac_write_icreg
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh10:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Colourspace conversion unsupported!\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_IC_PRP_ENC_RSC,4,2             ; @IC_PRP_ENC_RSC
	.comm	_IC_CONF,4,2                    ; @IC_CONF
	.comm	_IC_CONF_RWS_EN,4,2             ; @IC_CONF_RWS_EN
	.no_dead_strip	_ipu_ic_init_prpenc
.subsections_via_symbols
