	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fill_dc_plane_info_and_addr
_fill_dc_plane_info_and_addr:           ## @fill_dc_plane_info_and_addr
	.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
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rsi), %r13
	movq	%r13, %rdi
	callq	_to_amdgpu_framebuffer
	movq	%rax, %r15
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	(%r13), %rax
	movl	(%rax), %edi
	leal	-132(%rdi), %eax
	cmpl	$12, %eax
	jae	LBB0_1
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	cltq
	leaq	l_switch.table.fill_dc_plane_info_and_addr(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %esi
	movl	%esi, 40(%rbx)
	movq	_DRM_MODE_ROTATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r14), %eax
	addl	$-128, %eax
	cmpl	$2, %eax
	ja	LBB0_3
## %bb.4:
	cltq
	leaq	l_switch.table.fill_dc_plane_info_and_addr.1(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_5
LBB0_1:
	leaq	-80(%rbp), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_drm_get_format_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_3:
	movq	_ROTATION_ANGLE_0@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movl	$1, (%rbx)
	movq	_PLANE_STEREO_FORMAT_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	$0, 48(%rbx)
	leaq	44(%rbx), %rdx
	movq	%r14, %rdi
	callq	_fill_plane_color_attributes
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movl	40(%rbx), %edx
	movq	32(%rbx), %rcx
	leaq	24(%rbx), %r9
	leaq	20(%rbx), %r10
	leaq	16(%rbx), %rax
	subq	$8, %rsp
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %r8d
	pushq	%r15
	pushq	%rax
	pushq	%r10
	callq	_fill_plane_buffer_attributes
	addq	$32, %rsp
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	leaq	12(%rbx), %rsi
	leaq	8(%rbx), %rdx
	addq	$4, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rcx
	callq	_fill_blending_from_plane_state
	xorl	%r12d, %r12d
LBB0_8:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SURFACE_PIXEL_FORMAT_GRPH_PALETA_256_COLORS,4,2 ## @SURFACE_PIXEL_FORMAT_GRPH_PALETA_256_COLORS
	.comm	_SURFACE_PIXEL_FORMAT_GRPH_RGB565,4,2 ## @SURFACE_PIXEL_FORMAT_GRPH_RGB565
	.comm	_SURFACE_PIXEL_FORMAT_GRPH_ARGB8888,4,2 ## @SURFACE_PIXEL_FORMAT_GRPH_ARGB8888
	.comm	_SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010,4,2 ## @SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010
	.comm	_SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010,4,2 ## @SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010
	.comm	_SURFACE_PIXEL_FORMAT_GRPH_ABGR8888,4,2 ## @SURFACE_PIXEL_FORMAT_GRPH_ABGR8888
	.comm	_SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr,4,2 ## @SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr
	.comm	_SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb,4,2 ## @SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported screen format %s\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRM_MODE_ROTATE_MASK,4,2       ## @DRM_MODE_ROTATE_MASK
	.comm	_ROTATION_ANGLE_0,8,3           ## @ROTATION_ANGLE_0
	.comm	_ROTATION_ANGLE_90,8,3          ## @ROTATION_ANGLE_90
	.comm	_ROTATION_ANGLE_180,8,3         ## @ROTATION_ANGLE_180
	.comm	_ROTATION_ANGLE_270,8,3         ## @ROTATION_ANGLE_270
	.comm	_PLANE_STEREO_FORMAT_NONE,4,2   ## @PLANE_STEREO_FORMAT_NONE
	.no_dead_strip	_fill_dc_plane_info_and_addr
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.fill_dc_plane_info_and_addr
l_switch.table.fill_dc_plane_info_and_addr:
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ARGB8888
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ABGR8888
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_RGB565
	.quad	_SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr
	.quad	_SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_PALETA_256_COLORS
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ARGB8888
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ABGR8888
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010

	.p2align	3                               ## @switch.table.fill_dc_plane_info_and_addr.1
l_switch.table.fill_dc_plane_info_and_addr.1:
	.quad	_ROTATION_ANGLE_90
	.quad	_ROTATION_ANGLE_270
	.quad	_ROTATION_ANGLE_180

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_dc_plane_info_and_addr
_fill_dc_plane_info_and_addr:           ; @fill_dc_plane_info_and_addr
	.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	x22, x4
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x23, x0
	ldr	x25, [x1, #8]
	mov	x0, x25
	bl	_to_amdgpu_framebuffer
	mov	x24, x0
	mov	x0, x20
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	ldr	x8, [x25]
	ldr	w0, [x8]
	sub	w8, w0, #132
	cmp	w8, #12
	b.hs	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.fill_dc_plane_info_and_addr@PAGE
Lloh1:
	add	x9, x9, l_switch.table.fill_dc_plane_info_and_addr@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w1, [x8]
	str	w1, [x20, #40]
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _DRM_MODE_ROTATE_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DRM_MODE_ROTATE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	and	w8, w9, w8
	sub	w8, w8, #128
	cmp	w8, #2
	b.hi	LBB0_4
; %bb.2:
Lloh5:
	adrp	x9, l_switch.table.fill_dc_plane_info_and_addr.1@PAGE
Lloh6:
	add	x9, x9, l_switch.table.fill_dc_plane_info_and_addr.1@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_5
LBB0_3:
	add	x1, sp, #8
	bl	_drm_get_format_name
	mov	x1, x0
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_4:
Lloh12:
	adrp	x8, _ROTATION_ANGLE_0@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ROTATION_ANGLE_0@GOTPAGEOFF]
LBB0_5:
	ldr	x8, [x8]
	str	x8, [x20, #32]
	mov	w8, #1
	str	w8, [x20]
Lloh14:
	adrp	x8, _PLANE_STEREO_FORMAT_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PLANE_STEREO_FORMAT_NONE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x20, #56]
	str	xzr, [x20, #48]
	add	x2, x20, #44
	mov	x0, x19
	bl	_fill_plane_color_attributes
	cbnz	w0, LBB0_8
; %bb.6:
	ldr	w2, [x20, #40]
	ldr	x3, [x20, #32]
	add	x5, x20, #24
	add	x6, x20, #20
	add	x7, x20, #16
	str	x22, [sp]
	mov	x0, x23
	mov	x1, x24
	mov	x4, x21
	bl	_fill_plane_buffer_attributes
	cbnz	w0, LBB0_8
; %bb.7:
	add	x1, x20, #12
	add	x2, x20, #8
	add	x3, x20, #4
	mov	x0, x19
	bl	_fill_blending_from_plane_state
	mov	w0, #0
LBB0_8:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SURFACE_PIXEL_FORMAT_GRPH_PALETA_256_COLORS,4,2 ; @SURFACE_PIXEL_FORMAT_GRPH_PALETA_256_COLORS
	.comm	_SURFACE_PIXEL_FORMAT_GRPH_RGB565,4,2 ; @SURFACE_PIXEL_FORMAT_GRPH_RGB565
	.comm	_SURFACE_PIXEL_FORMAT_GRPH_ARGB8888,4,2 ; @SURFACE_PIXEL_FORMAT_GRPH_ARGB8888
	.comm	_SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010,4,2 ; @SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010
	.comm	_SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010,4,2 ; @SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010
	.comm	_SURFACE_PIXEL_FORMAT_GRPH_ABGR8888,4,2 ; @SURFACE_PIXEL_FORMAT_GRPH_ABGR8888
	.comm	_SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr,4,2 ; @SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr
	.comm	_SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb,4,2 ; @SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported screen format %s\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRM_MODE_ROTATE_MASK,4,2       ; @DRM_MODE_ROTATE_MASK
	.comm	_ROTATION_ANGLE_0,8,3           ; @ROTATION_ANGLE_0
	.comm	_ROTATION_ANGLE_90,8,3          ; @ROTATION_ANGLE_90
	.comm	_ROTATION_ANGLE_180,8,3         ; @ROTATION_ANGLE_180
	.comm	_ROTATION_ANGLE_270,8,3         ; @ROTATION_ANGLE_270
	.comm	_PLANE_STEREO_FORMAT_NONE,4,2   ; @PLANE_STEREO_FORMAT_NONE
	.no_dead_strip	_fill_dc_plane_info_and_addr
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.fill_dc_plane_info_and_addr
l_switch.table.fill_dc_plane_info_and_addr:
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ARGB8888
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ABGR8888
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_RGB565
	.quad	_SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr
	.quad	_SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_PALETA_256_COLORS
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ARGB8888
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ABGR8888
	.quad	_SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010

	.p2align	3                               ; @switch.table.fill_dc_plane_info_and_addr.1
l_switch.table.fill_dc_plane_info_and_addr.1:
	.quad	_ROTATION_ANGLE_90
	.quad	_ROTATION_ANGLE_270
	.quad	_ROTATION_ANGLE_180

.subsections_via_symbols
