// File: /workspace/github_c_makefile_star2_O0/plvhx[P]dummy-vm/src/ast.c
// Function: vm_ast_process_instruction_line
static void vm_ast_process_instruction_line(vm_ast_t *ast, FILE *file,
                                            void (*visitor)(FILE *file,
                                                            int opcode)) {
  unsigned int skipped_index = VM_AST_GET_NUM_CHILDS(ast);

  if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "addb") &&
      ast->childs[1]->kind_type == VM_AST_REGISTER &&
      ast->childs[2]->kind_type == VM_AST_INTEGER_VALUE &&
      ast->childs[3]->kind_type == VM_AST_INTEGER_VALUE) {
    vm_ast_process_ternary_addb_imm8_imm8_instruction(ast, file, visitor);
  } else if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "subb") &&
             ast->childs[1]->kind_type == VM_AST_REGISTER &&
             ast->childs[2]->kind_type == VM_AST_INTEGER_VALUE &&
             ast->childs[3]->kind_type == VM_AST_INTEGER_VALUE) {
    vm_ast_process_ternary_subb_imm8_imm8_instruction(ast, file, visitor);
  } else if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "mulb") &&
             ast->childs[1]->kind_type == VM_AST_REGISTER &&
             ast->childs[2]->kind_type == VM_AST_INTEGER_VALUE &&
             ast->childs[3]->kind_type == VM_AST_INTEGER_VALUE) {
    vm_ast_process_ternary_mulb_imm8_imm8_instruction(ast, file, visitor);
  } else if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "divb") &&
             ast->childs[1]->kind_type == VM_AST_REGISTER &&
             ast->childs[2]->kind_type == VM_AST_INTEGER_VALUE &&
             ast->childs[3]->kind_type == VM_AST_INTEGER_VALUE) {
    vm_ast_process_ternary_divb_imm8_imm8_instruction(ast, file, visitor);
  }

  if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "addb") &&
      ast->childs[1]->kind_type == VM_AST_REGISTER &&
      ast->childs[2]->kind_type == VM_AST_INTEGER_VALUE &&
      ast->childs[3]->kind_type == VM_AST_REGISTER) {
    vm_ast_process_ternary_addb_imm8_regs_instruction(ast, file, visitor);
  } else if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "subb") &&
             ast->childs[1]->kind_type == VM_AST_REGISTER &&
             ast->childs[2]->kind_type == VM_AST_INTEGER_VALUE &&
             ast->childs[3]->kind_type == VM_AST_REGISTER) {
    vm_ast_process_ternary_subb_imm8_regs_instruction(ast, file, visitor);
  } else if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "mulb") &&
             ast->childs[1]->kind_type == VM_AST_REGISTER &&
             ast->childs[2]->kind_type == VM_AST_INTEGER_VALUE &&
             ast->childs[3]->kind_type == VM_AST_REGISTER) {
    vm_ast_process_ternary_mulb_imm8_regs_instruction(ast, file, visitor);
  } else if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "divb") &&
             ast->childs[1]->kind_type == VM_AST_REGISTER &&
             ast->childs[2]->kind_type == VM_AST_INTEGER_VALUE &&
             ast->childs[3]->kind_type == VM_AST_REGISTER) {
    vm_ast_process_ternary_divb_imm8_regs_instruction(ast, file, visitor);
  }

  // process 'movb' imm8 to general-purpose register
  if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "movb") &&
      ast->childs[1]->kind_type == VM_AST_REGISTER &&
      ast->childs[2]->kind_type == VM_AST_INTEGER_VALUE) {
    vm_ast_process_binary_movb_imm8_to_regs_instruction(ast, file, visitor);
    // process 'movb' general-purpose register to r0
  } else if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "movb") &&
             !strcasecmp((char *)ast->childs[1]->regs.name, "r0") &&
             ast->childs[2]->kind_type == VM_AST_REGISTER) {
    vm_ast_process_binary_movb_regs_to_r0_instruction(ast, file, visitor);
    // process 'movb' general-purpose register to r1
  } else if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "movb") &&
             !strcasecmp((char *)ast->childs[1]->regs.name, "r1") &&
             ast->childs[2]->kind_type == VM_AST_REGISTER) {
    vm_ast_process_binary_movb_regs_to_r1_instruction(ast, file, visitor);
    // process 'movb' general-purpose register to r2
  } else if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "movb") &&
             !strcasecmp((char *)ast->childs[1]->regs.name, "r2") &&
             ast->childs[2]->kind_type == VM_AST_REGISTER) {
    vm_ast_process_binary_movb_regs_to_r2_instruction(ast, file, visitor);
    // process 'movb' general-purpose register to r3
  } else if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "movb") &&
             !strcasecmp((char *)ast->childs[1]->regs.name, "r3") &&
             ast->childs[2]->kind_type == VM_AST_REGISTER) {
    vm_ast_process_binary_movb_regs_to_r3_instruction(ast, file, visitor);
  }

  // process unary 'print' imm8
  if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "print") &&
      ast->childs[1]->kind_type == VM_AST_INTEGER_VALUE) {
    vm_ast_process_unary_print_imm8_instruction(ast, file, visitor);
    // process unary 'print' regs
  } else if (!strcasecmp((char *)ast->childs[0]->mnemonic.name, "print") &&
             ast->childs[1]->kind_type == VM_AST_REGISTER) {
    vm_ast_process_unary_print_regs_instruction(ast, file, visitor);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x5950(%rip), %rsi      # 0x7082
callq 0x1040
cmpl $0x0, %eax
jne 0x1782
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x1782
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x1782
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x1782
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1cf0
jmp 0x18a9
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x58f2(%rip), %rsi      # 0x7087
callq 0x1040
cmpl $0x0, %eax
jne 0x17e5
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x17e5
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x17e5
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x17e5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1ee0
jmp 0x18a7
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x5894(%rip), %rsi      # 0x708c
callq 0x1040
cmpl $0x0, %eax
jne 0x1845
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x1845
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x1845
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x1845
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x20d0
jmp 0x18a5
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x5839(%rip), %rsi      # 0x7091
callq 0x1040
cmpl $0x0, %eax
jne 0x18a3
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x18a3
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x18a3
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x18a3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x22c0
jmp 0x18a5
jmp 0x18a7
jmp 0x18a9
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x57c6(%rip), %rsi      # 0x7082
callq 0x1040
cmpl $0x0, %eax
jne 0x190c
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x190c
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x190c
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x190c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x24b0
jmp 0x1a33
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x5768(%rip), %rsi      # 0x7087
callq 0x1040
cmpl $0x0, %eax
jne 0x196f
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x196f
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x196f
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x196f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2a40
jmp 0x1a31
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x570a(%rip), %rsi      # 0x708c
callq 0x1040
cmpl $0x0, %eax
jne 0x19cf
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x19cf
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x19cf
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x19cf
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2e90
jmp 0x1a2f
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x56af(%rip), %rsi      # 0x7091
callq 0x1040
cmpl $0x0, %eax
jne 0x1a2d
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x1a2d
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x1a2d
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x1a2d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x32e0
jmp 0x1a2f
jmp 0x1a31
jmp 0x1a33
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x5650(%rip), %rsi      # 0x7096
callq 0x1040
cmpl $0x0, %eax
jne 0x1a86
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x1a86
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x1a86
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3730
jmp 0x1c06
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x55fd(%rip), %rsi      # 0x7096
callq 0x1040
cmpl $0x0, %eax
jne 0x1ae6
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x55e5(%rip), %rsi      # 0x709b
callq 0x1040
cmpl $0x0, %eax
jne 0x1ae6
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x1ae6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x38a0
jmp 0x1c04
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x559d(%rip), %rsi      # 0x7096
callq 0x1040
cmpl $0x0, %eax
jne 0x1b46
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x5588(%rip), %rsi      # 0x709e
callq 0x1040
cmpl $0x0, %eax
jne 0x1b46
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x1b46
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3990
jmp 0x1c02
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x553d(%rip), %rsi      # 0x7096
callq 0x1040
cmpl $0x0, %eax
jne 0x1ba3
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x552b(%rip), %rsi      # 0x70a1
callq 0x1040
cmpl $0x0, %eax
jne 0x1ba3
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x1ba3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3a80
jmp 0x1c00
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x54e0(%rip), %rsi      # 0x7096
callq 0x1040
cmpl $0x0, %eax
jne 0x1bfe
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x54d1(%rip), %rsi      # 0x70a4
callq 0x1040
cmpl $0x0, %eax
jne 0x1bfe
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x1bfe
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3b70
jmp 0x1c00
jmp 0x1c02
jmp 0x1c04
jmp 0x1c06
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x548e(%rip), %rsi      # 0x70a7
callq 0x1040
cmpl $0x0, %eax
jne 0x1c46
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl (%rax), %eax
cmpl $0x3, %eax
jne 0x1c46
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3c60
jmp 0x1c86
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rdi
leaq 0x544e(%rip), %rsi      # 0x70a7
callq 0x1040
cmpl $0x0, %eax
jne 0x1c84
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl (%rax), %eax
cmpl $0x2, %eax
jne 0x1c84
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3d20
jmp 0x1c86
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)