// File: /workspace/github_cpp_makefile_star2_O1/ef-gy[P]libefgy/src/test-case/unit.cpp
// Function: testUnitBinary(std::ostream&)
bool testUnitBinary(std::ostream &log) {
  byte<fraction>::kibi kib_2(fraction(2));

  if (fraction(2) != fraction(kib_2)) {
    log << "variable was not initialised to the expected value: " << kib_2
        << " instead of 2/1\n";
    return false;
  }

  byte<fraction>::unit b_2 = kib_2;

  if (fraction(2048) != b_2) {
    log << "variable was not converted to the expected value: " << b_2
        << " instead of 2048/1\n";
    return false;
  }

  byte<fraction>::mebi mib_2 = kib_2;

  if (fraction(1, 512) != mib_2) {
    log << "variable was not converted to the expected value: " << mib_2
        << " instead of 1/512\n";
    return false;
  }

  byte<fraction>::kilo kb_2 = kib_2;

  if (fraction(256, 125) != kb_2) {
    log << "variable was not converted to the expected value: " << kb_2
        << " instead of 256/125\n";
    return false;
  }

  byte<fraction>::mega mb_2 = kib_2;

  if (fraction(32, 15625) != mb_2) {
    log << "variable was not converted to the expected value: " << mb_2
        << " instead of 32/15625\n";
    return false;
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movq $0x2, (%rsp)
movl $0x1, %r15d
movq %r15, 0x8(%rsp)
movl $0x800, %r12d           # imm = 0x800
leaq 0x30(%rsp), %r14
movq %r12, (%r14)
movq %r15, 0x8(%r14)
movq %r14, %rdi
callq 0x13d6c
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rax, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
xorq %r12, %rax
xorq %r15, %rcx
orq %rax, %rcx
jne 0x52ed
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
shlq $0xa, %rcx
leaq 0x30(%rsp), %r14
movq %rax, (%r14)
movq %rcx, 0x8(%r14)
movq %r14, %rdi
callq 0x13d6c
movups (%r14), %xmm0
movups %xmm0, (%r14)
leaq 0x20(%rsp), %r15
movq $0x1, (%r15)
movq $0x200, 0x8(%r15)       # imm = 0x200
movq %r15, %rdi
callq 0x13d6c
movq (%r15), %rax
cmpq (%r14), %rax
jne 0x531c
movq 0x28(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x531c
leaq 0x20(%rsp), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x57e6
leaq 0x10(%rsp), %r15
movq $0x100, (%r15)          # imm = 0x100
movq $0x7d, 0x8(%r15)
movq %r15, %rdi
callq 0x13d6c
movq (%r15), %rax
cmpq (%r14), %rax
jne 0x5362
movq 0x18(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0x5362
leaq 0x10(%rsp), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x587c
leaq 0x50(%rsp), %r15
movq $0x20, (%r15)
movq $0x3d09, 0x8(%r15)      # imm = 0x3D09
movq %r15, %rdi
callq 0x13d6c
movq (%r15), %rax
cmpq (%r14), %rax
jne 0x5391
movq 0x58(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x5391
xorl %ebp, %ebp
jmp 0x5394
leaq 0x101ad(%rip), %rsi     # 0x154a1
movl $0x32, %edx
movq %rbx, %rdi
callq 0x42b0
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x57ac
leaq 0x101bf(%rip), %rsi     # 0x154d4
movl $0x13, %edx
jmp 0x5349
leaq 0x1017e(%rip), %rsi     # 0x154a1
movl $0x32, %edx
movq %rbx, %rdi
callq 0x42b0
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x57ac
leaq 0x101a4(%rip), %rsi     # 0x154e8
movl $0x12, %edx
movq %rax, %rdi
callq 0x42b0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10138(%rip), %rsi     # 0x154a1
movl $0x32, %edx
movq %rbx, %rdi
callq 0x42b0
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x57ac
leaq 0x10171(%rip), %rsi     # 0x154fb
movl $0x14, %edx
jmp 0x5349
movb $0x1, %bpl
testb %bpl, %bpl
je 0x53ce
leaq 0x10101(%rip), %rsi     # 0x154a1
movl $0x32, %edx
movq %rbx, %rdi
callq 0x42b0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x57ac
leaq 0x1014f(%rip), %rsi     # 0x15510
movl $0x15, %edx
movq %rax, %rdi
callq 0x42b0
xorb $0x1, %bpl
jmp 0x5353
nop