// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: solutions_generation(std::vector<solution, std::allocator<solution>>&)
void solutions_generation(vector<solution> &soluciones)
{
    //cout << "solutions_generation()" << endl;
    // Fixed seed
    srand(123456789*iteration);
    soluciones.clear();

    int i, j, k, r;
    int ids[bs.size()];
    int tmp;

    // Sorted sequence of the rectangles
    for (i = 0; i < (int)bs.size(); i++) ids[i] = i+1;

    // Shuffling rectangles order
    for (i = 0; i < popsize; i++) {

        // filling strip with 0
        int **strip_tmp;
        strip_tmp = new int*[strip_width];
        for (j = 0; j < strip_width; j++) {
            strip_tmp[j] = new int[strip_height];
            for (k = 0; k < strip_height; k++) {
                strip_tmp[j][k] = 0;
            }
        }

        solution tmp_sol;
        for (j = 0; j < (int)bs.size(); j++) {
            r = j + (rand() % (bs.size()-j));
            tmp = ids[j];
            ids[j] = ids[r];
            ids[r] = tmp;
        }

        // Adding shuffled rectangles on the solutions structure
        for (j = 0; j < (int)bs.size(); j++) {
            tmp_sol.items.push_back(ids[j]);
            tmp_sol.a.push_back(0);
            tmp_sol.b.push_back(0);
        }

        // tmp solution fitness
        tmp_sol.fitness = -1.0;
        tmp_sol.height  = 0;
        tmp_sol.p = 0.0;
        tmp_sol.strip = strip_tmp;

        soluciones.push_back(tmp_sol);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
imull $0x75bcd15, 0xad66(%rip), %edi # imm = 0x75BCD15
callq 0x4230
movq %rbx, -0x40(%rbp)
movq %rbx, %rdi
callq 0x743e
movq 0xad36(%rip), %rax      # 0x11360
subq 0xad27(%rip), %rax      # 0x11358
pushq $0xc
popq %rcx
cqto
idivq %rcx
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
movq %rsp, %r12
subq %rcx, %r12
movq %r12, %rsp
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x6667
leaq 0x1(%rcx), %rdx
movl %edx, (%r12,%rcx,4)
movq %rdx, %rcx
jmp 0x6655
xorl %eax, %eax
cmpb $0x1, 0xad10(%rip)      # 0x11380
jne 0x6836
cmpl $0x31, %eax
ja 0x6836
movq %rax, -0x48(%rbp)
movslq 0xace6(%rip), %r15      # 0x11370
leaq (,%r15,8), %rdi
testq %r15, %r15
pushq $-0x1
popq %rbx
cmovsq %rbx, %rdi
callq 0x4030
movq %rax, -0x38(%rbp)
movslq 0xacc8(%rip), %rax      # 0x11374
leaq (,%rax,4), %r14
testq %rax, %rax
cmovsq %rbx, %r14
testl %eax, %eax
movl $0x0, %r13d
cmovgl %eax, %r13d
testl %r15d, %r15d
movl $0x0, %ebx
cmovgl %r15d, %ebx
xorl %r15d, %r15d
cmpq %rbx, %r15
je 0x6700
movq %r14, %rdi
callq 0x4030
movq -0x38(%rbp), %rcx
movq %rax, (%rcx,%r15,8)
xorl %ecx, %ecx
cmpq %rcx, %r13
je 0x66fb
andl $0x0, (%rax,%rcx,4)
incq %rcx
jmp 0x66ed
incq %r15
jmp 0x66d6
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
andq $0x0, -0x70(%rbp)
movq 0xac38(%rip), %rcx      # 0x11360
movq 0xac29(%rip), %r8       # 0x11358
xorl %r14d, %r14d
xorl %r13d, %r13d
pushq $0xc
popq %rbx
movq %rcx, %rax
subq %r8, %rax
cqto
idivq %rbx
cltq
cmpq %rax, %r13
jge 0x6797
callq 0x4090
movslq %eax, %rsi
movq 0xac07(%rip), %rcx      # 0x11360
movq 0xabf8(%rip), %r8       # 0x11358
movq %rcx, %rax
subq %r8, %rax
cqto
idivq %rbx
movq %rax, %rdi
addq %r14, %rdi
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
addl %r13d, %edx
movl (%r12,%r13,4), %eax
movslq %edx, %rdx
movl (%r12,%rdx,4), %esi
movl %esi, (%r12,%r13,4)
movl %eax, (%r12,%rdx,4)
incq %r13
decq %r14
jmp 0x6738
movq %r12, %r14
xorl %r13d, %r13d
subq %r8, %rcx
movq %rcx, %rax
cqto
idivq %rbx
cltq
cmpq %rax, %r13
jge 0x67fc
leaq -0xb0(%rbp), %rdi
movq %r14, %rsi
callq 0x7446
andl $0x0, -0x2c(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0x2c(%rbp), %r15
movq %r15, %rsi
callq 0x9da2
andl $0x0, -0x2c(%rbp)
leaq -0x80(%rbp), %rdi
movq %r15, %rsi
callq 0x9da2
incq %r13
movq 0xab71(%rip), %rcx      # 0x11360
movq 0xab62(%rip), %r8       # 0x11358
addq $0x4, %r14
jmp 0x679d
movl $0xbf800000, -0x60(%rbp) # imm = 0xBF800000
andq $0x0, -0x68(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rdi
leaq -0xb0(%rbp), %rbx
movq %rbx, %rsi
callq 0x7464
movq %rbx, %rdi
callq 0x4c8c
movq -0x48(%rbp), %rax
incl %eax
jmp 0x6669
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x684b
jmp 0x684b
jmp 0x684b
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x4c8c
movq %rbx, %rdi
callq 0x4440