// File: cssartori[P]ga-qap/src/geneticalgorithm.cpp
// Function: GeneticAlgorithm::shift_mutation(Solution&, unsigned long)
void GeneticAlgorithm::shift_mutation(Solution& s, size_t u){
	std::vector<int> p1(u);
	std::vector<int> p2(data.n-u);

	for(size_t i=0;i<data.n;i++){
		if(i<u) p1[i] = s[i];
		else p2[i-u] = s[i];
	}

	for(size_t i=0;i<data.n;i++){
		if(i < (data.n-u)) s[i] = p2[i];
		else s[i] = p1[i-(data.n-u)];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x2bb0
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0xbc40
jmp 0xb540
leaq -0x31(%rbp), %rdi
callq 0x2cb0
movq -0x90(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xa0(%rbp)
leaq -0x61(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x2bb0
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0xbc40
jmp 0xb58e
leaq -0x61(%rbp), %rdi
callq 0x2cb0
movq $0x0, -0x70(%rbp)
movq -0x90(%rbp), %rcx
movq -0x70(%rbp), %rax
movq (%rcx), %rcx
cmpq 0x30(%rcx), %rax
jae 0xb6a1
movq -0x70(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xb651
movq -0x10(%rbp), %rdi
movl -0x70(%rbp), %esi
callq 0x5f60
movq %rax, -0xa8(%rbp)
jmp 0xb5da
movq -0xa8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xac(%rbp)
movq -0x70(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2cf0
movl -0xac(%rbp), %ecx
movl %ecx, (%rax)
jmp 0xb68e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x2cb0
jmp 0xb79f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x61(%rbp), %rdi
callq 0x2cb0
jmp 0xb796
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2c50
jmp 0xb796
movq -0x10(%rbp), %rdi
movl -0x70(%rbp), %esi
callq 0x5f60
movq %rax, -0xb8(%rbp)
jmp 0xb666
movq -0xb8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xbc(%rbp)
movq -0x70(%rbp), %rsi
subq -0x18(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x2cf0
movl -0xbc(%rbp), %ecx
movl %ecx, (%rax)
jmp 0xb690
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0xb59f
movq $0x0, -0x78(%rbp)
movq -0x90(%rbp), %rcx
movq -0x78(%rbp), %rax
movq (%rcx), %rcx
cmpq 0x30(%rcx), %rax
jae 0xb77b
movq -0x90(%rbp), %rcx
movq -0x78(%rbp), %rax
movq (%rcx), %rcx
movq 0x30(%rcx), %rcx
subq -0x18(%rbp), %rcx
cmpq %rcx, %rax
jae 0xb717
movq -0x78(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x2cf0
movl (%rax), %eax
movl %eax, -0xcc(%rbp)
movq -0x10(%rbp), %rdi
movl -0x78(%rbp), %esi
callq 0x5f60
movq %rax, -0xc8(%rbp)
jmp 0xb706
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
movl %ecx, (%rax)
jmp 0xb768
movq -0x90(%rbp), %rax
movq -0x78(%rbp), %rsi
movq (%rax), %rax
movq 0x30(%rax), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
addq %rax, %rsi
leaq -0x30(%rbp), %rdi
callq 0x2cf0
movl (%rax), %eax
movl %eax, -0xdc(%rbp)
movq -0x10(%rbp), %rdi
movl -0x78(%rbp), %esi
callq 0x5f60
movq %rax, -0xd8(%rbp)
jmp 0xb759
movq -0xd8(%rbp), %rax
movl -0xdc(%rbp), %ecx
movl %ecx, (%rax)
jmp 0xb76a
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0xb6a9
leaq -0x60(%rbp), %rdi
callq 0x2c50
leaq -0x30(%rbp), %rdi
callq 0x2c50
addq $0xe0, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x2c50
movq -0x40(%rbp), %rdi
callq 0x22d0
nopl (%rax,%rax)