transactions – How to disassemble a bitcoin script?

bitcoind has a decoding method.

$ bitcoin-cli decodescript "512102974ffd58d960908d6f2930fbcc4aa288580d0f5a
{
"Asm": "OPRECMULTISIG",
"reqSigs": 1,
"type": "multisig",
"Address": [
    "1CmMoanE9uahYETLahBTGZSFZSQGV8ADrR",
    "12z2brRNYFkqJe3zP58uoiGcLqDxfk6J7r"
  ],
"p2sh": "34EJTjAmEPbPGXAPQWU7sn4beoZyGTTxBw",
"segwit": {
"asm": "a45407120f912ef91ecd7e66a27cb4dc106f962172470b1b39c1bb5008898277",
"hex": "0020a45407120f912ef91ecd7e66a27cb4dc106f962172470b1b39c1bb5008898277",
"reqSigs": 1,
"type": "witness_v0_scripthash",
"Address": [
      "bc1q532qwys0jyh0j8kd0en2yl95msgxl93pwfrskxeecxa4qzyfsfmsfgd3m5"
    ],
"p2sh-segwit": "32KAK2XxwcYPc5iu3tNoXv3ksu4Gf3NsH3"
}
}