	.file	"extr_monitor.c__glfwInputMonitorChange.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	_glfwInputMonitorChange
	.type	_glfwInputMonitorChange, @function
_glfwInputMonitorChange:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rdi, _glfw[rip]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	ebp, DWORD PTR _glfw[rip]
	mov	r14, QWORD PTR _glfw[rip+8]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	_glfwPlatformGetMonitors@PLT
	mov	esi, DWORD PTR _glfw[rip]
	mov	QWORD PTR _glfw[rip+8], rax
	test	esi, esi
	jle	.L2
	lea	eax, -1[rbp]
	xor	r13d, r13d
	lea	r12, 8[r14+rax*8]
	lea	rax, _glfw[rip]
	mov	QWORD PTR 8[rsp], rax
	.p2align 4,,10
	.p2align 3
.L3:
	lea	rbx, 0[0+r13*8]
	mov	r15, r14
	test	ebp, ebp
	jg	.L6
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	add	r15, 8
	cmp	r15, r12
	je	.L5
.L6:
	mov	rax, QWORD PTR _glfw[rip+8]
	mov	rsi, QWORD PTR [r15]
	mov	rdi, QWORD PTR [rax+rbx]
	call	_glfwPlatformIsSameMonitor@PLT
	test	rax, rax
	je	.L4
	mov	rax, QWORD PTR _glfw[rip+8]
	mov	rdi, QWORD PTR [rax+rbx]
	call	_glfwFreeMonitor@PLT
	mov	rdx, QWORD PTR [r15]
	mov	rax, QWORD PTR _glfw[rip+8]
	mov	QWORD PTR [rax+rbx], rdx
.L5:
	mov	rax, QWORD PTR 8[rsp]
	add	r13, 1
	mov	esi, DWORD PTR [rax]
	cmp	esi, r13d
	jg	.L3
.L2:
	test	ebp, ebp
	jle	.L9
	lea	eax, -1[rbp]
	mov	r15, r14
	lea	r13, 20[rsp]
	lea	r12, 8[r14+rax*8]
	.p2align 4,,10
	.p2align 3
.L10:
	test	esi, esi
	jle	.L13
	mov	rax, QWORD PTR _glfw[rip+8]
	lea	ecx, -1[rsi]
	mov	rdx, QWORD PTR [r15]
	lea	rcx, 8[rax+rcx*8]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L41:
	add	rax, 8
	cmp	rcx, rax
	je	.L13
.L12:
	cmp	rdx, QWORD PTR [rax]
	jne	.L41
	add	r15, 8
	cmp	r15, r12
	jne	.L10
.L9:
	lea	rax, _glfw[rip]
	xor	ebx, ebx
	mov	QWORD PTR 8[rsp], rax
	test	esi, esi
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L18:
	test	ebp, ebp
	jle	.L25
	mov	rax, QWORD PTR _glfw[rip+8]
	xor	edx, edx
	mov	rcx, QWORD PTR [rax+rbx*8]
	mov	rax, r14
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L20:
	add	edx, 1
	add	rax, 8
	cmp	ebp, edx
	je	.L25
.L24:
	cmp	rcx, QWORD PTR [rax]
	jne	.L20
	mov	QWORD PTR [rax], 0
	cmp	ebp, edx
	jle	.L25
.L23:
	mov	rax, QWORD PTR 8[rsp]
	add	rbx, 1
	cmp	DWORD PTR [rax], ebx
	jg	.L18
.L19:
	mov	esi, ebp
	mov	rdi, r14
	call	_glfwFreeMonitors@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L42
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	rax, QWORD PTR _glfw[rip+16]
	test	rax, rax
	je	.L23
	mov	rdx, QWORD PTR _glfw[rip+8]
	mov	esi, DWORD PTR GLFW_CONNECTED[rip]
	mov	rdi, QWORD PTR [rdx+rbx*8]
	call	rax
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rbx, QWORD PTR _glfw[rip+24]
	test	rbx, rbx
	jne	.L15
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rbx, QWORD PTR 8[rbx]
	test	rbx, rbx
	je	.L27
.L15:
	mov	rax, QWORD PTR [r15]
	cmp	QWORD PTR [rbx], rax
	jne	.L14
	lea	rsi, 16[rsp]
	mov	rdi, rbx
	mov	rdx, r13
	call	_glfwPlatformGetWindowSize@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 104
	xor	edx, edx
	mov	rdi, rbx
	push	0
	.cfi_def_cfa_offset 112
	mov	r9d, DWORD PTR 36[rsp]
	xor	ecx, ecx
	xor	esi, esi
	mov	r8d, DWORD PTR 32[rsp]
	call	_glfwPlatformSetWindowMonitor@PLT
	mov	rbx, QWORD PTR 8[rbx]
	pop	rax
	.cfi_def_cfa_offset 104
	pop	rdx
	.cfi_def_cfa_offset 96
	test	rbx, rbx
	jne	.L15
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rax, QWORD PTR _glfw[rip+16]
	test	rax, rax
	je	.L39
	mov	esi, DWORD PTR GLFW_DISCONNECTED[rip]
	mov	rdi, QWORD PTR [r15]
	call	rax
.L39:
	add	r15, 8
	mov	esi, DWORD PTR _glfw[rip]
	cmp	r15, r12
	jne	.L10
	jmp	.L9
