#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct in6_addr {
  int *s6_addr32;
};

/* Variables and functions */
int htonl(int);
int /*<<< orphan*/ ipv6_addr_set(struct in6_addr *, int, int /*<<< orphan*/,
                                 int, int);
void ipv6_addr_solict_mult(const struct in6_addr *addr,
                           struct in6_addr *solicited) {
  ipv6_addr_set(solicited, htonl(0xFF020000), 0, htonl(0x1),
                htonl(0xFF000000) | addr->s6_addr32[3]);
}


x86 assembly (clang, -O0):
<ipv6_addr_solict_mult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0xff020000,%edi
call   1030 <htonl@plt>
mov    %eax,-0x18(%rbp)
mov    $0x1,%edi
call   1030 <htonl@plt>
mov    %eax,-0x14(%rbp)
mov    $0xff000000,%edi
call   1030 <htonl@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%ecx
mov    %eax,%r8d
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
or     0xc(%rax),%r8d
xor    %edx,%edx
call   1040 <ipv6_addr_set@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv6_addr_solict_mult>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0xff020000,%edi
call   1030 <htonl@plt>
mov    %eax,%ebp
mov    $0x1,%edi
call   1030 <htonl@plt>
mov    %eax,%ebx
mov    $0xff000000,%edi
call   1030 <htonl@plt>
mov    (%r15),%rcx
or     0xc(%rcx),%eax
mov    %r14,%rdi
mov    %ebp,%esi
xor    %edx,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <ipv6_addr_set@plt>

LLVM IR (-O0):
%struct.in6_addr = type { i32* }
define void @ipv6_addr_solict_mult(%struct.in6_addr* %0, %struct.in6_addr* %1) {
%3 = alloca %struct.in6_addr*
%4 = alloca %struct.in6_addr*
store %struct.in6_addr* %0, %struct.in6_addr** %3
store %struct.in6_addr* %1, %struct.in6_addr** %4
%5 = load %struct.in6_addr*, %struct.in6_addr** %4
%6 = call i32 @htonl(i32 -16646144)
%7 = call i32 @htonl(i32 1)
%8 = call i32 @htonl(i32 -16777216)
%9 = load %struct.in6_addr*, %struct.in6_addr** %3
%10 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %9, i32 0, i32 0
%11 = load i32*, i32** %10
%12 = getelementptr inbounds i32, i32* %11, i64 3
%13 = load i32, i32* %12
%14 = or i32 %8, %13
%15 = call i32 @ipv6_addr_set(%struct.in6_addr* %5, i32 %6, i32 0, i32 %7, i32 %14)
ret void
}

LLVM IR (-O2):
%struct.in6_addr = type { i32* }
define void @ipv6_addr_solict_mult(%struct.in6_addr* nocapture %0, %struct.in6_addr* %1) {
%3 = tail call i32 @htonl(i32 -16646144)
%4 = tail call i32 @htonl(i32 1)
%5 = tail call i32 @htonl(i32 -16777216)
%6 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %0, i64 0, i32 0
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 3
%9 = load i32, i32* %8
%10 = or i32 %9, %5
%11 = tail call i32 @ipv6_addr_set(%struct.in6_addr* %1, i32 %3, i32 0, i32 %4, i32 %10)
ret void
}