// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/src/test-case/vector.cpp
// Function: testRealVectors(std::ostream&)
bool testRealVectors(std::ostream &log) {
  vector<int, 3> v1 = {{1, 2, 3}};
  vector<int, 3> v2 = {{2, 3, 4}};
  vector<int, 3> r = v1 + v2;

  log << v1 << " + " << v2 << " = " << r << "\n";
  log << "sizeof(int) = " << sizeof(int) << "\n";
  log << "sizeof(vector<int,3>) = " << sizeof(vector<int, 3>) << "\n";

  if (r != vector<int, 3>({3, 5, 7})) {
    log << "unexpected result after vector addition; expected ([real] 3, 5, 7) "
           "but have "
        << r << "\n";
    return false;
  }

  vector<double, 3, format::polar> vp1 = {{1, 2, 3}};
  vector<double, 3, format::polar> vp2 = {{2, -1, 1}};
  vector<double, 3, format::polar> rp = vp1 + vp2;

  log << vp1 << " + " << vp2 << " = " << rp << "\n";
  log << "sizeof(double) = " << sizeof(double) << "\n";
  log << "sizeof(vector<double,3,format::polar>) = "
      << sizeof(vector<double, 3, format::polar>) << "\n";

  if (rp != vector<double, 3, format::polar>({3, 1, 4})) {
    log << "unexpected result after vector addition; expected ([polar:10] 3, "
           "1, 4) but have "
        << rp << "\n";
    return false;
  }

  vector<double, 3> rpc = rp;

  log << rp << " = " << rpc << "\n";

  vector<double, 3, format::polar> rpcr = rpc;

  log << rpc << " = " << rpcr << "\n";

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
movabsq $0x200000001, %rax      # imm = 0x200000001
movq %rax, 0x30(%rsp)
movl $0x3, %ecx
movl %ecx, 0x38(%rsp)
movabsq $0x300000002, %rdx      # imm = 0x300000002
movq %rdx, 0x24(%rsp)
movl $0x4, 0x2c(%rsp)
movq %rax, (%rsp)
movl %ecx, 0x8(%rsp)
xorl %eax, %eax
movl 0x24(%rsp,%rax,4), %ecx
addl %ecx, (%rsp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x4b2b
movq (%rsp), %rax
movl 0x8(%rsp), %ecx
leaq 0x60(%rsp), %r14
movq %rax, (%r14)
movl %ecx, 0x8(%r14)
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x5307
movq %rax, %r15
leaq 0xf5c4(%rip), %rsi      # 0x1412a
movl $0x3, %edx
movq %rax, %rdi
callq 0x42d0
leaq 0x24(%rsp), %rsi
movq %r15, %rdi
callq 0x5307
movq %rax, %r15
leaq 0xf5c8(%rip), %rsi      # 0x14152
movl $0x3, %edx
movq %rax, %rdi
callq 0x42d0
movq %r15, %rdi
movq %r14, %rsi
callq 0x5307
leaq 0xf6f6(%rip), %r15      # 0x1429f
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42d0
leaq 0xf56e(%rip), %rsi      # 0x1412e
movl $0xe, %edx
movq %rbx, %rdi
callq 0x42d0
movl $0x4, %esi
movq %rbx, %rdi
callq 0x41a0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42d0
leaq 0xf54c(%rip), %rsi      # 0x1413d
movl $0x18, %edx
movq %rbx, %rdi
callq 0x42d0
movl $0xc, %esi
movq %rbx, %rdi
callq 0x41a0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42d0
movabsq $0x500000003, %rax      # imm = 0x500000003
xorq (%r14), %rax
movl 0x8(%r14), %ecx
xorl $0x7, %ecx
orq %rax, %rcx
je 0x4c71
leaq 0xf51b(%rip), %rsi      # 0x14156
movl $0x4c, %edx
movq %rbx, %rdi
callq 0x42d0
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x5307
leaq 0xf643(%rip), %rsi      # 0x1429f
movl $0x1, %edx
movq %rax, %rdi
callq 0x42d0
xorl %r14d, %r14d
jmp 0x4f2a
movupd 0xff77(%rip), %xmm0     # 0x14bf0
movapd %xmm0, 0x40(%rsp)
movabsq $0x4008000000000000, %rax # imm = 0x4008000000000000
movq %rax, 0x50(%rsp)
movl $0xa, %eax
movq %rax, 0x58(%rsp)
movups 0xff69(%rip), %xmm1     # 0x14c08
movaps %xmm1, 0x70(%rsp)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x80(%rsp)
movq %rax, 0x88(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
movapd %xmm0, (%rsp)
xorl %eax, %eax
movsd 0x70(%rsp,%rax,8), %xmm0
addsd (%rsp,%rax,8), %xmm0
movsd %xmm0, (%rsp,%rax,8)
incq %rax
cmpq $0x3, %rax
jne 0x4cd9
movaps (%rsp), %xmm0
movapd 0x10(%rsp), %xmm1
leaq 0x90(%rsp), %r14
movapd %xmm1, 0x10(%r14)
movaps %xmm0, (%r14)
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x539c
movq %rax, %r15
leaq 0xf405(%rip), %rsi      # 0x1412a
movl $0x3, %edx
movq %rax, %rdi
callq 0x42d0
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x539c
movq %rax, %r15
leaq 0xf409(%rip), %rsi      # 0x14152
movl $0x3, %edx
movq %rax, %rdi
callq 0x42d0
movq %r15, %rdi
movq %r14, %rsi
callq 0x539c
leaq 0xf537(%rip), %r14      # 0x1429f
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0xf424(%rip), %rsi      # 0x141a3
movl $0x11, %edx
movq %rbx, %rdi
callq 0x42d0
movl $0x8, %esi
movq %rbx, %rdi
callq 0x41a0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0xf405(%rip), %rsi      # 0x141b5
movl $0x29, %edx
movq %rbx, %rdi
callq 0x42d0
movl $0x20, %esi
movq %rbx, %rdi
callq 0x41a0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
movupd 0xfe3e(%rip), %xmm0     # 0x14c20
movapd %xmm0, (%rsp)
movabsq $0x4010000000000000, %rax # imm = 0x4010000000000000
movq %rax, 0x10(%rsp)
xorl %eax, %eax
movsd 0x90(%rsp,%rax), %xmm0
movsd (%rsp,%rax), %xmm1
ucomisd %xmm1, %xmm0
jne 0x4e1b
jp 0x4e1b
leaq 0x8(%rax), %rcx
cmpq $0x10, %rax
movq %rcx, %rax
jne 0x4df8
movapd %xmm0, %xmm2
cmpeqsd %xmm1, %xmm2
movq %xmm2, %r14
andl $0x1, %r14d
ucomisd %xmm1, %xmm0
jne 0x4ef2
jp 0x4ef2
leaq 0xc0(%rsp), %r15
leaq 0x90(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x5454
movq %rbx, %rdi
movq %r12, %rsi
callq 0x539c
movq %rax, %r13
leaq 0xf2e5(%rip), %r12      # 0x14152
movl $0x3, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x42d0
movq %r13, %rdi
movq %r15, %rsi
callq 0x54f2
leaq 0xf410(%rip), %r13      # 0x1429f
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x42d0
leaq 0xb8(%rsp), %rdx
movq $0xa, (%rdx)
movq %rsp, %rbp
movq %rbp, %rdi
movq %r15, %rsi
callq 0x558a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x54f2
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x42d0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x539c
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
jmp 0x4f25
leaq 0xf2e6(%rip), %rsi      # 0x141df
movl $0x50, %edx
movq %rbx, %rdi
callq 0x42d0
leaq 0x90(%rsp), %rsi
movq %rbx, %rdi
callq 0x539c
leaq 0xf382(%rip), %rsi      # 0x1429f
movl $0x1, %edx
movq %rax, %rdi
callq 0x42d0
movl %r14d, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop