// File: /workspace/github_c_makefile_star2_O1/zenkj[P]luajit-arm64/src/./../dynasm/dasm_x86.h
// Function: dasm_put
void dasm_put(Dst_DECL, int start, ...)
{
  va_list ap;
  dasm_State *D = Dst_REF;
  dasm_ActList p = D->actionlist + start;
  dasm_Section *sec = D->section;
  int pos = sec->pos, ofs = sec->ofs, mrm = 4;
  int *b;

  if (pos >= sec->epos) {
    DASM_M_GROW(Dst, int, sec->buf, sec->bsize,
      sec->bsize + 2*DASM_MAXSECPOS*sizeof(int));
    sec->rbuf = sec->buf - DASM_POS2BIAS(pos);
    sec->epos = (int)sec->bsize/sizeof(int) - DASM_MAXSECPOS+DASM_POS2BIAS(pos);
  }

  b = sec->rbuf;
  b[pos++] = start;

  va_start(ap, start);
  while (1) {
    int action = *p++;
    if (action < DASM_DISP) {
      ofs++;
    } else if (action <= DASM_REL_A) {
      int n = va_arg(ap, int);
      b[pos++] = n;
      switch (action) {
      case DASM_DISP:
	if (n == 0) { if ((mrm&7) == 4) mrm = p[-2]; if ((mrm&7) != 5) break; }
      case DASM_IMM_DB: if (((n+128)&-256) == 0) goto ob;
      case DASM_REL_A: /* Assumes ptrdiff_t is int. !x64 */
      case DASM_IMM_D: ofs += 4; break;
      case DASM_IMM_S: CK(((n+128)&-256) == 0, RANGE_I); goto ob;
      case DASM_IMM_B: CK((n&-256) == 0, RANGE_I); ob: ofs++; break;
      case DASM_IMM_WB: if (((n+128)&-256) == 0) goto ob;
      case DASM_IMM_W: CK((n&-65536) == 0, RANGE_I); ofs += 2; break;
      case DASM_SPACE: p++; ofs += n; break;
      case DASM_SETLABEL: b[pos-2] = -0x40000000; break;  /* Neg. label ofs. */
      case DASM_VREG: CK((n&-8) == 0 && (n != 4 || (*p&1) == 0), RANGE_VREG);
	if (*p++ == 1 && *p == DASM_DISP) mrm = n; continue;
      }
      mrm = 4;
    } else {
      int *pl, n;
      switch (action) {
      case DASM_REL_LG:
      case DASM_IMM_LG:
	n = *p++; pl = D->lglabels + n;
	/* Bkwd rel or global. */
	if (n <= 246) { CK(n>=10||*pl<0, RANGE_LG); CKPL(lg, LG); goto putrel; }
	pl -= 246; n = *pl;
	if (n < 0) n = 0;  /* Start new chain for fwd rel if label exists. */
	goto linkrel;
      case DASM_REL_PC:
      case DASM_IMM_PC: pl = D->pclabels + va_arg(ap, int); CKPL(pc, PC);
      putrel:
	n = *pl;
	if (n < 0) {  /* Label exists. Get label pos and store it. */
	  b[pos] = -n;
	} else {
      linkrel:
	  b[pos] = n;  /* Else link to rel chain, anchored at label. */
	  *pl = pos;
	}
	pos++;
	ofs += 4;  /* Maximum offset needed. */
	if (action == DASM_REL_LG || action == DASM_REL_PC)
	  b[pos++] = ofs;  /* Store pass1 offset estimate. */
	break;
      case DASM_LABEL_LG: pl = D->lglabels + *p++; CKPL(lg, LG); goto putlabel;
      case DASM_LABEL_PC: pl = D->pclabels + va_arg(ap, int); CKPL(pc, PC);
      putlabel:
	n = *pl;  /* n > 0: Collapse rel chain and replace with label pos. */
	while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = pos; }
	*pl = -pos;  /* Label exists now. */
	b[pos++] = ofs;  /* Store pass1 offset estimate. */
	break;
      case DASM_ALIGN:
	ofs += *p++;  /* Maximum alignment needed (arg is 2**n-1). */
	b[pos++] = ofs;  /* Store pass1 offset estimate. */
	break;
      case DASM_EXTERN: p += 2; ofs += 4; break;
      case DASM_ESC: p++; ofs++; break;
      case DASM_MARK: mrm = p[-2]; break;
      case DASM_SECTION:
	n = *p; CK(n < D->maxsection, RANGE_SEC); D->section = &D->sections[n];
      case DASM_STOP: goto stop;
      }
    }
  }
