#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*/ fprintf(int /*<<< orphan*/, char *);
void *get_register_id(char);
int /*<<< orphan*/ stderr;
int strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
unsigned char decode_parameter(char *param, int *extra_word_needed,
                               unsigned short *extra_word_value) {
  int square_brackets = 0;
  int first_sqbracket = 0, last_sqbracket = 0;
  if (param[0] == '[') {
    first_sqbracket = 1;
    param++;
  }
  if (param[strlen(param) - 1] == ']') {
    last_sqbracket = 1;
    param[strlen(param) - 1] = 0;
  }
  if (first_sqbracket == 1) {
    square_brackets = 1;
    if (last_sqbracket != 1) {
      fprintf(stderr, "Missing last square bracket\n");
      return 0;
    }
  } else {
    if (last_sqbracket == 1) {
      fprintf(stderr, "Missing first square bracket\n");
      return 0;
    }
  }
  if (param[0] == '0' && param[1] == 'X') {
    unsigned short value = 0;
    param = param + 2;
    int digit_count = strlen(param);
    int digit_num = 0;
    int reg = -1;
    for (digit_num = 0; digit_num < digit_count; digit_num++) {
      int digit_val = -1;
      char current_digit = param[digit_num];
      if (current_digit >= '0' && current_digit <= '9')
        digit_val = current_digit - '0';
      if (current_digit >= 'A' && current_digit <= 'F')
        digit_val = current_digit - 'A' + 10;
      if (current_digit == '+' && square_brackets == 1) {
        reg = get_register_id(param[digit_num + 1]);
        digit_num++;
      } else {
        if (digit_val == -1) {
          fprintf(stderr, "invalid literal\n");
          return 0;
        }
        value = (value << 4) + digit_val;
      }
    }
    if (value <= 0x1f && square_brackets == 0)
      return value + 0x20;
    *extra_word_needed = 1;
    *extra_word_value = value;
    if (square_brackets == 1) {
      if (reg != -1)
        return 0x10 + reg;
      return 0x1e;
    }
    return 0x1f;
  }
  if (param[0] >= '0' && param[0] <= '9') {
    unsigned short value = 0;
    int digit_count = strlen(param);
    int digit_num = 0;
    int reg = -1;
    for (digit_num = 0; digit_num < digit_count; digit_num++) {
      int digit_val = -1;
      char current_digit = param[digit_num];
      if (current_digit >= '0' && current_digit <= '9')
        digit_val = current_digit - '0';
      if (current_digit == '+' && square_brackets == 1) {
        reg = get_register_id(param[digit_num + 1]);
        digit_num++;
      } else {
        if (digit_val == -1) {
          fprintf(stderr, "invalid literal\n");
          return 0;
        }
        value = (value * 10) + digit_val;
      }
    }
    if (value <= 0x1f && square_brackets == 0)
      return value + 0x20;
    *extra_word_needed = 1;
    *extra_word_value = value;
    if (square_brackets == 1) {
      if (reg != -1)
        return 0x10 + reg;
      return 0x1e;
    }
    return 0x1f;
  }
  if (param[1] == 0) {
    unsigned char reg = get_register_id(param[0]);
    if (square_brackets == 1)
      reg += 0x08;
    return reg;
  }
  if (!strncmp("POP", param, 3))
    return 0x18;
  if (!strncmp("PEEK", param, 4))
    return 0x19;
  if (!strncmp("PUSH", param, 4))
    return 0x1a;
  if (!strncmp("SP", param, 2))
    return 0x1b;
  if (!strncmp("PC", param, 2))
    return 0x1c;
  if (!strncmp("O", param, 1))
    return 0x1d;
  *extra_word_needed = 1;
  *extra_word_value = 0;
  return 0x1f;
}


