code: func (m *symbol) penalty3() int {
  	penalty := 0
  
  	for y := 0; y < m.symbolSize; y++ {
  		var bitBuffer int16 = 0x00
  
  		for x := 0; x < m.symbolSize; x++ {
  			bitBuffer <<= 1
  			if v := m.get(x, y); v {
  				bitBuffer |= 1
  			}
  
  			switch bitBuffer & 0x7ff {
  			// 0b000 0101 1101 or 0b10111010000
  			// 0x05d           or 0x5d0
  			case 0x05d, 0x5d0:
  				penalty += penaltyWeight3
  				bitBuffer = 0xFF
  			default:
  				if x == m.symbolSize-1 && (bitBuffer&0x7f) == 0x5d {
  					penalty += penaltyWeight3
  					bitBuffer = 0xFF
  				}
  			}
  		}
  	}
  
  	for x := 0; x < m.symbolSize; x++ {
  		var bitBuffer int16 = 0x00
  
  		for y := 0; y < m.symbolSize; y++ {
  			bitBuffer <<= 1
  			if v := m.get(x, y); v {
  				bitBuffer |= 1
  			}
  
  			switch bitBuffer & 0x7ff {
  			// 0b000 0101 1101 or 0b10111010000
  			// 0x05d           or 0x5d0
  			case 0x05d, 0x5d0:
  				penalty += penaltyWeight3
  				bitBuffer = 0xFF
  			default:
  				if y == m.symbolSize-1 && (bitBuffer&0x7f) == 0x5d {
  					penalty += penaltyWeight3
  					bitBuffer = 0xFF
  				}
  			}
  		}
  	}
  
  	return penalty
  }
docs: // penalty3 returns the penalty score for "1:1:3:1:1 ratio
  // (dark:light:dark:light:dark) pattern in row/column, preceded or followed by
  // light area 4 modules wide".
  //
  // Existence of the pattern scores penaltyWeight3.