	.file	"extr_warp_saver.c_warp_update.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	warp_update, @function
warp_update:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, 1
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	eax, DWORD PTR SPP[rip]
	mov	DWORD PTR 12[rsp], 0
	lea	r14d, 0[0+rax*8]
.L2:
	test	r14d, r14d
	jle	.L11
	movsx	rax, DWORD PTR 12[rsp]
	lea	edx, -1[r14]
	lea	r13, 1[rax+rdx]
	lea	r15, 0[0+rax*4]
	sal	r13, 2
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, QWORD PTR star[rip]
	xor	esi, esi
	mov	eax, DWORD PTR [rax+r15]
	cdq
	idiv	DWORD PTR scrw[rip]
	imul	eax, DWORD PTR bpsl[rip]
	lea	ebx, [rax+rdx]
	mov	eax, DWORD PTR banksize[rip]
	cmp	eax, ebx
	jge	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	sub	ebx, eax
	add	esi, eax
	cmp	eax, ebx
	jl	.L4
.L3:
	mov	rdi, r12
	movsx	rbx, ebx
	call	SET_ORIGIN@PLT
	mov	rdx, QWORD PTR star[rip]
	mov	rax, QWORD PTR vid[rip]
	add	rdx, r15
	mov	DWORD PTR [rax+rbx*4], 0
	mov	eax, DWORD PTR [rdx]
	add	eax, ebp
	mov	DWORD PTR [rdx], eax
	mov	esi, DWORD PTR scrw[rip]
	mov	edi, DWORD PTR scrh[rip]
	imul	edi, esi
	cmp	eax, edi
	jle	.L5
	sub	eax, edi
	mov	DWORD PTR [rdx], eax
	mov	esi, DWORD PTR scrw[rip]
.L5:
	cdq
	idiv	esi
	xor	esi, esi
	imul	eax, DWORD PTR bpsl[rip]
	lea	ebx, [rax+rdx]
	mov	eax, DWORD PTR banksize[rip]
	cmp	eax, ebx
	jge	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	sub	ebx, eax
	add	esi, eax
	cmp	eax, ebx
	jl	.L7
.L6:
	mov	rdi, r12
	movsx	rbx, ebx
	add	r15, 4
	call	SET_ORIGIN@PLT
	mov	rax, QWORD PTR vid[rip]
	mov	DWORD PTR [rax+rbx*4], ebp
	cmp	r13, r15
	jne	.L8
	add	DWORD PTR 12[rsp], r14d
.L11:
	mov	eax, r14d
	add	ebp, 1
	shr	eax, 31
	add	r14d, eax
	sar	r14d
	cmp	ebp, 5
	jne	.L2
	add	rsp, 24
	.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
	.cfi_endproc
.LFE0:
	.size	warp_update, .-warp_update
	.comm	vid,8,8
	.comm	star,8,8
	.comm	scrw,4,4
	.comm	scrh,4,4
	.comm	bpsl,4,4
	.comm	banksize,4,4
	.comm	SPP,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_warp_saver.c_warp_update.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	warp_update, %function
warp_update:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	mov	r4, #0
	mov	r10, #1
	ldr	r3, .L19
	sub	sp, sp, #20
	ldr	r3, [r3]
	ldr	r9, .L19+4
	lsl	r3, r3, #3
	ldr	r5, .L19+8
	ldr	r8, .L19+12
	ldr	fp, .L19+16
	ldr	r7, .L19+20
	str	r3, [sp, #12]
.L2:
	ldr	r3, [sp, #12]
	cmp	r3, #0
	ble	.L11
	ldr	r3, [sp, #12]
	add	r3, r3, r4
	str	r3, [sp, #8]
.L8:
	ldr	r3, [r9]
	ldr	r1, [r5]
	ldr	r0, [r3, r4, lsl #2]
	bl	__aeabi_idivmod
	ldr	r3, [r8]
	ldr	ip, [fp]
	mla	r3, r0, r3, r1
	cmp	ip, r3
	mov	r1, #0
	lsl	r2, r4, #2
	bge	.L3
.L4:
	sub	r3, r3, ip
	cmp	ip, r3
	add	r1, r1, ip
	blt	.L4
.L3:
	mov	r0, r6
	str	r2, [sp, #4]
	str	r3, [sp]
	bl	SET_ORIGIN
	mov	r2, #0
	ldr	r1, [r7]
	ldr	r3, [sp]
	ldr	ip, [r9]
	str	r2, [r1, r3, lsl #2]
	ldr	r2, [sp, #4]
	ldr	r3, .L19+24
	ldr	r0, [ip, r2]
	add	r0, r10, r0
	str	r0, [ip, r2]
	ldr	r1, [r5]
	ldr	r3, [r3]
	mul	r3, r1, r3
	cmp	r0, r3
	subgt	r0, r0, r3
	strgt	r0, [ip, r2]
	ldrgt	r1, [r5]
	bl	__aeabi_idivmod
	ldr	r3, [r8]
	ldr	r2, [fp]
	mla	r3, r0, r3, r1
	cmp	r2, r3
	mov	r1, #0
	bge	.L6
.L7:
	sub	r3, r3, r2
	cmp	r2, r3
	add	r1, r1, r2
	blt	.L7
.L6:
	mov	r0, r6
	str	r3, [sp]
	bl	SET_ORIGIN
	ldr	r3, [sp, #8]
	add	r4, r4, #1
	ldr	r2, [r7]
	cmp	r4, r3
	ldr	r3, [sp]
	str	r10, [r2, r3, lsl #2]
	bne	.L8
.L11:
	ldr	r3, [sp, #12]
	add	r10, r10, #1
	add	r3, r3, r3, lsr #31
	asr	r3, r3, #1
	cmp	r10, #5
	str	r3, [sp, #12]
	bne	.L2
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	.align	2
.L19:
	.word	SPP
	.word	star
	.word	scrw
	.word	bpsl
	.word	banksize
	.word	vid
	.word	scrh
	.size	warp_update, .-warp_update
	.comm	vid,4,4
	.comm	star,4,4
	.comm	scrw,4,4
	.comm	scrh,4,4
	.comm	bpsl,4,4
	.comm	banksize,4,4
	.comm	SPP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
