// File: /workspace/github_cpp_makefile_star2_O1/Marcos30004347[P]JSS-with-VNS/main.cpp
// Function: opt_3(std::vector<unsigned int, std::allocator<unsigned int>>)
solution opt_3(solution s) {
	int i = 1 + rand() % (s.size() / 3);
	int j = i + 1 + rand() % (s.size() / 3);
	int k = j + 1 + rand() % (s.size() / 3);

  unsigned tmp0 = s[i];
  unsigned tmp1 = s[j];
  unsigned tmp2 = s[k];

  solution tmp = s;

  tmp[i] = tmp0;
  tmp[j] = tmp2;
  tmp[k] = tmp1;
  if(total_cost(tmp) < total_cost(s)) {
    s = tmp;
  }

  tmp[i] = tmp2;
  tmp[j] = tmp1;
  tmp[k] = tmp0;
  if(total_cost(tmp) < total_cost(s)) {
    s = tmp;
  }

  tmp[i] = tmp1;
  tmp[j] = tmp0;
  tmp[k] = tmp2;
  if(total_cost(tmp) < total_cost(s)) {
    s = tmp;
  }

  tmp[i] = tmp2;
  tmp[j] = tmp0;
  tmp[k] = tmp1;
  if(total_cost(tmp) < total_cost(s)) {
    s = tmp;
  }

  tmp[i] = tmp2;
  tmp[j] = tmp1;
  tmp[k] = tmp0;
  if(total_cost(tmp) < total_cost(s)) {
    s = tmp;
  }

  return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rsi, %r14
movq %rdi, -0x60(%rbp)
callq 0x2060
movq 0x8(%r14), %rcx
subq (%r14), %rcx
movslq %eax, %rsi
sarq $0x2, %rcx
movabsq $-0x5555555555555555, %rbx # imm = 0xAAAAAAAAAAAAAAAB
movq %rcx, %rax
mulq %rbx
movq %rdx, %rcx
shrq %rcx
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %r15
callq 0x2060
movl %eax, %ecx
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x2, %rax
mulq %rbx
movq %rdx, %rsi
movslq %ecx, %rax
shrq %rsi
xorl %edx, %edx
divq %rsi
leaq (%r15,%rdx), %r12
addq $0x2, %r12
callq 0x2060
movslq %eax, %rcx
movq (%r14), %rdi
movq 0x8(%r14), %rax
movq %r14, %rsi
movq %r14, -0x68(%rbp)
subq %rdi, %rax
sarq $0x2, %rax
mulq %rbx
movq %rdx, %r8
shrq %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
leal (%r12,%rdx), %eax
incl %eax
shlq $0x20, %r15
movabsq $0x100000000, %r14      # imm = 0x100000000
addq %r15, %r14
movq %r14, %r13
sarq $0x1e, %r13
movl (%rdi,%r13), %ecx
movl %ecx, -0x30(%rbp)
movslq %r12d, %r15
movl (%rdi,%r15,4), %ecx
movl %ecx, -0x2c(%rbp)
movslq %eax, %rbx
movl (%rdi,%rbx,4), %r12d
leaq -0x58(%rbp), %rdi
callq 0x3e06
leaq -0x58(%rbp), %rsi
movq (%rsi), %rax
movl -0x30(%rbp), %ecx
movl %ecx, (%rax,%r13)
movq -0x68(%rbp), %r13
movq %r15, -0x40(%rbp)
movl %r12d, (%rax,%r15,4)
movq %rbx, -0x38(%rbp)
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax,%rbx,4)
movl %r12d, %ebx
leaq -0x158(%rbp), %rdi
callq 0x3e06
leaq -0x158(%rbp), %rdi
callq 0x24ed
movl %eax, %r15d
leaq -0x140(%rbp), %rdi
movq %r13, %rsi
callq 0x3e06
leaq -0x140(%rbp), %rdi
callq 0x24ed
movl %eax, %r12d
movq -0x140(%rbp), %rdi
testq %rdi, %rdi
je 0x2a3b
movq -0x130(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x158(%rbp), %rdi
testq %rdi, %rdi
je 0x2a56
movq -0x148(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
cmpl %r12d, %r15d
jae 0x2a67
leaq -0x58(%rbp), %rsi
movq %r13, %rdi
callq 0x3e86
sarq $0x20, %r14
leaq -0x58(%rbp), %rsi
movq (%rsi), %rax
movl %ebx, (%rax,%r14,4)
movq -0x40(%rbp), %rcx
movl -0x2c(%rbp), %edx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %ecx
movq -0x38(%rbp), %rdx
movl %ecx, (%rax,%rdx,4)
leaq -0x128(%rbp), %rdi
callq 0x3e06
leaq -0x128(%rbp), %rdi
callq 0x24ed
movl %eax, %r15d
leaq -0x110(%rbp), %rdi
movq %r13, %rsi
callq 0x3e06
leaq -0x110(%rbp), %rdi
callq 0x24ed
movl %eax, %r12d
movq -0x110(%rbp), %rdi
testq %rdi, %rdi
je 0x2ade
movq -0x100(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x128(%rbp), %rdi
testq %rdi, %rdi
je 0x2af9
movq -0x118(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
cmpl %r12d, %r15d
jae 0x2b0a
leaq -0x58(%rbp), %rsi
movq %r13, %rdi
callq 0x3e86
leaq -0x58(%rbp), %rsi
movq (%rsi), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax,%r14,4)
movl -0x30(%rbp), %ecx
movq -0x40(%rbp), %rdx
movl %ecx, (%rax,%rdx,4)
movq -0x38(%rbp), %rcx
movl %ebx, (%rax,%rcx,4)
leaq -0xf8(%rbp), %rdi
callq 0x3e06
leaq -0xf8(%rbp), %rdi
callq 0x24ed
movl %eax, %r15d
leaq -0xe0(%rbp), %rdi
movq %r13, %rsi
callq 0x3e06
leaq -0xe0(%rbp), %rdi
callq 0x24ed
movl %eax, %r12d
movq -0xe0(%rbp), %rdi
testq %rdi, %rdi
je 0x2b7d
movq -0xd0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0xf8(%rbp), %rdi
testq %rdi, %rdi
je 0x2b98
movq -0xe8(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
cmpl %r12d, %r15d
jae 0x2ba9
leaq -0x58(%rbp), %rsi
movq %r13, %rdi
callq 0x3e86
leaq -0x58(%rbp), %rsi
movq (%rsi), %rax
movl %ebx, (%rax,%r14,4)
movl -0x30(%rbp), %ecx
movq -0x40(%rbp), %rdx
movl %ecx, (%rax,%rdx,4)
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %edx
movl %edx, (%rax,%rcx,4)
leaq -0xc8(%rbp), %rdi
callq 0x3e06
leaq -0xc8(%rbp), %rdi
callq 0x24ed
movl %eax, %r15d
leaq -0xb0(%rbp), %rdi
movq %r13, %rsi
callq 0x3e06
leaq -0xb0(%rbp), %rdi
callq 0x24ed
movl %eax, %r12d
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x2c1c
movq -0xa0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0x2c37
movq -0xb8(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
cmpl %r12d, %r15d
jae 0x2c48
leaq -0x58(%rbp), %rsi
movq %r13, %rdi
callq 0x3e86
leaq -0x58(%rbp), %rsi
movq (%rsi), %rax
movl %ebx, (%rax,%r14,4)
movq -0x40(%rbp), %rcx
movl -0x2c(%rbp), %edx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %ecx
movq -0x38(%rbp), %rdx
movl %ecx, (%rax,%rdx,4)
leaq -0x98(%rbp), %rdi
callq 0x3e06
leaq -0x98(%rbp), %rdi
callq 0x24ed
movl %eax, %r15d
leaq -0x80(%rbp), %rdi
movq %r13, %rsi
callq 0x3e06
leaq -0x80(%rbp), %rdi
callq 0x24ed
movl %eax, %r12d
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x2caf
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x98(%rbp), %rdi
testq %rdi, %rdi
je 0x2cca
movq -0x88(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
cmpl %r12d, %r15d
jae 0x2cdb
leaq -0x58(%rbp), %rsi
movq %r13, %rdi
callq 0x3e86
movq (%r13), %rax
movq -0x60(%rbp), %rbx
movq %rax, (%rbx)
movq 0x8(%r13), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%r13), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq $0x0, 0x10(%r13)
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x2d1b
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq %rbx, %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x2ddc
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2ddc
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x2df4
movq -0xa0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2df4
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
testq %rdi, %rdi
je 0x2e0c
movq -0xd0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2e0c
movq %rax, %rbx
movq -0x110(%rbp), %rdi
testq %rdi, %rdi
je 0x2e24
movq -0x100(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2e24
movq %rax, %rbx
movq -0x140(%rbp), %rdi
testq %rdi, %rdi
je 0x2e3c
movq -0x130(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2e3c
movq %rax, %rbx
movq -0x98(%rbp), %rdi
testq %rdi, %rdi
je 0x2e5c
movq -0x88(%rbp), %rsi
jmp 0x2e4f
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0x2e5c
movq -0xb8(%rbp), %rsi
jmp 0x2e4f
movq %rax, %rbx
movq -0xf8(%rbp), %rdi
testq %rdi, %rdi
je 0x2e5c
movq -0xe8(%rbp), %rsi
jmp 0x2e4f
movq %rax, %rbx
movq -0x128(%rbp), %rdi
testq %rdi, %rdi
je 0x2e5c
movq -0x118(%rbp), %rsi
jmp 0x2e4f
movq %rax, %rbx
movq -0x158(%rbp), %rdi
testq %rdi, %rdi
je 0x2e5c
movq -0x148(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2e5c
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x2e71
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21d0