// File: /workspace/github_cpp_makefile_star2_O3/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, 0xae22(%rip), %edi # imm = 0x75BCD15
callq 0x4250
movq (%rbx), %rsi
movq %rbx, -0xb0(%rbp)
movq %rbx, %rdi
callq 0xc2ea
movq 0xadec(%rip), %rax      # 0x12360
subq 0xaddd(%rip), %rax      # 0x12358
sarq $0x2, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
movq %rsp, %r12
subq %rcx, %r12
movq %r12, %rsp
testl %eax, %eax
jle 0x764c
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
incl %eax
andl $-0x2, %eax
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x5aa4(%rip), %xmm1     # 0xd070
xorl %ecx, %ecx
movdqa 0x5aaa(%rip), %xmm2     # 0xd080
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x5aaa(%rip), %xmm4     # 0xd090
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
pand %xmm6, %xmm5
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
por %xmm5, %xmm6
movdqa %xmm1, %xmm5
psubq %xmm3, %xmm5
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x7625
movd %xmm5, (%r12,%rcx,4)
pxor %xmm3, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x763f
pshufd $0xee, %xmm5, %xmm5     # xmm5 = xmm5[2,3,2,3]
movd %xmm5, 0x4(%r12,%rcx,4)
addq $0x2, %rcx
paddq %xmm4, %xmm1
cmpq %rcx, %rax
jne 0x75e6
cmpb $0x1, 0xad2d(%rip)      # 0x12380
jne 0x78e4
movq $0x0, -0x38(%rbp)
movq %r12, -0xa8(%rbp)
movslq 0xad01(%rip), %r12      # 0x12370
leaq (,%r12,8), %rdi
testq %r12, %r12
movq $-0x1, %rax
cmovsq %rax, %rdi
callq 0x4030
movq %rax, -0x40(%rbp)
testq %r12, %r12
jle 0x76e3
movslq 0xacda(%rip), %rbx      # 0x12374
leaq (,%rbx,4), %r14
testq %rbx, %rbx
movq $-0x1, %rax
cmovsq %rax, %r14
movl %ebx, %r15d
shlq $0x2, %r15
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x4030
movq -0x40(%rbp), %rcx
movq %rax, (%rcx,%r13,8)
testl %ebx, %ebx
jle 0x76db
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x4150
incq %r13
cmpq %r13, %r12
jne 0x76ba
pxor %xmm0, %xmm0
movdqa %xmm0, -0x70(%rbp)
movdqa %xmm0, -0x80(%rbp)
movdqa %xmm0, -0x90(%rbp)
movdqa %xmm0, -0xa0(%rbp)
movq 0xac58(%rip), %rax      # 0x12360
subq 0xac49(%rip), %rax      # 0x12358
movq $0x0, -0x60(%rbp)
shrq $0x2, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
testl %eax, %eax
movabsq $-0x5555555555555555, %rbx # imm = 0xAAAAAAAAAAAAAAAB
movq -0xa8(%rbp), %r12
leaq -0x70(%rbp), %r13
jle 0x7855
xorl %r14d, %r14d
xorl %r15d, %r15d
callq 0x40a0
cltq
movq 0xac0e(%rip), %rcx      # 0x12360
subq 0xabff(%rip), %rcx      # 0x12358
sarq $0x2, %rcx
imulq %rbx, %rcx
leaq (%r14,%rcx), %rsi
xorl %edx, %edx
divq %rsi
addl %r15d, %edx
movl (%r12,%r15,4), %eax
movslq %edx, %rdx
movl (%r12,%rdx,4), %esi
movl %esi, (%r12,%r15,4)
movl %eax, (%r12,%rdx,4)
incq %r15
movslq %ecx, %rax
decq %r14
cmpq %rax, %r15
jl 0x7744
testl %ecx, %ecx
jle 0x7855
movq %r12, %r14
xorl %r15d, %r15d
movq -0x98(%rbp), %rsi
cmpq -0x90(%rbp), %rsi
je 0x77be
movl (%r14), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x98(%rbp)
jmp 0x77cd
leaq -0xa0(%rbp), %rdi
movq %r14, %rdx
callq 0xc31a
movl $0x0, -0x2c(%rbp)
movq -0x80(%rbp), %rsi
cmpq -0x78(%rbp), %rsi
je 0x77ee
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x80(%rbp)
jmp 0x77fe
leaq -0x88(%rbp), %rdi
leaq -0x2c(%rbp), %rdx
callq 0xc43a
movl $0x0, -0x2c(%rbp)
movq -0x68(%rbp), %rsi
cmpq -0x60(%rbp), %rsi
je 0x781f
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x68(%rbp)
jmp 0x782b
movq %r13, %rdi
leaq -0x2c(%rbp), %rdx
callq 0xc43a
incq %r15
movq 0xab2b(%rip), %rax      # 0x12360
subq 0xab1c(%rip), %rax      # 0x12358
shrq $0x2, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
addq $0x4, %r14
cmpq %rax, %r15
jl 0x779c
movl $0xbf800000, -0x50(%rbp) # imm = 0xBF800000
movq $0x0, -0x58(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x8c66
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x7894
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x4290
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x78ac
movq -0x78(%rbp), %rsi
subq %rdi, %rsi
callq 0x4290
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0x78c7
movq -0x90(%rbp), %rsi
subq %rdi, %rsi
callq 0x4290
cmpb $0x1, 0xaab2(%rip)      # 0x12380
jne 0x78e4
movq -0x38(%rbp), %rcx
leal 0x1(%rcx), %eax
cmpl $0x31, %ecx
movq %rax, -0x38(%rbp)
jb 0x7668
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x78f9
jmp 0x78f9
jmp 0x78f9
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x4f60
movq %rbx, %rdi
callq 0x4450