#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 uint8_t;

/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(unsigned int);
double omp_get_wtime();
int /*<<< orphan*/ rand();
double kernels_invoc() {
  extern unsigned int datasize;
  unsigned int n = (int)(datasize / sizeof(uint8_t));
  uint8_t *a = NULL;
  unsigned int i = 0;
  double t1_start = 0;
  double t1_end = 0;
  double t2_start = 0;
  double t2_end = 0;
  double t3_start = 0;
  double t3_end = 0;
  double tmp = 0;
  a = (uint8_t *)malloc(n * sizeof(uint8_t));
  if (a == NULL) {
    return (-10000);
  }
  for (i = 0; i < n; i++) {
    a[i] = (uint8_t)rand();
  }
#pragma acc data copyin(a [0:n], i, n)
  {
    t1_start = omp_get_wtime();
#pragma acc kernels loop
    for (i = 0; i < n; i++) {
      a[i] = 10 * a[i];
    }
    t1_end = omp_get_wtime();
    t2_start = omp_get_wtime();
#pragma acc kernels loop
    for (i = 0; i < n; i++) {
      a[i] = 10 * a[i];
    }
    t2_end = omp_get_wtime();
    t3_start = omp_get_wtime();
#pragma acc kernels loop
    for (i = 0; i < n; i++) {
      a[i] = 10 * a[i];
      a[i] = 10 * a[i];
    }
    t3_end = omp_get_wtime();
  }
  tmp = ((t1_end - t1_start) + (t2_end - t2_start)) - (t3_end - t3_start);
  free(a);
  return (tmp);
}


x86 assembly (clang, -O0):
<kernels_invoc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
shr    $0x2,%rax
mov    %eax,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11ce <kernels_invoc+0x8e>
movsd  0xe3c(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    133f <kernels_invoc+0x1ff>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1202 <kernels_invoc+0xc2>
mov    $0x0,%al
call   1060 <rand@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11d5 <kernels_invoc+0x95>
mov    $0x0,%al
call   1040 <omp_get_wtime@plt>
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1244 <kernels_invoc+0x104>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   $0xa,(%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1215 <kernels_invoc+0xd5>
mov    $0x0,%al
call   1040 <omp_get_wtime@plt>
movsd  %xmm0,-0x30(%rbp)
mov    $0x0,%al
call   1040 <omp_get_wtime@plt>
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1292 <kernels_invoc+0x152>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   $0xa,(%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1263 <kernels_invoc+0x123>
mov    $0x0,%al
call   1040 <omp_get_wtime@plt>
movsd  %xmm0,-0x40(%rbp)
mov    $0x0,%al
call   1040 <omp_get_wtime@plt>
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    12f5 <kernels_invoc+0x1b5>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   $0xa,(%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   $0xa,(%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12b1 <kernels_invoc+0x171>
mov    $0x0,%al
call   1040 <omp_get_wtime@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
subsd  -0x38(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x50(%rbp),%xmm1
subsd  -0x48(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernels_invoc>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x30,%rsp
mov    0x2e95(%rip),%rax
mov    (%rax),%r15d
mov    %r15d,%edi
and    $0xfffffffc,%edi
call   1050 <malloc@plt>
test   %rax,%rax
je     1188 <kernels_invoc+0x48>
mov    %rax,%rbx
mov    %r15d,%r14d
shr    $0x2,%r14d
cmp    $0x3,%r15d
ja     1195 <kernels_invoc+0x55>
xor    %eax,%eax
call   1040 <omp_get_wtime@plt>
movq   %xmm0,0x10(%rsp)
jmp    1344 <kernels_invoc+0x204>
movsd  0xe70(%rip),%xmm0
jmp    16a1 <kernels_invoc+0x561>
cmp    $0x2,%r14d
mov    $0x1,%r12d
cmovae %r14d,%r12d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1060 <rand@plt>
mov    %eax,(%rbx,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%r12
jne    11b0 <kernels_invoc+0x70>
xor    %eax,%eax
call   1040 <omp_get_wtime@plt>
cmp    $0x4,%r15d
movq   %xmm0,0x10(%rsp)
jb     1344 <kernels_invoc+0x204>
cmp    $0x8,%r12d
jae    11e7 <kernels_invoc+0xa7>
xor    %eax,%eax
jmp    1330 <kernels_invoc+0x1f0>
mov    %r12d,%eax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rcx
mov    %rcx,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     16d0 <kernels_invoc+0x590>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
movdqa 0xdfa(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
movdqu (%rbx,%rcx,4),%xmm2
movdqu 0x10(%rbx,%rcx,4),%xmm3
movdqu 0x20(%rbx,%rcx,4),%xmm4
movdqu 0x30(%rbx,%rcx,4),%xmm1
pshufd $0xf5,%xmm2,%xmm5
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm2
pmuludq %xmm0,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm2
pshufd $0xf5,%xmm3,%xmm5
pmuludq %xmm0,%xmm3
pshufd $0xe8,%xmm3,%xmm3
pmuludq %xmm0,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm3
movdqu %xmm2,(%rbx,%rcx,4)
movdqu %xmm3,0x10(%rbx,%rcx,4)
pshufd $0xf5,%xmm4,%xmm2
pmuludq %xmm0,%xmm4
pshufd $0xe8,%xmm4,%xmm3
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm3
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm1
movdqu %xmm3,0x20(%rbx,%rcx,4)
movdqu %xmm1,0x30(%rbx,%rcx,4)
add    $0x10,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1220 <kernels_invoc+0xe0>
test   $0x1,%dl
je     1321 <kernels_invoc+0x1e1>
movdqu (%rbx,%rcx,4),%xmm0
movdqu 0x10(%rbx,%rcx,4),%xmm1
movdqa 0xd30(%rip),%xmm2
pshufd $0xf5,%xmm0,%xmm3
pmuludq %xmm2,%xmm0
pshufd $0xe8,%xmm0,%xmm0
pmuludq %xmm2,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm3,%xmm0
pshufd $0xf5,%xmm1,%xmm3
pmuludq %xmm2,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pmuludq %xmm2,%xmm3
pshufd $0xe8,%xmm3,%xmm2
punpckldq %xmm2,%xmm1
movdqu %xmm0,(%rbx,%rcx,4)
movdqu %xmm1,0x10(%rbx,%rcx,4)
cmp    %r12,%rax
je     1344 <kernels_invoc+0x204>
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx,%rax,4),%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
mov    %ecx,(%rbx,%rax,4)
add    $0x1,%rax
cmp    %rax,%r12
jne    1330 <kernels_invoc+0x1f0>
xor    %eax,%eax
call   1040 <omp_get_wtime@plt>
movq   %xmm0,0x28(%rsp)
xor    %eax,%eax
call   1040 <omp_get_wtime@plt>
movq   %xmm0,0x20(%rsp)
cmp    $0x4,%r15d
jb     14d4 <kernels_invoc+0x394>
cmp    $0x2,%r14d
mov    $0x1,%eax
cmovae %r14d,%eax
cmp    $0x8,%eax
jae    1381 <kernels_invoc+0x241>
xor    %ecx,%ecx
jmp    14c0 <kernels_invoc+0x380>
mov    %eax,%ecx
and    $0xfffffff8,%ecx
lea    -0x8(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     16ae <kernels_invoc+0x56e>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
movdqa 0xc61(%rip),%xmm0
nop
movdqu (%rbx,%rdx,4),%xmm2
movdqu 0x10(%rbx,%rdx,4),%xmm3
movdqu 0x20(%rbx,%rdx,4),%xmm4
movdqu 0x30(%rbx,%rdx,4),%xmm1
pshufd $0xf5,%xmm2,%xmm5
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm2
pmuludq %xmm0,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm2
pshufd $0xf5,%xmm3,%xmm5
pmuludq %xmm0,%xmm3
pshufd $0xe8,%xmm3,%xmm3
pmuludq %xmm0,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm3
movdqu %xmm2,(%rbx,%rdx,4)
movdqu %xmm3,0x10(%rbx,%rdx,4)
pshufd $0xf5,%xmm4,%xmm2
pmuludq %xmm0,%xmm4
pshufd $0xe8,%xmm4,%xmm3
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm3
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm1
movdqu %xmm3,0x20(%rbx,%rdx,4)
movdqu %xmm1,0x30(%rbx,%rdx,4)
add    $0x10,%rdx
add    $0xfffffffffffffffe,%rdi
jne    13b0 <kernels_invoc+0x270>
test   $0x1,%sil
je     14b2 <kernels_invoc+0x372>
movdqu (%rbx,%rdx,4),%xmm0
movdqu 0x10(%rbx,%rdx,4),%xmm1
movdqa 0xb9f(%rip),%xmm2
pshufd $0xf5,%xmm0,%xmm3
pmuludq %xmm2,%xmm0
pshufd $0xe8,%xmm0,%xmm0
pmuludq %xmm2,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm3,%xmm0
pshufd $0xf5,%xmm1,%xmm3
pmuludq %xmm2,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pmuludq %xmm2,%xmm3
pshufd $0xe8,%xmm3,%xmm2
punpckldq %xmm2,%xmm1
movdqu %xmm0,(%rbx,%rdx,4)
movdqu %xmm1,0x10(%rbx,%rdx,4)
cmp    %rax,%rcx
je     14d4 <kernels_invoc+0x394>
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%rcx,4),%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
mov    %edx,(%rbx,%rcx,4)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    14c0 <kernels_invoc+0x380>
xor    %eax,%eax
call   1040 <omp_get_wtime@plt>
movq   %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1040 <omp_get_wtime@plt>
movq   %xmm0,0x18(%rsp)
cmp    $0x4,%r15d
jb     1660 <kernels_invoc+0x520>
cmp    $0x2,%r14d
mov    $0x1,%eax
cmovae %r14d,%eax
cmp    $0x8,%eax
jae    1511 <kernels_invoc+0x3d1>
xor    %ecx,%ecx
jmp    1650 <kernels_invoc+0x510>
mov    %eax,%ecx
and    $0xfffffff8,%ecx
lea    -0x8(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     16bf <kernels_invoc+0x57f>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
movdqa 0xae1(%rip),%xmm0
nop
movdqu (%rbx,%rdx,4),%xmm2
movdqu 0x10(%rbx,%rdx,4),%xmm3
movdqu 0x20(%rbx,%rdx,4),%xmm4
movdqu 0x30(%rbx,%rdx,4),%xmm1
pshufd $0xf5,%xmm2,%xmm5
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm2
pmuludq %xmm0,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm2
pshufd $0xf5,%xmm3,%xmm5
pmuludq %xmm0,%xmm3
pshufd $0xe8,%xmm3,%xmm3
pmuludq %xmm0,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm3
movdqu %xmm2,(%rbx,%rdx,4)
movdqu %xmm3,0x10(%rbx,%rdx,4)
pshufd $0xf5,%xmm4,%xmm2
pmuludq %xmm0,%xmm4
pshufd $0xe8,%xmm4,%xmm3
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm3
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm1
movdqu %xmm3,0x20(%rbx,%rdx,4)
movdqu %xmm1,0x30(%rbx,%rdx,4)
add    $0x10,%rdx
add    $0xfffffffffffffffe,%rdi
jne    1540 <kernels_invoc+0x400>
test   $0x1,%sil
je     1642 <kernels_invoc+0x502>
movdqu (%rbx,%rdx,4),%xmm0
movdqu 0x10(%rbx,%rdx,4),%xmm1
movdqa 0xa1f(%rip),%xmm2
pshufd $0xf5,%xmm0,%xmm3
pmuludq %xmm2,%xmm0
pshufd $0xe8,%xmm0,%xmm0
pmuludq %xmm2,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm3,%xmm0
pshufd $0xf5,%xmm1,%xmm3
pmuludq %xmm2,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pmuludq %xmm2,%xmm3
pshufd $0xe8,%xmm3,%xmm2
punpckldq %xmm2,%xmm1
movdqu %xmm0,(%rbx,%rdx,4)
movdqu %xmm1,0x10(%rbx,%rdx,4)
cmp    %rax,%rcx
je     1660 <kernels_invoc+0x520>
nopw   0x0(%rax,%rax,1)
imul   $0x64,(%rbx,%rcx,4),%edx
mov    %edx,(%rbx,%rcx,4)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1650 <kernels_invoc+0x510>
xor    %eax,%eax
call   1040 <omp_get_wtime@plt>
movsd  0x28(%rsp),%xmm1
subsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
subsd  0x20(%rsp),%xmm2
addsd  %xmm1,%xmm2
subsd  0x18(%rsp),%xmm0
subsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <free@plt>
movsd  0x8(%rsp),%xmm0
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edx,%edx
test   $0x1,%sil
jne    145e <kernels_invoc+0x31e>
jmp    14b2 <kernels_invoc+0x372>
xor    %edx,%edx
test   $0x1,%sil
jne    15ee <kernels_invoc+0x4ae>
jmp    1642 <kernels_invoc+0x502>
xor    %ecx,%ecx
test   $0x1,%dl
jne    12cd <kernels_invoc+0x18d>
jmp    1321 <kernels_invoc+0x1e1>

LLVM IR (-O0):
@datasize = external global i32
define double @kernels_invoc() {
%1 = alloca double
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = load i32, i32* @datasize
%13 = zext i32 %12 to i64
%14 = udiv i64 %13, 4
%15 = trunc i64 %14 to i32
store i32 %15, i32* %2
store i32* null, i32** %3
store i32 0, i32* %4
store double 0.000000e+00, double* %5
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
store double 0.000000e+00, double* %8
store double 0.000000e+00, double* %9
store double 0.000000e+00, double* %10
store double 0.000000e+00, double* %11
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
%18 = mul i64 %17, 4
%19 = trunc i64 %18 to i32
%20 = call i64 @malloc(i32 %19)
%21 = inttoptr i64 %20 to i32*
store i32* %21, i32** %3
%22 = load i32*, i32** %3
%23 = icmp eq i32* %22, null
br i1 %23, label %24, label %25
24: ; preds = %0
store double -1.000000e+04, double* %1
br label %127
25: ; preds = %0
store i32 0, i32* %4
br label %26
26: ; preds = %36, %25
%27 = load i32, i32* %4
%28 = load i32, i32* %2
%29 = icmp ult i32 %27, %28
br i1 %29, label %30, label %39
30: ; preds = %26
%31 = call i32 (...) @rand()
%32 = load i32*, i32** %3
%33 = load i32, i32* %4
%34 = zext i32 %33 to i64
%35 = getelementptr inbounds i32, i32* %32, i64 %34
store i32 %31, i32* %35
br label %36
36: ; preds = %30
%37 = load i32, i32* %4
%38 = add i32 %37, 1
store i32 %38, i32* %4
br label %26
39: ; preds = %26
%40 = call double (...) @omp_get_wtime()
store double %40, double* %5
store i32 0, i32* %4
br label %41
41: ; preds = %56, %39
%42 = load i32, i32* %4
%43 = load i32, i32* %2
%44 = icmp ult i32 %42, %43
br i1 %44, label %45, label %59
45: ; preds = %41
%46 = load i32*, i32** %3
%47 = load i32, i32* %4
%48 = zext i32 %47 to i64
%49 = getelementptr inbounds i32, i32* %46, i64 %48
%50 = load i32, i32* %49
%51 = mul nsw i32 10, %50
%52 = load i32*, i32** %3
%53 = load i32, i32* %4
%54 = zext i32 %53 to i64
%55 = getelementptr inbounds i32, i32* %52, i64 %54
store i32 %51, i32* %55
br label %56
56: ; preds = %45
%57 = load i32, i32* %4
%58 = add i32 %57, 1
store i32 %58, i32* %4
br label %41
59: ; preds = %41
%60 = call double (...) @omp_get_wtime()
store double %60, double* %6
%61 = call double (...) @omp_get_wtime()
store double %61, double* %7
store i32 0, i32* %4
br label %62
62: ; preds = %77, %59
%63 = load i32, i32* %4
%64 = load i32, i32* %2
%65 = icmp ult i32 %63, %64
br i1 %65, label %66, label %80
66: ; preds = %62
%67 = load i32*, i32** %3
%68 = load i32, i32* %4
%69 = zext i32 %68 to i64
%70 = getelementptr inbounds i32, i32* %67, i64 %69
%71 = load i32, i32* %70
%72 = mul nsw i32 10, %71
%73 = load i32*, i32** %3
%74 = load i32, i32* %4
%75 = zext i32 %74 to i64
%76 = getelementptr inbounds i32, i32* %73, i64 %75
store i32 %72, i32* %76
br label %77
77: ; preds = %66
%78 = load i32, i32* %4
%79 = add i32 %78, 1
store i32 %79, i32* %4
br label %62
80: ; preds = %62
%81 = call double (...) @omp_get_wtime()
store double %81, double* %8
%82 = call double (...) @omp_get_wtime()
store double %82, double* %9
store i32 0, i32* %4
br label %83
83: ; preds = %108, %80
%84 = load i32, i32* %4
%85 = load i32, i32* %2
%86 = icmp ult i32 %84, %85
br i1 %86, label %87, label %111
87: ; preds = %83
%88 = load i32*, i32** %3
%89 = load i32, i32* %4
%90 = zext i32 %89 to i64
%91 = getelementptr inbounds i32, i32* %88, i64 %90
%92 = load i32, i32* %91
%93 = mul nsw i32 10, %92
%94 = load i32*, i32** %3
%95 = load i32, i32* %4
%96 = zext i32 %95 to i64
%97 = getelementptr inbounds i32, i32* %94, i64 %96
store i32 %93, i32* %97
%98 = load i32*, i32** %3
%99 = load i32, i32* %4
%100 = zext i32 %99 to i64
%101 = getelementptr inbounds i32, i32* %98, i64 %100
%102 = load i32, i32* %101
%103 = mul nsw i32 10, %102
%104 = load i32*, i32** %3
%105 = load i32, i32* %4
%106 = zext i32 %105 to i64
%107 = getelementptr inbounds i32, i32* %104, i64 %106
store i32 %103, i32* %107
br label %108
108: ; preds = %87
%109 = load i32, i32* %4
%110 = add i32 %109, 1
store i32 %110, i32* %4
br label %83
111: ; preds = %83
%112 = call double (...) @omp_get_wtime()
store double %112, double* %10
%113 = load double, double* %6
%114 = load double, double* %5
%115 = fsub double %113, %114
%116 = load double, double* %8
%117 = load double, double* %7
%118 = fsub double %116, %117
%119 = fadd double %115, %118
%120 = load double, double* %10
%121 = load double, double* %9
%122 = fsub double %120, %121
%123 = fsub double %119, %122
store double %123, double* %11
%124 = load i32*, i32** %3
%125 = call i32 @free(i32* %124)
%126 = load double, double* %11
store double %126, double* %1
br label %127
127: ; preds = %111, %24
%128 = load double, double* %1
ret double %128
}

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