// File: /workspace/github_cpp_makefile_star2_O3/lega911[P]ijson/src/server.cpp
// Function: Loop::client_request(ISlice, Connect*)
int Loop::client_request(ISlice name, Connect *client) {
    stat_call++;
    QueueLine *ql = server->get_queue(name);
    if(!ql) {
        if(server->log & 4) std::cout << ltime() << "404 no method " << name.as_string() << std::endl;
        client->send.status("404 Not Found")->done(-32601);
        return -1;
    }

    Connect *worker = NULL;
    Queue *q;

    LOCK _l(ql->mutex);
    int rloop = _nloop;
    for(int index=-1;index<server->threads;index++) {
        if(index == _nloop) continue;
        if(index >= 0) rloop = index;
        q = &ql->queue[rloop];

        auto it=q->workers.begin();
        while (it != q->workers.end()) {
            worker = *it;
            if(client->required_worker) {
                if(client->required_worker != worker->connection_id) {
                    worker = NULL;
                    it++;
                    continue;
                }
            }
            it = q->workers.erase(it);
            worker->unlink();

            if(worker->is_closed()) {
                if(server->log & 8) std::cout << ltime() << "worker closed " << worker << std::endl;
                worker = NULL;
                continue;
            }

            bool busy = true;
            if(worker->status == Status::worker_wait_job) {
                worker->mutex.lock();
                if(worker->status == Status::worker_wait_job) {
                    worker->status = Status::busy;
                    busy = false;
                }
                worker->mutex.unlock();
            }

            if(busy) {
                if(server->log & 8) std::cout << "worker is not ready " << worker << std::endl;
                worker = NULL;
                continue;
            }
            break;
        };

        if(worker) break;
    }

    if(worker) {
        if(client->no_response) {
            if(worker->worker_mode) worker->status = Status::worker_mode_async;
            else worker->status = Status::net;
            worker->send.status("200 OK")->header("Name", name)->header("Async", Slice("true"))->done(client->body);
            client->send.status("200 OK")->done(1);
        } else if(worker->noid) {
            worker->client = client;
            client->link();
            client->status = Status::client_wait_result;
            worker->status = Status::worker_wait_result;
            worker->send.status("200 OK")->header("Name", name)->done(client->body);
        } else {
            Slice id(client->id);
            if(id.empty()) {
                try {
                    while(client->json.scan()) {
                        if(client->json.key == "id") {
                            id = client->json.value;
                            client->id.set(client->json.value);
                            break;
                        }
                    }
                } catch (const error::InvalidData &e) {
                    worker->link();
                    worker->status = Status::worker_wait_job;
                    ql->queue[worker->nloop].workers.push_front(worker);
                    client->send.status("400 No Id")->done(-1);
                    if(server->log & 4) std::cout << ltime() << "400 no id " << name.as_string() << std::endl;
                    return -3;
                }
            }
            if(id.empty()) {
                generate_id(client->id);
                id.set(client->id);
            }
            std::string sid = id.as_string();

            server->wait_lock.lock();
            bool busy = server->wait_response.find(sid) != server->wait_response.end();
            server->wait_lock.unlock();
            if(busy) {
                worker->link();
                worker->status = Status::worker_wait_job;
                ql->queue[worker->nloop].workers.push_front(worker);
                client->send.status("400 Collision Id")->done(-1);
                if(server->log & 4) std::cout << ltime() << "400 collision id " << name.as_string() << std::endl;
                return -3;
            }
            if(worker->fail_on_disconnect) {
                worker->client = client;
                client->link();
            }
            worker->send.status("200 OK")->header("Id", id)->header("Name", name)->done(client->body);
            server->wait_lock.lock();
            server->wait_response[sid] = client;
            server->wait_lock.unlock();
            client->link();
            client->status = Status::client_wait_result;
            worker->status = Status::net;
        }
        if(server->log & 32) worker->start_time = get_time();
    } else {
        if(client->header_option == "if present" && !ql->workers.head) {
            client->send.status("204 No Content")->done(1);
            return 0;
        }
        bool inserted = false;
        auto *clients = &ql->queue[_nloop].clients;

        Message *msg = new Message();
        msg->priority = client->priority;
        msg->required_worker.move(&client->required_worker);
        if(client->no_response) {
            msg->name.set(name);
            msg->attach_buffer(&client->body);
        } else {
            client->name.set(name);
            msg->attach_client(client);
        }
        for(auto it=clients->crbegin(); it!=clients->crend(); it++) {
            if(msg->priority <= (*it)->priority) {
                clients->insert(it.base(), msg);
                inserted = true;
                break;
            }
        }
        if(!inserted) clients->push_front(msg);
        if(client->no_response) {
            client->send.status("200 OK")->done(1);
        } else {
            client->status = Status::client_wait_result;
        }
    };

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %r15
movq %rsi, -0x70(%rbp)
movl %edx, -0x68(%rbp)
incq 0x80(%rdi)
movq %rcx, %r12
movq 0x18(%rdi), %rbx
leaq 0x200c8(%rbx), %rdi
callq 0xeaee
testw %ax, %ax
je 0x1108f
movzwl %ax, %eax
decl %eax
movq 0x20110(%rbx), %rcx
movq (%rcx,%rax,8), %rbx
testq %rbx, %rbx
je 0x1108f
movq $0x0, -0x30(%rbp)
leaq 0x18(%rbx), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x83f0
testl %eax, %eax
jne 0x11800
movq 0x18(%r15), %rax
cmpl $0x0, 0x28(%rax)
js 0x110cd
movl 0x4(%r15), %ecx
leaq 0x110(%r12), %rdx
movq %rdx, -0xc0(%rbp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r12, -0x60(%rbp)
movq %r15, -0x38(%rbp)
movq %rbx, -0x88(%rbp)
cmpl 0x4(%r15), %edx
je 0x10fb9
testl %edx, %edx
movl %edx, -0x8c(%rbp)
cmovnsl %edx, %ecx
movq 0x40(%rbx), %r15
movl %ecx, -0x90(%rbp)
movslq %ecx, %rax
leaq (%rax,%rax,4), %rax
shlq $0x5, %rax
movq 0x10(%r15,%rax), %r14
cmpq 0x30(%r15,%rax), %r14
je 0x10f9a
addq %rax, %r15
movq 0x20(%r15), %r12
movq 0x28(%r15), %r13
movq (%r14), %rsi
movq %rsi, -0x30(%rbp)
movq -0x60(%rbp), %rax
cmpl $0x0, 0x118(%rax)
je 0x10de8
addq $0x100, %rsi            # imm = 0x100
movq -0xc0(%rbp), %rdi
callq 0xca7c
testl %eax, %eax
je 0x10de8
movq $0x0, -0x30(%rbp)
addq $0x8, %r14
cmpq %r12, %r14
jne 0x10f90
movq 0x8(%r13), %r14
addq $0x8, %r13
leaq 0x200(%r14), %r12
jmp 0x10f90
movq %r14, -0x58(%rbp)
movq (%r13), %rax
movq %rax, -0x50(%rbp)
addq $0x200, %rax            # imm = 0x200
movq %rax, -0x48(%rbp)
movq %r13, -0x40(%rbp)
leaq -0xb0(%rbp), %rdi
movq %r15, %rsi
leaq -0x58(%rbp), %rdx
callq 0x148c6
movq -0xb0(%rbp), %r14
movq -0xa0(%rbp), %r12
movq -0x98(%rbp), %r13
movq -0x30(%rbp), %rdi
callq 0x898c
movq -0x30(%rbp), %rdi
cmpl $-0x1, (%rdi)
je 0x10edd
cmpl $0x1, 0xcc(%rdi)
jne 0x10e74
addq $0x50, %rdi
callq 0x83f0
testl %eax, %eax
jne 0x117f9
movq -0x30(%rbp), %rdi
cmpl $0x1, 0xcc(%rdi)
je 0x10fc9
addq $0x50, %rdi
callq 0x8240
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
testb $0x8, 0x20(%rax)
je 0x10f88
movl $0x14, %edx
movq 0xd13e(%rip), %rdi      # 0x1dfd0
leaq 0x7725(%rip), %rsi      # 0x185be
callq 0x8350
movq -0x30(%rbp), %rsi
movq 0xd127(%rip), %rdi      # 0x1dfd0
callq 0x8250
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x82f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x81f0
jmp 0x10f88
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
testb $0x8, 0x20(%rax)
je 0x10f88
callq 0x163f5
movq %rax, %rbx
testq %rax, %rax
je 0x10f18
movq %rbx, %rdi
callq 0x8130
movq 0xd0c5(%rip), %rdi      # 0x1dfd0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x8350
jmp 0x10f36
movq 0xd0b1(%rip), %rcx      # 0x1dfd0
movq (%rcx), %rax
movq -0x18(%rax), %rax
leaq (%rcx,%rax), %rdi
movl 0x20(%rcx,%rax), %esi
orl $0x1, %esi
callq 0x8470
movl $0xe, %edx
movq 0xd08e(%rip), %rdi      # 0x1dfd0
leaq 0x7666(%rip), %rsi      # 0x185af
callq 0x8350
movq -0x30(%rbp), %rsi
movq 0xd077(%rip), %rdi      # 0x1dfd0
callq 0x8250
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x82f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x81f0
movq $0x0, -0x30(%rbp)
cmpq 0x30(%r15), %r14
jne 0x10d94
movq -0x38(%rbp), %r15
movq 0x18(%r15), %rax
movq -0x60(%rbp), %r12
movq -0x88(%rbp), %rbx
movl -0x90(%rbp), %ecx
movl -0x8c(%rbp), %edx
incl %edx
cmpl 0x28(%rax), %edx
jl 0x10d4f
jmp 0x110cd
movl $0x5, 0xcc(%rdi)
addq $0x50, %rdi
callq 0x8240
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x10f9a
movq -0x60(%rbp), %r12
cmpb $0x1, 0xf2(%r12)
jne 0x113f7
xorl %eax, %eax
cmpb $0x0, 0xf3(%rdi)
movl $0x6, %ecx
cmovel %eax, %ecx
movl %ecx, 0xcc(%rdi)
addq $0x18, %rdi
leaq 0x621f(%rip), %rsi      # 0x17239
callq 0x9ec6
movq -0x38(%rbp), %r13
leaq 0x757a(%rip), %rsi      # 0x185a4
leaq -0x70(%rbp), %rdx
movq %rax, %rdi
callq 0xbc4a
leaq 0x6b0f(%rip), %rcx      # 0x17b4c
leaq -0x58(%rbp), %rdx
movq %rcx, (%rdx)
movl $0x4, 0x8(%rdx)
leaq 0x7557(%rip), %rsi      # 0x185a9
movq %rax, %rdi
callq 0xbc4a
leaq 0xd0(%r12), %rsi
movq %rax, %rdi
callq 0xa766
addq $0x18, %r12
leaq 0x61c4(%rip), %rsi      # 0x17239
movq %r12, %rdi
callq 0x9ec6
movq %rax, %rdi
movl $0x1, %esi
callq 0x9f3a
jmp 0x117d3
movq 0x18(%r15), %rax
testb $0x4, 0x20(%rax)
je 0x11310
callq 0x163f5
testq %rax, %rax
je 0x11270
movq %rax, %rbx
movq %rax, %rdi
callq 0x8130
movq 0xcf13(%rip), %rdi      # 0x1dfd0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x8350
jmp 0x1128e
movl 0xb0(%r12), %eax
movq 0xa8(%r12), %rcx
xorl %edx, %edx
testl %eax, %eax
movl $0x0, %esi
cmovgl %eax, %esi
movb $0x69, %r8b
leaq 0x74f2(%rip), %rdi      # 0x185e5
cmpq %rdx, %rsi
je 0x1111f
cmpb (%rcx,%rdx), %r8b
jne 0x1111f
movb 0x1(%rdx,%rdi), %r8b
incq %rdx
cmpq $0xa, %rdx
jne 0x110f3
cmpl $0xa, %eax
jne 0x1111f
cmpq $0x0, 0x80(%rbx)
je 0x113d2
movq 0x40(%rbx), %r14
movslq 0x4(%r15), %r15
movl $0x38, %edi
callq 0xed4c
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq %rbx, -0xb0(%rbp)
movl 0xf4(%r12), %ecx
movl %ecx, (%rbx)
movl 0x11c(%r12), %ecx
movl %ecx, 0x14(%rbx)
movl %eax, 0x11c(%r12)
movq 0x110(%r12), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x110(%r12)
movl 0x118(%r12), %ecx
movl %ecx, 0x10(%rbx)
movl %eax, 0x118(%r12)
movq -0x70(%rbp), %rsi
movl -0x68(%rbp), %edx
cmpb $0x1, 0xf2(%r12)
jne 0x111ca
movq %rbx, %rdi
addq $0x28, %rdi
movl $0x0, 0x30(%rbx)
callq 0xc102
leaq 0xd0(%r12), %rsi
movq %rbx, %rdi
callq 0x12a74
jmp 0x111ec
leaq 0xb8(%r12), %rdi
movl $0x0, 0xc0(%r12)
callq 0xc102
movq %r12, 0x18(%rbx)
incl 0x8(%r12)
leaq (%r15,%r15,4), %rax
shlq $0x5, %rax
leaq (%r14,%rax), %rsi
addq $0x50, %rsi
movq 0x10(%rsi), %rax
movq 0x30(%rsi), %rdi
cmpq %rax, %rdi
je 0x11258
movq 0x48(%rsi), %rcx
movq 0x38(%rsi), %r9
movq 0x40(%rsi), %r8
movl (%rbx), %edx
cmpq %r9, %rdi
je 0x1122a
movq -0x8(%rdi), %r10
cmpl (%r10), %edx
jg 0x1124f
jmp 0x1133b
movq -0x8(%rcx), %r10
movq 0x1f8(%r10), %r11
cmpl (%r11), %edx
jle 0x1133b
addq $-0x8, %rcx
leaq 0x200(%r10), %r8
movq %r8, %rdi
movq %r10, %r9
addq $-0x8, %rdi
cmpq %rax, %rdi
jne 0x11217
cmpq 0x18(%rsi), %rax
je 0x11363
movq %rbx, -0x8(%rax)
addq $-0x8, 0x10(%rsi)
jmp 0x11375
movq 0xcd59(%rip), %rax      # 0x1dfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl 0x20(%rax,%rcx), %esi
orl $0x1, %esi
callq 0x8470
movq 0xcd3b(%rip), %rbx      # 0x1dfd0
leaq 0x640f(%rip), %rsi      # 0x176ab
movl $0xe, %edx
movq %rbx, %rdi
callq 0x8350
leaq -0x58(%rbp), %r15
leaq -0x70(%rbp), %rsi
movq %r15, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xc49c
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x8350
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x82f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x81f0
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11310
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x8320
addq $0x18, %r12
leaq 0x639f(%rip), %rsi      # 0x176ba
movq %r12, %rdi
callq 0x9ec6
movq %rax, %rdi
movl $0xffff80a7, %esi       # imm = 0xFFFF80A7
callq 0x9f3a
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x113bd
leaq -0xe0(%rbp), %rdx
movq %rdi, (%rdx)
movq %r9, 0x8(%rdx)
movq %r8, 0x10(%rdx)
movq %rcx, 0x18(%rdx)
leaq -0x58(%rbp), %rdi
leaq -0xb0(%rbp), %rcx
callq 0x13528
jmp 0x11375
leaq -0xb0(%rbp), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x15b32
cmpb $0x1, 0xf2(%r12)
jne 0x113a2
addq $0x18, %r12
leaq 0x5eae(%rip), %rsi      # 0x17239
movq %r12, %rdi
callq 0x9ec6
movq %rax, %rdi
movl $0x1, %esi
callq 0x9f3a
jmp 0x113ae
movl $0x4, 0xcc(%r12)
xorl %r14d, %r14d
movq -0xb8(%rbp), %rdi
callq 0x8240
movl %r14d, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x18, %r12
leaq 0x7213(%rip), %rsi      # 0x185f0
movq %r12, %rdi
callq 0x9ec6
xorl %r14d, %r14d
movq %rax, %rdi
movl $0x1, %esi
callq 0x9f3a
jmp 0x113b1
cmpb $0x1, 0xf1(%rdi)
movq -0x38(%rbp), %r13
jne 0x11460
movq %r12, 0x120(%rdi)
incl 0x8(%r12)
movl $0x4, 0xcc(%r12)
movl $0x2, 0xcc(%rdi)
addq $0x18, %rdi
leaq 0x5e08(%rip), %rsi      # 0x17239
callq 0x9ec6
leaq 0x7167(%rip), %rsi      # 0x185a4
leaq -0x70(%rbp), %rdx
movq %rax, %rdi
callq 0xbc4a
addq $0xd0, %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0xa766
jmp 0x117d3
movq 0xe0(%r12), %rax
movl 0xe8(%r12), %ecx
movq %rax, -0x80(%rbp)
movl %ecx, -0x78(%rbp)
testl %ecx, %ecx
jne 0x1153f
leaq 0xe0(%r12), %rbx
leaq 0x128(%r12), %r15
leaq 0x5eb6(%rip), %r14      # 0x1734c
movq %r15, %rdi
callq 0xd5de
testb %al, %al
je 0x1151a
movl 0x130(%r12), %eax
movq 0x128(%r12), %rcx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
movb $0x69, %dil
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x11496
cmpb (%rcx,%rsi), %dil
jne 0x11496
movb 0x1(%rsi,%r14), %dil
incq %rsi
cmpq $0x2, %rsi
jne 0x114c1
cmpl $0x2, %eax
jne 0x11496
movl 0x140(%r12), %eax
movl %eax, -0x78(%rbp)
movq 0x138(%r12), %rax
movq %rax, -0x80(%rbp)
movq 0x138(%r12), %rsi
movl 0x140(%r12), %edx
movl $0x0, 0xe8(%r12)
movq %rbx, %rdi
callq 0xc102
cmpl $0x0, -0x78(%rbp)
jne 0x1153f
movq %rbx, %rdi
callq 0x16775
movq 0xe0(%r12), %rax
movl 0xe8(%r12), %ecx
movq %rax, -0x80(%rbp)
movl %ecx, -0x78(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xc49c
movl $0x20158, %edi          # imm = 0x20158
addq 0x18(%r13), %rdi
callq 0x83f0
testl %eax, %eax
jne 0x11807
movl $0x20128, %edi          # imm = 0x20128
addq 0x18(%r13), %rdi
leaq -0x58(%rbp), %rsi
callq 0x1446a
movq %rax, %rbx
movq 0x18(%r13), %rdi
leaq 0x20130(%rdi), %r15
addq $0x20158, %rdi          # imm = 0x20158
callq 0x8240
movq -0x30(%rbp), %rdi
cmpq %r15, %rbx
je 0x115e2
incl 0x8(%rdi)
movl $0x1, 0xcc(%rdi)
movq -0x88(%rbp), %rax
movq 0x40(%rax), %rdx
movslq 0x38(%rdi), %rax
leaq (%rax,%rax,4), %rsi
shlq $0x5, %rsi
leaq (%rdx,%rsi), %rax
movq 0x10(%rdx,%rsi), %rcx
cmpq 0x18(%rdx,%rsi), %rcx
je 0x1169a
movq %rdi, -0x8(%rcx)
addq $-0x8, 0x10(%rax)
jmp 0x116a6
cmpb $0x1, 0xf0(%rdi)
jne 0x115f7
movq %r12, 0x120(%rdi)
incl 0x8(%r12)
addq $0x18, %rdi
leaq 0x5c37(%rip), %rsi      # 0x17239
callq 0x9ec6
leaq 0x6f93(%rip), %rsi      # 0x185a1
leaq -0x80(%rbp), %rdx
movq %rax, %rdi
callq 0xbc4a
leaq 0x6f83(%rip), %rsi      # 0x185a4
leaq -0x70(%rbp), %rdx
movq %rax, %rdi
callq 0xbc4a
leaq 0xd0(%r12), %rsi
movq %rax, %rdi
callq 0xa766
movl $0x20158, %edi          # imm = 0x20158
addq 0x18(%r13), %rdi
callq 0x83f0
testl %eax, %eax
jne 0x1180e
movl $0x20128, %edi          # imm = 0x20128
addq 0x18(%r13), %rdi
leaq -0x58(%rbp), %rsi
callq 0x134a8
movq %r12, (%rax)
movl $0x20158, %edi          # imm = 0x20158
addq 0x18(%r13), %rdi
callq 0x8240
incl 0x8(%r12)
movl $0x4, 0xcc(%r12)
movq -0x30(%rbp), %rax
movl $0x0, 0xcc(%rax)
jmp 0x117ab
leaq -0x30(%rbp), %rsi
movq %rax, %rdi
callq 0x15310
addq $0x18, %r12
leaq 0x6ee2(%rip), %rsi      # 0x18593
movq %r12, %rdi
callq 0x9ec6
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x9f3a
movq 0x18(%r13), %rax
testb $0x4, 0x20(%rax)
je 0x117ab
callq 0x163f5
movq %rax, %r14
testq %rax, %rax
je 0x116fd
movq %r14, %rdi
callq 0x8130
movq 0xc8e0(%rip), %rdi      # 0x1dfd0
movq %r14, %rsi
movq %rax, %rdx
callq 0x8350
jmp 0x1171b
movq 0xc8cc(%rip), %rcx      # 0x1dfd0
movq (%rcx), %rax
movq -0x18(%rax), %rax
leaq (%rcx,%rax), %rdi
movl 0x20(%rcx,%rax), %esi
orl $0x1, %esi
callq 0x8470
movq 0xc8ae(%rip), %rdi      # 0x1dfd0
leaq 0x6eaa(%rip), %rsi      # 0x185d3
movl $0x11, %edx
callq 0x8350
leaq -0xb0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xc49c
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq 0xc873(%rip), %rdi      # 0x1dfd0
callq 0x8350
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x82f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x81f0
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x117ab
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x8320
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x117c4
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x8320
movl $0xfffffffd, %r14d      # imm = 0xFFFFFFFD
cmpq %r15, %rbx
jne 0x113b1
movq 0x18(%r13), %rax
xorl %r14d, %r14d
testb $0x20, 0x20(%rax)
je 0x113b1
callq 0x163ac
movq -0x30(%rbp), %rcx
movq %rax, 0x1e0(%rcx)
jmp 0x113b1
movl %eax, %edi
callq 0x81d0
movl %eax, %edi
callq 0x81d0
movl %eax, %edi
callq 0x81d0
movl %eax, %edi
callq 0x81d0
jmp 0x11875
jmp 0x119e0
jmp 0x11850
jmp 0x11850
jmp 0x11850
jmp 0x119e0
movq %rax, %rbx
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11853
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0x11853
jmp 0x119e0
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x119e3
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0x119e3
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x119e3
movq %rbx, %rdi
callq 0x8120
movq -0x30(%rbp), %rax
incl 0x8(%rax)
movl $0x1, 0xcc(%rax)
movq -0x88(%rbp), %rcx
movq 0x40(%rcx), %rdx
movslq 0x38(%rax), %rcx
leaq (%rcx,%rcx,4), %rsi
shlq $0x5, %rsi
leaq (%rdx,%rsi), %rdi
movq 0x10(%rdx,%rsi), %rcx
cmpq 0x18(%rdx,%rsi), %rcx
je 0x118cc
movq %rax, -0x8(%rcx)
addq $-0x8, 0x10(%rdi)
jmp 0x118d5
leaq -0x30(%rbp), %rsi
callq 0x15310
movq -0x60(%rbp), %rdi
addq $0x18, %rdi
leaq 0x6c8c(%rip), %rsi      # 0x18570
callq 0x9ec6
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x9f3a
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
testb $0x4, 0x20(%rax)
je 0x11972
callq 0x163f5
movq 0xc6c0(%rip), %rdi      # 0x1dfd0
movq %rax, %rsi
callq 0x8300
movq %rax, %rbx
leaq 0x6c58(%rip), %rsi      # 0x1857a
movl $0xa, %edx
movq %rax, %rdi
callq 0x8350
leaq -0x58(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xc49c
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %rbx, %rdi
callq 0x8350
movq %rax, %rdi
callq 0x8160
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11972
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x8320
callq 0x8450
movl $0xfffffffd, %r14d      # imm = 0xFFFFFFFD
jmp 0x113b1
jmp 0x119a4
jmp 0x119e0
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x119a7
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0x119a7
movq %rax, %rbx
callq 0x8450
jmp 0x119e3
movq %rax, %rdi
callq 0xc1cb
jmp 0x119e0
jmp 0x119e0
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x119ef
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x8320
jmp 0x119ef
jmp 0x119e0
jmp 0x119e0
jmp 0x119e0
jmp 0x119e0
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
callq 0x8240
movq %rbx, %rdi
callq 0x84a0
nop