The dealer throws two dice in the square wall and sums up the total.
Counting anti-clockwise so that the dealer's wall is 1 , 5 or 9 while south is  2, 6 or 10 and west is 3, 7 or 11.
All other numbers represent the fourth wall (technically the North wall).
This determines which side of the wall the tiles will be dealt from.

Using the same total on the dice dealer counts each stack of tiles on that wall from right to left.
Starting from the left of the stacks counted, the dealer draws four tiles for himself (two stacks of two tiles) and players in anti-clockwise order draw blocks of four tiles until all players have 12 tiles, so that the stacks decrease clockwise.
Each player then draws one last tile to make a 13-tile hand.

Dealing may be done more informally (without using dice and the dealer randomly breaking the wall wherever they choose).
Players may also more informally put the wall into a triangle for easier three player usage.
In some table rules the dealer deals out all of the tiles.
The dealer throws two dice in the square wall and sums up the total. Counting anti-clockwise so that the dealer's wall is 1 , 5 or 9 while south is  2, 6 or 10 and west is 3, 7 or 11. All other numbers represent the fourth wall (technically the North wall). This determines which side of the wall the tiles will be dealt from. 
Using the same total on the dice dealer counts each stack of tiles on that wall from right to left. Starting from the left of the stacks counted, the dealer draws four tiles for himself (two stacks of two tiles) and players in anti-clockwise order draw blocks of four tiles until all players have 12 tiles, so that the stacks decrease clockwise. Each player then draws one last tile to make a 13-tile hand.
Dealing may be done more informally (without using dice and the dealer randomly breaking the wall wherever they choose). Players may also more informally put the wall into a triangle for easier three player usage. In some table rules the dealer deals out all of the tiles.
Three player mahjong