// File: /workspace/github_cpp_makefile_star2_O3/margual56[P]Markdown-CLI/src/markdown.cpp
// Function: markdown(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string markdown(std::string markdown){
    std::smatch match;  // Match object (stores match information)

    ////////////////////////////// HEADERS //////////////////////////////////////
    std::regex headers("#+[^\\r\\n]+(\\r|\\n|\\r\\n)"); // Regex for the headers

    while (std::regex_search (markdown, match, headers)) {

        int match_begin = match.position();
        int match_end   = match_begin + match.length();

        printf("Processing match: %s", markdown.substr(match_begin, match.length()).c_str());

        int j;
        for(j = 0; markdown[j+match_begin]=='#'; j++){}     // So count the number of '#' in a row,


        markdown.insert(match_end, "</h" + std::to_string(j) + "><hr/>");
        markdown.replace(match_begin, j, "<h" + std::to_string(j) + ">");
    }
    
    //////////////////////////////// LINKS //////////////////////////////////////
    std::regex links("\\[[^\\n\\r]*\\]\\([^\\n\\r]*\\)"); // Regex for the headers
    std::regex linkHref("\\([^\\n\\r]*\\)");

    std::smatch match2;  // Match object (stores match information)
    while (std::regex_search (markdown, match, links)) {

        int match_begin = match.position();
        int match_end   = match_begin + match.length();
        
        std::string text = "";
        std::string link = "";

        int i, count;
        for(i = match_begin+1, count = 1; count > 0; i++){
            char c = markdown[i];

            if(c == '[') count++;
            else if(c == ']') count--;

            if(count > 0) text += c;
        }

        for(i += 1, count = 1; count > 0; i++){
            char c = markdown[i];

            if(c == '(') count++;
            else if(c == ')') count--;

            if(count > 0) link += c;
        }

        std::string finalLink = "<a href=\"" + link + "\">" + text + "</a>";

        printf("Processing link: %s", finalLink.c_str());
        markdown.replace(match_begin, match.length(), finalLink);
    }

    ////////////////////////// OTHER TOKENS ////////////////////////////////////
    //token{"[^\\r\\n]+((\\r|\\n|\\r\\n)[^\\r\\n]+)*",0,2,  "p"}       // Paragraphs regex

    std::list<token> tokens = {
        token{"`[^`\\n]+`",                             1,1,  "code"},   // Code tag regex
        token{"(\\*){2}[^(\\*){2}\\r\\n]+(\\*){2}",     2,2,  "b"},      // Bold tag regex    (**)
        token{"(_){2}[^(_){2}\\r\\n]+(_){2}",           2,2,  "b"},      // Bold tag regex    (__)
        token{"\\*[^\\*\\r\\n]+\\*",                    1,1,  "i"},      // Italic tag regex  (*)
        token{"_[^\\*\\r\\n]+_",                        1,1,  "i"}      // Italic tag regex  (_)
    };

    for(token tok: tokens){
        printf("Checking for %s\n", tok.tag.c_str());
        std::regex tmp(tok.rex);
        
        int match_end, match_begin;
        while (std::regex_search (markdown, match, tmp)) {
            match_begin = match.position();
            match_end   = match_begin + match.length();

            printf("Processing match: %s\n", markdown.substr(match_begin, match.length()).c_str());

            markdown.replace(match_end-tok.length2, tok.length2, "</" + tok.tag + ">");
            markdown.replace(match_begin, tok.length1, "<" + tok.tag + ">");
        }

        printf("Done checking %s\n", tok.tag.c_str());
    }

    ////////////////////////////// LINE BREAKS ///////////////////////////////////
    for(int i = 0; i<markdown.length(); i++){
        if(markdown[i] == '\n'){
            markdown.insert(i, "<br/>");
            i+=6;
        }
    }

    return markdown;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rsi, %r14
