def ArchToBits(arch):
  """Takes an arch string like x64 and ia32 and returns its bitwidth."""
  if not arch:  # Default to x64.
    return 64
  elif arch == 'x64':
    return 64
  elif arch == 'ia32':
    return 32
  assert False, 'Unsupported architecture'