void FUN_00414f50(int *param_1)

{
  int iVar1;
  int *piVar2;
  void *__ptr;
  undefined *puVar3;
  int iVar4;
  int iVar5;
  code *pcVar6;
  
  iVar4 = param_1[2];
  iVar5 = param_1[8];
  if (*(int *)(iVar4 + 8) == 0) {
    puVar3 = &DAT_00429fec;
  }
  else if (*(int *)(iVar4 + 8) == 1) {
    puVar3 = &DAT_00429fe8;
  }
  else {
    puVar3 = &DAT_00427600;
  }
  dprintf(7,"remove_ia","remove an IA: %s-%lu",puVar3,*(undefined4 *)(iVar4 + 0xc));
  iVar1 = *param_1;
  if (iVar1 == 0) {
    *(int *)(iVar4 + 0x14) = param_1[1];
  }
  else {
    *(int *)(iVar1 + 4) = param_1[1];
  }
  *(int *)param_1[1] = iVar1;
  duidfree(param_1 + 9);
  if (param_1[6] != 0) {
    dhcp6_remove_timer(param_1 + 6);
  }
  piVar2 = (int *)param_1[7];
  if (piVar2 != (int *)0x0) {
    if (*piVar2 == 0) {
      *(int *)(piVar2[2] + 0x50) = piVar2[1];
    }
    else {
      *(int *)(*piVar2 + 4) = piVar2[1];
    }
    *(int *)piVar2[1] = *piVar2;
    __ptr = (void *)param_1[7];
    if (*(code **)((int)__ptr + 0x14) != (code *)0x0) {
      (**(code **)((int)__ptr + 0x14))();
      __ptr = (void *)param_1[7];
    }
    free(__ptr);
    param_1[7] = 0;
  }
  if ((param_1[0xb] != 0) && (pcVar6 = *(code **)(param_1[0xb] + 0x20), pcVar6 != (code *)0x0)) {
    (*pcVar6)();
  }
  if ((void *)param_1[0xc] != (void *)0x0) {
    free((void *)param_1[0xc]);
  }
  free(param_1);
                    /* WARNING: Could not recover jumptable at 0x00415104. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  client6_start(iVar5);
  return;
}