LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: hex_char_to_int
static int hex_char_to_int(char c) {
    if (c >= '0' && c <= '9') {
        return c - '0';
    } else if (c >= 'a' && c <= 'f') {
        return c - 'a' + 10;
    } else if (c >= 'A' && c <= 'F') {
        return c - 'A' + 10;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x5(%rbp)
movsbl -0x5(%rbp), %eax
cmpl $0x30, %eax
jl 0x73e8
movsbl -0x5(%rbp), %eax
cmpl $0x39, %eax
jg 0x73e8
movsbl -0x5(%rbp), %eax
subl $0x30, %eax
movl %eax, -0x4(%rbp)
jmp 0x7435
movsbl -0x5(%rbp), %eax
cmpl $0x61, %eax
jl 0x7409
movsbl -0x5(%rbp), %eax
cmpl $0x66, %eax
jg 0x7409
movsbl -0x5(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movl %eax, -0x4(%rbp)
jmp 0x7435
movsbl -0x5(%rbp), %eax
cmpl $0x41, %eax
jl 0x742a
movsbl -0x5(%rbp), %eax
cmpl $0x46, %eax
jg 0x742a
movsbl -0x5(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movl %eax, -0x4(%rbp)
jmp 0x7435
jmp 0x742c
jmp 0x742e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_resize
static JSON_Status json_array_resize(JSON_Array *array, size_t new_capacity) {
    JSON_Value **new_items = NULL;
    if (new_capacity == 0) {
        return JSONFailure;
    }
    new_items = (JSON_Value**)parson_malloc(new_capacity * sizeof(JSON_Value*));
    if (new_items == NULL) {
        return JSONFailure;
    }
    if (array->items != NULL && array->count > 0) {
        memcpy(new_items, array->items, array->count * sizeof(JSON_Value*));
    }
    parson_free(array->items);
    array->items = new_items;
    array->capacity = new_capacity;
    return JSONSuccess;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x746b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x74f3
movq 0x5d0e(%rip), %rax      # 0xd180
movq -0x18(%rbp), %rdi
shlq $0x3, %rdi
callq *%rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7490
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x74f3
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x74c3
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jbe 0x74c3
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
shlq $0x3, %rdx
callq 0x1210
movq 0x5cae(%rip), %rax      # 0xd178
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
callq *%rax
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: is_decimal
static int is_decimal(const char *string, size_t length) {
    if (length > 1 && string[0] == '0' && string[1] != '.') {
        return 0;
    }
    if (length > 2 && !strncmp(string, "-0", 2) && string[2] != '.') {
        return 0;
    }
    while (length--) {
        if (strchr("xX", string[length])) {
            return 0;
        }
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
jbe 0x7539
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0x7539
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2e, %eax
je 0x7539
movl $0x0, -0x4(%rbp)
jmp 0x75b7
cmpq $0x2, -0x18(%rbp)
jbe 0x7570
movq -0x10(%rbp), %rdi
leaq 0x2300(%rip), %rsi      # 0x984b
movl $0x2, %edx
callq 0x1080
cmpl $0x0, %eax
jne 0x7570
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x2e, %eax
je 0x7570
movl $0x0, -0x4(%rbp)
jmp 0x75b7
jmp 0x7572
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpq $0x0, %rax
je 0x75b0
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %esi
leaq 0x22b4(%rip), %rdi      # 0x984e
callq 0x1110
cmpq $0x0, %rax
je 0x75ae
movl $0x0, -0x4(%rbp)
jmp 0x75b7
jmp 0x7572
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: num_bytes_in_utf8_sequence
static int num_bytes_in_utf8_sequence(unsigned char c) {
    if (c == 0xC0 || c == 0xC1 || c > 0xF4 || IS_CONT(c)) {
        return 0;
    } else if ((c & 0x80) == 0) {    /* 0xxxxxxx */
        return 1;
    } else if ((c & 0xE0) == 0xC0) { /* 110xxxxx */
        return 2;
    } else if ((c & 0xF0) == 0xE0) { /* 1110xxxx */
        return 3;
    } else if ((c & 0xF8) == 0xF0) { /* 11110xxx */
        return 4;
    }
    return 0; /* won't happen */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x5(%rbp)
movzbl -0x5(%rbp), %eax
cmpl $0xc0, %eax
je 0x781b
movzbl -0x5(%rbp), %eax
cmpl $0xc1, %eax
je 0x781b
movzbl -0x5(%rbp), %eax
cmpl $0xf4, %eax
jg 0x781b
movzbl -0x5(%rbp), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0x7824
movl $0x0, -0x4(%rbp)
jmp 0x7895
movzbl -0x5(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x783b
movl $0x1, -0x4(%rbp)
jmp 0x7895
movzbl -0x5(%rbp), %eax
andl $0xe0, %eax
cmpl $0xc0, %eax
jne 0x7854
movl $0x2, -0x4(%rbp)
jmp 0x7895
movzbl -0x5(%rbp), %eax
andl $0xf0, %eax
cmpl $0xe0, %eax
jne 0x786d
movl $0x3, -0x4(%rbp)
jmp 0x7895
movzbl -0x5(%rbp), %eax
andl $0xf8, %eax
cmpl $0xf0, %eax
jne 0x7886
movl $0x4, -0x4(%rbp)
jmp 0x7895
jmp 0x7888
jmp 0x788a
jmp 0x788c
jmp 0x788e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: append_indent
static int append_indent(char *buf, int level) {
    int i;
    int written = -1, written_total = 0;
    for (i = 0; i < level; i++) {
        APPEND_STRING("    ");
    }
    return written_total;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x20(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x796e
jmp 0x791e
movq -0x10(%rbp), %rdi
leaq 0x1f42(%rip), %rsi      # 0x986b
callq 0x78a0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x7940
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7974
cmpq $0x0, -0x10(%rbp)
je 0x7958
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x1c(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x7963
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7914
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/crc64.c
// Function: crc64
uint64_t crc64(uint8_t type, void *str, size_t len){
	uint64_t crc = crctab64[type];
	uint8_t *p = (uint8_t*)str;

	while (len--)
		crc = crctab64[(crc ^ *(p++)) & 0xff] ^ (crc >> 8);
	return crc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movzbl -0x1(%rbp), %eax
movl %eax, %ecx
leaq 0x7c91(%rip), %rax      # 0xa270
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpq $0x0, %rax
je 0x2640
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movzbl (%rax), %eax
xorq %rax, %rcx
andq $0xff, %rcx
leaq 0x7c45(%rip), %rax      # 0xa270
movq (%rax,%rcx,8), %rax
movq -0x20(%rbp), %rcx
shrq $0x8, %rcx
xorq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x25ef
movq -0x20(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/hdict.c
// Function: hdict_close
void hdict_close(hdict_t *hdict)
{
    if (hdict->fd > 0) close(hdict->fd);
    if (hdict->idx) free(hdict->idx);
    if (hdict->hdict_meta) free(hdict->hdict_meta);
    free(hdict->path);
    free(hdict);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x38(%rax)
jle 0x2a72
movq -0x8(%rbp), %rax
movl 0x38(%rax), %edi
callq 0x21c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x2a8a
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x2030
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x2aa2
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x2030
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2030
movq -0x8(%rbp), %rdi
callq 0x2030
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/hdict.c
// Function: hdict_seek
int hdict_seek(hdict_t *hdict, const char* str_key, off_t *off, uint32_t *length)
{
    uint32_t low = 0;
    uint32_t high = hdict->idx_num;
    uint32_t mid;
    int hit = 0;
    int count = 0;
    uint64_t key = strtoull(str_key, NULL, 10);
    while (low < high) {
        ++count;
        mid = (low + high) / 2;
        if (hdict->idx[mid].key > key) {
            high = mid;
        } else if (hdict->idx[mid].key < key) {
            low = mid + 1;
        } else {
            *off = (hdict->idx[mid].pos & 0xFFFFFFFFFF);
            *length = (hdict->idx[mid].pos >> 40);
            hit = 1;
            break;
        }
    }
    return hit;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x2220
movq %rax, -0x40(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x2bcf
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x24(%rbp), %eax
addl -0x28(%rbp), %eax
shrl %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x40(%rbp), %rax
jbe 0x2b50
movl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2bca
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x40(%rbp), %rax
jae 0x2b76
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2bc8
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movabsq $0xffffffffff, %rcx     # imm = 0xFFFFFFFFFF
andq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x28, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x30(%rbp)
jmp 0x2bcf
jmp 0x2bca
jmp 0x2b0d
movl -0x30(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/hdict.c
// Function: hdict_search
int hdict_search(hdb_t *hdb, const char* label, const char* key, off_t *off, uint32_t *length, hdict_t **hdict){
    int hit = 0;
    if (NULL == label || NULL == key){
        return hit;
    }
    hdict_t *hd;
    uint64_t hdid = bkdr_hash(label);
    uint32_t hash = HASH(hdid);
    LOCK(hdb);
    hd = LIST_FIRST(&hdb->htab[hash]);

    while(hd){
        if (hd->hdid == hdid) {
            hd->ref++;
            *hdict = hd;
            if (hd->hdict_meta->idx_type == 2){
                hit = hdict_seek_v2(*hdict, key, off, length);
            }else{
                hit = hdict_seek(*hdict, key, off, length);
            }
            (*hdict)->num_qry++;
            if (hit){
                hd->ref--;
                UNLK(hdb);
                return hit;
            }
            hd->ref--;
            hd = LIST_NEXT(hd, h_link);
        }else{
            hd = LIST_NEXT(hd, h_link);
        }
    }
    UNLK(hdb);
    return hit;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x2e97
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
jne 0x2ea2
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2fc2
movq -0x18(%rbp), %rdi
callq 0x5170
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
andq $0x3ff, %rax            # imm = 0x3FF
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2490
movq -0x10(%rbp), %rax
movl -0x54(%rbp), %ecx
movq 0x50(%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x2fb3
movq -0x48(%rbp), %rax
movq 0x50(%rax), %rax
cmpq -0x50(%rbp), %rax
jne 0x2fa2
movq -0x48(%rbp), %rax
movl 0x4c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rax)
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rax
movzbl 0x4(%rax), %eax
cmpl $0x2, %eax
jne 0x2f38
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x2be0
movl %eax, -0x3c(%rbp)
jmp 0x2f53
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x2ac0
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl 0x48(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x48(%rax)
cmpl $0x0, -0x3c(%rbp)
je 0x2f87
movq -0x48(%rbp), %rax
movl 0x4c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4c(%rax)
movq -0x10(%rbp), %rdi
callq 0x22d0
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2fc2
movq -0x48(%rbp), %rax
movl 0x4c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4c(%rax)
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x2fae
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x2ed5
movq -0x10(%rbp), %rdi
callq 0x22d0
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/hdict.c
// Function: hdict_randomkey
int hdict_randomkey(hdict_t *hdict, uint64_t *key)
{
    if (hdict->idx_num == 0)
        return -1;
    int i = rand() % hdict->idx_num;
    *key = hdict->idx[i].key;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x2ff3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3028
callq 0x24a0
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divl 0x28(%rcx)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/hdict.c
// Function: hdb_mgr
void *hdb_mgr(void *arg)
{
    hdb_t *hdb = (hdb_t *)arg;

    for (;;) {
        if (TAILQ_FIRST(&hdb->close_list)) {
            hdict_t *hdict, *next;
            hdict_t *hdicts[100];
            int i, k = 0;

            LOCK(hdb);
            for (hdict = TAILQ_FIRST(&hdb->close_list); hdict; hdict = next) {
                next = TAILQ_NEXT(hdict, link);
                if (hdict->ref == 0) {
                    hdicts[k++] = hdict;
                    TAILQ_REMOVE(&hdb->close_list, hdict, link);
                    hdb->num_close--;
                    if (k == 100)
                        break;
                }
            }
            UNLK(hdb);

            for (i = 0; i < k; ++i) {
                hdict = hdicts[i];
                hdict_close(hdict);
            }
        }
        sleep(1);
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x350, %rsp            # imm = 0x350
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x317e
movl $0x0, -0x348(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2490
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x312e
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
jne 0x311f
movq -0x18(%rbp), %rcx
movl -0x348(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x348(%rbp)
cltq
movq %rcx, -0x340(%rbp,%rax,8)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x30e3
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x30f3
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4c(%rax)
cmpl $0x64, -0x348(%rbp)
jne 0x311d
jmp 0x312e
jmp 0x311f
jmp 0x3121
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x3085
movq -0x10(%rbp), %rdi
callq 0x22d0
movl $0x0, -0x344(%rbp)
movl -0x344(%rbp), %eax
cmpl -0x348(%rbp), %eax
jge 0x317c
movslq -0x344(%rbp), %rax
movq -0x340(%rbp,%rax,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2a50
movl -0x344(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x344(%rbp)
jmp 0x3141
jmp 0x317e
movl $0x1, %edi
callq 0x2470
jmp 0x3057
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/hdict.c
// Function: hdb_init
int hdb_init(hdb_t *hdb)
{
    if (pthread_mutex_init(&hdb->mutex, NULL)) return -1;
    TAILQ_INIT(&hdb->open_list);
    TAILQ_INIT(&hdb->close_list);
    hdb->num_open = 0;
    hdb->num_close = 0;

    int i;
    for (i = 0; i < HTAB_SIZE; i++) {
        LIST_INIT((hdb->htab + i));
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2480
cmpl $0x0, %eax
je 0x31ba
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3243
jmp 0x31bc
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rcx
addq $0x28, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0x31da
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rcx
addq $0x38, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x48(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x4c(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x400, -0x14(%rbp)     # imm = 0x400
jge 0x323c
jmp 0x321e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq $0x0, 0x50(%rax,%rcx,8)
jmp 0x3231
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3213
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/hdict.c
// Function: hdb_ref
hdict_t *hdb_ref(hdb_t *hdb, const char* label)
{
    hdict_t *hdict = NULL;
    if (NULL == label){
        return hdict;
    }
    hdict_t *hd;
    LOCK(hdb);
    uint64_t hdid = bkdr_hash(label);
    uint32_t hash = HASH(hdid);
    for (hd = LIST_FIRST(&hdb->htab[hash]); hd; hd = LIST_NEXT(hd, h_link)) {
        if (hd->hdid == hdid) {
            hd->ref++;
            hdict = hd;
            break;
        }
    }
    UNLK(hdb);
    return hdict;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x3c0d
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3c8d
movq -0x10(%rbp), %rdi
callq 0x2490
movq -0x18(%rbp), %rdi
callq 0x5170
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
andq $0x3ff, %rax            # imm = 0x3FF
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
movq 0x50(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x3c7c
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rax
cmpq -0x30(%rbp), %rax
jne 0x3c6c
movq -0x28(%rbp), %rax
movl 0x4c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x3c7c
jmp 0x3c6e
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x3c40
movq -0x10(%rbp), %rdi
callq 0x22d0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/hdict.c
// Function: hdb_deref
int hdb_deref(hdb_t *hdb, hdict_t *hdict)
{
    LOCK(hdb);
    hdict->ref--;
    UNLK(hdb);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2490
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4c(%rax)
movq -0x8(%rbp), %rdi
callq 0x22d0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/connection_queue.c
// Function: cq_init
void cq_init(struct conn_queue *cq, int wakeup) {
    pthread_mutex_init(&cq->lock, NULL);
    pthread_cond_init(&cq->cond, NULL);
    cq->length = 0;
    cq->wakeup = wakeup;
    cq->head = NULL;
    cq->tail = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2480
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x22c0
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/connection_queue.c
// Function: cq_push
void cq_push(struct conn_queue *cq, conn *item) {
    item->next = NULL;

    pthread_mutex_lock(&cq->lock);
    if (NULL == cq->tail)
        cq->head = item;
    else
        cq->tail->next = item;
    cq->tail = item;
    cq->length++;
    if (cq->wakeup) pthread_cond_signal(&cq->cond);
    pthread_mutex_unlock(&cq->lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0xe0(%rax)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x2490
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq 0x8(%rcx), %rax
jne 0x4355
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x4368
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0xe0(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0x4398
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
callq 0x2210
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x22d0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/connection_queue.c
// Function: cq_pop
conn *cq_pop(struct conn_queue *cq) {
    conn *item;

    assert(cq->wakeup);
    pthread_mutex_lock(&cq->lock);
    while (NULL == cq->head)
        pthread_cond_wait(&cq->cond, &cq->lock);
    item = cq->head;
    cq->head = item->next;
    if (NULL == cq->head)
        cq->tail = NULL;
    cq->length--;
    pthread_mutex_unlock(&cq->lock);

    return item;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0x43c8
jmp 0x43e7
leaq 0x2e78(%rip), %rdi      # 0x7247
leaq 0x2e7c(%rip), %rsi      # 0x7252
movl $0x1f, %edx
leaq 0x2e83(%rip), %rcx      # 0x7265
callq 0x2190
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x2490
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
jne 0x4416
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
movq -0x8(%rbp), %rsi
addq $0x18, %rsi
callq 0x2100
jmp 0x43f4
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
jne 0x444a
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x22d0
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/connection_queue.c
// Function: cq_peek
conn *cq_peek(struct conn_queue *cq) {
    conn *item;

    pthread_mutex_lock(&cq->lock);
    item = cq->head;
    if (NULL != item) {
        cq->head = item->next;
        if (NULL == cq->head)
            cq->tail = NULL;
        cq->length--;
    }
    pthread_mutex_unlock(&cq->lock);

    return item;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x2490
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x44d2
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
jne 0x44c5
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x22d0
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/connection_queue.c
// Function: cq_length
uint32_t cq_length(struct conn_queue *cq) {
    int length;
    pthread_mutex_lock(&cq->lock);
    length = cq->length;
    pthread_mutex_unlock(&cq->lock);
    return length;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x2490
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x22d0
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/network.c
// Function: update_event
int update_event(conn *c, const int new_flags) {
    assert(c != NULL);

    struct event_base *base = c->event.ev_base;
    if (c->ev_flags == new_flags)
        return 1;
    if (c->ev_flags != 0) {
        if (event_del(&c->event) == -1) return 0;
    }
    event_set(&c->event, c->sfd, new_flags, event_handler, (void *)c);
    event_base_set(base, &c->event);
    c->ev_flags = new_flags;
    if (event_add(&c->event, 0) == -1) return 0;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4548
jmp 0x4567
leaq 0x2d49(%rip), %rdi      # 0x7298
leaq 0x2d4c(%rip), %rsi      # 0x72a2
movl $0x11, %edx
leaq 0x2d4a(%rip), %rcx      # 0x72ac
callq 0x2190
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movswl 0x88(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x458f
movl $0x1, -0x4(%rbp)
jmp 0x4628
movq -0x10(%rbp), %rax
movswl 0x88(%rax), %eax
cmpl $0x0, %eax
je 0x45bc
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x2160
cmpl $-0x1, %eax
jne 0x45ba
movl $0x0, -0x4(%rbp)
jmp 0x4628
jmp 0x45bc
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %esi
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %r8
leaq 0x68(%rip), %rcx        # 0x4640
movswl %ax, %edx
callq 0x2380
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x2060
movl -0x14(%rbp), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x88(%rax)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2250
cmpl $-0x1, %eax
jne 0x4621
movl $0x0, -0x4(%rbp)
jmp 0x4628
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/network.c
// Function: event_handler
void event_handler(const int fd, const short which, void *arg) {
    conn *c;

    c = (conn *)arg;
    assert(c != NULL);

    c->which = which;

    if (fd != c->sfd) {
        if (settings.verbose > 0)
            fprintf(stderr, "Catastrophic: event fd doesn't match conn fd!\n");
        conn_close(c);
        return;
    }

    drive_machine(c);

    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movl %edi, -0x4(%rbp)
movw %ax, -0x6(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x4667
jmp 0x4686
leaq 0x2c2a(%rip), %rdi      # 0x7298
leaq 0x2c2d(%rip), %rsi      # 0x72a2
movl $0xe9, %edx
leaq 0x2d45(%rip), %rcx      # 0x73c6
callq 0x2190
movw -0x6(%rbp), %cx
movq -0x18(%rbp), %rax
movw %cx, 0x8a(%rax)
movl -0x4(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
je 0x46d0
leaq 0x63d1(%rip), %rax      # 0xaa78
cmpl $0x0, 0x10(%rax)
jle 0x46c5
movq 0x5944(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x2d3b(%rip), %rsi      # 0x73f9
movb $0x0, %al
callq 0x2260
movq -0x18(%rbp), %rdi
callq 0x40c0
jmp 0x46d9
movq -0x18(%rbp), %rdi
callq 0x4b10
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/network.c
// Function: process_command
int process_command(conn *c, char *command) {
    if (strcmp(command, "quit") == 0) {
        c->state = conn_closing;
        return STAY_IN;
    } else if (strcmp(command, "stop") == 0) {
        exit(0);
    } else if (strcmp(command, "version") == 0) {
        // compat with old php Memcache client
        out_string(c, VERSION);
        return STAY_IN;
    } else {
        if (event_del(&c->event) == -1) {
            out_string(c, "SERVER_ERROR can't forward");
            return STAY_IN;
        }
        gettimeofday(&c->tv, NULL);
        c->ev_flags = 0;
        c->cmd = command;
        cq_push(&REQ, c);
        return FORWARD_OUT;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x2bd5(%rip), %rsi      # 0x72d0
callq 0x2240
cmpl $0x0, %eax
jne 0x471c
movq -0x10(%rbp), %rax
movl $0x3, 0x4(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x47d8
movq -0x18(%rbp), %rdi
leaq 0x2bae(%rip), %rsi      # 0x72d5
callq 0x2240
cmpl $0x0, %eax
jne 0x4738
xorl %edi, %edi
callq 0x2430
movq -0x18(%rbp), %rdi
leaq 0x29b8(%rip), %rsi      # 0x70fb
callq 0x2240
cmpl $0x0, %eax
jne 0x4766
movq -0x10(%rbp), %rdi
leaq 0x2b82(%rip), %rsi      # 0x72da
callq 0x5270
movl $0x2, -0x4(%rbp)
jmp 0x47d8
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x2160
cmpl $-0x1, %eax
jne 0x4791
movq -0x10(%rbp), %rdi
leaq 0x2b65(%rip), %rsi      # 0x72e8
callq 0x5270
movl $0x2, -0x4(%rbp)
jmp 0x47d8
movq -0x10(%rbp), %rdi
addq $0xd0, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2180
movq -0x10(%rbp), %rax
movw $0x0, 0x88(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq -0x10(%rbp), %rsi
leaq 0x62cc(%rip), %rdi      # 0xaa98
callq 0x4310
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/network.c
// Function: try_read_command
int try_read_command(conn *c) {
    char *el, *cont;

    if (!c->rbytes)
        return 0;
    el = (char *)memchr(c->rcurr, '\n', c->rbytes);
    if (!el)
        return 0;
    cont = el + 1;
    if (el - c->rcurr > 1 && *(el - 1) == '\r') {
        el--;
    }
    *el = '\0';

    int res = process_command(c, c->rcurr);

    c->rbytes -= (cont - c->rcurr);
    c->rcurr = cont;

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xa4(%rax)
jne 0x4815
movl $0x0, -0x4(%rbp)
jmp 0x48e2
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0xa4(%rax), %rdx
movl $0xa, %esi
callq 0x21e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x484c
movl $0x0, -0x4(%rbp)
jmp 0x48e2
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x98(%rcx), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x4889
movq -0x18(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0xd, %eax
jne 0x4889
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rsi
callq 0x46e0
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
subq %rax, %rdx
movq -0x10(%rbp), %rax
movslq 0xa4(%rax), %rcx
subq %rdx, %rcx
movl %ecx, 0xa4(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/network.c
// Function: notify_handler
void notify_handler(const int fd, const short which, void *arg) {
    if (fd != notify_receive_fd) {
        if (settings.verbose > 0)
            fprintf(stderr, "Catastrophic: event fd doesn't match conn fd!\n");
        return;
    }
    char buf[1];
    if (read(fd, buf, 1) != 1) {
        if (settings.verbose > 0)
            fprintf(stderr, "Can't read from event pipe\n");
    }

    conn *c = cq_peek(&RSP);
    if (c != NULL) {
        c->wcurr = c->wbuf;
        c->state = conn_write;
        c->write_and_go = conn_read;

        drive_machine(c);
    }

    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movl %edi, -0x4(%rbp)
movw %ax, -0x6(%rbp)
movq %rdx, -0x10(%rbp)
movl -0x4(%rbp), %eax
leaq 0x5cd8(%rip), %rcx      # 0xab78
cmpl (%rcx), %eax
je 0x4ece
leaq 0x5bcd(%rip), %rax      # 0xaa78
cmpl $0x0, 0x10(%rax)
jle 0x4ec9
movq 0x5140(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x2537(%rip), %rsi      # 0x73f9
movb $0x0, %al
callq 0x2260
jmp 0x4f5d
movl -0x4(%rbp), %edi
leaq -0x11(%rbp), %rsi
movl $0x1, %edx
callq 0x21f0
cmpq $0x1, %rax
je 0x4f0c
leaq 0x5b8c(%rip), %rax      # 0xaa78
cmpl $0x0, 0x10(%rax)
jle 0x4f0a
movq 0x50ff(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x2525(%rip), %rsi      # 0x7428
movb $0x0, %al
callq 0x2260
jmp 0x4f0c
leaq 0x5bf5(%rip), %rdi      # 0xab08
callq 0x4470
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x4f5b
movq -0x20(%rbp), %rax
movq 0xa8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x20(%rbp), %rax
movl $0x2, 0x4(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0xc0(%rax)
movq -0x20(%rbp), %rdi
callq 0x4b10
jmp 0x4f5d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/network.c
// Function: server_socket
int server_socket(const int port) {
    int sfd;
    struct linger ling = {0, 0};
    struct sockaddr_in addr;
    int flags = 1;

    if ((sfd = new_socket()) == -1) {
        return -1;
    }

    setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (void *)&flags, sizeof(flags));
    setsockopt(sfd, SOL_SOCKET, SO_KEEPALIVE, (void *)&flags, sizeof(flags));
    setsockopt(sfd, SOL_SOCKET, SO_LINGER, (void *)&ling, sizeof(ling));
    setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, (void *)&flags, sizeof(flags));

    memset(&addr, 0, sizeof(addr));

    addr.sin_family = AF_INET;
    addr.sin_port = htons(port);
    addr.sin_addr = settings.interf;
    if (bind(sfd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
        perror("bind()");
        close(sfd);
        return -1;
    }

    if (listen(sfd, 1024) == -1) {
        perror("listen()");
        close(sfd);
        return -1;
    }
    return sfd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
leaq -0x14(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x21b0
movl $0x1, -0x28(%rbp)
callq 0x4f70
movl %eax, -0xc(%rbp)
cmpl $-0x1, %eax
jne 0x504b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x515d
movl -0xc(%rbp), %edi
movl $0x1, %esi
movl $0x2, %edx
leaq -0x28(%rbp), %rcx
movl $0x4, %r8d
callq 0x20c0
movl -0xc(%rbp), %edi
movl $0x1, %esi
movl $0x9, %edx
leaq -0x28(%rbp), %rcx
movl $0x4, %r8d
callq 0x20c0
movl -0xc(%rbp), %edi
movl $0x1, %esi
movl $0xd, %edx
leaq -0x14(%rbp), %rcx
movl $0x8, %r8d
callq 0x20c0
movl -0xc(%rbp), %edi
movl $0x6, %esi
movl $0x1, %edx
leaq -0x28(%rbp), %rcx
movl $0x4, %r8d
callq 0x20c0
leaq -0x24(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x21b0
movw $0x2, -0x24(%rbp)
movl -0x8(%rbp), %eax
movzwl %ax, %edi
callq 0x2130
movw %ax, -0x22(%rbp)
leaq 0x5991(%rip), %rax      # 0xaa78
movl 0x8(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0xc(%rbp), %edi
leaq -0x24(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
movl $0x10, %edx
callq 0x2340
cmpl $-0x1, %eax
jne 0x5128
leaq 0x233b(%rip), %rdi      # 0x744d
callq 0x23b0
movl -0xc(%rbp), %edi
callq 0x21c0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x515d
movl -0xc(%rbp), %edi
movl $0x400, %esi            # imm = 0x400
callq 0x2310
cmpl $-0x1, %eax
jne 0x5157
leaq 0x2313(%rip), %rdi      # 0x7454
callq 0x23b0
movl -0xc(%rbp), %edi
callq 0x21c0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x515d
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/util.c
// Function: bkdr_hash
uint64_t bkdr_hash(const char* str){
    if(NULL == str){
        return 0;
    }
    uint64_t seed = 1313131313;
    uint64_t hash = 0;
    while(*str){
        hash = hash * seed + (*str++);
    }
    return hash;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
jne 0x518a
movq $0x0, -0x8(%rbp)
jmp 0x51d0
movq $0x4e44cb31, -0x18(%rbp) # imm = 0x4E44CB31
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x51c8
movq -0x20(%rbp), %rax
imulq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x519a
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/util.c
// Function: pack_string
void pack_string(conn *c, const char *str) {
    int len;

    len = strlen(str);
    if (len + 2 > c->wsize) {
        /* ought to be always enough. just fail for simplicity */
        str = "SERVER_ERROR output line too long";
        len = strlen(str);
    }

    strcpy(c->wbuf, str);
    strcat(c->wbuf, "\r\n");
    c->wbytes = len + 2;

    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2120
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movq -0x8(%rbp), %rcx
cmpl 0xb8(%rcx), %eax
jle 0x5225
leaq 0x2248(%rip), %rax      # 0x745d
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2120
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0xa8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2090
movq -0x8(%rbp), %rax
movq 0xa8(%rax), %rdi
leaq 0x27bb(%rip), %rsi      # 0x7a06
callq 0x2410
movl -0x14(%rbp), %ecx
addl $0x2, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xbc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/util.c
// Function: out_string
void out_string(conn *c, const char *str) {
    pack_string(c, str);
    c->wcurr = c->wbuf;
    c->state = conn_write;
    c->write_and_go = conn_read;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x51e0
movq -0x8(%rbp), %rax
movq 0xa8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x8(%rbp), %rax
movl $0x2, 0x4(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0xc0(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/util.c
// Function: bigger_prime
int bigger_prime(int m){
    int i;
    for(i= m; ; i++){
        if(isprime(i)){
            return i;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %edi
callq 0x5310
cmpl $0x0, %eax
je 0x52f7
movl -0x8(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
jmp 0x52f9
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x52e1
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/util.c
// Function: isprime
static int isprime(int m) {
    if (m < 1)
        return 0;
    int i;
    for (i = 2; i < m; i++) {
        if (m % i == 0) {
            return 0;
        }
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x1, -0x8(%rbp)
jge 0x5326
movl $0x0, -0x4(%rbp)
jmp 0x535e
movl $0x2, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x5357
movl -0x8(%rbp), %eax
cltd
idivl -0xc(%rbp)
cmpl $0x0, %edx
jne 0x534a
movl $0x0, -0x4(%rbp)
jmp 0x535e
jmp 0x534c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x532d
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/terminal.c
// Function: settings_init
static void settings_init() {
    settings.port = DEFAULT_PORT;
    settings.interf.s_addr = htonl(INADDR_ANY);
    settings.maxconns = MAX_CONN_NUM;
    settings.num_threads = DEFAULT_THREAD_NUM;
    settings.verbose = 0;
    settings.timeout = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x26aa, 0x45ce(%rip)   # imm = 0x26AA
xorl %edi, %edi
callq 0x21a0
movl %eax, 0x45c5(%rip)      # 0xaa80
movl $0x2000, 0x45b3(%rip)   # imm = 0x2000
movl $0x4, 0x45b5(%rip)      # 0xaa84
movl $0x0, 0x45af(%rip)      # 0xaa88
movl $0x0, 0x45a9(%rip)      # 0xaa8c
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/terminal.c
// Function: stats_init
static void stats_init(){
    stats.curr_conns = stats.conn_structs = 0;
    stats.get_cmds = stats.get_hits = stats.get_misses = 0;
    stats.ialloc_failed = 0;
    stats.started = time(NULL);
    pthread_mutex_init(&stats.stats_lock, NULL);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, 0x4696(%rip)      # 0xab94
movl $0x0, 0x4688(%rip)      # 0xab90
movl $0x0, 0x468e(%rip)      # 0xaba0
movl $0x0, 0x4680(%rip)      # 0xab9c
movl $0x0, 0x4672(%rip)      # 0xab98
movl $0x0, 0x4684(%rip)      # 0xabb4
xorl %eax, %eax
movl %eax, %edi
callq 0x22b0
movq %rax, 0x4668(%rip)      # 0xaba8
leaq 0x4649(%rip), %rdi      # 0xab90
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2480
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/desion[P]terminal/src/terminal.c
// Function: find_index
static int find_index(const char* str, char c){
    int index = 0;
    while(*str){
        if(c == *str){
            return index;
        }
        index++;
        str++;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x65ac
movsbl -0x11(%rbp), %eax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x6595
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x65b3
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x6575
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/build-lua/.out/LuaToC/test/cfl.c
// Function: requirefile
static int requirefile(lua_State *L)
{
   const char *path = lua_tostring(L, -1);
   size_t ndx;

   for (ndx = 0; ndx < ARRAYLENGTH(rfiles); ++ndx) {
      if (!strcmp(path, rfiles[ndx].pszPath)) {
         lua_pushlstring(L, rfiles[ndx].pc, rfiles[ndx].cb);
         return 1;
      }
   }
   return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x8ad0
movq %rax, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
cmpq $0x2, 0x8(%rsp)
jae 0x7762
movq 0x10(%rsp), %rdi
leaq 0x37712(%rip), %rax     # 0x3ee10
imulq $0x18, 0x8(%rsp), %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x72b0
cmpl $0x0, %eax
jne 0x7750
movq 0x18(%rsp), %rdi
leaq 0x376f0(%rip), %rax     # 0x3ee10
imulq $0x18, 0x8(%rsp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
leaq 0x376dc(%rip), %rax     # 0x3ee10
imulq $0x18, 0x8(%rsp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdx
callq 0x8f90
movl $0x1, 0x24(%rsp)
jmp 0x776a
jmp 0x7752
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x76ea
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/build-lua/.out/LuaToC/test/cfl.c
// Function: main
int main (int argc, char **argv)
{
   int exitCode = EXIT_FAILURE;
   int nErr;
   lua_State *L;

   L = luaL_newstate();
   if (L == NULL) {
      fprintf(stderr, "lua_open failed: not enough memory\n");
      return EXIT_FAILURE;
   }

   lua_pushcfunction(L, &pmain);
   lua_pushinteger(L, argc);
   lua_pushlightuserdata(L, argv);
   nErr = lua_pcall(L, 2, 1, 0);

   if (nErr == LUA_ERRRUN) {
      fprintf(stderr, "pmain error:\n%s\n", lua_tostring(L, -1));
   } else if (nErr) {
      fprintf(stderr, "pmain failed: err = %d\n", nErr);
   } else if (lua_isnumber(L, 1)) {
      exitCode = lua_tointeger(L, 1);
   }

   lua_close(L);
   return exitCode;
}

// Assembly:
subq $0x28, %rsp
movl $0x0, 0x24(%rsp)
movl %edi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl $0x1, 0x14(%rsp)
callq 0xd230
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x77d4
movq 0x3883a(%rip), %rax     # 0x3fff0
movq (%rax), %rdi
leaq 0x2c844(%rip), %rsi     # 0x34004
movb $0x0, %al
callq 0x72e0
movl $0x1, 0x24(%rsp)
jmp 0x78cd
movq 0x8(%rsp), %rdi
leaq 0x100(%rip), %rsi       # 0x78e0
xorl %edx, %edx
callq 0x9230
movq 0x8(%rsp), %rdi
movslq 0x20(%rsp), %rsi
callq 0x8ec0
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x93d0
movq 0x8(%rsp), %rdi
movl $0x2, %esi
movl $0x1, %edx
xorl %r8d, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %ecx
callq 0xa210
movl %eax, 0x10(%rsp)
cmpl $0x2, 0x10(%rsp)
jne 0x7867
movq 0x387ba(%rip), %rax     # 0x3fff0
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x8ad0
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0x2c7ca(%rip), %rsi     # 0x34028
movb $0x0, %al
callq 0x72e0
jmp 0x78bb
cmpl $0x0, 0x10(%rsp)
je 0x788c
movq 0x3877b(%rip), %rax     # 0x3fff0
movq (%rax), %rdi
movl 0x10(%rsp), %edx
leaq 0x2c7b6(%rip), %rsi     # 0x34039
movb $0x0, %al
callq 0x72e0
jmp 0x78b9
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x8470
cmpl $0x0, %eax
je 0x78b7
movq 0x8(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x88f0
movl %eax, 0x14(%rsp)
jmp 0x78b9
jmp 0x78bb
movq 0x8(%rsp), %rdi
callq 0x1f310
movl 0x14(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)