// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %rdi, %rbx
movq 0x28(%rsi), %r13
leaq 0x5664(%rip), %rdi      # 0x971c
movl $0x7, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2300
movl $0x4, %r12d
leaq 0x5640(%rip), %r15      # 0x9717
movzbl (%r14,%r12), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x21c0
incq %r12
cmpq $0x18, %r12
jne 0x40d7
movl 0x18(%r14), %ebp
movl 0x1c(%r14), %r15d
movl 0x9b0f(%rip), %r12d     # 0xdc10
subl 0x20(%r14), %r12d
movq %r14, %rdi
callq 0x7e4c
testl %eax, %eax
leaq 0x5202(%rip), %rax      # 0x9318
leaq 0x5621(%rip), %r9       # 0x973e
cmoveq %rax, %r9
cmpw $0x0, 0x30(%r14)
leaq 0x5618(%rip), %rcx      # 0x9746
cmoveq %rax, %rcx
movq %rcx, (%rsp)
leaq 0x55e7(%rip), %rsi      # 0x9724
movq %rbx, %rdi
movl %ebp, %edx
movl %r15d, %ecx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x21c0
testq %r13, %r13
je 0x42e2
leaq 0x55b8(%rip), %r15      # 0x9717
leaq 0x10(%rsp), %r12
leaq 0x5605(%rip), %r14      # 0x9770
movl $0x9, %esi
movl $0x1, %edx
leaq 0x55d4(%rip), %rdi      # 0x9750
movq %rbx, %rcx
callq 0x2300
xorl %ebp, %ebp
movzbl (%r13,%rbp), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x21c0
incq %rbp
cmpq $0x14, %rbp
jne 0x4186
movzwl 0x18(%r13), %ecx
cmpl $0xa, %ecx
je 0x41bc
cmpl $0x2, %ecx
jne 0x41dd
leaq 0x1c(%r13), %rsi
movl $0x2, %edi
jmp 0x41c5
leaq 0x20(%r13), %rsi
movl $0xa, %edi
movq %r12, %rdx
movl $0x200, %ecx            # imm = 0x200
callq 0x2030
movzwl 0x1a(%r13), %ebp
rolw $0x8, %bp
jmp 0x41f5
xorl %ebp, %ebp
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdi
leaq 0x556c(%rip), %rdx      # 0x975a
xorl %eax, %eax
callq 0x2110
cmpw $0xa, 0x18(%r13)
movzwl %bp, %ecx
movq %r14, %rsi
leaq 0x555e(%rip), %rax      # 0x9766
cmoveq %rax, %rsi
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x21c0
movq 0xa0(%r13), %rsi
movq 0xa8(%r13), %rax
movq 0x99e2(%rip), %rcx      # 0xdc10
movq %rcx, %rdx
subq %rsi, %rdx
cmpq %rax, %rsi
jne 0x424c
movq %rbx, %rdi
leaq 0x5542(%rip), %rsi      # 0x9785
xorl %eax, %eax
callq 0x21c0
jmp 0x4260
subq %rax, %rcx
movq %rbx, %rdi
leaq 0x551f(%rip), %rsi      # 0x9778
xorl %eax, %eax
callq 0x21c0
movl 0xb8(%r13), %edx
testl %edx, %edx
je 0x4286
movq %rbx, %rdi
leaq 0x505b(%rip), %rsi      # 0x92d0
xorl %eax, %eax
callq 0x21c0
cmpl $0x2, 0xb8(%r13)
jg 0x42c5
movq 0x9983(%rip), %rax      # 0xdc10
leaq -0x1c20(%rax), %rcx
cmpq %rcx, 0xa8(%r13)
jl 0x42c5
addq $-0x384, %rax           # imm = 0xFC7C
cmpq %rax, 0xa0(%r13)
jl 0x42c5
movl $0x7, %esi
movl $0x1, %edx
leaq 0x54d0(%rip), %rdi      # 0x978d
movq %rbx, %rcx
callq 0x2300
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2170
movq 0xc0(%r13), %r13
testq %r13, %r13
jne 0x416b
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq