	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IN_ActivateWin32Mouse          ## -- Begin function IN_ActivateWin32Mouse
	.p2align	4, 0x90
_IN_ActivateWin32Mouse:                 ## @IN_ActivateWin32Mouse
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SM_CXSCREEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GetSystemMetrics
	movl	%eax, %r14d
	movq	_SM_CYSCREEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GetSystemMetrics
	movl	%eax, %ebx
	movq	_g_wv@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	-40(%rbp), %rsi
	callq	_GetWindowRect
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movl	$0, -40(%rbp)
	xorl	%eax, %eax
LBB0_2:
	movl	-36(%rbp), %ecx
	testl	%ecx, %ecx
	jns	LBB0_4
## %bb.3:
	movl	$0, -36(%rbp)
	xorl	%ecx, %ecx
LBB0_4:
	movl	-32(%rbp), %esi
	cmpl	%r14d, %esi
	jl	LBB0_6
## %bb.5:
	decl	%r14d
	movl	%r14d, -32(%rbp)
	movl	%r14d, %esi
LBB0_6:
	movl	-28(%rbp), %edx
	decl	%ebx
	cmpl	%ebx, %edx
	jl	LBB0_8
## %bb.7:
	movl	%ebx, -28(%rbp)
	movl	%ebx, %edx
LBB0_8:
	addl	%ecx, %edx
	addl	%esi, %eax
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	movq	_window_center_x@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	movl	%edx, %esi
	shrl	$31, %esi
	addl	%edx, %esi
	sarl	%esi
	movq	_window_center_y@GOTPCREL(%rip), %rax
	movl	%esi, (%rax)
	callq	_SetCursorPos
	movl	(%r15), %edi
	callq	_SetCapture
	leaq	-40(%rbp), %rdi
	callq	_ClipCursor
	movq	_FALSE@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_ShowCursor
	testq	%rax, %rax
	jns	LBB0_9
## %bb.10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SM_CXSCREEN,4,2                ## @SM_CXSCREEN
	.comm	_SM_CYSCREEN,4,2                ## @SM_CYSCREEN
	.comm	_g_wv,4,2                       ## @g_wv
	.comm	_window_center_x,4,2            ## @window_center_x
	.comm	_window_center_y,4,2            ## @window_center_y
	.comm	_FALSE,4,2                      ## @FALSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IN_ActivateWin32Mouse          ; -- Begin function IN_ActivateWin32Mouse
	.p2align	2
_IN_ActivateWin32Mouse:                 ; @IN_ActivateWin32Mouse
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _SM_CXSCREEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SM_CXSCREEN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_GetSystemMetrics
	mov	x20, x0
Lloh3:
	adrp	x8, _SM_CYSCREEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SM_CYSCREEN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_GetSystemMetrics
	mov	x19, x0
Lloh6:
	adrp	x21, _g_wv@GOTPAGE
Lloh7:
	ldr	x21, [x21, _g_wv@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, sp
	bl	_GetWindowRect
	ldr	w8, [sp]
	tbnz	w8, #31, LBB0_9
; %bb.1:
	ldr	w9, [sp, #4]
	tbnz	w9, #31, LBB0_10
LBB0_2:
	ldr	w10, [sp, #8]
	cmp	w10, w20
	b.lt	LBB0_4
; %bb.3:
	sub	w10, w20, #1
	str	w10, [sp, #8]
LBB0_4:
	ldr	w11, [sp, #12]
	sub	w12, w19, #1
	cmp	w11, w12
	b.lt	LBB0_6
; %bb.5:
	str	w12, [sp, #12]
	mov	x11, x12
LBB0_6:
	add	w8, w8, w10
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w0, w8, #1
Lloh8:
	adrp	x8, _window_center_x@GOTPAGE
Lloh9:
	ldr	x8, [x8, _window_center_x@GOTPAGEOFF]
Lloh10:
	str	w0, [x8]
	add	w8, w11, w9
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
Lloh11:
	adrp	x8, _window_center_y@GOTPAGE
Lloh12:
	ldr	x8, [x8, _window_center_y@GOTPAGEOFF]
Lloh13:
	str	w1, [x8]
	bl	_SetCursorPos
	ldr	w0, [x21]
	bl	_SetCapture
	mov	x0, sp
	bl	_ClipCursor
Lloh14:
	adrp	x19, _FALSE@GOTPAGE
Lloh15:
	ldr	x19, [x19, _FALSE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_ShowCursor
	tbz	x0, #63, LBB0_7
; %bb.8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
	mov	w8, #0
	str	wzr, [sp]
	ldr	w9, [sp, #4]
	tbz	w9, #31, LBB0_2
LBB0_10:
	mov	w9, #0
	str	wzr, [sp, #4]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SM_CXSCREEN,4,2                ; @SM_CXSCREEN
	.comm	_SM_CYSCREEN,4,2                ; @SM_CYSCREEN
	.comm	_g_wv,4,2                       ; @g_wv
	.comm	_window_center_x,4,2            ; @window_center_x
	.comm	_window_center_y,4,2            ; @window_center_y
	.comm	_FALSE,4,2                      ; @FALSE
.subsections_via_symbols
