#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;

/* Variables and functions */
void Interp9(uint32_t *pc, uint32_t c1, uint32_t c2, uint32_t c3) {
  *pc = ((((c1 & 0x00FF00) * 2 + (c2 & 0x00FF00) * 3 + (c3 & 0x00FF00) * 3) >>
          3) &
         0x00FF00) +
        ((((c1 & 0xFF00FF) * 2 + (c2 & 0xFF00FF) * 3 + (c3 & 0xFF00FF) * 3) >>
          3) &
         0xFF00FF);
}


x86 assembly (clang, -O0):
<Interp9>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x1,%ecx
mov    -0x10(%rbp),%eax
and    $0xff00,%eax
imul   $0x3,%eax,%eax
add    %eax,%ecx
mov    -0x14(%rbp),%eax
and    $0xff00,%eax
imul   $0x3,%eax,%eax
add    %eax,%ecx
sar    $0x3,%ecx
and    $0xff00,%ecx
mov    -0xc(%rbp),%eax
and    $0xff00ff,%eax
shl    $0x1,%eax
mov    -0x10(%rbp),%edx
and    $0xff00ff,%edx
imul   $0x3,%edx,%edx
add    %edx,%eax
mov    -0x14(%rbp),%edx
and    $0xff00ff,%edx
imul   $0x3,%edx,%edx
add    %edx,%eax
sar    $0x3,%eax
and    $0xff00ff,%eax
add    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp9>:
add    %esi,%esi
mov    %esi,%r8d
and    $0x1fe00,%r8d
mov    %edx,%r9d
and    $0xff00,%r9d
mov    %ecx,%eax
and    $0xff00,%eax
add    %r9d,%eax
lea    (%rax,%rax,2),%eax
add    %r8d,%eax
shr    $0x3,%eax
and    $0xff00,%eax
and    $0x1fe01fe,%esi
and    $0xff00ff,%edx
and    $0xff00ff,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
add    %esi,%ecx
shr    $0x3,%ecx
and    $0xff00ff,%ecx
or     %eax,%ecx
mov    %ecx,(%rdi)
ret

LLVM IR (-O0):
define void @Interp9(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = and i32 %9, 65280
%11 = mul nsw i32 %10, 2
%12 = load i32, i32* %7
%13 = and i32 %12, 65280
%14 = mul nsw i32 %13, 3
%15 = add nsw i32 %11, %14
%16 = load i32, i32* %8
%17 = and i32 %16, 65280
%18 = mul nsw i32 %17, 3
%19 = add nsw i32 %15, %18
%20 = ashr i32 %19, 3
%21 = and i32 %20, 65280
%22 = load i32, i32* %6
%23 = and i32 %22, 16711935
%24 = mul nsw i32 %23, 2
%25 = load i32, i32* %7
%26 = and i32 %25, 16711935
%27 = mul nsw i32 %26, 3
%28 = add nsw i32 %24, %27
%29 = load i32, i32* %8
%30 = and i32 %29, 16711935
%31 = mul nsw i32 %30, 3
%32 = add nsw i32 %28, %31
%33 = ashr i32 %32, 3
%34 = and i32 %33, 16711935
%35 = add nsw i32 %21, %34
%36 = load i32*, i32** %5
store i32 %35, i32* %36
ret void
}

LLVM IR (-O2):
define void @Interp9(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %1, 1
%6 = and i32 %5, 130560
%7 = and i32 %2, 65280
%8 = and i32 %3, 65280
%9 = add nuw nsw i32 %8, %7
%10 = mul nuw nsw i32 %9, 3
%11 = add nuw nsw i32 %10, %6
%12 = lshr exact i32 %11, 3
%13 = and i32 %12, 65280
%14 = and i32 %5, 33423870
%15 = and i32 %2, 16711935
%16 = and i32 %3, 16711935
%17 = add nuw nsw i32 %16, %15
%18 = mul nuw nsw i32 %17, 3
%19 = add nuw nsw i32 %18, %14
%20 = lshr i32 %19, 3
%21 = and i32 %20, 16711935
%22 = or i32 %13, %21
store i32 %22, i32* %0
ret void
}