// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/buildvm.c
// Function: emit_vmdef
static void emit_vmdef(BuildCtx *ctx)
{
  char buf[80];
  int i;
  fprintf(ctx->fp, "-- This is a generated file. DO NOT EDIT!\n\n");
  fprintf(ctx->fp, "module(...)\n\n");

  fprintf(ctx->fp, "bcnames = \"");
  for (i = 0; bc_names[i]; i++) fprintf(ctx->fp, "%-6s", bc_names[i]);
  fprintf(ctx->fp, "\"\n\n");

  fprintf(ctx->fp, "irnames = \"");
  for (i = 0; ir_names[i]; i++) fprintf(ctx->fp, "%-6s", ir_names[i]);
  fprintf(ctx->fp, "\"\n\n");

  fprintf(ctx->fp, "irfpm = { [0]=");
  for (i = 0; irfpm_names[i]; i++)
    fprintf(ctx->fp, "\"%s\", ", lower(buf, irfpm_names[i]));
  fprintf(ctx->fp, "}\n\n");

  fprintf(ctx->fp, "irfield = { [0]=");
  for (i = 0; irfield_names[i]; i++) {
    char *p;
    lower(buf, irfield_names[i]);
    p = strchr(buf, '_');
    if (p) *p = '.';
    fprintf(ctx->fp, "\"%s\", ", buf);
  }
  fprintf(ctx->fp, "}\n\n");

  fprintf(ctx->fp, "ircall = {\n[0]=");
  for (i = 0; ircall_names[i]; i++)
    fprintf(ctx->fp, "\"%s\",\n", ircall_names[i]);
  fprintf(ctx->fp, "}\n\n");

  fprintf(ctx->fp, "traceerr = {\n[0]=");
  for (i = 0; trace_errors[i]; i++)
    fprintf(ctx->fp, "\"%s\",\n", trace_errors[i]);
  fprintf(ctx->fp, "}\n\n");
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd88a(%rip), %rsi      # 0x15a33
movb $0x0, %al
callq 0x5110
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd89f(%rip), %rsi      # 0x15a5f
movb $0x0, %al
callq 0x5110
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd896(%rip), %rsi      # 0x15a6d
movb $0x0, %al
callq 0x5110
movl $0x0, 0x1c(%rsp)
movslq 0x1c(%rsp), %rcx
leaq 0x1084e(%rip), %rax     # 0x18a40
cmpq $0x0, (%rax,%rcx,8)
je 0x822d
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
movslq 0x1c(%rsp), %rcx
leaq 0x10832(%rip), %rax     # 0x18a40
movq (%rax,%rcx,8), %rdx
leaq 0xd860(%rip), %rsi      # 0x15a79
movb $0x0, %al
callq 0x5110
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x81e6
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd841(%rip), %rsi      # 0x15a7e
movb $0x0, %al
callq 0x5110
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd82e(%rip), %rsi      # 0x15a82
movb $0x0, %al
callq 0x5110
movl $0x0, 0x1c(%rsp)
movslq 0x1c(%rsp), %rcx
leaq 0x10ac1(%rip), %rax     # 0x18d30
cmpq $0x0, (%rax,%rcx,8)
je 0x82aa
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
movslq 0x1c(%rsp), %rcx
leaq 0x10aa5(%rip), %rax     # 0x18d30
movq (%rax,%rcx,8), %rdx
leaq 0xd7e3(%rip), %rsi      # 0x15a79
movb $0x0, %al
callq 0x5110
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x8263
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd7c4(%rip), %rsi      # 0x15a7e
movb $0x0, %al
callq 0x5110
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd7bd(%rip), %rsi      # 0x15a8e
movb $0x0, %al
callq 0x5110
movl $0x0, 0x1c(%rsp)
movslq 0x1c(%rsp), %rcx
leaq 0x10e14(%rip), %rax     # 0x19100
cmpq $0x0, (%rax,%rcx,8)
je 0x833e
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
movslq 0x1c(%rsp), %rcx
leaq 0x10dee(%rip), %rax     # 0x19100
movq (%rax,%rcx,8), %rsi
callq 0xbbd0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0xd773(%rip), %rsi      # 0x15a9d
movb $0x0, %al
callq 0x5110
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x82e0
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd756(%rip), %rsi      # 0x15aa4
movb $0x0, %al
callq 0x5110
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd743(%rip), %rsi      # 0x15aa8
movb $0x0, %al
callq 0x5110
movl $0x0, 0x1c(%rsp)
movslq 0x1c(%rsp), %rcx
leaq 0x10df0(%rip), %rax     # 0x19170
cmpq $0x0, (%rax,%rcx,8)
je 0x83ee
leaq 0x20(%rsp), %rdi
movslq 0x1c(%rsp), %rcx
leaq 0x10dd8(%rip), %rax     # 0x19170
movq (%rax,%rcx,8), %rsi
callq 0xbbd0
leaq 0x20(%rsp), %rdi
movl $0x5f, %esi
callq 0x50b0
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x83c5
movq 0x10(%rsp), %rax
movb $0x2e, (%rax)
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0x20(%rsp), %rdx
leaq 0xd6c3(%rip), %rsi      # 0x15a9d
movb $0x0, %al
callq 0x5110
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x8374
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd6a6(%rip), %rsi      # 0x15aa4
movb $0x0, %al
callq 0x5110
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd6a4(%rip), %rsi      # 0x15ab9
movb $0x0, %al
callq 0x5110
movl $0x0, 0x1c(%rsp)
movslq 0x1c(%rsp), %rcx
leaq 0x10dd0(%rip), %rax     # 0x19200
cmpq $0x0, (%rax,%rcx,8)
je 0x846b
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
movslq 0x1c(%rsp), %rcx
leaq 0x10db4(%rip), %rax     # 0x19200
movq (%rax,%rcx,8), %rdx
leaq 0xd672(%rip), %rsi      # 0x15ac9
movb $0x0, %al
callq 0x5110
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x8424
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd629(%rip), %rsi      # 0x15aa4
movb $0x0, %al
callq 0x5110
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd63e(%rip), %rsi      # 0x15ad0
movb $0x0, %al
callq 0x5110
movl $0x0, 0x1c(%rsp)
movslq 0x1c(%rsp), %rcx
leaq 0x11653(%rip), %rax     # 0x19b00
cmpq $0x0, (%rax,%rcx,8)
je 0x84e8
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
movslq 0x1c(%rsp), %rcx
leaq 0x11637(%rip), %rax     # 0x19b00
movq (%rax,%rcx,8), %rdx
leaq 0xd5f5(%rip), %rsi      # 0x15ac9
movb $0x0, %al
callq 0x5110
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x84a1
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0xd5ac(%rip), %rsi      # 0x15aa4
movb $0x0, %al
callq 0x5110
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)