	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hgsmi_update_pointer_shape     ## -- Begin function hgsmi_update_pointer_shape
	.p2align	4, 0x90
_hgsmi_update_pointer_shape:            ## @hgsmi_update_pointer_shape
	.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
	movl	%r9d, %ebx
	movl	%r8d, %r12d
	movl	%esi, %r13d
	movq	_VBOX_MOUSE_POINTER_SHAPE@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_1
## %bb.2:
	leal	7(%r12), %eax
	leal	14(%r12), %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$3, %esi
	imull	%ebx, %esi
	addl	$3, %esi
	andl	$-4, %esi
	movl	%r12d, %eax
	imull	%ebx, %eax
	leal	(%rsi,%rax,4), %r14d
	cmpl	24(%rbp), %r14d
	jle	LBB0_5
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_5:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	_VBOX_MOUSE_POINTER_VISIBLE@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
LBB0_6:
	leal	28(%r14), %esi
	movq	_HGSMI_CH_VBVA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_VBVA_MOUSE_POINTER_SHAPE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_hgsmi_buffer_alloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r15
	movl	$128, (%rax)
	movl	%r13d, 4(%rax)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r15)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 12(%r15)
	movl	%r12d, 16(%r15)
	movl	%ebx, 20(%r15)
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.9:
	movq	16(%rbp), %rsi
	movl	24(%r15), %edi
	movl	%r14d, %edx
	callq	_memcpy
LBB0_10:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_hgsmi_buffer_submit
	movl	(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_11
## %bb.12:
	cmpl	$130, %eax
	je	LBB0_15
## %bb.13:
	cmpl	$129, %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jne	LBB0_16
## %bb.14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_11:
	xorl	%ebx, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_15:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_17:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movq	%r15, %rsi
	callq	_hgsmi_buffer_free
LBB0_19:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VBOX_MOUSE_POINTER_SHAPE,4,2   ## @VBOX_MOUSE_POINTER_SHAPE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VBOX_MOUSE_POINTER_VISIBLE,4,2 ## @VBOX_MOUSE_POINTER_VISIBLE
	.comm	_HGSMI_CH_VBVA,4,2              ## @HGSMI_CH_VBVA
	.comm	_VBVA_MOUSE_POINTER_SHAPE,4,2   ## @VBVA_MOUSE_POINTER_SHAPE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hgsmi_update_pointer_shape     ; -- Begin function hgsmi_update_pointer_shape
	.p2align	2
_hgsmi_update_pointer_shape:            ; @hgsmi_update_pointer_shape
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x6
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _VBOX_MOUSE_POINTER_SHAPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VBOX_MOUSE_POINTER_SHAPE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_3
; %bb.1:
	add	w8, w23, #7
	add	w9, w23, #14
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	orr	w9, wzr, #0x3
	madd	w8, w8, w22, w9
	and	w8, w8, #0xfffffffc
	mul	w9, w23, w22
	add	w27, w8, w9, lsl #2
	cmp	w27, w7
	b.le	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_3:
	mov	w27, #0
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _VBOX_MOUSE_POINTER_VISIBLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VBOX_MOUSE_POINTER_VISIBLE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w26, w8, w26
LBB0_5:
	add	w1, w27, #28
Lloh8:
	adrp	x8, _HGSMI_CH_VBVA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HGSMI_CH_VBVA@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _VBVA_MOUSE_POINTER_SHAPE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VBVA_MOUSE_POINTER_SHAPE@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_hgsmi_buffer_alloc
	cbz	x0, LBB0_12
; %bb.6:
	mov	x21, x0
	mov	w8, #128
	stp	w8, w26, [x0]
	stp	w25, w24, [x0, #8]
	stp	w23, w22, [x0, #16]
	cbz	w27, LBB0_8
; %bb.7:
	ldr	w0, [x21, #24]
	mov	x1, x20
	mov	x2, x27
	bl	_memcpy
LBB0_8:
	mov	x0, x19
	mov	x1, x21
	bl	_hgsmi_buffer_submit
	ldr	w8, [x21]
	cmp	w8, #128
	b.eq	LBB0_14
; %bb.9:
	cmp	w8, #130
	b.eq	LBB0_15
; %bb.10:
	cmp	w8, #129
	b.ne	LBB0_16
; %bb.11:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_17
LBB0_12:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_19
LBB0_14:
	mov	w20, #0
	b	LBB0_18
LBB0_15:
Lloh18:
	adrp	x8, _EBUSY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_18:
	mov	x0, x19
	mov	x1, x21
	bl	_hgsmi_buffer_free
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_VBOX_MOUSE_POINTER_SHAPE,4,2   ; @VBOX_MOUSE_POINTER_SHAPE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VBOX_MOUSE_POINTER_VISIBLE,4,2 ; @VBOX_MOUSE_POINTER_VISIBLE
	.comm	_HGSMI_CH_VBVA,4,2              ; @HGSMI_CH_VBVA
	.comm	_VBVA_MOUSE_POINTER_SHAPE,4,2   ; @VBVA_MOUSE_POINTER_SHAPE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
