#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 */

/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_M1TableCommon(int Salt, int Parameter, const unsigned char *Table) {
  unsigned b = (Table[(Salt >> 24) & 0xFF] << 24) |
               (Table[(Salt >> 16) & 0xFF] << 16) |
               (Table[(Salt >> 8) & 0xFF] << 8) | Table[Salt & 0xFF];
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_M1TableCommon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%rcx
mov    -0x4(%rbp),%edx
sar    $0x10,%edx
and    $0xff,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    -0x4(%rbp),%edx
sar    $0x8,%edx
and    $0xff,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    -0x4(%rbp),%edx
and    $0xff,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_M1TableCommon>:
mov    %edi,%eax
movzbl %al,%r8d
shr    $0x18,%rax
movzbl (%rdx,%rax,1),%eax
shl    $0x18,%eax
mov    %edi,%ecx
shr    $0x10,%ecx
movzbl %cl,%ecx
movzbl (%rdx,%rcx,1),%ecx
shl    $0x10,%ecx
or     %eax,%ecx
shr    $0x8,%edi
movzbl %dil,%eax
movzbl (%rdx,%rax,1),%eax
shl    $0x8,%eax
or     %ecx,%eax
movzbl (%rdx,%r8,1),%edi
or     %eax,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_M1TableCommon(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = load i32, i32* %4
%10 = ashr i32 %9, 24
%11 = and i32 %10, 255
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %8, i64 %12
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = shl i32 %15, 24
%17 = load i8*, i8** %6
%18 = load i32, i32* %4
%19 = ashr i32 %18, 16
%20 = and i32 %19, 255
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %17, i64 %21
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = shl i32 %24, 16
%26 = or i32 %16, %25
%27 = load i8*, i8** %6
%28 = load i32, i32* %4
%29 = ashr i32 %28, 8
%30 = and i32 %29, 255
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %27, i64 %31
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = shl i32 %34, 8
%36 = or i32 %26, %35
%37 = load i8*, i8** %6
%38 = load i32, i32* %4
%39 = and i32 %38, 255
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8, i8* %37, i64 %40
%42 = load i8, i8* %41
%43 = zext i8 %42 to i32
%44 = or i32 %36, %43
store i32 %44, i32* %7
%45 = load i32, i32* %7
%46 = load i32, i32* %5
%47 = call i32 @yahoo_M1Common(i32 %45, i32 %46)
ret i32 %47
}

LLVM IR (-O2):
define i32 @yahoo_M1TableCommon(i32 %0, i32 %1, i8* nocapture %2) {
%4 = lshr i32 %0, 24
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %2, i64 %5
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl nuw i32 %8, 24
%10 = lshr i32 %0, 16
%11 = and i32 %10, 255
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %2, i64 %12
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = shl nuw nsw i32 %15, 16
%17 = or i32 %16, %9
%18 = lshr i32 %0, 8
%19 = and i32 %18, 255
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %2, i64 %20
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = shl nuw nsw i32 %23, 8
%25 = or i32 %17, %24
%26 = and i32 %0, 255
%27 = zext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %2, i64 %27
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = or i32 %25, %30
%32 = tail call i32 @yahoo_M1Common(i32 %31, i32 %1)
ret i32 %32
}