import assert from'node:assert/strict'; export function inspectPsciConduit(b){assert.equal(b.readUInt32BE(0),0xd00dfeed);assert.equal(b.readUInt32BE(4),b.length);const strings=b.subarray(b.readUInt32BE(12),b.readUInt32BE(12)+b.readUInt32BE(32));let p=b.readUInt32BE(8),end=p+b.readUInt32BE(36),depth=0,seen=false,selected=false,compatible=false,method=null;const text=(b,p=0)=>{const n=b.indexOf(0,p);assert.ok(n>=p);return b.subarray(p,n).toString();};while(p['arm,psci-0.2','arm,psci-1.0'].includes(v));}else if(name==='method'){assert.ok(['hvc\0','smc\0'].includes(value.toString()));method=value.toString()==='hvc\0'?1:2;}else if(name==='status')assert.ok(['okay\0','ok\0'].includes(value.toString()));}}else if(token===4){}else{assert.equal(token,9);assert.equal(depth,0);assert.equal(p,end);break;}}assert.ok(seen&&compatible&&method);return method;}