movq %rdi, -0x118(%rbp)
xorps %xmm0, %xmm0
leaq -0xd0(%rbp), %rax
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
leaq 0x1010e(%rip), %rsi     # 0x16278
leaq -0x2c0(%rbp), %rdi
movl $0x10, %edx
callq 0x734c
xorl %r15d, %r15d
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq -0xd0(%rbp), %rdx
leaq -0x2c0(%rbp), %rcx
xorl %r8d, %r8d
callq 0x12e58
testb %al, %al
je 0x65ea
movq -0xb8(%rbp), %rsi
movq -0xd0(%rbp), %rax
movq -0xc8(%rbp), %rcx
subq %rax, %rcx
je 0x61e6
movq (%rax), %rdx
movq 0x8(%rax), %r12
movq %rdx, %rbx
subq %rsi, %rbx
subq %rdx, %r12
cmpb $0x0, 0x10(%rax)
cmoveq %r15, %r12
addq %rbx, %r12
movslq %ebx, %r13
cmpq $0x48, %rcx
je 0x6208
jmp 0x620f
movq -0x48(%rax,%rcx), %rdx
movq -0x40(%rax,%rcx), %r12
movq %rdx, %rbx
subq %rsi, %rbx
subq %rdx, %r12
cmpb $0x0, -0x38(%rax,%rcx)
movslq %ebx, %r13
cmoveq %r15, %r12
addq %rbx, %r12
addq %rcx, %rax
addq $-0x48, %rax
movq 0x8(%rax), %rcx
subq %rdx, %rcx
cmpb $0x0, 0x10(%rax)
cmoveq %r15, %rcx
leaq -0x280(%rbp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x42e0
movq -0x280(%rbp), %rsi
leaq 0x10051(%rip), %rdi     # 0x1628f
xorl %eax, %eax
callq 0x4050
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0x6267
movq -0x270(%rbp), %rsi
incq %rsi
callq 0x42b0
movq %r13, -0x90(%rbp)
movslq %ebx, %rax
addq (%r14), %rax
movq $-0x1, %r15
cmpb $0x23, 0x1(%rax,%r15)
leaq 0x1(%r15), %r15
je 0x627b
movl $0x1, %ebx
cmpq $0xa, %r15
leaq -0xb0(%rbp), %r13
jb 0x62db
movl $0x4, %ebx
movl %r15d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x62d4
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x62d9
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x62db
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x62a6
addl $-0x3, %ebx
jmp 0x62db
addl $-0x2, %ebx
jmp 0x62db
decl %ebx
movl %ebx, %esi
leaq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq %r13, %rdi
movl $0x2d, %edx
callq 0x4350
movq -0xb0(%rbp), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x74cf
movl $0x3, %r8d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xff87(%rip), %rcx      # 0x162a4
callq 0x4310
leaq -0x58(%rbp), %rsi
movq %rsi, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq -0x270(%rbp), %rbx
je 0x634d
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x6353
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x68(%rbp), %rdi
leaq 0xff33(%rip), %rsi      # 0x162a8
callq 0x4510
movq %rbx, -0x280(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x63a3
movq %rdx, -0x280(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x270(%rbp)
jmp 0x63a9
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movslq %r12d, %rsi
movq 0x8(%rax), %rdx
movq %rdx, -0x278(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x280(%rbp), %rcx
movq -0x278(%rbp), %r8
movq %r14, %rdi
xorl %edx, %edx
callq 0x4310
movq -0x280(%rbp), %rdi
cmpq %rbx, %rdi
leaq -0xa0(%rbp), %r12
je 0x6400
movq -0x270(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x6419
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0xb0(%rbp), %rdi
cmpq %r12, %rdi
je 0x6434
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x42b0
movl $0x1, %ebx
cmpq $0xa, %r15
leaq -0xb0(%rbp), %r13
jb 0x6488
movl $0x4, %ebx
movl %r15d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x6481
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x6486
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x6488
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x6453
addl $-0x3, %ebx
jmp 0x6488
addl $-0x2, %ebx
jmp 0x6488
decl %ebx
movl %ebx, %esi
movq %r12, -0xb0(%rbp)
movq %r13, %rdi
movl $0x2d, %edx
callq 0x4350
movq -0xb0(%rbp), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x74cf
movl $0x2, %r8d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xfdec(%rip), %rcx      # 0x162af
callq 0x4310
leaq -0x58(%rbp), %rsi
movq %rsi, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq -0x270(%rbp), %rbx
movq -0x90(%rbp), %r13
je 0x64fa
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x6500
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x68(%rbp), %rdi
leaq 0xfb47(%rip), %rsi      # 0x16069
callq 0x4510
movq %rbx, -0x280(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6550
movq %rdx, -0x280(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x270(%rbp)
jmp 0x6556
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movl %r15d, %edx
movq 0x8(%rax), %rsi
movq %rsi, -0x278(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x280(%rbp), %rcx
movq -0x278(%rbp), %r8
movq %r14, %rdi
movq %r13, %rsi
callq 0x4310
movq -0x280(%rbp), %rdi
cmpq %rbx, %rdi
movl $0x0, %r15d
je 0x65ad
movq -0x270(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x65c6
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0xb0(%rbp), %rdi
cmpq %r12, %rdi
je 0x617e
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x617e
leaq 0xfcc1(%rip), %rsi      # 0x162b2
leaq -0x68(%rbp), %rdi
movl $0x10, %edx
callq 0x734c
leaq 0xfcb8(%rip), %rsi      # 0x162be
leaq -0xb0(%rbp), %rdi
movl $0x10, %edx
callq 0x734c
leaq -0x110(%rbp), %rbx
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq -0xd0(%rbp), %rdx
leaq -0x68(%rbp), %rcx
xorl %r8d, %r8d
callq 0x12e58
testb %al, %al
leaq 0xfd95(%rip), %rsi      # 0x163d9
je 0x6988
movq -0xd0(%rbp), %rax
movq -0xc8(%rbp), %rcx
leaq -0x48(%rcx), %rdx
cmpq %rcx, %rax
cmovneq %rax, %rdx
movq (%rdx), %r15
subq -0xb8(%rbp), %r15
leaq -0x270(%rbp), %rax
movq %rax, -0x280(%rbp)
leaq -0x280(%rbp), %rdi
movq %rsi, %rdx
movq %rsi, %r12
callq 0x5000
leaq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x5000
movslq %r15d, %rax
movslq %r15d, %r13
movq %rax, -0x90(%rbp)
addl $0x3, %eax
movl $0x1, %r15d
movl %eax, %r12d
movq (%r14), %rax
movzbl 0x1(%rax,%r13), %eax
cmpl $0x5d, %eax
je 0x66da
cmpl $0x5b, %eax
jne 0x66df
incl %r15d
jmp 0x66df
decl %r15d
je 0x66fb
movsbl %al, %esi
leaq -0x280(%rbp), %rdi
callq 0x4260
leal 0x1(%r12), %eax
incq %r13
testl %r15d, %r15d
jg 0x66bf
movslq %r12d, %r15
movl $0x1, %r13d
leaq -0xe0(%rbp), %r12
movq (%r14), %rax
movzbl (%rax,%r15), %eax
cmpl $0x29, %eax
je 0x6722
cmpl $0x28, %eax
jne 0x6727
incl %r13d
jmp 0x6727
decl %r13d
je 0x673a
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4260
incq %r15
testl %r13d, %r13d
jg 0x670b
leaq -0x2a0(%rbp), %r15
movq %r15, %rdi
leaq 0xfb80(%rip), %rsi      # 0x162cb
movq %rbx, %rdx
callq 0x4ed0
movq %r15, %rdi
leaq 0xf90b(%rip), %rsi      # 0x16068
callq 0x4510
movq %r12, -0xf0(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x678b
movq %rdx, -0xf0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xe0(%rbp)
jmp 0x6793
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0xe8(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x280(%rbp), %rsi
movq -0x278(%rbp), %rdx
leaq -0xf0(%rbp), %rdi
callq 0x40e0
leaq -0x78(%rbp), %rsi
movq %rsi, -0x88(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x67f1
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x67f7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x80(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x88(%rbp), %rdi
leaq 0xfab9(%rip), %rsi      # 0x162d5
callq 0x4510
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6845
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x684b
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x687e
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0xf0(%rbp), %rdi
cmpq %r12, %rdi
je 0x6899
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x2a0(%rbp), %rdi
leaq -0x290(%rbp), %rax
cmpq %rax, %rdi
je 0x68bb
movq -0x290(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x48(%rbp), %rsi
leaq 0xfa14(%rip), %rdi      # 0x162da
xorl %eax, %eax
callq 0x4050
movq -0xd0(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
leaq -0x48(%rcx), %rsi
cmpq $0x48, %rdx
movq %rax, %rdi
cmoveq %rsi, %rdi
cmpq %rax, %rcx
cmoveq %rsi, %rdi
movq 0x8(%rdi), %rdx
subq (%rdi), %rdx
cmpb $0x0, 0x10(%rdi)
movl $0x0, %eax
cmoveq %rax, %rdx
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
movq %r14, %rdi
movq -0x90(%rbp), %rsi
callq 0x4310
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x693b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x695d
movq -0x100(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0x661e
movq -0x270(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x661e
leaq -0x280(%rbp), %r15
leaq -0x270(%rbp), %rbx
movq %rbx, (%r15)
leaq 0xf94e(%rip), %rsi      # 0x162ee
leaq 0xf950(%rip), %rdx      # 0x162f7
movq %r15, %rdi
callq 0x5000
movabsq $0x100000001, %rax      # imm = 0x100000001
leaq -0x258(%rbp), %rdi
movq %rax, -0x8(%rdi)
leaq -0x248(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xf922(%rip), %rsi      # 0x162f8
leaq 0xf91f(%rip), %rdx      # 0x162fc
callq 0x5000
leaq -0x238(%rbp), %r12
leaq -0x228(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0xf902(%rip), %rsi      # 0x162fd
leaq 0xf918(%rip), %rdx      # 0x1631a
movq %r12, %rdi
callq 0x5000
movabsq $0x200000002, %rbx      # imm = 0x200000002
leaq -0x210(%rbp), %rdi
movq %rbx, -0x8(%rdi)
leaq -0x200(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xfec5(%rip), %rsi      # 0x168f6
leaq 0xfebf(%rip), %rdx      # 0x168f7
callq 0x5000
leaq -0x1f0(%rbp), %r12
leaq -0x1e0(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0xf8c5(%rip), %rsi      # 0x1631b
leaq 0xf8d8(%rip), %rdx      # 0x16335
movq %r12, %rdi
callq 0x5000
leaq -0x1c8(%rbp), %rdi
movq %rbx, -0x8(%rdi)
leaq -0x1b8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xfe74(%rip), %rsi      # 0x168f6
leaq 0xfe6e(%rip), %rdx      # 0x168f7
callq 0x5000
leaq -0x1a8(%rbp), %r12
leaq -0x198(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0xf88f(%rip), %rsi      # 0x16336
leaq 0xf896(%rip), %rdx      # 0x16344
movq %r12, %rdi
callq 0x5000
movabsq $0x100000001, %rbx      # imm = 0x100000001
leaq -0x180(%rbp), %rdi
movq %rbx, -0x8(%rdi)
leaq -0x170(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xf868(%rip), %rsi      # 0x16345
leaq 0xf862(%rip), %rdx      # 0x16346
callq 0x5000
leaq -0x160(%rbp), %r12
leaq -0x150(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0xf845(%rip), %rsi      # 0x16347
leaq 0xf84a(%rip), %rdx      # 0x16353
movq %r12, %rdi
callq 0x5000
leaq -0x138(%rbp), %rdi
movq %rbx, -0x8(%rdi)
leaq -0x128(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0xf817(%rip), %rsi      # 0x16345
leaq 0xf811(%rip), %rdx      # 0x16346
callq 0x5000
leaq -0xf0(%rbp), %rdi
leaq -0x280(%rbp), %rsi
leaq -0x110(%rbp), %rcx
movl $0x5, %edx
callq 0x73b8
movq $-0x168, %r15           # imm = 0xFE98
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x6b74
movq (%rbx), %rsi
incq %rsi
callq 0x42b0
movq -0x38(%rbx), %rdi
leaq -0x28(%rbx), %rax
cmpq %rdi, %rax
je 0x6b8c
movq (%rax), %rsi
incq %rsi
callq 0x42b0
addq $-0x48, %rbx
addq $0x48, %r15
jne 0x6b60
movq -0xf0(%rbp), %rcx
leaq -0xf0(%rbp), %rax
cmpq %rax, %rcx
leaq -0x270(%rbp), %rbx
je 0x6f22
leaq -0x88(%rbp), %r12
movq %rbx, -0x280(%rbp)
movq 0x10(%rcx), %rsi
movq 0x18(%rcx), %rdx
addq %rsi, %rdx
leaq -0x280(%rbp), %rdi
movq %rcx, %r15
callq 0x4f62
movq 0x30(%r15), %rax
movq %rax, -0x260(%rbp)
leaq -0x248(%rbp), %rax
movq %rax, -0x258(%rbp)
movq 0x38(%r15), %rsi
movq %r15, -0x90(%rbp)
movq 0x40(%r15), %rdx
addq %rsi, %rdx
leaq -0x258(%rbp), %rdi
callq 0x4f62
movq -0x258(%rbp), %rsi
leaq 0xf733(%rip), %rdi      # 0x16354
xorl %eax, %eax
callq 0x4050
leaq -0x110(%rbp), %rdi
leaq -0x280(%rbp), %rsi
movl $0x10, %edx
callq 0x743c
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
leaq -0xd0(%rbp), %rdx
leaq -0x110(%rbp), %rcx
xorl %r8d, %r8d
callq 0x12e58
testb %al, %al
je 0x6eaa
movq -0xb8(%rbp), %rsi
movq -0xd0(%rbp), %rax
movq -0xc8(%rbp), %rcx
subq %rax, %rcx
je 0x6cad
movq (%rax), %rdx
movq %rdx, %rdi
subq %rsi, %rdi
movl 0x8(%rax), %r13d
subl %edx, %r13d
cmpb $0x0, 0x10(%rax)
movl $0x0, %esi
cmovel %esi, %r13d
addl %edi, %r13d
movslq %edi, %rbx
cmpq $0x48, %rcx
je 0x6cd2
jmp 0x6cd9
movq -0x48(%rax,%rcx), %rdx
movq %rdx, %rdi
subq %rsi, %rdi
movl -0x40(%rax,%rcx), %esi
subl %edx, %esi
cmpb $0x0, -0x38(%rax,%rcx)
movslq %edi, %rbx
movl $0x0, %edi
cmovel %edi, %esi
leal (%rbx,%rsi), %r13d
addq %rcx, %rax
addq $-0x48, %rax
movq 0x8(%rax), %rcx
subq %rdx, %rcx
cmpb $0x0, 0x10(%rax)
movl $0x0, %eax
cmoveq %rax, %rcx
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x42e0
movq -0x48(%rbp), %rsi
leaq 0xf65e(%rip), %rdi      # 0x16365
xorl %eax, %eax
callq 0x4050
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6d27
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x42b0
movslq -0x25c(%rbp), %r15
movq %r12, %rdi
leaq 0xf2d1(%rip), %rsi      # 0x16009
leaq -0x258(%rbp), %rdx
callq 0x4ed0
movq %r12, %rdi
leaq 0xf31b(%rip), %rsi      # 0x16069
callq 0x4510
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6d77
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x6d7d
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movslq %r13d, %rsi
subq %r15, %rsi
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
movq %r14, %rdi
movq %r15, %rdx
callq 0x4310
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6dc6
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x6de2
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x42b0
movslq -0x260(%rbp), %r15
movq %r12, %rdi
leaq 0xf211(%rip), %rsi      # 0x16004
leaq -0x258(%rbp), %rdx
callq 0x4ed0
movq %r12, %rdi
leaq 0xf260(%rip), %rsi      # 0x16069
callq 0x4510
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6e32
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x6e38
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4310
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6e7e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
leaq -0x270(%rbp), %rbx
je 0x6c40
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x6c40
movq -0x258(%rbp), %rsi
leaq 0xf4c3(%rip), %rdi      # 0x1637b
xorl %eax, %eax
callq 0x4050
leaq -0x110(%rbp), %rdi
callq 0x74a6
movq -0x258(%rbp), %rdi
leaq -0x248(%rbp), %rax
cmpq %rax, %rdi
je 0x6eed
movq -0x248(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x280(%rbp), %rdi
cmpq %rbx, %rdi
je 0x6f08
movq -0x270(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x90(%rbp), %rcx
movq (%rcx), %rcx
leaq -0xf0(%rbp), %rax
cmpq %rax, %rcx
jne 0x6bbb
movq 0x8(%r14), %rax
xorl %r15d, %r15d
testq %rax, %rax
je 0x6f68
leaq 0xf458(%rip), %rbx      # 0x1638d
xorl %esi, %esi
movq (%r14), %rcx
cmpb $0xa, (%rcx,%rsi)
jne 0x6f5b
movl $0x5, %r8d
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4310
addl $0x6, %r15d
movq 0x8(%r14), %rax
incl %r15d
movslq %r15d, %rsi
cmpq %rsi, %rax
ja 0x6f37
jmp 0x6f6a
xorl %eax, %eax
movq -0x118(%rbp), %rdi
leaq 0x10(%rdi), %rdx
movq %rdx, (%rdi)
movq (%r14), %rsi
leaq 0x10(%r14), %rcx
cmpq %rcx, %rsi
je 0x6f90
movq %rsi, (%rdi)
movq (%rcx), %rdx
movq %rdx, 0x10(%rdi)
jmp 0x6f96
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, 0x8(%rdi)
movq %rcx, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
leaq -0xf0(%rbp), %rdi
callq 0x7550
leaq -0xb0(%rbp), %rdi
callq 0x74a6
leaq -0x68(%rbp), %rdi
callq 0x74a6
leaq -0x2c0(%rbp), %rdi
callq 0x74a6
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x6ff2
movq -0xc0(%rbp), %rsi
subq %rdi, %rsi
callq 0x42b0
movq -0x118(%rbp), %rax
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x120, %r14d           # imm = 0x120
leaq (%r14,%rbp), %rdi
addq $-0x280, %rdi           # imm = 0xFD80
callq 0x73f6
addq $-0x48, %r14
cmpq $-0x48, %r14
jne 0x7014
jmp 0x72ba
movq %rax, %rbx
movq -0x160(%rbp), %rdi
cmpq %r13, %rdi
je 0x70a4
movq -0x150(%rbp), %rsi
jmp 0x7097
jmp 0x70a1
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
cmpq %r13, %rdi
je 0x70a4
movq -0x198(%rbp), %rsi
jmp 0x7097
jmp 0x70a1
movq %rax, %rbx
movq -0x1f0(%rbp), %rdi
cmpq %r13, %rdi
je 0x70a4
movq -0x1e0(%rbp), %rsi
jmp 0x7097
jmp 0x70a1
movq %rax, %rbx
movq -0x238(%rbp), %rdi
cmpq %r13, %rdi
je 0x70a4
movq -0x228(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x70a4
movq %rax, %rbx
addq $-0x48, %r12
movq %r12, %rdi
callq 0x73f6
cmpq %r15, %r12
jne 0x70a4
jmp 0x72ba
movq %rbx, %rcx
movq %rax, %rbx
movq -0x280(%rbp), %rdi
cmpq %rcx, %rdi
je 0x72ba
jmp 0x7338
jmp 0x723d
movq %rax, %rbx
jmp 0x72c6
jmp 0x7242
jmp 0x70e9
movq %rax, %rbx
jmp 0x72ae
movq %rbx, %rcx
movq %rax, %rbx
movq -0x280(%rbp), %rdi
cmpq %rcx, %rdi
je 0x72ae
movq -0x270(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x72ae
movq %rax, %rbx
jmp 0x72a2
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x7303
movq -0x38(%rbp), %rsi
jmp 0x71a6
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x7161
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x7161
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x7188
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x7188
movq %rax, %rbx
movq -0x2a0(%rbp), %rdi
leaq -0x290(%rbp), %rax
cmpq %rax, %rdi
je 0x7303
movq -0x290(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x7303
jmp 0x7300
movq %rax, %rbx
jmp 0x7325
jmp 0x723d
jmp 0x71ca
jmp 0x7242
jmp 0x71d8
jmp 0x71d1
movq %rax, %rbx
jmp 0x7212
jmp 0x7242
movq %rax, %rbx
jmp 0x71f9
jmp 0x7242
movq %rbx, %rcx
movq %rax, %rbx
movq -0x280(%rbp), %rdi
cmpq %rcx, %rdi
je 0x71f9
movq -0x270(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x7212
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x72cf
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x72cf
movq %rax, %rbx
jmp 0x72ba
movq %rax, %rbx
jmp 0x72cf
jmp 0x7293
jmp 0x724e
movq %rax, %rbx
jmp 0x7273
jmp 0x7293
jmp 0x7257
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x7273
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x7296
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x7296
jmp 0x7293
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
callq 0x74a6
leaq -0x280(%rbp), %rdi
callq 0x73f6
leaq -0xf0(%rbp), %rdi
callq 0x7550
leaq -0xb0(%rbp), %rdi
callq 0x74a6
leaq -0x68(%rbp), %rdi
callq 0x74a6
leaq -0x2c0(%rbp), %rdi
callq 0x74a6
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x72f6
movq -0xc0(%rbp), %rsi
subq %rdi, %rsi
callq 0x42b0
movq %rbx, %rdi
callq 0x44a0
jmp 0x7300
movq %rax, %rbx
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x7325
movq -0x100(%rbp), %rsi
incq %rsi
callq 0x42b0
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0x72ba
movq -0x270(%rbp), %rsi
incq %rsi
callq 0x42b0
jmp 0x72ba