#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 d(int);
int /*<<< orphan*/ printf(char *, ...);
char *rand1lvl();
char *rand2lvl();
char *rand3lvl();
void magictableb(void) {
  int i;
  int j;
  int d100;
  int d100_2;
  d100 = d(100);
  if (d100 < 16)
    printf("Potion of greater healing (4d4 +4 [DM 188]\n");
  else if (d100 < 23)
    printf("Potion of fire breath (3x, 4d6, Dex DC 13 Save for half, 30' "
           "range) [DM 187]\n");
  else if (d100 < 30) {
    switch (d(10)) {
    case 1:
      printf("Potion of acid resistance (1 hour) [DM 188]");
      break;
    case 2:
      printf("Potion of cold resistance (1 hour) [DM 188]");
      break;
    case 3:
      printf("Potion of fire resistance (1 hour) [DM 188]");
      break;
    case 4:
      printf("Potion of force resistance (1 hour) [DM 188]");
      break;
    case 5:
      printf("Potion of lightning resistance (1 hour) [DM 188]");
      break;
    case 6:
      printf("Potion of necrotic resistance (1 hour) [DM 188]");
      break;
    case 7:
      printf("Potion of poison resistance (1 hour) [DM 188]");
      break;
    case 8:
      printf("Potion of psychic resistance (1 hour) [DM 188]");
      break;
    case 9:
      printf("Potion of radiant resistance (1 hour) [DM 188]");
      break;
    case 10:
      printf("Potion of thunder resistance (1 hour) [DM 188]");
      break;
    }
  } else if (d100 < 35)
    printf("%d +1 Arrows [DM 150]\n", (d(6) + d(6)));
  else if (d100 < 40)
    printf("Potion of animal friendship (1hr, save DC 13) [DM 187]\n");
  else if (d100 < 45)
    printf("Potion of hill giant strength (1hr, STR 21 (+5)) [DM 187]\n");
  else if (d100 < 50)
    printf("Potion of growth (1d4 hours, Enlarge spell) [DM 187]\n");
  else if (d100 < 55)
    printf("Potion of water breathing (1h) [DM 188]\n");
  else if (d100 < 60)
    printf("'%s' Spell scroll (2nd level) (Save DC 13, +5 Attack) [DM 200]\n",
           rand2lvl());
  else if (d100 < 65)
    printf("'%s' Spell scroll (3rd level) (Save DC 15, +7 Attack) [DM 200]\n",
           rand3lvl());
  else if (d100 < 68)
    printf("Bag of holding [DM 153]\n");
  else if (d100 < 71)
    printf("Keoghtom's ointment (1d4+1 doses, 2d8+2 healing, cure poison & "
           "disease) [DM 179]\n");
  else if (d100 < 74)
    printf("Oil of slipperiness (10 min apply, Freedom of Movement or Greese "
           "spell, 8h) [DM 184]\n");
  else if (d100 < 76)
    printf("Dust of disappearance (Invisibility 10' radius, 2d4 minutes) [DM "
           "166]\n");
  else if (d100 < 78)
    printf("Dust of dryness (1d6+4 pinches, 15 cube feet water to pellet, 10d6 "
           "DC 13 Con for half) [DM 166]\n");
  else if (d100 < 80)
    printf("Dust of sneezing and choking (see DMG) [DM 167]\n");
  else if (d100 < 82)
    switch (d(4)) {
    case 1:
      printf("Blue sapphire elemental gem (Conjure Air Elemental) [DM 168]\n");
      break;
    case 2:
      printf(
          "Yellow diamond elemental gem (Conjure Earth Elemental) [DM 168]\n");
      break;
    case 3:
      printf("Red corundum elemental gem (Conjure Fire Elemental) [DM 168]\n");
      break;
    case 4:
      printf("Emerald elemental gem (Conjure Water Elemental) [DM 168]\n");
      break;
    }
  else if (d100 < 84)
    printf("Philter of love (see DMG) [DM 184]\n");
  else if (d100 < 85)
    printf("Alchemy jug (once/day named liquid, see DMG) [DM 150]\n");
  else if (d100 < 86)
    printf("Cap of water breathing [DM 157]\n");
  else if (d100 < 87)
    printf("Cloak of the manta ray (water movement and breathing) [DM 159]\n");
  else if (d100 < 88)
    printf("Driftglobe (light source) [DM 166]\n");
  else if (d100 < 89)
    printf("Goggles of night (+60' darkvision) [DM 172]\n");
  else if (d100 < 90)
    printf("Helm of comprehending languages [DM 173]\n");
  else if (d100 < 91)
    printf("Immovable rod (8000# cap) [DM 177]\n");
  else if (d100 < 92)
    printf("Lantern of revealing (6hr/pint of oil, 30' rad, see invisible) [DM "
           "179]\n");
  else if (d100 < 93)
    printf("Mariner's light armor (water movement, life vest) [DM 181]\n");
  else if (d100 < 94)
    printf("Mithral chain shirt medium armor (no disadvantage) [DM 182]\n");
  else if (d100 < 95)
    printf("Potion of poison (3d6/turn, DC 13 Con for half, save each turn) "
           "[DM 188]\n");
  else if (d100 < 96)
    printf("Ring of swimming (40' speed)\n");
  else if (d100 < 97) {
    printf("Robe of useful items [DM 195]\n");
    printf("\t- 2x Dagger\n");
    printf("\t- 2x Bullseye lantern (filled and lit)\n");
    printf("\t- 2x Steel mirror\n");
    printf("\t- 2x 10' pole\n");
    printf("\t- 2x Hempen rope (50', coiled)\n");
    printf("\t- 2x Sack\n");
    for (i = 0, j = (d(4) + d(4) + d(4) + d(4)); i < j; i++) {
      d100_2 = d(100);
      if (d100_2 < 9)
        printf("\t- Bag of 100gp\n");
      else if (d100_2 < 16)
        printf("\t- 500gp Silver coffer (1'x6\"x6\")\n");
      else if (d100_2 < 23)
        printf("\t- Iron Door (10'x10' max)\n");
      else if (d100_2 < 31)
        printf("\t- 10 100gp Gems\n");
      else if (d100_2 < 45)
        printf("\t- 24' Wooden Ladder\n");
      else if (d100_2 < 52)
        printf("\t- Riding horse with Saddle Bags\n");
      else if (d100_2 < 60)
        printf("\t- Pit (10 cubic feet)\n");
      else if (d100_2 < 69)
        printf("\t- 4x Potions of Healing (2d4+2)\n");
      else if (d100_2 < 76)
        printf("\t- 12' long Rowboat\n");
      else if (d100_2 < 84)
        switch (d(3)) {
        case 1:
          printf("'%s' Spell scroll (1nd level) (Save DC 13, +5 Attack) [DM "
                 "200]\n",
                 rand1lvl());
          break;
        case 2:
          printf("'%s' Spell scroll (2nd level) (Save DC 13, +5 Attack) [DM "
                 "200]\n",
                 rand2lvl());
          break;
        case 3:
          printf("'%s' Spell scroll (3nd level) (Save DC 15, +7 Attack) [DM "
                 "200]\n",
                 rand3lvl());
          break;
        }
      else if (d100_2 < 91)
        printf("\t- 2x Mastiffs\n");
      else if (d100_2 < 97)
        printf("\t- Window (2'x4'x2' deep)\n");
      else
        printf("\t- Portable ram\n");
    }
  } else if (d100 < 98)
    printf("Rope of climbing (60' silk, 3,000# cap) [DM 197]\n");
  else if (d100 < 99)
    printf("Saddle of the cavalier [DM 199]\n");
  else if (d100 < 100)
    printf("Wand of magic detection (3 charge, detect magic, regains 1d3/day) "
           "[DM 211]\n");
  else
    printf("Wand of secrets (3 charge, find secret doors and traps, regains "
           "1d3/day) [DM 211]\n");
}


