// File: ef-gy[P]libefgy/src/test-case/cf.cpp
// Function: testContinuedFractionArithmetic(std::ostream&)
bool testContinuedFractionArithmetic(std::ostream &log) {
  numeric::fractional<long long> af(6, 11), bf(4, 5), rf;
  numeric::continuedFractional<long long> a(af), b(bf), r;

  rf = af + bf;
  log << af << " + " << bf << " = " << rf << "\n";

  r = a + b;
  rf = r;
  log << a << " + " << b << " = " << r << " = " << rf << "\n";

  if (rf != r) {
    return false;
  }

  rf = af - bf;
  log << af << " - " << bf << " = " << rf << "\n";

  r = a - b;
  rf = r;
  log << a << " - " << b << " = " << r << " = " << rf << "\n";

  if (rf != r) {
    return false;
  }

  rf = af * bf;
  log << af << " * " << bf << " = " << rf << "\n";

  r = a * b;
  rf = r;
  log << a << " * " << b << " = " << r << " = " << rf << "\n";

  if (rf != r) {
    return false;
  }

  rf = af / bf;
  log << af << " / " << bf << " = " << rf << "\n";

  r = a / b;
  rf = r;
  log << a << " / " << b << " = " << r << " = " << rf << "\n";

  if (rf != r) {
    return false;
  }

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3f0, %rsp            # imm = 0x3F0
movq %rdi, -0x10(%rbp)
leaq -0x20(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movl $0x6, %esi
movl $0xb, %edx
callq 0x6ef0
leaq -0x30(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
movl $0x4, %esi
movl $0x5, %edx
callq 0x6ef0
leaq -0x40(%rbp), %rdi
callq 0x6f30
movq -0x1c8(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x6f50
movq -0x1c0(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x6f50
jmp 0x5c1e
leaq -0xb0(%rbp), %rdi
callq 0x7200
jmp 0x5c2c
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x7240
movq %rdx, -0x1d8(%rbp)
movq %rax, -0x1d0(%rbp)
jmp 0x5c49
movq -0x1d8(%rbp), %rax
movq -0x1d0(%rbp), %rcx
movq %rcx, -0xc0(%rbp)
movq %rax, -0xb8(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x7290
jmp 0x5c77
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x72c0
movq %rax, -0x1e0(%rbp)
jmp 0x5c8d
movq -0x1e0(%rbp), %rdi
leaq 0x3152b(%rip), %rsi     # 0x371c6
callq 0x5360
movq %rax, -0x1e8(%rbp)
jmp 0x5ca9
movq -0x1e8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x72c0
movq %rax, -0x1f0(%rbp)
jmp 0x5cc2
movq -0x1f0(%rbp), %rdi
leaq 0x314fa(%rip), %rsi     # 0x371ca
callq 0x5360
movq %rax, -0x1f8(%rbp)
jmp 0x5cde
movq -0x1f8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x72c0
movq %rax, -0x200(%rbp)
jmp 0x5cf7
movq -0x200(%rbp), %rdi
leaq 0x3151a(%rip), %rsi     # 0x3721f
callq 0x5360
jmp 0x5d0c
leaq -0xe0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x7310
jmp 0x5d22
leaq -0xb0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x7360
jmp 0x5d37
leaq -0xe0(%rbp), %rdi
callq 0x73a0
leaq -0xb0(%rbp), %rdi
callq 0x73c0
movq %rdx, -0x210(%rbp)
movq %rax, -0x208(%rbp)
jmp 0x5d5f
movq -0x210(%rbp), %rax
movq -0x208(%rbp), %rcx
movq %rcx, -0xf0(%rbp)
movq %rax, -0xe8(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x7290
jmp 0x5d8d
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x74c0
movq %rax, -0x218(%rbp)
jmp 0x5da3
movq -0x218(%rbp), %rdi
leaq 0x31415(%rip), %rsi     # 0x371c6
callq 0x5360
movq %rax, -0x220(%rbp)
jmp 0x5dbf
movq -0x220(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x74c0
movq %rax, -0x228(%rbp)
jmp 0x5dd8
movq -0x228(%rbp), %rdi
leaq 0x313e4(%rip), %rsi     # 0x371ca
callq 0x5360
movq %rax, -0x230(%rbp)
jmp 0x5df4
movq -0x230(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x74c0
movq %rax, -0x238(%rbp)
jmp 0x5e10
movq -0x238(%rbp), %rdi
leaq 0x313ac(%rip), %rsi     # 0x371ca
callq 0x5360
movq %rax, -0x240(%rbp)
jmp 0x5e2c
movq -0x240(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x72c0
movq %rax, -0x248(%rbp)
jmp 0x5e45
movq -0x248(%rbp), %rdi
leaq 0x313cc(%rip), %rsi     # 0x3721f
callq 0x5360
jmp 0x5e5a
leaq -0x40(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x7620
movb %al, -0x249(%rbp)
jmp 0x5e72
movb -0x249(%rbp), %al
testb $0x1, %al
jne 0x5e7e
jmp 0x5ef9
movb $0x0, -0x1(%rbp)
movl $0x1, -0xf4(%rbp)
jmp 0x6699
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x66da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x66d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x66c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x73a0
jmp 0x66c5
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x7660
movq %rdx, -0x260(%rbp)
movq %rax, -0x258(%rbp)
jmp 0x5f16
movq -0x260(%rbp), %rax
movq -0x258(%rbp), %rcx
movq %rcx, -0x108(%rbp)
movq %rax, -0x100(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x7290
jmp 0x5f44
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x72c0
movq %rax, -0x268(%rbp)
jmp 0x5f5a
movq -0x268(%rbp), %rdi
leaq 0x31266(%rip), %rsi     # 0x371ce
callq 0x5360
movq %rax, -0x270(%rbp)
jmp 0x5f76
movq -0x270(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x72c0
movq %rax, -0x278(%rbp)
jmp 0x5f8f
movq -0x278(%rbp), %rdi
leaq 0x3122d(%rip), %rsi     # 0x371ca
callq 0x5360
movq %rax, -0x280(%rbp)
jmp 0x5fab
movq -0x280(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x72c0
movq %rax, -0x288(%rbp)
jmp 0x5fc4
movq -0x288(%rbp), %rdi
leaq 0x3124d(%rip), %rsi     # 0x3721f
callq 0x5360
jmp 0x5fd9
leaq -0x128(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x76b0
jmp 0x5fef
leaq -0xb0(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x7360
jmp 0x6004
leaq -0x128(%rbp), %rdi
callq 0x73a0
leaq -0xb0(%rbp), %rdi
callq 0x73c0
movq %rdx, -0x298(%rbp)
movq %rax, -0x290(%rbp)
jmp 0x602c
movq -0x298(%rbp), %rax
movq -0x290(%rbp), %rcx
movq %rcx, -0x138(%rbp)
movq %rax, -0x130(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x7290
jmp 0x605a
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x74c0
movq %rax, -0x2a0(%rbp)
jmp 0x6070
movq -0x2a0(%rbp), %rdi
leaq 0x31150(%rip), %rsi     # 0x371ce
callq 0x5360
movq %rax, -0x2a8(%rbp)
jmp 0x608c
movq -0x2a8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x74c0
movq %rax, -0x2b0(%rbp)
jmp 0x60a5
movq -0x2b0(%rbp), %rdi
leaq 0x31117(%rip), %rsi     # 0x371ca
callq 0x5360
movq %rax, -0x2b8(%rbp)
jmp 0x60c1
movq -0x2b8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x74c0
movq %rax, -0x2c0(%rbp)
jmp 0x60dd
movq -0x2c0(%rbp), %rdi
leaq 0x310df(%rip), %rsi     # 0x371ca
callq 0x5360
movq %rax, -0x2c8(%rbp)
jmp 0x60f9
movq -0x2c8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x72c0
movq %rax, -0x2d0(%rbp)
jmp 0x6112
movq -0x2d0(%rbp), %rdi
leaq 0x310ff(%rip), %rsi     # 0x3721f
callq 0x5360
jmp 0x6127
leaq -0x40(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x7620
movb %al, -0x2d1(%rbp)
jmp 0x613f
movb -0x2d1(%rbp), %al
testb $0x1, %al
jne 0x614b
jmp 0x6181
movb $0x0, -0x1(%rbp)
movl $0x1, -0xf4(%rbp)
jmp 0x6699
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x73a0
jmp 0x66c5
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x7700
movq %rdx, -0x2e8(%rbp)
movq %rax, -0x2e0(%rbp)
jmp 0x619e
movq -0x2e8(%rbp), %rax
movq -0x2e0(%rbp), %rcx
movq %rcx, -0x148(%rbp)
movq %rax, -0x140(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x7290
jmp 0x61cc
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x72c0
movq %rax, -0x2f0(%rbp)
jmp 0x61e2
movq -0x2f0(%rbp), %rdi
leaq 0x30fe2(%rip), %rsi     # 0x371d2
callq 0x5360
movq %rax, -0x2f8(%rbp)
jmp 0x61fe
movq -0x2f8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x72c0
movq %rax, -0x300(%rbp)
jmp 0x6217
movq -0x300(%rbp), %rdi
leaq 0x30fa5(%rip), %rsi     # 0x371ca
callq 0x5360
movq %rax, -0x308(%rbp)
jmp 0x6233
movq -0x308(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x72c0
movq %rax, -0x310(%rbp)
jmp 0x624c
movq -0x310(%rbp), %rdi
leaq 0x30fc5(%rip), %rsi     # 0x3721f
callq 0x5360
jmp 0x6261
leaq -0x168(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x7750
jmp 0x6277
leaq -0xb0(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x7360
jmp 0x628c
leaq -0x168(%rbp), %rdi
callq 0x73a0
leaq -0xb0(%rbp), %rdi
callq 0x73c0
movq %rdx, -0x320(%rbp)
movq %rax, -0x318(%rbp)
jmp 0x62b4
movq -0x320(%rbp), %rax
movq -0x318(%rbp), %rcx
movq %rcx, -0x178(%rbp)
movq %rax, -0x170(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x7290
jmp 0x62e2
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x74c0
movq %rax, -0x328(%rbp)
jmp 0x62f8
movq -0x328(%rbp), %rdi
leaq 0x30ecc(%rip), %rsi     # 0x371d2
callq 0x5360
movq %rax, -0x330(%rbp)
jmp 0x6314
movq -0x330(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x74c0
movq %rax, -0x338(%rbp)
jmp 0x632d
movq -0x338(%rbp), %rdi
leaq 0x30e8f(%rip), %rsi     # 0x371ca
callq 0x5360
movq %rax, -0x340(%rbp)
jmp 0x6349
movq -0x340(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x74c0
movq %rax, -0x348(%rbp)
jmp 0x6365
movq -0x348(%rbp), %rdi
leaq 0x30e57(%rip), %rsi     # 0x371ca
callq 0x5360
movq %rax, -0x350(%rbp)
jmp 0x6381
movq -0x350(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x72c0
movq %rax, -0x358(%rbp)
jmp 0x639a
movq -0x358(%rbp), %rdi
leaq 0x30e77(%rip), %rsi     # 0x3721f
callq 0x5360
jmp 0x63af
leaq -0x40(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x7620
movb %al, -0x359(%rbp)
jmp 0x63c7
movb -0x359(%rbp), %al
testb $0x1, %al
jne 0x63d3
jmp 0x6409
movb $0x0, -0x1(%rbp)
movl $0x1, -0xf4(%rbp)
jmp 0x6699
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x73a0
jmp 0x66c5
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x77a0
movq %rdx, -0x370(%rbp)
movq %rax, -0x368(%rbp)
jmp 0x6426
movq -0x370(%rbp), %rax
movq -0x368(%rbp), %rcx
movq %rcx, -0x188(%rbp)
movq %rax, -0x180(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x7290
jmp 0x6454
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x72c0
movq %rax, -0x378(%rbp)
jmp 0x646a
movq -0x378(%rbp), %rdi
leaq 0x30d5e(%rip), %rsi     # 0x371d6
callq 0x5360
movq %rax, -0x380(%rbp)
jmp 0x6486
movq -0x380(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x72c0
movq %rax, -0x388(%rbp)
jmp 0x649f
movq -0x388(%rbp), %rdi
leaq 0x30d1d(%rip), %rsi     # 0x371ca
callq 0x5360
movq %rax, -0x390(%rbp)
jmp 0x64bb
movq -0x390(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x72c0
movq %rax, -0x398(%rbp)
jmp 0x64d4
movq -0x398(%rbp), %rdi
leaq 0x30d3d(%rip), %rsi     # 0x3721f
callq 0x5360
jmp 0x64e9
leaq -0x1a8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x77f0
jmp 0x64ff
leaq -0xb0(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x7360
jmp 0x6514
leaq -0x1a8(%rbp), %rdi
callq 0x73a0
leaq -0xb0(%rbp), %rdi
callq 0x73c0
movq %rdx, -0x3a8(%rbp)
movq %rax, -0x3a0(%rbp)
jmp 0x653c
movq -0x3a8(%rbp), %rax
movq -0x3a0(%rbp), %rcx
movq %rcx, -0x1b8(%rbp)
movq %rax, -0x1b0(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x7290
jmp 0x656a
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x74c0
movq %rax, -0x3b0(%rbp)
jmp 0x6580
movq -0x3b0(%rbp), %rdi
leaq 0x30c48(%rip), %rsi     # 0x371d6
callq 0x5360
movq %rax, -0x3b8(%rbp)
jmp 0x659c
movq -0x3b8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x74c0
movq %rax, -0x3c0(%rbp)
jmp 0x65b5
movq -0x3c0(%rbp), %rdi
leaq 0x30c07(%rip), %rsi     # 0x371ca
callq 0x5360
movq %rax, -0x3c8(%rbp)
jmp 0x65d1
movq -0x3c8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x74c0
movq %rax, -0x3d0(%rbp)
jmp 0x65ed
movq -0x3d0(%rbp), %rdi
leaq 0x30bcf(%rip), %rsi     # 0x371ca
callq 0x5360
movq %rax, -0x3d8(%rbp)
jmp 0x6609
movq -0x3d8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x72c0
movq %rax, -0x3e0(%rbp)
jmp 0x6622
movq -0x3e0(%rbp), %rdi
leaq 0x30bef(%rip), %rsi     # 0x3721f
callq 0x5360
jmp 0x6637
leaq -0x40(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x7620
movb %al, -0x3e1(%rbp)
jmp 0x664f
movb -0x3e1(%rbp), %al
testb $0x1, %al
jne 0x665b
jmp 0x668b
movb $0x0, -0x1(%rbp)
movl $0x1, -0xf4(%rbp)
jmp 0x6699
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x73a0
jmp 0x66c5
movb $0x1, -0x1(%rbp)
movl $0x1, -0xf4(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x73a0
leaq -0x80(%rbp), %rdi
callq 0x73a0
leaq -0x60(%rbp), %rdi
callq 0x73a0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbp
retq
leaq -0xb0(%rbp), %rdi
callq 0x73a0
leaq -0x80(%rbp), %rdi
callq 0x73a0
leaq -0x60(%rbp), %rdi
callq 0x73a0
movq -0x88(%rbp), %rdi
callq 0x55b0
nop