#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 /*<<< orphan*/ initial_values;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned int *, unsigned int *, int);
void fill_table_a000(unsigned int *p) {
  static unsigned int initial_values[12] = {
      0xFFAD9B00, 0xFFDDEE00, 0x00221200, 0x00526500, 0xFFC21E00, 0x003DE200,
      0xFF924B80, 0xFFD2A300, 0x002D5D00, 0x006DB480, 0xFFED3E00, 0x0012C200};
  static unsigned int values_derivated[12] = {
      0x0000A4CA, 0x00004424, 0xFFFFBBDC, 0xFFFF5B36, 0x00007BC4, 0xFFFF843C,
      0x0000DB69, 0x00005ABA, 0xFFFFA546, 0xFFFF2497, 0x00002584, 0xFFFFDA7C};
  unsigned int temp_values[12];
  int i, j;
  memcpy(temp_values, initial_values, sizeof(initial_values));
  for (i = 0; i < 256; i++) {
    for (j = 0; j < 12; j++) {
      *p++ = temp_values[j];
      temp_values[j] += values_derivated[j];
    }
  }
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
lea    0x2f09(%rip),%rsi
mov    $0x30,%edx
call   1030 <memcpy@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x100,-0x44(%rbp)
jge    11aa <fill_table_a000+0x9a>
movl   $0x0,-0x48(%rbp)
cmpl   $0xc,-0x48(%rbp)
jge    1197 <fill_table_a000+0x87>
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
movslq -0x48(%rbp),%rcx
lea    0x2ee6(%rip),%rax
mov    (%rax,%rcx,4),%ecx
movslq -0x48(%rbp),%rax
add    -0x40(%rbp,%rax,4),%ecx
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    114c <fill_table_a000+0x3c>
jmp    119c <fill_table_a000+0x8c>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1138 <fill_table_a000+0x28>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbx
sub    $0x30,%rsp
mov    %rdi,%rbx
lea    0x2f11(%rip),%rsi
mov    %rsp,%rdi
mov    $0x30,%edx
call   1030 <memcpy@plt>
movdqa (%rsp),%xmm4
movdqa 0x10(%rsp),%xmm5
movdqa 0x20(%rsp),%xmm6
xor    %eax,%eax
movdqa 0xeb8(%rip),%xmm8
movdqa 0xebf(%rip),%xmm9
movdqa 0xec6(%rip),%xmm10
movdqa 0xecd(%rip),%xmm11
movdqa 0xed5(%rip),%xmm7
movdqa 0xedd(%rip),%xmm3
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movdqu %xmm4,(%rbx,%rax,1)
movdqa %xmm4,%xmm0
paddd  %xmm8,%xmm0
movdqu %xmm5,0x10(%rbx,%rax,1)
movdqa %xmm5,%xmm1
paddd  %xmm9,%xmm1
movdqu %xmm6,0x20(%rbx,%rax,1)
movdqa %xmm6,%xmm2
paddd  %xmm10,%xmm2
movdqu %xmm0,0x30(%rbx,%rax,1)
paddd  %xmm11,%xmm4
movdqu %xmm1,0x40(%rbx,%rax,1)
paddd  %xmm7,%xmm5
movdqu %xmm2,0x50(%rbx,%rax,1)
paddd  %xmm3,%xmm6
add    $0x60,%rax
cmp    $0x3000,%eax
jne    1180 <fill_table_a000+0x70>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@fill_table_a000.initial_values = internal global [12 x i32] [i32 -5399808, i32 -2232832, i32 2232832, i32 5399808, i32 -4055552, i32 4055552, i32 -7189632, i32 -2972928, i32 2972928, i32 7189632, i32 -1229312, i32 1229312]
@fill_table_a000.values_derivated = internal global [12 x i32] [i32 42186, i32 17444, i32 -17444, i32 -42186, i32 31684, i32 -31684, i32 56169, i32 23226, i32 -23226, i32 -56169, i32 9604, i32 -9604]
define void @fill_table_a000(i32* %0) {
%2 = alloca i32*
%3 = alloca [12 x i32]
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
%6 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%7 = call i32 @memcpy(i32* %6, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @fill_table_a000.initial_values, i64 0, i64 0), i32 48)
store i32 0, i32* %4
br label %8
8: ; preds = %35, %1
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 256
br i1 %10, label %11, label %38
11: ; preds = %8
store i32 0, i32* %5
br label %12
12: ; preds = %31, %11
%13 = load i32, i32* %5
%14 = icmp slt i32 %13, 12
br i1 %14, label %15, label %34
15: ; preds = %12
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 %17
%19 = load i32, i32* %18
%20 = load i32*, i32** %2
%21 = getelementptr inbounds i32, i32* %20, i32 1
store i32* %21, i32** %2
store i32 %19, i32* %20
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [12 x i32], [12 x i32]* @fill_table_a000.values_derivated, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = load i32, i32* %5
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = add i32 %29, %25
store i32 %30, i32* %28
br label %31
31: ; preds = %15
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
br label %12
34: ; preds = %12
br label %35
35: ; preds = %34
%36 = load i32, i32* %4
%37 = add nsw i32 %36, 1
store i32 %37, i32* %4
br label %8
38: ; preds = %8
ret void
}

LLVM IR (-O2):
@fill_table_a000.initial_values = internal global [12 x i32] [i32 -5399808, i32 -2232832, i32 2232832, i32 5399808, i32 -4055552, i32 4055552, i32 -7189632, i32 -2972928, i32 2972928, i32 7189632, i32 -1229312, i32 1229312]
define void @fill_table_a000(i32* nocapture writeonly %0) {
%2 = alloca [12 x i32]
%3 = bitcast [12 x i32]* %2 to i8*
%4 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%5 = call i32 @memcpy(i32* %4, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @fill_table_a000.initial_values, i64 0, i64 0), i32 48)
%6 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 4
%7 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 8
%8 = bitcast [12 x i32]* %2 to <4 x i32>*
%9 = load <4 x i32>, <4 x i32>* %8
%10 = bitcast i32* %6 to <4 x i32>*
%11 = load <4 x i32>, <4 x i32>* %10
%12 = bitcast i32* %7 to <4 x i32>*
%13 = load <4 x i32>, <4 x i32>* %12
br label %14
14: ; preds = %14, %1
%15 = phi i32 [ 0, %1 ], [ %38, %14 ]
%16 = phi i32* [ %0, %1 ], [ %35, %14 ]
%17 = phi <4 x i32> [ %9, %1 ], [ %31, %14 ]
%18 = phi <4 x i32> [ %11, %1 ], [ %34, %14 ]
%19 = phi <4 x i32> [ %13, %1 ], [ %37, %14 ]
%20 = getelementptr inbounds i32, i32* %16, i64 4
%21 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> %17, <4 x i32>* %21
%22 = add <4 x i32> %17, <i32 42186, i32 17444, i32 -17444, i32 -42186>
%23 = getelementptr inbounds i32, i32* %16, i64 8
%24 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> %18, <4 x i32>* %24
%25 = add <4 x i32> %18, <i32 31684, i32 -31684, i32 56169, i32 23226>
%26 = getelementptr inbounds i32, i32* %16, i64 12
%27 = bitcast i32* %23 to <4 x i32>*
store <4 x i32> %19, <4 x i32>* %27
%28 = add <4 x i32> %19, <i32 -23226, i32 -56169, i32 9604, i32 -9604>
%29 = getelementptr inbounds i32, i32* %16, i64 16
%30 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> %22, <4 x i32>* %30
%31 = add <4 x i32> %17, <i32 84372, i32 34888, i32 -34888, i32 -84372>
%32 = getelementptr inbounds i32, i32* %16, i64 20
%33 = bitcast i32* %29 to <4 x i32>*
store <4 x i32> %25, <4 x i32>* %33
%34 = add <4 x i32> %18, <i32 63368, i32 -63368, i32 112338, i32 46452>
%35 = getelementptr inbounds i32, i32* %16, i64 24
%36 = bitcast i32* %32 to <4 x i32>*
store <4 x i32> %28, <4 x i32>* %36
%37 = add <4 x i32> %19, <i32 -46452, i32 -112338, i32 19208, i32 -19208>
%38 = add nuw nsw i32 %15, 2
%39 = icmp eq i32 %38, 256
br i1 %39, label %40, label %14
40: ; preds = %14
%41 = bitcast [12 x i32]* %2 to <4 x i32>*
store <4 x i32> %31, <4 x i32>* %41
%42 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> %34, <4 x i32>* %42
%43 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> %37, <4 x i32>* %43
ret void
}