x86 assembly (clang, -O0):
<magictableb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    $0x64,%edi
call   1030 <d@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    1182 <magictableb+0x32>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a5a <magictableb+0x90a>
cmpl   $0x17,-0xc(%rbp)
jge    119f <magictableb+0x4f>
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a55 <magictableb+0x905>
cmpl   $0x1e,-0xc(%rbp)
jge    1297 <magictableb+0x147>
mov    $0xa,%edi
call   1030 <d@plt>
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x9,%eax
ja     1292 <magictableb+0x142>
mov    -0x18(%rbp),%rax
lea    0xe40(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1292 <magictableb+0x142>
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1292 <magictableb+0x142>
lea    0xf04(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1292 <magictableb+0x142>
lea    0xf1d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1292 <magictableb+0x142>
lea    0xf37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1292 <magictableb+0x142>
lea    0xf55(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1292 <magictableb+0x142>
lea    0xf72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1292 <magictableb+0x142>
lea    0xf8d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1292 <magictableb+0x142>
lea    0xfa9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1292 <magictableb+0x142>
lea    0xfc5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a50 <magictableb+0x900>
cmpl   $0x23,-0xc(%rbp)
jge    12d0 <magictableb+0x180>
mov    $0x6,%edi
call   1030 <d@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x6,%edi
call   1030 <d@plt>
mov    -0x1c(%rbp),%esi
add    %eax,%esi
lea    0xfbb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a4b <magictableb+0x8fb>
cmpl   $0x28,-0xc(%rbp)
jge    12ed <magictableb+0x19d>
lea    0xfb5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a46 <magictableb+0x8f6>
cmpl   $0x2d,-0xc(%rbp)
jge    130a <magictableb+0x1ba>
lea    0xfd0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a41 <magictableb+0x8f1>
cmpl   $0x32,-0xc(%rbp)
jge    1327 <magictableb+0x1d7>
lea    0xfee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a3c <magictableb+0x8ec>
cmpl   $0x37,-0xc(%rbp)
jge    1344 <magictableb+0x1f4>
lea    0x1007(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a37 <magictableb+0x8e7>
cmpl   $0x3c,-0xc(%rbp)
jge    136b <magictableb+0x21b>
mov    $0x0,%al
call   1060 <rand2lvl@plt>
mov    %rax,%rsi
lea    0x1009(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a32 <magictableb+0x8e2>
cmpl   $0x41,-0xc(%rbp)
jge    1392 <magictableb+0x242>
mov    $0x0,%al
call   1070 <rand3lvl@plt>
mov    %rax,%rsi
lea    0x1022(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a2d <magictableb+0x8dd>
cmpl   $0x44,-0xc(%rbp)
jge    13af <magictableb+0x25f>
lea    0x1045(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a28 <magictableb+0x8d8>
cmpl   $0x47,-0xc(%rbp)
jge    13cc <magictableb+0x27c>
lea    0x1041(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a23 <magictableb+0x8d3>
cmpl   $0x4a,-0xc(%rbp)
jge    13e9 <magictableb+0x299>
lea    0x1076(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a1e <magictableb+0x8ce>
cmpl   $0x4c,-0xc(%rbp)
jge    1406 <magictableb+0x2b6>
lea    0x10af(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a19 <magictableb+0x8c9>
cmpl   $0x4e,-0xc(%rbp)
jge    1423 <magictableb+0x2d3>
lea    0x10d9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a14 <magictableb+0x8c4>
cmpl   $0x50,-0xc(%rbp)
jge    1440 <magictableb+0x2f0>
lea    0x111d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a0f <magictableb+0x8bf>
cmpl   $0x52,-0xc(%rbp)
jge    14c6 <magictableb+0x376>
mov    $0x4,%edi
call   1030 <d@plt>
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x3,%eax
ja     14c1 <magictableb+0x371>
mov    -0x28(%rbp),%rax
lea    0xb8f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1101(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14c1 <magictableb+0x371>
lea    0x112c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14c1 <magictableb+0x371>
lea    0x115a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14c1 <magictableb+0x371>
lea    0x1185(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a0a <magictableb+0x8ba>
cmpl   $0x54,-0xc(%rbp)
jge    14e3 <magictableb+0x393>
lea    0x11a2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a05 <magictableb+0x8b5>
cmpl   $0x55,-0xc(%rbp)
jge    1500 <magictableb+0x3b0>
lea    0x11a9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1a00 <magictableb+0x8b0>
cmpl   $0x56,-0xc(%rbp)
jge    151d <magictableb+0x3cd>
lea    0x11c3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19fb <magictableb+0x8ab>
cmpl   $0x57,-0xc(%rbp)
jge    153a <magictableb+0x3ea>
lea    0x11c7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19f6 <magictableb+0x8a6>
cmpl   $0x58,-0xc(%rbp)
jge    1557 <magictableb+0x407>
lea    0x11ea(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19f1 <magictableb+0x8a1>
cmpl   $0x59,-0xc(%rbp)
jge    1574 <magictableb+0x424>
lea    0x11f1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19ec <magictableb+0x89c>
cmpl   $0x5a,-0xc(%rbp)
jge    1591 <magictableb+0x441>
lea    0x1201(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19e7 <magictableb+0x897>
cmpl   $0x5b,-0xc(%rbp)
jge    15ae <magictableb+0x45e>
lea    0x120e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19e2 <magictableb+0x892>
cmpl   $0x5c,-0xc(%rbp)
jge    15cb <magictableb+0x47b>
lea    0x1215(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19dd <magictableb+0x88d>
cmpl   $0x5d,-0xc(%rbp)
jge    15e8 <magictableb+0x498>
lea    0x1241(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19d8 <magictableb+0x888>
cmpl   $0x5e,-0xc(%rbp)
jge    1605 <magictableb+0x4b5>
lea    0x1260(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19d3 <magictableb+0x883>
cmpl   $0x5f,-0xc(%rbp)
jge    1622 <magictableb+0x4d2>
lea    0x1280(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19ce <magictableb+0x87e>
cmpl   $0x60,-0xc(%rbp)
jge    163f <magictableb+0x4ef>
lea    0x12ad(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19c9 <magictableb+0x879>
cmpl   $0x61,-0xc(%rbp)
jge    1950 <magictableb+0x800>
lea    0x12ae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x12bf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x12bf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x12da(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x12e0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x12e2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x12f5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <d@plt>
mov    %eax,-0x34(%rbp)
mov    $0x4,%edi
call   1030 <d@plt>
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    $0x4,%edi
call   1030 <d@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    $0x4,%edi
call   1030 <d@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    194b <magictableb+0x7fb>
mov    $0x64,%edi
call   1030 <d@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jge    1731 <magictableb+0x5e1>
lea    0x1280(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1938 <magictableb+0x7e8>
cmpl   $0x10,-0x10(%rbp)
jge    174e <magictableb+0x5fe>
lea    0x1274(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1933 <magictableb+0x7e3>
cmpl   $0x17,-0x10(%rbp)
jge    176b <magictableb+0x61b>
lea    0x127a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    192e <magictableb+0x7de>
cmpl   $0x1f,-0x10(%rbp)
jge    1788 <magictableb+0x638>
lea    0x1279(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1929 <magictableb+0x7d9>
cmpl   $0x2d,-0x10(%rbp)
jge    17a5 <magictableb+0x655>
lea    0x126e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1924 <magictableb+0x7d4>
cmpl   $0x34,-0x10(%rbp)
jge    17c2 <magictableb+0x672>
lea    0x1267(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    191f <magictableb+0x7cf>
cmpl   $0x3c,-0x10(%rbp)
jge    17df <magictableb+0x68f>
lea    0x126c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    191a <magictableb+0x7ca>
cmpl   $0x45,-0x10(%rbp)
jge    17fc <magictableb+0x6ac>
lea    0x1267(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1915 <magictableb+0x7c5>
cmpl   $0x4c,-0x10(%rbp)
jge    1819 <magictableb+0x6c9>
lea    0x126c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1910 <magictableb+0x7c0>
cmpl   $0x54,-0x10(%rbp)
jge    18b9 <magictableb+0x769>
mov    $0x3,%edi
call   1030 <d@plt>
mov    %eax,%ecx
mov    %ecx,-0x38(%rbp)
sub    $0x1,%eax
je     1862 <magictableb+0x712>
jmp    1840 <magictableb+0x6f0>
mov    -0x38(%rbp),%eax
sub    $0x2,%eax
je     187f <magictableb+0x72f>
jmp    1851 <magictableb+0x701>
mov    -0x38(%rbp),%eax
sub    $0x3,%eax
je     189c <magictableb+0x74c>
jmp    18b4 <magictableb+0x764>
mov    $0x0,%al
call   1050 <rand1lvl@plt>
mov    %rax,%rsi
lea    0x121b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    18b4 <magictableb+0x764>
mov    $0x0,%al
call   1060 <rand2lvl@plt>
mov    %rax,%rsi
lea    0xad8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    18b4 <magictableb+0x764>
mov    $0x0,%al
call   1070 <rand3lvl@plt>
mov    %rax,%rsi
lea    0x1221(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    190b <magictableb+0x7bb>
cmpl   $0x5b,-0x10(%rbp)
jge    18d6 <magictableb+0x786>
lea    0x1244(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1906 <magictableb+0x7b6>
cmpl   $0x61,-0x10(%rbp)
jge    18f3 <magictableb+0x7a3>
lea    0x1237(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1901 <magictableb+0x7b1>
lea    0x123f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1906 <magictableb+0x7b6>
jmp    190b <magictableb+0x7bb>
jmp    1910 <magictableb+0x7c0>
jmp    1915 <magictableb+0x7c5>
jmp    191a <magictableb+0x7ca>
jmp    191f <magictableb+0x7cf>
jmp    1924 <magictableb+0x7d4>
jmp    1929 <magictableb+0x7d9>
jmp    192e <magictableb+0x7de>
jmp    1933 <magictableb+0x7e3>
jmp    1938 <magictableb+0x7e8>
jmp    193d <magictableb+0x7ed>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    16fb <magictableb+0x5ab>
jmp    19c4 <magictableb+0x874>
cmpl   $0x62,-0xc(%rbp)
jge    196d <magictableb+0x81d>
lea    0x11e9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19bf <magictableb+0x86f>
cmpl   $0x63,-0xc(%rbp)
jge    198a <magictableb+0x83a>
lea    0x11fe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19ba <magictableb+0x86a>
cmpl   $0x64,-0xc(%rbp)
jge    19a7 <magictableb+0x857>
lea    0x1202(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19b5 <magictableb+0x865>
lea    0x123b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    19ba <magictableb+0x86a>
jmp    19bf <magictableb+0x86f>
jmp    19c4 <magictableb+0x874>
jmp    19c9 <magictableb+0x879>
jmp    19ce <magictableb+0x87e>
jmp    19d3 <magictableb+0x883>
jmp    19d8 <magictableb+0x888>
jmp    19dd <magictableb+0x88d>
jmp    19e2 <magictableb+0x892>
jmp    19e7 <magictableb+0x897>
jmp    19ec <magictableb+0x89c>
jmp    19f1 <magictableb+0x8a1>
jmp    19f6 <magictableb+0x8a6>
jmp    19fb <magictableb+0x8ab>
jmp    1a00 <magictableb+0x8b0>
jmp    1a05 <magictableb+0x8b5>
jmp    1a0a <magictableb+0x8ba>
jmp    1a0f <magictableb+0x8bf>
jmp    1a14 <magictableb+0x8c4>
jmp    1a19 <magictableb+0x8c9>
jmp    1a1e <magictableb+0x8ce>
jmp    1a23 <magictableb+0x8d3>
jmp    1a28 <magictableb+0x8d8>
jmp    1a2d <magictableb+0x8dd>
jmp    1a32 <magictableb+0x8e2>
jmp    1a37 <magictableb+0x8e7>
jmp    1a3c <magictableb+0x8ec>
jmp    1a41 <magictableb+0x8f1>
jmp    1a46 <magictableb+0x8f6>
jmp    1a4b <magictableb+0x8fb>
jmp    1a50 <magictableb+0x900>
jmp    1a55 <magictableb+0x905>
jmp    1a5a <magictableb+0x90a>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<magictableb>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x64,%edi
call   1040 <d@plt>
cmp    $0xf,%eax
jg     1183 <magictableb+0x23>
lea    0x1a5c(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x16,%eax
ja     11a2 <magictableb+0x42>
lea    0x1a01(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>
cmp    $0x1d,%eax
ja     11d9 <magictableb+0x79>
mov    $0xa,%edi
call   1040 <d@plt>
add    $0xffffffff,%eax
cmp    $0x9,%eax
ja     1670 <magictableb+0x510>
lea    0xe4c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe64(%rip),%rdi
jmp    1296 <magictableb+0x136>
cmp    $0x22,%eax
ja     1214 <magictableb+0xb4>
mov    $0x6,%edi
call   1040 <d@plt>
mov    %eax,%ebx
mov    $0x6,%edi
call   1040 <d@plt>
add    %eax,%ebx
lea    0x1008(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <printf@plt>
cmp    $0x27,%eax
ja     1225 <magictableb+0xc5>
lea    0x1939(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x2c,%eax
ja     1236 <magictableb+0xd6>
lea    0x18ee(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x31,%eax
ja     12ab <magictableb+0x14b>
lea    0x18a8(%rip),%rdi
jmp    118f <magictableb+0x2f>
lea    0xe9b(%rip),%rdi
jmp    1296 <magictableb+0x136>
lea    0xf7f(%rip),%rdi
jmp    1296 <magictableb+0x136>
lea    0xe30(%rip),%rdi
jmp    1296 <magictableb+0x136>
lea    0xe53(%rip),%rdi
jmp    1296 <magictableb+0x136>
lea    0xf06(%rip),%rdi
jmp    1296 <magictableb+0x136>
lea    0xde9(%rip),%rdi
jmp    1296 <magictableb+0x136>
lea    0xe96(%rip),%rdi
jmp    1296 <magictableb+0x136>
lea    0xebd(%rip),%rdi
jmp    1296 <magictableb+0x136>
lea    0xf11(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <printf@plt>
cmp    $0x36,%eax
ja     12bc <magictableb+0x15c>
lea    0x180b(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x3b,%eax
ja     12d1 <magictableb+0x171>
xor    %eax,%eax
call   1070 <rand2lvl@plt>
lea    0xf4d(%rip),%rdi
jmp    12e4 <magictableb+0x184>
cmp    $0x40,%eax
ja     12fc <magictableb+0x19c>
xor    %eax,%eax
call   1080 <rand3lvl@plt>
lea    0xf78(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <printf@plt>
cmp    $0x43,%eax
ja     130d <magictableb+0x1ad>
lea    0x17a2(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x46,%eax
ja     131e <magictableb+0x1be>
lea    0x1740(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x49,%eax
ja     132f <magictableb+0x1cf>
lea    0x16da(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x4b,%eax
ja     1340 <magictableb+0x1e0>
lea    0x1683(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x4d,%eax
ja     1351 <magictableb+0x1f1>
lea    0x1612(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x4f,%eax
ja     1362 <magictableb+0x202>
lea    0x15d1(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x51,%eax
ja     1399 <magictableb+0x239>
mov    $0x4,%edi
call   1040 <d@plt>
add    $0xffffffff,%eax
cmp    $0x3,%eax
ja     1670 <magictableb+0x510>
lea    0xc7c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x155d(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x53,%eax
ja     13aa <magictableb+0x24a>
lea    0x1473(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x54,%eax
jne    13bb <magictableb+0x25b>
lea    0x142c(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x55,%eax
ja     13f0 <magictableb+0x290>
lea    0x13fb(%rip),%rdi
jmp    118f <magictableb+0x2f>
lea    0x14de(%rip),%rdi
jmp    118f <magictableb+0x2f>
lea    0x1495(%rip),%rdi
jmp    118f <magictableb+0x2f>
lea    0x1450(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x56,%eax
jne    1401 <magictableb+0x2a1>
lea    0x1387(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x57,%eax
ja     1412 <magictableb+0x2b2>
lea    0x1353(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x58,%eax
jne    1423 <magictableb+0x2c3>
lea    0x1316(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x59,%eax
ja     1434 <magictableb+0x2d4>
lea    0x12dc(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x5a,%eax
jne    1445 <magictableb+0x2e5>
lea    0x12a8(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x5b,%eax
ja     1456 <magictableb+0x2f6>
lea    0x124f(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x5c,%eax
jne    1467 <magictableb+0x307>
lea    0x1203(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x5d,%eax
ja     1478 <magictableb+0x318>
lea    0x11b6(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x5e,%eax
jne    1489 <magictableb+0x329>
lea    0x115c(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x5f,%eax
ja     149a <magictableb+0x33a>
lea    0x112e(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x60,%eax
jne    167f <magictableb+0x51f>
lea    0xf60(%rip),%rdi
call   1030 <puts@plt>
lea    0xf72(%rip),%rdi
call   1030 <puts@plt>
lea    0xf73(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf96(%rip),%rdi
call   1030 <puts@plt>
lea    0xf99(%rip),%rdi
call   1030 <puts@plt>
lea    0xfad(%rip),%rdi
call   1030 <puts@plt>
mov    $0x4,%edi
call   1040 <d@plt>
mov    %eax,%ebx
mov    $0x4,%edi
call   1040 <d@plt>
mov    %eax,%ebp
add    %ebx,%ebp
mov    $0x4,%edi
call   1040 <d@plt>
mov    %eax,%r14d
add    %ebp,%r14d
mov    $0x4,%edi
call   1040 <d@plt>
mov    %eax,%ebx
add    %r14d,%ebx
test   %ebx,%ebx
jle    1670 <magictableb+0x510>
lea    0x1074(%rip),%r14
lea    0x104b(%rip),%r15
lea    0x1029(%rip),%r12
lea    0x1011(%rip),%r13
lea    0xff5(%rip),%rbp
mov    $0x64,%edi
call   1040 <d@plt>
cmp    $0x8,%eax
jg     1572 <magictableb+0x412>
mov    %r14,%rdi
jmp    1662 <magictableb+0x502>
cmp    $0xf,%eax
ja     157f <magictableb+0x41f>
mov    %r15,%rdi
jmp    1662 <magictableb+0x502>
cmp    $0x16,%eax
ja     158c <magictableb+0x42c>
mov    %r12,%rdi
jmp    1662 <magictableb+0x502>
cmp    $0x1e,%eax
ja     1599 <magictableb+0x439>
mov    %r13,%rdi
jmp    1662 <magictableb+0x502>
cmp    $0x2c,%eax
ja     15a6 <magictableb+0x446>
mov    %rbp,%rdi
jmp    1662 <magictableb+0x502>
cmp    $0x33,%eax
ja     15b7 <magictableb+0x457>
lea    0xf7d(%rip),%rdi
jmp    1662 <magictableb+0x502>
cmp    $0x3b,%eax
ja     15c8 <magictableb+0x468>
lea    0xf55(%rip),%rdi
jmp    1662 <magictableb+0x502>
cmp    $0x44,%eax
ja     15d9 <magictableb+0x479>
lea    0xf23(%rip),%rdi
jmp    1662 <magictableb+0x502>
cmp    $0x4b,%eax
ja     15e7 <magictableb+0x487>
lea    0xefe(%rip),%rdi
jmp    1662 <magictableb+0x502>
cmp    $0x53,%eax
ja     1615 <magictableb+0x4b5>
mov    $0x3,%edi
call   1040 <d@plt>
cmp    $0x3,%eax
je     1631 <magictableb+0x4d1>
cmp    $0x2,%eax
je     1641 <magictableb+0x4e1>
cmp    $0x1,%eax
jne    1667 <magictableb+0x507>
xor    %eax,%eax
call   1060 <rand1lvl@plt>
lea    0xc89(%rip),%rdi
jmp    164f <magictableb+0x4ef>
cmp    $0x5a,%eax
ja     1623 <magictableb+0x4c3>
lea    0xeb3(%rip),%rdi
jmp    1662 <magictableb+0x502>
cmp    $0x60,%eax
ja     165b <magictableb+0x4fb>
lea    0xe8b(%rip),%rdi
jmp    1662 <magictableb+0x502>
xor    %eax,%eax
call   1080 <rand3lvl@plt>
lea    0xc9d(%rip),%rdi
jmp    164f <magictableb+0x4ef>
xor    %eax,%eax
call   1070 <rand2lvl@plt>
lea    0xbcd(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1667 <magictableb+0x507>
lea    0xe48(%rip),%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebx
jne    155b <magictableb+0x3fb>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    $0x61,%eax
ja     1690 <magictableb+0x530>
lea    0xd4e(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x62,%eax
jne    16a1 <magictableb+0x541>
lea    0xd1d(%rip),%rdi
jmp    118f <magictableb+0x2f>
cmp    $0x63,%eax
ja     16b2 <magictableb+0x552>
lea    0xcc1(%rip),%rdi
jmp    118f <magictableb+0x2f>
lea    0xc63(%rip),%rdi
jmp    118f <magictableb+0x2f>

LLVM IR (-O0):
@.str = [44 x i8] c"Potion of greater healing (4d4 +4 [DM 188]\0A\00"
@.str.1 = [78 x i8] c"Potion of fire breath (3x, 4d6, Dex DC 13 Save for half, 30' range) [DM 187]\0A\00"
@.str.2 = [44 x i8] c"Potion of acid resistance (1 hour) [DM 188]\00"
@.str.3 = [44 x i8] c"Potion of cold resistance (1 hour) [DM 188]\00"
@.str.4 = [44 x i8] c"Potion of fire resistance (1 hour) [DM 188]\00"
@.str.5 = [45 x i8] c"Potion of force resistance (1 hour) [DM 188]\00"
@.str.6 = [49 x i8] c"Potion of lightning resistance (1 hour) [DM 188]\00"
@.str.7 = [48 x i8] c"Potion of necrotic resistance (1 hour) [DM 188]\00"
@.str.8 = [46 x i8] c"Potion of poison resistance (1 hour) [DM 188]\00"
@.str.9 = [47 x i8] c"Potion of psychic resistance (1 hour) [DM 188]\00"
@.str.10 = [47 x i8] c"Potion of radiant resistance (1 hour) [DM 188]\00"
@.str.11 = [47 x i8] c"Potion of thunder resistance (1 hour) [DM 188]\00"
@.str.12 = [23 x i8] c"%d +1 Arrows [DM 150]\0A\00"
@.str.13 = [56 x i8] c"Potion of animal friendship (1hr, save DC 13) [DM 187]\0A\00"
@.str.14 = [59 x i8] c"Potion of hill giant strength (1hr, STR 21 (+5)) [DM 187]\0A\00"
@.str.15 = [54 x i8] c"Potion of growth (1d4 hours, Enlarge spell) [DM 187]\0A\00"
@.str.16 = [41 x i8] c"Potion of water breathing (1h) [DM 188]\0A\00"
@.str.17 = [64 x i8] c"'%s' Spell scroll (2nd level) (Save DC 13, +5 Attack) [DM 200]\0A\00"
@.str.18 = [64 x i8] c"'%s' Spell scroll (3rd level) (Save DC 15, +7 Attack) [DM 200]\0A\00"
@.str.19 = [25 x i8] c"Bag of holding [DM 153]\0A\00"
@.str.20 = [82 x i8] c"Keoghtom's ointment (1d4+1 doses, 2d8+2 healing, cure poison & disease) [DM 179]\0A\00"
@.str.21 = [86 x i8] c"Oil of slipperiness (10 min apply, Freedom of Movement or Greese spell, 8h) [DM 184]\0A\00"
@.str.22 = [71 x i8] c"Dust of disappearance (Invisibility 10' radius, 2d4 minutes) [DM 166]\0A\00"
@.str.23 = [97 x i8] c"Dust of dryness (1d6+4 pinches, 15 cube feet water to pellet, 10d6 DC 13 Con for half) [DM 166]\0A\00"
@.str.24 = [49 x i8] c"Dust of sneezing and choking (see DMG) [DM 167]\0A\00"
@.str.25 = [62 x i8] c"Blue sapphire elemental gem (Conjure Air Elemental) [DM 168]\0A\00"
@.str.26 = [65 x i8] c"Yellow diamond elemental gem (Conjure Earth Elemental) [DM 168]\0A\00"
@.str.27 = [62 x i8] c"Red corundum elemental gem (Conjure Fire Elemental) [DM 168]\0A\00"
@.str.28 = [58 x i8] c"Emerald elemental gem (Conjure Water Elemental) [DM 168]\0A\00"
@.str.29 = [36 x i8] c"Philter of love (see DMG) [DM 184]\0A\00"
@.str.30 = [55 x i8] c"Alchemy jug (once/day named liquid, see DMG) [DM 150]\0A\00"
@.str.31 = [33 x i8] c"Cap of water breathing [DM 157]\0A\00"
@.str.32 = [64 x i8] c"Cloak of the manta ray (water movement and breathing) [DM 159]\0A\00"
@.str.33 = [36 x i8] c"Driftglobe (light source) [DM 166]\0A\00"
@.str.34 = [45 x i8] c"Goggles of night (+60' darkvision) [DM 172]\0A\00"
@.str.35 = [42 x i8] c"Helm of comprehending languages [DM 173]\0A\00"
@.str.36 = [36 x i8] c"Immovable rod (8000# cap) [DM 177]\0A\00"
@.str.37 = [73 x i8] c"Lantern of revealing (6hr/pint of oil, 30' rad, see invisible) [DM 179]\0A\00"
@.str.38 = [60 x i8] c"Mariner's light armor (water movement, life vest) [DM 181]\0A\00"
@.str.39 = [61 x i8] c"Mithral chain shirt medium armor (no disadvantage) [DM 182]\0A\00"
@.str.40 = [74 x i8] c"Potion of poison (3d6/turn, DC 13 Con for half, save each turn) [DM 188]\0A\00"
@.str.41 = [30 x i8] c"Ring of swimming (40' speed)\0A\00"
@.str.42 = [31 x i8] c"Robe of useful items [DM 195]\0A\00"
@.str.43 = [14 x i8] c"\09- 2x Dagger\0A\00"
@.str.44 = [41 x i8] c"\09- 2x Bullseye lantern (filled and lit)\0A\00"
@.str.45 = [20 x i8] c"\09- 2x Steel mirror\0A\00"
@.str.46 = [16 x i8] c"\09- 2x 10' pole\0A\00"
@.str.47 = [33 x i8] c"\09- 2x Hempen rope (50', coiled)\0A\00"
@.str.48 = [12 x i8] c"\09- 2x Sack\0A\00"
@.str.49 = [17 x i8] c"\09- Bag of 100gp\0A\00"
@.str.50 = [35 x i8] c"\09- 500gp Silver coffer (1'x6\22x6\22)\0A\00"
@.str.51 = [28 x i8] c"\09- Iron Door (10'x10' max)\0A\00"
@.str.52 = [18 x i8] c"\09- 10 100gp Gems\0A\00"
@.str.53 = [22 x i8] c"\09- 24' Wooden Ladder\0A\00"
@.str.54 = [34 x i8] c"\09- Riding horse with Saddle Bags\0A\00"
@.str.55 = [24 x i8] c"\09- Pit (10 cubic feet)\0A\00"
@.str.56 = [34 x i8] c"\09- 4x Potions of Healing (2d4+2)\0A\00"
@.str.57 = [21 x i8] c"\09- 12' long Rowboat\0A\00"
@.str.58 = [64 x i8] c"'%s' Spell scroll (1nd level) (Save DC 13, +5 Attack) [DM 200]\0A\00"
@.str.59 = [64 x i8] c"'%s' Spell scroll (3nd level) (Save DC 15, +7 Attack) [DM 200]\0A\00"
@.str.60 = [16 x i8] c"\09- 2x Mastiffs\0A\00"
@.str.61 = [27 x i8] c"\09- Window (2'x4'x2' deep)\0A\00"
@.str.62 = [17 x i8] c"\09- Portable ram\0A\00"
@.str.63 = [50 x i8] c"Rope of climbing (60' silk, 3,000# cap) [DM 197]\0A\00"
@.str.64 = [33 x i8] c"Saddle of the cavalier [DM 199]\0A\00"
@.str.65 = [76 x i8] c"Wand of magic detection (3 charge, detect magic, regains 1d3/day) [DM 211]\0A\00"
@.str.66 = [83 x i8] c"Wand of secrets (3 charge, find secret doors and traps, regains 1d3/day) [DM 211]\0A\00"
define void @magictableb() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @d(i32 100)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 16
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
br label %351
10: ; preds = %0
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 23
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.1, i64 0, i64 0))
br label %350
15: ; preds = %10
%16 = load i32, i32* %3
%17 = icmp slt i32 %16, 30
br i1 %17, label %18, label %41
18: ; preds = %15
%19 = call i32 @d(i32 10)
switch i32 %19, label %40 [
i32 1, label %20
i32 2, label %22
i32 3, label %24
i32 4, label %26
i32 5, label %28
i32 6, label %30
i32 7, label %32
i32 8, label %34
i32 9, label %36
i32 10, label %38
]
20: ; preds = %18
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
br label %40
22: ; preds = %18
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
br label %40
24: ; preds = %18
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0))
br label %40
26: ; preds = %18
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0))
br label %40
28: ; preds = %18
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
br label %40
30: ; preds = %18
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
br label %40
32: ; preds = %18
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.8, i64 0, i64 0))
br label %40
34: ; preds = %18
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.9, i64 0, i64 0))
br label %40
36: ; preds = %18
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0))
br label %40
38: ; preds = %18
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.11, i64 0, i64 0))
br label %40
40: ; preds = %18, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20
br label %349
41: ; preds = %15
%42 = load i32, i32* %3
%43 = icmp slt i32 %42, 35
br i1 %43, label %44, label %49
44: ; preds = %41
%45 = call i32 @d(i32 6)
%46 = call i32 @d(i32 6)
%47 = add nsw i32 %45, %46
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i32 %47)
br label %348
49: ; preds = %41
%50 = load i32, i32* %3
%51 = icmp slt i32 %50, 40
br i1 %51, label %52, label %54
52: ; preds = %49
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.13, i64 0, i64 0))
br label %347
54: ; preds = %49
%55 = load i32, i32* %3
%56 = icmp slt i32 %55, 45
br i1 %56, label %57, label %59
57: ; preds = %54
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.14, i64 0, i64 0))
br label %346
59: ; preds = %54
%60 = load i32, i32* %3
%61 = icmp slt i32 %60, 50
br i1 %61, label %62, label %64
62: ; preds = %59
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.15, i64 0, i64 0))
br label %345
64: ; preds = %59
%65 = load i32, i32* %3
%66 = icmp slt i32 %65, 55
br i1 %66, label %67, label %69
67: ; preds = %64
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.16, i64 0, i64 0))
br label %344
69: ; preds = %64
%70 = load i32, i32* %3
%71 = icmp slt i32 %70, 60
br i1 %71, label %72, label %75
72: ; preds = %69
%73 = call i8* (...) @rand2lvl()
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.17, i64 0, i64 0), i8* %73)
br label %343
75: ; preds = %69
%76 = load i32, i32* %3
%77 = icmp slt i32 %76, 65
br i1 %77, label %78, label %81
78: ; preds = %75
%79 = call i8* (...) @rand3lvl()
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.18, i64 0, i64 0), i8* %79)
br label %342
81: ; preds = %75
%82 = load i32, i32* %3
%83 = icmp slt i32 %82, 68
br i1 %83, label %84, label %86
84: ; preds = %81
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.19, i64 0, i64 0))
br label %341
86: ; preds = %81
%87 = load i32, i32* %3
%88 = icmp slt i32 %87, 71
br i1 %88, label %89, label %91
89: ; preds = %86
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.20, i64 0, i64 0))
br label %340
91: ; preds = %86
%92 = load i32, i32* %3
%93 = icmp slt i32 %92, 74
br i1 %93, label %94, label %96
94: ; preds = %91
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.21, i64 0, i64 0))
br label %339
96: ; preds = %91
%97 = load i32, i32* %3
%98 = icmp slt i32 %97, 76
br i1 %98, label %99, label %101
99: ; preds = %96
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.22, i64 0, i64 0))
br label %338
101: ; preds = %96
%102 = load i32, i32* %3
%103 = icmp slt i32 %102, 78
br i1 %103, label %104, label %106
104: ; preds = %101
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.23, i64 0, i64 0))
br label %337
106: ; preds = %101
%107 = load i32, i32* %3
%108 = icmp slt i32 %107, 80
br i1 %108, label %109, label %111
109: ; preds = %106
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.24, i64 0, i64 0))
br label %336
111: ; preds = %106
%112 = load i32, i32* %3
%113 = icmp slt i32 %112, 82
br i1 %113, label %114, label %125
114: ; preds = %111
%115 = call i32 @d(i32 4)
switch i32 %115, label %124 [
i32 1, label %116
i32 2, label %118
i32 3, label %120
i32 4, label %122
]
116: ; preds = %114
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.25, i64 0, i64 0))
br label %124
118: ; preds = %114
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.26, i64 0, i64 0))
br label %124
120: ; preds = %114
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.27, i64 0, i64 0))
br label %124
122: ; preds = %114
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.28, i64 0, i64 0))
br label %124
124: ; preds = %114, %122, %120, %118, %116
br label %335
125: ; preds = %111
%126 = load i32, i32* %3
%127 = icmp slt i32 %126, 84
br i1 %127, label %128, label %130
128: ; preds = %125
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.29, i64 0, i64 0))
br label %334
130: ; preds = %125
%131 = load i32, i32* %3
%132 = icmp slt i32 %131, 85
br i1 %132, label %133, label %135
133: ; preds = %130
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.30, i64 0, i64 0))
br label %333
135: ; preds = %130
%136 = load i32, i32* %3
%137 = icmp slt i32 %136, 86
br i1 %137, label %138, label %140
138: ; preds = %135
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.31, i64 0, i64 0))
br label %332
140: ; preds = %135
%141 = load i32, i32* %3
%142 = icmp slt i32 %141, 87
br i1 %142, label %143, label %145
143: ; preds = %140
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.32, i64 0, i64 0))
br label %331
145: ; preds = %140
%146 = load i32, i32* %3
%147 = icmp slt i32 %146, 88
br i1 %147, label %148, label %150
148: ; preds = %145
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.33, i64 0, i64 0))
br label %330
150: ; preds = %145
%151 = load i32, i32* %3
%152 = icmp slt i32 %151, 89
br i1 %152, label %153, label %155
153: ; preds = %150
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.34, i64 0, i64 0))
br label %329
155: ; preds = %150
%156 = load i32, i32* %3
%157 = icmp slt i32 %156, 90
br i1 %157, label %158, label %160
158: ; preds = %155
%159 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.35, i64 0, i64 0))
br label %328
160: ; preds = %155
%161 = load i32, i32* %3
%162 = icmp slt i32 %161, 91
br i1 %162, label %163, label %165
163: ; preds = %160
%164 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.36, i64 0, i64 0))
br label %327
165: ; preds = %160
%166 = load i32, i32* %3
%167 = icmp slt i32 %166, 92
br i1 %167, label %168, label %170
168: ; preds = %165
%169 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.37, i64 0, i64 0))
br label %326
170: ; preds = %165
%171 = load i32, i32* %3
%172 = icmp slt i32 %171, 93
br i1 %172, label %173, label %175
173: ; preds = %170
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.38, i64 0, i64 0))
br label %325
175: ; preds = %170
%176 = load i32, i32* %3
%177 = icmp slt i32 %176, 94
br i1 %177, label %178, label %180
178: ; preds = %175
%179 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.39, i64 0, i64 0))
br label %324
180: ; preds = %175
%181 = load i32, i32* %3
%182 = icmp slt i32 %181, 95
br i1 %182, label %183, label %185
183: ; preds = %180
%184 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.40, i64 0, i64 0))
br label %323
185: ; preds = %180
%186 = load i32, i32* %3
%187 = icmp slt i32 %186, 96
br i1 %187, label %188, label %190
188: ; preds = %185
%189 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.41, i64 0, i64 0))
br label %322
190: ; preds = %185
%191 = load i32, i32* %3
%192 = icmp slt i32 %191, 97
br i1 %192, label %193, label %301
193: ; preds = %190
%194 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.42, i64 0, i64 0))
%195 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.43, i64 0, i64 0))
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.44, i64 0, i64 0))
%197 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.45, i64 0, i64 0))
%198 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.46, i64 0, i64 0))
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.47, i64 0, i64 0))
%200 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.48, i64 0, i64 0))
store i32 0, i32* %1
%201 = call i32 @d(i32 4)
%202 = call i32 @d(i32 4)
%203 = add nsw i32 %201, %202
%204 = call i32 @d(i32 4)
%205 = add nsw i32 %203, %204
%206 = call i32 @d(i32 4)
%207 = add nsw i32 %205, %206
store i32 %207, i32* %2
br label %208
208: ; preds = %297, %193
%209 = load i32, i32* %1
%210 = load i32, i32* %2
%211 = icmp slt i32 %209, %210
br i1 %211, label %212, label %300
212: ; preds = %208
%213 = call i32 @d(i32 100)
store i32 %213, i32* %4
%214 = load i32, i32* %4
%215 = icmp slt i32 %214, 9
br i1 %215, label %216, label %218
216: ; preds = %212
%217 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.49, i64 0, i64 0))
br label %296
218: ; preds = %212
%219 = load i32, i32* %4
%220 = icmp slt i32 %219, 16
br i1 %220, label %221, label %223
221: ; preds = %218
%222 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.50, i64 0, i64 0))
br label %295
223: ; preds = %218
%224 = load i32, i32* %4
%225 = icmp slt i32 %224, 23
br i1 %225, label %226, label %228
226: ; preds = %223
%227 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.51, i64 0, i64 0))
br label %294
228: ; preds = %223
%229 = load i32, i32* %4
%230 = icmp slt i32 %229, 31
br i1 %230, label %231, label %233
231: ; preds = %228
%232 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.52, i64 0, i64 0))
br label %293
233: ; preds = %228
%234 = load i32, i32* %4
%235 = icmp slt i32 %234, 45
br i1 %235, label %236, label %238
236: ; preds = %233
%237 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.53, i64 0, i64 0))
br label %292
238: ; preds = %233
%239 = load i32, i32* %4
%240 = icmp slt i32 %239, 52
br i1 %240, label %241, label %243
241: ; preds = %238
%242 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.54, i64 0, i64 0))
br label %291
243: ; preds = %238
%244 = load i32, i32* %4
%245 = icmp slt i32 %244, 60
br i1 %245, label %246, label %248
246: ; preds = %243
%247 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.55, i64 0, i64 0))
br label %290
248: ; preds = %243
%249 = load i32, i32* %4
%250 = icmp slt i32 %249, 69
br i1 %250, label %251, label %253
251: ; preds = %248
%252 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.56, i64 0, i64 0))
br label %289
253: ; preds = %248
%254 = load i32, i32* %4
%255 = icmp slt i32 %254, 76
br i1 %255, label %256, label %258
256: ; preds = %253
%257 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.57, i64 0, i64 0))
br label %288
258: ; preds = %253
%259 = load i32, i32* %4
%260 = icmp slt i32 %259, 84
br i1 %260, label %261, label %273
261: ; preds = %258
%262 = call i32 @d(i32 3)
switch i32 %262, label %272 [
i32 1, label %263
i32 2, label %266
i32 3, label %269
]
263: ; preds = %261
%264 = call i8* (...) @rand1lvl()
%265 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.58, i64 0, i64 0), i8* %264)
br label %272
266: ; preds = %261
%267 = call i8* (...) @rand2lvl()
%268 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.17, i64 0, i64 0), i8* %267)
br label %272
269: ; preds = %261
%270 = call i8* (...) @rand3lvl()
%271 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.59, i64 0, i64 0), i8* %270)
br label %272
272: ; preds = %261, %269, %266, %263
br label %287
273: ; preds = %258
%274 = load i32, i32* %4
%275 = icmp slt i32 %274, 91
br i1 %275, label %276, label %278
276: ; preds = %273
%277 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.60, i64 0, i64 0))
br label %286
278: ; preds = %273
%279 = load i32, i32* %4
%280 = icmp slt i32 %279, 97
br i1 %280, label %281, label %283
281: ; preds = %278
%282 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.61, i64 0, i64 0))
br label %285
283: ; preds = %278
%284 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.62, i64 0, i64 0))
br label %285
285: ; preds = %283, %281
br label %286
286: ; preds = %285, %276
br label %287
287: ; preds = %286, %272
br label %288
288: ; preds = %287, %256
br label %289
289: ; preds = %288, %251
br label %290
290: ; preds = %289, %246
br label %291
291: ; preds = %290, %241
br label %292
292: ; preds = %291, %236
br label %293
293: ; preds = %292, %231
br label %294
294: ; preds = %293, %226
br label %295
295: ; preds = %294, %221
br label %296
296: ; preds = %295, %216
br label %297
297: ; preds = %296
%298 = load i32, i32* %1
%299 = add nsw i32 %298, 1
store i32 %299, i32* %1
br label %208
300: ; preds = %208
br label %321
301: ; preds = %190
%302 = load i32, i32* %3
%303 = icmp slt i32 %302, 98
br i1 %303, label %304, label %306
304: ; preds = %301
%305 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.63, i64 0, i64 0))
br label %320
306: ; preds = %301
%307 = load i32, i32* %3
%308 = icmp slt i32 %307, 99
br i1 %308, label %309, label %311
309: ; preds = %306
%310 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.64, i64 0, i64 0))
br label %319
311: ; preds = %306
%312 = load i32, i32* %3
%313 = icmp slt i32 %312, 100
br i1 %313, label %314, label %316
314: ; preds = %311
%315 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.65, i64 0, i64 0))
br label %318
316: ; preds = %311
%317 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.66, i64 0, i64 0))
br label %318
318: ; preds = %316, %314
br label %319
319: ; preds = %318, %309
br label %320
320: ; preds = %319, %304
br label %321
321: ; preds = %320, %300
br label %322
322: ; preds = %321, %188
br label %323
323: ; preds = %322, %183
br label %324
324: ; preds = %323, %178
br label %325
325: ; preds = %324, %173
br label %326
326: ; preds = %325, %168
br label %327
327: ; preds = %326, %163
br label %328
328: ; preds = %327, %158
br label %329
329: ; preds = %328, %153
br label %330
330: ; preds = %329, %148
br label %331
331: ; preds = %330, %143
br label %332
332: ; preds = %331, %138
br label %333
333: ; preds = %332, %133
br label %334
334: ; preds = %333, %128
br label %335
335: ; preds = %334, %124
br label %336
336: ; preds = %335, %109
br label %337
337: ; preds = %336, %104
br label %338
338: ; preds = %337, %99
br label %339
339: ; preds = %338, %94
br label %340
340: ; preds = %339, %89
br label %341
341: ; preds = %340, %84
br label %342
342: ; preds = %341, %78
br label %343
343: ; preds = %342, %72
br label %344
344: ; preds = %343, %67
br label %345
345: ; preds = %344, %62
br label %346
346: ; preds = %345, %57
br label %347
347: ; preds = %346, %52
br label %348
348: ; preds = %347, %44
br label %349
349: ; preds = %348, %40
br label %350
350: ; preds = %349, %13
br label %351
351: ; preds = %350, %8
ret void
}

