// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/ldo.c
// Function: luaD_poscall
int luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, int nres) {
  StkId res;
  int wanted = ci->nresults;
  if (L->hookmask & (LUA_MASKRET | LUA_MASKLINE)) {
    if (L->hookmask & LUA_MASKRET) {
      ptrdiff_t fr = savestack(L, firstResult);  /* hook may change stack */
      luaD_hook(L, LUA_HOOKRET, -1);
      firstResult = restorestack(L, fr);
    }
    L->oldpc = ci->previous->u.l.savedpc;  /* 'oldpc' for caller function */
  }
  res = ci->func;  /* res == final position of 1st result */
  L->ci = ci->previous;  /* back to caller */
  /* move results to proper place */
  return moveresults(L, firstResult, res, nres, wanted);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movswl 0x40(%rsi), %r12d
movl 0xc8(%rdi), %eax
testb $0x6, %al
je 0x8e53
testb $0x2, %al
je 0x8e45
subq 0x38(%rbx), %r14
movq %rbx, %rdi
movl $0x1, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x89ed
addq 0x38(%rbx), %r14
movq 0x10(%r15), %rax
movq 0x28(%rax), %rcx
movq %rcx, 0x28(%rbx)
jmp 0x8e57
movq 0x10(%r15), %rax
movq (%r15), %rcx
movq %rax, 0x20(%rbx)
movzwl %r12w, %edx
movl $0x1, %eax
testw %dx, %dx
je 0x8ec9
cmpl $0x1, %edx
je 0x8ea4
cmpl $0xffff, %edx           # imm = 0xFFFF
jne 0x8ed0
testl %ebp, %ebp
jle 0x8f23
movl %ebp, %edx
shlq $0x4, %rdx
xorl %eax, %eax
xorl %esi, %esi
movdqu (%r14,%rsi), %xmm0
movdqu %xmm0, (%rcx,%rsi)
addq $0x10, %rsi
cmpq %rsi, %rdx
jne 0x8e8b
jmp 0x9045
testl %ebp, %ebp
leaq 0x197a3(%rip), %rax     # 0x22650
cmoveq %rax, %r14
movdqu (%r14), %xmm0
movdqu %xmm0, (%rcx)
movl $0x1, %ebp
movl $0x1, %eax
jmp 0x9045
movl %edx, %ebp
jmp 0x9045
cmpl %ebp, %r12d
jle 0x8ef7
testl %ebp, %ebp
jle 0x8f2a
movl %ebp, %edx
shlq $0x4, %rdx
xorl %esi, %esi
movdqu (%r14,%rsi), %xmm0
movdqu %xmm0, (%rcx,%rsi)
addq $0x10, %rsi
cmpq %rsi, %rdx
jne 0x8ee1
jmp 0x8f2c
testw %r12w, %r12w
jle 0x9042
movl %r12d, %edx
shlq $0x4, %rdx
xorl %esi, %esi
movdqu (%r14,%rsi), %xmm0
movdqu %xmm0, (%rcx,%rsi)
addq $0x10, %rsi
cmpq %rsi, %rdx
jne 0x8f0a
jmp 0x9042
xorl %eax, %eax
jmp 0x9045
xorl %ebp, %ebp
cmpl %r12d, %ebp
jge 0x9042
movl %ebp, %esi
movl %r12d, %edi
subq %rsi, %rdi
leaq 0x3(%rdi), %rdx
andq $-0x4, %rdx
decq %rdi
movq %rdi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shlq $0x4, %rsi
addq %rcx, %rsi
addq $0x38, %rsi
xorl %edi, %edi
movdqa 0x19179(%rip), %xmm1    # 0x220e0
movdqa 0x19181(%rip), %xmm2    # 0x220f0
movdqa 0x19189(%rip), %xmm3    # 0x22100
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rdi, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %r8d
notl %r8d
testb $0x1, %r8b
je 0x8fcb
movl $0x0, -0x30(%rsi)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %r8d
testb $0x1, %r8b
je 0x8fe2
movl $0x0, -0x20(%rsi)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %r8d
testb $0x1, %r8b
je 0x901f
movl $0x0, -0x10(%rsi)
pextrw $0x4, %xmm5, %r8d
testb $0x1, %r8b
je 0x9031
movl $0x0, (%rsi)
addq $0x4, %rdi
addq $0x40, %rsi
cmpq %rdi, %rdx
jne 0x8f7f
movl %r12d, %ebp
movslq %ebp, %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq %rcx, 0x10(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq