	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skl_ddb_get_hw_plane_state
_skl_ddb_get_hw_plane_state:            ## @skl_ddb_get_hw_plane_state
	.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	%rcx, %r14
	movl	%esi, %r13d
	movq	%rdi, %r12
	movq	_PLANE_CURSOR@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	%r13d, %edi
	callq	_CUR_BUF_CFG
	movl	%eax, %edi
	callq	_I915_READ
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	jmp	LBB0_7
LBB0_2:
	movl	%edx, %ebx
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%r13d, %edi
	movl	%edx, %esi
	callq	_PLANE_CTL
	movl	%eax, %edi
	callq	_I915_READ
	movq	_PLANE_CTL_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.4:
	movq	_PLANE_CTL_FORMAT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	%eax, %edi
	movq	_PLANE_CTL_ORDER_RGBX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	%eax, %esi
	movq	_PLANE_CTL_ALPHA_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, %edx
	callq	_skl_format_to_fourcc
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
LBB0_3:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_5:
	movq	%r12, %rdi
	callq	_INTEL_GEN
	movl	%eax, %r14d
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_PLANE_BUF_CFG
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %r15d
	cmpl	$11, %r14d
	jl	LBB0_8
## %bb.6:
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	jmp	LBB0_7
LBB0_8:
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_PLANE_NV12_BUF_CFG
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_is_planar_yuv_format
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_swap
LBB0_10:
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_skl_ddb_entry_init_from_hw
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_skl_ddb_entry_init_from_hw     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PLANE_CURSOR,4,2               ## @PLANE_CURSOR
	.comm	_PLANE_CTL_ENABLE,4,2           ## @PLANE_CTL_ENABLE
	.comm	_PLANE_CTL_FORMAT_MASK,4,2      ## @PLANE_CTL_FORMAT_MASK
	.comm	_PLANE_CTL_ORDER_RGBX,4,2       ## @PLANE_CTL_ORDER_RGBX
	.comm	_PLANE_CTL_ALPHA_MASK,4,2       ## @PLANE_CTL_ALPHA_MASK
	.no_dead_strip	_skl_ddb_get_hw_plane_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skl_ddb_get_hw_plane_state
_skl_ddb_get_hw_plane_state:            ; @skl_ddb_get_hw_plane_state
	.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	x19, x3
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PLANE_CURSOR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PLANE_CURSOR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_CUR_BUF_CFG
	bl	_I915_READ
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	b	LBB0_10
LBB0_2:
	mov	x21, x4
	mov	x23, x2
	mov	x0, x22
	mov	x1, x2
	bl	_PLANE_CTL
	bl	_I915_READ
Lloh3:
	adrp	x8, _PLANE_CTL_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PLANE_CTL_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _PLANE_CTL_FORMAT_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PLANE_CTL_FORMAT_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh9:
	adrp	x9, _PLANE_CTL_ORDER_RGBX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PLANE_CTL_ORDER_RGBX@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w1, w9, w0
Lloh12:
	adrp	x9, _PLANE_CTL_ALPHA_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PLANE_CTL_ALPHA_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w2, w9, w0
	mov	x0, x8
	bl	_skl_format_to_fourcc
	mov	x24, x0
	b	LBB0_5
LBB0_4:
	mov	w24, #0
LBB0_5:
	mov	x0, x20
	bl	_INTEL_GEN
	mov	x26, x0
	mov	x0, x22
	mov	x1, x23
	bl	_PLANE_BUF_CFG
	bl	_I915_READ
	mov	x25, x0
	cmp	w26, #11
	b.lt	LBB0_7
; %bb.6:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x25
	b	LBB0_10
LBB0_7:
	mov	x0, x22
	mov	x1, x23
	bl	_PLANE_NV12_BUF_CFG
	bl	_I915_READ
	mov	x22, x0
	mov	x0, x24
	bl	_is_planar_yuv_format
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x25
	mov	x1, x22
	bl	_swap
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x25
	bl	_skl_ddb_entry_init_from_hw
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
LBB0_10:
	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
	b	_skl_ddb_entry_init_from_hw
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PLANE_CURSOR,4,2               ; @PLANE_CURSOR
	.comm	_PLANE_CTL_ENABLE,4,2           ; @PLANE_CTL_ENABLE
	.comm	_PLANE_CTL_FORMAT_MASK,4,2      ; @PLANE_CTL_FORMAT_MASK
	.comm	_PLANE_CTL_ORDER_RGBX,4,2       ; @PLANE_CTL_ORDER_RGBX
	.comm	_PLANE_CTL_ALPHA_MASK,4,2       ; @PLANE_CTL_ALPHA_MASK
	.no_dead_strip	_skl_ddb_get_hw_plane_state
.subsections_via_symbols
