import struct


def decode_bip32_path(path: bytes) -> str:
    """Decode a BIP-32/44 path from bytes"""
    parts = []

    for i in range(0, len(path) // 4):
        idx = i * 4
        chunk = path[idx : idx + 4]
        result = struct.unpack(">I", chunk)

        if result[0] < 256:
            # "public" BIP-44 derivation
            parts.append(f"{result[0]}")
        else:
            # "private" BIP-44 derivation
            part = result[0] - (0x80000000 & result[0])
            parts.append(f"{part}'")

    return "/".join(parts)