// File: /workspace/github_cpp_makefile_star2_O1/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 0x51ea
incq %rcx
addq $0x10, %rax
cmpq $0x3, %rcx
jne 0x51e6
leaq 0x78(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x594e
leaq 0x1f0(%rsp), %rdi
callq 0x41c0
leaq 0x200(%rsp), %r14
leaq 0xf073(%rip), %rsi      # 0x142a3
movl $0x9, %edx
movq %r14, %rdi
callq 0x42d0
leaq 0xf069(%rip), %rsi      # 0x142ad
movl $0x9, %edx
movq %r14, %rdi
callq 0x42d0
leaq 0xf05f(%rip), %rsi      # 0x142b7
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
movb $0x1, %bpl
cmpq 0x30(%rsp), %rdx
jne 0x52b9
testq %rdx, %rdx
je 0x52b7
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x4290
testl %eax, %eax
setne %bpl
jmp 0x52b9
xorl %ebp, %ebp
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x52d4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4270
leaq 0x18(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x52ef
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4270
testb %bpl, %bpl
je 0x5373
leaq 0xefc6(%rip), %rsi      # 0x142c1
movl $0x3d, %edx
movq %rbx, %rdi
callq 0x42d0
leaq 0xeff0(%rip), %rsi      # 0x142ff
movl $0x9, %edx
movq %rbx, %rdi
callq 0x42d0
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x594e
leaq 0xefd9(%rip), %rsi      # 0x14309
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 0x5373
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4270
xorb $0x1, %bpl
movq 0x17bfa(%rip), %rsi     # 0x1cf78
leaq 0x1f0(%rsp), %rdi
callq 0x41f0
leaq 0x270(%rsp), %rdi
callq 0x4090
movq 0x17c09(%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 0x53e8
jmp 0x5403
jmp 0x5400
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5403
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4270
jmp 0x5403
jmp 0x5400
jmp 0x53fb
movq %rax, %rbx
jmp 0x5424
movq %rax, %rbx
movq 0x17b6e(%rip), %rsi     # 0x1cf78
leaq 0x1f0(%rsp), %rdi
callq 0x41f0
leaq 0x270(%rsp), %rdi
callq 0x4090
movq 0x17b7d(%rip), %rsi     # 0x1cfa8
leaq 0x78(%rsp), %rdi
callq 0x4130
leaq 0xe8(%rsp), %rdi
callq 0x4090
movq %rbx, %rdi
callq 0x4400