LLVM IR (-O2):
@.str.2 = [44 x i8] c"Potion of acid resistance (1 hour) [DM 188]\00"
@.str.3 = [44 x i8] c"Potion of cold resistance (1 hour) [DM 188]\00"
@.str.4 = [44 x i8] c"Potion of fire resistance (1 hour) [DM 188]\00"
@.str.5 = [45 x i8] c"Potion of force resistance (1 hour) [DM 188]\00"
@.str.6 = [49 x i8] c"Potion of lightning resistance (1 hour) [DM 188]\00"
@.str.7 = [48 x i8] c"Potion of necrotic resistance (1 hour) [DM 188]\00"
@.str.8 = [46 x i8] c"Potion of poison resistance (1 hour) [DM 188]\00"
@.str.9 = [47 x i8] c"Potion of psychic resistance (1 hour) [DM 188]\00"
@.str.10 = [47 x i8] c"Potion of radiant resistance (1 hour) [DM 188]\00"
@.str.11 = [47 x i8] c"Potion of thunder resistance (1 hour) [DM 188]\00"
@.str.12 = [23 x i8] c"%d +1 Arrows [DM 150]\0A\00"
@.str.17 = [64 x i8] c"'%s' Spell scroll (2nd level) (Save DC 13, +5 Attack) [DM 200]\0A\00"
@.str.18 = [64 x i8] c"'%s' Spell scroll (3rd level) (Save DC 15, +7 Attack) [DM 200]\0A\00"
@.str.58 = [64 x i8] c"'%s' Spell scroll (1nd level) (Save DC 13, +5 Attack) [DM 200]\0A\00"
@.str.59 = [64 x i8] c"'%s' Spell scroll (3nd level) (Save DC 15, +7 Attack) [DM 200]\0A\00"
@str = [82 x i8] c"Wand of secrets (3 charge, find secret doors and traps, regains 1d3/day) [DM 211]\00"
@str.67 = [75 x i8] c"Wand of magic detection (3 charge, detect magic, regains 1d3/day) [DM 211]\00"
@str.68 = [32 x i8] c"Saddle of the cavalier [DM 199]\00"
@str.69 = [49 x i8] c"Rope of climbing (60' silk, 3,000# cap) [DM 197]\00"
@str.70 = [30 x i8] c"Robe of useful items [DM 195]\00"
@str.71 = [13 x i8] c"\09- 2x Dagger\00"
@str.72 = [40 x i8] c"\09- 2x Bullseye lantern (filled and lit)\00"
@str.73 = [19 x i8] c"\09- 2x Steel mirror\00"
@str.74 = [15 x i8] c"\09- 2x 10' pole\00"
@str.75 = [32 x i8] c"\09- 2x Hempen rope (50', coiled)\00"
@str.76 = [11 x i8] c"\09- 2x Sack\00"
@str.77 = [16 x i8] c"\09- Portable ram\00"
@str.78 = [26 x i8] c"\09- Window (2'x4'x2' deep)\00"
@str.79 = [15 x i8] c"\09- 2x Mastiffs\00"
@str.80 = [20 x i8] c"\09- 12' long Rowboat\00"
@str.81 = [33 x i8] c"\09- 4x Potions of Healing (2d4+2)\00"
@str.82 = [23 x i8] c"\09- Pit (10 cubic feet)\00"
@str.83 = [33 x i8] c"\09- Riding horse with Saddle Bags\00"
@str.84 = [21 x i8] c"\09- 24' Wooden Ladder\00"
@str.85 = [17 x i8] c"\09- 10 100gp Gems\00"
@str.86 = [27 x i8] c"\09- Iron Door (10'x10' max)\00"
@str.87 = [34 x i8] c"\09- 500gp Silver coffer (1'x6\22x6\22)\00"
@str.88 = [16 x i8] c"\09- Bag of 100gp\00"
@str.89 = [29 x i8] c"Ring of swimming (40' speed)\00"
@str.90 = [73 x i8] c"Potion of poison (3d6/turn, DC 13 Con for half, save each turn) [DM 188]\00"
@str.91 = [60 x i8] c"Mithral chain shirt medium armor (no disadvantage) [DM 182]\00"
@str.92 = [59 x i8] c"Mariner's light armor (water movement, life vest) [DM 181]\00"
@str.93 = [72 x i8] c"Lantern of revealing (6hr/pint of oil, 30' rad, see invisible) [DM 179]\00"
@str.94 = [35 x i8] c"Immovable rod (8000# cap) [DM 177]\00"
@str.95 = [41 x i8] c"Helm of comprehending languages [DM 173]\00"
@str.96 = [44 x i8] c"Goggles of night (+60' darkvision) [DM 172]\00"
@str.97 = [35 x i8] c"Driftglobe (light source) [DM 166]\00"
@str.98 = [63 x i8] c"Cloak of the manta ray (water movement and breathing) [DM 159]\00"
@str.99 = [32 x i8] c"Cap of water breathing [DM 157]\00"
@str.100 = [54 x i8] c"Alchemy jug (once/day named liquid, see DMG) [DM 150]\00"
@str.101 = [35 x i8] c"Philter of love (see DMG) [DM 184]\00"
@str.102 = [57 x i8] c"Emerald elemental gem (Conjure Water Elemental) [DM 168]\00"
@str.103 = [61 x i8] c"Red corundum elemental gem (Conjure Fire Elemental) [DM 168]\00"
@str.104 = [64 x i8] c"Yellow diamond elemental gem (Conjure Earth Elemental) [DM 168]\00"
@str.105 = [61 x i8] c"Blue sapphire elemental gem (Conjure Air Elemental) [DM 168]\00"
@str.106 = [48 x i8] c"Dust of sneezing and choking (see DMG) [DM 167]\00"
@str.107 = [96 x i8] c"Dust of dryness (1d6+4 pinches, 15 cube feet water to pellet, 10d6 DC 13 Con for half) [DM 166]\00"
@str.108 = [70 x i8] c"Dust of disappearance (Invisibility 10' radius, 2d4 minutes) [DM 166]\00"
@str.109 = [85 x i8] c"Oil of slipperiness (10 min apply, Freedom of Movement or Greese spell, 8h) [DM 184]\00"
@str.110 = [81 x i8] c"Keoghtom's ointment (1d4+1 doses, 2d8+2 healing, cure poison & disease) [DM 179]\00"
@str.111 = [24 x i8] c"Bag of holding [DM 153]\00"
@str.112 = [40 x i8] c"Potion of water breathing (1h) [DM 188]\00"
@str.113 = [53 x i8] c"Potion of growth (1d4 hours, Enlarge spell) [DM 187]\00"
@str.114 = [58 x i8] c"Potion of hill giant strength (1hr, STR 21 (+5)) [DM 187]\00"
@str.115 = [55 x i8] c"Potion of animal friendship (1hr, save DC 13) [DM 187]\00"
@str.116 = [77 x i8] c"Potion of fire breath (3x, 4d6, Dex DC 13 Save for half, 30' range) [DM 187]\00"
@str.117 = [43 x i8] c"Potion of greater healing (4d4 +4 [DM 188]\00"
define void @magictableb() {
%1 = tail call i32 @d(i32 100)
%2 = icmp slt i32 %1, 16
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.117, i64 0, i64 0))
br label %250
5: ; preds = %0
%6 = icmp ult i32 %1, 23
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.116, i64 0, i64 0))
br label %250
9: ; preds = %5
%10 = icmp ult i32 %1, 30
br i1 %10, label %11, label %33
11: ; preds = %9
%12 = tail call i32 @d(i32 10)
switch i32 %12, label %250 [
i32 1, label %13
i32 2, label %15
i32 3, label %17
i32 4, label %19
i32 5, label %21
i32 6, label %23
i32 7, label %25
i32 8, label %27
i32 9, label %29
i32 10, label %31
]
13: ; preds = %11
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
br label %250
15: ; preds = %11
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
br label %250
17: ; preds = %11
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0))
br label %250
19: ; preds = %11
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0))
br label %250
21: ; preds = %11
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
br label %250
23: ; preds = %11
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
br label %250
25: ; preds = %11
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.8, i64 0, i64 0))
br label %250
27: ; preds = %11
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.9, i64 0, i64 0))
br label %250
29: ; preds = %11
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0))
br label %250
31: ; preds = %11
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.11, i64 0, i64 0))
br label %250
33: ; preds = %9
%34 = icmp ult i32 %1, 35
br i1 %34, label %35, label %40
35: ; preds = %33
%36 = tail call i32 @d(i32 6)
%37 = tail call i32 @d(i32 6)
%38 = add nsw i32 %37, %36
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i32 %38)
br label %250
40: ; preds = %33
%41 = icmp ult i32 %1, 40
br i1 %41, label %42, label %44
42: ; preds = %40
%43 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.115, i64 0, i64 0))
br label %250
44: ; preds = %40
%45 = icmp ult i32 %1, 45
br i1 %45, label %46, label %48
46: ; preds = %44
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.114, i64 0, i64 0))
br label %250
48: ; preds = %44
%49 = icmp ult i32 %1, 50
br i1 %49, label %50, label %52
50: ; preds = %48
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.113, i64 0, i64 0))
br label %250
52: ; preds = %48
%53 = icmp ult i32 %1, 55
br i1 %53, label %54, label %56
54: ; preds = %52
%55 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.112, i64 0, i64 0))
br label %250
56: ; preds = %52
%57 = icmp ult i32 %1, 60
br i1 %57, label %58, label %61
58: ; preds = %56
%59 = tail call i8* (...) @rand2lvl()
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.17, i64 0, i64 0), i8* %59)
br label %250
61: ; preds = %56
%62 = icmp ult i32 %1, 65
br i1 %62, label %63, label %66
63: ; preds = %61
%64 = tail call i8* (...) @rand3lvl()
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.18, i64 0, i64 0), i8* %64)
br label %250
66: ; preds = %61
%67 = icmp ult i32 %1, 68
br i1 %67, label %68, label %70
68: ; preds = %66
%69 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.111, i64 0, i64 0))
br label %250
70: ; preds = %66
%71 = icmp ult i32 %1, 71
br i1 %71, label %72, label %74
72: ; preds = %70
%73 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.110, i64 0, i64 0))
br label %250
74: ; preds = %70
%75 = icmp ult i32 %1, 74
br i1 %75, label %76, label %78
76: ; preds = %74
%77 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @str.109, i64 0, i64 0))
br label %250
78: ; preds = %74
%79 = icmp ult i32 %1, 76
br i1 %79, label %80, label %82
80: ; preds = %78
%81 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.108, i64 0, i64 0))
br label %250
82: ; preds = %78
%83 = icmp ult i32 %1, 78
br i1 %83, label %84, label %86
84: ; preds = %82
%85 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str.107, i64 0, i64 0))
br label %250
86: ; preds = %82
%87 = icmp ult i32 %1, 80
br i1 %87, label %88, label %90
88: ; preds = %86
%89 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.106, i64 0, i64 0))
br label %250
90: ; preds = %86
%91 = icmp ult i32 %1, 82
br i1 %91, label %92, label %102
92: ; preds = %90
%93 = tail call i32 @d(i32 4)
switch i32 %93, label %250 [
i32 1, label %94
i32 2, label %96
i32 3, label %98
i32 4, label %100
]
94: ; preds = %92
%95 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.105, i64 0, i64 0))
br label %250
96: ; preds = %92
%97 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.104, i64 0, i64 0))
br label %250
98: ; preds = %92
%99 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.103, i64 0, i64 0))
br label %250
100: ; preds = %92
%101 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.102, i64 0, i64 0))
br label %250
102: ; preds = %90
%103 = icmp ult i32 %1, 84
br i1 %103, label %104, label %106
104: ; preds = %102
%105 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.101, i64 0, i64 0))
br label %250
106: ; preds = %102
%107 = icmp eq i32 %1, 84
br i1 %107, label %108, label %110
108: ; preds = %106
%109 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.100, i64 0, i64 0))
br label %250
110: ; preds = %106
%111 = icmp ult i32 %1, 86
br i1 %111, label %112, label %114
112: ; preds = %110
%113 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.99, i64 0, i64 0))
br label %250
114: ; preds = %110
%115 = icmp eq i32 %1, 86
br i1 %115, label %116, label %118
116: ; preds = %114
%117 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.98, i64 0, i64 0))
br label %250
118: ; preds = %114
%119 = icmp ult i32 %1, 88
br i1 %119, label %120, label %122
120: ; preds = %118
%121 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.97, i64 0, i64 0))
br label %250
122: ; preds = %118
%123 = icmp eq i32 %1, 88
br i1 %123, label %124, label %126
124: ; preds = %122
%125 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.96, i64 0, i64 0))
br label %250
126: ; preds = %122
%127 = icmp ult i32 %1, 90
br i1 %127, label %128, label %130
128: ; preds = %126
%129 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.95, i64 0, i64 0))
br label %250
130: ; preds = %126
%131 = icmp eq i32 %1, 90
br i1 %131, label %132, label %134
132: ; preds = %130
%133 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.94, i64 0, i64 0))
br label %250
134: ; preds = %130
%135 = icmp ult i32 %1, 92
br i1 %135, label %136, label %138
136: ; preds = %134
%137 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.93, i64 0, i64 0))
br label %250
138: ; preds = %134
%139 = icmp eq i32 %1, 92
br i1 %139, label %140, label %142
140: ; preds = %138
%141 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.92, i64 0, i64 0))
br label %250
142: ; preds = %138
%143 = icmp ult i32 %1, 94
br i1 %143, label %144, label %146
144: ; preds = %142
%145 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.91, i64 0, i64 0))
br label %250
146: ; preds = %142
%147 = icmp eq i32 %1, 94
br i1 %147, label %148, label %150
148: ; preds = %146
%149 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.90, i64 0, i64 0))
br label %250
150: ; preds = %146
%151 = icmp ult i32 %1, 96
br i1 %151, label %152, label %154
152: ; preds = %150
%153 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.89, i64 0, i64 0))
br label %250
154: ; preds = %150
%155 = icmp eq i32 %1, 96
br i1 %155, label %156, label %236
156: ; preds = %154
%157 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.70, i64 0, i64 0))
%158 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.71, i64 0, i64 0))
%159 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.72, i64 0, i64 0))
%160 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.73, i64 0, i64 0))
%161 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.74, i64 0, i64 0))
%162 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.75, i64 0, i64 0))
%163 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.76, i64 0, i64 0))
%164 = tail call i32 @d(i32 4)
%165 = tail call i32 @d(i32 4)
%166 = add nsw i32 %165, %164
%167 = tail call i32 @d(i32 4)
%168 = add nsw i32 %166, %167
%169 = tail call i32 @d(i32 4)
%170 = add i32 %168, %169
%171 = icmp sgt i32 %170, 0
br i1 %171, label %172, label %250
172: ; preds = %156, %233
%173 = phi i32 [ %234, %233 ], [ 0, %156 ]
%174 = tail call i32 @d(i32 100)
%175 = icmp slt i32 %174, 9
br i1 %175, label %176, label %178
176: ; preds = %172
%177 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.88, i64 0, i64 0))
br label %233
178: ; preds = %172
%179 = icmp ult i32 %174, 16
br i1 %179, label %180, label %182
180: ; preds = %178
%181 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.87, i64 0, i64 0))
br label %233
182: ; preds = %178
%183 = icmp ult i32 %174, 23
br i1 %183, label %184, label %186
184: ; preds = %182
%185 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.86, i64 0, i64 0))
br label %233
186: ; preds = %182
%187 = icmp ult i32 %174, 31
br i1 %187, label %188, label %190
188: ; preds = %186
%189 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.85, i64 0, i64 0))
br label %233
190: ; preds = %186
%191 = icmp ult i32 %174, 45
br i1 %191, label %192, label %194
192: ; preds = %190
%193 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.84, i64 0, i64 0))
br label %233
194: ; preds = %190
%195 = icmp ult i32 %174, 52
br i1 %195, label %196, label %198
196: ; preds = %194
%197 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.83, i64 0, i64 0))
br label %233
198: ; preds = %194
%199 = icmp ult i32 %174, 60
br i1 %199, label %200, label %202
200: ; preds = %198
%201 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.82, i64 0, i64 0))
br label %233
202: ; preds = %198
%203 = icmp ult i32 %174, 69
br i1 %203, label %204, label %206
204: ; preds = %202
%205 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.81, i64 0, i64 0))
br label %233
206: ; preds = %202
%207 = icmp ult i32 %174, 76
br i1 %207, label %208, label %210
208: ; preds = %206
%209 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.80, i64 0, i64 0))
br label %233
210: ; preds = %206
%211 = icmp ult i32 %174, 84
br i1 %211, label %212, label %223
212: ; preds = %210
%213 = tail call i32 @d(i32 3)
switch i32 %213, label %233 [
i32 1, label %214
i32 2, label %217
i32 3, label %220
]
214: ; preds = %212
%215 = tail call i8* (...) @rand1lvl()
%216 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.58, i64 0, i64 0), i8* %215)
br label %233
217: ; preds = %212
%218 = tail call i8* (...) @rand2lvl()
%219 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.17, i64 0, i64 0), i8* %218)
br label %233
220: ; preds = %212
%221 = tail call i8* (...) @rand3lvl()
%222 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.59, i64 0, i64 0), i8* %221)
br label %233
223: ; preds = %210
%224 = icmp ult i32 %174, 91
br i1 %224, label %225, label %227
225: ; preds = %223
%226 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.79, i64 0, i64 0))
br label %233
227: ; preds = %223
%228 = icmp ult i32 %174, 97
br i1 %228, label %229, label %231
229: ; preds = %227
%230 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.78, i64 0, i64 0))
br label %233
231: ; preds = %227
%232 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.77, i64 0, i64 0))
br label %233
233: ; preds = %176, %184, %192, %200, %208, %225, %231, %229, %214, %217, %220, %212, %204, %196, %188, %180
%234 = add nuw nsw i32 %173, 1
%235 = icmp eq i32 %234, %170
br i1 %235, label %250, label %172
236: ; preds = %154
%237 = icmp ult i32 %1, 98
br i1 %237, label %238, label %240
238: ; preds = %236
%239 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.69, i64 0, i64 0))
br label %250
240: ; preds = %236
%241 = icmp eq i32 %1, 98
br i1 %241, label %242, label %244
242: ; preds = %240
%243 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.68, i64 0, i64 0))
br label %250
244: ; preds = %240
%245 = icmp ult i32 %1, 100
br i1 %245, label %246, label %248
246: ; preds = %244
%247 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.67, i64 0, i64 0))
br label %250
248: ; preds = %244
%249 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str, i64 0, i64 0))
br label %250
250: ; preds = %233, %156, %7, %35, %46, %54, %63, %72, %80, %88, %104, %112, %120, %128, %136, %144, %152, %238, %246, %248, %242, %148, %140, %132, %124, %116, %108, %94, %96, %98, %100, %92, %84, %76, %68, %58, %50, %42, %13, %15, %17, %19, %21, %23, %25, %27, %29, %31, %11, %3
ret void
}