lookupswitch :: BranchMap -> Maybe Instr -> Instr
lookupswitch = switches OP.lookupswitch header
  where header ~(_:_:labels) branchMap relOffsetToLabel = do
          writeI32 (IntMap.size branchMap)
          let keys = map fst $ toInt32AscList branchMap
          forM_ (zip keys labels) $ \(int, l) -> do
            writeI32 int
            relOffsetToLabel l >>= writeI32
lookupswitch :: BranchMap -> Maybe Instr -> Instr
lookupswitch = switches OP.lookupswitch header
  where header ~(_:_:labels) branchMap relOffsetToLabel = do
          writeI32 (IntMap.size branchMap)
          let keys = map fst $ toInt32AscList branchMap
          forM_ (zip keys labels) $ \(int, l) -> do
            writeI32 int
            relOffsetToLabel l >>= writeI32
lookupswitch = switches OP.lookupswitch header
  where header ~(_:_:labels) branchMap relOffsetToLabel = do
          writeI32 (IntMap.size branchMap)
          let keys = map fst $ toInt32AscList branchMap
          forM_ (zip keys labels) $ \(int, l) -> do
            writeI32 int
            relOffsetToLabel l >>= writeI32