// File: jmbjorndalen[P]Malbolge-gen/interp-orig.c
// Function: exec
static inline
#endif
void exec( unsigned short *mem )
{
  unsigned short a = 0, c = 0, d = 0;
  int x;
  for (;;)
  {
    if ( mem[c] < 33 || mem[c] > 126 ) continue;
    switch ( xlat1[( mem[c] - 33 + c ) % 94] )
    {
      case 'j': d = mem[d]; break;
      case 'i': c = mem[d]; break;
      case '*': a = mem[d] = mem[d] / 3 + mem[d] % 3 * 19683; break;
      case 'p': a = mem[d] = op( a, mem[d] ); break;
      case '<':
#if '\n' != 10
        if ( x == 10 ) putc( '\n', stdout ); else
#endif
        putc( a, stdout );
        break;
      case '/':
        x = getc( stdin );
#if '\n' != 10
        if ( x == '\n' ) a = 10; else
#endif
        if ( x == EOF ) a = 59048; else a = x;
        break;
      case 'v': return;
    }
    mem[c] = xlat2[mem[c] - 33];
    if ( c == 59048 ) c = 0; else c++;
    if ( d == 59048 ) d = 0; else d++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movw $0x0, -0xa(%rbp)
movw $0x0, -0xc(%rbp)
movw $0x0, -0xe(%rbp)
movq -0x8(%rbp), %rax
movzwl -0xc(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
cmpl $0x21, %eax
jl 0x401a60
movq -0x8(%rbp), %rax
movzwl -0xc(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
cmpl $0x7e, %eax
jle 0x401a62
jmp 0x401a3e
movq -0x8(%rbp), %rax
movzwl -0xc(%rbp), %ecx
movl %ecx, %edx
movzwl (%rax,%rdx,2), %esi
movl %ecx, %edx
movl %esi, %eax
leal -0x21(%rax,%rdx), %eax
addl %ecx, %esi
movslq %eax, %rcx
imulq $-0x51b3bea3, %rcx, %rcx # imm = 0xAE4C415D
shrq $0x20, %rcx
movl %ecx, %edx
movl %edx, %ecx
movl %esi, %edx
leal -0x21(%rcx,%rdx), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x6, %ecx
addl %edx, %ecx
imull $0x5e, %ecx, %ecx
subl %ecx, %eax
cltq
leaq 0x96566(%rip), %rcx     # 0x498010
movsbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
subl $0x2a, %eax
je 0x401b31
jmp 0x401ab8
movl -0x18(%rbp), %eax
subl $0x2f, %eax
je 0x401bb8
jmp 0x401ac6
movl -0x18(%rbp), %eax
subl $0x3c, %eax
je 0x401ba3
jmp 0x401ad4
movl -0x18(%rbp), %eax
subl $0x69, %eax
je 0x401b1c
jmp 0x401ade
movl -0x18(%rbp), %eax
subl $0x6a, %eax
je 0x401b07
jmp 0x401ae8
movl -0x18(%rbp), %eax
subl $0x70, %eax
je 0x401b79
jmp 0x401af6
movl -0x18(%rbp), %eax
subl $0x76, %eax
je 0x401be1
jmp 0x401be7
movq -0x8(%rbp), %rax
movzwl -0xe(%rbp), %ecx
movw (%rax,%rcx,2), %ax
movw %ax, -0xe(%rbp)
jmp 0x401be7
movq -0x8(%rbp), %rax
movzwl -0xe(%rbp), %ecx
movw (%rax,%rcx,2), %ax
movw %ax, -0xc(%rbp)
jmp 0x401be7
movq -0x8(%rbp), %rax
movzwl -0xe(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movzwl -0xe(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl -0x1c(%rbp), %eax
imull $0x4ce3, %edx, %ecx     # imm = 0x4CE3
addl %ecx, %eax
movq -0x8(%rbp), %rcx
movzwl -0xe(%rbp), %edx
movw %ax, (%rcx,%rdx,2)
movw %ax, -0xa(%rbp)
jmp 0x401be7
movw -0xa(%rbp), %dx
movq -0x8(%rbp), %rax
movzwl -0xe(%rbp), %ecx
movzwl %dx, %edi
movzwl (%rax,%rcx,2), %esi
callq 0x401960
movq -0x8(%rbp), %rcx
movzwl -0xe(%rbp), %edx
movw %ax, (%rcx,%rdx,2)
movw %ax, -0xa(%rbp)
jmp 0x401be7
movzwl -0xa(%rbp), %edi
movq $0x4c86f0, %rax         # imm = 0x4C86F0
movq (%rax), %rsi
callq 0x414900
jmp 0x401be7
movq $0x4c86f8, %rax         # imm = 0x4C86F8
movq (%rax), %rdi
callq 0x4147e0
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0x401bd8
movw $0xe6a8, -0xa(%rbp)     # imm = 0xE6A8
jmp 0x401bdf
movl -0x14(%rbp), %eax
movw %ax, -0xa(%rbp)
jmp 0x401be7
addq $0x20, %rsp
popq %rbp
retq
movq -0x8(%rbp), %rax
movzwl -0xc(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
subl $0x21, %eax
movslq %eax, %rcx
leaq 0x96470(%rip), %rax     # 0x498070
movsbl (%rax,%rcx), %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movzwl -0xc(%rbp), %ecx
movw %dx, (%rax,%rcx,2)
movzwl -0xc(%rbp), %eax
cmpl $0xe6a8, %eax           # imm = 0xE6A8
jne 0x401c26
movw $0x0, -0xc(%rbp)
jmp 0x401c32
movw -0xc(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xc(%rbp)
movzwl -0xe(%rbp), %eax
cmpl $0xe6a8, %eax           # imm = 0xE6A8
jne 0x401c45
movw $0x0, -0xe(%rbp)
jmp 0x401c51
movw -0xe(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xe(%rbp)
jmp 0x401a3e
nopw %cs:(%rax,%rax)