// File: drummyfish[P]flowchart/src/bitmap_image.hpp
// Function: bitmap_image::write_bih(std::basic_ofstream<char, std::char_traits<char>>&, bitmap_image::bitmap_information_header const&)
inline void write_bih(std::ofstream& stream, const bitmap_information_header& bih)
   {
      if (big_endian())
      {
         write_to_stream(stream,flip(bih.size));
         write_to_stream(stream,flip(bih.width));
         write_to_stream(stream,flip(bih.height));
         write_to_stream(stream,flip(bih.planes));
         write_to_stream(stream,flip(bih.bit_count));
         write_to_stream(stream,flip(bih.compression));
         write_to_stream(stream,flip(bih.size_image));
         write_to_stream(stream,flip(bih.x_pels_per_meter));
         write_to_stream(stream,flip(bih.y_pels_per_meter));
         write_to_stream(stream,flip(bih.clr_used));
         write_to_stream(stream,flip(bih.clr_important));
      }
      else
      {
         write_to_stream(stream,bih.size);
         write_to_stream(stream,bih.width);
         write_to_stream(stream,bih.height);
         write_to_stream(stream,bih.planes);
         write_to_stream(stream,bih.bit_count);
         write_to_stream(stream,bih.compression);
         write_to_stream(stream,bih.size_image);
         write_to_stream(stream,bih.x_pels_per_meter);
         write_to_stream(stream,bih.y_pels_per_meter);
         write_to_stream(stream,bih.clr_used);
         write_to_stream(stream,bih.clr_important);
      }
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x16e50
testb $0x1, %al
jne 0x170cd
jmp 0x172d7
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rsi
callq 0x16eb0
movq -0xa0(%rbp), %rsi
movq -0x48(%rbp), %rdi
movl %eax, -0x1c(%rbp)
leaq -0x1c(%rbp), %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
callq 0x16eb0
movq -0x98(%rbp), %rsi
movq -0x48(%rbp), %rdi
movl %eax, -0x20(%rbp)
leaq -0x20(%rbp), %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
callq 0x16eb0
movq -0x90(%rbp), %rsi
movq -0x48(%rbp), %rdi
movl %eax, -0x24(%rbp)
leaq -0x24(%rbp), %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rsi
addq $0xc, %rsi
callq 0x16e80
movq -0x88(%rbp), %rsi
movq -0x48(%rbp), %rdi
movw %ax, -0x26(%rbp)
leaq -0x26(%rbp), %rdx
callq 0x173d0
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rsi
addq $0xe, %rsi
callq 0x16e80
movq -0x80(%rbp), %rsi
movq -0x48(%rbp), %rdi
movw %ax, -0x28(%rbp)
leaq -0x28(%rbp), %rdx
callq 0x173d0
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
callq 0x16eb0
movq -0x78(%rbp), %rsi
movq -0x48(%rbp), %rdi
movl %eax, -0x2c(%rbp)
leaq -0x2c(%rbp), %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rsi
addq $0x14, %rsi
callq 0x16eb0
movq -0x70(%rbp), %rsi
movq -0x48(%rbp), %rdi
movl %eax, -0x30(%rbp)
leaq -0x30(%rbp), %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rsi
addq $0x18, %rsi
callq 0x16eb0
movq -0x68(%rbp), %rsi
movq -0x48(%rbp), %rdi
movl %eax, -0x34(%rbp)
leaq -0x34(%rbp), %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rsi
addq $0x1c, %rsi
callq 0x16eb0
movq -0x60(%rbp), %rsi
movq -0x48(%rbp), %rdi
movl %eax, -0x38(%rbp)
leaq -0x38(%rbp), %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rsi
addq $0x20, %rsi
callq 0x16eb0
movq -0x58(%rbp), %rsi
movq -0x48(%rbp), %rdi
movl %eax, -0x3c(%rbp)
leaq -0x3c(%rbp), %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rsi
addq $0x24, %rsi
callq 0x16eb0
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl %eax, -0x40(%rbp)
leaq -0x40(%rbp), %rdx
callq 0x17400
jmp 0x173ba
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x4, %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x8, %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0xc, %rdx
callq 0x173d0
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0xe, %rdx
callq 0x173d0
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x10, %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x14, %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x18, %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x1c, %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x20, %rdx
callq 0x17400
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x24, %rdx
callq 0x17400
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)