// File: /workspace/github_cpp_makefile_star2_O2/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, %r14
leaq 0x3952(%rip), %rsi      # 0xf520
leaq 0xa8(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0xb110
leaq 0xa8(%rsp), %rsi
movq %r14, %rdi
callq 0xb31e
movl %eax, %ebp
leaq 0xa8(%rsp), %rdi
callq 0x20d0
testb %bpl, %bpl
je 0xbd18
leaq 0x8(%rsp), %rdi
callq 0xb1e4
leaq 0x88(%rsp), %rdi
movq %rbx, %rsi
callq 0x2280
leaq 0x8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xb31e
movl %eax, %ebx
leaq 0x88(%rsp), %rdi
callq 0x20d0
testb %bl, %bl
je 0xbec4
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0xce32
movq %r14, 0x18(%rsp)
movl %ebx, 0x14(%rsp)
movq 0x936b(%rip), %rdi      # 0x14fd8
leaq 0x38b5(%rip), %rsi      # 0xf529
callq 0x2190
movq %rax, %rdi
callq 0x20e0
xorl %r14d, %r14d
pushq $0x30
popq %rbx
leaq 0x68(%rsp), %r15
movq 0x9345(%rip), %r12      # 0x14fd8
leaq 0x389a(%rip), %r13      # 0xf534
movl %r14d, %r14d
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rax
subq %rsi, %rax
cqto
idivq %rbx
cmpq %r14, %rax
jbe 0xbd1f
imulq $0x30, %r14, %rbp
addq %rbp, %rsi
movq %r15, %rdi
callq 0xdfd2
movq %r12, %rdi
movq %r15, %rsi
callq 0x2180
movq %rax, %rdi
movq %r13, %rsi
callq 0x2190
movq %rax, %rdi
callq 0x20e0
movq %r15, %rdi
callq 0x20d0
movq 0x50(%rsp), %rdi
addq %rbp, %rdi
callq 0xdfe0
movq %rax, %rdi
callq 0xdbfc
addq 0x50(%rsp), %rbp
movq %rbp, %rdi
callq 0xdfe6
movq %rax, %rdi
callq 0xdbfc
incl %r14d
jmp 0xbc9a
xorl %ebx, %ebx
jmp 0xbece
movq 0x92b2(%rip), %rdi      # 0x14fd8
leaq 0x380a(%rip), %rsi      # 0xf537
callq 0x2190
movq %rax, %rdi
callq 0x20e0
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rsi
callq 0xc848
xorl %r14d, %r14d
leaq 0x68(%rsp), %r15
movq 0x927b(%rip), %r12      # 0x14fd8
leaq 0x37d0(%rip), %r13      # 0xf534
movl %r14d, %r14d
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rax
subq %rsi, %rax
cqto
idivq %rbx
cmpq %r14, %rax
jbe 0xbde2
imulq $0x30, %r14, %rbp
addq %rbp, %rsi
movq %r15, %rdi
callq 0xdfd2
movq %r12, %rdi
movq %r15, %rsi
callq 0x2180
movq %rax, %rdi
movq %r13, %rsi
callq 0x2190
movq %rax, %rdi
callq 0x20e0
movq %r15, %rdi
callq 0x20d0
movq 0x38(%rsp), %rdi
addq %rbp, %rdi
callq 0xdfe0
movq %rax, %rdi
callq 0xdbfc
addq 0x38(%rsp), %rbp
movq %rbp, %rdi
callq 0xdfe6
movq %rax, %rdi
callq 0xdbfc
incl %r14d
jmp 0xbd64
movq 0x91ef(%rip), %rdi      # 0x14fd8
leaq 0x3753(%rip), %rsi      # 0xf543
callq 0x2190
movq %rax, %rdi
callq 0x20e0
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rsi
callq 0xbfaa
xorl %ebp, %ebp
leaq 0x68(%rsp), %r14
movq 0x91b9(%rip), %r15      # 0x14fd8
leaq 0x370e(%rip), %r12      # 0xf534
movl %ebp, %ebp
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
subq %rsi, %rax
cqto
idivq %rbx
cmpq %rbp, %rax
jbe 0xbea2
imulq $0x30, %rbp, %r13
addq %r13, %rsi
movq %r14, %rdi
callq 0xdfd2
movq %r15, %rdi
movq %r14, %rsi
callq 0x2180
movq %rax, %rdi
movq %r12, %rsi
callq 0x2190
movq %rax, %rdi
callq 0x20e0
movq %r14, %rdi
callq 0x20d0
movq 0x20(%rsp), %rdi
addq %r13, %rdi
callq 0xdfe0
movq %rax, %rdi
callq 0xdbfc
addq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0xdfe6
movq %rax, %rdi
callq 0xdbfc
incl %ebp
jmp 0xbe26
leaq 0x20(%rsp), %rdi
callq 0xc7b6
leaq 0x38(%rsp), %rdi
callq 0xc7d8
leaq 0x50(%rsp), %rdi
callq 0xc7fa
movl 0x14(%rsp), %ebx
leaq 0x8(%rsp), %rdi
callq 0xb1ea
movl %ebx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbf5f
jmp 0xbf6e
jmp 0xbeff
jmp 0xbf5f
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x20d0
jmp 0xbf7b
movq %rax, %rbx
jmp 0xbf7b
jmp 0xbf6e
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x20d0
jmp 0xbf85
movq %rax, %rbx
jmp 0xbf85
jmp 0xbf50
jmp 0xbf5f
jmp 0xbf6e
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x20d0
jmp 0xbf53
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x20d0
jmp 0xbf62
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x20d0
jmp 0xbf71
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xc7b6
jmp 0xbf62
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0xc7d8
jmp 0xbf71
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xc7fa
leaq 0x8(%rsp), %rdi
callq 0xb1ea
movq %rbx, %rdi
callq 0x2330
nop