#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 */
struct timeval {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double *malloc(size_t);
int /*<<< orphan*/ printf(char *, double, double, double, double, double);
int /*<<< orphan*/ stderr;
double tv_elapsed(struct timeval *, struct timeval *);
void parallel_types(int opcnt, size_t arrsize, FILE *devnull) {
  double asg, add, sub, mul, div;
  struct timeval tv_start, tv_end;
  double *arr, res;
  int i;
  arr = malloc(arrsize * sizeof(double));
  if (arr == NULL) {
    fprintf(stderr, "failed to allocate memory\n");
    exit(1);
  }
  gettimeofday(&tv_start, NULL);
  for (i = 1; i <= opcnt; i++)
    arr[i] = i;
  gettimeofday(&tv_end, NULL);
  asg = tv_elapsed(&tv_end, &tv_start);
  fprintf(devnull, "%f", res);
  gettimeofday(&tv_start, NULL);
  for (i = 1; i <= opcnt; i++) {
    arr[i] += arr[(i + 1) % opcnt];
  }
  gettimeofday(&tv_end, NULL);
  add = tv_elapsed(&tv_end, &tv_start);
  fprintf(devnull, "%f", res);
  gettimeofday(&tv_start, NULL);
  for (i = 1; i <= opcnt; i++)
    arr[i] -= arr[(i + 1) % opcnt];
  gettimeofday(&tv_end, NULL);
  sub = tv_elapsed(&tv_end, &tv_start);
  fprintf(devnull, "%f", res);
  gettimeofday(&tv_start, NULL);
  for (i = 1; i <= opcnt; i++)
    arr[i] *= arr[(i + 1) % opcnt];
  gettimeofday(&tv_end, NULL);
  mul = tv_elapsed(&tv_end, &tv_start);
  fprintf(devnull, "%f", res);
  gettimeofday(&tv_start, NULL);
  for (i = 1; i <= opcnt; i++)
    res = arr[i] / arr[(i + 1) % opcnt];
  gettimeofday(&tv_end, NULL);
  div = tv_elapsed(&tv_end, &tv_start);
  fprintf(devnull, "%f", res);
  printf("array\t%17.0f%17.0f%17.0f%17.0f%17.0f\n", asg, add, sub, mul, div);
  free(arr);
}


x86 assembly (clang, -O0):
<parallel_types>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
jne    11c4 <parallel_types+0x54>
mov    0x2e37(%rip),%rax
movslq (%rax),%rdi
lea    0xe4d(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
lea    -0x48(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1204 <parallel_types+0x94>
cvtsi2sdl -0x64(%rbp),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11d8 <parallel_types+0x68>
lea    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
lea    -0x50(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1080 <tv_elapsed@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
movsd  -0x60(%rbp),%xmm0
lea    0xde8(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
lea    -0x48(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1298 <parallel_types+0x128>
mov    -0x58(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    -0x70(%rbp),%rax
movslq %edx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x64(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    124e <parallel_types+0xde>
lea    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
lea    -0x50(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1080 <tv_elapsed@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
movsd  -0x60(%rbp),%xmm0
lea    0xd54(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
lea    -0x48(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1330 <parallel_types+0x1c0>
mov    -0x58(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    -0x78(%rbp),%rax
movslq %edx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x58(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    12e2 <parallel_types+0x172>
lea    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
lea    -0x50(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1080 <tv_elapsed@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
movsd  -0x60(%rbp),%xmm0
lea    0xcbc(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
lea    -0x48(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     13c4 <parallel_types+0x254>
mov    -0x58(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    -0x80(%rbp),%rax
movslq %edx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x64(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    137a <parallel_types+0x20a>
lea    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
lea    -0x50(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1080 <tv_elapsed@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
movsd  -0x60(%rbp),%xmm0
lea    0xc28(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
lea    -0x48(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     145e <parallel_types+0x2ee>
mov    -0x58(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    -0x88(%rbp),%rax
movslq %edx,%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    140e <parallel_types+0x29e>
lea    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
lea    -0x50(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1080 <tv_elapsed@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rdi
movsd  -0x60(%rbp),%xmm0
lea    0xb8e(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
lea    0xb6a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parallel_types>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdx,%r14
mov    %edi,%r15d
lea    0x0(,%rsi,8),%rdi
call   1070 <malloc@plt>
test   %rax,%rax
je     15ff <parallel_types+0x47f>
mov    %rax,%rbx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
mov    %r15d,%ebp
test   %r15d,%r15d
jle    12c5 <parallel_types+0x145>
mov    $0x1,%eax
cmp    $0x4,%r15d
jb     12ab <parallel_types+0x12b>
mov    %ebp,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     15e7 <parallel_types+0x467>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
movdqa 0xe00(%rip),%xmm0
xor    %ecx,%ecx
movdqa 0xe06(%rip),%xmm1
movdqa 0xe0e(%rip),%xmm2
movdqa 0xe16(%rip),%xmm3
movdqa 0xe1e(%rip),%xmm4
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movdqa %xmm0,%xmm5
cvtdq2pd %xmm0,%xmm6
paddd  %xmm1,%xmm5
cvtdq2pd %xmm5,%xmm5
movups %xmm6,0x8(%rbx,%rcx,8)
movups %xmm5,0x18(%rbx,%rcx,8)
movdqa %xmm0,%xmm5
paddd  %xmm2,%xmm5
movdqa %xmm0,%xmm6
cvtdq2pd %xmm5,%xmm5
paddd  %xmm3,%xmm6
cvtdq2pd %xmm6,%xmm6
movups %xmm5,0x28(%rbx,%rcx,8)
movups %xmm6,0x38(%rbx,%rcx,8)
add    $0x8,%rcx
paddd  %xmm4,%xmm0
add    $0xfffffffffffffffe,%rsi
jne    1230 <parallel_types+0xb0>
test   $0x1,%dl
je     12a2 <parallel_types+0x122>
cvtdq2pd %xmm0,%xmm1
paddd  0xd85(%rip),%xmm0
cvtdq2pd %xmm0,%xmm0
shl    $0x3,%rcx
or     $0x8,%rcx
movdqu %xmm1,(%rbx,%rcx,1)
movdqu %xmm0,0x10(%rbx,%rcx,1)
cmp    %rax,%rbp
je     12c5 <parallel_types+0x145>
or     $0x1,%rax
lea    0x1(%rbp),%rcx
nop
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%rcx
jne    12b0 <parallel_types+0x130>
lea    0x10(%rsp),%r12
mov    %r12,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
lea    0x8(%rsp),%r13
mov    %r12,%rdi
mov    %r13,%rsi
call   1080 <tv_elapsed@plt>
movq   %xmm0,0x40(%rsp)
lea    0xd7a(%rip),%rsi
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <fprintf@plt>
mov    %r13,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %r15d,%r15d
jle    138e <parallel_types+0x20e>
mov    $0x1,%ecx
cmp    $0x1,%r15d
je     1372 <parallel_types+0x1f2>
mov    %ebp,%esi
and    $0xfffffffe,%esi
neg    %rsi
mov    $0x1,%edi
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%rdi),%eax
cltd
idiv   %r15d
movsd  (%rbx,%rdx,8),%xmm0
addsd  (%rbx,%rdi,8),%xmm0
movsd  %xmm0,(%rbx,%rdi,8)
lea    0x2(%rdi),%rcx
mov    %ecx,%eax
cltd
idiv   %r15d
movsd  (%rbx,%rdx,8),%xmm0
addsd  0x8(%rbx,%rdi,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rdi,8)
lea    (%rsi,%rdi,1),%rax
add    $0x2,%rax
mov    %rcx,%rdi
cmp    $0x1,%rax
jne    1330 <parallel_types+0x1b0>
test   $0x1,%bpl
je     138e <parallel_types+0x20e>
lea    0x1(%rcx),%eax
cltd
idiv   %r15d
movsd  (%rbx,%rdx,8),%xmm0
addsd  (%rbx,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
lea    0x10(%rsp),%r12
mov    %r12,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
lea    0x8(%rsp),%r13
mov    %r12,%rdi
mov    %r13,%rsi
call   1080 <tv_elapsed@plt>
movq   %xmm0,0x38(%rsp)
lea    0xcb1(%rip),%rsi
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <fprintf@plt>
mov    %r13,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %r15d,%r15d
jle    144e <parallel_types+0x2ce>
mov    $0x1,%ecx
cmp    $0x1,%r15d
je     1432 <parallel_types+0x2b2>
mov    %ebp,%esi
and    $0xfffffffe,%esi
neg    %rsi
mov    $0x1,%edi
nopl   0x0(%rax,%rax,1)
lea    0x1(%rdi),%eax
cltd
idiv   %r15d
movsd  (%rbx,%rdi,8),%xmm0
movsd  0x8(%rbx,%rdi,8),%xmm1
subsd  (%rbx,%rdx,8),%xmm0
movsd  %xmm0,(%rbx,%rdi,8)
lea    0x2(%rdi),%rcx
mov    %ecx,%eax
cltd
idiv   %r15d
subsd  (%rbx,%rdx,8),%xmm1
movsd  %xmm1,0x8(%rbx,%rdi,8)
lea    (%rsi,%rdi,1),%rax
add    $0x2,%rax
mov    %rcx,%rdi
cmp    $0x1,%rax
jne    13f0 <parallel_types+0x270>
test   $0x1,%bpl
je     144e <parallel_types+0x2ce>
lea    0x1(%rcx),%eax
cltd
idiv   %r15d
movsd  (%rbx,%rcx,8),%xmm0
subsd  (%rbx,%rdx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
lea    0x10(%rsp),%r12
mov    %r12,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
lea    0x8(%rsp),%r13
mov    %r12,%rdi
mov    %r13,%rsi
call   1080 <tv_elapsed@plt>
movq   %xmm0,0x30(%rsp)
lea    0xbf1(%rip),%rsi
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <fprintf@plt>
mov    %r13,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %r15d,%r15d
jle    150e <parallel_types+0x38e>
mov    $0x1,%ecx
cmp    $0x1,%r15d
je     14f2 <parallel_types+0x372>
mov    %ebp,%esi
and    $0xfffffffe,%esi
neg    %rsi
mov    $0x1,%edi
nopl   0x0(%rax,%rax,1)
lea    0x1(%rdi),%eax
cltd
idiv   %r15d
movsd  (%rbx,%rdx,8),%xmm0
mulsd  (%rbx,%rdi,8),%xmm0
movsd  %xmm0,(%rbx,%rdi,8)
lea    0x2(%rdi),%rcx
mov    %ecx,%eax
cltd
idiv   %r15d
movsd  (%rbx,%rdx,8),%xmm0
mulsd  0x8(%rbx,%rdi,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rdi,8)
lea    (%rsi,%rdi,1),%rax
add    $0x2,%rax
mov    %rcx,%rdi
cmp    $0x1,%rax
jne    14b0 <parallel_types+0x330>
test   $0x1,%bpl
je     150e <parallel_types+0x38e>
lea    0x1(%rcx),%eax
cltd
idiv   %r15d
movsd  (%rbx,%rdx,8),%xmm0
mulsd  (%rbx,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
lea    0x10(%rsp),%r12
mov    %r12,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
lea    0x8(%rsp),%r13
mov    %r12,%rdi
mov    %r13,%rsi
call   1080 <tv_elapsed@plt>
movq   %xmm0,0x28(%rsp)
lea    0xb31(%rip),%rsi
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <fprintf@plt>
mov    %r13,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %r15d,%r15d
jle    156d <parallel_types+0x3ed>
lea    0x1(%r15),%eax
movsd  (%rbx,%rbp,8),%xmm0
cltd
idiv   %r15d
divsd  (%rbx,%rdx,8),%xmm0
movsd  %xmm0,0x18(%rsp)
jmp    156d <parallel_types+0x3ed>
lea    0x10(%rsp),%r15
mov    %r15,%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
lea    0x8(%rsp),%rsi
mov    %r15,%rdi
call   1080 <tv_elapsed@plt>
movsd  %xmm0,0x20(%rsp)
lea    0xad5(%rip),%rsi
mov    %r14,%rdi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1060 <fprintf@plt>
lea    0xac1(%rip),%rdi
movsd  0x40(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
movsd  0x28(%rsp),%xmm3
movsd  0x20(%rsp),%xmm4
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movdqa 0xa11(%rip),%xmm0
xor    %ecx,%ecx
test   $0x1,%dl
jne    127f <parallel_types+0xff>
jmp    12a2 <parallel_types+0x122>
mov    0x29da(%rip),%rax
movslq (%rax),%rcx
lea    0xa40(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
call   10a0 <fwrite@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
@stderr = global i32 0
@.str = [27 x i8] c"failed to allocate memory\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [38 x i8] c"array\09%17.0f%17.0f%17.0f%17.0f%17.0f\0A\00"
define void @parallel_types(i32 %0, i64 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32*
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca %struct.timeval
%13 = alloca %struct.timeval
%14 = alloca double*
%15 = alloca double
%16 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%17 = load i64, i64* %5
%18 = mul i64 %17, 8
%19 = call double* @malloc(i64 %18)
store double* %19, double** %14
%20 = load double*, double** %14
%21 = icmp eq double* %20, null
br i1 %21, label %22, label %28
22: ; preds = %3
%23 = load i32, i32* @stderr
%24 = sext i32 %23 to i64
%25 = inttoptr i64 %24 to i32*
%26 = call i32 (i32*, i8*, ...) @fprintf(i32* %25, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%27 = call i32 @exit(i32 1)
unreachable
28: ; preds = %3
%29 = call i32 @gettimeofday(%struct.timeval* %12, i32* null)
store i32 1, i32* %16
br label %30
30: ; preds = %41, %28
%31 = load i32, i32* %16
%32 = load i32, i32* %4
%33 = icmp sle i32 %31, %32
br i1 %33, label %34, label %44
34: ; preds = %30
%35 = load i32, i32* %16
%36 = sitofp i32 %35 to double
%37 = load double*, double** %14
%38 = load i32, i32* %16
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %37, i64 %39
store double %36, double* %40
br label %41
41: ; preds = %34
%42 = load i32, i32* %16
%43 = add nsw i32 %42, 1
store i32 %43, i32* %16
br label %30
44: ; preds = %30
%45 = call i32 @gettimeofday(%struct.timeval* %13, i32* null)
%46 = call double @tv_elapsed(%struct.timeval* %13, %struct.timeval* %12)
store double %46, double* %7
%47 = load i32*, i32** %6
%48 = load double, double* %15
%49 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double %48)
%50 = call i32 @gettimeofday(%struct.timeval* %12, i32* null)
store i32 1, i32* %16
br label %51
51: ; preds = %70, %44
%52 = load i32, i32* %16
%53 = load i32, i32* %4
%54 = icmp sle i32 %52, %53
br i1 %54, label %55, label %73
55: ; preds = %51
%56 = load double*, double** %14
%57 = load i32, i32* %16
%58 = add nsw i32 %57, 1
%59 = load i32, i32* %4
%60 = srem i32 %58, %59
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double, double* %56, i64 %61
%63 = load double, double* %62
%64 = load double*, double** %14
%65 = load i32, i32* %16
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %64, i64 %66
%68 = load double, double* %67
%69 = fadd double %68, %63
store double %69, double* %67
br label %70
70: ; preds = %55
%71 = load i32, i32* %16
%72 = add nsw i32 %71, 1
store i32 %72, i32* %16
br label %51
73: ; preds = %51
%74 = call i32 @gettimeofday(%struct.timeval* %13, i32* null)
%75 = call double @tv_elapsed(%struct.timeval* %13, %struct.timeval* %12)
store double %75, double* %8
%76 = load i32*, i32** %6
%77 = load double, double* %15
%78 = call i32 (i32*, i8*, ...) @fprintf(i32* %76, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double %77)
%79 = call i32 @gettimeofday(%struct.timeval* %12, i32* null)
store i32 1, i32* %16
br label %80
80: ; preds = %99, %73
%81 = load i32, i32* %16
%82 = load i32, i32* %4
%83 = icmp sle i32 %81, %82
br i1 %83, label %84, label %102
84: ; preds = %80
%85 = load double*, double** %14
%86 = load i32, i32* %16
%87 = add nsw i32 %86, 1
%88 = load i32, i32* %4
%89 = srem i32 %87, %88
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %85, i64 %90
%92 = load double, double* %91
%93 = load double*, double** %14
%94 = load i32, i32* %16
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds double, double* %93, i64 %95
%97 = load double, double* %96
%98 = fsub double %97, %92
store double %98, double* %96
br label %99
99: ; preds = %84
%100 = load i32, i32* %16
%101 = add nsw i32 %100, 1
store i32 %101, i32* %16
br label %80
102: ; preds = %80
%103 = call i32 @gettimeofday(%struct.timeval* %13, i32* null)
%104 = call double @tv_elapsed(%struct.timeval* %13, %struct.timeval* %12)
store double %104, double* %9
%105 = load i32*, i32** %6
%106 = load double, double* %15
%107 = call i32 (i32*, i8*, ...) @fprintf(i32* %105, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double %106)
%108 = call i32 @gettimeofday(%struct.timeval* %12, i32* null)
store i32 1, i32* %16
br label %109
109: ; preds = %128, %102
%110 = load i32, i32* %16
%111 = load i32, i32* %4
%112 = icmp sle i32 %110, %111
br i1 %112, label %113, label %131
113: ; preds = %109
%114 = load double*, double** %14
%115 = load i32, i32* %16
%116 = add nsw i32 %115, 1
%117 = load i32, i32* %4
%118 = srem i32 %116, %117
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double, double* %114, i64 %119
%121 = load double, double* %120
%122 = load double*, double** %14
%123 = load i32, i32* %16
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double, double* %122, i64 %124
%126 = load double, double* %125
%127 = fmul double %126, %121
store double %127, double* %125
br label %128
128: ; preds = %113
%129 = load i32, i32* %16
%130 = add nsw i32 %129, 1
store i32 %130, i32* %16
br label %109
131: ; preds = %109
%132 = call i32 @gettimeofday(%struct.timeval* %13, i32* null)
%133 = call double @tv_elapsed(%struct.timeval* %13, %struct.timeval* %12)
store double %133, double* %10
%134 = load i32*, i32** %6
%135 = load double, double* %15
%136 = call i32 (i32*, i8*, ...) @fprintf(i32* %134, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double %135)
%137 = call i32 @gettimeofday(%struct.timeval* %12, i32* null)
store i32 1, i32* %16
br label %138
138: ; preds = %157, %131
%139 = load i32, i32* %16
%140 = load i32, i32* %4
%141 = icmp sle i32 %139, %140
br i1 %141, label %142, label %160
142: ; preds = %138
%143 = load double*, double** %14
%144 = load i32, i32* %16
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %143, i64 %145
%147 = load double, double* %146
%148 = load double*, double** %14
%149 = load i32, i32* %16
%150 = add nsw i32 %149, 1
%151 = load i32, i32* %4
%152 = srem i32 %150, %151
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds double, double* %148, i64 %153
%155 = load double, double* %154
%156 = fdiv double %147, %155
store double %156, double* %15
br label %157
157: ; preds = %142
%158 = load i32, i32* %16
%159 = add nsw i32 %158, 1
store i32 %159, i32* %16
br label %138
160: ; preds = %138
%161 = call i32 @gettimeofday(%struct.timeval* %13, i32* null)
%162 = call double @tv_elapsed(%struct.timeval* %13, %struct.timeval* %12)
store double %162, double* %11
%163 = load i32*, i32** %6
%164 = load double, double* %15
%165 = call i32 (i32*, i8*, ...) @fprintf(i32* %163, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double %164)
%166 = load double, double* %7
%167 = load double, double* %8
%168 = load double, double* %9
%169 = load double, double* %10
%170 = load double, double* %11
%171 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %166, double %167, double %168, double %169, double %170)
%172 = load double*, double** %14
%173 = call i32 @free(double* %172)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@stderr = global i32 0
@.str = [27 x i8] c"failed to allocate memory\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [38 x i8] c"array\09%17.0f%17.0f%17.0f%17.0f%17.0f\0A\00"
define void @parallel_types(i32 %0, i64 %1, i32* nocapture %2) {
%4 = alloca %struct.timeval
%5 = alloca %struct.timeval
%6 = bitcast %struct.timeval* %4 to i8*
%7 = bitcast %struct.timeval* %5 to i8*
%8 = shl i64 %1, 3
%9 = tail call double* @malloc(i64 %8)
%10 = icmp eq double* %9, null
br i1 %10, label %11, label %17
11: ; preds = %3
%12 = load i32, i32* @stderr
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
%15 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 26, i64 1, i32* %14)
%16 = tail call i32 @exit(i32 1)
unreachable
17: ; preds = %3
%18 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%19 = icmp slt i32 %0, 1
br i1 %19, label %84, label %20
20: ; preds = %17
%21 = add nuw i32 %0, 1
%22 = zext i32 %21 to i64
%23 = add nsw i64 %22, -1
%24 = icmp ult i64 %23, 4
br i1 %24, label %75, label %25
25: ; preds = %20
%26 = and i64 %23, -4
%27 = or i64 %26, 1
%28 = add nsw i64 %26, -4
%29 = lshr exact i64 %28, 2
%30 = add nuw nsw i64 %29, 1
%31 = and i64 %30, 1
%32 = icmp eq i64 %28, 0
br i1 %32, label %60, label %33
33: ; preds = %25
%34 = and i64 %30, 9223372036854775806
br label %35
35: ; preds = %35, %33
%36 = phi i64 [ 0, %33 ], [ %56, %35 ]
%37 = phi <2 x i32> [ <i32 1, i32 2>, %33 ], [ %57, %35 ]
%38 = phi i64 [ 0, %33 ], [ %58, %35 ]
%39 = or i64 %36, 1
%40 = add <2 x i32> %37, <i32 2, i32 2>
%41 = sitofp <2 x i32> %37 to <2 x double>
%42 = sitofp <2 x i32> %40 to <2 x double>
%43 = getelementptr inbounds double, double* %9, i64 %39
%44 = bitcast double* %43 to <2 x double>*
store <2 x double> %41, <2 x double>* %44
%45 = getelementptr inbounds double, double* %43, i64 2
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> %42, <2 x double>* %46
%47 = add <2 x i32> %37, <i32 4, i32 4>
%48 = or i64 %36, 5
%49 = add <2 x i32> %37, <i32 6, i32 6>
%50 = sitofp <2 x i32> %47 to <2 x double>
%51 = sitofp <2 x i32> %49 to <2 x double>
%52 = getelementptr inbounds double, double* %9, i64 %48
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> %50, <2 x double>* %53
%54 = getelementptr inbounds double, double* %52, i64 2
%55 = bitcast double* %54 to <2 x double>*
store <2 x double> %51, <2 x double>* %55
%56 = add nuw i64 %36, 8
%57 = add <2 x i32> %37, <i32 8, i32 8>
%58 = add i64 %38, 2
%59 = icmp eq i64 %58, %34
br i1 %59, label %60, label %35
60: ; preds = %35, %25
%61 = phi i64 [ 0, %25 ], [ %56, %35 ]
%62 = phi <2 x i32> [ <i32 1, i32 2>, %25 ], [ %57, %35 ]
%63 = icmp eq i64 %31, 0
br i1 %63, label %73, label %64
64: ; preds = %60
%65 = or i64 %61, 1
%66 = add <2 x i32> %62, <i32 2, i32 2>
%67 = sitofp <2 x i32> %62 to <2 x double>
%68 = sitofp <2 x i32> %66 to <2 x double>
%69 = getelementptr inbounds double, double* %9, i64 %65
%70 = bitcast double* %69 to <2 x double>*
store <2 x double> %67, <2 x double>* %70
%71 = getelementptr inbounds double, double* %69, i64 2
%72 = bitcast double* %71 to <2 x double>*
store <2 x double> %68, <2 x double>* %72
br label %73
73: ; preds = %60, %64
%74 = icmp eq i64 %23, %26
br i1 %74, label %84, label %75
75: ; preds = %20, %73
%76 = phi i64 [ 1, %20 ], [ %27, %73 ]
br label %77
77: ; preds = %75, %77
%78 = phi i64 [ %82, %77 ], [ %76, %75 ]
%79 = trunc i64 %78 to i32
%80 = sitofp i32 %79 to double
%81 = getelementptr inbounds double, double* %9, i64 %78
store double %80, double* %81
%82 = add nuw nsw i64 %78, 1
%83 = icmp eq i64 %82, %22
br i1 %83, label %84, label %77
84: ; preds = %77, %73, %17
%85 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%86 = call double @tv_elapsed(%struct.timeval* %5, %struct.timeval* %4)
%87 = call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double undef)
%88 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
br i1 %19, label %131, label %89
89: ; preds = %84
%90 = zext i32 %0 to i64
%91 = and i64 %90, 1
%92 = icmp eq i32 %0, 1
br i1 %92, label %118, label %93
93: ; preds = %89
%94 = and i64 %90, 4294967294
br label %95
95: ; preds = %95, %93
%96 = phi i64 [ 1, %93 ], [ %107, %95 ]
%97 = phi i64 [ 0, %93 ], [ %116, %95 ]
%98 = add nuw nsw i64 %96, 1
%99 = trunc i64 %98 to i32
%100 = srem i32 %99, %0
%101 = zext i32 %100 to i64
%102 = getelementptr inbounds double, double* %9, i64 %101
%103 = load double, double* %102
%104 = getelementptr inbounds double, double* %9, i64 %96
%105 = load double, double* %104
%106 = fadd double %103, %105
store double %106, double* %104
%107 = add nuw nsw i64 %96, 2
%108 = trunc i64 %107 to i32
%109 = srem i32 %108, %0
%110 = zext i32 %109 to i64
%111 = getelementptr inbounds double, double* %9, i64 %110
%112 = load double, double* %111
%113 = getelementptr inbounds double, double* %9, i64 %98
%114 = load double, double* %113
%115 = fadd double %112, %114
store double %115, double* %113
%116 = add i64 %97, 2
%117 = icmp eq i64 %116, %94
br i1 %117, label %118, label %95
118: ; preds = %95, %89
%119 = phi i64 [ 1, %89 ], [ %107, %95 ]
%120 = icmp eq i64 %91, 0
br i1 %120, label %131, label %121
121: ; preds = %118
%122 = trunc i64 %119 to i32
%123 = add i32 %122, 1
%124 = srem i32 %123, %0
%125 = zext i32 %124 to i64
%126 = getelementptr inbounds double, double* %9, i64 %125
%127 = load double, double* %126
%128 = getelementptr inbounds double, double* %9, i64 %119
%129 = load double, double* %128
%130 = fadd double %127, %129
store double %130, double* %128
br label %131
131: ; preds = %121, %118, %84
%132 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%133 = call double @tv_elapsed(%struct.timeval* %5, %struct.timeval* %4)
%134 = call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double undef)
%135 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
br i1 %19, label %178, label %136
136: ; preds = %131
%137 = zext i32 %0 to i64
%138 = and i64 %137, 1
%139 = icmp eq i32 %0, 1
br i1 %139, label %165, label %140
140: ; preds = %136
%141 = and i64 %137, 4294967294
br label %142
142: ; preds = %142, %140
%143 = phi i64 [ 1, %140 ], [ %154, %142 ]
%144 = phi i64 [ 0, %140 ], [ %163, %142 ]
%145 = add nuw nsw i64 %143, 1
%146 = trunc i64 %145 to i32
%147 = srem i32 %146, %0
%148 = zext i32 %147 to i64
%149 = getelementptr inbounds double, double* %9, i64 %148
%150 = load double, double* %149
%151 = getelementptr inbounds double, double* %9, i64 %143
%152 = load double, double* %151
%153 = fsub double %152, %150
store double %153, double* %151
%154 = add nuw nsw i64 %143, 2
%155 = trunc i64 %154 to i32
%156 = srem i32 %155, %0
%157 = zext i32 %156 to i64
%158 = getelementptr inbounds double, double* %9, i64 %157
%159 = load double, double* %158
%160 = getelementptr inbounds double, double* %9, i64 %145
%161 = load double, double* %160
%162 = fsub double %161, %159
store double %162, double* %160
%163 = add i64 %144, 2
%164 = icmp eq i64 %163, %141
br i1 %164, label %165, label %142
165: ; preds = %142, %136
%166 = phi i64 [ 1, %136 ], [ %154, %142 ]
%167 = icmp eq i64 %138, 0
br i1 %167, label %178, label %168
168: ; preds = %165
%169 = trunc i64 %166 to i32
%170 = add i32 %169, 1
%171 = srem i32 %170, %0
%172 = zext i32 %171 to i64
%173 = getelementptr inbounds double, double* %9, i64 %172
%174 = load double, double* %173
%175 = getelementptr inbounds double, double* %9, i64 %166
%176 = load double, double* %175
%177 = fsub double %176, %174
store double %177, double* %175
br label %178
178: ; preds = %168, %165, %131
%179 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%180 = call double @tv_elapsed(%struct.timeval* %5, %struct.timeval* %4)
%181 = call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double undef)
%182 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
br i1 %19, label %225, label %183
183: ; preds = %178
%184 = zext i32 %0 to i64
%185 = and i64 %184, 1
%186 = icmp eq i32 %0, 1
br i1 %186, label %212, label %187
187: ; preds = %183
%188 = and i64 %184, 4294967294
br label %189
189: ; preds = %189, %187
%190 = phi i64 [ 1, %187 ], [ %201, %189 ]
%191 = phi i64 [ 0, %187 ], [ %210, %189 ]
%192 = add nuw nsw i64 %190, 1
%193 = trunc i64 %192 to i32
%194 = srem i32 %193, %0
%195 = zext i32 %194 to i64
%196 = getelementptr inbounds double, double* %9, i64 %195
%197 = load double, double* %196
%198 = getelementptr inbounds double, double* %9, i64 %190
%199 = load double, double* %198
%200 = fmul double %197, %199
store double %200, double* %198
%201 = add nuw nsw i64 %190, 2
%202 = trunc i64 %201 to i32
%203 = srem i32 %202, %0
%204 = zext i32 %203 to i64
%205 = getelementptr inbounds double, double* %9, i64 %204
%206 = load double, double* %205
%207 = getelementptr inbounds double, double* %9, i64 %192
%208 = load double, double* %207
%209 = fmul double %206, %208
store double %209, double* %207
%210 = add i64 %191, 2
%211 = icmp eq i64 %210, %188
br i1 %211, label %212, label %189
212: ; preds = %189, %183
%213 = phi i64 [ 1, %183 ], [ %201, %189 ]
%214 = icmp eq i64 %185, 0
br i1 %214, label %225, label %215
215: ; preds = %212
%216 = trunc i64 %213 to i32
%217 = add i32 %216, 1
%218 = srem i32 %217, %0
%219 = zext i32 %218 to i64
%220 = getelementptr inbounds double, double* %9, i64 %219
%221 = load double, double* %220
%222 = getelementptr inbounds double, double* %9, i64 %213
%223 = load double, double* %222
%224 = fmul double %221, %223
store double %224, double* %222
br label %225
225: ; preds = %215, %212, %178
%226 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%227 = call double @tv_elapsed(%struct.timeval* %5, %struct.timeval* %4)
%228 = call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double undef)
%229 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
br i1 %19, label %240, label %230
230: ; preds = %225
%231 = add nuw i32 %0, 1
%232 = zext i32 %0 to i64
%233 = getelementptr inbounds double, double* %9, i64 %232
%234 = load double, double* %233
%235 = srem i32 %231, %0
%236 = zext i32 %235 to i64
%237 = getelementptr inbounds double, double* %9, i64 %236
%238 = load double, double* %237
%239 = fdiv double %234, %238
br label %240
240: ; preds = %230, %225
%241 = phi double [ %239, %230 ], [ undef, %225 ]
%242 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%243 = call double @tv_elapsed(%struct.timeval* %5, %struct.timeval* %4)
%244 = call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double %241)
%245 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %86, double %133, double %180, double %227, double %243)
%246 = call i32 @free(double* %9)
ret void
}