// File: /workspace/github_c_makefile_star2_O2/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 0x6aa2
movq %rdi, %r15
leaq 0x80(%rdi), %rbx
leaq 0xa8ab(%rip), %r14      # 0x11270
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa7c8
xorl %r12d, %r12d
cmpl $0xbb8, %eax            # imm = 0xBB8
jl 0x6d47
andq $0x0, 0x20(%rsp)
movw $0xa, 0x20(%rsp)
movaps 0x62de(%rip), %xmm0     # 0xccd0
movups %xmm0, 0x28(%rsp)
movl 0x8(%r15), %ecx
movb $-0x7a, 0x40(%rsp)
xorl %eax, %eax
movl %ebp, 0xc(%rsp)
cmpl $0x2, %ebp
movl $0xe10, %edx            # imm = 0xE10
cmovll %eax, %edx
rolw $0x8, %dx
andl $0x0, 0x41(%rsp)
movb $0x0, 0x45(%rsp)
movw %dx, 0x46(%rsp)
andq $0x0, 0x48(%rsp)
movl %ecx, 0x38(%rsp)
movq 0x90(%r15), %rdi
testq %rdi, %rdi
je 0x6ae5
movl 0x8(%rdi), %ecx
testw %cx, %cx
cmovlel %eax, %ecx
movzwl %cx, %ecx
imulq $0x1c, %rcx, %rcx
pushq $0x10
popq %r13
cmpq %rax, %rcx
je 0x6ae9
cmpq $0x364, %rax            # imm = 0x364
je 0x6c51
movq (%rdi), %rdx
movw $0x403, 0x40(%rsp,%r13) # imm = 0x403
movb 0x10(%rdx,%rax), %sil
movb %sil, 0x42(%rsp,%r13)
movb $-0x80, 0x43(%rsp,%r13)
andq $0x0, 0x44(%rsp,%r13)
andl $0x0, 0x4c(%rsp,%r13)
movups (%rdx,%rax), %xmm0
movups %xmm0, 0x50(%rsp,%r13)
addq $0x20, %r13
addq $0x1c, %rax
jmp 0x6a52
leaq 0xa7f7(%rip), %r14      # 0x112a0
movl (%r14), %eax
leaq 0xa7fd(%rip), %rbx      # 0x112b0
xorl %r15d, %r15d
pushq $0x1
popq %r12
movslq %eax, %rcx
cmpq %rcx, %r15
jge 0x6d47
cmpl $0x0, 0x8(%rbx)
jle 0x6ad9
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6998
movl (%r14), %eax
incq %r15
addq $0x98, %rbx
jmp 0x6aba
pushq $0x10
popq %r13
callq 0x8624
andq $0x0, 0x90(%r15)
cmpl $0x0, 0xc(%rsp)
movq %rbx, 0x10(%rsp)
jle 0x6b93
pushq $0x1c
popq %rbx
xorl %r14d, %r14d
movslq 0x68(%r15), %rax
cmpq %rax, %r14
jge 0x6b87
movq 0x60(%r15), %rbp
cmpl $0x0, 0x20(%rbp,%rbx)
je 0x6b7e
leaq (%rbx,%rbp), %r12
movq %r12, %rdi
callq 0x8d1b
testl %eax, %eax
jne 0x6b7e
movb 0x10(%rbp,%rbx), %al
testb %al, %al
js 0x6b7e
cmpl $0x3e0, %r13d           # imm = 0x3E0
jg 0x6cfa
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)
andl $0x0, 0x4c(%rsp,%rcx)
movups (%r12), %xmm0
leaq 0x50(%rsp), %rax
movups %xmm0, (%rax,%rcx)
addl $0x20, %r13d
incq %r14
addq $0x70, %rbx
jmp 0x6b0c
movq 0x10(%rsp), %rbx
leaq 0xa6dd(%rip), %r14      # 0x11270
callq 0x9058
movq %rax, %r15
testq %rax, %rax
je 0x6c68
movzwl 0x8(%r15), %eax
testw %ax, %ax
jle 0x6c68
xorl %r14d, %r14d
cmpl $0x0, 0xc(%rsp)
movl $0xe10, %ecx            # imm = 0xE10
cmovlel %r14d, %ecx
bswapl %ecx
movl %ecx, 0x1c(%rsp)
xorl %ebx, %ebx
movswq %ax, %rax
cmpq %rax, %rbx
jge 0x6c5c
movq (%r15), %rbp
leaq (%r14,%rbp), %r12
movq %r12, %rdi
callq 0x8d1b
testl %eax, %eax
jne 0x6c40
cmpl $0x3e0, %r13d           # imm = 0x3E0
jg 0x6cfa
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 0x2220
leal 0x10(%r13,%rbp,8), %r13d
incq %rbx
movzwl 0x8(%r15), %eax
addq $0x1c, %r14
jmp 0x6bcb
movl $0x3f0, %r13d           # imm = 0x3F0
jmp 0x6d13
movq 0x10(%rsp), %rbx
leaq 0xa608(%rip), %r14      # 0x11270
movq %r15, %rdi
callq 0x8624
cmpl $0x0, 0xc(%rsp)
jle 0x6d13
pushq $0x1
popq %rdx
xorl %edi, %edi
xorl %esi, %esi
callq 0x42f7
testq %rax, %rax
je 0x6d0b
movswl 0x8(%rax), %edx
testl %edx, %edx
jle 0x6d0b
movl %edx, %ecx
shll $0x4, %ecx
addl %r13d, %ecx
addl $0x8, %ecx
cmpl $0x400, %ecx            # imm = 0x400
jg 0x6d13
movslq %r13d, %rsi
movb $0x19, 0x40(%rsp,%rsi)
leal (%rdx,%rdx), %edi
incb %dil
movb %dil, 0x41(%rsp,%rsi)
andw $0x0, 0x42(%rsp,%rsi)
addl $0x8, %r13d
movl $0xa0bb0d00, 0x44(%rsp,%rsi) # imm = 0xA0BB0D00
movslq %r13d, %rsi
movslq %edx, %rdi
leaq (%rsp,%rsi), %rdx
addq $0x40, %rdx
imulq $0x1c, %rdi, %rsi
xorl %edi, %edi
cmpq %rdi, %rsi
je 0x6d08
movq (%rax), %r8
movups (%r8,%rdi), %xmm0
movups %xmm0, (%rdx)
addq $0x10, %rdx
addq $0x1c, %rdi
jmp 0x6ce0
movq 0x10(%rsp), %rbx
leaq 0xa56a(%rip), %r14      # 0x11270
jmp 0x6d13
movl %ecx, %r13d
movq %rax, %rdi
callq 0x8624
leaq 0xa53e(%rip), %rax      # 0x11258
cmpl $0x2, (%rax)
jge 0x6d5c
movl 0xa4cf(%rip), %edi      # 0x111f4
movslq %r13d, %rdx
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %r8
pushq $0x1c
popq %r9
xorl %ecx, %ecx
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
leaq 0x5fae(%rip), %rsi      # 0xcd11
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x23c0
jmp 0x6d1f