#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 uint64_t;
typedef int uint32_t;

/* Variables and functions */
int UINT64_C(int);
uint64_t iterate48(unsigned short subi[3]) {
  const uint64_t a = UINT64_C(0x5DEECE66D);
  const unsigned c = 13;
  const uint64_t mask = UINT64_C(0xFFFFFFFFFFFF);
  uint64_t x = ((uint64_t)subi[0] << 32) | ((uint32_t)subi[1] << 16) | subi[2];
  x *= a;
  x += c;
  x &= mask;
  subi[0] = (x >> 32) & 0xFFFF;
  subi[1] = (x >> 16) & 0xFFFF;
  subi[2] = (x >> 0) & 0XFFFF;
  return x;
}


x86 assembly (clang, -O0):
<iterate48>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xdeece66d,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0xc(%rbp)
movl   $0xd,-0x10(%rbp)
mov    $0xffffffff,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%rcx
movzwl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzwl 0x4(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
and    $0xffff,%eax
mov    %ax,%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
mov    -0x18(%rbp),%eax
sar    $0x10,%eax
and    $0xffff,%eax
mov    %ax,%cx
mov    -0x8(%rbp),%rax
mov    %cx,0x2(%rax)
mov    -0x18(%rbp),%eax
sar    $0x0,%eax
and    $0xffff,%eax
mov    %ax,%cx
mov    -0x8(%rbp),%rax
mov    %cx,0x4(%rax)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iterate48>:
push   %rax
mov    $0xdeece66d,%edi
call   1030 <UINT64_C@plt>
mov    $0xffffffff,%edi
pop    %rax
jmp    1030 <UINT64_C@plt>

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

LLVM IR (-O2):
define i32 @iterate48(i16* nocapture readnone %0) {
%2 = tail call i32 @UINT64_C(i32 -554899859)
%3 = tail call i32 @UINT64_C(i32 -1)
ret i32 poison
}