	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function handle_mouse_input
LCPI0_0:
	.quad	0x3f647ae140000000              ## double 0.0024999999441206455
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_1:
	.quad	0x8000000000000000              ## double -0
	.quad	0x8000000000000000              ## double -0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_handle_mouse_input
	.p2align	4, 0x90
_handle_mouse_input:                    ## @handle_mouse_input
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_g@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_GLFW_CURSOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_glfwGetInputMode
	movq	_GLFW_CURSOR_DISABLED@GOTPCREL(%rip), %rdx
	movq	(%rbx), %rcx
	cmpq	(%rdx), %rax
	jne	LBB0_10
## %bb.1:
	movq	8(%rcx), %r14
	movsd	_handle_mouse_input.px(%rip), %xmm1 ## xmm1 = mem[0],zero
	xorpd	%xmm0, %xmm0
	ucomisd	%xmm0, %xmm1
	jne	LBB0_3
	jp	LBB0_3
## %bb.2:
	movsd	_handle_mouse_input.py(%rip), %xmm1 ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jne	LBB0_3
	jp	LBB0_3
LBB0_10:
	movl	(%rcx), %edi
	leaq	_handle_mouse_input.px(%rip), %rsi
	leaq	_handle_mouse_input.py(%rip), %rdx
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_glfwGetCursorPos               ## TAILCALL
LBB0_3:
	movl	(%rcx), %edi
	leaq	-40(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	callq	_glfwGetCursorPos
	movsd	-40(%rbp), %xmm1                ## xmm1 = mem[0],zero
	subsd	_handle_mouse_input.px(%rip), %xmm1
	cvtsi2sdq	(%r14), %xmm2
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	mulsd	%xmm0, %xmm1
	addsd	%xmm2, %xmm1
	cvttsd2si	%xmm1, %rbx
	movq	%rbx, (%r14)
	movq	_INVERT_MOUSE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movsd	-32(%rbp), %xmm1                ## xmm1 = mem[0],zero
	subsd	_handle_mouse_input.py(%rip), %xmm1
	jne	LBB0_5
## %bb.4:
	xorpd	LCPI0_1(%rip), %xmm1
LBB0_5:
	mulsd	%xmm0, %xmm1
	addsd	8(%r14), %xmm1
	movsd	%xmm1, 8(%r14)
	testq	%rbx, %rbx
	jns	LBB0_7
## %bb.6:
	movl	$360, %edi                      ## imm = 0x168
	callq	_RADIANS
	movq	%rax, %rbx
	addq	(%r14), %rbx
	movq	%rbx, (%r14)
LBB0_7:
	movl	$360, %edi                      ## imm = 0x168
	callq	_RADIANS
	cmpq	%rax, %rbx
	jl	LBB0_9
## %bb.8:
	movl	$360, %edi                      ## imm = 0x168
	callq	_RADIANS
	subq	%rax, (%r14)
LBB0_9:
	movsd	8(%r14), %xmm0                  ## xmm0 = mem[0],zero
	movsd	%xmm0, -24(%rbp)                ## 8-byte Spill
	movl	$90, %edi
	callq	_RADIANS
	negq	%rax
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movq	%rax, %rdi
	callq	_MAX
	movsd	%xmm0, -24(%rbp)                ## 8-byte Spill
	movsd	%xmm0, 8(%r14)
	movl	$90, %edi
	callq	_RADIANS
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movq	%rax, %rdi
	callq	_MIN
	movsd	%xmm0, 8(%r14)
	movsd	-40(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	%xmm0, _handle_mouse_input.px(%rip)
	movsd	-32(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	%xmm0, _handle_mouse_input.py(%rip)
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g,8,3                          ## @g
	.comm	_GLFW_CURSOR,4,2                ## @GLFW_CURSOR
	.comm	_GLFW_CURSOR_DISABLED,8,3       ## @GLFW_CURSOR_DISABLED
.zerofill __DATA,__bss,_handle_mouse_input.px,8,3 ## @handle_mouse_input.px
.zerofill __DATA,__bss,_handle_mouse_input.py,8,3 ## @handle_mouse_input.py
	.comm	_INVERT_MOUSE,8,3               ## @INVERT_MOUSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handle_mouse_input             ; -- Begin function handle_mouse_input
	.p2align	2
_handle_mouse_input:                    ; @handle_mouse_input
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 b8, -56
	.cfi_offset b9, -64
Lloh0:
	adrp	x19, _g@GOTPAGE
Lloh1:
	ldr	x19, [x19, _g@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh2:
	adrp	x8, _GLFW_CURSOR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GLFW_CURSOR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_glfwGetInputMode
Lloh5:
	adrp	x8, _GLFW_CURSOR_DISABLED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GLFW_CURSOR_DISABLED@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x8]
	ldr	x8, [x19]
	cmp	x0, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x21, [x8, #8]
	adrp	x19, _handle_mouse_input.px@PAGE
	ldr	d0, [x19, _handle_mouse_input.px@PAGEOFF]
	adrp	x20, _handle_mouse_input.py@PAGE
	fcmp	d0, #0.0
	b.ne	LBB0_4
; %bb.2:
	ldr	d0, [x20, _handle_mouse_input.py@PAGEOFF]
	fcmp	d0, #0.0
	b.ne	LBB0_4
LBB0_3:
Lloh8:
	adrp	x1, _handle_mouse_input.px@PAGE
Lloh9:
	add	x1, x1, _handle_mouse_input.px@PAGEOFF
	ldr	w0, [x8]
Lloh10:
	adrp	x2, _handle_mouse_input.py@PAGE
Lloh11:
	add	x2, x2, _handle_mouse_input.py@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_glfwGetCursorPos
LBB0_4:
	ldr	w0, [x8]
	add	x1, sp, #8
	mov	x2, sp
	bl	_glfwGetCursorPos
	ldr	d0, [sp, #8]
	ldr	d1, [x19, _handle_mouse_input.px@PAGEOFF]
	fsub	d0, d0, d1
	ldp	d1, d2, [x21]
	scvtf	d1, d1
	mov	x8, #1073741824
	movk	x8, #31457, lsl #32
	movk	x8, #16228, lsl #48
	fmov	d3, x8
	fmadd	d0, d0, d3, d1
	fcvtzs	x22, d0
	str	x22, [x21]
Lloh12:
	adrp	x8, _INVERT_MOUSE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INVERT_MOUSE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	d0, [sp]
	ldr	d1, [x20, _handle_mouse_input.py@PAGEOFF]
	fsub	d0, d0, d1
	fneg	d1, d0
	cmp	x8, #0
	fcsel	d0, d1, d0, eq
	fmadd	d0, d0, d3, d2
	str	d0, [x21, #8]
	tbz	x22, #63, LBB0_6
; %bb.5:
	mov	w0, #360
	bl	_RADIANS
	ldr	x8, [x21]
	add	x22, x8, x0
	str	x22, [x21]
LBB0_6:
	mov	w0, #360
	bl	_RADIANS
	cmp	x22, x0
	b.lt	LBB0_8
; %bb.7:
	mov	w0, #360
	bl	_RADIANS
	ldr	x8, [x21]
	sub	x8, x8, x0
	str	x8, [x21]
LBB0_8:
	ldr	d8, [x21, #8]
	mov	w0, #90
	bl	_RADIANS
	neg	x0, x0
	fmov	d0, d8
	bl	_MAX
	fmov	d8, d0
	str	d0, [x21, #8]
	mov	w0, #90
	bl	_RADIANS
	fmov	d0, d8
	bl	_MIN
	str	d0, [x21, #8]
	ldr	d0, [sp, #8]
	str	d0, [x19, _handle_mouse_input.px@PAGEOFF]
	ldr	d0, [sp]
	str	d0, [x20, _handle_mouse_input.py@PAGEOFF]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_g,8,3                          ; @g
	.comm	_GLFW_CURSOR,4,2                ; @GLFW_CURSOR
	.comm	_GLFW_CURSOR_DISABLED,8,3       ; @GLFW_CURSOR_DISABLED
.zerofill __DATA,__bss,_handle_mouse_input.px,8,3 ; @handle_mouse_input.px
.zerofill __DATA,__bss,_handle_mouse_input.py,8,3 ; @handle_mouse_input.py
	.comm	_INVERT_MOUSE,8,3               ; @INVERT_MOUSE
.subsections_via_symbols
