// File: /workspace/github_cpp_makefile_star2_O3/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 0x3dfc
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 0x3dfc
leaq -0x158(%rbp), %rdi
callq 0x252d
movl %eax, %r15d
leaq -0x140(%rbp), %rdi
movq %r13, %rsi
callq 0x3dfc
leaq -0x140(%rbp), %rdi
callq 0x252d
movl %eax, %r12d
movq -0x140(%rbp), %rdi
testq %rdi, %rdi
je 0x2a7b
movq -0x130(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x158(%rbp), %rdi
testq %rdi, %rdi
je 0x2a96
movq -0x148(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
cmpl %r12d, %r15d
jae 0x2aa7
leaq -0x58(%rbp), %rsi
movq %r13, %rdi
callq 0x3e7c
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 0x3dfc
leaq -0x128(%rbp), %rdi
callq 0x252d
movl %eax, %r15d
leaq -0x110(%rbp), %rdi
movq %r13, %rsi
callq 0x3dfc
leaq -0x110(%rbp), %rdi
callq 0x252d
movl %eax, %r12d
movq -0x110(%rbp), %rdi
testq %rdi, %rdi
je 0x2b1e
movq -0x100(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x128(%rbp), %rdi
testq %rdi, %rdi
je 0x2b39
movq -0x118(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
cmpl %r12d, %r15d
jae 0x2b4a
leaq -0x58(%rbp), %rsi
movq %r13, %rdi
callq 0x3e7c
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 0x3dfc
leaq -0xf8(%rbp), %rdi
callq 0x252d
movl %eax, %r15d
leaq -0xe0(%rbp), %rdi
movq %r13, %rsi
callq 0x3dfc
leaq -0xe0(%rbp), %rdi
callq 0x252d
movl %eax, %r12d
movq -0xe0(%rbp), %rdi
testq %rdi, %rdi
je 0x2bbd
movq -0xd0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0xf8(%rbp), %rdi
testq %rdi, %rdi
je 0x2bd8
movq -0xe8(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
cmpl %r12d, %r15d
jae 0x2be9
leaq -0x58(%rbp), %rsi
movq %r13, %rdi
callq 0x3e7c
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 0x3dfc
leaq -0xc8(%rbp), %rdi
callq 0x252d
movl %eax, %r15d
leaq -0xb0(%rbp), %rdi
movq %r13, %rsi
callq 0x3dfc
leaq -0xb0(%rbp), %rdi
callq 0x252d
movl %eax, %r12d
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x2c5c
movq -0xa0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0x2c77
movq -0xb8(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
cmpl %r12d, %r15d
jae 0x2c88
leaq -0x58(%rbp), %rsi
movq %r13, %rdi
callq 0x3e7c
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 0x3dfc
leaq -0x98(%rbp), %rdi
callq 0x252d
movl %eax, %r15d
leaq -0x80(%rbp), %rdi
movq %r13, %rsi
callq 0x3dfc
leaq -0x80(%rbp), %rdi
callq 0x252d
movl %eax, %r12d
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x2cef
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x98(%rbp), %rdi
testq %rdi, %rdi
je 0x2d0a
movq -0x88(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
cmpl %r12d, %r15d
jae 0x2d1b
leaq -0x58(%rbp), %rsi
movq %r13, %rdi
callq 0x3e7c
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 0x2d5b
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 0x2e1c
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2e1c
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x2e34
movq -0xa0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2e34
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
testq %rdi, %rdi
je 0x2e4c
movq -0xd0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2e4c
movq %rax, %rbx
movq -0x110(%rbp), %rdi
testq %rdi, %rdi
je 0x2e64
movq -0x100(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2e64
movq %rax, %rbx
movq -0x140(%rbp), %rdi
testq %rdi, %rdi
je 0x2e7c
movq -0x130(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2e7c
movq %rax, %rbx
movq -0x98(%rbp), %rdi
testq %rdi, %rdi
je 0x2e9c
movq -0x88(%rbp), %rsi
jmp 0x2e8f
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0x2e9c
movq -0xb8(%rbp), %rsi
jmp 0x2e8f
movq %rax, %rbx
movq -0xf8(%rbp), %rdi
testq %rdi, %rdi
je 0x2e9c
movq -0xe8(%rbp), %rsi
jmp 0x2e8f
movq %rax, %rbx
movq -0x128(%rbp), %rdi
testq %rdi, %rdi
je 0x2e9c
movq -0x118(%rbp), %rsi
jmp 0x2e8f
movq %rax, %rbx
movq -0x158(%rbp), %rdi
testq %rdi, %rdi
je 0x2e9c
movq -0x148(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2e9c
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x2eb1
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21d0