	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function winraw_init_mouse_xy_mapping
LCPI0_0:
	.quad	0x40efffe000000000              ## double 65535
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_winraw_init_mouse_xy_mapping:          ## @winraw_init_mouse_xy_mapping
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$32, %rsp
	leaq	-32(%rbp), %rdi
	callq	_video_driver_get_viewport_info
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	_g_mouse_cnt@GOTPCREL(%rip), %r8
	cmpl	$0, (%r8)
	je	LBB0_4
## %bb.2:
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	%edx, %ecx
	shrl	$31, %ecx
	addl	%edx, %ecx
	sarl	%ecx
	addl	-32(%rbp), %ecx
	movl	%esi, %edx
	shrl	$31, %edx
	addl	%esi, %edx
	sarl	%edx
	addl	-24(%rbp), %edx
	movq	_g_mice@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, (%rsi,%rdi,8)
	movl	%edx, 4(%rsi,%rdi,8)
	incq	%rdi
	movl	(%r8), %eax
	cmpq	%rax, %rdi
	jb	LBB0_3
LBB0_4:
	cvtsi2sdq	-8(%rbp), %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	divsd	%xmm1, %xmm0
	movq	_g_view_abs_ratio_x@GOTPCREL(%rip), %rax
	movsd	%xmm0, (%rax)
	xorps	%xmm0, %xmm0
	cvtsi2sdq	-16(%rbp), %xmm0
	divsd	%xmm1, %xmm0
	movq	_g_view_abs_ratio_y@GOTPCREL(%rip), %rax
	movsd	%xmm0, (%rax)
	movq	_g_mouse_xy_mapping_ready@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_5:
	addq	$32, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_mouse_cnt,4,2                ## @g_mouse_cnt
	.comm	_g_mice,8,3                     ## @g_mice
	.comm	_g_view_abs_ratio_x,8,3         ## @g_view_abs_ratio_x
	.comm	_g_view_abs_ratio_y,8,3         ## @g_view_abs_ratio_y
	.comm	_g_mouse_xy_mapping_ready,4,2   ## @g_mouse_xy_mapping_ready
	.no_dead_strip	_winraw_init_mouse_xy_mapping
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function winraw_init_mouse_xy_mapping
_winraw_init_mouse_xy_mapping:          ; @winraw_init_mouse_xy_mapping
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x0, sp
	bl	_video_driver_get_viewport_info
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [sp, #4]
	ldr	w9, [sp, #12]
	cmp	w8, #0
	cinc	w10, w8, lt
	cmp	w9, #0
	cinc	w11, w9, lt
Lloh0:
	adrp	x8, _g_mouse_cnt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_mouse_cnt@GOTPAGEOFF]
	ldr	w9, [x8]
	cbz	w9, LBB0_4
; %bb.2:
	mov	x9, #0
	ldr	w12, [sp]
	ldr	w13, [sp, #8]
	add	w10, w12, w10, asr #1
	add	w11, w13, w11, asr #1
Lloh2:
	adrp	x12, _g_mice@GOTPAGE
Lloh3:
	ldr	x12, [x12, _g_mice@GOTPAGEOFF]
Lloh4:
	ldr	x12, [x12]
	add	x12, x12, #4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	stp	w10, w11, [x12, #-4]
	add	x9, x9, #1
	ldr	w13, [x8]
	add	x12, x12, #8
	cmp	x9, x13
	b.lo	LBB0_3
LBB0_4:
	ldp	d1, d0, [sp, #16]
	scvtf	d0, d0
	mov	x8, #281337537757184
	movk	x8, #16623, lsl #48
	fmov	d2, x8
	fdiv	d0, d0, d2
Lloh5:
	adrp	x8, _g_view_abs_ratio_x@GOTPAGE
Lloh6:
	ldr	x8, [x8, _g_view_abs_ratio_x@GOTPAGEOFF]
Lloh7:
	str	d0, [x8]
	scvtf	d0, d1
Lloh8:
	adrp	x8, _g_view_abs_ratio_y@GOTPAGE
Lloh9:
	ldr	x8, [x8, _g_view_abs_ratio_y@GOTPAGEOFF]
	fdiv	d0, d0, d2
Lloh10:
	str	d0, [x8]
Lloh11:
	adrp	x8, _g_mouse_xy_mapping_ready@GOTPAGE
Lloh12:
	ldr	x8, [x8, _g_mouse_xy_mapping_ready@GOTPAGEOFF]
	mov	w9, #1
Lloh13:
	str	w9, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_g_mouse_cnt,4,2                ; @g_mouse_cnt
	.comm	_g_mice,8,3                     ; @g_mice
	.comm	_g_view_abs_ratio_x,8,3         ; @g_view_abs_ratio_x
	.comm	_g_view_abs_ratio_y,8,3         ; @g_view_abs_ratio_y
	.comm	_g_mouse_xy_mapping_ready,4,2   ; @g_mouse_xy_mapping_ready
	.no_dead_strip	_winraw_init_mouse_xy_mapping
.subsections_via_symbols
