// File: /workspace/github_c_makefile_star2_O0/dapogon[P]cellcoal/src/eigen.c
// Function: unbalance
void unbalance(int n,double vr[],double vi[], int low, int hi, double scale[])
{
    int i,j,k;
    double tmp;

    for (i = low; i <= hi; i++) {
        for (j = 0; j < n; j++) {
            vr[pos(i,j,n)] *= scale[i];
            vi[pos(i,j,n)] *= scale[i];
        }
    }

    for (i = low - 1; i >= 0; i--) {
        if ((k = (int)scale[i]) != i) {
            for (j = 0; j < n; j++) {
                tmp = vr[pos(i,j,n)];
                vr[pos(i,j,n)] = vr[pos(k,j,n)];
                vr[pos(k,j,n)] = tmp;

                tmp = vi[pos(i,j,n)];
                vi[pos(i,j,n)] = vi[pos(k,j,n)];
                vi[pos(k,j,n)] = tmp;
            }
        }
    }

    for (i = hi + 1; i < n; i++) {
        if ((k = (int)scale[i]) != i) {
            for (j = 0; j < n; j++) {
                tmp = vr[pos(i,j,n)];
                vr[pos(i,j,n)] = vr[pos(k,j,n)];
                vr[pos(k,j,n)] = tmp;

                tmp = vi[pos(i,j,n)];
                vi[pos(i,j,n)] = vi[pos(k,j,n)];
                vi[pos(k,j,n)] = tmp;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jg 0x2615f
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x26152
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x260ef
jmp 0x26154
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x260e0
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jl 0x26282
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cvttsd2si (%rax,%rcx,8), %eax
movl %eax, -0x34(%rbp)
cmpl -0x2c(%rbp), %eax
je 0x26272
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x26270
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x40(%rbp), %xmm0
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x40(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x26192
jmp 0x26272
jmp 0x26274
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x26168
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x263a7
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cvttsd2si (%rax,%rcx,8), %eax
movl %eax, -0x34(%rbp)
cmpl -0x2c(%rbp), %eax
je 0x26397
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x26395
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x40(%rbp), %xmm0
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x40(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
imull -0x4(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x262b7
jmp 0x26397
jmp 0x26399
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2628b
popq %rbp
retq
nopl (%rax)