#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ debugint(char, char *);
int /*<<< orphan*/ debugstr(char *, char *);
int pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
void main() {
  int b1 = 0, b2 = 0;
  int pre[1000];
  int pen[1000];
  int rem;
  int total = 0;
  char num[1000], end[1000];
  int i = 0, j;
  printf("Please enter a number: ");
  scanf("%s", &num);
  while ((b1 < 2) || ((b1 > 10) && (b1 != 16))) {
    printf("Please enter the initial base (2-10, 16): ");
    scanf("%d", &b1);
  }
  while ((b2 < 2) || ((b2 > 10) && (b2 != 16))) {
    printf("Please enter the final base (2-10, 16): ");
    scanf("%d", &b2);
  }
  printf("%s in base %d = ", num, b1);
  debugstr(num, "num");
  debugint(b1, "b1");
  debugint(b2, "b2");
  debugint(num[0], "num[0]");
  debugint(num[1], "num[1]");
  debugint(num[2], "num[2]");
  debugint(num[3], "num[3]");
  debugint(num[4], "num[4]");
  debugint(num[5], "num[5]");
  debugint(pre[0], "pre[0]");
  while (num[i] != 0) {
    debugint(num[i], "num[i]");
    switch (num[i]) {
    case 48:
      pre[i] = 79;
      break;
    case 49:
      pre[i] = 1;
      break;
    case 50:
      pre[i] = 2;
      break;
    case 51:
      pre[i] = 3;
      break;
    case 52:
      pre[i] = 4;
      break;
    case 53:
      pre[i] = 5;
      break;
    case 54:
      pre[i] = 6;
      break;
    case 55:
      pre[i] = 7;
      break;
    case 56:
      pre[i] = 8;
      break;
    case 57:
      pre[i] = 9;
      break;
    case 65:
      pre[i] = 10;
      break;
    case 66:
      pre[i] = 11;
      break;
    case 67:
      pre[i] = 12;
      break;
    case 68:
      pre[i] = 13;
      break;
    case 69:
      pre[i] = 14;
      break;
    case 70:
      pre[i] = 15;
      break;
    default:
      break;
    }
    i += 1;
  }
  debugint(pre[0], "pre[0]");
  debugint(pre[1], "pre[1]");
  debugint(pre[2], "pre[2]");
  debugint(pre[3], "pre[3]");
  debugint(pre[4], "pre[4]");
  debugint(i, "i");
  for (j = 0; pre[j] != 0; j += 1) {
    if (pre[j] == 79) {
      pre[j] = 0;
    }
    total = total + pre[j] * pow(b1, (i - 1 - j));
    printf("-----------\n");
    debugint((i - 1 - j), "times");
    debugint(pow(10, i - 1 - j), "pow");
    debugint((pre[j] * pow(10, i - 1 - j)), "add");
  }
  debugint(total, "total");
  i = 0;
  j = 0;
  while (total > 0) {
    pen[i] = total % b2;
    total = total / b2;
    i += 1;
  }
  debugint(pen[0], "pen[0]");
  debugint(pen[1], "pen[1]");
  debugint(pen[2], "pen[2]");
  debugint(pen[3], "pen[3]");
  debugint(pen[4], "pen[4]");
  debugint(i, "i");
  while (i > 0) {
    i -= 1;
    switch (pen[i]) {
    case 15:
      end[j] = 70;
      break;
    case 14:
      end[j] = 69;
      break;
    case 13:
      end[j] = 68;
      break;
    case 12:
      end[j] = 67;
      break;
    case 11:
      end[j] = 66;
      break;
    case 10:
      end[j] = 65;
      break;
    case 9:
      end[j] = 57;
      break;
    case 8:
      end[j] = 56;
      break;
    case 7:
      end[j] = 55;
      break;
    case 6:
      end[j] = 54;
      break;
    case 5:
      end[j] = 53;
      break;
    case 4:
      end[j] = 52;
      break;
    case 3:
      end[j] = 51;
      break;
    case 2:
      end[j] = 50;
      break;
    case 1:
      end[j] = 49;
      break;
    case 0:
      end[j] = 48;
      break;
    default:
      break;
    }
    j += 1;
  }
  debugint(end[0], "end[0]");
  debugint(end[1], "end[1]");
  debugint(end[2], "end[2]");
  debugint(end[3], "end[3]");
  debugint(end[4], "end[4]");
  printf("%s in base %d", end, b2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2760,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x1f58(%rbp)
movl   $0x0,-0x2734(%rbp)
lea    0xf18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf22(%rip),%rdi
lea    -0x2340(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x2,-0x4(%rbp)
mov    %al,-0x2739(%rbp)
jl     11dd <main+0x8d>
xor    %eax,%eax
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x273a(%rbp)
jle    11d1 <main+0x81>
cmpl   $0x10,-0x4(%rbp)
setne  %al
mov    %al,-0x273a(%rbp)
mov    -0x273a(%rbp),%al
mov    %al,-0x2739(%rbp)
mov    -0x2739(%rbp),%al
test   $0x1,%al
jne    11f0 <main+0xa0>
jmp    1215 <main+0xc5>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe9(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
jmp    11a0 <main+0x50>
jmp    121a <main+0xca>
mov    $0x1,%al
cmpl   $0x2,-0x8(%rbp)
mov    %al,-0x273b(%rbp)
jl     1257 <main+0x107>
xor    %eax,%eax
cmpl   $0xa,-0x8(%rbp)
mov    %al,-0x273c(%rbp)
jle    124b <main+0xfb>
cmpl   $0x10,-0x8(%rbp)
setne  %al
mov    %al,-0x273c(%rbp)
mov    -0x273c(%rbp),%al
mov    %al,-0x273b(%rbp)
mov    -0x273b(%rbp),%al
test   $0x1,%al
jne    126a <main+0x11a>
jmp    128f <main+0x13f>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6f(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
jmp    121a <main+0xca>
lea    -0x2340(%rbp),%rsi
mov    -0x4(%rbp),%edx
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x2340(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1050 <debugstr@plt>
mov    -0x4(%rbp),%eax
lea    0xe5c(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0x8(%rbp),%eax
lea    0xe4d(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
lea    0xe41(%rip),%rsi
movsbl -0x2340(%rbp),%edi
call   1070 <debugint@plt>
lea    0xe35(%rip),%rsi
movsbl -0x233f(%rbp),%edi
call   1070 <debugint@plt>
lea    0xe29(%rip),%rsi
movsbl -0x233e(%rbp),%edi
call   1070 <debugint@plt>
lea    0xe1d(%rip),%rsi
movsbl -0x233d(%rbp),%edi
call   1070 <debugint@plt>
lea    0xe11(%rip),%rsi
movsbl -0x233c(%rbp),%edi
call   1070 <debugint@plt>
lea    0xe05(%rip),%rsi
movsbl -0x233b(%rbp),%edi
call   1070 <debugint@plt>
mov    -0xfb0(%rbp),%eax
lea    0xdf3(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
movslq -0x2734(%rbp),%rax
movsbl -0x2340(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     155c <main+0x40c>
movslq -0x2734(%rbp),%rax
movsbl -0x2340(%rbp,%rax,1),%edi
ff
lea    0xdc4(%rip),%rsi
call   1070 <debugint@plt>
movslq -0x2734(%rbp),%rax
movsbl -0x2340(%rbp,%rax,1),%eax
ff
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x2748(%rbp)
sub    $0x16,%eax
ja     1543 <main+0x3f3>
mov    -0x2748(%rbp),%rax
lea    0xc76(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movslq -0x2734(%rbp),%rax
movl   $0x4f,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0x1,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0x2,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0x3,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0x4,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0x5,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0x6,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0x7,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0x8,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0x9,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0xa,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0xb,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0xc,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0xd,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0xe,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
movslq -0x2734(%rbp),%rax
movl   $0xf,-0xfb0(%rbp,%rax,4)
jmp    1548 <main+0x3f8>
jmp    1548 <main+0x3f8>
mov    -0x2734(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2734(%rbp)
jmp    1365 <main+0x215>
mov    -0xfb0(%rbp),%eax
lea    0xbe7(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0xfac(%rbp),%eax
lea    0xbe0(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0xfa8(%rbp),%eax
lea    0xbd2(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0xfa4(%rbp),%eax
lea    0xbc4(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0xfa0(%rbp),%eax
lea    0xbb6(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0x2734(%rbp),%eax
lea    0xba8(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
movl   $0x0,-0x2738(%rbp)
movslq -0x2738(%rbp),%rax
cmpl   $0x0,-0xfb0(%rbp,%rax,4)
je     171f <main+0x5cf>
movslq -0x2738(%rbp),%rax
cmpl   $0x4f,-0xfb0(%rbp,%rax,4)
4f
jne    1620 <main+0x4d0>
movslq -0x2738(%rbp),%rax
movl   $0x0,-0xfb0(%rbp,%rax,4)
mov    -0x1f58(%rbp),%eax
mov    %eax,-0x2750(%rbp)
movslq -0x2738(%rbp),%rax
mov    -0xfb0(%rbp,%rax,4),%eax
mov    %eax,-0x2754(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x2734(%rbp),%esi
sub    $0x1,%esi
sub    -0x2738(%rbp),%esi
call   1060 <pow@plt>
mov    -0x2754(%rbp),%ecx
mov    %eax,%edx
mov    -0x2750(%rbp),%eax
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x1f58(%rbp)
lea    0xb05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2734(%rbp),%eax
sub    $0x1,%eax
sub    -0x2738(%rbp),%eax
lea    0xaf5(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0x2734(%rbp),%esi
sub    $0x1,%esi
sub    -0x2738(%rbp),%esi
mov    $0xa,%edi
call   1060 <pow@plt>
lea    0xad3(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
movslq -0x2738(%rbp),%rax
mov    -0xfb0(%rbp,%rax,4),%eax
mov    %eax,-0x274c(%rbp)
mov    -0x2734(%rbp),%esi
sub    $0x1,%esi
sub    -0x2738(%rbp),%esi
mov    $0xa,%edi
call   1060 <pow@plt>
mov    %eax,%ecx
mov    -0x274c(%rbp),%eax
imul   %ecx,%eax
lea    0xa90(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0x2738(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2738(%rbp)
jmp    15e4 <main+0x494>
mov    -0x1f58(%rbp),%eax
lea    0xa6b(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
movl   $0x0,-0x2734(%rbp)
movl   $0x0,-0x2738(%rbp)
cmpl   $0x0,-0x1f58(%rbp)
jle    1791 <main+0x641>
mov    -0x1f58(%rbp),%eax
cltd
idivl  -0x8(%rbp)
movslq -0x2734(%rbp),%rax
mov    %edx,-0x1f50(%rbp,%rax,4)
mov    -0x1f58(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0x1f58(%rbp)
mov    -0x2734(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2734(%rbp)
jmp    1748 <main+0x5f8>
mov    -0x1f50(%rbp),%eax
lea    0x9ff(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0x1f4c(%rbp),%eax
lea    0x9f1(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0x1f48(%rbp),%eax
lea    0x9e3(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0x1f44(%rbp),%eax
lea    0x9d5(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0x1f40(%rbp),%eax
lea    0x9c7(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
mov    -0x2734(%rbp),%eax
lea    0x973(%rip),%rsi
movsbl %al,%edi
call   1070 <debugint@plt>
cmpl   $0x0,-0x2734(%rbp)
jle    19ba <main+0x86a>
mov    -0x2734(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2734(%rbp)
movslq -0x2734(%rbp),%rax
mov    -0x1f50(%rbp,%rax,4),%eax
mov    %rax,-0x2760(%rbp)
sub    $0xf,%rax
ja     19a1 <main+0x851>
mov    -0x2760(%rbp),%rax
lea    0x7a8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movslq -0x2738(%rbp),%rax
movb   $0x46,-0x2730(%rbp,%rax,1)
46
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x45,-0x2730(%rbp,%rax,1)
45
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x44,-0x2730(%rbp,%rax,1)
44
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x43,-0x2730(%rbp,%rax,1)
43
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x42,-0x2730(%rbp,%rax,1)
42
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x41,-0x2730(%rbp,%rax,1)
41
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x39,-0x2730(%rbp,%rax,1)
39
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x38,-0x2730(%rbp,%rax,1)
38
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x37,-0x2730(%rbp,%rax,1)
37
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x36,-0x2730(%rbp,%rax,1)
36
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x35,-0x2730(%rbp,%rax,1)
35
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x34,-0x2730(%rbp,%rax,1)
34
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x33,-0x2730(%rbp,%rax,1)
33
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x32,-0x2730(%rbp,%rax,1)
32
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x31,-0x2730(%rbp,%rax,1)
31
jmp    19a6 <main+0x856>
movslq -0x2738(%rbp),%rax
movb   $0x30,-0x2730(%rbp,%rax,1)
30
jmp    19a6 <main+0x856>
jmp    19a6 <main+0x856>
mov    -0x2738(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2738(%rbp)
jmp    180f <main+0x6bf>
lea    0x7ff(%rip),%rsi
movsbl -0x2730(%rbp),%edi
call   1070 <debugint@plt>
lea    0x7f3(%rip),%rsi
movsbl -0x272f(%rbp),%edi
call   1070 <debugint@plt>
lea    0x7e7(%rip),%rsi
movsbl -0x272e(%rbp),%edi
call   1070 <debugint@plt>
lea    0x7db(%rip),%rsi
movsbl -0x272d(%rbp),%edi
call   1070 <debugint@plt>
lea    0x7cf(%rip),%rsi
movsbl -0x272c(%rbp),%edi
call   1070 <debugint@plt>
lea    -0x2730(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0x7b9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x2760,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2738,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xe78(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe82(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xe72(%rip),%r14
lea    0xf95(%rip),%rbp
lea    0xc(%rsp),%rbx
xor    %eax,%eax
jmp    11db <main+0x7b>
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x2,%eax
jl     11c0 <main+0x60>
cmp    $0xb,%eax
jb     1211 <main+0xb1>
cmp    $0x10,%eax
jne    11c0 <main+0x60>
jmp    1211 <main+0xb1>
nopl   0x0(%rax)
lea    0xe4f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf40(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x8(%rsp),%eax
cmp    $0x2,%eax
jl     11f0 <main+0x90>
cmp    $0xb,%eax
jb     1224 <main+0xc4>
cmp    $0x10,%eax
jne    11f0 <main+0x90>
mov    0xc(%rsp),%edx
lea    0xe40(%rip),%rdi
xor    %r12d,%r12d
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe38(%rip),%rsi
mov    %rbx,%rdi
call   1060 <debugstr@plt>
movsbl 0xc(%rsp),%edi
lea    0xe28(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x8(%rsp),%edi
lea    0xe1a(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x10(%rsp),%edi
lea    0xe0c(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x11(%rsp),%edi
lea    0xe02(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x12(%rsp),%edi
lea    0xdf8(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x13(%rsp),%edi
lea    0xdee(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x14(%rsp),%edi
lea    0xde4(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x15(%rsp),%edi
lea    0xdda(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x1790(%rsp),%edi
lea    0xdcd(%rip),%rsi
call   1080 <debugint@plt>
mov    0x10(%rsp),%al
mov    $0x0,%ebx
test   %al,%al
je     135d <main+0x1fd>
xor    %ebx,%ebx
lea    0xdb9(%rip),%r14
mov    $0x7e03ff,%r15d
lea    0xe45(%rip),%rbp
jmp    132d <main+0x1cd>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl 0x11(%rsp,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
je     135d <main+0x1fd>
movsbl %al,%edi
mov    %r14,%rsi
call   1080 <debugint@plt>
movsbl 0x10(%rsp,%rbx,1),%eax
lea    -0x30(%rax),%ecx
cmp    $0x16,%ecx
ja     1320 <main+0x1c0>
bt     %ecx,%r15d
jae    1320 <main+0x1c0>
cltq
mov    -0xc0(%rbp,%rax,4),%eax
mov    %eax,0x1790(%rsp,%rbx,4)
jmp    1320 <main+0x1c0>
movsbl 0x1790(%rsp),%edi
lea    0xd48(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x1794(%rsp),%edi
lea    0xd42(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x1798(%rsp),%edi
lea    0xd35(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x179c(%rsp),%edi
lea    0xd28(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x17a0(%rsp),%edi
lea    0xd1b(%rip),%rsi
call   1080 <debugint@plt>
movsbl %bl,%edi
lea    0xd13(%rip),%rsi
call   1080 <debugint@plt>
add    $0xffffffff,%ebx
lea    0x1790(%rsp),%r14
lea    0xd08(%rip),%r13
jmp    146c <main+0x30c>
nopw   0x0(%rax,%rax,1)
movl   $0x0,(%r14)
xor    %r15d,%r15d
mov    0xc(%rsp),%edi
mov    %ebx,%esi
call   1070 <pow@plt>
imul   %r15d,%eax
add    %eax,%r12d
lea    0xd35(%rip),%rdi
call   1030 <puts@plt>
lea    0x100(%rbx),%eax
movsbl %al,%edi
lea    0xcb8(%rip),%rsi
call   1080 <debugint@plt>
mov    $0xa,%edi
mov    %ebx,%esi
call   1070 <pow@plt>
movsbl %al,%edi
lea    0xca3(%rip),%rsi
call   1080 <debugint@plt>
mov    (%r14),%ebp
mov    $0xa,%edi
mov    %ebx,%esi
call   1070 <pow@plt>
imul   %ebp,%eax
movsbl %al,%edi
mov    %r13,%rsi
call   1080 <debugint@plt>
add    $0xffffffff,%ebx
add    $0x4,%r14
mov    (%r14),%r15d
cmp    $0x4f,%r15d
je     13f0 <main+0x290>
test   %r15d,%r15d
jne    13fa <main+0x29a>
movsbl %r12b,%edi
lea    0xc61(%rip),%rsi
call   1080 <debugint@plt>
xor    %ebx,%ebx
mov    0x8(%rsp),%ecx
nopl   0x0(%rax,%rax,1)
mov    %r12d,%eax
cltd
idiv   %ecx
mov    %edx,0x7f0(%rsp,%rbx,4)
add    $0x1,%rbx
mov    %eax,%r12d
test   %eax,%eax
jg     14a0 <main+0x340>
movsbl 0x7f0(%rsp),%edi
movsbl 0x7f4(%rsp),%ebp
movsbl 0x7f8(%rsp),%r12d
movsbl 0x7fc(%rsp),%r14d
movsbl 0x800(%rsp),%r15d
lea    0xc0a(%rip),%rsi
call   1080 <debugint@plt>
lea    0xc05(%rip),%rsi
mov    %ebp,%edi
call   1080 <debugint@plt>
lea    0xbfe(%rip),%rsi
mov    %r12d,%edi
call   1080 <debugint@plt>
lea    0xbf6(%rip),%rsi
mov    %r14d,%edi
call   1080 <debugint@plt>
lea    0xbee(%rip),%rsi
mov    %r15d,%edi
call   1080 <debugint@plt>
movsbl %bl,%edi
lea    0xbaa(%rip),%rsi
call   1080 <debugint@plt>
test   %ebx,%ebx
jle    1578 <main+0x418>
mov    $0xffffffff,%r8d
mov    %ebx,%eax
cmp    $0x1,%rax
jne    1608 <main+0x4a8>
xor    %edx,%edx
test   $0x1,%bl
je     1578 <main+0x418>
add    %r8d,%eax
movslq 0x7f0(%rsp,%rax,4),%rax
cmp    $0xf,%rax
ja     1578 <main+0x418>
lea    0xc42(%rip),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,0x400(%rsp,%rdx,1)
movsbl 0x400(%rsp),%edi
lea    0xb90(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x401(%rsp),%edi
lea    0xb83(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x402(%rsp),%edi
lea    0xb76(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x403(%rsp),%edi
lea    0xb69(%rip),%rsi
call   1080 <debugint@plt>
movsbl 0x404(%rsp),%edi
lea    0xb5c(%rip),%rsi
call   1080 <debugint@plt>
mov    0x8(%rsp),%edx
lea    0xb53(%rip),%rdi
lea    0x400(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x2738,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebx,%esi
mov    %ebx,%edx
and    $0x1,%edx
sub    %rdx,%rsi
xor    %edx,%edx
lea    0xb95(%rip),%rdi
jmp    162d <main+0x4cd>
nopl   (%rax)
add    $0x2,%rdx
cmp    %rdx,%rsi
je     1551 <main+0x3f1>
lea    (%rax,%r8,1),%ebp
movslq 0x7f0(%rsp,%rbp,4),%rbp
cmp    $0xf,%rbp
ja     164b <main+0x4eb>
movzbl 0x0(%rbp,%rdi,1),%ecx
mov    %cl,0x400(%rsp,%rdx,1)
add    $0xfffffffffffffffe,%rax
mov    %eax,%ecx
movslq 0x7f0(%rsp,%rcx,4),%rbp
cmp    $0xf,%rbp
ja     1620 <main+0x4c0>
movzbl 0x0(%rbp,%rdi,1),%ecx
mov    %cl,0x401(%rsp,%rdx,1)
jmp    1620 <main+0x4c0>

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

LLVM IR (-O2):
@.str = [24 x i8] c"Please enter a number: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [43 x i8] c"Please enter the initial base (2-10, 16): \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [41 x i8] c"Please enter the final base (2-10, 16): \00"
@.str.5 = [17 x i8] c"%s in base %d = \00"
@.str.6 = [4 x i8] c"num\00"
@.str.7 = [3 x i8] c"b1\00"
@.str.8 = [3 x i8] c"b2\00"
@.str.9 = [7 x i8] c"num[0]\00"
@.str.10 = [7 x i8] c"num[1]\00"
@.str.11 = [7 x i8] c"num[2]\00"
@.str.12 = [7 x i8] c"num[3]\00"
@.str.13 = [7 x i8] c"num[4]\00"
@.str.14 = [7 x i8] c"num[5]\00"
@.str.15 = [7 x i8] c"pre[0]\00"
@.str.16 = [7 x i8] c"num[i]\00"
@.str.17 = [7 x i8] c"pre[1]\00"
@.str.18 = [7 x i8] c"pre[2]\00"
@.str.19 = [7 x i8] c"pre[3]\00"
@.str.20 = [7 x i8] c"pre[4]\00"
@.str.21 = [2 x i8] c"i\00"
@.str.23 = [6 x i8] c"times\00"
@.str.24 = [4 x i8] c"pow\00"
@.str.25 = [4 x i8] c"add\00"
@.str.26 = [6 x i8] c"total\00"
@.str.27 = [7 x i8] c"pen[0]\00"
@.str.28 = [7 x i8] c"pen[1]\00"
@.str.29 = [7 x i8] c"pen[2]\00"
@.str.30 = [7 x i8] c"pen[3]\00"
@.str.31 = [7 x i8] c"pen[4]\00"
@.str.32 = [7 x i8] c"end[0]\00"
@.str.33 = [7 x i8] c"end[1]\00"
@.str.34 = [7 x i8] c"end[2]\00"
@.str.35 = [7 x i8] c"end[3]\00"
@.str.36 = [7 x i8] c"end[4]\00"
@.str.37 = [14 x i8] c"%s in base %d\00"
@str = [12 x i8] c"-----------\00"
@switch.table.main = [23 x i32] [i32 79, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 79, i32 79, i32 79, i32 79, i32 79, i32 79, i32 79, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15]
@switch.table.main.38 = [16 x i8] c"0123456789ABCDEF"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i32]
%4 = alloca [1000 x i32]
%5 = alloca [1000 x i8]
%6 = alloca [1000 x i8]
%7 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%8 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%9 = bitcast [1000 x i32]* %3 to i8*
%10 = bitcast [1000 x i32]* %4 to i8*
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [1000 x i8]* %5)
br label %15
15: ; preds = %22, %0
%16 = phi i32 [ %25, %22 ], [ 0, %0 ]
%17 = icmp slt i32 %16, 2
br i1 %17, label %22, label %18
18: ; preds = %15
%19 = icmp ugt i32 %16, 10
%20 = icmp ne i32 %16, 16
%21 = and i1 %19, %20
br i1 %21, label %22, label %26
22: ; preds = %15, %18
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%25 = load i32, i32* %1
br label %15
26: ; preds = %18, %33
%27 = load i32, i32* %2
%28 = icmp slt i32 %27, 2
br i1 %28, label %33, label %29
29: ; preds = %26
%30 = icmp ugt i32 %27, 10
%31 = icmp ne i32 %27, 16
%32 = and i1 %30, %31
br i1 %32, label %33, label %36
33: ; preds = %26, %29
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%35 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
br label %26
36: ; preds = %29
%37 = load i32, i32* %1
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %11, i32 %37)
%39 = call i32 @debugstr(i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%40 = load i32, i32* %1
%41 = trunc i32 %40 to i8
%42 = call i32 @debugint(i8 signext %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%43 = load i32, i32* %2
%44 = trunc i32 %43 to i8
%45 = call i32 @debugint(i8 signext %44, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%46 = load i8, i8* %11
%47 = call i32 @debugint(i8 signext %46, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%48 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 1
%49 = load i8, i8* %48
%50 = call i32 @debugint(i8 signext %49, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%51 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 2
%52 = load i8, i8* %51
%53 = call i32 @debugint(i8 signext %52, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%54 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 3
%55 = load i8, i8* %54
%56 = call i32 @debugint(i8 signext %55, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%57 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 4
%58 = load i8, i8* %57
%59 = call i32 @debugint(i8 signext %58, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%60 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 5
%61 = load i8, i8* %60
%62 = call i32 @debugint(i8 signext %61, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%63 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 0
%64 = load i32, i32* %63
%65 = trunc i32 %64 to i8
%66 = call i32 @debugint(i8 signext %65, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%67 = load i8, i8* %11
%68 = icmp eq i8 %67, 0
br i1 %68, label %94, label %69
69: ; preds = %36, %87
%70 = phi i64 [ %88, %87 ], [ 0, %36 ]
%71 = phi i8 [ %90, %87 ], [ %67, %36 ]
%72 = phi i8* [ %89, %87 ], [ %11, %36 ]
%73 = call i32 @debugint(i8 signext %71, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
%74 = load i8, i8* %72
%75 = sext i8 %74 to i32
%76 = add nsw i32 %75, -48
%77 = icmp ult i32 %76, 23
br i1 %77, label %78, label %87
78: ; preds = %69
%79 = lshr i32 8258559, %76
%80 = and i32 %79, 1
%81 = icmp eq i32 %80, 0
br i1 %81, label %87, label %82
82: ; preds = %78
%83 = sext i32 %76 to i64
%84 = getelementptr inbounds [23 x i32], [23 x i32]* @switch.table.main, i64 0, i64 %83
%85 = load i32, i32* %84
%86 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %70
store i32 %85, i32* %86
br label %87
87: ; preds = %78, %69, %82
%88 = add nuw i64 %70, 1
%89 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 %88
%90 = load i8, i8* %89
%91 = icmp eq i8 %90, 0
br i1 %91, label %92, label %69
92: ; preds = %87
%93 = trunc i64 %88 to i32
br label %94
94: ; preds = %92, %36
%95 = phi i32 [ 0, %36 ], [ %93, %92 ]
%96 = load i32, i32* %63
%97 = trunc i32 %96 to i8
%98 = call i32 @debugint(i8 signext %97, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%99 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 1
%100 = load i32, i32* %99
%101 = trunc i32 %100 to i8
%102 = call i32 @debugint(i8 signext %101, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0))
%103 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 2
%104 = load i32, i32* %103
%105 = trunc i32 %104 to i8
%106 = call i32 @debugint(i8 signext %105, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0))
%107 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 3
%108 = load i32, i32* %107
%109 = trunc i32 %108 to i8
%110 = call i32 @debugint(i8 signext %109, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0))
%111 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 4
%112 = load i32, i32* %111
%113 = trunc i32 %112 to i8
%114 = call i32 @debugint(i8 signext %113, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0))
%115 = trunc i32 %95 to i8
%116 = call i32 @debugint(i8 signext %115, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
br label %117
117: ; preds = %123, %94
%118 = phi i64 [ %143, %123 ], [ 0, %94 ]
%119 = phi i32 [ %131, %123 ], [ 0, %94 ]
%120 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 %118
%121 = load i32, i32* %120
switch i32 %121, label %123 [
i32 0, label %144
i32 79, label %122
]
122: ; preds = %117
store i32 0, i32* %120
br label %123
123: ; preds = %117, %122
%124 = phi i32 [ %121, %117 ], [ 0, %122 ]
%125 = load i32, i32* %1
%126 = trunc i64 %118 to i32
%127 = xor i32 %126, -1
%128 = add nsw i32 %95, %127
%129 = call i32 @pow(i32 %125, i32 %128)
%130 = mul nsw i32 %129, %124
%131 = add nsw i32 %130, %119
%132 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%133 = trunc i32 %128 to i8
%134 = call i32 @debugint(i8 signext %133, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.23, i64 0, i64 0))
%135 = call i32 @pow(i32 10, i32 %128)
%136 = trunc i32 %135 to i8
%137 = call i32 @debugint(i8 signext %136, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0))
%138 = load i32, i32* %120
%139 = call i32 @pow(i32 10, i32 %128)
%140 = mul nsw i32 %139, %138
%141 = trunc i32 %140 to i8
%142 = call i32 @debugint(i8 signext %141, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i64 0, i64 0))
%143 = add nuw i64 %118, 1
br label %117
144: ; preds = %117
%145 = trunc i32 %119 to i8
%146 = call i32 @debugint(i8 signext %145, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.26, i64 0, i64 0))
%147 = icmp sgt i32 %119, 0
%148 = load i32, i32* %2
br label %149
149: ; preds = %144, %149
%150 = phi i64 [ 0, %144 ], [ %155, %149 ]
%151 = phi i32 [ %119, %144 ], [ %154, %149 ]
%152 = srem i32 %151, %148
%153 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 %150
store i32 %152, i32* %153
%154 = sdiv i32 %151, %148
%155 = add nuw i64 %150, 1
%156 = icmp sgt i32 %154, 0
br i1 %156, label %149, label %157
157: ; preds = %149
%158 = trunc i64 %155 to i32
%159 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 0
%160 = load i32, i32* %159
%161 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 1
%162 = load i32, i32* %161
%163 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 2
%164 = load i32, i32* %163
%165 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 3
%166 = load i32, i32* %165
%167 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 4
%168 = load i32, i32* %167
%169 = trunc i32 %160 to i8
%170 = trunc i32 %162 to i8
%171 = trunc i32 %164 to i8
%172 = trunc i32 %166 to i8
%173 = trunc i32 %168 to i8
%174 = call i32 @debugint(i8 signext %169, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.27, i64 0, i64 0))
%175 = call i32 @debugint(i8 signext %170, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.28, i64 0, i64 0))
%176 = call i32 @debugint(i8 signext %171, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.29, i64 0, i64 0))
%177 = call i32 @debugint(i8 signext %172, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.30, i64 0, i64 0))
%178 = call i32 @debugint(i8 signext %173, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.31, i64 0, i64 0))
%179 = trunc i64 %155 to i8
%180 = call i32 @debugint(i8 signext %179, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
%181 = icmp sgt i32 %158, 0
br i1 %181, label %182, label %233
182: ; preds = %157
%183 = and i64 %155, 4294967295
%184 = and i64 %155, 1
%185 = icmp eq i64 %183, 1
br i1 %185, label %218, label %186
186: ; preds = %182
%187 = sub nsw i64 %183, %184
br label %188
188: ; preds = %214, %186
%189 = phi i64 [ %183, %186 ], [ %203, %214 ]
%190 = phi i64 [ 0, %186 ], [ %215, %214 ]
%191 = phi i64 [ 0, %186 ], [ %216, %214 ]
%192 = add i64 %189, 4294967295
%193 = and i64 %192, 4294967295
%194 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 %193
%195 = load i32, i32* %194
%196 = icmp ult i32 %195, 16
br i1 %196, label %197, label %202
197: ; preds = %188
%198 = sext i32 %195 to i64
%199 = getelementptr inbounds [16 x i8], [16 x i8]* @switch.table.main.38, i64 0, i64 %198
%200 = load i8, i8* %199
%201 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 %190
store i8 %200, i8* %201
br label %202
202: ; preds = %188, %197
%203 = add nsw i64 %189, -2
%204 = and i64 %203, 4294967295
%205 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 %204
%206 = load i32, i32* %205
%207 = icmp ult i32 %206, 16
br i1 %207, label %208, label %214
208: ; preds = %202
%209 = or i64 %190, 1
%210 = sext i32 %206 to i64
%211 = getelementptr inbounds [16 x i8], [16 x i8]* @switch.table.main.38, i64 0, i64 %210
%212 = load i8, i8* %211
%213 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 %209
store i8 %212, i8* %213
br label %214
214: ; preds = %208, %202
%215 = add nuw nsw i64 %190, 2
%216 = add i64 %191, 2
%217 = icmp eq i64 %216, %187
br i1 %217, label %218, label %188
218: ; preds = %214, %182
%219 = phi i64 [ %183, %182 ], [ %203, %214 ]
%220 = phi i64 [ 0, %182 ], [ %215, %214 ]
%221 = icmp eq i64 %184, 0
br i1 %221, label %233, label %222
222: ; preds = %218
%223 = add i64 %219, 4294967295
%224 = and i64 %223, 4294967295
%225 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 %224
%226 = load i32, i32* %225
%227 = icmp ult i32 %226, 16
br i1 %227, label %228, label %233
228: ; preds = %222
%229 = sext i32 %226 to i64
%230 = getelementptr inbounds [16 x i8], [16 x i8]* @switch.table.main.38, i64 0, i64 %229
%231 = load i8, i8* %230
%232 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 %220
store i8 %231, i8* %232
br label %233
233: ; preds = %218, %228, %222, %157
%234 = load i8, i8* %12
%235 = call i32 @debugint(i8 signext %234, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.32, i64 0, i64 0))
%236 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 1
%237 = load i8, i8* %236
%238 = call i32 @debugint(i8 signext %237, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.33, i64 0, i64 0))
%239 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 2
%240 = load i8, i8* %239
%241 = call i32 @debugint(i8 signext %240, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.34, i64 0, i64 0))
%242 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 3
%243 = load i8, i8* %242
%244 = call i32 @debugint(i8 signext %243, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.35, i64 0, i64 0))
%245 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 4
%246 = load i8, i8* %245
%247 = call i32 @debugint(i8 signext %246, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.36, i64 0, i64 0))
%248 = load i32, i32* %2
%249 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.37, i64 0, i64 0), i8* %12, i32 %248)
ret void
}