	.file	"extr_dcn20_hubp.c_hubp2_cursor_set_position.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	hubp2_cursor_set_position
	.type	hubp2_cursor_set_position, @function
hubp2_cursor_set_position:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	call	TO_DCN20_HUBP@PLT
	mov	r11d, DWORD PTR [r15]
	mov	esi, DWORD PTR 8[r15]
	mov	r12d, DWORD PTR 4[r15]
	mov	ebp, DWORD PTR 12[r15]
	mov	edi, DWORD PTR 16[r14]
	mov	edx, DWORD PTR 20[r14]
	mov	r8d, r11d
	mov	ebx, esi
	sub	r8d, r12d
	sub	ebx, ebp
	sub	r8d, edi
	sub	ebx, edx
	cmp	QWORD PTR 0[r13], 0
	je	.L1
	mov	rax, QWORD PTR 16[r13]
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR 8[r13]
	mov	QWORD PTR [rsp], rax
	mov	rax, QWORD PTR 16[r15]
	mov	QWORD PTR 24[rsp], rax
	mov	rax, QWORD PTR [r14]
	cmp	rax, QWORD PTR ROTATION_ANGLE_90[rip]
	je	.L3
	cmp	rax, QWORD PTR ROTATION_ANGLE_270[rip]
	je	.L3
	cmp	rax, QWORD PTR ROTATION_ANGLE_180[rip]
	jne	.L5
	sub	r11d, edi
	mov	ebx, esi
	mov	r8d, r11d
	sub	ebx, edx
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	QWORD PTR 48[r14], 0
	je	.L6
	mov	eax, DWORD PTR 24[r14]
	mov	ecx, eax
	add	eax, DWORD PTR 16[r14]
	sub	ecx, r12d
	sub	eax, r8d
	mov	r12d, ecx
	mov	r8d, eax
.L6:
	test	r8d, r8d
	mov	eax, 0
	mov	rdi, QWORD PTR 40[r14]
	mov	DWORD PTR 12[rsp], r8d
	cmovns	eax, r8d
	imul	eax, DWORD PTR 8[r14]
	cdq
	idiv	DWORD PTR 12[r14]
	mov	DWORD PTR 8[rsp], eax
	call	ASSERT@PLT
	cmp	QWORD PTR 40[r14], 0
	mov	r8d, DWORD PTR 12[rsp]
	jne	.L23
.L7:
	xor	eax, eax
	cmp	DWORD PTR 24[r14], r8d
	jle	.L8
	cmp	QWORD PTR 24[rsp], 0
	setne	al
.L8:
	mov	ecx, DWORD PTR [rsp]
	xor	edx, edx
	add	ecx, r8d
	test	ecx, ecx
	jle	.L9
	cmp	ebx, DWORD PTR 32[r14]
	jge	.L9
	add	ebx, DWORD PTR 16[rsp]
	test	ebx, ebx
	jle	.L13
	test	al, al
	je	.L13
	mov	edi, DWORD PTR CURSOR_SURFACE_ADDRESS[rip]
	call	REG_READ@PLT
	mov	edx, 1
	test	rax, rax
	jne	.L9
	mov	rax, QWORD PTR 24[r13]
	mov	DWORD PTR [rsp], edx
	mov	rsi, r13
	mov	rdi, r13
	call	[QWORD PTR [rax]]
	mov	edx, DWORD PTR [rsp]
