// File: ruippeixotog[P]algo-lib/simulated-annealing.cpp
// Function: Mut::init(Sol&)
void init(Sol& sol) {
    total = dist[sol.order[(i + 1) % N]][sol.order[i]] -
        dist[sol.order[i]][sol.order[(i + 1) % N]];

    total += dist[sol.order[(i - 1 + N) % N]][sol.order[(i + 1) % N]] -
        dist[sol.order[(i - 1 + N) % N]][sol.order[i]];

    total += dist[sol.order[i]][sol.order[(i + 2) % N]] -
        dist[sol.order[(i + 1) % N]][sol.order[(i + 2) % N]];
  }

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x10(%rsp), %rcx
movl (%rax), %eax
addl $0x1, %eax
movl $0xf, %esi
cltd
idivl %esi
movq -0x20(%rsp), %rax
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rdx
leaq 0x27d7(%rip), %rcx      # 0x4070
imulq $0x3c, %rdx, %rdx
addq %rdx, %rcx
movq -0x10(%rsp), %rdx
movslq (%rax), %rsi
movslq (%rdx,%rsi,4), %rdx
movl (%rcx,%rdx,4), %ecx
movq -0x10(%rsp), %rdx
movslq (%rax), %rsi
movslq (%rdx,%rsi,4), %rsi
leaq 0x27ae(%rip), %rdx      # 0x4070
imulq $0x3c, %rsi, %rsi
addq %rsi, %rdx
movq %rdx, -0x48(%rsp)
movq -0x10(%rsp), %rsi
movl (%rax), %eax
addl $0x1, %eax
movl $0xf, %edi
cltd
idivl %edi
movq -0x20(%rsp), %rax
movl %edx, %edi
movq -0x48(%rsp), %rdx
movslq %edi, %rdi
movslq (%rsi,%rdi,4), %rsi
subl (%rdx,%rsi,4), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rsp), %rcx
movl (%rax), %eax
subl $0x1, %eax
addl $0xf, %eax
movl $0xf, %esi
cltd
idivl %esi
movq -0x20(%rsp), %rax
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rdx
leaq 0x274f(%rip), %rcx      # 0x4070
imulq $0x3c, %rdx, %rdx
addq %rdx, %rcx
movq -0x10(%rsp), %rdx
movq %rdx, -0x40(%rsp)
movl (%rax), %eax
addl $0x1, %eax
movl $0xf, %esi
cltd
idivl %esi
movq -0x20(%rsp), %rax
movl %edx, %esi
movq -0x40(%rsp), %rdx
movslq %esi, %rsi
movslq (%rdx,%rsi,4), %rdx
movl (%rcx,%rdx,4), %ecx
movq -0x10(%rsp), %rdx
movq %rdx, -0x38(%rsp)
movl (%rax), %eax
subl $0x1, %eax
addl $0xf, %eax
movl $0xf, %esi
cltd
idivl %esi
movq -0x20(%rsp), %rax
movl %edx, %esi
movq -0x38(%rsp), %rdx
movslq %esi, %rsi
movslq (%rdx,%rsi,4), %rsi
leaq 0x26e7(%rip), %rdx      # 0x4070
imulq $0x3c, %rsi, %rsi
addq %rsi, %rdx
movq -0x10(%rsp), %rsi
movslq (%rax), %rdi
movslq (%rsi,%rdi,4), %rsi
subl (%rdx,%rsi,4), %ecx
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rsp), %rcx
movslq (%rax), %rdx
movslq (%rcx,%rdx,4), %rdx
leaq 0x26b8(%rip), %rcx      # 0x4070
imulq $0x3c, %rdx, %rdx
addq %rdx, %rcx
movq -0x10(%rsp), %rdx
movq %rdx, -0x30(%rsp)
movl (%rax), %eax
addl $0x2, %eax
movl $0xf, %esi
cltd
idivl %esi
movq -0x20(%rsp), %rax
movl %edx, %esi
movq -0x30(%rsp), %rdx
movslq %esi, %rsi
movslq (%rdx,%rsi,4), %rdx
movl (%rcx,%rdx,4), %ecx
movq -0x10(%rsp), %rdx
movq %rdx, -0x28(%rsp)
movl (%rax), %eax
addl $0x1, %eax
movl $0xf, %esi
cltd
idivl %esi
movq -0x20(%rsp), %rax
movl %edx, %esi
movq -0x28(%rsp), %rdx
movslq %esi, %rsi
movslq (%rdx,%rsi,4), %rsi
leaq 0x2653(%rip), %rdx      # 0x4070
imulq $0x3c, %rsi, %rsi
addq %rsi, %rdx
movq %rdx, -0x18(%rsp)
movq -0x10(%rsp), %rsi
movl (%rax), %eax
addl $0x2, %eax
movl $0xf, %edi
cltd
idivl %edi
movq -0x20(%rsp), %rax
movl %edx, %edi
movq -0x18(%rsp), %rdx
movslq %edi, %rdi
movslq (%rsi,%rdi,4), %rsi
subl (%rdx,%rsi,4), %ecx
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
retq
nopl (%rax,%rax)