	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_cpmem_set_format_rgb       ## -- Begin function ipu_cpmem_set_format_rgb
	.p2align	4, 0x90
_ipu_cpmem_set_format_rgb:              ## @ipu_cpmem_set_format_rgb
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %r12d
	movl	4(%rsi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	28(%rsi), %edx
	movl	32(%rsi), %eax
	addl	%edx, %eax
	movl	%r12d, %r15d
	subl	%eax, %r15d
	movl	20(%rsi), %eax
	addl	24(%rsi), %eax
	movl	%r12d, %r13d
	subl	%eax, %r13d
	movl	12(%rsi), %eax
	addl	16(%rsi), %eax
	movl	%r12d, %ecx
	subl	%eax, %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	8(%rsi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_IPU_FIELD_WID0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	decl	%edx
	callq	_ipu_ch_param_write_field
	movq	_IPU_FIELD_OFS0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_ipu_ch_param_write_field
	movq	_IPU_FIELD_WID1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%rbx), %edx
	decl	%edx
	movq	%r14, %rdi
	callq	_ipu_ch_param_write_field
	movq	_IPU_FIELD_OFS1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_ipu_ch_param_write_field
	movq	_IPU_FIELD_WID2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%rbx), %edx
	decl	%edx
	movq	%r14, %rdi
	callq	_ipu_ch_param_write_field
	movq	_IPU_FIELD_OFS2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_ipu_ch_param_write_field
	movl	4(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	addl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	subl	%eax, %r12d
	movq	_IPU_FIELD_WID3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	decl	%edx
	movq	%r14, %rdi
	callq	_ipu_ch_param_write_field
	jmp	LBB0_3
LBB0_2:
	movq	_IPU_FIELD_WID3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$7, %edx
	callq	_ipu_ch_param_write_field
	movl	(%rbx), %r12d
LBB0_3:
	movq	_IPU_FIELD_OFS3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_ipu_ch_param_write_field
	movl	(%rbx), %eax
	addl	$-8, %eax
	roll	$29, %eax
	cmpl	$4, %eax
	jae	LBB0_4
## %bb.5:
	cltq
	leaq	L_switch.table.ipu_cpmem_set_format_rgb(%rip), %rcx
	movl	(%rcx,%rax,4), %ebx
	leaq	l_switch.table.ipu_cpmem_set_format_rgb.1(%rip), %rcx
	movl	(%rcx,%rax,4), %edx
	movq	_IPU_FIELD_BPP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ipu_ch_param_write_field
	movq	_IPU_FIELD_NPB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_ipu_ch_param_write_field
	movq	_IPU_FIELD_PFS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$7, %edx
	callq	_ipu_ch_param_write_field
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPU_FIELD_WID0,4,2             ## @IPU_FIELD_WID0
	.comm	_IPU_FIELD_OFS0,4,2             ## @IPU_FIELD_OFS0
	.comm	_IPU_FIELD_WID1,4,2             ## @IPU_FIELD_WID1
	.comm	_IPU_FIELD_OFS1,4,2             ## @IPU_FIELD_OFS1
	.comm	_IPU_FIELD_WID2,4,2             ## @IPU_FIELD_WID2
	.comm	_IPU_FIELD_OFS2,4,2             ## @IPU_FIELD_OFS2
	.comm	_IPU_FIELD_WID3,4,2             ## @IPU_FIELD_WID3
	.comm	_IPU_FIELD_OFS3,4,2             ## @IPU_FIELD_OFS3
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IPU_FIELD_BPP,4,2              ## @IPU_FIELD_BPP
	.comm	_IPU_FIELD_NPB,4,2              ## @IPU_FIELD_NPB
	.comm	_IPU_FIELD_PFS,4,2              ## @IPU_FIELD_PFS
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ## @switch.table.ipu_cpmem_set_format_rgb
L_switch.table.ipu_cpmem_set_format_rgb:
	.long	63                              ## 0x3f
	.long	31                              ## 0x1f
	.long	19                              ## 0x13
	.long	15                              ## 0xf

	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.ipu_cpmem_set_format_rgb.1
l_switch.table.ipu_cpmem_set_format_rgb.1:
	.long	5                               ## 0x5
	.long	3                               ## 0x3
	.long	1                               ## 0x1
	.long	0                               ## 0x0

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_cpmem_set_format_rgb       ; -- Begin function ipu_cpmem_set_format_rgb
	.p2align	2
_ipu_cpmem_set_format_rgb:              ; @ipu_cpmem_set_format_rgb
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x19, x0
	ldp	w9, w8, [x1, #28]
	ldp	w24, w25, [x1]
	add	w8, w9, w8
	sub	w21, w24, w8
	ldp	w8, w10, [x1, #20]
	add	w8, w8, w10
	sub	w22, w24, w8
	ldp	w8, w11, [x1, #12]
	ldr	w26, [x1, #8]
	add	w8, w8, w11
	sub	w23, w24, w8
Lloh0:
	adrp	x8, _IPU_FIELD_WID0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPU_FIELD_WID0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	sub	w2, w9, #1
	bl	_ipu_ch_param_write_field
Lloh3:
	adrp	x8, _IPU_FIELD_OFS0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IPU_FIELD_OFS0@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_ipu_ch_param_write_field
Lloh6:
	adrp	x8, _IPU_FIELD_WID1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IPU_FIELD_WID1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w8, [x20, #20]
	sub	w2, w8, #1
	mov	x0, x19
	bl	_ipu_ch_param_write_field
Lloh9:
	adrp	x8, _IPU_FIELD_OFS1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IPU_FIELD_OFS1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_ipu_ch_param_write_field
Lloh12:
	adrp	x8, _IPU_FIELD_WID2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IPU_FIELD_WID2@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w8, [x20, #12]
	sub	w2, w8, #1
	mov	x0, x19
	bl	_ipu_ch_param_write_field
Lloh15:
	adrp	x8, _IPU_FIELD_OFS2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IPU_FIELD_OFS2@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_ipu_ch_param_write_field
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_2
; %bb.1:
	add	w9, w25, w26
	sub	w21, w24, w9
Lloh18:
	adrp	x9, _IPU_FIELD_WID3@GOTPAGE
Lloh19:
	ldr	x9, [x9, _IPU_FIELD_WID3@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x9]
	sub	w2, w8, #1
	mov	x0, x19
	bl	_ipu_ch_param_write_field
	b	LBB0_3
LBB0_2:
Lloh21:
	adrp	x8, _IPU_FIELD_WID3@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IPU_FIELD_WID3@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #7
	bl	_ipu_ch_param_write_field
	ldr	w21, [x20]
LBB0_3:
Lloh24:
	adrp	x8, _IPU_FIELD_OFS3@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IPU_FIELD_OFS3@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_ipu_ch_param_write_field
	ldr	w8, [x20]
	sub	w8, w8, #8
	ror	w8, w8, #3
	cmp	w8, #4
	b.hs	LBB0_5
; %bb.4:
	sbfiz	x8, x8, #2, #32
Lloh27:
	adrp	x9, l_switch.table.ipu_cpmem_set_format_rgb@PAGE
Lloh28:
	add	x9, x9, l_switch.table.ipu_cpmem_set_format_rgb@PAGEOFF
	ldr	w20, [x9, x8]
Lloh29:
	adrp	x9, l_switch.table.ipu_cpmem_set_format_rgb.1@PAGE
Lloh30:
	add	x9, x9, l_switch.table.ipu_cpmem_set_format_rgb.1@PAGEOFF
	ldr	w2, [x9, x8]
Lloh31:
	adrp	x8, _IPU_FIELD_BPP@GOTPAGE
Lloh32:
	ldr	x8, [x8, _IPU_FIELD_BPP@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ipu_ch_param_write_field
Lloh34:
	adrp	x8, _IPU_FIELD_NPB@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IPU_FIELD_NPB@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_ipu_ch_param_write_field
Lloh37:
	adrp	x8, _IPU_FIELD_PFS@GOTPAGE
Lloh38:
	ldr	x8, [x8, _IPU_FIELD_PFS@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #7
	bl	_ipu_ch_param_write_field
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh40:
	adrp	x8, _EINVAL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_IPU_FIELD_WID0,4,2             ; @IPU_FIELD_WID0
	.comm	_IPU_FIELD_OFS0,4,2             ; @IPU_FIELD_OFS0
	.comm	_IPU_FIELD_WID1,4,2             ; @IPU_FIELD_WID1
	.comm	_IPU_FIELD_OFS1,4,2             ; @IPU_FIELD_OFS1
	.comm	_IPU_FIELD_WID2,4,2             ; @IPU_FIELD_WID2
	.comm	_IPU_FIELD_OFS2,4,2             ; @IPU_FIELD_OFS2
	.comm	_IPU_FIELD_WID3,4,2             ; @IPU_FIELD_WID3
	.comm	_IPU_FIELD_OFS3,4,2             ; @IPU_FIELD_OFS3
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IPU_FIELD_BPP,4,2              ; @IPU_FIELD_BPP
	.comm	_IPU_FIELD_NPB,4,2              ; @IPU_FIELD_NPB
	.comm	_IPU_FIELD_PFS,4,2              ; @IPU_FIELD_PFS
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @switch.table.ipu_cpmem_set_format_rgb
l_switch.table.ipu_cpmem_set_format_rgb:
	.long	63                              ; 0x3f
	.long	31                              ; 0x1f
	.long	19                              ; 0x13
	.long	15                              ; 0xf

	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.ipu_cpmem_set_format_rgb.1
l_switch.table.ipu_cpmem_set_format_rgb.1:
	.long	5                               ; 0x5
	.long	3                               ; 0x3
	.long	1                               ; 0x1
	.long	0                               ; 0x0

.subsections_via_symbols
