#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 __u8;
typedef int __u16;

/* Variables and functions */
void cec_ops_set_analogue_timer(const struct cec_msg *msg, __u8 *day,
                                __u8 *month, __u8 *start_hr, __u8 *start_min,
                                __u8 *duration_hr, __u8 *duration_min,
                                __u8 *recording_seq, __u8 *ana_bcast_type,
                                __u16 *ana_freq, __u8 *bcast_system) {
  *day = msg->msg[2];
  *month = msg->msg[3];
  *start_hr = (msg->msg[4] >> 4) * 10 + (msg->msg[4] & 0xf);
  *start_min = (msg->msg[5] >> 4) * 10 + (msg->msg[5] & 0xf);
  *duration_hr = (msg->msg[6] >> 4) * 10 + (msg->msg[6] & 0xf);
  *duration_min = (msg->msg[7] >> 4) * 10 + (msg->msg[7] & 0xf);
  *recording_seq = msg->msg[8];
  *ana_bcast_type = msg->msg[9];
  *ana_freq = (msg->msg[10] << 8) | msg->msg[11];
  *bcast_system = msg->msg[12];
}


x86 assembly (clang, -O0):
<cec_ops_set_analogue_timer>:
push   %rbp
mov    %rsp,%rbp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0xc(%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x10(%rax),%eax
sar    $0x4,%eax
imul   $0xa,%eax,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x10(%rax),%eax
and    $0xf,%eax
add    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x14(%rax),%eax
sar    $0x4,%eax
imul   $0xa,%eax,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x14(%rax),%eax
and    $0xf,%eax
add    %eax,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x18(%rax),%eax
sar    $0x4,%eax
imul   $0xa,%eax,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x18(%rax),%eax
and    $0xf,%eax
add    %eax,%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x1c(%rax),%eax
sar    $0x4,%eax
imul   $0xa,%eax,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x1c(%rax),%eax
and    $0xf,%eax
add    %eax,%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x20(%rax),%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x24(%rax),%ecx
mov    0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x28(%rax),%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
or     0x2c(%rax),%ecx
mov    0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x30(%rax),%ecx
mov    0x30(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_ops_set_analogue_timer>:
push   %rbp
push   %rbx
mov    0x38(%rsp),%r10
mov    0x28(%rsp),%r11
mov    0x20(%rsp),%rax
mov    0x18(%rsp),%rbx
mov    (%rdi),%rdi
mov    0x8(%rdi),%ebp
mov    %ebp,(%rsi)
mov    0xc(%rdi),%esi
mov    %esi,(%rdx)
mov    0x10(%rdi),%edx
mov    %edx,%esi
sar    $0x4,%esi
lea    (%rsi,%rsi,4),%esi
and    $0xf,%edx
lea    (%rdx,%rsi,2),%edx
mov    %edx,(%rcx)
mov    0x14(%rdi),%ecx
mov    %ecx,%edx
sar    $0x4,%edx
lea    (%rdx,%rdx,4),%edx
and    $0xf,%ecx
lea    (%rcx,%rdx,2),%ecx
mov    %ecx,(%r8)
mov    0x18(%rdi),%ecx
mov    %ecx,%edx
sar    $0x4,%edx
lea    (%rdx,%rdx,4),%edx
and    $0xf,%ecx
lea    (%rcx,%rdx,2),%ecx
mov    %ecx,(%r9)
mov    0x1c(%rdi),%ecx
mov    %ecx,%edx
sar    $0x4,%edx
lea    (%rdx,%rdx,4),%edx
and    $0xf,%ecx
lea    (%rcx,%rdx,2),%ecx
mov    %ecx,(%rbx)
mov    0x20(%rdi),%ecx
mov    %ecx,(%rax)
mov    0x24(%rdi),%eax
mov    %eax,(%r11)
mov    0x28(%rdi),%eax
shl    $0x8,%eax
or     0x2c(%rdi),%eax
mov    0x30(%rsp),%rcx
mov    %eax,(%rcx)
mov    0x30(%rdi),%eax
mov    %eax,(%r10)
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32* }
define void @cec_ops_set_analogue_timer(%struct.cec_msg* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10) {
%12 = alloca %struct.cec_msg*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca i32*
%20 = alloca i32*
%21 = alloca i32*
%22 = alloca i32*
store %struct.cec_msg* %0, %struct.cec_msg** %12
store i32* %1, i32** %13
store i32* %2, i32** %14
store i32* %3, i32** %15
store i32* %4, i32** %16
store i32* %5, i32** %17
store i32* %6, i32** %18
store i32* %7, i32** %19
store i32* %8, i32** %20
store i32* %9, i32** %21
store i32* %10, i32** %22
%23 = load %struct.cec_msg*, %struct.cec_msg** %12
%24 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %23, i32 0, i32 0
%25 = load i32*, i32** %24
%26 = getelementptr inbounds i32, i32* %25, i64 2
%27 = load i32, i32* %26
%28 = load i32*, i32** %13
store i32 %27, i32* %28
%29 = load %struct.cec_msg*, %struct.cec_msg** %12
%30 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %29, i32 0, i32 0
%31 = load i32*, i32** %30
%32 = getelementptr inbounds i32, i32* %31, i64 3
%33 = load i32, i32* %32
%34 = load i32*, i32** %14
store i32 %33, i32* %34
%35 = load %struct.cec_msg*, %struct.cec_msg** %12
%36 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %35, i32 0, i32 0
%37 = load i32*, i32** %36
%38 = getelementptr inbounds i32, i32* %37, i64 4
%39 = load i32, i32* %38
%40 = ashr i32 %39, 4
%41 = mul nsw i32 %40, 10
%42 = load %struct.cec_msg*, %struct.cec_msg** %12
%43 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %42, i32 0, i32 0
%44 = load i32*, i32** %43
%45 = getelementptr inbounds i32, i32* %44, i64 4
%46 = load i32, i32* %45
%47 = and i32 %46, 15
%48 = add nsw i32 %41, %47
%49 = load i32*, i32** %15
store i32 %48, i32* %49
%50 = load %struct.cec_msg*, %struct.cec_msg** %12
%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 5
%54 = load i32, i32* %53
%55 = ashr i32 %54, 4
%56 = mul nsw i32 %55, 10
%57 = load %struct.cec_msg*, %struct.cec_msg** %12
%58 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %57, i32 0, i32 0
%59 = load i32*, i32** %58
%60 = getelementptr inbounds i32, i32* %59, i64 5
%61 = load i32, i32* %60
%62 = and i32 %61, 15
%63 = add nsw i32 %56, %62
%64 = load i32*, i32** %16
store i32 %63, i32* %64
%65 = load %struct.cec_msg*, %struct.cec_msg** %12
%66 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %65, i32 0, i32 0
%67 = load i32*, i32** %66
%68 = getelementptr inbounds i32, i32* %67, i64 6
%69 = load i32, i32* %68
%70 = ashr i32 %69, 4
%71 = mul nsw i32 %70, 10
%72 = load %struct.cec_msg*, %struct.cec_msg** %12
%73 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %72, i32 0, i32 0
%74 = load i32*, i32** %73
%75 = getelementptr inbounds i32, i32* %74, i64 6
%76 = load i32, i32* %75
%77 = and i32 %76, 15
%78 = add nsw i32 %71, %77
%79 = load i32*, i32** %17
store i32 %78, i32* %79
%80 = load %struct.cec_msg*, %struct.cec_msg** %12
%81 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %80, i32 0, i32 0
%82 = load i32*, i32** %81
%83 = getelementptr inbounds i32, i32* %82, i64 7
%84 = load i32, i32* %83
%85 = ashr i32 %84, 4
%86 = mul nsw i32 %85, 10
%87 = load %struct.cec_msg*, %struct.cec_msg** %12
%88 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %87, i32 0, i32 0
%89 = load i32*, i32** %88
%90 = getelementptr inbounds i32, i32* %89, i64 7
%91 = load i32, i32* %90
%92 = and i32 %91, 15
%93 = add nsw i32 %86, %92
%94 = load i32*, i32** %18
store i32 %93, i32* %94
%95 = load %struct.cec_msg*, %struct.cec_msg** %12
%96 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %95, i32 0, i32 0
%97 = load i32*, i32** %96
%98 = getelementptr inbounds i32, i32* %97, i64 8
%99 = load i32, i32* %98
%100 = load i32*, i32** %19
store i32 %99, i32* %100
%101 = load %struct.cec_msg*, %struct.cec_msg** %12
%102 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %101, i32 0, i32 0
%103 = load i32*, i32** %102
%104 = getelementptr inbounds i32, i32* %103, i64 9
%105 = load i32, i32* %104
%106 = load i32*, i32** %20
store i32 %105, i32* %106
%107 = load %struct.cec_msg*, %struct.cec_msg** %12
%108 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %107, i32 0, i32 0
%109 = load i32*, i32** %108
%110 = getelementptr inbounds i32, i32* %109, i64 10
%111 = load i32, i32* %110
%112 = shl i32 %111, 8
%113 = load %struct.cec_msg*, %struct.cec_msg** %12
%114 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %113, i32 0, i32 0
%115 = load i32*, i32** %114
%116 = getelementptr inbounds i32, i32* %115, i64 11
%117 = load i32, i32* %116
%118 = or i32 %112, %117
%119 = load i32*, i32** %21
store i32 %118, i32* %119
%120 = load %struct.cec_msg*, %struct.cec_msg** %12
%121 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %120, i32 0, i32 0
%122 = load i32*, i32** %121
%123 = getelementptr inbounds i32, i32* %122, i64 12
%124 = load i32, i32* %123
%125 = load i32*, i32** %22
store i32 %124, i32* %125
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32* }
define void @cec_ops_set_analogue_timer(%struct.cec_msg* nocapture %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4, i32* nocapture writeonly %5, i32* nocapture writeonly %6, i32* nocapture writeonly %7, i32* nocapture writeonly %8, i32* nocapture writeonly %9, i32* nocapture writeonly %10) {
%12 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
%13 = load i32*, i32** %12
%14 = getelementptr inbounds i32, i32* %13, i64 2
%15 = load i32, i32* %14
store i32 %15, i32* %1
%16 = getelementptr inbounds i32, i32* %13, i64 3
%17 = load i32, i32* %16
store i32 %17, i32* %2
%18 = getelementptr inbounds i32, i32* %13, i64 4
%19 = load i32, i32* %18
%20 = ashr i32 %19, 4
%21 = mul nsw i32 %20, 10
%22 = and i32 %19, 15
%23 = add nsw i32 %21, %22
store i32 %23, i32* %3
%24 = getelementptr inbounds i32, i32* %13, i64 5
%25 = load i32, i32* %24
%26 = ashr i32 %25, 4
%27 = mul nsw i32 %26, 10
%28 = and i32 %25, 15
%29 = add nsw i32 %27, %28
store i32 %29, i32* %4
%30 = getelementptr inbounds i32, i32* %13, i64 6
%31 = load i32, i32* %30
%32 = ashr i32 %31, 4
%33 = mul nsw i32 %32, 10
%34 = and i32 %31, 15
%35 = add nsw i32 %33, %34
store i32 %35, i32* %5
%36 = getelementptr inbounds i32, i32* %13, i64 7
%37 = load i32, i32* %36
%38 = ashr i32 %37, 4
%39 = mul nsw i32 %38, 10
%40 = and i32 %37, 15
%41 = add nsw i32 %39, %40
store i32 %41, i32* %6
%42 = getelementptr inbounds i32, i32* %13, i64 8
%43 = load i32, i32* %42
store i32 %43, i32* %7
%44 = getelementptr inbounds i32, i32* %13, i64 9
%45 = load i32, i32* %44
store i32 %45, i32* %8
%46 = getelementptr inbounds i32, i32* %13, i64 10
%47 = load i32, i32* %46
%48 = shl i32 %47, 8
%49 = getelementptr inbounds i32, i32* %13, i64 11
%50 = load i32, i32* %49
%51 = or i32 %48, %50
store i32 %51, i32* %9
%52 = getelementptr inbounds i32, i32* %13, i64 12
%53 = load i32, i32* %52
store i32 %53, i32* %10
ret void
}