LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/Cotix[P]cReddit/src/main.c
// Function: displayCmd
void displayCmd (optOption *option)
{
    printf("   ");
    if (option->opt_long[0] != '\0')
        printf("--%-10s ", option->opt_long);
    else
        printf("             ");

    if (option->opt_short != '\0')
        printf("-%c ", option->opt_short);
    else
        printf("   ");

    switch(option->arg) {
    case OPT_STRING:
        printf("[String] ");
        break;
    case OPT_INT:
        printf("[Int]    ");
        break;
    case OPT_NONE:
        printf("         ");
        break;
    }

    printf(" : %s\n", option->helpText);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
leaq 0x260f(%rip), %rdi      # 0x74bf
movb $0x0, %al
callq 0x2030
movq 0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4ed9
movq 0x10(%rsp), %rsi
leaq 0x25dc(%rip), %rdi      # 0x74ac
movb $0x0, %al
callq 0x2030
jmp 0x4ee7
leaq 0x25d5(%rip), %rdi      # 0x74b5
movb $0x0, %al
callq 0x2030
movq 0x10(%rsp), %rax
movsbl 0x1f(%rax), %eax
cmpl $0x0, %eax
je 0x4f0e
movq 0x10(%rsp), %rax
movsbl 0x1f(%rax), %esi
leaq 0x25be(%rip), %rdi      # 0x74c3
movb $0x0, %al
callq 0x2030
jmp 0x4f1c
leaq 0x25aa(%rip), %rdi      # 0x74bf
movb $0x0, %al
callq 0x2030
movq 0x10(%rsp), %rax
movl 0x20(%rax), %eax
movl %eax, 0xc(%rsp)
testl %eax, %eax
je 0x4f64
jmp 0x4f2e
movl 0xc(%rsp), %eax
subl $0x1, %eax
je 0x4f54
jmp 0x4f39
movl 0xc(%rsp), %eax
subl $0x2, %eax
jne 0x4f72
jmp 0x4f44
leaq 0x257d(%rip), %rdi      # 0x74c8
movb $0x0, %al
callq 0x2030
jmp 0x4f72
leaq 0x2577(%rip), %rdi      # 0x74d2
movb $0x0, %al
callq 0x2030
jmp 0x4f72
leaq 0x254e(%rip), %rdi      # 0x74b9
movb $0x0, %al
callq 0x2030
movq 0x10(%rsp), %rsi
addq $0x24, %rsi
leaq 0x255a(%rip), %rdi      # 0x74dc
movb $0x0, %al
callq 0x2030
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Cotix[P]cReddit/src/main.c
// Function: displayHelp
void displayHelp (optParser *parser)
{
    optOption **option;

    printf("Usage: %s [flags] [subreddit] [username] [password] \n\n", parser->argv[0]);
    printf("Below is a list of all the flags reconized by creddit.\n");
    printf(" [String] --> argument takes a string\n");
    printf(" [Int]    --> argument takes an integer value\n");

    printf("\n");
    for (option = parser->options; *option != NULL; option++)
        displayCmd(*option);

    printf("\nYou will be prompted for a password if you don't include one\n");

    printf("\nTo report any bugs, submit patches, etc. Please see the github page at:\n");
    printf("http://www.github.com/Cotix/cReddit\n");
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
leaq 0x2537(%rip), %rdi      # 0x74e3
movb $0x0, %al
callq 0x2030
leaq 0x2560(%rip), %rdi      # 0x751a
movb $0x0, %al
callq 0x2030
leaq 0x258a(%rip), %rdi      # 0x7552
movb $0x0, %al
callq 0x2030
leaq 0x25a3(%rip), %rdi      # 0x7579
movb $0x0, %al
callq 0x2030
leaq 0x2534(%rip), %rdi      # 0x7518
movb $0x0, %al
callq 0x2030
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x5021
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x4ea0
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
jmp 0x4ff9
leaq 0x2580(%rip), %rdi      # 0x75a8
movb $0x0, %al
callq 0x2030
leaq 0x25b1(%rip), %rdi      # 0x75e7
movb $0x0, %al
callq 0x2030
leaq 0x25ed(%rip), %rdi      # 0x7631
movb $0x0, %al
callq 0x2030
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/Cotix[P]cReddit/src/opt.c
// Function: optAddOptions
void optAddOptions (optParser *parser, optOption *options, int optionCount)
{
    const int blockSize = 100;
    int opt = parser->optCount, i;
    parser->optCount += optionCount;

    /* Make sure to leave one empty arg */
    if (parser->optCount + 1 >= parser->optAllocCount) {
        do {
            parser->optAllocCount += blockSize;
            parser->options = realloc(parser->options, parser->optAllocCount * sizeof(optOption*));
            memset(parser->options, 0, blockSize * sizeof(optOption*));
        } while (parser->optCount + 1 >= parser->optAllocCount);
    }

    for (i = 0; i < optionCount; i++)
        parser->options[opt + i] = options + i;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movl $0x64, 0x10(%rsp)
movq 0x20(%rsp), %rax
movl 0x18(%rax), %eax
movl %eax, 0xc(%rsp)
movl 0x14(%rsp), %ecx
movq 0x20(%rsp), %rax
addl 0x18(%rax), %ecx
movl %ecx, 0x18(%rax)
movq 0x20(%rsp), %rax
movl 0x18(%rax), %eax
addl $0x1, %eax
movq 0x20(%rsp), %rcx
cmpl 0x1c(%rcx), %eax
jl 0x53bd
jmp 0x535c
movq 0x20(%rsp), %rax
movl 0x1c(%rax), %ecx
addl $0x64, %ecx
movl %ecx, 0x1c(%rax)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x20(%rsp), %rax
movslq 0x1c(%rax), %rsi
shlq $0x3, %rsi
callq 0x22f0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
movl $0x320, %edx            # imm = 0x320
callq 0x2110
movq 0x20(%rsp), %rax
movl 0x18(%rax), %eax
addl $0x1, %eax
movq 0x20(%rsp), %rcx
cmpl 0x1c(%rcx), %eax
jge 0x535c
jmp 0x53bd
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0x14(%rsp), %eax
jge 0x5408
movq 0x18(%rsp), %rdx
movslq 0x8(%rsp), %rax
imulq $0x1f0, %rax, %rax      # imm = 0x1F0
addq %rax, %rdx
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movl 0xc(%rsp), %ecx
addl 0x8(%rsp), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x53c5
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Cotix[P]cReddit/src/opt.c
// Function: optRunParser
optResponse optRunParser (optParser *parser)
{
    optResponse res = OPT_CONTINUE;

    if (parser->options == NULL)
        return OPT_SUCCESS;

    parser->curopt++;

    while ((parser->curopt != parser->argc) && res == OPT_CONTINUE) {
        if ((parser->argv)[parser->curopt][0] == '-') {
            if (parser->argv[parser->curopt][1] == '-')
                res = optParseLong(parser);
            else
                res = optParseChars(parser);

            parser->curopt++;
        } else {
            res = OPT_UNUSED;
        }
    }
    if (parser->curopt == parser->argc && res == OPT_CONTINUE)
        res = OPT_SUCCESS;

    return res;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl $0x3, 0x4(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x545a
movl $0x0, 0x14(%rsp)
jmp 0x5535
movq 0x8(%rsp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq 0x8(%rsp), %rax
movl 0x10(%rax), %ecx
movq 0x8(%rsp), %rdx
xorl %eax, %eax
cmpl (%rdx), %ecx
movb %al, 0x3(%rsp)
je 0x548b
cmpl $0x3, 0x4(%rsp)
sete %al
movb %al, 0x3(%rsp)
movb 0x3(%rsp), %al
testb $0x1, %al
jne 0x5495
jmp 0x550d
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rsp), %rcx
movslq 0x10(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x5500
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rsp), %rcx
movslq 0x10(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
jne 0x54e2
movq 0x8(%rsp), %rdi
callq 0x5540
movl %eax, 0x4(%rsp)
jmp 0x54f0
movq 0x8(%rsp), %rdi
callq 0x55f0
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
jmp 0x5508
movl $0x2, 0x4(%rsp)
jmp 0x5468
movq 0x8(%rsp), %rax
movl 0x10(%rax), %eax
movq 0x8(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x552d
cmpl $0x3, 0x4(%rsp)
jne 0x552d
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Cotix[P]cReddit/src/opt.c
// Function: optParseLong
static optResponse optParseLong (optParser *parser)
{
    optOption **option = parser->options;
    char str[OPT_LONG_MAX];

    /* add 2 so we don't copy the '--' at the beginning */
    strcpy(str, parser->argv[parser->curopt] + 2);

    for (; *option != NULL; option++)
        if (strcmp((*option)->opt_long, str) == 0)
            return optProcessOption(parser, *option);

    if (*option == NULL)
        return OPT_UNKNOWN;

    return OPT_CONTINUE;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x20(%rsp)
movq %rsp, %rdi
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rsp), %rcx
movslq 0x10(%rcx), %rcx
movq (%rax,%rcx,8), %rsi
addq $0x2, %rsi
callq 0x21d0
movq 0x20(%rsp), %rax
cmpq $0x0, (%rax)
je 0x55c3
movq 0x20(%rsp), %rax
movq (%rax), %rdi
movq %rsp, %rsi
callq 0x2260
cmpl $0x0, %eax
jne 0x55b1
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rax
movq (%rax), %rsi
callq 0x5670
movl %eax, 0x34(%rsp)
jmp 0x55e0
jmp 0x55b3
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
jmp 0x5579
movq 0x20(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x55d8
movl $0x1, 0x34(%rsp)
jmp 0x55e0
movl $0x3, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Cotix[P]cReddit/src/opt.c
// Function: optParseChars
static optResponse optParseChars (optParser *parser)
{
    int len;
    optResponse res = OPT_CONTINUE;

    len = strlen(parser->argv[parser->curopt]);

    for (parser->offset = 1; parser->offset < len; parser->offset++) {
        res = optCheckOpts(parser);
        if (res != OPT_CONTINUE)
            break;
    }
    return res;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl $0x3, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rsp), %rcx
movslq 0x10(%rcx), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x20d0
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl $0x1, 0x14(%rax)
movq 0x10(%rsp), %rax
movl 0x14(%rax), %eax
cmpl 0xc(%rsp), %eax
jge 0x5663
movq 0x10(%rsp), %rdi
callq 0x5790
movl %eax, 0x8(%rsp)
cmpl $0x3, 0x8(%rsp)
je 0x5651
jmp 0x5663
jmp 0x5653
movq 0x10(%rsp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
jmp 0x562c
movl 0x8(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Cotix[P]cReddit/src/opt.c
// Function: optProcessOption
static optResponse optProcessOption (optParser *parser, optOption *option)
{
    option->isSet = 1;
    switch (option->arg) {
    case OPT_INT:
        return optReadInt(parser, option);

    case OPT_STRING:
        return optReadString(parser, option);

    default:
        break;
    }
    return OPT_CONTINUE;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movb 0x1b5(%rax), %cl
orb $0x1, %cl
movb %cl, 0x1b5(%rax)
movq 0x10(%rsp), %rax
movl 0x20(%rax), %eax
movl %eax, 0xc(%rsp)
subl $0x1, %eax
je 0x56b0
jmp 0x56a5
movl 0xc(%rsp), %eax
subl $0x2, %eax
je 0x56c5
jmp 0x56da
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x56f0
movl %eax, 0x24(%rsp)
jmp 0x56e4
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x5740
movl %eax, 0x24(%rsp)
jmp 0x56e4
jmp 0x56dc
movl $0x3, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Cotix[P]cReddit/src/opt.c
// Function: optCheckOpts
static optResponse optCheckOpts (optParser *parser)
{
    optOption **option = parser->options;
    char c = parser->argv[parser->curopt][parser->offset];

    for (; *option != NULL; option++)
        if ((*option)->opt_short == c)
            return optProcessOption(parser, *option);

    if (*option == NULL)
        return OPT_UNKNOWN;

    return OPT_CONTINUE;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rsp), %rcx
movslq 0x10(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rsp), %rcx
movslq 0x14(%rcx), %rcx
movb (%rax,%rcx), %al
movb %al, 0xf(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x5817
movq 0x10(%rsp), %rax
movq (%rax), %rax
movsbl 0x1f(%rax), %eax
movsbl 0xf(%rsp), %ecx
cmpl %ecx, %eax
jne 0x5805
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
callq 0x5670
movl %eax, 0x24(%rsp)
jmp 0x5834
jmp 0x5807
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
jmp 0x57cd
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x582c
movl $0x1, 0x24(%rsp)
jmp 0x5834
movl $0x3, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/LoupVaillant[P]Monocypher-Utils/src/hash.c
// Function: parse_algorithm
static int parse_algorithm(getopt_ctx *ctx)
{
    const char *algorithm = getopt_parameter(ctx);
    if (algorithm == 0) {
        error("unspecified algorithm");
    }
    if (string_equal(algorithm, "blake2b")) { return BLAKE2B; }
    if (string_equal(algorithm, "sha512" )) { return SHA512;  }
    error("algorithm must be blake2b or sha512");
    return -1; // impossible
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x117f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x187c
leaq 0x10a39(%rip), %rdi     # 0x122b0
callq 0x11f30
movq -0x18(%rbp), %rdi
leaq 0x10a3f(%rip), %rsi     # 0x122c6
callq 0x119a0
cmpl $0x0, %eax
je 0x189a
movl $0x0, -0x4(%rbp)
jmp 0x18cb
movq -0x18(%rbp), %rdi
leaq 0x10a46(%rip), %rsi     # 0x122eb
callq 0x119a0
cmpl $0x0, %eax
je 0x18b8
movl $0x1, -0x4(%rbp)
jmp 0x18cb
leaq 0x10a0f(%rip), %rdi     # 0x122ce
callq 0x11f30
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/LoupVaillant[P]Monocypher-Utils/src/hash.c
// Function: parse_digest_size
static size_t parse_digest_size(getopt_ctx *ctx)
{
    const char *length = getopt_parameter(ctx);
    int l = int_of_string(length);
    if (l == -1         ) error("missing digest size"                     );
    if (l == -2         ) error("digest size must be a decimal integer."  );
    if (l == -3         ) error("digest size out of range (8 - 512 bits)" );
    if (l < 8 || l > 512) error("digest size out of range (8 - 512 bits)" );
    if (l % 8 != 0      ) error("digest size must be a multiple of 8 bits");
    return (size_t)l / 8;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x117f0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x11a40
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0x1917
leaq 0x109e0(%rip), %rdi     # 0x122f2
callq 0x11f30
cmpl $-0x2, -0x14(%rbp)
jne 0x1929
leaq 0x109e2(%rip), %rdi     # 0x12306
callq 0x11f30
cmpl $-0x3, -0x14(%rbp)
jne 0x193b
leaq 0x109f7(%rip), %rdi     # 0x1232d
callq 0x11f30
cmpl $0x8, -0x14(%rbp)
jl 0x194a
cmpl $0x200, -0x14(%rbp)     # imm = 0x200
jle 0x1956
leaq 0x109dc(%rip), %rdi     # 0x1232d
callq 0x11f30
movl -0x14(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x1972
leaq 0x109e8(%rip), %rdi     # 0x12355
callq 0x11f30
movslq -0x14(%rbp), %rax
shrq $0x3, %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/LoupVaillant[P]Monocypher-Utils/src/hash.c
// Function: parse_key
static int parse_key(getopt_ctx *ctx, uint8_t key[64])
{
    int key_size = read_buffer(key, 64, getopt_parameter(ctx));
    switch (key_size) {
    case -1: error("unspecified key"             );
    case -2: error("key too long"                );
    case -3: error("key has odd number of digits");
    case -4: error("key contains non-hex digits" );
    default:;
    }
    return key_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x117f0
movq -0x28(%rbp), %rdi
movq %rax, %rdx
movl $0x40, %esi
callq 0x11c10
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x3, %eax
ja 0x1a0a
movq -0x20(%rbp), %rax
leaq 0x10633(%rip), %rcx     # 0x12004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1099d(%rip), %rdi     # 0x1237e
callq 0x11f30
leaq 0x109a1(%rip), %rdi     # 0x1238e
callq 0x11f30
leaq 0x109a2(%rip), %rdi     # 0x1239b
callq 0x11f30
leaq 0x109b3(%rip), %rdi     # 0x123b8
callq 0x11f30
jmp 0x1a0c
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]rbtree/example/example2.c
// Function: main
int main(int argc, char **argv)
{
	rbtree_t tree = RBTREE_INIT(keycmp);
	int i;
	info_t *info;
	rbnode_t *n;
	
	/* insert */
	for(i = 0; i < 10; i++) {
		info = malloc(sizeof(info_t));
		info->entry.key = itop(i);
		info->value = i;
		rbtree_insert(&tree, &info->entry);
	}
	
	/* lookup */
	n = rbtree_lookup(&tree, itop(5));
	if (n)
		printf("Find %d.\n", rbtree_container_of(n, info_t, entry)->value);
	else
		printf("5 not exist.\n");
	
	/* delete */
	rbtree_remove(&tree, n);
	
	/* print */
	printf("parent node color   dir value\n");
	rbtree_foreach_inorder(&tree, print_node, NULL);
	
	free_rbtree(&tree);
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x2bbb(%rip), %rax      # 0x4dd8
movq %rax, -0x20(%rbp)
movq 0x2bb8(%rip), %rax      # 0x4de0
movq %rax, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0xa, -0x24(%rbp)
jge 0x227f
movl $0x30, %edi
callq 0x1060
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %edi
callq 0x2370
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rsi
addq $0x8, %rsi
leaq -0x20(%rbp), %rdi
callq 0x1170
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2233
movl $0x5, %edi
callq 0x2370
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0x14f0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x22cf
movq -0x38(%rbp), %rax
xorl %ecx, %ecx
movq %rcx, %rdx
addq $0x8, %rdx
subq %rdx, %rcx
movl (%rax,%rcx), %esi
leaq 0xd4a(%rip), %rdi       # 0x3004
xorl %eax, %eax
movq %rax, %rcx
addq $0x8, %rcx
subq %rcx, %rax
movb $0x0, %al
callq 0x1050
jmp 0x22dd
leaq 0xd38(%rip), %rdi       # 0x300e
movb $0x0, %al
callq 0x1050
movq -0x38(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x1570
leaq 0xd2b(%rip), %rdi       # 0x301c
movb $0x0, %al
callq 0x1050
leaq -0x20(%rbp), %rdi
leaq 0x8d(%rip), %rsi        # 0x2390
xorl %eax, %eax
movl %eax, %edx
callq 0x1c30
leaq -0x20(%rbp), %rdi
leaq 0x1a9(%rip), %rsi       # 0x24c0
xorl %eax, %eax
movl %eax, %edx
callq 0x1d20
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]rbtree/example/example2.c
// Function: print_node
static int print_node(rbtree_t *tree, rbnode_t *n, void *state)
{
	info_t *info = rbtree_container_of(n, info_t, entry);
	if (rbnode_is_root(n)) {
		printf("       %4d %5s       %5d\n",
			ptoi(n->key),
			rbnode_is_red(n) ? "red" : "black",
			info->value);
	}
	else {
		printf("%6d %4d %5s %5s %5d\n",
			ptoi(n->parent->key),
			ptoi(n->key),
			rbnode_is_red(n) ? "red" : "black",
			rbnode_is_right(n) ? "right" : "left",
			info->value);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
xorl %eax, %eax
movq %rax, %rcx
addq $0x8, %rcx
subq %rcx, %rax
addq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x2420
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2500
movl %eax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x21(%rbp)
je 0x23ec
movq -0x10(%rbp), %rax
cmpl $0x1, 0x8(%rax)
sete %al
movb %al, -0x21(%rbp)
movl -0x28(%rbp), %esi
movb -0x21(%rbp), %cl
leaq 0xc60(%rip), %rdx       # 0x3059
leaq 0xc55(%rip), %rax       # 0x3055
testb $0x1, %cl
cmovneq %rax, %rdx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
leaq 0xc27(%rip), %rdi       # 0x303b
movb $0x0, %al
callq 0x1050
jmp 0x24b6
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rdi
callq 0x2500
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2500
movl %eax, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x29(%rbp)
je 0x245c
movq -0x10(%rbp), %rax
cmpl $0x1, 0x8(%rax)
sete %al
movb %al, -0x29(%rbp)
movl -0x30(%rbp), %edx
movl -0x34(%rbp), %esi
movb -0x29(%rbp), %dil
leaq 0xbec(%rip), %rcx       # 0x3059
leaq 0xbe1(%rip), %rax       # 0x3055
testb $0x1, %dil
cmovneq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %r9
leaq 0xbe7(%rip), %r8        # 0x307a
leaq 0xbda(%rip), %rax       # 0x3074
cmpq %r9, %rdi
cmoveq %rax, %r8
movq -0x20(%rbp), %rax
movl (%rax), %r9d
leaq 0xbb0(%rip), %rdi       # 0x305f
movb $0x0, %al
callq 0x1050
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/shncpd.c
// Function: check_interface
static int
check_interface(struct interface *iif)
{
    int ifindex, rc;
    struct ipv6_mreq mreq;

    ifindex = if_nametoindex(iif->ifname);
    if(ifindex != iif->ifindex) {
        iif->ifindex = ifindex;
        if(iif->ifindex > 0) {
            memset(&mreq, 0, sizeof(mreq));
            memcpy(&mreq.ipv6mr_multiaddr, &protocol_group, 16);
            mreq.ipv6mr_interface = iif->ifindex;
            rc = setsockopt(protocol_socket, IPPROTO_IPV6, IPV6_JOIN_GROUP,
                            (char*)&mreq, sizeof(mreq));
            if(rc < 0) {
                perror("setsockopt(IPV6_JOIN_GROUP)");
                iif->ifindex = 0;
                goto fail;
            }
            schedule_ra(iif, 1, 0);
            return 1;
        }
    }
 fail:
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2210
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x3ffd
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jle 0x3ffb
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x2170
movq 0x122e6(%rip), %rax     # 0x16270
movq %rax, -0x2c(%rbp)
movq 0x122e3(%rip), %rax     # 0x16278
movq %rax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1c(%rbp)
movl 0x122eb(%rip), %edi     # 0x16294
movl $0x29, %esi
movl $0x14, %r8d
leaq -0x2c(%rbp), %rcx
movl %r8d, %edx
callq 0x2090
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x3fe2
leaq 0xe4d2(%rip), %rdi      # 0x124a2
callq 0x2300
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
jmp 0x3fff
movq -0x10(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x8b60
movl $0x1, -0x4(%rbp)
jmp 0x4006
jmp 0x3ffd
jmp 0x3fff
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/shncpd.c
// Function: init_signals
static void
init_signals(void)
{
    struct sigaction sa;
    sigset_t ss;

    sigemptyset(&ss);
    sa.sa_handler = sigexit;
    sa.sa_mask = ss;
    sa.sa_flags = 0;
    sigaction(SIGTERM, &sa, NULL);

    sigemptyset(&ss);
    sa.sa_handler = sigexit;
    sa.sa_mask = ss;
    sa.sa_flags = 0;
    sigaction(SIGHUP, &sa, NULL);

    sigemptyset(&ss);
    sa.sa_handler = sigexit;
    sa.sa_mask = ss;
    sa.sa_flags = 0;
    sigaction(SIGINT, &sa, NULL);

    sigemptyset(&ss);
    sa.sa_handler = sigdump;
    sa.sa_mask = ss;
    sa.sa_flags = 0;
    sigaction(SIGUSR1, &sa, NULL);

    sigemptyset(&ss);
    sa.sa_handler = sigrescan;
    sa.sa_mask = ss;
    sa.sa_flags = 0;
    sigaction(SIGUSR2, &sa, NULL);

#ifdef SIGINFO
    sigemptyset(&ss);
    sa.sa_handler = sigdump;
    sa.sa_mask = ss;
    sa.sa_flags = 0;
    sigaction(SIGINFO, &sa, NULL);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
leaq -0x118(%rbp), %rdi
callq 0x2200
leaq 0x242(%rip), %rax       # 0x4270
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
leaq -0x118(%rbp), %rsi
movl $0x80, %edx
callq 0x2230
movl $0x0, -0x10(%rbp)
movl $0xf, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2080
leaq -0x118(%rbp), %rdi
callq 0x2200
leaq 0x1f0(%rip), %rax       # 0x4270
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
leaq -0x118(%rbp), %rsi
movl $0x80, %edx
callq 0x2230
movl $0x0, -0x10(%rbp)
movl $0x1, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2080
leaq -0x118(%rbp), %rdi
callq 0x2200
leaq 0x19e(%rip), %rax       # 0x4270
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
leaq -0x118(%rbp), %rsi
movl $0x80, %edx
callq 0x2230
movl $0x0, -0x10(%rbp)
movl $0x2, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2080
leaq -0x118(%rbp), %rdi
callq 0x2200
leaq 0x16c(%rip), %rax       # 0x4290
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
leaq -0x118(%rbp), %rsi
movl $0x80, %edx
callq 0x2230
movl $0x0, -0x10(%rbp)
movl $0xa, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2080
leaq -0x118(%rbp), %rdi
callq 0x2200
leaq 0x13a(%rip), %rax       # 0x42b0
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
leaq -0x118(%rbp), %rsi
movl $0x80, %edx
callq 0x2230
movl $0x0, -0x10(%rbp)
movl $0xc, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2080
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/shncpd.c
// Function: check_routing
static int
check_routing()
{
    int is_now_a_router = kernel_router();

    if(is_now_a_router != was_a_router) {
        debugf("Change in routing status: %d -> %d\n",
               was_a_router, is_now_a_router);
        was_a_router = is_now_a_router;
        ra_routing_change(is_now_a_router);
        republish(0, 0);
        return 1;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb $0x0, %al
callq 0xf780
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x12061(%rip), %eax     # 0x1626c
je 0x4259
jmp 0x420f
cmpl $0x2, 0x12052(%rip)     # 0x16268
jl 0x4234
movl 0x1204e(%rip), %edx     # 0x1626c
movl -0x8(%rbp), %ecx
movl $0x2, %edi
leaq 0xe291(%rip), %rsi      # 0x124be
movb $0x0, %al
callq 0xfda0
jmp 0x4236
movl -0x8(%rbp), %eax
movl %eax, 0x1202d(%rip)     # 0x1626c
movl -0x8(%rbp), %edi
callq 0x8e50
xorl %esi, %esi
movl %esi, %edi
callq 0x48e0
movl $0x1, -0x4(%rbp)
jmp 0x4260
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/shncpd.c
// Function: check_neighs
static int
check_neighs()
{
    int i = 0;
    int flushed = 0;
    while(i < numneighs) {
        unsigned interval =
            neighs[i].keepalive_interval ?
            neighs[i].keepalive_interval : DNCP_KEEPALIVE_INTERVAL;
        interval = interval * DNCP_KEEPALIVE_MULTIPLIER_PERCENT / 100;
        if(ts_minus_msec(&now, &neighs[i].last_contact) > interval) {
            debugf("Flushing neighbour %s due to inactivity.\n",
                   format_32(neighs[i].id));
            flush_neighbour(&neighs[i]);
            flushed++;
        } else {
            i++;
        }
    }
    if(flushed) {
        silly_walk(find_node(myid, 0));
        return 1;
    } else {
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0x8(%rbp), %eax
leaq 0x11fc8(%rip), %rcx     # 0x162b8
cmpl (%rcx), %eax
jge 0x43e2
movslq -0x8(%rbp), %rcx
leaq 0x12b9d(%rip), %rax     # 0x16ea0
shlq $0x6, %rcx
addq %rcx, %rax
cmpl $0x0, 0x38(%rax)
je 0x432a
movslq -0x8(%rbp), %rcx
leaq 0x12b85(%rip), %rax     # 0x16ea0
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x38(%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x4334
movl $0x4e20, %eax           # imm = 0x4E20
movl %eax, -0x14(%rbp)
jmp 0x4334
movl -0x14(%rbp), %eax
movl %eax, -0x10(%rbp)
imull $0xd2, -0x10(%rbp), %eax
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x10(%rbp)
movslq -0x8(%rbp), %rax
leaq 0x12b48(%rip), %rsi     # 0x16ea0
shlq $0x6, %rax
addq %rax, %rsi
addq $0x28, %rsi
leaq 0x11f16(%rip), %rdi     # 0x16280
callq 0xfa70
cmpl -0x10(%rbp), %eax
jbe 0x43d4
jmp 0x4376
cmpl $0x2, 0x11eeb(%rip)     # 0x16268
jl 0x43b0
movslq -0x8(%rbp), %rax
leaq 0x12b16(%rip), %rdi     # 0x16ea0
shlq $0x6, %rax
addq %rax, %rdi
addq $0x8, %rdi
callq 0xfc40
movq %rax, %rdx
movl $0x2, %edi
leaq 0xe139(%rip), %rsi      # 0x124e2
movb $0x0, %al
callq 0xfda0
jmp 0x43b2
movslq -0x8(%rbp), %rax
leaq 0x12ae3(%rip), %rdi     # 0x16ea0
shlq $0x6, %rax
addq %rax, %rdi
callq 0x4bc0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x43dd
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x42e6
cmpl $0x0, -0xc(%rbp)
je 0x4407
leaq 0x11ea1(%rip), %rdi     # 0x16290
xorl %esi, %esi
callq 0x4c80
movq %rax, %rdi
callq 0x4f80
movl $0x1, -0x4(%rbp)
jmp 0x440e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/state.c
// Function: find_interface
struct interface *
find_interface(int ifindex)
{
    int i;
    for(i = 0; i < numinterfaces; i++) {
        if(interfaces[i].ifindex <= 0)
            continue;
        if(interfaces[i].ifindex == ifindex)
            return &interfaces[i];
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl 0x11e29(%rip), %eax     # 0x162b0
jge 0x44eb
movslq -0x10(%rbp), %rcx
leaq 0x11e2c(%rip), %rax     # 0x162c0
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jg 0x44a6
jmp 0x44e0
movslq -0x10(%rbp), %rcx
leaq 0x11e0f(%rip), %rax     # 0x162c0
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x44de
movslq -0x10(%rbp), %rcx
leaq 0x11df2(%rip), %rax     # 0x162c0
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x44f3
jmp 0x44e0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x447e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/state.c
// Function: interface_type
const char *
interface_type(struct interface *interface)
{
    switch(interface->type) {
    case INTERFACE_INTERNAL: return "internal";
    case INTERFACE_ADHOC: return "ad-hoc";
    case INTERFACE_MESH: return "mesh";
    case INTERFACE_LEAF: return "leaf";
    default: return "unknown";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x3, %eax
ja 0x4564
movq -0x18(%rbp), %rax
leaq 0xdfe5(%rip), %rcx      # 0x1250c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xdfe5(%rip), %rax      # 0x1251c
movq %rax, -0x8(%rbp)
jmp 0x456f
leaq 0xdfe1(%rip), %rax      # 0x12525
movq %rax, -0x8(%rbp)
jmp 0x456f
leaq 0xdfdb(%rip), %rax      # 0x1252c
movq %rax, -0x8(%rbp)
jmp 0x456f
leaq 0xdfd3(%rip), %rax      # 0x12531
movq %rax, -0x8(%rbp)
jmp 0x456f
leaq 0xdfcb(%rip), %rax      # 0x12536
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/state.c
// Function: flush_neighbour
void
flush_neighbour(struct neighbour *neigh)
{
    int i = neigh - neighs;

    assert(i >= 0 && i < numneighs);

    if(i < numneighs - 1)
        neighs[i] = neighs[numneighs - 1];
    MEM_UNDEFINED(neighs + numneighs - 1, sizeof(struct neighbour));

    numneighs--;
    republish(1, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
leaq 0x122c9(%rip), %rcx     # 0x16ea0
subq %rcx, %rax
sarq $0x6, %rax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x4bf4
movl -0xc(%rbp), %eax
cmpl 0x116c8(%rip), %eax     # 0x162b8
jge 0x4bf4
jmp 0x4c13
leaq 0xd97b(%rip), %rdi      # 0x12576
leaq 0xd98c(%rip), %rsi      # 0x1258e
movl $0x80, %edx
leaq 0xd988(%rip), %rcx      # 0x12596
callq 0x2150
movl -0xc(%rbp), %eax
movl 0x1169c(%rip), %ecx     # 0x162b8
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x4c58
movslq -0xc(%rbp), %rax
leaq 0x12272(%rip), %rdi     # 0x16ea0
shlq $0x6, %rax
addq %rax, %rdi
movl 0x1167d(%rip), %eax     # 0x162b8
subl $0x1, %eax
cltq
leaq 0x12259(%rip), %rsi     # 0x16ea0
shlq $0x6, %rax
addq %rax, %rsi
movl $0x40, %edx
callq 0x2230
jmp 0x4c5a
jmp 0x4c5c
movl 0x11656(%rip), %eax     # 0x162b8
addl $-0x1, %eax
movl %eax, 0x1164d(%rip)     # 0x162b8
movl $0x1, %esi
movl %esi, %edi
callq 0x48e0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/state.c
// Function: find_node
struct node *
find_node(const unsigned char *id, int create)
{
    int p = 0;

    if(numnodes > 0) {
        int m, g = numnodes - 1, c;

        do {
            m = (p + g) / 2;
            c = memcmp(id, nodes[m].id, 4);
            if(c == 0)
                return &nodes[m];
            else if(c < 0)
                g = m - 1;
            else
                p = m + 1;
        } while(p <= g);
    }

    if(!create || numnodes >= MAXNODES)
        return NULL;

    if(p < numnodes)
        memmove(nodes + p + 1, nodes + p,
                (numnodes - p) * sizeof(struct node));
    memset(&nodes[p], 0, sizeof(struct node));
    memcpy(nodes[p].id, id, 4);
    numnodes++;

    return &nodes[p];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x0, 0x11617(%rip)     # 0x162b4
jle 0x4d30
movl 0x1160b(%rip), %eax     # 0x162b4
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x18(%rbp), %eax
addl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rax
leaq 0x12bd1(%rip), %rsi     # 0x178a0
imulq $0x70, %rax, %rax
addq %rax, %rsi
addq $0x8, %rsi
movl $0x4, %edx
callq 0x21c0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x4d08
movslq -0x1c(%rbp), %rcx
leaq 0x12ba8(%rip), %rax     # 0x178a0
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x4df1
cmpl $0x0, -0x24(%rbp)
jge 0x4d19
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4d22
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x4d24
jmp 0x4d26
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x4caf
jmp 0x4d30
cmpl $0x0, -0x14(%rbp)
je 0x4d3f
cmpl $0x64, 0x11577(%rip)    # 0x162b4
jl 0x4d4c
movq $0x0, -0x8(%rbp)
jmp 0x4df1
movl -0x18(%rbp), %eax
cmpl 0x1155f(%rip), %eax     # 0x162b4
jge 0x4d93
movslq -0x18(%rbp), %rax
leaq 0x12b3e(%rip), %rdi     # 0x178a0
imulq $0x70, %rax, %rax
addq %rax, %rdi
addq $0x70, %rdi
movslq -0x18(%rbp), %rax
leaq 0x12b28(%rip), %rsi     # 0x178a0
imulq $0x70, %rax, %rax
addq %rax, %rsi
movl 0x1152f(%rip), %eax     # 0x162b4
subl -0x18(%rbp), %eax
cltq
imulq $0x70, %rax, %rdx
callq 0x22d0
movslq -0x18(%rbp), %rax
leaq 0x12b02(%rip), %rdi     # 0x178a0
imulq $0x70, %rax, %rax
addq %rax, %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x2170
movslq -0x18(%rbp), %rcx
leaq 0x12ae4(%rip), %rax     # 0x178a0
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x8(%rax)
movl 0x114e2(%rip), %eax     # 0x162b4
addl $0x1, %eax
movl %eax, 0x114d9(%rip)     # 0x162b4
movslq -0x18(%rbp), %rcx
leaq 0x12aba(%rip), %rax     # 0x178a0
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/state.c
// Function: flush_node
void
flush_node(struct node *node)
{
    int i = node - nodes;
    int j;

    assert(i >= 0 && i < numnodes);

    free(node->neighs);
    free(node->data);
    destroy_prefix_list(node->assigned);
    destroy_prefix_list(node->addresses);
    for(j = 0; j < node->numexts; j++)
        destroy_external(node->exts[j]);
    free(node->exts);

    if(i < numnodes - 1)
        memmove(nodes + i, nodes + i + 1,
                (numnodes - i - 1) * sizeof(struct node));
    MEM_UNDEFINED(nodes + numnodes - 1, sizeof(struct node));

    numnodes--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
leaq 0x12a89(%rip), %rcx     # 0x178a0
subq %rcx, %rax
movl $0x70, %ecx
cqto
idivq %rcx
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x4e3a
movl -0xc(%rbp), %eax
cmpl 0x1147e(%rip), %eax     # 0x162b4
jge 0x4e3a
jmp 0x4e59
leaq 0xd77e(%rip), %rdi      # 0x125bf
leaq 0xd746(%rip), %rsi      # 0x1258e
movl $0xb3, %edx
leaq 0xd782(%rip), %rcx      # 0x125d6
callq 0x2150
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xc2d0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0xc2d0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x68(%rcx), %eax
jge 0x4ec0
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4f40
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x4e94
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x2040
movl -0xc(%rbp), %eax
movl 0x113de(%rip), %ecx     # 0x162b4
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x4f1c
movslq -0xc(%rbp), %rax
leaq 0x129b8(%rip), %rdi     # 0x178a0
imulq $0x70, %rax, %rax
addq %rax, %rdi
movslq -0xc(%rbp), %rax
leaq 0x129a6(%rip), %rsi     # 0x178a0
imulq $0x70, %rax, %rax
addq %rax, %rsi
addq $0x70, %rsi
movl 0x113a9(%rip), %eax     # 0x162b4
subl -0xc(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x70, %rax, %rdx
callq 0x22d0
jmp 0x4f1e
jmp 0x4f20
movl 0x1138e(%rip), %eax     # 0x162b4
addl $-0x1, %eax
movl %eax, 0x11385(%rip)     # 0x162b4
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/state.c
// Function: node_index
static int
node_index(const unsigned char *id)
{
    struct node *node = find_node(id, 0);
    if(node) {
        assert(node - nodes >= 0 && node - nodes < numnodes);
        return node - nodes;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x4c80
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x52c6
movq -0x18(%rbp), %rax
leaq 0x1264f(%rip), %rcx     # 0x178a0
subq %rcx, %rax
movl $0x70, %ecx
cqto
idivq %rcx
cmpq $0x0, %rax
jl 0x528a
movq -0x18(%rbp), %rax
leaq 0x12631(%rip), %rcx     # 0x178a0
subq %rcx, %rax
movl $0x70, %ecx
cqto
idivq %rcx
movslq 0x11031(%rip), %rcx     # 0x162b4
cmpq %rcx, %rax
jge 0x528a
jmp 0x52a9
leaq 0xd3d0(%rip), %rdi      # 0x12661
leaq 0xd2f6(%rip), %rsi      # 0x1258e
movl $0xca, %edx
leaq 0xd3ea(%rip), %rcx      # 0x1268e
callq 0x2150
movq -0x18(%rbp), %rax
leaq 0x125ec(%rip), %rcx     # 0x178a0
subq %rcx, %rax
movl $0x70, %ecx
cqto
idivq %rcx
movl %eax, -0x4(%rbp)
jmp 0x52cd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/state.c
// Function: neigh_symmetric
static int
neigh_symmetric(const struct node *from, const struct node *to,
                const struct node_neighbour *neigh)
{
    int i;
    assert(id_eq(neigh->neigh, to->id));
    for(i = 0; i < to->numneighs; i++) {
        struct node_neighbour *meigh = &to->neighs[i];
        if(id_eq(meigh->neigh, from->id) &&
           meigh->nei == neigh->lei && meigh->lei == neigh->nei)
            return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
callq 0x48b0
cmpl $0x0, %eax
je 0x530c
jmp 0x532b
leaq 0xd3a1(%rip), %rdi      # 0x126b4
leaq 0xd274(%rip), %rsi      # 0x1258e
movl $0xd5, %edx
leaq 0xd3aa(%rip), %rcx      # 0x126d0
callq 0x2150
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x48(%rcx), %eax
jge 0x53a1
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x48b0
cmpl $0x0, %eax
je 0x5394
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x5394
movq -0x30(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x5394
movl $0x1, -0x4(%rbp)
jmp 0x53a8
jmp 0x5396
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x5332
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/state.c
// Function: node_hash
void
node_hash(unsigned char *h, const unsigned char *data, int len)
{
    md5_state_t ms;
    unsigned char digest[16];
    md5_init(&ms);
    md5_append(&ms, data, len);
    md5_finish(&ms, digest);
    memcpy(h, digest, 8);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq -0x6c(%rbp), %rdi
callq 0xfec0
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x6c(%rbp), %rdi
callq 0xff10
leaq -0x80(%rbp), %rsi
leaq -0x6c(%rbp), %rdi
callq 0x10f60
movq -0x8(%rbp), %rax
movq -0x80(%rbp), %rcx
movq %rcx, (%rax)
addq $0x80, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/state.c
// Function: network_hash
int
network_hash(unsigned char *h)
{
    md5_state_t ms;
    unsigned char digest[16];
    int i;

    /* This relies on the node table being sorted. */

    md5_init(&ms);
    for(i = 0; i < numnodes; i++) {
        unsigned char s[4];
        DO_HTONL(s, nodes[i].seqno);
        md5_append(&ms, s, 4);
        md5_append(&ms, nodes[i].datahash, 8);
    }
    md5_finish(&ms, digest);
    memcpy(h, digest, 8);
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xfec0
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
cmpl 0x10e7c(%rip), %eax     # 0x162b4
jge 0x54a0
jmp 0x543c
movslq -0x74(%rbp), %rcx
leaq 0x12459(%rip), %rax     # 0x178a0
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movl 0x24(%rax), %edi
callq 0x2160
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, -0x78(%rbp)
leaq -0x78(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movl $0x4, %edx
callq 0xff10
movslq -0x74(%rbp), %rax
leaq 0x12424(%rip), %rsi     # 0x178a0
imulq $0x70, %rax, %rax
addq %rax, %rsi
addq $0x1c, %rsi
leaq -0x60(%rbp), %rdi
movl $0x8, %edx
callq 0xff10
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x542f
leaq -0x70(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x10f60
movq -0x8(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movl $0x1, %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/state.c
// Function: all_dhcp_data
struct prefix_list *
all_dhcp_data(int ntp, int v4, int v6)
{
    int i, j, k;
    struct prefix_list *pl = create_prefix_list(), *pl2;

    for(i = 0; i < numnodes; i++) {
        for(j = 0; j < nodes[i].numexts; j++) {
            struct prefix_list *data =
                ntp ? nodes[i].exts[j]->ntp : nodes[i].exts[j]->dns;
            if(data == NULL)
                continue;
            for(k = 0; k < nodes[i].exts[j]->dns->numprefixes; k++) {
                struct prefix *p = &data->prefixes[k];
                if((!v4 && prefix_v4(p)) || (!v6 && !prefix_v4(p)))
                    continue;
                pl2 = prefix_list_cons_prefix(pl, p);
                if(pl2 == NULL) {
                    destroy_prefix_list(pl);
                    return NULL;
                }
                pl = pl2;
            }
        }
    }
    return pl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
callq 0xc2b0
movq %rax, -0x28(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0x10dba(%rip), %eax     # 0x162b4
jge 0x5666
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movslq -0x18(%rbp), %rdx
leaq 0x1238b(%rip), %rcx     # 0x178a0
imulq $0x70, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x68(%rcx), %eax
jge 0x5656
cmpl $0x0, -0xc(%rbp)
je 0x5553
movslq -0x18(%rbp), %rcx
leaq 0x1236a(%rip), %rax     # 0x178a0
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x60(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x5579
movslq -0x18(%rbp), %rcx
leaq 0x12342(%rip), %rax     # 0x178a0
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x60(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x558d
jmp 0x5648
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movslq -0x18(%rbp), %rdx
leaq 0x122fe(%rip), %rcx     # 0x178a0
imulq $0x70, %rdx, %rdx
addq %rdx, %rcx
movq 0x60(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x8(%rcx), %rcx
movswl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jge 0x5646
movq -0x38(%rbp), %rax
movq (%rax), %rax
movslq -0x20(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0x55ef
movq -0x40(%rbp), %rdi
callq 0xcfe0
cmpl $0x0, %eax
jne 0x5603
cmpl $0x0, -0x14(%rbp)
jne 0x5605
movq -0x40(%rbp), %rdi
callq 0xcfe0
cmpl $0x0, %eax
jne 0x5605
jmp 0x5638
movq -0x28(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0xc300
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x5630
movq -0x28(%rbp), %rdi
callq 0xc2d0
movq $0x0, -0x8(%rbp)
jmp 0x566e
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x5594
jmp 0x5648
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5507
jmp 0x5658
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x54f1
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jech[P]shncpd/send.c
// Function: flushbuf
int
flushbuf()
{
    struct sockaddr_in6 tob, *to;
    int rc;

    if(!buffered)
        return 0;

    if(buffered_interface) {
        memset(&tob, 0, sizeof(tob));
        tob.sin6_family = AF_INET6;
        memcpy(&tob.sin6_addr, &protocol_group, 16);
        tob.sin6_port = htons(protocol_port);
        tob.sin6_scope_id = buffered_interface->ifindex;
        to = &tob;
    } else {
        to = &buffered_sin6;
    }

    rc = sendto(protocol_socket, sendbuf, buffered, 0,
                (struct sockaddr*)to, sizeof(struct sockaddr_in6));

    if(rc < 0) {
        int saved_errno = errno;
        perror("sendto");
        errno = saved_errno;
    }

    buffered_interface = NULL;
    buffered = 0;
    MEM_UNDEFINED(sendbuf, SENDBUF_SIZE);
    MEM_UNDEFINED(&buffered_sin6, sizeof(buffered_sin6));

    return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
cmpl $0x0, 0x14dd1(%rip)     # 0x1a460
jne 0x569d
movl $0x0, -0x4(%rbp)
jmp 0x5782
cmpq $0x0, 0x14dc3(%rip)     # 0x1a468
je 0x56ff
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x1c, %edx
callq 0x2170
movw $0xa, -0x20(%rbp)
leaq 0x10bac(%rip), %rax     # 0x16270
movq (%rax), %rcx
movq %rcx, -0x18(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
leaq 0x10b16(%rip), %rax     # 0x161f0
movl (%rax), %eax
movzwl %ax, %edi
callq 0x2100
movw %ax, -0x1e(%rbp)
movq 0x14d79(%rip), %rax     # 0x1a468
movl 0x8(%rax), %eax
movl %eax, -0x8(%rbp)
leaq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x570a
leaq 0x14d6a(%rip), %rax     # 0x1a470
movq %rax, -0x28(%rbp)
leaq 0x10b83(%rip), %rax     # 0x16294
movl (%rax), %edi
movq 0x14d76(%rip), %rsi     # 0x1a490
movslq 0x14d3f(%rip), %rdx     # 0x1a460
movq -0x28(%rbp), %r8
xorl %ecx, %ecx
movl $0x1c, %r9d
callq 0x2180
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0x5761
callq 0x2050
movl (%rax), %eax
movl %eax, -0x30(%rbp)
leaq 0xcfe1(%rip), %rdi      # 0x1272d
callq 0x2300
movl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
callq 0x2050
movl -0x34(%rbp), %ecx
movl %ecx, (%rax)
movq $0x0, 0x14cfc(%rip) # 0x1a468
movl $0x0, 0x14cea(%rip)     # 0x1a460
jmp 0x5778
jmp 0x577a
jmp 0x577c
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)