	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hubp2_cursor_set_position      ## -- Begin function hubp2_cursor_set_position
	.p2align	4, 0x90
_hubp2_cursor_set_position:             ## @hubp2_cursor_set_position
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %rbx
	callq	_TO_DCN20_HUBP
	cmpq	$0, (%rbx)
	je	LBB0_17
## %bb.1:
	movl	(%r13), %eax
	movl	4(%r13), %r10d
	movl	16(%r12), %r9d
	movl	20(%r12), %r8d
	movl	%eax, %r15d
	subl	%r10d, %r15d
	subl	%r9d, %r15d
	movl	8(%r13), %edx
	movl	12(%r13), %ecx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	%edx, %r14d
	subl	%ecx, %r14d
	subl	%r8d, %r14d
	movl	8(%rbx), %esi
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	16(%rbx), %edi
	movq	16(%r13), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rbx
	movq	_ROTATION_ANGLE_90@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rbx
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_3
## %bb.2:
	movq	_ROTATION_ANGLE_270@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rbx
	je	LBB0_3
## %bb.5:
	movq	_ROTATION_ANGLE_180@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rbx
	jne	LBB0_7
## %bb.6:
	subl	%r9d, %eax
	subl	%r8d, %edx
	movl	%edx, %r14d
	movl	%eax, %r15d
	jmp	LBB0_7
LBB0_17:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r10, %rbx
	callq	_swap
	movq	%rbx, %r10
	movq	(%r12), %rax
	movq	_ROTATION_ANGLE_90@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.4:
	movl	12(%r13), %eax
	addl	16(%r12), %eax
	movl	(%r13), %r15d
	subl	%eax, %r15d
	movl	4(%r13), %eax
	movl	8(%r13), %r14d
	addl	20(%r12), %eax
	subl	%eax, %r14d
LBB0_7:
	cmpq	$0, 48(%r12)
	je	LBB0_8
## %bb.9:
	movl	24(%r12), %eax
	movl	%eax, %ecx
	subl	%r10d, %ecx
	subl	%r15d, %eax
	addl	16(%r12), %eax
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, %r15d
	jmp	LBB0_10
LBB0_8:
	movq	%r10, -64(%rbp)                 ## 8-byte Spill
LBB0_10:
	xorl	%eax, %eax
	testl	%r15d, %r15d
	cmovgl	%r15d, %eax
	imull	8(%r12), %eax
	cltd
	idivl	12(%r12)
	movl	%eax, %ebx
	movq	40(%r12), %rdi
	callq	_ASSERT
	cmpq	$0, 40(%r12)
	je	LBB0_11
## %bb.12:
	movl	%ebx, %edi
	callq	_dc_fixpt_from_int
	movq	40(%r12), %rsi
	movl	%eax, %edi
	callq	_dc_fixpt_div
	movl	%eax, %edi
	callq	_dc_fixpt_floor
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_13
LBB0_11:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
LBB0_13:
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	setne	%sil
	cmpl	24(%r12), %r15d
	setl	%cl
	addl	%r15d, -48(%rbp)                ## 4-byte Folded Spill
	setg	%dl
	cmpl	32(%r12), %r14d
	setl	%bl
	addl	%r14d, -52(%rbp)                ## 4-byte Folded Spill
	setg	%al
	andb	%dl, %al
	andb	%bl, %al
	andb	%sil, %cl
	andb	%al, %cl
	movzbl	%cl, %ebx
	cmpb	$1, %bl
	jne	LBB0_16
## %bb.14:
	movq	_CURSOR_SURFACE_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG_READ
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	24(%rdi), %rax
	movq	%rdi, %rsi
	callq	*(%rax)
LBB0_16:
	movq	_CURSOR_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CURSOR_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_REG_UPDATE
	movq	_CURSOR_POSITION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CURSOR_X_POSITION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CURSOR_Y_POSITION@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	(%r13), %ecx
	movl	8(%r13), %r9d
	xorl	%esi, %esi
	callq	_REG_SET_2
	movq	_CURSOR_HOT_SPOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CURSOR_HOT_SPOT_X@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CURSOR_HOT_SPOT_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%esi, %esi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	-88(%rbp), %r9                  ## 8-byte Reload
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_REG_SET_2
	movq	_CURSOR_DST_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CURSOR_DST_X_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_SET                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ROTATION_ANGLE_90,8,3          ## @ROTATION_ANGLE_90
	.comm	_ROTATION_ANGLE_270,8,3         ## @ROTATION_ANGLE_270
	.comm	_ROTATION_ANGLE_180,8,3         ## @ROTATION_ANGLE_180
	.comm	_CURSOR_SURFACE_ADDRESS,4,2     ## @CURSOR_SURFACE_ADDRESS
	.comm	_CURSOR_CONTROL,4,2             ## @CURSOR_CONTROL
	.comm	_CURSOR_ENABLE,4,2              ## @CURSOR_ENABLE
	.comm	_CURSOR_POSITION,4,2            ## @CURSOR_POSITION
	.comm	_CURSOR_X_POSITION,4,2          ## @CURSOR_X_POSITION
	.comm	_CURSOR_Y_POSITION,4,2          ## @CURSOR_Y_POSITION
	.comm	_CURSOR_HOT_SPOT,4,2            ## @CURSOR_HOT_SPOT
	.comm	_CURSOR_HOT_SPOT_X,4,2          ## @CURSOR_HOT_SPOT_X
	.comm	_CURSOR_HOT_SPOT_Y,4,2          ## @CURSOR_HOT_SPOT_Y
	.comm	_CURSOR_DST_OFFSET,4,2          ## @CURSOR_DST_OFFSET
	.comm	_CURSOR_DST_X_OFFSET,4,2        ## @CURSOR_DST_X_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hubp2_cursor_set_position      ; -- Begin function hubp2_cursor_set_position
	.p2align	2
_hubp2_cursor_set_position:             ; @hubp2_cursor_set_position
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x2
	mov	x21, x1
	mov	x22, x0
	bl	_TO_DCN20_HUBP
	ldr	x8, [x22]
	cbz	x8, LBB0_4