.L9:
	mov	esi, DWORD PTR CURSOR_ENABLE[rip]
	mov	edi, DWORD PTR CURSOR_CONTROL[rip]
	call	REG_UPDATE@PLT
	mov	r9d, DWORD PTR 8[r15]
	mov	ecx, DWORD PTR [r15]
	xor	esi, esi
	mov	r8d, DWORD PTR CURSOR_Y_POSITION[rip]
	mov	edx, DWORD PTR CURSOR_X_POSITION[rip]
	mov	edi, DWORD PTR CURSOR_POSITION[rip]
	call	REG_SET_2@PLT
	mov	edx, DWORD PTR CURSOR_HOT_SPOT_X[rip]
	mov	ecx, r12d
	xor	esi, esi
	mov	edi, DWORD PTR CURSOR_HOT_SPOT[rip]
	mov	r8d, DWORD PTR CURSOR_HOT_SPOT_Y[rip]
	mov	r9d, ebp
	call	REG_SET_2@PLT
	mov	ecx, DWORD PTR 8[rsp]
	mov	edx, DWORD PTR CURSOR_DST_X_OFFSET[rip]
	xor	esi, esi
	mov	edi, DWORD PTR CURSOR_DST_OFFSET[rip]
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	REG_SET@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	esi, DWORD PTR [rsp]
	mov	edi, DWORD PTR 16[rsp]
	mov	DWORD PTR 8[rsp], r8d
	call	swap@PLT
	mov	rax, QWORD PTR ROTATION_ANGLE_90[rip]
	cmp	QWORD PTR [r14], rax
	mov	r8d, DWORD PTR 8[rsp]
	jne	.L5
	mov	r8d, DWORD PTR [r15]
	mov	ebx, DWORD PTR 8[r15]
	sub	r8d, DWORD PTR 12[r15]
	sub	ebx, DWORD PTR 4[r15]
	sub	r8d, DWORD PTR 16[r14]
	sub	ebx, DWORD PTR 20[r14]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	mov	edi, DWORD PTR 8[rsp]
	call	dc_fixpt_from_int@PLT
	mov	rsi, QWORD PTR 40[r14]
	mov	edi, eax
	call	dc_fixpt_div@PLT
	mov	edi, eax
	call	dc_fixpt_floor@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	DWORD PTR 8[rsp], eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	xor	edx, edx
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	hubp2_cursor_set_position, .-hubp2_cursor_set_position
	.comm	ROTATION_ANGLE_90,8,8
	.comm	ROTATION_ANGLE_270,8,8
	.comm	ROTATION_ANGLE_180,8,8
	.comm	CURSOR_Y_POSITION,4,4
	.comm	CURSOR_X_POSITION,4,4
	.comm	CURSOR_SURFACE_ADDRESS,4,4
	.comm	CURSOR_POSITION,4,4
	.comm	CURSOR_HOT_SPOT_Y,4,4
	.comm	CURSOR_HOT_SPOT_X,4,4
	.comm	CURSOR_HOT_SPOT,4,4
	.comm	CURSOR_ENABLE,4,4
	.comm	CURSOR_DST_X_OFFSET,4,4
	.comm	CURSOR_DST_OFFSET,4,4
	.comm	CURSOR_CONTROL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_dcn20_hubp.c_hubp2_cursor_set_position.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.global	hubp2_cursor_set_position
	.syntax unified
	.arm
	.fpu softvfp
	.type	hubp2_cursor_set_position, %function
