// File: /workspace/github_cpp_makefile_star2_O1/drummyfish[P]flowchart/src/bitmap_image.hpp
// Function: bitmap_image::load_bitmap()
void load_bitmap()
   {
      std::ifstream stream(file_name_.c_str(),std::ios::binary);
      if (!stream)
      {
         //std::cerr << "bitmap_image::load_bitmap() ERROR: bitmap_image - file " << file_name_ << " not found!" << std::endl;
         return;
      }

      bitmap_file_header bfh;
      bitmap_information_header bih;

      read_bfh(stream,bfh);
      read_bih(stream,bih);

      if (bfh.type != 19778)
      {
         stream.close();
         //std::cerr << "bitmap_image::load_bitmap() ERROR: bitmap_image - Invalid type value " << bfh.type << " expected 19778." << std::endl;
         return;
      }

      if (bih.bit_count != 24)
      {
         stream.close();
         //std::cerr << "bitmap_image::load_bitmap() ERROR: bitmap_image - Invalid bit depth " << bih.bit_count << " expected 24." << std::endl;
         return;
      }

      height_ = bih.height;
      width_  = bih.width;

      bytes_per_pixel_ = bih.bit_count >> 3;

      unsigned int padding = (4 - ((3 * width_) % 4)) % 4;
      char padding_data[4] = {0,0,0,0};

      create_bitmap();

      for (unsigned int i = 0; i < height_; ++i)
      {
         unsigned char* data_ptr = row(height_ - i - 1); // read in inverted row order
         stream.read(reinterpret_cast<char*>(data_ptr),sizeof(char) * bytes_per_pixel_ * width_);
         stream.read(padding_data,padding);
      }
   }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
movq (%rdi), %rsi
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl $0x4, %edx
callq 0x2360
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x60(%rsp,%rax)
jne 0xef0b
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x2, %edx
callq 0x2240
leaq 0xc(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x2240
leaq 0x10(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x2, %edx
callq 0x2240
leaq 0x12(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x2, %edx
callq 0x2240
leaq 0x14(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x2240
leaq 0x40(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movl $0x4, %edx
callq 0x2240
leaq 0x1c(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x2240
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x2240
leaq 0x24(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x2, %edx
callq 0x2240
leaq 0x26(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x2, %edx
callq 0x2240
leaq 0x28(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x2240
leaq 0x2c(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x2240
leaq 0x30(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x2240
leaq 0x34(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x2240
leaq 0x38(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x2240
leaq 0x3c(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movl $0x4, %edx
callq 0x2240
cmpw $0x4d42, 0x8(%rsp)      # imm = 0x4D42
jne 0xef01
cmpw $0x18, 0x26(%rsp)
jne 0xef01
movl 0x20(%rsp), %eax
movl %eax, 0x34(%rbx)
movl 0x1c(%rsp), %r14d
movl %r14d, 0x30(%rbx)
movl $0x3, 0x28(%rbx)
movl $0x0, 0x4(%rsp)
movq %rbx, %rdi
callq 0xef40
movl 0x34(%rbx), %esi
testl %esi, %esi
je 0xef0b
andl $0x3, %r14d
xorl %ebp, %ebp
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
leaq 0x40(%rsp), %r15
leaq 0x4(%rsp), %r12
addl %r13d, %esi
imull 0x38(%rbx), %esi
addq 0x20(%rbx), %rsi
movl 0x28(%rbx), %eax
movl 0x30(%rbx), %edx
imulq %rax, %rdx
movq %r15, %rdi
callq 0x2240
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2240
incl %ebp
movl 0x34(%rbx), %esi
decl %r13d
cmpl %esi, %ebp
jb 0xeec8
jmp 0xef0b
leaq 0x40(%rsp), %rdi
callq 0x2070
leaq 0x40(%rsp), %rdi
callq 0x2080
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xef2b
jmp 0xef2b
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2340