// File: /workspace/github_cpp_makefile_star2_O1/ef-gy[P]libefgy/src/test-case/pi.cpp
// Function: testPi(std::ostream&)
bool testPi(std::ostream &log) {
  pi<longDouble> piD1(1, 1);
  pi<longDouble> piD2(1, 2);
  pi<longDouble> piD3(1, 3);
  pi<longDouble> piD4(1, 4);

  log << "pi<longDouble,1> = " << (long double)longDouble(piD1) << "\n";
  log << "pi<longDouble,2> = " << (long double)longDouble(piD2) << "\n";
  log << "pi<longDouble,3> = " << (long double)longDouble(piD3) << "\n";
  log << "pi<longDouble,4> = " << (long double)longDouble(piD4) << "\n";

  if (longDouble(piD1) != pi<longDouble>::get(1)) {
    log << "constexpr method returned unexpected result\n";
    return false;
  }

  if (longDouble(piD2) != pi<longDouble>::get(2)) {
    log << "constexpr method returned unexpected result\n";
    return false;
  }

  if (longDouble(piD3) != pi<longDouble>::get(3)) {
    log << "constexpr method returned unexpected result\n";
    return false;
  }

  if (longDouble(piD4) != pi<longDouble>::get(4)) {
    log << "constexpr method returned unexpected result\n";
    return false;
  }

  pi<long double> piDL1(1, 1);
  pi<long double> piDL2(1, 2);
  pi<long double> piDL3(1, 3);
  pi<long double> piDL4(1, 4);

  if ((long double)(piDL1) != pi<long double>::get(1)) {
    log << "constexpr method returned unexpected result\n";
    return false;
  }

  if ((long double)(piDL2) != pi<long double>::get(2)) {
    log << "constexpr method returned unexpected result\n";
    return false;
  }

  if ((long double)(piDL3) != pi<long double>::get(3)) {
    log << "constexpr method returned unexpected result\n";
    return false;
  }

  if ((long double)(piDL4) != pi<long double>::get(4)) {
    log << "constexpr method returned unexpected result\n";
    return false;
  }

  log << "pi<long double,1> = " << (long double)piDL1 << "\n";
  log << "pi<long double,2> = " << (long double)piDL2 << "\n";
  log << "pi<long double,3> = " << (long double)piDL3 << "\n";
  log << "pi<long double,4> = " << (long double)piDL4 << "\n";

  pi<fraction> piQ1(fraction(1), 1);
  pi<fraction> piQ2(fraction(1), 2);
  pi<fraction> piQ3(fraction(1), 3);
  pi<fraction> piQ4(fraction(1), 4);

  log << "pi<fraction,1> = " << fraction(piQ1) << "\n";
  log << "pi<fraction,2> = " << fraction(piQ2) << "\n";
  log << "pi<fraction,3> = " << fraction(piQ3) << "\n";
  log << "pi<fraction,4> = " << fraction(piQ4) << "\n";

  if (fraction(piQ1) != pi<fraction>::get(1)) {
    log << "constexpr method returned unexpected result\n";
    return false;
  }

  if (fraction(piQ2) != pi<fraction>::get(2)) {
    log << "constexpr method returned unexpected result\n";
    return false;
  }

  if (fraction(piQ3) != pi<fraction>::get(3)) {
    log << "constexpr method returned unexpected result\n";
    return false;
  }

  if (fraction(piQ4) != pi<fraction>::get(4)) {
    log << "constexpr method returned unexpected result\n";
    return false;
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rdi, %rbx
movl $0x1, %eax
leaq 0x1a0(%rsp), %r13
movq %rax, -0x10(%r13)
fld1
fld %st(0)
fstpt 0x1a0(%rsp)
leaq 0x140(%rsp), %r12
movq $0x2, -0x10(%r12)
fld %st(0)
fstpt 0x140(%rsp)
leaq 0x180(%rsp), %rbp
movq $0x3, -0x10(%rbp)
fld %st(0)
fstpt 0x180(%rsp)
leaq 0x160(%rsp), %r15
movq $0x4, -0x10(%r15)
fstpt 0x160(%rsp)
leaq 0x1060b(%rip), %rsi     # 0x1513a
movl $0x13, %edx
callq 0x42c0
fldz
fstpt 0x40(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x190(%rsp), %rsi
leaq 0x40(%rsp), %rcx
movq %r13, %rdx
callq 0x1119c
fldt 0x70(%rsp)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x4120
leaq 0x10753(%rip), %r14     # 0x152c2
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42c0
leaq 0x105c8(%rip), %rsi     # 0x1514e
movl $0x13, %edx
movq %rbx, %rdi
callq 0x42c0
fldz
fstpt 0x40(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x130(%rsp), %rsi
leaq 0x40(%rsp), %rcx
movq %r12, %rdx
callq 0x1119c
fldt 0x70(%rsp)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x4120
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42c0
leaq 0x10589(%rip), %rsi     # 0x15162
movl $0x13, %edx
movq %rbx, %rdi
callq 0x42c0
fldz
fstpt 0x40(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x170(%rsp), %rsi
leaq 0x40(%rsp), %rcx
movq %rbp, %rdx
callq 0x1119c
fldt 0x70(%rsp)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x4120
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42c0
leaq 0x1054a(%rip), %rsi     # 0x15176
movl $0x13, %edx
movq %rbx, %rdi
callq 0x42c0
fldz
fstpt 0x40(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x150(%rsp), %rsi
leaq 0x40(%rsp), %rcx
movq %r15, %rdx
callq 0x1119c
fldt 0x70(%rsp)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x4120
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x42c0
fldz
fstpt 0x40(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x40(%rsp), %rcx
leaq 0x190(%rsp), %rsi
movq %r13, %rdx
callq 0x1119c
leaq 0x10(%rsp), %rsi
movl $0x1, %eax
movq %rax, (%rsi)
fld1
fstpt 0xb0(%rsp)
fldz
fstpt 0x40(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0x1119c
fldt 0x70(%rsp)
fldt 0xd0(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x54dd
jp 0x54dd
fldz
fstpt 0x40(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x130(%rsp), %rsi
leaq 0x40(%rsp), %rcx
leaq 0x140(%rsp), %rdx
callq 0x1119c
leaq 0x10(%rsp), %rsi
movq $0x2, (%rsi)
fld1
fstpt 0xb0(%rsp)
fldz
fstpt 0x40(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0x1119c
fldt 0x70(%rsp)
fldt 0xd0(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x54dd
jp 0x54dd
fldz
fstpt 0x40(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x170(%rsp), %rsi
leaq 0x40(%rsp), %rcx
movq %rbp, %rdx
callq 0x1119c
leaq 0x10(%rsp), %rsi
movq $0x3, (%rsi)
fld1
fstpt 0xb0(%rsp)
fldz
fstpt 0x40(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0x1119c
fldt 0x70(%rsp)
fldt 0xd0(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x54dd
jp 0x54dd
fldz
fstpt 0x40(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x150(%rsp), %rsi
leaq 0x40(%rsp), %rcx
movq %r15, %rdx
callq 0x1119c
leaq 0x10(%rsp), %rsi
movq $0x4, (%rsi)
fld1
fstpt 0xb0(%rsp)
fldz
fstpt 0x40(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0x1119c
fldt 0x70(%rsp)
fldt 0xd0(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x54dd
jp 0x54dd
movl $0x1, %r14d
leaq 0x50(%rsp), %r15
movq %r14, -0x10(%r15)
fld1
fld %st(0)
fstpt 0x50(%rsp)
movq $0x2, 0x70(%rsp)
fld %st(0)
fstpt 0x80(%rsp)
movq $0x3, 0xd0(%rsp)
fld %st(0)
fstpt 0xe0(%rsp)
movq $0x4, 0xb0(%rsp)
fstpt 0xc0(%rsp)
fldz
fstpt 0x10(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r15, %rsi
callq 0x11344
fstpt 0x64(%rsp)
leaq 0xf0(%rsp), %rdi
movq %r14, (%rdi)
fld1
fstpt 0x90(%rsp)
fldz
fstpt 0x10(%rsp)
leaq 0x90(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x11344
fldt 0x64(%rsp)
fucompi %st(1), %st
fstp %st(0)
jne 0x54dd
jp 0x54dd
leaq 0x80(%rsp), %r13
fldz
fstpt 0x10(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r13, %rsi
callq 0x11344
fstpt 0x64(%rsp)
leaq 0xf0(%rsp), %rdi
movq $0x2, (%rdi)
fld1
fstpt 0x90(%rsp)
fldz
fstpt 0x10(%rsp)
leaq 0x90(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x11344
fldt 0x64(%rsp)
fucompi %st(1), %st
fstp %st(0)
jne 0x54dd
jp 0x54dd
leaq 0xe0(%rsp), %r12
fldz
fstpt 0x10(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r12, %rsi
callq 0x11344
fstpt 0x64(%rsp)
leaq 0xf0(%rsp), %rdi
movq $0x3, (%rdi)
fld1
fstpt 0x90(%rsp)
fldz
fstpt 0x10(%rsp)
leaq 0x90(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x11344
fldt 0x64(%rsp)
fucompi %st(1), %st
fstp %st(0)
jne 0x54dd
jp 0x54dd
leaq 0xc0(%rsp), %r14
fldz
fstpt 0x10(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
callq 0x11344
fstpt 0x64(%rsp)
leaq 0xf0(%rsp), %rdi
movq $0x4, (%rdi)
fld1
fstpt 0x90(%rsp)
fldz
fstpt 0x10(%rsp)
leaq 0x90(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x11344
fldt 0x64(%rsp)
fucompi %st(1), %st
fstp %st(0)
jne 0x54dd
jp 0x54dd
leaq 0x1017f(%rip), %rsi     # 0x151b7
movl $0x14, %edx
movq %rbx, %rdi
callq 0x42c0
fldz
fstpt 0x10(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r15, %rsi
callq 0x11344
fstpt (%rsp)
movq %rbx, %rdi
callq 0x4120
leaq 0x10253(%rip), %r15     # 0x152c2
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42c0
leaq 0x10146(%rip), %rsi     # 0x151cc
movl $0x14, %edx
movq %rbx, %rdi
callq 0x42c0
fldz
fstpt 0x10(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r13, %rsi
callq 0x11344
fstpt (%rsp)
movq %rbx, %rdi
callq 0x4120
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42c0
leaq 0x10114(%rip), %rsi     # 0x151e1
movl $0x14, %edx
movq %rbx, %rdi
callq 0x42c0
fldz
fstpt 0x10(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r12, %rsi
callq 0x11344
fstpt (%rsp)
movq %rbx, %rdi
callq 0x4120
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42c0
leaq 0x100df(%rip), %rsi     # 0x151f6
movl $0x14, %edx
movq %rbx, %rdi
callq 0x42c0
fldz
fstpt 0x10(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0x10(%rsp), %r12
movq %r14, %rsi
movq %r12, %rdx
callq 0x11344
fstpt (%rsp)
movq %rbx, %rdi
callq 0x4120
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42c0
movl $0x1, %eax
movq %rax, (%r12)
leaq 0x18(%rsp), %rbp
movq %rax, (%rbp)
movq %rax, 0x8(%rbp)
leaq 0x98(%rsp), %r12
movq $0x2, -0x8(%r12)
movq %rax, (%r12)
movq %rax, 0x8(%r12)
leaq 0xf8(%rsp), %r15
movq $0x3, -0x8(%r15)
movq %rax, (%r15)
movq %rax, 0x8(%r15)
leaq 0x120(%rsp), %rcx
movq $0x4, -0x8(%rcx)
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
movl $0x1, %r13d
leaq 0x10043(%rip), %rsi     # 0x1520b
movl $0x11, %edx
movq %rbx, %rdi
callq 0x42c0
xorl %eax, %eax
leaq 0x30(%rsp), %r14
movq %rax, (%r14)
movq %r13, 0x8(%r14)
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x114b6
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x58da
movl $0x1, %edx
movq %rax, %rdi
leaq 0x100a9(%rip), %rbp     # 0x152c2
movq %rbp, %rsi
callq 0x42c0
leaq 0xfff5(%rip), %rsi      # 0x1521d
movl $0x11, %edx
movq %rbx, %rdi
callq 0x42c0
xorl %eax, %eax
movq %rax, (%r14)
movq %r13, 0x8(%r14)
leaq 0x90(%rsp), %rdi
leaq 0x30(%rsp), %r14
movq %r12, %rsi
movq %r14, %rdx
callq 0x114b6
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x58da
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x42c0
leaq 0xffab(%rip), %rsi      # 0x1522f
movl $0x11, %edx
movq %rbx, %rdi
callq 0x42c0
xorl %eax, %eax
movq %rax, (%r14)
xorl %r12d, %r12d
movq %r13, 0x8(%r14)
leaq 0xf0(%rsp), %rdi
leaq 0x30(%rsp), %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x114b6
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x58da
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x42c0
leaq 0xff5e(%rip), %rsi      # 0x15241
movl $0x11, %edx
movq %rbx, %rdi
callq 0x42c0
movq %r12, (%r14)
movq %r13, 0x8(%r14)
leaq 0x118(%rsp), %rdi
leaq 0x30(%rsp), %r14
leaq 0x120(%rsp), %rsi
movq %r14, %rdx
callq 0x114b6
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x58da
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x42c0
movq %r12, (%r14)
movq %r13, 0x8(%r14)
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq %r14, %rdx
callq 0x114b6
movq %rax, %r15
movq %rdx, %rbp
leaq 0xa8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x108(%rsp), %rsi
movq %r13, (%rsi)
movq %r13, 0x8(%rsi)
movq %r12, (%r14)
movq %r13, 0x8(%r14)
leaq 0x30(%rsp), %rdx
callq 0x114b6
xorq %r15, %rax
xorq %rbp, %rdx
orq %rax, %rdx
jne 0x54dd
xorl %r12d, %r12d
leaq 0x30(%rsp), %r14
movq %r12, (%r14)
movl $0x1, %ebp
movq %rbp, 0x8(%r14)
leaq 0x90(%rsp), %rdi
leaq 0x98(%rsp), %rsi
movq %r14, %rdx
callq 0x114b6
movq %rax, %r15
movq %rdx, %r13
leaq 0xa8(%rsp), %rdi
movq $0x2, (%rdi)
leaq 0x108(%rsp), %rsi
movq %rbp, (%rsi)
movq %rbp, 0x8(%rsi)
movq %r12, (%r14)
movq %rbp, 0x8(%r14)
leaq 0x30(%rsp), %rdx
callq 0x114b6
xorq %r15, %rax
xorq %r13, %rdx
orq %rax, %rdx
jne 0x54dd
xorl %ebp, %ebp
leaq 0x30(%rsp), %r14
movq %rbp, (%r14)
movl $0x1, %r13d
movq %r13, 0x8(%r14)
leaq 0xf0(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
movq %r14, %rdx
callq 0x114b6
movq %rax, %r15
movq %rdx, %r12
leaq 0xa8(%rsp), %rdi
movq $0x3, (%rdi)
leaq 0x108(%rsp), %rsi
movq %r13, (%rsi)
movq %r13, 0x8(%rsi)
movq %rbp, (%r14)
movq %r13, 0x8(%r14)
leaq 0x30(%rsp), %rdx
callq 0x114b6
xorq %r15, %rax
xorq %r12, %rdx
orq %rax, %rdx
jne 0x54dd
xorl %ebp, %ebp
leaq 0x30(%rsp), %r14
movq %rbp, (%r14)
movq %r13, 0x8(%r14)
leaq 0x118(%rsp), %rdi
leaq 0x120(%rsp), %rsi
movq %r14, %rdx
callq 0x114b6
movq %rax, %r15
movq %rdx, %r12
leaq 0xa8(%rsp), %rdi
movq $0x4, (%rdi)
leaq 0x108(%rsp), %rsi
movq %r13, (%rsi)
movq %r13, 0x8(%rsi)
movq %rbp, (%r14)
movq %r13, 0x8(%r14)
leaq 0x30(%rsp), %rdx
callq 0x114b6
xorq %r15, %rax
xorq %r12, %rdx
orq %rax, %rdx
movb $0x1, %al
je 0x54f3
leaq 0xfca6(%rip), %rsi      # 0x1518a
movl $0x2c, %edx
movq %rbx, %rdi
callq 0x42c0
xorl %eax, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop