// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/zero/zero.c
// Function: adjustPrevious
static void
adjustPrevious(int amt)
    {
    int i;
    int delta;

    //adjust previous values upwards
    
    //printf("adjusting previous index %d (%d)\n",Spot-1,(Spot-1+SIZE2)%SIZE2);

    Window[(Spot-1+SIZE2)%SIZE2] = 0;
    
    /* adjust the previous values */
    i = 1;
    delta = (int)(amt * Factor);
    //printf("delta is %d\n",delta);
    while (abs(delta) > 0)
        {
        if (i >= SIZE) break;
        if (Spot-i-1 < 0) break;
        //printf("delta is %d\n",delta);
        if (Window[(Spot-i-1+SIZE2)%SIZE2] == 0) break;
        //printf("changing index %d from %d ",
        //    Spot-i-1,Window[(Spot-i-1+SIZE2)%SIZE2]);
        Window[(Spot-i-1+SIZE2)%SIZE2] += delta;
        if (Window[(Spot-i-1+SIZE2)%SIZE2] == 0)
            Window[(Spot-i-1+SIZE2)%SIZE2] = 1;
        //printf("to %d\n",Window[(Spot-i-1+SIZE2)%SIZE2]);
        //getchar();
        ++i;
        delta = (int)(delta * Factor);
        }

    /* adjust the future values */
    i = 1;
    delta = (int)(amt * Factor);
    while (abs(delta) > 0)
        {
        //printf("delta is %d\n",delta);
        if (i >= SIZE) break;
        if (Window[(Spot+i-1)%SIZE2] == 0) break;
        //printf("changing index %d from %d ",
        //    Spot+i-1,Window[(Spot+i-1)%SIZE2]);
        Window[(Spot+i-1)%SIZE2] += delta;
        if (Window[(Spot+i-1)%SIZE2] == 0)
            Window[(Spot+i-1)%SIZE2] = 1;
        //printf("to %d\n",Window[(Spot+i-1)%SIZE2]);
        //getchar();
        ++i;
        delta = (int)(delta * Factor);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl 0x689f(%rip), %eax      # 0x812c
subl $0x1, %eax
addl $0x15, %eax
movl $0x15, %ecx
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x68bb(%rip), %rax      # 0x8160
movl $0x0, (%rax,%rcx,4)
movl $0x1, -0x8(%rbp)
cvtsi2sdl -0x4(%rbp), %xmm0
mulsd 0x6878(%rip), %xmm0     # 0x8138
cvttsd2si %xmm0, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl $0x0, %eax
jle 0x19d1
cmpl $0xa, -0x8(%rbp)
jl 0x18e5
jmp 0x19d1
movl 0x6841(%rip), %eax      # 0x812c
subl -0x8(%rbp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jge 0x18fb
jmp 0x19d1
movl 0x682b(%rip), %eax      # 0x812c
subl -0x8(%rbp), %eax
subl $0x1, %eax
addl $0x15, %eax
movl $0x15, %ecx
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x6844(%rip), %rax      # 0x8160
cmpl $0x0, (%rax,%rcx,4)
jne 0x1927
jmp 0x19d1
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movl 0x67f9(%rip), %eax      # 0x812c
subl -0x8(%rbp), %eax
subl $0x1, %eax
addl $0x15, %eax
movl $0x15, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl -0x10(%rbp), %edx
movslq %eax, %rcx
leaq 0x680d(%rip), %rax      # 0x8160
addl (%rax,%rcx,4), %edx
leaq 0x6803(%rip), %rax      # 0x8160
movl %edx, (%rax,%rcx,4)
movl 0x67c6(%rip), %eax      # 0x812c
subl -0x8(%rbp), %eax
subl $0x1, %eax
addl $0x15, %eax
movl $0x15, %ecx
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x67df(%rip), %rax      # 0x8160
cmpl $0x0, (%rax,%rcx,4)
jne 0x19af
movl 0x679f(%rip), %eax      # 0x812c
subl -0x8(%rbp), %eax
subl $0x1, %eax
addl $0x15, %eax
movl $0x15, %ecx
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x67b8(%rip), %rax      # 0x8160
movl $0x1, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
cvtsi2sdl -0xc(%rbp), %xmm0
mulsd 0x6773(%rip), %xmm0     # 0x8138
cvttsd2si %xmm0, %eax
movl %eax, -0xc(%rbp)
jmp 0x18c7
movl $0x1, -0x8(%rbp)
cvtsi2sdl -0x4(%rbp), %xmm0
mulsd 0x6753(%rip), %xmm0     # 0x8138
cvttsd2si %xmm0, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl $0x0, %eax
jle 0x1ad4
cmpl $0xa, -0x8(%rbp)
jl 0x1a0a
jmp 0x1ad4
movl 0x671c(%rip), %eax      # 0x812c
addl -0x8(%rbp), %eax
subl $0x1, %eax
movl $0x15, %ecx
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x6738(%rip), %rax      # 0x8160
cmpl $0x0, (%rax,%rcx,4)
jne 0x1a33
jmp 0x1ad4
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
movl 0x66ed(%rip), %eax      # 0x812c
addl -0x8(%rbp), %eax
subl $0x1, %eax
movl $0x15, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl -0x14(%rbp), %edx
movslq %eax, %rcx
leaq 0x6704(%rip), %rax      # 0x8160
addl (%rax,%rcx,4), %edx
leaq 0x66fa(%rip), %rax      # 0x8160
movl %edx, (%rax,%rcx,4)
movl 0x66bd(%rip), %eax      # 0x812c
addl -0x8(%rbp), %eax
subl $0x1, %eax
movl $0x15, %ecx
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x66d9(%rip), %rax      # 0x8160
cmpl $0x0, (%rax,%rcx,4)
jne 0x1ab2
movl 0x6699(%rip), %eax      # 0x812c
addl -0x8(%rbp), %eax
subl $0x1, %eax
movl $0x15, %ecx
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x66b5(%rip), %rax      # 0x8160
movl $0x1, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
cvtsi2sdl -0xc(%rbp), %xmm0
mulsd 0x6670(%rip), %xmm0     # 0x8138
cvttsd2si %xmm0, %eax
movl %eax, -0xc(%rbp)
jmp 0x19ec
popq %rbp
retq
nopw %cs:(%rax,%rax)