// File: /workspace/github_c_makefile_star2_O0/plvhx[P]dummy-vm/src/ast.c
// Function: vm_ast_process_ternary_addb_imm8_regs_instruction
static void vm_ast_process_ternary_addb_imm8_regs_instruction(
    vm_ast_t *ast, FILE *file, void (*visitor)(FILE *file, int opcode)) {
  if (VM_AST_GET_NUM_CHILDS(ast) != 4) {
    return;
  }

  if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]), "r0") &&
      !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]), "r0")) {
    visitor(file, VM_INSN_ADDB_IMM8_R0_TO_R0);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r1") &&
             !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]),
                         "r0")) {
    visitor(file, VM_INSN_ADDB_IMM8_R0_TO_R1);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r2") &&
             !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]),
                         "r0")) {
    visitor(file, VM_INSN_ADDB_IMM8_R0_TO_R2);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r3") &&
             !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]),
                         "r0")) {
    visitor(file, VM_INSN_ADDB_IMM8_R0_TO_R3);
  }

  if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]), "r0") &&
      !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]), "r1")) {
    visitor(file, VM_INSN_ADDB_IMM8_R1_TO_R0);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r1") &&
             !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]),
                         "r1")) {
    visitor(file, VM_INSN_ADDB_IMM8_R1_TO_R1);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r2") &&
             !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]),
                         "r1")) {
    visitor(file, VM_INSN_ADDB_IMM8_R1_TO_R2);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r3") &&
             !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]),
                         "r1")) {
    visitor(file, VM_INSN_ADDB_IMM8_R1_TO_R3);
  }

  if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]), "r0") &&
      !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]), "r2")) {
    visitor(file, VM_INSN_ADDB_IMM8_R2_TO_R0);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r1") &&
             !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]),
                         "r2")) {
    visitor(file, VM_INSN_ADDB_IMM8_R2_TO_R1);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r2") &&
             !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]),
                         "r2")) {
    visitor(file, VM_INSN_ADDB_IMM8_R2_TO_R2);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r3") &&
             !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]),
                         "r2")) {
    visitor(file, VM_INSN_ADDB_IMM8_R2_TO_R3);
  }

  if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]), "r0") &&
      !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]), "r3")) {
    visitor(file, VM_INSN_ADDB_IMM8_R3_TO_R0);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r1") &&
             !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]),
                         "r3")) {
    visitor(file, VM_INSN_ADDB_IMM8_R3_TO_R1);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r2") &&
             !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]),
                         "r3")) {
    visitor(file, VM_INSN_ADDB_IMM8_R3_TO_R1);
  } else if (!strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[1]),
                         "r3") &&
             !strcasecmp((const char *)VM_AST_GET_REGS_NAME(ast->childs[3]),
                         "r3")) {
    visitor(file, VM_INSN_ADDB_IMM8_R3_TO_R3);
  }

  unsigned int is_negated =
      VM_AST_GET_NUMBER_VAL(ast->childs[2])[0] == '-' ? 0xff : 0xfa;

  visitor(file, is_negated);
  visitor(file, is_negated == 0xfa
                    ? atoi((char *)VM_AST_GET_NUMBER_VAL(ast->childs[2]))
                    : atoi((char *)VM_AST_GET_NUMBER_VAL(ast->childs[2]) + 1));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x4, 0x20(%rax)
