LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/connect.cpp
// Function: Connect::_set_type(ISlice&)
void Connect::_set_type(ISlice &name) {
    if(name == "get") {
        type = RequestType::get;
    } else if (name == "get+") {
        type = RequestType::get_plus;
    } else if (name == "worker") {
        type = RequestType::worker;
    } else if (name == "async") {
        type = RequestType::async;
    } else if (name == "pub") {
        type = RequestType::pub;
    } else if (name == "result") {
        type = RequestType::result;
    } else if (name == "create") {
        type = RequestType::create;
    } else if (name == "delete") {
        type = RequestType::del;
    } else throw error::InvalidData();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc426(%rip), %rsi      # 0x181ac
movq %r14, %rdi
callq 0xd9a0
testb %al, %al
je 0xbd99
pushq $0x1
jmp 0xbe3b
leaq 0xc410(%rip), %rsi      # 0x181b0
movq %r14, %rdi
callq 0xd9a0
testb %al, %al
je 0xbdb3
pushq $0x2
jmp 0xbe3b
leaq 0xd8f0(%rip), %rsi      # 0x196aa
movq %r14, %rdi
callq 0xd9a0
testb %al, %al
je 0xbdca
pushq $0x3
jmp 0xbe3b
leaq 0xc3e4(%rip), %rsi      # 0x181b5
movq %r14, %rdi
callq 0xd9a0
testb %al, %al
je 0xbde1
pushq $0x4
jmp 0xbe3b
leaq 0xc3d3(%rip), %rsi      # 0x181bb
movq %r14, %rdi
callq 0xd9a0
testb %al, %al
je 0xbdf8
pushq $0x5
jmp 0xbe3b
leaq 0xc46f(%rip), %rsi      # 0x1826e
movq %r14, %rdi
callq 0xd9a0
testb %al, %al
je 0xbe0f
pushq $0x6
jmp 0xbe3b
leaq 0xc3a9(%rip), %rsi      # 0x181bf
movq %r14, %rdi
callq 0xd9a0
testb %al, %al
je 0xbe26
pushq $0x7
jmp 0xbe3b
leaq 0xc399(%rip), %rsi      # 0x181c6
movq %r14, %rdi
callq 0xd9a0
testb %al, %al
je 0xbe47
pushq $0x8
popq %rax
movl %eax, 0xc8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
movq %rax, %rdi
callq 0xd3f2
leaq 0x13e0f(%rip), %rsi     # 0x1fc70
leaq 0x26ae(%rip), %rdx      # 0xe516
movq %rbx, %rdi
callq 0xa450
movq %rax, %r14
movq %rbx, %rdi
callq 0xa200
movq %r14, %rdi
callq 0xa470
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/connect.cpp
// Function: HttpSender::done(ISlice&)
void HttpSender::done(ISlice &body) {
    if(conn->is_closed()) THROW("Trying to send to closed socket");

    int body_size = body.size();
    if(body_size == 0) {
        conn->send_buffer.add("Content-Length: 0\r\n\r\n");
    } else {
        conn->send_buffer.add("Content-Length: ");
        conn->send_buffer.add_number(body_size);
        conn->send_buffer.add("\r\n\r\n");
        conn->send_buffer.add(body);
    }
    conn->write_mode(true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
cmpl $-0x1, (%rdi)
je 0xbf09
movq %rsi, %r14
movslq 0x8(%rsi), %r15
addq $0x20, %rdi
testq %r15, %r15
je 0xbee8
leaq 0xc871(%rip), %rsi      # 0x18721
callq 0xd5ee
movq (%rbx), %rdi
addq $0x20, %rdi
movq %r15, %rsi
callq 0xd54a
movq (%rbx), %rdi
addq $0x20, %rdi
leaq 0xc84a(%rip), %rsi      # 0x1871c
callq 0xd5ee
movq (%rbx), %rdi
addq $0x20, %rdi
movq %r14, %rsi
callq 0xd300
jmp 0xbef4
leaq 0xc81c(%rip), %rsi      # 0x1870b
callq 0xd5ee
movq (%rbx), %rdi
pushq $0x1
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa8dc
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
leaq 0xc84a(%rip), %rsi      # 0x18765
leaq 0xc12f(%rip), %rdx      # 0x18051
leaq 0xc85c(%rip), %r8       # 0x18785
movq %rax, %rdi
movl $0x2eb, %ecx            # imm = 0x2EB
callq 0xe15c
leaq 0x13ddb(%rip), %rsi     # 0x1fd18
leaq 0x25d2(%rip), %rdx      # 0xe516
movq %rbx, %rdi
callq 0xa450
movq %rax, %r14
movq %rbx, %rdi
callq 0xa200
movq %r14, %rdi
callq 0xa470
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/connect.cpp
// Function: Connect::rpc_add()
void Connect::rpc_add() {
    Slice name(this->name);

    while(json.scan()) {
        if(json.key == "name") {
            json.decode_value(this->name);
            name = this->name;
        } else if(json.key == "info") {
            info = json.value;
        } else if(json.key == "option") {
            if(json.value == "no_id") {
                this->noid = true;
                this->fail_on_disconnect = true;
            } else if(json.value == "fail_on_disconnect") this->fail_on_disconnect = true;
            else {
                // TODO: Wrong option!!!
            }
        }
    }

    if(name.empty()) {
        worker_mode = false;
        this->send.status("400 No name")->done(-32602);
        if(server->log & 4) std::cout << ltime() << "No name for worker " << this << std::endl;
        return;
    };

    if(worker_mode) {
        this->noid = true;
        this->fail_on_disconnect = true;
    };

    loop->add_worker(name, this);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0xb8(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq 0x128(%rdi), %r15
leaq 0x138(%rdi), %r12
leaq 0x168(%rdi), %rbx
leaq 0xc35b(%rip), %r14      # 0x1837b
leaq 0xc328(%rip), %r13      # 0x1834f
movq %rdi, -0x30(%rbp)
movl 0xc0(%rdi), %eax
movl %eax, -0x34(%rbp)
movq 0xb8(%rdi), %rax
movq %rax, -0x48(%rbp)
movq %r15, %rdi
callq 0xe798
testb %al, %al
je 0xc0ec
movq %r15, %rdi
movq %r14, %rsi
callq 0xd9a0
movq %r15, %rdi
testb %al, %al
jne 0xc0da
movq %r13, %rsi
callq 0xd9a0
testb %al, %al
je 0xc07e
movl 0x8(%r12), %eax
movl %eax, 0x8(%rbx)
movq (%r12), %rax
movq %rax, (%rbx)
jmp 0xc03f
movq %r15, %rdi
leaq 0xc2cc(%rip), %rsi      # 0x18354
callq 0xd9a0
testb %al, %al
je 0xc03f
movq %r12, %rdi
leaq 0xc2c0(%rip), %rsi      # 0x1835b
callq 0xd9a0
testb %al, %al
je 0xc0b3
movq -0x30(%rbp), %rax
movw $0x101, 0xf0(%rax)      # imm = 0x101
jmp 0xc03f
movq %r12, %rdi
leaq 0xc2a4(%rip), %rsi      # 0x18361
callq 0xd9a0
testb %al, %al
je 0xc03f
movq -0x30(%rbp), %rax
movb $0x1, 0xf0(%rax)
jmp 0xc03f
movq -0x40(%rbp), %rsi
callq 0xeb98
movq -0x30(%rbp), %rdi
jmp 0xc02b
movl -0x34(%rbp), %edx
testl %edx, %edx
je 0xc124
movq -0x30(%rbp), %rcx
cmpb $0x1, 0xf3(%rcx)
jne 0xc109
movw $0x101, 0xf0(%rcx)      # imm = 0x101
movq 0x30(%rcx), %rdi
movq -0x48(%rbp), %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1219a
movq -0x30(%rbp), %rbx
movb $0x0, 0xf3(%rbx)
leaq 0x18(%rbx), %r14
leaq 0xc23a(%rip), %rsi      # 0x18374
movq %r14, %rdi
callq 0xb93e
movq %r14, %rdi
movl $0xffff80a6, %esi       # imm = 0xFFFF80A6
callq 0xb9b2
movq 0x48(%rbx), %rax
testb $0x4, 0x20(%rax)
jne 0xc168
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x16a89
movq 0x13e5c(%rip), %rdi     # 0x1ffd0
movq %rax, %rsi
callq 0xa2e0
leaq 0xc1fd(%rip), %rsi      # 0x18380
movq %rax, %rdi
callq 0xa2e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0xa230
movq %rax, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa160
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/connect.cpp
// Function: Connect::rpc_result(ISlice&)
void Connect::rpc_result(ISlice &id) {
    if(id.empty() && json.level == 0) {
        while(json.scan()) {
            if(json.key == "id") {
                id = json.value;
                break;
            }
        }
    }
    if(id.empty()) {
        if(server->log & 2) std::cout << ltime() << "400 no id for /rpc/result\n";
        this->send.status("400 No id")->done(-1);
    } else {
        loop->stat_result++;
        int r = loop->worker_result(id, this);
        if(r == 0) {
            this->send.status("200 OK")->done(1);
        } else if(r == -2) {
            if(server->log & 4) std::cout << ltime() << "499 Client is gone\n";
            this->send.status("499 Closed")->done(-1);
        } else {
            if(server->log & 2) std::cout << ltime() << "400 Wrong id for /rpc/result\n";
            this->send.status("400 Wrong id")->done(-1);
        }
    }
    status = Status::net;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rsi), %edx
pushq $-0x1
popq %r14
testl %edx, %edx
jne 0xc4d1
cmpl $0x0, 0x148(%rbx)
jne 0xc4c9
leaq 0x128(%rbx), %r12
leaq 0xbeb2(%rip), %r13      # 0x1834c
movq %r12, %rdi
callq 0xe798
testb %al, %al
je 0xc4c9
movq %r12, %rdi
movq %r13, %rsi
callq 0xd9a0
testb %al, %al
je 0xc49a
movl 0x140(%rbx), %eax
movl %eax, 0x8(%r15)
movq 0x138(%rbx), %rax
movq %rax, (%r15)
movl 0x8(%r15), %edx
testl %edx, %edx
je 0xc531
movq 0x30(%rbx), %rdi
incq 0x88(%rdi)
movq (%r15), %rsi
movq %rbx, %rcx
callq 0x12c96
testl %eax, %eax
je 0xc50a
cmpl $-0x2, %eax
jne 0xc517
movq 0x48(%rbx), %rax
leaq 0xbda2(%rip), %r15      # 0x1829d
testb $0x4, 0x20(%rax)
je 0xc568
leaq 0xbd81(%rip), %r12      # 0x18289
jmp 0xc549
pushq $0x1
popq %r14
leaq 0xbd24(%rip), %r15      # 0x18239
jmp 0xc568
movq 0x48(%rbx), %rax
leaq 0xbe20(%rip), %r15      # 0x18342
testb $0x2, 0x20(%rax)
je 0xc568
leaq 0xbdf5(%rip), %r12      # 0x18324
jmp 0xc549
movq 0x48(%rbx), %rax
leaq 0xbdde(%rip), %r15      # 0x1831a
testb $0x2, 0x20(%rax)
je 0xc568
leaq 0xbdb6(%rip), %r12      # 0x182ff
callq 0x16a89
movq 0x13a7b(%rip), %rdi     # 0x1ffd0
movq %rax, %rsi
callq 0xa2e0
movq %rax, %rdi
movq %r12, %rsi
callq 0xa2e0
leaq 0x18(%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xb93e
movq %r12, %rdi
movl %r14d, %esi
callq 0xb9b2
andl $0x0, 0xcc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/connect.cpp
// Function: Connect::create_queue(Slice)
void Connect::create_queue(Slice name) {
    if(name.empty()) {
        this->send.status("400 Wrong queue")->done(-32600);
        return;
    }
    if(name.ptr()[0] == '/') name.remove(1);
    server->get_queue(name, true);
    this->send.status("200 OK")->done(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testl %edx, %edx
je 0xc5d3
cmpb $0x2f, (%rsi)
pushq $0x1
popq %r14
jne 0xc5be
testl %edx, %edx
pushq $0x1
popq %rax
cmovlel %edx, %eax
cltq
addq %rax, %rsi
subl %eax, %edx
movq 0x48(%rbx), %rdi
movl %r14d, %ecx
callq 0x104d6
leaq 0xbc68(%rip), %rsi      # 0x18239
jmp 0xc5e0
movl $0xffff80a8, %r14d      # imm = 0xFFFF80A8
leaq 0xc152(%rip), %rsi      # 0x18732
addq $0x18, %rbx
movq %rbx, %rdi
callq 0xb93e
movq %rbx, %rdi
movl %r14d, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0xb9b2
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/connect.cpp
// Function: Connect::delete_queue(Slice)
void Connect::delete_queue(Slice name) {
    if(name.empty()) {
        this->send.status("400 Wrong queue")->done(-32600);
        return;
    }
    if(name.ptr()[0] == '/') name.remove(1);
    server->delete_queue(name);
    this->send.status("200 OK")->done(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testl %edx, %edx
je 0xc634
cmpb $0x2f, (%rsi)
jne 0xc61e
testl %edx, %edx
pushq $0x1
popq %rax
cmovlel %edx, %eax
cltq
addq %rax, %rsi
subl %eax, %edx
pushq $0x1
popq %r14
movq 0x48(%rbx), %rdi
callq 0x10648
leaq 0xbc07(%rip), %rsi      # 0x18239
jmp 0xc641
movl $0xffff80a8, %r14d      # imm = 0xFFFF80A8
leaq 0xc0f1(%rip), %rsi      # 0x18732
addq $0x18, %rbx
movq %rbx, %rdi
callq 0xb93e
movq %rbx, %rdi
movl %r14d, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0xb9b2
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/connect.cpp
// Function: HttpSender::header(char const*, ISlice const&)
HttpSender *HttpSender::header(const char *key, const ISlice &value) {
    conn->send_buffer.add(key);
    conn->send_buffer.add(": ");
    conn->send_buffer.add(value);
    conn->send_buffer.add("\r\n");
    return this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x20, %rdi
callq 0xd5ee
movq (%rbx), %rdi
addq $0x20, %rdi
leaq 0xc632(%rip), %rsi      # 0x19417
callq 0xd5ee
movq (%rbx), %rdi
addq $0x20, %rdi
movq %r14, %rsi
callq 0xd300
movq (%rbx), %rdi
addq $0x20, %rdi
leaq 0xb917(%rip), %rsi      # 0x1871e
callq 0xd5ee
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: Buffer::remove_left(int)
void remove_left(int n) {
        if(n <= 0) return;
        if(_size <= n) {
            _size = 0;
        } else {
            _size -= n;
            memmove(_ptr, &_ptr[n], _size);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %esi, %esi
jle 0xd1f1
movl 0x8(%rdi), %eax
subl %esi, %eax
jle 0xd1ed
movl %eax, 0x8(%rdi)
movq (%rdi), %rdi
movl %esi, %esi
addq %rdi, %rsi
movslq %eax, %rdx
popq %rbp
jmp 0xa420
andl $0x0, 0x8(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: Buffer::add(char const*, int)
void add(const char *buf, int size) {
        if(buf == NULL) throw error::NoData("Buffer.add buf == NULL");
        resize(_size + size);
        memmove(&_ptr[_size], buf, size);
        _size += size;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xd292
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rdi), %esi
addl %edx, %esi
callq 0xd7a2
movslq 0x8(%rbx), %rdi
addq (%rbx), %rdi
movslq %r15d, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0xa420
addl %r15d, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
leaq 0xb758(%rip), %rsi      # 0x189fc
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xd8bc
leaq 0x129ce(%rip), %rsi     # 0x1fc88
leaq 0x1255(%rip), %rdx      # 0xe516
movq %rbx, %rdi
callq 0xa450
movq %rax, %r14
movq %rbx, %rdi
callq 0xa200
movq %r14, %rdi
callq 0xa470
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: Slice::pop(int)
Slice pop(int len) {
        Slice r = get(len);
        _ptr += len;
        _size -= len;
        return r;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0xd914
movslq %ebx, %rcx
addq %rcx, (%r14)
subl %ecx, 0x8(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: Slice::pop_line()
Slice pop_line() {
        for(int i=0;i<size();i++) {
            if(_ptr[i] != '\n') continue;
            return pop(i + 1);
        }
        return Slice(NULL, 0);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %eax
movq (%rdi), %rcx
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
xorl %esi, %esi
cmpq %rsi, %rax
je 0xd365
cmpb $0xa, (%rcx,%rsi)
je 0xd369
incq %rsi
jmp 0xd355
xorl %eax, %eax
jmp 0xd370
incl %esi
callq 0xd314
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: Slice::rstrip()
void rstrip() {
        int i=_size-1;
        for(;i>=0;i--) {
            if(_ptr[i] == ' ' || _ptr[i] == '\n' || _ptr[i] == '\r') continue;
            break;
        }
        _size = i + 1;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %eax
movq (%rdi), %rdx
movl %eax, %ecx
sarl $0x1f, %ecx
andl %eax, %ecx
movabsq $0x100002400, %rsi      # imm = 0x100002400
testl %eax, %eax
jle 0xd3aa
movzbl -0x1(%rdx,%rax), %r8d
cmpq $0x20, %r8
ja 0xd3a8
btq %r8, %rsi
jae 0xd3a8
decq %rax
jmp 0xd38d
movl %eax, %ecx
movl %ecx, 0x8(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: ISlice::starts_with_lc(char const*)
bool starts_with_lc(const char *s) {
        // lower case
        int i = 0;
        while(*s) {
            if(i >= _size) return false;
            char a = _ptr[i];
            if(a >= 'A' && a <= 'Z') a += 'a' - 'A';
            if(*s != a) return false;
            i++;
            s++;
        }
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x8(%rdi), %rcx
movq (%rdi), %rdx
xorl %edi, %edi
movb (%rsi,%rdi), %r8b
testb %r8b, %r8b
sete %al
je 0xd463
cmpq %rcx, %rdi
jge 0xd463
movzbl (%rdx,%rdi), %eax
leal -0x41(%rax), %r9d
movl %eax, %r10d
orb $0x20, %r10b
cmpb $0x1a, %r9b
movzbl %r10b, %r9d
cmovael %eax, %r9d
incq %rdi
cmpb %r9b, %r8b
je 0xd42d
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: ISlice::atoi() const
i64 atoi() const {
        if(!size()) throw error::NoData();
        char *p = ptr();
        char *end = p + size();
        bool negative = false;
        if(*p == '-') {
            negative = true;
            if(size() < 2) throw error::InvalidData();
            p++;
        }
        i64 value = 0;
        for(;p < end; p++) {
            char a = *p - '0';
            if(a < 0 || a > 9) throw error::InvalidData();
            value = value * 10 + a;
        }
        return negative?-value:value;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movslq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0xd4f2
movq (%rdi), %rax
movb (%rax), %cl
movq %rax, %rdx
cmpb $0x2d, %cl
jne 0xd490
cmpl $0x1, %esi
jle 0xd50e
leaq 0x1(%rax), %rdx
addq %rsi, %rax
xorl %esi, %esi
cmpq %rax, %rdx
jae 0xd4b7
movb (%rdx), %dil
addb $-0x30, %dil
cmpb $0xa, %dil
jae 0xd4c9
imulq $0xa, %rsi, %r8
movzbl %dil, %esi
addq %r8, %rsi
incq %rdx
jmp 0xd495
movq %rsi, %rax
negq %rax
cmpb $0x2d, %cl
cmovneq %rsi, %rax
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
movq %rax, %rdi
callq 0xd3f2
leaq 0x1278d(%rip), %rsi     # 0x1fc70
leaq 0x102c(%rip), %rdx      # 0xe516
movq %rbx, %rdi
callq 0xa450
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
movq %rax, %rdi
callq 0xd9da
leaq 0x1277c(%rip), %rsi     # 0x1fc88
jmp 0xd4e3
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
movq %rax, %rdi
callq 0xd3f2
jmp 0xd4dc
jmp 0xd527
jmp 0xd527
movq %rax, %r14
movq %rbx, %rdi
callq 0xa200
movq %r14, %rdi
callq 0xa470
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: Buffer::add_number(long)
void add_number(i64 n) {
        resize(_size + 20);

        char s[20];
        int d;
        int i=19;
        bool negative = false;
        if(n == 0) s[i--] = '0';
        else if(n < 0) {
            n = -n;
            negative = true;
        }
        while(n) {
            d = n % 10;
            s[i--] = d + '0';
            n = n / 10;
        }
        if(negative) s[i--] = '-';
        add(&s[i + 1], 19 - i);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rdi), %esi
addl $0x14, %esi
callq 0xd7a2
testq %r14, %r14
je 0xd581
movq %r14, %rsi
shrq $0x3f, %rsi
movq %r14, %rax
negq %rax
cmovsq %r14, %rax
pushq $0x13
popq %rcx
jmp 0xd58c
movb $0x30, -0x1d(%rbp)
pushq $0x12
popq %rcx
xorl %eax, %eax
xorl %esi, %esi
movq %rcx, %rdi
shlq $0x20, %rdi
pushq $0xa
popq %r8
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
testq %rax, %rax
je 0xd5ba
xorl %edx, %edx
divq %r8
orb $0x30, %dl
movb %dl, -0x30(%rbp,%rcx)
decq %rcx
addq %r9, %rdi
jmp 0xd5a1
testb %sil, %sil
je 0xd5ca
decl %ecx
sarq $0x20, %rdi
movb $0x2d, -0x30(%rbp,%rdi)
movslq %ecx, %rax
leaq -0x30(%rbp), %rcx
leaq (%rax,%rcx), %rsi
incq %rsi
pushq $0x13
popq %rdx
subl %eax, %edx
movq %rbx, %rdi
callq 0xd24c
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: Buffer::add(char const*)
void add(const char *i) {
        while(*i != 0) {
            if(_size >= _cap) resize(_size + 1);
            _ptr[_size++] = *i;
            i++;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb (%rbx), %al
testb %al, %al
je 0xd630
movl 0x8(%r14), %esi
cmpl 0xc(%r14), %esi
jl 0xd61b
incl %esi
movq %r14, %rdi
callq 0xd7a2
movb (%rbx), %al
movl 0x8(%r14), %esi
movq (%r14), %rcx
leal 0x1(%rsi), %edx
movl %edx, 0x8(%r14)
movslq %esi, %rdx
movb %al, (%rcx,%rdx)
incq %rbx
jmp 0xd5fb
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: ISlice::as_string[abi:cxx11](int) const
std::string as_string(int _default=-1) const {
        std::string s;
        if(valid()) {
            s.append(ptr(), size());
        } else {
            if(_default == 1) s.append("<empty>");
            else if(_default != 0) throw error::NoData();
        }
        return s;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %rax
movb $0x0, 0x10(%rdi)
movq (%rsi), %rsi
testq %rsi, %rsi
je 0xd66c
movslq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0xa060
jmp 0xd684
testl %edx, %edx
je 0xd684
cmpl $0x1, %edx
jne 0xd692
leaq 0xb3d8(%rip), %rsi      # 0x18a54
movq %rbx, %rdi
callq 0xa4a0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %r14
movq %rax, %rdi
callq 0xd9da
leaq 0x125dc(%rip), %rsi     # 0x1fc88
leaq 0xe63(%rip), %rdx       # 0xe516
movq %r14, %rdi
callq 0xa450
movq %rax, %r15
movq %r14, %rdi
callq 0xa200
jmp 0xd6cb
movq %rax, %r15
movq %rbx, %rdi
callq 0xa130
movq %r15, %rdi
callq 0xa470
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: Buffer::resize(int)
void resize(int capacity) {
        if(_ptr == NULL) {
            _cap = _get_cap(capacity);
            _ptr = (char*)_malloc(_cap);
            if(_ptr == NULL) THROW("No memory");
        } else if(capacity > _cap) {
            _cap = _get_cap(capacity);
            char *p = (char*)_realloc(_ptr, _cap);
            if(!p) THROW("Realloc error");
            _ptr = p;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0xd7d7
cmpl %esi, 0xc(%rbx)
jge 0xd7f1
movq %rbx, %rdi
callq 0xda08
movl %eax, 0xc(%rbx)
movq (%rbx), %rdi
movslq %eax, %rsi
callq 0xa440
testq %rax, %rax
je 0xd825
movq %rax, (%rbx)
jmp 0xd7f1
movq %rbx, %rdi
callq 0xda08
movl %eax, 0xc(%rbx)
movl %eax, %edi
callq 0xfb14
movq %rax, (%rbx)
testq %rax, %rax
je 0xd7f6
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
leaq 0xb25b(%rip), %rsi      # 0x18a63
leaq 0xb21a(%rip), %rdx      # 0x18a29
leaq 0xb257(%rip), %r8       # 0x18a6d
movq %rax, %rdi
movl $0xe8, %ecx
callq 0xe15c
jmp 0xd852
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
leaq 0xb24f(%rip), %rsi      # 0x18a86
leaq 0xb1eb(%rip), %rdx      # 0x18a29
leaq 0xb228(%rip), %r8       # 0x18a6d
movq %rax, %rdi
movl $0xec, %ecx
callq 0xe15c
leaq 0x124bf(%rip), %rsi     # 0x1fd18
leaq 0xcb6(%rip), %rdx       # 0xe516
movq %rbx, %rdi
callq 0xa450
jmp 0xd86a
movq %rax, %r14
movq %rbx, %rdi
callq 0xa200
movq %r14, %rdi
callq 0xa470
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: ISlice::equal(char const*) const
bool equal(const char *s) const {
        int i = 0;
        while(*s) {
            if(i >= _size) return false;
            if(*s != _ptr[i]) return false;
            i++;
            s++;
        }
        return i == _size;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %eax
movq (%rdi), %rdx
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edi
cmovgl %eax, %edi
movb (%rsi,%rcx), %r8b
testb %r8b, %r8b
je 0xd9d3
cmpq %rcx, %rdi
je 0xd9cf
cmpb (%rdx,%rcx), %r8b
jne 0xd9cf
incq %rcx
jmp 0xd9b6
xorl %eax, %eax
jmp 0xd9d8
cmpl %ecx, %eax
sete %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: Buffer::_get_cap(int)
int _get_cap(int size) {
        int cap = 16;
        int step = 16;
        while(cap < size) {
            cap += step;
            if(step < 4096) {
                step *= 2;
            }
        }
        return cap;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x10, %eax
movl %eax, %edx
cmpl %esi, %eax
jge 0xda26
addl %edx, %eax
cmpl $0x1000, %edx           # imm = 0x1000
setl %cl
shll %cl, %edx
jmp 0xda13
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: ISlice::compare(ISlice const&) const
int compare(const ISlice &s) const {
        int i = 0;
        int d;
        for(; i<size(); i++) {
            if(i >= s.size()) return 1;
            d = ptr()[i] - s.ptr()[i];
            if(d) return d;
        }
        if(i < s.size()) return -1;
        return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %ecx
movl 0x8(%rsi), %edx
movq (%rdi), %rdi
movq (%rsi), %rsi
xorl %r8d, %r8d
testl %ecx, %ecx
cmovlel %r8d, %ecx
testl %edx, %edx
movl $0x0, %r9d
cmovgl %edx, %r9d
movl $0x1, %r10d
cmpq %r8, %rcx
je 0xde43
cmpq %r8, %r9
je 0xde4e
movsbl (%rdi,%r8), %eax
movsbl (%rsi,%r8), %r11d
incq %r8
subl %r11d, %eax
je 0xde25
jmp 0xde51
xorl %eax, %eax
cmpl %edx, %ecx
setl %al
negl %eax
jmp 0xde51
movl %r10d, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/exception.cpp
// Function: Exception::print(char const*) const
void Exception::print(const char *msg) const {
        std::cout << ltime() << msg << " '" << _reason << "'";
        if(_file) std::cout << ", file " << _file << ":" << _line << " " << _func << std::endl;
        else std::cout << std::endl;
        std::cout << _trace->ptr();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x16a89
movq 0x11c26(%rip), %r14     # 0x1ffd0
movq %r14, %rdi
movq %rax, %rsi
callq 0xa2e0
movq %rax, %rdi
movq %r15, %rsi
callq 0xa2e0
leaq 0xa73d(%rip), %rsi      # 0x18b04
movq %rax, %rdi
callq 0xa2e0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0xa2e0
leaq 0xa723(%rip), %rsi      # 0x18b05
movq %rax, %rdi
callq 0xa2e0
cmpq $0x0, 0x10(%rbx)
je 0xe448
movq 0x11bd8(%rip), %rdi     # 0x1ffd0
leaq 0xa708(%rip), %rsi      # 0x18b07
callq 0xa2e0
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0xa2e0
leaq 0x9fdc(%rip), %rsi      # 0x183f3
movq %rax, %rdi
callq 0xa2e0
movl 0x18(%rbx), %esi
movq %rax, %rdi
callq 0xa460
leaq 0xa27b(%rip), %rsi      # 0x186ac
movq %rax, %rdi
callq 0xa2e0
movq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0xa2e0
movq %rax, %r14
movq %r14, %rdi
callq 0xa160
movq 0x28(%rbx), %rax
movq (%rax), %rsi
movq 0x11b72(%rip), %rdi     # 0x1ffd0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa2e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/exception.cpp
// Function: fatal_error(int)
void fatal_error(int sig) {
        Buffer trace;
        get_traceback(trace);
        std::cerr << "Error: signal " << sig << std::endl;
        std::cerr << trace.ptr() << std::endl;
        exit(1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
xorps %xmm0, %xmm0
leaq -0x20(%rbp), %rdi
movaps %xmm0, (%rdi)
callq 0xe1b1
movq 0x11b42(%rip), %rdi     # 0x1fff0
leaq 0xa65a(%rip), %rsi      # 0x18b0f
callq 0xa2e0
movq %rax, %rdi
movl %ebx, %esi
callq 0xa460
movq %rax, %rdi
callq 0xa160
movq -0x20(%rbp), %rsi
movq 0x11b19(%rip), %rdi     # 0x1fff0
callq 0xa2e0
movq %rax, %rdi
callq 0xa160
pushq $0x1
popq %rdi
callq 0xa350
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0xd6dc
movq %rbx, %rdi
callq 0xa470
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: Slice::split_left(char)
Slice split_left(char a) {
        for(int i=0;i<size();++i) {
            if(_ptr[i] != a) continue;
            Slice result = Slice(_ptr, i);
            _size -= i + 1;
            _ptr += i + 1;
            return result;
        }
        return pop(_size);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %ecx
movl 0x8(%rdi), %esi
movq (%rdi), %rax
xorl %edx, %edx
testl %esi, %esi
movl $0x0, %r8d
cmovgl %esi, %r8d
cmpq %rdx, %r8
je 0xe57b
cmpb %cl, (%rax,%rdx)
je 0xe582
incq %rdx
jmp 0xe56c
callq 0xd314
jmp 0xe595
movl %edx, %ecx
notl %ecx
addl %esi, %ecx
movl %ecx, 0x8(%rdi)
leaq (%rax,%rdx), %rcx
incq %rcx
movq %rcx, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/json.cpp
// Function: json::escape(Buffer&, int)
void json::escape(Buffer &s, int start) {
    int col = 0;
    for(int i = start;i<s.size();i++) {
        if(s.ptr()[i] == '"') col++;
    }
    if(!col) return;

    s.resize(0, s.size() + col);
    char *ptr = s.ptr();
    for(int i=s.size() -1;i>=start;i--) {
        char a = ptr[i - col];
        ptr[i] = a;
        if(a == '"') {
            i--;
            ptr[i] = '\\';
            col--;
            if(!col) break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x8(%rdi), %r15
movq (%rdi), %rax
movslq %esi, %r14
xorl %r13d, %r13d
movq %r14, %rcx
cmpq %r15, %rcx
jge 0xe72c
xorl %edx, %edx
cmpb $0x22, (%rax,%rcx)
sete %dl
addl %edx, %r13d
incq %rcx
jmp 0xe716
testl %r13d, %r13d
je 0xe788
addl %r13d, %r15d
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xd7a2
movl %r15d, 0x8(%rbx)
movq (%rbx), %rax
movl %r13d, %ecx
leaq -0x1(%rax), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
movslq %r15d, %r8
leal -0x1(%r8), %r15d
leaq (%rsi,%r12), %rdi
cmpq %r14, %r8
jle 0xe788
movb (%rdi,%r8), %r9b
movb %r9b, (%rdx,%r8)
decq %r8
decl %r15d
cmpb $0x22, %r9b
jne 0xe760
movslq %r15d, %rdi
movb $0x5c, (%rax,%rdi)
incq %r12
decq %rcx
jne 0xe755
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/json.cpp
// Function: Json::scan()
bool Json::scan() {
    if(_data.empty()) return false;
    strip();
    if(_status == 0) {
        if(next() != '{') throw error::InvalidData();
        strip();
        if(next() == '}') return false;
        index--;
    } else if(_status == 1) {
        char a = next();
        if(a == '}') return false;
        if(a != ',') throw error::InvalidData();
    }

    strip();
    key = read_string();
    strip();
    if(next() != ':') throw error::InvalidData();
    strip();
    char a = next();
    index--;

    if(a == '"') value = read_string();
    else if(a == '{' || a == '[') value = read_object();
    else value = read_value();

    _status = 1;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0x0, 0x30(%rdi)
je 0xe7fa
movq %rdi, %rbx
callq 0xe8de
movl 0x24(%rbx), %eax
cmpl $0x1, %eax
je 0xe7e2
testl %eax, %eax
jne 0xe7fe
movq %rbx, %rdi
callq 0xec7e
cmpb $0x7b, %al
jne 0xe888
movq %rbx, %rdi
callq 0xe8de
movq %rbx, %rdi
callq 0xec7e
cmpb $0x7d, %al
je 0xe7fa
decl 0x38(%rbx)
jmp 0xe7fe
movq %rbx, %rdi
callq 0xec7e
cmpb $0x2c, %al
je 0xe7fe
movzbl %al, %eax
cmpl $0x7d, %eax
jne 0xe89d
xorl %eax, %eax
jmp 0xe86e
movq %rbx, %rdi
callq 0xe8de
movq %rbx, %rdi
callq 0xe960
movq %rax, (%rbx)
movl %edx, 0x8(%rbx)
movq %rbx, %rdi
callq 0xe8de
movq %rbx, %rdi
callq 0xec7e
cmpb $0x3a, %al
jne 0xe873
movq %rbx, %rdi
callq 0xe8de
movq %rbx, %rdi
callq 0xec7e
decl 0x38(%rbx)
cmpb $0x22, %al
jne 0xe849
movq %rbx, %rdi
callq 0xe960
jmp 0xe85e
andb $-0x21, %al
movq %rbx, %rdi
cmpb $0x5b, %al
jne 0xe859
callq 0xea0e
jmp 0xe85e
callq 0xea70
movq %rax, 0x10(%rbx)
movl %edx, 0x18(%rbx)
movl $0x1, 0x24(%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
movq %rax, %rdi
callq 0xd3f2
jmp 0xe8b0
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
movq %rax, %rdi
callq 0xd3f2
jmp 0xe8b0
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
movq %rax, %rdi
callq 0xd3f2
leaq 0x113b9(%rip), %rsi     # 0x1fc70
leaq -0x3a8(%rip), %rdx      # 0xe516
movq %rbx, %rdi
callq 0xa450
jmp 0xe8ca
jmp 0xe8ca
movq %rax, %r14
movq %rbx, %rdi
callq 0xa200
movq %r14, %rdi
callq 0xa470
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/json.cpp
// Function: Json::strip()
void Json::strip() {
    while(index < _data.size()) {
        char a = _data.ptr()[index];
        if(a == ' ' || a == '\n' || a == '\r' || a == '\t') {
            index++;
            continue;
        }
        return;
    }
    throw error::InvalidData();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movslq 0x30(%rdi), %rax
movslq 0x38(%rdi), %rcx
movq 0x28(%rdi), %rdx
leal 0x1(%rcx), %esi
movabsq $0x100002600, %r8       # imm = 0x100002600
cmpq %rax, %rcx
jge 0xe923
movzbl (%rdx,%rcx), %r9d
cmpq $0x20, %r9
ja 0xe91e
btq %r9, %r8
jae 0xe91e
incq %rcx
movl %esi, 0x38(%rdi)
incl %esi
jmp 0xe8fe
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
movq %rax, %rdi
callq 0xd3f2
leaq 0x11333(%rip), %rsi     # 0x1fc70
leaq -0x42e(%rip), %rdx      # 0xe516
movq %rbx, %rdi
callq 0xa450
movq %rax, %r14
movq %rbx, %rdi
callq 0xa200
movq %r14, %rdi
callq 0xa470
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/json.cpp
// Function: Json::read_string()
Slice Json::read_string() {
    if(next() != '"') throw error::InvalidData();
    int start = index;
    const char *ptr = _data.ptr();
    for(;index < _data.size();index++) {
        if(ptr[index] == '"' && ptr[index-1] != '\\') {
            index++;
            return Slice(&ptr[start], index - start - 1);
        }
    }
    throw error::InvalidData();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0xec7e
cmpb $0x22, %al
jne 0xe9e3
movslq 0x38(%rbx), %rcx
movq 0x28(%rbx), %rax
movslq 0x30(%rbx), %rsi
leal 0x1(%rcx), %edi
xorl %edx, %edx
movq %rcx, %r8
cmpq %rsi, %r8
jge 0xe9ba
cmpb $0x22, (%rax,%r8)
jne 0xe99b
cmpb $0x5c, -0x1(%rax,%r8)
jne 0xe9aa
incq %r8
leal (%rdi,%rdx), %r9d
movl %r9d, 0x38(%rbx)
incl %edx
jmp 0xe987
leal (%rcx,%rdx), %esi
incl %esi
movl %esi, 0x38(%rbx)
addq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
movq %rax, %rdi
callq 0xd3f2
leaq 0x1129c(%rip), %rsi     # 0x1fc70
leaq -0x4c5(%rip), %rdx      # 0xe516
movq %rbx, %rdi
callq 0xa450
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
movq %rax, %rdi
callq 0xd3f2
jmp 0xe9cd
jmp 0xe9fa
movq %rax, %r14
movq %rbx, %rdi
callq 0xa200
movq %r14, %rdi
callq 0xa470
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/json.cpp
// Function: Json::read_object()
Slice Json::read_object() {
    int lvl = 0;
    int start = index;
    while(true) {
        char a = next();
        if(a == '{' || a == '[') {
            lvl++;
        } else if(a == '}' || a == ']') {
            lvl--;
            if(lvl==0) return Slice(&_data.ptr()[start], index - start);
        } else if(a == '"') {
            index--;
            read_string();
            continue;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x38(%rdi), %r14
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0xec7e
movl %eax, %ecx
andb $-0x21, %cl
cmpb $0x5d, %cl
je 0xea52
movzbl %cl, %ecx
cmpl $0x5b, %ecx
je 0xea4d
cmpb $0x22, %al
jne 0xea22
decl 0x38(%rbx)
movq %rbx, %rdi
callq 0xe960
jmp 0xea22
incl %r15d
jmp 0xea22
decl %r15d
jne 0xea22
movq %r14, %rax
addq 0x28(%rbx), %rax
movl 0x38(%rbx), %edx
subl %r14d, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/json.cpp
// Function: Json::read_value()
Slice Json::read_value() {
    // 0-9, null, true, false
    int start = index;
    char a;
    bool is_number = true;
    while(true) {
        a = next();
        if(a == ' ' || a == ',' || a == '}' || a == '\n' || a == '\r') break;
        if(a < '0' || a > '9') is_number = false;
        if(!is_number && (index - start > 5)) throw error::InvalidData();
    }
    index--;
    Slice result(&_data.ptr()[start], index - start);
    if(!is_number) {
        if(!(result == "null" || result == "true" || result == "false")) throw error::InvalidData();
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movslq 0x38(%rdi), %r15
movb $0x1, %r14b
xorl %r12d, %r12d
movabsq $0x100100002400, %r13   # imm = 0x100100002400
movq %rbx, %rdi
callq 0xec7e
movzbl %al, %ecx
cmpb $0x2c, %cl
ja 0xeaae
btq %rcx, %r13
jb 0xeaf9
cmpl $0x7d, %ecx
je 0xeaf9
addb $-0x3a, %al
cmpb $-0xa, %al
movzbl %r14b, %r14d
cmovbl %r12d, %r14d
testb $0x1, %r14b
jne 0xea98
movl 0x38(%rbx), %eax
subl %r15d, %eax
cmpl $0x6, %eax
jl 0xea98
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %r14
movq %rax, %rdi
callq 0xd3f2
leaq 0x11186(%rip), %rsi     # 0x1fc70
leaq -0x5db(%rip), %rdx      # 0xe516
movq %r14, %rdi
callq 0xa450
movl 0x38(%rbx), %eax
decl %eax
movl %eax, 0x38(%rbx)
movq %r15, %rcx
addq 0x28(%rbx), %rcx
subl %r15d, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x30(%rbp)
testb $0x1, %r14b
jne 0xeb54
leaq 0xaa17(%rip), %rsi      # 0x19536
leaq -0x38(%rbp), %rdi
callq 0xd9a0
testb %al, %al
jne 0xeb54
leaq 0xa01d(%rip), %rsi      # 0x18b50
leaq -0x38(%rbp), %rdi
callq 0xd9a0
testb %al, %al
jne 0xeb54
leaq 0x964c(%rip), %rsi      # 0x18193
leaq -0x38(%rbp), %rdi
callq 0xd9a0
testb %al, %al
je 0xeb6a
movq -0x38(%rbp), %rax
movl -0x30(%rbp), %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %r14
movq %rax, %rdi
callq 0xd3f2
jmp 0xeae3
jmp 0xeb84
movq %rax, %rbx
movq %r14, %rdi
callq 0xa200
movq %rbx, %rdi
callq 0xa470
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/buffer.h
// Function: ISlice::hextoi() const
i64 hextoi() const {
        if(!size()) throw error::NoData();
        i64 value = 0;
        char *p = ptr();
        char *end = p + size();
        for(;p < end; p++) {
           char a = *p;
           if(a >= '0' && a <= '9') value = (value << 4) + a - '0';
           else if(a >= 'A' && a <= 'F') value = (value << 4) + a - 'A' + 10;
           else if(a >= 'a' && a <= 'f') value = (value << 4) + a - 'a' + 10;
           else throw error::InvalidData();
        }
        return value;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movslq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0xec4d
movq (%rdi), %rdx
addq %rdx, %rcx
xorl %eax, %eax
pushq $-0x30
popq %rsi
pushq $-0x37
popq %rdi
pushq $-0x57
popq %r8
cmpq %rcx, %rdx
jae 0xec1f
movzbl (%rdx), %r9d
leal -0x30(%r9), %r11d
movq %rsi, %r10
cmpb $0xa, %r11b
jb 0xec10
leal -0x41(%r9), %r11d
movq %rdi, %r10
cmpb $0x6, %r11b
jb 0xec10
leal -0x61(%r9), %r11d
movq %r8, %r10
cmpb $0x6, %r11b
jae 0xec24
shlq $0x4, %rax
addq %r10, %rax
addq %r9, %rax
incq %rdx
jmp 0xebe0
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
movq %rax, %rdi
callq 0xd3f2
leaq 0x11032(%rip), %rsi     # 0x1fc70
leaq -0x72f(%rip), %rdx      # 0xe516
movq %rbx, %rdi
callq 0xa450
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
movq %rax, %rdi
callq 0xd9da
leaq 0x11021(%rip), %rsi     # 0x1fc88
jmp 0xec3e
jmp 0xec6b
movq %rax, %r14
movq %rbx, %rdi
callq 0xa200
movq %r14, %rdi
callq 0xa470
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/mapper.cpp
// Function: Mapper::Mapper(Server*)
Mapper::Mapper(Server *server) {
    this->server = server;
    _cap = 4;
    _size = 1;
    char *buf = (char*)_malloc(_cap * sizeof(Step));
    memset(buf, 0, _cap * sizeof(Step));
    abuf = buf;
    buf_t = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
andq $0x0, 0x28(%rdi)
movups %xmm0, 0x8(%rdi)
movq %rsi, (%rdi)
movabsq $0x400000001, %rax      # imm = 0x400000001
movq %rax, 0x40(%rdi)
movl $0x310, %edi            # imm = 0x310
callq 0xfb14
movq %rax, %r14
movslq 0x44(%rbx), %rax
imulq $0xc4, %rax, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0xa1a0
xchgq %r14, 0x30(%rbx)
andq $0x0, 0x38(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/mapper.cpp
// Function: Mapper::_next()
u16 Mapper::_next() {
    _size += 1;
    if(_size <= _cap) return _size;

    int old_size = sizeof(Step) * _cap;
    if(_cap >= 512) _cap += 256;
    else _cap *= 2;

    if(buf_t) {
        char *p = (char*)_realloc(buf_t, _cap * sizeof(Step));
        if(!p) THROW("Realloc error");
        buf_t = p;
    } else {
        buf_t = (char*)_malloc(_cap * sizeof(Step));
        memcpy(buf_t, abuf.load(), old_size);
    };
    memset(&buf_t[old_size], 0, sizeof(Step) * _cap - old_size);
    return _size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl 0x40(%rdi), %edx
movl 0x44(%rdi), %ecx
leal 0x1(%rdx), %eax
movl %eax, 0x40(%rdi)
cmpl %ecx, %edx
jl 0xf69e
movq %rdi, %rbx
imull $0xc4, %ecx, %r14d
leal (%rcx,%rcx), %edx
leal 0x100(%rcx), %eax
cmpl $0x200, %ecx            # imm = 0x200
cmovll %edx, %eax
movl %eax, 0x44(%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0xf65e
cltq
imulq $0xc4, %rax, %rsi
callq 0xa440
testq %rax, %rax
je 0xf6a3
movq %rax, %rdi
movq %rax, 0x38(%rbx)
movslq %r14d, %r14
jmp 0xf683
imull $0xc4, %eax, %edi
callq 0xfb14
movq %rax, 0x38(%rbx)
movq 0x30(%rbx), %rsi
movslq %r14d, %r14
movq %rax, %rdi
movq %r14, %rdx
callq 0xa250
movq 0x38(%rbx), %rdi
addq %r14, %rdi
movslq 0x44(%rbx), %rax
imulq $0xc4, %rax, %rdx
subq %r14, %rdx
xorl %esi, %esi
callq 0xa1a0
movl 0x40(%rbx), %eax
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
leaq 0x93d1(%rip), %rsi      # 0x18a86
leaq 0x9ae0(%rip), %rdx      # 0x1919c
leaq 0x9ae8(%rip), %r8       # 0x191ab
pushq $0x1b
popq %rcx
movq %rax, %rdi
callq 0xe15c
leaq 0x10643(%rip), %rsi     # 0x1fd18
leaq -0x11c6(%rip), %rdx     # 0xe516
movq %rbx, %rdi
callq 0xa450
movq %rax, %r14
movq %rbx, %rdi
callq 0xa200
movq %r14, %rdi
callq 0xa470
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/mapper.cpp
// Function: Mapper::add(ISlice, unsigned short)
void Mapper::add(ISlice name, u16 value) {
    mutex.lock();
    int i = 0;
    int next;
    int nstep = 1;
    Step *step = get_step_t(nstep);
    for(;;i++) {
        if(i >= name.size()) {
            step->end = value;
            break;
        }
        u16 a = name.ptr()[i];

        if(a == '*') {
            step->std = value;
            break;
        }

        if(a < 32 || a >= 128) THROW("Wrong char");
        a -= 32;

        next = step->k[a];
        if(!next) {
            next = _next();
            step = get_step_t(nstep);
            step->k[a] = next;
        }
        nstep = next;
        step = get_step_t(nstep);
    }

    char *old = NULL;
    if(buf_t) {
        old = abuf.exchange(buf_t);
        buf_t = NULL;
    }
    mutex.unlock();

    if(old) {
        server->_free_lock.lock();
        server->_free_list.push_back(old);
        server->_free_lock.unlock();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, -0x2c(%rbp)
movl %edx, %r12d
movq %rsi, -0x40(%rbp)
movq %rdi, %rbx
addq $0x8, %rdi
movq %rdi, -0x38(%rbp)
callq 0xd764
movq 0x38(%rbx), %rax
testq %rax, %rax
jne 0xf730
movq 0x30(%rbx), %rax
xorl %r15d, %r15d
testl %r12d, %r12d
cmovlel %r15d, %r12d
pushq $0x1
popq %r14
movq -0x40(%rbp), %rsi
cmpq %r15, %r12
je 0xf7d5
movsbl (%rsi,%r15), %ecx
movzwl %cx, %edx
cmpl $0x2a, %edx
je 0xf7d1
addl $-0x80, %edx
cmpl $-0x61, %edx
jbe 0xf857
addl $0xffe0, %ecx           # imm = 0xFFE0
movzwl %cx, %r13d
movzwl 0x4(%rax,%r13,2), %eax
testw %ax, %ax
jne 0xf7a8
movq %rbx, %rdi
callq 0xf5fc
movq 0x38(%rbx), %rcx
testq %rcx, %rcx
jne 0xf78e
movq 0x30(%rbx), %rcx
movslq %r14d, %rdx
imulq $0xc4, %rdx, %rdx
addq %rcx, %rdx
movw %ax, -0xc0(%rdx,%r13,2)
movq -0x40(%rbp), %rsi
movq 0x38(%rbx), %rcx
testq %rcx, %rcx
jne 0xf7b5
movq 0x30(%rbx), %rcx
movzwl %ax, %r14d
imull $0xc4, %r14d, %eax
addq %rcx, %rax
addq $-0xc4, %rax
incq %r15
jmp 0xf742
addq $0x2, %rax
movl -0x2c(%rbp), %ecx
movw %cx, (%rax)
andq $0x0, -0x48(%rbp)
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0xf840
xchgq %r14, 0x30(%rbx)
movq %r14, -0x48(%rbp)
andq $0x0, 0x38(%rbx)
movq -0x38(%rbp), %rdi
callq 0xa220
testq %r14, %r14
je 0xf831
movl $0x20088, %r14d         # imm = 0x20088
movq (%rbx), %rdi
addq %r14, %rdi
callq 0xd764
movl $0x200b0, %edi          # imm = 0x200B0
addq (%rbx), %rdi
leaq -0x48(%rbp), %rsi
callq 0xf988
addq (%rbx), %r14
movq %r14, %rdi
callq 0xa220
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x38(%rbp), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa220
pushq $0x30
popq %rdi
callq 0xa170
movq %rax, %rbx
leaq 0x9956(%rip), %rsi      # 0x191bf
leaq 0x992c(%rip), %rdx      # 0x1919c
leaq 0x9953(%rip), %r8       # 0x191ca
pushq $0x37
popq %rcx
movq %rax, %rdi
callq 0xe15c
leaq 0x1048f(%rip), %rsi     # 0x1fd18
leaq -0x137a(%rip), %rdx     # 0xe516
movq %rbx, %rdi
callq 0xa450
movq %rax, %r14
movq %rbx, %rdi
callq 0xa200
movq %r14, %rdi
callq 0xa470
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/mapper.cpp
// Function: Mapper::find(ISlice)
u16 Mapper::find(ISlice name) {
    u16 std = 0;
    int next;
    char *ptr = abuf.load();
    Step *step = _get_step(ptr, 1);
    for(int i=0;;i++) {
        if(step->std) std = step->std;
        if(i >= name.size()) {
            if(step->end) return step->end;
            return std;
        }
        u16 a = name.ptr()[i];

        if(a < 32 || a >= 128) return std;
        a -= 32;

        next = step->k[a];
        if(!next) return std;
        step = _get_step(ptr, next);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x30(%rdi), %rcx
xorl %edi, %edi
testl %edx, %edx
cmovlel %edi, %edx
xorl %eax, %eax
movq %rcx, %r8
movzwl 0x2(%r8), %r9d
testw %r9w, %r9w
cmovnel %r9d, %eax
cmpq %rdi, %rdx
je 0xf913
movsbl (%rsi,%rdi), %r9d
movl %r9d, %r10d
andl $0xffe0, %r10d          # imm = 0xFFE0
addl $-0x80, %r10d
cmpl $-0x60, %r10d
jb 0xf91d
addl $0xffe0, %r9d           # imm = 0xFFE0
movzwl %r9w, %r9d
movzwl 0x4(%r8,%r9,2), %r8d
testq %r8, %r8
je 0xf91d
decl %r8d
imulq $0xc4, %r8, %r8
addq %rcx, %r8
incq %rdi
jmp 0xf8c0
movzwl (%r8), %ecx
testw %cx, %cx
cmovnel %ecx, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lega911[P]ijson/src/mapper.cpp
// Function: Mapper::del(ISlice)
u16 Mapper::del(ISlice name) {
    int next;
    char *ptr = abuf.load();
    Step *step = _get_step(ptr, 1);
    for(int i=0;;i++) {
        if(i >= name.size()) {
            auto result = step->end;
            step->end = 0;
            return result;
        }
        u16 a = name.ptr()[i];

        if(a == '*') {
            auto result = step->std;
            step->std = 0;
            return result;
        }

        if(a < 32 || a >= 128) return 0;
        a -= 32;

        next = step->k[a];
        if(!next) return 0;
        step = _get_step(ptr, next);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x30(%rdi), %rax
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
movq %rax, %rdi
cmpq %rcx, %rdx
je 0xf97f
movsbl (%rsi,%rcx), %r8d
movzwl %r8w, %r9d
cmpl $0x2a, %r9d
je 0xf97b
addl $-0x80, %r9d
cmpl $-0x60, %r9d
jb 0xf977
addl $0xffe0, %r8d           # imm = 0xFFE0
movzwl %r8w, %r8d
movzwl 0x4(%rdi,%r8,2), %edi
testq %rdi, %rdi
je 0xf977
decl %edi
imulq $0xc4, %rdi, %rdi
addq %rax, %rdi
incq %rcx
jmp 0xf932
xorl %eax, %eax
jmp 0xf986
addq $0x2, %rdi
movzwl (%rdi), %eax
andw $0x0, (%rdi)
popq %rbp
retq