// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]def2fgd/src/main.cpp
// Function: writefgd(std::ostream&, std::vector<Entity, std::allocator<Entity>> const&, FGDWriteOptions const&)
void writefgd(std::ostream& stream, const std::vector<Entity>& entities, const FGDWriteOptions& options)
{
    stream << "//generated by def2fgd " << DEF2FGD_VERSION << "\n\n";

    for (size_t i=0; i<entities.size(); ++i)
    {
        Entity entity = entities[i];
        if (entity.solid) {
            stream << "@SolidClass ";
        }
        else {
            stream << "@PointClass size(";
            stream << entity.box[0] << ' ';
            stream << entity.box[1] << ' ';
            stream << entity.box[2] << ", ";
            stream << entity.box[3] << ' ';
            stream << entity.box[4] << ' ';
            stream << entity.box[5] << ')';

            bool addOffset = options.useDefaultOffsetPatterns && needsOffset(entity.name);

            if (!addOffset) {
                for (size_t j=0; j<options.offsetPatterns.size() && !addOffset; ++j) {
                    addOffset = globMatch(entity.name.c_str(), options.offsetPatterns[j]);
                }
            }

            if (addOffset) {
                stream << " offset(0 0 " << abs(entity.box[2]) << ")";
            }

            if (entity.name == "light" || entity.name == "lightJunior") {
                stream << " iconsprite(\"sprites/light.spr\") flags(Light) ";

                if (!entity.hasKey("_color")) {
                    entity.keys.push_back(Key("_color", "weighted RGB value of light color"));
                }

            } else {
                stream << " color(" << entity.color[0] << ' ' << entity.color[1] << ' ' << entity.color[2] << ") ";

                if (options.bob) {
                    bool addBob = options.useDefaultBobPatterns && needsBob(entity.name);

                    if (!addBob) {
                        for (size_t k=0; k<options.bobPatterns.size() && !addBob; ++k) {
                            addBob = globMatch(entity.name.c_str(), options.bobPatterns[k]);
                        }
                    }

                    if (addBob) {
                        stream << "bobparms( " << options.bobparms[0] << " " << options.bobparms[1] << " " << options.bobparms[2] << " ) ";
                    }
                }

                for (std::vector<Key>::const_iterator it = entity.keys.begin(); it != entity.keys.end(); ++it)
                {
                    if (it->name == "angle" || it->name == "angles") {
                        stream << "flags(Angle) ";
                        break;
                    }
                }

                if (!entity.model.empty()) {
                    stream << "studio(\"" << entity.model << "\") ";
                } else {
                    for (size_t j=0; j<entity.keys.size(); ++j) {
                        if (entity.keys[j].name == "model" || entity.keys[j].name == "model2") {
                            stream << "studio() ";
                            break;
                        }
                    }
                }
            }
        }

        stream << "= " << entity.name;
        if (!entity.description.empty()) {
            const size_t tokenLimit = 2047;

            if (entity.description.size() > tokenLimit) {
                stream << " : \"" << entity.description.substr(0, tokenLimit) << "\"";

                size_t current = tokenLimit;
                while(current <= entity.description.size()) {
                    stream << " + \"" << entity.description.substr(current, tokenLimit) << "\"";
                    current += tokenLimit;
                }

            } else {
                stream << " : \"" << entity.description << "\"";
            }
        }
        stream << "\n";
        stream << "[\n";
        for (size_t j=0; j<entity.keys.size(); ++j)
        {
            const Key& key = entity.keys[j];
            stream << "\t" << key.name;
            if (key.name == "target") {
                stream << "(target_destination) : Target : : ";
            }
            else if (key.name == "targetname") {
                stream << "(target_source) : Name : : ";
            }
            else if (key.name == "_color") {
                stream << "(color1) : \"RGB color\" : \"1 1 0.5\" : ";
            } else if (key.name == "model" || key.name == "model2") {
                stream << "(studio) : Model : : ";
            } else {
                std::string name = key.name;
                if (!name.empty())
                    name[0] = toupper(name[0]);
                if (key.type.empty())
                    stream << "(string)";
                else
                    stream << "(" << key.type << ")";
                stream << " : " << name << " : : ";
            }

            stream << "\"" << key.description << "\"";
            stream << "\n";
        }

        bool hasspawnflags = false;
        for (size_t j=0; j<Entity::SpawnFlagNum && !hasspawnflags; ++j)
        {
            if (!entity.spawnflags[j].empty()) {
                hasspawnflags = true;
            }
        }

        if (hasspawnflags)
        {
            stream << "\tspawnflags(flags) = \n";
            stream << "\t[\n";
            for (size_t j=0; j<Entity::SpawnFlagNum; ++j)
            {
                std::string flagname = entity.spawnflags[j];
                for (size_t k=0; k<flagname.size(); ++k)
                {
                    flagname[k] = tolower(flagname[k]);
                }

                if (!flagname.empty()) {
                    stream << "\t\t" << (1 << j) << " : \"" << flagname << "\" : 0";
                    if (!entity.flagsdescriptions[j].empty()) {
                        stream << " : \"" << entity.flagsdescriptions[j] << "\"";
                    }
                    stream << '\n';
                }
            }
            stream << "\t]\n";
        }

        stream << "]\n";
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x958, %rsp            # imm = 0x958
movq %rdx, (%rsp)
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x83ea(%rip), %rsi      # 0xc020
movl $0x17, %edx
callq 0x32c0
leaq 0x83f1(%rip), %rsi      # 0xc038
movl $0x3, %edx
movq %r15, %rdi
callq 0x32c0
leaq 0x83e1(%rip), %rsi      # 0xc03c
movl $0x2, %edx
movq %r15, %rdi
callq 0x32c0
movq (%rbx), %rax
movq %rbx, 0xa8(%rsp)
cmpq %rax, 0x8(%rbx)
je 0x4a0f
xorl %edx, %edx
leaq 0xb8(%rsp), %rbx
movq %rdx, 0xb0(%rsp)
imulq $0x8a0, %rdx, %rsi      # imm = 0x8A0
addq %rax, %rsi
movq %rbx, %rdi
callq 0x57fa
cmpb $0x1, 0x934(%rsp)
jne 0x3cc4
movl $0xc, %edx
movq %r15, %rdi
leaq 0x8385(%rip), %rsi      # 0xc03f
callq 0x32c0
jmp 0x43b4
movl $0x11, %edx
movq %r15, %rdi
leaq 0x8379(%rip), %rsi      # 0xc04c
callq 0x32c0
movl 0x91c(%rsp), %esi
movq %r15, %rdi
callq 0x3400
movb $0x20, 0x8(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x32c0
movl 0x920(%rsp), %esi
movq %r15, %rdi
callq 0x3400
movb $0x20, 0x8(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x32c0
movl 0x924(%rsp), %esi
movq %r15, %rdi
callq 0x3400
movl $0x2, %edx
movq %rax, %rdi
leaq 0x831c(%rip), %rsi      # 0xc05e
callq 0x32c0
movl 0x928(%rsp), %esi
movq %r15, %rdi
callq 0x3400
movb $0x20, 0x8(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x32c0
movl 0x92c(%rsp), %esi
movq %r15, %rdi
callq 0x3400
movb $0x20, 0x8(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x32c0
movl 0x930(%rsp), %esi
movq %r15, %rdi
callq 0x3400
movb $0x29, 0x8(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x32c0
movq (%rsp), %rax
cmpb $0x1, 0xe(%rax)
jne 0x3e59
movl $0x5, %edx
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
leaq 0x8a22(%rip), %rcx      # 0xc7ff
callq 0x3300
movb $0x1, %r13b
testl %eax, %eax
je 0x3e5c
movl $0x7, %edx
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
leaq 0x8a06(%rip), %rcx      # 0xc805
callq 0x3300
testl %eax, %eax
je 0x3e5c
movl $0x5, %edx
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
leaq 0x89ef(%rip), %rcx      # 0xc80d
callq 0x3300
testl %eax, %eax
je 0x3e5c
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x89da(%rip), %rsi      # 0xc813
callq 0x30b0
testl %eax, %eax
je 0x3e5c
movq %rbx, %rdi
leaq 0x89de(%rip), %rsi      # 0xc82a
callq 0x30b0
testl %eax, %eax
sete %r13b
jmp 0x3e5c
xorl %r13d, %r13d
testb %r13b, %r13b
jne 0x3ea9
movq (%rsp), %rax
movq 0x10(%rax), %r14
movq 0x18(%rax), %r12
subq %r14, %r12
sete %al
orb %r13b, %al
jne 0x3ea9
sarq $0x3, %r12
movl $0x1, %ebp
movq 0xb8(%rsp), %rbx
movq -0x8(%r14,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x4ad9
movl %eax, %r13d
testb %al, %al
jne 0x3ea9
leaq 0x1(%rbp), %rax
cmpq %r12, %rbp
movq %rax, %rbp
jb 0x3e89
testb %r13b, %r13b
je 0x3eec
movl $0xc, %edx
movq %r15, %rdi
leaq 0x81a4(%rip), %rsi      # 0xc061
callq 0x32c0
movl 0x924(%rsp), %eax
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
movq %r15, %rdi
callq 0x3400
movl $0x1, %edx
movq %rax, %rdi
leaq 0x8bb0(%rip), %rsi      # 0xca97
callq 0x32c0
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x8170(%rip), %rsi      # 0xc06e
callq 0x30b0
testl %eax, %eax
je 0x4029
movq %rbx, %rdi
leaq 0x815f(%rip), %rsi      # 0xc074
callq 0x30b0
testl %eax, %eax
je 0x4029
movl $0x7, %edx
movq %r15, %rdi
leaq 0x81a7(%rip), %rsi      # 0xc0d8
callq 0x32c0
movl 0x910(%rsp), %esi
movq %r15, %rdi
callq 0x31a0
movb $0x20, 0x8(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x32c0
movl 0x914(%rsp), %esi
movq %rax, %rdi
callq 0x31a0
movb $0x20, 0x8(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x32c0
movl 0x918(%rsp), %esi
movq %rax, %rdi
callq 0x31a0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x814c(%rip), %rsi      # 0xc0ec
callq 0x32c0
movq (%rsp), %rax
cmpb $0x1, 0xc(%rax)
leaq 0xb8(%rsp), %rbx
jne 0x4286
movq (%rsp), %rax
cmpb $0x1, 0xd(%rax)
jne 0x41ab
movl $0x5, %edx
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x8825(%rip), %rcx      # 0xc7ff
callq 0x3300
movb $0x1, %r13b
testl %eax, %eax
je 0x41ae
movl $0x7, %edx
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x880a(%rip), %rcx      # 0xc805
callq 0x3300
testl %eax, %eax
je 0x41ae
movl $0x5, %edx
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x87f4(%rip), %rcx      # 0xc80d
callq 0x3300
testl %eax, %eax
sete %r13b
jmp 0x41ae
movl $0x2e, %edx
movq %r15, %rdi
leaq 0x8048(%rip), %rsi      # 0xc080
callq 0x32c0
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x8059(%rip), %rsi      # 0xc0af
leaq 0x8058(%rip), %rdx      # 0xc0b5
callq 0x5ea4
leaq 0xb8(%rsp), %rdi
movq %rbx, %rsi
callq 0x8556
movl %eax, %ebx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4090
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3250
testb %bl, %bl
jne 0x43b4
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x8001(%rip), %rsi      # 0xc0af
leaq 0x8000(%rip), %rdx      # 0xc0b5
callq 0x5ea4
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x88(%rsp), %r14
movq %r14, %rdi
leaq 0x7fda(%rip), %rsi      # 0xc0b6
leaq 0x7ff4(%rip), %rdx      # 0xc0d7
callq 0x5ea4
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x68(%rsp), %rsi
movq %r14, %rdx
callq 0x8368
leaq 0xf8(%rsp), %rdi
movq %rbx, %rsi
callq 0x5f34
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x4129
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3250
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4145
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3250
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4161
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3250
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x4186
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3250
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x43b4
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x43b4
xorl %r13d, %r13d
testb %r13b, %r13b
jne 0x41fb
movq (%rsp), %rax
movq 0x28(%rax), %r14
movq 0x30(%rax), %r12
subq %r14, %r12
sete %al
orb %r13b, %al
jne 0x41fb
sarq $0x3, %r12
movl $0x1, %ebp
movq 0xb8(%rsp), %rbx
movq -0x8(%r14,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x4ad9
movl %eax, %r13d
testb %al, %al
jne 0x41fb
leaq 0x1(%rbp), %rax
cmpq %r12, %rbp
movq %rax, %rbp
jb 0x41db
testb %r13b, %r13b
je 0x4286
movl $0xa, %edx
movq %r15, %rdi
leaq 0x7ecd(%rip), %rsi      # 0xc0e0
callq 0x32c0
movq (%rsp), %rax
movl (%rax), %esi
movq %r15, %rdi
callq 0x3400
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x7eb1(%rip), %rsi      # 0xc0e9
callq 0x32c0
movq (%rsp), %rax
movl 0x4(%rax), %esi
movq %rbx, %rdi
callq 0x3400
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x7e8b(%rip), %rsi      # 0xc0e9
callq 0x32c0
movq (%rsp), %rax
movl 0x8(%rax), %esi
movq %rbx, %rdi
callq 0x3400
movl $0x3, %edx
movq %rax, %rdi
leaq 0x7e6a(%rip), %rsi      # 0xc0eb
callq 0x32c0
movq 0xf8(%rsp), %rbx
cmpq 0x100(%rsp), %rbx
je 0x42d8
movq %rbx, %rdi
leaq 0x7e4d(%rip), %rsi      # 0xc0ef
callq 0x30b0
testl %eax, %eax
je 0x42c4
movq %rbx, %rdi
leaq 0x7e40(%rip), %rsi      # 0xc0f5
callq 0x30b0
testl %eax, %eax
je 0x42c4
addq $0x60, %rbx
jmp 0x428e
movl $0xd, %edx
movq %r15, %rdi
leaq 0x7e29(%rip), %rsi      # 0xc0fc
callq 0x32c0
cmpq $0x0, 0x940(%rsp)
je 0x4328
movl $0x8, %edx
movq %r15, %rdi
leaq 0x7e18(%rip), %rsi      # 0xc10a
callq 0x32c0
movq 0x938(%rsp), %rsi
movq 0x940(%rsp), %rdx
movq %r15, %rdi
callq 0x32c0
movl $0x3, %edx
movq %rax, %rdi
leaq 0x7df5(%rip), %rsi      # 0xc113
callq 0x32c0
jmp 0x43b4
movq 0xf8(%rsp), %rdi
cmpq %rdi, 0x100(%rsp)
je 0x43b4
xorl %ebx, %ebx
xorl %r14d, %r14d
addq %rbx, %rdi
leaq 0x7dce(%rip), %rsi      # 0xc117
callq 0x30b0
testl %eax, %eax
je 0x43a0
movq 0xf8(%rsp), %rdi
addq %rbx, %rdi
leaq 0x7db9(%rip), %rsi      # 0xc11d
callq 0x30b0
testl %eax, %eax
je 0x43a0
incq %r14
movq 0xf8(%rsp), %rdi
movq 0x100(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
addq $0x60, %rbx
cmpq %rax, %r14
jb 0x433f
jmp 0x43b4
movl $0x9, %edx
movq %r15, %rdi
leaq 0x7d75(%rip), %rsi      # 0xc124
callq 0x32c0
movl $0x2, %edx
movq %r15, %rdi
leaq 0x7d6b(%rip), %rsi      # 0xc12e
callq 0x32c0
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
movq %r15, %rdi
callq 0x32c0
movq 0xe0(%rsp), %rax
testq %rax, %rax
leaq 0xd8(%rsp), %rbx
leaq 0x8(%rsp), %r14
je 0x4546
cmpq $0x800, %rax            # imm = 0x800
jb 0x4506
movl $0x4, %edx
movq %r15, %rdi
leaq 0x7d18(%rip), %rsi      # 0xc131
callq 0x32c0
movl $0x7ff, %ecx            # imm = 0x7FF
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3280
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x32c0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x7ce8(%rip), %rsi      # 0xc139
callq 0x32c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4472
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3250
cmpq $0x7ff, 0xe0(%rsp) # imm = 0x7FF
jb 0x4546
movl $0x7ff, %r13d           # imm = 0x7FF
movl $0x4, %edx
movq %r15, %rdi
leaq 0x7c9d(%rip), %rsi      # 0xc136
callq 0x32c0
movl $0x7ff, %ecx            # imm = 0x7FF
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x3280
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x32c0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x7c67(%rip), %rsi      # 0xc139
callq 0x32c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x44f3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3250
addq $0x7ff, %r13            # imm = 0x7FF
cmpq 0xe0(%rsp), %r13
jbe 0x448a
jmp 0x4546
movl $0x4, %edx
movq %r15, %rdi
leaq 0x7c1c(%rip), %rsi      # 0xc131
callq 0x32c0
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
movq %r15, %rdi
callq 0x32c0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x7bf8(%rip), %rsi      # 0xc139
callq 0x32c0
movl $0x1, %edx
movq %r15, %rdi
leaq 0x7ae8(%rip), %rsi      # 0xc03d
callq 0x32c0
movl $0x2, %edx
movq %r15, %rdi
leaq 0x7c80(%rip), %rsi      # 0xc1e9
callq 0x32c0
movq 0xf8(%rsp), %r14
cmpq %r14, 0x100(%rsp)
je 0x47e2
xorl %r12d, %r12d
xorl %ebp, %ebp
movl $0x1, %edx
movq %r15, %rdi
leaq 0x7c55(%rip), %rsi      # 0xc1ed
callq 0x32c0
movq (%r14,%r12), %rsi
movq 0x8(%r14,%r12), %rdx
movq %r15, %rdi
callq 0x32c0
leaq (%r14,%r12), %r13
movq %r13, %rdi
leaq 0x7b7f(%rip), %rsi      # 0xc13b
callq 0x30b0
testl %eax, %eax
je 0x46ab
movq %r13, %rdi
leaq 0x7b92(%rip), %rsi      # 0xc165
callq 0x30b0
testl %eax, %eax
je 0x46b9
movq %r13, %rdi
leaq 0x7ac5(%rip), %rsi      # 0xc0af
callq 0x30b0
testl %eax, %eax
je 0x46c7
movq %r13, %rdi
leaq 0x7b16(%rip), %rsi      # 0xc117
callq 0x30b0
movl $0x15, %ebx
testl %eax, %eax
je 0x46d5
movq %r13, %rdi
leaq 0x7b00(%rip), %rsi      # 0xc11d
callq 0x30b0
leaq 0x7b89(%rip), %rsi      # 0xc1b2
testl %eax, %eax
je 0x46dc
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq (%r14,%r12), %rsi
movq 0x8(%r14,%r12), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x5e14
cmpq $0x0, 0x10(%rsp)
je 0x4668
movq 0x8(%rsp), %rbx
movsbl (%rbx), %edi
callq 0x3450
movb %al, (%rbx)
cmpq $0x0, 0x48(%r14,%r12)
je 0x476c
movl $0x1, %edx
movq %r15, %rdi
leaq 0x79d9(%rip), %rsi      # 0xc05c
callq 0x32c0
movq 0x40(%r14,%r12), %rsi
movq 0x48(%r14,%r12), %rdx
movq %r15, %rdi
callq 0x32c0
movl $0x1, %edx
leaq 0x83f1(%rip), %rsi      # 0xca97
jmp 0x477b
movl $0x22, %ebx
leaq 0x7a8b(%rip), %rsi      # 0xc142
jmp 0x46dc
movl $0x1b, %ebx
leaq 0x7aab(%rip), %rsi      # 0xc170
jmp 0x46dc
movl $0x25, %ebx
leaq 0x7ab9(%rip), %rsi      # 0xc18c
jmp 0x46dc
leaq 0x7ad6(%rip), %rsi      # 0xc1b2
movq %r15, %rdi
movq %rbx, %rdx
callq 0x32c0
movl $0x1, %edx
movq %r15, %rdi
leaq 0x7a43(%rip), %rsi      # 0xc139
callq 0x32c0
movq 0x20(%r14,%r12), %rsi
movq 0x28(%r14,%r12), %rdx
movq %r15, %rdi
callq 0x32c0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x7a1d(%rip), %rsi      # 0xc139
callq 0x32c0
movl $0x1, %edx
movq %r15, %rdi
leaq 0x790d(%rip), %rsi      # 0xc03d
callq 0x32c0
incq %rbp
movq 0xf8(%rsp), %r14
movq 0x100(%rsp), %rax
subq %r14, %rax
sarq $0x5, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
addq $0x60, %r12
cmpq %rax, %rbp
jb 0x4589
jmp 0x47e2
movl $0x8, %edx
movq %r15, %rax
leaq 0x7a4d(%rip), %rsi      # 0xc1c8
movq %rax, %rdi
callq 0x32c0
movl $0x3, %edx
movq %r15, %rdi
leaq 0x7a1c(%rip), %rsi      # 0xc1ae
callq 0x32c0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x32c0
movl $0x5, %edx
movq %rax, %rdi
leaq 0x79ce(%rip), %rsi      # 0xc186
callq 0x32c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x46e7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x46e7
xorl %eax, %eax
leaq 0x118(%rsp), %rcx
xorl %edx, %edx
cmpq $0x0, (%rcx)
movzbl %dl, %edx
movl $0x1, %esi
cmovnel %esi, %edx
cmpq $0x1e, %rax
ja 0x480f
incq %rax
addq $0x20, %rcx
testb $0x1, %dl
je 0x47ee
testb $0x1, %dl
je 0x49b3
movl $0x16, %edx
movq %r15, %rdi
leaq 0x79aa(%rip), %rsi      # 0xc1d1
callq 0x32c0
movl $0x3, %edx
movq %r15, %rdi
leaq 0x79ad(%rip), %rsi      # 0xc1e8
callq 0x32c0
xorl %r13d, %r13d
movq %r13, %r14
shlq $0x5, %r14
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0xf8(%rsp), %rax
movq 0x18(%rax,%r14), %rsi
movq 0x20(%rax,%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x5e14
cmpq $0x0, 0x10(%rsp)
je 0x4976
xorl %ebx, %ebx
movq 0x8(%rsp), %r12
movsbl (%r12,%rbx), %edi
callq 0x3350
movb %al, (%r12,%rbx)
incq %rbx
movq 0x10(%rsp), %rax
cmpq %rax, %rbx
jb 0x4881
testq %rax, %rax
je 0x4976
movl $0x2, %edx
movq %r15, %rdi
leaq 0x7933(%rip), %rsi      # 0xc1ec
callq 0x32c0
movl $0x1, %esi
movl %r13d, %ecx
shll %cl, %esi
movq %r15, %rdi
callq 0x3400
movq %rax, %rbx
movl $0x4, %edx
movq %rax, %rdi
leaq 0x784f(%rip), %rsi      # 0xc131
callq 0x32c0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x32c0
movl $0x5, %edx
movq %rax, %rdi
leaq 0x78e7(%rip), %rsi      # 0xc1ef
callq 0x32c0
leaq 0x510(%rsp), %rax
cmpq $0x0, 0x8(%rax,%r14)
je 0x495f
movl $0x4, %edx
movq %r15, %rdi
leaq 0x7805(%rip), %rsi      # 0xc131
callq 0x32c0
leaq 0x510(%rsp), %rax
addq %rax, %r14
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x32c0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x77df(%rip), %rsi      # 0xc139
callq 0x32c0
movb $0xa, 0x68(%rsp)
movl $0x1, %edx
movq %r15, %rdi
leaq 0x68(%rsp), %rsi
callq 0x32c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4992
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3250
incq %r13
cmpq $0x20, %r13
jne 0x4843
movl $0x3, %edx
movq %r15, %rdi
leaq 0x7847(%rip), %rsi      # 0xc1f5
callq 0x32c0
movl $0x2, %edx
movq %r15, %rdi
leaq 0x7834(%rip), %rsi      # 0xc1f6
callq 0x32c0
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
callq 0x5a50
movq 0xb0(%rsp), %rdx
incq %rdx
movq 0xa8(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
movabsq $-0xed7303b5cc0ed73, %rsi # imm = 0xF128CFC4A33F128D
imulq %rsi, %rcx
cmpq %rcx, %rdx
jb 0x3c87
addq $0x958, %rsp            # imm = 0x958
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4ac1
jmp 0x4ac1
movq %rax, %rbx
jmp 0x4a47
movq %rax, %rbx
jmp 0x4a6c
jmp 0x4ac1
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5a02
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x4a6c
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3250
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x4ac4
movq 0x78(%rsp), %rsi
jmp 0x4ab7
jmp 0x4ac1
jmp 0x4aa0
jmp 0x4ac1
jmp 0x4ac1
jmp 0x4aa0
jmp 0x4ac1
jmp 0x4ac1
jmp 0x4ac1
jmp 0x4ac1
jmp 0x4ac1
jmp 0x4ac1
jmp 0x4aa0
jmp 0x4aa0
jmp 0x4ac1
jmp 0x4ac1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4ac4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3250
jmp 0x4ac4
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x5a50
movq %rbx, %rdi
callq 0x3420