x86 assembly (clang, -O0):
<decode_parameter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jne    118c <decode_parameter+0x4c>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x60(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5d,%eax
jne    11de <decode_parameter+0x9e>
movl   $0x1,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
cmpl   $0x1,-0x28(%rbp)
jne    121c <decode_parameter+0xdc>
movl   $0x1,-0x24(%rbp)
cmpl   $0x1,-0x2c(%rbp)
je     1217 <decode_parameter+0xd7>
mov    0x2de0(%rip),%rax
mov    (%rax),%edi
lea    0xdf7(%rip),%rsi
call   1060 <fprintf@plt>
movb   $0x0,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
jmp    1249 <decode_parameter+0x109>
cmpl   $0x1,-0x2c(%rbp)
jne    1244 <decode_parameter+0x104>
mov    0x2db3(%rip),%rax
mov    (%rax),%edi
lea    0xde7(%rip),%rsi
call   1060 <fprintf@plt>
movb   $0x0,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
jmp    1249 <decode_parameter+0x109>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    13ff <decode_parameter+0x2bf>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x58,%eax
jne    13ff <decode_parameter+0x2bf>
movw   $0x0,-0x2e(%rbp)
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0xffffffff,-0x3c(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1390 <decode_parameter+0x250>
movl   $0xffffffff,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x41(%rbp)
movsbl -0x41(%rbp),%eax
cmp    $0x30,%eax
jl     12e2 <decode_parameter+0x1a2>
movsbl -0x41(%rbp),%eax
cmp    $0x39,%eax
jg     12e2 <decode_parameter+0x1a2>
movsbl -0x41(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x40(%rbp)
movsbl -0x41(%rbp),%eax
cmp    $0x41,%eax
jl     1309 <decode_parameter+0x1c9>
movsbl -0x41(%rbp),%eax
cmp    $0x46,%eax
jg     1309 <decode_parameter+0x1c9>
movsbl -0x41(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x40(%rbp)
movsbl -0x41(%rbp),%eax
cmp    $0x2b,%eax
jne    1347 <decode_parameter+0x207>
cmpl   $0x1,-0x24(%rbp)
jne    1347 <decode_parameter+0x207>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <get_register_id@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    137d <decode_parameter+0x23d>
cmpl   $0xffffffff,-0x40(%rbp)
jne    136f <decode_parameter+0x22f>
mov    0x2c88(%rip),%rax
mov    (%rax),%edi
lea    0xcda(%rip),%rsi
call   1060 <fprintf@plt>
movb   $0x0,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
movzwl -0x2e(%rbp),%eax
shl    $0x4,%eax
add    -0x40(%rbp),%eax
mov    %ax,-0x2e(%rbp)
jmp    1382 <decode_parameter+0x242>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    129d <decode_parameter+0x15d>
movzwl -0x2e(%rbp),%eax
cmp    $0x1f,%eax
jg     13b6 <decode_parameter+0x276>
cmpl   $0x0,-0x24(%rbp)
jne    13b6 <decode_parameter+0x276>
movzwl -0x2e(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x2e(%rbp),%cx
mov    -0x20(%rbp),%rax
mov    %cx,(%rax)
cmpl   $0x1,-0x24(%rbp)
jne    13f6 <decode_parameter+0x2b6>
cmpl   $0xffffffff,-0x3c(%rbp)
je     13ed <decode_parameter+0x2ad>
mov    -0x3c(%rbp),%eax
add    $0x10,%eax
mov    %al,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
movb   $0x1e,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
movb   $0x1f,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1581 <decode_parameter+0x441>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jg     1581 <decode_parameter+0x441>
movw   $0x0,-0x44(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0xffffffff,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    1512 <decode_parameter+0x3d2>
movl   $0xffffffff,-0x54(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x55(%rbp)
movsbl -0x55(%rbp),%eax
cmp    $0x30,%eax
jl     148b <decode_parameter+0x34b>
movsbl -0x55(%rbp),%eax
cmp    $0x39,%eax
jg     148b <decode_parameter+0x34b>
movsbl -0x55(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x54(%rbp)
movsbl -0x55(%rbp),%eax
cmp    $0x2b,%eax
jne    14c9 <decode_parameter+0x389>
cmpl   $0x1,-0x24(%rbp)
jne    14c9 <decode_parameter+0x389>
mov    -0x10(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <get_register_id@plt>
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    14ff <decode_parameter+0x3bf>
cmpl   $0xffffffff,-0x54(%rbp)
jne    14f1 <decode_parameter+0x3b1>
mov    0x2b06(%rip),%rax
mov    (%rax),%edi
lea    0xb58(%rip),%rsi
call   1060 <fprintf@plt>
movb   $0x0,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
movzwl -0x44(%rbp),%eax
imul   $0xa,%eax,%eax
add    -0x54(%rbp),%eax
mov    %ax,-0x44(%rbp)
jmp    1504 <decode_parameter+0x3c4>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1446 <decode_parameter+0x306>
movzwl -0x44(%rbp),%eax
cmp    $0x1f,%eax
jg     1538 <decode_parameter+0x3f8>
cmpl   $0x0,-0x24(%rbp)
jne    1538 <decode_parameter+0x3f8>
movzwl -0x44(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x44(%rbp),%cx
mov    -0x20(%rbp),%rax
mov    %cx,(%rax)
cmpl   $0x1,-0x24(%rbp)
jne    1578 <decode_parameter+0x438>
cmpl   $0xffffffff,-0x50(%rbp)
je     156f <decode_parameter+0x42f>
mov    -0x50(%rbp),%eax
add    $0x10,%eax
mov    %al,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
movb   $0x1e,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
movb   $0x1f,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    15c0 <decode_parameter+0x480>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1050 <get_register_id@plt>
mov    %al,-0x56(%rbp)
cmpl   $0x1,-0x24(%rbp)
jne    15b5 <decode_parameter+0x475>
movzbl -0x56(%rbp),%eax
add    $0x8,%eax
mov    %al,-0x56(%rbp)
mov    -0x56(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
mov    -0x10(%rbp),%rsi
lea    0xa81(%rip),%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    15e7 <decode_parameter+0x4a7>
movb   $0x18,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
mov    -0x10(%rbp),%rsi
lea    0xa5e(%rip),%rdi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    160e <decode_parameter+0x4ce>
movb   $0x19,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
mov    -0x10(%rbp),%rsi
lea    0xa3c(%rip),%rdi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1635 <decode_parameter+0x4f5>
movb   $0x1a,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
mov    -0x10(%rbp),%rsi
lea    0xa1a(%rip),%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    165c <decode_parameter+0x51c>
movb   $0x1b,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
mov    -0x10(%rbp),%rsi
lea    0x9f6(%rip),%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1683 <decode_parameter+0x543>
movb   $0x1c,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
mov    -0x10(%rbp),%rsi
lea    0x9d2(%rip),%rdi
mov    $0x1,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    16aa <decode_parameter+0x56a>
movb   $0x1d,-0x1(%rbp)
jmp    16c1 <decode_parameter+0x581>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x20(%rbp),%rax
movw   $0x0,(%rax)
movb   $0x1f,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_parameter>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r14
mov    %rsi,%rbp
mov    (%rdi),%r13b
xor    %ebx,%ebx
cmp    $0x5b,%r13b
sete   %bl
add    %rdi,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
cmpb   $0x5d,-0x1(%rax,%rbx,1)
jne    119e <decode_parameter+0x5e>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
cmp    $0x5b,%r13b
je     11b9 <decode_parameter+0x79>
mov    0x2e50(%rip),%rax
mov    (%rax),%edi
lea    0xe84(%rip),%rsi
jmp    142f <decode_parameter+0x2ef>
cmp    $0x5b,%r13b
jne    11b9 <decode_parameter+0x79>
mov    0x2e35(%rip),%rax
mov    (%rax),%edi
lea    0xe4c(%rip),%rsi
jmp    142f <decode_parameter+0x2ef>
cmp    $0x5b,%r13b
setne  %dl
mov    (%rbx),%al
cmp    $0x30,%al
jne    1276 <decode_parameter+0x136>
cmpb   $0x58,0x1(%rbx)
jne    1282 <decode_parameter+0x142>
mov    %dl,0x7(%rsp)
mov    %rbp,0x8(%rsp)
mov    %r14,0x10(%rsp)
add    $0x2,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
xor    %ecx,%ecx
test   %eax,%eax
jle    1439 <decode_parameter+0x2f9>
mov    %eax,%r15d
mov    $0xffffffff,%r8d
mov    $0xffffffff,%eax
xor    %r12d,%r12d
jmp    1234 <decode_parameter+0xf4>
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx,%r14,1),%edi
add    $0x1,%r14
call   1050 <get_register_id@plt>
mov    $0xffffffff,%r8d
mov    %r14d,%ecx
add    $0x1,%ecx
cmp    %r15d,%ecx
jge    1441 <decode_parameter+0x301>
movslq %ecx,%r14
movsbl (%rbx,%r14,1),%esi
lea    -0x30(%rsi),%edx
lea    -0x30(%rsi),%edi
cmp    $0xa,%dl
cmovae %r8d,%edi
lea    -0x41(%rsi),%ebp
lea    -0x37(%rsi),%edx
cmp    $0x6,%bpl
cmovae %edi,%edx
cmp    $0x2b,%esi
jne    1261 <decode_parameter+0x121>
cmp    $0x5b,%r13b
je     1210 <decode_parameter+0xd0>
cmp    $0xffffffff,%edx
je     141f <decode_parameter+0x2df>
shl    $0x4,%r12d
add    %r12d,%edx
mov    %edx,%r12d
jmp    1228 <decode_parameter+0xe8>
lea    -0x30(%rax),%ecx
cmp    $0x9,%cl
ja     130f <decode_parameter+0x1cf>
mov    %dl,0x7(%rsp)
mov    %rbp,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,%rdi
call   1040 <strlen@plt>
xor    %ecx,%ecx
test   %eax,%eax
jle    13d6 <decode_parameter+0x296>
mov    %eax,%r14d
mov    $0xffffffff,%r15d
mov    $0xffffffff,%eax
xor    %r12d,%r12d
jmp    12dc <decode_parameter+0x19c>
cs nopw 0x0(%rax,%rax,1)
nop
movsbl 0x1(%rbx,%rbp,1),%edi
add    $0x1,%rbp
call   1050 <get_register_id@plt>
mov    %ebp,%ecx
add    $0x1,%ecx
cmp    %r14d,%ecx
jge    13de <decode_parameter+0x29e>
movslq %ecx,%rbp
movsbl (%rbx,%rbp,1),%esi
lea    -0x30(%rsi),%edi
lea    -0x30(%rsi),%edx
cmp    $0xa,%dil
cmovae %r15d,%edx
cmp    $0x2b,%esi
jne    12fc <decode_parameter+0x1bc>
cmp    $0x5b,%r13b
je     12c0 <decode_parameter+0x180>
cmp    $0xffffffff,%edx
je     141f <decode_parameter+0x2df>
lea    (%r12,%r12,4),%esi
lea    (%rdx,%rsi,2),%r12d
jmp    12d0 <decode_parameter+0x190>
cmpb   $0x0,0x1(%rbx)
je     147f <decode_parameter+0x33f>
lea    0xd2c(%rip),%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1498 <decode_parameter+0x358>
lea    0xd14(%rip),%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     149d <decode_parameter+0x35d>
lea    0xcfd(%rip),%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     14a2 <decode_parameter+0x362>
lea    0xce6(%rip),%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     14a7 <decode_parameter+0x367>
lea    0xccd(%rip),%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     14ac <decode_parameter+0x36c>
lea    0xcb4(%rip),%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     14b1 <decode_parameter+0x371>
movl   $0x1,0x0(%rbp)
movw   $0x0,(%r14)
mov    $0x1f,%r12b
jmp    14b4 <decode_parameter+0x374>
mov    $0xffffffff,%eax
xor    %r12d,%r12d
cmp    $0x20,%r12w
setb   %cl
and    0x7(%rsp),%cl
cmp    $0x1,%cl
je     1452 <decode_parameter+0x312>
mov    0x8(%rsp),%rcx
movl   $0x1,(%rcx)
mov    0x10(%rsp),%rcx
mov    %r12w,(%rcx)
mov    $0x1f,%r12b
cmp    $0x5b,%r13b
jne    14b4 <decode_parameter+0x374>
cmp    $0xffffffff,%eax
je     147a <decode_parameter+0x33a>
add    $0x10,%al
mov    %eax,%r12d
jmp    14b4 <decode_parameter+0x374>
mov    0x2bba(%rip),%rax
mov    (%rax),%edi
lea    0xc0c(%rip),%rsi
call   1060 <fprintf@plt>
xor    %r12d,%r12d
jmp    14b4 <decode_parameter+0x374>
mov    $0xffffffff,%eax
xor    %r12d,%r12d
cmp    $0x20,%r12w
setb   %cl
and    0x7(%rsp),%cl
cmp    $0x1,%cl
jne    1458 <decode_parameter+0x318>
add    $0x20,%r12b
jmp    14b4 <decode_parameter+0x374>
mov    0x8(%rsp),%rcx
movl   $0x1,(%rcx)
mov    0x10(%rsp),%rcx
mov    %r12w,(%rcx)
mov    $0x1f,%r12b
cmp    $0x5b,%r13b
jne    14b4 <decode_parameter+0x374>
cmp    $0xffffffff,%eax
jne    1415 <decode_parameter+0x2d5>
mov    $0x1e,%r12b
jmp    14b4 <decode_parameter+0x374>
movsbl %al,%edi
call   1050 <get_register_id@plt>
lea    0x8(%rax),%ecx
cmp    $0x5b,%r13b
movzbl %cl,%r12d
cmovne %eax,%r12d
jmp    14b4 <decode_parameter+0x374>
mov    $0x18,%r12b
jmp    14b4 <decode_parameter+0x374>
mov    $0x19,%r12b
jmp    14b4 <decode_parameter+0x374>
mov    $0x1a,%r12b
jmp    14b4 <decode_parameter+0x374>
mov    $0x1b,%r12b
jmp    14b4 <decode_parameter+0x374>
mov    $0x1c,%r12b
jmp    14b4 <decode_parameter+0x374>
mov    $0x1d,%r12b
mov    %r12d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"Missing last square bracket\0A\00"
@.str.1 = [30 x i8] c"Missing first square bracket\0A\00"
@.str.2 = [17 x i8] c"invalid literal\0A\00"
@.str.3 = [4 x i8] c"POP\00"
@.str.4 = [5 x i8] c"PEEK\00"
@.str.5 = [5 x i8] c"PUSH\00"
@.str.6 = [3 x i8] c"SP\00"
@.str.7 = [3 x i8] c"PC\00"
@.str.8 = [2 x i8] c"O\00"
define zeroext i8 @decode_parameter(i8* %0, i32* %1, i16* %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i16*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i16
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i8
%17 = alloca i16
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i8
%23 = alloca i8
store i8* %0, i8** %5
store i32* %1, i32** %6
store i16* %2, i16** %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
%24 = load i8*, i8** %5
%25 = getelementptr inbounds i8, i8* %24, i64 0
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 91
br i1 %28, label %29, label %32
29: ; preds = %3
store i32 1, i32* %9
%30 = load i8*, i8** %5
%31 = getelementptr inbounds i8, i8* %30, i32 1
store i8* %31, i8** %5
br label %32
32: ; preds = %29, %3
%33 = load i8*, i8** %5
%34 = load i8*, i8** %5
%35 = call i32 @strlen(i8* %34)
%36 = sub nsw i32 %35, 1
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8, i8* %33, i64 %37
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 93
br i1 %41, label %42, label %49
42: ; preds = %32
store i32 1, i32* %10
%43 = load i8*, i8** %5
%44 = load i8*, i8** %5
%45 = call i32 @strlen(i8* %44)
%46 = sub nsw i32 %45, 1
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i8, i8* %43, i64 %47
store i8 0, i8* %48
br label %49
49: ; preds = %42, %32
%50 = load i32, i32* %9
%51 = icmp eq i32 %50, 1
br i1 %51, label %52, label %59
52: ; preds = %49
store i32 1, i32* %8
%53 = load i32, i32* %10
%54 = icmp ne i32 %53, 1
br i1 %54, label %55, label %58
55: ; preds = %52
%56 = load i32, i32* @stderr
%57 = call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
store i8 0, i8* %4
br label %331
58: ; preds = %52
br label %66
59: ; preds = %49
%60 = load i32, i32* %10
%61 = icmp eq i32 %60, 1
br i1 %61, label %62, label %65
62: ; preds = %59
%63 = load i32, i32* @stderr
%64 = call i32 @fprintf(i32 %63, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
store i8 0, i8* %4
br label %331
65: ; preds = %59
br label %66
66: ; preds = %65, %58
%67 = load i8*, i8** %5
%68 = getelementptr inbounds i8, i8* %67, i64 0
%69 = load i8, i8* %68
%70 = sext i8 %69 to i32
%71 = icmp eq i32 %70, 48
br i1 %71, label %72, label %179
72: ; preds = %66
%73 = load i8*, i8** %5
%74 = getelementptr inbounds i8, i8* %73, i64 1
%75 = load i8, i8* %74
%76 = sext i8 %75 to i32
%77 = icmp eq i32 %76, 88
br i1 %77, label %78, label %179
78: ; preds = %72
store i16 0, i16* %11
%79 = load i8*, i8** %5
%80 = getelementptr inbounds i8, i8* %79, i64 2
store i8* %80, i8** %5
%81 = load i8*, i8** %5
%82 = call i32 @strlen(i8* %81)
store i32 %82, i32* %12
store i32 0, i32* %13
store i32 -1, i32* %14
store i32 0, i32* %13
br label %83
83: ; preds = %149, %78
%84 = load i32, i32* %13
%85 = load i32, i32* %12
%86 = icmp slt i32 %84, %85
br i1 %86, label %87, label %152
87: ; preds = %83
store i32 -1, i32* %15
%88 = load i8*, i8** %5
%89 = load i32, i32* %13
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8, i8* %88, i64 %90
%92 = load i8, i8* %91
store i8 %92, i8* %16
%93 = load i8, i8* %16
%94 = sext i8 %93 to i32
%95 = icmp sge i32 %94, 48
br i1 %95, label %96, label %104
96: ; preds = %87
%97 = load i8, i8* %16
%98 = sext i8 %97 to i32
%99 = icmp sle i32 %98, 57
br i1 %99, label %100, label %104
100: ; preds = %96
%101 = load i8, i8* %16
%102 = sext i8 %101 to i32
%103 = sub nsw i32 %102, 48
store i32 %103, i32* %15
br label %104
104: ; preds = %100, %96, %87
%105 = load i8, i8* %16
%106 = sext i8 %105 to i32
%107 = icmp sge i32 %106, 65
br i1 %107, label %108, label %117
108: ; preds = %104
%109 = load i8, i8* %16
%110 = sext i8 %109 to i32
%111 = icmp sle i32 %110, 70
br i1 %111, label %112, label %117
112: ; preds = %108
%113 = load i8, i8* %16
%114 = sext i8 %113 to i32
%115 = sub nsw i32 %114, 65
%116 = add nsw i32 %115, 10
store i32 %116, i32* %15
br label %117
117: ; preds = %112, %108, %104
%118 = load i8, i8* %16
%119 = sext i8 %118 to i32
%120 = icmp eq i32 %119, 43
br i1 %120, label %121, label %135
121: ; preds = %117
%122 = load i32, i32* %8
%123 = icmp eq i32 %122, 1
br i1 %123, label %124, label %135
124: ; preds = %121
%125 = load i8*, i8** %5
%126 = load i32, i32* %13
%127 = add nsw i32 %126, 1
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i8, i8* %125, i64 %128
%130 = load i8, i8* %129
%131 = call i8* @get_register_id(i8 signext %130)
%132 = ptrtoint i8* %131 to i32
store i32 %132, i32* %14
%133 = load i32, i32* %13
%134 = add nsw i32 %133, 1
store i32 %134, i32* %13
br label %148
135: ; preds = %121, %117
%136 = load i32, i32* %15
%137 = icmp eq i32 %136, -1
br i1 %137, label %138, label %141
138: ; preds = %135
%139 = load i32, i32* @stderr
%140 = call i32 @fprintf(i32 %139, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
store i8 0, i8* %4
br label %331
141: ; preds = %135
%142 = load i16, i16* %11
%143 = zext i16 %142 to i32
%144 = shl i32 %143, 4
%145 = load i32, i32* %15
%146 = add nsw i32 %144, %145
%147 = trunc i32 %146 to i16
store i16 %147, i16* %11
br label %148
148: ; preds = %141, %124
br label %149
149: ; preds = %148
%150 = load i32, i32* %13
%151 = add nsw i32 %150, 1
store i32 %151, i32* %13
br label %83
152: ; preds = %83
%153 = load i16, i16* %11
%154 = zext i16 %153 to i32
%155 = icmp sle i32 %154, 31
br i1 %155, label %156, label %164
156: ; preds = %152
%157 = load i32, i32* %8
%158 = icmp eq i32 %157, 0
br i1 %158, label %159, label %164
159: ; preds = %156
%160 = load i16, i16* %11
%161 = zext i16 %160 to i32
%162 = add nsw i32 %161, 32
%163 = trunc i32 %162 to i8
store i8 %163, i8* %4
br label %331
164: ; preds = %156, %152
%165 = load i32*, i32** %6
store i32 1, i32* %165
%166 = load i16, i16* %11
%167 = load i16*, i16** %7
store i16 %166, i16* %167
%168 = load i32, i32* %8
%169 = icmp eq i32 %168, 1
br i1 %169, label %170, label %178
170: ; preds = %164
%171 = load i32, i32* %14
%172 = icmp ne i32 %171, -1
br i1 %172, label %173, label %177
173: ; preds = %170
%174 = load i32, i32* %14
%175 = add nsw i32 16, %174
%176 = trunc i32 %175 to i8
store i8 %176, i8* %4
br label %331
177: ; preds = %170
store i8 30, i8* %4
br label %331
178: ; preds = %164
store i8 31, i8* %4
br label %331
179: ; preds = %72, %66
%180 = load i8*, i8** %5
%181 = getelementptr inbounds i8, i8* %180, i64 0
%182 = load i8, i8* %181
%183 = sext i8 %182 to i32
%184 = icmp sge i32 %183, 48
br i1 %184, label %185, label %277
185: ; preds = %179
%186 = load i8*, i8** %5
%187 = getelementptr inbounds i8, i8* %186, i64 0
%188 = load i8, i8* %187
%189 = sext i8 %188 to i32
%190 = icmp sle i32 %189, 57
br i1 %190, label %191, label %277
191: ; preds = %185
store i16 0, i16* %17
%192 = load i8*, i8** %5
%193 = call i32 @strlen(i8* %192)
store i32 %193, i32* %18
store i32 0, i32* %19
store i32 -1, i32* %20
store i32 0, i32* %19
br label %194
194: ; preds = %247, %191
%195 = load i32, i32* %19
%196 = load i32, i32* %18
%197 = icmp slt i32 %195, %196
br i1 %197, label %198, label %250
198: ; preds = %194
store i32 -1, i32* %21
%199 = load i8*, i8** %5
%200 = load i32, i32* %19
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds i8, i8* %199, i64 %201
%203 = load i8, i8* %202
store i8 %203, i8* %22
%204 = load i8, i8* %22
%205 = sext i8 %204 to i32
%206 = icmp sge i32 %205, 48
br i1 %206, label %207, label %215
207: ; preds = %198
%208 = load i8, i8* %22
%209 = sext i8 %208 to i32
%210 = icmp sle i32 %209, 57
br i1 %210, label %211, label %215
211: ; preds = %207
%212 = load i8, i8* %22
%213 = sext i8 %212 to i32
%214 = sub nsw i32 %213, 48
store i32 %214, i32* %21
br label %215
215: ; preds = %211, %207, %198
%216 = load i8, i8* %22
%217 = sext i8 %216 to i32
%218 = icmp eq i32 %217, 43
br i1 %218, label %219, label %233
219: ; preds = %215
%220 = load i32, i32* %8
%221 = icmp eq i32 %220, 1
br i1 %221, label %222, label %233
222: ; preds = %219
%223 = load i8*, i8** %5
%224 = load i32, i32* %19
%225 = add nsw i32 %224, 1
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds i8, i8* %223, i64 %226
%228 = load i8, i8* %227
%229 = call i8* @get_register_id(i8 signext %228)
%230 = ptrtoint i8* %229 to i32
store i32 %230, i32* %20
%231 = load i32, i32* %19
%232 = add nsw i32 %231, 1
store i32 %232, i32* %19
br label %246
233: ; preds = %219, %215
%234 = load i32, i32* %21
%235 = icmp eq i32 %234, -1
br i1 %235, label %236, label %239
236: ; preds = %233
%237 = load i32, i32* @stderr
%238 = call i32 @fprintf(i32 %237, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
store i8 0, i8* %4
br label %331
239: ; preds = %233
%240 = load i16, i16* %17
%241 = zext i16 %240 to i32
%242 = mul nsw i32 %241, 10
%243 = load i32, i32* %21
%244 = add nsw i32 %242, %243
%245 = trunc i32 %244 to i16
store i16 %245, i16* %17
br label %246
246: ; preds = %239, %222
br label %247
247: ; preds = %246
%248 = load i32, i32* %19
%249 = add nsw i32 %248, 1
store i32 %249, i32* %19
br label %194
250: ; preds = %194
%251 = load i16, i16* %17
%252 = zext i16 %251 to i32
%253 = icmp sle i32 %252, 31
br i1 %253, label %254, label %262
254: ; preds = %250
%255 = load i32, i32* %8
%256 = icmp eq i32 %255, 0
br i1 %256, label %257, label %262
257: ; preds = %254
%258 = load i16, i16* %17
%259 = zext i16 %258 to i32
%260 = add nsw i32 %259, 32
%261 = trunc i32 %260 to i8
store i8 %261, i8* %4
br label %331
262: ; preds = %254, %250
%263 = load i32*, i32** %6
store i32 1, i32* %263
%264 = load i16, i16* %17
%265 = load i16*, i16** %7
store i16 %264, i16* %265
%266 = load i32, i32* %8
%267 = icmp eq i32 %266, 1
br i1 %267, label %268, label %276
268: ; preds = %262
%269 = load i32, i32* %20
%270 = icmp ne i32 %269, -1
br i1 %270, label %271, label %275
271: ; preds = %268
%272 = load i32, i32* %20
%273 = add nsw i32 16, %272
%274 = trunc i32 %273 to i8
store i8 %274, i8* %4
br label %331
275: ; preds = %268
store i8 30, i8* %4
br label %331
276: ; preds = %262
store i8 31, i8* %4
br label %331
277: ; preds = %185, %179
%278 = load i8*, i8** %5
%279 = getelementptr inbounds i8, i8* %278, i64 1
%280 = load i8, i8* %279
%281 = sext i8 %280 to i32
%282 = icmp eq i32 %281, 0
br i1 %282, label %283, label %298
283: ; preds = %277
%284 = load i8*, i8** %5
%285 = getelementptr inbounds i8, i8* %284, i64 0
%286 = load i8, i8* %285
%287 = call i8* @get_register_id(i8 signext %286)
%288 = ptrtoint i8* %287 to i8
store i8 %288, i8* %23
%289 = load i32, i32* %8
%290 = icmp eq i32 %289, 1
br i1 %290, label %291, label %296
291: ; preds = %283
%292 = load i8, i8* %23
%293 = zext i8 %292 to i32
%294 = add nsw i32 %293, 8
%295 = trunc i32 %294 to i8
store i8 %295, i8* %23
br label %296
296: ; preds = %291, %283
%297 = load i8, i8* %23
store i8 %297, i8* %4
br label %331
298: ; preds = %277
%299 = load i8*, i8** %5
%300 = call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %299, i32 3)
%301 = icmp ne i32 %300, 0
br i1 %301, label %303, label %302
302: ; preds = %298
store i8 24, i8* %4
br label %331
303: ; preds = %298
%304 = load i8*, i8** %5
%305 = call i32 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %304, i32 4)
%306 = icmp ne i32 %305, 0
br i1 %306, label %308, label %307
307: ; preds = %303
store i8 25, i8* %4
br label %331
308: ; preds = %303
%309 = load i8*, i8** %5
%310 = call i32 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* %309, i32 4)
%311 = icmp ne i32 %310, 0
br i1 %311, label %313, label %312
312: ; preds = %308
store i8 26, i8* %4
br label %331
313: ; preds = %308
%314 = load i8*, i8** %5
%315 = call i32 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %314, i32 2)
%316 = icmp ne i32 %315, 0
br i1 %316, label %318, label %317
317: ; preds = %313
store i8 27, i8* %4
br label %331
318: ; preds = %313
%319 = load i8*, i8** %5
%320 = call i32 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %319, i32 2)
%321 = icmp ne i32 %320, 0
br i1 %321, label %323, label %322
322: ; preds = %318
store i8 28, i8* %4
br label %331
323: ; preds = %318
%324 = load i8*, i8** %5
%325 = call i32 @strncmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* %324, i32 1)
%326 = icmp ne i32 %325, 0
br i1 %326, label %328, label %327
327: ; preds = %323
store i8 29, i8* %4
br label %331
328: ; preds = %323
%329 = load i32*, i32** %6
store i32 1, i32* %329
%330 = load i16*, i16** %7
store i16 0, i16* %330
store i8 31, i8* %4
br label %331
331: ; preds = %328, %327, %322, %317, %312, %307, %302, %296, %276, %275, %271, %257, %236, %178, %177, %173, %159, %138, %62, %55
%332 = load i8, i8* %4
ret i8 %332
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Missing last square bracket\0A\00"
@.str.1 = [30 x i8] c"Missing first square bracket\0A\00"
@.str.2 = [17 x i8] c"invalid literal\0A\00"
@.str.3 = [4 x i8] c"POP\00"
@.str.4 = [5 x i8] c"PEEK\00"
@.str.5 = [5 x i8] c"PUSH\00"
@.str.6 = [3 x i8] c"SP\00"
@.str.7 = [3 x i8] c"PC\00"
@.str.8 = [2 x i8] c"O\00"
define zeroext i8 @decode_parameter(i8* %0, i32* nocapture writeonly %1, i16* nocapture writeonly %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 91
%6 = zext i1 %5 to i64
%7 = getelementptr i8, i8* %0, i64 %6
%8 = tail call i32 @strlen(i8* %7)
%9 = add nsw i32 %8, -1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %7, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 93
br i1 %13, label %14, label %19
14: ; preds = %3
%15 = tail call i32 @strlen(i8* %7)
%16 = add nsw i32 %15, -1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %7, i64 %17
store i8 0, i8* %18
br i1 %5, label %26, label %23
19: ; preds = %3
br i1 %5, label %20, label %26
20: ; preds = %19
%21 = load i32, i32* @stderr
%22 = tail call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %181
23: ; preds = %14
%24 = load i32, i32* @stderr
%25 = tail call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
br label %181
26: ; preds = %14, %19
%27 = xor i1 %5, true
%28 = load i8, i8* %7
%29 = icmp eq i8 %28, 48
br i1 %29, label %30, label %94
30: ; preds = %26
%31 = getelementptr inbounds i8, i8* %7, i64 1
%32 = load i8, i8* %31
%33 = icmp eq i8 %32, 88
br i1 %33, label %34, label %97
34: ; preds = %30
%35 = getelementptr inbounds i8, i8* %7, i64 2
%36 = tail call i32 @strlen(i8* %35)
%37 = icmp sgt i32 %36, 0
br i1 %37, label %38, label %80
38: ; preds = %34, %74
%39 = phi i32 [ %77, %74 ], [ -1, %34 ]
%40 = phi i32 [ %78, %74 ], [ 0, %34 ]
%41 = phi i16 [ %75, %74 ], [ 0, %34 ]
%42 = sext i32 %40 to i64
%43 = getelementptr inbounds i8, i8* %35, i64 %42
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = add i8 %44, -48
%47 = icmp ult i8 %46, 10
%48 = add nsw i32 %45, -48
%49 = select i1 %47, i32 %48, i32 -1
%50 = add i8 %44, -65
%51 = icmp ult i8 %50, 6
%52 = add nsw i32 %45, -55
%53 = select i1 %51, i32 %52, i32 %49
%54 = icmp eq i8 %44, 43
%55 = select i1 %54, i1 %5, i1 false
br i1 %55, label %56, label %64
56: ; preds = %38
%57 = add nsw i32 %40, 1
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8, i8* %35, i64 %58
%60 = load i8, i8* %59
%61 = tail call i8* @get_register_id(i8 signext %60)
%62 = ptrtoint i8* %61 to i64
%63 = trunc i64 %62 to i32
br label %74
64: ; preds = %38
%65 = icmp eq i32 %53, -1
br i1 %65, label %71, label %66
66: ; preds = %64
%67 = zext i16 %41 to i32
%68 = shl nuw nsw i32 %67, 4
%69 = add nsw i32 %53, %68
%70 = trunc i32 %69 to i16
br label %74
71: ; preds = %64
%72 = load i32, i32* @stderr
%73 = tail call i32 @fprintf(i32 %72, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %181
74: ; preds = %66, %56
%75 = phi i16 [ %70, %66 ], [ %41, %56 ]
%76 = phi i32 [ %40, %66 ], [ %57, %56 ]
%77 = phi i32 [ %39, %66 ], [ %63, %56 ]
%78 = add nsw i32 %76, 1
%79 = icmp slt i32 %78, %36
br i1 %79, label %38, label %80
80: ; preds = %74, %34
%81 = phi i16 [ 0, %34 ], [ %75, %74 ]
%82 = phi i32 [ -1, %34 ], [ %77, %74 ]
%83 = icmp ult i16 %81, 32
%84 = select i1 %83, i1 %27, i1 false
br i1 %84, label %85, label %88
85: ; preds = %80
%86 = trunc i16 %81 to i8
%87 = add nuw nsw i8 %86, 32
br label %181
88: ; preds = %80
store i32 1, i32* %1
store i16 %81, i16* %2
br i1 %5, label %89, label %181
89: ; preds = %88
%90 = icmp eq i32 %82, -1
br i1 %90, label %181, label %91
91: ; preds = %89
%92 = trunc i32 %82 to i8
%93 = add i8 %92, 16
br label %181
94: ; preds = %26
%95 = add i8 %28, -48
%96 = icmp ult i8 %95, 10
br i1 %96, label %97, label %152
97: ; preds = %30, %94
%98 = tail call i32 @strlen(i8* %7)
%99 = icmp sgt i32 %98, 0
br i1 %99, label %100, label %138
100: ; preds = %97, %132
%101 = phi i32 [ %135, %132 ], [ -1, %97 ]
%102 = phi i32 [ %136, %132 ], [ 0, %97 ]
%103 = phi i16 [ %133, %132 ], [ 0, %97 ]
%104 = sext i32 %102 to i64
%105 = getelementptr inbounds i8, i8* %7, i64 %104
%106 = load i8, i8* %105
%107 = add i8 %106, -48
%108 = icmp ult i8 %107, 10
%109 = sext i8 %106 to i32
%110 = add nsw i32 %109, -48
%111 = select i1 %108, i32 %110, i32 -1
%112 = icmp eq i8 %106, 43
%113 = select i1 %112, i1 %5, i1 false
br i1 %113, label %114, label %122
114: ; preds = %100
%115 = add nsw i32 %102, 1
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i8, i8* %7, i64 %116
%118 = load i8, i8* %117
%119 = tail call i8* @get_register_id(i8 signext %118)
%120 = ptrtoint i8* %119 to i64
%121 = trunc i64 %120 to i32
br label %132
122: ; preds = %100
%123 = icmp eq i32 %111, -1
br i1 %123, label %129, label %124
124: ; preds = %122
%125 = zext i16 %103 to i32
%126 = mul nuw nsw i32 %125, 10
%127 = add nsw i32 %111, %126
%128 = trunc i32 %127 to i16
br label %132
129: ; preds = %122
%130 = load i32, i32* @stderr
%131 = tail call i32 @fprintf(i32 %130, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %181
132: ; preds = %124, %114
%133 = phi i16 [ %128, %124 ], [ %103, %114 ]
%134 = phi i32 [ %102, %124 ], [ %115, %114 ]
%135 = phi i32 [ %101, %124 ], [ %121, %114 ]
%136 = add nsw i32 %134, 1
%137 = icmp slt i32 %136, %98
br i1 %137, label %100, label %138
138: ; preds = %132, %97
%139 = phi i16 [ 0, %97 ], [ %133, %132 ]
%140 = phi i32 [ -1, %97 ], [ %135, %132 ]
%141 = icmp ult i16 %139, 32
%142 = select i1 %141, i1 %27, i1 false
br i1 %142, label %143, label %146
143: ; preds = %138
%144 = trunc i16 %139 to i8
%145 = add nuw nsw i8 %144, 32
br label %181
146: ; preds = %138
store i32 1, i32* %1
store i16 %139, i16* %2
br i1 %5, label %147, label %181
147: ; preds = %146
%148 = icmp eq i32 %140, -1
br i1 %148, label %181, label %149
149: ; preds = %147
%150 = trunc i32 %140 to i8
%151 = add i8 %150, 16
br label %181
152: ; preds = %94
%153 = getelementptr inbounds i8, i8* %7, i64 1
%154 = load i8, i8* %153
%155 = icmp eq i8 %154, 0
br i1 %155, label %156, label %162
156: ; preds = %152
%157 = tail call i8* @get_register_id(i8 signext %28)
%158 = ptrtoint i8* %157 to i64
%159 = trunc i64 %158 to i8
%160 = add i8 %159, 8
%161 = select i1 %5, i8 %160, i8 %159
br label %181
162: ; preds = %152
%163 = tail call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %7, i32 3)
%164 = icmp eq i32 %163, 0
br i1 %164, label %181, label %165
165: ; preds = %162
%166 = tail call i32 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %7, i32 4)
%167 = icmp eq i32 %166, 0
br i1 %167, label %181, label %168
168: ; preds = %165
%169 = tail call i32 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* %7, i32 4)
%170 = icmp eq i32 %169, 0
br i1 %170, label %181, label %171
171: ; preds = %168
%172 = tail call i32 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %7, i32 2)
%173 = icmp eq i32 %172, 0
br i1 %173, label %181, label %174
174: ; preds = %171
%175 = tail call i32 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %7, i32 2)
%176 = icmp eq i32 %175, 0
br i1 %176, label %181, label %177
177: ; preds = %174
%178 = tail call i32 @strncmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* %7, i32 1)
%179 = icmp eq i32 %178, 0
br i1 %179, label %181, label %180
180: ; preds = %177
store i32 1, i32* %1
store i16 0, i16* %2
br label %181
181: ; preds = %129, %71, %177, %174, %171, %168, %165, %162, %143, %149, %147, %146, %85, %91, %89, %88, %180, %156, %23, %20
%182 = phi i8 [ 0, %20 ], [ %161, %156 ], [ 31, %180 ], [ 0, %23 ], [ 0, %71 ], [ %87, %85 ], [ %93, %91 ], [ 30, %89 ], [ 31, %88 ], [ 0, %129 ], [ %145, %143 ], [ %151, %149 ], [ 30, %147 ], [ 31, %146 ], [ 24, %162 ], [ 25, %165 ], [ 26, %168 ], [ 27, %171 ], [ 28, %174 ], [ 29, %177 ]
ret i8 %182
}