idx_uc_link = (argc > 6 ? argc : 0) + 1;
idx_uc_link = (argc > 6 ? argc - 6 : 0) + 1;
__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...){  extern void __start_context (void);  unsigned long *sp, idx_uc_link;  va_list ap;  int i;  /* Generate room on stack for parameter if needed and uc_link.  */  sp = (long *) ((long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);  sp -= (argc > 6 ? argc : 0) + 1;  /* Align stack and make space for trampoline address.  */  sp = (long *) ((((long) sp) & -16L) - 8);  idx_uc_link = (argc > 6 ? argc : 0) + 1;  /* Setup context ucp.  */  /* Address to jump to.  */  ucp->uc_mcontext.gregs[REG_RIP] = (long) func;  /* Setup rbx.*/  ucp->uc_mcontext.gregs[REG_RBX] = (long) &sp[idx_uc_link];  ucp->uc_mcontext.gregs[REG_RSP] = (long) sp;  /* Setup stack.  */  sp[0] = (long) &__start_context;  sp[idx_uc_link] = (long) ucp->uc_link;  va_start (ap, argc);  /* Handle arguments.  */  for (i = 0; i < argc; ++i)    switch (i)      {      case 0:	ucp->uc_mcontext.gregs [REG_RDI] = va_arg (ap, int);	break;      case 1:	ucp->uc_mcontext.gregs [REG_RSI] = va_arg (ap, int);	break;      case 2:	ucp->uc_mcontext.gregs [REG_RDX] = va_arg (ap, int);	break;      case 3:	ucp->uc_mcontext.gregs [REG_RCX] = va_arg (ap, int);	break;      case 4:	ucp->uc_mcontext.gregs [REG_R8] = va_arg (ap, int);	break;      case 5:	ucp->uc_mcontext.gregs [REG_R9] = va_arg (ap, int);	break;      default:	/* Put value on stack.  */	sp[8 + (i - 5)] = va_arg (ap, int);	break;      }  va_end (ap);}