#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();
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)];
  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;
  for (int t = 0; t < (1); t++) {
#pragma omp target
#pragma omp 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
#pragma omp 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
#pragma omp 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
#pragma omp 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 firstprivate(a)
#pragma omp 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");
  {
    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
#pragma omp 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");
  {
    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 firstprivate(a)
#pragma omp 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");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9bb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <check_offloading@plt>
movl   $0x0,-0x9b14(%rbp)
movl   $0x0,-0x9b18(%rbp)
cmpl   $0x3e0,-0x9b18(%rbp)
jge    11ed <main+0x9d>
movslq -0x9b18(%rbp),%rax
movsd  0xe64(%rip),%xmm0
movsd  %xmm0,-0x5d10(%rbp,%rax,8)
ff ff
cvtsi2sdl -0x9b18(%rbp),%xmm0
ff
movslq -0x9b18(%rbp),%rax
movsd  %xmm0,-0x7c10(%rbp,%rax,8)
ff ff
xor    %eax,%eax
sub    -0x9b18(%rbp),%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b18(%rbp),%rax
movsd  %xmm0,-0x9b10(%rbp,%rax,8)
ff ff
mov    -0x9b18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b18(%rbp)
jmp    117d <main+0x2d>
movl   $0x0,-0x9b1c(%rbp)
cmpl   $0x3e0,-0x9b1c(%rbp)
jge    122e <main+0xde>
movslq -0x9b1c(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b1c(%rbp)
jmp    11f7 <main+0xa7>
mov    $0x0,%al
call   1070 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x200,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b20(%rbp)
movl   $0x0,-0x9b24(%rbp)
cmpl   $0x1,-0x9b24(%rbp)
jge    12d1 <main+0x181>
xor    %eax,%eax
call   1060 <omp_get_team_num@plt>
movq   %rax,%xmm0
movaps 0xd97(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0xd9b(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x9b90(%rbp)
ff
mov    $0x0,%al
call   1060 <omp_get_team_num@plt>
movsd  -0x9b90(%rbp),%xmm0
ff
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b24(%rbp)
jmp    1259 <main+0x109>
movl   $0x0,-0x9b28(%rbp)
mov    -0x9b28(%rbp),%eax
cmp    -0x9b20(%rbp),%eax
jge    137a <main+0x22a>
movslq -0x9b28(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b28(%rbp),%eax
shl    $0x0,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    131f <main+0x1cf>
jp     131f <main+0x1cf>
jmp    1361 <main+0x211>
mov    -0x9b28(%rbp),%esi
cvtsi2sdl -0x9b28(%rbp),%xmm0
ff
movsd  0xccb(%rip),%xmm1
mulsd  %xmm1,%xmm0
movslq -0x9b28(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0xce0(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b14(%rbp)
jmp    1366 <main+0x216>
mov    -0x9b28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b28(%rbp)
jmp    12db <main+0x18b>
cmpl   $0x0,-0x9b14(%rbp)
je     139a <main+0x24a>
lea    0xcc1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13a8 <main+0x258>
lea    0xcb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b2c(%rbp)
cmpl   $0x3e0,-0x9b2c(%rbp)
jge    13e9 <main+0x299>
movslq -0x9b2c(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b2c(%rbp)
jmp    13b2 <main+0x262>
movl   $0x0,-0x9b14(%rbp)
mov    $0x0,%al
call   1070 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x100,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b30(%rbp)
movl   $0x0,-0x9b34(%rbp)
cmpl   $0x1,-0x9b34(%rbp)
jge    146d <main+0x31d>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x9b38(%rbp)
cvtsi2sdl -0x9b38(%rbp),%xmm0
ff
movslq -0x9b38(%rbp),%rax
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b34(%rbp)
jmp    141e <main+0x2ce>
movl   $0x0,-0x9b3c(%rbp)
mov    -0x9b3c(%rbp),%eax
cmp    -0x9b30(%rbp),%eax
jge    1516 <main+0x3c6>
movslq -0x9b3c(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b3c(%rbp),%eax
shl    $0x0,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    14bb <main+0x36b>
jp     14bb <main+0x36b>
jmp    14fd <main+0x3ad>
mov    -0x9b3c(%rbp),%esi
cvtsi2sdl -0x9b3c(%rbp),%xmm0
ff
movsd  0xb2f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movslq -0x9b3c(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0xb44(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b14(%rbp)
jmp    1502 <main+0x3b2>
mov    -0x9b3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b3c(%rbp)
jmp    1477 <main+0x327>
cmpl   $0x0,-0x9b14(%rbp)
je     1536 <main+0x3e6>
lea    0xb25(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1544 <main+0x3f4>
lea    0xb1a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b40(%rbp)
cmpl   $0x3e0,-0x9b40(%rbp)
jge    1585 <main+0x435>
movslq -0x9b40(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b40(%rbp)
jmp    154e <main+0x3fe>
movl   $0x0,-0x9b14(%rbp)
mov    $0x0,%al
call   1070 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x200,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b20(%rbp)
movl   $0x0,-0x9b44(%rbp)
cmpl   $0x1,-0x9b44(%rbp)
jge    1656 <main+0x506>
mov    $0x0,%al
call   1060 <omp_get_team_num@plt>
and    $0x1,%rax
cmp    $0x0,%rax
jne    160f <main+0x4bf>
mov    $0x0,%al
call   1060 <omp_get_team_num@plt>
mov    %eax,-0x9b48(%rbp)
movslq -0x9b48(%rbp),%rax
movsd  0xa08(%rip),%xmm0
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
jmp    163d <main+0x4ed>
mov    $0x0,%al
call   1060 <omp_get_team_num@plt>
mov    %eax,-0x9b4c(%rbp)
movslq -0x9b4c(%rbp),%rax
movsd  0x9dd(%rip),%xmm0
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
jmp    1642 <main+0x4f2>
mov    -0x9b44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b44(%rbp)
jmp    15ba <main+0x46a>
movl   $0x0,-0x9b50(%rbp)
mov    -0x9b50(%rbp),%eax
cmp    -0x9b20(%rbp),%eax
jge    1772 <main+0x622>
mov    -0x9b50(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    16f1 <main+0x5a1>
movslq -0x9b50(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  0x95f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    16b6 <main+0x566>
jp     16b6 <main+0x566>
jmp    16ec <main+0x59c>
mov    -0x9b50(%rbp),%esi
movslq -0x9b50(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x95d(%rip),%rdi
movsd  0x925(%rip),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b14(%rbp)
jmp    1759 <main+0x609>
movslq -0x9b50(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  0x8ff(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    171e <main+0x5ce>
jp     171e <main+0x5ce>
jmp    1754 <main+0x604>
mov    -0x9b50(%rbp),%esi
movslq -0x9b50(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x8f5(%rip),%rdi
movsd  0x8c5(%rip),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b14(%rbp)
jmp    1759 <main+0x609>
jmp    175e <main+0x60e>
mov    -0x9b50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b50(%rbp)
jmp    1660 <main+0x510>
cmpl   $0x0,-0x9b14(%rbp)
je     1792 <main+0x642>
lea    0x8c9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    17a0 <main+0x650>
lea    0x8be(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b54(%rbp)
cmpl   $0x3e0,-0x9b54(%rbp)
jge    17e1 <main+0x691>
movslq -0x9b54(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b54(%rbp)
jmp    17aa <main+0x65a>
movl   $0x0,-0x9b14(%rbp)
movl   $0xa,-0x9b58(%rbp)
mov    $0x0,%al
call   1070 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x100,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b20(%rbp)
movl   $0x0,-0x9b5c(%rbp)
cmpl   $0x1,-0x9b5c(%rbp)
jge    187f <main+0x72f>
mov    $0x0,%al
call   1060 <omp_get_team_num@plt>
mov    %eax,-0x9b58(%rbp)
cvtsi2sdl -0x9b58(%rbp),%xmm0
ff
movsd  %xmm0,-0x9b98(%rbp)
ff
mov    $0x0,%al
call   1060 <omp_get_team_num@plt>
movsd  -0x9b98(%rbp),%xmm0
ff
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b5c(%rbp)
jmp    1820 <main+0x6d0>
movl   $0x0,-0x9b60(%rbp)
mov    -0x9b60(%rbp),%eax
cmp    -0x9b20(%rbp),%eax
jge    1928 <main+0x7d8>
movslq -0x9b60(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b60(%rbp),%eax
shl    $0x0,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    18cd <main+0x77d>
jp     18cd <main+0x77d>
jmp    190f <main+0x7bf>
mov    -0x9b60(%rbp),%esi
cvtsi2sdl -0x9b60(%rbp),%xmm0
ff
movsd  0x71d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movslq -0x9b60(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x732(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b14(%rbp)
jmp    1914 <main+0x7c4>
mov    -0x9b60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b60(%rbp)
jmp    1889 <main+0x739>
cmpl   $0x0,-0x9b14(%rbp)
je     1948 <main+0x7f8>
lea    0x713(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1956 <main+0x806>
lea    0x708(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b64(%rbp)
cmpl   $0x3e0,-0x9b64(%rbp)
jge    1997 <main+0x847>
movslq -0x9b64(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b64(%rbp)
jmp    1960 <main+0x810>
movl   $0x0,-0x9b14(%rbp)
movl   $0xa,-0x9b58(%rbp)
mov    $0x0,%al
call   1070 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x100,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b20(%rbp)
movl   $0x0,-0x9b68(%rbp)
cmpl   $0x1,-0x9b68(%rbp)
jge    1a42 <main+0x8f2>
mov    $0x0,%al
call   1060 <omp_get_team_num@plt>
mov    %rax,%rcx
movslq -0x9b58(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x9b58(%rbp)
cvtsi2sdl -0x9b58(%rbp),%xmm0
ff
movsd  %xmm0,-0x9ba0(%rbp)
ff
mov    $0x0,%al
call   1060 <omp_get_team_num@plt>
movsd  -0x9ba0(%rbp),%xmm0
ff
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b68(%rbp)
jmp    19d6 <main+0x886>
movl   $0x0,-0x9b6c(%rbp)
mov    -0x9b6c(%rbp),%eax
cmp    -0x9b20(%rbp),%eax
jge    1aea <main+0x99a>
movslq -0x9b6c(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b6c(%rbp),%eax
shl    $0x0,%eax
add    $0xa,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    1a93 <main+0x943>
jp     1a93 <main+0x943>
jmp    1ad1 <main+0x981>
mov    -0x9b6c(%rbp),%esi
mov    -0x9b6c(%rbp),%eax
shl    $0x0,%eax
add    $0xa,%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b6c(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x570(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b14(%rbp)
jmp    1ad6 <main+0x986>
mov    -0x9b6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b6c(%rbp)
jmp    1a4c <main+0x8fc>
cmpl   $0x0,-0x9b14(%rbp)
je     1b0a <main+0x9ba>
lea    0x551(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1b18 <main+0x9c8>
lea    0x546(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b70(%rbp)
cmpl   $0x3e0,-0x9b70(%rbp)
jge    1b59 <main+0xa09>
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    1b22 <main+0x9d2>
movl   $0x0,-0x9b14(%rbp)
movl   $0xa,-0x9b58(%rbp)
mov    $0x0,%al
call   1070 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x100,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b20(%rbp)
movl   $0x0,-0x9b74(%rbp)
cmpl   $0x1,-0x9b74(%rbp)
jge    1c04 <main+0xab4>
mov    $0x0,%al
call   1060 <omp_get_team_num@plt>
mov    %rax,%rcx
movslq -0x9b58(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x9b58(%rbp)
cvtsi2sdl -0x9b58(%rbp),%xmm0
ff
movsd  %xmm0,-0x9ba8(%rbp)
ff
mov    $0x0,%al
call   1060 <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    -0x9b74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b74(%rbp)
jmp    1b98 <main+0xa48>
movl   $0x0,-0x9b78(%rbp)
mov    -0x9b78(%rbp),%eax
cmp    -0x9b20(%rbp),%eax
jge    1cac <main+0xb5c>
movslq -0x9b78(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b78(%rbp),%eax
shl    $0x0,%eax
add    $0xa,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    1c55 <main+0xb05>
jp     1c55 <main+0xb05>
jmp    1c93 <main+0xb43>
mov    -0x9b78(%rbp),%esi
mov    -0x9b78(%rbp),%eax
shl    $0x0,%eax
add    $0xa,%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b78(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x3ae(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b14(%rbp)
jmp    1c98 <main+0xb48>
mov    -0x9b78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b78(%rbp)
jmp    1c0e <main+0xabe>
cmpl   $0x0,-0x9b14(%rbp)
je     1ccc <main+0xb7c>
lea    0x38f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1cda <main+0xb8a>
lea    0x384(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x9b7c(%rbp)
cmpl   $0x3e0,-0x9b7c(%rbp)
jge    1d1b <main+0xbcb>
movslq -0x9b7c(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b7c(%rbp)
jmp    1ce4 <main+0xb94>
movl   $0x0,-0x9b14(%rbp)
movl   $0xa,-0x9b58(%rbp)
mov    $0x0,%al
call   1070 <omp_is_initial_device@plt>
mov    %rax,%rdx
mov    $0x100,%eax
mov    $0x80,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x9b20(%rbp)
movl   $0x0,-0x9b80(%rbp)
cmpl   $0x1,-0x9b80(%rbp)
jge    1db9 <main+0xc69>
mov    $0x0,%al
call   1060 <omp_get_team_num@plt>
mov    %eax,-0x9b58(%rbp)
cvtsi2sdl -0x9b58(%rbp),%xmm0
ff
movsd  %xmm0,-0x9bb0(%rbp)
ff
mov    $0x0,%al
call   1060 <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    -0x9b80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b80(%rbp)
jmp    1d5a <main+0xc0a>
movl   $0x0,-0x9b84(%rbp)
mov    -0x9b84(%rbp),%eax
cmp    -0x9b20(%rbp),%eax
jge    1e5b <main+0xd0b>
movslq -0x9b84(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b84(%rbp),%eax
shl    $0x0,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    1e07 <main+0xcb7>
jp     1e07 <main+0xcb7>
jmp    1e42 <main+0xcf2>
mov    -0x9b84(%rbp),%esi
mov    -0x9b84(%rbp),%eax
shl    $0x0,%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b84(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x1ff(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x9b14(%rbp)
jmp    1e47 <main+0xcf7>
mov    -0x9b84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b84(%rbp)
jmp    1dc3 <main+0xc73>
cmpl   $0x0,-0x9b14(%rbp)
je     1e7b <main+0xd2b>
lea    0x1e0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1e89 <main+0xd39>
lea    0x1d5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x9bb0,%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    %ebx,%ebx
xor    %eax,%eax
call   1070 <check_offloading@plt>
lea    0x10(%rsp),%rdi
mov    $0x1f00,%edx
xor    %esi,%esi
call   1060 <memset@plt>
xor    %eax,%eax
call   1090 <omp_is_initial_device@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1080 <omp_get_team_num@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1080 <omp_get_team_num@plt>
movq   %r15,%xmm0
punpckldq 0xe3d(%rip),%xmm0
test   %r14,%r14
subpd  0xe42(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
addsd  0x10(%rsp,%rax,8),%xmm1
movsd  %xmm1,0x10(%rsp,%rax,8)
mov    $0x200,%eax
mov    $0x80,%r12d
cmove  %rax,%r12
lea    -0x1(%r12),%rbp
lea    0xe5e(%rip),%rdi
lea    0xe38(%rip),%r14
lea    0xe5a(%rip),%r15
nop
movsd  0x10(%rsp,%rbx,8),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
ucomisd %xmm0,%xmm1
jne    1230 <main+0xc0>
jp     1230 <main+0xc0>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1210 <main+0xa0>
jmp    124e <main+0xde>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x2,%al
call   1050 <printf@plt>
lea    0x1(%rbx),%rax
mov    %r15,%rdi
cmp    %rbx,%rbp
mov    %rax,%rbx
jne    1210 <main+0xa0>
mov    %r15,%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   1090 <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),%r13
or     $0x7f,%r12
lea    0xdb5(%rip),%rdi
lea    0xd8f(%rip),%r14
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    12e0 <main+0x170>
jp     12e0 <main+0x170>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    12c0 <main+0x150>
jmp    12fe <main+0x18e>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x2,%al
call   1050 <printf@plt>
lea    0x1(%rbx),%rax
mov    %r15,%rdi
cmp    %rbx,%r12
mov    %rax,%rbx
jne    12c0 <main+0x150>
mov    %r15,%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   1090 <omp_is_initial_device@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1080 <omp_get_team_num@plt>
xor    %ebp,%ebp
test   $0x1,%al
sete   %bpl
xor    %eax,%eax
call   1080 <omp_get_team_num@plt>
test   %r14,%r14
cltq
movsd  0x10(%rsp,%rax,8),%xmm0
lea    0xcd8(%rip),%rcx
addsd  (%rcx,%rbp,8),%xmm0
movsd  %xmm0,0x10(%rsp,%rax,8)
mov    $0x200,%eax
mov    $0x80,%r15d
cmove  %rax,%r15
lea    0xcd7(%rip),%r14
xor    %eax,%eax
jmp    1379 <main+0x209>
nopl   (%rax)
add    $0x1,%rbx
cmp    %rbx,%r15
je     13b3 <main+0x243>
movsd  0x10(%rsp,%rbx,8),%xmm1
test   $0x1,%bl
jne    1390 <main+0x220>
movsd  0xcac(%rip),%xmm0
jmp    1398 <main+0x228>
xchg   %ax,%ax
movsd  0xc98(%rip),%xmm0
ucomisd %xmm0,%xmm1
jne    13a0 <main+0x230>
jnp    1370 <main+0x200>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x2,%al
call   1050 <printf@plt>
mov    $0x1,%eax
jmp    1370 <main+0x200>
test   %eax,%eax
lea    0xca3(%rip),%r14
lea    0xca6(%rip),%r12
mov    %r12,%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   1090 <omp_is_initial_device@plt>
xor    %r13d,%r13d
test   %rax,%rax
sete   %r13b
xor    %eax,%eax
call   1080 <omp_get_team_num@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1080 <omp_get_team_num@plt>
movsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsp,%rax,8)
shl    $0x7,%r13
lea    0x80(%r13),%rbp
or     $0x7f,%r13
lea    0xc0a(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
movsd  0x10(%rsp,%rbx,8),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
ucomisd %xmm0,%xmm1
jne    1460 <main+0x2f0>
jp     1460 <main+0x2f0>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1440 <main+0x2d0>
jmp    147e <main+0x30e>
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x2,%al
call   1050 <printf@plt>
lea    0x1(%rbx),%rax
mov    %r12,%r14
cmp    %rbx,%r13
mov    %rax,%rbx
jne    1440 <main+0x2d0>
mov    %r12,%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   1090 <omp_is_initial_device@plt>
xor    %r15d,%r15d
test   %rax,%rax
setne  %r15b
xor    %eax,%eax
call   1080 <omp_get_team_num@plt>
add    $0xa,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1080 <omp_get_team_num@plt>
movsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsp,%rax,8)
shl    $0x7,%r15d
or     $0xffffffffffffff00,%r15
lea    0xb73(%rip),%rdi
lea    0xb4d(%rip),%r14
add    $0x1,%rbx
nopw   0x0(%rax,%rax,1)
movsd  0x8(%rsp,%rbx,8),%xmm1
lea    0x9(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd %xmm0,%xmm1
jne    1530 <main+0x3c0>
jp     1530 <main+0x3c0>
lea    (%r15,%rbx,1),%rax
add    $0x1,%rax
add    $0x1,%rbx
cmp    $0x1,%rax
jne    1500 <main+0x390>
jmp    154b <main+0x3db>
nopl   0x0(%rax)
lea    -0x1(%rbx),%esi
mov    %r14,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    %r15,%rax
mov    %r12,%rdi
add    %rbx,%rax
jne    14f3 <main+0x383>
mov    %r12,%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   1090 <omp_is_initial_device@plt>
xor    %r15d,%r15d
test   %rax,%rax
setne  %r15b
xor    %eax,%eax
call   1080 <omp_get_team_num@plt>
add    $0xa,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1080 <omp_get_team_num@plt>
movsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsp,%rax,8)
shl    $0x7,%r15d
or     $0xffffffffffffff00,%r15
lea    0xaa9(%rip),%rdi
lea    0xa83(%rip),%r14
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x8(%rsp,%rbx,8),%xmm1
lea    0x9(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd %xmm0,%xmm1
jne    1600 <main+0x490>
jp     1600 <main+0x490>
lea    (%r15,%rbx,1),%rax
add    $0x1,%rax
add    $0x1,%rbx
cmp    $0x1,%rax
jne    15d0 <main+0x460>
jmp    161b <main+0x4ab>
nopl   0x0(%rax)
lea    -0x1(%rbx),%esi
mov    %r14,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    %r15,%rax
mov    %r12,%rdi
add    %rbx,%rax
jne    15bd <main+0x44d>
mov    %r12,%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   1090 <omp_is_initial_device@plt>
xor    %r15d,%r15d
test   %rax,%rax
sete   %r15b
xor    %eax,%eax
call   1080 <omp_get_team_num@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1080 <omp_get_team_num@plt>
movsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsp,%rax,8)
shl    $0x7,%r15
lea    0x80(%r15),%rbp
or     $0x7f,%r15
lea    0x9d8(%rip),%rdi
lea    0x9b2(%rip),%r14
xchg   %ax,%ax
movsd  0x10(%rsp,%rbx,8),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
ucomisd %xmm0,%xmm1
jne    16b0 <main+0x540>
jp     16b0 <main+0x540>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1690 <main+0x520>
jmp    16ce <main+0x55e>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x2,%al
call   1050 <printf@plt>
lea    0x1(%rbx),%rax
mov    %r12,%rdi
cmp    %rbx,%r15
mov    %rax,%rbx
jne    1690 <main+0x520>
mov    %r12,%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 i32
%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
store i32 0, i32* %1
%36 = call i32 (...) @check_offloading()
store i32 0, i32* %7
store i32 0, i32* %8
br label %37
37: ; preds = %55, %0
%38 = load i32, i32* %8
%39 = icmp slt i32 %38, 992
br i1 %39, label %40, label %58
40: ; preds = %37
%41 = load i32, i32* %8
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [992 x double], [992 x double]* %4, i64 0, i64 %42
store double 1.000000e+00, double* %43
%44 = load i32, i32* %8
%45 = sitofp i32 %44 to double
%46 = load i32, i32* %8
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [992 x double], [992 x double]* %5, i64 0, i64 %47
store double %45, double* %48
%49 = load i32, i32* %8
%50 = sub nsw i32 0, %49
%51 = sitofp i32 %50 to double
%52 = load i32, i32* %8
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [992 x double], [992 x double]* %6, i64 0, i64 %53
store double %51, double* %54
br label %55
55: ; preds = %40
%56 = load i32, i32* %8
%57 = add nsw i32 %56, 1
store i32 %57, i32* %8
br label %37
58: ; preds = %37
store i32 0, i32* %9
br label %59
59: ; preds = %66, %58
%60 = load i32, i32* %9
%61 = icmp slt i32 %60, 992
br i1 %61, label %62, label %69
62: ; preds = %59
%63 = load i32, i32* %9
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %64
store double 0.000000e+00, double* %65
br label %66
66: ; preds = %62
%67 = load i32, i32* %9
%68 = add nsw i32 %67, 1
store i32 %68, i32* %9
br label %59
69: ; preds = %59
%70 = call i64 (...) @omp_is_initial_device()
%71 = icmp ne i64 %70, 0
%72 = zext i1 %71 to i64
%73 = select i1 %71, i32 128, i32 512
store i32 %73, i32* %10
store i32 0, i32* %11
br label %74
74: ; preds = %84, %69
%75 = load i32, i32* %11
%76 = icmp slt i32 %75, 1
br i1 %76, label %77, label %87
77: ; preds = %74
%78 = call i64 (...) @omp_get_team_num()
%79 = uitofp i64 %78 to double
%80 = call i64 (...) @omp_get_team_num()
%81 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %80
%82 = load double, double* %81
%83 = fadd double %82, %79
store double %83, double* %81
br label %84
84: ; preds = %77
%85 = load i32, i32* %11
%86 = add nsw i32 %85, 1
store i32 %86, i32* %11
br label %74
87: ; preds = %74
store i32 0, i32* %12
br label %88
88: ; preds = %112, %87
%89 = load i32, i32* %12
%90 = load i32, i32* %10
%91 = icmp slt i32 %89, %90
br i1 %91, label %92, label %115
92: ; preds = %88
%93 = load i32, i32* %12
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %94
%96 = load double, double* %95
%97 = load i32, i32* %12
%98 = mul nsw i32 %97, 1
%99 = sitofp i32 %98 to double
%100 = fcmp une double %96, %99
br i1 %100, label %101, label %111
101: ; preds = %92
%102 = load i32, i32* %12
%103 = load i32, i32* %12
%104 = sitofp i32 %103 to double
%105 = fmul double %104, 1.000000e+00
%106 = load i32, i32* %12
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %107
%109 = load double, double* %108
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %102, double %105, double %109)
store i32 1, i32* %7
br label %111
111: ; preds = %101, %92
br label %112
112: ; preds = %111
%113 = load i32, i32* %12
%114 = add nsw i32 %113, 1
store i32 %114, i32* %12
br label %88
115: ; preds = %88
%116 = load i32, i32* %7
%117 = icmp ne i32 %116, 0
br i1 %117, label %118, label %120
118: ; preds = %115
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %122
120: ; preds = %115
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %122
122: ; preds = %120, %118
store i32 0, i32* %13
br label %123
123: ; preds = %130, %122
%124 = load i32, i32* %13
%125 = icmp slt i32 %124, 992
br i1 %125, label %126, label %133
126: ; preds = %123
%127 = load i32, i32* %13
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %128
store double 0.000000e+00, double* %129
br label %130
130: ; preds = %126
%131 = load i32, i32* %13
%132 = add nsw i32 %131, 1
store i32 %132, i32* %13
br label %123
133: ; preds = %123
store i32 0, i32* %7
%134 = call i64 (...) @omp_is_initial_device()
%135 = icmp ne i64 %134, 0
%136 = zext i1 %135 to i64
%137 = select i1 %135, i32 128, i32 256
store i32 %137, i32* %14
store i32 0, i32* %15
br label %138
138: ; preds = %150, %133
%139 = load i32, i32* %15
%140 = icmp slt i32 %139, 1
br i1 %140, label %141, label %153
141: ; preds = %138
%142 = call i32 (...) @omp_get_thread_num()
store i32 %142, i32* %16
%143 = load i32, i32* %16
%144 = sitofp i32 %143 to double
%145 = load i32, i32* %16
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %146
%148 = load double, double* %147
%149 = fadd double %148, %144
store double %149, double* %147
br label %150
150: ; preds = %141
%151 = load i32, i32* %15
%152 = add nsw i32 %151, 1
store i32 %152, i32* %15
br label %138
153: ; preds = %138
store i32 0, i32* %17
br label %154
154: ; preds = %178, %153
%155 = load i32, i32* %17
%156 = load i32, i32* %14
%157 = icmp slt i32 %155, %156
br i1 %157, label %158, label %181
158: ; preds = %154
%159 = load i32, i32* %17
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %160
%162 = load double, double* %161
%163 = load i32, i32* %17
%164 = mul nsw i32 %163, 1
%165 = sitofp i32 %164 to double
%166 = fcmp une double %162, %165
br i1 %166, label %167, label %177
167: ; preds = %158
%168 = load i32, i32* %17
%169 = load i32, i32* %17
%170 = sitofp i32 %169 to double
%171 = fmul double %170, 1.000000e+00
%172 = load i32, i32* %17
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %173
%175 = load double, double* %174
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %168, double %171, double %175)
store i32 1, i32* %7
br label %177
177: ; preds = %167, %158
br label %178
178: ; preds = %177
%179 = load i32, i32* %17
%180 = add nsw i32 %179, 1
store i32 %180, i32* %17
br label %154
181: ; preds = %154
%182 = load i32, i32* %7
%183 = icmp ne i32 %182, 0
br i1 %183, label %184, label %186
184: ; preds = %181
%185 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %188
186: ; preds = %181
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %188
188: ; preds = %186, %184
store i32 0, i32* %18
br label %189
189: ; preds = %196, %188
%190 = load i32, i32* %18
%191 = icmp slt i32 %190, 992
br i1 %191, label %192, label %199
192: ; preds = %189
%193 = load i32, i32* %18
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %194
store double 0.000000e+00, double* %195
br label %196
196: ; preds = %192
%197 = load i32, i32* %18
%198 = add nsw i32 %197, 1
store i32 %198, i32* %18
br label %189
199: ; preds = %189
store i32 0, i32* %7
%200 = call i64 (...) @omp_is_initial_device()
%201 = icmp ne i64 %200, 0
%202 = zext i1 %201 to i64
%203 = select i1 %201, i32 128, i32 512
store i32 %203, i32* %10
store i32 0, i32* %19
br label %204
204: ; preds = %228, %199
%205 = load i32, i32* %19
%206 = icmp slt i32 %205, 1
br i1 %206, label %207, label %231
207: ; preds = %204
%208 = call i64 (...) @omp_get_team_num()
%209 = urem i64 %208, 2
%210 = icmp eq i64 %209, 0
br i1 %210, label %211, label %219
211: ; preds = %207
%212 = call i64 (...) @omp_get_team_num()
%213 = trunc i64 %212 to i32
store i32 %213, i32* %20
%214 = load i32, i32* %20
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %215
%217 = load double, double* %216
%218 = fadd double %217, 1.000000e+00
store double %218, double* %216
br label %227
219: ; preds = %207
%220 = call i64 (...) @omp_get_team_num()
%221 = trunc i64 %220 to i32
store i32 %221, i32* %21
%222 = load i32, i32* %21
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %223
%225 = load double, double* %224
%226 = fadd double %225, 2.000000e+00
store double %226, double* %224
br label %227
227: ; preds = %219, %211
br label %228
228: ; preds = %227
%229 = load i32, i32* %19
%230 = add nsw i32 %229, 1
store i32 %230, i32* %19
br label %204
231: ; preds = %204
store i32 0, i32* %22
br label %232
232: ; preds = %269, %231
%233 = load i32, i32* %22
%234 = load i32, i32* %10
%235 = icmp slt i32 %233, %234
br i1 %235, label %236, label %272
236: ; preds = %232
%237 = load i32, i32* %22
%238 = srem i32 %237, 2
%239 = icmp eq i32 %238, 0
br i1 %239, label %240, label %254
240: ; preds = %236
%241 = load i32, i32* %22
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %242
%244 = load double, double* %243
%245 = fcmp une double %244, 1.000000e+00
br i1 %245, label %246, label %253
246: ; preds = %240
%247 = load i32, i32* %22
%248 = load i32, i32* %22
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %249
%251 = load double, double* %250
%252 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %247, double 1.000000e+00, double %251)
store i32 1, i32* %7
br label %253
253: ; preds = %246, %240
br label %268
254: ; preds = %236
%255 = load i32, i32* %22
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %256
%258 = load double, double* %257
%259 = fcmp une double %258, 2.000000e+00
br i1 %259, label %260, label %267
260: ; preds = %254
%261 = load i32, i32* %22
%262 = load i32, i32* %22
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %263
%265 = load double, double* %264
%266 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %261, double 2.000000e+00, double %265)
store i32 1, i32* %7
br label %267
267: ; preds = %260, %254
br label %268
268: ; preds = %267, %253
br label %269
269: ; preds = %268
%270 = load i32, i32* %22
%271 = add nsw i32 %270, 1
store i32 %271, i32* %22
br label %232
272: ; preds = %232
%273 = load i32, i32* %7
%274 = icmp ne i32 %273, 0
br i1 %274, label %275, label %277
275: ; preds = %272
%276 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %279
277: ; preds = %272
%278 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %279
279: ; preds = %277, %275
store i32 0, i32* %23
br label %280
280: ; preds = %287, %279
%281 = load i32, i32* %23
%282 = icmp slt i32 %281, 992
br i1 %282, label %283, label %290
283: ; preds = %280
%284 = load i32, i32* %23
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %285
store double 0.000000e+00, double* %286
br label %287
287: ; preds = %283
%288 = load i32, i32* %23
%289 = add nsw i32 %288, 1
store i32 %289, i32* %23
br label %280
290: ; preds = %280
store i32 0, i32* %7
store i32 10, i32* %24
%291 = call i64 (...) @omp_is_initial_device()
%292 = icmp ne i64 %291, 0
%293 = zext i1 %292 to i64
%294 = select i1 %292, i32 128, i32 256
store i32 %294, i32* %10
store i32 0, i32* %25
br label %295
295: ; preds = %307, %290
%296 = load i32, i32* %25
%297 = icmp slt i32 %296, 1
br i1 %297, label %298, label %310
298: ; preds = %295
%299 = call i64 (...) @omp_get_team_num()
%300 = trunc i64 %299 to i32
store i32 %300, i32* %24
%301 = load i32, i32* %24
%302 = sitofp i32 %301 to double
%303 = call i64 (...) @omp_get_team_num()
%304 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %303
%305 = load double, double* %304
%306 = fadd double %305, %302
store double %306, double* %304
br label %307
307: ; preds = %298
%308 = load i32, i32* %25
%309 = add nsw i32 %308, 1
store i32 %309, i32* %25
br label %295
310: ; preds = %295
store i32 0, i32* %26
br label %311
311: ; preds = %335, %310
%312 = load i32, i32* %26
%313 = load i32, i32* %10
%314 = icmp slt i32 %312, %313
br i1 %314, label %315, label %338
315: ; preds = %311
%316 = load i32, i32* %26
%317 = sext i32 %316 to i64
%318 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %317
%319 = load double, double* %318
%320 = load i32, i32* %26
%321 = mul nsw i32 %320, 1
%322 = sitofp i32 %321 to double
%323 = fcmp une double %319, %322
br i1 %323, label %324, label %334
324: ; preds = %315
%325 = load i32, i32* %26
%326 = load i32, i32* %26
%327 = sitofp i32 %326 to double
%328 = fmul double %327, 1.000000e+00
%329 = load i32, i32* %26
%330 = sext i32 %329 to i64
%331 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %330
%332 = load double, double* %331
%333 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %325, double %328, double %332)
store i32 1, i32* %7
br label %334
334: ; preds = %324, %315
br label %335
335: ; preds = %334
%336 = load i32, i32* %26
%337 = add nsw i32 %336, 1
store i32 %337, i32* %26
br label %311
338: ; preds = %311
%339 = load i32, i32* %7
%340 = icmp ne i32 %339, 0
br i1 %340, label %341, label %343
341: ; preds = %338
%342 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %345
343: ; preds = %338
%344 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %345
345: ; preds = %343, %341
store i32 0, i32* %27
br label %346
346: ; preds = %353, %345
%347 = load i32, i32* %27
%348 = icmp slt i32 %347, 992
br i1 %348, label %349, label %356
349: ; preds = %346
%350 = load i32, i32* %27
%351 = sext i32 %350 to i64
%352 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %351
store double 0.000000e+00, double* %352
br label %353
353: ; preds = %349
%354 = load i32, i32* %27
%355 = add nsw i32 %354, 1
store i32 %355, i32* %27
br label %346
356: ; preds = %346
store i32 0, i32* %7
store i32 10, i32* %24
%357 = call i64 (...) @omp_is_initial_device()
%358 = icmp ne i64 %357, 0
%359 = zext i1 %358 to i64
%360 = select i1 %358, i32 128, i32 256
store i32 %360, i32* %10
store i32 0, i32* %28
br label %361
361: ; preds = %376, %356
%362 = load i32, i32* %28
%363 = icmp slt i32 %362, 1
br i1 %363, label %364, label %379
364: ; preds = %361
%365 = call i64 (...) @omp_get_team_num()
%366 = load i32, i32* %24
%367 = sext i32 %366 to i64
%368 = add i64 %367, %365
%369 = trunc i64 %368 to i32
store i32 %369, i32* %24
%370 = load i32, i32* %24
%371 = sitofp i32 %370 to double
%372 = call i64 (...) @omp_get_team_num()
%373 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %372
%374 = load double, double* %373
%375 = fadd double %374, %371
store double %375, double* %373
br label %376
376: ; preds = %364
%377 = load i32, i32* %28
%378 = add nsw i32 %377, 1
store i32 %378, i32* %28
br label %361
379: ; preds = %361
store i32 0, i32* %29
br label %380
380: ; preds = %406, %379
%381 = load i32, i32* %29
%382 = load i32, i32* %10
%383 = icmp slt i32 %381, %382
br i1 %383, label %384, label %409
384: ; preds = %380
%385 = load i32, i32* %29
%386 = sext i32 %385 to i64
%387 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %386
%388 = load double, double* %387
%389 = load i32, i32* %29
%390 = mul nsw i32 %389, 1
%391 = add nsw i32 10, %390
%392 = sitofp i32 %391 to double
%393 = fcmp une double %388, %392
br i1 %393, label %394, label %405
394: ; preds = %384
%395 = load i32, i32* %29
%396 = load i32, i32* %29
%397 = mul nsw i32 %396, 1
%398 = add nsw i32 10, %397
%399 = sitofp i32 %398 to double
%400 = load i32, i32* %29
%401 = sext i32 %400 to i64
%402 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %401
%403 = load double, double* %402
%404 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %395, double %399, double %403)
store i32 1, i32* %7
br label %405
405: ; preds = %394, %384
br label %406
406: ; preds = %405
%407 = load i32, i32* %29
%408 = add nsw i32 %407, 1
store i32 %408, i32* %29
br label %380
409: ; preds = %380
%410 = load i32, i32* %7
%411 = icmp ne i32 %410, 0
br i1 %411, label %412, label %414
412: ; preds = %409
%413 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %416
414: ; preds = %409
%415 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %416
416: ; preds = %414, %412
store i32 0, i32* %30
br label %417
417: ; preds = %424, %416
%418 = load i32, i32* %30
%419 = icmp slt i32 %418, 992
br i1 %419, label %420, label %427
420: ; preds = %417
%421 = load i32, i32* %30
%422 = sext i32 %421 to i64
%423 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %422
store double 0.000000e+00, double* %423
br label %424
424: ; preds = %420
%425 = load i32, i32* %30
%426 = add nsw i32 %425, 1
store i32 %426, i32* %30
br label %417
427: ; preds = %417
store i32 0, i32* %7
store i32 10, i32* %24
%428 = call i64 (...) @omp_is_initial_device()
%429 = icmp ne i64 %428, 0
%430 = zext i1 %429 to i64
%431 = select i1 %429, i32 128, i32 256
store i32 %431, i32* %10
store i32 0, i32* %31
br label %432
432: ; preds = %447, %427
%433 = load i32, i32* %31
%434 = icmp slt i32 %433, 1
br i1 %434, label %435, label %450
435: ; preds = %432
%436 = call i64 (...) @omp_get_team_num()
%437 = load i32, i32* %24
%438 = sext i32 %437 to i64
%439 = add i64 %438, %436
%440 = trunc i64 %439 to i32
store i32 %440, i32* %24
%441 = load i32, i32* %24
%442 = sitofp i32 %441 to double
%443 = call i64 (...) @omp_get_team_num()
%444 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %443
%445 = load double, double* %444
%446 = fadd double %445, %442
store double %446, double* %444
br label %447
447: ; preds = %435
%448 = load i32, i32* %31
%449 = add nsw i32 %448, 1
store i32 %449, i32* %31
br label %432
450: ; preds = %432
store i32 0, i32* %32
br label %451
451: ; preds = %477, %450
%452 = load i32, i32* %32
%453 = load i32, i32* %10
%454 = icmp slt i32 %452, %453
br i1 %454, label %455, label %480
455: ; preds = %451
%456 = load i32, i32* %32
%457 = sext i32 %456 to i64
%458 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %457
%459 = load double, double* %458
%460 = load i32, i32* %32
%461 = mul nsw i32 %460, 1
%462 = add nsw i32 10, %461
%463 = sitofp i32 %462 to double
%464 = fcmp une double %459, %463
br i1 %464, label %465, label %476
465: ; preds = %455
%466 = load i32, i32* %32
%467 = load i32, i32* %32
%468 = mul nsw i32 %467, 1
%469 = add nsw i32 10, %468
%470 = sitofp i32 %469 to double
%471 = load i32, i32* %32
%472 = sext i32 %471 to i64
%473 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %472
%474 = load double, double* %473
%475 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %466, double %470, double %474)
store i32 1, i32* %7
br label %476
476: ; preds = %465, %455
br label %477
477: ; preds = %476
%478 = load i32, i32* %32
%479 = add nsw i32 %478, 1
store i32 %479, i32* %32
br label %451
480: ; preds = %451
%481 = load i32, i32* %7
%482 = icmp ne i32 %481, 0
br i1 %482, label %483, label %485
483: ; preds = %480
%484 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %487
485: ; preds = %480
%486 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %487
487: ; preds = %485, %483
store i32 0, i32* %33
br label %488
488: ; preds = %495, %487
%489 = load i32, i32* %33
%490 = icmp slt i32 %489, 992
br i1 %490, label %491, label %498
491: ; preds = %488
%492 = load i32, i32* %33
%493 = sext i32 %492 to i64
%494 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %493
store double 0.000000e+00, double* %494
br label %495
495: ; preds = %491
%496 = load i32, i32* %33
%497 = add nsw i32 %496, 1
store i32 %497, i32* %33
br label %488
498: ; preds = %488
store i32 0, i32* %7
store i32 10, i32* %24
%499 = call i64 (...) @omp_is_initial_device()
%500 = icmp ne i64 %499, 0
%501 = zext i1 %500 to i64
%502 = select i1 %500, i32 128, i32 256
store i32 %502, i32* %10
store i32 0, i32* %34
br label %503
503: ; preds = %515, %498
%504 = load i32, i32* %34
%505 = icmp slt i32 %504, 1
br i1 %505, label %506, label %518
506: ; preds = %503
%507 = call i64 (...) @omp_get_team_num()
%508 = trunc i64 %507 to i32
store i32 %508, i32* %24
%509 = load i32, i32* %24
%510 = sitofp i32 %509 to double
%511 = call i64 (...) @omp_get_team_num()
%512 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %511
%513 = load double, double* %512
%514 = fadd double %513, %510
store double %514, double* %512
br label %515
515: ; preds = %506
%516 = load i32, i32* %34
%517 = add nsw i32 %516, 1
store i32 %517, i32* %34
br label %503
518: ; preds = %503
store i32 0, i32* %35
br label %519
519: ; preds = %543, %518
%520 = load i32, i32* %35
%521 = load i32, i32* %10
%522 = icmp slt i32 %520, %521
br i1 %522, label %523, label %546
523: ; preds = %519
%524 = load i32, i32* %35
%525 = sext i32 %524 to i64
%526 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %525
%527 = load double, double* %526
%528 = load i32, i32* %35
%529 = mul nsw i32 %528, 1
%530 = sitofp i32 %529 to double
%531 = fcmp une double %527, %530
br i1 %531, label %532, label %542
532: ; preds = %523
%533 = load i32, i32* %35
%534 = load i32, i32* %35
%535 = mul nsw i32 %534, 1
%536 = sitofp i32 %535 to double
%537 = load i32, i32* %35
%538 = sext i32 %537 to i64
%539 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %538
%540 = load double, double* %539
%541 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %533, double %536, double %540)
store i32 1, i32* %7
br label %542
542: ; preds = %532, %523
br label %543
543: ; preds = %542
%544 = load i32, i32* %35
%545 = add nsw i32 %544, 1
store i32 %545, i32* %35
br label %519
546: ; preds = %519
%547 = load i32, i32* %7
%548 = icmp ne i32 %547, 0
br i1 %548, label %549, label %551
549: ; preds = %546
%550 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %553
551: ; preds = %546
%552 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %553
553: ; preds = %551, %549
ret i32 0
}

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