#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int rm_so;
  int rm_eo;
};
typedef TYPE_1__ regmatch_t;
typedef int /*<<< orphan*/ regex_t;

/* Variables and functions */
int /*<<< orphan*/ compile_expressions(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ *);
int getline(char **, size_t *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ regexec(int /*<<< orphan*/ *, char *, int, TYPE_1__ *,
                           int /*<<< orphan*/);
int /*<<< orphan*/ regfree(int /*<<< orphan*/ *);
int /*<<< orphan*/ stdin;
int substring_to_dec(char *, char *);
int main(int argc, const char *argv[]) {
  char screen[6][50] = {0};
  char *instruction = NULL;
  size_t len = 0;
  int a, b, i, j;
  regex_t rect, rotate_row, rotate_column;
  regmatch_t pmatch[3];
  compile_expressions(&rect, &rotate_row, &rotate_column);
  while (getline(&instruction, &len, stdin) != -1) {
    if (!regexec(&rect, instruction, 3, pmatch, 0)) {
      a = substring_to_dec(instruction + pmatch[1].rm_so,
                           instruction + pmatch[1].rm_eo - 1);
      b = substring_to_dec(instruction + pmatch[2].rm_so,
                           instruction + pmatch[2].rm_eo - 1);
      for (i = 0; i < b; i++) {
        for (j = 0; j < a; j++) {
          screen[i][j] = 1;
        }
      }
    } else if (!regexec(&rotate_row, instruction, 3, pmatch, 0)) {
      a = substring_to_dec(instruction + pmatch[1].rm_so,
                           instruction + pmatch[1].rm_eo - 1);
      b = substring_to_dec(instruction + pmatch[2].rm_so,
                           instruction + pmatch[2].rm_eo - 1);
      while (b--) {
        char prev_cell = screen[a][0];
        char end = screen[a][50 - 1];
        for (i = 1; i < 50; i++) {
          char curr_cell = screen[a][i];
          screen[a][i] = prev_cell;
          prev_cell = curr_cell;
        }
        screen[a][0] = end;
      }
    } else if (!regexec(&rotate_column, instruction, 3, pmatch, 0)) {
      a = substring_to_dec(instruction + pmatch[1].rm_so,
                           instruction + pmatch[1].rm_eo - 1);
      b = substring_to_dec(instruction + pmatch[2].rm_so,
                           instruction + pmatch[2].rm_eo - 1);
      while (b--) {
        char prev_cell = screen[0][a];
        char end = screen[6 - 1][a];
        for (i = 1; i < 6; i++) {
          char curr_cell = screen[i][a];
          screen[i][a] = prev_cell;
          prev_cell = curr_cell;
        }
        screen[0][a] = end;
      }
    } else {
      printf("Unknown instruction: %s\n", instruction);
    }
  }
  regfree(&rect);
  regfree(&rotate_row);
  regfree(&rotate_column);
  int counter = 0;
  for (i = 0; i < 6; i++) {
    for (j = 0; j < 50; j++) {
      if (screen[i][j]) {
        counter++;
      }
      printf("%c", screen[i][j] ? '#' : '.');
    }
    printf("\n");
  }
  printf("%d\n", counter);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x140(%rbp),%rdi
xor    %esi,%esi
mov    $0x12c,%edx
call   1060 <memset@plt>
movq   $0x0,-0x148(%rbp)
movq   $0x0,-0x150(%rbp)
lea    -0x164(%rbp),%rdi
lea    -0x168(%rbp),%rsi
lea    -0x16c(%rbp),%rdx
call   1090 <compile_expressions@plt>
mov    0x2e15(%rip),%rax
mov    (%rax),%edx
lea    -0x148(%rbp),%rdi
lea    -0x150(%rbp),%rsi
call   1080 <getline@plt>
cmp    $0xffffffff,%eax
je     1621 <main+0x4b1>
mov    -0x148(%rbp),%rsi
lea    -0x190(%rbp),%rcx
lea    -0x164(%rbp),%rdi
mov    $0x3,%edx
xor    %r8d,%r8d
call   1070 <regexec@plt>
cmp    $0x0,%eax
jne    1308 <main+0x198>
mov    -0x148(%rbp),%rdi
movslq -0x188(%rbp),%rax
add    %rax,%rdi
mov    -0x148(%rbp),%rsi
movslq -0x184(%rbp),%rax
add    %rax,%rsi
add    $0xffffffffffffffff,%rsi
call   1050 <substring_to_dec@plt>
mov    %eax,-0x154(%rbp)
mov    -0x148(%rbp),%rdi
movslq -0x180(%rbp),%rax
add    %rax,%rdi
mov    -0x148(%rbp),%rsi
movslq -0x17c(%rbp),%rax
add    %rax,%rsi
add    $0xffffffffffffffff,%rsi
call   1050 <substring_to_dec@plt>
mov    %eax,-0x158(%rbp)
movl   $0x0,-0x15c(%rbp)
mov    -0x15c(%rbp),%eax
cmp    -0x158(%rbp),%eax
jge    1303 <main+0x193>
movl   $0x0,-0x160(%rbp)
mov    -0x160(%rbp),%eax
cmp    -0x154(%rbp),%eax
jge    12ea <main+0x17a>
movslq -0x15c(%rbp),%rcx
lea    -0x140(%rbp),%rax
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0x160(%rbp),%rcx
movb   $0x1,(%rax,%rcx,1)
mov    -0x160(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x160(%rbp)
jmp    12a4 <main+0x134>
jmp    12ef <main+0x17f>
mov    -0x15c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x15c(%rbp)
jmp    1288 <main+0x118>
jmp    161c <main+0x4ac>
mov    -0x148(%rbp),%rsi
lea    -0x190(%rbp),%rcx
lea    -0x168(%rbp),%rdi
mov    $0x3,%edx
xor    %r8d,%r8d
call   1070 <regexec@plt>
cmp    $0x0,%eax
jne    1492 <main+0x322>
mov    -0x148(%rbp),%rdi
movslq -0x188(%rbp),%rax
add    %rax,%rdi
mov    -0x148(%rbp),%rsi
movslq -0x184(%rbp),%rax
add    %rax,%rsi
add    $0xffffffffffffffff,%rsi
call   1050 <substring_to_dec@plt>
mov    %eax,-0x154(%rbp)
mov    -0x148(%rbp),%rdi
movslq -0x180(%rbp),%rax
add    %rax,%rdi
mov    -0x148(%rbp),%rsi
movslq -0x17c(%rbp),%rax
add    %rax,%rsi
add    $0xffffffffffffffff,%rsi
call   1050 <substring_to_dec@plt>
mov    %eax,-0x158(%rbp)
mov    -0x158(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x158(%rbp)
cmp    $0x0,%eax
je     148d <main+0x31d>
movslq -0x154(%rbp),%rcx
lea    -0x140(%rbp),%rax
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%al
mov    %al,-0x191(%rbp)
movslq -0x154(%rbp),%rcx
lea    -0x140(%rbp),%rax
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
mov    0x31(%rax),%al
mov    %al,-0x192(%rbp)
movl   $0x1,-0x15c(%rbp)
cmpl   $0x32,-0x15c(%rbp)
jge    146b <main+0x2fb>
movslq -0x154(%rbp),%rcx
lea    -0x140(%rbp),%rax
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0x15c(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x193(%rbp)
mov    -0x191(%rbp),%dl
movslq -0x154(%rbp),%rcx
lea    -0x140(%rbp),%rax
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0x15c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x193(%rbp),%al
mov    %al,-0x191(%rbp)
mov    -0x15c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x15c(%rbp)
jmp    13f4 <main+0x284>
mov    -0x192(%rbp),%cl
movslq -0x154(%rbp),%rdx
lea    -0x140(%rbp),%rax
imul   $0x32,%rdx,%rdx
add    %rdx,%rax
mov    %cl,(%rax)
jmp    1395 <main+0x225>
jmp    1617 <main+0x4a7>
mov    -0x148(%rbp),%rsi
lea    -0x190(%rbp),%rcx
lea    -0x16c(%rbp),%rdi
mov    $0x3,%edx
xor    %r8d,%r8d
call   1070 <regexec@plt>
cmp    $0x0,%eax
jne    15fd <main+0x48d>
mov    -0x148(%rbp),%rdi
movslq -0x188(%rbp),%rax
add    %rax,%rdi
mov    -0x148(%rbp),%rsi
movslq -0x184(%rbp),%rax
add    %rax,%rsi
add    $0xffffffffffffffff,%rsi
call   1050 <substring_to_dec@plt>
mov    %eax,-0x154(%rbp)
mov    -0x148(%rbp),%rdi
movslq -0x180(%rbp),%rax
add    %rax,%rdi
mov    -0x148(%rbp),%rsi
movslq -0x17c(%rbp),%rax
add    %rax,%rsi
add    $0xffffffffffffffff,%rsi
call   1050 <substring_to_dec@plt>
mov    %eax,-0x158(%rbp)
mov    -0x158(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x158(%rbp)
cmp    $0x0,%eax
je     15f8 <main+0x488>
movslq -0x154(%rbp),%rax
mov    -0x140(%rbp,%rax,1),%al
mov    %al,-0x194(%rbp)
movslq -0x154(%rbp),%rax
mov    -0x46(%rbp,%rax,1),%al
mov    %al,-0x195(%rbp)
movl   $0x1,-0x15c(%rbp)
cmpl   $0x6,-0x15c(%rbp)
jge    15df <main+0x46f>
movslq -0x15c(%rbp),%rcx
lea    -0x140(%rbp),%rax
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0x154(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x196(%rbp)
mov    -0x194(%rbp),%dl
movslq -0x15c(%rbp),%rcx
lea    -0x140(%rbp),%rax
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0x154(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x196(%rbp),%al
mov    %al,-0x194(%rbp)
mov    -0x15c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x15c(%rbp)
jmp    1568 <main+0x3f8>
mov    -0x195(%rbp),%cl
movslq -0x154(%rbp),%rax
mov    %cl,-0x140(%rbp,%rax,1)
jmp    151f <main+0x3af>
jmp    1612 <main+0x4a2>
mov    -0x148(%rbp),%rsi
lea    0x9f5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1617 <main+0x4a7>
jmp    161c <main+0x4ac>
jmp    11cc <main+0x5c>
lea    -0x164(%rbp),%rdi
call   1030 <regfree@plt>
lea    -0x168(%rbp),%rdi
call   1030 <regfree@plt>
lea    -0x16c(%rbp),%rdi
call   1030 <regfree@plt>
movl   $0x0,-0x19c(%rbp)
movl   $0x0,-0x15c(%rbp)
cmpl   $0x6,-0x15c(%rbp)
jge    1726 <main+0x5b6>
movl   $0x0,-0x160(%rbp)
cmpl   $0x32,-0x160(%rbp)
jge    1704 <main+0x594>
movslq -0x15c(%rbp),%rcx
lea    -0x140(%rbp),%rax
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0x160(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     16b2 <main+0x542>
mov    -0x19c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c(%rbp)
movslq -0x15c(%rbp),%rcx
lea    -0x140(%rbp),%rax
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0x160(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x2e,%esi
mov    $0x23,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
lea    0x930(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x160(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x160(%rbp)
jmp    1670 <main+0x500>
lea    0x913(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x15c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x15c(%rbp)
jmp    1659 <main+0x4e9>
mov    -0x19c(%rbp),%esi
lea    0x8e9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x198,%rsp
lea    0x60(%rsp),%rdi
xor    %r12d,%r12d
mov    $0x12c,%edx
xor    %esi,%esi
call   1070 <memset@plt>
movq   $0x0,0x8(%rsp)
movq   $0x0,0x48(%rsp)
lea    0x1c(%rsp),%rdi
lea    0x18(%rsp),%rsi
lea    0x14(%rsp),%rdx
call   10a0 <compile_expressions@plt>
mov    0x2e16(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rdi
lea    0x48(%rsp),%rsi
call   1090 <getline@plt>
cmp    $0xffffffff,%eax
je     1600 <main+0x480>
lea    0x20(%rsp),%rbx
jmp    1234 <main+0xb4>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xdf9(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2dd3(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rdi
lea    0x48(%rsp),%rsi
call   1090 <getline@plt>
cmp    $0xffffffff,%eax
lea    0x20(%rsp),%rbx
je     1600 <main+0x480>
mov    0x8(%rsp),%rsi
lea    0x1c(%rsp),%rdi
mov    $0x3,%edx
mov    %rbx,%rcx
xor    %r8d,%r8d
call   1080 <regexec@plt>
mov    0x8(%rsp),%rsi
test   %eax,%eax
je     13d0 <main+0x250>
lea    0x18(%rsp),%rdi
mov    $0x3,%edx
mov    %rbx,%rcx
xor    %r8d,%r8d
call   1080 <regexec@plt>
mov    0x8(%rsp),%rsi
test   %eax,%eax
je     1490 <main+0x310>
lea    0x14(%rsp),%rdi
mov    $0x3,%edx
mov    %rbx,%rcx
xor    %r8d,%r8d
call   1080 <regexec@plt>
mov    0x8(%rsp),%rsi
test   %eax,%eax
jne    1200 <main+0x80>
movslq 0x28(%rsp),%rdi
add    %rsi,%rdi
movslq 0x2c(%rsp),%rax
add    %rax,%rsi
add    $0xffffffffffffffff,%rsi
call   1060 <substring_to_dec@plt>
mov    %eax,%ebp
mov    0x8(%rsp),%rax
movslq 0x30(%rsp),%rdi
add    %rax,%rdi
movslq 0x34(%rsp),%rcx
lea    (%rax,%rcx,1),%rsi
add    $0xffffffffffffffff,%rsi
call   1060 <substring_to_dec@plt>
test   %eax,%eax
je     120e <main+0x8e>
movslq %ebp,%r13
mov    0x60(%rsp,%r13,1),%dil
mov    0x92(%rsp,%r13,1),%r14b
mov    0x15a(%rsp,%r13,1),%r8b
mov    0xc4(%rsp,%r13,1),%r11b
mov    0xf6(%rsp,%r13,1),%r10b
mov    0x128(%rsp,%r13,1),%r9b
lea    -0x1(%rax),%r15d
mov    %eax,%esi
and    $0x7,%esi
je     15f1 <main+0x471>
mov    %r15d,0x40(%rsp)
xor    %r15d,%r15d
nopl   0x0(%rax,%rax,1)
mov    %edi,%ebx
mov    %r8d,%edi
mov    %r14d,%ebp
mov    %r11d,%edx
mov    %r10d,%ecx
mov    %r9d,%r8d
add    $0x1,%r15d
mov    %r10d,%r9d
mov    %r11d,%r10d
mov    %r14d,%r11d
mov    %ebx,%r14d
cmp    %r15d,%esi
jne    1330 <main+0x1b0>
sub    %r15d,%eax
mov    %ecx,%r9d
mov    %edx,%r10d
mov    %ebp,%r11d
mov    %ebx,%r14d
mov    0x40(%rsp),%r15d
cmp    $0x7,%r15d
jb     1392 <main+0x212>
mov    %edi,%ebp
mov    %r8d,%ebx
mov    %r14d,%edx
mov    %r11d,%ecx
mov    %r10d,%r8d
mov    %r9d,%edi
mov    %r11d,%r9d
mov    %r14d,%r10d
mov    %ebp,%r11d
mov    %ebx,%r14d
add    $0xfffffff8,%eax
jne    1370 <main+0x1f0>
mov    %bl,0x92(%rsp,%r13,1)
mov    %bpl,0xc4(%rsp,%r13,1)
mov    %dl,0xf6(%rsp,%r13,1)
mov    %cl,0x128(%rsp,%r13,1)
mov    %r8b,0x15a(%rsp,%r13,1)
mov    %dil,0x60(%rsp,%r13,1)
jmp    120e <main+0x8e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movslq 0x28(%rsp),%rdi
add    %rsi,%rdi
movslq 0x2c(%rsp),%rax
add    %rax,%rsi
add    $0xffffffffffffffff,%rsi
call   1060 <substring_to_dec@plt>
mov    %eax,%r14d
mov    0x8(%rsp),%rax
movslq 0x30(%rsp),%rdi
add    %rax,%rdi
movslq 0x34(%rsp),%rcx
lea    (%rax,%rcx,1),%rsi
add    $0xffffffffffffffff,%rsi
call   1060 <substring_to_dec@plt>
test   %eax,%eax
jle    120e <main+0x8e>
mov    %r14d,%r15d
mov    %eax,%ebp
lea    -0x1(%rbp),%rax
mov    %ebp,%ecx
and    $0x3,%ecx
mov    %rcx,0x40(%rsp)
cmp    $0x3,%rax
jae    157d <main+0x3fd>
xor    %ebx,%ebx
mov    0x40(%rsp),%rcx
test   %rcx,%rcx
je     120e <main+0x8e>
imul   $0x32,%rbx,%rax
lea    (%rsp,%rax,1),%r13
add    $0x60,%r13
imul   $0x32,%rcx,%rbp
xor    %ebx,%ebx
jmp    146d <main+0x2ed>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x32,%rbx
cmp    %rbx,%rbp
je     120e <main+0x8e>
test   %r14d,%r14d
jle    1460 <main+0x2e0>
lea    (%rbx,%r13,1),%rdi
mov    $0x1,%esi
mov    %r15,%rdx
call   1070 <memset@plt>
jmp    1460 <main+0x2e0>
cs nopw 0x0(%rax,%rax,1)
nop
movslq 0x28(%rsp),%rdi
add    %rsi,%rdi
movslq 0x2c(%rsp),%rax
add    %rax,%rsi
add    $0xffffffffffffffff,%rsi
call   1060 <substring_to_dec@plt>
mov    %eax,%ebp
mov    0x8(%rsp),%rax
movslq 0x30(%rsp),%rdi
add    %rax,%rdi
movslq 0x34(%rsp),%rcx
lea    (%rax,%rcx,1),%rsi
add    $0xffffffffffffffff,%rsi
call   1060 <substring_to_dec@plt>
test   %eax,%eax
je     120e <main+0x8e>
movslq %ebp,%rcx
imul   $0x32,%rcx,%rsi
lea    (%rsp,%rsi,1),%rcx
add    $0x60,%rcx
mov    0x60(%rsp,%rsi,1),%bl
mov    0x91(%rsp,%rsi,1),%dl
movdqu 0x61(%rsp,%rsi,1),%xmm2
movdqu 0x71(%rsp,%rsi,1),%xmm1
movdqu 0x81(%rsp,%rsi,1),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl %bl,%esi
mov    %edx,%ebx
movdqa %xmm1,%xmm3
movdqa %xmm0,%xmm4
movdqa %xmm2,%xmm5
psrldq $0xf,%xmm2
pslldq $0x1,%xmm1
por    %xmm2,%xmm1
movd   %esi,%xmm2
pslldq $0xf,%xmm2
pslldq $0x1,%xmm5
psrldq $0xf,%xmm2
por    %xmm5,%xmm2
psrldq $0xf,%xmm3
pslldq $0x1,%xmm0
por    %xmm3,%xmm0
movdqa %xmm4,0x50(%rsp)
movzbl 0x5f(%rsp),%edx
add    $0xffffffff,%eax
jne    1510 <main+0x390>
mov    %dl,0x31(%rcx)
movdqu %xmm2,0x1(%rcx)
movdqu %xmm1,0x11(%rcx)
movdqu %xmm0,0x21(%rcx)
mov    %bl,(%rcx)
jmp    120e <main+0x8e>
and    $0xfffffffc,%ebp
lea    0x60(%rsp),%r13
xor    %ebx,%ebx
jmp    15a4 <main+0x424>
nopl   0x0(%rax)
add    $0x4,%rbx
add    $0xc8,%r13
cmp    %rbx,%rbp
je     1432 <main+0x2b2>
test   %r14d,%r14d
jle    1590 <main+0x410>
mov    %r13,%rdi
mov    $0x1,%esi
mov    %r15,%rdx
call   1070 <memset@plt>
lea    0x32(%r13),%rdi
mov    $0x1,%esi
mov    %r15,%rdx
call   1070 <memset@plt>
lea    0x64(%r13),%rdi
mov    $0x1,%esi
mov    %r15,%rdx
call   1070 <memset@plt>
lea    0x96(%r13),%rdi
mov    $0x1,%esi
mov    %r15,%rdx
call   1070 <memset@plt>
jmp    1590 <main+0x410>
cmp    $0x7,%r15d
jae    1370 <main+0x1f0>
jmp    1392 <main+0x212>
lea    0x1c(%rsp),%rdi
call   1040 <regfree@plt>
lea    0x18(%rsp),%rdi
call   1040 <regfree@plt>
lea    0x14(%rsp),%rdi
call   1040 <regfree@plt>
xor    %ebx,%ebx
jmp    1644 <main+0x4c4>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %cl,%al
add    %eax,%r12d
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x32,%rbx
je     165c <main+0x4dc>
xor    %eax,%eax
cmpb   $0x0,0x60(%rsp,%rbx,1)
setne  %cl
mov    $0x2e,%edi
je     1630 <main+0x4b0>
mov    $0x23,%edi
jmp    1630 <main+0x4b0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffffffffffffce,%rbx
jmp    167f <main+0x4ff>
nop
mov    %cl,%al
add    %eax,%r12d
call   1030 <putchar@plt>
inc    %rbx
je     169a <main+0x51a>
xor    %eax,%eax
cmpb   $0x0,0xc4(%rsp,%rbx,1)
setne  %cl
mov    $0x2e,%edi
je     1670 <main+0x4f0>
mov    $0x23,%edi
jmp    1670 <main+0x4f0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffffffffffffce,%rbx
jmp    16bf <main+0x53f>
nopl   (%rax)
mov    %cl,%al
add    %eax,%r12d
call   1030 <putchar@plt>
inc    %rbx
je     16da <main+0x55a>
xor    %eax,%eax
cmpb   $0x0,0xf6(%rsp,%rbx,1)
setne  %cl
mov    $0x2e,%edi
je     16b0 <main+0x530>
mov    $0x23,%edi
jmp    16b0 <main+0x530>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffffffffffffce,%rbx
jmp    16ff <main+0x57f>
nopl   (%rax)
mov    %cl,%al
add    %eax,%r12d
call   1030 <putchar@plt>
inc    %rbx
je     171a <main+0x59a>
xor    %eax,%eax
cmpb   $0x0,0x128(%rsp,%rbx,1)
setne  %cl
mov    $0x2e,%edi
je     16f0 <main+0x570>
mov    $0x23,%edi
jmp    16f0 <main+0x570>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffffffffffffce,%rbx
jmp    173f <main+0x5bf>
nopl   (%rax)
mov    %cl,%al
add    %eax,%r12d
call   1030 <putchar@plt>
inc    %rbx
je     175a <main+0x5da>
xor    %eax,%eax
cmpb   $0x0,0x15a(%rsp,%rbx,1)
setne  %cl
mov    $0x2e,%edi
je     1730 <main+0x5b0>
mov    $0x23,%edi
jmp    1730 <main+0x5b0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffffffffffffce,%rbx
jmp    177f <main+0x5ff>
nopl   (%rax)
mov    %cl,%al
add    %eax,%r12d
call   1030 <putchar@plt>
inc    %rbx
je     179a <main+0x61a>
xor    %eax,%eax
cmpb   $0x0,0x18c(%rsp,%rbx,1)
setne  %cl
mov    $0x2e,%edi
je     1770 <main+0x5f0>
mov    $0x23,%edi
jmp    1770 <main+0x5f0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x86e(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x198,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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