#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 Interp6(uint32_t *pc, uint32_t c1, uint32_t c2, uint32_t c3) {
  *pc = ((((c1 & 0x00FF00) * 5 + (c2 & 0x00FF00) * 2 + (c3 & 0x00FF00)) >> 3) &
         0x00FF00) +
        ((((c1 & 0xFF00FF) * 5 + (c2 & 0xFF00FF) * 2 + (c3 & 0xFF00FF)) >> 3) &
         0xFF00FF);
}


x86 assembly (clang, -O0):
<Interp6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff00,%eax
imul   $0x5,%eax,%ecx
mov    -0x10(%rbp),%eax
and    $0xff00,%eax
shl    $0x1,%eax
add    %eax,%ecx
mov    -0x14(%rbp),%eax
and    $0xff00,%eax
add    %eax,%ecx
sar    $0x3,%ecx
and    $0xff00,%ecx
mov    -0xc(%rbp),%eax
and    $0xff00ff,%eax
imul   $0x5,%eax,%eax
mov    -0x10(%rbp),%edx
and    $0xff00ff,%edx
shl    $0x1,%edx
add    %edx,%eax
mov    -0x14(%rbp),%edx
and    $0xff00ff,%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):
<Interp6>:
mov    %esi,%eax
and    $0xff00,%eax
lea    (%rax,%rax,4),%r8d
add    %edx,%edx
mov    %edx,%r9d
and    $0x1fe00,%r9d
add    %r8d,%r9d
mov    %ecx,%eax
and    $0xff00,%eax
add    %r9d,%eax
shr    $0x3,%eax
and    $0xff00,%eax
and    $0xff00ff,%esi
lea    (%rsi,%rsi,4),%esi
and    $0x1fe01fe,%edx
add    %esi,%edx
and    $0xff00ff,%ecx
add    %edx,%ecx
shr    $0x3,%ecx
and    $0xff00ff,%ecx
or     %eax,%ecx
mov    %ecx,(%rdi)
ret

LLVM IR (-O0):
define void @Interp6(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, 5
%12 = load i32, i32* %7
%13 = and i32 %12, 65280
%14 = mul nsw i32 %13, 2
%15 = add nsw i32 %11, %14
%16 = load i32, i32* %8
%17 = and i32 %16, 65280
%18 = add nsw i32 %15, %17
%19 = ashr i32 %18, 3
%20 = and i32 %19, 65280
%21 = load i32, i32* %6
%22 = and i32 %21, 16711935
%23 = mul nsw i32 %22, 5
%24 = load i32, i32* %7
%25 = and i32 %24, 16711935
%26 = mul nsw i32 %25, 2
%27 = add nsw i32 %23, %26
%28 = load i32, i32* %8
%29 = and i32 %28, 16711935
%30 = add nsw i32 %27, %29
%31 = ashr i32 %30, 3
%32 = and i32 %31, 16711935
%33 = add nsw i32 %20, %32
%34 = load i32*, i32** %5
store i32 %33, i32* %34
ret void
}

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