.L42:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	_glfwInputMonitorChange, .-_glfwInputMonitorChange
	.comm	_glfw,32,32
	.comm	GLFW_DISCONNECTED,4,4
	.comm	GLFW_CONNECTED,4,4
	.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_monitor.c__glfwInputMonitorChange.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	_glfwInputMonitorChange
	.syntax unified
	.arm
	.fpu softvfp
	.type	_glfwInputMonitorChange, %function
_glfwInputMonitorChange:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r7, .L42
	ldr	r3, .L42+4
	sub	sp, sp, #36
	mov	r0, r7
	ldm	r7, {r6, r8}
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	_glfwPlatformGetMonitors
	ldr	ip, [r7]
	str	r0, [r7, #4]
	cmp	ip, #0
	movgt	fp, #0
	ble	.L3
.L2:
	cmp	r6, #0
	movgt	r4, r8
	movgt	r5, #0
	lslgt	r10, fp, #2
	bgt	.L6
	b	.L5
.L4:
	add	r5, r5, #1
	cmp	r6, r5
	beq	.L5
.L6:
	ldr	r3, [r7, #4]
	ldr	r1, [r4]
	ldr	r0, [r3, r10]
	bl	_glfwPlatformIsSameMonitor
	cmp	r0, #0
	mov	r9, r4
	add	r4, r4, #4
	beq	.L4
	ldr	r3, [r7, #4]
	ldr	r0, [r3, r10]
	bl	_glfwFreeMonitor
	ldr	r2, [r9]
	ldr	r3, [r7, #4]
	str	r2, [r3, r10]
.L5:
	ldr	ip, [r7]
	add	fp, fp, #1
	cmp	ip, fp
	bgt	.L2
.L3:
	cmp	r6, #0
	ble	.L9
	mov	r4, r8
	mov	r5, #0
	ldr	r9, .L42+8
.L10:
	cmp	ip, #0
	ble	.L13
	ldr	r2, [r7, #4]
	mov	r3, #0
	ldr	r0, [r4]
	sub	r2, r2, #4
	b	.L12
.L40:
	add	r3, r3, #1
	cmp	ip, r3
	beq	.L13
.L12:
	ldr	r1, [r2, #4]!
	cmp	r0, r1
	bne	.L40
	add	r5, r5, #1
	cmp	r6, r5
	add	r4, r4, #4
	bne	.L10
.L9:
	cmp	ip, #0
	ble	.L19
	mov	r9, #0
	mov	r4, r9
	ldr	r5, .L42+12
.L18:
	cmp	r6, #0
	ble	.L25
	ldr	r1, [r7, #4]
	mov	r3, r8
	mov	r2, #0
	ldr	ip, [r1, r9, lsl #2]
	b	.L24
.L20:
	add	r2, r2, #1
	cmp	r6, r2
	beq	.L25
.L24:
	ldr	r0, [r3]
	mov	r1, r3
	cmp	ip, r0
	add	r3, r3, #4
	bne	.L20
	cmp	r6, r2
	str	r4, [r1]
	ble	.L25
.L23:
	ldr	r3, [r7]
	add	r9, r9, #1
	cmp	r3, r9
	bgt	.L18
.L19:
	mov	r1, r6
	mov	r0, r8
	bl	_glfwFreeMonitors
	ldr	r3, .L42+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L41
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	ldr	r3, [r7, #8]
	cmp	r3, #0
	beq	.L23
	ldr	r2, [r7, #4]
	ldr	r1, [r5]
	ldr	r0, [r2, r9, lsl #2]
	blx	r3
	b	.L23
.L13:
	ldr	r10, [r7, #12]
	cmp	r10, #0
	beq	.L27
	mov	fp, #0
	b	.L15
.L14:
	ldr	r10, [r10, #4]
	cmp	r10, #0
	beq	.L27
.L15:
	ldr	r2, [r10]
	ldr	r3, [r4]
	cmp	r2, r3
	bne	.L14
	mov	r0, r10
	add	r2, sp, #24
	add	r1, sp, #20
	bl	_glfwPlatformGetWindowSize
	mov	r3, #0
	ldr	r0, [sp, #20]
	ldr	ip, [sp, #24]
	mov	r2, r3
	stm	sp, {r0, ip}
	mov	r1, r3
	mov	r0, r10
	str	fp, [sp, #8]
	bl	_glfwPlatformSetWindowMonitor
	ldr	r10, [r10, #4]
	cmp	r10, #0
	bne	.L15
.L27:
	ldr	r3, [r7, #8]
	cmp	r3, #0
	beq	.L38
	ldr	r1, [r9]
	ldr	r0, [r4]
	blx	r3
.L38:
	add	r5, r5, #1
	cmp	r6, r5
	ldr	ip, [r7]
	add	r4, r4, #4
	bne	.L10
	b	.L9
.L41:
	bl	__stack_chk_fail
.L43:
	.align	2
.L42:
	.word	_glfw
	.word	.LC0
	.word	GLFW_DISCONNECTED
	.word	GLFW_CONNECTED
	.size	_glfwInputMonitorChange, .-_glfwInputMonitorChange
	.comm	_glfw,16,4
	.comm	GLFW_DISCONNECTED,4,4
	.comm	GLFW_CONNECTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
