// File: /workspace/github_cpp_makefile_star2_O3/JameyWoo[P]re2graph/algorithms.cpp
// Function: dfa2png(DFA, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void dfa2png(DFA dfa, string png_file, string pattern) {
    string raw_png_file = png_file;
    string dot_file     = "./tmp/" + png_file.replace(png_file.find(".png"), 4, ".dot");
    dfa2dot(dfa, dot_file);
    string his_pat = "dot";
    string cmd     = his_pat + " -Tpng " + dot_file + " -o ./image/{test.png}";
    if (pattern.size()) cmd.replace(cmd.find(his_pat), his_pat.size(), pattern);
    cmd.replace(cmd.find("{test.png}"), 10, raw_png_file);
    system(cmd.c_str());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0xb8(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0x44cc
leaq 0x9b0e(%rip), %rsi      # 0x13169
movl $0x4, %ecx
movq %r15, %rdi
xorl %edx, %edx
callq 0x2340
leaq 0x9b51(%rip), %rcx      # 0x131c2
movl $0x4, %edx
movl $0x4, %r8d
movq %r15, %rdi
movq %rax, %rsi
callq 0x2220
leaq 0x9b2d(%rip), %rsi      # 0x131bb
leaq 0x68(%rsp), %rdi
movq %rax, %rdx
callq 0xdccd
leaq 0xe8(%rsp), %rdi
movq %r14, %rsi
callq 0x3b14
leaq 0xd8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rdi
callq 0x44cc
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x9a8b
movq 0xc8(%rsp), %rdi
cmpq %r14, %rdi
je 0x9703
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2200
leaq 0x140(%rsp), %r14
movq %r14, %rdi
callq 0x4484
movq -0x18(%r14), %rdi
testq %rdi, %rdi
je 0x972c
movq 0x138(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x9749
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0x9766
movq 0x108(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9eb2(%rip), %rsi      # 0x13628
leaq 0x9eae(%rip), %rdx      # 0x1362b
leaq 0x28(%rsp), %rdi
callq 0x4562
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x44cc
leaq 0x9a19(%rip), %rsi      # 0x131c7
leaq 0x48(%rsp), %rdi
callq 0x2380
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x2090
leaq 0x98(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x97fc
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0x9803
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x88(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x99a6(%rip), %rsi      # 0x131cf
callq 0x2380
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9855
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x985d
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x88(%rsp), %rdi
cmpq %rbp, %rdi
je 0x9892
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x98a9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2200
cmpq $0x0, 0x8(%rbx)
je 0x98e0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rcx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x2340
movq 0x30(%rsp), %rdx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
movq %r14, %rdi
movq %rax, %rsi
callq 0x2220
leaq 0x98f4(%rip), %rsi      # 0x131db
leaq 0x8(%rsp), %rbx
movl $0xa, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2340
movq 0xa8(%rsp), %rcx
movq 0xb0(%rsp), %r8
movl $0xa, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2220
movq 0x8(%rsp), %rdi
callq 0x21b0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x993c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x9953
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x996e
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x998b
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2200
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %rbp, %rdi
je 0x99c4
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x99c4
jmp 0x99c1
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x9a34
movq 0x58(%rsp), %rsi
jmp 0x9a2c
movq %rax, %rbx
jmp 0x9a34
jmp 0x9a10
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r14, %rdi
je 0x9a01
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x9a01
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x3bc8
jmp 0x9a4b
movq %rax, %rbx
jmp 0x9a4b
movq %rax, %rbx
jmp 0x9a66
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x9a34
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x9a4b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9a66
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x9a83
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2350