stop:
  va_end(ap);
  sec->pos = pos;
  sec->ofs = ofs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %esi, %ebx
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x5a3a
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq (%rdi), %r12
movslq %esi, %r15
addq 0x8(%r12), %r15
movq 0x38(%r12), %rsi
movl 0x18(%rsi), %r13d
movl 0x20(%rsi), %ebp
cmpl 0x1c(%rsi), %r13d
jl 0x5acf
movq 0x10(%rsi), %rdx
movq %rdx, %rax
subq $-0xc8, %rax
jae 0x5aa5
cmpq $0x11, %rdx
movl $0x10, %ecx
cmovaeq %rdx, %rcx
movq %rcx, %r14
addq %rcx, %rcx
cmpq %rax, %r14
jb 0x5a73
movq 0x8(%rsi), %rdi
movq %rsi, 0x18(%rsp)
movq %r14, %rsi
callq 0x5160
movq 0x18(%rsp), %rsi
movq %rax, 0x8(%rsi)
testq %rax, %rax
je 0x5f68
movq %r14, 0x10(%rsi)
movq 0x8(%rsi), %rax
movl %r13d, %ecx
andl $0xff000000, %ecx       # imm = 0xFF000000
movq %rcx, %rdx
shlq $0x2, %rdx
subq %rdx, %rax
movq %rax, (%rsi)
movslq 0x10(%rsi), %rax
shrq $0x2, %rax
addl %ecx, %eax
addl $-0x19, %eax
movl %eax, 0x1c(%rsi)
movq %rsi, %rdi
movq (%rsi), %rax
movslq %r13d, %rcx
incl %r13d
movl %ebx, (%rax,%rcx,4)
leaq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x110(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movabsq $0x3000000010, %rcx     # imm = 0x3000000010
movq %rcx, (%rsp)
leaq 0x50(%r12), %rcx
movl $0x4, %r8d
leaq 0x652b(%rip), %rdx      # 0xc040
leaq 0x64f4(%rip), %rsi      # 0xc010
leaq 0x1(%r15), %r9
movzbl (%r15), %r11d
cmpl $0xe8, %r11d
ja 0x5b45
incl %ebp
xorl %r10d, %r10d
movq %r9, %r15
testl %r10d, %r10d
je 0x5b1c
cmpl $0x6, %r10d
je 0x5b1c
jmp 0x5f49
cmpb $-0xd, %r11b
ja 0x5b86
movl (%rsp), %r10d
cmpq $0x28, %r10
ja 0x5be2
movq %r10, %rbx
addq 0x10(%rsp), %rbx
addl $0x8, %r10d
movl %r10d, (%rsp)
movl (%rbx), %ebx
movslq %r13d, %r10
incl %r13d
movl %ebx, (%rax,%r10,4)
addl $0xffffff17, %r11d      # imm = 0xFFFFFF17
movslq (%rdx,%r11,4), %r11
addq %rdx, %r11
jmpq *%r11
xorl %r10d, %r10d
leal -0xf4(%r11), %ebx
movslq (%rsi,%rbx,4), %rbx
addq %rsi, %rbx
jmpq *%rbx
movzbl 0x1(%r15), %r9d
addq $0x2, %r15
leal (,%r9,4), %ebx
addq 0x10(%r12), %rbx
cmpl $0xf6, %r9d
ja 0x5de1
cmpb $0x9, %r9b
ja 0x5bcb
cmpl $0x0, (%rbx)
jns 0x5d44
shll $0x2, %r9d
cmpq 0x18(%r12), %r9
jae 0x5d44
movq %r15, %r9
jmp 0x5e2e
movq 0x8(%rsp), %r10
leaq 0x8(%r10), %rbx
movq %rbx, 0x8(%rsp)
movl (%r10), %ebx
movslq %r13d, %r10
incl %r13d
movl %ebx, (%rax,%r10,4)
addl $0xffffff17, %r11d      # imm = 0xFFFFFF17
movslq (%rdx,%r11,4), %r11
addq %rdx, %r11
jmpq *%r11
testl %ebx, %ebx
jne 0x5c32
movl %r8d, %r10d
andl $0x7, %r10d
cmpl $0x4, %r10d
jne 0x5c24
movzbl -0x1(%r15), %r8d
andl $0x7, %r8d
cmpl $0x5, %r8d
jne 0x5ccd
movsbl %bl, %r8d
cmpl %ebx, %r8d
je 0x5ca9
addl $0x4, %ebp
jmp 0x5ccd
movl (%rsp), %r14d
cmpq $0x28, %r14
ja 0x5e01
movq %r14, %rbx
addq 0x10(%rsp), %rbx
addl $0x8, %r14d
movl %r14d, (%rsp)
jmp 0x5e0f
movsbl %bl, %r10d
cmpl %ebx, %r10d
je 0x5ca9
jmp 0x5cad
addq $0x2, %r15
addl %ebx, %ebp
xorl %r10d, %r10d
movb $0x1, %r11b
movl $0x4, %r8d
movq %r15, %r9
jmp 0x5e62
movsbl %bl, %r10d
cmpl %ebx, %r10d
je 0x5ca9
cmpl $0x10000, %ebx          # imm = 0x10000
jae 0x5cad
addl $0x2, %ebp
jmp 0x5ccd
cmpl $0x100, %ebx            # imm = 0x100
jae 0x5cad
incl %ebp
jmp 0x5ccd
movl 0x8(%r12), %r10d
notl %r10d
addl %r9d, %r10d
orl $0x11000000, %r10d      # imm = 0x11000000
jmp 0x5e54
movl $0xc0000000, -0x4(%rax,%r10,4) # imm = 0xC0000000
xorl %r10d, %r10d
movb $0x1, %r11b
movl $0x4, %r8d
jmp 0x5e62
cmpl $0x7, %ebx
ja 0x5e42
cmpl $0x4, %ebx
jne 0x5cf6
testb $0x1, (%r9)
jne 0x5e42
leaq 0x2(%r15), %r9
movl $0x6, %r10d
cmpb $0x1, 0x1(%r15)
jne 0x5e5f
cmpb $-0x17, (%r9)
cmovel %ebx, %r8d
jmp 0x5e5f
addq $0x2, %r15
incl %ebp
jmp 0x5dd7
movzbl 0x1(%r15), %r11d
addq $0x2, %r15
shll $0x2, %r11d
cmpq 0x18(%r12), %r11
jae 0x5d44
addq 0x10(%r12), %r11
movq %r15, %r9
jmp 0x5ee5
movl 0x8(%r12), %r9d
notl %r9d
addl %r15d, %r9d
orl $0x13000000, %r9d       # imm = 0x13000000
movl %r9d, 0x4c(%r12)
movl $0x1, %r10d
xorl %ebx, %ebx
jmp 0x5dd9
movzbl (%r9), %r10d
cmpl %r10d, 0x48(%r12)
jle 0x5ea8
leaq (%r10,%r10,4), %r10
leaq (%rcx,%r10,8), %r10
movq %r10, 0x38(%r12)
xorl %ebx, %ebx
movl $0x24, %r10d
jmp 0x5f39
movzbl 0x1(%r15), %r9d
addq $0x2, %r15
addl %r9d, %ebp
movslq %r13d, %r9
incl %r13d
movl %ebp, (%rax,%r9,4)
jmp 0x5dd7
movl (%rsp), %ebx
cmpq $0x28, %rbx
ja 0x5ebc
movq %rbx, %r11
addq 0x10(%rsp), %r11
addl $0x8, %ebx
movl %ebx, (%rsp)
jmp 0x5eca
movzbl -0x1(%r15), %r8d
jmp 0x5f37
addq $0x3, %r15
addl $0x4, %ebp
movb $0x1, %bl
movq %r15, %r9
jmp 0x5f39
movl -0x3d8(%rbx), %r14d
addq $-0x3d8, %rbx           # imm = 0xFC28
testl %r14d, %r14d
movl $0x0, %r9d
cmovlel %r9d, %r14d
movq %r15, %r9
jmp 0x5e36
movq 0x8(%rsp), %rbx
leaq 0x8(%rbx), %r14
movq %r14, 0x8(%rsp)
movq 0x20(%r12), %r14
movslq (%rbx), %rbx
leaq (%r14,%rbx,4), %rbx
movq %rbx, %r14
subq 0x20(%r12), %r14
cmpq 0x28(%r12), %r14
jae 0x5f04
movl (%rbx), %r14d
testl %r14d, %r14d
js 0x5e73
movslq %r13d, %r15
movl %r14d, (%rax,%r15,4)
movl %r13d, (%rbx)
jmp 0x5e7d
movl 0x8(%r12), %r10d
notl %r10d
addl %r9d, %r10d
orl $0x15000000, %r10d      # imm = 0x15000000
movl %r10d, 0x4c(%r12)
movl $0x1, %r10d
xorl %r11d, %r11d
movq %r9, %r15
testb %r11b, %r11b
jne 0x5b2f
jmp 0x5b35
negl %r14d
movslq %r13d, %rbx
movl %r14d, (%rax,%rbx,4)
leal 0x1(%r13), %r14d
addl $0x4, %ebp
andb $-0x2, %r11b
movb $0x1, %bl
cmpb $-0xc, %r11b
jne 0x5ea0
addl $0x2, %r13d
movslq %r14d, %r11
movl %ebp, (%rax,%r11,4)
jmp 0x5f39
movl %r14d, %r13d
jmp 0x5f39
movl 0x8(%r12), %r10d
notl %r10d
addl %r9d, %r10d
orl $0x12000000, %r10d      # imm = 0x12000000
jmp 0x5f16
movq 0x8(%rsp), %r11
leaq 0x8(%r11), %rbx
movq %rbx, 0x8(%rsp)
movq 0x20(%r12), %rbx
movslq (%r11), %r11
leaq (%rbx,%r11,4), %r11
movq %r11, %rbx
subq 0x20(%r12), %rbx
cmpq 0x28(%r12), %rbx
jae 0x5f04
movl (%r11), %ebx
testl %ebx, %ebx
jle 0x5f25
movl %ebx, %r14d
shrl $0x18, %ebx
leaq (%rbx,%rbx,4), %rbx
movq (%rcx,%rbx,8), %r15
movl (%r15,%r14,4), %ebx
movl %r13d, (%r15,%r14,4)
jmp 0x5ee8
movl 0x8(%r12), %r10d
notl %r10d
addl %r9d, %r10d
orl $0x14000000, %r10d      # imm = 0x14000000
movl %r10d, 0x4c(%r12)
movl $0x1, %r10d
xorl %ebx, %ebx
jmp 0x5f39
movl %r13d, %ebx
negl %ebx
movl %ebx, (%r11)
movslq %r13d, %r11
incl %r13d
movl %ebp, (%rax,%r11,4)
movb $0x1, %bl
movq %r9, %r15
testb %bl, %bl
jne 0x5b2f
jmp 0x5b35
cmpl $0x24, %r10d
jne 0x5f56
movl %r13d, 0x18(%rdi)
movl %ebp, 0x20(%rdi)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x51a0