	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dcn10_set_cursor_position
_dcn10_set_cursor_position:             ## @dcn10_set_cursor_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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	48(%rdi), %rax
	movl	28(%rax), %ecx
	movl	%ecx, -48(%rbp)
	movups	12(%rax), %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	24(%rdi), %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	32(%rdi), %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movslq	8(%rax), %rcx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	movl	%ecx, -144(%rbp)
	movq	40(%rdi), %rcx
	movq	(%rcx), %rdx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, -136(%rbp)
	movl	32(%rcx), %edx
	movl	%edx, -128(%rbp)
	movl	12(%rdi), %edx
	movl	%edx, -124(%rbp)
	movl	16(%rdi), %edx
	movl	%edx, -120(%rbp)
	movq	(%rdi), %rdx
	movq	%rdx, -116(%rbp)
	movl	8(%rdi), %edx
	movl	%edx, -108(%rbp)
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -104(%rbp)
	movl	24(%rcx), %r14d
	movl	28(%rcx), %r15d
	movl	-64(%rbp), %ebx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_min
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	-60(%rbp), %r13d
	movl	%r15d, %edi
	movl	%r13d, %esi
	callq	_min
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	subl	%ecx, %ebx
	movl	%ebx, -64(%rbp)
	subl	%eax, %r13d
	movl	%r13d, -60(%rbp)
	subl	%ecx, %r14d
	addl	%r14d, -48(%rbp)
	subl	%eax, %r15d
	addl	%r15d, -52(%rbp)
	movq	40(%r12), %rax
	movq	16(%rax), %rcx
	movq	_PLN_ADDR_TYPE_VIDEO_PROGRESSIVE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.1:
	movl	$0, -56(%rbp)
LBB0_2:
	movq	_ROTATION_ANGLE_90@GOTPCREL(%rip), %rcx
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	cmpq	(%rcx), %rdx
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_4
## %bb.3:
	movl	(%r12), %eax
	movl	4(%r12), %ecx
	subl	%r13d, %eax
	leal	(%rax,%rcx,2), %eax
	movl	%eax, -64(%rbp)
	movl	%ebx, -60(%rbp)
	jmp	LBB0_13
LBB0_4:
	movq	_ROTATION_ANGLE_270@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_6
## %bb.5:
	movl	8(%r12), %eax
	leal	(%rax,%rax), %ecx
	subl	%ebx, %ecx
	movl	%eax, %edx
	subl	%ebx, %edx
	leal	(%rdx,%rax), %eax
	cmovgel	%ecx, %eax
	movl	%eax, -60(%rbp)
	movl	%r13d, -64(%rbp)
	jmp	LBB0_13
LBB0_6:
	movq	_ROTATION_ANGLE_180@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_13
## %bb.7:
	movl	(%r12), %ecx
	movl	4(%r12), %edx
	leal	(%rdx,%rcx), %esi
	cmpl	%esi, %ebx
	jge	LBB0_8
## %bb.9:
	leal	(%rdx,%rdx), %esi
	subl	%ebx, %esi
	movl	%esi, -64(%rbp)
	movq	8(%r15), %rdi
	addl	%edi, %edx
	cmpl	%edx, %ebx
	jge	LBB0_11
## %bb.10:
	movslq	%esi, %rdx
	movslq	%edi, %rsi
	addq	8(%rax), %rsi
	cmpq	%rdx, %rsi
	jl	LBB0_12
LBB0_11:
	addl	%ebx, %ecx
	movl	%ecx, -64(%rbp)
	jmp	LBB0_12
LBB0_8:
	addl	%ecx, %ecx
	subl	%ebx, %ecx
	leal	(%rcx,%rdx,2), %eax
	movl	%eax, -64(%rbp)
LBB0_12:
	movl	8(%r12), %eax
	subl	%r13d, %eax
	movl	%eax, -60(%rbp)
