	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mga_crtc_cursor_set            ## -- Begin function mga_crtc_cursor_set
	.p2align	4, 0x90
_mga_crtc_cursor_set:                   ## @mga_crtc_cursor_set
	.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	$328, %rsp                      ## imm = 0x148
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	8(%rax), %r14
	movq	16(%r14), %r13
	testq	%r13, %r13
	je	LBB0_5
## %bb.1:
	movq	8(%r14), %r12
	testq	%r12, %r12
	je	LBB0_5
## %bb.2:
	movl	%ecx, %r15d
	movl	%r8d, -328(%rbp)                ## 4-byte Spill
	movq	%rsi, -336(%rbp)                ## 8-byte Spill
	movl	%edx, -344(%rbp)                ## 4-byte Spill
	movq	%rax, -320(%rbp)                ## 8-byte Spill
	movq	(%r14), %rbx
	testq	%rbx, %rbx
	setne	%al
	cmpq	%rbx, %r13
	setne	%cl
	cmpq	%rbx, %r12
	setne	%dl
	andb	%al, %cl
	andb	%dl, %cl
	movzbl	%cl, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%r15d, %r15d
	jmp	LBB0_6
LBB0_5:
	movq	_MGA_CURPOSXL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_WREG8
	movq	_MGA_CURPOSXH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG8
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
LBB0_6:
	subl	(%rax), %r15d
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_47
## %bb.8:
	movl	%r15d, %eax
	addq	$328, %rsp                      ## imm = 0x148
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%rbx, -352(%rbp)                ## 8-byte Spill
	movq	%r14, -360(%rbp)                ## 8-byte Spill
	movq	%r12, -312(%rbp)                ## 8-byte Spill
	movq	-336(%rbp), %rdi                ## 8-byte Reload
	testq	%rdi, %rdi
	movl	-344(%rbp), %esi                ## 4-byte Reload
	je	LBB0_16
## %bb.10:
	testl	%esi, %esi
	je	LBB0_16
## %bb.11:
	cmpl	$64, %r15d
	jne	LBB0_17
## %bb.12:
	cmpl	$64, -328(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_17
## %bb.13:
	cmpq	-352(%rbp), %r13                ## 8-byte Folded Reload
	movq	-312(%rbp), %rax                ## 8-byte Reload
	cmovneq	%r13, %rax
	movq	%rax, -312(%rbp)                ## 8-byte Spill
	callq	_drm_gem_object_lookup
	testq	%rax, %rax
	je	LBB0_18
## %bb.14:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_drm_gem_vram_of_gem
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_drm_gem_vram_pin
	testl	%eax, %eax
	je	LBB0_19
## %bb.15:
	movl	%eax, %r15d
	movq	-320(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_43
LBB0_16:
	movq	-360(%rbp), %rdi                ## 8-byte Reload
	callq	_mga_hide_cursor
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_17:
	movq	_MGA_CURPOSXL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_WREG8
	movq	_MGA_CURPOSXH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG8
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_18:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_19:
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_drm_gem_vram_kmap
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	-320(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_42
LBB0_21:
	movq	_DRM_GEM_VRAM_PL_FLAG_VRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-312(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rdi
	callq	_drm_gem_vram_pin
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:
	movl	%eax, %r15d
	movq	-320(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_41
LBB0_23:
	movq	%r12, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_drm_gem_vram_kmap
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	-320(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_40
LBB0_25:
	movq	%r15, -336(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	callq	_drm_gem_vram_offset
	movq	%rax, %r15
	testq	%rax, %rax
	js	LBB0_35
## %bb.26:
	movq	%rbx, -328(%rbp)                ## 8-byte Spill
	leaq	-112(%rbp), %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	$-4, %r12
	movq	%r13, %rbx
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_ioread32
	cmpl	$16777216, %eax                 ## imm = 0x1000000
	jae	LBB0_36
## %bb.28:                              ##   in Loop: Header=BB0_27 Depth=1
	addq	$4, %r12
	addq	$16, %rbx
	cmpq	$16380, %r12                    ## imm = 0x3FFC
	jb	LBB0_27
## %bb.29:
	xorl	%r12d, %r12d
	leaq	-304(%rbp), %rbx
	jmp	LBB0_31
LBB0_30:                                ##   in Loop: Header=BB0_31 Depth=1
	leaq	(%r12,%r12,2), %rdi
	shlq	$6, %rdi
	addq	-336(%rbp), %rdi                ## 8-byte Folded Reload
	leaq	-304(%rbp), %rbx
	movq	%rbx, %rsi
	movl	$48, %edx
	callq	_memcpy_toio
	incq	%r12
	movq	-344(%rbp), %r13                ## 8-byte Reload
	addq	$1024, %r13                     ## imm = 0x400
	cmpq	$64, %r12
	je	LBB0_44
LBB0_31:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_33 Depth 2
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	%r13, -344(%rbp)                ## 8-byte Spill
	xorl	%ebx, %ebx
	jmp	LBB0_33
LBB0_32:                                ##   in Loop: Header=BB0_33 Depth=2
	incq	%rbx
	addq	$16, %r13
	cmpq	$64, %rbx
	je	LBB0_30
LBB0_33:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	callq	_ioread32
	cmpl	$16777215, %eax                 ## imm = 0xFFFFFF
	ja	LBB0_32
## %bb.34:                              ##   in Loop: Header=BB0_33 Depth=2
	movl	%ebx, %ecx
	andb	$7, %cl
	movl	$128, %eax
	shrl	%cl, %eax
	movl	%ebx, %ecx
	shrl	$3, %ecx
	movl	$47, %edx
	subl	%ecx, %edx
	orl	%eax, -304(%rbp,%rdx,4)
	jmp	LBB0_32
LBB0_35:
	movq	-320(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rdi
	leaq	L_.str.4(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_39
LBB0_36:
	movq	_warn_transparent@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_38
## %bb.37:
	movq	-320(%rbp), %rbx                ## 8-byte Reload
	movq	(%rbx), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_info
	movq	(%rbx), %rdi
	leaq	L_.str.6(%rip), %rsi
	callq	_dev_info
	movl	$0, (%r15)
LBB0_38:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	-328(%rbp), %rbx                ## 8-byte Reload
LBB0_39:
	movq	-312(%rbp), %rdi                ## 8-byte Reload
	callq	_drm_gem_vram_kunmap
LBB0_40:
	movq	-312(%rbp), %rdi                ## 8-byte Reload
	callq	_drm_gem_vram_unpin
LBB0_41:
	movq	%rbx, %rdi
	callq	_drm_gem_vram_kunmap
LBB0_42:
	movq	%rbx, %rdi
	callq	_drm_gem_vram_unpin
LBB0_43:
	movq	%r14, %rdi
	callq	_drm_gem_object_put_unlocked
	jmp	LBB0_7
LBB0_44:
	movq	_MGA1064_CURSOR_BASE_ADR_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %eax
	shrl	$10, %eax
	movzbl	%al, %esi
	callq	_WREG_DAC
	movq	_MGA1064_CURSOR_BASE_ADR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shrl	$18, %r15d
	andl	$63, %r15d
	movl	%r15d, %esi
	callq	_WREG_DAC
	movq	_MGA1064_CURSOR_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$4, %esi
	callq	_WREG_DAC
	movq	-352(%rbp), %rdi                ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_46
## %bb.45:
	callq	_drm_gem_vram_unpin
LBB0_46:
	movq	-312(%rbp), %rdi                ## 8-byte Reload
	movq	-360(%rbp), %rax                ## 8-byte Reload
	movq	%rdi, (%rax)
	callq	_drm_gem_vram_kunmap
	movq	-328(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_drm_gem_vram_kunmap
	movq	%rbx, %rdi
	callq	_drm_gem_vram_unpin
	movq	%r14, %rdi
	callq	_drm_gem_object_put_unlocked
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_47:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MGA_CURPOSXL,4,2               ## @MGA_CURPOSXL
	.comm	_MGA_CURPOSXH,4,2               ## @MGA_CURPOSXH
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOENT,4,2                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to lock user bo\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to kmap user buffer updates\n"

	.comm	_DRM_GEM_VRAM_PL_FLAG_VRAM,4,2  ## @DRM_GEM_VRAM_PL_FLAG_VRAM
L_.str.2:                               ## @.str.2
	.asciz	"failed to pin cursor buffer: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to kmap cursor updates: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to get cursor scanout address: %d\n"

	.comm	_warn_transparent,4,2           ## @warn_transparent
L_.str.5:                               ## @.str.5
	.asciz	"Video card doesn't support cursors with partial transparency.\n"

L_.str.6:                               ## @.str.6
	.asciz	"Not enabling hardware cursor.\n"

	.comm	_warn_palette,4,2               ## @warn_palette
	.comm	_MGA1064_CURSOR_BASE_ADR_LOW,4,2 ## @MGA1064_CURSOR_BASE_ADR_LOW
	.comm	_MGA1064_CURSOR_BASE_ADR_HI,4,2 ## @MGA1064_CURSOR_BASE_ADR_HI
	.comm	_MGA1064_CURSOR_CTL,4,2         ## @MGA1064_CURSOR_CTL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mga_crtc_cursor_set            ; -- Begin function mga_crtc_cursor_set
	.p2align	2
_mga_crtc_cursor_set:                   ; @mga_crtc_cursor_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #416
	.cfi_def_cfa_offset 416
	stp	x28, x27, [sp, #320]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #336]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #352]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #368]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #384]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #400]            ; 16-byte Folded Spill
	add	x29, sp, #400
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	ldr	x28, [x0]
	ldr	x22, [x28, #8]
	ldp	x26, x25, [x22, #8]
	cmp	x25, #0
	ccmp	x26, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MGA_CURPOSXL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MGA_CURPOSXL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG8
Lloh6:
	adrp	x8, _MGA_CURPOSXH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MGA_CURPOSXH@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG8
	b	LBB0_3
LBB0_2:
	mov	x21, x4
	mov	x24, x3
	mov	x19, x2
	mov	x20, x1
	ldr	x23, [x22]
	cmp	x23, #0
	ccmp	x25, x23, #4, ne
	ccmp	x26, x23, #4, ne
	cset	w0, ne
	bl	_WARN_ON
	cbz	x0, LBB0_7
LBB0_3:
Lloh9:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_5:
	ldur	x8, [x29, #-96]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_45
; %bb.6:
	mov	x0, x24
	ldp	x29, x30, [sp, #400]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #384]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #368]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #352]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #336]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #320]            ; 16-byte Folded Reload
	add	sp, sp, #416
	ret
LBB0_7:
	cbz	x20, LBB0_14
; %bb.8:
	cbz	w19, LBB0_14
; %bb.9:
	cmp	w24, #64
	b.ne	LBB0_15
; %bb.10:
	cmp	w21, #64
	b.ne	LBB0_15
; %bb.11:
	cmp	x25, x23
	csel	x25, x26, x25, eq
	mov	x0, x20
	mov	x1, x19
	bl	_drm_gem_object_lookup
	cbz	x0, LBB0_16
; %bb.12:
	mov	x19, x0
	bl	_drm_gem_vram_of_gem
	mov	x21, x0
	mov	w1, #0
	bl	_drm_gem_vram_pin
	cbz	w0, LBB0_17
; %bb.13:
	mov	x24, x0
	ldr	x0, [x28]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_41
LBB0_14:
	mov	x0, x22
	bl	_mga_hide_cursor
	mov	w24, #0
	b	LBB0_5
LBB0_15:
Lloh16:
	adrp	x8, _MGA_CURPOSXL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MGA_CURPOSXL@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG8
Lloh19:
	adrp	x8, _MGA_CURPOSXH@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MGA_CURPOSXH@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG8
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_16:
Lloh24:
	adrp	x8, _ENOENT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_4
LBB0_17:
	mov	x0, x21
	mov	w1, #1
	mov	x2, #0
	bl	_drm_gem_vram_kmap
	mov	x27, x0
	bl	_IS_ERR
	cbz	x0, LBB0_19
; %bb.18:
	mov	x0, x27
	bl	_PTR_ERR
	mov	x24, x0
	ldr	x0, [x28]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_40
LBB0_19:
Lloh28:
	adrp	x8, _DRM_GEM_VRAM_PL_FLAG_VRAM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DRM_GEM_VRAM_PL_FLAG_VRAM@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x25
	bl	_drm_gem_vram_pin
	cbz	w0, LBB0_21
; %bb.20:
	mov	x24, x0
	ldr	x0, [x28]
	str	x24, [sp]
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	b	LBB0_39
LBB0_21:
	mov	x0, x25
	mov	w1, #1
	mov	x2, #0
	bl	_drm_gem_vram_kmap
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_23
; %bb.22:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x24, x0
	ldr	x0, [x28]
	str	x24, [sp]
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	b	LBB0_38
LBB0_23:
	mov	x0, x25
	bl	_drm_gem_vram_offset
	mov	x24, x0
	tbnz	x0, #63, LBB0_33
; %bb.24:
	str	x20, [sp, #32]                  ; 8-byte Folded Spill
	sub	x0, x29, #160
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	mov	x20, #-4
	str	x27, [sp, #40]                  ; 8-byte Folded Spill
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x27
	bl	_ioread32
	lsr	w8, w0, #24
	cbnz	w8, LBB0_34
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	add	x20, x20, #4
	add	x27, x27, #16
	lsr	x8, x20, #2
	cmp	x8, #4095
	b.lo	LBB0_25
; %bb.27:
	stp	x25, x21, [sp, #16]             ; 16-byte Folded Spill
	mov	x28, #0
	add	x26, sp, #48
	mov	w21, #128
	mov	w20, #47
	ldr	x27, [sp, #40]                  ; 8-byte Folded Reload
	b	LBB0_29
LBB0_28:                                ;   in Loop: Header=BB0_29 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	mov	w9, #192
	madd	x0, x28, x9, x8
	add	x1, sp, #48
	mov	w2, #48
	bl	_memcpy_toio
	add	x28, x28, #1
	ldr	x27, [sp, #40]                  ; 8-byte Folded Reload
	add	x27, x27, #1024
	cmp	x28, #64
	b.eq	LBB0_42
LBB0_29:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_31 Depth 2
	add	x0, sp, #48
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	mov	x25, #0
	str	x27, [sp, #40]                  ; 8-byte Folded Spill
	b	LBB0_31
LBB0_30:                                ;   in Loop: Header=BB0_31 Depth=2
	add	x25, x25, #1
	add	x27, x27, #16
	cmp	x25, #64
	b.eq	LBB0_28
LBB0_31:                                ;   Parent Loop BB0_29 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x27
	bl	_ioread32
	lsr	w8, w0, #24
	cbnz	w8, LBB0_30
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=2
	and	w8, w25, #0x7
	lsr	w8, w21, w8
	sub	w9, w20, w25, lsr #3
	lsl	x9, x9, #2
	ldr	w10, [x26, x9]
	orr	w8, w10, w8
	str	w8, [x26, x9]
	b	LBB0_30
LBB0_33:
	ldr	x0, [x28]
	mov	x8, x24
	str	x8, [sp]
Lloh35:
	adrp	x1, l_.str.4@PAGE
Lloh36:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	b	LBB0_37
LBB0_34:
Lloh37:
	adrp	x20, _warn_transparent@GOTPAGE
Lloh38:
	ldr	x20, [x20, _warn_transparent@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_36
; %bb.35:
	ldr	x0, [x28]
Lloh39:
	adrp	x1, l_.str.5@PAGE
Lloh40:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_info
	ldr	x0, [x28]
Lloh41:
	adrp	x1, l_.str.6@PAGE
Lloh42:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_info
	str	wzr, [x20]
LBB0_36:
Lloh43:
	adrp	x8, _EINVAL@GOTPAGE
Lloh44:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_37:
	mov	x0, x25
	bl	_drm_gem_vram_kunmap
LBB0_38:
	mov	x0, x25
	bl	_drm_gem_vram_unpin
LBB0_39:
	mov	x0, x21
	bl	_drm_gem_vram_kunmap
LBB0_40:
	mov	x0, x21
	bl	_drm_gem_vram_unpin
LBB0_41:
	mov	x0, x19
	bl	_drm_gem_object_put_unlocked
	b	LBB0_5
LBB0_42:
Lloh46:
	adrp	x8, _MGA1064_CURSOR_BASE_ADR_LOW@GOTPAGE
Lloh47:
	ldr	x8, [x8, _MGA1064_CURSOR_BASE_ADR_LOW@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
	ubfx	w1, w24, #10, #8
	bl	_WREG_DAC
Lloh49:
	adrp	x8, _MGA1064_CURSOR_BASE_ADR_HI@GOTPAGE
Lloh50:
	ldr	x8, [x8, _MGA1064_CURSOR_BASE_ADR_HI@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	ubfx	w1, w24, #18, #6
	bl	_WREG_DAC
Lloh52:
	adrp	x8, _MGA1064_CURSOR_CTL@GOTPAGE
Lloh53:
	ldr	x8, [x8, _MGA1064_CURSOR_CTL@GOTPAGEOFF]
Lloh54:
	ldr	w0, [x8]
	mov	w1, #4
	bl	_WREG_DAC
	cbz	x23, LBB0_44
; %bb.43:
	mov	x0, x23
	bl	_drm_gem_vram_unpin
LBB0_44:
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	str	x0, [x22]
	bl	_drm_gem_vram_kunmap
	ldr	x20, [sp, #24]                  ; 8-byte Folded Reload
	mov	x0, x20
	bl	_drm_gem_vram_kunmap
	mov	x0, x20
	bl	_drm_gem_vram_unpin
	mov	x0, x19
	bl	_drm_gem_object_put_unlocked
	mov	w24, #0
	b	LBB0_5
LBB0_45:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_MGA_CURPOSXL,4,2               ; @MGA_CURPOSXL
	.comm	_MGA_CURPOSXH,4,2               ; @MGA_CURPOSXH
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOENT,4,2                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to lock user bo\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to kmap user buffer updates\n"

	.comm	_DRM_GEM_VRAM_PL_FLAG_VRAM,4,2  ; @DRM_GEM_VRAM_PL_FLAG_VRAM
l_.str.2:                               ; @.str.2
	.asciz	"failed to pin cursor buffer: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to kmap cursor updates: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to get cursor scanout address: %d\n"

	.comm	_warn_transparent,4,2           ; @warn_transparent
l_.str.5:                               ; @.str.5
	.asciz	"Video card doesn't support cursors with partial transparency.\n"

l_.str.6:                               ; @.str.6
	.asciz	"Not enabling hardware cursor.\n"

	.comm	_warn_palette,4,2               ; @warn_palette
	.comm	_MGA1064_CURSOR_BASE_ADR_LOW,4,2 ; @MGA1064_CURSOR_BASE_ADR_LOW
	.comm	_MGA1064_CURSOR_BASE_ADR_HI,4,2 ; @MGA1064_CURSOR_BASE_ADR_HI
	.comm	_MGA1064_CURSOR_CTL,4,2         ; @MGA1064_CURSOR_CTL
.subsections_via_symbols
