#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 cec_msg {
  int *msg;
};
typedef int __u16;

/* Variables and functions */
void cec_ops_cdc_hec_request_deactivation(const struct cec_msg *msg,
                                          __u16 *phys_addr, __u16 *phys_addr1,
                                          __u16 *phys_addr2,
                                          __u16 *phys_addr3) {
  *phys_addr = (msg->msg[2] << 8) | msg->msg[3];
  *phys_addr1 = (msg->msg[5] << 8) | msg->msg[6];
  *phys_addr2 = (msg->msg[7] << 8) | msg->msg[8];
  *phys_addr3 = (msg->msg[9] << 8) | msg->msg[10];
}


x86 assembly (clang, -O0):
<cec_ops_cdc_hec_request_deactivation>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
or     0xc(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x14(%rax),%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
or     0x18(%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x1c(%rax),%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
or     0x20(%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x24(%rax),%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
or     0x28(%rax),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_ops_cdc_hec_request_deactivation>:
mov    (%rdi),%rax
mov    0x8(%rax),%edi
shl    $0x8,%edi
or     0xc(%rax),%edi
mov    %edi,(%rsi)
mov    0x14(%rax),%esi
shl    $0x8,%esi
or     0x18(%rax),%esi
mov    %esi,(%rdx)
mov    0x1c(%rax),%edx
shl    $0x8,%edx
or     0x20(%rax),%edx
mov    %edx,(%rcx)
mov    0x24(%rax),%ecx
shl    $0x8,%ecx
or     0x28(%rax),%ecx
mov    %ecx,(%r8)
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32* }
define void @cec_ops_cdc_hec_request_deactivation(%struct.cec_msg* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca %struct.cec_msg*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store %struct.cec_msg* %0, %struct.cec_msg** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load %struct.cec_msg*, %struct.cec_msg** %6
%12 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %11, i32 0, i32 0
%13 = load i32*, i32** %12
%14 = getelementptr inbounds i32, i32* %13, i64 2
%15 = load i32, i32* %14
%16 = shl i32 %15, 8
%17 = load %struct.cec_msg*, %struct.cec_msg** %6
%18 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %17, i32 0, i32 0
%19 = load i32*, i32** %18
%20 = getelementptr inbounds i32, i32* %19, i64 3
%21 = load i32, i32* %20
%22 = or i32 %16, %21
%23 = load i32*, i32** %7
store i32 %22, i32* %23
%24 = load %struct.cec_msg*, %struct.cec_msg** %6
%25 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %24, i32 0, i32 0
%26 = load i32*, i32** %25
%27 = getelementptr inbounds i32, i32* %26, i64 5
%28 = load i32, i32* %27
%29 = shl i32 %28, 8
%30 = load %struct.cec_msg*, %struct.cec_msg** %6
%31 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %30, i32 0, i32 0
%32 = load i32*, i32** %31
%33 = getelementptr inbounds i32, i32* %32, i64 6
%34 = load i32, i32* %33
%35 = or i32 %29, %34
%36 = load i32*, i32** %8
store i32 %35, i32* %36
%37 = load %struct.cec_msg*, %struct.cec_msg** %6
%38 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %37, i32 0, i32 0
%39 = load i32*, i32** %38
%40 = getelementptr inbounds i32, i32* %39, i64 7
%41 = load i32, i32* %40
%42 = shl i32 %41, 8
%43 = load %struct.cec_msg*, %struct.cec_msg** %6
%44 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %43, i32 0, i32 0
%45 = load i32*, i32** %44
%46 = getelementptr inbounds i32, i32* %45, i64 8
%47 = load i32, i32* %46
%48 = or i32 %42, %47
%49 = load i32*, i32** %9
store i32 %48, i32* %49
%50 = load %struct.cec_msg*, %struct.cec_msg** %6
%51 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %50, i32 0, i32 0
%52 = load i32*, i32** %51
%53 = getelementptr inbounds i32, i32* %52, i64 9
%54 = load i32, i32* %53
%55 = shl i32 %54, 8
%56 = load %struct.cec_msg*, %struct.cec_msg** %6
%57 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %56, i32 0, i32 0
%58 = load i32*, i32** %57
%59 = getelementptr inbounds i32, i32* %58, i64 10
%60 = load i32, i32* %59
%61 = or i32 %55, %60
%62 = load i32*, i32** %10
store i32 %61, i32* %62
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32* }
define void @cec_ops_cdc_hec_request_deactivation(%struct.cec_msg* nocapture %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4) {
%6 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = getelementptr inbounds i32, i32* %7, i64 3
%12 = load i32, i32* %11
%13 = or i32 %10, %12
store i32 %13, i32* %1
%14 = getelementptr inbounds i32, i32* %7, i64 5
%15 = load i32, i32* %14
%16 = shl i32 %15, 8
%17 = getelementptr inbounds i32, i32* %7, i64 6
%18 = load i32, i32* %17
%19 = or i32 %16, %18
store i32 %19, i32* %2
%20 = getelementptr inbounds i32, i32* %7, i64 7
%21 = load i32, i32* %20
%22 = shl i32 %21, 8
%23 = getelementptr inbounds i32, i32* %7, i64 8
%24 = load i32, i32* %23
%25 = or i32 %22, %24
store i32 %25, i32* %3
%26 = getelementptr inbounds i32, i32* %7, i64 9
%27 = load i32, i32* %26
%28 = shl i32 %27, 8
%29 = getelementptr inbounds i32, i32* %7, i64 10
%30 = load i32, i32* %29
%31 = or i32 %28, %30
store i32 %31, i32* %4
ret void
}