// File: /workspace/github_c_makefile_star2_O1/LuaJIT[P]LuaJIT/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 = -1;
  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 < 0) mrm = p[-2]; if ((mrm&7) != 5) break; }
	/* fallthrough */
      case DASM_IMM_DB: if (((n+128)&-256) == 0) goto ob; /* fallthrough */
      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; /* fallthrough */
      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&-16) == 0 && (n != 4 || (*p>>5) != 2), RANGE_VREG);
	if (*p < 0x40 && p[1] == DASM_DISP) mrm = n;
	if (*p < 0x20 && (n&7) == 4) ofs++;
	switch ((*p++ >> 3) & 3) {
	case 3: n |= b[pos-3]; /* fallthrough */
	case 2: n |= b[pos-2]; /* fallthrough */
	case 1: if (n <= 7) { b[pos-1] |= 0x10; ofs--; }
	}
	continue;
      }
      mrm = -1;
    } 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. */
	} else if (sizeof(ptrdiff_t) == 8) {
	  ofs += 4;
	}
	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 0x5a65
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 0x5b06
movq 0x10(%rsi), %rdx
movq %rdx, %rax
subq $-0xc8, %rax
jae 0x5adc
movq %r12, 0x18(%rsp)
cmpq $0x11, %rdx
movl $0x10, %ecx
cmovaeq %rdx, %rcx
movq %rcx, %r14
addq %rcx, %rcx
cmpq %rax, %r14
jb 0x5aa7
movq %rsi, %r12
movq 0x8(%rsi), %rdi
movq %r14, %rsi
callq 0x5160
movq %rax, 0x8(%r12)
testq %rax, %rax
je 0x5fce
movq %r12, %rsi
movq %r14, 0x10(%r12)
movq 0x18(%rsp), %r12
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, 0x18(%rsp)
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 $0xffffffff, %r9d       # imm = 0xFFFFFFFF
leaq 0x64f2(%rip), %rdx      # 0xc040
leaq 0x64bb(%rip), %rdi      # 0xc010
xorl %r8d, %r8d
leaq 0x1(%r15), %r10
movzbl (%r15), %r14d
cmpl $0xe8, %r14d
ja 0x5b70
incl %ebp
jmp 0x5efa
cmpb $-0xd, %r14b
ja 0x5bae
movl (%rsp), %esi
cmpq $0x28, %rsi
ja 0x5c0a
movq %rsi, %r11
addq 0x10(%rsp), %r11
addl $0x8, %esi
movl %esi, (%rsp)
movl (%r11), %ebx
movslq %r13d, %rsi
incl %r13d
movl %ebx, (%rax,%rsi,4)
addl $0xffffff17, %r14d      # imm = 0xFFFFFF17
movslq (%rdx,%r14,4), %r11
addq %rdx, %r11
jmpq *%r11
xorl %r11d, %r11d
leal -0xf4(%r14), %esi
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movzbl 0x1(%r15), %r10d
addq $0x2, %r15
leal (,%r10,4), %esi
addq 0x10(%r12), %rsi
cmpl $0xf6, %r10d
ja 0x5de0
cmpb $0x9, %r10b
ja 0x5bf3
cmpl $0x0, (%rsi)
jns 0x5d47
shll $0x2, %r10d
cmpq 0x18(%r12), %r10
jae 0x5d47
movq %r15, %r10
jmp 0x5e25
movq 0x8(%rsp), %rsi
leaq 0x8(%rsi), %r11
movq %r11, 0x8(%rsp)
movl (%rsi), %ebx
movslq %r13d, %rsi
incl %r13d
movl %ebx, (%rax,%rsi,4)
addl $0xffffff17, %r14d      # imm = 0xFFFFFF17
movslq (%rdx,%r14,4), %r11
addq %rdx, %r11
jmpq *%r11
testl %ebx, %ebx
jne 0x5c50
testl %r9d, %r9d
jns 0x5c42
movzbl -0x1(%r15), %r9d
andl $0x7, %r9d
cmpl $0x5, %r9d
jne 0x5cd8
movsbl %bl, %esi
cmpl %ebx, %esi
je 0x5cb7
addl $0x4, %ebp
jmp 0x5cd8
movl (%rsp), %ebx
cmpq $0x28, %rbx
ja 0x5df8
movq %rbx, %rsi
addq 0x10(%rsp), %rsi
addl $0x8, %ebx
movl %ebx, (%rsp)
jmp 0x5e06
movsbl %bl, %esi
cmpl %ebx, %esi
je 0x5cb7
jmp 0x5cbb
addq $0x2, %r15
addl %ebx, %ebp
xorl %r11d, %r11d
movb $0x1, %bl
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
jmp 0x5dd8
movsbl %bl, %esi
cmpl %ebx, %esi
je 0x5cb7
cmpl $0x10000, %ebx          # imm = 0x10000
jae 0x5cbb
addl $0x2, %ebp
jmp 0x5cd8
cmpl $0x100, %ebx            # imm = 0x100
jae 0x5cbb
incl %ebp
jmp 0x5cd8
movl 0x8(%r12), %esi
notl %esi
addl %r10d, %esi
orl $0x11000000, %esi       # imm = 0x11000000
jmp 0x5ed2
movl $0xc0000000, -0x4(%rax,%rsi,4) # imm = 0xC0000000
xorl %r11d, %r11d
movb $0x1, %bl
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
jmp 0x5ef3
cmpl $0xf, %ebx
ja 0x5d07
cmpl $0x4, %ebx
jne 0x5f18
movb (%r10), %r11b
andb $-0x20, %r11b
cmpb $0x40, %r11b
jne 0x5f18
movl 0x8(%r12), %esi
notl %esi
addl %r10d, %esi
orl $0x15000000, %esi       # imm = 0x15000000
jmp 0x5ed2
addq $0x2, %r15
incl %ebp
jmp 0x5dd6
movzbl 0x1(%r15), %esi
addq $0x2, %r15
shll $0x2, %esi
cmpq 0x18(%r12), %rsi
jae 0x5d47
addq 0x10(%r12), %rsi
movq %r15, %r10
jmp 0x5ea4
movl 0x8(%r12), %esi
notl %esi
addl %r15d, %esi
orl $0x13000000, %esi       # imm = 0x13000000
movl %esi, 0x4c(%r12)
movl $0x1, %r11d
xorl %ebx, %ebx
jmp 0x5dd8
movzbl (%r10), %esi
cmpl %esi, 0x48(%r12)
jle 0x5e69
leaq (%rsi,%rsi,4), %rsi
leaq (%rcx,%rsi,8), %rsi
movq %rsi, 0x38(%r12)
xorl %ebx, %ebx
movl $0x25, %r11d
jmp 0x5ef3
movzbl 0x1(%r15), %esi
addq $0x2, %r15
addl %esi, %ebp
movslq %r13d, %rsi
incl %r13d
movl %ebp, (%rax,%rsi,4)
jmp 0x5dd6
movl (%rsp), %ebx
cmpq $0x28, %rbx
ja 0x5e7b
movq %rbx, %rsi
addq 0x10(%rsp), %rsi
addl $0x8, %ebx
movl %ebx, (%rsp)
jmp 0x5e89
movzbl -0x1(%r15), %r9d
jmp 0x5ef1
addq $0x3, %r15
addl $0x4, %ebp
movb $0x1, %bl
movq %r15, %r10
jmp 0x5ef3
movl -0x3d8(%rsi), %ebx
addq $-0x3d8, %rsi           # imm = 0xFC28
testl %ebx, %ebx
cmovlel %r8d, %ebx
movq %r15, %r10
jmp 0x5e2b
movq 0x8(%rsp), %rsi
leaq 0x8(%rsi), %rbx
movq %rbx, 0x8(%rsp)
movq 0x20(%r12), %rbx
movslq (%rsi), %rsi
leaq (%rbx,%rsi,4), %rsi
movq %rsi, %rbx
subq 0x20(%r12), %rbx
cmpq 0x28(%r12), %rbx
jae 0x5ec2
movl (%rsi), %ebx
testl %ebx, %ebx
js 0x5e37
movslq %r13d, %r15
movl %ebx, (%rax,%r15,4)
movl %r13d, (%rsi)
jmp 0x5e3f
negl %ebx
movslq %r13d, %rsi
movl %ebx, (%rax,%rsi,4)
leal 0x1(%r13), %esi
andb $-0x2, %r14b
cmpb $-0xc, %r14b
jne 0x5e5c
addl $0x4, %ebp
addl $0x2, %r13d
movslq %esi, %rsi
jmp 0x5eee
addl $0x8, %ebp
movb $0x1, %bl
movl %esi, %r13d
jmp 0x5ef3
movl 0x8(%r12), %esi
notl %esi
addl %r10d, %esi
orl $0x12000000, %esi       # imm = 0x12000000
jmp 0x5ed2
movq 0x8(%rsp), %rsi
leaq 0x8(%rsi), %rbx
movq %rbx, 0x8(%rsp)
movq 0x20(%r12), %rbx
movslq (%rsi), %rsi
leaq (%rbx,%rsi,4), %rsi
movq %rsi, %rbx
subq 0x20(%r12), %rbx
cmpq 0x28(%r12), %rbx
jae 0x5ec2
movl (%rsi), %ebx
testl %ebx, %ebx
jle 0x5ee1
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 0x5ea6
movl 0x8(%r12), %esi
notl %esi
addl %r10d, %esi
orl $0x14000000, %esi       # imm = 0x14000000
movl %esi, 0x4c(%r12)
movl $0x1, %r11d
xorl %ebx, %ebx
jmp 0x5ef3
movl %r13d, %ebx
negl %ebx
movl %ebx, (%rsi)
movslq %r13d, %rsi
incl %r13d
movl %ebp, (%rax,%rsi,4)
movb $0x1, %bl
movq %r10, %r15
testb %bl, %bl
je 0x5f00
xorl %r11d, %r11d
movq %r10, %r15
testl %r11d, %r11d
je 0x5b58
cmpl $0x6, %r11d
je 0x5b58
jmp 0x5fa9
movzbl (%r10), %r10d
cmpl $0x3f, %r10d
ja 0x5f2b
cmpb $-0x17, 0x2(%r15)
cmovel %ebx, %r9d
cmpb $0x20, %r10b
setb %r11b
movl %ebx, %r14d
andl $0x7, %r14d
cmpl $0x4, %r14d
sete %r14b
andb %r11b, %r14b
movzbl %r14b, %r11d
addl %r11d, %ebp
addq $0x2, %r15
shrl $0x3, %r10d
andl $0x3, %r10d
movl $0x6, %r11d
leaq 0x6107(%rip), %r8       # 0xc06c
movslq (%r8,%r10,4), %r14
addq %r8, %r14
movl %ebx, %r10d
jmpq *%r14
xorl %ebx, %ebx
movq %r15, %r10
xorl %r8d, %r8d
jmp 0x5ef3
movl -0x8(%rax,%rsi,4), %r10d
orl %ebx, %r10d
orl -0x4(%rax,%rsi,4), %r10d
cmpl $0x7, %r10d
movl $0x0, %r8d
jg 0x5d62
orl $0x10, %ebx
movl %ebx, (%rax,%rsi,4)
decl %ebp
jmp 0x5d62
cmpl $0x25, %r11d
jne 0x5fbc
movq 0x18(%rsp), %r8
movl %r13d, 0x18(%r8)
movl %ebp, 0x20(%r8)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x51b0