// File: /workspace/github_cpp_makefile_star2_O2/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 $0xd8, %rsp
movq %rdi, %rbx
movabsq $0x200000001, %rdi      # imm = 0x200000001
leaq 0xa8(%rsp), %r15
movq %rdi, (%r15)
movl $0x3, 0x8(%r15)
movabsq $0x300000002, %rax      # imm = 0x300000002
leaq 0xb4(%rsp), %r12
movq %rax, (%r12)
movl $0x4, 0x8(%r12)
pushq $0x3
popq %rsi
movq %r12, %rdx
callq 0x4f7f
leaq 0x40(%rsp), %r14
movq %rax, (%r14)
movl %edx, 0x8(%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4fa6
leaq 0xd7b5(%rip), %rsi      # 0x1212a
movq %rax, %rdi
callq 0x4290
movq %rax, %rdi
movq %r12, %rsi
callq 0x4fa6
leaq 0xd7c3(%rip), %rsi      # 0x12152
movq %rax, %rdi
callq 0x4290
movq %rax, %rdi
movq %r14, %rsi
callq 0x4fa6
leaq 0xd8f6(%rip), %r15      # 0x1229f
movq %rax, %rdi
movq %r15, %rsi
callq 0x4290
leaq 0xd773(%rip), %rsi      # 0x1212e
movq %rbx, %rdi
callq 0x4290
pushq $0x4
popq %rsi
movq %rax, %rdi
callq 0x41d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4290
leaq 0xd75d(%rip), %rsi      # 0x1213d
movq %rbx, %rdi
callq 0x4290
pushq $0xc
popq %rsi
movq %rax, %rdi
callq 0x41d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4290
movabsq $0x500000003, %rax      # imm = 0x500000003
movq %rsp, %rsi
movq %rax, (%rsi)
movl $0x7, 0x8(%rsi)
movq %r14, %rdi
callq 0x5022
testb %al, %al
je 0x4a53
leaq 0xd72e(%rip), %rsi      # 0x12156
movq %rbx, %rdi
callq 0x4290
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x4fa6
leaq 0xd85b(%rip), %rsi      # 0x1229f
movq %rax, %rdi
callq 0x4290
xorl %ebp, %ebp
jmp 0x4c89
movupd 0xe195(%rip), %xmm0     # 0x12bf0
movapd %xmm0, 0x20(%rsp)
movabsq $0x4008000000000000, %rax # imm = 0x4008000000000000
movq %rax, 0x30(%rsp)
pushq $0xa
popq %rax
movq %rax, 0x38(%rsp)
movups 0xe189(%rip), %xmm1     # 0x12c08
movaps %xmm1, 0x50(%rsp)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
movapd %xmm0, (%rsp)
xorl %eax, %eax
cmpq $0x3, %rax
je 0x4ace
movsd 0x50(%rsp,%rax,8), %xmm0
addsd (%rsp,%rax,8), %xmm0
movsd %xmm0, (%rsp,%rax,8)
incq %rax
jmp 0x4ab3
movq %rsp, %r14
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
leaq 0x80(%rsp), %r15
movaps %xmm1, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x502c
leaq 0xd62b(%rip), %rsi      # 0x1212a
movq %rax, %rdi
callq 0x4290
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x502c
leaq 0xd637(%rip), %rsi      # 0x12152
movq %rax, %rdi
callq 0x4290
movq %rax, %rdi
movq %r15, %rsi
callq 0x502c
leaq 0xd76a(%rip), %r12      # 0x1229f
movq %rax, %rdi
movq %r12, %rsi
callq 0x4290
leaq 0xd65c(%rip), %rsi      # 0x121a3
movq %rbx, %rdi
callq 0x4290
pushq $0x8
popq %rsi
movq %rax, %rdi
callq 0x41d0
movq %rax, %rdi
movq %r12, %rsi
callq 0x4290
leaq 0xd649(%rip), %rsi      # 0x121b5
movq %rbx, %rdi
callq 0x4290
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x41d0
movq %rax, %rdi
movq %r12, %rsi
callq 0x4290
movups 0xe08f(%rip), %xmm0     # 0x12c20
movaps %xmm0, (%r14)
movabsq $0x4010000000000000, %rax # imm = 0x4010000000000000
movq %rax, 0x10(%r14)
movq $0xa, 0x18(%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x50a7
movl %eax, %ebp
testb %al, %al
je 0x4bea
leaq 0xd61c(%rip), %rsi      # 0x121df
movq %rbx, %rdi
callq 0x4290
leaq 0x80(%rsp), %rsi
movq %rax, %rdi
callq 0x502c
leaq 0xd6bd(%rip), %rsi      # 0x1229f
movq %rax, %rdi
jmp 0x4c80
leaq 0xc0(%rsp), %r14
leaq 0x80(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x50b2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x502c
leaq 0xd53b(%rip), %r15      # 0x12152
movq %rax, %rdi
movq %r15, %rsi
callq 0x4290
movq %rax, %rdi
movq %r14, %rsi
callq 0x513e
leaq 0xd66b(%rip), %r12      # 0x1229f
movq %rax, %rdi
movq %r12, %rsi
callq 0x4290
leaq 0x78(%rsp), %rdx
movq $0xa, (%rdx)
movq %rsp, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x51bc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x513e
movq %rax, %rdi
movq %r15, %rsi
callq 0x4290
movq %rax, %rdi
movq %r13, %rsi
callq 0x502c
movq %rax, %rdi
movq %r12, %rsi
callq 0x4290
xorb $0x1, %bpl
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop