#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*/ check_offloading();
double *malloc(int);
int omp_get_num_teams();
size_t omp_get_team_num();
int omp_get_thread_num();
scalar_t__ omp_is_initial_device();
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  check_offloading();
  double A[(992)], B[(992)], C[(992)], D[(992)], E[(992)];
  double *pA = malloc((992) * sizeof(double));
  int fail = 0;
  {
    int i;
    for (i = 0; i < (992); i++) {
      {
        C[i] = 1;
        D[i] = i;
        E[i] = -i;
      }
    }
  };
  {
    int i;
    for (i = 0; i < (992); i++) {
      A[i] = 0;
    }
  };
  int num_teams = omp_is_initial_device() ? 128 : 512;
  int actual_teams = -1;
  for (int t = 0; t < (1); t++) {
#pragma omp target teams if (0) map(tofrom : actual_teams)
    {
      if (omp_get_team_num() == 0)
        actual_teams = omp_get_num_teams();
      A[omp_get_team_num()] += omp_get_team_num();
    }
  }
  for (int i = 0; i < actual_teams; i++)
    if (A[i] != i * (1)) {
      printf("Error at %d, h = %lf, d = %lf\n", i, (double)i * (1), A[i]);
      fail = 1;
    }
  if (fail)
    printf("Failed\n");
  else
    printf("Succeeded\n");
  {
    int i;
    for (i = 0; i < (992); i++) {
      A[i] = 0;
    }
  };
  num_teams = omp_is_initial_device() ? 128 : 512;
  for (int t = 0; t < (1); t++) {
#pragma omp target teams device(0) map(tofrom : actual_teams)
    {
      if (omp_get_team_num() == 0)
        actual_teams = omp_get_num_teams();
      A[omp_get_team_num()] += omp_get_team_num();
    }
  }
  for (int i = 0; i < actual_teams; i++)
    if (A[i] != i * (1)) {
      printf("Error at %d, h = %lf, d = %lf\n", i, (double)i * (1), A[i]);
      fail = 1;
    }
  if (fail)
    printf("Failed\n");
  else
    printf("Succeeded\n");
  {
    int i;
    for (i = 0; i < (992); i++) {
      pA[i] = 0;
    }
  };
  num_teams = omp_is_initial_device() ? 128 : 512;
  for (int t = 0; t < (1); t++) {
#pragma omp target teams map(pA[:N]) map(tofrom : actual_teams)
    {
      if (omp_get_team_num() == 0)
        actual_teams = omp_get_num_teams();
      pA[omp_get_team_num()] += omp_get_team_num();
    }
  }
  for (int i = 0; i < actual_teams; i++)
    if (pA[i] != i * (1)) {
      printf("Error at %d, h = %lf, d = %lf\n", i, (double)i * (1), pA[i]);
      fail = 1;
    }
  if (fail)
    printf("Failed\n");
  else
    printf("Succeeded\n");
  {
    int i;
    for (i = 0; i < (992); i++) {
      A[i] = 0;
    }
  };
  num_teams = omp_is_initial_device() ? 128 : 512;
  for (int t = 0; t < (1); t++) {
#pragma omp target teams num_teams(num_teams)
    { A[omp_get_team_num()] += omp_get_team_num(); }
  }
  for (int i = 0; i < num_teams; i++)
    if (A[i] != i * (1)) {
      printf("Error at %d, h = %lf, d = %lf\n", i, (double)i * (1), A[i]);
      fail = 1;
    }
  if (fail)
    printf("Failed\n");
  else
    printf("Succeeded\n");
  {
    int i;
    for (i = 0; i < (992); i++) {
      A[i] = 0;
    }
  };
  fail = 0;
  int num_threads = omp_is_initial_device() ? 128 : 256;
  for (int t = 0; t < (1); t++) {
#pragma omp target teams num_teams(1) thread_limit(num_threads)
#pragma omp parallel
    {
      int tid = omp_get_thread_num();
      A[tid] += (double)tid;
    }
  }
  for (int i = 0; i < num_threads; i++)
    if (A[i] != i * (1)) {
      printf("Error at %d, h = %lf, d = %lf\n", i, (double)i * (1), A[i]);
      fail = 1;
    }
  if (fail)
    printf("Failed\n");
  else
    printf("Succeeded\n");
  {
    int i;
    for (i = 0; i < (992); i++) {
      A[i] = 0;
    }
  };
  fail = 0;
  num_teams = omp_is_initial_device() ? 128 : 512;
  for (int t = 0; t < (1); t++) {
#pragma omp target teams num_teams(num_teams)
    {
      if (omp_get_team_num() % 2 == 0) {
        int teid = omp_get_team_num();
        A[teid] += (double)1;
      } else {
        int teid = omp_get_team_num();
        A[teid] += (double)2;
      }
    }
  }
  for (int i = 0; i < num_teams; i++) {
    if (i % 2 == 0) {
      if (A[i] != (1)) {
        printf("Error at %d, h = %lf, d = %lf\n", i, (double)(1), A[i]);
        fail = 1;
      }
    } else if (A[i] != 2 * (1)) {
      printf("Error at %d, h = %lf, d = %lf\n", i, (double)2 * (1), A[i]);
      fail = 1;
    }
  }
  if (fail)
    printf("Failed\n");
  else
    printf("Succeeded\n");
  {
    int i;
    for (i = 0; i < (992); i++) {
      A[i] = 0;
    }
  };
  fail = 0;
  int a = 10;
  num_teams = omp_is_initial_device() ? 128 : 256;
  for (int t = 0; t < (1); t++) {
#pragma omp target teams num_teams(num_teams) private(a)
    {
      a = omp_get_team_num();
      A[omp_get_team_num()] += a;
    }
  }
  for (int i = 0; i < num_teams; i++)
    if (A[i] != i * (1)) {
      printf("Error at %d, h = %lf, d = %lf\n", i, (double)i * (1), A[i]);
      fail = 1;
    }
  if (fail)
    printf("Failed\n");
  else
    printf("Succeeded\n");
  {
    int i;
    for (i = 0; i < (992); i++) {
      A[i] = 0;
    }
  };
  fail = 0;
  a = 10;
  num_teams = omp_is_initial_device() ? 128 : 256;
  for (int t = 0; t < (1); t++) {
#pragma omp target teams num_teams(num_teams) firstprivate(a)
    {
      a += omp_get_team_num();
      A[omp_get_team_num()] += a;
    }
  }
  for (int i = 0; i < num_teams; i++)
    if (A[i] != 10 + i * (1)) {
      printf("Error at %d, h = %lf, d = %lf\n", i, (double)(10 + i * (1)),
             A[i]);
      fail = 1;
    }
  if (fail)
    printf("Failed\n");
  else
    printf("Succeeded\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9be0,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <check_offloading@plt>
mov    $0x1f00,%edi
call   1050 <malloc@plt>
mov    %rax,-0x9b18(%rbp)
movl   $0x0,-0x9b1c(%rbp)
movl   $0x0,-0x9b20(%rbp)
cmpl   $0x3e0,-0x9b20(%rbp)
jge    121e <main+0xae>
movslq -0x9b20(%rbp),%rax
movsd  0x1e33(%rip),%xmm0
movsd  %xmm0,-0x5d10(%rbp,%rax,8)
ff ff
cvtsi2sdl -0x9b20(%rbp),%xmm0
ff
movslq -0x9b20(%rbp),%rax
movsd  %xmm0,-0x7c10(%rbp,%rax,8)
ff ff
xor    %eax,%eax
sub    -0x9b20(%rbp),%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b20(%rbp),%rax
movsd  %xmm0,-0x9b10(%rbp,%rax,8)
ff ff
mov    -0x9b20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b20(%rbp)
jmp    11ae <main+0x3e>
movl   $0x0,-0x9b24(%rbp)
cmpl   $0x3e0,-0x9b24(%rbp)
jge    125f <main+0xef>
movslq -0x9b24(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b24(%rbp)
jmp    1228 <main+0xb8>
mov    $0x0,%al
call   1090 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x200,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b28(%rbp)
movl   $0xffffffff,-0x9b2c(%rbp)
ff ff ff
movl   $0x0,-0x9b30(%rbp)
cmpl   $0x1,-0x9b30(%rbp)
jge    132a <main+0x1ba>
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
cmp    $0x0,%rax
jne    12bf <main+0x14f>
mov    $0x0,%al
call   1080 <omp_get_num_teams@plt>
mov    %eax,-0x9b2c(%rbp)
xor    %eax,%eax
call   1070 <omp_get_team_num@plt>
movq   %rax,%xmm0
movaps 0x1d3e(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0x1d42(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x9ba8(%rbp)
ff
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
movsd  -0x9ba8(%rbp),%xmm0
ff
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b30(%rbp)
jmp    1294 <main+0x124>
movl   $0x0,-0x9b34(%rbp)
mov    -0x9b34(%rbp),%eax
cmp    -0x9b2c(%rbp),%eax
jge    13d3 <main+0x263>
movslq -0x9b34(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b34(%rbp),%eax
shl    $0x0,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    1378 <main+0x208>
jp     1378 <main+0x208>
jmp    13ba <main+0x24a>
mov    -0x9b34(%rbp),%esi
cvtsi2sdl -0x9b34(%rbp),%xmm0
ff
movsd  0x1c72(%rip),%xmm1
mulsd  %xmm1,%xmm0
movslq -0x9b34(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x1c87(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b1c(%rbp)
jmp    13bf <main+0x24f>
mov    -0x9b34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b34(%rbp)
jmp    1334 <main+0x1c4>
cmpl   $0x0,-0x9b1c(%rbp)
je     13f3 <main+0x283>
lea    0x1c68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1401 <main+0x291>
lea    0x1c5d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b38(%rbp)
cmpl   $0x3e0,-0x9b38(%rbp)
jge    1442 <main+0x2d2>
movslq -0x9b38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b38(%rbp)
jmp    140b <main+0x29b>
mov    $0x0,%al
call   1090 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x200,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b28(%rbp)
movl   $0x0,-0x9b3c(%rbp)
cmpl   $0x1,-0x9b3c(%rbp)
jge    1503 <main+0x393>
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
cmp    $0x0,%rax
jne    1498 <main+0x328>
mov    $0x0,%al
call   1080 <omp_get_num_teams@plt>
mov    %eax,-0x9b2c(%rbp)
xor    %eax,%eax
call   1070 <omp_get_team_num@plt>
movq   %rax,%xmm0
movaps 0x1b65(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0x1b69(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x9bb0(%rbp)
ff
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
movsd  -0x9bb0(%rbp),%xmm0
ff
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b3c(%rbp)
jmp    146d <main+0x2fd>
movl   $0x0,-0x9b40(%rbp)
mov    -0x9b40(%rbp),%eax
cmp    -0x9b2c(%rbp),%eax
jge    15ac <main+0x43c>
movslq -0x9b40(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b40(%rbp),%eax
shl    $0x0,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    1551 <main+0x3e1>
jp     1551 <main+0x3e1>
jmp    1593 <main+0x423>
mov    -0x9b40(%rbp),%esi
cvtsi2sdl -0x9b40(%rbp),%xmm0
ff
movsd  0x1a99(%rip),%xmm1
mulsd  %xmm1,%xmm0
movslq -0x9b40(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x1aae(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b1c(%rbp)
jmp    1598 <main+0x428>
mov    -0x9b40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b40(%rbp)
jmp    150d <main+0x39d>
cmpl   $0x0,-0x9b1c(%rbp)
je     15cc <main+0x45c>
lea    0x1a8f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    15da <main+0x46a>
lea    0x1a84(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b44(%rbp)
cmpl   $0x3e0,-0x9b44(%rbp)
jge    161e <main+0x4ae>
mov    -0x9b18(%rbp),%rax
movslq -0x9b44(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x9b44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b44(%rbp)
jmp    15e4 <main+0x474>
mov    $0x0,%al
call   1090 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x200,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b28(%rbp)
movl   $0x0,-0x9b48(%rbp)
cmpl   $0x1,-0x9b48(%rbp)
jge    16ef <main+0x57f>
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
cmp    $0x0,%rax
jne    1674 <main+0x504>
mov    $0x0,%al
call   1080 <omp_get_num_teams@plt>
mov    %eax,-0x9b2c(%rbp)
xor    %eax,%eax
call   1070 <omp_get_team_num@plt>
movq   %rax,%xmm0
movaps 0x1989(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0x198d(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x9bc0(%rbp)
ff
mov    -0x9b18(%rbp),%rax
mov    %rax,-0x9bb8(%rbp)
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
movsd  -0x9bc0(%rbp),%xmm0
ff
mov    %rax,%rcx
mov    -0x9bb8(%rbp),%rax
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x9b48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b48(%rbp)
jmp    1649 <main+0x4d9>
movl   $0x0,-0x9b4c(%rbp)
mov    -0x9b4c(%rbp),%eax
cmp    -0x9b2c(%rbp),%eax
jge    179e <main+0x62e>
mov    -0x9b18(%rbp),%rax
movslq -0x9b4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x9b4c(%rbp),%eax
shl    $0x0,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    1740 <main+0x5d0>
jp     1740 <main+0x5d0>
jmp    1785 <main+0x615>
mov    -0x9b4c(%rbp),%esi
cvtsi2sdl -0x9b4c(%rbp),%xmm0
ff
movsd  0x18aa(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x9b18(%rbp),%rax
movslq -0x9b4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
lea    0x18bc(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b1c(%rbp)
jmp    178a <main+0x61a>
mov    -0x9b4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b4c(%rbp)
jmp    16f9 <main+0x589>
cmpl   $0x0,-0x9b1c(%rbp)
je     17be <main+0x64e>
lea    0x189d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    17cc <main+0x65c>
lea    0x1892(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b50(%rbp)
cmpl   $0x3e0,-0x9b50(%rbp)
jge    180d <main+0x69d>
movslq -0x9b50(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b50(%rbp)
jmp    17d6 <main+0x666>
mov    $0x0,%al
call   1090 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x200,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b28(%rbp)
movl   $0x0,-0x9b54(%rbp)
cmpl   $0x1,-0x9b54(%rbp)
jge    18b0 <main+0x740>
xor    %eax,%eax
call   1070 <omp_get_team_num@plt>
movq   %rax,%xmm0
movaps 0x17b8(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0x17bc(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x9bc8(%rbp)
ff
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
movsd  -0x9bc8(%rbp),%xmm0
ff
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b54(%rbp)
jmp    1838 <main+0x6c8>
movl   $0x0,-0x9b58(%rbp)
mov    -0x9b58(%rbp),%eax
cmp    -0x9b28(%rbp),%eax
jge    1959 <main+0x7e9>
movslq -0x9b58(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b58(%rbp),%eax
shl    $0x0,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    18fe <main+0x78e>
jp     18fe <main+0x78e>
jmp    1940 <main+0x7d0>
mov    -0x9b58(%rbp),%esi
cvtsi2sdl -0x9b58(%rbp),%xmm0
ff
movsd  0x16ec(%rip),%xmm1
mulsd  %xmm1,%xmm0
movslq -0x9b58(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x1701(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b1c(%rbp)
jmp    1945 <main+0x7d5>
mov    -0x9b58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b58(%rbp)
jmp    18ba <main+0x74a>
cmpl   $0x0,-0x9b1c(%rbp)
je     1979 <main+0x809>
lea    0x16e2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1987 <main+0x817>
lea    0x16d7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b5c(%rbp)
cmpl   $0x3e0,-0x9b5c(%rbp)
jge    19c8 <main+0x858>
movslq -0x9b5c(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b5c(%rbp)
jmp    1991 <main+0x821>
movl   $0x0,-0x9b1c(%rbp)
mov    $0x0,%al
call   1090 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x100,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b60(%rbp)
movl   $0x0,-0x9b64(%rbp)
cmpl   $0x1,-0x9b64(%rbp)
jge    1a4c <main+0x8dc>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x9b68(%rbp)
cvtsi2sdl -0x9b68(%rbp),%xmm0
ff
movslq -0x9b68(%rbp),%rax
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b64(%rbp)
jmp    19fd <main+0x88d>
movl   $0x0,-0x9b6c(%rbp)
mov    -0x9b6c(%rbp),%eax
cmp    -0x9b60(%rbp),%eax
jge    1af5 <main+0x985>
movslq -0x9b6c(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b6c(%rbp),%eax
shl    $0x0,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    1a9a <main+0x92a>
jp     1a9a <main+0x92a>
jmp    1adc <main+0x96c>
mov    -0x9b6c(%rbp),%esi
cvtsi2sdl -0x9b6c(%rbp),%xmm0
ff
movsd  0x1550(%rip),%xmm1
mulsd  %xmm1,%xmm0
movslq -0x9b6c(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x1565(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b1c(%rbp)
jmp    1ae1 <main+0x971>
mov    -0x9b6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b6c(%rbp)
jmp    1a56 <main+0x8e6>
cmpl   $0x0,-0x9b1c(%rbp)
je     1b15 <main+0x9a5>
lea    0x1546(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1b23 <main+0x9b3>
lea    0x153b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b70(%rbp)
cmpl   $0x3e0,-0x9b70(%rbp)
jge    1b64 <main+0x9f4>
movslq -0x9b70(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b70(%rbp)
jmp    1b2d <main+0x9bd>
movl   $0x0,-0x9b1c(%rbp)
mov    $0x0,%al
call   1090 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x200,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b28(%rbp)
movl   $0x0,-0x9b74(%rbp)
cmpl   $0x1,-0x9b74(%rbp)
jge    1c35 <main+0xac5>
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
and    $0x1,%rax
cmp    $0x0,%rax
jne    1bee <main+0xa7e>
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
mov    %eax,-0x9b78(%rbp)
movslq -0x9b78(%rbp),%rax
movsd  0x1429(%rip),%xmm0
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
jmp    1c1c <main+0xaac>
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
mov    %eax,-0x9b7c(%rbp)
movslq -0x9b7c(%rbp),%rax
movsd  0x13fe(%rip),%xmm0
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
jmp    1c21 <main+0xab1>
mov    -0x9b74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b74(%rbp)
jmp    1b99 <main+0xa29>
movl   $0x0,-0x9b80(%rbp)
mov    -0x9b80(%rbp),%eax
cmp    -0x9b28(%rbp),%eax
jge    1d51 <main+0xbe1>
mov    -0x9b80(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1cd0 <main+0xb60>
movslq -0x9b80(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  0x1380(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1c95 <main+0xb25>
jp     1c95 <main+0xb25>
jmp    1ccb <main+0xb5b>
mov    -0x9b80(%rbp),%esi
movslq -0x9b80(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x137e(%rip),%rdi
movsd  0x1346(%rip),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b1c(%rbp)
jmp    1d38 <main+0xbc8>
movslq -0x9b80(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  0x1320(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1cfd <main+0xb8d>
jp     1cfd <main+0xb8d>
jmp    1d33 <main+0xbc3>
mov    -0x9b80(%rbp),%esi
movslq -0x9b80(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x1316(%rip),%rdi
movsd  0x12e6(%rip),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b1c(%rbp)
jmp    1d38 <main+0xbc8>
jmp    1d3d <main+0xbcd>
mov    -0x9b80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b80(%rbp)
jmp    1c3f <main+0xacf>
cmpl   $0x0,-0x9b1c(%rbp)
je     1d71 <main+0xc01>
lea    0x12ea(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1d7f <main+0xc0f>
lea    0x12df(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b84(%rbp)
cmpl   $0x3e0,-0x9b84(%rbp)
jge    1dc0 <main+0xc50>
movslq -0x9b84(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b84(%rbp)
jmp    1d89 <main+0xc19>
movl   $0x0,-0x9b1c(%rbp)
movl   $0xa,-0x9b88(%rbp)
mov    $0x0,%al
call   1090 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x100,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b28(%rbp)
movl   $0x0,-0x9b8c(%rbp)
cmpl   $0x1,-0x9b8c(%rbp)
jge    1e5e <main+0xcee>
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
mov    %eax,-0x9b88(%rbp)
cvtsi2sdl -0x9b88(%rbp),%xmm0
ff
movsd  %xmm0,-0x9bd0(%rbp)
ff
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
movsd  -0x9bd0(%rbp),%xmm0
ff
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b8c(%rbp)
jmp    1dff <main+0xc8f>
movl   $0x0,-0x9b90(%rbp)
mov    -0x9b90(%rbp),%eax
cmp    -0x9b28(%rbp),%eax
jge    1f07 <main+0xd97>
movslq -0x9b90(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b90(%rbp),%eax
shl    $0x0,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    1eac <main+0xd3c>
jp     1eac <main+0xd3c>
jmp    1eee <main+0xd7e>
mov    -0x9b90(%rbp),%esi
cvtsi2sdl -0x9b90(%rbp),%xmm0
ff
movsd  0x113e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movslq -0x9b90(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x1153(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b1c(%rbp)
jmp    1ef3 <main+0xd83>
mov    -0x9b90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b90(%rbp)
jmp    1e68 <main+0xcf8>
cmpl   $0x0,-0x9b1c(%rbp)
je     1f27 <main+0xdb7>
lea    0x1134(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1f35 <main+0xdc5>
lea    0x1129(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b94(%rbp)
cmpl   $0x3e0,-0x9b94(%rbp)
jge    1f76 <main+0xe06>
movslq -0x9b94(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b94(%rbp)
jmp    1f3f <main+0xdcf>
movl   $0x0,-0x9b1c(%rbp)
movl   $0xa,-0x9b88(%rbp)
mov    $0x0,%al
call   1090 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x100,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b28(%rbp)
movl   $0x0,-0x9b98(%rbp)
cmpl   $0x1,-0x9b98(%rbp)
jge    2021 <main+0xeb1>
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
mov    %rax,%rcx
movslq -0x9b88(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x9b88(%rbp)
cvtsi2sdl -0x9b88(%rbp),%xmm0
ff
movsd  %xmm0,-0x9bd8(%rbp)
ff
mov    $0x0,%al
call   1070 <omp_get_team_num@plt>
movsd  -0x9bd8(%rbp),%xmm0
ff
addsd  -0x1f10(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
mov    -0x9b98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b98(%rbp)
jmp    1fb5 <main+0xe45>
movl   $0x0,-0x9b9c(%rbp)
mov    -0x9b9c(%rbp),%eax
cmp    -0x9b28(%rbp),%eax
jge    20c9 <main+0xf59>
movslq -0x9b9c(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b9c(%rbp),%eax
shl    $0x0,%eax
add    $0xa,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    2072 <main+0xf02>
jp     2072 <main+0xf02>
jmp    20b0 <main+0xf40>
mov    -0x9b9c(%rbp),%esi
mov    -0x9b9c(%rbp),%eax
shl    $0x0,%eax
add    $0xa,%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b9c(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0xf91(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b1c(%rbp)
jmp    20b5 <main+0xf45>
mov    -0x9b9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b9c(%rbp)
jmp    202b <main+0xebb>
cmpl   $0x0,-0x9b1c(%rbp)
je     20e9 <main+0xf79>
lea    0xf72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    20f7 <main+0xf87>
lea    0xf67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x9be0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1f18,%rsp
xor    %eax,%eax
call   1080 <check_offloading@plt>
mov    $0x1f00,%edi
call   1070 <malloc@plt>
mov    %rax,%r12
lea    0x10(%rsp),%rdi
mov    $0x1f00,%edx
xor    %esi,%esi
call   1060 <memset@plt>
xor    %eax,%eax
call   10b0 <omp_is_initial_device@plt>
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
mov    $0xffffffff,%r15d
test   %rax,%rax
jne    11e9 <main+0x59>
xor    %eax,%eax
call   10a0 <omp_get_num_teams@plt>
mov    %eax,%r15d
xor    %r13d,%r13d
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
movq   %rax,%xmm0
punpckldq 0xe00(%rip),%xmm0
subpd  0xe08(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,(%rsp)
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
movapd (%rsp),%xmm0
addsd  0x10(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsp,%rax,8)
test   %r15d,%r15d
jle    1291 <main+0x101>
mov    %r15d,%ebx
xor    %ebp,%ebp
lea    0xdfe(%rip),%r14
xor    %eax,%eax
jmp    1259 <main+0xc9>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%rbx
je     1281 <main+0xf1>
movsd  0x10(%rsp,%rbp,8),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
ucomisd %xmm0,%xmm1
jne    126e <main+0xde>
jnp    1250 <main+0xc0>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x2,%al
call   1050 <printf@plt>
mov    $0x1,%eax
jmp    1250 <main+0xc0>
test   %eax,%eax
je     1291 <main+0x101>
lea    0xddd(%rip),%rdi
mov    %eax,%r13d
jmp    1298 <main+0x108>
lea    0xdc7(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rdi
mov    $0x1f00,%edx
xor    %esi,%esi
call   1060 <memset@plt>
xor    %eax,%eax
call   10b0 <omp_is_initial_device@plt>
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
test   %rax,%rax
jne    12cb <main+0x13b>
xor    %eax,%eax
call   10a0 <omp_get_num_teams@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
movq   %rax,%xmm0
punpckldq 0xd21(%rip),%xmm0
subpd  0xd29(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,(%rsp)
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
movapd (%rsp),%xmm0
addsd  0x10(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsp,%rax,8)
test   %r15d,%r15d
jle    1362 <main+0x1d2>
mov    %r15d,%ebx
xor    %ebp,%ebp
lea    0xd1f(%rip),%r14
jmp    1339 <main+0x1a9>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbp
cmp    %rbp,%rbx
je     1362 <main+0x1d2>
movsd  0x10(%rsp,%rbp,8),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
ucomisd %xmm0,%xmm1
jne    134e <main+0x1be>
jnp    1330 <main+0x1a0>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x2,%al
call   1050 <printf@plt>
mov    $0x1,%r13d
jmp    1330 <main+0x1a0>
test   %r13d,%r13d
lea    0xcf3(%rip),%r14
lea    0xcf6(%rip),%rdi
cmove  %r14,%rdi
call   1030 <puts@plt>
mov    $0x1f00,%edx
mov    %r12,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
xor    %eax,%eax
call   10b0 <omp_is_initial_device@plt>
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
test   %rax,%rax
jne    13a8 <main+0x218>
xor    %eax,%eax
call   10a0 <omp_get_num_teams@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
movq   %rax,%xmm0
punpckldq 0xc44(%rip),%xmm0
subpd  0xc4c(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,(%rsp)
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
movapd (%rsp),%xmm0
addsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
test   %r15d,%r15d
jle    1432 <main+0x2a2>
mov    %r15d,%ebx
xor    %ebp,%ebp
lea    0xc42(%rip),%r15
jmp    1409 <main+0x279>
add    $0x1,%rbp
cmp    %rbp,%rbx
je     1432 <main+0x2a2>
movsd  (%r12,%rbp,8),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
ucomisd %xmm0,%xmm1
jne    141e <main+0x28e>
jnp    1400 <main+0x270>
mov    %r15,%rdi
mov    %ebp,%esi
mov    $0x2,%al
call   1050 <printf@plt>
mov    $0x1,%r13d
jmp    1400 <main+0x270>
test   %r13d,%r13d
lea    0xc2d(%rip),%rdi
cmove  %r14,%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rdi
xor    %ebx,%ebx
mov    $0x1f00,%edx
xor    %esi,%esi
call   1060 <memset@plt>
xor    %eax,%eax
call   10b0 <omp_is_initial_device@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
movq   %rbp,%xmm0
punpckldq 0xb80(%rip),%xmm0
subpd  0xb88(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
addsd  0x10(%rsp,%rax,8),%xmm1
test   %r15,%r15
movsd  %xmm1,0x10(%rsp,%rax,8)
mov    $0x200,%eax
mov    $0x80,%ebp
cmove  %rax,%rbp
lea    -0x1(%rbp),%r12
lea    0xb84(%rip),%r15
nopl   0x0(%rax)
movsd  0x10(%rsp,%rbx,8),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
ucomisd %xmm0,%xmm1
jne    14e0 <main+0x350>
jp     14e0 <main+0x350>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    14c0 <main+0x330>
jmp    1507 <main+0x377>
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x2,%al
call   1050 <printf@plt>
lea    0x1(%rbx),%rax
mov    $0x1,%r13d
cmp    %rbx,%r12
mov    %rax,%rbx
jne    14c0 <main+0x330>
lea    0xb64(%rip),%rdi
jmp    1515 <main+0x385>
test   %r13d,%r13d
lea    0xb58(%rip),%rdi
cmove  %r14,%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rdi
xor    %ebx,%ebx
mov    $0x1f00,%edx
xor    %esi,%esi
call   1060 <memset@plt>
xor    %eax,%eax
call   10b0 <omp_is_initial_device@plt>
xor    %r12d,%r12d
test   %rax,%rax
sete   %r12b
xor    %eax,%eax
call   1040 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
cltq
addsd  0x10(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsp,%rax,8)
shl    $0x7,%r12
lea    0x80(%r12),%rbp
or     $0x7f,%r12
lea    0xacf(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x10(%rsp,%rbx,8),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
ucomisd %xmm0,%xmm1
jne    15a0 <main+0x410>
jp     15a0 <main+0x410>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1580 <main+0x3f0>
jmp    15c6 <main+0x436>
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x2,%al
call   1050 <printf@plt>
lea    0x1(%rbx),%rax
lea    0xab2(%rip),%r14
cmp    %rbx,%r12
mov    %rax,%rbx
jne    1580 <main+0x3f0>
lea    0xaa3(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rdi
xor    %ebx,%ebx
mov    $0x1f00,%edx
xor    %esi,%esi
call   1060 <memset@plt>
xor    %eax,%eax
call   10b0 <omp_is_initial_device@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
xor    %ebp,%ebp
test   $0x1,%al
sete   %bpl
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
test   %r14,%r14
cltq
movsd  0x10(%rsp,%rax,8),%xmm0
lea    0xa0d(%rip),%rcx
addsd  (%rcx,%rbp,8),%xmm0
movsd  %xmm0,0x10(%rsp,%rax,8)
mov    $0x200,%eax
mov    $0x80,%ebp
cmove  %rax,%rbp
lea    0xa0d(%rip),%r14
xor    %eax,%eax
jmp    1649 <main+0x4b9>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%rbp
je     1683 <main+0x4f3>
movsd  0x10(%rsp,%rbx,8),%xmm1
test   $0x1,%bl
jne    1660 <main+0x4d0>
movsd  0x9dc(%rip),%xmm0
jmp    1668 <main+0x4d8>
xchg   %ax,%ax
movsd  0x9c8(%rip),%xmm0
ucomisd %xmm0,%xmm1
jne    1670 <main+0x4e0>
jnp    1640 <main+0x4b0>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x2,%al
call   1050 <printf@plt>
mov    $0x1,%eax
jmp    1640 <main+0x4b0>
test   %eax,%eax
lea    0x9d3(%rip),%r12
lea    0x9d6(%rip),%r15
mov    %r15,%rdi
cmove  %r12,%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rdi
xor    %ebp,%ebp
mov    $0x1f00,%edx
xor    %esi,%esi
call   1060 <memset@plt>
xor    %eax,%eax
call   10b0 <omp_is_initial_device@plt>
xor    %r13d,%r13d
test   %rax,%rax
sete   %r13b
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
movsd  (%rsp),%xmm0
addsd  0x10(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsp,%rax,8)
shl    $0x7,%r13
lea    0x80(%r13),%rbx
or     $0x7f,%r13
lea    0x93c(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x10(%rsp,%rbp,8),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
ucomisd %xmm0,%xmm1
jne    1730 <main+0x5a0>
jp     1730 <main+0x5a0>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1710 <main+0x580>
jmp    174e <main+0x5be>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x2,%al
call   1050 <printf@plt>
lea    0x1(%rbp),%rax
mov    %r15,%r12
cmp    %rbp,%r13
mov    %rax,%rbp
jne    1710 <main+0x580>
mov    %r15,%r12
mov    %r12,%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rdi
xor    %ebp,%ebp
mov    $0x1f00,%edx
xor    %esi,%esi
call   1060 <memset@plt>
xor    %eax,%eax
call   10b0 <omp_is_initial_device@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
add    $0xa,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1090 <omp_get_team_num@plt>
movsd  (%rsp),%xmm0
addsd  0x10(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsp,%rax,8)
shl    $0x7,%ebx
or     $0xffffffffffffff00,%rbx
lea    0x8a8(%rip),%rdi
lea    0x882(%rip),%r14
add    $0x1,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x8(%rsp,%rbp,8),%xmm1
lea    0x9(%rbp),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd %xmm0,%xmm1
jne    1800 <main+0x670>
jp     1800 <main+0x670>
lea    (%rbx,%rbp,1),%rax
add    $0x1,%rax
add    $0x1,%rbp
cmp    $0x1,%rax
jne    17d0 <main+0x640>
jmp    181b <main+0x68b>
nopl   0x0(%rax)
lea    -0x1(%rbp),%esi
mov    %r14,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    %rbx,%rax
mov    %r15,%rdi
add    %rbp,%rax
jne    17be <main+0x62e>
mov    %r15,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x1f18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Error at %d, h = %lf, d = %lf\0A\00"
@.str.1 = [8 x i8] c"Failed\0A\00"
@.str.2 = [11 x i8] c"Succeeded\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [992 x double]
%3 = alloca [992 x double]
%4 = alloca [992 x double]
%5 = alloca [992 x double]
%6 = alloca [992 x double]
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
store i32 0, i32* %1
%41 = call i32 (...) @check_offloading()
%42 = call double* @malloc(i32 7936)
store double* %42, double** %7
store i32 0, i32* %8
store i32 0, i32* %9
br label %43
43: ; preds = %61, %0
%44 = load i32, i32* %9
%45 = icmp slt i32 %44, 992
br i1 %45, label %46, label %64
46: ; preds = %43
%47 = load i32, i32* %9
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [992 x double], [992 x double]* %4, i64 0, i64 %48
store double 1.000000e+00, double* %49
%50 = load i32, i32* %9
%51 = sitofp i32 %50 to double
%52 = load i32, i32* %9
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [992 x double], [992 x double]* %5, i64 0, i64 %53
store double %51, double* %54
%55 = load i32, i32* %9
%56 = sub nsw i32 0, %55
%57 = sitofp i32 %56 to double
%58 = load i32, i32* %9
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [992 x double], [992 x double]* %6, i64 0, i64 %59
store double %57, double* %60
br label %61
61: ; preds = %46
%62 = load i32, i32* %9
%63 = add nsw i32 %62, 1
store i32 %63, i32* %9
br label %43
64: ; preds = %43
store i32 0, i32* %10
br label %65
65: ; preds = %72, %64
%66 = load i32, i32* %10
%67 = icmp slt i32 %66, 992
br i1 %67, label %68, label %75
68: ; preds = %65
%69 = load i32, i32* %10
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %70
store double 0.000000e+00, double* %71
br label %72
72: ; preds = %68
%73 = load i32, i32* %10
%74 = add nsw i32 %73, 1
store i32 %74, i32* %10
br label %65
75: ; preds = %65
%76 = call i64 (...) @omp_is_initial_device()
%77 = icmp ne i64 %76, 0
%78 = zext i1 %77 to i64
%79 = select i1 %77, i32 128, i32 512
store i32 %79, i32* %11
store i32 -1, i32* %12
store i32 0, i32* %13
br label %80
80: ; preds = %95, %75
%81 = load i32, i32* %13
%82 = icmp slt i32 %81, 1
br i1 %82, label %83, label %98
83: ; preds = %80
%84 = call i64 (...) @omp_get_team_num()
%85 = icmp eq i64 %84, 0
br i1 %85, label %86, label %88
86: ; preds = %83
%87 = call i32 (...) @omp_get_num_teams()
store i32 %87, i32* %12
br label %88
88: ; preds = %86, %83
%89 = call i64 (...) @omp_get_team_num()
%90 = uitofp i64 %89 to double
%91 = call i64 (...) @omp_get_team_num()
%92 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %91
%93 = load double, double* %92
%94 = fadd double %93, %90
store double %94, double* %92
br label %95
95: ; preds = %88
%96 = load i32, i32* %13
%97 = add nsw i32 %96, 1
store i32 %97, i32* %13
br label %80
98: ; preds = %80
store i32 0, i32* %14
br label %99
99: ; preds = %123, %98
%100 = load i32, i32* %14
%101 = load i32, i32* %12
%102 = icmp slt i32 %100, %101
br i1 %102, label %103, label %126
103: ; preds = %99
%104 = load i32, i32* %14
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %105
%107 = load double, double* %106
%108 = load i32, i32* %14
%109 = mul nsw i32 %108, 1
%110 = sitofp i32 %109 to double
%111 = fcmp une double %107, %110
br i1 %111, label %112, label %122
112: ; preds = %103
%113 = load i32, i32* %14
%114 = load i32, i32* %14
%115 = sitofp i32 %114 to double
%116 = fmul double %115, 1.000000e+00
%117 = load i32, i32* %14
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %118
%120 = load double, double* %119
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %113, double %116, double %120)
store i32 1, i32* %8
br label %122
122: ; preds = %112, %103
br label %123
123: ; preds = %122
%124 = load i32, i32* %14
%125 = add nsw i32 %124, 1
store i32 %125, i32* %14
br label %99
126: ; preds = %99
%127 = load i32, i32* %8
%128 = icmp ne i32 %127, 0
br i1 %128, label %129, label %131
129: ; preds = %126
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %133
131: ; preds = %126
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %133
133: ; preds = %131, %129
store i32 0, i32* %15
br label %134
134: ; preds = %141, %133
%135 = load i32, i32* %15
%136 = icmp slt i32 %135, 992
br i1 %136, label %137, label %144
137: ; preds = %134
%138 = load i32, i32* %15
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %139
store double 0.000000e+00, double* %140
br label %141
141: ; preds = %137
%142 = load i32, i32* %15
%143 = add nsw i32 %142, 1
store i32 %143, i32* %15
br label %134
144: ; preds = %134
%145 = call i64 (...) @omp_is_initial_device()
%146 = icmp ne i64 %145, 0
%147 = zext i1 %146 to i64
%148 = select i1 %146, i32 128, i32 512
store i32 %148, i32* %11
store i32 0, i32* %16
br label %149
149: ; preds = %164, %144
%150 = load i32, i32* %16
%151 = icmp slt i32 %150, 1
br i1 %151, label %152, label %167
152: ; preds = %149
%153 = call i64 (...) @omp_get_team_num()
%154 = icmp eq i64 %153, 0
br i1 %154, label %155, label %157
155: ; preds = %152
%156 = call i32 (...) @omp_get_num_teams()
store i32 %156, i32* %12
br label %157
157: ; preds = %155, %152
%158 = call i64 (...) @omp_get_team_num()
%159 = uitofp i64 %158 to double
%160 = call i64 (...) @omp_get_team_num()
%161 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %160
%162 = load double, double* %161
%163 = fadd double %162, %159
store double %163, double* %161
br label %164
164: ; preds = %157
%165 = load i32, i32* %16
%166 = add nsw i32 %165, 1
store i32 %166, i32* %16
br label %149
167: ; preds = %149
store i32 0, i32* %17
br label %168
168: ; preds = %192, %167
%169 = load i32, i32* %17
%170 = load i32, i32* %12
%171 = icmp slt i32 %169, %170
br i1 %171, label %172, label %195
172: ; preds = %168
%173 = load i32, i32* %17
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %174
%176 = load double, double* %175
%177 = load i32, i32* %17
%178 = mul nsw i32 %177, 1
%179 = sitofp i32 %178 to double
%180 = fcmp une double %176, %179
br i1 %180, label %181, label %191
181: ; preds = %172
%182 = load i32, i32* %17
%183 = load i32, i32* %17
%184 = sitofp i32 %183 to double
%185 = fmul double %184, 1.000000e+00
%186 = load i32, i32* %17
%187 = sext i32 %186 to i64
%188 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %187
%189 = load double, double* %188
%190 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %182, double %185, double %189)
store i32 1, i32* %8
br label %191
191: ; preds = %181, %172
br label %192
192: ; preds = %191
%193 = load i32, i32* %17
%194 = add nsw i32 %193, 1
store i32 %194, i32* %17
br label %168
195: ; preds = %168
%196 = load i32, i32* %8
%197 = icmp ne i32 %196, 0
br i1 %197, label %198, label %200
198: ; preds = %195
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %202
200: ; preds = %195
%201 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %202
202: ; preds = %200, %198
store i32 0, i32* %18
br label %203
203: ; preds = %211, %202
%204 = load i32, i32* %18
%205 = icmp slt i32 %204, 992
br i1 %205, label %206, label %214
206: ; preds = %203
%207 = load double*, double** %7
%208 = load i32, i32* %18
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds double, double* %207, i64 %209
store double 0.000000e+00, double* %210
br label %211
211: ; preds = %206
%212 = load i32, i32* %18
%213 = add nsw i32 %212, 1
store i32 %213, i32* %18
br label %203
214: ; preds = %203
%215 = call i64 (...) @omp_is_initial_device()
%216 = icmp ne i64 %215, 0
%217 = zext i1 %216 to i64
%218 = select i1 %216, i32 128, i32 512
store i32 %218, i32* %11
store i32 0, i32* %19
br label %219
219: ; preds = %235, %214
%220 = load i32, i32* %19
%221 = icmp slt i32 %220, 1
br i1 %221, label %222, label %238
222: ; preds = %219
%223 = call i64 (...) @omp_get_team_num()
%224 = icmp eq i64 %223, 0
br i1 %224, label %225, label %227
225: ; preds = %222
%226 = call i32 (...) @omp_get_num_teams()
store i32 %226, i32* %12
br label %227
227: ; preds = %225, %222
%228 = call i64 (...) @omp_get_team_num()
%229 = uitofp i64 %228 to double
%230 = load double*, double** %7
%231 = call i64 (...) @omp_get_team_num()
%232 = getelementptr inbounds double, double* %230, i64 %231
%233 = load double, double* %232
%234 = fadd double %233, %229
store double %234, double* %232
br label %235
235: ; preds = %227
%236 = load i32, i32* %19
%237 = add nsw i32 %236, 1
store i32 %237, i32* %19
br label %219
238: ; preds = %219
store i32 0, i32* %20
br label %239
239: ; preds = %265, %238
%240 = load i32, i32* %20
%241 = load i32, i32* %12
%242 = icmp slt i32 %240, %241
br i1 %242, label %243, label %268
243: ; preds = %239
%244 = load double*, double** %7
%245 = load i32, i32* %20
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds double, double* %244, i64 %246
%248 = load double, double* %247
%249 = load i32, i32* %20
%250 = mul nsw i32 %249, 1
%251 = sitofp i32 %250 to double
%252 = fcmp une double %248, %251
br i1 %252, label %253, label %264
253: ; preds = %243
%254 = load i32, i32* %20
%255 = load i32, i32* %20
%256 = sitofp i32 %255 to double
%257 = fmul double %256, 1.000000e+00
%258 = load double*, double** %7
%259 = load i32, i32* %20
%260 = sext i32 %259 to i64
%261 = getelementptr inbounds double, double* %258, i64 %260
%262 = load double, double* %261
%263 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %254, double %257, double %262)
store i32 1, i32* %8
br label %264
264: ; preds = %253, %243
br label %265
265: ; preds = %264
%266 = load i32, i32* %20
%267 = add nsw i32 %266, 1
store i32 %267, i32* %20
br label %239
268: ; preds = %239
%269 = load i32, i32* %8
%270 = icmp ne i32 %269, 0
br i1 %270, label %271, label %273
271: ; preds = %268
%272 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %275
273: ; preds = %268
%274 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %275
275: ; preds = %273, %271
store i32 0, i32* %21
br label %276
276: ; preds = %283, %275
%277 = load i32, i32* %21
%278 = icmp slt i32 %277, 992
br i1 %278, label %279, label %286
279: ; preds = %276
%280 = load i32, i32* %21
%281 = sext i32 %280 to i64
%282 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %281
store double 0.000000e+00, double* %282
br label %283
283: ; preds = %279
%284 = load i32, i32* %21
%285 = add nsw i32 %284, 1
store i32 %285, i32* %21
br label %276
286: ; preds = %276
%287 = call i64 (...) @omp_is_initial_device()
%288 = icmp ne i64 %287, 0
%289 = zext i1 %288 to i64
%290 = select i1 %288, i32 128, i32 512
store i32 %290, i32* %11
store i32 0, i32* %22
br label %291
291: ; preds = %301, %286
%292 = load i32, i32* %22
%293 = icmp slt i32 %292, 1
br i1 %293, label %294, label %304
294: ; preds = %291
%295 = call i64 (...) @omp_get_team_num()
%296 = uitofp i64 %295 to double
%297 = call i64 (...) @omp_get_team_num()
%298 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %297
%299 = load double, double* %298
%300 = fadd double %299, %296
store double %300, double* %298
br label %301
301: ; preds = %294
%302 = load i32, i32* %22
%303 = add nsw i32 %302, 1
store i32 %303, i32* %22
br label %291
304: ; preds = %291
store i32 0, i32* %23
br label %305
305: ; preds = %329, %304
%306 = load i32, i32* %23
%307 = load i32, i32* %11
%308 = icmp slt i32 %306, %307
br i1 %308, label %309, label %332
309: ; preds = %305
%310 = load i32, i32* %23
%311 = sext i32 %310 to i64
%312 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %311
%313 = load double, double* %312
%314 = load i32, i32* %23
%315 = mul nsw i32 %314, 1
%316 = sitofp i32 %315 to double
%317 = fcmp une double %313, %316
br i1 %317, label %318, label %328
318: ; preds = %309
%319 = load i32, i32* %23
%320 = load i32, i32* %23
%321 = sitofp i32 %320 to double
%322 = fmul double %321, 1.000000e+00
%323 = load i32, i32* %23
%324 = sext i32 %323 to i64
%325 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %324
%326 = load double, double* %325
%327 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %319, double %322, double %326)
store i32 1, i32* %8
br label %328
328: ; preds = %318, %309
br label %329
329: ; preds = %328
%330 = load i32, i32* %23
%331 = add nsw i32 %330, 1
store i32 %331, i32* %23
br label %305
332: ; preds = %305
%333 = load i32, i32* %8
%334 = icmp ne i32 %333, 0
br i1 %334, label %335, label %337
335: ; preds = %332
%336 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %339
337: ; preds = %332
%338 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %339
339: ; preds = %337, %335
store i32 0, i32* %24
br label %340
340: ; preds = %347, %339
%341 = load i32, i32* %24
%342 = icmp slt i32 %341, 992
br i1 %342, label %343, label %350
343: ; preds = %340
%344 = load i32, i32* %24
%345 = sext i32 %344 to i64
%346 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %345
store double 0.000000e+00, double* %346
br label %347
347: ; preds = %343
%348 = load i32, i32* %24
%349 = add nsw i32 %348, 1
store i32 %349, i32* %24
br label %340
350: ; preds = %340
store i32 0, i32* %8
%351 = call i64 (...) @omp_is_initial_device()
%352 = icmp ne i64 %351, 0
%353 = zext i1 %352 to i64
%354 = select i1 %352, i32 128, i32 256
store i32 %354, i32* %25
store i32 0, i32* %26
br label %355
355: ; preds = %367, %350
%356 = load i32, i32* %26
%357 = icmp slt i32 %356, 1
br i1 %357, label %358, label %370
358: ; preds = %355
%359 = call i32 (...) @omp_get_thread_num()
store i32 %359, i32* %27
%360 = load i32, i32* %27
%361 = sitofp i32 %360 to double
%362 = load i32, i32* %27
%363 = sext i32 %362 to i64
%364 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %363
%365 = load double, double* %364
%366 = fadd double %365, %361
store double %366, double* %364
br label %367
367: ; preds = %358
%368 = load i32, i32* %26
%369 = add nsw i32 %368, 1
store i32 %369, i32* %26
br label %355
370: ; preds = %355
store i32 0, i32* %28
br label %371
371: ; preds = %395, %370
%372 = load i32, i32* %28
%373 = load i32, i32* %25
%374 = icmp slt i32 %372, %373
br i1 %374, label %375, label %398
375: ; preds = %371
%376 = load i32, i32* %28
%377 = sext i32 %376 to i64
%378 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %377
%379 = load double, double* %378
%380 = load i32, i32* %28
%381 = mul nsw i32 %380, 1
%382 = sitofp i32 %381 to double
%383 = fcmp une double %379, %382
br i1 %383, label %384, label %394
384: ; preds = %375
%385 = load i32, i32* %28
%386 = load i32, i32* %28
%387 = sitofp i32 %386 to double
%388 = fmul double %387, 1.000000e+00
%389 = load i32, i32* %28
%390 = sext i32 %389 to i64
%391 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %390
%392 = load double, double* %391
%393 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %385, double %388, double %392)
store i32 1, i32* %8
br label %394
394: ; preds = %384, %375
br label %395
395: ; preds = %394
%396 = load i32, i32* %28
%397 = add nsw i32 %396, 1
store i32 %397, i32* %28
br label %371
398: ; preds = %371
%399 = load i32, i32* %8
%400 = icmp ne i32 %399, 0
br i1 %400, label %401, label %403
401: ; preds = %398
%402 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %405
403: ; preds = %398
%404 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %405
405: ; preds = %403, %401
store i32 0, i32* %29
br label %406
406: ; preds = %413, %405
%407 = load i32, i32* %29
%408 = icmp slt i32 %407, 992
br i1 %408, label %409, label %416
409: ; preds = %406
%410 = load i32, i32* %29
%411 = sext i32 %410 to i64
%412 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %411
store double 0.000000e+00, double* %412
br label %413
413: ; preds = %409
%414 = load i32, i32* %29
%415 = add nsw i32 %414, 1
store i32 %415, i32* %29
br label %406
416: ; preds = %406
store i32 0, i32* %8
%417 = call i64 (...) @omp_is_initial_device()
%418 = icmp ne i64 %417, 0
%419 = zext i1 %418 to i64
%420 = select i1 %418, i32 128, i32 512
store i32 %420, i32* %11
store i32 0, i32* %30
br label %421
421: ; preds = %445, %416
%422 = load i32, i32* %30
%423 = icmp slt i32 %422, 1
br i1 %423, label %424, label %448
424: ; preds = %421
%425 = call i64 (...) @omp_get_team_num()
%426 = urem i64 %425, 2
%427 = icmp eq i64 %426, 0
br i1 %427, label %428, label %436
428: ; preds = %424
%429 = call i64 (...) @omp_get_team_num()
%430 = trunc i64 %429 to i32
store i32 %430, i32* %31
%431 = load i32, i32* %31
%432 = sext i32 %431 to i64
%433 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %432
%434 = load double, double* %433
%435 = fadd double %434, 1.000000e+00
store double %435, double* %433
br label %444
436: ; preds = %424
%437 = call i64 (...) @omp_get_team_num()
%438 = trunc i64 %437 to i32
store i32 %438, i32* %32
%439 = load i32, i32* %32
%440 = sext i32 %439 to i64
%441 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %440
%442 = load double, double* %441
%443 = fadd double %442, 2.000000e+00
store double %443, double* %441
br label %444
444: ; preds = %436, %428
br label %445
445: ; preds = %444
%446 = load i32, i32* %30
%447 = add nsw i32 %446, 1
store i32 %447, i32* %30
br label %421
448: ; preds = %421
store i32 0, i32* %33
br label %449
449: ; preds = %486, %448
%450 = load i32, i32* %33
%451 = load i32, i32* %11
%452 = icmp slt i32 %450, %451
br i1 %452, label %453, label %489
453: ; preds = %449
%454 = load i32, i32* %33
%455 = srem i32 %454, 2
%456 = icmp eq i32 %455, 0
br i1 %456, label %457, label %471
457: ; preds = %453
%458 = load i32, i32* %33
%459 = sext i32 %458 to i64
%460 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %459
%461 = load double, double* %460
%462 = fcmp une double %461, 1.000000e+00
br i1 %462, label %463, label %470
463: ; preds = %457
%464 = load i32, i32* %33
%465 = load i32, i32* %33
%466 = sext i32 %465 to i64
%467 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %466
%468 = load double, double* %467
%469 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %464, double 1.000000e+00, double %468)
store i32 1, i32* %8
br label %470
470: ; preds = %463, %457
br label %485
471: ; preds = %453
%472 = load i32, i32* %33
%473 = sext i32 %472 to i64
%474 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %473
%475 = load double, double* %474
%476 = fcmp une double %475, 2.000000e+00
br i1 %476, label %477, label %484
477: ; preds = %471
%478 = load i32, i32* %33
%479 = load i32, i32* %33
%480 = sext i32 %479 to i64
%481 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %480
%482 = load double, double* %481
%483 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %478, double 2.000000e+00, double %482)
store i32 1, i32* %8
br label %484
484: ; preds = %477, %471
br label %485
485: ; preds = %484, %470
br label %486
486: ; preds = %485
%487 = load i32, i32* %33
%488 = add nsw i32 %487, 1
store i32 %488, i32* %33
br label %449
489: ; preds = %449
%490 = load i32, i32* %8
%491 = icmp ne i32 %490, 0
br i1 %491, label %492, label %494
492: ; preds = %489
%493 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %496
494: ; preds = %489
%495 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %496
496: ; preds = %494, %492
store i32 0, i32* %34
br label %497
497: ; preds = %504, %496
%498 = load i32, i32* %34
%499 = icmp slt i32 %498, 992
br i1 %499, label %500, label %507
500: ; preds = %497
%501 = load i32, i32* %34
%502 = sext i32 %501 to i64
%503 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %502
store double 0.000000e+00, double* %503
br label %504
504: ; preds = %500
%505 = load i32, i32* %34
%506 = add nsw i32 %505, 1
store i32 %506, i32* %34
br label %497
507: ; preds = %497
store i32 0, i32* %8
store i32 10, i32* %35
%508 = call i64 (...) @omp_is_initial_device()
%509 = icmp ne i64 %508, 0
%510 = zext i1 %509 to i64
%511 = select i1 %509, i32 128, i32 256
store i32 %511, i32* %11
store i32 0, i32* %36
br label %512
512: ; preds = %524, %507
%513 = load i32, i32* %36
%514 = icmp slt i32 %513, 1
br i1 %514, label %515, label %527
515: ; preds = %512
%516 = call i64 (...) @omp_get_team_num()
%517 = trunc i64 %516 to i32
store i32 %517, i32* %35
%518 = load i32, i32* %35
%519 = sitofp i32 %518 to double
%520 = call i64 (...) @omp_get_team_num()
%521 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %520
%522 = load double, double* %521
%523 = fadd double %522, %519
store double %523, double* %521
br label %524
524: ; preds = %515
%525 = load i32, i32* %36
%526 = add nsw i32 %525, 1
store i32 %526, i32* %36
br label %512
527: ; preds = %512
store i32 0, i32* %37
br label %528
528: ; preds = %552, %527
%529 = load i32, i32* %37
%530 = load i32, i32* %11
%531 = icmp slt i32 %529, %530
br i1 %531, label %532, label %555
532: ; preds = %528
%533 = load i32, i32* %37
%534 = sext i32 %533 to i64
%535 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %534
%536 = load double, double* %535
%537 = load i32, i32* %37
%538 = mul nsw i32 %537, 1
%539 = sitofp i32 %538 to double
%540 = fcmp une double %536, %539
br i1 %540, label %541, label %551
541: ; preds = %532
%542 = load i32, i32* %37
%543 = load i32, i32* %37
%544 = sitofp i32 %543 to double
%545 = fmul double %544, 1.000000e+00
%546 = load i32, i32* %37
%547 = sext i32 %546 to i64
%548 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %547
%549 = load double, double* %548
%550 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %542, double %545, double %549)
store i32 1, i32* %8
br label %551
551: ; preds = %541, %532
br label %552
552: ; preds = %551
%553 = load i32, i32* %37
%554 = add nsw i32 %553, 1
store i32 %554, i32* %37
br label %528
555: ; preds = %528
%556 = load i32, i32* %8
%557 = icmp ne i32 %556, 0
br i1 %557, label %558, label %560
558: ; preds = %555
%559 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %562
560: ; preds = %555
%561 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %562
562: ; preds = %560, %558
store i32 0, i32* %38
br label %563
563: ; preds = %570, %562
%564 = load i32, i32* %38
%565 = icmp slt i32 %564, 992
br i1 %565, label %566, label %573
566: ; preds = %563
%567 = load i32, i32* %38
%568 = sext i32 %567 to i64
%569 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %568
store double 0.000000e+00, double* %569
br label %570
570: ; preds = %566
%571 = load i32, i32* %38
%572 = add nsw i32 %571, 1
store i32 %572, i32* %38
br label %563
573: ; preds = %563
store i32 0, i32* %8
store i32 10, i32* %35
%574 = call i64 (...) @omp_is_initial_device()
%575 = icmp ne i64 %574, 0
%576 = zext i1 %575 to i64
%577 = select i1 %575, i32 128, i32 256
store i32 %577, i32* %11
store i32 0, i32* %39
br label %578
578: ; preds = %593, %573
%579 = load i32, i32* %39
%580 = icmp slt i32 %579, 1
br i1 %580, label %581, label %596
581: ; preds = %578
%582 = call i64 (...) @omp_get_team_num()
%583 = load i32, i32* %35
%584 = sext i32 %583 to i64
%585 = add i64 %584, %582
%586 = trunc i64 %585 to i32
store i32 %586, i32* %35
%587 = load i32, i32* %35
%588 = sitofp i32 %587 to double
%589 = call i64 (...) @omp_get_team_num()
%590 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %589
%591 = load double, double* %590
%592 = fadd double %591, %588
store double %592, double* %590
br label %593
593: ; preds = %581
%594 = load i32, i32* %39
%595 = add nsw i32 %594, 1
store i32 %595, i32* %39
br label %578
596: ; preds = %578
store i32 0, i32* %40
br label %597
597: ; preds = %623, %596
%598 = load i32, i32* %40
%599 = load i32, i32* %11
%600 = icmp slt i32 %598, %599
br i1 %600, label %601, label %626
601: ; preds = %597
%602 = load i32, i32* %40
%603 = sext i32 %602 to i64
%604 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %603
%605 = load double, double* %604
%606 = load i32, i32* %40
%607 = mul nsw i32 %606, 1
%608 = add nsw i32 10, %607
%609 = sitofp i32 %608 to double
%610 = fcmp une double %605, %609
br i1 %610, label %611, label %622
611: ; preds = %601
%612 = load i32, i32* %40
%613 = load i32, i32* %40
%614 = mul nsw i32 %613, 1
%615 = add nsw i32 10, %614
%616 = sitofp i32 %615 to double
%617 = load i32, i32* %40
%618 = sext i32 %617 to i64
%619 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %618
%620 = load double, double* %619
%621 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %612, double %616, double %620)
store i32 1, i32* %8
br label %622
622: ; preds = %611, %601
br label %623
623: ; preds = %622
%624 = load i32, i32* %40
%625 = add nsw i32 %624, 1
store i32 %625, i32* %40
br label %597
626: ; preds = %597
%627 = load i32, i32* %8
%628 = icmp ne i32 %627, 0
br i1 %628, label %629, label %631
629: ; preds = %626
%630 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %633
631: ; preds = %626
%632 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %633
633: ; preds = %631, %629
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"Error at %d, h = %lf, d = %lf\0A\00"
@str.9 = [10 x i8] c"Succeeded\00"
@str.17 = [7 x i8] c"Failed\00"
define i32 @main() {
%1 = alloca [992 x double]
%2 = bitcast [992 x double]* %1 to i8*
%3 = tail call i32 (...) @check_offloading()
%4 = tail call double* @malloc(i32 7936)
%5 = bitcast double* %4 to i8*
%6 = tail call i64 (...) @omp_is_initial_device()
%7 = tail call i64 (...) @omp_get_team_num()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = tail call i32 (...) @omp_get_num_teams()
br label %11
11: ; preds = %9, %0
%12 = phi i32 [ %10, %9 ], [ -1, %0 ]
%13 = tail call i64 (...) @omp_get_team_num()
%14 = uitofp i64 %13 to double
%15 = tail call i64 (...) @omp_get_team_num()
%16 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %15
%17 = load double, double* %16
%18 = fadd double %17, %14
store double %18, double* %16
%19 = icmp sgt i32 %12, 0
br i1 %19, label %20, label %38
20: ; preds = %11
%21 = zext i32 %12 to i64
br label %24
22: ; preds = %34
%23 = icmp eq i32 %35, 0
br i1 %23, label %38, label %39
24: ; preds = %20, %34
%25 = phi i64 [ 0, %20 ], [ %36, %34 ]
%26 = phi i32 [ 0, %20 ], [ %35, %34 ]
%27 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %25
%28 = load double, double* %27
%29 = trunc i64 %25 to i32
%30 = sitofp i32 %29 to double
%31 = fcmp une double %28, %30
br i1 %31, label %32, label %34
32: ; preds = %24
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %29, double %30, double %28)
br label %34
34: ; preds = %24, %32
%35 = phi i32 [ 1, %32 ], [ %26, %24 ]
%36 = add nuw nsw i64 %25, 1
%37 = icmp eq i64 %36, %21
br i1 %37, label %22, label %24
38: ; preds = %11, %22
br label %39
39: ; preds = %22, %38
%40 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @str.9, i64 0, i64 0), %38 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0), %22 ]
%41 = phi i32 [ 0, %38 ], [ %35, %22 ]
%42 = tail call i32 @puts(i8* dereferenceable(1) %40)
%43 = tail call i64 (...) @omp_is_initial_device()
%44 = tail call i64 (...) @omp_get_team_num()
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %39
%47 = tail call i32 (...) @omp_get_num_teams()
br label %48
48: ; preds = %46, %39
%49 = phi i32 [ %47, %46 ], [ %12, %39 ]
%50 = tail call i64 (...) @omp_get_team_num()
%51 = uitofp i64 %50 to double
%52 = tail call i64 (...) @omp_get_team_num()
%53 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %52
%54 = load double, double* %53
%55 = fadd double %54, %51
store double %55, double* %53
%56 = icmp sgt i32 %49, 0
br i1 %56, label %57, label %59
57: ; preds = %48
%58 = zext i32 %49 to i64
br label %67
59: ; preds = %77, %48
%60 = phi i32 [ %41, %48 ], [ %78, %77 ]
%61 = icmp eq i32 %60, 0
%62 = select i1 %61, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0)
%63 = tail call i32 @puts(i8* dereferenceable(1) %62)
%64 = tail call i64 (...) @omp_is_initial_device()
%65 = tail call i64 (...) @omp_get_team_num()
%66 = icmp eq i64 %65, 0
br i1 %66, label %81, label %83
67: ; preds = %57, %77
%68 = phi i64 [ 0, %57 ], [ %79, %77 ]
%69 = phi i32 [ %41, %57 ], [ %78, %77 ]
%70 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %68
%71 = load double, double* %70
%72 = trunc i64 %68 to i32
%73 = sitofp i32 %72 to double
%74 = fcmp une double %71, %73
br i1 %74, label %75, label %77
75: ; preds = %67
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %72, double %73, double %71)
br label %77
77: ; preds = %67, %75
%78 = phi i32 [ 1, %75 ], [ %69, %67 ]
%79 = add nuw nsw i64 %68, 1
%80 = icmp eq i64 %79, %58
br i1 %80, label %59, label %67
81: ; preds = %59
%82 = tail call i32 (...) @omp_get_num_teams()
br label %83
83: ; preds = %81, %59
%84 = phi i32 [ %82, %81 ], [ %49, %59 ]
%85 = tail call i64 (...) @omp_get_team_num()
%86 = uitofp i64 %85 to double
%87 = tail call i64 (...) @omp_get_team_num()
%88 = getelementptr inbounds double, double* %4, i64 %87
%89 = load double, double* %88
%90 = fadd double %89, %86
store double %90, double* %88
%91 = icmp sgt i32 %84, 0
br i1 %91, label %92, label %94
92: ; preds = %83
%93 = zext i32 %84 to i64
br label %108
94: ; preds = %118, %83
%95 = phi i32 [ %60, %83 ], [ %119, %118 ]
%96 = icmp eq i32 %95, 0
%97 = select i1 %96, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0)
%98 = tail call i32 @puts(i8* dereferenceable(1) %97)
%99 = tail call i64 (...) @omp_is_initial_device()
%100 = icmp eq i64 %99, 0
%101 = tail call i64 (...) @omp_get_team_num()
%102 = uitofp i64 %101 to double
%103 = tail call i64 (...) @omp_get_team_num()
%104 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %103
%105 = load double, double* %104
%106 = fadd double %105, %102
store double %106, double* %104
%107 = select i1 %100, i64 512, i64 128
br label %122
108: ; preds = %92, %118
%109 = phi i64 [ 0, %92 ], [ %120, %118 ]
%110 = phi i32 [ %60, %92 ], [ %119, %118 ]
%111 = getelementptr inbounds double, double* %4, i64 %109
%112 = load double, double* %111
%113 = trunc i64 %109 to i32
%114 = sitofp i32 %113 to double
%115 = fcmp une double %112, %114
br i1 %115, label %116, label %118
116: ; preds = %108
%117 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %113, double %114, double %112)
br label %118
118: ; preds = %108, %116
%119 = phi i32 [ 1, %116 ], [ %110, %108 ]
%120 = add nuw nsw i64 %109, 1
%121 = icmp eq i64 %120, %93
br i1 %121, label %94, label %108
122: ; preds = %138, %94
%123 = phi i64 [ %141, %138 ], [ 0, %94 ]
%124 = phi i32 [ 1, %138 ], [ %95, %94 ]
br label %128
125: ; preds = %135
%126 = icmp eq i32 %124, 0
%127 = select i1 %126, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0)
br label %143
128: ; preds = %122, %135
%129 = phi i64 [ %136, %135 ], [ %123, %122 ]
%130 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %129
%131 = load double, double* %130
%132 = trunc i64 %129 to i32
%133 = sitofp i32 %132 to double
%134 = fcmp une double %131, %133
br i1 %134, label %138, label %135
135: ; preds = %128
%136 = add nuw nsw i64 %129, 1
%137 = icmp eq i64 %136, %107
br i1 %137, label %125, label %128
138: ; preds = %128
%139 = trunc i64 %129 to i32
%140 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %139, double %133, double %131)
%141 = add nuw nsw i64 %129, 1
%142 = icmp eq i64 %141, %107
br i1 %142, label %143, label %122
143: ; preds = %138, %125
%144 = phi i8* [ %127, %125 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0), %138 ]
%145 = tail call i32 @puts(i8* dereferenceable(1) %144)
%146 = tail call i64 (...) @omp_is_initial_device()
%147 = icmp eq i64 %146, 0
%148 = tail call i32 (...) @omp_get_thread_num()
%149 = sitofp i32 %148 to double
%150 = sext i32 %148 to i64
%151 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %150
%152 = load double, double* %151
%153 = fadd double %152, %149
store double %153, double* %151
%154 = select i1 %147, i64 256, i64 128
br label %155
155: ; preds = %168, %143
%156 = phi i64 [ %171, %168 ], [ 0, %143 ]
%157 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0), %168 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @str.9, i64 0, i64 0), %143 ]
br label %158
158: ; preds = %155, %165
%159 = phi i64 [ %166, %165 ], [ %156, %155 ]
%160 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %159
%161 = load double, double* %160
%162 = trunc i64 %159 to i32
%163 = sitofp i32 %162 to double
%164 = fcmp une double %161, %163
br i1 %164, label %168, label %165
165: ; preds = %158
%166 = add nuw nsw i64 %159, 1
%167 = icmp eq i64 %166, %154
br i1 %167, label %173, label %158
168: ; preds = %158
%169 = trunc i64 %159 to i32
%170 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %169, double %163, double %161)
%171 = add nuw nsw i64 %159, 1
%172 = icmp eq i64 %171, %154
br i1 %172, label %173, label %155
173: ; preds = %168, %165
%174 = phi i8* [ %157, %165 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0), %168 ]
%175 = tail call i32 @puts(i8* dereferenceable(1) %174)
%176 = tail call i64 (...) @omp_is_initial_device()
%177 = icmp eq i64 %176, 0
%178 = tail call i64 (...) @omp_get_team_num()
%179 = and i64 %178, 1
%180 = icmp eq i64 %179, 0
%181 = tail call i64 (...) @omp_get_team_num()
%182 = shl i64 %181, 32
%183 = ashr exact i64 %182, 32
%184 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %183
%185 = select i1 %180, double 1.000000e+00, double 2.000000e+00
%186 = load double, double* %184
%187 = fadd double %186, %185
store double %187, double* %184
%188 = select i1 %177, i64 512, i64 128
br label %203
189: ; preds = %218
%190 = icmp eq i32 %219, 0
%191 = select i1 %190, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0)
%192 = tail call i32 @puts(i8* dereferenceable(1) %191)
%193 = tail call i64 (...) @omp_is_initial_device()
%194 = icmp eq i64 %193, 0
%195 = tail call i64 (...) @omp_get_team_num()
%196 = trunc i64 %195 to i32
%197 = sitofp i32 %196 to double
%198 = tail call i64 (...) @omp_get_team_num()
%199 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %198
%200 = load double, double* %199
%201 = fadd double %200, %197
store double %201, double* %199
%202 = select i1 %194, i64 256, i64 128
br label %222
203: ; preds = %173, %218
%204 = phi i64 [ 0, %173 ], [ %220, %218 ]
%205 = phi i32 [ 0, %173 ], [ %219, %218 ]
%206 = trunc i64 %204 to i32
%207 = and i32 %206, 1
%208 = icmp eq i32 %207, 0
%209 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %204
%210 = load double, double* %209
br i1 %208, label %211, label %213
211: ; preds = %203
%212 = fcmp une double %210, 1.000000e+00
br i1 %212, label %215, label %218
213: ; preds = %203
%214 = fcmp une double %210, 2.000000e+00
br i1 %214, label %215, label %218
215: ; preds = %213, %211
%216 = phi double [ 1.000000e+00, %211 ], [ 2.000000e+00, %213 ]
%217 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %206, double %216, double %210)
br label %218
218: ; preds = %215, %211, %213
%219 = phi i32 [ %205, %211 ], [ %205, %213 ], [ 1, %215 ]
%220 = add nuw nsw i64 %204, 1
%221 = icmp eq i64 %220, %188
br i1 %221, label %189, label %203
222: ; preds = %235, %189
%223 = phi i64 [ %238, %235 ], [ 0, %189 ]
%224 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0), %235 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @str.9, i64 0, i64 0), %189 ]
br label %225
225: ; preds = %222, %232
%226 = phi i64 [ %233, %232 ], [ %223, %222 ]
%227 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %226
%228 = load double, double* %227
%229 = trunc i64 %226 to i32
%230 = sitofp i32 %229 to double
%231 = fcmp une double %228, %230
br i1 %231, label %235, label %232
232: ; preds = %225
%233 = add nuw nsw i64 %226, 1
%234 = icmp eq i64 %233, %202
br i1 %234, label %240, label %225
235: ; preds = %225
%236 = trunc i64 %226 to i32
%237 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %236, double %230, double %228)
%238 = add nuw nsw i64 %226, 1
%239 = icmp eq i64 %238, %202
br i1 %239, label %240, label %222
240: ; preds = %235, %232
%241 = phi i8* [ %224, %232 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0), %235 ]
%242 = tail call i32 @puts(i8* dereferenceable(1) %241)
%243 = tail call i64 (...) @omp_is_initial_device()
%244 = icmp eq i64 %243, 0
%245 = tail call i64 (...) @omp_get_team_num()
%246 = trunc i64 %245 to i32
%247 = add i32 %246, 10
%248 = sitofp i32 %247 to double
%249 = tail call i64 (...) @omp_get_team_num()
%250 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %249
%251 = load double, double* %250
%252 = fadd double %251, %248
store double %252, double* %250
%253 = select i1 %244, i64 256, i64 128
br label %254
254: ; preds = %268, %240
%255 = phi i64 [ %271, %268 ], [ 0, %240 ]
%256 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0), %268 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @str.9, i64 0, i64 0), %240 ]
br label %257
257: ; preds = %254, %265
%258 = phi i64 [ %266, %265 ], [ %255, %254 ]
%259 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %258
%260 = load double, double* %259
%261 = trunc i64 %258 to i32
%262 = add i32 %261, 10
%263 = sitofp i32 %262 to double
%264 = fcmp une double %260, %263
br i1 %264, label %268, label %265
265: ; preds = %257
%266 = add nuw nsw i64 %258, 1
%267 = icmp eq i64 %266, %253
br i1 %267, label %273, label %257
268: ; preds = %257
%269 = trunc i64 %258 to i32
%270 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %269, double %263, double %260)
%271 = add nuw nsw i64 %258, 1
%272 = icmp eq i64 %271, %253
br i1 %272, label %273, label %254
273: ; preds = %268, %265
%274 = phi i8* [ %256, %265 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.17, i64 0, i64 0), %268 ]
%275 = tail call i32 @puts(i8* dereferenceable(1) %274)
ret i32 0
}