int main() {
  char input[50];
  char cost[50];
  char change[50];
  char display[50];
  int intInput;
  int centsInTill = getTill("till.bin");
  int centsOwed;
  int centsPaid;
  int priceInput;
  int running = 1;
  int action = 10;
  int sellAction = 56;
  printf("\nWelcome to Small POS\n");
  printf("What Would You Like To Do?\n");
  while (running) {
    switch (action) {
    case 10:
      printPrompt(10);
      scanf("%s", input);
      if (isSingleDigit(input)) {
        switch (input[0]) {
        case '0':
          running = 0;
          break;
        case '1':
          action = 12;
          break;
        case '2':
          action = 21;
          break;
        case '3':
          action = 22;
          break;
        case '4':
          action = 23;
          break;
        case '5':
          action = 24;
          break;
        case '6':
          action = 25;
          break;
        case '7':
          action = 26;
          break;
        case '8':
          action = 27;
          break;
        case '9':
          action = 62;
          break;
        default:
          action = 10;
          break;
        }
      }
      break;
    case 12:
      while (sellAction == 56) {
        printPrompt(12);
        scanf("%s", input);
        if (isDollarFormat(input)) {
          sellAction = 43;
          if (input[strlen(input) - 1] == '.') {
            input[strlen(input) - 1] = 0;
            centsOwed = toString(input) * 100;
          } else if (input[strlen(input) - 2] == '.') {
            input[strlen(input) - 2] = input[strlen(input) - 1];
            input[strlen(input) - 1] = 0;
            centsOwed = toString(input) * 10;
          } else if (input[strlen(input) - 3] == '.') {
            input[strlen(input) - 3] = input[strlen(input) - 2];
            input[strlen(input) - 2] = input[strlen(input) - 1];
            input[strlen(input) - 1] = 0;
            centsOwed = toString(input);
          } else {
            printf("unknown error\n");
          }
        } else {
          printf("input error\n");
          action = 10;
          break;
        }
      }
      while (sellAction == 43) {
        dollarFormat(centsOwed, cost);
        printf("\nYou are selling an item costing %s", cost);
        printf("\n");
        printf("How much are you being paid?\n\n>>$");
        scanf("%s", input);
        if (isDollarFormat(input)) {
          if (input[strlen(input) - 1] == '.') {
            input[strlen(input) - 1] = 0;
            centsPaid = toString(input) * 100;
            if (centsPaid >= centsOwed) {
              sellAction = 31;
            } else
              printf("Not enough money\n");
          } else if (input[strlen(input) - 2] == '.') {
            input[strlen(input) - 2] = input[strlen(input) - 1];
            input[strlen(input) - 1] = 0;
            centsPaid = toString(input) * 10;
            if (centsPaid >= centsOwed) {
              sellAction = 31;
            } else
              printf("Not enough money\n");
          } else if (input[strlen(input) - 3] == '.') {
            input[strlen(input) - 3] = input[strlen(input) - 2];
            input[strlen(input) - 2] = input[strlen(input) - 1];
            input[strlen(input) - 1] = 0;
            centsPaid = toString(input);
            if (centsPaid >= centsOwed) {
              sellAction = 31;
            } else
              printf("Not enough money\n");
          } else {
            printf("unknown error\n");
          }
        } else {
          printf("input error\n");
          action = 10;
          break;
        }
      }
      while (sellAction == 31) {
        dollarFormat(centsPaid - centsOwed, change);
        addToTill(centsOwed, &centsInTill, "till.bin");
        printf("\nyour change is %s\n", change);
        action = 10;
        sellAction = 56;
      }
      break;
    case 21:
      printPrompt(21);
      scanf("%s", input);
      if (isDollarFormat(input)) {
        if (input[strlen(input) - 1] == '.') {
          input[strlen(input) - 1] = 0;
          addToTill(toString(input) * 100, &centsInTill, "till.bin");
          action = 10;
        } else if (input[strlen(input) - 2] == '.') {
          input[strlen(input) - 2] = input[strlen(input) - 1];
          input[strlen(input) - 1] = 0;
          addToTill(toString(input) * 10, &centsInTill, "till.bin");
          action = 10;
        } else if (input[strlen(input) - 3] == '.') {
          input[strlen(input) - 3] = input[strlen(input) - 2];
          input[strlen(input) - 2] = input[strlen(input) - 1];
          input[strlen(input) - 1] = 0;
          addToTill(toString(input), &centsInTill, "till.bin");
          action = 10;
        } else {
          printf("unknown error\n");
        }
      } else {
        printf("input error\n");
        action = 10;
      }
      break;
    case 22:
      printPrompt(22);
      scanf("%s", input);
      if (isDollarFormat(input)) {
        if (input[strlen(input) - 1] == '.') {
          input[strlen(input) - 1] = 0;
          if (centsInTill < toString(input) * 100) {
            printf("Not enough money\n");
          } else {
            addToTill(-1 * toString(input) * 100, &centsInTill, "till.bin");
            action = 10;
          }
        } else if (input[strlen(input) - 2] == '.') {
          input[strlen(input) - 2] = input[strlen(input) - 1];
          input[strlen(input) - 1] = 0;
          if (centsInTill < toString(input) * 10) {
            printf("Not enough money\n");
          } else {
            addToTill(-1 * toString(input) * 10, &centsInTill, "till.bin");
            action = 10;
          }
        } else if (input[strlen(input) - 3] == '.') {
          input[strlen(input) - 3] = input[strlen(input) - 2];
          input[strlen(input) - 2] = input[strlen(input) - 1];
          input[strlen(input) - 1] = 0;
          if (centsInTill < toString(input)) {
            printf("Not enough money\n");
          } else {
            addToTill(-1 * toString(input), &centsInTill, "till.bin");
            action = 10;
          }
        } else {
          printf("unknown error\n");
        }
      } else {
        printf("input error\n");
        action = 10;
      }
      break;
    case 23:
      dollarFormat(centsInTill, display);
      printPrompt(23);
      printf("%s in it\n", display);
      action = 10;
      break;
    case 24:
      printf("\n");
      printSKUS("sku.bin", "price.bin");
      action = 10;
      break;
    case 25:
      printPrompt(25);
      scanf("%s", input);
      if (isPlainInt(input)) {
        intInput = toString(input);
      } else {
        printf("input error\n");
        action = 10;
      }
      printf("\nWhat does SKU: %s cost?\n\n>>");
      scanf("%s", input);
      if (isDollarFormat(input)) {
        if (input[strlen(input) - 1] == '.') {
          input[strlen(input) - 1] = 0;
          priceInput = toString(input) * 100;
        } else if (input[strlen(input) - 2] == '.') {
          input[strlen(input) - 2] = input[strlen(input) - 1];
          input[strlen(input) - 1] = 0;
          priceInput = toString(input) * 10;
        } else if (input[strlen(input) - 3] == '.') {
          input[strlen(input) - 3] = input[strlen(input) - 2];
          input[strlen(input) - 2] = input[strlen(input) - 1];
          input[strlen(input) - 1] = 0;
          priceInput = toString(input);
        } else {
          printf("unknown error\n");
          action = 10;
        }
      } else {
        printf("input error\n");
        action = 10;
        break;
      }
      addSKU(intInput, priceInput, "sku.bin", "price.bin");
      action = 10;
      break;
    case 26:
      printPrompt(26);
      scanf("%s", input);
      if (isPlainInt(input)) {
        remSKU(toString(input), "sku.bin", "price.bin");
      } else {
        printf("input error\n");
        action = 10;
        break;
      }
      action = 10;
      break;
    case 27:
      printPrompt(27);
      scanf("%s", input);
      if (isPlainInt(input)) {
        intInput = getPrice(toString(input), "sku.bin", "price.bin");
        if (intInput != 0) {
          dollarFormat(intInput, display);
          printf("\nthe SKU %s costs %s\n", input, display);
        }
        action = 10;
        break;
      } else {
        printf("input error\n");
        action = 10;
        break;
      }
    case 62:
      sellAction = 43;
      action = 12;
      printPrompt(62);
      scanf("%s", input);
      if (isPlainInt(input)) {
        if (getPrice(toString(input), "sku.bin", "price.bin") == 0) {
          action = 10;
        } else {
          centsOwed = getPrice(toString(input), "sku.bin", "price.bin");
        }
      } else {
        printf("input error\n");
        action = 10;
      }
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
lea    0x1ef3(%rip),%rdi
mov    $0x0,%al
call   1030 <getTill@plt>
mov    %eax,-0x108(%rbp)
movl   $0x1,-0x118(%rbp)
movl   $0xa,-0x11c(%rbp)
movl   $0x38,-0x120(%rbp)
lea    0x1eca(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0x1ed3(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
cmpl   $0x0,-0x118(%rbp)
je     226a <main+0x107a>
mov    -0x11c(%rbp),%eax
add    $0xfffffff6,%eax
mov    %eax,%ecx
mov    %rcx,-0x128(%rbp)
sub    $0x34,%eax
ja     2265 <main+0x1075>
mov    -0x128(%rbp),%rax
lea    0x1d7a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0xa,%edi
mov    $0x0,%al
call   10b0 <printPrompt@plt>
lea    -0x40(%rbp),%rsi
lea    0x1ecf(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   10c0 <isSingleDigit@plt>
cmp    $0x0,%eax
je     1396 <main+0x1a6>
movsbl -0x40(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x130(%rbp)
sub    $0x9,%eax
ja     1387 <main+0x197>
mov    -0x130(%rbp),%rax
lea    0x1dec(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x118(%rbp)
jmp    1391 <main+0x1a1>
movl   $0xc,-0x11c(%rbp)
jmp    1391 <main+0x1a1>
movl   $0x15,-0x11c(%rbp)
jmp    1391 <main+0x1a1>
movl   $0x16,-0x11c(%rbp)
jmp    1391 <main+0x1a1>
movl   $0x17,-0x11c(%rbp)
jmp    1391 <main+0x1a1>
movl   $0x18,-0x11c(%rbp)
jmp    1391 <main+0x1a1>
movl   $0x19,-0x11c(%rbp)
jmp    1391 <main+0x1a1>
movl   $0x1a,-0x11c(%rbp)
jmp    1391 <main+0x1a1>
movl   $0x1b,-0x11c(%rbp)
jmp    1391 <main+0x1a1>
movl   $0x3e,-0x11c(%rbp)
jmp    1391 <main+0x1a1>
movl   $0xa,-0x11c(%rbp)
jmp    1396 <main+0x1a6>
jmp    2265 <main+0x1075>
jmp    13a0 <main+0x1b0>
cmpl   $0x38,-0x120(%rbp)
jne    1581 <main+0x391>
mov    $0xc,%edi
mov    $0x0,%al
call   10b0 <printPrompt@plt>
lea    -0x40(%rbp),%rsi
lea    0x1db1(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   10f0 <isDollarFormat@plt>
cmp    $0x0,%eax
je     155f <main+0x36f>
movl   $0x2b,-0x120(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    142f <main+0x23f>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
imul   $0x64,%eax,%eax
mov    %eax,-0x10c(%rbp)
jmp    155a <main+0x36a>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x2,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    14a3 <main+0x2b3>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x131(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x131(%rbp),%cl
sub    $0x2,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
imul   $0xa,%eax,%eax
mov    %eax,-0x10c(%rbp)
jmp    1555 <main+0x365>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x3,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    1542 <main+0x352>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x2,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x133(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x133(%rbp),%cl
sub    $0x3,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x132(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x132(%rbp),%cl
sub    $0x2,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
mov    %eax,-0x10c(%rbp)
jmp    1550 <main+0x360>
lea    0x1bef(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1555 <main+0x365>
jmp    155a <main+0x36a>
jmp    157c <main+0x38c>
lea    0x1be1(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
jmp    1581 <main+0x391>
jmp    13a0 <main+0x1b0>
jmp    1586 <main+0x396>
cmpl   $0x2b,-0x120(%rbp)
jne    181d <main+0x62d>
mov    -0x10c(%rbp),%edi
lea    -0x80(%rbp),%rsi
mov    $0x0,%al
call   1040 <dollarFormat@plt>
lea    -0x80(%rbp),%rsi
lea    0x1ba5(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0x1b79(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0x1bad(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0x1b98(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   10f0 <isDollarFormat@plt>
cmp    $0x0,%eax
je     17fb <main+0x60b>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    166d <main+0x47d>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
imul   $0x64,%eax,%eax
mov    %eax,-0x110(%rbp)
mov    -0x110(%rbp),%eax
cmp    -0x10c(%rbp),%eax
jl     165a <main+0x46a>
movl   $0x1f,-0x120(%rbp)
jmp    1668 <main+0x478>
lea    0x1b39(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    17f6 <main+0x606>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x2,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    1710 <main+0x520>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x134(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x134(%rbp),%cl
sub    $0x2,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
imul   $0xa,%eax,%eax
mov    %eax,-0x110(%rbp)
mov    -0x110(%rbp),%eax
cmp    -0x10c(%rbp),%eax
jl     16fd <main+0x50d>
movl   $0x1f,-0x120(%rbp)
jmp    170b <main+0x51b>
lea    0x1a96(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    17f1 <main+0x601>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x3,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    17de <main+0x5ee>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x2,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x136(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x136(%rbp),%cl
sub    $0x3,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x135(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x135(%rbp),%cl
sub    $0x2,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
mov    %eax,-0x110(%rbp)
mov    -0x110(%rbp),%eax
cmp    -0x10c(%rbp),%eax
jl     17cb <main+0x5db>
movl   $0x1f,-0x120(%rbp)
jmp    17d9 <main+0x5e9>
lea    0x19c8(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    17ec <main+0x5fc>
lea    0x1953(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    17f1 <main+0x601>
jmp    17f6 <main+0x606>
jmp    1818 <main+0x628>
lea    0x1945(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
jmp    181d <main+0x62d>
jmp    1586 <main+0x396>
jmp    1822 <main+0x632>
cmpl   $0x1f,-0x120(%rbp)
jne    1892 <main+0x6a2>
mov    -0x110(%rbp),%edi
sub    -0x10c(%rbp),%edi
lea    -0xc0(%rbp),%rsi
mov    $0x0,%al
call   1040 <dollarFormat@plt>
mov    -0x10c(%rbp),%edi
lea    -0x108(%rbp),%rsi
lea    0x189f(%rip),%rdx
mov    $0x0,%al
call   1070 <addToTill@plt>
lea    -0xc0(%rbp),%rsi
lea    0x193a(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
movl   $0x38,-0x120(%rbp)
jmp    1822 <main+0x632>
jmp    2265 <main+0x1075>
mov    $0x15,%edi
mov    $0x0,%al
call   10b0 <printPrompt@plt>
lea    -0x40(%rbp),%rsi
lea    0x18c7(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   10f0 <isDollarFormat@plt>
cmp    $0x0,%eax
je     1a8c <main+0x89c>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    1928 <main+0x738>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
imul   $0x64,%eax,%edi
lea    -0x108(%rbp),%rsi
lea    0x17ea(%rip),%rdx
mov    $0x0,%al
call   1070 <addToTill@plt>
movl   $0xa,-0x11c(%rbp)
jmp    1a87 <main+0x897>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x2,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    19b5 <main+0x7c5>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x137(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x137(%rbp),%cl
sub    $0x2,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
imul   $0xa,%eax,%edi
lea    -0x108(%rbp),%rsi
lea    0x175d(%rip),%rdx
mov    $0x0,%al
call   1070 <addToTill@plt>
movl   $0xa,-0x11c(%rbp)
jmp    1a82 <main+0x892>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x3,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    1a6f <main+0x87f>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x2,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x139(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x139(%rbp),%cl
sub    $0x3,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x138(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x138(%rbp),%cl
sub    $0x2,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
mov    %eax,%edi
lea    -0x108(%rbp),%rsi
lea    0x16a3(%rip),%rdx
mov    $0x0,%al
call   1070 <addToTill@plt>
movl   $0xa,-0x11c(%rbp)
jmp    1a7d <main+0x88d>
lea    0x16c2(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1a82 <main+0x892>
jmp    1a87 <main+0x897>
jmp    1aa4 <main+0x8b4>
lea    0x16b4(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
jmp    2265 <main+0x1075>
mov    $0x16,%edi
mov    $0x0,%al
call   10b0 <printPrompt@plt>
lea    -0x40(%rbp),%rsi
lea    0x16b5(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   10f0 <isDollarFormat@plt>
cmp    $0x0,%eax
je     1d62 <main+0xb72>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    1b7d <main+0x98d>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
mov    -0x108(%rbp),%eax
mov    %eax,-0x140(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
mov    %eax,%ecx
mov    -0x140(%rbp),%eax
imul   $0x64,%ecx,%ecx
cmp    %ecx,%eax
jge    1b45 <main+0x955>
lea    0x1661(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1b78 <main+0x988>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
imul   $0xffffffff,%eax,%eax
imul   $0x64,%eax,%edi
lea    -0x108(%rbp),%rsi
lea    0x1595(%rip),%rdx
mov    $0x0,%al
call   1070 <addToTill@plt>
movl   $0xa,-0x11c(%rbp)
jmp    1d5d <main+0xb6d>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x2,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    1c4d <main+0xa5d>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x145(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x145(%rbp),%cl
sub    $0x2,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
mov    -0x108(%rbp),%eax
mov    %eax,-0x144(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
mov    %eax,%ecx
mov    -0x144(%rbp),%eax
imul   $0xa,%ecx,%ecx
cmp    %ecx,%eax
jge    1c15 <main+0xa25>
lea    0x1591(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1c48 <main+0xa58>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
imul   $0xffffffff,%eax,%eax
imul   $0xa,%eax,%edi
lea    -0x108(%rbp),%rsi
lea    0x14c5(%rip),%rdx
mov    $0x0,%al
call   1070 <addToTill@plt>
movl   $0xa,-0x11c(%rbp)
jmp    1d58 <main+0xb68>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x3,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    1d45 <main+0xb55>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x2,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x14e(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x14e(%rbp),%cl
sub    $0x3,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x14d(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x14d(%rbp),%cl
sub    $0x2,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
mov    -0x108(%rbp),%eax
mov    %eax,-0x14c(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
mov    %eax,%ecx
mov    -0x14c(%rbp),%eax
cmp    %ecx,%eax
jge    1d10 <main+0xb20>
lea    0x1496(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1d40 <main+0xb50>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
imul   $0xffffffff,%eax,%edi
lea    -0x108(%rbp),%rsi
lea    0x13cd(%rip),%rdx
mov    $0x0,%al
call   1070 <addToTill@plt>
movl   $0xa,-0x11c(%rbp)
jmp    1d53 <main+0xb63>
lea    0x13ec(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1d58 <main+0xb68>
jmp    1d5d <main+0xb6d>
jmp    1d7a <main+0xb8a>
lea    0x13de(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
jmp    2265 <main+0x1075>
mov    -0x108(%rbp),%edi
lea    -0x100(%rbp),%rsi
mov    $0x0,%al
call   1040 <dollarFormat@plt>
mov    $0x17,%edi
mov    $0x0,%al
call   10b0 <printPrompt@plt>
lea    -0x100(%rbp),%rsi
lea    0x1413(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
jmp    2265 <main+0x1075>
lea    0x136c(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0x13f2(%rip),%rdi
lea    0x13f3(%rip),%rsi
mov    $0x0,%al
call   10a0 <printSKUS@plt>
movl   $0xa,-0x11c(%rbp)
jmp    2265 <main+0x1075>
mov    $0x19,%edi
mov    $0x0,%al
call   10b0 <printPrompt@plt>
lea    -0x40(%rbp),%rsi
lea    0x1369(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1100 <isPlainInt@plt>
cmp    $0x0,%eax
je     1e3d <main+0xc4d>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
mov    %eax,-0x104(%rbp)
jmp    1e55 <main+0xc65>
lea    0x1303(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
lea    0x1380(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0x1307(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   10f0 <isDollarFormat@plt>
cmp    $0x0,%eax
je     2009 <main+0xe19>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    1ecf <main+0xcdf>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
imul   $0x64,%eax,%eax
mov    %eax,-0x114(%rbp)
jmp    2004 <main+0xe14>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x2,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    1f43 <main+0xd53>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x14f(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x14f(%rbp),%cl
sub    $0x2,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
imul   $0xa,%eax,%eax
mov    %eax,-0x114(%rbp)
jmp    1fff <main+0xe0f>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x3,%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x2e,%eax
jne    1fe2 <main+0xdf2>
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x2,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x151(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x151(%rbp),%cl
sub    $0x3,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x150(%rbp)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x150(%rbp),%cl
sub    $0x2,%rax
mov    %cl,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
sub    $0x1,%rax
movb   $0x0,-0x40(%rbp,%rax,1)
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
mov    %eax,-0x114(%rbp)
jmp    1ffa <main+0xe0a>
lea    0x114f(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
jmp    1fff <main+0xe0f>
jmp    2004 <main+0xe14>
jmp    2026 <main+0xe36>
lea    0x1137(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
jmp    2265 <main+0x1075>
mov    -0x104(%rbp),%edi
mov    -0x114(%rbp),%esi
lea    0x1191(%rip),%rdx
lea    0x1192(%rip),%rcx
mov    $0x0,%al
call   10e0 <addSKU@plt>
movl   $0xa,-0x11c(%rbp)
jmp    2265 <main+0x1075>
mov    $0x1a,%edi
mov    $0x0,%al
call   10b0 <printPrompt@plt>
lea    -0x40(%rbp),%rsi
lea    0x1108(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1100 <isPlainInt@plt>
cmp    $0x0,%eax
je     20af <main+0xebf>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
mov    %eax,%edi
lea    0x112e(%rip),%rsi
lea    0x112f(%rip),%rdx
mov    $0x0,%al
call   1090 <remSKU@plt>
jmp    20cc <main+0xedc>
lea    0x1091(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
jmp    2265 <main+0x1075>
movl   $0xa,-0x11c(%rbp)
jmp    2265 <main+0x1075>
mov    $0x1b,%edi
mov    $0x0,%al
call   10b0 <printPrompt@plt>
lea    -0x40(%rbp),%rsi
lea    0x1083(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1100 <isPlainInt@plt>
cmp    $0x0,%eax
je     217e <main+0xf8e>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
mov    %eax,%edi
lea    0x10a9(%rip),%rsi
lea    0x10aa(%rip),%rdx
mov    $0x0,%al
call   1110 <getPrice@plt>
mov    %eax,-0x104(%rbp)
cmpl   $0x0,-0x104(%rbp)
je     216f <main+0xf7f>
mov    -0x104(%rbp),%edi
lea    -0x100(%rbp),%rsi
mov    $0x0,%al
call   1040 <dollarFormat@plt>
lea    -0x40(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    0x1091(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
jmp    2265 <main+0x1075>
lea    0xfc2(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
jmp    2265 <main+0x1075>
movl   $0x2b,-0x120(%rbp)
movl   $0xc,-0x11c(%rbp)
mov    $0x3e,%edi
mov    $0x0,%al
call   10b0 <printPrompt@plt>
lea    -0x40(%rbp),%rsi
lea    0xfaf(%rip),%rdi
mov    $0x0,%al
call   10d0 <scanf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1100 <isPlainInt@plt>
cmp    $0x0,%eax
je     2248 <main+0x1058>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
mov    %eax,%edi
lea    0xfd5(%rip),%rsi
lea    0xfd6(%rip),%rdx
mov    $0x0,%al
call   1110 <getPrice@plt>
cmp    $0x0,%eax
jne    221b <main+0x102b>
movl   $0xa,-0x11c(%rbp)
jmp    2243 <main+0x1053>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <toString@plt>
mov    %eax,%edi
lea    0xf9b(%rip),%rsi
lea    0xf9c(%rip),%rdx
mov    $0x0,%al
call   1110 <getPrice@plt>
mov    %eax,-0x10c(%rbp)
jmp    2260 <main+0x1070>
lea    0xef8(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movl   $0xa,-0x11c(%rbp)
jmp    2265 <main+0x1075>
jmp    1250 <main+0x60>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1040 <getTill@plt>
mov    %eax,0xc(%rsp)
lea    0xf74(%rip),%rdi
call   1050 <puts@plt>
lea    0xf7e(%rip),%rdi
call   1050 <puts@plt>
mov    $0xa,%r12d
movl   $0x38,0x10(%rsp)
lea    0xda0(%rip),%rbp
lea    0xebf(%rip),%r15
lea    0x20(%rsp),%r14
lea    0xef6(%rip),%rbx
jmp    1290 <main+0x80>
lea    0xf74(%rip),%rdi
call   1050 <puts@plt>
mov    $0xa,%r12d
nopw   0x0(%rax,%rax,1)
lea    -0xa(%r12),%eax
cmp    $0x34,%eax
ja     1290 <main+0x80>
movslq 0x0(%rbp,%rax,4),%rax
add    %rbp,%rax
jmp    *%rax
mov    $0xa,%r12d
mov    $0xa,%edi
xor    %eax,%eax
call   10d0 <printPrompt@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   10e0 <isSingleDigit@plt>
test   %eax,%eax
je     1290 <main+0x80>
movsbl 0x20(%rsp),%eax
add    $0xffffffd0,%eax
cmp    $0x9,%eax
ja     1290 <main+0x80>
mov    $0xc,%r12d
lea    0xde9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x15,%r12d
jmp    1290 <main+0x80>
mov    0x10(%rsp),%eax
cmp    $0x2b,%eax
je     16de <main+0x4ce>
mov    $0xc,%r12d
cmp    $0x38,%eax
jne    1290 <main+0x80>
mov    $0xc,%edi
xor    %eax,%eax
call   10d0 <printPrompt@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1110 <isDollarFormat@plt>
test   %eax,%eax
je     18e2 <main+0x6d2>
mov    %r14,%rdi
call   1080 <strlen@plt>
mov    -0x1(%rax,%r14,1),%cl
cmp    $0x2e,%cl
jne    1901 <main+0x6f1>
movb   $0x0,0x1f(%rsp,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
imul   $0x64,%eax,%edi
jmp    1930 <main+0x720>
mov    $0x15,%edi
xor    %eax,%eax
call   10d0 <printPrompt@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1110 <isDollarFormat@plt>
test   %eax,%eax
je     1275 <main+0x65>
mov    %r14,%rdi
call   1080 <strlen@plt>
mov    -0x1(%rax,%r14,1),%cl
cmp    $0x2e,%cl
jne    16fa <main+0x4ea>
movb   $0x0,0x1f(%rsp,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
imul   $0x64,%eax,%edi
jmp    181e <main+0x60e>
mov    $0x16,%edi
xor    %eax,%eax
call   10d0 <printPrompt@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1110 <isDollarFormat@plt>
test   %eax,%eax
je     1275 <main+0x65>
mov    %r14,%rdi
call   1080 <strlen@plt>
mov    -0x1(%rax,%r14,1),%cl
cmp    $0x2e,%cl
jne    172e <main+0x51e>
movb   $0x0,0x1f(%rsp,%rax,1)
mov    0xc(%rsp),%ebp
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
imul   $0x64,%eax,%eax
cmp    %eax,%ebp
jge    17b7 <main+0x5a7>
lea    0xdb1(%rip),%rdi
jmp    1885 <main+0x675>
mov    0xc(%rsp),%edi
lea    0xa0(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <dollarFormat@plt>
mov    $0x17,%edi
xor    %eax,%eax
call   10d0 <printPrompt@plt>
lea    0xd03(%rip),%rdi
mov    %rbx,%rsi
lea    0xd03(%rip),%rbx
xor    %eax,%eax
call   10a0 <printf@plt>
mov    $0xa,%r12d
jmp    1290 <main+0x80>
mov    $0xa,%r12d
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
lea    0xcdf(%rip),%rsi
xor    %eax,%eax
call   10c0 <printSKUS@plt>
jmp    1290 <main+0x80>
mov    $0x19,%edi
xor    %eax,%eax
call   10d0 <printPrompt@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1120 <isPlainInt@plt>
test   %eax,%eax
je     1659 <main+0x449>
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
mov    %eax,0x18(%rsp)
jmp    1665 <main+0x455>
mov    $0x1a,%edi
xor    %eax,%eax
call   10d0 <printPrompt@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1120 <isPlainInt@plt>
test   %eax,%eax
je     1275 <main+0x65>
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
mov    %eax,%edi
mov    %rbx,%rsi
lea    0xc54(%rip),%rdx
xor    %eax,%eax
call   10b0 <remSKU@plt>
mov    $0xa,%r12d
jmp    1290 <main+0x80>
mov    $0x1b,%edi
xor    %eax,%eax
call   10d0 <printPrompt@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1120 <isPlainInt@plt>
test   %eax,%eax
je     1275 <main+0x65>
movl   $0x0,0x18(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
mov    %eax,%edi
mov    %rbx,%rsi
lea    0xbf9(%rip),%rdx
xor    %eax,%eax
call   1130 <getPrice@plt>
mov    $0xa,%r12d
test   %eax,%eax
je     1290 <main+0x80>
mov    %eax,%r13d
mov    %eax,%edi
lea    0xa0(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <dollarFormat@plt>
lea    0xbed(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
lea    0xbb1(%rip),%rbx
xor    %eax,%eax
call   10a0 <printf@plt>
mov    $0xa,%r12d
mov    %r13d,0x18(%rsp)
jmp    1290 <main+0x80>
mov    $0x3e,%edi
xor    %eax,%eax
call   10d0 <printPrompt@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1120 <isPlainInt@plt>
test   %eax,%eax
je     16bf <main+0x4af>
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
mov    %eax,%edi
mov    %rbx,%rsi
lea    0xb61(%rip),%rdx
xor    %eax,%eax
call   1130 <getPrice@plt>
movl   $0x2b,0x10(%rsp)
mov    $0xa,%r12d
test   %eax,%eax
je     1290 <main+0x80>
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
mov    %eax,%edi
mov    %rbx,%rsi
lea    0xb2e(%rip),%rdx
xor    %eax,%eax
call   1130 <getPrice@plt>
mov    %eax,0x14(%rsp)
mov    $0xc,%r12d
jmp    1290 <main+0x80>
lea    0xb90(%rip),%rdi
call   1050 <puts@plt>
lea    0xb0f(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1110 <isDollarFormat@plt>
test   %eax,%eax
je     1275 <main+0x65>
mov    %r14,%rdi
call   1080 <strlen@plt>
mov    -0x1(%rax,%r14,1),%cl
cmp    $0x2e,%cl
jne    1783 <main+0x573>
movb   $0x0,0x1f(%rsp,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
imul   $0x64,%eax,%eax
jmp    1b94 <main+0x984>
lea    0xb2a(%rip),%rdi
call   1050 <puts@plt>
movl   $0x2b,0x10(%rsp)
mov    $0xa,%r12d
jmp    1290 <main+0x80>
lea    0x60(%rsp),%rbp
lea    0xa1b(%rip),%r12
lea    0xa38(%rip),%rbx
mov    0x14(%rsp),%edi
jmp    1943 <main+0x733>
mov    -0x2(%rax,%r14,1),%dl
cmp    $0x2e,%dl
jne    17e2 <main+0x5d2>
mov    %cl,0x1e(%rsp,%rax,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
movb   $0x0,-0x1(%rax,%r14,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%edi
jmp    181e <main+0x60e>
mov    -0x2(%rax,%r14,1),%dl
cmp    $0x2e,%dl
lea    0xaa2(%rip),%r12
jne    183c <main+0x62c>
mov    %cl,0x1e(%rsp,%rax,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
movb   $0x0,-0x1(%rax,%r14,1)
mov    0xc(%rsp),%ebp
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%eax
cmp    %eax,%ebp
jl     1882 <main+0x672>
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%edi
neg    %edi
jmp    17c4 <main+0x5b4>
mov    -0x2(%rax,%r14,1),%dl
cmp    $0x2e,%dl
jne    18a3 <main+0x693>
mov    %cl,0x1e(%rsp,%rax,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
movb   $0x0,-0x1(%rax,%r14,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%eax
jmp    1b94 <main+0x984>
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
imul   $0xffffff9c,%eax,%edi
lea    0xc(%rsp),%rsi
lea    0x92c(%rip),%rdx
xor    %eax,%eax
call   1090 <addToTill@plt>
mov    $0xa,%r12d
jmp    1890 <main+0x680>
cmpb   $0x2e,-0x3(%rax,%r14,1)
jne    1b56 <main+0x946>
mov    %dl,0x1d(%rsp,%rax,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
mov    -0x1(%rax,%r14,1),%cl
mov    %cl,-0x2(%rax,%r14,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
movb   $0x0,-0x1(%rax,%r14,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
mov    %eax,%edi
lea    0xc(%rsp),%rsi
lea    0x8d2(%rip),%rdx
xor    %eax,%eax
call   1090 <addToTill@plt>
mov    $0xa,%r12d
jmp    1290 <main+0x80>
cmpb   $0x2e,-0x3(%rax,%r14,1)
jne    1b6d <main+0x95d>
mov    %dl,0x1d(%rsp,%rax,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
mov    -0x1(%rax,%r14,1),%cl
mov    %cl,-0x2(%rax,%r14,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
movb   $0x0,-0x1(%rax,%r14,1)
mov    0xc(%rsp),%ebp
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
cmp    %eax,%ebp
jge    1c57 <main+0xa47>
mov    %r12,%rdi
call   1050 <puts@plt>
mov    $0x16,%r12d
lea    0x88f(%rip),%r15
lea    0x762(%rip),%rbp
jmp    1290 <main+0x80>
cmpb   $0x2e,-0x3(%rax,%r14,1)
jne    1b84 <main+0x974>
mov    %dl,0x1d(%rsp,%rax,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
mov    -0x1(%rax,%r14,1),%cl
mov    %cl,-0x2(%rax,%r14,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
movb   $0x0,-0x1(%rax,%r14,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
jmp    1b94 <main+0x984>
lea    0x907(%rip),%rdi
call   1050 <puts@plt>
movl   $0x38,0x10(%rsp)
mov    $0xa,%r12d
jmp    1290 <main+0x80>
mov    -0x2(%rax,%r14,1),%dl
cmp    $0x2e,%dl
jne    1c07 <main+0x9f7>
mov    %cl,0x1e(%rsp,%rax,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
movb   $0x0,-0x1(%rax,%r14,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%edi
lea    0x60(%rsp),%rbp
lea    0x7c9(%rip),%r12
lea    0x7e6(%rip),%rbx
mov    %edi,0x14(%rsp)
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <dollarFormat@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1110 <isDollarFormat@plt>
test   %eax,%eax
je     1b29 <main+0x919>
mov    %r15,%r13
jmp    1a1c <main+0x80c>
nopl   0x0(%rax)
movb   $0x0,0x1f(%rsp,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
imul   $0x64,%eax,%eax
lea    0x826(%rip),%rdi
mov    0x14(%rsp),%r15d
cmp    %r15d,%eax
jge    1ac7 <main+0x8b7>
call   1050 <puts@plt>
mov    %r15d,%edi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <dollarFormat@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    %r13,%r15
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10f0 <scanf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1110 <isDollarFormat@plt>
test   %eax,%eax
je     1b29 <main+0x919>
mov    %r14,%rdi
call   1080 <strlen@plt>
movzbl -0x1(%rax,%r14,1),%ecx
cmp    $0x2e,%cl
je     19a0 <main+0x790>
movzbl -0x2(%rax,%r14,1),%edx
cmp    $0x2e,%dl
jne    1a70 <main+0x860>
mov    %cl,0x1e(%rsp,%rax,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
movb   $0x0,-0x1(%rax,%r14,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%eax
jmp    19b2 <main+0x7a2>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x2e,-0x3(%rax,%r14,1)
lea    0x77f(%rip),%rdi
mov    0x14(%rsp),%r15d
jne    19c7 <main+0x7b7>
mov    %dl,0x1d(%rsp,%rax,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
movzbl -0x1(%rax,%r14,1),%ecx
mov    %cl,-0x2(%rax,%r14,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
movb   $0x0,-0x1(%rax,%r14,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
lea    0x721(%rip),%rdi
cmp    %r15d,%eax
jl     19c7 <main+0x7b7>
sub    %r15d,%eax
mov    %eax,%edi
lea    0xe0(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <dollarFormat@plt>
mov    %r15d,%edi
lea    0xc(%rsp),%rsi
lea    0x60f(%rip),%rdx
xor    %eax,%eax
call   1090 <addToTill@plt>
lea    0x650(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10a0 <printf@plt>
movl   $0x38,0x10(%rsp)
mov    $0xa,%r12d
lea    0x4e6(%rip),%rbp
lea    0x648(%rip),%rbx
mov    %r13,%r15
jmp    1290 <main+0x80>
lea    0x6c0(%rip),%rdi
call   1050 <puts@plt>
movl   $0x2b,0x10(%rsp)
mov    $0xa,%r12d
lea    0x4b6(%rip),%rbp
lea    0x618(%rip),%rbx
jmp    1290 <main+0x80>
lea    0x69f(%rip),%rdi
call   1050 <puts@plt>
mov    $0x15,%r12d
jmp    1290 <main+0x80>
lea    0x688(%rip),%rdi
call   1050 <puts@plt>
mov    $0x16,%r12d
jmp    1290 <main+0x80>
lea    0x671(%rip),%rdi
call   1050 <puts@plt>
mov    0x1c(%rsp),%eax
mov    0x18(%rsp),%edi
mov    %eax,0x1c(%rsp)
mov    %eax,%esi
mov    %rbx,%rdx
lea    0x5c9(%rip),%rcx
xor    %eax,%eax
call   1100 <addSKU@plt>
mov    $0xa,%r12d
jmp    1290 <main+0x80>
mov    $0x16,%r12d
jmp    1290 <main+0x80>
mov    $0x17,%r12d
jmp    1290 <main+0x80>
mov    $0x18,%r12d
jmp    1290 <main+0x80>
mov    $0x19,%r12d
jmp    1290 <main+0x80>
mov    $0x1a,%r12d
jmp    1290 <main+0x80>
mov    $0x1b,%r12d
jmp    1290 <main+0x80>
mov    $0x3e,%r12d
jmp    1290 <main+0x80>
cmpb   $0x2e,-0x3(%rax,%r14,1)
lea    0x60(%rsp),%rbp
lea    0x4ec(%rip),%r12
lea    0x509(%rip),%rbx
jne    1c6a <main+0xa5a>
mov    %dl,0x1d(%rsp,%rax,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
mov    -0x1(%rax,%r14,1),%cl
mov    %cl,-0x2(%rax,%r14,1)
mov    %r14,%rdi
call   1080 <strlen@plt>
movb   $0x0,-0x1(%rax,%r14,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
mov    %eax,%edi
jmp    1943 <main+0x733>
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <toString@plt>
neg    %eax
mov    %eax,%edi
jmp    17c4 <main+0x5b4>
lea    0x58b(%rip),%rdi
call   1050 <puts@plt>
jmp    16f1 <main+0x4e1>
xor    %eax,%eax
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"till.bin\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.6 = [36 x i8] c"\0AYou are selling an item costing %s\00"
@.str.8 = [34 x i8] c"How much are you being paid?\0A\0A>>$\00"
@.str.10 = [20 x i8] c"\0Ayour change is %s\0A\00"
@.str.11 = [10 x i8] c"%s in it\0A\00"
@.str.12 = [8 x i8] c"sku.bin\00"
@.str.13 = [10 x i8] c"price.bin\00"
@.str.14 = [29 x i8] c"\0AWhat does SKU: %s cost?\0A\0A>>\00"
@.str.15 = [22 x i8] c"\0Athe SKU %s costs %s\0A\00"
@str = [22 x i8] c"\0AWelcome to Small POS\00"
@str.16 = [27 x i8] c"What Would You Like To Do?\00"
@str.34 = [17 x i8] c"Not enough money\00"
@str.35 = [12 x i8] c"input error\00"
@str.36 = [14 x i8] c"unknown error\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = alloca [50 x i8]
%3 = alloca [50 x i8]
%4 = alloca [50 x i8]
%5 = alloca i32
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%10 = bitcast i32* %5 to i8*
%11 = tail call i32 (i8*, ...) bitcast (i32 (...)* @getTill to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %11, i32* %5
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.16, i64 0, i64 0))
br label %14
14: ; preds = %22, %0
%15 = phi i32 [ 56, %0 ], [ %23, %22 ]
%16 = phi i32 [ 10, %0 ], [ %24, %22 ]
%17 = phi i32 [ undef, %0 ], [ %25, %22 ]
%18 = phi i32 [ undef, %0 ], [ %26, %22 ]
%19 = phi i32 [ undef, %0 ], [ %27, %22 ]
%20 = phi i32 [ undef, %0 ], [ %28, %22 ]
switch i32 %16, label %22 [
i32 10, label %29
i32 12, label %21
i32 21, label %160
i32 22, label %208
i32 23, label %277
i32 24, label %282
i32 25, label %285
i32 26, label %343
i32 27, label %353
i32 62, label %367
]
21: ; preds = %14
switch i32 %15, label %22 [
i32 56, label %46
i32 43, label %91
]
22: ; preds = %21, %89, %140, %34, %154, %372, %358, %362, %379, %376, %275, %245, %243, %267, %269, %273, %224, %226, %206, %180, %204, %192, %171, %29, %45, %44, %43, %42, %41, %40, %39, %38, %37, %14, %365, %348, %351, %340, %338, %282, %277
%23 = phi i32 [ %15, %14 ], [ 43, %376 ], [ 43, %379 ], [ %15, %365 ], [ %15, %348 ], [ %15, %351 ], [ %15, %340 ], [ %15, %338 ], [ %15, %282 ], [ %15, %277 ], [ %15, %224 ], [ %15, %226 ], [ %15, %243 ], [ %15, %245 ], [ %15, %267 ], [ %15, %269 ], [ %15, %273 ], [ %15, %275 ], [ %15, %171 ], [ %15, %180 ], [ %15, %192 ], [ %15, %204 ], [ %15, %206 ], [ %15, %45 ], [ %15, %44 ], [ %15, %43 ], [ %15, %42 ], [ %15, %41 ], [ %15, %40 ], [ %15, %39 ], [ %15, %38 ], [ %15, %37 ], [ %15, %29 ], [ %15, %362 ], [ %15, %358 ], [ 43, %372 ], [ 56, %154 ], [ %15, %34 ], [ 43, %140 ], [ 56, %89 ], [ %15, %21 ]
%24 = phi i32 [ %16, %14 ], [ 12, %376 ], [ 10, %379 ], [ 10, %365 ], [ 10, %348 ], [ 10, %351 ], [ 10, %340 ], [ 10, %338 ], [ 10, %282 ], [ 10, %277 ], [ 22, %224 ], [ 10, %226 ], [ 22, %243 ], [ 10, %245 ], [ 22, %267 ], [ 10, %269 ], [ 22, %273 ], [ 10, %275 ], [ 10, %171 ], [ 10, %180 ], [ 10, %192 ], [ 21, %204 ], [ 10, %206 ], [ 10, %45 ], [ 62, %44 ], [ 27, %43 ], [ 26, %42 ], [ 25, %41 ], [ 24, %40 ], [ 23, %39 ], [ 22, %38 ], [ 21, %37 ], [ 10, %29 ], [ 10, %362 ], [ 10, %358 ], [ 10, %372 ], [ 10, %154 ], [ 12, %34 ], [ 10, %140 ], [ 10, %89 ], [ 12, %21 ]
%25 = phi i32 [ %17, %14 ], [ %17, %376 ], [ %17, %379 ], [ %17, %365 ], [ %17, %348 ], [ %17, %351 ], [ %341, %340 ], [ %17, %338 ], [ %17, %282 ], [ %17, %277 ], [ %17, %224 ], [ %17, %226 ], [ %17, %243 ], [ %17, %245 ], [ %17, %267 ], [ %17, %269 ], [ %17, %273 ], [ %17, %275 ], [ %17, %171 ], [ %17, %180 ], [ %17, %192 ], [ %17, %204 ], [ %17, %206 ], [ %17, %45 ], [ %17, %44 ], [ %17, %43 ], [ %17, %42 ], [ %17, %41 ], [ %17, %40 ], [ %17, %39 ], [ %17, %38 ], [ %17, %37 ], [ %17, %29 ], [ %17, %362 ], [ %17, %358 ], [ %17, %372 ], [ %17, %154 ], [ %17, %34 ], [ %17, %140 ], [ %17, %89 ], [ %17, %21 ]
%26 = phi i32 [ %18, %14 ], [ %18, %376 ], [ %18, %379 ], [ %18, %365 ], [ %18, %348 ], [ %18, %351 ], [ %18, %340 ], [ %18, %338 ], [ %18, %282 ], [ %18, %277 ], [ %18, %224 ], [ %18, %226 ], [ %18, %243 ], [ %18, %245 ], [ %18, %267 ], [ %18, %269 ], [ %18, %273 ], [ %18, %275 ], [ %18, %171 ], [ %18, %180 ], [ %18, %192 ], [ %18, %204 ], [ %18, %206 ], [ %18, %45 ], [ %18, %44 ], [ %18, %43 ], [ %18, %42 ], [ %18, %41 ], [ %18, %40 ], [ %18, %39 ], [ %18, %38 ], [ %18, %37 ], [ %18, %29 ], [ %18, %362 ], [ %18, %358 ], [ %18, %372 ], [ %155, %154 ], [ %18, %34 ], [ %141, %140 ], [ %18, %89 ], [ %18, %21 ]
%27 = phi i32 [ %19, %14 ], [ %378, %376 ], [ %19, %379 ], [ %19, %365 ], [ %19, %348 ], [ %19, %351 ], [ %19, %340 ], [ %19, %338 ], [ %19, %282 ], [ %19, %277 ], [ %19, %224 ], [ %19, %226 ], [ %19, %243 ], [ %19, %245 ], [ %19, %267 ], [ %19, %269 ], [ %19, %273 ], [ %19, %275 ], [ %19, %171 ], [ %19, %180 ], [ %19, %192 ], [ %19, %204 ], [ %19, %206 ], [ %19, %45 ], [ %19, %44 ], [ %19, %43 ], [ %19, %42 ], [ %19, %41 ], [ %19, %40 ], [ %19, %39 ], [ %19, %38 ], [ %19, %37 ], [ %19, %29 ], [ %19, %362 ], [ %19, %358 ], [ %19, %372 ], [ %92, %154 ], [ %19, %34 ], [ %92, %140 ], [ %19, %89 ], [ %19, %21 ]
%28 = phi i32 [ %20, %14 ], [ %20, %376 ], [ %20, %379 ], [ %20, %365 ], [ %20, %348 ], [ %20, %351 ], [ %295, %340 ], [ %295, %338 ], [ %20, %282 ], [ %20, %277 ], [ %20, %224 ], [ %20, %226 ], [ %20, %243 ], [ %20, %245 ], [ %20, %267 ], [ %20, %269 ], [ %20, %273 ], [ %20, %275 ], [ %20, %171 ], [ %20, %180 ], [ %20, %192 ], [ %20, %204 ], [ %20, %206 ], [ %20, %45 ], [ %20, %44 ], [ %20, %43 ], [ %20, %42 ], [ %20, %41 ], [ %20, %40 ], [ %20, %39 ], [ %20, %38 ], [ %20, %37 ], [ %20, %29 ], [ %360, %362 ], [ 0, %358 ], [ %20, %372 ], [ %20, %154 ], [ %20, %34 ], [ %20, %140 ], [ %20, %89 ], [ %20, %21 ]
br label %14
29: ; preds = %14
%30 = call i32 (i32, ...) bitcast (i32 (...)* @printPrompt to i32 (i32, ...)*)(i32 10)
%31 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%32 = call i32 (i8*, ...) bitcast (i32 (...)* @isSingleDigit to i32 (i8*, ...)*)(i8* %6)
%33 = icmp eq i32 %32, 0
br i1 %33, label %22, label %34
34: ; preds = %29
%35 = load i8, i8* %6
%36 = sext i8 %35 to i32
switch i32 %36, label %45 [
i32 48, label %381
i32 49, label %22
i32 50, label %37
i32 51, label %38
i32 52, label %39
i32 53, label %40
i32 54, label %41
i32 55, label %42
i32 56, label %43
i32 57, label %44
]
37: ; preds = %34
br label %22
38: ; preds = %34
br label %22
39: ; preds = %34
br label %22
40: ; preds = %34
br label %22
41: ; preds = %34
br label %22
42: ; preds = %34
br label %22
43: ; preds = %34
br label %22
44: ; preds = %34
br label %22
45: ; preds = %34
br label %22
46: ; preds = %21
%47 = call i32 (i32, ...) bitcast (i32 (...)* @printPrompt to i32 (i32, ...)*)(i32 12)
%48 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%49 = call i32 (i8*, ...) bitcast (i32 (...)* @isDollarFormat to i32 (i8*, ...)*)(i8* %6)
%50 = icmp eq i32 %49, 0
br i1 %50, label %89, label %51
51: ; preds = %46
%52 = call i64 @strlen(i8* %6)
%53 = add i64 %52, -1
%54 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = icmp eq i8 %55, 46
br i1 %56, label %57, label %60
57: ; preds = %51
store i8 0, i8* %54
%58 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%59 = mul nsw i32 %58, 100
br label %91
60: ; preds = %51
%61 = add i64 %52, -2
%62 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %61
%63 = load i8, i8* %62
%64 = icmp eq i8 %63, 46
br i1 %64, label %65, label %71
65: ; preds = %60
store i8 %55, i8* %62
%66 = call i64 @strlen(i8* %6)
%67 = add i64 %66, -1
%68 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %67
store i8 0, i8* %68
%69 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%70 = mul nsw i32 %69, 10
br label %91
71: ; preds = %60
%72 = add i64 %52, -3
%73 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %72
%74 = load i8, i8* %73
%75 = icmp eq i8 %74, 46
br i1 %75, label %76, label %87
76: ; preds = %71
store i8 %63, i8* %73
%77 = call i64 @strlen(i8* %6)
%78 = add i64 %77, -1
%79 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %78
%80 = load i8, i8* %79
%81 = add i64 %77, -2
%82 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %81
store i8 %80, i8* %82
%83 = call i64 @strlen(i8* %6)
%84 = add i64 %83, -1
%85 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %84
store i8 0, i8* %85
%86 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
br label %91
87: ; preds = %71
%88 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.36, i64 0, i64 0))
br label %91
89: ; preds = %46
%90 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.35, i64 0, i64 0))
br label %22
91: ; preds = %21, %87, %76, %65, %57
%92 = phi i32 [ %19, %87 ], [ %86, %76 ], [ %70, %65 ], [ %59, %57 ], [ %19, %21 ]
%93 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @dollarFormat to i32 (i32, i8*, ...)*)(i32 %92, i8* %7)
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i8* %7)
%95 = call i32 @putchar(i32 10)
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
%97 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%98 = call i32 (i8*, ...) bitcast (i32 (...)* @isDollarFormat to i32 (i8*, ...)*)(i8* %6)
%99 = icmp eq i32 %98, 0
br i1 %99, label %140, label %100
100: ; preds = %91, %143
%101 = phi i32 [ %145, %143 ], [ %18, %91 ]
%102 = call i64 @strlen(i8* %6)
%103 = add i64 %102, -1
%104 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %103
%105 = load i8, i8* %104
%106 = icmp eq i8 %105, 46
br i1 %106, label %107, label %111
107: ; preds = %100
store i8 0, i8* %104
%108 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%109 = mul nsw i32 %108, 100
%110 = icmp slt i32 %109, %92
br i1 %110, label %143, label %154
111: ; preds = %100
%112 = add i64 %102, -2
%113 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %112
%114 = load i8, i8* %113
%115 = icmp eq i8 %114, 46
br i1 %115, label %116, label %123
116: ; preds = %111
store i8 %105, i8* %113
%117 = call i64 @strlen(i8* %6)
%118 = add i64 %117, -1
%119 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %118
store i8 0, i8* %119
%120 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%121 = mul nsw i32 %120, 10
%122 = icmp slt i32 %121, %92
br i1 %122, label %143, label %154
123: ; preds = %111
%124 = add i64 %102, -3
%125 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %124
%126 = load i8, i8* %125
%127 = icmp eq i8 %126, 46
br i1 %127, label %128, label %143
128: ; preds = %123
store i8 %114, i8* %125
%129 = call i64 @strlen(i8* %6)
%130 = add i64 %129, -1
%131 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %130
%132 = load i8, i8* %131
%133 = add i64 %129, -2
%134 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %133
store i8 %132, i8* %134
%135 = call i64 @strlen(i8* %6)
%136 = add i64 %135, -1
%137 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %136
store i8 0, i8* %137
%138 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%139 = icmp slt i32 %138, %92
br i1 %139, label %143, label %154
140: ; preds = %143, %91
%141 = phi i32 [ %18, %91 ], [ %145, %143 ]
%142 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.35, i64 0, i64 0))
br label %22
143: ; preds = %123, %128, %116, %107
%144 = phi i8* [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.34, i64 0, i64 0), %107 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.34, i64 0, i64 0), %116 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.34, i64 0, i64 0), %128 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @str.36, i64 0, i64 0), %123 ]
%145 = phi i32 [ %109, %107 ], [ %121, %116 ], [ %138, %128 ], [ %101, %123 ]
%146 = call i32 @puts(i8* dereferenceable(1) %144)
%147 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @dollarFormat to i32 (i32, i8*, ...)*)(i32 %92, i8* %7)
%148 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i8* %7)
%149 = call i32 @putchar(i32 10)
%150 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
%151 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%152 = call i32 (i8*, ...) bitcast (i32 (...)* @isDollarFormat to i32 (i8*, ...)*)(i8* %6)
%153 = icmp eq i32 %152, 0
br i1 %153, label %140, label %100
154: ; preds = %128, %116, %107
%155 = phi i32 [ %109, %107 ], [ %121, %116 ], [ %138, %128 ]
%156 = sub nsw i32 %155, %92
%157 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @dollarFormat to i32 (i32, i8*, ...)*)(i32 %156, i8* %8)
%158 = call i32 (i32, i32*, i8*, ...) bitcast (i32 (...)* @addToTill to i32 (i32, i32*, i8*, ...)*)(i32 %92, i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%159 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), i8* %8)
br label %22
160: ; preds = %14
%161 = call i32 (i32, ...) bitcast (i32 (...)* @printPrompt to i32 (i32, ...)*)(i32 21)
%162 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%163 = call i32 (i8*, ...) bitcast (i32 (...)* @isDollarFormat to i32 (i8*, ...)*)(i8* %6)
%164 = icmp eq i32 %163, 0
br i1 %164, label %206, label %165
165: ; preds = %160
%166 = call i64 @strlen(i8* %6)
%167 = add i64 %166, -1
%168 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %167
%169 = load i8, i8* %168
%170 = icmp eq i8 %169, 46
br i1 %170, label %171, label %175
171: ; preds = %165
store i8 0, i8* %168
%172 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%173 = mul nsw i32 %172, 100
%174 = call i32 (i32, i32*, i8*, ...) bitcast (i32 (...)* @addToTill to i32 (i32, i32*, i8*, ...)*)(i32 %173, i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %22
175: ; preds = %165
%176 = add i64 %166, -2
%177 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %176
%178 = load i8, i8* %177
%179 = icmp eq i8 %178, 46
br i1 %179, label %180, label %187
180: ; preds = %175
store i8 %169, i8* %177
%181 = call i64 @strlen(i8* %6)
%182 = add i64 %181, -1
%183 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %182
store i8 0, i8* %183
%184 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%185 = mul nsw i32 %184, 10
%186 = call i32 (i32, i32*, i8*, ...) bitcast (i32 (...)* @addToTill to i32 (i32, i32*, i8*, ...)*)(i32 %185, i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %22
187: ; preds = %175
%188 = add i64 %166, -3
%189 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %188
%190 = load i8, i8* %189
%191 = icmp eq i8 %190, 46
br i1 %191, label %192, label %204
192: ; preds = %187
store i8 %178, i8* %189
%193 = call i64 @strlen(i8* %6)
%194 = add i64 %193, -1
%195 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %194
%196 = load i8, i8* %195
%197 = add i64 %193, -2
%198 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %197
store i8 %196, i8* %198
%199 = call i64 @strlen(i8* %6)
%200 = add i64 %199, -1
%201 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %200
store i8 0, i8* %201
%202 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%203 = call i32 (i32, i32*, i8*, ...) bitcast (i32 (...)* @addToTill to i32 (i32, i32*, i8*, ...)*)(i32 %202, i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %22
204: ; preds = %187
%205 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.36, i64 0, i64 0))
br label %22
206: ; preds = %160
%207 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.35, i64 0, i64 0))
br label %22
208: ; preds = %14
%209 = call i32 (i32, ...) bitcast (i32 (...)* @printPrompt to i32 (i32, ...)*)(i32 22)
%210 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%211 = call i32 (i8*, ...) bitcast (i32 (...)* @isDollarFormat to i32 (i8*, ...)*)(i8* %6)
%212 = icmp eq i32 %211, 0
br i1 %212, label %275, label %213
213: ; preds = %208
%214 = call i64 @strlen(i8* %6)
%215 = add i64 %214, -1
%216 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %215
%217 = load i8, i8* %216
%218 = icmp eq i8 %217, 46
br i1 %218, label %219, label %230
219: ; preds = %213
store i8 0, i8* %216
%220 = load i32, i32* %5
%221 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%222 = mul nsw i32 %221, 100
%223 = icmp slt i32 %220, %222
br i1 %223, label %224, label %226
224: ; preds = %219
%225 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.34, i64 0, i64 0))
br label %22
226: ; preds = %219
%227 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%228 = mul i32 %227, -100
%229 = call i32 (i32, i32*, i8*, ...) bitcast (i32 (...)* @addToTill to i32 (i32, i32*, i8*, ...)*)(i32 %228, i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %22
230: ; preds = %213
%231 = add i64 %214, -2
%232 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %231
%233 = load i8, i8* %232
%234 = icmp eq i8 %233, 46
br i1 %234, label %235, label %249
235: ; preds = %230
store i8 %217, i8* %232
%236 = call i64 @strlen(i8* %6)
%237 = add i64 %236, -1
%238 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %237
store i8 0, i8* %238
%239 = load i32, i32* %5
%240 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%241 = mul nsw i32 %240, 10
%242 = icmp slt i32 %239, %241
br i1 %242, label %243, label %245
243: ; preds = %235
%244 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.34, i64 0, i64 0))
br label %22
245: ; preds = %235
%246 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%247 = mul i32 %246, -10
%248 = call i32 (i32, i32*, i8*, ...) bitcast (i32 (...)* @addToTill to i32 (i32, i32*, i8*, ...)*)(i32 %247, i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %22
249: ; preds = %230
%250 = add i64 %214, -3
%251 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %250
%252 = load i8, i8* %251
%253 = icmp eq i8 %252, 46
br i1 %253, label %254, label %273
254: ; preds = %249
store i8 %233, i8* %251
%255 = call i64 @strlen(i8* %6)
%256 = add i64 %255, -1
%257 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %256
%258 = load i8, i8* %257
%259 = add i64 %255, -2
%260 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %259
store i8 %258, i8* %260
%261 = call i64 @strlen(i8* %6)
%262 = add i64 %261, -1
%263 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %262
store i8 0, i8* %263
%264 = load i32, i32* %5
%265 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%266 = icmp slt i32 %264, %265
br i1 %266, label %267, label %269
267: ; preds = %254
%268 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.34, i64 0, i64 0))
br label %22
269: ; preds = %254
%270 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%271 = sub nsw i32 0, %270
%272 = call i32 (i32, i32*, i8*, ...) bitcast (i32 (...)* @addToTill to i32 (i32, i32*, i8*, ...)*)(i32 %271, i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %22
273: ; preds = %249
%274 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.36, i64 0, i64 0))
br label %22
275: ; preds = %208
%276 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.35, i64 0, i64 0))
br label %22
277: ; preds = %14
%278 = load i32, i32* %5
%279 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @dollarFormat to i32 (i32, i8*, ...)*)(i32 %278, i8* %9)
%280 = call i32 (i32, ...) bitcast (i32 (...)* @printPrompt to i32 (i32, ...)*)(i32 23)
%281 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* %9)
br label %22
282: ; preds = %14
%283 = call i32 @putchar(i32 10)
%284 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @printSKUS to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
br label %22
285: ; preds = %14
%286 = call i32 (i32, ...) bitcast (i32 (...)* @printPrompt to i32 (i32, ...)*)(i32 25)
%287 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%288 = call i32 (i8*, ...) bitcast (i32 (...)* @isPlainInt to i32 (i8*, ...)*)(i8* %6)
%289 = icmp eq i32 %288, 0
br i1 %289, label %292, label %290
290: ; preds = %285
%291 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
br label %294
292: ; preds = %285
%293 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.35, i64 0, i64 0))
br label %294
294: ; preds = %292, %290
%295 = phi i32 [ %291, %290 ], [ %20, %292 ]
%296 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0))
%297 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%298 = call i32 (i8*, ...) bitcast (i32 (...)* @isDollarFormat to i32 (i8*, ...)*)(i8* %6)
%299 = icmp eq i32 %298, 0
br i1 %299, label %338, label %300
300: ; preds = %294
%301 = call i64 @strlen(i8* %6)
%302 = add i64 %301, -1
%303 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %302
%304 = load i8, i8* %303
%305 = icmp eq i8 %304, 46
br i1 %305, label %306, label %309
306: ; preds = %300
store i8 0, i8* %303
%307 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%308 = mul nsw i32 %307, 100
br label %340
309: ; preds = %300
%310 = add i64 %301, -2
%311 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %310
%312 = load i8, i8* %311
%313 = icmp eq i8 %312, 46
br i1 %313, label %314, label %320
314: ; preds = %309
store i8 %304, i8* %311
%315 = call i64 @strlen(i8* %6)
%316 = add i64 %315, -1
%317 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %316
store i8 0, i8* %317
%318 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%319 = mul nsw i32 %318, 10
br label %340
320: ; preds = %309
%321 = add i64 %301, -3
%322 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %321
%323 = load i8, i8* %322
%324 = icmp eq i8 %323, 46
br i1 %324, label %325, label %336
325: ; preds = %320
store i8 %312, i8* %322
%326 = call i64 @strlen(i8* %6)
%327 = add i64 %326, -1
%328 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %327
%329 = load i8, i8* %328
%330 = add i64 %326, -2
%331 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %330
store i8 %329, i8* %331
%332 = call i64 @strlen(i8* %6)
%333 = add i64 %332, -1
%334 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %333
store i8 0, i8* %334
%335 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
br label %340
336: ; preds = %320
%337 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.36, i64 0, i64 0))
br label %340
338: ; preds = %294
%339 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.35, i64 0, i64 0))
br label %22
340: ; preds = %306, %325, %336, %314
%341 = phi i32 [ %308, %306 ], [ %319, %314 ], [ %335, %325 ], [ %17, %336 ]
%342 = call i32 (i32, i32, i8*, i8*, ...) bitcast (i32 (...)* @addSKU to i32 (i32, i32, i8*, i8*, ...)*)(i32 %295, i32 %341, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
br label %22
343: ; preds = %14
%344 = call i32 (i32, ...) bitcast (i32 (...)* @printPrompt to i32 (i32, ...)*)(i32 26)
%345 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%346 = call i32 (i8*, ...) bitcast (i32 (...)* @isPlainInt to i32 (i8*, ...)*)(i8* %6)
%347 = icmp eq i32 %346, 0
br i1 %347, label %351, label %348
348: ; preds = %343
%349 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%350 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @remSKU to i32 (i32, i8*, i8*, ...)*)(i32 %349, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
br label %22
351: ; preds = %343
%352 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.35, i64 0, i64 0))
br label %22
353: ; preds = %14
%354 = call i32 (i32, ...) bitcast (i32 (...)* @printPrompt to i32 (i32, ...)*)(i32 27)
%355 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%356 = call i32 (i8*, ...) bitcast (i32 (...)* @isPlainInt to i32 (i8*, ...)*)(i8* %6)
%357 = icmp eq i32 %356, 0
br i1 %357, label %365, label %358
358: ; preds = %353
%359 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%360 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @getPrice to i32 (i32, i8*, i8*, ...)*)(i32 %359, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
%361 = icmp eq i32 %360, 0
br i1 %361, label %22, label %362
362: ; preds = %358
%363 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @dollarFormat to i32 (i32, i8*, ...)*)(i32 %360, i8* %9)
%364 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.15, i64 0, i64 0), i8* %6, i8* %9)
br label %22
365: ; preds = %353
%366 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.35, i64 0, i64 0))
br label %22
367: ; preds = %14
%368 = call i32 (i32, ...) bitcast (i32 (...)* @printPrompt to i32 (i32, ...)*)(i32 62)
%369 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%370 = call i32 (i8*, ...) bitcast (i32 (...)* @isPlainInt to i32 (i8*, ...)*)(i8* %6)
%371 = icmp eq i32 %370, 0
br i1 %371, label %379, label %372
372: ; preds = %367
%373 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%374 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @getPrice to i32 (i32, i8*, i8*, ...)*)(i32 %373, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
%375 = icmp eq i32 %374, 0
br i1 %375, label %22, label %376
376: ; preds = %372
%377 = call i32 (i8*, ...) bitcast (i32 (...)* @toString to i32 (i8*, ...)*)(i8* %6)
%378 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @getPrice to i32 (i32, i8*, i8*, ...)*)(i32 %377, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
br label %22
379: ; preds = %367
%380 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.35, i64 0, i64 0))
br label %22
381: ; preds = %34
ret i32 0
}