// File: /workspace/github_c_makefile_star2_O0/mrkite[P]regs/src/disasm.cc
// Function: Disassembler::decodeInst(std::shared_ptr<TheHandle>, Entry*)
std::shared_ptr<Inst> Disassembler::decodeInst(Handle f, Entry *entry) {
  auto inst = std::make_shared<Inst>();
  auto opcode = f->r8();
  inst->name = opcodes[opcode].inst;
  inst->type = opcodes[opcode].type;
  auto mode = opcodes[opcode].addressing;
  inst->length = sizes[mode];
  if (mode == IMMM && (entry->flags & IsM8)) {
    inst->length--;
  }
  if (mode == IMMX && (entry->flags & IsX8)) {
    inst->length--;
  }
  entry->org += inst->length;
  uint32_t addr = entry->org;
  entry->flags &= IsFlags;  // clear changed flags
  uint32_t oldFlags = entry->flags;
  inst->prevWord = entry->prevWord;
  entry->prevWord = 0;
  switch (mode) {
    case IMP:
      inst->operType = Opr::None;
      break;
    case IMM:
      inst->oper = f->r8();
      inst->operType = Opr::Imm8;
      if (opcode == 0xe2) {
        entry->flags |= inst->oper & IsFlags;
      } else if (opcode == 0xc2) {
        entry->flags &= ~inst->oper;
      }
      break;
    case IMMM:
      if (entry->flags & IsM8) {
        inst->oper = f->r8();
        inst->operType = Opr::Imm8;
      } else {
        inst->oper = f->r16();
        inst->operType = Opr::Imm16;
        entry->prevWord = inst->oper;
      }
      break;
    case IMMX:
      if (entry->flags & IsX8) {
        inst->oper = f->r8();
        inst->operType = Opr::Imm8;
      } else {
        inst->oper = f->r16();
        inst->operType = Opr::Imm16;
        entry->prevWord = inst->oper;
      }
      break;
    case IMMS:
      inst->oper = f->r16();
      inst->operType = Opr::Imm16;
      entry->prevWord = inst->oper;
      break;
    case ABS:
      inst->oper = f->r16();
      if (inst->type == InsType::Jump || inst->type == InsType::Call) {
        inst->oper |= entry->org & 0xff0000;  // K
        inst->operType = Opr::Abs;
      } else {
        inst->operType = Opr::AbsB;
      }
      break;
    case ABL:
      inst->oper = f->r24();
      inst->operType = Opr::Abs;
      break;
    case ABX:
      inst->oper = f->r16();
      if (inst->type == InsType::Jump || inst->type == InsType::Call) {
        inst->oper |= entry->org & 0xff0000;  // K
        inst->operType = Opr::AbsX;
      } else {
        inst->operType = Opr::AbsXB;
      }
      break;
    case ABY:
      inst->oper = f->r16();
      if (inst->type == InsType::Jump || inst->type == InsType::Call) {
        inst->oper |= entry->org & 0xff0000;  // K
        inst->operType = Opr::AbsY;
      } else {
        inst->operType = Opr::AbsYB;
      }
      break;
    case ABLX:
      inst->oper = f->r24();
      inst->operType = Opr::AbsX;
      break;
    case AIX:
      inst->oper = f->r16();
      if (inst->type == InsType::Jump || inst->type == InsType::Call) {
        inst->oper |= entry->org & 0xff0000;  // K
        inst->operType = Opr::IndX;
      } else {
        inst->operType = Opr::IndXB;
      }
      break;
    case ZP:
      inst->oper = f->r8();
      inst->operType = Opr::AbsD;
      break;
    case ZPX:
      inst->oper = f->r8();
      inst->operType = Opr::AbsXD;
      break;
    case ZPY:
      inst->oper = f->r8();
      inst->operType = Opr::AbsYD;
      break;
    case ZPS:
      inst->oper = f->r8();
      inst->operType = Opr::AbsS;
      break;
    case IND:
      inst->oper = f->r16();
      if (inst->type == InsType::Jump || inst->type == InsType::Call) {
        inst->oper |= entry->org & 0xff0000;  // K
        inst->operType = Opr::Ind;
      } else {
        inst->operType = Opr::IndB;
      }
      break;
    case INZ:
      inst->oper = f->r8();
      inst->operType = Opr::IndD;
      break;
    case INL:
      inst->oper = f->r8();
      inst->operType = Opr::IndL;
      break;
    case INX:
      inst->oper = f->r8();
      inst->operType = Opr::IndXD;
      break;
    case INY:
      inst->oper = f->r8();
      inst->operType = Opr::IndY;
      break;
    case INLY:
      inst->oper = f->r8();
      inst->operType = Opr::IndLY;
      break;
    case INS:
      inst->oper = f->r8();
      inst->operType = Opr::IndS;
      break;
    case REL:
      inst->oper = addr + static_cast<int8_t>(f->r8());
      inst->operType = Opr::Abs;
      break;
    case RELL:
      inst->oper = addr + static_cast<int16_t>(f->r16());
      inst->operType = Opr::Abs;
      break;
    case BANK:
      inst->oper = f->r16();
      inst->operType = Opr::Bank;
      break;
    case DB:
      inst->oper = opcode;
      inst->operType = Opr::Abs;
      break;
    case DW:
      inst->oper = opcode | (f->r8() << 8);
      inst->operType = Opr::Abs;
      break;
    case DD:
      inst->oper = opcode | (f->r24() << 8);
      inst->operType = Opr::Abs;
      break;
  }
  if (opcode == 0x18) {
    if (f->r8() == 0xfb) {  // clc xce
      entry->flags &= ~IsEmu;
    }
    f->skip(-1);
  }
  if (opcode == 0x38) {
    if (f->r8() == 0xfb) {  // sec xce
      entry->flags |= IsEmu | IsM8 | IsX8;
    }
    f->skip(-1);
  }
  if ((entry->flags ^ oldFlags) & IsEmu) {
    entry->flags |= IsEmuChanged;
  }
  if ((entry->flags ^ oldFlags) & IsX8) {
    entry->flags |= IsX8Changed;
  }
  if ((entry->flags ^ oldFlags) & IsM8) {
    entry->flags |= IsM8Changed;
  }
  inst->flags = entry->flags;
  return inst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdx, -0x50(%rbp)
movq %rdi, -0x60(%rbp)
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
callq 0x1dbb0
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x41(%rbp)
jmp 0x1ad09
movq -0x60(%rbp), %rdi
movb -0x41(%rbp), %al
movb %al, -0x22(%rbp)
movzbl -0x22(%rbp), %eax
shll $0x4, %eax
leaq 0x3ad6f(%rip), %rcx     # 0x55a90
movq (%rax,%rcx), %rax
movq %rax, -0x68(%rbp)
callq 0x1dc20
movq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x6410
jmp 0x1ad3c
movq -0x60(%rbp), %rdi
movzbl -0x22(%rbp), %eax
shll $0x4, %eax
leaq 0x3ad42(%rip), %rcx     # 0x55a90
movq %rcx, -0x78(%rbp)
movw 0xc(%rax,%rcx), %ax
movw %ax, -0x7a(%rbp)
callq 0x1dc20
movw -0x7a(%rbp), %dx
movq -0x78(%rbp), %rcx
movw %dx, 0x20(%rax)
movzbl -0x22(%rbp), %eax
shll $0x4, %eax
movl 0x8(%rax,%rcx), %eax
movl %eax, -0x38(%rbp)
leaq 0x6ba2f(%rip), %rdi     # 0x867b0
leaq -0x38(%rbp), %rsi
callq 0x1d6d0
movq %rax, -0x70(%rbp)
jmp 0x1ad90
movq -0x60(%rbp), %rdi
movq -0x70(%rbp), %rax
movl (%rax), %eax
movw %ax, -0x7c(%rbp)
callq 0x1dc20
movw -0x7c(%rbp), %cx
movw %cx, 0x22(%rax)
cmpl $0x2, -0x38(%rbp)
jne 0x1adf1
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1adf1
movq -0x60(%rbp), %rdi
callq 0x1dc20
movw 0x22(%rax), %cx
addw $-0x1, %cx
movw %cx, 0x22(%rax)
jmp 0x1adf1
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x1dc40
jmp 0x1bba9
cmpl $0x3, -0x38(%rbp)
jne 0x1ae1b
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x1ae1b
movq -0x60(%rbp), %rdi
callq 0x1dc20
movw 0x22(%rax), %cx
addw $-0x1, %cx
movw %cx, 0x22(%rax)
movq -0x60(%rbp), %rdi
callq 0x1dc20
movq -0x60(%rbp), %rdi
movzwl 0x22(%rax), %edx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl %edx, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0xff0130, %ecx         # imm = 0xFF0130
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movw 0x8(%rax), %ax
movw %ax, -0x8a(%rbp)
callq 0x1dc20
movw -0x8a(%rbp), %cx
movw %cx, 0x30(%rax)
movq -0x20(%rbp), %rax
movw $0x0, 0x8(%rax)
movl -0x38(%rbp), %eax
movq %rax, -0x88(%rbp)
subq $0x1b, %rax
ja 0x1ba46
movq -0x88(%rbp), %rax
leaq 0x1f46c(%rip), %rcx     # 0x3a310
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x60(%rbp), %rdi
callq 0x1dc20
movl $0x0, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x8b(%rbp)
jmp 0x1aedb
movq -0x60(%rbp), %rdi
movb -0x8b(%rbp), %al
movzbl %al, %eax
movl %eax, -0x90(%rbp)
callq 0x1dc20
movl -0x90(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x1, 0x24(%rax)
movzbl -0x22(%rbp), %eax
cmpl $0xe2, %eax
jne 0x1af35
movq -0x60(%rbp), %rdi
callq 0x1dc20
movl 0x28(%rax), %ecx
andl $0xff0130, %ecx         # imm = 0xFF0130
movq -0x20(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x1af5b
movzbl -0x22(%rbp), %eax
cmpl $0xc2, %eax
jne 0x1af59
movq -0x60(%rbp), %rdi
callq 0x1dc20
movl 0x28(%rax), %ecx
xorl $-0x1, %ecx
movq -0x20(%rbp), %rax
andl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x1af5b
jmp 0x1ba46
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1afbb
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x91(%rbp)
jmp 0x1af88
movq -0x60(%rbp), %rdi
movb -0x91(%rbp), %al
movzbl %al, %eax
movl %eax, -0x98(%rbp)
callq 0x1dc20
movl -0x98(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x1, 0x24(%rax)
jmp 0x1b01e
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0x9a(%rbp)
jmp 0x1afd5
movq -0x60(%rbp), %rdi
movw -0x9a(%rbp), %ax
movzwl %ax, %eax
movl %eax, -0xa0(%rbp)
callq 0x1dc20
movl -0xa0(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movq -0x60(%rbp), %rdi
movl $0x2, 0x24(%rax)
callq 0x1dc20
movl 0x28(%rax), %eax
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x8(%rax)
jmp 0x1ba46
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x1b07e
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0xa1(%rbp)
jmp 0x1b04b
movq -0x60(%rbp), %rdi
movb -0xa1(%rbp), %al
movzbl %al, %eax
movl %eax, -0xa8(%rbp)
callq 0x1dc20
movl -0xa8(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x1, 0x24(%rax)
jmp 0x1b0e1
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0xaa(%rbp)
jmp 0x1b098
movq -0x60(%rbp), %rdi
movw -0xaa(%rbp), %ax
movzwl %ax, %eax
movl %eax, -0xb0(%rbp)
callq 0x1dc20
movl -0xb0(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movq -0x60(%rbp), %rdi
movl $0x2, 0x24(%rax)
callq 0x1dc20
movl 0x28(%rax), %eax
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x8(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0xb2(%rbp)
jmp 0x1b100
movq -0x60(%rbp), %rdi
movw -0xb2(%rbp), %ax
movzwl %ax, %eax
movl %eax, -0xb8(%rbp)
callq 0x1dc20
movl -0xb8(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movq -0x60(%rbp), %rdi
movl $0x2, 0x24(%rax)
callq 0x1dc20
movl 0x28(%rax), %eax
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x8(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0xba(%rbp)
jmp 0x1b168
movq -0x60(%rbp), %rdi
movw -0xba(%rbp), %ax
movzwl %ax, %eax
movl %eax, -0xc0(%rbp)
callq 0x1dc20
movl -0xc0(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movzwl 0x20(%rax), %eax
cmpl $0x2, %eax
je 0x1b1ae
movq -0x60(%rbp), %rdi
callq 0x1dc20
movzwl 0x20(%rax), %eax
cmpl $0x1, %eax
jne 0x1b1e6
movq -0x60(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0xff0000, %eax         # imm = 0xFF0000
movl %eax, -0xc4(%rbp)
callq 0x1dc20
movl -0xc4(%rbp), %ecx
movq -0x60(%rbp), %rdi
orl 0x28(%rax), %ecx
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x3, 0x24(%rax)
jmp 0x1b1f6
movq -0x60(%rbp), %rdi
callq 0x1dc20
movl $0x4, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f10
movl %eax, -0xc8(%rbp)
jmp 0x1b214
movq -0x60(%rbp), %rdi
callq 0x1dc20
movl -0xc8(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x3, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0xca(%rbp)
jmp 0x1b255
movq -0x60(%rbp), %rdi
movw -0xca(%rbp), %ax
movzwl %ax, %eax
movl %eax, -0xd0(%rbp)
callq 0x1dc20
movl -0xd0(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movzwl 0x20(%rax), %eax
cmpl $0x2, %eax
je 0x1b29b
movq -0x60(%rbp), %rdi
callq 0x1dc20
movzwl 0x20(%rax), %eax
cmpl $0x1, %eax
jne 0x1b2d3
movq -0x60(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0xff0000, %eax         # imm = 0xFF0000
movl %eax, -0xd4(%rbp)
callq 0x1dc20
movl -0xd4(%rbp), %ecx
movq -0x60(%rbp), %rdi
orl 0x28(%rax), %ecx
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x6, 0x24(%rax)
jmp 0x1b2e3
movq -0x60(%rbp), %rdi
callq 0x1dc20
movl $0x7, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0xd6(%rbp)
jmp 0x1b302
movq -0x60(%rbp), %rdi
movw -0xd6(%rbp), %ax
movzwl %ax, %eax
movl %eax, -0xdc(%rbp)
callq 0x1dc20
movl -0xdc(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movzwl 0x20(%rax), %eax
cmpl $0x2, %eax
je 0x1b348
movq -0x60(%rbp), %rdi
callq 0x1dc20
movzwl 0x20(%rax), %eax
cmpl $0x1, %eax
jne 0x1b380
movq -0x60(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0xff0000, %eax         # imm = 0xFF0000
movl %eax, -0xe0(%rbp)
callq 0x1dc20
movl -0xe0(%rbp), %ecx
movq -0x60(%rbp), %rdi
orl 0x28(%rax), %ecx
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x9, 0x24(%rax)
jmp 0x1b390
movq -0x60(%rbp), %rdi
callq 0x1dc20
movl $0xa, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f10
movl %eax, -0xe4(%rbp)
jmp 0x1b3ae
movq -0x60(%rbp), %rdi
callq 0x1dc20
movl -0xe4(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x6, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0xe6(%rbp)
jmp 0x1b3ef
movq -0x60(%rbp), %rdi
movw -0xe6(%rbp), %ax
movzwl %ax, %eax
movl %eax, -0xec(%rbp)
callq 0x1dc20
movl -0xec(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movzwl 0x20(%rax), %eax
cmpl $0x2, %eax
je 0x1b435
movq -0x60(%rbp), %rdi
callq 0x1dc20
movzwl 0x20(%rax), %eax
cmpl $0x1, %eax
jne 0x1b46d
movq -0x60(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0xff0000, %eax         # imm = 0xFF0000
movl %eax, -0xf0(%rbp)
callq 0x1dc20
movl -0xf0(%rbp), %ecx
movq -0x60(%rbp), %rdi
orl 0x28(%rax), %ecx
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x10, 0x24(%rax)
jmp 0x1b47d
movq -0x60(%rbp), %rdi
callq 0x1dc20
movl $0x11, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0xf1(%rbp)
jmp 0x1b49b
movq -0x60(%rbp), %rdi
movb -0xf1(%rbp), %al
movzbl %al, %eax
movl %eax, -0xf8(%rbp)
callq 0x1dc20
movl -0xf8(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x5, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0xf9(%rbp)
jmp 0x1b4ea
movq -0x60(%rbp), %rdi
movb -0xf9(%rbp), %al
movzbl %al, %eax
movl %eax, -0x100(%rbp)
callq 0x1dc20
movl -0x100(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x8, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x101(%rbp)
jmp 0x1b539
movq -0x60(%rbp), %rdi
movb -0x101(%rbp), %al
movzbl %al, %eax
movl %eax, -0x108(%rbp)
callq 0x1dc20
movl -0x108(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0xb, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x109(%rbp)
jmp 0x1b588
movq -0x60(%rbp), %rdi
movb -0x109(%rbp), %al
movzbl %al, %eax
movl %eax, -0x110(%rbp)
callq 0x1dc20
movl -0x110(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0xc, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0x112(%rbp)
jmp 0x1b5d8
movq -0x60(%rbp), %rdi
movw -0x112(%rbp), %ax
movzwl %ax, %eax
movl %eax, -0x118(%rbp)
callq 0x1dc20
movl -0x118(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movzwl 0x20(%rax), %eax
cmpl $0x2, %eax
je 0x1b61e
movq -0x60(%rbp), %rdi
callq 0x1dc20
movzwl 0x20(%rax), %eax
cmpl $0x1, %eax
jne 0x1b656
movq -0x60(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0xff0000, %eax         # imm = 0xFF0000
movl %eax, -0x11c(%rbp)
callq 0x1dc20
movl -0x11c(%rbp), %ecx
movq -0x60(%rbp), %rdi
orl 0x28(%rax), %ecx
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0xd, 0x24(%rax)
jmp 0x1b666
movq -0x60(%rbp), %rdi
callq 0x1dc20
movl $0xe, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x11d(%rbp)
jmp 0x1b684
movq -0x60(%rbp), %rdi
movb -0x11d(%rbp), %al
movzbl %al, %eax
movl %eax, -0x124(%rbp)
callq 0x1dc20
movl -0x124(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0xf, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x125(%rbp)
jmp 0x1b6d3
movq -0x60(%rbp), %rdi
movb -0x125(%rbp), %al
movzbl %al, %eax
movl %eax, -0x12c(%rbp)
callq 0x1dc20
movl -0x12c(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x14, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x12d(%rbp)
jmp 0x1b722
movq -0x60(%rbp), %rdi
movb -0x12d(%rbp), %al
movzbl %al, %eax
movl %eax, -0x134(%rbp)
callq 0x1dc20
movl -0x134(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x12, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x135(%rbp)
jmp 0x1b771
movq -0x60(%rbp), %rdi
movb -0x135(%rbp), %al
movzbl %al, %eax
movl %eax, -0x13c(%rbp)
callq 0x1dc20
movl -0x13c(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x13, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x13d(%rbp)
jmp 0x1b7c0
movq -0x60(%rbp), %rdi
movb -0x13d(%rbp), %al
movzbl %al, %eax
movl %eax, -0x144(%rbp)
callq 0x1dc20
movl -0x144(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x15, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x145(%rbp)
jmp 0x1b80f
movq -0x60(%rbp), %rdi
movb -0x145(%rbp), %al
movzbl %al, %eax
movl %eax, -0x14c(%rbp)
callq 0x1dc20
movl -0x14c(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x16, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
movl -0x3c(%rbp), %eax
movl %eax, -0x154(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x14d(%rbp)
jmp 0x1b867
movq -0x60(%rbp), %rdi
movl -0x154(%rbp), %eax
movb -0x14d(%rbp), %cl
movsbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x158(%rbp)
callq 0x1dc20
movl -0x158(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x3, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
movl -0x3c(%rbp), %eax
movl %eax, -0x160(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0x15a(%rbp)
jmp 0x1b8c8
movq -0x60(%rbp), %rdi
movl -0x160(%rbp), %eax
movw -0x15a(%rbp), %cx
movswl %cx, %ecx
addl %ecx, %eax
movl %eax, -0x164(%rbp)
callq 0x1dc20
movl -0x164(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x3, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11f70
movw %ax, -0x166(%rbp)
jmp 0x1b921
movq -0x60(%rbp), %rdi
movw -0x166(%rbp), %ax
movzwl %ax, %eax
movl %eax, -0x16c(%rbp)
callq 0x1dc20
movl -0x16c(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x17, 0x24(%rax)
jmp 0x1ba46
movq -0x60(%rbp), %rdi
movzbl -0x22(%rbp), %eax
movl %eax, -0x170(%rbp)
callq 0x1dc20
movl -0x170(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x3, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
movzbl -0x22(%rbp), %eax
movl %eax, -0x178(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x171(%rbp)
jmp 0x1b9ac
movq -0x60(%rbp), %rdi
movl -0x178(%rbp), %eax
movb -0x171(%rbp), %cl
movzbl %cl, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0x17c(%rbp)
callq 0x1dc20
movl -0x17c(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x3, 0x24(%rax)
jmp 0x1ba46
movq -0x50(%rbp), %rdi
movzbl -0x22(%rbp), %eax
movl %eax, -0x184(%rbp)
callq 0xd2c0
movq %rax, %rdi
callq 0x11f10
movl %eax, -0x180(%rbp)
jmp 0x1ba0d
movq -0x60(%rbp), %rdi
movl -0x184(%rbp), %eax
movl -0x180(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0x188(%rbp)
callq 0x1dc20
movl -0x188(%rbp), %ecx
movq -0x60(%rbp), %rdi
movl %ecx, 0x28(%rax)
callq 0x1dc20
movl $0x3, 0x24(%rax)
movzbl -0x22(%rbp), %eax
cmpl $0x18, %eax
jne 0x1baa4
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x189(%rbp)
jmp 0x1ba68
movb -0x189(%rbp), %al
movzbl %al, %eax
cmpl $0xfb, %eax
jne 0x1ba88
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0xfffffeff, %ecx       # imm = 0xFFFFFEFF
movl %ecx, 0x4(%rax)
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
movq $-0x1, %rsi
callq 0x12230
jmp 0x1baa2
jmp 0x1baa4
movzbl -0x22(%rbp), %eax
cmpl $0x38, %eax
jne 0x1bb02
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
callq 0x11fc0
movb %al, -0x18a(%rbp)
jmp 0x1bac6
movb -0x18a(%rbp), %al
movzbl %al, %eax
cmpl $0xfb, %eax
jne 0x1bae6
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x130, %ecx            # imm = 0x130
movl %ecx, 0x4(%rax)
movq -0x50(%rbp), %rdi
callq 0xd2c0
movq %rax, %rdi
movq $-0x1, %rsi
callq 0x12230
jmp 0x1bb00
jmp 0x1bb02
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
xorl -0x40(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x1bb26
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x2000, %ecx           # imm = 0x2000
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
xorl -0x40(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x1bb48
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x200, %ecx            # imm = 0x200
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
xorl -0x40(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1bb6a
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x400, %ecx            # imm = 0x400
movl %ecx, 0x4(%rax)
movq -0x60(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x190(%rbp)
callq 0x1dc20
movl -0x190(%rbp), %ecx
movl %ecx, 0x2c(%rax)
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x1bb9c
movq -0x60(%rbp), %rdi
callq 0x1dc40
movq -0x58(%rbp), %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x6540
nopw %cs:(%rax,%rax)