	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arc_pgu_set_pxl_fmt
_arc_pgu_set_pxl_fmt:                   ## @arc_pgu_set_pxl_fmt
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_crtc_to_arcpgu_priv
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	movq	_supported_formats@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	cmpq	%r15, (%rdi,%rbx)
	leaq	(%rdi,%rbx), %rax
	cmoveq	%rax, %r13
	incq	%r14
	callq	_ARRAY_SIZE
	cltq
	addq	$8, %rbx
	cmpq	%rax, %r14
	jl	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%r13d, %r13d
LBB0_4:
	xorl	%edi, %edi
	testq	%r13, %r13
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	(%r13), %rax
	movq	_DRM_FORMAT_RGB888@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	movq	_ARCPGU_REG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_arc_pgu_read
	movq	_ARCPGU_MODE_RGB888_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_arc_pgu_write                  ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_supported_formats,8,3          ## @supported_formats
	.comm	_DRM_FORMAT_RGB888,8,3          ## @DRM_FORMAT_RGB888
	.comm	_ARCPGU_REG_CTRL,4,2            ## @ARCPGU_REG_CTRL
	.comm	_ARCPGU_MODE_RGB888_MASK,4,2    ## @ARCPGU_MODE_RGB888_MASK
	.no_dead_strip	_arc_pgu_set_pxl_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arc_pgu_set_pxl_fmt
_arc_pgu_set_pxl_fmt:                   ; @arc_pgu_set_pxl_fmt
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	bl	_crtc_to_arcpgu_priv
	mov	x19, x0
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x20, [x8]
Lloh0:
	adrp	x21, _supported_formats@GOTPAGE
Lloh1:
	ldr	x21, [x21, _supported_formats@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x23, #0
	mov	x24, #0
	mov	x22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	add	x8, x0, x23
	ldr	x9, [x8]
	cmp	x9, x20
	csel	x22, x8, x22, eq
	add	x24, x24, #1
	bl	_ARRAY_SIZE
	add	x23, x23, #8
	cmp	x24, w0, sxtw
	b.lt	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	x22, #0
LBB0_4:
	cmp	x22, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_7
; %bb.5:
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _DRM_FORMAT_RGB888@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DRM_FORMAT_RGB888@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
Lloh5:
	adrp	x8, _ARCPGU_REG_CTRL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ARCPGU_REG_CTRL@GOTPAGEOFF]
Lloh7:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_arc_pgu_read
Lloh8:
	adrp	x8, _ARCPGU_MODE_RGB888_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ARCPGU_MODE_RGB888_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w2, w8, w0
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_arc_pgu_write
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_supported_formats,8,3          ; @supported_formats
	.comm	_DRM_FORMAT_RGB888,8,3          ; @DRM_FORMAT_RGB888
	.comm	_ARCPGU_REG_CTRL,4,2            ; @ARCPGU_REG_CTRL
	.comm	_ARCPGU_MODE_RGB888_MASK,4,2    ; @ARCPGU_MODE_RGB888_MASK
	.no_dead_strip	_arc_pgu_set_pxl_fmt
.subsections_via_symbols
