void f(int i) {
  switch (i) {
  case 1: {
    int j;
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 10;
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int k = 9;
    k++;
    {
      int j = 10;
      j++;
    }
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int k = 9;
    k++;
    {
      int j = 10;
      j++;
      { bar(1); }
    }
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    __attribute__((fallthrough));
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    {
      int k = j + 5;
      bar(k);
      __attribute__((fallthrough));
    }
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    return;
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    goto L1;
  }
  L1:
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    if (j == 8)
      return;
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    if (j == 8)
      return;
    else
      return;
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    if (j == 8)
      bar(1);
    else
      return;
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    if (j == 8)
      return;
    else
      bar(2);
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    if (j == 8)
      bar(1);
    else
      bar(2);
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    if (j == 8)
      return;
  } break;
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    if (j == 8)
      return;
    else
      return;
  } break;
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    if (j == 8)
      bar(1);
    else
      return;
  } break;
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    if (j == 8)
      return;
    else
      bar(2);
  } break;
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    if (j == 8)
      bar(1);
    else
      bar(2);
  } break;
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 9;
    while (1)
      ;
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 9;
    switch (j)
      ;
  }
  case 2:
    bar(99);
  }
  switch (i) {
  case 1: {
    int j = 0;
    bar(j);
    if (j == 8)
      bar(1);
    else
      bar(2);
    __attribute__((fallthrough));
  }
  case 2:
    bar(99);
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x68(%rbp)
sub    $0x1,%eax
je     1143 <f+0x33>
jmp    1132 <f+0x22>
mov    -0x68(%rbp),%eax
sub    $0x2,%eax
je     1148 <f+0x38>
jmp    1154 <f+0x44>
jmp    1148 <f+0x38>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x6c(%rbp)
sub    $0x1,%eax
je     1179 <f+0x69>
jmp    1168 <f+0x58>
mov    -0x6c(%rbp),%eax
sub    $0x2,%eax
je     1180 <f+0x70>
jmp    118c <f+0x7c>
movl   $0xa,-0xc(%rbp)
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x70(%rbp)
sub    $0x1,%eax
je     11b1 <f+0xa1>
jmp    11a0 <f+0x90>
mov    -0x70(%rbp),%eax
sub    $0x2,%eax
je     11d1 <f+0xc1>
jmp    11dd <f+0xcd>
movl   $0x9,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x74(%rbp)
sub    $0x1,%eax
je     1202 <f+0xf2>
jmp    11f1 <f+0xe1>
mov    -0x74(%rbp),%eax
sub    $0x2,%eax
je     122e <f+0x11e>
jmp    123a <f+0x12a>
movl   $0x9,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
movl   $0xa,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x78(%rbp)
sub    $0x1,%eax
je     125f <f+0x14f>
jmp    124e <f+0x13e>
mov    -0x78(%rbp),%eax
sub    $0x2,%eax
je     1270 <f+0x160>
jmp    127c <f+0x16c>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x7c(%rbp)
sub    $0x1,%eax
je     12a1 <f+0x191>
jmp    1290 <f+0x180>
mov    -0x7c(%rbp),%eax
sub    $0x2,%eax
je     12bb <f+0x1ab>
jmp    12c7 <f+0x1b7>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x80(%rbp)
sub    $0x1,%eax
je     12ec <f+0x1dc>
jmp    12db <f+0x1cb>
mov    -0x80(%rbp),%eax
sub    $0x2,%eax
je     1302 <f+0x1f2>
jmp    130e <f+0x1fe>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
jmp    1857 <f+0x747>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x84(%rbp)
sub    $0x1,%eax
je     1339 <f+0x229>
jmp    1325 <f+0x215>
mov    -0x84(%rbp),%eax
sub    $0x2,%eax
je     134f <f+0x23f>
jmp    135b <f+0x24b>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
jmp    134f <f+0x23f>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x88(%rbp)
sub    $0x1,%eax
je     1386 <f+0x276>
jmp    1372 <f+0x262>
mov    -0x88(%rbp),%eax
sub    $0x2,%eax
je     13ab <f+0x29b>
jmp    13b7 <f+0x2a7>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
cmpl   $0x8,-0x34(%rbp)
jne    13a6 <f+0x296>
jmp    1857 <f+0x747>
jmp    13ab <f+0x29b>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8c(%rbp)
sub    $0x1,%eax
je     13e2 <f+0x2d2>
jmp    13ce <f+0x2be>
mov    -0x8c(%rbp),%eax
sub    $0x2,%eax
je     1407 <f+0x2f7>
jmp    1413 <f+0x303>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
cmpl   $0x8,-0x38(%rbp)
jne    1402 <f+0x2f2>
jmp    1857 <f+0x747>
jmp    1857 <f+0x747>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x90(%rbp)
sub    $0x1,%eax
je     143e <f+0x32e>
jmp    142a <f+0x31a>
mov    -0x90(%rbp),%eax
sub    $0x2,%eax
je     1474 <f+0x364>
jmp    1480 <f+0x370>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
cmpl   $0x8,-0x3c(%rbp)
jne    146a <f+0x35a>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <bar@plt>
jmp    146f <f+0x35f>
jmp    1857 <f+0x747>
jmp    1474 <f+0x364>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x94(%rbp)
sub    $0x1,%eax
je     14ab <f+0x39b>
jmp    1497 <f+0x387>
mov    -0x94(%rbp),%eax
sub    $0x2,%eax
je     14dc <f+0x3cc>
jmp    14e8 <f+0x3d8>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
cmpl   $0x8,-0x40(%rbp)
jne    14cb <f+0x3bb>
jmp    1857 <f+0x747>
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <bar@plt>
jmp    14dc <f+0x3cc>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x98(%rbp)
sub    $0x1,%eax
je     1513 <f+0x403>
jmp    14ff <f+0x3ef>
mov    -0x98(%rbp),%eax
sub    $0x2,%eax
je     1550 <f+0x440>
jmp    155c <f+0x44c>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
cmpl   $0x8,-0x44(%rbp)
jne    153f <f+0x42f>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <bar@plt>
jmp    154b <f+0x43b>
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <bar@plt>
jmp    1550 <f+0x440>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x9c(%rbp)
sub    $0x1,%eax
je     1587 <f+0x477>
jmp    1573 <f+0x463>
mov    -0x9c(%rbp),%eax
sub    $0x2,%eax
je     15ac <f+0x49c>
jmp    15b8 <f+0x4a8>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
cmpl   $0x8,-0x48(%rbp)
jne    15a7 <f+0x497>
jmp    1857 <f+0x747>
jmp    15b8 <f+0x4a8>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xa0(%rbp)
sub    $0x1,%eax
je     15e3 <f+0x4d3>
jmp    15cf <f+0x4bf>
mov    -0xa0(%rbp),%eax
sub    $0x2,%eax
je     1608 <f+0x4f8>
jmp    1614 <f+0x504>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
cmpl   $0x8,-0x4c(%rbp)
jne    1603 <f+0x4f3>
jmp    1857 <f+0x747>
jmp    1857 <f+0x747>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xa4(%rbp)
sub    $0x1,%eax
je     163f <f+0x52f>
jmp    162b <f+0x51b>
mov    -0xa4(%rbp),%eax
sub    $0x2,%eax
je     1675 <f+0x565>
jmp    1681 <f+0x571>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
cmpl   $0x8,-0x50(%rbp)
jne    166b <f+0x55b>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <bar@plt>
jmp    1670 <f+0x560>
jmp    1857 <f+0x747>
jmp    1681 <f+0x571>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xa8(%rbp)
sub    $0x1,%eax
je     16ac <f+0x59c>
jmp    1698 <f+0x588>
mov    -0xa8(%rbp),%eax
sub    $0x2,%eax
je     16dd <f+0x5cd>
jmp    16e9 <f+0x5d9>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
cmpl   $0x8,-0x54(%rbp)
jne    16cc <f+0x5bc>
jmp    1857 <f+0x747>
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <bar@plt>
jmp    16e9 <f+0x5d9>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xac(%rbp)
sub    $0x1,%eax
je     1714 <f+0x604>
jmp    1700 <f+0x5f0>
mov    -0xac(%rbp),%eax
sub    $0x2,%eax
je     1751 <f+0x641>
jmp    175d <f+0x64d>
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
cmpl   $0x8,-0x58(%rbp)
jne    1740 <f+0x630>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <bar@plt>
jmp    174c <f+0x63c>
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <bar@plt>
jmp    175d <f+0x64d>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xb0(%rbp)
sub    $0x1,%eax
je     1788 <f+0x678>
jmp    1774 <f+0x664>
mov    -0xb0(%rbp),%eax
sub    $0x2,%eax
je     1794 <f+0x684>
jmp    17a0 <f+0x690>
movl   $0x9,-0x5c(%rbp)
jmp    178f <f+0x67f>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xb4(%rbp)
sub    $0x1,%eax
je     17cb <f+0x6bb>
jmp    17b7 <f+0x6a7>
mov    -0xb4(%rbp),%eax
sub    $0x2,%eax
je     17d7 <f+0x6c7>
jmp    17e3 <f+0x6d3>
movl   $0x9,-0x60(%rbp)
jmp    17d7 <f+0x6c7>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xb8(%rbp)
sub    $0x1,%eax
je     180e <f+0x6fe>
jmp    17fa <f+0x6ea>
mov    -0xb8(%rbp),%eax
sub    $0x2,%eax
je     184b <f+0x73b>
jmp    1857 <f+0x747>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%edi
mov    $0x0,%al
call   1030 <bar@plt>
cmpl   $0x8,-0x64(%rbp)
jne    183a <f+0x72a>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <bar@plt>
jmp    1846 <f+0x736>
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <bar@plt>
jmp    184b <f+0x73b>
mov    $0x63,%edi
mov    $0x0,%al
call   1030 <bar@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
lea    -0x1(%rbx),%eax
cmp    $0x1,%eax
ja     11f0 <f+0xe0>
xor    %ebp,%ebp
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
cmp    $0x1,%ebx
je     11f5 <f+0xe5>
cmp    $0x2,%ebx
jne    11f0 <f+0xe0>
mov    $0x63,%ebx
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%ebp
mov    $0x63,%r14d
jmp    11fb <f+0xeb>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    $0x5,%r14d
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14d,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <bar@plt>
mov    %ebp,%edi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <bar@plt>

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

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