// File: /workspace/github_c_makefile_star2_O2/jech[P]dht/dht.c
// Function: send_find_node
int
send_find_node(const struct sockaddr *sa, int salen,
               const unsigned char *tid, int tid_len,
               const unsigned char *target, int want, int confirm)
{
    char buf[512];
    int i = 0, rc;
    rc = snprintf(buf + i, 512 - i, "d1:ad2:id20:"); INC(i, rc, 512);
    COPY(buf, i, myid, 20, 512);
    rc = snprintf(buf + i, 512 - i, "6:target20:"); INC(i, rc, 512);
    COPY(buf, i, target, 20, 512);
    if(want > 0) {
        rc = snprintf(buf + i, 512 - i, "4:wantl%s%se",
                      (want & WANT4) ? "2:n4" : "",
                      (want & WANT6) ? "2:n6" : "");
        INC(i, rc, 512);
    }
    rc = snprintf(buf + i, 512 - i, "e1:q9:find_node1:t%d:", tid_len);
    INC(i, rc, 512);
    COPY(buf, i, tid, tid_len, 512);
    ADD_V(buf, i, 512);
    rc = snprintf(buf + i, 512 - i, "1:y1:qe"); INC(i, rc, 512);
    return dht_send(buf, i, confirm ? MSG_CONFIRM : 0, sa, salen);

 fail:
    errno = ENOSPC;
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movl %r9d, %ebp
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movabsq $0x3a303264693a32, %rax # imm = 0x3A303264693A32
movq %rax, 0x5(%rsp)
movabsq $0x693a3264613a3164, %rax # imm = 0x693A3264613A3164
movq %rax, (%rsp)
movl 0x639d(%rip), %eax      # 0xdc40
movl %eax, 0x1c(%rsp)
movaps 0x6382(%rip), %xmm0     # 0xdc30
movups %xmm0, 0xc(%rsp)
movabsq $0x7465677261743a36, %rax # imm = 0x7465677261743A36
movq %rax, 0x20(%rsp)
movl $0x3a3032, 0x28(%rsp)   # imm = 0x3A3032
movups (%rcx), %xmm0
movups %xmm0, 0x2b(%rsp)
movl 0x10(%rcx), %eax
movl %eax, 0x3b(%rsp)
testl %r8d, %r8d
jle 0x792b
leaq 0x3f(%rsp), %rdi
testb $0x1, %r8b
leaq 0xa2a(%rip), %rax       # 0x8318
leaq 0xfcc(%rip), %rcx       # 0x88c1
cmoveq %rax, %rcx
testb $0x2, %r8b
leaq 0xfc2(%rip), %r8        # 0x88c6
cmoveq %rax, %r8
leaq 0xfa5(%rip), %rdx       # 0x88b4
movl $0x1c1, %esi            # imm = 0x1C1
xorl %eax, %eax
callq 0x2110
cmpl $0x1c1, %eax            # imm = 0x1C1
ja 0x79ce
addl $0x3f, %eax
jmp 0x792e
pushq $0x3f
popq %rax
movl %eax, %r12d
leaq (%rsp,%r12), %rdi
movl $0x200, %esi            # imm = 0x200
subl %eax, %esi
leaq 0xffb(%rip), %rdx       # 0x893e
pushq $0x4
popq %rcx
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x79ce
movl %eax, %eax
addq %rax, %r12
cmpl $0x200, %r12d           # imm = 0x200
ja 0x79ce
cmpl $0x1fc, %r12d           # imm = 0x1FC
ja 0x79ce
leal 0x4(%r12), %r13d
movl (%r15), %eax
movl %eax, (%rsp,%r12)
cmpb $0x1, 0x6301(%rip)      # 0xdc7c
jne 0x79a3
cmpl $0x1f3, %r12d           # imm = 0x1F3
ja 0x79ce
movl %r13d, %eax
leal 0xd(%r12), %r13d
movb 0x62e4(%rip), %cl       # 0xdc78
movb %cl, 0x8(%rsp,%rax)
movq 0x62d1(%rip), %rcx      # 0xdc70
movq %rcx, (%rsp,%rax)
movl %r13d, %eax
leaq (%rsp,%rax), %rdi
movl $0x200, %esi            # imm = 0x200
subl %r13d, %esi
leaq 0xd0f(%rip), %rdx       # 0x86c8
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x79ce
addl %r13d, %eax
cmpl $0x200, %eax            # imm = 0x200
jbe 0x79eb
callq 0x2060
movl $0x1c, (%rax)
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %esi
xorl %edx, %edx
testl %ebp, %ebp
setne %dl
shll $0xb, %edx
movq %rsp, %rdi
movq %r14, %rcx
movl %ebx, %r8d
callq 0x7516
jmp 0x79d9