// File: /workspace/github_cpp_makefile_star2_O3/ef-gy[P]libefgy/src/test-case/global.cpp
// Function: testBeacon(std::ostream&)
bool testBeacon(std::ostream &log) {
  int a, b, c, d;
  auto &root = global<beacons<int>>();

  if (root.size() != 0) {
    log << "beacon set size before registering anything should be 0 but is: "
        << root.size() << "\n";
    return false;
  }

  {
    beacon<int> ba(a);

    if (root.size() != 1) {
      log << "beacon set size after adding one element should be 1 but is: "
          << root.size() << "\n";
      return false;
    }

    {
      beacon<int> bb(b);
      beacon<int> bc(c);
      beacon<int> bd(d);

      if (root.size() != 4) {
        log << "beacon set size at this scope should be 4 but is: "
            << root.size() << "\n";
        return false;
      }
    }

    if (root.size() != 1) {
      log << "beacon set size after expiring three elements should be 1 but "
             "is: "
          << root.size() << "\n";
      return false;
    }
  }

  if (root.size() != 0) {
    log << "beacon set size after expiring all elements should be 0 but is: "
        << root.size() << "\n";
    return false;
  }

  return true;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
callq 0x4d38
cmpq $0x0, 0x18cc3(%rip)     # 0x1d7c8
je 0x4b43
leaq 0xf60c(%rip), %rsi      # 0x1411a
movl $0x40, %edx
movq %rbx, %rdi
callq 0x42a0
movq 0x18ca6(%rip), %rsi     # 0x1d7c8
movq %rbx, %rdi
callq 0x4190
leaq 0xf78e(%rip), %rsi      # 0x142bf
movl $0x1, %edx
movq %rax, %rdi
callq 0x42a0
jmp 0x4cd7
callq 0x4d38
leaq 0x4c(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x18c47(%rip), %r14     # 0x1d7a0
movq %r14, 0x38(%rsp)
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x134c2
cmpq $0x1, 0x18c52(%rip)     # 0x1d7c8
jne 0x4c41
callq 0x4d38
leaq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r14, 0x28(%rsp)
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x134c2
callq 0x4d38
leaq 0x44(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq %rsp, %rsi
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x134c2
callq 0x4d38
leaq 0x40(%rsp), %rax
movq %rax, (%rsp)
movq %r14, 0x8(%rsp)
leaq 0x50(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x134c2
cmpq $0x4, 0x18bdb(%rip)     # 0x1d7c8
jne 0x4c7a
movq %rsp, %rdi
callq 0x5116
leaq 0x10(%rsp), %rdi
callq 0x5116
leaq 0x20(%rsp), %rdi
callq 0x5116
cmpq $0x1, 0x18bb1(%rip)     # 0x1d7c8
jne 0x4ce1
leaq 0x30(%rsp), %rdi
callq 0x5116
cmpq $0x0, 0x18b99(%rip)     # 0x1d7c8
je 0x4cf2
leaq 0xf5d3(%rip), %rsi      # 0x1420f
jmp 0x4b0e
movl $0x3d, %edx
leaq 0xf50e(%rip), %rsi      # 0x1415b
movq %rbx, %rdi
callq 0x42a0
movq 0x18b6c(%rip), %rsi     # 0x1d7c8
movq %rbx, %rdi
callq 0x4190
leaq 0xf654(%rip), %rsi      # 0x142bf
movl $0x1, %edx
movq %rax, %rdi
callq 0x42a0
jmp 0x4ccd
leaq 0xf518(%rip), %rsi      # 0x14199
movl $0x32, %edx
movq %rbx, %rdi
callq 0x42a0
movq 0x18b33(%rip), %rsi     # 0x1d7c8
movq %rbx, %rdi
callq 0x4190
leaq 0xf61b(%rip), %rsi      # 0x142bf
movl $0x1, %edx
movq %rax, %rdi
callq 0x42a0
movq %rsp, %rdi
callq 0x5116
leaq 0x10(%rsp), %rdi
callq 0x5116
leaq 0x20(%rsp), %rdi
callq 0x5116
leaq 0x30(%rsp), %rdi
callq 0x5116
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movl $0x42, %edx
leaq 0xf4df(%rip), %rsi      # 0x141cc
jmp 0x4c4d
movb $0x1, %al
jmp 0x4cd9
movq %rax, %rbx
jmp 0x4d0d
movq %rax, %rbx
jmp 0x4d17
jmp 0x4d23
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5116
leaq 0x10(%rsp), %rdi
callq 0x5116
leaq 0x20(%rsp), %rdi
callq 0x5116
jmp 0x4d26
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x5116
movq %rbx, %rdi
callq 0x43b0