// File: ef-gy[P]libefgy/src/test-case/unit.cpp
// Function: testMetricMultipliers(std::ostream&)
bool testMetricMultipliers(std::ostream &log) {
  if (metricMultiplier<fraction, 1, 1>::get() != fraction(10)) {
    log << "metric multiplier <1,1> is "
        << metricMultiplier<fraction, 1, 1>::get()
        << " but should have been 10/1\n";
    return false;
  }

  if (metricMultiplier<fraction, 1, 2>::get() != fraction(100)) {
    log << "metric multiplier <1,2> is "
        << metricMultiplier<fraction, 1, 2>::get()
        << " but should have been 100/1\n";
    return false;
  }

  if (metricMultiplier<fraction, 0, 2>::get() != fraction(1)) {
    log << "metric multiplier <0,2> is "
        << metricMultiplier<fraction, 0, 2>::get()
        << " but should have been 1/1\n";
    return false;
  }

  if (metricMultiplier<fraction, 3, 2>::get() != fraction(1000000)) {
    log << "metric multiplier <3,2> is "
        << metricMultiplier<fraction, 3, 2>::get()
        << " but should have been 1000000/1\n";
    return false;
  }

  if (metricMultiplier<fraction, 3, 3>::get() != fraction(1000000000)) {
    log << "metric multiplier <3,3> is "
        << metricMultiplier<fraction, 3, 3>::get()
        << " but should have been 1000000000/1\n";
    return false;
  }

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
callq 0x7520
movq %rax, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
movl $0xa, %esi
callq 0x6fb0
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x74f0
testb $0x1, %al
jne 0x610d
jmp 0x6159
movq -0x10(%rbp), %rdi
leaq 0x2f358(%rip), %rsi     # 0x35470
callq 0x5360
movq %rax, -0x108(%rbp)
callq 0x7520
movq -0x108(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x7560
movq %rax, %rdi
leaq 0x2f341(%rip), %rsi     # 0x3548c
callq 0x5360
movb $0x0, -0x1(%rbp)
jmp 0x6381
callq 0x75b0
movq %rax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
leaq -0x60(%rbp), %rdi
movl $0x64, %esi
callq 0x6fb0
leaq -0x50(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x74f0
testb $0x1, %al
jne 0x6187
jmp 0x61d3
movq -0x10(%rbp), %rdi
leaq 0x2f316(%rip), %rsi     # 0x354a8
callq 0x5360
movq %rax, -0x110(%rbp)
callq 0x75b0
movq -0x110(%rbp), %rdi
movq %rax, -0x70(%rbp)
movq %rdx, -0x68(%rbp)
leaq -0x70(%rbp), %rsi
callq 0x7560
movq %rax, %rdi
leaq 0x2f2ff(%rip), %rsi     # 0x354c4
callq 0x5360
movb $0x0, -0x1(%rbp)
jmp 0x6381
callq 0x75f0
movq %rax, -0x80(%rbp)
movq %rdx, -0x78(%rbp)
leaq -0x90(%rbp), %rdi
movl $0x1, %esi
callq 0x6fb0
leaq -0x80(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x74f0
testb $0x1, %al
jne 0x6207
jmp 0x625c
movq -0x10(%rbp), %rdi
leaq 0x2f2cf(%rip), %rsi     # 0x354e1
callq 0x5360
movq %rax, -0x118(%rbp)
callq 0x75f0
movq -0x118(%rbp), %rdi
movq %rax, -0xa0(%rbp)
movq %rdx, -0x98(%rbp)
leaq -0xa0(%rbp), %rsi
callq 0x7560
movq %rax, %rdi
leaq 0x2f2af(%rip), %rsi     # 0x354fd
callq 0x5360
movb $0x0, -0x1(%rbp)
jmp 0x6381
callq 0x7630
movq %rax, -0xb0(%rbp)
movq %rdx, -0xa8(%rbp)
leaq -0xc0(%rbp), %rdi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x6fb0
leaq -0xb0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x74f0
testb $0x1, %al
jne 0x6299
jmp 0x62ee
movq -0x10(%rbp), %rdi
leaq 0x2f274(%rip), %rsi     # 0x35518
callq 0x5360
movq %rax, -0x120(%rbp)
callq 0x7630
movq -0x120(%rbp), %rdi
movq %rax, -0xd0(%rbp)
movq %rdx, -0xc8(%rbp)
leaq -0xd0(%rbp), %rsi
callq 0x7560
movq %rax, %rdi
leaq 0x2f254(%rip), %rsi     # 0x35534
callq 0x5360
movb $0x0, -0x1(%rbp)
jmp 0x6381
callq 0x7670
movq %rax, -0xe0(%rbp)
movq %rdx, -0xd8(%rbp)
leaq -0xf0(%rbp), %rdi
movl $0x3b9aca00, %esi       # imm = 0x3B9ACA00
callq 0x6fb0
leaq -0xe0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x74f0
testb $0x1, %al
jne 0x632b
jmp 0x637d
movq -0x10(%rbp), %rdi
leaq 0x2f21f(%rip), %rsi     # 0x35555
callq 0x5360
movq %rax, -0x128(%rbp)
callq 0x7670
movq -0x128(%rbp), %rdi
movq %rax, -0x100(%rbp)
movq %rdx, -0xf8(%rbp)
leaq -0x100(%rbp), %rsi
callq 0x7560
movq %rax, %rdi
leaq 0x2f1ff(%rip), %rsi     # 0x35571
callq 0x5360
movb $0x0, -0x1(%rbp)
jmp 0x6381
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nop