hubp2_cursor_set_position:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r1
	mov	r4, r2
	mov	r7, r0
	sub	sp, sp, #28
	bl	TO_DCN20_HUBP
	ldr	r1, [r5, #8]
	ldr	r10, [r5, #12]
	ldr	ip, [r5]
	ldr	r9, [r5, #4]
	ldr	lr, [r7]
	ldr	r2, [r4, #16]
	ldr	r0, [r4, #12]
	sub	r3, r1, r10
	sub	r6, ip, r9
	sub	r3, r3, r2
	cmp	lr, #0
	sub	r6, r6, r0
	str	r3, [sp, #12]
	beq	.L1
	ldr	r8, .L24
	ldr	r3, [r4]
	ldr	lr, [r8]
	ldr	fp, [r7, #8]
	cmp	r3, lr
	ldr	lr, [r5, #16]
	str	fp, [sp, #16]
	str	lr, [sp, #20]
	ldr	fp, [r7, #4]
	beq	.L3
	ldr	lr, .L24+4
	ldr	lr, [lr]
	cmp	r3, lr
	beq	.L3
	ldr	lr, .L24+8
	ldr	lr, [lr]
	cmp	r3, lr
	subeq	r3, r1, r2
	subeq	r6, ip, r0
	streq	r3, [sp, #12]
.L5:
	ldr	r3, [r4, #32]
	ldr	r0, [r4, #4]
	cmp	r3, #0
	ldrne	r3, [r4, #20]
	ldrne	r2, [r4, #12]
	subne	r9, r3, r9
	addne	r3, r3, r2
	subne	r6, r3, r6
	bic	r3, r6, r6, asr #31
	mul	r0, r3, r0
	ldr	r1, [r4, #8]
	bl	__aeabi_idiv
	mov	r8, r0
	ldr	r0, [r4, #28]
	bl	ASSERT
	ldr	r3, [r4, #28]
	cmp	r3, #0
	bne	.L23
.L7:
	ldr	r3, [r4, #20]
	cmp	r3, r6
	movle	r2, #0
	ble	.L8
	ldr	r3, [sp, #20]
	subs	r2, r3, #0
	movne	r2, #1
.L8:
	add	r6, r6, fp
	cmp	r6, #0
	ble	.L12
	ldr	r3, [r4, #24]
	ldr	r1, [sp, #12]
	cmp	r3, r1
	ble	.L12
	mov	r3, r1
	ldr	r1, [sp, #16]
	add	r3, r3, r1
	cmp	r3, #0
	movle	r2, #0
	andgt	r2, r2, #1
	cmp	r2, #0
	beq	.L9
	ldr	r3, .L24+12
	ldr	r0, [r3]
	bl	REG_READ
	cmp	r0, #0
	movne	r2, #1
	bne	.L9
	ldr	r3, [r7, #12]
	mov	r1, r7
	mov	r0, r7
	ldr	r3, [r3]
	blx	r3
	mov	r2, #1
	b	.L9
.L12:
	mov	r2, #0
.L9:
	ldr	r3, .L24+16
	ldr	r1, .L24+20
	ldr	r0, [r3]
	ldr	r1, [r1]
	bl	REG_UPDATE
	ldr	r3, .L24+24
	ldr	r1, .L24+28
	ldr	r0, [r3]
	ldr	r2, .L24+32
	ldr	r3, [r5, #8]
	str	r0, [sp]
	ldr	r2, [r2]
	ldr	r0, [r1]
	str	r3, [sp, #4]
	ldr	r3, [r5]
	mov	r1, #0
	bl	REG_SET_2
	ldr	r3, .L24+36
	ldr	r1, .L24+40
	ldr	r0, [r3]
	ldr	r2, .L24+44
	str	r10, [sp, #4]
	str	r0, [sp]
	mov	r3, r9
	ldr	r2, [r2]
	ldr	r0, [r1]
	mov	r1, #0
	bl	REG_SET_2
	ldr	r1, .L24+48
	mov	r3, r8
	ldr	r0, [r1]
	mov	r1, #0
	ldr	r2, .L24+52
	ldr	r2, [r2]
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	REG_SET
.L3:
	mov	r1, fp
	ldr	r0, [sp, #16]
	bl	swap
	ldr	r3, [r8]
	ldr	r2, [r4]
	cmp	r2, r3
	bne	.L5
	ldmib	r5, {r2, r3}
	ldr	r1, [r5, #12]
	ldr	r6, [r5]
	sub	r3, r3, r2
	ldr	r2, [r4, #16]
	sub	r6, r6, r1
	ldr	r1, [r4, #12]
	sub	r3, r3, r2
	sub	r6, r6, r1
	str	r3, [sp, #12]
	b	.L5
.L1:
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	mov	r0, r8
	bl	dc_fixpt_from_int
	ldr	r1, [r4, #28]
	bl	dc_fixpt_div
	bl	dc_fixpt_floor
	mov	r8, r0
	b	.L7
.L25:
	.align	2
.L24:
	.word	ROTATION_ANGLE_90
	.word	ROTATION_ANGLE_270
	.word	ROTATION_ANGLE_180
	.word	CURSOR_SURFACE_ADDRESS
	.word	CURSOR_CONTROL
	.word	CURSOR_ENABLE
	.word	CURSOR_Y_POSITION
	.word	CURSOR_POSITION
	.word	CURSOR_X_POSITION
	.word	CURSOR_HOT_SPOT_Y
	.word	CURSOR_HOT_SPOT
	.word	CURSOR_HOT_SPOT_X
	.word	CURSOR_DST_OFFSET
	.word	CURSOR_DST_X_OFFSET
	.size	hubp2_cursor_set_position, .-hubp2_cursor_set_position
	.comm	ROTATION_ANGLE_90,4,4
	.comm	ROTATION_ANGLE_270,4,4
	.comm	ROTATION_ANGLE_180,4,4
	.comm	CURSOR_Y_POSITION,4,4
	.comm	CURSOR_X_POSITION,4,4
	.comm	CURSOR_SURFACE_ADDRESS,4,4
	.comm	CURSOR_POSITION,4,4
	.comm	CURSOR_HOT_SPOT_Y,4,4
	.comm	CURSOR_HOT_SPOT_X,4,4
	.comm	CURSOR_HOT_SPOT,4,4
	.comm	CURSOR_ENABLE,4,4
	.comm	CURSOR_DST_X_OFFSET,4,4
	.comm	CURSOR_DST_OFFSET,4,4
	.comm	CURSOR_CONTROL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