je 0x24d4
jmp 0x2a2f
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4bb4(%rip), %rsi      # 0x709b
callq 0x1040
cmpl $0x0, %eax
jne 0x2522
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4b97(%rip), %rsi      # 0x709b
callq 0x1040
cmpl $0x0, %eax
jne 0x2522
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x50, %esi
callq *%rax
jmp 0x260a
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4b69(%rip), %rsi      # 0x709e
callq 0x1040
cmpl $0x0, %eax
jne 0x2570
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4b49(%rip), %rsi      # 0x709b
callq 0x1040
cmpl $0x0, %eax
jne 0x2570
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x51, %esi
callq *%rax
jmp 0x2608
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4b1e(%rip), %rsi      # 0x70a1
callq 0x1040
cmpl $0x0, %eax
jne 0x25bb
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4afb(%rip), %rsi      # 0x709b
callq 0x1040
cmpl $0x0, %eax
jne 0x25bb
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x52, %esi
callq *%rax
jmp 0x2606
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4ad6(%rip), %rsi      # 0x70a4
callq 0x1040
cmpl $0x0, %eax
jne 0x2604
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4ab0(%rip), %rsi      # 0x709b
callq 0x1040
cmpl $0x0, %eax
jne 0x2604
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x53, %esi
callq *%rax
jmp 0x2606
jmp 0x2608
jmp 0x260a
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4a7e(%rip), %rsi      # 0x709b
callq 0x1040
cmpl $0x0, %eax
jne 0x2658
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4a64(%rip), %rsi      # 0x709e
callq 0x1040
cmpl $0x0, %eax
jne 0x2658
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x60, %esi
callq *%rax
jmp 0x2740
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4a33(%rip), %rsi      # 0x709e
callq 0x1040
cmpl $0x0, %eax
jne 0x26a6
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4a16(%rip), %rsi      # 0x709e
callq 0x1040
cmpl $0x0, %eax
jne 0x26a6
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x61, %esi
callq *%rax
jmp 0x273e
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x49e8(%rip), %rsi      # 0x70a1
callq 0x1040
cmpl $0x0, %eax
jne 0x26f1
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x49c8(%rip), %rsi      # 0x709e
callq 0x1040
cmpl $0x0, %eax
jne 0x26f1
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x62, %esi
callq *%rax
jmp 0x273c
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x49a0(%rip), %rsi      # 0x70a4
callq 0x1040
cmpl $0x0, %eax
jne 0x273a
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x497d(%rip), %rsi      # 0x709e
callq 0x1040
cmpl $0x0, %eax
jne 0x273a
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x63, %esi
callq *%rax
jmp 0x273c
jmp 0x273e
jmp 0x2740
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4948(%rip), %rsi      # 0x709b
callq 0x1040
cmpl $0x0, %eax
jne 0x278e
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4931(%rip), %rsi      # 0x70a1
callq 0x1040
cmpl $0x0, %eax
jne 0x278e
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x70, %esi
callq *%rax
jmp 0x2876
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x48fd(%rip), %rsi      # 0x709e
callq 0x1040
cmpl $0x0, %eax
jne 0x27dc
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x48e3(%rip), %rsi      # 0x70a1
callq 0x1040
cmpl $0x0, %eax
jne 0x27dc
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x71, %esi
callq *%rax
jmp 0x2874
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x48b2(%rip), %rsi      # 0x70a1
callq 0x1040
cmpl $0x0, %eax
jne 0x2827
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4895(%rip), %rsi      # 0x70a1
callq 0x1040
cmpl $0x0, %eax
jne 0x2827
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x72, %esi
callq *%rax
jmp 0x2872
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x486a(%rip), %rsi      # 0x70a4
callq 0x1040
cmpl $0x0, %eax
jne 0x2870
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x484a(%rip), %rsi      # 0x70a1
callq 0x1040
cmpl $0x0, %eax
jne 0x2870
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x73, %esi
callq *%rax
jmp 0x2872
jmp 0x2874
jmp 0x2876
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4812(%rip), %rsi      # 0x709b
callq 0x1040
cmpl $0x0, %eax
jne 0x28c4
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x47fe(%rip), %rsi      # 0x70a4
callq 0x1040
cmpl $0x0, %eax
jne 0x28c4
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x80, %esi
callq *%rax
jmp 0x29ac
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x47c7(%rip), %rsi      # 0x709e
callq 0x1040
cmpl $0x0, %eax
jne 0x2912
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x47b0(%rip), %rsi      # 0x70a4
callq 0x1040
cmpl $0x0, %eax
jne 0x2912
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x81, %esi
callq *%rax
jmp 0x29aa
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x477c(%rip), %rsi      # 0x70a1
callq 0x1040
cmpl $0x0, %eax
jne 0x295d
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4762(%rip), %rsi      # 0x70a4
callq 0x1040
cmpl $0x0, %eax
jne 0x295d
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x81, %esi
callq *%rax
jmp 0x29a8
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4734(%rip), %rsi      # 0x70a4
callq 0x1040
cmpl $0x0, %eax
jne 0x29a6
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4717(%rip), %rsi      # 0x70a4
callq 0x1040
cmpl $0x0, %eax
jne 0x29a6
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl $0x83, %esi
callq *%rax
jmp 0x29a8
jmp 0x29aa
jmp 0x29ac
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x18(%rax), %rax
movzbl (%rax), %edx
movl $0xfa, %eax
movl $0xff, %ecx
cmpl $0x2d, %edx
cmovel %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0xfa, -0x1c(%rbp)
jne 0x2a0a
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x1170
movl %eax, -0x34(%rbp)
jmp 0x2a22
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x18(%rax), %rdi
addq $0x1, %rdi
callq 0x1170
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rdi
movl -0x34(%rbp), %esi
callq *%rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)