LBB0_13:
	movq	16(%r15), %rax
	leaq	-64(%rbp), %rbx
	leaq	-144(%rbp), %r14
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	*(%rax)
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	movq	8(%r15), %rcx
	movl	(%r15), %r8d
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	*(%rax)
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PLN_ADDR_TYPE_VIDEO_PROGRESSIVE,8,3 ## @PLN_ADDR_TYPE_VIDEO_PROGRESSIVE
	.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
	.no_dead_strip	_dcn10_set_cursor_position
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dcn10_set_cursor_position
_dcn10_set_cursor_position:             ; @dcn10_set_cursor_position
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x21, x0
	ldp	x9, x8, [x0, #40]
	ldr	w10, [x8, #28]
	ldur	q0, [x8, #12]
	str	q0, [sp, #48]
	str	w10, [sp, #64]
	ldp	x19, x20, [x0, #24]
	ldrsw	x10, [x8, #8]
	mov	w11, #26215
	movk	w11, #26214, lsl #16
	mul	x10, x10, x11
	lsr	x11, x10, #32
	lsr	x10, x10, #63
	add	w10, w10, w11, asr #2
	str	w10, [sp]
	ldr	x27, [x9]
	str	x27, [sp, #8]
	ldr	w10, [x9, #32]
	str	w10, [sp, #16]
	ldur	d0, [x0, #12]
	stur	d0, [sp, #20]
	ldr	x10, [x0]
	stur	x10, [sp, #28]
	ldr	w10, [x0, #8]
	str	w10, [sp, #36]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	w8, [sp, #40]
	ldp	w22, w23, [x9, #24]
	ldr	w24, [sp, #48]
	mov	x0, x22
	mov	x1, x24
	bl	_min
	mov	x25, x0
	ldr	w26, [sp, #52]
	mov	x0, x23
	mov	x1, x26
	bl	_min
	sub	w8, w24, w25
	ldp	w10, w9, [sp, #60]
	sub	w11, w22, w25
	add	w11, w11, w9
	sub	w9, w26, w0
	stp	w8, w9, [sp, #48]
	sub	w12, w23, w0
	add	w10, w12, w10
	stp	w10, w11, [sp, #60]
	ldr	x10, [x21, #40]
	ldr	x11, [x10, #16]
Lloh0:
	adrp	x12, _PLN_ADDR_TYPE_VIDEO_PROGRESSIVE@GOTPAGE
Lloh1:
	ldr	x12, [x12, _PLN_ADDR_TYPE_VIDEO_PROGRESSIVE@GOTPAGEOFF]
Lloh2:
	ldr	x12, [x12]
	cmp	x11, x12
	b.ne	LBB0_2
; %bb.1:
	str	wzr, [sp, #56]
LBB0_2:
Lloh3:
	adrp	x11, _ROTATION_ANGLE_90@GOTPAGE
Lloh4:
	ldr	x11, [x11, _ROTATION_ANGLE_90@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	cmp	x27, x11
	b.ne	LBB0_5
; %bb.3:
	ldp	w10, w11, [x21]
	sub	w9, w10, w9
	add	w9, w9, w11, lsl #1
	str	w9, [sp, #48]
LBB0_4:
	str	w8, [sp, #52]
	b	LBB0_12
LBB0_5:
Lloh6:
	adrp	x11, _ROTATION_ANGLE_270@GOTPAGE
Lloh7:
	ldr	x11, [x11, _ROTATION_ANGLE_270@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x27, x11
	b.ne	LBB0_7
; %bb.6:
	ldr	w10, [x21, #8]
	lsl	w11, w10, #1
	sub	w11, w11, w8
	subs	w8, w10, w8
	add	w8, w8, w10
	csel	w8, w8, w11, lt
	stp	w9, w8, [sp, #48]
	b	LBB0_12
LBB0_7:
Lloh9:
	adrp	x11, _ROTATION_ANGLE_180@GOTPAGE
Lloh10:
	ldr	x11, [x11, _ROTATION_ANGLE_180@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	cmp	x27, x11
	b.ne	LBB0_12
; %bb.8:
	ldp	w11, w12, [x21]
	add	w13, w12, w11
	cmp	w8, w13
	b.ge	LBB0_13
; %bb.9:
	lsl	w13, w12, #1
	sub	w13, w13, w8
	str	w13, [sp, #48]
	ldr	x14, [x20, #8]
	add	w12, w12, w14
	cmp	w8, w12
	b.ge	LBB0_11
; %bb.10:
	ldr	x10, [x10, #8]
	add	x10, x10, w14, sxtw
	cmp	x10, w13, sxtw
	b.lt	LBB0_15
LBB0_11:
	add	w8, w11, w8
	b	LBB0_14
LBB0_12:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	add	x1, sp, #48
	mov	x2, sp
	mov	x0, x20
	blr	x8
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x3, [x20, #8]
	ldr	w4, [x20]
	add	x1, sp, #48
	mov	x2, sp
	mov	x0, x19
	blr	x8
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_13:
	lsl	w10, w11, #1
	sub	w8, w10, w8
	add	w8, w8, w12, lsl #1
LBB0_14:
	str	w8, [sp, #48]
LBB0_15:
	ldr	w8, [x21, #8]
	sub	w8, w8, w9
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PLN_ADDR_TYPE_VIDEO_PROGRESSIVE,8,3 ; @PLN_ADDR_TYPE_VIDEO_PROGRESSIVE
	.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
	.no_dead_strip	_dcn10_set_cursor_position
.subsections_via_symbols
