#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 */
unsigned char *calloc(int, int);
int /*<<< orphan*/ shuffle_uint8(unsigned char *, int);
unsigned char *compute_seed() {
  unsigned char *perm = calloc(512, sizeof(unsigned char));
  for (int i = 0; i < 256; i++)
    perm[i] = i;
  shuffle_uint8(perm, 256);
  for (int i = 0; i < 256; i++)
    perm[i + 256] = perm[i];
  return perm;
}


x86 assembly (clang, -O0):
<compute_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x200,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    116d <compute_seed+0x4d>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1142 <compute_seed+0x22>
mov    -0x8(%rbp),%rdi
mov    $0x100,%esi
call   1030 <shuffle_uint8@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x100,-0x10(%rbp)
jge    11bb <compute_seed+0x9b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x100,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1182 <compute_seed+0x62>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_seed>:
push   %rbx
mov    $0x200,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
movaps 0xec6(%rip),%xmm0
movups %xmm0,(%rax)
movaps 0xecc(%rip),%xmm0
movups %xmm0,0x10(%rax)
movaps 0xed1(%rip),%xmm0
movups %xmm0,0x20(%rax)
movaps 0xed6(%rip),%xmm0
movups %xmm0,0x30(%rax)
movaps 0xedb(%rip),%xmm0
movups %xmm0,0x40(%rax)
movaps 0xee0(%rip),%xmm0
movups %xmm0,0x50(%rax)
movaps 0xee5(%rip),%xmm0
movups %xmm0,0x60(%rax)
movaps 0xeea(%rip),%xmm0
movups %xmm0,0x70(%rax)
movaps 0xeef(%rip),%xmm0
movups %xmm0,0x80(%rax)
movaps 0xef1(%rip),%xmm0
movups %xmm0,0x90(%rax)
movaps 0xef3(%rip),%xmm0
movups %xmm0,0xa0(%rax)
movaps 0xef5(%rip),%xmm0
movups %xmm0,0xb0(%rax)
movaps 0xef7(%rip),%xmm0
movups %xmm0,0xc0(%rax)
movaps 0xef9(%rip),%xmm0
movups %xmm0,0xd0(%rax)
movaps 0xefb(%rip),%xmm0
movups %xmm0,0xe0(%rax)
movaps 0xefd(%rip),%xmm0
movups %xmm0,0xf0(%rax)
mov    %rax,%rdi
mov    $0x100,%esi
call   1030 <shuffle_uint8@plt>
movups (%rbx),%xmm0
movups 0x10(%rbx),%xmm1
movups 0x20(%rbx),%xmm2
movups 0x30(%rbx),%xmm3
movups %xmm0,0x100(%rbx)
movups %xmm1,0x110(%rbx)
movups %xmm2,0x120(%rbx)
movups %xmm3,0x130(%rbx)
movups 0x40(%rbx),%xmm0
movups %xmm0,0x140(%rbx)
movups 0x50(%rbx),%xmm0
movups %xmm0,0x150(%rbx)
movups 0x60(%rbx),%xmm0
movups %xmm0,0x160(%rbx)
movups 0x70(%rbx),%xmm0
movups %xmm0,0x170(%rbx)
movups 0x80(%rbx),%xmm0
movups %xmm0,0x180(%rbx)
movups 0x90(%rbx),%xmm0
movups 0xa0(%rbx),%xmm1
movups 0xb0(%rbx),%xmm2
movups 0xc0(%rbx),%xmm3
movups %xmm0,0x190(%rbx)
movups %xmm1,0x1a0(%rbx)
movups %xmm2,0x1b0(%rbx)
movups %xmm3,0x1c0(%rbx)
movups 0xd0(%rbx),%xmm0
movups %xmm0,0x1d0(%rbx)
movups 0xe0(%rbx),%xmm0
movups %xmm0,0x1e0(%rbx)
movups 0xf0(%rbx),%xmm0
movups %xmm0,0x1f0(%rbx)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @compute_seed() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca i32
%4 = call i8* @calloc(i32 512, i32 1)
store i8* %4, i8** %1
store i32 0, i32* %2
br label %5
5: ; preds = %15, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 256
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = load i32, i32* %2
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %1
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 %10, i8* %14
br label %15
15: ; preds = %8
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %5
18: ; preds = %5
%19 = load i8*, i8** %1
%20 = call i32 @shuffle_uint8(i8* %19, i32 256)
store i32 0, i32* %3
br label %21
21: ; preds = %35, %18
%22 = load i32, i32* %3
%23 = icmp slt i32 %22, 256
br i1 %23, label %24, label %38
24: ; preds = %21
%25 = load i8*, i8** %1
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
%29 = load i8, i8* %28
%30 = load i8*, i8** %1
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 256
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8, i8* %30, i64 %33
store i8 %29, i8* %34
br label %35
35: ; preds = %24
%36 = load i32, i32* %3
%37 = add nsw i32 %36, 1
store i32 %37, i32* %3
br label %21
38: ; preds = %21
%39 = load i8*, i8** %1
ret i8* %39
}

LLVM IR (-O2):
define i8* @compute_seed() {
%1 = tail call dereferenceable_or_null(512) i8* @calloc(i32 512, i32 1)
%2 = bitcast i8* %1 to <16 x i8>*
store <16 x i8> <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, <16 x i8>* %2
%3 = getelementptr inbounds i8, i8* %1, i64 16
%4 = bitcast i8* %3 to <16 x i8>*
store <16 x i8> <i8 16, i8 17, i8 18, i8 19, i8 20, i8 21, i8 22, i8 23, i8 24, i8 25, i8 26, i8 27, i8 28, i8 29, i8 30, i8 31>, <16 x i8>* %4
%5 = getelementptr inbounds i8, i8* %1, i64 32
%6 = bitcast i8* %5 to <16 x i8>*
store <16 x i8> <i8 32, i8 33, i8 34, i8 35, i8 36, i8 37, i8 38, i8 39, i8 40, i8 41, i8 42, i8 43, i8 44, i8 45, i8 46, i8 47>, <16 x i8>* %6
%7 = getelementptr inbounds i8, i8* %1, i64 48
%8 = bitcast i8* %7 to <16 x i8>*
store <16 x i8> <i8 48, i8 49, i8 50, i8 51, i8 52, i8 53, i8 54, i8 55, i8 56, i8 57, i8 58, i8 59, i8 60, i8 61, i8 62, i8 63>, <16 x i8>* %8
%9 = getelementptr inbounds i8, i8* %1, i64 64
%10 = bitcast i8* %9 to <16 x i8>*
store <16 x i8> <i8 64, i8 65, i8 66, i8 67, i8 68, i8 69, i8 70, i8 71, i8 72, i8 73, i8 74, i8 75, i8 76, i8 77, i8 78, i8 79>, <16 x i8>* %10
%11 = getelementptr inbounds i8, i8* %1, i64 80
%12 = bitcast i8* %11 to <16 x i8>*
store <16 x i8> <i8 80, i8 81, i8 82, i8 83, i8 84, i8 85, i8 86, i8 87, i8 88, i8 89, i8 90, i8 91, i8 92, i8 93, i8 94, i8 95>, <16 x i8>* %12
%13 = getelementptr inbounds i8, i8* %1, i64 96
%14 = bitcast i8* %13 to <16 x i8>*
store <16 x i8> <i8 96, i8 97, i8 98, i8 99, i8 100, i8 101, i8 102, i8 103, i8 104, i8 105, i8 106, i8 107, i8 108, i8 109, i8 110, i8 111>, <16 x i8>* %14
%15 = getelementptr inbounds i8, i8* %1, i64 112
%16 = bitcast i8* %15 to <16 x i8>*
store <16 x i8> <i8 112, i8 113, i8 114, i8 115, i8 116, i8 117, i8 118, i8 119, i8 120, i8 121, i8 122, i8 123, i8 124, i8 125, i8 126, i8 127>, <16 x i8>* %16
%17 = getelementptr inbounds i8, i8* %1, i64 128
%18 = bitcast i8* %17 to <16 x i8>*
store <16 x i8> <i8 -128, i8 -127, i8 -126, i8 -125, i8 -124, i8 -123, i8 -122, i8 -121, i8 -120, i8 -119, i8 -118, i8 -117, i8 -116, i8 -115, i8 -114, i8 -113>, <16 x i8>* %18
%19 = getelementptr inbounds i8, i8* %1, i64 144
%20 = bitcast i8* %19 to <16 x i8>*
store <16 x i8> <i8 -112, i8 -111, i8 -110, i8 -109, i8 -108, i8 -107, i8 -106, i8 -105, i8 -104, i8 -103, i8 -102, i8 -101, i8 -100, i8 -99, i8 -98, i8 -97>, <16 x i8>* %20
%21 = getelementptr inbounds i8, i8* %1, i64 160
%22 = bitcast i8* %21 to <16 x i8>*
store <16 x i8> <i8 -96, i8 -95, i8 -94, i8 -93, i8 -92, i8 -91, i8 -90, i8 -89, i8 -88, i8 -87, i8 -86, i8 -85, i8 -84, i8 -83, i8 -82, i8 -81>, <16 x i8>* %22
%23 = getelementptr inbounds i8, i8* %1, i64 176
%24 = bitcast i8* %23 to <16 x i8>*
store <16 x i8> <i8 -80, i8 -79, i8 -78, i8 -77, i8 -76, i8 -75, i8 -74, i8 -73, i8 -72, i8 -71, i8 -70, i8 -69, i8 -68, i8 -67, i8 -66, i8 -65>, <16 x i8>* %24
%25 = getelementptr inbounds i8, i8* %1, i64 192
%26 = bitcast i8* %25 to <16 x i8>*
store <16 x i8> <i8 -64, i8 -63, i8 -62, i8 -61, i8 -60, i8 -59, i8 -58, i8 -57, i8 -56, i8 -55, i8 -54, i8 -53, i8 -52, i8 -51, i8 -50, i8 -49>, <16 x i8>* %26
%27 = getelementptr inbounds i8, i8* %1, i64 208
%28 = bitcast i8* %27 to <16 x i8>*
store <16 x i8> <i8 -48, i8 -47, i8 -46, i8 -45, i8 -44, i8 -43, i8 -42, i8 -41, i8 -40, i8 -39, i8 -38, i8 -37, i8 -36, i8 -35, i8 -34, i8 -33>, <16 x i8>* %28
%29 = getelementptr inbounds i8, i8* %1, i64 224
%30 = bitcast i8* %29 to <16 x i8>*
store <16 x i8> <i8 -32, i8 -31, i8 -30, i8 -29, i8 -28, i8 -27, i8 -26, i8 -25, i8 -24, i8 -23, i8 -22, i8 -21, i8 -20, i8 -19, i8 -18, i8 -17>, <16 x i8>* %30
%31 = getelementptr inbounds i8, i8* %1, i64 240
%32 = bitcast i8* %31 to <16 x i8>*
store <16 x i8> <i8 -16, i8 -15, i8 -14, i8 -13, i8 -12, i8 -11, i8 -10, i8 -9, i8 -8, i8 -7, i8 -6, i8 -5, i8 -4, i8 -3, i8 -2, i8 -1>, <16 x i8>* %32
%33 = tail call i32 @shuffle_uint8(i8* %1, i32 256)
%34 = bitcast i8* %1 to <16 x i8>*
%35 = load <16 x i8>, <16 x i8>* %34
%36 = getelementptr inbounds i8, i8* %1, i64 256
%37 = bitcast i8* %36 to <16 x i8>*
store <16 x i8> %35, <16 x i8>* %37
%38 = getelementptr inbounds i8, i8* %1, i64 16
%39 = bitcast i8* %38 to <16 x i8>*
%40 = load <16 x i8>, <16 x i8>* %39
%41 = getelementptr inbounds i8, i8* %1, i64 272
%42 = bitcast i8* %41 to <16 x i8>*
store <16 x i8> %40, <16 x i8>* %42
%43 = getelementptr inbounds i8, i8* %1, i64 32
%44 = bitcast i8* %43 to <16 x i8>*
%45 = load <16 x i8>, <16 x i8>* %44
%46 = getelementptr inbounds i8, i8* %1, i64 288
%47 = bitcast i8* %46 to <16 x i8>*
store <16 x i8> %45, <16 x i8>* %47
%48 = getelementptr inbounds i8, i8* %1, i64 48
%49 = bitcast i8* %48 to <16 x i8>*
%50 = load <16 x i8>, <16 x i8>* %49
%51 = getelementptr inbounds i8, i8* %1, i64 304
%52 = bitcast i8* %51 to <16 x i8>*
store <16 x i8> %50, <16 x i8>* %52
%53 = getelementptr inbounds i8, i8* %1, i64 64
%54 = bitcast i8* %53 to <16 x i8>*
%55 = load <16 x i8>, <16 x i8>* %54
%56 = getelementptr inbounds i8, i8* %1, i64 320
%57 = bitcast i8* %56 to <16 x i8>*
store <16 x i8> %55, <16 x i8>* %57
%58 = getelementptr inbounds i8, i8* %1, i64 80
%59 = bitcast i8* %58 to <16 x i8>*
%60 = load <16 x i8>, <16 x i8>* %59
%61 = getelementptr inbounds i8, i8* %1, i64 336
%62 = bitcast i8* %61 to <16 x i8>*
store <16 x i8> %60, <16 x i8>* %62
%63 = getelementptr inbounds i8, i8* %1, i64 96
%64 = bitcast i8* %63 to <16 x i8>*
%65 = load <16 x i8>, <16 x i8>* %64
%66 = getelementptr inbounds i8, i8* %1, i64 352
%67 = bitcast i8* %66 to <16 x i8>*
store <16 x i8> %65, <16 x i8>* %67
%68 = getelementptr inbounds i8, i8* %1, i64 112
%69 = bitcast i8* %68 to <16 x i8>*
%70 = load <16 x i8>, <16 x i8>* %69
%71 = getelementptr inbounds i8, i8* %1, i64 368
%72 = bitcast i8* %71 to <16 x i8>*
store <16 x i8> %70, <16 x i8>* %72
%73 = getelementptr inbounds i8, i8* %1, i64 128
%74 = bitcast i8* %73 to <16 x i8>*
%75 = load <16 x i8>, <16 x i8>* %74
%76 = getelementptr inbounds i8, i8* %1, i64 384
%77 = bitcast i8* %76 to <16 x i8>*
store <16 x i8> %75, <16 x i8>* %77
%78 = getelementptr inbounds i8, i8* %1, i64 144
%79 = bitcast i8* %78 to <16 x i8>*
%80 = load <16 x i8>, <16 x i8>* %79
%81 = getelementptr inbounds i8, i8* %1, i64 400
%82 = bitcast i8* %81 to <16 x i8>*
store <16 x i8> %80, <16 x i8>* %82
%83 = getelementptr inbounds i8, i8* %1, i64 160
%84 = bitcast i8* %83 to <16 x i8>*
%85 = load <16 x i8>, <16 x i8>* %84
%86 = getelementptr inbounds i8, i8* %1, i64 416
%87 = bitcast i8* %86 to <16 x i8>*
store <16 x i8> %85, <16 x i8>* %87
%88 = getelementptr inbounds i8, i8* %1, i64 176
%89 = bitcast i8* %88 to <16 x i8>*
%90 = load <16 x i8>, <16 x i8>* %89
%91 = getelementptr inbounds i8, i8* %1, i64 432
%92 = bitcast i8* %91 to <16 x i8>*
store <16 x i8> %90, <16 x i8>* %92
%93 = getelementptr inbounds i8, i8* %1, i64 192
%94 = bitcast i8* %93 to <16 x i8>*
%95 = load <16 x i8>, <16 x i8>* %94
%96 = getelementptr inbounds i8, i8* %1, i64 448
%97 = bitcast i8* %96 to <16 x i8>*
store <16 x i8> %95, <16 x i8>* %97
%98 = getelementptr inbounds i8, i8* %1, i64 208
%99 = bitcast i8* %98 to <16 x i8>*
%100 = load <16 x i8>, <16 x i8>* %99
%101 = getelementptr inbounds i8, i8* %1, i64 464
%102 = bitcast i8* %101 to <16 x i8>*
store <16 x i8> %100, <16 x i8>* %102
%103 = getelementptr inbounds i8, i8* %1, i64 224
%104 = bitcast i8* %103 to <16 x i8>*
%105 = load <16 x i8>, <16 x i8>* %104
%106 = getelementptr inbounds i8, i8* %1, i64 480
%107 = bitcast i8* %106 to <16 x i8>*
store <16 x i8> %105, <16 x i8>* %107
%108 = getelementptr inbounds i8, i8* %1, i64 240
%109 = bitcast i8* %108 to <16 x i8>*
%110 = load <16 x i8>, <16 x i8>* %109
%111 = getelementptr inbounds i8, i8* %1, i64 496
%112 = bitcast i8* %111 to <16 x i8>*
store <16 x i8> %110, <16 x i8>* %112
ret i8* %1
}