// File: /workspace/github_cpp_makefile_star2_O2/trapexit[P]bbf/src/bbf_info.cpp
// Function: bbf::info(Options const&)
AppError
  info(const Options &opts_)
  {
    int rv;
    BlkDev blkdev;
    sg::identity ident;

    rv = blkdev.open_read(opts_.device);
    if(rv < 0)
      return AppError::opening_device(-rv,opts_.device);

    std::cout << opts_.device << ":" << std::endl;

    if(blkdev.has_identity())
      {
        ident = blkdev.identity();
        std::cout
          << " - serial_number: "             << ident.serial_number << std::endl
          << " - firmware_revision: "         << ident.firmware_revision << std::endl
          << " - model_number: "              << ident.model_number << std::endl
          << " - RPM: "                       << ident.rpm << std::endl
          << " - features:"                   << std::endl
          << "   - form_factor: "             << l::form_factor(ident) << std::endl
          << "   - write_uncorrectable: "     << ident.write_uncorrectable << std::endl
          << "   - smart_supported: "         << ident.smart_supported << std::endl
          << "   - smart_enabled: "           << ident.smart_enabled << std::endl
          << "   - security_supported: "      << ident.security_supported << std::endl
          << "   - security_enabled: "        << ident.security_enabled << std::endl
          << "   - security_locked: "         << ident.security_locked << std::endl
          << "   - security_frozen: "         << ident.security_frozen << std::endl
          << "   - security_count_expired: "  << ident.security_count_expired << std::endl
          << "   - security_enhanced_erase_supported: " << ident.security_enhanced_erase_supported << std::endl
          << "   - security_normal_erase_time: "   << ident.security_normal_erase_time << std::endl
          << "   - security_enhanced_erase_time: " << ident.security_enhanced_erase_time << std::endl
          << "   - block_erase: "             << ident.block_erase << std::endl
          << "   - overwrite: "               << ident.overwrite << std::endl
          << "   - crypto_scramble: "         << ident.crypto_scramble << std::endl
          << "   - sanitize: "                << ident.sanitize << std::endl
          << "   - supports_sata_gen1: "       << ident.supports_sata_gen1 << std::endl
          << "   - supports_sata_gen2: "       << ident.supports_sata_gen2 << std::endl
          << "   - supports_sata_gen3: "       << ident.supports_sata_gen3 << std::endl
          << "   - trim_supported: "          << ident.trim_supported << std::endl
          ;
      }

    std::cout
      << " - block_size:"  << std::endl
      << "   - physical: " << blkdev.physical_block_size() << std::endl
      << "   - logical: "  << blkdev.logical_block_size() << std::endl
      << "   - stepping: " << blkdev.block_stepping() << std::endl
      << " - block_count:" << std::endl
      << "   - physical: " << blkdev.physical_block_count() << std::endl
      << "   - logical: "  << blkdev.logical_block_count() << std::endl
      << " - size:"        << std::endl
      << "   - bytes: "    << blkdev.size_in_bytes() << std::endl
      << "   - human:"     << std::endl
      << "     - base2: "  << num::humanize(blkdev.size_in_bytes()) << std::endl
      << "     - base10: " << num::humanize(blkdev.size_in_bytes(),true) << std::endl
      << std::endl;

    rv = blkdev.close();
    if(rv < 0)
      return AppError::closing_device(-rv,opts_.device);

    return AppError::success();
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x98(%rsp), %r15
movq %r15, %rdi
callq 0xa986
addq $0x8, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xa9d2
testl %eax, %eax
js 0x988f
movq 0x17d35(%rip), %rdi     # 0x20fb8
movq %r14, %rsi
callq 0x4430
leaq 0x11cab(%rip), %rsi     # 0x1af3d
movq %rax, %rdi
callq 0x44b0
movq %rax, %rdi
callq 0x4230
cmpb $0x1, 0x120(%rsp)
jne 0x968c
leaq 0xc8(%rsp), %rsi
pushq $0xb
popq %rcx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq 0x17cf0(%rip), %rdi     # 0x20fb8
leaq 0x9123(%rip), %rsi      # 0x123f2
callq 0x44b0
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x44b0
movq %rax, %rdi
callq 0x4230
leaq 0x9115(%rip), %rsi      # 0x12405
movq %rax, %rdi
callq 0x44b0
leaq 0x25(%rsp), %rsi
movq %rax, %rdi
callq 0x44b0
movq %rax, %rdi
callq 0x4230
leaq 0x9108(%rip), %rsi      # 0x1241c
movq %rax, %rdi
callq 0x44b0
leaq 0x2e(%rsp), %rsi
movq %rax, %rdi
callq 0x44b0
movq %rax, %rdi
callq 0x4230
leaq 0x90f6(%rip), %rsi      # 0x1242e
movq %rax, %rdi
callq 0x44b0
movl 0x4(%rsp), %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x90dc(%rip), %rsi      # 0x12437
movq %rax, %rdi
callq 0x44b0
movq %rax, %rdi
callq 0x4230
leaq 0x90d2(%rip), %rsi      # 0x12444
movq %rax, %rdi
callq 0x44b0
movq %rax, %r15
movq %rsp, %rdi
callq 0x9220
movq %r15, %rdi
movq %rax, %rsi
callq 0x44b0
movq %rax, %rdi
callq 0x4230
leaq 0x90b8(%rip), %rsi      # 0x12457
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x90ad(%rip), %rsi      # 0x12472
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x909c(%rip), %rsi      # 0x12489
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0x2, %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x9088(%rip), %rsi      # 0x1249e
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0x3, %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x9079(%rip), %rsi      # 0x124b8
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0x4, %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x9068(%rip), %rsi      # 0x124d0
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0x5, %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x9056(%rip), %rsi      # 0x124e7
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0x6, %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x9044(%rip), %rsi      # 0x124fe
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0x7, %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x9039(%rip), %rsi      # 0x1251c
movq %rax, %rdi
callq 0x44b0
movzbl 0x1(%rsp), %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x903b(%rip), %rsi      # 0x12545
movq %rax, %rdi
callq 0x44b0
movl 0x8(%rsp), %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x903a(%rip), %rsi      # 0x12567
movq %rax, %rdi
callq 0x44b0
movl 0xc(%rsp), %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x903b(%rip), %rsi      # 0x1258b
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0x9, %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x9025(%rip), %rsi      # 0x1259e
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0xa, %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x900d(%rip), %rsi      # 0x125af
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0xb, %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x8ffb(%rip), %rsi      # 0x125c6
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0xc, %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x8fe2(%rip), %rsi      # 0x125d6
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0xd, %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x8fd3(%rip), %rsi      # 0x125f0
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0xe, %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x8fc4(%rip), %rsi      # 0x1260a
movq %rax, %rdi
callq 0x44b0
movzwl (%rsp), %esi
shrl $0xf, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x8fb8(%rip), %rsi      # 0x12624
movq %rax, %rdi
callq 0x44b0
movzbl 0x2(%rsp), %esi
andl $0x1, %esi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
movq 0x17925(%rip), %rdi     # 0x20fb8
leaq 0x8fa0(%rip), %rsi      # 0x1263a
callq 0x44b0
movq %rax, %rdi
callq 0x4230
leaq 0x8f9b(%rip), %rsi      # 0x12649
movq %rax, %rdi
callq 0x44b0
movq 0xa8(%rsp), %rsi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x8f84(%rip), %rsi      # 0x12659
movq %rax, %rdi
callq 0x44b0
movq 0xa0(%rsp), %rsi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x8f6c(%rip), %rsi      # 0x12668
movq %rax, %rdi
callq 0x44b0
movq %rax, %r15
leaq 0x98(%rsp), %rdi
callq 0xad0c
movq %r15, %rdi
movq %rax, %rsi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x8f4a(%rip), %rsi      # 0x12678
movq %rax, %rdi
callq 0x44b0
movq %rax, %rdi
callq 0x4230
leaq 0x8f04(%rip), %rsi      # 0x12649
movq %rax, %rdi
callq 0x44b0
movq 0xc0(%rsp), %rsi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x8eed(%rip), %rsi      # 0x12659
movq %rax, %rdi
callq 0x44b0
movq 0xb8(%rsp), %rsi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x8ef5(%rip), %rsi      # 0x12688
movq %rax, %rdi
callq 0x44b0
movq %rax, %rdi
callq 0x4230
leaq 0x8ee7(%rip), %rsi      # 0x12691
movq %rax, %rdi
callq 0x44b0
movq 0xb0(%rsp), %rsi
movq %rax, %rdi
callq 0x4320
movq %rax, %rdi
callq 0x4230
leaq 0x8ecd(%rip), %rsi      # 0x1269e
movq %rax, %rdi
callq 0x44b0
movq %rax, %rdi
callq 0x4230
leaq 0x8ec2(%rip), %rsi      # 0x126aa
movq %rax, %rdi
callq 0x44b0
movq %rax, %r15
movq 0xb0(%rsp), %rsi
leaq 0x78(%rsp), %rdi
xorl %edx, %edx
callq 0xc510
leaq 0x78(%rsp), %rsi
movq %r15, %rdi
callq 0x4430
movq %rax, %rdi
callq 0x4230
leaq 0x8e96(%rip), %rsi      # 0x126b9
movq %rax, %rdi
callq 0x44b0
movq %rax, %r15
movq 0xb0(%rsp), %rsi
leaq 0x58(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0xc510
leaq 0x58(%rsp), %rsi
movq %r15, %rdi
callq 0x4430
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
callq 0x4230
leaq 0x58(%rsp), %rdi
callq 0x4200
leaq 0x78(%rsp), %rdi
callq 0x4200
leaq 0x98(%rsp), %rdi
callq 0xab30
testl %eax, %eax
js 0x98a0
movq %rbx, %rdi
callq 0xb6d0
jmp 0x98af
negl %eax
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0xb82c
jmp 0x98af
negl %eax
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0xb884
leaq 0x98(%rsp), %rdi
callq 0xa9b6
movq %rbx, %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r14
popq %r15
retq
jmp 0x98df
jmp 0x98ee
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x4200
jmp 0x98e2
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x4200
jmp 0x98f1
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0xa9b6
movq %rbx, %rdi
callq 0x4730
nop