// File: /workspace/github_cpp_makefile_star2_O1/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 0x5318
movq %rax, %r15
leaq 0xf5c4(%rip), %rsi      # 0x1412a
movl $0x3, %edx
movq %rax, %rdi
callq 0x42d0
leaq 0x24(%rsp), %rsi
movq %r15, %rdi
callq 0x5318
movq %rax, %r15
leaq 0xf5c8(%rip), %rsi      # 0x14152
movl $0x3, %edx
movq %rax, %rdi
callq 0x42d0
movq %r15, %rdi
movq %r14, %rsi
callq 0x5318
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 0x4c70
leaq 0xf51b(%rip), %rsi      # 0x14156
movl $0x4c, %edx
movq %rbx, %rdi
callq 0x42d0
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x5318
leaq 0xf643(%rip), %rsi      # 0x1429f
movl $0x1, %edx
movq %rax, %rdi
callq 0x42d0
xorl %ebp, %ebp
jmp 0x4f2f
movupd 0xff78(%rip), %xmm0     # 0x14bf0
movapd %xmm0, 0x40(%rsp)
movabsq $0x4008000000000000, %rax # imm = 0x4008000000000000
movq %rax, 0x50(%rsp)
movl $0xa, %eax
movq %rax, 0x58(%rsp)
movups 0xff6a(%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 0x4cd8
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
leaq 0x90(%rsp), %r14
movaps %xmm1, 0x10(%r14)
movaps %xmm0, (%r14)
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x53ad
movq %rax, %r15
leaq 0xf408(%rip), %rsi      # 0x1412a
movl $0x3, %edx
movq %rax, %rdi
callq 0x42d0
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x53ad
movq %rax, %r15
leaq 0xf40c(%rip), %rsi      # 0x14152
movl $0x3, %edx
movq %rax, %rdi
callq 0x42d0
movq %r15, %rdi
movq %r14, %rsi
callq 0x53ad
leaq 0xf53a(%rip), %r15      # 0x1429f
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42d0
leaq 0xf427(%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 %r15, %rsi
callq 0x42d0
leaq 0xf408(%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 %r15, %rsi
callq 0x42d0
movups 0xfe42(%rip), %xmm0     # 0x14c20
movaps %xmm0, (%rsp)
movabsq $0x4010000000000000, %rax # imm = 0x4010000000000000
movq %rax, 0x10(%rsp)
movq $0xa, 0x18(%rsp)
movsd (%r14), %xmm0
ucomisd (%rsp), %xmm0
jne 0x4e33
jp 0x4e33
xorl %eax, %eax
cmpq $0x10, %rax
sete %bpl
je 0x4e2d
movsd 0x98(%rsp,%rax), %xmm0
ucomisd 0x8(%rsp,%rax), %xmm0
leaq 0x8(%rax), %rax
jne 0x4e2b
jnp 0x4e0a
xorl %ebp, %ebp
xorb $0x1, %bpl
jmp 0x4e36
movb $0x1, %bpl
testb %bpl, %bpl
je 0x4e73
leaq 0xf39d(%rip), %rsi      # 0x141df
movl $0x50, %edx
movq %rbx, %rdi
callq 0x42d0
leaq 0x90(%rsp), %rsi
movq %rbx, %rdi
callq 0x53ad
leaq 0xf439(%rip), %rsi      # 0x1429f
movl $0x1, %edx
movq %rax, %rdi
jmp 0x4f26
leaq 0xc0(%rsp), %r14
leaq 0x90(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x5464
movq %rbx, %rdi
movq %r15, %rsi
callq 0x53ad
movq %rax, %r12
leaq 0xf2af(%rip), %r15      # 0x14152
movl $0x3, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42d0
movq %r12, %rdi
movq %r14, %rsi
callq 0x54ed
leaq 0xf3da(%rip), %r12      # 0x1429f
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x42d0
leaq 0xb8(%rsp), %rdx
movq $0xa, (%rdx)
movq %rsp, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x5584
movq %rbx, %rdi
movq %r14, %rsi
callq 0x54ed
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42d0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x53ad
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x42d0
xorb $0x1, %bpl
movl %ebp, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop