// File: /workspace/github_c_makefile_star2_O2/jech[P]dht/dht.c
// Function: dump_bucket
static void
dump_bucket(FILE *f, struct bucket *b)
{
    struct node *n = b->nodes;
    fprintf(f, "Bucket ");
    print_hex(f, b->first, 20);
    fprintf(f, " count %d/%d age %d%s%s:\n",
            b->count, b->max_count, (int)(now.tv_sec - b->time),
            in_bucket(myid, b) ? " (mine)" : "",
            b->cached.ss_family ? " (cached)" : "");
    while(n) {
        char buf[512];
        unsigned short port;
        fprintf(f, "    Node ");
        print_hex(f, n->id, 20);
        if(n->ss.ss_family == AF_INET) {
            struct sockaddr_in *sin = (struct sockaddr_in*)&n->ss;
            inet_ntop(AF_INET, &sin->sin_addr, buf, 512);
            port = ntohs(sin->sin_port);
        } else if(n->ss.ss_family == AF_INET6) {
            struct sockaddr_in6 *sin6 = (struct sockaddr_in6*)&n->ss;
            inet_ntop(AF_INET6, &sin6->sin6_addr, buf, 512);
            port = ntohs(sin6->sin6_port);
        } else {
            snprintf(buf, 512, "unknown(%d)", n->ss.ss_family);
            port = 0;
        }

        if(n->ss.ss_family == AF_INET6)
            fprintf(f, " [%s]:%d ", buf, port);
        else
            fprintf(f, " %s:%d ", buf, port);
        if(n->time != n->reply_time)
            fprintf(f, "age %ld, %ld",
                    (long)(now.tv_sec - n->time),
                    (long)(now.tv_sec - n->reply_time));
        else
            fprintf(f, "age %ld", (long)(now.tv_sec - n->time));
        if(n->pinged)
            fprintf(f, " (%d)", n->pinged);
        if(node_good(n))
            fprintf(f, " (good)");
        fprintf(f, "\n");
        n = n->next;
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %r15
movq %rdi, %rbx
movq 0x28(%rsi), %r14
leaq 0x4982(%rip), %rdi      # 0x871c
pushq $0x7
popq %rsi
pushq $0x1
popq %r12
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2300
leaq 0x4(%r15), %rsi
movq %rbx, %rdi
callq 0x3d37
movl 0x18(%r15), %eax
movl %eax, 0xc(%rsp)
movl 0x1c(%r15), %r13d
movl 0x9e46(%rip), %ebp      # 0xdc10
subl 0x20(%r15), %ebp
movq %r15, %rdi
callq 0x7331
testl %eax, %eax
leaq 0x4539(%rip), %rax      # 0x8318
leaq 0x4958(%rip), %r9       # 0x873e
cmoveq %rax, %r9
cmpw $0x0, 0x30(%r15)
leaq 0x494f(%rip), %rcx      # 0x8746
cmoveq %rax, %rcx
movq %rcx, (%rsp)
leaq 0x491e(%rip), %rsi      # 0x8724
movq %rbx, %rdi
movl 0xc(%rsp), %edx
movl %r13d, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x21c0
pushq $0xa
popq %r15
leaq 0x10(%rsp), %r13
testq %r14, %r14
je 0x3f5e
leaq 0x491d(%rip), %rdi      # 0x8750
pushq $0x9
popq %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2300
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3d37
movzwl 0x18(%r14), %ecx
cmpl $0xa, %ecx
je 0x3e64
cmpl $0x2, %ecx
jne 0x3e83
leaq 0x1c(%r14), %rsi
pushq $0x2
popq %rdi
jmp 0x3e6b
leaq 0x20(%r14), %rsi
movl %r15d, %edi
movq %r13, %rdx
movl $0x200, %ecx            # imm = 0x200
callq 0x2030
movzwl 0x1a(%r14), %ebp
rolw $0x8, %bp
jmp 0x3e9b
xorl %ebp, %ebp
movl $0x200, %esi            # imm = 0x200
movq %r13, %rdi
leaq 0x48c6(%rip), %rdx      # 0x875a
xorl %eax, %eax
callq 0x2110
cmpw $0xa, 0x18(%r14)
movzwl %bp, %ecx
leaq 0x48c5(%rip), %rsi      # 0x8770
leaq 0x48b4(%rip), %rax      # 0x8766
cmoveq %rax, %rsi
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x21c0
movq 0xa0(%r14), %rsi
movq 0xa8(%r14), %rax
movq 0x9d38(%rip), %rcx      # 0xdc10
movq %rcx, %rdx
subq %rsi, %rdx
cmpq %rax, %rsi
jne 0x3ef6
movq %rbx, %rdi
leaq 0x4898(%rip), %rsi      # 0x8785
xorl %eax, %eax
callq 0x21c0
jmp 0x3f0a
subq %rax, %rcx
movq %rbx, %rdi
leaq 0x4875(%rip), %rsi      # 0x8778
xorl %eax, %eax
callq 0x21c0
movl 0xb8(%r14), %edx
testl %edx, %edx
je 0x3f26
movq %rbx, %rdi
leaq 0x43b1(%rip), %rsi      # 0x82d0
xorl %eax, %eax
callq 0x21c0
movq %r14, %rdi
callq 0x3956
testl %eax, %eax
je 0x3f47
leaq 0x4854(%rip), %rdi      # 0x878d
pushq $0x7
popq %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2300
movl %r15d, %edi
movq %rbx, %rsi
callq 0x2170
movq 0xc0(%r14), %r14
jmp 0x3e23
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq