// File: /workspace/github_c_makefile_star2_O0/jech[P]dht/dht.c
// Function: search_send_get_peers
static int
search_send_get_peers(struct search *sr, struct search_node *n)
{
    struct node *node;
    unsigned char tid[4];

    if(n == NULL) {
        int i;
        for(i = 0; i < sr->numnodes; i++) {
            if(sr->nodes[i].pinged < 3 && !sr->nodes[i].replied &&
               sr->nodes[i].request_time < now.tv_sec - DHT_SEARCH_RETRANSMIT)
                n = &sr->nodes[i];
        }
    }

    if(!n || n->pinged >= 3 || n->replied ||
       n->request_time >= now.tv_sec - DHT_SEARCH_RETRANSMIT)
        return 0;

    debugf("Sending get_peers.\n");
    make_tid(tid, "gp", sr->tid);
    send_get_peers((struct sockaddr*)&n->ss, n->sslen, tid, 4, sr->id, -1,
                   n->reply_time >= now.tv_sec - DHT_SEARCH_RETRANSMIT);
    n->pinged++;
    n->request_time = now.tv_sec;
    /* If the node happens to be in our main routing table, mark it
       as pinged. */
    node = find_node(n->id, n->ss.ss_family);
    if(node) pinged(node, NULL);
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x7d9c
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xce0(%rcx), %eax
jge 0x7d9a
movq -0x10(%rbp), %rax
addq $0x30, %rax
movslq -0x28(%rbp), %rcx
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
cmpl $0x3, 0xb0(%rax)
jge 0x7d8a
movq -0x10(%rbp), %rax
addq $0x30, %rax
movslq -0x28(%rbp), %rcx
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xe0(%rax)
jne 0x7d8a
movq -0x10(%rbp), %rax
addq $0x30, %rax
movslq -0x28(%rbp), %rcx
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
movq 0xa0(%rax), %rax
movq 0x8ea9(%rip), %rcx      # 0x10c10
subq $0xa, %rcx
cmpq %rcx, %rax
jge 0x7d8a
movq -0x10(%rbp), %rax
addq $0x30, %rax
movslq -0x28(%rbp), %rcx
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x7d8c
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x7cf2
jmp 0x7d9c
cmpq $0x0, -0x18(%rbp)
je 0x7dd8
movq -0x18(%rbp), %rax
cmpl $0x3, 0xb0(%rax)
jge 0x7dd8
movq -0x18(%rbp), %rax
cmpl $0x0, 0xe0(%rax)
jne 0x7dd8
movq -0x18(%rbp), %rax
movq 0xa0(%rax), %rax
movq 0x8e41(%rip), %rcx      # 0x10c10
subq $0xa, %rcx
cmpq %rcx, %rax
jl 0x7de4
movl $0x0, -0x4(%rbp)
jmp 0x7eb0
leaq 0x4ac7(%rip), %rdi      # 0xc8b2
movb $0x0, %al
callq 0x3aa0
leaq -0x24(%rbp), %rdi
movq -0x10(%rbp), %rax
leaq 0x45f3(%rip), %rsi      # 0xc3f4
movzwl (%rax), %edx
callq 0x9990
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movl 0x98(%rax), %esi
leaq -0x24(%rbp), %rdx
movq -0x10(%rbp), %r8
addq $0x10, %r8
movq -0x18(%rbp), %rax
movq 0xa8(%rax), %rax
movq 0x8dd7(%rip), %rcx      # 0x10c10
subq $0xa, %rcx
cmpq %rcx, %rax
setge %al
andb $0x1, %al
movzbl %al, %eax
movl $0x4, %ecx
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movl %eax, (%rsp)
callq 0xa9f0
movq -0x18(%rbp), %rax
movl 0xb0(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xb0(%rax)
movq 0x8d9b(%rip), %rcx      # 0x10c10
movq -0x18(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movzwl 0x18(%rax), %esi
callq 0x4cb0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x7ea9
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa090
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)