#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*/ foo();
void test_collapse() {
  int i;
#pragma omp target teams distribute parallel for simd collapse
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse()
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(,
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(, )
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse 4)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(4
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(4,
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(4, )
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(4)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(4 4)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(4, , 4)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(4)
  for (int i1 = 0; i1 < 16; ++i1)
    for (int i2 = 0; i2 < 16; ++i2)
      for (int i3 = 0; i3 < 16; ++i3)
        for (int i4 = 0; i4 < 16; ++i4)
          foo();
#pragma omp target teams distribute parallel for simd collapse(4, 8)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(2.5)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(foo())
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(-5)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(0)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(5 - 5)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target teams distribute parallel for simd collapse(2)              \
    firstprivate(i)
  for (i = 0; i < 16; ++i)
    for (int j = 0; j < 16; ++j)
#pragma omp parallel for reduction(+ : i, j)
      for (int k = 0; k < 16; ++k)
        i += j;
}


x86 assembly (clang, -O0):
<test_collapse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    113c <test_collapse+0x2c>
jmp    112e <test_collapse+0x1e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <test_collapse+0xf>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1160 <test_collapse+0x50>
jmp    1152 <test_collapse+0x42>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <test_collapse+0x33>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1184 <test_collapse+0x74>
jmp    1176 <test_collapse+0x66>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <test_collapse+0x57>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    11a8 <test_collapse+0x98>
jmp    119a <test_collapse+0x8a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    118b <test_collapse+0x7b>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    11cc <test_collapse+0xbc>
jmp    11be <test_collapse+0xae>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11af <test_collapse+0x9f>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    11f0 <test_collapse+0xe0>
jmp    11e2 <test_collapse+0xd2>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11d3 <test_collapse+0xc3>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1214 <test_collapse+0x104>
jmp    1206 <test_collapse+0xf6>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11f7 <test_collapse+0xe7>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1238 <test_collapse+0x128>
jmp    122a <test_collapse+0x11a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    121b <test_collapse+0x10b>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    125c <test_collapse+0x14c>
jmp    124e <test_collapse+0x13e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    123f <test_collapse+0x12f>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1280 <test_collapse+0x170>
jmp    1272 <test_collapse+0x162>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1263 <test_collapse+0x153>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    12a4 <test_collapse+0x194>
jmp    1296 <test_collapse+0x186>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1287 <test_collapse+0x177>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    12c8 <test_collapse+0x1b8>
jmp    12ba <test_collapse+0x1aa>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    12ab <test_collapse+0x19b>
movl   $0x0,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jge    135a <test_collapse+0x24a>
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    1347 <test_collapse+0x237>
movl   $0x0,-0x10(%rbp)
cmpl   $0x10,-0x10(%rbp)
jge    1334 <test_collapse+0x224>
movl   $0x0,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jge    1321 <test_collapse+0x211>
mov    $0x0,%al
call   1030 <foo@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1302 <test_collapse+0x1f2>
jmp    1326 <test_collapse+0x216>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12f1 <test_collapse+0x1e1>
jmp    1339 <test_collapse+0x229>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12e0 <test_collapse+0x1d0>
jmp    134c <test_collapse+0x23c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12cf <test_collapse+0x1bf>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    137e <test_collapse+0x26e>
jmp    1370 <test_collapse+0x260>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1361 <test_collapse+0x251>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    13a2 <test_collapse+0x292>
jmp    1394 <test_collapse+0x284>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1385 <test_collapse+0x275>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    13c6 <test_collapse+0x2b6>
jmp    13b8 <test_collapse+0x2a8>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    13a9 <test_collapse+0x299>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    13ea <test_collapse+0x2da>
jmp    13dc <test_collapse+0x2cc>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    13cd <test_collapse+0x2bd>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    140e <test_collapse+0x2fe>
jmp    1400 <test_collapse+0x2f0>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    13f1 <test_collapse+0x2e1>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1432 <test_collapse+0x322>
jmp    1424 <test_collapse+0x314>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1415 <test_collapse+0x305>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    14a2 <test_collapse+0x392>
movl   $0x0,-0x18(%rbp)
cmpl   $0x10,-0x18(%rbp)
jge    148f <test_collapse+0x37f>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x10,-0x1c(%rbp)
jge    147c <test_collapse+0x36c>
mov    -0x18(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    145b <test_collapse+0x34b>
jmp    1481 <test_collapse+0x371>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    144a <test_collapse+0x33a>
jmp    1494 <test_collapse+0x384>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1439 <test_collapse+0x329>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_collapse>:
push   %rbp
push   %r14
push   %rbx
xor    %r14d,%r14d
nopw   0x0(%rax,%rax,1)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x10,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
add    $0xffffffff,%ebx
jne    1140 <test_collapse+0x30>
add    $0x1,%ebp
cmp    $0x10,%ebp
jne    1130 <test_collapse+0x20>
add    $0x1,%r14d
cmp    $0x10,%r14d
jne    1120 <test_collapse+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @test_collapse() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
br label %8
8: ; preds = %12, %0
%9 = load i32, i32* %1
%10 = icmp slt i32 %9, 16
br i1 %10, label %11, label %15
11: ; preds = %8
br label %12
12: ; preds = %11
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %8
15: ; preds = %8
store i32 0, i32* %1
br label %16
16: ; preds = %20, %15
%17 = load i32, i32* %1
%18 = icmp slt i32 %17, 16
br i1 %18, label %19, label %23
19: ; preds = %16
br label %20
20: ; preds = %19
%21 = load i32, i32* %1
%22 = add nsw i32 %21, 1
store i32 %22, i32* %1
br label %16
23: ; preds = %16
store i32 0, i32* %1
br label %24
24: ; preds = %28, %23
%25 = load i32, i32* %1
%26 = icmp slt i32 %25, 16
br i1 %26, label %27, label %31
27: ; preds = %24
br label %28
28: ; preds = %27
%29 = load i32, i32* %1
%30 = add nsw i32 %29, 1
store i32 %30, i32* %1
br label %24
31: ; preds = %24
store i32 0, i32* %1
br label %32
32: ; preds = %36, %31
%33 = load i32, i32* %1
%34 = icmp slt i32 %33, 16
br i1 %34, label %35, label %39
35: ; preds = %32
br label %36
36: ; preds = %35
%37 = load i32, i32* %1
%38 = add nsw i32 %37, 1
store i32 %38, i32* %1
br label %32
39: ; preds = %32
store i32 0, i32* %1
br label %40
40: ; preds = %44, %39
%41 = load i32, i32* %1
%42 = icmp slt i32 %41, 16
br i1 %42, label %43, label %47
43: ; preds = %40
br label %44
44: ; preds = %43
%45 = load i32, i32* %1
%46 = add nsw i32 %45, 1
store i32 %46, i32* %1
br label %40
47: ; preds = %40
store i32 0, i32* %1
br label %48
48: ; preds = %52, %47
%49 = load i32, i32* %1
%50 = icmp slt i32 %49, 16
br i1 %50, label %51, label %55
51: ; preds = %48
br label %52
52: ; preds = %51
%53 = load i32, i32* %1
%54 = add nsw i32 %53, 1
store i32 %54, i32* %1
br label %48
55: ; preds = %48
store i32 0, i32* %1
br label %56
56: ; preds = %60, %55
%57 = load i32, i32* %1
%58 = icmp slt i32 %57, 16
br i1 %58, label %59, label %63
59: ; preds = %56
br label %60
60: ; preds = %59
%61 = load i32, i32* %1
%62 = add nsw i32 %61, 1
store i32 %62, i32* %1
br label %56
63: ; preds = %56
store i32 0, i32* %1
br label %64
64: ; preds = %68, %63
%65 = load i32, i32* %1
%66 = icmp slt i32 %65, 16
br i1 %66, label %67, label %71
67: ; preds = %64
br label %68
68: ; preds = %67
%69 = load i32, i32* %1
%70 = add nsw i32 %69, 1
store i32 %70, i32* %1
br label %64
71: ; preds = %64
store i32 0, i32* %1
br label %72
72: ; preds = %76, %71
%73 = load i32, i32* %1
%74 = icmp slt i32 %73, 16
br i1 %74, label %75, label %79
75: ; preds = %72
br label %76
76: ; preds = %75
%77 = load i32, i32* %1
%78 = add nsw i32 %77, 1
store i32 %78, i32* %1
br label %72
79: ; preds = %72
store i32 0, i32* %1
br label %80
80: ; preds = %84, %79
%81 = load i32, i32* %1
%82 = icmp slt i32 %81, 16
br i1 %82, label %83, label %87
83: ; preds = %80
br label %84
84: ; preds = %83
%85 = load i32, i32* %1
%86 = add nsw i32 %85, 1
store i32 %86, i32* %1
br label %80
87: ; preds = %80
store i32 0, i32* %1
br label %88
88: ; preds = %92, %87
%89 = load i32, i32* %1
%90 = icmp slt i32 %89, 16
br i1 %90, label %91, label %95
91: ; preds = %88
br label %92
92: ; preds = %91
%93 = load i32, i32* %1
%94 = add nsw i32 %93, 1
store i32 %94, i32* %1
br label %88
95: ; preds = %88
store i32 0, i32* %1
br label %96
96: ; preds = %100, %95
%97 = load i32, i32* %1
%98 = icmp slt i32 %97, 16
br i1 %98, label %99, label %103
99: ; preds = %96
br label %100
100: ; preds = %99
%101 = load i32, i32* %1
%102 = add nsw i32 %101, 1
store i32 %102, i32* %1
br label %96
103: ; preds = %96
store i32 0, i32* %2
br label %104
104: ; preds = %133, %103
%105 = load i32, i32* %2
%106 = icmp slt i32 %105, 16
br i1 %106, label %107, label %136
107: ; preds = %104
store i32 0, i32* %3
br label %108
108: ; preds = %129, %107
%109 = load i32, i32* %3
%110 = icmp slt i32 %109, 16
br i1 %110, label %111, label %132
111: ; preds = %108
store i32 0, i32* %4
br label %112
112: ; preds = %125, %111
%113 = load i32, i32* %4
%114 = icmp slt i32 %113, 16
br i1 %114, label %115, label %128
115: ; preds = %112
store i32 0, i32* %5
br label %116
116: ; preds = %121, %115
%117 = load i32, i32* %5
%118 = icmp slt i32 %117, 16
br i1 %118, label %119, label %124
119: ; preds = %116
%120 = call i32 (...) @foo()
br label %121
121: ; preds = %119
%122 = load i32, i32* %5
%123 = add nsw i32 %122, 1
store i32 %123, i32* %5
br label %116
124: ; preds = %116
br label %125
125: ; preds = %124
%126 = load i32, i32* %4
%127 = add nsw i32 %126, 1
store i32 %127, i32* %4
br label %112
128: ; preds = %112
br label %129
129: ; preds = %128
%130 = load i32, i32* %3
%131 = add nsw i32 %130, 1
store i32 %131, i32* %3
br label %108
132: ; preds = %108
br label %133
133: ; preds = %132
%134 = load i32, i32* %2
%135 = add nsw i32 %134, 1
store i32 %135, i32* %2
br label %104
136: ; preds = %104
store i32 0, i32* %1
br label %137
137: ; preds = %141, %136
%138 = load i32, i32* %1
%139 = icmp slt i32 %138, 16
br i1 %139, label %140, label %144
140: ; preds = %137
br label %141
141: ; preds = %140
%142 = load i32, i32* %1
%143 = add nsw i32 %142, 1
store i32 %143, i32* %1
br label %137
144: ; preds = %137
store i32 0, i32* %1
br label %145
145: ; preds = %149, %144
%146 = load i32, i32* %1
%147 = icmp slt i32 %146, 16
br i1 %147, label %148, label %152
148: ; preds = %145
br label %149
149: ; preds = %148
%150 = load i32, i32* %1
%151 = add nsw i32 %150, 1
store i32 %151, i32* %1
br label %145
152: ; preds = %145
store i32 0, i32* %1
br label %153
153: ; preds = %157, %152
%154 = load i32, i32* %1
%155 = icmp slt i32 %154, 16
br i1 %155, label %156, label %160
156: ; preds = %153
br label %157
157: ; preds = %156
%158 = load i32, i32* %1
%159 = add nsw i32 %158, 1
store i32 %159, i32* %1
br label %153
160: ; preds = %153
store i32 0, i32* %1
br label %161
161: ; preds = %165, %160
%162 = load i32, i32* %1
%163 = icmp slt i32 %162, 16
br i1 %163, label %164, label %168
164: ; preds = %161
br label %165
165: ; preds = %164
%166 = load i32, i32* %1
%167 = add nsw i32 %166, 1
store i32 %167, i32* %1
br label %161
168: ; preds = %161
store i32 0, i32* %1
br label %169
169: ; preds = %173, %168
%170 = load i32, i32* %1
%171 = icmp slt i32 %170, 16
br i1 %171, label %172, label %176
172: ; preds = %169
br label %173
173: ; preds = %172
%174 = load i32, i32* %1
%175 = add nsw i32 %174, 1
store i32 %175, i32* %1
br label %169
176: ; preds = %169
store i32 0, i32* %1
br label %177
177: ; preds = %181, %176
%178 = load i32, i32* %1
%179 = icmp slt i32 %178, 16
br i1 %179, label %180, label %184
180: ; preds = %177
br label %181
181: ; preds = %180
%182 = load i32, i32* %1
%183 = add nsw i32 %182, 1
store i32 %183, i32* %1
br label %177
184: ; preds = %177
store i32 0, i32* %1
br label %185
185: ; preds = %208, %184
%186 = load i32, i32* %1
%187 = icmp slt i32 %186, 16
br i1 %187, label %188, label %211
188: ; preds = %185
store i32 0, i32* %6
br label %189
189: ; preds = %204, %188
%190 = load i32, i32* %6
%191 = icmp slt i32 %190, 16
br i1 %191, label %192, label %207
192: ; preds = %189
store i32 0, i32* %7
br label %193
193: ; preds = %200, %192
%194 = load i32, i32* %7
%195 = icmp slt i32 %194, 16
br i1 %195, label %196, label %203
196: ; preds = %193
%197 = load i32, i32* %6
%198 = load i32, i32* %1
%199 = add nsw i32 %198, %197
store i32 %199, i32* %1
br label %200
200: ; preds = %196
%201 = load i32, i32* %7
%202 = add nsw i32 %201, 1
store i32 %202, i32* %7
br label %193
203: ; preds = %193
br label %204
204: ; preds = %203
%205 = load i32, i32* %6
%206 = add nsw i32 %205, 1
store i32 %206, i32* %6
br label %189
207: ; preds = %189
br label %208
208: ; preds = %207
%209 = load i32, i32* %1
%210 = add nsw i32 %209, 1
store i32 %210, i32* %1
br label %185
211: ; preds = %185
ret void
}

LLVM IR (-O2):
define void @test_collapse() {
br label %1
1: ; preds = %0, %5
%2 = phi i32 [ %6, %5 ], [ 0, %0 ]
br label %3
3: ; preds = %1, %29
%4 = phi i32 [ 0, %1 ], [ %30, %29 ]
br label %9
5: ; preds = %29
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 16
br i1 %7, label %8, label %1
8: ; preds = %5
ret void
9: ; preds = %3, %9
%10 = phi i32 [ 0, %3 ], [ %27, %9 ]
%11 = tail call i32 (...) @foo()
%12 = tail call i32 (...) @foo()
%13 = tail call i32 (...) @foo()
%14 = tail call i32 (...) @foo()
%15 = tail call i32 (...) @foo()
%16 = tail call i32 (...) @foo()
%17 = tail call i32 (...) @foo()
%18 = tail call i32 (...) @foo()
%19 = tail call i32 (...) @foo()
%20 = tail call i32 (...) @foo()
%21 = tail call i32 (...) @foo()
%22 = tail call i32 (...) @foo()
%23 = tail call i32 (...) @foo()
%24 = tail call i32 (...) @foo()
%25 = tail call i32 (...) @foo()
%26 = tail call i32 (...) @foo()
%27 = add nuw nsw i32 %10, 1
%28 = icmp eq i32 %27, 16
br i1 %28, label %29, label %9
29: ; preds = %9
%30 = add nuw nsw i32 %4, 1
%31 = icmp eq i32 %30, 16
br i1 %31, label %5, label %3
}