let top_addresses_of_locals fundec =
    let entry_point = Globals.entry_point () in
    if snd entry_point (* lib *) ||
      current_kf() != fst entry_point (* not entry point *)
    then
      let offsetmap_top_addresses_of_locals =
        offsetmap_top_addresses_of_locals
          (Cilutil.swap Base.is_formal_or_local fundec)
      in
      let state_top_addresses_of_locals =
        state_top_addresses_of_locals ~is_block:false
          offsetmap_top_addresses_of_locals fundec
      in
      offsetmap_top_addresses_of_locals, state_top_addresses_of_locals
    else (fun x -> Location_Bytes.Top_Param.bottom, x),(fun x -> x)