; %bb.1:
	ldp	w8, w19, [x21]
	ldp	w9, w10, [x23, #16]
	add	w11, w19, w9
	sub	w28, w8, w11
	ldp	w11, w20, [x21, #8]
	add	w12, w20, w10
	sub	w27, w11, w12
	ldr	w24, [x22, #16]
	ldr	w25, [x22, #8]
	ldr	x12, [x21, #16]
	str	x12, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x12, [x23]
Lloh0:
	adrp	x26, _ROTATION_ANGLE_90@GOTPAGE
Lloh1:
	ldr	x26, [x26, _ROTATION_ANGLE_90@GOTPAGEOFF]
	ldr	x13, [x26]
Lloh2:
	adrp	x14, _ROTATION_ANGLE_270@GOTPAGE
Lloh3:
	ldr	x14, [x14, _ROTATION_ANGLE_270@GOTPAGEOFF]
Lloh4:
	ldr	x14, [x14]
	cmp	x12, x13
	ccmp	x12, x14, #4, ne
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x24
	mov	x1, x25
	bl	_swap
	ldr	x8, [x23]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	ldp	w9, w8, [x21, #8]
	ldp	w10, w11, [x21]
	ldp	w12, w13, [x23, #16]
	add	w8, w8, w12
	sub	w28, w10, w8
	add	w8, w11, w13
	sub	w27, w9, w8
	b	LBB0_6
LBB0_4:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
Lloh5:
	adrp	x13, _ROTATION_ANGLE_180@GOTPAGE
Lloh6:
	ldr	x13, [x13, _ROTATION_ANGLE_180@GOTPAGEOFF]
Lloh7:
	ldr	x13, [x13]
	sub	w8, w8, w9
	sub	w9, w11, w10
	cmp	x12, x13
	csel	w27, w27, w9, ne
	csel	w28, w28, w8, ne
LBB0_6:
	ldr	x8, [x23, #48]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	w8, [x23, #24]
	sub	w19, w8, w19
	ldr	w9, [x23, #16]
	sub	w8, w8, w28
	add	w28, w8, w9
LBB0_8:
	cmp	w28, #0
	csel	w8, w28, wzr, gt
	ldp	w9, w10, [x23, #8]
	mul	w8, w8, w9
	ldr	x0, [x23, #40]
	sdiv	w26, w8, w10
	bl	_ASSERT
	ldr	x8, [x23, #40]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x26
	bl	_dc_fixpt_from_int
	ldr	x1, [x23, #40]
	bl	_dc_fixpt_div
	bl	_dc_fixpt_floor
	mov	x26, x0
LBB0_10:
	ldr	w8, [x23, #24]
	add	w9, w28, w25
	ldr	w10, [x23, #32]
	add	w11, w27, w24
	cmp	w11, #0
	ccmp	w27, w10, #0, gt
	ccmp	w9, #0, #4, lt
	ccmp	w28, w8, #0, gt
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ccmp	x8, #0, #4, lt
	cset	w23, ne
	b.eq	LBB0_13
; %bb.11:
Lloh8:
	adrp	x8, _CURSOR_SURFACE_ADDRESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CURSOR_SURFACE_ADDRESS@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_REG_READ
	cbnz	x0, LBB0_13
; %bb.12:
	ldr	x8, [x22, #24]
	ldr	x8, [x8]
	mov	x0, x22
	mov	x1, x22
	blr	x8
LBB0_13:
Lloh11:
	adrp	x8, _CURSOR_CONTROL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CURSOR_CONTROL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _CURSOR_ENABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CURSOR_ENABLE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x2, x23
	bl	_REG_UPDATE
Lloh17:
	adrp	x8, _CURSOR_POSITION@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CURSOR_POSITION@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x8, _CURSOR_X_POSITION@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CURSOR_X_POSITION@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	ldr	w3, [x21]
Lloh23:
	adrp	x8, _CURSOR_Y_POSITION@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CURSOR_Y_POSITION@GOTPAGEOFF]
Lloh25:
	ldr	w4, [x8]
	ldr	w5, [x21, #8]
	mov	w1, #0
	bl	_REG_SET_2
Lloh26:
	adrp	x8, _CURSOR_HOT_SPOT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CURSOR_HOT_SPOT@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x8, _CURSOR_HOT_SPOT_X@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CURSOR_HOT_SPOT_X@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
Lloh32:
	adrp	x8, _CURSOR_HOT_SPOT_Y@GOTPAGE
Lloh33:
	ldr	x8, [x8, _CURSOR_HOT_SPOT_Y@GOTPAGEOFF]
Lloh34:
	ldr	w4, [x8]
	mov	w1, #0
	mov	x3, x19
	mov	x5, x20
	bl	_REG_SET_2
Lloh35:
	adrp	x8, _CURSOR_DST_OFFSET@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CURSOR_DST_OFFSET@GOTPAGEOFF]
Lloh37:
	adrp	x9, _CURSOR_DST_X_OFFSET@GOTPAGE
Lloh38:
	ldr	x9, [x9, _CURSOR_DST_X_OFFSET@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
Lloh40:
	ldr	w2, [x9]
	mov	w1, #0
	mov	x3, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_REG_SET
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh39
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ROTATION_ANGLE_90,8,3          ; @ROTATION_ANGLE_90
	.comm	_ROTATION_ANGLE_270,8,3         ; @ROTATION_ANGLE_270
	.comm	_ROTATION_ANGLE_180,8,3         ; @ROTATION_ANGLE_180
	.comm	_CURSOR_SURFACE_ADDRESS,4,2     ; @CURSOR_SURFACE_ADDRESS
	.comm	_CURSOR_CONTROL,4,2             ; @CURSOR_CONTROL
	.comm	_CURSOR_ENABLE,4,2              ; @CURSOR_ENABLE
	.comm	_CURSOR_POSITION,4,2            ; @CURSOR_POSITION
	.comm	_CURSOR_X_POSITION,4,2          ; @CURSOR_X_POSITION
	.comm	_CURSOR_Y_POSITION,4,2          ; @CURSOR_Y_POSITION
	.comm	_CURSOR_HOT_SPOT,4,2            ; @CURSOR_HOT_SPOT
	.comm	_CURSOR_HOT_SPOT_X,4,2          ; @CURSOR_HOT_SPOT_X
	.comm	_CURSOR_HOT_SPOT_Y,4,2          ; @CURSOR_HOT_SPOT_Y
	.comm	_CURSOR_DST_OFFSET,4,2          ; @CURSOR_DST_OFFSET
	.comm	_CURSOR_DST_X_OFFSET,4,2        ; @CURSOR_DST_X_OFFSET
.subsections_via_symbols
