#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 */
typedef int uint32_t;
struct in6_addr {
  scalar_t__ s6_addr;
};

/* 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) | ((uint32_t *)addr->s6_addr)[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 { i64 }
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 i64, i64* %10
%12 = inttoptr i64 %11 to i32*
%13 = getelementptr inbounds i32, i32* %12, i64 3
%14 = load i32, i32* %13
%15 = or i32 %8, %14
%16 = call i32 @ipv6_addr_set(%struct.in6_addr* %5, i32 %6, i32 0, i32 %7, i32 %15)
ret void
}

LLVM IR (-O2):
%struct.in6_addr = type { i64 }
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 i64, i64* %6
%8 = inttoptr i64 %7 to i32*
%9 = getelementptr inbounds i32, i32* %8, i64 3
%10 = load i32, i32* %9
%11 = or i32 %10, %5
%12 = tail call i32 @ipv6_addr_set(%struct.in6_addr* %1, i32 %3, i32 0, i32 %4, i32 %11)
ret void
}