// File: /workspace/github_c_makefile_star2_O0/zenkj[P]luajit-arm64/src/host/buildvm_peobj.c
// Function: emit_peobj
void emit_peobj(BuildCtx *ctx)
{
  PEheader pehdr;
  PEsection pesect[PEOBJ_NSECTIONS];
  uint32_t sofs;
  int i, nrsym;
  union { uint8_t b; uint32_t u; } host_endian;

  sofs = sizeof(PEheader) + PEOBJ_NSECTIONS*sizeof(PEsection);

  /* Fill in PE sections. */
  memset(&pesect, 0, PEOBJ_NSECTIONS*sizeof(PEsection));
  memcpy(pesect[PEOBJ_SECT_TEXT].name, ".text", sizeof(".text")-1);
  pesect[PEOBJ_SECT_TEXT].ofs = sofs;
  sofs += (pesect[PEOBJ_SECT_TEXT].size = (uint32_t)ctx->codesz);
  pesect[PEOBJ_SECT_TEXT].relocofs = sofs;
  sofs += (pesect[PEOBJ_SECT_TEXT].nreloc = (uint16_t)ctx->nreloc) * PEOBJ_RELOC_SIZE;
  /* Flags: 60 = read+execute, 50 = align16, 20 = code. */
  pesect[PEOBJ_SECT_TEXT].flags = PEOBJ_TEXT_FLAGS;

#if LJ_TARGET_X64
  memcpy(pesect[PEOBJ_SECT_PDATA].name, ".pdata", sizeof(".pdata")-1);
  pesect[PEOBJ_SECT_PDATA].ofs = sofs;
  sofs += (pesect[PEOBJ_SECT_PDATA].size = 6*4);
  pesect[PEOBJ_SECT_PDATA].relocofs = sofs;
  sofs += (pesect[PEOBJ_SECT_PDATA].nreloc = 6) * PEOBJ_RELOC_SIZE;
  /* Flags: 40 = read, 30 = align4, 40 = initialized data. */
  pesect[PEOBJ_SECT_PDATA].flags = 0x40300040;

  memcpy(pesect[PEOBJ_SECT_XDATA].name, ".xdata", sizeof(".xdata")-1);
  pesect[PEOBJ_SECT_XDATA].ofs = sofs;
  sofs += (pesect[PEOBJ_SECT_XDATA].size = 8*2+4+6*2);  /* See below. */
  pesect[PEOBJ_SECT_XDATA].relocofs = sofs;
  sofs += (pesect[PEOBJ_SECT_XDATA].nreloc = 1) * PEOBJ_RELOC_SIZE;
  /* Flags: 40 = read, 30 = align4, 40 = initialized data. */
  pesect[PEOBJ_SECT_XDATA].flags = 0x40300040;
#endif

  memcpy(pesect[PEOBJ_SECT_RDATA_Z].name, ".rdata$Z", sizeof(".rdata$Z")-1);
  pesect[PEOBJ_SECT_RDATA_Z].ofs = sofs;
  sofs += (pesect[PEOBJ_SECT_RDATA_Z].size = (uint32_t)strlen(ctx->dasm_ident)+1);
  /* Flags: 40 = read, 30 = align4, 40 = initialized data. */
  pesect[PEOBJ_SECT_RDATA_Z].flags = 0x40300040;

  /* Fill in PE header. */
  pehdr.arch = PEOBJ_ARCH_TARGET;
  pehdr.nsects = PEOBJ_NSECTIONS;
  pehdr.time = 0;  /* Timestamp is optional. */
  pehdr.symtabofs = sofs;
  pehdr.opthdrsz = 0;
  pehdr.flags = 0;

  /* Compute the size of the symbol table:
  ** @feat.00 + nsections*2
  ** + asm_start + nsym
  ** + nrsym
  */
  nrsym = ctx->nrelocsym;
  pehdr.nsyms = 1+PEOBJ_NSECTIONS*2 + 1+ctx->nsym + nrsym;
#if LJ_TARGET_X64
  pehdr.nsyms += 1;  /* Symbol for lj_err_unwind_win64. */
#endif

  /* Write PE object header and all sections. */
  owrite(ctx, &pehdr, sizeof(PEheader));
  owrite(ctx, &pesect, sizeof(PEsection)*PEOBJ_NSECTIONS);

  /* Write .text section. */
  host_endian.u = 1;
  if (host_endian.b != LJ_ENDIAN_SELECT(1, 0)) {
#if LJ_TARGET_PPC
    uint32_t *p = (uint32_t *)ctx->code;
    int n = (int)(ctx->codesz >> 2);
    for (i = 0; i < n; i++, p++)
      *p = lj_bswap(*p);  /* Byteswap .text section. */
#else
    fprintf(stderr, "Error: different byte order for host and target\n");
    exit(1);
#endif
  }
  owrite(ctx, ctx->code, ctx->codesz);
  for (i = 0; i < ctx->nreloc; i++) {
    PEreloc reloc;
    reloc.vaddr = (uint32_t)ctx->reloc[i].ofs + PEOBJ_RELOC_OFS;
    reloc.symidx = 1+2+ctx->reloc[i].sym;  /* Reloc syms are after .text sym. */
    reloc.type = ctx->reloc[i].type ? PEOBJ_RELOC_REL32 : PEOBJ_RELOC_DIR32;
    owrite(ctx, &reloc, PEOBJ_RELOC_SIZE);
  }

#if LJ_TARGET_X64
  { /* Write .pdata section. */
    uint32_t fcofs = (uint32_t)ctx->sym[ctx->nsym-1].ofs;
    uint32_t pdata[3];  /* Start of .text, end of .text and .xdata. */
    PEreloc reloc;
    pdata[0] = 0; pdata[1] = fcofs; pdata[2] = 0;
    owrite(ctx, &pdata, sizeof(pdata));
    pdata[0] = fcofs; pdata[1] = (uint32_t)ctx->codesz; pdata[2] = 20;
    owrite(ctx, &pdata, sizeof(pdata));
    reloc.vaddr = 0; reloc.symidx = 1+2+nrsym+2+2+1;
    reloc.type = PEOBJ_RELOC_ADDR32NB;
    owrite(ctx, &reloc, PEOBJ_RELOC_SIZE);
    reloc.vaddr = 4; reloc.symidx = 1+2+nrsym+2+2+1;
    reloc.type = PEOBJ_RELOC_ADDR32NB;
    owrite(ctx, &reloc, PEOBJ_RELOC_SIZE);
    reloc.vaddr = 8; reloc.symidx = 1+2+nrsym+2;
    reloc.type = PEOBJ_RELOC_ADDR32NB;
    owrite(ctx, &reloc, PEOBJ_RELOC_SIZE);
    reloc.vaddr = 12; reloc.symidx = 1+2+nrsym+2+2+1;
    reloc.type = PEOBJ_RELOC_ADDR32NB;
    owrite(ctx, &reloc, PEOBJ_RELOC_SIZE);
    reloc.vaddr = 16; reloc.symidx = 1+2+nrsym+2+2+1;
    reloc.type = PEOBJ_RELOC_ADDR32NB;
    owrite(ctx, &reloc, PEOBJ_RELOC_SIZE);
    reloc.vaddr = 20; reloc.symidx = 1+2+nrsym+2;
    reloc.type = PEOBJ_RELOC_ADDR32NB;
    owrite(ctx, &reloc, PEOBJ_RELOC_SIZE);
  }
  { /* Write .xdata section. */
    uint16_t xdata[8+2+6];
    PEreloc reloc;
    xdata[0] = 0x01|0x08|0x10;  /* Ver. 1, uhandler/ehandler, prolog size 0. */
    xdata[1] = 0x0005;  /* Number of unwind codes, no frame pointer. */
    xdata[2] = 0x4200;  /* Stack offset 4*8+8 = aword*5. */
    xdata[3] = 0x3000;  /* Push rbx. */
    xdata[4] = 0x6000;  /* Push rsi. */
    xdata[5] = 0x7000;  /* Push rdi. */
    xdata[6] = 0x5000;  /* Push rbp. */
    xdata[7] = 0;  /* Alignment. */
    xdata[8] = xdata[9] = 0;  /* Relocated address of exception handler. */
    xdata[10] = 0x01;  /* Ver. 1, no handler, prolog size 0. */
    xdata[11] = 0x1504;  /* Number of unwind codes, fp = rbp, fpofs = 16. */
    xdata[12] = 0x0300;  /* set_fpreg. */
    xdata[13] = 0x0200;  /* stack offset 0*8+8 = aword*1. */
    xdata[14] = 0x3000;  /* Push rbx. */
    xdata[15] = 0x5000;  /* Push rbp. */
    owrite(ctx, &xdata, sizeof(xdata));
    reloc.vaddr = 2*8; reloc.symidx = 1+2+nrsym+2+2;
    reloc.type = PEOBJ_RELOC_ADDR32NB;
    owrite(ctx, &reloc, PEOBJ_RELOC_SIZE);
  }
#endif

  /* Write .rdata$Z section. */
  owrite(ctx, ctx->dasm_ident, strlen(ctx->dasm_ident)+1);

  /* Write symbol table. */
  strtab = NULL;  /* 1st pass: collect string sizes. */
  for (;;) {
    strtabofs = 4;
    /* Mark as SafeSEH compliant. */
    emit_peobj_sym(ctx, "@feat.00", 1,
		   PEOBJ_SECT_ABS, PEOBJ_TYPE_NULL, PEOBJ_SCL_STATIC);

    emit_peobj_sym_sect(ctx, pesect, PEOBJ_SECT_TEXT);
    for (i = 0; i < nrsym; i++)
      emit_peobj_sym(ctx, ctx->relocsym[i], 0,
		     PEOBJ_SECT_UNDEF, PEOBJ_TYPE_FUNC, PEOBJ_SCL_EXTERN);

#if LJ_TARGET_X64
    emit_peobj_sym_sect(ctx, pesect, PEOBJ_SECT_PDATA);
    emit_peobj_sym_sect(ctx, pesect, PEOBJ_SECT_XDATA);
    emit_peobj_sym(ctx, "lj_err_unwind_win64", 0,
		   PEOBJ_SECT_UNDEF, PEOBJ_TYPE_FUNC, PEOBJ_SCL_EXTERN);
#endif

    emit_peobj_sym(ctx, ctx->beginsym, 0,
		   PEOBJ_SECT_TEXT, PEOBJ_TYPE_NULL, PEOBJ_SCL_EXTERN);
    for (i = 0; i < ctx->nsym; i++)
      emit_peobj_sym(ctx, ctx->sym[i].name, (uint32_t)ctx->sym[i].ofs,
		     PEOBJ_SECT_TEXT, PEOBJ_TYPE_FUNC, PEOBJ_SCL_EXTERN);

    emit_peobj_sym_sect(ctx, pesect, PEOBJ_SECT_RDATA_Z);

    if (strtab)
      break;
    /* 2nd pass: alloc strtab, write syms and copy strings. */
    strtab = (char *)malloc(strtabofs);
    *(uint32_t *)strtab = (uint32_t)strtabofs;
  }

  /* Write string table. */
  owrite(ctx, strtab, strtabofs);
}

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movq %rdi, 0x140(%rsp)
movl $0xb4, 0x7c(%rsp)
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
movl $0xa0, %edx
callq 0x50c0
movl 0x9b9e(%rip), %eax      # 0x1602f
movl %eax, 0x80(%rsp)
movb 0x9b95(%rip), %al       # 0x16033
movb %al, 0x84(%rsp)
movl 0x7c(%rsp), %eax
movl %eax, 0x94(%rsp)
movq 0x140(%rsp), %rax
movq 0x30(%rax), %rax
movl %eax, 0x90(%rsp)
addl 0x7c(%rsp), %eax
movl %eax, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
movl %eax, 0x98(%rsp)
movq 0x140(%rsp), %rax
movl 0x44(%rax), %eax
movw %ax, 0xa0(%rsp)
movzwl %ax, %eax
imull $0xa, %eax, %eax
addl 0x7c(%rsp), %eax
movl %eax, 0x7c(%rsp)
movl $0x60500020, 0xa4(%rsp) # imm = 0x60500020
movl 0x9b2d(%rip), %eax      # 0x16035
movl %eax, 0xa8(%rsp)
movw 0x9b23(%rip), %ax       # 0x16039
movw %ax, 0xac(%rsp)
movl 0x7c(%rsp), %eax
movl %eax, 0xbc(%rsp)
movl $0x18, 0xb8(%rsp)
movl 0x7c(%rsp), %eax
addl $0x18, %eax
movl %eax, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
movl %eax, 0xc0(%rsp)
movw $0x6, 0xc8(%rsp)
movl 0x7c(%rsp), %eax
addl $0x3c, %eax
movl %eax, 0x7c(%rsp)
movl $0x40300040, 0xcc(%rsp) # imm = 0x40300040
movl 0x9acc(%rip), %eax      # 0x1603c
movl %eax, 0xd0(%rsp)
movw 0x9ac2(%rip), %ax       # 0x16040
movw %ax, 0xd4(%rsp)
movl 0x7c(%rsp), %eax
movl %eax, 0xe4(%rsp)
movl $0x20, 0xe0(%rsp)
movl 0x7c(%rsp), %eax
addl $0x20, %eax
movl %eax, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
movl %eax, 0xe8(%rsp)
movw $0x1, 0xf0(%rsp)
movl 0x7c(%rsp), %eax
addl $0xa, %eax
movl %eax, 0x7c(%rsp)
movl $0x40300040, 0xf4(%rsp) # imm = 0x40300040
movq 0x9a6a(%rip), %rax      # 0x16043
movq %rax, 0xf8(%rsp)
movl 0x7c(%rsp), %eax
movl %eax, 0x10c(%rsp)
movq 0x140(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0x50a0
addl $0x1, %eax
movl %eax, 0x108(%rsp)
addl 0x7c(%rsp), %eax
movl %eax, 0x7c(%rsp)
movl $0x40300040, 0x11c(%rsp) # imm = 0x40300040
movw $0x8664, 0x12c(%rsp)    # imm = 0x8664
movw $0x4, 0x12e(%rsp)
movl $0x0, 0x130(%rsp)
movl 0x7c(%rsp), %eax
movl %eax, 0x134(%rsp)
movw $0x0, 0x13c(%rsp)
movw $0x0, 0x13e(%rsp)
movq 0x140(%rsp), %rax
movl 0x48(%rax), %eax
movl %eax, 0x74(%rsp)
movq 0x140(%rsp), %rax
movl 0x40(%rax), %eax
addl $0xa, %eax
addl 0x74(%rsp), %eax
movl %eax, 0x138(%rsp)
movl 0x138(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x138(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x12c(%rsp), %rsi
movl $0x14, %edx
callq 0x7500
movq 0x140(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movl $0xa0, %edx
callq 0x7500
movl $0x1, 0x70(%rsp)
movzbl 0x70(%rsp), %eax
cmpl $0x1, %eax
je 0xc6fc
movq 0xd917(%rip), %rax      # 0x19ff8
movq (%rax), %rdi
leaq 0x9961(%rip), %rsi      # 0x1604c
movb $0x0, %al
callq 0x5110
movl $0x1, %edi
callq 0x5190
movq 0x140(%rsp), %rdi
movq 0x140(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x140(%rsp), %rax
movq 0x30(%rax), %rdx
callq 0x7500
movl $0x0, 0x78(%rsp)
movl 0x78(%rsp), %eax
movq 0x140(%rsp), %rcx
cmpl 0x44(%rcx), %eax
jge 0xc7de
movq 0x140(%rsp), %rax
addq $0x90, %rax
movslq 0x78(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
addl $0x0, %eax
movl %eax, 0x64(%rsp)
movq 0x140(%rsp), %rax
addq $0x90, %rax
movslq 0x78(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
addl $0x3, %eax
movl %eax, 0x68(%rsp)
movq 0x140(%rsp), %rax
addq $0x90, %rax
movslq 0x78(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
movl $0x2, %eax
movl $0x4, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movw %ax, 0x6c(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x64(%rsp), %rsi
movl $0xa, %edx
callq 0x7500
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0xc729
movq 0x140(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x140(%rsp), %rcx
movl 0x40(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, 0x60(%rsp)
movl $0x0, 0x54(%rsp)
movl 0x60(%rsp), %eax
movl %eax, 0x58(%rsp)
movl $0x0, 0x5c(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x54(%rsp), %rsi
movl $0xc, %edx
callq 0x7500
movl 0x60(%rsp), %eax
movl %eax, 0x54(%rsp)
movq 0x140(%rsp), %rax
movq 0x30(%rax), %rax
movl %eax, 0x58(%rsp)
movl $0x14, 0x5c(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x54(%rsp), %rsi
movl $0xc, %edx
callq 0x7500
movl $0x0, 0x48(%rsp)
movl 0x74(%rsp), %eax
addl $0x3, %eax
addl $0x2, %eax
addl $0x2, %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
movw $0x3, 0x50(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movl $0xa, %edx
callq 0x7500
movl $0x4, 0x48(%rsp)
movl 0x74(%rsp), %eax
addl $0x3, %eax
addl $0x2, %eax
addl $0x2, %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
movw $0x3, 0x50(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movl $0xa, %edx
callq 0x7500
movl $0x8, 0x48(%rsp)
movl 0x74(%rsp), %eax
addl $0x3, %eax
addl $0x2, %eax
movl %eax, 0x4c(%rsp)
movw $0x3, 0x50(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movl $0xa, %edx
callq 0x7500
movl $0xc, 0x48(%rsp)
movl 0x74(%rsp), %eax
addl $0x3, %eax
addl $0x2, %eax
addl $0x2, %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
movw $0x3, 0x50(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movl $0xa, %edx
callq 0x7500
movl $0x10, 0x48(%rsp)
movl 0x74(%rsp), %eax
addl $0x3, %eax
addl $0x2, %eax
addl $0x2, %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
movw $0x3, 0x50(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movl $0xa, %edx
callq 0x7500
movl $0x14, 0x48(%rsp)
movl 0x74(%rsp), %eax
addl $0x3, %eax
addl $0x2, %eax
movl %eax, 0x4c(%rsp)
movw $0x3, 0x50(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movl $0xa, %edx
callq 0x7500
movw $0x19, 0x20(%rsp)
movw $0x5, 0x22(%rsp)
movw $0x4200, 0x24(%rsp)     # imm = 0x4200
movw $0x3000, 0x26(%rsp)     # imm = 0x3000
movw $0x6000, 0x28(%rsp)     # imm = 0x6000
movw $0x7000, 0x2a(%rsp)     # imm = 0x7000
movw $0x5000, 0x2c(%rsp)     # imm = 0x5000
movw $0x0, 0x2e(%rsp)
movw $0x0, 0x32(%rsp)
movw $0x0, 0x30(%rsp)
movw $0x1, 0x34(%rsp)
movw $0x1504, 0x36(%rsp)     # imm = 0x1504
movw $0x300, 0x38(%rsp)      # imm = 0x300
movw $0x200, 0x3a(%rsp)      # imm = 0x200
movw $0x3000, 0x3c(%rsp)     # imm = 0x3000
movw $0x5000, 0x3e(%rsp)     # imm = 0x5000
movq 0x140(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x20, %edx
callq 0x7500
movl $0x10, 0x14(%rsp)
movl 0x74(%rsp), %eax
addl $0x3, %eax
addl $0x2, %eax
addl $0x2, %eax
movl %eax, 0x18(%rsp)
movw $0x3, 0x1c(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x14(%rsp), %rsi
movl $0xa, %edx
callq 0x7500
movq 0x140(%rsp), %rax
movq %rax, (%rsp)
movq 0x140(%rsp), %rax
movq 0x80(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x140(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0x50a0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
addq $0x1, %rdx
callq 0x7500
movq $0x0, 0xd6d7(%rip) # 0x1a1a8
movq $0x4, 0xd6d4(%rip) # 0x1a1b0
movq 0x140(%rsp), %rdi
leaq 0x9592(%rip), %rsi      # 0x1607d
movl $0x1, %edx
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
xorl %r8d, %r8d
movl $0x3, %r9d
callq 0xcce0
movq 0x140(%rsp), %rdi
leaq 0x80(%rsp), %rsi
xorl %edx, %edx
callq 0xce20
movl $0x0, 0x78(%rsp)
movl 0x78(%rsp), %eax
cmpl 0x74(%rsp), %eax
jge 0xcb6e
movq 0x140(%rsp), %rdi
movq 0x140(%rsp), %rax
movq 0x60(%rax), %rax
movslq 0x78(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
xorl %edx, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x20, %r8d
movl $0x2, %r9d
callq 0xcce0
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0xcb22
movq 0x140(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movl $0x1, %edx
callq 0xce20
movq 0x140(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movl $0x2, %edx
callq 0xce20
movq 0x140(%rsp), %rdi
leaq 0x94d5(%rip), %rsi      # 0x16086
xorl %edx, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x20, %r8d
movl $0x2, %r9d
callq 0xcce0
movq 0x140(%rsp), %rdi
movq 0x140(%rsp), %rax
movq 0x70(%rax), %rsi
xorl %r8d, %r8d
movl $0x2, %r9d
movl %r8d, %edx
movl %r8d, %ecx
callq 0xcce0
movl $0x0, 0x78(%rsp)
movl 0x78(%rsp), %eax
movq 0x140(%rsp), %rcx
cmpl 0x40(%rcx), %eax
jge 0xcc68
movq 0x140(%rsp), %rdi
movq 0x140(%rsp), %rax
movq 0x58(%rax), %rax
movslq 0x78(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq 0x140(%rsp), %rax
movq 0x58(%rax), %rax
movslq 0x78(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
xorl %ecx, %ecx
movl $0x20, %r8d
movl $0x2, %r9d
callq 0xcce0
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0xcbf9
movq 0x140(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movl $0x3, %edx
callq 0xce20
cmpq $0x0, 0xd51e(%rip)      # 0x1a1a8
je 0xcc8e
jmp 0xccb8
movq 0xd51b(%rip), %rdi      # 0x1a1b0
callq 0x5130
movq %rax, 0xd507(%rip)      # 0x1a1a8
movq 0xd508(%rip), %rax      # 0x1a1b0
movl %eax, %ecx
movq 0xd4f7(%rip), %rax      # 0x1a1a8
movl %ecx, (%rax)
jmp 0xcad1
movq 0x140(%rsp), %rdi
movq 0xd4e1(%rip), %rsi      # 0x1a1a8
movq 0xd4e2(%rip), %rdx      # 0x1a1b0
callq 0x7500
addq $0x148, %rsp            # imm = 0x148
retq
nopl (%rax,%rax)