// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/src/test-case/matrix.cpp
// Function: testStream(std::ostream&)
bool testStream(std::ostream &log) {
  std::ostringstream stream;

  matrix<int, 3, 4> m;
  for (int i = 0; i < 3; i++) {
    for (int k = 0; k < 4; k++) {
      m[i][k] = i * k;
    }
  }

  stream << m;

  std::stringstream expected;

  expected << "0\t0\t0\t0\t\n";
  expected << "0\t1\t2\t3\t\n";
  expected << "0\t2\t4\t6\t\n";

  if (stream.str() != expected.str()) {
    log << "Unexpected characters in printable representation of matrix.\n";
    log << "Matrix: \n";
    log << m;
    log << "\nExpected:\n";
    log << expected.str();

    return false;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x378, %rsp            # imm = 0x378
movq %rdi, %rbx
leaq 0x78(%rsp), %rdi
callq 0x4340
leaq 0x48(%rsp), %rax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
movl %edx, (%rax,%rsi,4)
incq %rsi
addl %ecx, %edx
cmpq $0x4, %rsi
jne 0x519f
incq %rcx
addq $0x10, %rax
cmpq $0x3, %rcx
jne 0x519b
leaq 0x78(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x58fb
leaq 0x1f0(%rsp), %rdi
callq 0x41c0
leaq 0x200(%rsp), %r14
leaq 0xf0ce(%rip), %rsi      # 0x142b3
movl $0x9, %edx
movq %r14, %rdi
callq 0x42d0
leaq 0xf0c4(%rip), %rsi      # 0x142bd
movl $0x9, %edx
movq %r14, %rdi
callq 0x42d0
leaq 0xf0ba(%rip), %rsi      # 0x142c7
movl $0x9, %edx
movq %r14, %rdi
callq 0x42d0
leaq 0x80(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x43a0
leaq 0x208(%rsp), %r14
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x43a0
movq 0x10(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jne 0x526c
movq 0x28(%rsp), %r15
testq %rdx, %rdx
je 0x5276
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x4290
testl %eax, %eax
setne %bpl
jmp 0x5278
movb $0x1, %bpl
movq 0x28(%rsp), %r15
jmp 0x5278
xorl %ebp, %ebp
leaq 0x38(%rsp), %rax
cmpq %rax, %r15
je 0x5292
movq 0x38(%rsp), %rsi
incq %rsi
movq %r15, %rdi
callq 0x4270
leaq 0x18(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x52ad
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4270
testb %bpl, %bpl
je 0x5331
leaq 0xf018(%rip), %rsi      # 0x142d1
movl $0x3d, %edx
movq %rbx, %rdi
callq 0x42d0
leaq 0xf042(%rip), %rsi      # 0x1430f
movl $0x9, %edx
movq %rbx, %rdi
callq 0x42d0
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x58fb
leaq 0xf02b(%rip), %rsi      # 0x14319
movl $0xb, %edx
movq %rbx, %rdi
callq 0x42d0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x43a0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x42d0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5331
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4270
xorb $0x1, %bpl
movq 0x17c3c(%rip), %rsi     # 0x1cf78
leaq 0x1f0(%rsp), %rdi
callq 0x41f0
leaq 0x270(%rsp), %rdi
callq 0x4090
movq 0x17c4b(%rip), %rsi     # 0x1cfa8
leaq 0x78(%rsp), %rdi
callq 0x4130
leaq 0xe8(%rsp), %rdi
callq 0x4090
movl %ebp, %eax
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x53a6
jmp 0x53c1
jmp 0x53be
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53c1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x53c1
jmp 0x53be
jmp 0x53b9
movq %rax, %rbx
jmp 0x53e2
movq %rax, %rbx
movq 0x17bb0(%rip), %rsi     # 0x1cf78
leaq 0x1f0(%rsp), %rdi
callq 0x41f0
leaq 0x270(%rsp), %rdi
callq 0x4090
movq 0x17bbf(%rip), %rsi     # 0x1cfa8
leaq 0x78(%rsp), %rdi
callq 0x4130
leaq 0xe8(%rsp), %rdi
callq 0x4090
movq %rbx, %rdi
callq 0x4400