#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 /*<<< orphan*/ get_group_catalogue(int, void **);
int /*<<< orphan*/ get_group_coordinates(int, void **);
int /*<<< orphan*/ get_hash_table(int, void **);
int get_hash_table_size(int, void **);
int get_total_number_of_groups(int, void **);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *);
int /*<<< orphan*/ swap_Nbyte(char *, int, int);
int Mill(int argc, int N, float *py_pos) {
  printf("\n\n");
  void *Par[20];
  char OutputDir[200];
  sprintf(OutputDir, "/data/rw9/Millennium/snapdir_063");
  int num = 63;
  int TotNgroups;
  Par[0] = OutputDir;
  Par[1] = &num;
  TotNgroups = get_total_number_of_groups(2, Par);
  swap_Nbyte((char *)&TotNgroups, 1, 4);
  printf("TotNgroups:%d\n", TotNgroups);
  int GroupLen[TotNgroups];
  int GroupFileNr[TotNgroups], GroupNr[TotNgroups];
  Par[2] = &GroupLen[0];
  Par[3] = &GroupFileNr[0];
  Par[4] = &GroupNr[0];
  get_group_catalogue(5, Par);
  int HashTabsize = 0;
  char SnapBase[200];
  sprintf(SnapBase, "snap_millennium");
  int NFiles = 0;
  Par[2] = SnapBase;
  Par[3] = &NFiles;
  HashTabsize = get_hash_table_size(4, Par);
  swap_Nbyte((char *)&HashTabsize, 1, 4);
  swap_Nbyte((char *)&NFiles, 1, 4);
  printf("NFiles:%d\n", NFiles);
  printf("HashTableSize:%d\n", HashTabsize);
  int Hashtable[HashTabsize], Filetable[HashTabsize], LastHashCell[HashTabsize],
      NInFiles[HashTabsize];
  Par[3] = &Hashtable[0];
  Par[4] = &Filetable[0];
  Par[5] = &LastHashCell[0];
  Par[6] = &NInFiles[0];
  get_hash_table(8, Par);
  swap_Nbyte((char *)&Hashtable[0], HashTabsize, 4);
  int FiNr, GrNr, Len;
  printf("group number: %d\n", N);
  FiNr = GroupFileNr[N];
  GrNr = GroupNr[N];
  Len = GroupLen[N];
  printf("group length: %d\n", Len);
  char PostProcDir[200];
  sprintf(PostProcDir, "/data/rw9/Millennium/postproc_063");
  float vel[Len * 3], pos[Len * 3];
  double Sx, Sy, Sz = 0.0;
  Par[0] = OutputDir;
  Par[1] = PostProcDir;
  Par[2] = &num;
  Par[3] = SnapBase;
  Par[4] = &Hashtable[0];
  Par[5] = &Filetable[0];
  Par[6] = &HashTabsize;
  Par[7] = &LastHashCell[0];
  Par[8] = &NInFiles[0];
  Par[9] = &GrNr;
  Par[10] = &FiNr;
  Par[11] = &Len;
  Par[12] = &pos[0];
  Par[13] = &vel[0];
  Par[14] = &Sx;
  Par[15] = &Sy;
  Par[16] = &Sz;
  get_group_coordinates(16, Par);
  int i;
  for (i = 0; i < Len * 3; i++) {
    py_pos[i] = pos[i];
  }
  return 0;
}


x86 assembly (clang, -O0):
<Mill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
lea    0xe64(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x3d9(%rbp)
call   1050 <printf@plt>
lea    0xe53(%rip),%rsi
lea    -0x180(%rbp),%rdi
mov    %rdi,-0x428(%rbp)
call   10a0 <sprintf@plt>
mov    -0x428(%rbp),%rax
movl   $0x3f,-0x184(%rbp)
mov    %rax,-0xb0(%rbp)
lea    -0x184(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    $0x2,%edi
lea    -0xb0(%rbp),%rsi
mov    %rsi,-0x408(%rbp)
call   1080 <get_total_number_of_groups@plt>
mov    %eax,-0x188(%rbp)
lea    -0x188(%rbp),%rdi
mov    $0x1,%esi
mov    %esi,-0x40c(%rbp)
mov    $0x4,%edx
mov    %edx,-0x3fc(%rbp)
call   1040 <swap_Nbyte@plt>
mov    -0x3d9(%rbp),%al
mov    -0x188(%rbp),%esi
lea    0xde8(%rip),%rdi
call   1050 <printf@plt>
mov    -0x408(%rbp),%rsi
mov    -0x188(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x190(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x3e8(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x198(%rbp)
mov    -0x188(%rbp),%eax
lea    0xf(,%rax,4),%rdi
and    $0xfffffffffffffff0,%rdi
mov    %rsp,%rcx
sub    %rdi,%rcx
mov    %rcx,-0x3f8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x1a0(%rbp)
mov    -0x188(%rbp),%eax
mov    %eax,%edi
lea    0xf(,%rdi,4),%r8
and    $0xfffffffffffffff0,%r8
mov    %rsp,%rax
sub    %r8,%rax
mov    %rax,-0x3f0(%rbp)
mov    %rax,%rsp
mov    %rdi,-0x1a8(%rbp)
mov    %rdx,-0xa0(%rbp)
mov    %rcx,-0x98(%rbp)
mov    %rax,-0x90(%rbp)
mov    $0x5,%edi
call   1090 <get_group_catalogue@plt>
movl   $0x0,-0x1ac(%rbp)
lea    0xd34(%rip),%rsi
lea    -0x280(%rbp),%rdi
mov    %rdi,-0x420(%rbp)
call   10a0 <sprintf@plt>
mov    -0x408(%rbp),%rsi
mov    -0x3fc(%rbp),%edi
mov    -0x420(%rbp),%rax
movl   $0x0,-0x284(%rbp)
mov    %rax,-0xa0(%rbp)
lea    -0x284(%rbp),%rax
mov    %rax,-0x418(%rbp)
mov    %rax,-0x98(%rbp)
call   1060 <get_hash_table_size@plt>
mov    -0x40c(%rbp),%esi
mov    -0x3fc(%rbp),%edx
mov    %eax,-0x1ac(%rbp)
lea    -0x1ac(%rbp),%rdi
call   1040 <swap_Nbyte@plt>
mov    -0x418(%rbp),%rdi
mov    -0x40c(%rbp),%esi
mov    -0x3fc(%rbp),%edx
call   1040 <swap_Nbyte@plt>
mov    -0x3d9(%rbp),%al
mov    -0x284(%rbp),%esi
lea    0xca9(%rip),%rdi
call   1050 <printf@plt>
mov    -0x3d9(%rbp),%al
mov    -0x1ac(%rbp),%esi
lea    0xc9c(%rip),%rdi
call   1050 <printf@plt>
mov    -0x408(%rbp),%rsi
mov    -0x1ac(%rbp),%eax
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x3d8(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x290(%rbp)
mov    -0x1ac(%rbp),%eax
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x3d0(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x298(%rbp)
mov    -0x1ac(%rbp),%eax
lea    0xf(,%rax,4),%r8
and    $0xfffffffffffffff0,%r8
mov    %rsp,%rcx
sub    %r8,%rcx
mov    %rcx,-0x3c8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x2a0(%rbp)
mov    -0x1ac(%rbp),%eax
mov    %eax,%r8d
lea    0xf(,%r8,4),%r9
and    $0xfffffffffffffff0,%r9
mov    %rsp,%rax
sub    %r9,%rax
mov    %rax,-0x3c0(%rbp)
mov    %rax,%rsp
mov    %r8,-0x2a8(%rbp)
mov    %rdi,-0x98(%rbp)
mov    %rdx,-0x90(%rbp)
mov    %rcx,-0x88(%rbp)
mov    %rax,-0x80(%rbp)
mov    $0x8,%edi
call   1070 <get_hash_table@plt>
mov    -0x3fc(%rbp),%edx
mov    -0x3d8(%rbp),%rdi
mov    -0x1ac(%rbp),%esi
call   1040 <swap_Nbyte@plt>
mov    -0x3d9(%rbp),%al
mov    -0x8(%rbp),%esi
lea    0xbb0(%rip),%rdi
call   1050 <printf@plt>
mov    -0x3f8(%rbp),%rsi
mov    -0x3f0(%rbp),%rdx
mov    -0x3e8(%rbp),%rcx
mov    -0x3d9(%rbp),%al
movslq -0x8(%rbp),%rdi
mov    (%rsi,%rdi,4),%esi
mov    %esi,-0x2ac(%rbp)
movslq -0x8(%rbp),%rsi
mov    (%rdx,%rsi,4),%edx
mov    %edx,-0x2b0(%rbp)
movslq -0x8(%rbp),%rdx
mov    (%rcx,%rdx,4),%ecx
mov    %ecx,-0x2b4(%rbp)
mov    -0x2b4(%rbp),%esi
lea    0xb6e(%rip),%rdi
call   1050 <printf@plt>
lea    0xb74(%rip),%rsi
lea    -0x380(%rbp),%rdi
call   10a0 <sprintf@plt>
mov    -0x3d8(%rbp),%r8
mov    -0x3d0(%rbp),%rdi
mov    -0x3c8(%rbp),%rsi
mov    -0x3c0(%rbp),%rdx
mov    -0x2b4(%rbp),%ecx
mov    %ecx,%eax
lea    (%rax,%rax,2),%eax
mov    %eax,%ecx
lea    0xf(,%rcx,4),%r9
and    $0xfffffffffffffff0,%r9
mov    %rsp,%rax
sub    %r9,%rax
mov    %rax,%rsp
mov    %rcx,-0x388(%rbp)
mov    -0x2b4(%rbp),%r9d
mov    %r9d,%ecx
lea    (%rcx,%rcx,2),%ecx
mov    %ecx,%r9d
lea    0xf(,%r9,4),%r10
and    $0xfffffffffffffff0,%r10
mov    %rsp,%rcx
sub    %r10,%rcx
mov    %rcx,-0x3b8(%rbp)
mov    %rcx,%rsp
mov    %r9,-0x390(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x3a8(%rbp)
ff
lea    -0x180(%rbp),%r9
mov    %r9,-0xb0(%rbp)
lea    -0x380(%rbp),%r9
mov    %r9,-0xa8(%rbp)
lea    -0x184(%rbp),%r9
mov    %r9,-0xa0(%rbp)
lea    -0x280(%rbp),%r9
mov    %r9,-0x98(%rbp)
mov    %r8,-0x90(%rbp)
mov    %rdi,-0x88(%rbp)
lea    -0x1ac(%rbp),%rdi
mov    %rdi,-0x80(%rbp)
mov    %rsi,-0x78(%rbp)
mov    %rdx,-0x70(%rbp)
lea    -0x2b0(%rbp),%rdx
mov    %rdx,-0x68(%rbp)
lea    -0x2ac(%rbp),%rdx
mov    %rdx,-0x60(%rbp)
lea    -0x2b4(%rbp),%rdx
mov    %rdx,-0x58(%rbp)
mov    %rcx,-0x50(%rbp)
mov    %rax,-0x48(%rbp)
lea    -0x398(%rbp),%rax
mov    %rax,-0x40(%rbp)
lea    -0x3a0(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x3a8(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    -0xb0(%rbp),%rsi
mov    $0x10,%edi
call   1030 <get_group_coordinates@plt>
movl   $0x0,-0x3ac(%rbp)
mov    -0x3ac(%rbp),%eax
imul   $0x3,-0x2b4(%rbp),%ecx
cmp    %ecx,%eax
jge    16a9 <Mill+0x529>
mov    -0x3b8(%rbp),%rax
movslq -0x3ac(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x3ac(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x3ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3ac(%rbp)
jmp    165d <Mill+0x4dd>
mov    -0x190(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mill>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x378,%rsp
mov    %rdx,-0x50(%rbp)
mov    %esi,-0x40(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
movups 0xe52(%rip),%xmm0
movaps %xmm0,-0x1f0(%rbp)
movups 0xe34(%rip),%xmm0
movaps %xmm0,-0x200(%rbp)
movb   $0x0,-0x1e0(%rbp)
movl   $0x3f,-0x3c(%rbp)
lea    -0x200(%rbp),%rax
mov    %rax,-0x120(%rbp)
lea    -0x3c(%rbp),%rax
mov    %rax,-0x118(%rbp)
lea    -0x120(%rbp),%rbx
mov    $0x2,%edi
mov    %rbx,%rsi
call   10a0 <get_total_number_of_groups@plt>
mov    %eax,-0x30(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1050 <swap_Nbyte@plt>
mov    -0x30(%rbp),%esi
lea    0xdf3(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rsp,-0x70(%rbp)
mov    -0x30(%rbp),%eax
mov    %rsp,%rcx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,%rsp
mov    %rcx,-0x68(%rbp)
mov    -0x30(%rbp),%eax
mov    %rsp,%rdx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdx
mov    %rdx,%rsp
mov    %rdx,-0x58(%rbp)
mov    %rsp,%rsi
sub    %rax,%rsi
mov    %rsi,-0x60(%rbp)
mov    %rsi,%rsp
mov    %rcx,-0x110(%rbp)
mov    %rdx,-0x108(%rbp)
mov    %rsi,-0x100(%rbp)
mov    $0x5,%edi
mov    %rbx,%rsi
call   10b0 <get_group_catalogue@plt>
movups 0xd89(%rip),%xmm0
movaps %xmm0,-0x3a0(%rbp)
movl   $0x0,-0x38(%rbp)
lea    -0x3a0(%rbp),%rax
mov    %rax,-0x110(%rbp)
lea    -0x38(%rbp),%r14
mov    %r14,-0x108(%rbp)
mov    $0x4,%edi
mov    %rbx,%rsi
call   1070 <get_hash_table_size@plt>
mov    %eax,-0x2c(%rbp)
lea    -0x2c(%rbp),%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1050 <swap_Nbyte@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1050 <swap_Nbyte@plt>
mov    -0x38(%rbp),%esi
lea    0xd33(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xd2d(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    -0x2c(%rbp),%eax
mov    %rsp,%r14
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
mov    %rsp,%r12
sub    %rax,%r12
mov    %r12,%rsp
mov    %rsp,%r13
sub    %rax,%r13
mov    %r13,%rsp
mov    %r14,-0x108(%rbp)
mov    %r15,-0x100(%rbp)
mov    %r12,-0xf8(%rbp)
mov    %r13,-0xf0(%rbp)
mov    $0x8,%edi
mov    %rbx,%rsi
call   1090 <get_hash_table@plt>
mov    -0x2c(%rbp),%esi
mov    %r14,%rdi
mov    $0x4,%edx
call   1050 <swap_Nbyte@plt>
lea    0xcc5(%rip),%rdi
mov    -0x40(%rbp),%ebx
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
movslq %ebx,%rax
mov    -0x58(%rbp),%rcx
mov    (%rcx,%rax,4),%ecx
mov    %ecx,-0x48(%rbp)
mov    -0x60(%rbp),%rcx
mov    (%rcx,%rax,4),%ecx
mov    %ecx,-0x44(%rbp)
mov    -0x68(%rbp),%rcx
mov    (%rcx,%rax,4),%ebx
mov    %ebx,-0x34(%rbp)
lea    0xca3(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
movups 0xcb5(%rip),%xmm0
movaps %xmm0,-0x2c0(%rbp)
movups 0xc97(%rip),%xmm0
movaps %xmm0,-0x2d0(%rbp)
movw   $0x33,-0x2b0(%rbp)
lea    (%rbx,%rbx,2),%eax
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,%rsp
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
movq   $0x0,-0x78(%rbp)
lea    -0x200(%rbp),%rax
mov    %rax,-0x120(%rbp)
lea    -0x2d0(%rbp),%rax
mov    %rax,-0x118(%rbp)
lea    -0x3c(%rbp),%rax
mov    %rax,-0x110(%rbp)
lea    -0x3a0(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    %r14,-0x100(%rbp)
mov    %r15,-0xf8(%rbp)
lea    -0x2c(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    %r12,-0xe8(%rbp)
mov    %r13,-0xe0(%rbp)
lea    -0x44(%rbp),%rax
mov    %rax,-0xd8(%rbp)
lea    -0x48(%rbp),%rax
mov    %rax,-0xd0(%rbp)
lea    -0x34(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    %rbx,-0xc0(%rbp)
mov    %rcx,-0xb8(%rbp)
lea    -0x130(%rbp),%rax
mov    %rax,-0xb0(%rbp)
lea    -0x128(%rbp),%rax
mov    %rax,-0xa8(%rbp)
lea    -0x78(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    $0x10,%edi
lea    -0x120(%rbp),%rsi
call   1040 <get_group_coordinates@plt>
mov    -0x34(%rbp),%eax
test   %eax,%eax
jle    150b <Mill+0x37b>
lea    (%rax,%rax,2),%eax
cmp    $0x2,%eax
mov    $0x1,%edx
cmovge %eax,%edx
shl    $0x2,%rdx
mov    -0x50(%rbp),%rdi
mov    %rbx,%rsi
call   1080 <memcpy@plt>
mov    -0x70(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
@.str.1 = [33 x i8] c"/data/rw9/Millennium/snapdir_063\00"
@.str.2 = [15 x i8] c"TotNgroups:%d\0A\00"
@.str.3 = [16 x i8] c"snap_millennium\00"
@.str.4 = [11 x i8] c"NFiles:%d\0A\00"
@.str.5 = [18 x i8] c"HashTableSize:%d\0A\00"
@.str.6 = [18 x i8] c"group number: %d\0A\00"
@.str.7 = [18 x i8] c"group length: %d\0A\00"
@.str.8 = [34 x i8] c"/data/rw9/Millennium/postproc_063\00"
define i32 @Mill(i32 %0, i32 %1, float* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float*
%7 = alloca [20 x i8*]
%8 = alloca [200 x i8]
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i32
%16 = alloca [200 x i8]
%17 = alloca i32
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca [200 x i8]
%26 = alloca i64
%27 = alloca i64
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store float* %2, float** %6
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%33 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%34 = call i32 @sprintf(i8* %33, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
store i32 63, i32* %9
%35 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%36 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 0
store i8* %35, i8** %36
%37 = bitcast i32* %9 to i8*
%38 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 1
store i8* %37, i8** %38
%39 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 0
%40 = call i32 @get_total_number_of_groups(i32 2, i8** %39)
store i32 %40, i32* %10
%41 = bitcast i32* %10 to i8*
%42 = call i32 @swap_Nbyte(i8* %41, i32 1, i32 4)
%43 = load i32, i32* %10
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %43)
%45 = load i32, i32* %10
%46 = zext i32 %45 to i64
%47 = call i8* @llvm.stacksave()
store i8* %47, i8** %11
%48 = alloca i32, i64 %46
store i64 %46, i64* %12
%49 = load i32, i32* %10
%50 = zext i32 %49 to i64
%51 = alloca i32, i64 %50
store i64 %50, i64* %13
%52 = load i32, i32* %10
%53 = zext i32 %52 to i64
%54 = alloca i32, i64 %53
store i64 %53, i64* %14
%55 = getelementptr inbounds i32, i32* %48, i64 0
%56 = bitcast i32* %55 to i8*
%57 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 2
store i8* %56, i8** %57
%58 = getelementptr inbounds i32, i32* %51, i64 0
%59 = bitcast i32* %58 to i8*
%60 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 3
store i8* %59, i8** %60
%61 = getelementptr inbounds i32, i32* %54, i64 0
%62 = bitcast i32* %61 to i8*
%63 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 4
store i8* %62, i8** %63
%64 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 0
%65 = call i32 @get_group_catalogue(i32 5, i8** %64)
store i32 0, i32* %15
%66 = getelementptr inbounds [200 x i8], [200 x i8]* %16, i64 0, i64 0
%67 = call i32 @sprintf(i8* %66, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %17
%68 = getelementptr inbounds [200 x i8], [200 x i8]* %16, i64 0, i64 0
%69 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 2
store i8* %68, i8** %69
%70 = bitcast i32* %17 to i8*
%71 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 3
store i8* %70, i8** %71
%72 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 0
%73 = call i32 @get_hash_table_size(i32 4, i8** %72)
store i32 %73, i32* %15
%74 = bitcast i32* %15 to i8*
%75 = call i32 @swap_Nbyte(i8* %74, i32 1, i32 4)
%76 = bitcast i32* %17 to i8*
%77 = call i32 @swap_Nbyte(i8* %76, i32 1, i32 4)
%78 = load i32, i32* %17
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 %78)
%80 = load i32, i32* %15
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %80)
%82 = load i32, i32* %15
%83 = zext i32 %82 to i64
%84 = alloca i32, i64 %83
store i64 %83, i64* %18
%85 = load i32, i32* %15
%86 = zext i32 %85 to i64
%87 = alloca i32, i64 %86
store i64 %86, i64* %19
%88 = load i32, i32* %15
%89 = zext i32 %88 to i64
%90 = alloca i32, i64 %89
store i64 %89, i64* %20
%91 = load i32, i32* %15
%92 = zext i32 %91 to i64
%93 = alloca i32, i64 %92
store i64 %92, i64* %21
%94 = getelementptr inbounds i32, i32* %84, i64 0
%95 = bitcast i32* %94 to i8*
%96 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 3
store i8* %95, i8** %96
%97 = getelementptr inbounds i32, i32* %87, i64 0
%98 = bitcast i32* %97 to i8*
%99 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 4
store i8* %98, i8** %99
%100 = getelementptr inbounds i32, i32* %90, i64 0
%101 = bitcast i32* %100 to i8*
%102 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 5
store i8* %101, i8** %102
%103 = getelementptr inbounds i32, i32* %93, i64 0
%104 = bitcast i32* %103 to i8*
%105 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 6
store i8* %104, i8** %105
%106 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 0
%107 = call i32 @get_hash_table(i32 8, i8** %106)
%108 = getelementptr inbounds i32, i32* %84, i64 0
%109 = bitcast i32* %108 to i8*
%110 = load i32, i32* %15
%111 = call i32 @swap_Nbyte(i8* %109, i32 %110, i32 4)
%112 = load i32, i32* %5
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i32 %112)
%114 = load i32, i32* %5
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i32, i32* %51, i64 %115
%117 = load i32, i32* %116
store i32 %117, i32* %22
%118 = load i32, i32* %5
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i32, i32* %54, i64 %119
%121 = load i32, i32* %120
store i32 %121, i32* %23
%122 = load i32, i32* %5
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i32, i32* %48, i64 %123
%125 = load i32, i32* %124
store i32 %125, i32* %24
%126 = load i32, i32* %24
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i32 %126)
%128 = getelementptr inbounds [200 x i8], [200 x i8]* %25, i64 0, i64 0
%129 = call i32 @sprintf(i8* %128, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
%130 = load i32, i32* %24
%131 = mul nsw i32 %130, 3
%132 = zext i32 %131 to i64
%133 = alloca float, i64 %132
store i64 %132, i64* %26
%134 = load i32, i32* %24
%135 = mul nsw i32 %134, 3
%136 = zext i32 %135 to i64
%137 = alloca float, i64 %136
store i64 %136, i64* %27
store double 0.000000e+00, double* %30
%138 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%139 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 0
store i8* %138, i8** %139
%140 = getelementptr inbounds [200 x i8], [200 x i8]* %25, i64 0, i64 0
%141 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 1
store i8* %140, i8** %141
%142 = bitcast i32* %9 to i8*
%143 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 2
store i8* %142, i8** %143
%144 = getelementptr inbounds [200 x i8], [200 x i8]* %16, i64 0, i64 0
%145 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 3
store i8* %144, i8** %145
%146 = getelementptr inbounds i32, i32* %84, i64 0
%147 = bitcast i32* %146 to i8*
%148 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 4
store i8* %147, i8** %148
%149 = getelementptr inbounds i32, i32* %87, i64 0
%150 = bitcast i32* %149 to i8*
%151 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 5
store i8* %150, i8** %151
%152 = bitcast i32* %15 to i8*
%153 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 6
store i8* %152, i8** %153
%154 = getelementptr inbounds i32, i32* %90, i64 0
%155 = bitcast i32* %154 to i8*
%156 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 7
store i8* %155, i8** %156
%157 = getelementptr inbounds i32, i32* %93, i64 0
%158 = bitcast i32* %157 to i8*
%159 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 8
store i8* %158, i8** %159
%160 = bitcast i32* %23 to i8*
%161 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 9
store i8* %160, i8** %161
%162 = bitcast i32* %22 to i8*
%163 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 10
store i8* %162, i8** %163
%164 = bitcast i32* %24 to i8*
%165 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 11
store i8* %164, i8** %165
%166 = getelementptr inbounds float, float* %137, i64 0
%167 = bitcast float* %166 to i8*
%168 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 12
store i8* %167, i8** %168
%169 = getelementptr inbounds float, float* %133, i64 0
%170 = bitcast float* %169 to i8*
%171 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 13
store i8* %170, i8** %171
%172 = bitcast double* %28 to i8*
%173 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 14
store i8* %172, i8** %173
%174 = bitcast double* %29 to i8*
%175 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 15
store i8* %174, i8** %175
%176 = bitcast double* %30 to i8*
%177 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 16
store i8* %176, i8** %177
%178 = getelementptr inbounds [20 x i8*], [20 x i8*]* %7, i64 0, i64 0
%179 = call i32 @get_group_coordinates(i32 16, i8** %178)
store i32 0, i32* %31
br label %180
180: ; preds = %194, %3
%181 = load i32, i32* %31
%182 = load i32, i32* %24
%183 = mul nsw i32 %182, 3
%184 = icmp slt i32 %181, %183
br i1 %184, label %185, label %197
185: ; preds = %180
%186 = load i32, i32* %31
%187 = sext i32 %186 to i64
%188 = getelementptr inbounds float, float* %137, i64 %187
%189 = load float, float* %188
%190 = load float*, float** %6
%191 = load i32, i32* %31
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds float, float* %190, i64 %192
store float %189, float* %193
br label %194
194: ; preds = %185
%195 = load i32, i32* %31
%196 = add nsw i32 %195, 1
store i32 %196, i32* %31
br label %180
197: ; preds = %180
%198 = load i8*, i8** %11
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [33 x i8] c"/data/rw9/Millennium/snapdir_063\00"
@.str.2 = [15 x i8] c"TotNgroups:%d\0A\00"
@.str.3 = [16 x i8] c"snap_millennium\00"
@.str.4 = [11 x i8] c"NFiles:%d\0A\00"
@.str.5 = [18 x i8] c"HashTableSize:%d\0A\00"
@.str.6 = [18 x i8] c"group number: %d\0A\00"
@.str.7 = [18 x i8] c"group length: %d\0A\00"
@.str.8 = [34 x i8] c"/data/rw9/Millennium/postproc_063\00"
@str = [2 x i8] c"\0A\00"
define i32 @Mill(i32 %0, i32 %1, float* nocapture writeonly %2) {
%4 = alloca [20 x i8*]
%5 = alloca [200 x i8]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [200 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca [200 x i8]
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%19 = bitcast [20 x i8*]* %4 to i8*
%20 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%21 = bitcast i32* %6 to i8*
store i32 63, i32* %6
%22 = bitcast i32* %7 to i8*
%23 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 0
store i8* %20, i8** %23
%24 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 1
%25 = bitcast i8** %24 to i32**
store i32* %6, i32** %25
%26 = call i32 @get_total_number_of_groups(i32 2, i8** %23)
store i32 %26, i32* %7
%27 = call i32 @swap_Nbyte(i8* %22, i32 1, i32 4)
%28 = load i32, i32* %7
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %28)
%30 = load i32, i32* %7
%31 = zext i32 %30 to i64
%32 = call i8* @llvm.stacksave()
%33 = alloca i32, i64 %31
%34 = load i32, i32* %7
%35 = zext i32 %34 to i64
%36 = alloca i32, i64 %35
%37 = alloca i32, i64 %35
%38 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 2
%39 = bitcast i8** %38 to i32**
store i32* %33, i32** %39
%40 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 3
%41 = bitcast i8** %40 to i32**
store i32* %36, i32** %41
%42 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 4
%43 = bitcast i8** %42 to i32**
store i32* %37, i32** %43
%44 = call i32 @get_group_catalogue(i32 5, i8** %23)
%45 = bitcast i32* %8 to i8*
%46 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%47 = bitcast i32* %10 to i8*
store i32 0, i32* %10
store i8* %46, i8** %38
store i32* %10, i32** %41
%48 = call i32 @get_hash_table_size(i32 4, i8** %23)
store i32 %48, i32* %8
%49 = call i32 @swap_Nbyte(i8* %45, i32 1, i32 4)
%50 = call i32 @swap_Nbyte(i8* %47, i32 1, i32 4)
%51 = load i32, i32* %10
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 %51)
%53 = load i32, i32* %8
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %53)
%55 = load i32, i32* %8
%56 = zext i32 %55 to i64
%57 = alloca i32, i64 %56
%58 = alloca i32, i64 %56
%59 = alloca i32, i64 %56
%60 = alloca i32, i64 %56
%61 = bitcast i32* %57 to i8*
store i32* %57, i32** %41
store i32* %58, i32** %43
%62 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 5
%63 = bitcast i8** %62 to i32**
store i32* %59, i32** %63
%64 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 6
%65 = bitcast i8** %64 to i32**
store i32* %60, i32** %65
%66 = call i32 @get_hash_table(i32 8, i8** %23)
%67 = load i32, i32* %8
%68 = call i32 @swap_Nbyte(i8* %61, i32 %67, i32 4)
%69 = bitcast i32* %11 to i8*
%70 = bitcast i32* %12 to i8*
%71 = bitcast i32* %13 to i8*
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i32 %1)
%73 = sext i32 %1 to i64
%74 = getelementptr inbounds i32, i32* %36, i64 %73
%75 = load i32, i32* %74
store i32 %75, i32* %11
%76 = getelementptr inbounds i32, i32* %37, i64 %73
%77 = load i32, i32* %76
store i32 %77, i32* %12
%78 = getelementptr inbounds i32, i32* %33, i64 %73
%79 = load i32, i32* %78
store i32 %79, i32* %13
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i32 %79)
%81 = getelementptr inbounds [200 x i8], [200 x i8]* %14, i64 0, i64 0
%82 = mul nsw i32 %79, 3
%83 = zext i32 %82 to i64
%84 = alloca float, i64 %83
%85 = alloca float, i64 %83
%86 = bitcast double* %15 to i8*
%87 = bitcast double* %16 to i8*
%88 = bitcast double* %17 to i8*
store double 0.000000e+00, double* %17
store i8* %20, i8** %23
store i8* %81, i8** %24
store i32* %6, i32** %39
store i8* %46, i8** %40
store i32* %57, i32** %43
store i32* %58, i32** %63
store i32* %8, i32** %65
%89 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 7
%90 = bitcast i8** %89 to i32**
store i32* %59, i32** %90
%91 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 8
%92 = bitcast i8** %91 to i32**
store i32* %60, i32** %92
%93 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 9
%94 = bitcast i8** %93 to i32**
store i32* %12, i32** %94
%95 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 10
%96 = bitcast i8** %95 to i32**
store i32* %11, i32** %96
%97 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 11
%98 = bitcast i8** %97 to i32**
store i32* %13, i32** %98
%99 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 12
%100 = bitcast i8** %99 to float**
store float* %85, float** %100
%101 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 13
%102 = bitcast i8** %101 to float**
store float* %84, float** %102
%103 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 14
%104 = bitcast i8** %103 to double**
store double* %15, double** %104
%105 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 15
%106 = bitcast i8** %105 to double**
store double* %16, double** %106
%107 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 16
%108 = bitcast i8** %107 to double**
store double* %17, double** %108
%109 = call i32 @get_group_coordinates(i32 16, i8** %23)
%110 = load i32, i32* %13
%111 = icmp sgt i32 %110, 0
br i1 %111, label %112, label %119
112: ; preds = %3
%113 = mul i32 %110, 3
%114 = bitcast float* %85 to i8*
%115 = bitcast float* %2 to i8*
%116 = call i32 @llvm.smax.i32(i32 %113, i32 1)
%117 = zext i32 %116 to i64
%118 = shl nuw nsw i64 %117, 2
br label %119
119: ; preds = %112, %3
ret i32 0
}