// File: /workspace/github_c_makefile_star2_O3/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 0x5a1c
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), %r15
movslq %esi, %r13
addq 0x8(%r15), %r13
movq 0x38(%r15), %rsi
movl 0x18(%rsi), %r12d
movl 0x20(%rsi), %ebp
cmpl 0x1c(%rsi), %r12d
movq %rsi, 0x18(%rsp)
jge 0x5a41
movq (%rsi), %rax
jmp 0x5ab2
movq 0x10(%rsi), %r14
movq %r14, %rax
subq $-0xc8, %rax
jae 0x5a8c
cmpq $0x11, %r14
movl $0x10, %ecx
cmovaeq %r14, %rcx
movq %rcx, %r14
addq %rcx, %rcx
cmpq %rax, %r14
jb 0x5a5d
movq 0x8(%rsi), %rdi
movq %r14, %rsi
callq 0x5170
movq 0x18(%rsp), %rsi
movq %rax, 0x8(%rsi)
testq %rax, %rax
je 0x5ee6
movq %r14, 0x10(%rsi)
jmp 0x5a90
movq 0x8(%rsi), %rax
movl %r12d, %ecx
andl $0xff000000, %ecx       # imm = 0xFF000000
movslq %r14d, %rdx
shrq $0x2, %rdx
addl %ecx, %edx
addl $-0x19, %edx
shlq $0x2, %rcx
subq %rcx, %rax
movq %rax, (%rsi)
movl %edx, 0x1c(%rsi)
movslq %r12d, %rcx
incl %r12d
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(%r15), %rcx
movl $0x4, %r8d
leaq 0x654f(%rip), %rdx      # 0xc040
leaq 0x6518(%rip), %rsi      # 0xc010
xorl %edi, %edi
movl %r12d, %r10d
leaq 0x1(%r13), %r9
movzbl (%r13), %r11d
cmpl $0xe8, %r11d
ja 0x5b19
incl %ebp
movl %r10d, %r12d
movq %r9, %r13
jmp 0x5afa
cmpb $-0xd, %r11b
ja 0x5b5b
movl (%rsp), %ebx
cmpq $0x28, %rbx
ja 0x5bb2
movq %rbx, %r14
addq 0x10(%rsp), %r14
addl $0x8, %ebx
movl %ebx, (%rsp)
movl (%r14), %ebx
movslq %r10d, %r14
incl %r10d
movl %ebx, (%rax,%r14,4)
addl $0xffffff17, %r11d      # imm = 0xFFFFFF17
movslq (%rdx,%r11,4), %r11
addq %rdx, %r11
movl %r10d, %r12d
jmpq *%r11
leal -0xf4(%r11), %ebx
movslq (%rsi,%rbx,4), %rbx
addq %rsi, %rbx
jmpq *%rbx
movzbl 0x1(%r13), %r9d
addq $0x2, %r13
leal (,%r9,4), %ebx
addq 0x10(%r15), %rbx
cmpl $0xf6, %r9d
ja 0x5c4c
cmpb $0x9, %r9b
ja 0x5b9c
cmpl $0x0, (%rbx)
jns 0x5e74
shll $0x2, %r9d
cmpq 0x18(%r15), %r9
jae 0x5e74
movq %r13, %r9
jmp 0x5c8e
movq 0x8(%rsp), %rbx
leaq 0x8(%rbx), %r14
movq %r14, 0x8(%rsp)
movl (%rbx), %ebx
movslq %r10d, %r14
incl %r10d
movl %ebx, (%rax,%r14,4)
addl $0xffffff17, %r11d      # imm = 0xFFFFFF17
movslq (%rdx,%r11,4), %r11
addq %rdx, %r11
movl %r10d, %r12d
jmpq *%r11
testl %ebx, %ebx
je 0x5e25
movsbl %bl, %r8d
movl %r12d, %r10d
cmpl %ebx, %r8d
je 0x5d66
addl $0x4, %ebp
movl $0x4, %r8d
jmp 0x5b11
movl (%rsp), %r14d
cmpq $0x28, %r14
ja 0x5c63
movq %r14, %rbx
addq 0x10(%rsp), %rbx
addl $0x8, %r14d
movl %r14d, (%rsp)
jmp 0x5c71
movzbl 0x1(%r13), %r11d
addq $0x2, %r13
shll $0x2, %r11d
cmpq 0x18(%r15), %r11
jae 0x5e74
addq 0x10(%r15), %r11
jmp 0x5de9
movzbl -0x1(%r13), %r8d
jmp 0x5b11
movl -0x3d8(%rbx), %r14d
addq $-0x3d8, %rbx           # imm = 0xFC28
testl %r14d, %r14d
cmovlel %edi, %r14d
jmp 0x5c99
movq 0x8(%rsp), %rbx
leaq 0x8(%rbx), %r14
movq %r14, 0x8(%rsp)
movslq (%rbx), %rbx
leaq (,%rbx,4), %r14
cmpq 0x28(%r15), %r14
jae 0x5e62
movq 0x20(%r15), %r14
leaq (%r14,%rbx,4), %rbx
movl (%rbx), %r14d
testl %r14d, %r14d
js 0x5ca5
movq %r9, %r13
movslq %r10d, %r9
movl %r14d, (%rax,%r9,4)
movl %r10d, (%rbx)
jmp 0x5cb2
negl %r14d
movslq %r10d, %rbx
movl %r14d, (%rax,%rbx,4)
movq %r9, %r13
leal 0x1(%r10), %r12d
addl $0x4, %ebp
andb $-0x2, %r11b
cmpb $-0xc, %r11b
jne 0x5afa
addl $0x2, %r10d
movslq %r12d, %r9
jmp 0x5e19
addq $0x3, %r13
addl $0x4, %ebp
movl %r10d, %r12d
jmp 0x5afa
movl (%rsp), %ebx
cmpq $0x28, %rbx
ja 0x5dbb
movq %rbx, %r11
addq 0x10(%rsp), %r11
addl $0x8, %ebx
movl %ebx, (%rsp)
jmp 0x5dc9
movzbl 0x1(%r13), %r9d
addq $0x2, %r13
addl %r9d, %ebp
jmp 0x5e13
addq $0x2, %r13
incl %ebp
movl %r10d, %r12d
jmp 0x5afa
movsbl %bl, %r8d
cmpl %ebx, %r8d
je 0x5d66
jmp 0x5e50
addq $0x2, %r13
addl %ebx, %ebp
movl $0x4, %r8d
jmp 0x5afa
movsbl %bl, %r8d
cmpl %ebx, %r8d
je 0x5d66
cmpl $0x10000, %ebx          # imm = 0x10000
jae 0x5e50
addl $0x2, %ebp
jmp 0x5d73
cmpl $0x100, %ebx            # imm = 0x100
jae 0x5e50
incl %ebp
jmp 0x5d73
movl $0xc0000000, -0x4(%rax,%r14,4) # imm = 0xC0000000
movl $0x4, %r8d
movq %r9, %r13
jmp 0x5afa
cmpl $0x7, %ebx
ja 0x5e8a
movb (%r9), %r10b
cmpl $0x4, %ebx
jne 0x5d9f
movl %r10d, %r11d
andb $0x1, %r11b
jne 0x5e8a
addq $0x2, %r13
cmpb $0x1, %r10b
jne 0x5afa
cmpb $-0x17, (%r13)
cmovel %ebx, %r8d
jmp 0x5afa
movq 0x8(%rsp), %r11
leaq 0x8(%r11), %rbx
movq %rbx, 0x8(%rsp)
movslq (%r11), %r11
leaq (,%r11,4), %rbx
cmpq 0x28(%r15), %rbx
jae 0x5e62
movq 0x20(%r15), %rbx
leaq (%rbx,%r11,4), %r11
movq %r9, %r13
movl (%r11), %r9d
jmp 0x5e05
movl %r9d, %ebx
shrl $0x18, %r9d
leaq (%r9,%r9,4), %r9
movq (%rcx,%r9,8), %r14
movl (%r14,%rbx,4), %r9d
movl %r10d, (%r14,%rbx,4)
testl %r9d, %r9d
jg 0x5dee
movl %r10d, %r9d
negl %r9d
movl %r9d, (%r11)
movslq %r10d, %r9
incl %r10d
movl %ebp, (%rax,%r9,4)
movl %r10d, %r12d
jmp 0x5afa
andl $0x7, %r8d
cmpl $0x4, %r8d
jne 0x5e38
movzbl -0x1(%r13), %r8d
andl $0x7, %r8d
movq %r9, %r13
cmpl $0x5, %r8d
movl $0x4, %r8d
jne 0x5afa
jmp 0x5d66
movl 0x8(%r15), %eax
notl %eax
addl %eax, %r9d
orl $0x11000000, %r9d       # imm = 0x11000000
jmp 0x5ed0
movl 0x8(%r15), %eax
notl %eax
addl %eax, %r9d
orl $0x14000000, %r9d       # imm = 0x14000000
jmp 0x5ed0
movl 0x8(%r15), %eax
notl %eax
addl %eax, %r13d
orl $0x13000000, %r13d      # imm = 0x13000000
movl %r13d, 0x4c(%r15)
jmp 0x5ed4
movl 0x8(%r15), %eax
notl %eax
addl %eax, %r9d
orl $0x15000000, %r9d       # imm = 0x15000000
jmp 0x5ed0
movzbl (%r9), %eax
cmpl %eax, 0x48(%r15)
jle 0x5ec0
leaq (%rax,%rax,4), %rax
leaq (%rcx,%rax,8), %rax
movq %rax, 0x38(%r15)
movq 0x18(%rsp), %rax
movl %r10d, 0x18(%rax)
movl %ebp, 0x20(%rax)
jmp 0x5ed4
movl 0x8(%r15), %eax
notl %eax
addl %eax, %r9d
orl $0x12000000, %r9d       # imm = 0x12000000
movl %r9d, 0x4c(%r15)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x51b0