// File: /workspace/github_c_makefile_star2_O3/jech[P]shncpd/ra.c
// Function: send_multicast_ra
static int
send_multicast_ra(struct interface *interface, int router)
{
    const unsigned char all_nodes[16] =
        {0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
    struct sockaddr_in6 to;
    int rc;

    if(interface == NULL) {
        int i;
        for(i = 0; i < numinterfaces; i++) {
            if(interfaces[i].ifindex > 0)
                send_multicast_ra(&interfaces[i], router);
        }
        return 1;
    }

    if(ts_minus_msec(&now, &interface->last_ra_sent) < MIN_DELAY_BETWEEN_RAS)
        return 0;

    memset(&to, 0, sizeof(to));
    to.sin6_family = AF_INET6;
    memcpy(&to.sin6_addr, all_nodes, 16);
    to.sin6_scope_id = interface->ifindex;
    rc = send_ra(interface, &to, router);
    interface->last_ra_sent = now;
    return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movl %esi, %ebp
testq %rdi, %rdi
je 0x7948
movq %rdi, %r15
leaq 0x80(%rdi), %rbx
leaq 0xbc20(%rip), %r14      # 0x13270
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb4e5
xorl %r12d, %r12d
cmpl $0xbb8, %eax            # imm = 0xBB8
jl 0x79d7
xorl %eax, %eax
movq %rax, 0x20(%rsp)
movw $0xa, 0x20(%rsp)
movaps 0x6672(%rip), %xmm0     # 0xdcf0
movups %xmm0, 0x28(%rsp)
movl 0x8(%r15), %ecx
movl %ecx, 0x38(%rsp)
movl %ebp, 0xc(%rsp)
cmpl $0x2, %ebp
movl $0xe10, %ecx            # imm = 0xE10
cmovll %eax, %ecx
rolw $0x8, %cx
movb $-0x7a, 0x40(%rsp)
movl $0x0, 0x41(%rsp)
movb $0x0, 0x45(%rsp)
movw %cx, 0x46(%rsp)
movq %rax, 0x48(%rsp)
movq 0x90(%r15), %rdi
movl $0x10, %r13d
testq %rdi, %rdi
je 0x773a
movswq 0x8(%rdi), %rcx
testq %rcx, %rcx
jle 0x773a
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rax
addq %rcx, %rax
movl $0x10, %r13d
xorl %ecx, %ecx
cmpq $0x364, %rcx            # imm = 0x364
je 0x799b
movq (%rdi), %rdx
movw $0x403, 0x40(%rsp,%r13) # imm = 0x403
movb 0x10(%rdx,%rcx), %sil
movb %sil, 0x42(%rsp,%r13)
movb $-0x80, 0x43(%rsp,%r13)
movq $0x0, 0x44(%rsp,%r13)
movl $0x0, 0x4c(%rsp,%r13)
movups (%rdx,%rcx), %xmm0
movups %xmm0, 0x50(%rsp,%r13)
addq $0x20, %r13
addq $0x1c, %rcx
cmpq %rcx, %rax
jne 0x76e9
callq 0x92d1
movq $0x0, 0x90(%r15)
cmpl $0x0, 0xc(%rsp)
movq %rbx, 0x10(%rsp)
jle 0x77eb
cmpl $0x0, 0x68(%r15)
jle 0x77eb
movl $0x1c, %r14d
xorl %ebx, %ebx
movq 0x60(%r15), %rbp
cmpl $0x0, 0x20(%rbp,%r14)
je 0x77db
leaq (%r14,%rbp), %r12
movq %r12, %rdi
callq 0x99f6
testl %eax, %eax
jne 0x77db
movb 0x10(%rbp,%r14), %al
testb %al, %al
js 0x77db
cmpl $0x3e0, %r13d           # imm = 0x3E0
jg 0x798d
movslq %r13d, %rcx
movw $0x403, 0x40(%rsp,%rcx) # imm = 0x403
movb %al, 0x42(%rsp,%rcx)
movb $-0x40, 0x43(%rsp,%rcx)
movabsq $0x8070000100e0000, %rax # imm = 0x8070000100E0000
movq %rax, 0x44(%rsp,%rcx)
movl $0x0, 0x4c(%rsp,%rcx)
movups (%r12), %xmm0
leaq 0x50(%rsp), %rax
movups %xmm0, (%rax,%rcx)
addl $0x20, %r13d
incq %rbx
movslq 0x68(%r15), %rax
addq $0x70, %r14
cmpq %rax, %rbx
jl 0x776d
callq 0x9d6a
movq %rax, %r15
testq %rax, %rax
je 0x789a
cmpw $0x0, 0x8(%r15)
jle 0x789a
xorl %r14d, %r14d
cmpl $0x0, 0xc(%rsp)
movl $0xe10, %eax            # imm = 0xE10
cmovlel %r14d, %eax
bswapl %eax
movl %eax, 0x1c(%rsp)
xorl %ebx, %ebx
movq (%r15), %rbp
leaq (%r14,%rbp), %r12
movq %r12, %rdi
callq 0x99f6
testl %eax, %eax
jne 0x7889
cmpl $0x3e0, %r13d           # imm = 0x3E0
jg 0x798d
movslq %r13d, %rax
leaq (%rsp,%rax), %rdi
addq $0x48, %rdi
movb $0x18, -0x8(%rdi)
movb 0x10(%rbp,%r14), %al
xorl %ebp, %ebp
cmpb $0x41, %al
setae %bpl
leal 0x2(%rbp), %ecx
movb %cl, -0x7(%rdi)
movb %al, -0x6(%rdi)
movb $0x0, -0x5(%rdi)
movl 0x1c(%rsp), %eax
movl %eax, -0x4(%rdi)
leal (,%rbp,8), %edx
addq $0x8, %rdx
movq %r12, %rsi
callq 0x2210
leal 0x10(%r13,%rbp,8), %r13d
incq %rbx
movswq 0x8(%r15), %rax
addq $0x1c, %r14
cmpq %rax, %rbx
jl 0x7821
movq %r15, %rdi
callq 0x92d1
cmpl $0x0, 0xc(%rsp)
jle 0x798d
xorl %edi, %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x4f13
testq %rax, %rax
movq 0x10(%rsp), %rbx
leaq 0xb9a6(%rip), %r14      # 0x13270
je 0x793e
movswl 0x8(%rax), %ecx
testl %ecx, %ecx
jle 0x793e
movl %ecx, %edx
shll $0x4, %edx
addl %r13d, %edx
addl $0x8, %edx
cmpl $0x400, %edx            # imm = 0x400
jg 0x79a1
movslq %r13d, %rdx
addl $0x8, %r13d
movb $0x19, 0x40(%rsp,%rdx)
leal (%rcx,%rcx), %esi
incb %sil
movb %sil, 0x41(%rsp,%rdx)
movw $0x0, 0x42(%rsp,%rdx)
movl $0xa0bb0d00, 0x44(%rsp,%rdx) # imm = 0xA0BB0D00
movslq %r13d, %rsi
movq (%rax), %rdx
movzwl %cx, %ecx
shll $0x4, %ecx
leaq (%rsp,%rsi), %rdi
addq $0x40, %rdi
xorl %esi, %esi
movups (%rdx), %xmm0
movups %xmm0, (%rdi,%rsi)
addq $0x10, %rsi
addq $0x1c, %rdx
cmpq %rsi, %rcx
jne 0x7927
addl %esi, %r13d
movq %rax, %rdi
callq 0x92d1
jmp 0x79a1
leaq 0xb951(%rip), %r14      # 0x132a0
movl (%r14), %eax
movl $0x1, %r12d
testl %eax, %eax
jle 0x79d7
leaq 0xb94d(%rip), %rbx      # 0x132b0
xorl %r15d, %r15d
cmpl $0x0, 0x8(%rbx)
jle 0x7979
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7623
movl (%r14), %eax
incq %r15
movslq %eax, %rcx
addq $0x98, %rbx
cmpq %rcx, %r15
jl 0x7966
jmp 0x79d7
movq 0x10(%rsp), %rbx
leaq 0xb8d7(%rip), %r14      # 0x13270
jmp 0x79a1
movl $0x3f0, %r13d           # imm = 0x3F0
leaq 0xb8b0(%rip), %rax      # 0x13258
cmpl $0x2, (%rax)
jge 0x79ec
movl 0xb839(%rip), %edi      # 0x131ec
movslq %r13d, %rdx
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %r8
xorl %ecx, %ecx
movl $0x1c, %r9d
callq 0x2170
movq %rax, %r12
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movl %r12d, %eax
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2d94
jmp 0x79ad