	.file	"extr_main.c_handle_mouse_input.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	handle_mouse_input
	.type	handle_mouse_input, @function
handle_mouse_input:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 40
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR GLFW_CURSOR[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR g[rip]
	mov	edi, DWORD PTR [rax]
	call	glfwGetInputMode@PLT
	mov	r8, rax
	cmp	r8, QWORD PTR GLFW_CURSOR_DISABLED[rip]
	mov	rax, QWORD PTR g[rip]
	jne	.L2
	pxor	xmm0, xmm0
	ucomisd	xmm0, QWORD PTR px.1949[rip]
	jp	.L3
	jne	.L3
	ucomisd	xmm0, QWORD PTR py.1950[rip]
	jp	.L3
	jne	.L3
.L2:
	mov	edi, DWORD PTR [rax]
	lea	rdx, py.1950[rip]
	lea	rsi, px.1949[rip]
	call	glfwGetCursorPos@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	edi, DWORD PTR [rax]
	lea	rdx, 16[rsp]
	lea	rsi, 8[rsp]
	mov	rbp, QWORD PTR 8[rax]
	call	glfwGetCursorPos@PLT
	movsd	xmm0, QWORD PTR 8[rsp]
	subsd	xmm0, QWORD PTR px.1949[rip]
	pxor	xmm1, xmm1
	movsd	xmm2, QWORD PTR .LC1[rip]
	cvtsi2sd	xmm1, QWORD PTR 0[rbp]
	cmp	QWORD PTR INVERT_MOUSE[rip], 0
	mulsd	xmm0, xmm2
	addsd	xmm0, xmm1
	cvttsd2si	rbx, xmm0
	mov	QWORD PTR 0[rbp], rbx
	jne	.L14
	movsd	xmm1, QWORD PTR 16[rsp]
	subsd	xmm1, QWORD PTR py.1950[rip]
	movsd	xmm0, QWORD PTR 8[rbp]
	mulsd	xmm1, xmm2
	subsd	xmm0, xmm1
.L6:
	movsd	QWORD PTR 8[rbp], xmm0
	test	rbx, rbx
	js	.L15
.L7:
	mov	edi, 360
	call	RADIANS@PLT
	cmp	rax, rbx
	jle	.L16
.L8:
	mov	edi, 90
	call	RADIANS@PLT
	movsd	xmm0, QWORD PTR 8[rbp]
	neg	rax
	mov	rdi, rax
	call	MAX@PLT
	mov	edi, 90
	movsd	QWORD PTR 8[rbp], xmm0
	call	RADIANS@PLT
	movsd	xmm0, QWORD PTR 8[rbp]
	mov	rdi, rax
	call	MIN@PLT
	movsd	QWORD PTR 8[rbp], xmm0
	movsd	xmm0, QWORD PTR 8[rsp]
	movsd	QWORD PTR px.1949[rip], xmm0
	movsd	xmm0, QWORD PTR 16[rsp]
	movsd	QWORD PTR py.1950[rip], xmm0
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	movsd	xmm0, QWORD PTR 16[rsp]
	subsd	xmm0, QWORD PTR py.1950[rip]
	mulsd	xmm0, xmm2
	addsd	xmm0, QWORD PTR 8[rbp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	mov	edi, 360
	call	RADIANS@PLT
	sub	QWORD PTR 0[rbp], rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, 360
	call	RADIANS@PLT
	add	rax, QWORD PTR 0[rbp]
	mov	QWORD PTR 0[rbp], rax
	mov	rbx, rax
	jmp	.L7
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	handle_mouse_input, .-handle_mouse_input
	.local	py.1950
	.comm	py.1950,8,8
	.local	px.1949
	.comm	px.1949,8,8
	.comm	g,8,8
	.comm	INVERT_MOUSE,8,8
	.comm	GLFW_CURSOR_DISABLED,8,8
	.comm	GLFW_CURSOR,4,4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	1073741824
	.long	1063549665
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_main.c_handle_mouse_input.c"
	.text
	.global	__aeabi_dcmpeq
	.global	__aeabi_dsub
	.global	__aeabi_dmul
	.global	__aeabi_i2d
	.global	__aeabi_dadd
	.global	__aeabi_d2iz
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_mouse_input
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_mouse_input, %function
handle_mouse_input:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r4, .L23
	ldr	r2, .L23+4
	ldr	r3, [r4]
	sub	sp, sp, #28
	ldr	r0, [r3]
	ldr	r3, .L23+8
	ldr	r1, [r2]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	glfwGetInputMode
	ldr	r3, .L23+12
	ldr	r4, [r4]
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L2
	ldr	r5, .L23+16
	mov	r2, #0
	ldmia	r5, {r0-r1}
	mov	r3, #0
	bl	__aeabi_dcmpeq
	cmp	r0, #0
	beq	.L3
	add	r1, r5, #8
	ldmia	r1, {r0-r1}
	mov	r2, #0
	mov	r3, #0
	bl	__aeabi_dcmpeq
	cmp	r0, #0
	beq	.L3
.L2:
	ldr	r2, .L23+20
	ldr	r0, [r4]
	sub	r1, r2, #8
	bl	glfwGetCursorPos
.L1:
	ldr	r3, .L23+8
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L3:
	ldm	r4, {r0, r4}
	mov	r1, sp
	add	r2, sp, #8
	bl	glfwGetCursorPos
	ldmia	r5, {r2-r3}
	ldmia	sp, {r0-r1}
	bl	__aeabi_dsub
	mov	r2, #1073741824
	ldr	r3, .L23+24
	bl	__aeabi_dmul
	mov	r6, r0
	ldr	r0, [r4]
	mov	r7, r1
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dadd
	bl	__aeabi_d2iz
	ldr	r3, .L23+28
	mov	r6, r0
	ldr	r3, [r3]
	str	r0, [r4]
	cmp	r3, #0
	add	r1, sp, #8
	ldmia	r1, {r0-r1}
	add	r3, r5, #8
	ldmia	r3, {r2-r3}
	bne	.L20
	bl	__aeabi_dsub
	mov	r2, #1073741824
	ldr	r3, .L23+24
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	add	r1, r4, #8
	ldmia	r1, {r0-r1}
	bl	__aeabi_dsub
.L6:
	cmp	r6, #0
	str	r0, [r4, #8]
	str	r1, [r4, #12]
	blt	.L21
.L7:
	mov	r0, #360
	bl	RADIANS
	cmp	r0, r6
	ble	.L22
.L8:
	add	r7, r4, #8
	ldmia	r7, {r6-r7}
	mov	r0, #90
	bl	RADIANS
	mov	r2, r0
	mov	r1, r7
	rsb	r2, r2, #0
	mov	r0, r6
	bl	MAX
	mov	r6, r0
	mov	r7, r1
	mov	r0, #90
	str	r6, [r4, #8]
	str	r7, [r4, #12]
	bl	RADIANS
	mov	r1, r7
	mov	r2, r0
	mov	r0, r6
	bl	MIN
	ldmia	sp, {r2-r3}
	str	r0, [r4, #8]
	str	r1, [r4, #12]
	add	r1, sp, #8
	ldmia	r1, {r0-r1}
	stm	r5, {r2-r3}
	str	r0, [r5, #8]
	str	r1, [r5, #12]
	b	.L1
.L20:
	bl	__aeabi_dsub
	mov	r2, #1073741824
	ldr	r3, .L23+24
	bl	__aeabi_dmul
	add	r3, r4, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	b	.L6
.L22:
	mov	r0, #360
	bl	RADIANS
	ldr	r3, [r4]
	sub	r3, r3, r0
	str	r3, [r4]
	b	.L8
.L21:
	mov	r0, #360
	bl	RADIANS
	ldr	r3, [r4]
	add	r6, r0, r3
	str	r6, [r4]
	b	.L7
.L19:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	g
	.word	GLFW_CURSOR
	.word	.LC0
	.word	GLFW_CURSOR_DISABLED
	.word	.LANCHOR0
	.word	.LANCHOR0+8
	.word	1063549665
	.word	INVERT_MOUSE
	.size	handle_mouse_input, .-handle_mouse_input
	.comm	g,4,4
	.comm	INVERT_MOUSE,4,4
	.comm	GLFW_CURSOR_DISABLED,4,4
	.comm	GLFW_CURSOR,4,4
	.bss
	.align	3
	.set	.LANCHOR0,. + 0
	.type	px.4233, %object
	.size	px.4233, 8
px.4233:
	.space	8
	.type	py.4234, %object
	.size	py.4234, 8
py.4234:
	.space	8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
