Here's what I've discovered about Mystery Gifts in Pokemon Stadium 2.
Similarities with GameBoy Color Infra-Red Mystery Gifts
The logic is the mostly the same between Pokemon Stadium 2 and Mystery Gift between GameBoy Color using infra-red system.
The game chooses a random item and decoration separately. The game first tries to give the decoration but you already have that decoration, you will get the item instead.
Choosing a specific item or decoration gift to send occurs in two stages. First, the game selects a set from which the gift will come. Then, it uses a part of the player's Trainer ID number to determine which gift from that set to send. (Below, bit 0 refers to the least significant bit of the Trainer ID and bit 15 refers to the most significant bit. Given the Trainer ID 32768, which translates to 1000000000000000 in binary, bit 15 is 1 and bit 0 is 0.)
The logic for determining the item given is the same as the logic for Mystery Gift between GameBoy Color using infra-red system.
See https://bulbapedia.bulbagarden.net/wiki/Mystery_Gift for more info.
The logic for determining decoration is different however.
Gift set .
N/A (pick a 2nd number)
N/A (pick a 3rd number)
N/A (pick a 4th number)
Tentacool Doll or Pikachu Bed
Common, Uncommon, Rare and Very Rare follows a similar logic as GameBoy Color Infra-Red Mystery Gifts (using Trainer ID). The exact bit used for each item and decoration is slightly different. Check https://bulbapedia.bulbagarden.net/wiki/Mystery_Gift for the detailed list.
Upon reaching the 4th roll with 0-76, Tentacool Doll is given if Round 2 has not been unlocked and Pikachu Bed is given if Round 2 has been unlocked.
No code exists to return Unown Doll (internal decoration ID 35).
Why Tentacool Doll and Pikachu Bed are unobtainable
You may have noticed that Overall rate for Tentacool Doll and Pikachu Bed is 0/256. Here's why:
To obtain Tentacool Doll, the game must roll 0-35, 0-71, 0-71, 0-153 (assuming Round 2 hasn't been unlocked).
To obtain Pikachu Bed, the game must roll 0-35, 0-71, 0-71, 0-76 (assuming Round 2 has been unlocked).
Those sequences of numbers are not possible.
The game uses a 32-bit linear congruential generator: result = (seed * 0x19660D) + 0x3C6EF35F;
Mystery Gift logic only uses the last 8 bits of the generated random number.
The last 8 bits of the generator follows a cyclic pattern:
The first random number is selected randomly in that list, then at every new roll, the next random number is the next one in the list.
The issue is that there are no 4 consecutive numbers that are 0-35, 0-71, 0-71, 0-153 respectively.
This means Tentacool Doll (and Pikachu Bed) can't be obtained.
The sequence to obtain a Very Rare decoration (0-35, 0-71, 0-71, 154-255) appears once (15,34,25,164).
In short, none of the Pokemon Stadium 2 exclusive decorations are actually obtainable.
Special thanks to Lincoln for providing the initial disassembly of Mystery Gift functions of Pokemon Stadium 2.