	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __VIDisplayPositionToXY
___VIDisplayPositionToXY:               ## @__VIDisplayPositionToXY
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdx, %r8
                                        ## kill: def $esi killed $esi def $rsi
	decl	%edi
	movq	_currTiming@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movl	%edi, %eax
	cltd
	idivl	(%r9)
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rsi,2), %eax
	addl	$-2, %eax
	movl	%edi, (%r8)
	movq	_HorVer@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	$2, %edx
	je	LBB0_12
## %bb.1:
	cmpl	$1, %edx
	je	LBB0_10
## %bb.2:
	testl	%edx, %edx
	jne	LBB0_20
## %bb.3:
	movl	4(%r9), %esi
	cmpl	%esi, %eax
	jge	LBB0_7
## %bb.4:
	movl	12(%r9), %edx
	leal	(%rdx,%rdx,2), %edi
	addl	8(%r9), %edi
	movl	$-1, %r10d
	movl	%eax, %r8d
	subl	%edi, %r8d
	jl	LBB0_19
## %bb.5:
	subl	16(%r9), %esi
	cmpl	%esi, %eax
	jge	LBB0_19
## %bb.6:
	andl	$-2, %r8d
	movl	%r8d, %r10d
	jmp	LBB0_19
LBB0_12:
	movl	4(%r9), %esi
	cmpl	%esi, %eax
	jge	LBB0_15
## %bb.13:
	movl	12(%r9), %edx
	leal	(%rdx,%rdx,2), %edx
	addl	8(%r9), %edx
	movl	$-1, %r10d
	movl	%eax, %edi
	subl	%edx, %edi
	jl	LBB0_19
## %bb.14:
	subl	16(%r9), %esi
	cmpl	%esi, %eax
	movl	$-1, %r10d
	cmovll	%edi, %r10d
	jmp	LBB0_19
LBB0_10:
	movl	4(%r9), %esi
	movl	12(%r9), %edx
	xorl	%edi, %edi
	cmpl	%esi, %eax
	cmovgel	%esi, %edi
	subl	%edi, %eax
	leal	(%rdx,%rdx,2), %edx
	addl	8(%r9), %edx
	movl	$-1, %r10d
	movl	%eax, %edi
	subl	%edx, %edi
	jl	LBB0_19
## %bb.11:
	subl	16(%r9), %esi
	cmpl	%esi, %eax
	jl	LBB0_18
	jmp	LBB0_19
LBB0_7:
	subl	16(%r9), %eax
	movl	12(%r9), %edx
	leal	(%rdx,%rdx,2), %edi
	addl	20(%r9), %edi
	movl	$-1, %r10d
	movl	%eax, %r8d
	subl	%edi, %r8d
	jl	LBB0_19
## %bb.8:
	subl	24(%r9), %esi
	cmpl	%esi, %eax
	jge	LBB0_19
## %bb.9:
	orl	$1, %r8d
	movl	%r8d, %r10d
	jmp	LBB0_19
LBB0_15:
	subl	16(%r9), %eax
	movl	12(%r9), %edx
	leal	(%rdx,%rdx,2), %edx
	addl	20(%r9), %edx
	movl	$-1, %r10d
	movl	%eax, %edi
	subl	%edx, %edi
	jl	LBB0_19
## %bb.16:
	subl	24(%r9), %esi
	cmpl	%esi, %eax
	jge	LBB0_19
LBB0_18:
	andl	$-2, %edi
	movl	%edi, %r10d
LBB0_19:
	movl	%r10d, (%rcx)
LBB0_20:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_currTiming,8,3                 ## @currTiming
	.comm	_HorVer,4,2                     ## @HorVer
	.no_dead_strip	___VIDisplayPositionToXY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __VIDisplayPositionToXY
___VIDisplayPositionToXY:               ; @__VIDisplayPositionToXY
	.cfi_startproc
; %bb.0:
	sub	w10, w0, #1
Lloh0:
	adrp	x8, _currTiming@GOTPAGE
Lloh1:
	ldr	x8, [x8, _currTiming@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w9, [x8]
	sdiv	w9, w10, w9
	add	w9, w9, w1, lsl #1
	sub	w9, w9, #2
	str	w10, [x2]
Lloh3:
	adrp	x10, _HorVer@GOTPAGE
Lloh4:
	ldr	x10, [x10, _HorVer@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w10, #2
	b.eq	LBB0_7
; %bb.1:
	cmp	w10, #1
	b.eq	LBB0_10
; %bb.2:
	cbnz	w10, LBB0_21
; %bb.3:
	ldr	w10, [x8, #4]
	cmp	w9, w10
	b.ge	LBB0_12
; %bb.4:
	ldp	w11, w12, [x8, #8]
	add	w12, w12, w12, lsl #1
	add	w11, w12, w11
	subs	w11, w9, w11
	b.lt	LBB0_19
; %bb.5:
	ldr	w8, [x8, #16]
	sub	w8, w10, w8
	cmp	w9, w8
	b.ge	LBB0_19
; %bb.6:
	and	w8, w11, #0xfffffffe
	b	LBB0_20
LBB0_7:
	ldr	w10, [x8, #4]
	cmp	w9, w10
	b.ge	LBB0_15
; %bb.8:
	ldp	w11, w12, [x8, #8]
	add	w12, w12, w12, lsl #1
	add	w11, w12, w11
	subs	w11, w9, w11
	b.lt	LBB0_19
; %bb.9:
	ldr	w8, [x8, #16]
	sub	w8, w10, w8
	cmp	w9, w8
	csinv	w8, w11, wzr, lt
	b	LBB0_20
LBB0_10:
	ldp	w10, w12, [x8, #4]
	cmp	w9, w10
	csel	w11, wzr, w10, lt
	sub	w11, w9, w11
	ldr	w9, [x8, #12]
	add	w9, w9, w9, lsl #1
	add	w9, w9, w12
	subs	w9, w11, w9
	b.lt	LBB0_19
; %bb.11:
	ldr	w8, [x8, #16]
	b	LBB0_17
LBB0_12:
	ldp	w12, w11, [x8, #12]
	sub	w11, w9, w11
	ldr	w9, [x8, #20]
	add	w12, w12, w12, lsl #1
	add	w9, w12, w9
	subs	w9, w11, w9
	b.lt	LBB0_19
; %bb.13:
	ldr	w8, [x8, #24]
	sub	w8, w10, w8
	cmp	w11, w8
	b.ge	LBB0_19
; %bb.14:
	orr	w8, w9, #0x1
	b	LBB0_20
LBB0_15:
	ldp	w12, w11, [x8, #12]
	sub	w11, w9, w11
	ldr	w9, [x8, #20]
	add	w12, w12, w12, lsl #1
	add	w9, w12, w9
	subs	w9, w11, w9
	b.lt	LBB0_19
; %bb.16:
	ldr	w8, [x8, #24]
LBB0_17:
	sub	w8, w10, w8
	cmp	w11, w8
	b.ge	LBB0_19
; %bb.18:
	and	w8, w9, #0xfffffffe
	b	LBB0_20
LBB0_19:
	mov	w8, #-1
LBB0_20:
	str	w8, [x3]
LBB0_21:
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_currTiming,8,3                 ; @currTiming
	.comm	_HorVer,4,2                     ; @HorVer
	.no_dead_strip	___VIDisplayPositionToXY
.subsections_via_symbols
