	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g4x_fixup_plane
_g4x_fixup_plane:                       ## @g4x_fixup_plane
	.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
	movl	%esi, %ebx
	movq	%rdi, %r12
	movl	%esi, %edi
	callq	_CURCNTR
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %r15d
	movq	_CURSOR_MODE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_2
## %bb.1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_FW_BLC_SELF@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_I915_READ
	movl	%eax, %r14d
	movl	(%r13), %edi
	movq	_FW_BLC_SELF_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	andl	%r14d, %esi
	callq	_I915_WRITE
	movl	%ebx, %edi
	callq	_CURCNTR
	movq	_CURSOR_MODE_64_ARGB_AX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_intel_wait_for_vblank
	movl	%ebx, %edi
	callq	_CURCNTR
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_I915_WRITE
	movl	%ebx, %edi
	callq	_CURBASE
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_CURBASE
	movl	%eax, %edi
	callq	_I915_READ
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	movl	(%r13), %edi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CURSOR_MODE,4,2                ## @CURSOR_MODE
	.comm	_FW_BLC_SELF,4,2                ## @FW_BLC_SELF
	.comm	_FW_BLC_SELF_EN,4,2             ## @FW_BLC_SELF_EN
	.comm	_CURSOR_MODE_64_ARGB_AX,4,2     ## @CURSOR_MODE_64_ARGB_AX
	.no_dead_strip	_g4x_fixup_plane
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function g4x_fixup_plane
_g4x_fixup_plane:                       ; @g4x_fixup_plane
	.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	x22, x0
	mov	x0, x1
	bl	_CURCNTR
	bl	_I915_READ
Lloh0:
	adrp	x8, _CURSOR_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CURSOR_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	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_2:
	mov	x21, x0
Lloh3:
	adrp	x23, _FW_BLC_SELF@GOTPAGE
Lloh4:
	ldr	x23, [x23, _FW_BLC_SELF@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_I915_READ
	mov	x20, x0
	ldr	w0, [x23]
Lloh5:
	adrp	x8, _FW_BLC_SELF_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FW_BLC_SELF_EN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w1, w20, w8
	bl	_I915_WRITE
	mov	x0, x19
	bl	_CURCNTR
Lloh8:
	adrp	x8, _CURSOR_MODE_64_ARGB_AX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CURSOR_MODE_64_ARGB_AX@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_I915_WRITE
	ldr	w0, [x22]
	mov	x1, x19
	bl	_intel_wait_for_vblank
	mov	x0, x19
	bl	_CURCNTR
	mov	x1, x21
	bl	_I915_WRITE
	mov	x0, x19
	bl	_CURBASE
	mov	x21, x0
	mov	x0, x19
	bl	_CURBASE
	bl	_I915_READ
	mov	x1, x0
	mov	x0, x21
	bl	_I915_WRITE
	ldr	w0, [x23]
	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	_I915_WRITE
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CURSOR_MODE,4,2                ; @CURSOR_MODE
	.comm	_FW_BLC_SELF,4,2                ; @FW_BLC_SELF
	.comm	_FW_BLC_SELF_EN,4,2             ; @FW_BLC_SELF_EN
	.comm	_CURSOR_MODE_64_ARGB_AX,4,2     ; @CURSOR_MODE_64_ARGB_AX
	.no_dead_strip	_g4x_fixup_plane
.subsections_via_symbols
