	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g4x_sprite_check
_g4x_sprite_check:                      ## @g4x_sprite_check
	.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	%rsi, %r13
	movq	%rdi, %r14
	leaq	4(%rsi), %r12
	movl	12(%rsi), %edi
	callq	_to_intel_plane
	movl	(%rax), %edi
	callq	_to_i915
	movq	%rax, %r15
	movq	_DRM_PLANE_HELPER_NO_SCALING@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	8(%r13), %edi
	callq	_intel_fb_scalable
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_INTEL_GEN
	cmpl	$7, %eax
	jge	LBB0_4
## %bb.3:
	movl	$1048576, %ecx                  ## imm = 0x100000
	movl	$1, %ebx
	jmp	LBB0_5
LBB0_1:
	movl	%ebx, %ecx
	jmp	LBB0_5
LBB0_4:
	movq	%r15, %rdi
	callq	_IS_IVYBRIDGE
	testq	%rax, %rax
	movl	$1, %eax
	cmovel	%ebx, %eax
	movl	$131072, %ecx                   ## imm = 0x20000
	cmovel	%ebx, %ecx
	movl	%eax, %ebx
LBB0_5:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_drm_atomic_helper_check_plane_state
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movq	%r13, %rdi
	callq	_i9xx_check_plane_surface
	testl	%eax, %eax
	je	LBB0_7
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%eax, %eax
	cmpl	$0, (%r12)
	je	LBB0_14
## %bb.8:
	movq	%r13, %rdi
	callq	_intel_plane_check_src_coordinates
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_g4x_sprite_check_scaling
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movq	%r15, %rdi
	callq	_INTEL_GEN
	movq	%r14, %rdi
	movq	%r13, %rsi
	cmpl	$7, %eax
	jl	LBB0_12
## %bb.11:
	callq	_ivb_sprite_ctl
	jmp	LBB0_13
LBB0_12:
	callq	_g4x_sprite_ctl
LBB0_13:
	movl	%eax, (%r13)
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_PLANE_HELPER_NO_SCALING,4,2 ## @DRM_PLANE_HELPER_NO_SCALING
	.no_dead_strip	_g4x_sprite_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function g4x_sprite_check
_g4x_sprite_check:                      ; @g4x_sprite_check
	.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	x19, x1
	mov	x20, x0
	add	x22, x1, #4
	ldr	w0, [x1, #12]
	bl	_to_intel_plane
	ldr	w0, [x0]
	bl	_to_i915
	mov	x21, x0
Lloh0:
	adrp	x8, _DRM_PLANE_HELPER_NO_SCALING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_PLANE_HELPER_NO_SCALING@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	w0, [x19, #8]
	bl	_intel_fb_scalable
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_INTEL_GEN
	cmp	w0, #7
	b.ge	LBB0_4
; %bb.2:
	mov	w3, #1048576
	mov	w23, #1
	b	LBB0_5
LBB0_3:
	mov	x3, x23
	b	LBB0_5
LBB0_4:
	mov	x0, x21
	bl	_IS_IVYBRIDGE
	cmp	x0, #0
	mov	w8, #131072
	csel	w3, w23, w8, eq
	csinc	w23, w23, wzr, eq
LBB0_5:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x23
	mov	w4, #1
	mov	w5, #1
	bl	_drm_atomic_helper_check_plane_state
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_i9xx_check_plane_surface
	cbz	w0, LBB0_8
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
LBB0_8:
	ldr	w8, [x22]
	cbz	w8, LBB0_13
; %bb.9:
	mov	x0, x19
	bl	_intel_plane_check_src_coordinates
	cbnz	w0, LBB0_7
; %bb.10:
	mov	x0, x20
	mov	x1, x19
	bl	_g4x_sprite_check_scaling
	cbnz	w0, LBB0_7
; %bb.11:
	mov	x0, x21
	bl	_INTEL_GEN
	cmp	w0, #7
	b.lt	LBB0_14
; %bb.12:
	mov	x0, x20
	mov	x1, x19
	bl	_ivb_sprite_ctl
	b	LBB0_15
LBB0_13:
	mov	w0, #0
	b	LBB0_7
LBB0_14:
	mov	x0, x20
	mov	x1, x19
	bl	_g4x_sprite_ctl
LBB0_15:
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_PLANE_HELPER_NO_SCALING,4,2 ; @DRM_PLANE_HELPER_NO_SCALING
	.no_dead_strip	_g4x_sprite_check
.subsections_via_symbols
