// File: /workspace/github_cpp_makefile_star2_O1/drummyfish[P]flowchart/src/program.cpp
// Function: program::load_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool program::load_from_file(string filename)
  {
    if (!this->font_mask.load_file(FONT_PATH))
      return false;

    image source_image;
    bool error;

    if (!source_image.load_file(filename))
      return false;

    // cout << "=" << this->string_from_image_area(&source_image,make_coord(0,0),make_coord(100,100),error) << "=" << endl;

    vector<block_function> v = this->get_function_blocks(&source_image);

    unsigned int i;

    cout << "functions:" << endl;

    for (i = 0; i < v.size(); i++)
      {
        cout << v[i].get_string() << ": " << endl;
        print_coord(v[i].get_top_left());
        print_coord(v[i].get_bottom_right());
      }

    cout << "directives:" << endl;
    vector<block_directive> v2 = this->get_directive_blocks(&source_image);

    for (i = 0; i < v2.size(); i++)
      {
        cout << v2[i].get_string() << ": " << endl;
        print_coord(v2[i].get_top_left());
        print_coord(v2[i].get_bottom_right());
      }

    cout << "commands:" << endl;
    vector<block_command> v3 = this->get_command_blocks(&source_image);

    for (i = 0; i < v3.size(); i++)
      {
        cout << v3[i].get_string() << ": " << endl;
        print_coord(v3[i].get_top_left());
        print_coord(v3[i].get_bottom_right());
      }

    return true;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %rbx
movq %rdi, %r12
leaq 0xb8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x44b6(%rip), %rsi      # 0x134e4
leaq 0x44b7(%rip), %rdx      # 0x134ec
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
callq 0xe3ee
movq %r12, %rdi
movq %r15, %rsi
callq 0xe692
movl %eax, %ebp
movq 0xa8(%rsp), %rdi
cmpq %r14, %rdi
je 0xf06f
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x21c0
testb %bpl, %bpl
je 0xf518
leaq 0x8(%rsp), %rdi
callq 0xe480
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0xef74
leaq 0x8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xe692
movl %eax, %ebx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0xf0d6
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x21c0
testb %bl, %bl
je 0xf50c
leaq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r12, %rsi
callq 0x10866
movq %r12, 0x38(%rsp)
movl %ebx, 0x34(%rsp)
movq 0x8ed8(%rip), %rbx      # 0x17fd8
leaq 0x43e6(%rip), %rsi      # 0x134ed
movl $0xa, %edx
movq %rbx, %rdi
callq 0x21f0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq 0x8ea6(%rip), %rdi      # 0x17fd8
callq 0x2050
movq %rax, %rdi
callq 0x2120
movq 0x70(%rsp), %rsi
cmpq %rsi, 0x78(%rsp)
je 0xf23d
movl $0x1, %r14d
xorl %eax, %eax
leaq 0x10(%rsp), %r15
movq 0x8e75(%rip), %r12      # 0x17fd8
leaq 0x438e(%rip), %r13      # 0x134f8
leaq (%rax,%rax,2), %rbp
shlq $0x4, %rbp
addq %rbp, %rsi
movq %r15, %rdi
callq 0x11d22
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r12, %rdi
callq 0x21f0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x2120
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xf1e5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x70(%rsp), %rdi
addq %rbp, %rdi
callq 0x11d44
movq %rax, %rdi
callq 0x118d1
addq 0x70(%rsp), %rbp
movq %rbp, %rdi
callq 0x11d4a
movq %rax, %rdi
callq 0x118d1
movl %r14d, %eax
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rcx
subq %rsi, %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
incl %r14d
cmpq %rax, %rcx
ja 0xf16a
movq 0x8d94(%rip), %rbx      # 0x17fd8
leaq 0x42b0(%rip), %rsi      # 0x134fb
movl $0xb, %edx
movq %rbx, %rdi
callq 0x21f0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq 0x8d62(%rip), %rdi      # 0x17fd8
callq 0x2050
movq %rax, %rdi
callq 0x2120
leaq 0x58(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq 0x38(%rsp), %rsi
callq 0x101c4
movq 0x58(%rsp), %rsi
cmpq %rsi, 0x60(%rsp)
je 0xf395
movl $0x1, %r14d
xorl %eax, %eax
leaq 0x10(%rsp), %r15
movq 0x8d1d(%rip), %r12      # 0x17fd8
leaq 0x4236(%rip), %r13      # 0x134f8
leaq (%rax,%rax,2), %rbp
shlq $0x4, %rbp
addq %rbp, %rsi
movq %r15, %rdi
callq 0x11d22
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r12, %rdi
callq 0x21f0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x21f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x2120
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xf33d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x58(%rsp), %rdi
addq %rbp, %rdi
callq 0x11d44
movq %rax, %rdi
callq 0x118d1
addq 0x58(%rsp), %rbp
movq %rbp, %rdi
callq 0x11d4a
movq %rax, %rdi
callq 0x118d1
movl %r14d, %eax
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rcx
subq %rsi, %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
incl %r14d
cmpq %rax, %rcx
ja 0xf2c2
movq 0x8c3c(%rip), %rbx      # 0x17fd8
leaq 0x4164(%rip), %rsi      # 0x13507
movl $0x9, %edx
movq %rbx, %rdi
callq 0x21f0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq 0x8c0a(%rip), %rdi      # 0x17fd8
callq 0x2050
movq %rax, %rdi
callq 0x2120
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq 0x38(%rsp), %rsi
callq 0xf652
movq 0x40(%rsp), %rsi
cmpq %rsi, 0x48(%rsp)
je 0xf4ea
movl $0x1, %ebp
xorl %eax, %eax
leaq 0x10(%rsp), %r14
movq 0x8bc6(%rip), %r15      # 0x17fd8
leaq 0x40df(%rip), %r12      # 0x134f8
leaq (%rax,%rax,2), %r13
shlq $0x4, %r13
addq %r13, %rsi
movq %r14, %rdi
callq 0x11d22
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r15, %rdi
callq 0x21f0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2050
movq %rax, %rdi
callq 0x2120
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xf494
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x40(%rsp), %rdi
addq %r13, %rdi
callq 0x11d44
movq %rax, %rdi
callq 0x118d1
addq 0x40(%rsp), %r13
movq %r13, %rdi
callq 0x11d4a
movq %rax, %rdi
callq 0x118d1
movl %ebp, %eax
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rcx
subq %rsi, %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
incl %ebp
cmpq %rax, %rcx
ja 0xf419
leaq 0x40(%rsp), %rdi
callq 0x1005a
leaq 0x58(%rsp), %rdi
callq 0x100b6
leaq 0x70(%rsp), %rdi
callq 0x10112
movl 0x34(%rsp), %ebx
leaq 0x8(%rsp), %rdi
callq 0xe488
jmp 0xf51a
xorl %ebx, %ebx
movl %ebx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf59a
jmp 0xf59f
jmp 0xf55d
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0xf602
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0xf602
movq %rax, %rbx
jmp 0xf602
jmp 0xf59a
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r14, %rdi
je 0xf60c
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0xf60c
jmp 0xf59f
jmp 0xf595
jmp 0xf59a
jmp 0xf59f
movq %rax, %rbx
jmp 0xf5c3
movq %rax, %rbx
jmp 0xf5ee
movq %rax, %rbx
jmp 0xf5f8
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xf5c3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
leaq 0x40(%rsp), %rdi
callq 0x1005a
jmp 0xf5ee
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xf5ee
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
leaq 0x58(%rsp), %rdi
callq 0x100b6
leaq 0x70(%rsp), %rdi
callq 0x10112
leaq 0x8(%rsp), %rdi
callq 0xe488
movq %rbx, %rdi
callq 0x2340
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xf5f8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0xf5f8
nop