// File: /workspace/github_cpp_makefile_star2_O1/maramire[P]SP_PSO/parallel_main.cpp
// Function: particle_init(int, std::vector<Particle, std::allocator<Particle>>&)
void particle_init(int n_items, Swarm &swarm)
{
    Particle particle;

    random_device rd;  
    mt19937 g(rd());  



    /* Define Initial permutation (1,2,3,...n_items) */
    vector<int> permutation(n_items);
    iota(begin(permutation), end(permutation), 1);

    /* Shuffling permutation vector */
    shuffle(begin(permutation), end(permutation), g);

    particle.permutation = permutation;
    
    /* Define Initial velocity (0,0,0,...0) */
    vector<float> velocity(n_items,0);    
    particle.velocity = velocity;
    particle.fitness = 99999999;
    particle.pbest_fitness = 99999999;

    swarm.push_back(particle);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x27a8, %rsp           # imm = 0x27A8
movq %rsi, %rbx
movl %edi, %r15d
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
movaps %xmm0, -0x90(%rbp)
movq %rax, -0x80(%rbp)
movaps %xmm0, -0x70(%rbp)
movq %rax, -0x60(%rbp)
leaq -0x27c0(%rbp), %rdi
callq 0x3c16
leaq -0x27c0(%rbp), %rdi
callq 0x2230
leaq -0x70(%rbp), %r14
movl %eax, %eax
movq %rax, -0x1438(%rbp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, -0x1438(%rbp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x27ff
movq $0x270, -0xb8(%rbp) # imm = 0x270
movslq %r15d, %r15
leaq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rdx
movq %r15, %rsi
callq 0x3c94
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
cmpq %rsi, %rdi
je 0x2864
movl $0x1, %eax
movq %rdi, %rcx
movl %eax, (%rcx)
incl %eax
addq $0x4, %rcx
cmpq %rsi, %rcx
jne 0x2857
leaq -0x1438(%rbp), %rdx
callq 0x3d27
leaq -0xb0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3ea0
leaq -0x54(%rbp), %rdx
movl $0x0, (%rdx)
leaq -0x50(%rbp), %rdi
leaq -0x19(%rbp), %rcx
movq %r15, %rsi
callq 0x3f80
leaq -0x50(%rbp), %rsi
movq %r14, %rdi
callq 0x400c
movl $0x5f5e0ff, %eax        # imm = 0x5F5E0FF
leaq -0xb0(%rbp), %rsi
movl %eax, 0x18(%rsi)
movl %eax, 0x38(%rsi)
movq %rbx, %rdi
callq 0x40ec
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x28d5
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x28ea
movq -0x28(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
leaq -0x27c0(%rbp), %rdi
callq 0x2190
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x290b
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x2923
movq -0x80(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x293e
movq -0xa0(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
addq $0x27a8, %rsp           # imm = 0x27A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x29ae
jmp 0x2976
jmp 0x2952
movq %rax, %rbx
jmp 0x298e
movq %rax, %rbx
jmp 0x299a
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x2979
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
jmp 0x2979
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x298e
movq -0x28(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
leaq -0x27c0(%rbp), %rdi
callq 0x2190
leaq -0xb0(%rbp), %rdi
callq 0x3b66
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x442a