// File: /workspace/github_cpp_makefile_star2_O3/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 0x3c00
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 0x2805
movq $0x270, -0xb8(%rbp) # imm = 0x270
movslq %r15d, %r15
leaq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rdx
movq %r15, %rsi
callq 0x3c7e
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
cmpq %rsi, %rdi
je 0x286a
movl $0x1, %eax
movq %rdi, %rcx
movl %eax, (%rcx)
incl %eax
addq $0x4, %rcx
cmpq %rsi, %rcx
jne 0x285d
leaq -0x1438(%rbp), %rdx
callq 0x3d14
leaq -0xb0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3e8c
leaq -0x54(%rbp), %rdx
movl $0x0, (%rdx)
leaq -0x50(%rbp), %rdi
leaq -0x19(%rbp), %rcx
movq %r15, %rsi
callq 0x3f7a
leaq -0x50(%rbp), %rsi
movq %r14, %rdi
callq 0x4006
movl $0x5f5e0ff, %eax        # imm = 0x5F5E0FF
leaq -0xb0(%rbp), %rsi
movl %eax, 0x18(%rsi)
movl %eax, 0x38(%rsi)
movq %rbx, %rdi
callq 0x40f4
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x28db
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x28f0
movq -0x28(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
leaq -0x27c0(%rbp), %rdi
callq 0x2190
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x2911
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x2929
movq -0x80(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x2944
movq -0xa0(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
addq $0x27a8, %rsp           # imm = 0x27A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x29b4
jmp 0x297c
jmp 0x2958
movq %rax, %rbx
jmp 0x2994
movq %rax, %rbx
jmp 0x29a0
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x297f
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
jmp 0x297f
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x2994
movq -0x28(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
leaq -0x27c0(%rbp), %rdi
callq 0x2190
leaq -0xb0(%rbp), %rdi
callq 0x3b50
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x4434