void release_all_ia(int param_1)

{
  undefined4 *puVar1;
  int iVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  undefined *puVar5;
  int *piVar6;
  int *piVar7;
  int *piVar8;
  undefined4 local_38;
  int local_34;
  int local_30;
  
  piVar8 = *(int **)(param_1 + 0x50);
  do {
    if (piVar8 == (int *)0x0) {
      return;
    }
    if ((int *)piVar8[4] != (int *)0x0) {
      piVar6 = (int *)piVar8[4];
      do {
        while( true ) {
          piVar7 = (int *)*piVar6;
          iVar2 = *(int *)(piVar6[2] + 8);
          if (iVar2 == 0) {
            puVar5 = &DAT_00429fec;
          }
          else if (iVar2 == 1) {
            puVar5 = &DAT_00429fe8;
          }
          else {
            puVar5 = &DAT_00427600;
          }
          dprintf(7,"release_ia","release an IA: %s-%lu",puVar5,*(undefined4 *)(piVar6[2] + 0xc));
          puVar1 = (undefined4 *)dhcp6_create_event(piVar6[8],6);
          if (puVar1 != (undefined4 *)0x0) break;
          dprintf(5,"release_ia","failed to create a new event");
LAB_00415278:
          FUN_00414f50(piVar6);
          piVar6 = piVar7;
          if (piVar7 == (int *)0x0) goto LAB_004153d8;
        }
        iVar2 = piVar6[8];
        puVar1[1] = *(undefined4 *)(iVar2 + 0xc);
        puVar4 = *(undefined4 **)(iVar2 + 0xc);
        *puVar1 = 0;
        *(undefined4 **)(iVar2 + 0xc) = puVar1;
        *puVar4 = puVar1;
        iVar2 = dhcp6_add_timer(client6_timo,puVar1);
        puVar1[3] = iVar2;
        if (iVar2 == 0) {
          dprintf(5,"release_ia","failed to create a new event timer");
LAB_00415268:
          dhcp6_remove_event(puVar1);
          goto LAB_00415278;
        }
        iVar2 = duidcpy(puVar1 + 4,piVar6 + 9);
        if (iVar2 != 0) {
          dprintf(5,"release_ia","failed to copy server ID");
          goto LAB_00415268;
        }
        puVar4 = (undefined4 *)malloc(0x1c)   //possible issue identified - semgrep
        if (puVar4 == (undefined4 *)0x0) {
          dprintf(5,"release_ia","failed to create a new event data");
          goto LAB_00415268;
        }
        *puVar4 = 0;
        puVar4[1] = 0;
        puVar4[2] = 0;
        puVar4[3] = 0;
        puVar4[4] = 0;
        puVar4[5] = 0;
        puVar4[6] = 0;
        iVar2 = piVar6[0xb];
        local_38 = *(undefined4 *)(piVar6[2] + 0xc);
        local_34 = piVar6[3];
        local_30 = piVar6[4];
        if (((iVar2 != 0) && (*(code **)(iVar2 + 0x18) != (code *)0x0)) &&
           (iVar2 = (**(code **)(iVar2 + 0x18))(iVar2,&local_38,0,puVar4), iVar2 != 0)) {
          dprintf(5,"release_ia","failed to make release data");
          goto LAB_00415268;
        }
        puVar4[1] = puVar1[0x14];
        puVar3 = (undefined4 *)puVar1[0x14];
        *puVar4 = 0;
        *puVar3 = puVar4;
        puVar1[0x14] = puVar4;
        puVar1[0xd] = 0;
        dhcp6_set_timeoparam(puVar1);
        dhcp6_reset_timer(puVar1);
        if (piVar6[0xc] != 0) {
          iVar2 = copy_authparam();
          puVar1[0x12] = iVar2;
          if (iVar2 == 0) {
            dprintf(4,"release_ia","failed to copy authparam");
            goto LAB_00415268;
          }
        }
        client6_send(puVar1);
        FUN_00414f50(piVar6);
        piVar6 = piVar7;
      } while (piVar7 != (int *)0x0);
    }
LAB_004153d8:
    piVar8 = (int *)*piVar8;
  } while( true );
}