	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psb_intel_cursor_init
_psb_intel_cursor_init:                 ## @psb_intel_cursor_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	(%rdi), %r14
	movq	_CURACNTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	_CURBCNTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	_CURCCNTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	_CURABASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_CURBBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_CURCBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	8(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leal	(,%r8,4), %esi
	leaq	L_.str(%rip), %rdx
	movl	$1, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_psb_gtt_alloc_range
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, 8(%rbx)
	movq	(%rax), %rax
	addq	(%r14), %rax
	movq	%rax, 16(%rbx)
	jmp	LBB0_4
LBB0_3:
	movq	$0, 8(%rbx)
LBB0_4:
	movq	(%rbx), %rax
	movl	-36(%rbp,%rax,4), %edi
	xorl	%esi, %esi
	callq	_REG_WRITE
	movq	(%rbx), %rax
	movl	-48(%rbp,%rax,4), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_5
## %bb.6:
	xorl	%esi, %esi
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_REG_WRITE                      ## TAILCALL
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CURACNTR,4,2                   ## @CURACNTR
	.comm	_CURBCNTR,4,2                   ## @CURBCNTR
	.comm	_CURCCNTR,4,2                   ## @CURCCNTR
	.comm	_CURABASE,4,2                   ## @CURABASE
	.comm	_CURBBASE,4,2                   ## @CURBBASE
	.comm	_CURCBASE,4,2                   ## @CURCBASE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cursor"

	.no_dead_strip	_psb_intel_cursor_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psb_intel_cursor_init
_psb_intel_cursor_init:                 ; @psb_intel_cursor_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x20, [x0]
Lloh3:
	adrp	x8, _CURACNTR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CURACNTR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _CURBCNTR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CURBCNTR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #12]
Lloh9:
	adrp	x8, _CURCCNTR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CURCCNTR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [sp, #20]
Lloh12:
	adrp	x8, _CURABASE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CURABASE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _CURBBASE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CURBBASE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	stp	w8, w9, [sp]
Lloh18:
	adrp	x8, _CURCBASE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CURCBASE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh21:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh23:
	ldr	w4, [x8]
	lsl	w1, w4, #2
Lloh24:
	adrp	x2, l_.str@PAGE
Lloh25:
	add	x2, x2, l_.str@PAGEOFF
	mov	w3, #1
	bl	_psb_gtt_alloc_range
	cbz	x0, LBB0_3
; %bb.2:
	str	x0, [x19, #8]
	ldr	x8, [x20]
	ldr	x9, [x0]
	add	x8, x9, x8
	str	x8, [x19, #16]
	b	LBB0_4
LBB0_3:
	str	xzr, [x19, #8]
LBB0_4:
	ldr	x8, [x19]
	add	x9, sp, #12
	ldr	w0, [x9, x8, lsl #2]
	mov	w1, #0
	bl	_REG_WRITE
	ldr	x8, [x19]
	mov	x9, sp
	ldr	w0, [x9, x8, lsl #2]
	ldr	x8, [sp, #24]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	w1, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_REG_WRITE
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_CURACNTR,4,2                   ; @CURACNTR
	.comm	_CURBCNTR,4,2                   ; @CURBCNTR
	.comm	_CURCCNTR,4,2                   ; @CURCCNTR
	.comm	_CURABASE,4,2                   ; @CURABASE
	.comm	_CURBBASE,4,2                   ; @CURBBASE
	.comm	_CURCBASE,4,2                   ; @CURCBASE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cursor"

	.no_dead_strip	_psb_intel_cursor_init
.subsections_via_symbols
