diff --git a/codegen/common.ts b/codegen/common.ts index e50db8a4..99d20ed1 100644 --- a/codegen/common.ts +++ b/codegen/common.ts @@ -39,7 +39,7 @@ export enum ReturnType { Ebool, } -export const SUPPORTED_BITS: number[] = [8, 16, 32, 64]; +export const SUPPORTED_BITS: number[] = [4, 8, 16, 32, 64]; export const ALL_OPERATORS: Operator[] = [ { diff --git a/codegen/generateOverloads.ts b/codegen/generateOverloads.ts new file mode 100644 index 00000000..c5c7af95 --- /dev/null +++ b/codegen/generateOverloads.ts @@ -0,0 +1,286 @@ +type Test = { + inputs: bigint[]; + output: number | boolean | bigint; +}; + +type SupportedFunctions = { + [key: string]: SupportedFunction; +}; + +type SupportedFunctionParams = { + supportedBits: number[]; + safeMin?: boolean; + noScalar?: boolean; + lhsHigher?: boolean; + scalarOnly?: boolean; + limit?: 'bits'; +}; + +type SupportedFunction = SupportedFunctionParams & + ( + | { + unary?: false; + evalTest: (lhsNumber: bigint, rhsNumber: bigint, lhs: number, rhs: number) => number | boolean | bigint; + } + | { + unary: true; + evalTest: (lhs: bigint, bits: number) => number | boolean | bigint; + } + ); + +(BigInt as any).prototype['toJSON'] = function () { + return this.toString(); +}; + +const SUPPORTED_UINT = [8, 16, 32, 64, 128, 256]; +const SUPPORTED_BITS = [4, 8, 16, 32, 64]; + +const bigIntMin = (...args: bigint[]) => { + return args.reduce((min, e) => (e < min ? e : min), args[0]); +}; + +const bigIntMax = (...args: bigint[]) => { + return args.reduce((max, e) => (e > max ? e : max), args[0]); +}; + +const generateNumber = (bits: number) => { + const power = BigInt(Math.pow(2, bits) - 1); + const maxRange = bigIntMin(power, BigInt(Number.MAX_SAFE_INTEGER)); + const substract = bigIntMax(BigInt(Math.floor(Math.random() * Number(maxRange))), 1n); + console.log(bits, power, substract); + return bigIntMax(power - substract, 1n); +}; + +const safeEval = ( + fn: (lhsNumber: bigint, rhsNumber: bigint, lhs: number, rhs: number) => number | boolean | bigint, + lhsNumber: bigint, + rhsNumber: bigint, + lhs: number, + rhs: number, + safeMin: boolean = false, +) => { + const bitResults = safeMin ? Math.min(lhs, rhs) : Math.max(lhs, rhs); + let result = fn(lhsNumber, rhsNumber, lhs, rhs); + const logs: any[] = []; + if (typeof result === 'number' || typeof result === 'bigint') { + while ((result as number | bigint) > Math.pow(2, bitResults) - 1) { + lhsNumber = lhsNumber / 2n + 1n; + rhsNumber = rhsNumber / 2n + 1n; + result = fn(lhsNumber, rhsNumber, lhs, rhs); + logs.push([lhs, rhs, lhsNumber, rhsNumber, result]); + } + } + return { inputs: [lhsNumber, rhsNumber], output: result }; +}; + +export const SUPPORTED_FUNCTIONS: SupportedFunctions = { + add: { + supportedBits: SUPPORTED_BITS, + safeMin: true, + evalTest: (lhsNumber, rhsNumber) => BigInt(lhsNumber) + BigInt(rhsNumber), + }, + sub: { + supportedBits: SUPPORTED_BITS, + lhsHigher: true, + evalTest: (lhsNumber, rhsNumber) => lhsNumber - rhsNumber, + }, + mul: { + supportedBits: SUPPORTED_BITS, + safeMin: true, + evalTest: (lhsNumber, rhsNumber) => BigInt(lhsNumber) * BigInt(rhsNumber), + }, + div: { + supportedBits: SUPPORTED_BITS, + evalTest: (lhsNumber, rhsNumber) => lhsNumber / rhsNumber, + scalarOnly: true, + }, + rem: { + supportedBits: SUPPORTED_BITS, + evalTest: (lhsNumber, rhsNumber) => lhsNumber % rhsNumber, + scalarOnly: true, + }, + le: { + supportedBits: SUPPORTED_BITS, + evalTest: (lhsNumber, rhsNumber) => lhsNumber <= rhsNumber, + }, + lt: { + supportedBits: SUPPORTED_BITS, + evalTest: (lhsNumber, rhsNumber) => lhsNumber < rhsNumber, + }, + ge: { + supportedBits: SUPPORTED_BITS, + evalTest: (lhsNumber, rhsNumber) => lhsNumber >= rhsNumber, + }, + gt: { + supportedBits: SUPPORTED_BITS, + evalTest: (lhsNumber, rhsNumber) => lhsNumber > rhsNumber, + }, + eq: { + supportedBits: SUPPORTED_BITS, + evalTest: (lhsNumber, rhsNumber) => lhsNumber === rhsNumber, + }, + ne: { + supportedBits: SUPPORTED_BITS, + evalTest: (lhsNumber, rhsNumber) => lhsNumber !== rhsNumber, + }, + shl: { + supportedBits: SUPPORTED_BITS, + limit: 'bits', + evalTest: (lhsNumber, rhsNumber, lhs, rhs) => { + const bits = `${new Array(256).fill('0').join('')}${lhsNumber.toString(2)}`.slice(-lhs).split(''); + const r = bits.map((_, index) => { + const newIndex = Number(BigInt(index) + (rhsNumber % BigInt(lhs))); + return newIndex >= bits.length ? '0' : bits[newIndex]; + }); + return parseInt(r.join(''), 2); + }, + }, + shr: { + supportedBits: SUPPORTED_BITS, + limit: 'bits', + evalTest: (lhsNumber, rhsNumber, lhs, rhs) => { + const bits = `${new Array(256).fill('0').join('')}${lhsNumber.toString(2)}`.slice(-lhs).split(''); + const r = bits.map((_, index) => { + const newIndex = Number(BigInt(index) - (rhsNumber % BigInt(lhs))); + return newIndex < 0 ? '0' : bits[newIndex]; + }); + return parseInt(r.join(''), 2); + }, + }, + max: { + supportedBits: SUPPORTED_BITS, + unary: false, + evalTest: (lhsNumber, rhsNumber) => (lhsNumber > rhsNumber ? lhsNumber : rhsNumber), + }, + min: { + supportedBits: SUPPORTED_BITS, + evalTest: (lhsNumber, rhsNumber) => (lhsNumber < rhsNumber ? lhsNumber : rhsNumber), + }, + or: { + supportedBits: SUPPORTED_BITS, + noScalar: true, + evalTest: (lhsNumber, rhsNumber) => lhsNumber | rhsNumber, + }, + and: { + supportedBits: SUPPORTED_BITS, + noScalar: true, + evalTest: (lhsNumber, rhsNumber) => lhsNumber & rhsNumber, + }, + xor: { + supportedBits: SUPPORTED_BITS, + noScalar: true, + evalTest: (lhsNumber, rhsNumber) => lhsNumber ^ rhsNumber, + }, + not: { + supportedBits: SUPPORTED_BITS, + unary: true, + evalTest: (lhsNumber, bits) => { + const val = `${new Array(256).fill('0').join('')}${lhsNumber.toString(2)}`.slice(-bits).split(''); + return BigInt( + `0b${val + .map((v) => { + if (v === '1') return '0'; + return '1'; + }) + .join('')}`, + ); + }, + }, + neg: { + supportedBits: SUPPORTED_BITS, + unary: true, + evalTest: (lhsNumber, bits) => { + const val = `${new Array(256).fill('0').join('')}${lhsNumber.toString(2)}`.slice(-bits).split(''); + return ( + BigInt( + `0b${val + .map((v) => { + if (v === '1') return '0'; + return '1'; + }) + .join('')}`, + ) + 1n + ); + }, + }, +}; + +export const generateTests = () => { + const tests: any = {}; + Object.keys(SUPPORTED_FUNCTIONS).forEach((functionName: string) => { + const test = SUPPORTED_FUNCTIONS[functionName]; + test.supportedBits.forEach((lhs: number) => { + if (test.unary) { + let lhsNumber = generateNumber(lhs); + const encryptedTestName = [functionName, `euint${lhs}`].join('_'); + const encryptedTests: Test[] = []; + encryptedTests.push({ + inputs: [lhsNumber], + output: test.evalTest(lhsNumber, lhs), + }); + tests[encryptedTestName] = encryptedTests; + } else { + test.supportedBits.forEach((rhs: number) => { + const bitResults = Math.min(lhs, rhs); + let lhsNumber = generateNumber(lhs); + let rhsNumber = generateNumber(rhs); + if (test.limit === 'bits') { + rhsNumber = BigInt(1 + Math.floor(Math.random() * (rhs - 1))); + } + const smallest = bigIntMax(bigIntMin(lhsNumber, rhsNumber), 8n); + const only8bits = test.limit === 'bits' && rhs === 8; + const onlyEncrypted8bits = only8bits && lhs > 4; + + if ((test.limit !== 'bits' || onlyEncrypted8bits) && !test.scalarOnly) { + const encryptedTestName = [functionName, `euint${lhs}`, `euint${rhs}`].join('_'); + const encryptedTests: Test[] = []; + if (!test.lhsHigher) { + encryptedTests.push(safeEval(test.evalTest, lhsNumber, rhsNumber, lhs, rhs, test.safeMin)); + encryptedTests.push(safeEval(test.evalTest, smallest - 4n, smallest, lhs, rhs, test.safeMin)); + } + encryptedTests.push(safeEval(test.evalTest, smallest, smallest, lhs, rhs, test.safeMin)); + encryptedTests.push(safeEval(test.evalTest, smallest, smallest - 4n, lhs, rhs, test.safeMin)); + tests[encryptedTestName] = encryptedTests; + } + + const scalarCondition = !test.noScalar && (lhs === rhs || (rhs == 8 && lhs == 4) || (rhs == 4 && lhs == 8)); + + if (SUPPORTED_UINT.includes(rhs) && (only8bits || (test.limit !== 'bits' && scalarCondition))) { + if (test.limit !== 'bits') { + rhsNumber = generateNumber(bitResults); + } + const encryptedTestName = [functionName, `euint${lhs}`, `uint${rhs}`].join('_'); + const encryptedTests: Test[] = []; + if (!test.lhsHigher) { + encryptedTests.push(safeEval(test.evalTest, lhsNumber, rhsNumber, lhs, rhs, test.safeMin)); + encryptedTests.push(safeEval(test.evalTest, smallest - 4n, smallest, lhs, rhs, test.safeMin)); + } + encryptedTests.push(safeEval(test.evalTest, smallest, smallest, lhs, rhs, test.safeMin)); + encryptedTests.push(safeEval(test.evalTest, smallest, smallest - 4n, lhs, rhs, test.safeMin)); + tests[encryptedTestName] = encryptedTests; + } + if (SUPPORTED_UINT.includes(lhs) && test.limit !== 'bits' && scalarCondition && !test.scalarOnly) { + lhsNumber = generateNumber(bitResults); + const encryptedTestName = [functionName, `uint${lhs}`, `euint${rhs}`].join('_'); + const encryptedTests: Test[] = []; + if (!test.lhsHigher) { + encryptedTests.push(safeEval(test.evalTest, lhsNumber, rhsNumber, lhs, rhs, test.safeMin)); + encryptedTests.push(safeEval(test.evalTest, smallest - 4n, smallest, lhs, rhs, test.safeMin)); + } + encryptedTests.push(safeEval(test.evalTest, smallest, smallest, lhs, rhs, test.safeMin)); + encryptedTests.push(safeEval(test.evalTest, smallest, smallest - 4n, lhs, rhs, test.safeMin)); + tests[encryptedTestName] = encryptedTests; + } + }); + } + }); + }); + return tests; +}; + +const tests = generateTests(); + +const fs = require('fs'); +const path = require('path'); + +fs.writeFileSync(`${path.resolve(__dirname)}/overloads.json`, JSON.stringify(tests)); diff --git a/codegen/overloadTests.ts b/codegen/overloadTests.ts index 43e2766a..41c15e56 100644 --- a/codegen/overloadTests.ts +++ b/codegen/overloadTests.ts @@ -1,1297 +1,29 @@ +import overloads from './overloads.json'; import { OverloadSignature, signatureContractMethodName } from './testgen'; +type OverloadTestJSON = { + inputs: (number | bigint | string)[]; + output: boolean | number | bigint | string; +}; + type OverloadTest = { - inputs: number[]; + inputs: (number | bigint)[]; output: boolean | number | bigint; }; -export const overloadTests: { [methodName: string]: OverloadTest[] } = { - // solidity operators 8 bit - bin_op_add_euint8_euint8: [{ inputs: [0x03, 0x04], output: 0x07 }], - bin_op_sub_euint8_euint8: [{ inputs: [0x04, 0x03], output: 0x01 }], - bin_op_mul_euint8_euint8: [{ inputs: [0x04, 0x03], output: 12 }], - bin_op_and_euint8_euint8: [{ inputs: [0xef, 0xf0], output: 0xe0 }], - bin_op_or_euint8_euint8: [{ inputs: [0xef, 0xf0], output: 0xff }], - bin_op_xor_euint8_euint8: [{ inputs: [0xef, 0xf0], output: 0x1f }], - unary_op_neg_euint8: [{ inputs: [0x02], output: 0xfe }], - unary_op_not_euint8: [{ inputs: [0x0f], output: 0xf0 }], - - // solidity operators 16 bit - bin_op_add_euint16_euint16: [{ inputs: [0x0103, 0x0204], output: 0x0307 }], - bin_op_sub_euint16_euint16: [{ inputs: [0x0204, 0x0103], output: 0x0101 }], - bin_op_mul_euint16_euint16: [{ inputs: [0x0104, 0x0003], output: 0x030c }], - bin_op_and_euint16_euint16: [{ inputs: [0xefef, 0xf0f0], output: 0xe0e0 }], - bin_op_or_euint16_euint16: [{ inputs: [0xefef, 0x01f0], output: 0xefff }], - bin_op_xor_euint16_euint16: [{ inputs: [0xefef, 0xf0f0], output: 0x1f1f }], - unary_op_neg_euint16: [{ inputs: [0x0003], output: 0xfffd }], - unary_op_not_euint16: [{ inputs: [0x0f0f], output: 0xf0f0 }], - - // solidity operators 32 bit - bin_op_add_euint32_euint32: [{ inputs: [0x00100103, 0x00400204], output: 0x00500307 }], - bin_op_sub_euint32_euint32: [{ inputs: [0x90000204, 0x50000103], output: 0x40000101 }], - bin_op_mul_euint32_euint32: [{ inputs: [0x02000104, 0x0003], output: 0x0600030c }], - bin_op_and_euint32_euint32: [{ inputs: [0xefefefef, 0xf0f0f0f0], output: 0xe0e0e0e0 }], - bin_op_or_euint32_euint32: [{ inputs: [0xefefefef, 0x01f001f0], output: 0xefffefff }], - bin_op_xor_euint32_euint32: [{ inputs: [0xefefefef, 0xf0f0f0f0], output: 0x1f1f1f1f }], - unary_op_neg_euint32: [{ inputs: [0x00000004], output: 0xfffffffc }], - unary_op_not_euint32: [{ inputs: [0x0f0f0f0f], output: 0xf0f0f0f0 }], +const transformBigInt = (o: { [methodName: string]: OverloadTestJSON[] }) => { + Object.keys(o).forEach((k) => { + o[k].forEach((test) => { + test.inputs.forEach((input, i) => { + if (typeof input === 'string') test.inputs[i] = BigInt(input); + }); + if (typeof test.output === 'string') test.output = BigInt(test.output); + }); + }); +}; - // solidity operators 64 bit - bin_op_add_euint64_euint64: [{ inputs: [0x0000000000100103, 0x0000000000400204], output: 0x00500307 }], - bin_op_sub_euint64_euint64: [{ inputs: [0x0000000090000204, 0x0000000050000103], output: 0x40000101 }], - bin_op_mul_euint64_euint64: [{ inputs: [0x0000000002000104, 0x000000000003], output: 0x0600030c }], - bin_op_and_euint64_euint64: [{ inputs: [0x00000000efefefef, 0x00000000f0f0f0f0], output: 0xe0e0e0e0 }], - bin_op_or_euint64_euint64: [{ inputs: [0x00000000efefefef, 0x0000000001f001f0], output: 0xefffefff }], - bin_op_xor_euint64_euint64: [{ inputs: [0x00000000efefefef, 0x00000000f0f0f0f0], output: 0x1f1f1f1f }], - unary_op_neg_euint64: [{ inputs: [0x0000000000000004], output: 18446744073709551612n }], - unary_op_not_euint64: [{ inputs: [0x000000000f0f0f0f], output: 18446744073456906480n }], +transformBigInt(overloads); - neg_euint8: [ - { inputs: [0x01], output: 0xff }, - { inputs: [0x02], output: 0xfe }, - ], - not_euint8: [{ inputs: [0x03], output: 0xfc }], - neg_euint16: [ - { inputs: [0x0001], output: 0xffff }, - { inputs: [0x0002], output: 0xfffe }, - ], - not_euint16: [{ inputs: [0x00f1], output: 0xff0e }], - neg_euint32: [ - { inputs: [0x00000001], output: 0xffffffff }, - { inputs: [0x00000002], output: 0xfffffffe }, - ], - not_euint32: [{ inputs: [0x0000fffe], output: 0xffff0001 }], - neg_euint64: [ - { inputs: [0x0000000000000001], output: 18446744073709551615n }, - { inputs: [0x0000000000000002], output: 18446744073709551614n }, - ], - not_euint64: [{ inputs: [0x000000000000fffe], output: 18446744073709486081n }], - add_euint8_euint8: [{ inputs: [3, 4], output: 7 }], - sub_euint8_euint8: [{ inputs: [4, 3], output: 1 }], - mul_euint8_euint8: [{ inputs: [3, 4], output: 12 }], - and_euint8_euint8: [{ inputs: [0xff, 0x0f], output: 0x0f }], - or_euint8_euint8: [{ inputs: [0x70, 0x0f], output: 0x7f }], - xor_euint8_euint8: [ - { inputs: [0x77, 0x77], output: 0x00 }, - { inputs: [12, 34], output: 46 }, - ], - shl_euint8_euint8: [ - { inputs: [2, 1], output: 4 }, - { inputs: [2, 4], output: 32 }, - ], - shr_euint8_euint8: [ - { inputs: [2, 1], output: 1 }, - { inputs: [32, 4], output: 2 }, - ], - eq_euint8_euint8: [ - { inputs: [12, 49], output: false }, - { inputs: [7, 7], output: true }, - ], - ne_euint8_euint8: [ - { inputs: [1, 2], output: true }, - { inputs: [2, 2], output: false }, - ], - ge_euint8_euint8: [ - { inputs: [10, 10], output: true }, - { inputs: [10, 9], output: true }, - { inputs: [10, 11], output: false }, - ], - gt_euint8_euint8: [ - { inputs: [10, 10], output: false }, - { inputs: [10, 9], output: true }, - { inputs: [10, 11], output: false }, - ], - le_euint8_euint8: [ - { inputs: [10, 10], output: true }, - { inputs: [10, 9], output: false }, - { inputs: [10, 11], output: true }, - ], - lt_euint8_euint8: [ - { inputs: [10, 10], output: false }, - { inputs: [10, 9], output: false }, - { inputs: [10, 11], output: true }, - ], - min_euint8_euint8: [ - { inputs: [10, 10], output: 10 }, - { inputs: [12, 10], output: 10 }, - { inputs: [9, 12], output: 9 }, - ], - max_euint8_euint8: [ - { inputs: [10, 10], output: 10 }, - { inputs: [12, 10], output: 12 }, - { inputs: [9, 12], output: 12 }, - ], - add_euint8_euint16: [{ inputs: [0x03, 0xff00], output: 0xff03 }], - sub_euint8_euint16: [{ inputs: [0x03, 0x1000], output: 0xf003 }], - mul_euint8_euint16: [{ inputs: [0x03, 0x1000], output: 0x3000 }], - and_euint8_euint16: [ - { inputs: [0x03, 0x1000], output: 0x0000 }, - { inputs: [0x03, 0x1001], output: 0x0001 }, - ], - or_euint8_euint16: [ - { inputs: [0x03, 0x1000], output: 0x1003 }, - { inputs: [0x03, 0x1001], output: 0x1003 }, - ], - xor_euint8_euint16: [ - { inputs: [0xff, 0xffff], output: 0xff00 }, - { inputs: [0xff, 0xff00], output: 0xffff }, - ], - eq_euint8_euint16: [ - { inputs: [0xff, 0x00ff], output: true }, - { inputs: [0xff, 0x01ff], output: false }, - ], - ne_euint8_euint16: [ - { inputs: [0xff, 0x00ff], output: false }, - { inputs: [0xff, 0x01ff], output: true }, - ], - ge_euint8_euint16: [ - { inputs: [0xff, 0x00ff], output: true }, - { inputs: [0xff, 0x01ff], output: false }, - { inputs: [0xff, 0x007f], output: true }, - ], - gt_euint8_euint16: [ - { inputs: [0xff, 0x00ff], output: false }, - { inputs: [0xff, 0x01ff], output: false }, - { inputs: [0xff, 0x007f], output: true }, - ], - le_euint8_euint16: [ - { inputs: [0xff, 0x00ff], output: true }, - { inputs: [0xff, 0x01ff], output: true }, - { inputs: [0xff, 0x007f], output: false }, - ], - lt_euint8_euint16: [ - { inputs: [0xff, 0x00ff], output: false }, - { inputs: [0xff, 0x01ff], output: true }, - { inputs: [0xff, 0x007f], output: false }, - ], - min_euint8_euint16: [ - { inputs: [0xff, 0x00ff], output: 0xff }, - { inputs: [0xff, 0x01ff], output: 0xff }, - { inputs: [0xff, 0x007f], output: 0x7f }, - ], - max_euint8_euint16: [ - { inputs: [0xff, 0x00ff], output: 0xff }, - { inputs: [0xff, 0x01ff], output: 0x1ff }, - { inputs: [0xff, 0x007f], output: 0xff }, - ], - add_euint8_euint32: [{ inputs: [0xff, 0xffff00ff], output: 0xffff01fe }], - sub_euint8_euint32: [ - { inputs: [0xff, 0xffff00ff], output: 0x10000 }, - { inputs: [0xff, 0x00000010], output: 0x000ef }, - ], - mul_euint8_euint32: [{ inputs: [0x10, 0x00010000], output: 0x00100000 }], - and_euint8_euint32: [ - { inputs: [0x10, 0x00010000], output: 0x00000000 }, - { inputs: [0x11, 0x00010010], output: 0x00000010 }, - ], - or_euint8_euint32: [ - { inputs: [0x10, 0x00010000], output: 0x00010010 }, - { inputs: [0x11, 0x00010010], output: 0x00010011 }, - ], - xor_euint8_euint32: [ - { inputs: [0x10, 0x00010000], output: 0x00010010 }, - { inputs: [0x11, 0x00010010], output: 0x00010001 }, - ], - eq_euint8_euint32: [ - { inputs: [0x01, 0x00000001], output: true }, - { inputs: [0x01, 0x00010001], output: false }, - ], - ne_euint8_euint32: [ - { inputs: [0x01, 0x00000001], output: false }, - { inputs: [0x01, 0x00010001], output: true }, - ], - ge_euint8_euint32: [ - { inputs: [0x01, 0x00000001], output: true }, - { inputs: [0x01, 0x00010001], output: false }, - { inputs: [0x10, 0x00000001], output: true }, - ], - gt_euint8_euint32: [ - { inputs: [0x01, 0x00000001], output: false }, - { inputs: [0x01, 0x00010001], output: false }, - { inputs: [0x10, 0x00000001], output: true }, - ], - le_euint8_euint32: [ - { inputs: [0x01, 0x00000001], output: true }, - { inputs: [0x01, 0x00010001], output: true }, - { inputs: [0x10, 0x00000001], output: false }, - ], - lt_euint8_euint32: [ - { inputs: [0x01, 0x00000001], output: false }, - { inputs: [0x01, 0x00010001], output: true }, - { inputs: [0x10, 0x00000001], output: false }, - ], - min_euint8_euint32: [ - { inputs: [0x01, 0x00000001], output: 0x1 }, - { inputs: [0x01, 0x00010001], output: 0x1 }, - { inputs: [0x10, 0x00000004], output: 0x4 }, - ], - max_euint8_euint32: [ - { inputs: [0x01, 0x00000001], output: 0x1 }, - { inputs: [0x01, 0x00010001], output: 0x10001 }, - { inputs: [0x10, 0x00000004], output: 0x10 }, - ], - add_euint8_euint64: [{ inputs: [0xff, 0x00000000ffff00ff], output: 0xffff01fe }], - sub_euint8_euint64: [ - { inputs: [0xff, 0x00000000ffff00ff], output: 18446744069414649856n }, - { inputs: [0xff, 0x0000000000000010], output: 0x000ef }, - ], - mul_euint8_euint64: [{ inputs: [0x10, 0x00010000], output: 0x00100000 }], - and_euint8_euint64: [ - { inputs: [0x10, 0x0000000000010000], output: 0x00000000 }, - { inputs: [0x11, 0x0000000000010010], output: 0x00000010 }, - ], - or_euint8_euint64: [ - { inputs: [0x10, 0x0000000000010000], output: 0x00010010 }, - { inputs: [0x11, 0x0000000000010010], output: 0x00010011 }, - ], - xor_euint8_euint64: [ - { inputs: [0x10, 0x0000000000010000], output: 0x00010010 }, - { inputs: [0x11, 0x0000000000010010], output: 0x00010001 }, - ], - eq_euint8_euint64: [ - { inputs: [0x01, 0x0000000000000001], output: true }, - { inputs: [0x01, 0x0000000000010001], output: false }, - ], - ne_euint8_euint64: [ - { inputs: [0x01, 0x0000000000000001], output: false }, - { inputs: [0x01, 0x0000000000010001], output: true }, - ], - ge_euint8_euint64: [ - { inputs: [0x01, 0x0000000000000001], output: true }, - { inputs: [0x01, 0x0000000000010001], output: false }, - { inputs: [0x10, 0x0000000000000001], output: true }, - ], - gt_euint8_euint64: [ - { inputs: [0x01, 0x0000000000000001], output: false }, - { inputs: [0x01, 0x0000000000010001], output: false }, - { inputs: [0x10, 0x0000000000000001], output: true }, - ], - le_euint8_euint64: [ - { inputs: [0x01, 0x0000000000000001], output: true }, - { inputs: [0x01, 0x0000000000010001], output: true }, - { inputs: [0x10, 0x0000000000000001], output: false }, - ], - lt_euint8_euint64: [ - { inputs: [0x01, 0x0000000000000001], output: false }, - { inputs: [0x01, 0x0000000000010001], output: true }, - { inputs: [0x10, 0x0000000000000001], output: false }, - ], - min_euint8_euint64: [ - { inputs: [0x01, 0x0000000000000001], output: 0x1 }, - { inputs: [0x01, 0x0000000000010001], output: 0x1 }, - { inputs: [0x10, 0x0000000000000004], output: 0x4 }, - ], - max_euint8_euint64: [ - { inputs: [0x01, 0x0000000000000001], output: 0x1 }, - { inputs: [0x01, 0x0000000000010001], output: 0x10001 }, - { inputs: [0x10, 0x0000000000000004], output: 0x10 }, - ], - add_euint8_uint8: [{ inputs: [0x04, 0x03], output: 0x07 }], - add_uint8_euint8: [{ inputs: [0x04, 0x03], output: 0x07 }], - sub_euint8_uint8: [ - // bug found - { inputs: [0x04, 0x03], output: 0x01 }, - { inputs: [0x03, 0x04], output: 0xff }, - ], - sub_uint8_euint8: [ - // bug found - { inputs: [0x04, 0x03], output: 0x01 }, - { inputs: [0x03, 0x04], output: 0xff }, - ], - mul_euint8_uint8: [ - { inputs: [0x04, 0x03], output: 0x0c }, - { inputs: [0x03, 0x04], output: 0x0c }, - { inputs: [0x08, 0x02], output: 0x10 }, - ], - mul_uint8_euint8: [ - { inputs: [0x04, 0x03], output: 0x0c }, - { inputs: [0x03, 0x04], output: 0x0c }, - { inputs: [0x08, 0x02], output: 0x10 }, - ], - div_euint8_uint8: [{ inputs: [0x10, 0x02], output: 0x08 }], - rem_euint8_uint8: [{ inputs: [0x08, 0x03], output: 0x02 }], - shl_euint8_uint8: [ - { inputs: [0x10, 0x01], output: 0x20 }, - { inputs: [0x10, 0x02], output: 0x40 }, - ], - shr_euint8_uint8: [ - { inputs: [0x10, 0x01], output: 0x08 }, - { inputs: [0x10, 0x02], output: 0x04 }, - ], - eq_euint8_uint8: [ - { inputs: [0x10, 0x10], output: true }, - { inputs: [0x10, 0x02], output: false }, - ], - eq_uint8_euint8: [ - { inputs: [0x10, 0x10], output: true }, - { inputs: [0x10, 0x02], output: false }, - ], - ne_euint8_uint8: [ - { inputs: [0x10, 0x10], output: false }, - { inputs: [0x10, 0x02], output: true }, - ], - ne_uint8_euint8: [ - { inputs: [0x10, 0x10], output: false }, - { inputs: [0x10, 0x02], output: true }, - ], - ge_euint8_uint8: [ - { inputs: [0x10, 0x10], output: true }, - { inputs: [0x10, 0x02], output: true }, - { inputs: [0x10, 0x11], output: false }, - ], - ge_uint8_euint8: [ - { inputs: [0x10, 0x10], output: true }, - { inputs: [0x10, 0x02], output: true }, - { inputs: [0x10, 0x11], output: false }, - ], - gt_euint8_uint8: [ - { inputs: [0x10, 0x10], output: false }, - { inputs: [0x10, 0x02], output: true }, - { inputs: [0x10, 0x11], output: false }, - ], - gt_uint8_euint8: [ - { inputs: [0x10, 0x10], output: false }, - { inputs: [0x10, 0x02], output: true }, - { inputs: [0x10, 0x11], output: false }, - ], - le_euint8_uint8: [ - { inputs: [0x10, 0x10], output: true }, - { inputs: [0x10, 0x02], output: false }, - { inputs: [0x10, 0x11], output: true }, - ], - le_uint8_euint8: [ - { inputs: [0x10, 0x10], output: true }, - { inputs: [0x10, 0x02], output: false }, - { inputs: [0x10, 0x11], output: true }, - ], - lt_euint8_uint8: [ - { inputs: [0x10, 0x10], output: false }, - { inputs: [0x10, 0x02], output: false }, - { inputs: [0x10, 0x11], output: true }, - ], - lt_uint8_euint8: [ - { inputs: [0x10, 0x10], output: false }, - { inputs: [0x10, 0x02], output: false }, - { inputs: [0x10, 0x11], output: true }, - ], - min_euint8_uint8: [ - { inputs: [0x10, 0x10], output: 0x10 }, - { inputs: [0x10, 0x02], output: 0x02 }, - { inputs: [0x10, 0x11], output: 0x10 }, - ], - min_uint8_euint8: [ - { inputs: [0x10, 0x10], output: 0x10 }, - { inputs: [0x10, 0x02], output: 0x02 }, - { inputs: [0x10, 0x11], output: 0x10 }, - ], - max_euint8_uint8: [ - { inputs: [0x10, 0x10], output: 0x10 }, - { inputs: [0x10, 0x02], output: 0x10 }, - { inputs: [0x10, 0x11], output: 0x11 }, - ], - max_uint8_euint8: [ - { inputs: [0x10, 0x10], output: 0x10 }, - { inputs: [0x10, 0x02], output: 0x10 }, - { inputs: [0x10, 0x11], output: 0x11 }, - ], - add_euint16_euint8: [ - { inputs: [0x1000, 0x10], output: 0x1010 }, - { inputs: [0x1010, 0x10], output: 0x1020 }, - ], - sub_euint16_euint8: [ - { inputs: [0x1000, 0x10], output: 0x0ff0 }, - { inputs: [0x1010, 0x10], output: 0x1000 }, - ], - mul_euint16_euint8: [{ inputs: [0x1000, 0x04], output: 0x4000 }], - and_euint16_euint8: [ - { inputs: [0x1000, 0x04], output: 0x0000 }, - { inputs: [0x10f0, 0xf0], output: 0x00f0 }, - ], - or_euint16_euint8: [ - { inputs: [0x1000, 0x04], output: 0x1004 }, - { inputs: [0x10f0, 0xf0], output: 0x10f0 }, - ], - xor_euint16_euint8: [ - { inputs: [0x1000, 0x04], output: 0x1004 }, - { inputs: [0x10f0, 0xf2], output: 0x1002 }, - ], - shl_euint16_euint8: [{ inputs: [0x1010, 0x02], output: 0x4040 }], - shl_euint16_uint8: [{ inputs: [0x1010, 0x02], output: 0x4040 }], - shr_euint16_euint8: [{ inputs: [0x1010, 0x02], output: 0x0404 }], - shr_euint16_uint8: [{ inputs: [0x1010, 0x02], output: 0x0404 }], - eq_euint16_euint8: [ - { inputs: [0x0010, 0x10], output: true }, - { inputs: [0x0110, 0x10], output: false }, - ], - ne_euint16_euint8: [ - { inputs: [0x0010, 0x10], output: false }, - { inputs: [0x0110, 0x10], output: true }, - ], - ge_euint16_euint8: [ - { inputs: [0x0010, 0x10], output: true }, - { inputs: [0x0110, 0x10], output: true }, - { inputs: [0x000f, 0x10], output: false }, - ], - gt_euint16_euint8: [ - { inputs: [0x0010, 0x10], output: false }, - { inputs: [0x0110, 0x10], output: true }, - { inputs: [0x000f, 0x10], output: false }, - ], - le_euint16_euint8: [ - { inputs: [0x0010, 0x10], output: true }, - { inputs: [0x0110, 0x10], output: false }, - { inputs: [0x000f, 0x10], output: true }, - ], - lt_euint16_euint8: [ - { inputs: [0x0010, 0x10], output: false }, - { inputs: [0x0110, 0x10], output: false }, - { inputs: [0x000f, 0x10], output: true }, - ], - min_euint16_euint8: [ - { inputs: [0x0010, 0x10], output: 0x10 }, - { inputs: [0x0110, 0x10], output: 0x10 }, - { inputs: [0x000f, 0x10], output: 0x0f }, - ], - max_euint16_euint8: [ - { inputs: [0x0010, 0x10], output: 0x10 }, - { inputs: [0x0110, 0x10], output: 0x0110 }, - { inputs: [0x000f, 0x10], output: 0x10 }, - ], - add_euint16_euint16: [{ inputs: [0x0102, 0x0201], output: 0x0303 }], - sub_euint16_euint16: [{ inputs: [0x0403, 0x0102], output: 0x0301 }], - mul_euint16_euint16: [{ inputs: [0x0200, 0x0002], output: 0x0400 }], - and_euint16_euint16: [ - { inputs: [0x0200, 0x0002], output: 0x0000 }, - { inputs: [0x0210, 0x0012], output: 0x0010 }, - ], - or_euint16_euint16: [ - { inputs: [0x0200, 0x0002], output: 0x0202 }, - { inputs: [0x0210, 0x0012], output: 0x0212 }, - ], - xor_euint16_euint16: [ - { inputs: [0x0200, 0x0002], output: 0x0202 }, - { inputs: [0x0210, 0x0012], output: 0x0202 }, - ], - eq_euint16_euint16: [ - { inputs: [0x0200, 0x0002], output: false }, - { inputs: [0x0200, 0x0200], output: true }, - ], - ne_euint16_euint16: [ - { inputs: [0x0200, 0x0002], output: true }, - { inputs: [0x0200, 0x0200], output: false }, - ], - ge_euint16_euint16: [ - { inputs: [0x0200, 0x0002], output: true }, - { inputs: [0x0200, 0x0200], output: true }, - { inputs: [0x0200, 0x0201], output: false }, - ], - gt_euint16_euint16: [ - { inputs: [0x0200, 0x0002], output: true }, - { inputs: [0x0200, 0x0200], output: false }, - { inputs: [0x0200, 0x0201], output: false }, - ], - le_euint16_euint16: [ - { inputs: [0x0200, 0x0002], output: false }, - { inputs: [0x0200, 0x0200], output: true }, - { inputs: [0x0200, 0x0201], output: true }, - ], - lt_euint16_euint16: [ - { inputs: [0x0200, 0x0002], output: false }, - { inputs: [0x0200, 0x0200], output: false }, - { inputs: [0x0200, 0x0201], output: true }, - ], - min_euint16_euint16: [ - { inputs: [0x0200, 0x0002], output: 0x02 }, - { inputs: [0x0200, 0x0200], output: 0x0200 }, - { inputs: [0x0200, 0x0201], output: 0x0200 }, - ], - max_euint16_euint16: [ - { inputs: [0x0200, 0x0002], output: 0x0200 }, - { inputs: [0x0200, 0x0200], output: 0x0200 }, - { inputs: [0x0200, 0x0201], output: 0x0201 }, - ], - add_euint16_euint32: [{ inputs: [0x0202, 0x00020002], output: 0x00020204 }], - sub_euint16_euint32: [ - { inputs: [0x0202, 0x00000002], output: 0x00000200 }, - { inputs: [0x0202, 0x00010000], output: 0xffff0202 }, - ], - mul_euint16_euint32: [{ inputs: [0x0200, 0x00010000], output: 0x02000000 }], - and_euint16_euint32: [ - { inputs: [0x0202, 0x00010000], output: 0x00000000 }, - { inputs: [0x0202, 0x00010002], output: 0x00000002 }, - ], - or_euint16_euint32: [ - { inputs: [0x0202, 0x00010000], output: 0x00010202 }, - { inputs: [0x0202, 0x00010002], output: 0x00010202 }, - ], - xor_euint16_euint32: [ - { inputs: [0x0202, 0x00010000], output: 0x00010202 }, - { inputs: [0x0202, 0x00010002], output: 0x00010200 }, - ], - eq_euint16_euint32: [ - { inputs: [0x0202, 0x00010202], output: false }, - { inputs: [0x0202, 0x00000202], output: true }, - ], - ne_euint16_euint32: [ - { inputs: [0x0202, 0x00010202], output: true }, - { inputs: [0x0202, 0x00000202], output: false }, - ], - ge_euint16_euint32: [ - { inputs: [0x0202, 0x00010202], output: false }, - { inputs: [0x0202, 0x00000202], output: true }, - { inputs: [0x0202, 0x00000201], output: true }, - ], - gt_euint16_euint32: [ - { inputs: [0x0202, 0x00010202], output: false }, - { inputs: [0x0202, 0x00000202], output: false }, - { inputs: [0x0202, 0x00000201], output: true }, - ], - le_euint16_euint32: [ - { inputs: [0x0202, 0x00010202], output: true }, - { inputs: [0x0202, 0x00000202], output: true }, - { inputs: [0x0202, 0x00000201], output: false }, - ], - lt_euint16_euint32: [ - { inputs: [0x0202, 0x00010202], output: true }, - { inputs: [0x0202, 0x00000202], output: false }, - { inputs: [0x0202, 0x00000201], output: false }, - ], - min_euint16_euint32: [ - { inputs: [0x0202, 0x00010202], output: 0x202 }, - { inputs: [0x0202, 0x00000202], output: 0x202 }, - { inputs: [0x0202, 0x00000201], output: 0x201 }, - ], - max_euint16_euint32: [ - { inputs: [0x0202, 0x00010202], output: 0x00010202 }, - { inputs: [0x0202, 0x00000202], output: 0x202 }, - { inputs: [0x0202, 0x00000201], output: 0x202 }, - ], - add_euint16_euint64: [{ inputs: [0x0202, 0x0000000000020002], output: 0x00020204 }], - sub_euint16_euint64: [ - { inputs: [0x0202, 0x0000000000000002], output: 0x00000200 }, - { inputs: [0x0202, 0x0000000000010000], output: 18446744073709486594n }, - ], - mul_euint16_euint64: [{ inputs: [0x0200, 0x00010000], output: 0x02000000 }], - and_euint16_euint64: [ - { inputs: [0x0202, 0x0000000000010000], output: 0x00000000 }, - { inputs: [0x0202, 0x0000000000010002], output: 0x00000002 }, - ], - or_euint16_euint64: [ - { inputs: [0x0202, 0x0000000000010000], output: 0x00010202 }, - { inputs: [0x0202, 0x0000000000010002], output: 0x00010202 }, - ], - xor_euint16_euint64: [ - { inputs: [0x0202, 0x0000000000010000], output: 0x00010202 }, - { inputs: [0x0202, 0x0000000000010002], output: 0x00010200 }, - ], - eq_euint16_euint64: [ - { inputs: [0x0202, 0x0000000000010202], output: false }, - { inputs: [0x0202, 0x0000000000000202], output: true }, - ], - ne_euint16_euint64: [ - { inputs: [0x0202, 0x0000000000010202], output: true }, - { inputs: [0x0202, 0x0000000000000202], output: false }, - ], - ge_euint16_euint64: [ - { inputs: [0x0202, 0x0000000000010202], output: false }, - { inputs: [0x0202, 0x0000000000000202], output: true }, - { inputs: [0x0202, 0x0000000000000201], output: true }, - ], - gt_euint16_euint64: [ - { inputs: [0x0202, 0x0000000000010202], output: false }, - { inputs: [0x0202, 0x0000000000000202], output: false }, - { inputs: [0x0202, 0x0000000000000201], output: true }, - ], - le_euint16_euint64: [ - { inputs: [0x0202, 0x0000000000010202], output: true }, - { inputs: [0x0202, 0x0000000000000202], output: true }, - { inputs: [0x0202, 0x0000000000000201], output: false }, - ], - lt_euint16_euint64: [ - { inputs: [0x0202, 0x0000000000010202], output: true }, - { inputs: [0x0202, 0x0000000000000202], output: false }, - { inputs: [0x0202, 0x0000000000000201], output: false }, - ], - min_euint16_euint64: [ - { inputs: [0x0202, 0x0000000000010202], output: 0x202 }, - { inputs: [0x0202, 0x0000000000000202], output: 0x202 }, - { inputs: [0x0202, 0x0000000000000201], output: 0x201 }, - ], - max_euint16_euint64: [ - { inputs: [0x0202, 0x0000000000010202], output: 0x00010202 }, - { inputs: [0x0202, 0x0000000000000202], output: 0x202 }, - { inputs: [0x0202, 0x0000000000000201], output: 0x202 }, - ], - add_euint16_uint16: [{ inputs: [0x0202, 0x0222], output: 0x0424 }], - add_uint16_euint16: [{ inputs: [0x0202, 0x0222], output: 0x0424 }], - sub_euint16_uint16: [{ inputs: [0x0202, 0x0201], output: 0x0001 }], - sub_uint16_euint16: [{ inputs: [0x0202, 0x0201], output: 0x0001 }], - mul_euint16_uint16: [{ inputs: [0x0202, 0x0003], output: 0x0606 }], - mul_uint16_euint16: [{ inputs: [0x0202, 0x0003], output: 0x0606 }], - div_euint16_uint16: [{ inputs: [0x0606, 0x0003], output: 0x0202 }], - rem_euint16_uint16: [{ inputs: [0x0608, 0x0003], output: 0x0002 }], - eq_euint16_uint16: [ - { inputs: [0x0606, 0x0606], output: true }, - { inputs: [0x0606, 0x0605], output: false }, - ], - eq_uint16_euint16: [ - { inputs: [0x0606, 0x0606], output: true }, - { inputs: [0x0606, 0x0605], output: false }, - ], - ne_euint16_uint16: [ - { inputs: [0x0606, 0x0606], output: false }, - { inputs: [0x0606, 0x0605], output: true }, - ], - ne_uint16_euint16: [ - { inputs: [0x0606, 0x0606], output: false }, - { inputs: [0x0606, 0x0605], output: true }, - ], - ge_euint16_uint16: [ - { inputs: [0x0606, 0x0606], output: true }, - { inputs: [0x0606, 0x0605], output: true }, - { inputs: [0x0606, 0x0607], output: false }, - ], - ge_uint16_euint16: [ - { inputs: [0x0606, 0x0606], output: true }, - { inputs: [0x0606, 0x0605], output: true }, - { inputs: [0x0606, 0x0607], output: false }, - ], - gt_euint16_uint16: [ - { inputs: [0x0606, 0x0606], output: false }, - { inputs: [0x0606, 0x0605], output: true }, - { inputs: [0x0606, 0x0607], output: false }, - ], - gt_uint16_euint16: [ - { inputs: [0x0606, 0x0606], output: false }, - { inputs: [0x0606, 0x0605], output: true }, - { inputs: [0x0606, 0x0607], output: false }, - ], - le_euint16_uint16: [ - { inputs: [0x0606, 0x0606], output: true }, - { inputs: [0x0606, 0x0605], output: false }, - { inputs: [0x0606, 0x0607], output: true }, - ], - le_uint16_euint16: [ - { inputs: [0x0606, 0x0606], output: true }, - { inputs: [0x0606, 0x0605], output: false }, - { inputs: [0x0606, 0x0607], output: true }, - ], - lt_euint16_uint16: [ - { inputs: [0x0606, 0x0606], output: false }, - { inputs: [0x0606, 0x0605], output: false }, - { inputs: [0x0606, 0x0607], output: true }, - ], - lt_uint16_euint16: [ - { inputs: [0x0606, 0x0606], output: false }, - { inputs: [0x0606, 0x0605], output: false }, - { inputs: [0x0606, 0x0607], output: true }, - ], - min_euint16_uint16: [ - { inputs: [0x0606, 0x0606], output: 0x0606 }, - { inputs: [0x0606, 0x0605], output: 0x0605 }, - { inputs: [0x0606, 0x0607], output: 0x0606 }, - ], - min_uint16_euint16: [ - { inputs: [0x0606, 0x0606], output: 0x0606 }, - { inputs: [0x0606, 0x0605], output: 0x0605 }, - { inputs: [0x0606, 0x0607], output: 0x0606 }, - ], - max_euint16_uint16: [ - { inputs: [0x0606, 0x0606], output: 0x0606 }, - { inputs: [0x0606, 0x0605], output: 0x0606 }, - { inputs: [0x0606, 0x0607], output: 0x0607 }, - ], - max_uint16_euint16: [ - { inputs: [0x0606, 0x0606], output: 0x0606 }, - { inputs: [0x0606, 0x0605], output: 0x0606 }, - { inputs: [0x0606, 0x0607], output: 0x0607 }, - ], - add_euint32_euint8: [{ inputs: [0x03000000, 0x03], output: 0x03000003 }], - sub_euint32_euint8: [{ inputs: [0x03000000, 0x03], output: 0x2fffffd }], - mul_euint32_euint8: [{ inputs: [0x03000000, 0x03], output: 0x09000000 }], - and_euint32_euint8: [ - { inputs: [0x03010000, 0x03], output: 0x00000000 }, - { inputs: [0x03010003, 0x03], output: 0x00000003 }, - ], - or_euint32_euint8: [ - { inputs: [0x03010000, 0x03], output: 0x03010003 }, - { inputs: [0x03010003, 0x03], output: 0x03010003 }, - ], - xor_euint32_euint8: [ - { inputs: [0x03010000, 0x03], output: 0x03010003 }, - { inputs: [0x03010003, 0x03], output: 0x03010000 }, - ], - shl_euint32_euint8: [{ inputs: [0x03010000, 0x03], output: 0x18080000 }], - shl_euint32_uint8: [{ inputs: [0x03010000, 0x03], output: 0x18080000 }], - shr_euint32_euint8: [{ inputs: [0x03010000, 0x03], output: 0x00602000 }], - shr_euint32_uint8: [{ inputs: [0x03010000, 0x03], output: 0x00602000 }], - eq_euint32_euint8: [ - { inputs: [0x00000003, 0x03], output: true }, - { inputs: [0x03000003, 0x03], output: false }, - ], - ne_euint32_euint8: [ - { inputs: [0x00000003, 0x03], output: false }, - { inputs: [0x03000003, 0x03], output: true }, - ], - ge_euint32_euint8: [ - { inputs: [0x00000003, 0x03], output: true }, - { inputs: [0x03000003, 0x03], output: true }, - { inputs: [0x00000003, 0x04], output: false }, - ], - gt_euint32_euint8: [ - { inputs: [0x00000003, 0x03], output: false }, - { inputs: [0x03000003, 0x03], output: true }, - { inputs: [0x00000003, 0x04], output: false }, - ], - le_euint32_euint8: [ - { inputs: [0x00000003, 0x03], output: true }, - { inputs: [0x03000003, 0x03], output: false }, - { inputs: [0x00000003, 0x04], output: true }, - ], - lt_euint32_euint8: [ - { inputs: [0x00000003, 0x03], output: false }, - { inputs: [0x03000003, 0x03], output: false }, - { inputs: [0x00000003, 0x04], output: true }, - ], - min_euint32_euint8: [ - { inputs: [0x00000003, 0x03], output: 0x03 }, - { inputs: [0x03000003, 0x03], output: 0x03 }, - { inputs: [0x00000003, 0x04], output: 0x03 }, - ], - max_euint32_euint8: [ - { inputs: [0x00000003, 0x03], output: 0x03 }, - { inputs: [0x03000003, 0x03], output: 0x03000003 }, - { inputs: [0x00000003, 0x04], output: 0x04 }, - ], - add_euint32_euint16: [{ inputs: [0x03001023, 0x1003], output: 0x03002026 }], - sub_euint32_euint16: [{ inputs: [0x03001023, 0x1003], output: 0x03000020 }], - mul_euint32_euint16: [{ inputs: [0x03001023, 0x0003], output: 0x09003069 }], - and_euint32_euint16: [ - { inputs: [0x03001020, 0x0003], output: 0x00000000 }, - { inputs: [0x03001023, 0x1003], output: 0x00001003 }, - ], - or_euint32_euint16: [ - { inputs: [0x03000020, 0x1003], output: 0x03001023 }, - { inputs: [0x03000023, 0x1003], output: 0x03001023 }, - ], - xor_euint32_euint16: [{ inputs: [0x03000023, 0x1003], output: 0x03001020 }], - eq_euint32_euint16: [ - { inputs: [0x00001000, 0x1000], output: true }, - { inputs: [0x01001000, 0x1000], output: false }, - ], - ne_euint32_euint16: [ - { inputs: [0x00001000, 0x1000], output: false }, - { inputs: [0x01001000, 0x1000], output: true }, - ], - ge_euint32_euint16: [ - { inputs: [0x00001000, 0x1000], output: true }, - { inputs: [0x01001000, 0x1000], output: true }, - { inputs: [0x00001000, 0x1001], output: false }, - ], - gt_euint32_euint16: [ - { inputs: [0x00001000, 0x1000], output: false }, - { inputs: [0x01001000, 0x1000], output: true }, - { inputs: [0x00001000, 0x1001], output: false }, - ], - le_euint32_euint16: [ - { inputs: [0x00001000, 0x1000], output: true }, - { inputs: [0x01001000, 0x1000], output: false }, - { inputs: [0x00001000, 0x1001], output: true }, - ], - lt_euint32_euint16: [ - { inputs: [0x00001000, 0x1000], output: false }, - { inputs: [0x01001000, 0x1000], output: false }, - { inputs: [0x00001000, 0x1001], output: true }, - ], - min_euint32_euint16: [ - { inputs: [0x00001000, 0x1000], output: 0x1000 }, - { inputs: [0x01001000, 0x1000], output: 0x1000 }, - { inputs: [0x00001000, 0x1001], output: 0x1000 }, - ], - max_euint32_euint16: [ - { inputs: [0x00001000, 0x1000], output: 0x1000 }, - { inputs: [0x01001000, 0x1000], output: 0x01001000 }, - { inputs: [0x00001000, 0x1001], output: 0x1001 }, - ], - add_euint32_euint32: [{ inputs: [0x00321000, 0x00111000], output: 0x00432000 }], - sub_euint32_euint32: [{ inputs: [0x00321000, 0x00111000], output: 0x00210000 }], - mul_euint32_euint32: [{ inputs: [0x00321000, 0x00000020], output: 0x06420000 }], - and_euint32_euint32: [ - { inputs: [0x00321000, 0x54000000], output: 0x00000000 }, - { inputs: [0x00321000, 0x54030000], output: 0x00020000 }, - ], - or_euint32_euint32: [ - { inputs: [0x00321000, 0x54000000], output: 0x54321000 }, - { inputs: [0x00321000, 0x54030000], output: 0x54331000 }, - ], - xor_euint32_euint32: [ - { inputs: [0x00321000, 0x54000000], output: 0x54321000 }, - { inputs: [0x00321000, 0x54030000], output: 0x54311000 }, - ], - eq_euint32_euint32: [ - { inputs: [0x00321000, 0x00321000], output: true }, - { inputs: [0x00321000, 0x00321001], output: false }, - ], - ne_euint32_euint32: [ - { inputs: [0x00321000, 0x00321000], output: false }, - { inputs: [0x00321000, 0x00321001], output: true }, - ], - ge_euint32_euint32: [ - { inputs: [0x00321000, 0x00321000], output: true }, - { inputs: [0x00321000, 0x00321001], output: false }, - { inputs: [0x00321000, 0x00320fff], output: true }, - ], - gt_euint32_euint32: [ - { inputs: [0x00321000, 0x00321000], output: false }, - { inputs: [0x00321000, 0x00321001], output: false }, - { inputs: [0x00321000, 0x00320fff], output: true }, - ], - le_euint32_euint32: [ - { inputs: [0x00321000, 0x00321000], output: true }, - { inputs: [0x00321000, 0x00321001], output: true }, - { inputs: [0x00321000, 0x00320fff], output: false }, - ], - lt_euint32_euint32: [ - { inputs: [0x00321000, 0x00321000], output: false }, - { inputs: [0x00321000, 0x00321001], output: true }, - { inputs: [0x00321000, 0x00320fff], output: false }, - ], - min_euint32_euint32: [ - { inputs: [0x00321000, 0x00321000], output: 0x00321000 }, - { inputs: [0x00321000, 0x00321001], output: 0x00321000 }, - { inputs: [0x00321000, 0x00320fff], output: 0x00320fff }, - ], - max_euint32_euint32: [ - { inputs: [0x00321000, 0x00321000], output: 0x00321000 }, - { inputs: [0x00321000, 0x00321001], output: 0x00321001 }, - { inputs: [0x00321000, 0x00320fff], output: 0x00321000 }, - ], - add_euint32_uint32: [{ inputs: [0x00342000, 0x00321000], output: 0x00663000 }], - add_uint32_euint32: [{ inputs: [0x00342000, 0x00321000], output: 0x00663000 }], - sub_euint32_uint32: [{ inputs: [0x00342000, 0x00321000], output: 0x00021000 }], - sub_uint32_euint32: [{ inputs: [0x00342000, 0x00321000], output: 0x00021000 }], - mul_euint32_uint32: [{ inputs: [0x00342000, 0x00000100], output: 0x34200000 }], - mul_uint32_euint32: [{ inputs: [0x00342000, 0x00000100], output: 0x34200000 }], - div_euint32_uint32: [{ inputs: [0x00342000, 0x00000100], output: 0x00003420 }], - rem_euint32_uint32: [{ inputs: [0x00342039, 0x00000100], output: 0x00000039 }], - eq_euint32_uint32: [ - { inputs: [0x00342000, 0x00342000], output: true }, - { inputs: [0x00342000, 0x00342001], output: false }, - ], - eq_uint32_euint32: [ - { inputs: [0x00342000, 0x00342000], output: true }, - { inputs: [0x00342000, 0x00342001], output: false }, - ], - ne_euint32_uint32: [ - { inputs: [0x00342000, 0x00342000], output: false }, - { inputs: [0x00342000, 0x00342001], output: true }, - ], - ne_uint32_euint32: [ - { inputs: [0x00342000, 0x00342000], output: false }, - { inputs: [0x00342000, 0x00342001], output: true }, - ], - ge_euint32_uint32: [ - { inputs: [0x00342000, 0x00342000], output: true }, - { inputs: [0x00342000, 0x00342001], output: false }, - { inputs: [0x00342000, 0x00341fff], output: true }, - ], - ge_uint32_euint32: [ - { inputs: [0x00342000, 0x00342000], output: true }, - { inputs: [0x00342000, 0x00342001], output: false }, - { inputs: [0x00342000, 0x00341fff], output: true }, - ], - gt_euint32_uint32: [ - { inputs: [0x00342000, 0x00342000], output: false }, - { inputs: [0x00342000, 0x00342001], output: false }, - { inputs: [0x00342000, 0x00341fff], output: true }, - ], - gt_uint32_euint32: [ - { inputs: [0x00342000, 0x00342000], output: false }, - { inputs: [0x00342000, 0x00342001], output: false }, - { inputs: [0x00342000, 0x00341fff], output: true }, - ], - le_euint32_uint32: [ - { inputs: [0x00342000, 0x00342000], output: true }, - { inputs: [0x00342000, 0x00342001], output: true }, - { inputs: [0x00342000, 0x00341fff], output: false }, - ], - le_uint32_euint32: [ - { inputs: [0x00342000, 0x00342000], output: true }, - { inputs: [0x00342000, 0x00342001], output: true }, - { inputs: [0x00342000, 0x00341fff], output: false }, - ], - lt_euint32_uint32: [ - { inputs: [0x00342000, 0x00342000], output: false }, - { inputs: [0x00342000, 0x00342001], output: true }, - { inputs: [0x00342000, 0x00341fff], output: false }, - ], - lt_uint32_euint32: [ - { inputs: [0x00342000, 0x00342000], output: false }, - { inputs: [0x00342000, 0x00342001], output: true }, - { inputs: [0x00342000, 0x00341fff], output: false }, - ], - min_euint32_uint32: [ - { inputs: [0x00342000, 0x00342000], output: 0x00342000 }, - { inputs: [0x00342000, 0x00342001], output: 0x00342000 }, - { inputs: [0x00342000, 0x00341fff], output: 0x00341fff }, - ], - min_uint32_euint32: [ - { inputs: [0x00342000, 0x00342000], output: 0x00342000 }, - { inputs: [0x00342000, 0x00342001], output: 0x00342000 }, - { inputs: [0x00342000, 0x00341fff], output: 0x00341fff }, - ], - max_euint32_uint32: [ - { inputs: [0x00342000, 0x00342000], output: 0x00342000 }, - { inputs: [0x00342000, 0x00342001], output: 0x00342001 }, - { inputs: [0x00342000, 0x00341fff], output: 0x00342000 }, - ], - max_uint32_euint32: [ - { inputs: [0x00342000, 0x00342000], output: 0x00342000 }, - { inputs: [0x00342000, 0x00342001], output: 0x00342001 }, - { inputs: [0x00342000, 0x00341fff], output: 0x00342000 }, - ], - add_euint32_euint64: [{ inputs: [0x03001023, 0x0000000000001003], output: 0x03002026 }], - sub_euint32_euint64: [{ inputs: [0x03001023, 0x0000000000001003], output: 0x03000020 }], - mul_euint32_euint64: [{ inputs: [0x03001023, 0x0000000000000003], output: 0x09003069 }], - and_euint32_euint64: [ - { inputs: [0x03001020, 0x0000000000000003], output: 0x00000000 }, - { inputs: [0x03001023, 0x0000000000001003], output: 0x00001003 }, - ], - or_euint32_euint64: [ - { inputs: [0x03000020, 0x0000000000001003], output: 0x03001023 }, - { inputs: [0x03000023, 0x0000000000001003], output: 0x03001023 }, - ], - xor_euint32_euint64: [{ inputs: [0x03000023, 0x0000000000001003], output: 0x03001020 }], - eq_euint32_euint64: [ - { inputs: [0x00001000, 0x0000000000001000], output: true }, - { inputs: [0x01001000, 0x0000000000001000], output: false }, - ], - ne_euint32_euint64: [ - { inputs: [0x00001000, 0x0000000000001000], output: false }, - { inputs: [0x01001000, 0x0000000000001000], output: true }, - ], - ge_euint32_euint64: [ - { inputs: [0x00001000, 0x0000000000001000], output: true }, - { inputs: [0x01001000, 0x0000000000001000], output: true }, - { inputs: [0x00001000, 0x0000000000001001], output: false }, - ], - gt_euint32_euint64: [ - { inputs: [0x00001000, 0x0000000000001000], output: false }, - { inputs: [0x01001000, 0x0000000000001000], output: true }, - { inputs: [0x00001000, 0x0000000000001001], output: false }, - ], - le_euint32_euint64: [ - { inputs: [0x00001000, 0x0000000000001000], output: true }, - { inputs: [0x01001000, 0x0000000000001000], output: false }, - { inputs: [0x00001000, 0x0000000000001001], output: true }, - ], - lt_euint32_euint64: [ - { inputs: [0x00001000, 0x0000000000001000], output: false }, - { inputs: [0x01001000, 0x0000000000001000], output: false }, - { inputs: [0x00001000, 0x0000000000001001], output: true }, - ], - min_euint32_euint64: [ - { inputs: [0x00001000, 0x0000000000001000], output: 0x1000 }, - { inputs: [0x01001000, 0x0000000000001000], output: 0x1000 }, - { inputs: [0x00001000, 0x0000000000001001], output: 0x1000 }, - ], - max_euint32_euint64: [ - { inputs: [0x00001000, 0x0000000000001000], output: 0x1000 }, - { inputs: [0x01001000, 0x0000000000001000], output: 0x01001000 }, - { inputs: [0x00001000, 0x0000000000001001], output: 0x1001 }, - ], - add_euint64_euint8: [{ inputs: [0x000000000003000000, 0x03], output: 0x03000003 }], - sub_euint64_euint8: [{ inputs: [0x000000000003000000, 0x03], output: 0x2fffffd }], - mul_euint64_euint8: [{ inputs: [0x000000000003000000, 0x03], output: 0x09000000 }], - and_euint64_euint8: [ - { inputs: [0x000000000003010000, 0x03], output: 0x00000000 }, - { inputs: [0x000000000003010003, 0x03], output: 0x00000003 }, - ], - or_euint64_euint8: [ - { inputs: [0x000000000003010000, 0x03], output: 0x03010003 }, - { inputs: [0x000000000003010003, 0x03], output: 0x03010003 }, - ], - xor_euint64_euint8: [ - { inputs: [0x000000000003010000, 0x03], output: 0x03010003 }, - { inputs: [0x000000000003010003, 0x03], output: 0x03010000 }, - ], - shl_euint64_euint8: [{ inputs: [0x000000000003010000, 0x03], output: 0x18080000 }], - shl_euint64_uint8: [{ inputs: [0x000000000003010000, 0x03], output: 0x18080000 }], - shr_euint64_euint8: [{ inputs: [0x000000000003010000, 0x03], output: 0x00602000 }], - shr_euint64_uint8: [{ inputs: [0x000000000003010000, 0x03], output: 0x00602000 }], - eq_euint64_euint8: [ - { inputs: [0x000000000000000003, 0x03], output: true }, - { inputs: [0x000000000003000003, 0x03], output: false }, - ], - ne_euint64_euint8: [ - { inputs: [0x000000000000000003, 0x03], output: false }, - { inputs: [0x000000000003000003, 0x03], output: true }, - ], - ge_euint64_euint8: [ - { inputs: [0x000000000000000003, 0x03], output: true }, - { inputs: [0x000000000003000003, 0x03], output: true }, - { inputs: [0x000000000000000003, 0x04], output: false }, - ], - gt_euint64_euint8: [ - { inputs: [0x000000000000000003, 0x03], output: false }, - { inputs: [0x0000000003000003, 0x03], output: true }, - { inputs: [0x000000000000000003, 0x04], output: false }, - ], - le_euint64_euint8: [ - { inputs: [0x000000000000000003, 0x03], output: true }, - { inputs: [0x0000000003000003, 0x03], output: false }, - { inputs: [0x000000000000000003, 0x04], output: true }, - ], - lt_euint64_euint8: [ - { inputs: [0x000000000000000003, 0x03], output: false }, - { inputs: [0x0000000003000003, 0x03], output: false }, - { inputs: [0x000000000000000003, 0x04], output: true }, - ], - min_euint64_euint8: [ - { inputs: [0x0000000000000003, 0x03], output: 0x03 }, - { inputs: [0x0000000003000003, 0x03], output: 0x03 }, - { inputs: [0x0000000000000003, 0x04], output: 0x03 }, - ], - max_euint64_euint8: [ - { inputs: [0x0000000000000002, 0x03], output: 0x03 }, - { inputs: [0x0000000003000003, 0x03], output: 0x03000003 }, - { inputs: [0x0000000000000003, 0x04], output: 0x04 }, - ], - add_euint64_euint16: [{ inputs: [0x0000000003001023, 0x1003], output: 0x03002026 }], - sub_euint64_euint16: [{ inputs: [0x0000000003001023, 0x1003], output: 0x03000020 }], - mul_euint64_euint16: [{ inputs: [0x0000000003001023, 0x0003], output: 0x09003069 }], - and_euint64_euint16: [ - { inputs: [0x0000000003001020, 0x0003], output: 0x00000000 }, - { inputs: [0x0000000003001023, 0x1003], output: 0x00001003 }, - ], - or_euint64_euint16: [ - { inputs: [0x0000000003000020, 0x1003], output: 0x03001023 }, - { inputs: [0x0000000003000023, 0x1003], output: 0x03001023 }, - ], - xor_euint64_euint16: [{ inputs: [0x0000000003000023, 0x1003], output: 0x03001020 }], - eq_euint64_euint16: [ - { inputs: [0x0000000000001000, 0x1000], output: true }, - { inputs: [0x0000000001001000, 0x1000], output: false }, - ], - ne_euint64_euint16: [ - { inputs: [0x0000000000001000, 0x1000], output: false }, - { inputs: [0x0000000001001000, 0x1000], output: true }, - ], - ge_euint64_euint16: [ - { inputs: [0x0000000000001000, 0x1000], output: true }, - { inputs: [0x0000000001001000, 0x1000], output: true }, - { inputs: [0x0000000000001000, 0x1001], output: false }, - ], - gt_euint64_euint16: [ - { inputs: [0x0000000000001000, 0x1000], output: false }, - { inputs: [0x0000000001001000, 0x1000], output: true }, - { inputs: [0x0000000000001000, 0x1001], output: false }, - ], - le_euint64_euint16: [ - { inputs: [0x0000000000001000, 0x1000], output: true }, - { inputs: [0x0000000001001000, 0x1000], output: false }, - { inputs: [0x0000000000001000, 0x1001], output: true }, - ], - lt_euint64_euint16: [ - { inputs: [0x0000000000001000, 0x1000], output: false }, - { inputs: [0x0000000001001000, 0x1000], output: false }, - { inputs: [0x0000000000001000, 0x1001], output: true }, - ], - min_euint64_euint16: [ - { inputs: [0x0000000000001000, 0x1000], output: 0x1000 }, - { inputs: [0x0000000001001000, 0x1000], output: 0x1000 }, - { inputs: [0x0000000000001000, 0x1001], output: 0x1000 }, - ], - max_euint64_euint16: [ - { inputs: [0x0000000000001000, 0x1000], output: 0x1000 }, - { inputs: [0x0000000001001000, 0x1000], output: 0x01001000 }, - { inputs: [0x0000000000001000, 0x1001], output: 0x1001 }, - ], - add_euint64_euint32: [{ inputs: [0x0000000003001023, 0x1003], output: 0x03002026 }], - sub_euint64_euint32: [{ inputs: [0x0000000003001023, 0x1003], output: 0x03000020 }], - mul_euint64_euint32: [{ inputs: [0x0000000003001023, 0x0003], output: 0x09003069 }], - and_euint64_euint32: [ - { inputs: [0x0000000003001020, 0x0003], output: 0x00000000 }, - { inputs: [0x0000000003001023, 0x1003], output: 0x00001003 }, - ], - or_euint64_euint32: [ - { inputs: [0x0000000003000020, 0x1003], output: 0x03001023 }, - { inputs: [0x0000000003000023, 0x1003], output: 0x03001023 }, - ], - xor_euint64_euint32: [{ inputs: [0x0000000003000023, 0x1003], output: 0x03001020 }], - eq_euint64_euint32: [ - { inputs: [0x0000000000001000, 0x1000], output: true }, - { inputs: [0x0000000001001000, 0x1000], output: false }, - ], - ne_euint64_euint32: [ - { inputs: [0x0000000000001000, 0x1000], output: false }, - { inputs: [0x0000000001001000, 0x1000], output: true }, - ], - ge_euint64_euint32: [ - { inputs: [0x0000000000001000, 0x1000], output: true }, - { inputs: [0x0000000001001000, 0x1000], output: true }, - { inputs: [0x0000000000001000, 0x1001], output: false }, - ], - gt_euint64_euint32: [ - { inputs: [0x0000000000001000, 0x1000], output: false }, - { inputs: [0x0000000001001000, 0x1000], output: true }, - { inputs: [0x0000000000001000, 0x1001], output: false }, - ], - le_euint64_euint32: [ - { inputs: [0x0000000000001000, 0x1000], output: true }, - { inputs: [0x0000000001001000, 0x1000], output: false }, - { inputs: [0x0000000000001000, 0x1001], output: true }, - ], - lt_euint64_euint32: [ - { inputs: [0x0000000000001000, 0x1000], output: false }, - { inputs: [0x0000000001001000, 0x1000], output: false }, - { inputs: [0x0000000000001000, 0x1001], output: true }, - ], - min_euint64_euint32: [ - { inputs: [0x0000000000001000, 0x1000], output: 0x1000 }, - { inputs: [0x0000000001001000, 0x1000], output: 0x1000 }, - { inputs: [0x0000000000001000, 0x1001], output: 0x1000 }, - ], - max_euint64_euint32: [ - { inputs: [0x0000000000001000, 0x1000], output: 0x1000 }, - { inputs: [0x0000000001001000, 0x1000], output: 0x01001000 }, - { inputs: [0x0000000000001000, 0x1001], output: 0x1001 }, - ], - add_euint64_euint64: [{ inputs: [0x0000000000321000, 0x0000000000111000], output: 0x00432000 }], - sub_euint64_euint64: [{ inputs: [0x0000000000321000, 0x0000000000111000], output: 0x00210000 }], - mul_euint64_euint64: [{ inputs: [0x0000000000321000, 0x0000000000000020], output: 0x06420000 }], - and_euint64_euint64: [ - { inputs: [0x0000000000321000, 0x0000000054000000], output: 0x00000000 }, - { inputs: [0x0000000000321000, 0x0000000054030000], output: 0x00020000 }, - ], - or_euint64_euint64: [ - { inputs: [0x0000000000321000, 0x0000000054000000], output: 0x54321000 }, - { inputs: [0x0000000000321000, 0x0000000054030000], output: 0x54331000 }, - ], - xor_euint64_euint64: [ - { inputs: [0x0000000000321000, 0x0000000054000000], output: 0x54321000 }, - { inputs: [0x0000000000321000, 0x0000000054030000], output: 0x54311000 }, - ], - eq_euint64_euint64: [ - { inputs: [0x0000000000321000, 0x0000000000321000], output: true }, - { inputs: [0x0000000000321000, 0x0000000000321001], output: false }, - ], - ne_euint64_euint64: [ - { inputs: [0x0000000000321000, 0x0000000000321000], output: false }, - { inputs: [0x0000000000321000, 0x0000000000321001], output: true }, - ], - ge_euint64_euint64: [ - { inputs: [0x0000000000321000, 0x0000000000321000], output: true }, - { inputs: [0x0000000000321000, 0x0000000000321001], output: false }, - { inputs: [0x0000000000321000, 0x0000000000320fff], output: true }, - ], - gt_euint64_euint64: [ - { inputs: [0x0000000000321000, 0x0000000000321000], output: false }, - { inputs: [0x0000000000321000, 0x0000000000321001], output: false }, - { inputs: [0x0000000000321000, 0x0000000000320fff], output: true }, - ], - le_euint64_euint64: [ - { inputs: [0x0000000000321000, 0x0000000000321000], output: true }, - { inputs: [0x0000000000321000, 0x0000000000321001], output: true }, - { inputs: [0x0000000000321000, 0x0000000000320fff], output: false }, - ], - lt_euint64_euint64: [ - { inputs: [0x0000000000321000, 0x0000000000321000], output: false }, - { inputs: [0x0000000000321000, 0x0000000000321001], output: true }, - { inputs: [0x0000000000321000, 0x0000000000320fff], output: false }, - ], - min_euint64_euint64: [ - { inputs: [0x0000000000321000, 0x0000000000321000], output: 0x0000000000321000 }, - { inputs: [0x0000000000321000, 0x0000000000321001], output: 0x0000000000321000 }, - { inputs: [0x0000000000321000, 0x0000000000320fff], output: 0x0000000000320fff }, - ], - max_euint64_euint64: [ - { inputs: [0x0000000000321000, 0x0000000000321000], output: 0x0000000000321000 }, - { inputs: [0x0000000000321000, 0x0000000000321001], output: 0x0000000000321001 }, - { inputs: [0x0000000000321000, 0x0000000000320fff], output: 0x0000000000321000 }, - ], - add_euint64_uint64: [{ inputs: [0x0000000000342000, 0x0000000000321000], output: 0x0000000000663000 }], - add_uint64_euint64: [{ inputs: [0x0000000000342000, 0x0000000000321000], output: 0x0000000000663000 }], - sub_euint64_uint64: [{ inputs: [0x0000000000342000, 0x0000000000321000], output: 0x0000000000021000 }], - sub_uint64_euint64: [{ inputs: [0x0000000000342000, 0x0000000000321000], output: 0x0000000000021000 }], - mul_euint64_uint64: [{ inputs: [0x0000000000342000, 0x0000000000000100], output: 0x0000000034200000 }], - mul_uint64_euint64: [{ inputs: [0x0000000000342000, 0x0000000000000100], output: 0x0000000034200000 }], - div_euint64_uint64: [{ inputs: [0x0000000000342000, 0x0000000000000100], output: 0x0000000000003420 }], - rem_euint64_uint64: [{ inputs: [0x0000000000342039, 0x0000000000000100], output: 0x0000000000000039 }], - eq_euint64_uint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: true }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: false }, - ], - eq_uint64_euint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: true }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: false }, - ], - ne_euint64_uint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: false }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: true }, - ], - ne_uint64_euint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: false }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: true }, - ], - ge_euint64_uint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: true }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: false }, - { inputs: [0x0000000000342000, 0x0000000000341fff], output: true }, - ], - ge_uint64_euint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: true }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: false }, - { inputs: [0x0000000000342000, 0x0000000000341fff], output: true }, - ], - gt_euint64_uint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: false }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: false }, - { inputs: [0x0000000000342000, 0x0000000000341fff], output: true }, - ], - gt_uint64_euint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: false }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: false }, - { inputs: [0x0000000000342000, 0x0000000000341fff], output: true }, - ], - le_euint64_uint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: true }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: true }, - { inputs: [0x0000000000342000, 0x0000000000341fff], output: false }, - ], - le_uint64_euint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: true }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: true }, - { inputs: [0x0000000000342000, 0x0000000000341fff], output: false }, - ], - lt_euint64_uint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: false }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: true }, - { inputs: [0x0000000000342000, 0x0000000000341fff], output: false }, - ], - lt_uint64_euint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: false }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: true }, - { inputs: [0x0000000000342000, 0x0000000000341fff], output: false }, - ], - min_euint64_uint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: 0x0000000000342000 }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: 0x0000000000342000 }, - { inputs: [0x0000000000342000, 0x0000000000341fff], output: 0x0000000000341fff }, - ], - min_uint64_euint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: 0x0000000000342000 }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: 0x0000000000342000 }, - { inputs: [0x0000000000342000, 0x0000000000341fff], output: 0x0000000000341fff }, - ], - max_euint64_uint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: 0x0000000000342000 }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: 0x0000000000342001 }, - { inputs: [0x0000000000342000, 0x0000000000341fff], output: 0x0000000000342000 }, - ], - max_uint64_euint64: [ - { inputs: [0x0000000000342000, 0x0000000000342000], output: 0x0000000000342000 }, - { inputs: [0x0000000000342000, 0x0000000000342001], output: 0x0000000000342001 }, - { inputs: [0x0000000000342000, 0x0000000000341fff], output: 0x0000000000342000 }, - ], +export const overloadTests: { [methodName: string]: OverloadTest[] } = overloads as unknown as { + [methodName: string]: OverloadTest[]; }; diff --git a/codegen/overloads.json b/codegen/overloads.json new file mode 100644 index 00000000..7abcda16 --- /dev/null +++ b/codegen/overloads.json @@ -0,0 +1,2870 @@ +{ + "add_euint4_euint4": [ + { "inputs": ["11", "1"], "output": "12" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["5", "5"], "output": "10" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "add_euint4_euint8": [ + { "inputs": ["2", "12"], "output": "14" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["5", "5"], "output": "10" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "add_euint4_uint8": [ + { "inputs": ["7", "7"], "output": "14" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["5", "5"], "output": "10" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "add_euint4_euint16": [ + { "inputs": ["2", "9"], "output": "11" }, + { "inputs": ["6", "8"], "output": "14" }, + { "inputs": ["5", "5"], "output": "10" }, + { "inputs": ["8", "6"], "output": "14" } + ], + "add_euint4_euint32": [ + { "inputs": ["2", "11"], "output": "13" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["5", "5"], "output": "10" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "add_euint4_euint64": [ + { "inputs": ["2", "9"], "output": "11" }, + { "inputs": ["4", "6"], "output": "10" }, + { "inputs": ["6", "6"], "output": "12" }, + { "inputs": ["6", "4"], "output": "10" } + ], + "add_euint8_euint4": [ + { "inputs": ["9", "2"], "output": "11" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["5", "5"], "output": "10" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "add_uint8_euint4": [ + { "inputs": ["12", "3"], "output": "15" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["5", "5"], "output": "10" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "add_euint8_euint8": [ + { "inputs": ["93", "114"], "output": "207" }, + { "inputs": ["91", "93"], "output": "184" }, + { "inputs": ["93", "93"], "output": "186" }, + { "inputs": ["93", "91"], "output": "184" } + ], + "add_euint8_uint8": [ + { "inputs": ["93", "112"], "output": "205" }, + { "inputs": ["91", "93"], "output": "184" }, + { "inputs": ["93", "93"], "output": "186" }, + { "inputs": ["93", "91"], "output": "184" } + ], + "add_uint8_euint8": [ + { "inputs": ["34", "112"], "output": "146" }, + { "inputs": ["91", "93"], "output": "184" }, + { "inputs": ["93", "93"], "output": "186" }, + { "inputs": ["93", "91"], "output": "184" } + ], + "add_euint8_euint16": [ + { "inputs": ["2", "208"], "output": "210" }, + { "inputs": ["83", "85"], "output": "168" }, + { "inputs": ["85", "85"], "output": "170" }, + { "inputs": ["85", "83"], "output": "168" } + ], + "add_euint8_euint32": [ + { "inputs": ["2", "161"], "output": "163" }, + { "inputs": ["96", "100"], "output": "196" }, + { "inputs": ["100", "100"], "output": "200" }, + { "inputs": ["100", "96"], "output": "196" } + ], + "add_euint8_euint64": [ + { "inputs": ["2", "129"], "output": "131" }, + { "inputs": ["115", "119"], "output": "234" }, + { "inputs": ["119", "119"], "output": "238" }, + { "inputs": ["119", "115"], "output": "234" } + ], + "add_euint16_euint4": [ + { "inputs": ["13", "2"], "output": "15" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["5", "5"], "output": "10" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "add_euint16_euint8": [ + { "inputs": ["171", "2"], "output": "173" }, + { "inputs": ["7", "11"], "output": "18" }, + { "inputs": ["11", "11"], "output": "22" }, + { "inputs": ["11", "7"], "output": "18" } + ], + "add_euint16_euint16": [ + { "inputs": ["27226", "22058"], "output": "49284" }, + { "inputs": ["22056", "22058"], "output": "44114" }, + { "inputs": ["22058", "22058"], "output": "44116" }, + { "inputs": ["22058", "22056"], "output": "44114" } + ], + "add_euint16_uint16": [ + { "inputs": ["54451", "6303"], "output": "60754" }, + { "inputs": ["22056", "22058"], "output": "44114" }, + { "inputs": ["22058", "22058"], "output": "44116" }, + { "inputs": ["22058", "22056"], "output": "44114" } + ], + "add_uint16_euint16": [ + { "inputs": ["29751", "3152"], "output": "32903" }, + { "inputs": ["22056", "22058"], "output": "44114" }, + { "inputs": ["22058", "22058"], "output": "44116" }, + { "inputs": ["22058", "22056"], "output": "44114" } + ], + "add_euint16_euint32": [ + { "inputs": ["2", "41075"], "output": "41077" }, + { "inputs": ["25150", "25154"], "output": "50304" }, + { "inputs": ["25154", "25154"], "output": "50308" }, + { "inputs": ["25154", "25150"], "output": "50304" } + ], + "add_euint16_euint64": [ + { "inputs": ["2", "65518"], "output": "65520" }, + { "inputs": ["22742", "22744"], "output": "45486" }, + { "inputs": ["22744", "22744"], "output": "45488" }, + { "inputs": ["22744", "22742"], "output": "45486" } + ], + "add_euint32_euint4": [ + { "inputs": ["11", "2"], "output": "13" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["5", "5"], "output": "10" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "add_euint32_euint8": [ + { "inputs": ["186", "2"], "output": "188" }, + { "inputs": ["69", "71"], "output": "140" }, + { "inputs": ["71", "71"], "output": "142" }, + { "inputs": ["71", "69"], "output": "140" } + ], + "add_euint32_euint16": [ + { "inputs": ["40687", "4"], "output": "40691" }, + { "inputs": ["18607", "18611"], "output": "37218" }, + { "inputs": ["18611", "18611"], "output": "37222" }, + { "inputs": ["18611", "18607"], "output": "37218" } + ], + "add_euint32_euint32": [ + { "inputs": ["2163343287", "829836787"], "output": "2993180074" }, + { "inputs": ["829836783", "829836787"], "output": "1659673570" }, + { "inputs": ["829836787", "829836787"], "output": "1659673574" }, + { "inputs": ["829836787", "829836783"], "output": "1659673570" } + ], + "add_euint32_uint32": [ + { "inputs": ["1081671644", "1277295402"], "output": "2358967046" }, + { "inputs": ["829836783", "829836787"], "output": "1659673570" }, + { "inputs": ["829836787", "829836787"], "output": "1659673574" }, + { "inputs": ["829836787", "829836783"], "output": "1659673570" } + ], + "add_uint32_euint32": [ + { "inputs": ["1301306419", "1277295402"], "output": "2578601821" }, + { "inputs": ["829836783", "829836787"], "output": "1659673570" }, + { "inputs": ["829836787", "829836787"], "output": "1659673574" }, + { "inputs": ["829836787", "829836783"], "output": "1659673570" } + ], + "add_euint32_euint64": [ + { "inputs": ["2", "4293304478"], "output": "4293304480" }, + { "inputs": ["2093298939", "2093298943"], "output": "4186597882" }, + { "inputs": ["2093298943", "2093298943"], "output": "4186597886" }, + { "inputs": ["2093298943", "2093298939"], "output": "4186597882" } + ], + "add_euint64_euint4": [ + { "inputs": ["9", "2"], "output": "11" }, + { "inputs": ["6", "8"], "output": "14" }, + { "inputs": ["5", "5"], "output": "10" }, + { "inputs": ["8", "6"], "output": "14" } + ], + "add_euint64_euint8": [ + { "inputs": ["129", "2"], "output": "131" }, + { "inputs": ["98", "102"], "output": "200" }, + { "inputs": ["102", "102"], "output": "204" }, + { "inputs": ["102", "98"], "output": "200" } + ], + "add_euint64_euint16": [ + { "inputs": ["65532", "2"], "output": "65534" }, + { "inputs": ["23282", "23284"], "output": "46566" }, + { "inputs": ["23284", "23284"], "output": "46568" }, + { "inputs": ["23284", "23282"], "output": "46566" } + ], + "add_euint64_euint32": [ + { "inputs": ["4293362093", "2"], "output": "4293362095" }, + { "inputs": ["1194292230", "1194292232"], "output": "2388584462" }, + { "inputs": ["1194292232", "1194292232"], "output": "2388584464" }, + { "inputs": ["1194292232", "1194292230"], "output": "2388584462" } + ], + "add_euint64_euint64": [ + { "inputs": ["9223329218882461797", "9219964371310000511"], "output": "18443293590192462308" }, + { "inputs": ["9219964371310000509", "9219964371310000511"], "output": "18439928742620001020" }, + { "inputs": ["9219964371310000511", "9219964371310000511"], "output": "18439928742620001022" }, + { "inputs": ["9219964371310000511", "9219964371310000509"], "output": "18439928742620001020" } + ], + "add_euint64_uint64": [ + { "inputs": ["9223329218882461797", "9220956803715422232"], "output": "18444286022597884029" }, + { "inputs": ["9219964371310000509", "9219964371310000511"], "output": "18439928742620001020" }, + { "inputs": ["9219964371310000511", "9219964371310000511"], "output": "18439928742620001022" }, + { "inputs": ["9219964371310000511", "9219964371310000509"], "output": "18439928742620001020" } + ], + "add_uint64_euint64": [ + { "inputs": ["9219177655732910821", "9220956803715422232"], "output": "18440134459448333053" }, + { "inputs": ["9219964371310000509", "9219964371310000511"], "output": "18439928742620001020" }, + { "inputs": ["9219964371310000511", "9219964371310000511"], "output": "18439928742620001022" }, + { "inputs": ["9219964371310000511", "9219964371310000509"], "output": "18439928742620001020" } + ], + "sub_euint4_euint4": [ + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "sub_euint4_euint8": [ + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "sub_euint4_uint8": [ + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "sub_euint4_euint16": [ + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "sub_euint4_euint32": [ + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "sub_euint4_euint64": [ + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "sub_euint8_euint4": [ + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "sub_uint8_euint4": [ + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "sub_euint8_euint8": [ + { "inputs": ["52", "52"], "output": "0" }, + { "inputs": ["52", "48"], "output": "4" } + ], + "sub_euint8_uint8": [ + { "inputs": ["52", "52"], "output": "0" }, + { "inputs": ["52", "48"], "output": "4" } + ], + "sub_uint8_euint8": [ + { "inputs": ["52", "52"], "output": "0" }, + { "inputs": ["52", "48"], "output": "4" } + ], + "sub_euint8_euint16": [ + { "inputs": ["236", "236"], "output": "0" }, + { "inputs": ["236", "232"], "output": "4" } + ], + "sub_euint8_euint32": [ + { "inputs": ["83", "83"], "output": "0" }, + { "inputs": ["83", "79"], "output": "4" } + ], + "sub_euint8_euint64": [ + { "inputs": ["168", "168"], "output": "0" }, + { "inputs": ["168", "164"], "output": "4" } + ], + "sub_euint16_euint4": [ + { "inputs": ["14", "14"], "output": "0" }, + { "inputs": ["14", "10"], "output": "4" } + ], + "sub_euint16_euint8": [ + { "inputs": ["166", "166"], "output": "0" }, + { "inputs": ["166", "162"], "output": "4" } + ], + "sub_euint16_euint16": [ + { "inputs": ["56955", "56955"], "output": "0" }, + { "inputs": ["56955", "56951"], "output": "4" } + ], + "sub_euint16_uint16": [ + { "inputs": ["56955", "56955"], "output": "0" }, + { "inputs": ["56955", "56951"], "output": "4" } + ], + "sub_uint16_euint16": [ + { "inputs": ["56955", "56955"], "output": "0" }, + { "inputs": ["56955", "56951"], "output": "4" } + ], + "sub_euint16_euint32": [ + { "inputs": ["42408", "42408"], "output": "0" }, + { "inputs": ["42408", "42404"], "output": "4" } + ], + "sub_euint16_euint64": [ + { "inputs": ["8385", "8385"], "output": "0" }, + { "inputs": ["8385", "8381"], "output": "4" } + ], + "sub_euint32_euint4": [ + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "sub_euint32_euint8": [ + { "inputs": ["179", "179"], "output": "0" }, + { "inputs": ["179", "175"], "output": "4" } + ], + "sub_euint32_euint16": [ + { "inputs": ["47991", "47991"], "output": "0" }, + { "inputs": ["47991", "47987"], "output": "4" } + ], + "sub_euint32_euint32": [ + { "inputs": ["3061205449", "3061205449"], "output": "0" }, + { "inputs": ["3061205449", "3061205445"], "output": "4" } + ], + "sub_euint32_uint32": [ + { "inputs": ["3061205449", "3061205449"], "output": "0" }, + { "inputs": ["3061205449", "3061205445"], "output": "4" } + ], + "sub_uint32_euint32": [ + { "inputs": ["3061205449", "3061205449"], "output": "0" }, + { "inputs": ["3061205449", "3061205445"], "output": "4" } + ], + "sub_euint32_euint64": [ + { "inputs": ["1018084759", "1018084759"], "output": "0" }, + { "inputs": ["1018084759", "1018084755"], "output": "4" } + ], + "sub_euint64_euint4": [ + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "sub_euint64_euint8": [ + { "inputs": ["101", "101"], "output": "0" }, + { "inputs": ["101", "97"], "output": "4" } + ], + "sub_euint64_euint16": [ + { "inputs": ["25338", "25338"], "output": "0" }, + { "inputs": ["25338", "25334"], "output": "4" } + ], + "sub_euint64_euint32": [ + { "inputs": ["624820999", "624820999"], "output": "0" }, + { "inputs": ["624820999", "624820995"], "output": "4" } + ], + "sub_euint64_euint64": [ + { "inputs": ["18445117613821089157", "18445117613821089157"], "output": "0" }, + { "inputs": ["18445117613821089157", "18445117613821089153"], "output": "4" } + ], + "sub_euint64_uint64": [ + { "inputs": ["18445117613821089157", "18445117613821089157"], "output": "0" }, + { "inputs": ["18445117613821089157", "18445117613821089153"], "output": "4" } + ], + "sub_uint64_euint64": [ + { "inputs": ["18445117613821089157", "18445117613821089157"], "output": "0" }, + { "inputs": ["18445117613821089157", "18445117613821089153"], "output": "4" } + ], + "mul_euint4_euint4": [ + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["3", "4"], "output": "12" }, + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["4", "3"], "output": "12" } + ], + "mul_euint4_euint8": [ + { "inputs": ["1", "14"], "output": "14" }, + { "inputs": ["3", "5"], "output": "15" }, + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["5", "3"], "output": "15" } + ], + "mul_euint4_uint8": [ + { "inputs": ["1", "10"], "output": "10" }, + { "inputs": ["3", "5"], "output": "15" }, + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["5", "3"], "output": "15" } + ], + "mul_euint4_euint16": [ + { "inputs": ["2", "5"], "output": "10" }, + { "inputs": ["3", "5"], "output": "15" }, + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["5", "3"], "output": "15" } + ], + "mul_euint4_euint32": [ + { "inputs": ["2", "7"], "output": "14" }, + { "inputs": ["3", "4"], "output": "12" }, + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["4", "3"], "output": "12" } + ], + "mul_euint4_euint64": [ + { "inputs": ["2", "5"], "output": "10" }, + { "inputs": ["3", "5"], "output": "15" }, + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["5", "3"], "output": "15" } + ], + "mul_euint8_euint4": [ + { "inputs": ["5", "2"], "output": "10" }, + { "inputs": ["3", "4"], "output": "12" }, + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["4", "3"], "output": "12" } + ], + "mul_uint8_euint4": [ + { "inputs": ["1", "10"], "output": "10" }, + { "inputs": ["3", "4"], "output": "12" }, + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["4", "3"], "output": "12" } + ], + "mul_euint8_euint8": [ + { "inputs": ["9", "17"], "output": "153" }, + { "inputs": ["15", "16"], "output": "240" }, + { "inputs": ["9", "9"], "output": "81" }, + { "inputs": ["16", "15"], "output": "240" } + ], + "mul_euint8_uint8": [ + { "inputs": ["16", "7"], "output": "112" }, + { "inputs": ["15", "16"], "output": "240" }, + { "inputs": ["9", "9"], "output": "81" }, + { "inputs": ["16", "15"], "output": "240" } + ], + "mul_uint8_euint8": [ + { "inputs": ["14", "12"], "output": "168" }, + { "inputs": ["15", "16"], "output": "240" }, + { "inputs": ["9", "9"], "output": "81" }, + { "inputs": ["16", "15"], "output": "240" } + ], + "mul_euint8_euint16": [ + { "inputs": ["3", "60"], "output": "180" }, + { "inputs": ["9", "9"], "output": "81" }, + { "inputs": ["9", "9"], "output": "81" }, + { "inputs": ["9", "9"], "output": "81" } + ], + "mul_euint8_euint32": [ + { "inputs": ["2", "96"], "output": "192" }, + { "inputs": ["10", "12"], "output": "120" }, + { "inputs": ["12", "12"], "output": "144" }, + { "inputs": ["12", "10"], "output": "120" } + ], + "mul_euint8_euint64": [ + { "inputs": ["2", "65"], "output": "130" }, + { "inputs": ["10", "11"], "output": "110" }, + { "inputs": ["11", "11"], "output": "121" }, + { "inputs": ["11", "10"], "output": "110" } + ], + "mul_euint16_euint4": [ + { "inputs": ["7", "2"], "output": "14" }, + { "inputs": ["3", "5"], "output": "15" }, + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["5", "3"], "output": "15" } + ], + "mul_euint16_euint8": [ + { "inputs": ["110", "2"], "output": "220" }, + { "inputs": ["13", "13"], "output": "169" }, + { "inputs": ["13", "13"], "output": "169" }, + { "inputs": ["13", "13"], "output": "169" } + ], + "mul_euint16_euint16": [ + { "inputs": ["120", "150"], "output": "18000" }, + { "inputs": ["239", "239"], "output": "57121" }, + { "inputs": ["239", "239"], "output": "57121" }, + { "inputs": ["239", "239"], "output": "57121" } + ], + "mul_euint16_uint16": [ + { "inputs": ["239", "131"], "output": "31309" }, + { "inputs": ["239", "239"], "output": "57121" }, + { "inputs": ["239", "239"], "output": "57121" }, + { "inputs": ["239", "239"], "output": "57121" } + ], + "mul_uint16_euint16": [ + { "inputs": ["190", "131"], "output": "24890" }, + { "inputs": ["239", "239"], "output": "57121" }, + { "inputs": ["239", "239"], "output": "57121" }, + { "inputs": ["239", "239"], "output": "57121" } + ], + "mul_euint16_euint32": [ + { "inputs": ["2", "32121"], "output": "64242" }, + { "inputs": ["235", "235"], "output": "55225" }, + { "inputs": ["235", "235"], "output": "55225" }, + { "inputs": ["235", "235"], "output": "55225" } + ], + "mul_euint16_euint64": [ + { "inputs": ["2", "32761"], "output": "65522" }, + { "inputs": ["251", "251"], "output": "63001" }, + { "inputs": ["251", "251"], "output": "63001" }, + { "inputs": ["251", "251"], "output": "63001" } + ], + "mul_euint32_euint4": [ + { "inputs": ["5", "2"], "output": "10" }, + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["3", "3"], "output": "9" } + ], + "mul_euint32_euint8": [ + { "inputs": ["107", "2"], "output": "214" }, + { "inputs": ["12", "12"], "output": "144" }, + { "inputs": ["12", "12"], "output": "144" }, + { "inputs": ["12", "12"], "output": "144" } + ], + "mul_euint32_euint16": [ + { "inputs": ["30409", "2"], "output": "60818" }, + { "inputs": ["152", "152"], "output": "23104" }, + { "inputs": ["152", "152"], "output": "23104" }, + { "inputs": ["152", "152"], "output": "23104" } + ], + "mul_euint32_euint32": [ + { "inputs": ["42467", "41983"], "output": "1782892061" }, + { "inputs": ["41983", "41983"], "output": "1762572289" }, + { "inputs": ["41983", "41983"], "output": "1762572289" }, + { "inputs": ["41983", "41983"], "output": "1762572289" } + ], + "mul_euint32_uint32": [ + { "inputs": ["42467", "65037"], "output": "2761926279" }, + { "inputs": ["41983", "41983"], "output": "1762572289" }, + { "inputs": ["41983", "41983"], "output": "1762572289" }, + { "inputs": ["41983", "41983"], "output": "1762572289" } + ], + "mul_uint32_euint32": [ + { "inputs": ["17461", "65037"], "output": "1135611057" }, + { "inputs": ["41983", "41983"], "output": "1762572289" }, + { "inputs": ["41983", "41983"], "output": "1762572289" }, + { "inputs": ["41983", "41983"], "output": "1762572289" } + ], + "mul_euint32_euint64": [ + { "inputs": ["2", "2147115345"], "output": "4294230690" }, + { "inputs": ["46957", "46957"], "output": "2204959849" }, + { "inputs": ["46957", "46957"], "output": "2204959849" }, + { "inputs": ["46957", "46957"], "output": "2204959849" } + ], + "mul_euint64_euint4": [ + { "inputs": ["5", "2"], "output": "10" }, + { "inputs": ["3", "5"], "output": "15" }, + { "inputs": ["3", "3"], "output": "9" }, + { "inputs": ["5", "3"], "output": "15" } + ], + "mul_euint64_euint8": [ + { "inputs": ["65", "2"], "output": "130" }, + { "inputs": ["15", "15"], "output": "225" }, + { "inputs": ["15", "15"], "output": "225" }, + { "inputs": ["15", "15"], "output": "225" } + ], + "mul_euint64_euint16": [ + { "inputs": ["32765", "2"], "output": "65530" }, + { "inputs": ["163", "163"], "output": "26569" }, + { "inputs": ["163", "163"], "output": "26569" }, + { "inputs": ["163", "163"], "output": "26569" } + ], + "mul_euint64_euint32": [ + { "inputs": ["2147410658", "2"], "output": "4294821316" }, + { "inputs": ["32881", "32881"], "output": "1081160161" }, + { "inputs": ["32881", "32881"], "output": "1081160161" }, + { "inputs": ["32881", "32881"], "output": "1081160161" } + ], + "mul_euint64_euint64": [ + { "inputs": ["4294635170", "4293288604"], "output": "18438108233698602680" }, + { "inputs": ["4293288604", "4293288604"], "output": "18432327037236268816" }, + { "inputs": ["4293288604", "4293288604"], "output": "18432327037236268816" }, + { "inputs": ["4293288604", "4293288604"], "output": "18432327037236268816" } + ], + "mul_euint64_uint64": [ + { "inputs": ["4294635170", "4293232253"], "output": "18437866226712138010" }, + { "inputs": ["4293288604", "4293288604"], "output": "18432327037236268816" }, + { "inputs": ["4293288604", "4293288604"], "output": "18432327037236268816" }, + { "inputs": ["4293288604", "4293288604"], "output": "18432327037236268816" } + ], + "mul_uint64_euint64": [ + { "inputs": ["4294226236", "4293232253"], "output": "18436110578073989708" }, + { "inputs": ["4293288604", "4293288604"], "output": "18432327037236268816" }, + { "inputs": ["4293288604", "4293288604"], "output": "18432327037236268816" }, + { "inputs": ["4293288604", "4293288604"], "output": "18432327037236268816" } + ], + "div_euint4_uint8": [ + { "inputs": ["3", "6"], "output": "0" }, + { "inputs": ["4", "8"], "output": "0" }, + { "inputs": ["8", "8"], "output": "1" }, + { "inputs": ["8", "4"], "output": "2" } + ], + "div_euint8_uint8": [ + { "inputs": ["123", "214"], "output": "0" }, + { "inputs": ["20", "24"], "output": "0" }, + { "inputs": ["24", "24"], "output": "1" }, + { "inputs": ["24", "20"], "output": "1" } + ], + "div_euint16_uint16": [ + { "inputs": ["61139", "60988"], "output": "1" }, + { "inputs": ["59165", "59169"], "output": "0" }, + { "inputs": ["59169", "59169"], "output": "1" }, + { "inputs": ["59169", "59165"], "output": "1" } + ], + "div_euint32_uint32": [ + { "inputs": ["1945845245", "755191882"], "output": "2" }, + { "inputs": ["1945845241", "1945845245"], "output": "0" }, + { "inputs": ["1945845245", "1945845245"], "output": "1" }, + { "inputs": ["1945845245", "1945845241"], "output": "1" } + ], + "div_euint64_uint64": [ + { "inputs": ["18441976837575510865", "18441212274805422577"], "output": "1" }, + { "inputs": ["18441976837575510861", "18441976837575510865"], "output": "0" }, + { "inputs": ["18441976837575510865", "18441976837575510865"], "output": "1" }, + { "inputs": ["18441976837575510865", "18441976837575510861"], "output": "1" } + ], + "rem_euint4_uint8": [ + { "inputs": ["4", "10"], "output": "4" }, + { "inputs": ["4", "8"], "output": "4" }, + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "0" } + ], + "rem_euint8_uint8": [ + { "inputs": ["144", "19"], "output": "11" }, + { "inputs": ["140", "144"], "output": "140" }, + { "inputs": ["144", "144"], "output": "0" }, + { "inputs": ["144", "140"], "output": "4" } + ], + "rem_euint16_uint16": [ + { "inputs": ["18856", "18330"], "output": "526" }, + { "inputs": ["18852", "18856"], "output": "18852" }, + { "inputs": ["18856", "18856"], "output": "0" }, + { "inputs": ["18856", "18852"], "output": "4" } + ], + "rem_euint32_uint32": [ + { "inputs": ["2521442787", "706504920"], "output": "401928027" }, + { "inputs": ["2521442783", "2521442787"], "output": "2521442783" }, + { "inputs": ["2521442787", "2521442787"], "output": "0" }, + { "inputs": ["2521442787", "2521442783"], "output": "4" } + ], + "rem_euint64_uint64": [ + { "inputs": ["18443785129295236141", "18441307989286811147"], "output": "2477140008424994" }, + { "inputs": ["18438390548915069819", "18438390548915069823"], "output": "18438390548915069819" }, + { "inputs": ["18438390548915069823", "18438390548915069823"], "output": "0" }, + { "inputs": ["18438390548915069823", "18438390548915069819"], "output": "4" } + ], + "le_euint4_euint4": [ + { "inputs": ["8", "6"], "output": false }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "le_euint4_euint8": [ + { "inputs": ["14", "151"], "output": true }, + { "inputs": ["10", "14"], "output": true }, + { "inputs": ["14", "14"], "output": true }, + { "inputs": ["14", "10"], "output": false } + ], + "le_euint4_uint8": [ + { "inputs": ["14", "8"], "output": false }, + { "inputs": ["10", "14"], "output": true }, + { "inputs": ["14", "14"], "output": true }, + { "inputs": ["14", "10"], "output": false } + ], + "le_euint4_euint16": [ + { "inputs": ["1", "51341"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "le_euint4_euint32": [ + { "inputs": ["9", "467708048"], "output": true }, + { "inputs": ["5", "9"], "output": true }, + { "inputs": ["9", "9"], "output": true }, + { "inputs": ["9", "5"], "output": false } + ], + "le_euint4_euint64": [ + { "inputs": ["12", "18438657387678135029"], "output": true }, + { "inputs": ["8", "12"], "output": true }, + { "inputs": ["12", "12"], "output": true }, + { "inputs": ["12", "8"], "output": false } + ], + "le_euint8_euint4": [ + { "inputs": ["194", "8"], "output": false }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "le_uint8_euint4": [ + { "inputs": ["11", "8"], "output": false }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "le_euint8_euint8": [ + { "inputs": ["102", "4"], "output": false }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "le_euint8_uint8": [ + { "inputs": ["102", "85"], "output": false }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "le_uint8_euint8": [ + { "inputs": ["46", "85"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "le_euint8_euint16": [ + { "inputs": ["31", "28651"], "output": true }, + { "inputs": ["27", "31"], "output": true }, + { "inputs": ["31", "31"], "output": true }, + { "inputs": ["31", "27"], "output": false } + ], + "le_euint8_euint32": [ + { "inputs": ["200", "2966523441"], "output": true }, + { "inputs": ["196", "200"], "output": true }, + { "inputs": ["200", "200"], "output": true }, + { "inputs": ["200", "196"], "output": false } + ], + "le_euint8_euint64": [ + { "inputs": ["80", "18440486388708045995"], "output": true }, + { "inputs": ["76", "80"], "output": true }, + { "inputs": ["80", "80"], "output": true }, + { "inputs": ["80", "76"], "output": false } + ], + "le_euint16_euint4": [ + { "inputs": ["7456", "9"], "output": false }, + { "inputs": ["5", "9"], "output": true }, + { "inputs": ["9", "9"], "output": true }, + { "inputs": ["9", "5"], "output": false } + ], + "le_euint16_euint8": [ + { "inputs": ["3242", "147"], "output": false }, + { "inputs": ["143", "147"], "output": true }, + { "inputs": ["147", "147"], "output": true }, + { "inputs": ["147", "143"], "output": false } + ], + "le_euint16_euint16": [ + { "inputs": ["9281", "48556"], "output": true }, + { "inputs": ["9277", "9281"], "output": true }, + { "inputs": ["9281", "9281"], "output": true }, + { "inputs": ["9281", "9277"], "output": false } + ], + "le_euint16_uint16": [ + { "inputs": ["9281", "23936"], "output": true }, + { "inputs": ["9277", "9281"], "output": true }, + { "inputs": ["9281", "9281"], "output": true }, + { "inputs": ["9281", "9277"], "output": false } + ], + "le_uint16_euint16": [ + { "inputs": ["49675", "23936"], "output": false }, + { "inputs": ["9277", "9281"], "output": true }, + { "inputs": ["9281", "9281"], "output": true }, + { "inputs": ["9281", "9277"], "output": false } + ], + "le_euint16_euint32": [ + { "inputs": ["42248", "3250361677"], "output": true }, + { "inputs": ["42244", "42248"], "output": true }, + { "inputs": ["42248", "42248"], "output": true }, + { "inputs": ["42248", "42244"], "output": false } + ], + "le_euint16_euint64": [ + { "inputs": ["16281", "18438048148950562767"], "output": true }, + { "inputs": ["16277", "16281"], "output": true }, + { "inputs": ["16281", "16281"], "output": true }, + { "inputs": ["16281", "16277"], "output": false } + ], + "le_euint32_euint4": [ + { "inputs": ["4064031115", "9"], "output": false }, + { "inputs": ["5", "9"], "output": true }, + { "inputs": ["9", "9"], "output": true }, + { "inputs": ["9", "5"], "output": false } + ], + "le_euint32_euint8": [ + { "inputs": ["3743657855", "103"], "output": false }, + { "inputs": ["99", "103"], "output": true }, + { "inputs": ["103", "103"], "output": true }, + { "inputs": ["103", "99"], "output": false } + ], + "le_euint32_euint16": [ + { "inputs": ["1673073080", "44621"], "output": false }, + { "inputs": ["44617", "44621"], "output": true }, + { "inputs": ["44621", "44621"], "output": true }, + { "inputs": ["44621", "44617"], "output": false } + ], + "le_euint32_euint32": [ + { "inputs": ["989604334", "3011475023"], "output": true }, + { "inputs": ["989604330", "989604334"], "output": true }, + { "inputs": ["989604334", "989604334"], "output": true }, + { "inputs": ["989604334", "989604330"], "output": false } + ], + "le_euint32_uint32": [ + { "inputs": ["989604334", "2400461325"], "output": true }, + { "inputs": ["989604330", "989604334"], "output": true }, + { "inputs": ["989604334", "989604334"], "output": true }, + { "inputs": ["989604334", "989604330"], "output": false } + ], + "le_uint32_euint32": [ + { "inputs": ["3171491075", "2400461325"], "output": false }, + { "inputs": ["989604330", "989604334"], "output": true }, + { "inputs": ["989604334", "989604334"], "output": true }, + { "inputs": ["989604334", "989604330"], "output": false } + ], + "le_euint32_euint64": [ + { "inputs": ["3652038615", "18440248369616077365"], "output": true }, + { "inputs": ["3652038611", "3652038615"], "output": true }, + { "inputs": ["3652038615", "3652038615"], "output": true }, + { "inputs": ["3652038615", "3652038611"], "output": false } + ], + "le_euint64_euint4": [ + { "inputs": ["18446127513373335953", "14"], "output": false }, + { "inputs": ["10", "14"], "output": true }, + { "inputs": ["14", "14"], "output": true }, + { "inputs": ["14", "10"], "output": false } + ], + "le_euint64_euint8": [ + { "inputs": ["18446424442125229129", "19"], "output": false }, + { "inputs": ["15", "19"], "output": true }, + { "inputs": ["19", "19"], "output": true }, + { "inputs": ["19", "15"], "output": false } + ], + "le_euint64_euint16": [ + { "inputs": ["18442809234541757919", "39205"], "output": false }, + { "inputs": ["39201", "39205"], "output": true }, + { "inputs": ["39205", "39205"], "output": true }, + { "inputs": ["39205", "39201"], "output": false } + ], + "le_euint64_euint32": [ + { "inputs": ["18439009396144568585", "2271345781"], "output": false }, + { "inputs": ["2271345777", "2271345781"], "output": true }, + { "inputs": ["2271345781", "2271345781"], "output": true }, + { "inputs": ["2271345781", "2271345777"], "output": false } + ], + "le_euint64_euint64": [ + { "inputs": ["18440769778451615393", "18446070761608442971"], "output": true }, + { "inputs": ["18440769778451615389", "18440769778451615393"], "output": true }, + { "inputs": ["18440769778451615393", "18440769778451615393"], "output": true }, + { "inputs": ["18440769778451615393", "18440769778451615389"], "output": false } + ], + "le_euint64_uint64": [ + { "inputs": ["18440769778451615393", "18439065451314752761"], "output": false }, + { "inputs": ["18440769778451615389", "18440769778451615393"], "output": true }, + { "inputs": ["18440769778451615393", "18440769778451615393"], "output": true }, + { "inputs": ["18440769778451615393", "18440769778451615389"], "output": false } + ], + "le_uint64_euint64": [ + { "inputs": ["18440980092932624951", "18439065451314752761"], "output": false }, + { "inputs": ["18440769778451615389", "18440769778451615393"], "output": true }, + { "inputs": ["18440769778451615393", "18440769778451615393"], "output": true }, + { "inputs": ["18440769778451615393", "18440769778451615389"], "output": false } + ], + "lt_euint4_euint4": [ + { "inputs": ["10", "9"], "output": false }, + { "inputs": ["5", "9"], "output": true }, + { "inputs": ["9", "9"], "output": false }, + { "inputs": ["9", "5"], "output": false } + ], + "lt_euint4_euint8": [ + { "inputs": ["7", "92"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": false } + ], + "lt_euint4_uint8": [ + { "inputs": ["7", "14"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": false } + ], + "lt_euint4_euint16": [ + { "inputs": ["6", "15496"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": false } + ], + "lt_euint4_euint32": [ + { "inputs": ["11", "1378961804"], "output": true }, + { "inputs": ["7", "11"], "output": true }, + { "inputs": ["11", "11"], "output": false }, + { "inputs": ["11", "7"], "output": false } + ], + "lt_euint4_euint64": [ + { "inputs": ["8", "18442139041620940861"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": false } + ], + "lt_euint8_euint4": [ + { "inputs": ["130", "5"], "output": false }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": false } + ], + "lt_uint8_euint4": [ + { "inputs": ["12", "5"], "output": false }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": false } + ], + "lt_euint8_euint8": [ + { "inputs": ["253", "98"], "output": false }, + { "inputs": ["94", "98"], "output": true }, + { "inputs": ["98", "98"], "output": false }, + { "inputs": ["98", "94"], "output": false } + ], + "lt_euint8_uint8": [ + { "inputs": ["253", "9"], "output": false }, + { "inputs": ["94", "98"], "output": true }, + { "inputs": ["98", "98"], "output": false }, + { "inputs": ["98", "94"], "output": false } + ], + "lt_uint8_euint8": [ + { "inputs": ["79", "9"], "output": false }, + { "inputs": ["94", "98"], "output": true }, + { "inputs": ["98", "98"], "output": false }, + { "inputs": ["98", "94"], "output": false } + ], + "lt_euint8_euint16": [ + { "inputs": ["113", "2877"], "output": true }, + { "inputs": ["109", "113"], "output": true }, + { "inputs": ["113", "113"], "output": false }, + { "inputs": ["113", "109"], "output": false } + ], + "lt_euint8_euint32": [ + { "inputs": ["80", "2205479823"], "output": true }, + { "inputs": ["76", "80"], "output": true }, + { "inputs": ["80", "80"], "output": false }, + { "inputs": ["80", "76"], "output": false } + ], + "lt_euint8_euint64": [ + { "inputs": ["190", "18443665731691391943"], "output": true }, + { "inputs": ["186", "190"], "output": true }, + { "inputs": ["190", "190"], "output": false }, + { "inputs": ["190", "186"], "output": false } + ], + "lt_euint16_euint4": [ + { "inputs": ["53504", "6"], "output": false }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": false } + ], + "lt_euint16_euint8": [ + { "inputs": ["42518", "110"], "output": false }, + { "inputs": ["106", "110"], "output": true }, + { "inputs": ["110", "110"], "output": false }, + { "inputs": ["110", "106"], "output": false } + ], + "lt_euint16_euint16": [ + { "inputs": ["44794", "23290"], "output": false }, + { "inputs": ["23286", "23290"], "output": true }, + { "inputs": ["23290", "23290"], "output": false }, + { "inputs": ["23290", "23286"], "output": false } + ], + "lt_euint16_uint16": [ + { "inputs": ["44794", "29106"], "output": false }, + { "inputs": ["23286", "23290"], "output": true }, + { "inputs": ["23290", "23290"], "output": false }, + { "inputs": ["23290", "23286"], "output": false } + ], + "lt_uint16_euint16": [ + { "inputs": ["11942", "29106"], "output": true }, + { "inputs": ["23286", "23290"], "output": true }, + { "inputs": ["23290", "23290"], "output": false }, + { "inputs": ["23290", "23286"], "output": false } + ], + "lt_euint16_euint32": [ + { "inputs": ["45430", "522886914"], "output": true }, + { "inputs": ["45426", "45430"], "output": true }, + { "inputs": ["45430", "45430"], "output": false }, + { "inputs": ["45430", "45426"], "output": false } + ], + "lt_euint16_euint64": [ + { "inputs": ["18995", "18443093417222594453"], "output": true }, + { "inputs": ["18991", "18995"], "output": true }, + { "inputs": ["18995", "18995"], "output": false }, + { "inputs": ["18995", "18991"], "output": false } + ], + "lt_euint32_euint4": [ + { "inputs": ["3623618060", "5"], "output": false }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": false } + ], + "lt_euint32_euint8": [ + { "inputs": ["800790361", "82"], "output": false }, + { "inputs": ["78", "82"], "output": true }, + { "inputs": ["82", "82"], "output": false }, + { "inputs": ["82", "78"], "output": false } + ], + "lt_euint32_euint16": [ + { "inputs": ["2528767958", "64360"], "output": false }, + { "inputs": ["64356", "64360"], "output": true }, + { "inputs": ["64360", "64360"], "output": false }, + { "inputs": ["64360", "64356"], "output": false } + ], + "lt_euint32_euint32": [ + { "inputs": ["3432727362", "2953663248"], "output": false }, + { "inputs": ["2953663244", "2953663248"], "output": true }, + { "inputs": ["2953663248", "2953663248"], "output": false }, + { "inputs": ["2953663248", "2953663244"], "output": false } + ], + "lt_euint32_uint32": [ + { "inputs": ["3432727362", "340267218"], "output": false }, + { "inputs": ["2953663244", "2953663248"], "output": true }, + { "inputs": ["2953663248", "2953663248"], "output": false }, + { "inputs": ["2953663248", "2953663244"], "output": false } + ], + "lt_uint32_euint32": [ + { "inputs": ["254860119", "340267218"], "output": true }, + { "inputs": ["2953663244", "2953663248"], "output": true }, + { "inputs": ["2953663248", "2953663248"], "output": false }, + { "inputs": ["2953663248", "2953663244"], "output": false } + ], + "lt_euint32_euint64": [ + { "inputs": ["1728686329", "18442541149578902807"], "output": true }, + { "inputs": ["1728686325", "1728686329"], "output": true }, + { "inputs": ["1728686329", "1728686329"], "output": false }, + { "inputs": ["1728686329", "1728686325"], "output": false } + ], + "lt_euint64_euint4": [ + { "inputs": ["18440890716948813157", "11"], "output": false }, + { "inputs": ["7", "11"], "output": true }, + { "inputs": ["11", "11"], "output": false }, + { "inputs": ["11", "7"], "output": false } + ], + "lt_euint64_euint8": [ + { "inputs": ["18445717540030063977", "27"], "output": false }, + { "inputs": ["23", "27"], "output": true }, + { "inputs": ["27", "27"], "output": false }, + { "inputs": ["27", "23"], "output": false } + ], + "lt_euint64_euint16": [ + { "inputs": ["18443664339829863559", "39059"], "output": false }, + { "inputs": ["39055", "39059"], "output": true }, + { "inputs": ["39059", "39059"], "output": false }, + { "inputs": ["39059", "39055"], "output": false } + ], + "lt_euint64_euint32": [ + { "inputs": ["18439663977987842087", "2158000734"], "output": false }, + { "inputs": ["2158000730", "2158000734"], "output": true }, + { "inputs": ["2158000734", "2158000734"], "output": false }, + { "inputs": ["2158000734", "2158000730"], "output": false } + ], + "lt_euint64_euint64": [ + { "inputs": ["18446718131340158589", "18444160910497783341"], "output": false }, + { "inputs": ["18444160910497783337", "18444160910497783341"], "output": true }, + { "inputs": ["18444160910497783341", "18444160910497783341"], "output": false }, + { "inputs": ["18444160910497783341", "18444160910497783337"], "output": false } + ], + "lt_euint64_uint64": [ + { "inputs": ["18446718131340158589", "18438438177494413269"], "output": false }, + { "inputs": ["18444160910497783337", "18444160910497783341"], "output": true }, + { "inputs": ["18444160910497783341", "18444160910497783341"], "output": false }, + { "inputs": ["18444160910497783341", "18444160910497783337"], "output": false } + ], + "lt_uint64_euint64": [ + { "inputs": ["18445719507413937869", "18438438177494413269"], "output": false }, + { "inputs": ["18444160910497783337", "18444160910497783341"], "output": true }, + { "inputs": ["18444160910497783341", "18444160910497783341"], "output": false }, + { "inputs": ["18444160910497783341", "18444160910497783337"], "output": false } + ], + "ge_euint4_euint4": [ + { "inputs": ["3", "4"], "output": false }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": true } + ], + "ge_euint4_euint8": [ + { "inputs": ["12", "141"], "output": false }, + { "inputs": ["8", "12"], "output": false }, + { "inputs": ["12", "12"], "output": true }, + { "inputs": ["12", "8"], "output": true } + ], + "ge_euint4_uint8": [ + { "inputs": ["12", "11"], "output": true }, + { "inputs": ["8", "12"], "output": false }, + { "inputs": ["12", "12"], "output": true }, + { "inputs": ["12", "8"], "output": true } + ], + "ge_euint4_euint16": [ + { "inputs": ["9", "63554"], "output": false }, + { "inputs": ["5", "9"], "output": false }, + { "inputs": ["9", "9"], "output": true }, + { "inputs": ["9", "5"], "output": true } + ], + "ge_euint4_euint32": [ + { "inputs": ["9", "3023026099"], "output": false }, + { "inputs": ["5", "9"], "output": false }, + { "inputs": ["9", "9"], "output": true }, + { "inputs": ["9", "5"], "output": true } + ], + "ge_euint4_euint64": [ + { "inputs": ["14", "18441505983320830973"], "output": false }, + { "inputs": ["10", "14"], "output": false }, + { "inputs": ["14", "14"], "output": true }, + { "inputs": ["14", "10"], "output": true } + ], + "ge_euint8_euint4": [ + { "inputs": ["228", "4"], "output": true }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": true } + ], + "ge_uint8_euint4": [ + { "inputs": ["2", "4"], "output": false }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": true } + ], + "ge_euint8_euint8": [ + { "inputs": ["41", "173"], "output": false }, + { "inputs": ["37", "41"], "output": false }, + { "inputs": ["41", "41"], "output": true }, + { "inputs": ["41", "37"], "output": true } + ], + "ge_euint8_uint8": [ + { "inputs": ["41", "155"], "output": false }, + { "inputs": ["37", "41"], "output": false }, + { "inputs": ["41", "41"], "output": true }, + { "inputs": ["41", "37"], "output": true } + ], + "ge_uint8_euint8": [ + { "inputs": ["28", "155"], "output": false }, + { "inputs": ["37", "41"], "output": false }, + { "inputs": ["41", "41"], "output": true }, + { "inputs": ["41", "37"], "output": true } + ], + "ge_euint8_euint16": [ + { "inputs": ["204", "4953"], "output": false }, + { "inputs": ["200", "204"], "output": false }, + { "inputs": ["204", "204"], "output": true }, + { "inputs": ["204", "200"], "output": true } + ], + "ge_euint8_euint32": [ + { "inputs": ["214", "2636986545"], "output": false }, + { "inputs": ["210", "214"], "output": false }, + { "inputs": ["214", "214"], "output": true }, + { "inputs": ["214", "210"], "output": true } + ], + "ge_euint8_euint64": [ + { "inputs": ["27", "18445930867214181117"], "output": false }, + { "inputs": ["23", "27"], "output": false }, + { "inputs": ["27", "27"], "output": true }, + { "inputs": ["27", "23"], "output": true } + ], + "ge_euint16_euint4": [ + { "inputs": ["9661", "2"], "output": true }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": true } + ], + "ge_euint16_euint8": [ + { "inputs": ["3763", "81"], "output": true }, + { "inputs": ["77", "81"], "output": false }, + { "inputs": ["81", "81"], "output": true }, + { "inputs": ["81", "77"], "output": true } + ], + "ge_euint16_euint16": [ + { "inputs": ["18226", "11817"], "output": true }, + { "inputs": ["11813", "11817"], "output": false }, + { "inputs": ["11817", "11817"], "output": true }, + { "inputs": ["11817", "11813"], "output": true } + ], + "ge_euint16_uint16": [ + { "inputs": ["18226", "26413"], "output": false }, + { "inputs": ["11813", "11817"], "output": false }, + { "inputs": ["11817", "11817"], "output": true }, + { "inputs": ["11817", "11813"], "output": true } + ], + "ge_uint16_euint16": [ + { "inputs": ["45131", "26413"], "output": true }, + { "inputs": ["11813", "11817"], "output": false }, + { "inputs": ["11817", "11817"], "output": true }, + { "inputs": ["11817", "11813"], "output": true } + ], + "ge_euint16_euint32": [ + { "inputs": ["19364", "2908406445"], "output": false }, + { "inputs": ["19360", "19364"], "output": false }, + { "inputs": ["19364", "19364"], "output": true }, + { "inputs": ["19364", "19360"], "output": true } + ], + "ge_euint16_euint64": [ + { "inputs": ["17006", "18440111639904808773"], "output": false }, + { "inputs": ["17002", "17006"], "output": false }, + { "inputs": ["17006", "17006"], "output": true }, + { "inputs": ["17006", "17002"], "output": true } + ], + "ge_euint32_euint4": [ + { "inputs": ["4064050662", "13"], "output": true }, + { "inputs": ["9", "13"], "output": false }, + { "inputs": ["13", "13"], "output": true }, + { "inputs": ["13", "9"], "output": true } + ], + "ge_euint32_euint8": [ + { "inputs": ["4107105674", "147"], "output": true }, + { "inputs": ["143", "147"], "output": false }, + { "inputs": ["147", "147"], "output": true }, + { "inputs": ["147", "143"], "output": true } + ], + "ge_euint32_euint16": [ + { "inputs": ["3202817970", "50829"], "output": true }, + { "inputs": ["50825", "50829"], "output": false }, + { "inputs": ["50829", "50829"], "output": true }, + { "inputs": ["50829", "50825"], "output": true } + ], + "ge_euint32_euint32": [ + { "inputs": ["1970784794", "1596956634"], "output": true }, + { "inputs": ["1596956630", "1596956634"], "output": false }, + { "inputs": ["1596956634", "1596956634"], "output": true }, + { "inputs": ["1596956634", "1596956630"], "output": true } + ], + "ge_euint32_uint32": [ + { "inputs": ["1970784794", "2198890323"], "output": false }, + { "inputs": ["1596956630", "1596956634"], "output": false }, + { "inputs": ["1596956634", "1596956634"], "output": true }, + { "inputs": ["1596956634", "1596956630"], "output": true } + ], + "ge_uint32_euint32": [ + { "inputs": ["3128599756", "2198890323"], "output": true }, + { "inputs": ["1596956630", "1596956634"], "output": false }, + { "inputs": ["1596956634", "1596956634"], "output": true }, + { "inputs": ["1596956634", "1596956630"], "output": true } + ], + "ge_euint32_euint64": [ + { "inputs": ["1126093045", "18444900127425225651"], "output": false }, + { "inputs": ["1126093041", "1126093045"], "output": false }, + { "inputs": ["1126093045", "1126093045"], "output": true }, + { "inputs": ["1126093045", "1126093041"], "output": true } + ], + "ge_euint64_euint4": [ + { "inputs": ["18438518295027982843", "12"], "output": true }, + { "inputs": ["8", "12"], "output": false }, + { "inputs": ["12", "12"], "output": true }, + { "inputs": ["12", "8"], "output": true } + ], + "ge_euint64_euint8": [ + { "inputs": ["18439034739003983767", "245"], "output": true }, + { "inputs": ["241", "245"], "output": false }, + { "inputs": ["245", "245"], "output": true }, + { "inputs": ["245", "241"], "output": true } + ], + "ge_euint64_euint16": [ + { "inputs": ["18440840766291159069", "55918"], "output": true }, + { "inputs": ["55914", "55918"], "output": false }, + { "inputs": ["55918", "55918"], "output": true }, + { "inputs": ["55918", "55914"], "output": true } + ], + "ge_euint64_euint32": [ + { "inputs": ["18443677328726027173", "2889413053"], "output": true }, + { "inputs": ["2889413049", "2889413053"], "output": false }, + { "inputs": ["2889413053", "2889413053"], "output": true }, + { "inputs": ["2889413053", "2889413049"], "output": true } + ], + "ge_euint64_euint64": [ + { "inputs": ["18444991478795579145", "18445260307161364245"], "output": false }, + { "inputs": ["18444991478795579141", "18444991478795579145"], "output": false }, + { "inputs": ["18444991478795579145", "18444991478795579145"], "output": true }, + { "inputs": ["18444991478795579145", "18444991478795579141"], "output": true } + ], + "ge_euint64_uint64": [ + { "inputs": ["18444991478795579145", "18439567451994245465"], "output": true }, + { "inputs": ["18444991478795579141", "18444991478795579145"], "output": false }, + { "inputs": ["18444991478795579145", "18444991478795579145"], "output": true }, + { "inputs": ["18444991478795579145", "18444991478795579141"], "output": true } + ], + "ge_uint64_euint64": [ + { "inputs": ["18444429093181704535", "18439567451994245465"], "output": true }, + { "inputs": ["18444991478795579141", "18444991478795579145"], "output": false }, + { "inputs": ["18444991478795579145", "18444991478795579145"], "output": true }, + { "inputs": ["18444991478795579145", "18444991478795579141"], "output": true } + ], + "gt_euint4_euint4": [ + { "inputs": ["9", "12"], "output": false }, + { "inputs": ["5", "9"], "output": false }, + { "inputs": ["9", "9"], "output": false }, + { "inputs": ["9", "5"], "output": true } + ], + "gt_euint4_euint8": [ + { "inputs": ["7", "49"], "output": false }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "gt_euint4_uint8": [ + { "inputs": ["7", "10"], "output": false }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "gt_euint4_euint16": [ + { "inputs": ["13", "28270"], "output": false }, + { "inputs": ["9", "13"], "output": false }, + { "inputs": ["13", "13"], "output": false }, + { "inputs": ["13", "9"], "output": true } + ], + "gt_euint4_euint32": [ + { "inputs": ["10", "2302702329"], "output": false }, + { "inputs": ["6", "10"], "output": false }, + { "inputs": ["10", "10"], "output": false }, + { "inputs": ["10", "6"], "output": true } + ], + "gt_euint4_euint64": [ + { "inputs": ["8", "18443962302044821049"], "output": false }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "gt_euint8_euint4": [ + { "inputs": ["53", "14"], "output": true }, + { "inputs": ["10", "14"], "output": false }, + { "inputs": ["14", "14"], "output": false }, + { "inputs": ["14", "10"], "output": true } + ], + "gt_uint8_euint4": [ + { "inputs": ["4", "14"], "output": false }, + { "inputs": ["10", "14"], "output": false }, + { "inputs": ["14", "14"], "output": false }, + { "inputs": ["14", "10"], "output": true } + ], + "gt_euint8_euint8": [ + { "inputs": ["225", "96"], "output": true }, + { "inputs": ["92", "96"], "output": false }, + { "inputs": ["96", "96"], "output": false }, + { "inputs": ["96", "92"], "output": true } + ], + "gt_euint8_uint8": [ + { "inputs": ["225", "176"], "output": true }, + { "inputs": ["92", "96"], "output": false }, + { "inputs": ["96", "96"], "output": false }, + { "inputs": ["96", "92"], "output": true } + ], + "gt_uint8_euint8": [ + { "inputs": ["34", "176"], "output": false }, + { "inputs": ["92", "96"], "output": false }, + { "inputs": ["96", "96"], "output": false }, + { "inputs": ["96", "92"], "output": true } + ], + "gt_euint8_euint16": [ + { "inputs": ["254", "24172"], "output": false }, + { "inputs": ["250", "254"], "output": false }, + { "inputs": ["254", "254"], "output": false }, + { "inputs": ["254", "250"], "output": true } + ], + "gt_euint8_euint32": [ + { "inputs": ["254", "3644170480"], "output": false }, + { "inputs": ["250", "254"], "output": false }, + { "inputs": ["254", "254"], "output": false }, + { "inputs": ["254", "250"], "output": true } + ], + "gt_euint8_euint64": [ + { "inputs": ["235", "18439120393033635471"], "output": false }, + { "inputs": ["231", "235"], "output": false }, + { "inputs": ["235", "235"], "output": false }, + { "inputs": ["235", "231"], "output": true } + ], + "gt_euint16_euint4": [ + { "inputs": ["36260", "13"], "output": true }, + { "inputs": ["9", "13"], "output": false }, + { "inputs": ["13", "13"], "output": false }, + { "inputs": ["13", "9"], "output": true } + ], + "gt_euint16_euint8": [ + { "inputs": ["17649", "8"], "output": true }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "gt_euint16_euint16": [ + { "inputs": ["46712", "53146"], "output": false }, + { "inputs": ["46708", "46712"], "output": false }, + { "inputs": ["46712", "46712"], "output": false }, + { "inputs": ["46712", "46708"], "output": true } + ], + "gt_euint16_uint16": [ + { "inputs": ["46712", "65342"], "output": false }, + { "inputs": ["46708", "46712"], "output": false }, + { "inputs": ["46712", "46712"], "output": false }, + { "inputs": ["46712", "46708"], "output": true } + ], + "gt_uint16_euint16": [ + { "inputs": ["58255", "65342"], "output": false }, + { "inputs": ["46708", "46712"], "output": false }, + { "inputs": ["46712", "46712"], "output": false }, + { "inputs": ["46712", "46708"], "output": true } + ], + "gt_euint16_euint32": [ + { "inputs": ["61440", "2523716364"], "output": false }, + { "inputs": ["61436", "61440"], "output": false }, + { "inputs": ["61440", "61440"], "output": false }, + { "inputs": ["61440", "61436"], "output": true } + ], + "gt_euint16_euint64": [ + { "inputs": ["13915", "18437957835114177845"], "output": false }, + { "inputs": ["13911", "13915"], "output": false }, + { "inputs": ["13915", "13915"], "output": false }, + { "inputs": ["13915", "13911"], "output": true } + ], + "gt_euint32_euint4": [ + { "inputs": ["2933730621", "7"], "output": true }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "gt_euint32_euint8": [ + { "inputs": ["1917780828", "163"], "output": true }, + { "inputs": ["159", "163"], "output": false }, + { "inputs": ["163", "163"], "output": false }, + { "inputs": ["163", "159"], "output": true } + ], + "gt_euint32_euint16": [ + { "inputs": ["1221805876", "57752"], "output": true }, + { "inputs": ["57748", "57752"], "output": false }, + { "inputs": ["57752", "57752"], "output": false }, + { "inputs": ["57752", "57748"], "output": true } + ], + "gt_euint32_euint32": [ + { "inputs": ["2212514392", "854163759"], "output": true }, + { "inputs": ["854163755", "854163759"], "output": false }, + { "inputs": ["854163759", "854163759"], "output": false }, + { "inputs": ["854163759", "854163755"], "output": true } + ], + "gt_euint32_uint32": [ + { "inputs": ["2212514392", "3587264713"], "output": false }, + { "inputs": ["854163755", "854163759"], "output": false }, + { "inputs": ["854163759", "854163759"], "output": false }, + { "inputs": ["854163759", "854163755"], "output": true } + ], + "gt_uint32_euint32": [ + { "inputs": ["405003775", "3587264713"], "output": false }, + { "inputs": ["854163755", "854163759"], "output": false }, + { "inputs": ["854163759", "854163759"], "output": false }, + { "inputs": ["854163759", "854163755"], "output": true } + ], + "gt_euint32_euint64": [ + { "inputs": ["1296765186", "18439742981119094705"], "output": false }, + { "inputs": ["1296765182", "1296765186"], "output": false }, + { "inputs": ["1296765186", "1296765186"], "output": false }, + { "inputs": ["1296765186", "1296765182"], "output": true } + ], + "gt_euint64_euint4": [ + { "inputs": ["18445028672073920305", "11"], "output": true }, + { "inputs": ["7", "11"], "output": false }, + { "inputs": ["11", "11"], "output": false }, + { "inputs": ["11", "7"], "output": true } + ], + "gt_euint64_euint8": [ + { "inputs": ["18444472755157488819", "101"], "output": true }, + { "inputs": ["97", "101"], "output": false }, + { "inputs": ["101", "101"], "output": false }, + { "inputs": ["101", "97"], "output": true } + ], + "gt_euint64_euint16": [ + { "inputs": ["18446239272421398075", "52612"], "output": true }, + { "inputs": ["52608", "52612"], "output": false }, + { "inputs": ["52612", "52612"], "output": false }, + { "inputs": ["52612", "52608"], "output": true } + ], + "gt_euint64_euint32": [ + { "inputs": ["18445619408455524051", "2595159918"], "output": true }, + { "inputs": ["2595159914", "2595159918"], "output": false }, + { "inputs": ["2595159918", "2595159918"], "output": false }, + { "inputs": ["2595159918", "2595159914"], "output": true } + ], + "gt_euint64_euint64": [ + { "inputs": ["18439787790330435145", "18439484090308827429"], "output": true }, + { "inputs": ["18439484090308827425", "18439484090308827429"], "output": false }, + { "inputs": ["18439484090308827429", "18439484090308827429"], "output": false }, + { "inputs": ["18439484090308827429", "18439484090308827425"], "output": true } + ], + "gt_euint64_uint64": [ + { "inputs": ["18439787790330435145", "18441907321511169065"], "output": false }, + { "inputs": ["18439484090308827425", "18439484090308827429"], "output": false }, + { "inputs": ["18439484090308827429", "18439484090308827429"], "output": false }, + { "inputs": ["18439484090308827429", "18439484090308827425"], "output": true } + ], + "gt_uint64_euint64": [ + { "inputs": ["18438935380134710315", "18441907321511169065"], "output": false }, + { "inputs": ["18439484090308827425", "18439484090308827429"], "output": false }, + { "inputs": ["18439484090308827429", "18439484090308827429"], "output": false }, + { "inputs": ["18439484090308827429", "18439484090308827425"], "output": true } + ], + "eq_euint4_euint4": [ + { "inputs": ["8", "2"], "output": false }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "eq_euint4_euint8": [ + { "inputs": ["14", "180"], "output": false }, + { "inputs": ["10", "14"], "output": false }, + { "inputs": ["14", "14"], "output": true }, + { "inputs": ["14", "10"], "output": false } + ], + "eq_euint4_uint8": [ + { "inputs": ["14", "4"], "output": false }, + { "inputs": ["10", "14"], "output": false }, + { "inputs": ["14", "14"], "output": true }, + { "inputs": ["14", "10"], "output": false } + ], + "eq_euint4_euint16": [ + { "inputs": ["9", "7831"], "output": false }, + { "inputs": ["5", "9"], "output": false }, + { "inputs": ["9", "9"], "output": true }, + { "inputs": ["9", "5"], "output": false } + ], + "eq_euint4_euint32": [ + { "inputs": ["6", "2902824357"], "output": false }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "eq_euint4_euint64": [ + { "inputs": ["4", "18441783865246079825"], "output": false }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "eq_euint8_euint4": [ + { "inputs": ["168", "1"], "output": false }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "eq_uint8_euint4": [ + { "inputs": ["11", "1"], "output": false }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "eq_euint8_euint8": [ + { "inputs": ["101", "188"], "output": false }, + { "inputs": ["97", "101"], "output": false }, + { "inputs": ["101", "101"], "output": true }, + { "inputs": ["101", "97"], "output": false } + ], + "eq_euint8_uint8": [ + { "inputs": ["101", "175"], "output": false }, + { "inputs": ["97", "101"], "output": false }, + { "inputs": ["101", "101"], "output": true }, + { "inputs": ["101", "97"], "output": false } + ], + "eq_uint8_euint8": [ + { "inputs": ["182", "175"], "output": false }, + { "inputs": ["97", "101"], "output": false }, + { "inputs": ["101", "101"], "output": true }, + { "inputs": ["101", "97"], "output": false } + ], + "eq_euint8_euint16": [ + { "inputs": ["111", "58517"], "output": false }, + { "inputs": ["107", "111"], "output": false }, + { "inputs": ["111", "111"], "output": true }, + { "inputs": ["111", "107"], "output": false } + ], + "eq_euint8_euint32": [ + { "inputs": ["161", "1325601812"], "output": false }, + { "inputs": ["157", "161"], "output": false }, + { "inputs": ["161", "161"], "output": true }, + { "inputs": ["161", "157"], "output": false } + ], + "eq_euint8_euint64": [ + { "inputs": ["91", "18446457346943992227"], "output": false }, + { "inputs": ["87", "91"], "output": false }, + { "inputs": ["91", "91"], "output": true }, + { "inputs": ["91", "87"], "output": false } + ], + "eq_euint16_euint4": [ + { "inputs": ["43178", "6"], "output": false }, + { "inputs": ["4", "8"], "output": false }, + { "inputs": ["8", "8"], "output": true }, + { "inputs": ["8", "4"], "output": false } + ], + "eq_euint16_euint8": [ + { "inputs": ["52156", "49"], "output": false }, + { "inputs": ["45", "49"], "output": false }, + { "inputs": ["49", "49"], "output": true }, + { "inputs": ["49", "45"], "output": false } + ], + "eq_euint16_euint16": [ + { "inputs": ["53936", "55687"], "output": false }, + { "inputs": ["53932", "53936"], "output": false }, + { "inputs": ["53936", "53936"], "output": true }, + { "inputs": ["53936", "53932"], "output": false } + ], + "eq_euint16_uint16": [ + { "inputs": ["53936", "62296"], "output": false }, + { "inputs": ["53932", "53936"], "output": false }, + { "inputs": ["53936", "53936"], "output": true }, + { "inputs": ["53936", "53932"], "output": false } + ], + "eq_uint16_euint16": [ + { "inputs": ["49783", "62296"], "output": false }, + { "inputs": ["53932", "53936"], "output": false }, + { "inputs": ["53936", "53936"], "output": true }, + { "inputs": ["53936", "53932"], "output": false } + ], + "eq_euint16_euint32": [ + { "inputs": ["26213", "2142712247"], "output": false }, + { "inputs": ["26209", "26213"], "output": false }, + { "inputs": ["26213", "26213"], "output": true }, + { "inputs": ["26213", "26209"], "output": false } + ], + "eq_euint16_euint64": [ + { "inputs": ["38256", "18442430973530036421"], "output": false }, + { "inputs": ["38252", "38256"], "output": false }, + { "inputs": ["38256", "38256"], "output": true }, + { "inputs": ["38256", "38252"], "output": false } + ], + "eq_euint32_euint4": [ + { "inputs": ["2724048740", "14"], "output": false }, + { "inputs": ["10", "14"], "output": false }, + { "inputs": ["14", "14"], "output": true }, + { "inputs": ["14", "10"], "output": false } + ], + "eq_euint32_euint8": [ + { "inputs": ["2890164202", "10"], "output": false }, + { "inputs": ["6", "10"], "output": false }, + { "inputs": ["10", "10"], "output": true }, + { "inputs": ["10", "6"], "output": false } + ], + "eq_euint32_euint16": [ + { "inputs": ["3540063980", "53142"], "output": false }, + { "inputs": ["53138", "53142"], "output": false }, + { "inputs": ["53142", "53142"], "output": true }, + { "inputs": ["53142", "53138"], "output": false } + ], + "eq_euint32_euint32": [ + { "inputs": ["3674813327", "3173886291"], "output": false }, + { "inputs": ["3173886287", "3173886291"], "output": false }, + { "inputs": ["3173886291", "3173886291"], "output": true }, + { "inputs": ["3173886291", "3173886287"], "output": false } + ], + "eq_euint32_uint32": [ + { "inputs": ["3674813327", "340447461"], "output": false }, + { "inputs": ["3173886287", "3173886291"], "output": false }, + { "inputs": ["3173886291", "3173886291"], "output": true }, + { "inputs": ["3173886291", "3173886287"], "output": false } + ], + "eq_uint32_euint32": [ + { "inputs": ["630917914", "340447461"], "output": false }, + { "inputs": ["3173886287", "3173886291"], "output": false }, + { "inputs": ["3173886291", "3173886291"], "output": true }, + { "inputs": ["3173886291", "3173886287"], "output": false } + ], + "eq_euint32_euint64": [ + { "inputs": ["2805333302", "18443732701658209223"], "output": false }, + { "inputs": ["2805333298", "2805333302"], "output": false }, + { "inputs": ["2805333302", "2805333302"], "output": true }, + { "inputs": ["2805333302", "2805333298"], "output": false } + ], + "eq_euint64_euint4": [ + { "inputs": ["18439121948970600941", "14"], "output": false }, + { "inputs": ["10", "14"], "output": false }, + { "inputs": ["14", "14"], "output": true }, + { "inputs": ["14", "10"], "output": false } + ], + "eq_euint64_euint8": [ + { "inputs": ["18441725985045807501", "52"], "output": false }, + { "inputs": ["48", "52"], "output": false }, + { "inputs": ["52", "52"], "output": true }, + { "inputs": ["52", "48"], "output": false } + ], + "eq_euint64_euint16": [ + { "inputs": ["18444068251063204057", "45460"], "output": false }, + { "inputs": ["45456", "45460"], "output": false }, + { "inputs": ["45460", "45460"], "output": true }, + { "inputs": ["45460", "45456"], "output": false } + ], + "eq_euint64_euint32": [ + { "inputs": ["18444814847193612111", "3675625287"], "output": false }, + { "inputs": ["3675625283", "3675625287"], "output": false }, + { "inputs": ["3675625287", "3675625287"], "output": true }, + { "inputs": ["3675625287", "3675625283"], "output": false } + ], + "eq_euint64_euint64": [ + { "inputs": ["18443330521266220729", "18438253731135327627"], "output": false }, + { "inputs": ["18438253731135327623", "18438253731135327627"], "output": false }, + { "inputs": ["18438253731135327627", "18438253731135327627"], "output": true }, + { "inputs": ["18438253731135327627", "18438253731135327623"], "output": false } + ], + "eq_euint64_uint64": [ + { "inputs": ["18443330521266220729", "18446706410531688277"], "output": false }, + { "inputs": ["18438253731135327623", "18438253731135327627"], "output": false }, + { "inputs": ["18438253731135327627", "18438253731135327627"], "output": true }, + { "inputs": ["18438253731135327627", "18438253731135327623"], "output": false } + ], + "eq_uint64_euint64": [ + { "inputs": ["18444395277752785729", "18446706410531688277"], "output": false }, + { "inputs": ["18438253731135327623", "18438253731135327627"], "output": false }, + { "inputs": ["18438253731135327627", "18438253731135327627"], "output": true }, + { "inputs": ["18438253731135327627", "18438253731135327623"], "output": false } + ], + "ne_euint4_euint4": [ + { "inputs": ["11", "12"], "output": true }, + { "inputs": ["7", "11"], "output": true }, + { "inputs": ["11", "11"], "output": false }, + { "inputs": ["11", "7"], "output": true } + ], + "ne_euint4_euint8": [ + { "inputs": ["7", "94"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "ne_euint4_uint8": [ + { "inputs": ["7", "12"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "ne_euint4_euint16": [ + { "inputs": ["2", "63787"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "ne_euint4_euint32": [ + { "inputs": ["13", "3287915476"], "output": true }, + { "inputs": ["9", "13"], "output": true }, + { "inputs": ["13", "13"], "output": false }, + { "inputs": ["13", "9"], "output": true } + ], + "ne_euint4_euint64": [ + { "inputs": ["11", "18442031616327904827"], "output": true }, + { "inputs": ["7", "11"], "output": true }, + { "inputs": ["11", "11"], "output": false }, + { "inputs": ["11", "7"], "output": true } + ], + "ne_euint8_euint4": [ + { "inputs": ["237", "1"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "ne_uint8_euint4": [ + { "inputs": ["3", "1"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "ne_euint8_euint8": [ + { "inputs": ["250", "143"], "output": true }, + { "inputs": ["139", "143"], "output": true }, + { "inputs": ["143", "143"], "output": false }, + { "inputs": ["143", "139"], "output": true } + ], + "ne_euint8_uint8": [ + { "inputs": ["250", "114"], "output": true }, + { "inputs": ["139", "143"], "output": true }, + { "inputs": ["143", "143"], "output": false }, + { "inputs": ["143", "139"], "output": true } + ], + "ne_uint8_euint8": [ + { "inputs": ["139", "114"], "output": true }, + { "inputs": ["139", "143"], "output": true }, + { "inputs": ["143", "143"], "output": false }, + { "inputs": ["143", "139"], "output": true } + ], + "ne_euint8_euint16": [ + { "inputs": ["86", "21243"], "output": true }, + { "inputs": ["82", "86"], "output": true }, + { "inputs": ["86", "86"], "output": false }, + { "inputs": ["86", "82"], "output": true } + ], + "ne_euint8_euint32": [ + { "inputs": ["185", "1521229668"], "output": true }, + { "inputs": ["181", "185"], "output": true }, + { "inputs": ["185", "185"], "output": false }, + { "inputs": ["185", "181"], "output": true } + ], + "ne_euint8_euint64": [ + { "inputs": ["109", "18443318570639553087"], "output": true }, + { "inputs": ["105", "109"], "output": true }, + { "inputs": ["109", "109"], "output": false }, + { "inputs": ["109", "105"], "output": true } + ], + "ne_euint16_euint4": [ + { "inputs": ["36210", "8"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "ne_euint16_euint8": [ + { "inputs": ["45762", "206"], "output": true }, + { "inputs": ["202", "206"], "output": true }, + { "inputs": ["206", "206"], "output": false }, + { "inputs": ["206", "202"], "output": true } + ], + "ne_euint16_euint16": [ + { "inputs": ["64200", "17038"], "output": true }, + { "inputs": ["17034", "17038"], "output": true }, + { "inputs": ["17038", "17038"], "output": false }, + { "inputs": ["17038", "17034"], "output": true } + ], + "ne_euint16_uint16": [ + { "inputs": ["64200", "15145"], "output": true }, + { "inputs": ["17034", "17038"], "output": true }, + { "inputs": ["17038", "17038"], "output": false }, + { "inputs": ["17038", "17034"], "output": true } + ], + "ne_uint16_euint16": [ + { "inputs": ["35214", "15145"], "output": true }, + { "inputs": ["17034", "17038"], "output": true }, + { "inputs": ["17038", "17038"], "output": false }, + { "inputs": ["17038", "17034"], "output": true } + ], + "ne_euint16_euint32": [ + { "inputs": ["52545", "2079966846"], "output": true }, + { "inputs": ["52541", "52545"], "output": true }, + { "inputs": ["52545", "52545"], "output": false }, + { "inputs": ["52545", "52541"], "output": true } + ], + "ne_euint16_euint64": [ + { "inputs": ["33238", "18440140341099634203"], "output": true }, + { "inputs": ["33234", "33238"], "output": true }, + { "inputs": ["33238", "33238"], "output": false }, + { "inputs": ["33238", "33234"], "output": true } + ], + "ne_euint32_euint4": [ + { "inputs": ["2506657954", "7"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "ne_euint32_euint8": [ + { "inputs": ["874720156", "10"], "output": true }, + { "inputs": ["6", "10"], "output": true }, + { "inputs": ["10", "10"], "output": false }, + { "inputs": ["10", "6"], "output": true } + ], + "ne_euint32_euint16": [ + { "inputs": ["2729404223", "63905"], "output": true }, + { "inputs": ["63901", "63905"], "output": true }, + { "inputs": ["63905", "63905"], "output": false }, + { "inputs": ["63905", "63901"], "output": true } + ], + "ne_euint32_euint32": [ + { "inputs": ["40863923", "1726230330"], "output": true }, + { "inputs": ["40863919", "40863923"], "output": true }, + { "inputs": ["40863923", "40863923"], "output": false }, + { "inputs": ["40863923", "40863919"], "output": true } + ], + "ne_euint32_uint32": [ + { "inputs": ["40863923", "740881042"], "output": true }, + { "inputs": ["40863919", "40863923"], "output": true }, + { "inputs": ["40863923", "40863923"], "output": false }, + { "inputs": ["40863923", "40863919"], "output": true } + ], + "ne_uint32_euint32": [ + { "inputs": ["3944008003", "740881042"], "output": true }, + { "inputs": ["40863919", "40863923"], "output": true }, + { "inputs": ["40863923", "40863923"], "output": false }, + { "inputs": ["40863923", "40863919"], "output": true } + ], + "ne_euint32_euint64": [ + { "inputs": ["734315994", "18437906324621631829"], "output": true }, + { "inputs": ["734315990", "734315994"], "output": true }, + { "inputs": ["734315994", "734315994"], "output": false }, + { "inputs": ["734315994", "734315990"], "output": true } + ], + "ne_euint64_euint4": [ + { "inputs": ["18442748864669273899", "3"], "output": true }, + { "inputs": ["4", "8"], "output": true }, + { "inputs": ["8", "8"], "output": false }, + { "inputs": ["8", "4"], "output": true } + ], + "ne_euint64_euint8": [ + { "inputs": ["18437879735793971605", "183"], "output": true }, + { "inputs": ["179", "183"], "output": true }, + { "inputs": ["183", "183"], "output": false }, + { "inputs": ["183", "179"], "output": true } + ], + "ne_euint64_euint16": [ + { "inputs": ["18439766867707518465", "19155"], "output": true }, + { "inputs": ["19151", "19155"], "output": true }, + { "inputs": ["19155", "19155"], "output": false }, + { "inputs": ["19155", "19151"], "output": true } + ], + "ne_euint64_euint32": [ + { "inputs": ["18442332740658370363", "1304399628"], "output": true }, + { "inputs": ["1304399624", "1304399628"], "output": true }, + { "inputs": ["1304399628", "1304399628"], "output": false }, + { "inputs": ["1304399628", "1304399624"], "output": true } + ], + "ne_euint64_euint64": [ + { "inputs": ["18445140354518938845", "18441391037965649995"], "output": true }, + { "inputs": ["18441391037965649991", "18441391037965649995"], "output": true }, + { "inputs": ["18441391037965649995", "18441391037965649995"], "output": false }, + { "inputs": ["18441391037965649995", "18441391037965649991"], "output": true } + ], + "ne_euint64_uint64": [ + { "inputs": ["18445140354518938845", "18438176226766160787"], "output": true }, + { "inputs": ["18441391037965649991", "18441391037965649995"], "output": true }, + { "inputs": ["18441391037965649995", "18441391037965649995"], "output": false }, + { "inputs": ["18441391037965649995", "18441391037965649991"], "output": true } + ], + "ne_uint64_euint64": [ + { "inputs": ["18443547473224968383", "18438176226766160787"], "output": true }, + { "inputs": ["18441391037965649991", "18441391037965649995"], "output": true }, + { "inputs": ["18441391037965649995", "18441391037965649995"], "output": false }, + { "inputs": ["18441391037965649995", "18441391037965649991"], "output": true } + ], + "shl_euint4_uint8": [ + { "inputs": ["13", "5"], "output": 10 }, + { "inputs": ["4", "8"], "output": 4 }, + { "inputs": ["8", "8"], "output": 8 }, + { "inputs": ["8", "4"], "output": 8 } + ], + "shl_euint8_euint8": [ + { "inputs": ["34", "4"], "output": 32 }, + { "inputs": ["4", "8"], "output": 4 }, + { "inputs": ["8", "8"], "output": 8 }, + { "inputs": ["8", "4"], "output": 128 } + ], + "shl_euint8_uint8": [ + { "inputs": ["34", "4"], "output": 32 }, + { "inputs": ["4", "8"], "output": 4 }, + { "inputs": ["8", "8"], "output": 8 }, + { "inputs": ["8", "4"], "output": 128 } + ], + "shl_euint16_euint8": [ + { "inputs": ["15362", "2"], "output": 61448 }, + { "inputs": ["4", "8"], "output": 1024 }, + { "inputs": ["8", "8"], "output": 2048 }, + { "inputs": ["8", "4"], "output": 128 } + ], + "shl_euint16_uint8": [ + { "inputs": ["15362", "2"], "output": 61448 }, + { "inputs": ["4", "8"], "output": 1024 }, + { "inputs": ["8", "8"], "output": 2048 }, + { "inputs": ["8", "4"], "output": 128 } + ], + "shl_euint32_euint8": [ + { "inputs": ["833510670", "1"], "output": 1667021340 }, + { "inputs": ["4", "8"], "output": 1024 }, + { "inputs": ["8", "8"], "output": 2048 }, + { "inputs": ["8", "4"], "output": 128 } + ], + "shl_euint32_uint8": [ + { "inputs": ["833510670", "1"], "output": 1667021340 }, + { "inputs": ["4", "8"], "output": 1024 }, + { "inputs": ["8", "8"], "output": 2048 }, + { "inputs": ["8", "4"], "output": 128 } + ], + "shl_euint64_euint8": [ + { "inputs": ["18445451452906630791", "5"], "output": 18405380208016085000 }, + { "inputs": ["4", "8"], "output": 1024 }, + { "inputs": ["8", "8"], "output": 2048 }, + { "inputs": ["8", "4"], "output": 128 } + ], + "shl_euint64_uint8": [ + { "inputs": ["18445451452906630791", "5"], "output": 18405380208016085000 }, + { "inputs": ["4", "8"], "output": 1024 }, + { "inputs": ["8", "8"], "output": 2048 }, + { "inputs": ["8", "4"], "output": 128 } + ], + "shr_euint4_uint8": [ + { "inputs": ["14", "4"], "output": 14 }, + { "inputs": ["4", "8"], "output": 4 }, + { "inputs": ["8", "8"], "output": 8 }, + { "inputs": ["8", "4"], "output": 8 } + ], + "shr_euint8_euint8": [ + { "inputs": ["68", "4"], "output": 4 }, + { "inputs": ["4", "8"], "output": 4 }, + { "inputs": ["8", "8"], "output": 8 }, + { "inputs": ["8", "4"], "output": 0 } + ], + "shr_euint8_uint8": [ + { "inputs": ["68", "4"], "output": 4 }, + { "inputs": ["4", "8"], "output": 4 }, + { "inputs": ["8", "8"], "output": 8 }, + { "inputs": ["8", "4"], "output": 0 } + ], + "shr_euint16_euint8": [ + { "inputs": ["25648", "5"], "output": 801 }, + { "inputs": ["4", "8"], "output": 0 }, + { "inputs": ["8", "8"], "output": 0 }, + { "inputs": ["8", "4"], "output": 0 } + ], + "shr_euint16_uint8": [ + { "inputs": ["25648", "5"], "output": 801 }, + { "inputs": ["4", "8"], "output": 0 }, + { "inputs": ["8", "8"], "output": 0 }, + { "inputs": ["8", "4"], "output": 0 } + ], + "shr_euint32_euint8": [ + { "inputs": ["3957313401", "6"], "output": 61833021 }, + { "inputs": ["4", "8"], "output": 0 }, + { "inputs": ["8", "8"], "output": 0 }, + { "inputs": ["8", "4"], "output": 0 } + ], + "shr_euint32_uint8": [ + { "inputs": ["3957313401", "6"], "output": 61833021 }, + { "inputs": ["4", "8"], "output": 0 }, + { "inputs": ["8", "8"], "output": 0 }, + { "inputs": ["8", "4"], "output": 0 } + ], + "shr_euint64_euint8": [ + { "inputs": ["18439569308403000305", "1"], "output": 9219784654201500000 }, + { "inputs": ["4", "8"], "output": 0 }, + { "inputs": ["8", "8"], "output": 0 }, + { "inputs": ["8", "4"], "output": 0 } + ], + "shr_euint64_uint8": [ + { "inputs": ["18439569308403000305", "1"], "output": 9219784654201500000 }, + { "inputs": ["4", "8"], "output": 0 }, + { "inputs": ["8", "8"], "output": 0 }, + { "inputs": ["8", "4"], "output": 0 } + ], + "max_euint4_euint4": [ + { "inputs": ["8", "3"], "output": "8" }, + { "inputs": ["4", "8"], "output": "8" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "8" } + ], + "max_euint4_euint8": [ + { "inputs": ["11", "181"], "output": "181" }, + { "inputs": ["7", "11"], "output": "11" }, + { "inputs": ["11", "11"], "output": "11" }, + { "inputs": ["11", "7"], "output": "11" } + ], + "max_euint4_uint8": [ + { "inputs": ["11", "7"], "output": "11" }, + { "inputs": ["7", "11"], "output": "11" }, + { "inputs": ["11", "11"], "output": "11" }, + { "inputs": ["11", "7"], "output": "11" } + ], + "max_euint4_euint16": [ + { "inputs": ["2", "61770"], "output": "61770" }, + { "inputs": ["4", "8"], "output": "8" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "8" } + ], + "max_euint4_euint32": [ + { "inputs": ["2", "1031795645"], "output": "1031795645" }, + { "inputs": ["4", "8"], "output": "8" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "8" } + ], + "max_euint4_euint64": [ + { "inputs": ["3", "18443395042624107977"], "output": "18443395042624107977" }, + { "inputs": ["4", "8"], "output": "8" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "8" } + ], + "max_euint8_euint4": [ + { "inputs": ["211", "14"], "output": "211" }, + { "inputs": ["10", "14"], "output": "14" }, + { "inputs": ["14", "14"], "output": "14" }, + { "inputs": ["14", "10"], "output": "14" } + ], + "max_uint8_euint4": [ + { "inputs": ["7", "14"], "output": "14" }, + { "inputs": ["10", "14"], "output": "14" }, + { "inputs": ["14", "14"], "output": "14" }, + { "inputs": ["14", "10"], "output": "14" } + ], + "max_euint8_euint8": [ + { "inputs": ["198", "211"], "output": "211" }, + { "inputs": ["194", "198"], "output": "198" }, + { "inputs": ["198", "198"], "output": "198" }, + { "inputs": ["198", "194"], "output": "198" } + ], + "max_euint8_uint8": [ + { "inputs": ["198", "31"], "output": "198" }, + { "inputs": ["194", "198"], "output": "198" }, + { "inputs": ["198", "198"], "output": "198" }, + { "inputs": ["198", "194"], "output": "198" } + ], + "max_uint8_euint8": [ + { "inputs": ["102", "31"], "output": "102" }, + { "inputs": ["194", "198"], "output": "198" }, + { "inputs": ["198", "198"], "output": "198" }, + { "inputs": ["198", "194"], "output": "198" } + ], + "max_euint8_euint16": [ + { "inputs": ["8", "11440"], "output": "11440" }, + { "inputs": ["4", "8"], "output": "8" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "8" } + ], + "max_euint8_euint32": [ + { "inputs": ["130", "566960922"], "output": "566960922" }, + { "inputs": ["126", "130"], "output": "130" }, + { "inputs": ["130", "130"], "output": "130" }, + { "inputs": ["130", "126"], "output": "130" } + ], + "max_euint8_euint64": [ + { "inputs": ["172", "18445195398017975891"], "output": "18445195398017975891" }, + { "inputs": ["168", "172"], "output": "172" }, + { "inputs": ["172", "172"], "output": "172" }, + { "inputs": ["172", "168"], "output": "172" } + ], + "max_euint16_euint4": [ + { "inputs": ["29272", "10"], "output": "29272" }, + { "inputs": ["6", "10"], "output": "10" }, + { "inputs": ["10", "10"], "output": "10" }, + { "inputs": ["10", "6"], "output": "10" } + ], + "max_euint16_euint8": [ + { "inputs": ["18336", "117"], "output": "18336" }, + { "inputs": ["113", "117"], "output": "117" }, + { "inputs": ["117", "117"], "output": "117" }, + { "inputs": ["117", "113"], "output": "117" } + ], + "max_euint16_euint16": [ + { "inputs": ["34561", "34789"], "output": "34789" }, + { "inputs": ["34557", "34561"], "output": "34561" }, + { "inputs": ["34561", "34561"], "output": "34561" }, + { "inputs": ["34561", "34557"], "output": "34561" } + ], + "max_euint16_uint16": [ + { "inputs": ["34561", "63895"], "output": "63895" }, + { "inputs": ["34557", "34561"], "output": "34561" }, + { "inputs": ["34561", "34561"], "output": "34561" }, + { "inputs": ["34561", "34557"], "output": "34561" } + ], + "max_uint16_euint16": [ + { "inputs": ["52784", "63895"], "output": "63895" }, + { "inputs": ["34557", "34561"], "output": "34561" }, + { "inputs": ["34561", "34561"], "output": "34561" }, + { "inputs": ["34561", "34557"], "output": "34561" } + ], + "max_euint16_euint32": [ + { "inputs": ["50723", "1432053137"], "output": "1432053137" }, + { "inputs": ["50719", "50723"], "output": "50723" }, + { "inputs": ["50723", "50723"], "output": "50723" }, + { "inputs": ["50723", "50719"], "output": "50723" } + ], + "max_euint16_euint64": [ + { "inputs": ["23644", "18446414081706845657"], "output": "18446414081706845657" }, + { "inputs": ["23640", "23644"], "output": "23644" }, + { "inputs": ["23644", "23644"], "output": "23644" }, + { "inputs": ["23644", "23640"], "output": "23644" } + ], + "max_euint32_euint4": [ + { "inputs": ["681402629", "7"], "output": "681402629" }, + { "inputs": ["4", "8"], "output": "8" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "8" } + ], + "max_euint32_euint8": [ + { "inputs": ["1610798197", "160"], "output": "1610798197" }, + { "inputs": ["156", "160"], "output": "160" }, + { "inputs": ["160", "160"], "output": "160" }, + { "inputs": ["160", "156"], "output": "160" } + ], + "max_euint32_euint16": [ + { "inputs": ["4136615954", "9960"], "output": "4136615954" }, + { "inputs": ["9956", "9960"], "output": "9960" }, + { "inputs": ["9960", "9960"], "output": "9960" }, + { "inputs": ["9960", "9956"], "output": "9960" } + ], + "max_euint32_euint32": [ + { "inputs": ["2043312979", "3247295293"], "output": "3247295293" }, + { "inputs": ["2043312975", "2043312979"], "output": "2043312979" }, + { "inputs": ["2043312979", "2043312979"], "output": "2043312979" }, + { "inputs": ["2043312979", "2043312975"], "output": "2043312979" } + ], + "max_euint32_uint32": [ + { "inputs": ["2043312979", "706283813"], "output": "2043312979" }, + { "inputs": ["2043312975", "2043312979"], "output": "2043312979" }, + { "inputs": ["2043312979", "2043312979"], "output": "2043312979" }, + { "inputs": ["2043312979", "2043312975"], "output": "2043312979" } + ], + "max_uint32_euint32": [ + { "inputs": ["1094445398", "706283813"], "output": "1094445398" }, + { "inputs": ["2043312975", "2043312979"], "output": "2043312979" }, + { "inputs": ["2043312979", "2043312979"], "output": "2043312979" }, + { "inputs": ["2043312979", "2043312975"], "output": "2043312979" } + ], + "max_euint32_euint64": [ + { "inputs": ["340812031", "18443150842651286449"], "output": "18443150842651286449" }, + { "inputs": ["340812027", "340812031"], "output": "340812031" }, + { "inputs": ["340812031", "340812031"], "output": "340812031" }, + { "inputs": ["340812031", "340812027"], "output": "340812031" } + ], + "max_euint64_euint4": [ + { "inputs": ["18441711596093702931", "1"], "output": "18441711596093702931" }, + { "inputs": ["4", "8"], "output": "8" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "8" } + ], + "max_euint64_euint8": [ + { "inputs": ["18442614857754346699", "3"], "output": "18442614857754346699" }, + { "inputs": ["4", "8"], "output": "8" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "8" } + ], + "max_euint64_euint16": [ + { "inputs": ["18439537518803733101", "41315"], "output": "18439537518803733101" }, + { "inputs": ["41311", "41315"], "output": "41315" }, + { "inputs": ["41315", "41315"], "output": "41315" }, + { "inputs": ["41315", "41311"], "output": "41315" } + ], + "max_euint64_euint32": [ + { "inputs": ["18439662390589911437", "4249693397"], "output": "18439662390589911437" }, + { "inputs": ["4249693393", "4249693397"], "output": "4249693397" }, + { "inputs": ["4249693397", "4249693397"], "output": "4249693397" }, + { "inputs": ["4249693397", "4249693393"], "output": "4249693397" } + ], + "max_euint64_euint64": [ + { "inputs": ["18440739371866435289", "18438298584940765731"], "output": "18440739371866435289" }, + { "inputs": ["18438298584940765727", "18438298584940765731"], "output": "18438298584940765731" }, + { "inputs": ["18438298584940765731", "18438298584940765731"], "output": "18438298584940765731" }, + { "inputs": ["18438298584940765731", "18438298584940765727"], "output": "18438298584940765731" } + ], + "max_euint64_uint64": [ + { "inputs": ["18440739371866435289", "18440643015791741637"], "output": "18440739371866435289" }, + { "inputs": ["18438298584940765727", "18438298584940765731"], "output": "18438298584940765731" }, + { "inputs": ["18438298584940765731", "18438298584940765731"], "output": "18438298584940765731" }, + { "inputs": ["18438298584940765731", "18438298584940765727"], "output": "18438298584940765731" } + ], + "max_uint64_euint64": [ + { "inputs": ["18441357041435050863", "18440643015791741637"], "output": "18441357041435050863" }, + { "inputs": ["18438298584940765727", "18438298584940765731"], "output": "18438298584940765731" }, + { "inputs": ["18438298584940765731", "18438298584940765731"], "output": "18438298584940765731" }, + { "inputs": ["18438298584940765731", "18438298584940765727"], "output": "18438298584940765731" } + ], + "min_euint4_euint4": [ + { "inputs": ["6", "5"], "output": "5" }, + { "inputs": ["4", "8"], "output": "4" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "min_euint4_euint8": [ + { "inputs": ["11", "237"], "output": "11" }, + { "inputs": ["7", "11"], "output": "7" }, + { "inputs": ["11", "11"], "output": "11" }, + { "inputs": ["11", "7"], "output": "7" } + ], + "min_euint4_uint8": [ + { "inputs": ["11", "10"], "output": "10" }, + { "inputs": ["7", "11"], "output": "7" }, + { "inputs": ["11", "11"], "output": "11" }, + { "inputs": ["11", "7"], "output": "7" } + ], + "min_euint4_euint16": [ + { "inputs": ["10", "26263"], "output": "10" }, + { "inputs": ["6", "10"], "output": "6" }, + { "inputs": ["10", "10"], "output": "10" }, + { "inputs": ["10", "6"], "output": "6" } + ], + "min_euint4_euint32": [ + { "inputs": ["5", "2670542696"], "output": "5" }, + { "inputs": ["4", "8"], "output": "4" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "min_euint4_euint64": [ + { "inputs": ["6", "18437937380503493287"], "output": "6" }, + { "inputs": ["4", "8"], "output": "4" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "min_euint8_euint4": [ + { "inputs": ["58", "11"], "output": "11" }, + { "inputs": ["7", "11"], "output": "7" }, + { "inputs": ["11", "11"], "output": "11" }, + { "inputs": ["11", "7"], "output": "7" } + ], + "min_uint8_euint4": [ + { "inputs": ["8", "11"], "output": "8" }, + { "inputs": ["7", "11"], "output": "7" }, + { "inputs": ["11", "11"], "output": "11" }, + { "inputs": ["11", "7"], "output": "7" } + ], + "min_euint8_euint8": [ + { "inputs": ["53", "97"], "output": "53" }, + { "inputs": ["49", "53"], "output": "49" }, + { "inputs": ["53", "53"], "output": "53" }, + { "inputs": ["53", "49"], "output": "49" } + ], + "min_euint8_uint8": [ + { "inputs": ["53", "70"], "output": "53" }, + { "inputs": ["49", "53"], "output": "49" }, + { "inputs": ["53", "53"], "output": "53" }, + { "inputs": ["53", "49"], "output": "49" } + ], + "min_uint8_euint8": [ + { "inputs": ["109", "70"], "output": "70" }, + { "inputs": ["49", "53"], "output": "49" }, + { "inputs": ["53", "53"], "output": "53" }, + { "inputs": ["53", "49"], "output": "49" } + ], + "min_euint8_euint16": [ + { "inputs": ["190", "58049"], "output": "190" }, + { "inputs": ["186", "190"], "output": "186" }, + { "inputs": ["190", "190"], "output": "190" }, + { "inputs": ["190", "186"], "output": "186" } + ], + "min_euint8_euint32": [ + { "inputs": ["253", "2965000543"], "output": "253" }, + { "inputs": ["249", "253"], "output": "249" }, + { "inputs": ["253", "253"], "output": "253" }, + { "inputs": ["253", "249"], "output": "249" } + ], + "min_euint8_euint64": [ + { "inputs": ["18", "18446036892619585799"], "output": "18" }, + { "inputs": ["14", "18"], "output": "14" }, + { "inputs": ["18", "18"], "output": "18" }, + { "inputs": ["18", "14"], "output": "14" } + ], + "min_euint16_euint4": [ + { "inputs": ["37174", "5"], "output": "5" }, + { "inputs": ["4", "8"], "output": "4" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "min_euint16_euint8": [ + { "inputs": ["25144", "64"], "output": "64" }, + { "inputs": ["60", "64"], "output": "60" }, + { "inputs": ["64", "64"], "output": "64" }, + { "inputs": ["64", "60"], "output": "60" } + ], + "min_euint16_euint16": [ + { "inputs": ["30936", "9027"], "output": "9027" }, + { "inputs": ["9023", "9027"], "output": "9023" }, + { "inputs": ["9027", "9027"], "output": "9027" }, + { "inputs": ["9027", "9023"], "output": "9023" } + ], + "min_euint16_uint16": [ + { "inputs": ["30936", "64470"], "output": "30936" }, + { "inputs": ["9023", "9027"], "output": "9023" }, + { "inputs": ["9027", "9027"], "output": "9027" }, + { "inputs": ["9027", "9023"], "output": "9023" } + ], + "min_uint16_euint16": [ + { "inputs": ["10499", "64470"], "output": "10499" }, + { "inputs": ["9023", "9027"], "output": "9023" }, + { "inputs": ["9027", "9027"], "output": "9027" }, + { "inputs": ["9027", "9023"], "output": "9023" } + ], + "min_euint16_euint32": [ + { "inputs": ["3581", "3061947173"], "output": "3581" }, + { "inputs": ["3577", "3581"], "output": "3577" }, + { "inputs": ["3581", "3581"], "output": "3581" }, + { "inputs": ["3581", "3577"], "output": "3577" } + ], + "min_euint16_euint64": [ + { "inputs": ["60945", "18442404212044065569"], "output": "60945" }, + { "inputs": ["60941", "60945"], "output": "60941" }, + { "inputs": ["60945", "60945"], "output": "60945" }, + { "inputs": ["60945", "60941"], "output": "60941" } + ], + "min_euint32_euint4": [ + { "inputs": ["3192029980", "3"], "output": "3" }, + { "inputs": ["4", "8"], "output": "4" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "4" } + ], + "min_euint32_euint8": [ + { "inputs": ["2128865754", "127"], "output": "127" }, + { "inputs": ["123", "127"], "output": "123" }, + { "inputs": ["127", "127"], "output": "127" }, + { "inputs": ["127", "123"], "output": "123" } + ], + "min_euint32_euint16": [ + { "inputs": ["2025213170", "65001"], "output": "65001" }, + { "inputs": ["64997", "65001"], "output": "64997" }, + { "inputs": ["65001", "65001"], "output": "65001" }, + { "inputs": ["65001", "64997"], "output": "64997" } + ], + "min_euint32_euint32": [ + { "inputs": ["1800381916", "3495424142"], "output": "1800381916" }, + { "inputs": ["1800381912", "1800381916"], "output": "1800381912" }, + { "inputs": ["1800381916", "1800381916"], "output": "1800381916" }, + { "inputs": ["1800381916", "1800381912"], "output": "1800381912" } + ], + "min_euint32_uint32": [ + { "inputs": ["1800381916", "3488347882"], "output": "1800381916" }, + { "inputs": ["1800381912", "1800381916"], "output": "1800381912" }, + { "inputs": ["1800381916", "1800381916"], "output": "1800381916" }, + { "inputs": ["1800381916", "1800381912"], "output": "1800381912" } + ], + "min_uint32_euint32": [ + { "inputs": ["2638635782", "3488347882"], "output": "2638635782" }, + { "inputs": ["1800381912", "1800381916"], "output": "1800381912" }, + { "inputs": ["1800381916", "1800381916"], "output": "1800381916" }, + { "inputs": ["1800381916", "1800381912"], "output": "1800381912" } + ], + "min_euint32_euint64": [ + { "inputs": ["968740054", "18439525226452222255"], "output": "968740054" }, + { "inputs": ["968740050", "968740054"], "output": "968740050" }, + { "inputs": ["968740054", "968740054"], "output": "968740054" }, + { "inputs": ["968740054", "968740050"], "output": "968740050" } + ], + "min_euint64_euint4": [ + { "inputs": ["18437774930056492317", "14"], "output": "14" }, + { "inputs": ["10", "14"], "output": "10" }, + { "inputs": ["14", "14"], "output": "14" }, + { "inputs": ["14", "10"], "output": "10" } + ], + "min_euint64_euint8": [ + { "inputs": ["18441639004244956281", "36"], "output": "36" }, + { "inputs": ["32", "36"], "output": "32" }, + { "inputs": ["36", "36"], "output": "36" }, + { "inputs": ["36", "32"], "output": "32" } + ], + "min_euint64_euint16": [ + { "inputs": ["18440273866551894469", "42779"], "output": "42779" }, + { "inputs": ["42775", "42779"], "output": "42775" }, + { "inputs": ["42779", "42779"], "output": "42779" }, + { "inputs": ["42779", "42775"], "output": "42775" } + ], + "min_euint64_euint32": [ + { "inputs": ["18442182412102668107", "657148413"], "output": "657148413" }, + { "inputs": ["657148409", "657148413"], "output": "657148409" }, + { "inputs": ["657148413", "657148413"], "output": "657148413" }, + { "inputs": ["657148413", "657148409"], "output": "657148409" } + ], + "min_euint64_euint64": [ + { "inputs": ["18444400472074074345", "18442962239103377481"], "output": "18442962239103377481" }, + { "inputs": ["18442962239103377477", "18442962239103377481"], "output": "18442962239103377477" }, + { "inputs": ["18442962239103377481", "18442962239103377481"], "output": "18442962239103377481" }, + { "inputs": ["18442962239103377481", "18442962239103377477"], "output": "18442962239103377477" } + ], + "min_euint64_uint64": [ + { "inputs": ["18444400472074074345", "18445675871085860653"], "output": "18444400472074074345" }, + { "inputs": ["18442962239103377477", "18442962239103377481"], "output": "18442962239103377477" }, + { "inputs": ["18442962239103377481", "18442962239103377481"], "output": "18442962239103377481" }, + { "inputs": ["18442962239103377481", "18442962239103377477"], "output": "18442962239103377477" } + ], + "min_uint64_euint64": [ + { "inputs": ["18443908139931756717", "18445675871085860653"], "output": "18443908139931756717" }, + { "inputs": ["18442962239103377477", "18442962239103377481"], "output": "18442962239103377477" }, + { "inputs": ["18442962239103377481", "18442962239103377481"], "output": "18442962239103377481" }, + { "inputs": ["18442962239103377481", "18442962239103377477"], "output": "18442962239103377477" } + ], + "or_euint4_euint4": [ + { "inputs": ["6", "5"], "output": "7" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "or_euint4_euint8": [ + { "inputs": ["14", "110"], "output": "110" }, + { "inputs": ["10", "14"], "output": "14" }, + { "inputs": ["14", "14"], "output": "14" }, + { "inputs": ["14", "10"], "output": "14" } + ], + "or_euint4_euint16": [ + { "inputs": ["3", "60460"], "output": "60463" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "or_euint4_euint32": [ + { "inputs": ["3", "2840015564"], "output": "2840015567" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "or_euint4_euint64": [ + { "inputs": ["10", "18439589984533574615"], "output": "18439589984533574623" }, + { "inputs": ["6", "10"], "output": "14" }, + { "inputs": ["10", "10"], "output": "10" }, + { "inputs": ["10", "6"], "output": "14" } + ], + "or_euint8_euint4": [ + { "inputs": ["89", "1"], "output": "89" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "or_euint8_euint8": [ + { "inputs": ["174", "137"], "output": "175" }, + { "inputs": ["133", "137"], "output": "141" }, + { "inputs": ["137", "137"], "output": "137" }, + { "inputs": ["137", "133"], "output": "141" } + ], + "or_euint8_euint16": [ + { "inputs": ["99", "46031"], "output": "46063" }, + { "inputs": ["95", "99"], "output": "127" }, + { "inputs": ["99", "99"], "output": "99" }, + { "inputs": ["99", "95"], "output": "127" } + ], + "or_euint8_euint32": [ + { "inputs": ["50", "1388677537"], "output": "1388677555" }, + { "inputs": ["46", "50"], "output": "62" }, + { "inputs": ["50", "50"], "output": "50" }, + { "inputs": ["50", "46"], "output": "62" } + ], + "or_euint8_euint64": [ + { "inputs": ["135", "18439029290182698975"], "output": "18439029290182698975" }, + { "inputs": ["131", "135"], "output": "135" }, + { "inputs": ["135", "135"], "output": "135" }, + { "inputs": ["135", "131"], "output": "135" } + ], + "or_euint16_euint4": [ + { "inputs": ["57838", "2"], "output": "57838" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "or_euint16_euint8": [ + { "inputs": ["60745", "176"], "output": "60921" }, + { "inputs": ["172", "176"], "output": "188" }, + { "inputs": ["176", "176"], "output": "176" }, + { "inputs": ["176", "172"], "output": "188" } + ], + "or_euint16_euint16": [ + { "inputs": ["53682", "14727"], "output": "63927" }, + { "inputs": ["14723", "14727"], "output": "14727" }, + { "inputs": ["14727", "14727"], "output": "14727" }, + { "inputs": ["14727", "14723"], "output": "14727" } + ], + "or_euint16_euint32": [ + { "inputs": ["47569", "1867557342"], "output": "1867561439" }, + { "inputs": ["47565", "47569"], "output": "47581" }, + { "inputs": ["47569", "47569"], "output": "47569" }, + { "inputs": ["47569", "47565"], "output": "47581" } + ], + "or_euint16_euint64": [ + { "inputs": ["3594", "18443975303513898329"], "output": "18443975303513898843" }, + { "inputs": ["3590", "3594"], "output": "3598" }, + { "inputs": ["3594", "3594"], "output": "3594" }, + { "inputs": ["3594", "3590"], "output": "3598" } + ], + "or_euint32_euint4": [ + { "inputs": ["2406735968", "5"], "output": "2406735973" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "or_euint32_euint8": [ + { "inputs": ["3961011805", "118"], "output": "3961011839" }, + { "inputs": ["114", "118"], "output": "118" }, + { "inputs": ["118", "118"], "output": "118" }, + { "inputs": ["118", "114"], "output": "118" } + ], + "or_euint32_euint16": [ + { "inputs": ["2441286673", "26427"], "output": "2441312059" }, + { "inputs": ["26423", "26427"], "output": "26431" }, + { "inputs": ["26427", "26427"], "output": "26427" }, + { "inputs": ["26427", "26423"], "output": "26431" } + ], + "or_euint32_euint32": [ + { "inputs": ["183558137", "3592149879"], "output": "3741048831" }, + { "inputs": ["183558133", "183558137"], "output": "183558141" }, + { "inputs": ["183558137", "183558137"], "output": "183558137" }, + { "inputs": ["183558137", "183558133"], "output": "183558141" } + ], + "or_euint32_euint64": [ + { "inputs": ["1857122149", "18440946789011191531"], "output": "18440946789112971247" }, + { "inputs": ["1857122145", "1857122149"], "output": "1857122149" }, + { "inputs": ["1857122149", "1857122149"], "output": "1857122149" }, + { "inputs": ["1857122149", "1857122145"], "output": "1857122149" } + ], + "or_euint64_euint4": [ + { "inputs": ["18445233461885169423", "12"], "output": "18445233461885169423" }, + { "inputs": ["8", "12"], "output": "12" }, + { "inputs": ["12", "12"], "output": "12" }, + { "inputs": ["12", "8"], "output": "12" } + ], + "or_euint64_euint8": [ + { "inputs": ["18445900286060653541", "17"], "output": "18445900286060653557" }, + { "inputs": ["13", "17"], "output": "29" }, + { "inputs": ["17", "17"], "output": "17" }, + { "inputs": ["17", "13"], "output": "29" } + ], + "or_euint64_euint16": [ + { "inputs": ["18445329388989380329", "5327"], "output": "18445329388989380335" }, + { "inputs": ["5323", "5327"], "output": "5327" }, + { "inputs": ["5327", "5327"], "output": "5327" }, + { "inputs": ["5327", "5323"], "output": "5327" } + ], + "or_euint64_euint32": [ + { "inputs": ["18444852954550836631", "3550708762"], "output": "18444852955920440735" }, + { "inputs": ["3550708758", "3550708762"], "output": "3550708766" }, + { "inputs": ["3550708762", "3550708762"], "output": "3550708762" }, + { "inputs": ["3550708762", "3550708758"], "output": "3550708766" } + ], + "or_euint64_euint64": [ + { "inputs": ["18439947486770357681", "18442205516883919361"], "output": "18442234697046943665" }, + { "inputs": ["18439947486770357677", "18439947486770357681"], "output": "18439947486770357693" }, + { "inputs": ["18439947486770357681", "18439947486770357681"], "output": "18439947486770357681" }, + { "inputs": ["18439947486770357681", "18439947486770357677"], "output": "18439947486770357693" } + ], + "and_euint4_euint4": [ + { "inputs": ["5", "2"], "output": "0" }, + { "inputs": ["4", "8"], "output": "0" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "0" } + ], + "and_euint4_euint8": [ + { "inputs": ["12", "110"], "output": "12" }, + { "inputs": ["8", "12"], "output": "8" }, + { "inputs": ["12", "12"], "output": "12" }, + { "inputs": ["12", "8"], "output": "8" } + ], + "and_euint4_euint16": [ + { "inputs": ["10", "16702"], "output": "10" }, + { "inputs": ["6", "10"], "output": "2" }, + { "inputs": ["10", "10"], "output": "10" }, + { "inputs": ["10", "6"], "output": "2" } + ], + "and_euint4_euint32": [ + { "inputs": ["6", "3534750602"], "output": "2" }, + { "inputs": ["4", "8"], "output": "0" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "0" } + ], + "and_euint4_euint64": [ + { "inputs": ["7", "18444452142912700231"], "output": "7" }, + { "inputs": ["4", "8"], "output": "0" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "0" } + ], + "and_euint8_euint4": [ + { "inputs": ["143", "6"], "output": "6" }, + { "inputs": ["4", "8"], "output": "0" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "0" } + ], + "and_euint8_euint8": [ + { "inputs": ["254", "204"], "output": "204" }, + { "inputs": ["200", "204"], "output": "200" }, + { "inputs": ["204", "204"], "output": "204" }, + { "inputs": ["204", "200"], "output": "200" } + ], + "and_euint8_euint16": [ + { "inputs": ["112", "22367"], "output": "80" }, + { "inputs": ["108", "112"], "output": "96" }, + { "inputs": ["112", "112"], "output": "112" }, + { "inputs": ["112", "108"], "output": "96" } + ], + "and_euint8_euint32": [ + { "inputs": ["36", "664013992"], "output": "32" }, + { "inputs": ["32", "36"], "output": "32" }, + { "inputs": ["36", "36"], "output": "36" }, + { "inputs": ["36", "32"], "output": "32" } + ], + "and_euint8_euint64": [ + { "inputs": ["187", "18444084668783699555"], "output": "35" }, + { "inputs": ["183", "187"], "output": "179" }, + { "inputs": ["187", "187"], "output": "187" }, + { "inputs": ["187", "183"], "output": "179" } + ], + "and_euint16_euint4": [ + { "inputs": ["6680", "4"], "output": "0" }, + { "inputs": ["4", "8"], "output": "0" }, + { "inputs": ["8", "8"], "output": "8" }, + { "inputs": ["8", "4"], "output": "0" } + ], + "and_euint16_euint8": [ + { "inputs": ["18191", "188"], "output": "12" }, + { "inputs": ["184", "188"], "output": "184" }, + { "inputs": ["188", "188"], "output": "188" }, + { "inputs": ["188", "184"], "output": "184" } + ], + "and_euint16_euint16": [ + { "inputs": ["63103", "25335"], "output": "25207" }, + { "inputs": ["25331", "25335"], "output": "25331" }, + { "inputs": ["25335", "25335"], "output": "25335" }, + { "inputs": ["25335", "25331"], "output": "25331" } + ], + "and_euint16_euint32": [ + { "inputs": ["31764", "719791208"], "output": "9216" }, + { "inputs": ["31760", "31764"], "output": "31760" }, + { "inputs": ["31764", "31764"], "output": "31764" }, + { "inputs": ["31764", "31760"], "output": "31760" } + ], + "and_euint16_euint64": [ + { "inputs": ["3617", "18445521461849474399"], "output": "1025" }, + { "inputs": ["3613", "3617"], "output": "3585" }, + { "inputs": ["3617", "3617"], "output": "3617" }, + { "inputs": ["3617", "3613"], "output": "3585" } + ], + "and_euint32_euint4": [ + { "inputs": ["1301921086", "9"], "output": "8" }, + { "inputs": ["5", "9"], "output": "1" }, + { "inputs": ["9", "9"], "output": "9" }, + { "inputs": ["9", "5"], "output": "1" } + ], + "and_euint32_euint8": [ + { "inputs": ["2684075699", "16"], "output": "16" }, + { "inputs": ["12", "16"], "output": "0" }, + { "inputs": ["16", "16"], "output": "16" }, + { "inputs": ["16", "12"], "output": "0" } + ], + "and_euint32_euint16": [ + { "inputs": ["1113519013", "16851"], "output": "16769" }, + { "inputs": ["16847", "16851"], "output": "16835" }, + { "inputs": ["16851", "16851"], "output": "16851" }, + { "inputs": ["16851", "16847"], "output": "16835" } + ], + "and_euint32_euint32": [ + { "inputs": ["749010015", "1458345079"], "output": "77894743" }, + { "inputs": ["749010011", "749010015"], "output": "749010011" }, + { "inputs": ["749010015", "749010015"], "output": "749010015" }, + { "inputs": ["749010015", "749010011"], "output": "749010011" } + ], + "and_euint32_euint64": [ + { "inputs": ["365928159", "18445926323394727831"], "output": "13110935" }, + { "inputs": ["365928155", "365928159"], "output": "365928155" }, + { "inputs": ["365928159", "365928159"], "output": "365928159" }, + { "inputs": ["365928159", "365928155"], "output": "365928155" } + ], + "and_euint64_euint4": [ + { "inputs": ["18442416087216426369", "12"], "output": "0" }, + { "inputs": ["8", "12"], "output": "8" }, + { "inputs": ["12", "12"], "output": "12" }, + { "inputs": ["12", "8"], "output": "8" } + ], + "and_euint64_euint8": [ + { "inputs": ["18438525099029165039", "71"], "output": "71" }, + { "inputs": ["67", "71"], "output": "67" }, + { "inputs": ["71", "71"], "output": "71" }, + { "inputs": ["71", "67"], "output": "67" } + ], + "and_euint64_euint16": [ + { "inputs": ["18444131025157690381", "45908"], "output": "4100" }, + { "inputs": ["45904", "45908"], "output": "45904" }, + { "inputs": ["45908", "45908"], "output": "45908" }, + { "inputs": ["45908", "45904"], "output": "45904" } + ], + "and_euint64_euint32": [ + { "inputs": ["18444449709394842073", "3823819229"], "output": "2718454233" }, + { "inputs": ["3823819225", "3823819229"], "output": "3823819225" }, + { "inputs": ["3823819229", "3823819229"], "output": "3823819229" }, + { "inputs": ["3823819229", "3823819225"], "output": "3823819225" } + ], + "and_euint64_euint64": [ + { "inputs": ["18441848963293247005", "18437762817766608073"], "output": "18437758350371472393" }, + { "inputs": ["18437762817766608069", "18437762817766608073"], "output": "18437762817766608065" }, + { "inputs": ["18437762817766608073", "18437762817766608073"], "output": "18437762817766608073" }, + { "inputs": ["18437762817766608073", "18437762817766608069"], "output": "18437762817766608065" } + ], + "xor_euint4_euint4": [ + { "inputs": ["2", "10"], "output": "8" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "xor_euint4_euint8": [ + { "inputs": ["12", "244"], "output": "248" }, + { "inputs": ["8", "12"], "output": "4" }, + { "inputs": ["12", "12"], "output": "0" }, + { "inputs": ["12", "8"], "output": "4" } + ], + "xor_euint4_euint16": [ + { "inputs": ["6", "58722"], "output": "58724" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "xor_euint4_euint32": [ + { "inputs": ["6", "2183122437"], "output": "2183122435" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "xor_euint4_euint64": [ + { "inputs": ["7", "18438536745518625067"], "output": "18438536745518625068" }, + { "inputs": ["4", "8"], "output": "12" }, + { "inputs": ["8", "8"], "output": "0" }, + { "inputs": ["8", "4"], "output": "12" } + ], + "xor_euint8_euint4": [ + { "inputs": ["100", "12"], "output": "104" }, + { "inputs": ["8", "12"], "output": "4" }, + { "inputs": ["12", "12"], "output": "0" }, + { "inputs": ["12", "8"], "output": "4" } + ], + "xor_euint8_euint8": [ + { "inputs": ["183", "10"], "output": "189" }, + { "inputs": ["6", "10"], "output": "12" }, + { "inputs": ["10", "10"], "output": "0" }, + { "inputs": ["10", "6"], "output": "12" } + ], + "xor_euint8_euint16": [ + { "inputs": ["129", "2322"], "output": "2451" }, + { "inputs": ["125", "129"], "output": "252" }, + { "inputs": ["129", "129"], "output": "0" }, + { "inputs": ["129", "125"], "output": "252" } + ], + "xor_euint8_euint32": [ + { "inputs": ["67", "2386754441"], "output": "2386754506" }, + { "inputs": ["63", "67"], "output": "124" }, + { "inputs": ["67", "67"], "output": "0" }, + { "inputs": ["67", "63"], "output": "124" } + ], + "xor_euint8_euint64": [ + { "inputs": ["84", "18444990477299490715"], "output": "18444990477299490767" }, + { "inputs": ["80", "84"], "output": "4" }, + { "inputs": ["84", "84"], "output": "0" }, + { "inputs": ["84", "80"], "output": "4" } + ], + "xor_euint16_euint4": [ + { "inputs": ["29564", "14"], "output": "29554" }, + { "inputs": ["10", "14"], "output": "4" }, + { "inputs": ["14", "14"], "output": "0" }, + { "inputs": ["14", "10"], "output": "4" } + ], + "xor_euint16_euint8": [ + { "inputs": ["24120", "221"], "output": "24293" }, + { "inputs": ["217", "221"], "output": "4" }, + { "inputs": ["221", "221"], "output": "0" }, + { "inputs": ["221", "217"], "output": "4" } + ], + "xor_euint16_euint16": [ + { "inputs": ["272", "42865"], "output": "42593" }, + { "inputs": ["268", "272"], "output": "28" }, + { "inputs": ["272", "272"], "output": "0" }, + { "inputs": ["272", "268"], "output": "28" } + ], + "xor_euint16_euint32": [ + { "inputs": ["49958", "2256953798"], "output": "2256970464" }, + { "inputs": ["49954", "49958"], "output": "4" }, + { "inputs": ["49958", "49958"], "output": "0" }, + { "inputs": ["49958", "49954"], "output": "4" } + ], + "xor_euint16_euint64": [ + { "inputs": ["31158", "18442847100019644985"], "output": "18442847100019663759" }, + { "inputs": ["31154", "31158"], "output": "4" }, + { "inputs": ["31158", "31158"], "output": "0" }, + { "inputs": ["31158", "31154"], "output": "4" } + ], + "xor_euint32_euint4": [ + { "inputs": ["3625477729", "13"], "output": "3625477740" }, + { "inputs": ["9", "13"], "output": "4" }, + { "inputs": ["13", "13"], "output": "0" }, + { "inputs": ["13", "9"], "output": "4" } + ], + "xor_euint32_euint8": [ + { "inputs": ["2615810877", "184"], "output": "2615810949" }, + { "inputs": ["180", "184"], "output": "12" }, + { "inputs": ["184", "184"], "output": "0" }, + { "inputs": ["184", "180"], "output": "12" } + ], + "xor_euint32_euint16": [ + { "inputs": ["2697992454", "47573"], "output": "2698027219" }, + { "inputs": ["47569", "47573"], "output": "4" }, + { "inputs": ["47573", "47573"], "output": "0" }, + { "inputs": ["47573", "47569"], "output": "4" } + ], + "xor_euint32_euint32": [ + { "inputs": ["3727740302", "3007364521"], "output": "1836085287" }, + { "inputs": ["3007364517", "3007364521"], "output": "12" }, + { "inputs": ["3007364521", "3007364521"], "output": "0" }, + { "inputs": ["3007364521", "3007364517"], "output": "12" } + ], + "xor_euint32_euint64": [ + { "inputs": ["2536876532", "18445343517070927715"], "output": "18445343518833806999" }, + { "inputs": ["2536876528", "2536876532"], "output": "4" }, + { "inputs": ["2536876532", "2536876532"], "output": "0" }, + { "inputs": ["2536876532", "2536876528"], "output": "4" } + ], + "xor_euint64_euint4": [ + { "inputs": ["18444022948851042337", "14"], "output": "18444022948851042351" }, + { "inputs": ["10", "14"], "output": "4" }, + { "inputs": ["14", "14"], "output": "0" }, + { "inputs": ["14", "10"], "output": "4" } + ], + "xor_euint64_euint8": [ + { "inputs": ["18439418694946486147", "205"], "output": "18439418694946486094" }, + { "inputs": ["201", "205"], "output": "4" }, + { "inputs": ["205", "205"], "output": "0" }, + { "inputs": ["205", "201"], "output": "4" } + ], + "xor_euint64_euint16": [ + { "inputs": ["18443398919380985157", "45655"], "output": "18443398919380948754" }, + { "inputs": ["45651", "45655"], "output": "4" }, + { "inputs": ["45655", "45655"], "output": "0" }, + { "inputs": ["45655", "45651"], "output": "4" } + ], + "xor_euint64_euint32": [ + { "inputs": ["18445532500811503869", "2578227181"], "output": "18445532498506434320" }, + { "inputs": ["2578227177", "2578227181"], "output": "4" }, + { "inputs": ["2578227181", "2578227181"], "output": "0" }, + { "inputs": ["2578227181", "2578227177"], "output": "4" } + ], + "xor_euint64_euint64": [ + { "inputs": ["18444700078916958431", "18443866708631144651"], "output": "3795455568392212" }, + { "inputs": ["18443866708631144647", "18443866708631144651"], "output": "12" }, + { "inputs": ["18443866708631144651", "18443866708631144651"], "output": "0" }, + { "inputs": ["18443866708631144651", "18443866708631144647"], "output": "12" } + ], + "not_euint4": [{ "inputs": ["13"], "output": "2" }], + "not_euint8": [{ "inputs": ["187"], "output": "68" }], + "not_euint16": [{ "inputs": ["60538"], "output": "4997" }], + "not_euint32": [{ "inputs": ["2475211657"], "output": "1819755638" }], + "not_euint64": [{ "inputs": ["18443955194473722291"], "output": "2788879235829324" }], + "neg_euint4": [{ "inputs": ["11"], "output": "5" }], + "neg_euint8": [{ "inputs": ["251"], "output": "5" }], + "neg_euint16": [{ "inputs": ["25161"], "output": "40375" }], + "neg_euint32": [{ "inputs": ["2156295218"], "output": "2138672078" }], + "neg_euint64": [{ "inputs": ["18438244346234461619"], "output": "8499727475089997" }] +} diff --git a/codegen/templates.ts b/codegen/templates.ts index 2df69825..0c536307 100644 --- a/codegen/templates.ts +++ b/codegen/templates.ts @@ -2,10 +2,12 @@ import { assert } from 'console'; import { CodegenContext, Operator, OperatorArguments, ReturnType } from './common'; import { ArgumentType, OverloadSignature } from './testgen'; +import { getUint } from './utils'; export function commonSolLib(): string { return ` type ebool is uint256; +type euint4 is uint256; type euint8 is uint256; type euint16 is uint256; type euint32 is uint256; @@ -14,10 +16,11 @@ type euint64 is uint256; library Common { // Values used to communicate types to the runtime. uint8 internal constant ebool_t = 0; - uint8 internal constant euint8_t = 0; - uint8 internal constant euint16_t = 1; - uint8 internal constant euint32_t = 2; - uint8 internal constant euint64_t = 3; + uint8 internal constant euint4_t = 1; + uint8 internal constant euint8_t = 2; + uint8 internal constant euint16_t = 3; + uint8 internal constant euint32_t = 4; + uint8 internal constant euint64_t = 5; } `; } @@ -254,16 +257,16 @@ function tfheSolidityOperator(bits: number, operator: Operator, os: OverloadSign } `); - os.push({ - binaryOperator: operator.binarySolidityOperator, - arguments: [ - { type: ArgumentType.EUint, bits }, - { type: ArgumentType.EUint, bits }, - ], + // os.push({ + // binaryOperator: operator.binarySolidityOperator, + // arguments: [ + // { type: ArgumentType.EUint, bits }, + // { type: ArgumentType.EUint, bits }, + // ], - name: `bin_op_${operator.name}`, - returnType: { type: ArgumentType.EUint, bits }, - }); + // name: `bin_op_${operator.name}`, + // returnType: { type: ArgumentType.EUint, bits }, + // }); } if (operator.hasEncrypted && operator.unarySolidityOperator) { @@ -278,13 +281,13 @@ function tfheSolidityOperator(bits: number, operator: Operator, os: OverloadSign } `); - os.push({ - unaryOperator: operator.unarySolidityOperator, - arguments: [{ type: ArgumentType.EUint, bits }], + // os.push({ + // unaryOperator: operator.unarySolidityOperator, + // arguments: [{ type: ArgumentType.EUint, bits }], - name: `unary_op_${operator.name}`, - returnType: { type: ArgumentType.EUint, bits }, - }); + // name: `unary_op_${operator.name}`, + // returnType: { type: ArgumentType.EUint, bits }, + // }); } return res.join(''); @@ -305,7 +308,6 @@ function tfheEncryptedOperator( const outputBits = Math.max(lhsBits, rhsBits); const castLeftToRight = lhsBits < rhsBits; const castRightToLeft = lhsBits > rhsBits; - const boolCastNeeded = outputBits > 8 && operator.returnType == ReturnType.Ebool; const returnType = operator.returnType == ReturnType.Uint ? `euint${outputBits}` @@ -319,9 +321,6 @@ function tfheEncryptedOperator( const leftExpr = castLeftToRight ? `asEuint${outputBits}(a)` : 'a'; const rightExpr = castRightToLeft ? `asEuint${outputBits}(b)` : 'b'; let implExpression = `Impl.${operator.name}(euint${outputBits}.unwrap(${leftExpr}), euint${outputBits}.unwrap(${rightExpr})${scalarFlag})`; - if (boolCastNeeded) { - implExpression = `Impl.cast(${implExpression}, Common.ebool_t)`; - } signatures.push({ name: operator.name, arguments: [ @@ -363,7 +362,6 @@ function tfheScalarOperator( const res: string[] = []; const outputBits = Math.max(lhsBits, rhsBits); - const boolCastNeeded = outputBits > 8 && operator.returnType == ReturnType.Ebool; const returnType = operator.returnType == ReturnType.Uint ? `euint${outputBits}` @@ -383,11 +381,6 @@ function tfheScalarOperator( maybeEncryptLeft = `euint${outputBits} aEnc = asEuint${outputBits}(a);`; implExpressionB = `Impl.${leftOpName}(euint${outputBits}.unwrap(aEnc), euint${outputBits}.unwrap(b)${scalarFlag})`; } - if (boolCastNeeded) { - implExpressionA = `Impl.cast(${implExpressionA}, Common.ebool_t)`; - implExpressionB = `Impl.cast(${implExpressionB}, Common.ebool_t)`; - } - signatures.push({ name: operator.name, arguments: [ @@ -400,7 +393,7 @@ function tfheScalarOperator( // rhs scalar res.push(` // Evaluate ${operator.name}(a, b) and return the result. - function ${operator.name}(euint${lhsBits} a, uint${rhsBits} b) internal pure returns (${returnType}) { + function ${operator.name}(euint${lhsBits} a, ${getUint(rhsBits)} b) internal pure returns (${returnType}) { if (!isInitialized(a)) { a = asEuint${lhsBits}(0); } @@ -422,7 +415,7 @@ function tfheScalarOperator( res.push(` // Evaluate ${operator.name}(a, b) and return the result. - function ${operator.name}(uint${lhsBits} a, euint${rhsBits} b) internal pure returns (${returnType}) { + function ${operator.name}(${getUint(lhsBits)} a, euint${rhsBits} b) internal pure returns (${returnType}) { ${maybeEncryptLeft} if (!isInitialized(b)) { b = asEuint${rhsBits}(0); @@ -453,15 +446,17 @@ function tfheShiftOperators(inputBits: number, operator: Operator, signatures: O const rightExpr = castRightToLeft ? `asEuint${outputBits}(b)` : 'b'; let implExpression = `Impl.${operator.name}(euint${outputBits}.unwrap(${leftExpr}), euint${outputBits}.unwrap(${rightExpr})${scalarFlag})`; - signatures.push({ - name: operator.name, - arguments: [ - { type: ArgumentType.EUint, bits: lhsBits }, - { type: ArgumentType.EUint, bits: rhsBits }, - ], - returnType: { type: returnTypeOverload, bits: outputBits }, - }); - res.push(` + if (inputBits >= 8) { + signatures.push({ + name: operator.name, + arguments: [ + { type: ArgumentType.EUint, bits: lhsBits }, + { type: ArgumentType.EUint, bits: rhsBits }, + ], + returnType: { type: returnTypeOverload, bits: outputBits }, + }); + + res.push(` // Evaluate ${operator.name}(a, b) and return the result. function ${operator.name}(euint${lhsBits} a, euint${rhsBits} b) internal pure returns (${returnType}) { if (!isInitialized(a)) { @@ -473,6 +468,7 @@ function tfheShiftOperators(inputBits: number, operator: Operator, signatures: O return ${returnType}.wrap(${implExpression}); } `); + } // Code and test for shift(euint{inputBits},uint8} scalarFlag = ', true'; @@ -497,7 +493,7 @@ function tfheShiftOperators(inputBits: number, operator: Operator, signatures: O }); res.push(` // Evaluate ${operator.name}(a, b) and return the result. - function ${operator.name}(euint${lhsBits} a, uint${rhsBits} b) internal pure returns (${returnType}) { + function ${operator.name}(euint${lhsBits} a, ${getUint(rhsBits)} b) internal pure returns (${returnType}) { if (!isInitialized(a)) { a = asEuint${lhsBits}(0); } @@ -541,48 +537,47 @@ function tfheAsEboolUnaryCast(bits: number): string { if (bits == 8) { res.push(` - // Convert a serialized 'ciphertext' to an encrypted boolean. + // Convert a serialized 'ciphertext' to an encrypted euint8 integer. function asEbool(bytes memory ciphertext) internal pure returns (ebool) { - return asEbool(asEuint8(ciphertext)); + return ebool.wrap(Impl.verify(ciphertext, Common.ebool_t)); + } + + // Convert a plaintext value to an encrypted euint8 integer. + function asEbool(uint256 value) internal pure returns (ebool) { + return ebool.wrap(Impl.trivialEncrypt(value, Common.ebool_t)); } // Convert a plaintext boolean to an encrypted boolean. function asEbool(bool value) internal pure returns (ebool) { if (value) { - return asEbool(asEuint8(1)); + return asEbool(1); } else { - return asEbool(asEuint8(0)); + return asEbool(0); } } // Converts an 'ebool' to an 'euint8'. - function asEuint8(ebool b) internal pure returns (euint8) { - return euint8.wrap(ebool.unwrap(b)); + function asEuint8(ebool value) internal pure returns (euint8) { + return euint8.wrap(Impl.cast(ebool.unwrap(value), Common.euint8_t)); } // Evaluate and(a, b) and return the result. function and(ebool a, ebool b) internal pure returns (ebool) { - return asEbool(and(asEuint8(a), asEuint8(b))); + return ebool.wrap(Impl.and(ebool.unwrap(a), ebool.unwrap(b))); } // Evaluate or(a, b) and return the result. function or(ebool a, ebool b) internal pure returns (ebool) { - return asEbool(or(asEuint8(a), asEuint8(b))); + return ebool.wrap(Impl.or(ebool.unwrap(a), ebool.unwrap(b))); } // Evaluate xor(a, b) and return the result. function xor(ebool a, ebool b) internal pure returns (ebool) { - return asEbool(xor(asEuint8(a), asEuint8(b))); + return ebool.wrap(Impl.xor(ebool.unwrap(a), ebool.unwrap(b))); } function not(ebool a) internal pure returns (ebool) { - return asEbool(and(not(asEuint8(a)), asEuint8(1))); - } - - // If 'control''s value is 'true', the result has the same value as 'a'. - // If 'control''s value is 'false', the result has the same value as 'b'. - function cmux(ebool cond, ebool a, ebool b) internal pure returns (ebool) { - return asEbool(cmux(cond, asEuint8(a), asEuint8(b))); + return ebool.wrap(Impl.not(ebool.unwrap(a))); } `); } else { @@ -640,7 +635,9 @@ function tfheCustomUnaryOperators(bits: number, signatures: OverloadSignature[]) // Reencrypt the given 'value' under the given 'publicKey'. // If 'value' is not initialized, the returned value will contain the 'defaultValue' constant. // Return a serialized euint${bits} ciphertext. - function reencrypt(euint${bits} value, bytes32 publicKey, uint${bits} defaultValue) internal view returns (bytes memory reencrypted) { + function reencrypt(euint${bits} value, bytes32 publicKey, ${getUint( + bits, + )} defaultValue) internal view returns (bytes memory reencrypted) { if (euint${bits}.unwrap(value) != 0) { return Impl.reencrypt(euint${bits}.unwrap(value), publicKey); } else { @@ -649,8 +646,8 @@ function tfheCustomUnaryOperators(bits: number, signatures: OverloadSignature[]) } // Decrypts the encrypted 'value'. - function decrypt(euint${bits} value) internal view returns (uint${bits}) { - return uint${bits}(Impl.decrypt(euint${bits}.unwrap(value))); + function decrypt(euint${bits} value) internal view returns (${getUint(bits)}) { + return ${getUint(bits)}(Impl.decrypt(euint${bits}.unwrap(value))); } `; } @@ -687,7 +684,7 @@ function tfheCustomMethods(ctx: CodegenContext): string { // because there is a single call to the decryption oracle per transaction, irrespective // of how many optimistic requires were used. function optReq(ebool b) internal view { - Impl.optReq(ebool.unwrap(b)); + Impl.optReq(euint8.unwrap(asEuint8(b))); } // Decrypts the encrypted 'value'. diff --git a/codegen/testgen.ts b/codegen/testgen.ts index 9d0876fb..f503a111 100644 --- a/codegen/testgen.ts +++ b/codegen/testgen.ts @@ -2,6 +2,7 @@ import { strict as assert } from 'node:assert'; import { Operator } from './common'; import { overloadTests } from './overloadTests'; +import { getUint } from './utils'; export enum ArgumentType { Ebool, @@ -166,8 +167,11 @@ async function deployTfheTestFixture${os.shardNumber}(): Promise= min && input <= max, `${bits} bit number ${input} doesn't fall into expected [${min}; ${max}] range`); } @@ -299,7 +303,7 @@ function functionTypeToCalldataType(t: FunctionType): string { case ArgumentType.EUint: return `bytes calldata`; case ArgumentType.Uint: - return `uint${t.bits}`; + return getUint(t.bits); case ArgumentType.Ebool: return `bool`; } @@ -309,7 +313,7 @@ function functionTypeToDecryptedType(t: FunctionType): string { switch (t.type) { case ArgumentType.EUint: case ArgumentType.Uint: - return `uint${t.bits}`; + return getUint(t.bits); case ArgumentType.Ebool: return `bool`; } @@ -330,7 +334,7 @@ function functionTypeToString(t: FunctionType): string { case ArgumentType.EUint: return `euint${t.bits}`; case ArgumentType.Uint: - return `uint${t.bits}`; + return getUint(t.bits); case ArgumentType.Ebool: return `ebool`; } diff --git a/codegen/utils.ts b/codegen/utils.ts new file mode 100644 index 00000000..47d49d32 --- /dev/null +++ b/codegen/utils.ts @@ -0,0 +1,4 @@ +export const getUint = (bits: number) => { + if (bits <= 8) return 'uint8'; + return `uint${bits}`; +}; diff --git a/examples/tests/TFHEManualTestSuite.sol b/examples/tests/TFHEManualTestSuite.sol index 147da9f2..76b96491 100644 --- a/examples/tests/TFHEManualTestSuite.sol +++ b/examples/tests/TFHEManualTestSuite.sol @@ -15,6 +15,14 @@ contract TFHEManualTestSuite { return TFHE.decrypt(TFHE.cmux(controlProc, ifTrueProc, ifFalseProc)); } + function test_ebool_to_euint4_cast(bool input) public view returns (uint16) { + return TFHE.decrypt(TFHE.asEuint4(TFHE.asEbool(input))); + } + + function test_ebool_to_euint8_cast(bool input) public view returns (uint16) { + return TFHE.decrypt(TFHE.asEuint8(TFHE.asEbool(input))); + } + function test_ebool_to_euint16_cast(bool input) public view returns (uint16) { return TFHE.decrypt(TFHE.asEuint16(TFHE.asEbool(input))); } diff --git a/examples/tests/TFHETestSuite1.sol b/examples/tests/TFHETestSuite1.sol index 5d65716d..b235a880 100644 --- a/examples/tests/TFHETestSuite1.sol +++ b/examples/tests/TFHETestSuite1.sol @@ -4,703 +4,703 @@ pragma solidity ^0.8.20; import "../../lib/TFHE.sol"; contract TFHETestSuite1 { - function add_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function add_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.add(aProc, bProc); + return TFHE.decrypt(result); + } + + function sub_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.sub(aProc, bProc); + return TFHE.decrypt(result); + } + + function mul_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.mul(aProc, bProc); + return TFHE.decrypt(result); + } + + function and_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.and(aProc, bProc); + return TFHE.decrypt(result); + } + + function or_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.or(aProc, bProc); + return TFHE.decrypt(result); + } + + function xor_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.xor(aProc, bProc); + return TFHE.decrypt(result); + } + + function eq_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + ebool result = TFHE.eq(aProc, bProc); + return TFHE.decrypt(result); + } + + function ne_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + ebool result = TFHE.ne(aProc, bProc); + return TFHE.decrypt(result); + } + + function ge_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + ebool result = TFHE.ge(aProc, bProc); + return TFHE.decrypt(result); + } + + function gt_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + ebool result = TFHE.gt(aProc, bProc); + return TFHE.decrypt(result); + } + + function le_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + ebool result = TFHE.le(aProc, bProc); + return TFHE.decrypt(result); + } + + function lt_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + ebool result = TFHE.lt(aProc, bProc); + return TFHE.decrypt(result); + } + + function min_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.min(aProc, bProc); + return TFHE.decrypt(result); + } + + function max_euint4_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.max(aProc, bProc); + return TFHE.decrypt(result); + } + + function add_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); euint8 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function sub_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); euint8 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function mul_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); euint8 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function and_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function and_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); euint8 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function or_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function or_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); euint8 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function xor_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); euint8 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function eq_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function ne_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function ge_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function gt_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function le_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function lt_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function min_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function min_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); euint8 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function max_euint4_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); euint8 bProc = TFHE.asEuint8(b); euint8 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint8 aProc = TFHE.asEuint8(a); + function add_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); euint16 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint8 aProc = TFHE.asEuint8(a); + function sub_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); euint16 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint8 aProc = TFHE.asEuint8(a); + function mul_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); euint16 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function and_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint8 aProc = TFHE.asEuint8(a); + function and_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); euint16 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function or_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint8 aProc = TFHE.asEuint8(a); + function or_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); euint16 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint8 aProc = TFHE.asEuint8(a); + function xor_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); euint16 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function eq_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function ne_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function ge_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function gt_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function le_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function lt_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function min_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint8 aProc = TFHE.asEuint8(a); + function min_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); euint16 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint8 aProc = TFHE.asEuint8(a); + function max_euint4_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint4 aProc = TFHE.asEuint4(a); euint16 bProc = TFHE.asEuint16(b); euint16 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint8 aProc = TFHE.asEuint8(a); + function add_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); euint32 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint8 aProc = TFHE.asEuint8(a); + function sub_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); euint32 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint8 aProc = TFHE.asEuint8(a); + function mul_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); euint32 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function and_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint8 aProc = TFHE.asEuint8(a); + function and_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); euint32 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function or_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint8 aProc = TFHE.asEuint8(a); + function or_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); euint32 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint8 aProc = TFHE.asEuint8(a); + function xor_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); euint32 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function eq_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function ne_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function ge_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function gt_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function le_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function lt_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function min_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint8 aProc = TFHE.asEuint8(a); + function min_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); euint32 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint8 aProc = TFHE.asEuint8(a); + function max_euint4_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint4 aProc = TFHE.asEuint4(a); euint32 bProc = TFHE.asEuint32(b); euint32 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint8 aProc = TFHE.asEuint8(a); + function add_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint8 aProc = TFHE.asEuint8(a); + function sub_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint8 aProc = TFHE.asEuint8(a); + function mul_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function and_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint8 aProc = TFHE.asEuint8(a); + function and_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function or_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint8 aProc = TFHE.asEuint8(a); + function or_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint8 aProc = TFHE.asEuint8(a); + function xor_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function eq_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function ne_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function ge_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function gt_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function le_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function lt_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function min_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint8 aProc = TFHE.asEuint8(a); + function min_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint8 aProc = TFHE.asEuint8(a); + function max_euint4_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint4 aProc = TFHE.asEuint4(a); euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function add_euint4_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; - euint8 result = TFHE.add(aProc, bProc); + euint4 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function add_uint8_euint8(uint8 a, bytes calldata b) public view returns (uint8) { + function add_uint8_euint4(uint8 a, bytes calldata b) public view returns (uint8) { uint8 aProc = a; - euint8 bProc = TFHE.asEuint8(b); - euint8 result = TFHE.add(aProc, bProc); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function sub_euint4_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; - euint8 result = TFHE.sub(aProc, bProc); + euint4 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function sub_uint8_euint8(uint8 a, bytes calldata b) public view returns (uint8) { + function sub_uint8_euint4(uint8 a, bytes calldata b) public view returns (uint8) { uint8 aProc = a; - euint8 bProc = TFHE.asEuint8(b); - euint8 result = TFHE.sub(aProc, bProc); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function mul_euint4_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; - euint8 result = TFHE.mul(aProc, bProc); + euint4 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function mul_uint8_euint8(uint8 a, bytes calldata b) public view returns (uint8) { + function mul_uint8_euint4(uint8 a, bytes calldata b) public view returns (uint8) { uint8 aProc = a; - euint8 bProc = TFHE.asEuint8(b); - euint8 result = TFHE.mul(aProc, bProc); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function div_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function div_euint4_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; - euint8 result = TFHE.div(aProc, bProc); + euint4 result = TFHE.div(aProc, bProc); return TFHE.decrypt(result); } - function rem_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function rem_euint4_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; - euint8 result = TFHE.rem(aProc, bProc); + euint4 result = TFHE.rem(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint8_uint8(bytes calldata a, uint8 b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function eq_euint4_uint8(bytes calldata a, uint8 b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function eq_uint8_euint8(uint8 a, bytes calldata b) public view returns (bool) { + function eq_uint8_euint4(uint8 a, bytes calldata b) public view returns (bool) { uint8 aProc = a; - euint8 bProc = TFHE.asEuint8(b); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint8_uint8(bytes calldata a, uint8 b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function ne_euint4_uint8(bytes calldata a, uint8 b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ne_uint8_euint8(uint8 a, bytes calldata b) public view returns (bool) { + function ne_uint8_euint4(uint8 a, bytes calldata b) public view returns (bool) { uint8 aProc = a; - euint8 bProc = TFHE.asEuint8(b); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint8_uint8(bytes calldata a, uint8 b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function ge_euint4_uint8(bytes calldata a, uint8 b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function ge_uint8_euint8(uint8 a, bytes calldata b) public view returns (bool) { + function ge_uint8_euint4(uint8 a, bytes calldata b) public view returns (bool) { uint8 aProc = a; - euint8 bProc = TFHE.asEuint8(b); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint8_uint8(bytes calldata a, uint8 b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function gt_euint4_uint8(bytes calldata a, uint8 b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function gt_uint8_euint8(uint8 a, bytes calldata b) public view returns (bool) { + function gt_uint8_euint4(uint8 a, bytes calldata b) public view returns (bool) { uint8 aProc = a; - euint8 bProc = TFHE.asEuint8(b); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint8_uint8(bytes calldata a, uint8 b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function le_euint4_uint8(bytes calldata a, uint8 b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function le_uint8_euint8(uint8 a, bytes calldata b) public view returns (bool) { + function le_uint8_euint4(uint8 a, bytes calldata b) public view returns (bool) { uint8 aProc = a; - euint8 bProc = TFHE.asEuint8(b); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint8_uint8(bytes calldata a, uint8 b) public view returns (bool) { - euint8 aProc = TFHE.asEuint8(a); + function lt_euint4_uint8(bytes calldata a, uint8 b) public view returns (bool) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function lt_uint8_euint8(uint8 a, bytes calldata b) public view returns (bool) { + function lt_uint8_euint4(uint8 a, bytes calldata b) public view returns (bool) { uint8 aProc = a; - euint8 bProc = TFHE.asEuint8(b); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function min_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function min_euint4_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; - euint8 result = TFHE.min(aProc, bProc); + euint4 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function min_uint8_euint8(uint8 a, bytes calldata b) public view returns (uint8) { + function min_uint8_euint4(uint8 a, bytes calldata b) public view returns (uint8) { uint8 aProc = a; - euint8 bProc = TFHE.asEuint8(b); - euint8 result = TFHE.min(aProc, bProc); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); + function max_euint4_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); uint8 bProc = b; - euint8 result = TFHE.max(aProc, bProc); + euint4 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function max_uint8_euint8(uint8 a, bytes calldata b) public view returns (uint8) { + function max_uint8_euint4(uint8 a, bytes calldata b) public view returns (uint8) { uint8 aProc = a; - euint8 bProc = TFHE.asEuint8(b); - euint8 result = TFHE.max(aProc, bProc); - return TFHE.decrypt(result); - } - - function add_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - euint16 result = TFHE.add(aProc, bProc); - return TFHE.decrypt(result); - } - - function sub_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - euint16 result = TFHE.sub(aProc, bProc); - return TFHE.decrypt(result); - } - - function mul_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - euint16 result = TFHE.mul(aProc, bProc); - return TFHE.decrypt(result); - } - - function and_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - euint16 result = TFHE.and(aProc, bProc); - return TFHE.decrypt(result); - } - - function or_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - euint16 result = TFHE.or(aProc, bProc); - return TFHE.decrypt(result); - } - - function xor_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - euint16 result = TFHE.xor(aProc, bProc); - return TFHE.decrypt(result); - } - - function eq_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - ebool result = TFHE.eq(aProc, bProc); - return TFHE.decrypt(result); - } - - function ne_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - ebool result = TFHE.ne(aProc, bProc); - return TFHE.decrypt(result); - } - - function ge_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - ebool result = TFHE.ge(aProc, bProc); - return TFHE.decrypt(result); - } - - function gt_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - ebool result = TFHE.gt(aProc, bProc); - return TFHE.decrypt(result); - } - - function le_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - ebool result = TFHE.le(aProc, bProc); - return TFHE.decrypt(result); - } - - function lt_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - ebool result = TFHE.lt(aProc, bProc); - return TFHE.decrypt(result); - } - - function min_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - euint16 result = TFHE.min(aProc, bProc); + euint4 bProc = TFHE.asEuint4(b); + euint4 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function max_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - euint16 result = TFHE.max(aProc, bProc); - return TFHE.decrypt(result); - } - - function add_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.add(aProc, bProc); + function add_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); + euint8 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.sub(aProc, bProc); + function sub_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); + euint8 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.mul(aProc, bProc); + function mul_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); + euint8 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function and_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.and(aProc, bProc); + function and_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); + euint8 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function or_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.or(aProc, bProc); + function or_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); + euint8 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.xor(aProc, bProc); + function xor_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); + euint8 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } } diff --git a/examples/tests/TFHETestSuite2.sol b/examples/tests/TFHETestSuite2.sol index 1aafd8f2..fdcbafe0 100644 --- a/examples/tests/TFHETestSuite2.sol +++ b/examples/tests/TFHETestSuite2.sol @@ -4,702 +4,702 @@ pragma solidity ^0.8.20; import "../../lib/TFHE.sol"; contract TFHETestSuite2 { - function eq_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); + function eq_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); + function ne_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); + function ge_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); + function gt_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); + function le_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); + function lt_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function min_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.min(aProc, bProc); + function min_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); + euint8 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.max(aProc, bProc); + function max_euint8_euint4(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint4 bProc = TFHE.asEuint4(b); + euint8 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.add(aProc, bProc); + function add_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); + euint8 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.sub(aProc, bProc); + function sub_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); + euint8 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.mul(aProc, bProc); + function mul_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); + euint8 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function and_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.and(aProc, bProc); + function and_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); + euint8 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function or_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.or(aProc, bProc); + function or_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); + euint8 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.xor(aProc, bProc); + function xor_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); + euint8 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); + function eq_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); + function ne_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); + function ge_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); + function gt_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); + function le_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); + function lt_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function min_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.min(aProc, bProc); + function min_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); + euint8 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint16 aProc = TFHE.asEuint16(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.max(aProc, bProc); + function max_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); + euint8 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.add(aProc, bProc); + function add_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.sub(aProc, bProc); + function sub_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.mul(aProc, bProc); + function mul_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function and_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.and(aProc, bProc); + function and_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function or_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.or(aProc, bProc); + function or_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.xor(aProc, bProc); + function xor_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); + function eq_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); + function ne_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); + function ge_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); + function gt_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); + function le_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); + function lt_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function min_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.min(aProc, bProc); + function min_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint16 aProc = TFHE.asEuint16(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.max(aProc, bProc); + function max_euint8_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint8 aProc = TFHE.asEuint8(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - euint16 result = TFHE.add(aProc, bProc); + function add_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function add_uint16_euint16(uint16 a, bytes calldata b) public view returns (uint16) { - uint16 aProc = a; - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.add(aProc, bProc); + function sub_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - euint16 result = TFHE.sub(aProc, bProc); + function mul_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function sub_uint16_euint16(uint16 a, bytes calldata b) public view returns (uint16) { - uint16 aProc = a; - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.sub(aProc, bProc); + function and_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - euint16 result = TFHE.mul(aProc, bProc); + function or_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function mul_uint16_euint16(uint16 a, bytes calldata b) public view returns (uint16) { - uint16 aProc = a; - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.mul(aProc, bProc); + function xor_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function div_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - euint16 result = TFHE.div(aProc, bProc); + function eq_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function rem_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - euint16 result = TFHE.rem(aProc, bProc); + function ne_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint16_uint16(bytes calldata a, uint16 b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - ebool result = TFHE.eq(aProc, bProc); + function ge_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function eq_uint16_euint16(uint16 a, bytes calldata b) public view returns (bool) { - uint16 aProc = a; - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.eq(aProc, bProc); + function gt_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint16_uint16(bytes calldata a, uint16 b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - ebool result = TFHE.ne(aProc, bProc); + function le_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function ne_uint16_euint16(uint16 a, bytes calldata b) public view returns (bool) { - uint16 aProc = a; - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.ne(aProc, bProc); + function lt_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint16_uint16(bytes calldata a, uint16 b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - ebool result = TFHE.ge(aProc, bProc); + function min_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function ge_uint16_euint16(uint16 a, bytes calldata b) public view returns (bool) { - uint16 aProc = a; - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.ge(aProc, bProc); + function max_euint8_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint8 aProc = TFHE.asEuint8(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint16_uint16(bytes calldata a, uint16 b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - ebool result = TFHE.gt(aProc, bProc); + function add_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function gt_uint16_euint16(uint16 a, bytes calldata b) public view returns (bool) { - uint16 aProc = a; - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.gt(aProc, bProc); + function sub_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function le_euint16_uint16(bytes calldata a, uint16 b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - ebool result = TFHE.le(aProc, bProc); + function mul_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function le_uint16_euint16(uint16 a, bytes calldata b) public view returns (bool) { - uint16 aProc = a; - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.le(aProc, bProc); + function and_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint16_uint16(bytes calldata a, uint16 b) public view returns (bool) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - ebool result = TFHE.lt(aProc, bProc); + function or_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function lt_uint16_euint16(uint16 a, bytes calldata b) public view returns (bool) { - uint16 aProc = a; - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.lt(aProc, bProc); + function xor_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function min_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - euint16 result = TFHE.min(aProc, bProc); + function eq_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function min_uint16_euint16(uint16 a, bytes calldata b) public view returns (uint16) { - uint16 aProc = a; - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.min(aProc, bProc); + function ne_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function max_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - uint16 bProc = b; - euint16 result = TFHE.max(aProc, bProc); + function ge_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function max_uint16_euint16(uint16 a, bytes calldata b) public view returns (uint16) { - uint16 aProc = a; - euint16 bProc = TFHE.asEuint16(b); - euint16 result = TFHE.max(aProc, bProc); + function gt_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function add_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint8 bProc = TFHE.asEuint8(b); - euint32 result = TFHE.add(aProc, bProc); + function le_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint8 bProc = TFHE.asEuint8(b); - euint32 result = TFHE.sub(aProc, bProc); + function lt_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint8 bProc = TFHE.asEuint8(b); - euint32 result = TFHE.mul(aProc, bProc); + function min_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function and_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint8 bProc = TFHE.asEuint8(b); - euint32 result = TFHE.and(aProc, bProc); + function max_euint8_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint8 aProc = TFHE.asEuint8(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function or_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint8 bProc = TFHE.asEuint8(b); - euint32 result = TFHE.or(aProc, bProc); + function add_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + euint8 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); + function add_uint8_euint8(uint8 a, bytes calldata b) public view returns (uint8) { + uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b); - euint32 result = TFHE.xor(aProc, bProc); + euint8 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint8 bProc = TFHE.asEuint8(b); - ebool result = TFHE.eq(aProc, bProc); + function sub_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + euint8 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); + function sub_uint8_euint8(uint8 a, bytes calldata b) public view returns (uint8) { + uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b); - ebool result = TFHE.ne(aProc, bProc); + euint8 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint8 bProc = TFHE.asEuint8(b); - ebool result = TFHE.ge(aProc, bProc); + function mul_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + euint8 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); + function mul_uint8_euint8(uint8 a, bytes calldata b) public view returns (uint8) { + uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b); - ebool result = TFHE.gt(aProc, bProc); + euint8 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function le_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint8 bProc = TFHE.asEuint8(b); - ebool result = TFHE.le(aProc, bProc); + function div_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + euint8 result = TFHE.div(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint8 bProc = TFHE.asEuint8(b); - ebool result = TFHE.lt(aProc, bProc); + function rem_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + euint8 result = TFHE.rem(aProc, bProc); return TFHE.decrypt(result); } - function min_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint8 bProc = TFHE.asEuint8(b); - euint32 result = TFHE.min(aProc, bProc); + function eq_euint8_uint8(bytes calldata a, uint8 b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function max_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); + function eq_uint8_euint8(uint8 a, bytes calldata b) public view returns (bool) { + uint8 aProc = a; euint8 bProc = TFHE.asEuint8(b); - euint32 result = TFHE.max(aProc, bProc); + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function add_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - euint32 result = TFHE.add(aProc, bProc); + function ne_euint8_uint8(bytes calldata a, uint8 b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - euint32 result = TFHE.sub(aProc, bProc); + function ne_uint8_euint8(uint8 a, bytes calldata b) public view returns (bool) { + uint8 aProc = a; + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - euint32 result = TFHE.mul(aProc, bProc); + function ge_euint8_uint8(bytes calldata a, uint8 b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function and_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - euint32 result = TFHE.and(aProc, bProc); + function ge_uint8_euint8(uint8 a, bytes calldata b) public view returns (bool) { + uint8 aProc = a; + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function or_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - euint32 result = TFHE.or(aProc, bProc); + function gt_euint8_uint8(bytes calldata a, uint8 b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - euint32 result = TFHE.xor(aProc, bProc); + function gt_uint8_euint8(uint8 a, bytes calldata b) public view returns (bool) { + uint8 aProc = a; + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.eq(aProc, bProc); + function le_euint8_uint8(bytes calldata a, uint8 b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.ne(aProc, bProc); + function le_uint8_euint8(uint8 a, bytes calldata b) public view returns (bool) { + uint8 aProc = a; + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.ge(aProc, bProc); + function lt_euint8_uint8(bytes calldata a, uint8 b) public view returns (bool) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.gt(aProc, bProc); + function lt_uint8_euint8(uint8 a, bytes calldata b) public view returns (bool) { + uint8 aProc = a; + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.le(aProc, bProc); + function min_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + euint8 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.lt(aProc, bProc); + function min_uint8_euint8(uint8 a, bytes calldata b) public view returns (uint8) { + uint8 aProc = a; + euint8 bProc = TFHE.asEuint8(b); + euint8 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function min_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - euint32 result = TFHE.min(aProc, bProc); + function max_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + euint8 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function max_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint16 bProc = TFHE.asEuint16(b); - euint32 result = TFHE.max(aProc, bProc); + function max_uint8_euint8(uint8 a, bytes calldata b) public view returns (uint8) { + uint8 aProc = a; + euint8 bProc = TFHE.asEuint8(b); + euint8 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.add(aProc, bProc); + function add_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); + euint16 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.sub(aProc, bProc); + function sub_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); + euint16 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.mul(aProc, bProc); + function mul_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); + euint16 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function and_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.and(aProc, bProc); + function and_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); + euint16 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function or_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.or(aProc, bProc); + function or_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); + euint16 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.xor(aProc, bProc); + function xor_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); + euint16 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); + function eq_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); + function ne_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); + function ge_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); + function gt_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); + function le_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); + function lt_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } diff --git a/examples/tests/TFHETestSuite3.sol b/examples/tests/TFHETestSuite3.sol index 9321f6fa..23d40d0d 100644 --- a/examples/tests/TFHETestSuite3.sol +++ b/examples/tests/TFHETestSuite3.sol @@ -4,703 +4,703 @@ pragma solidity ^0.8.20; import "../../lib/TFHE.sol"; contract TFHETestSuite3 { - function min_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.min(aProc, bProc); + function min_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); + euint16 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.max(aProc, bProc); + function max_euint16_euint4(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint4 bProc = TFHE.asEuint4(b); + euint16 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.add(aProc, bProc); + function add_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); + euint16 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.sub(aProc, bProc); + function sub_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); + euint16 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.mul(aProc, bProc); + function mul_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); + euint16 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function and_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.and(aProc, bProc); + function and_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); + euint16 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function or_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.or(aProc, bProc); + function or_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); + euint16 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.xor(aProc, bProc); + function xor_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); + euint16 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); + function eq_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); + function ne_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); + function ge_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); + function gt_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); + function le_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); + function lt_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function min_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.min(aProc, bProc); + function min_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); + euint16 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint32 aProc = TFHE.asEuint32(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.max(aProc, bProc); + function max_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); + euint16 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - euint32 result = TFHE.add(aProc, bProc); + function add_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function add_uint32_euint32(uint32 a, bytes calldata b) public view returns (uint32) { - uint32 aProc = a; - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.add(aProc, bProc); + function sub_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - euint32 result = TFHE.sub(aProc, bProc); + function mul_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function sub_uint32_euint32(uint32 a, bytes calldata b) public view returns (uint32) { - uint32 aProc = a; - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.sub(aProc, bProc); + function and_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - euint32 result = TFHE.mul(aProc, bProc); + function or_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function mul_uint32_euint32(uint32 a, bytes calldata b) public view returns (uint32) { - uint32 aProc = a; - euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.mul(aProc, bProc); + function xor_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function div_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - euint32 result = TFHE.div(aProc, bProc); + function eq_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function rem_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - euint32 result = TFHE.rem(aProc, bProc); + function ne_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint32_uint32(bytes calldata a, uint32 b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - ebool result = TFHE.eq(aProc, bProc); + function ge_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function eq_uint32_euint32(uint32 a, bytes calldata b) public view returns (bool) { - uint32 aProc = a; - euint32 bProc = TFHE.asEuint32(b); - ebool result = TFHE.eq(aProc, bProc); + function gt_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint32_uint32(bytes calldata a, uint32 b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - ebool result = TFHE.ne(aProc, bProc); + function le_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.le(aProc, bProc); + return TFHE.decrypt(result); + } + + function lt_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function ne_uint32_euint32(uint32 a, bytes calldata b) public view returns (bool) { - uint32 aProc = a; + function min_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.min(aProc, bProc); + return TFHE.decrypt(result); + } + + function max_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.max(aProc, bProc); + return TFHE.decrypt(result); + } + + function add_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint16 aProc = TFHE.asEuint16(a); euint32 bProc = TFHE.asEuint32(b); - ebool result = TFHE.ne(aProc, bProc); + euint32 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint32_uint32(bytes calldata a, uint32 b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - ebool result = TFHE.ge(aProc, bProc); + function sub_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint16 aProc = TFHE.asEuint16(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function ge_uint32_euint32(uint32 a, bytes calldata b) public view returns (bool) { - uint32 aProc = a; + function mul_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint16 aProc = TFHE.asEuint16(a); euint32 bProc = TFHE.asEuint32(b); - ebool result = TFHE.ge(aProc, bProc); + euint32 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint32_uint32(bytes calldata a, uint32 b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - ebool result = TFHE.gt(aProc, bProc); + function and_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint16 aProc = TFHE.asEuint16(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function gt_uint32_euint32(uint32 a, bytes calldata b) public view returns (bool) { - uint32 aProc = a; + function or_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint16 aProc = TFHE.asEuint16(a); euint32 bProc = TFHE.asEuint32(b); - ebool result = TFHE.gt(aProc, bProc); + euint32 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function le_euint32_uint32(bytes calldata a, uint32 b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - ebool result = TFHE.le(aProc, bProc); + function xor_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint16 aProc = TFHE.asEuint16(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function le_uint32_euint32(uint32 a, bytes calldata b) public view returns (bool) { - uint32 aProc = a; + function eq_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); euint32 bProc = TFHE.asEuint32(b); - ebool result = TFHE.le(aProc, bProc); + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint32_uint32(bytes calldata a, uint32 b) public view returns (bool) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - ebool result = TFHE.lt(aProc, bProc); + function ne_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function lt_uint32_euint32(uint32 a, bytes calldata b) public view returns (bool) { - uint32 aProc = a; + function ge_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); euint32 bProc = TFHE.asEuint32(b); - ebool result = TFHE.lt(aProc, bProc); + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function min_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - euint32 result = TFHE.min(aProc, bProc); + function gt_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function min_uint32_euint32(uint32 a, bytes calldata b) public view returns (uint32) { - uint32 aProc = a; + function le_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); euint32 bProc = TFHE.asEuint32(b); - euint32 result = TFHE.min(aProc, bProc); + ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function max_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { - euint32 aProc = TFHE.asEuint32(a); - uint32 bProc = b; - euint32 result = TFHE.max(aProc, bProc); + function lt_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.lt(aProc, bProc); + return TFHE.decrypt(result); + } + + function min_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint16 aProc = TFHE.asEuint16(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_uint32_euint32(uint32 a, bytes calldata b) public view returns (uint32) { - uint32 aProc = a; + function max_euint16_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint16 aProc = TFHE.asEuint16(a); euint32 bProc = TFHE.asEuint32(b); euint32 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function add_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function sub_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function mul_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function and_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function and_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function or_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function or_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function xor_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function eq_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function ne_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function ge_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function gt_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function le_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function lt_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function min_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function min_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); + function max_euint16_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint16 aProc = TFHE.asEuint16(a); + euint64 bProc = TFHE.asEuint64(b); euint64 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint16 bProc = TFHE.asEuint16(b); - euint64 result = TFHE.add(aProc, bProc); + function add_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + euint16 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); + function add_uint16_euint16(uint16 a, bytes calldata b) public view returns (uint16) { + uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b); - euint64 result = TFHE.sub(aProc, bProc); + euint16 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint16 bProc = TFHE.asEuint16(b); - euint64 result = TFHE.mul(aProc, bProc); + function sub_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + euint16 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function and_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); + function sub_uint16_euint16(uint16 a, bytes calldata b) public view returns (uint16) { + uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b); - euint64 result = TFHE.and(aProc, bProc); + euint16 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function or_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint16 bProc = TFHE.asEuint16(b); - euint64 result = TFHE.or(aProc, bProc); + function mul_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + euint16 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); + function mul_uint16_euint16(uint16 a, bytes calldata b) public view returns (uint16) { + uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b); - euint64 result = TFHE.xor(aProc, bProc); + euint16 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.eq(aProc, bProc); + function div_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + euint16 result = TFHE.div(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.ne(aProc, bProc); + function rem_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + euint16 result = TFHE.rem(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.ge(aProc, bProc); + function eq_euint16_uint16(bytes calldata a, uint16 b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); + function eq_uint16_euint16(uint16 a, bytes calldata b) public view returns (bool) { + uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.gt(aProc, bProc); + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function le_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.le(aProc, bProc); + function ne_euint16_uint16(bytes calldata a, uint16 b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); + function ne_uint16_euint16(uint16 a, bytes calldata b) public view returns (bool) { + uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b); - ebool result = TFHE.lt(aProc, bProc); + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function min_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint16 bProc = TFHE.asEuint16(b); - euint64 result = TFHE.min(aProc, bProc); + function ge_euint16_uint16(bytes calldata a, uint16 b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function max_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); + function ge_uint16_euint16(uint16 a, bytes calldata b) public view returns (bool) { + uint16 aProc = a; euint16 bProc = TFHE.asEuint16(b); - euint64 result = TFHE.max(aProc, bProc); - return TFHE.decrypt(result); - } - - function add_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - euint64 result = TFHE.add(aProc, bProc); - return TFHE.decrypt(result); - } - - function sub_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - euint64 result = TFHE.sub(aProc, bProc); - return TFHE.decrypt(result); - } - - function mul_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - euint64 result = TFHE.mul(aProc, bProc); - return TFHE.decrypt(result); - } - - function and_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - euint64 result = TFHE.and(aProc, bProc); + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function or_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - euint64 result = TFHE.or(aProc, bProc); + function gt_euint16_uint16(bytes calldata a, uint16 b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - euint64 result = TFHE.xor(aProc, bProc); + function gt_uint16_euint16(uint16 a, bytes calldata b) public view returns (bool) { + uint16 aProc = a; + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - ebool result = TFHE.eq(aProc, bProc); + function le_euint16_uint16(bytes calldata a, uint16 b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - ebool result = TFHE.ne(aProc, bProc); + function le_uint16_euint16(uint16 a, bytes calldata b) public view returns (bool) { + uint16 aProc = a; + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - ebool result = TFHE.ge(aProc, bProc); + function lt_euint16_uint16(bytes calldata a, uint16 b) public view returns (bool) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - ebool result = TFHE.gt(aProc, bProc); + function lt_uint16_euint16(uint16 a, bytes calldata b) public view returns (bool) { + uint16 aProc = a; + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - ebool result = TFHE.le(aProc, bProc); + function min_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + euint16 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - ebool result = TFHE.lt(aProc, bProc); + function min_uint16_euint16(uint16 a, bytes calldata b) public view returns (uint16) { + uint16 aProc = a; + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function min_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - euint64 result = TFHE.min(aProc, bProc); + function max_euint16_uint16(bytes calldata a, uint16 b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + uint16 bProc = b; + euint16 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function max_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint32 bProc = TFHE.asEuint32(b); - euint64 result = TFHE.max(aProc, bProc); + function max_uint16_euint16(uint16 a, bytes calldata b) public view returns (uint16) { + uint16 aProc = a; + euint16 bProc = TFHE.asEuint16(b); + euint16 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.add(aProc, bProc); + function add_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); + euint32 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.sub(aProc, bProc); + function sub_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); + euint32 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function mul_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.mul(aProc, bProc); + function mul_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); + euint32 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function and_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.and(aProc, bProc); + function and_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); + euint32 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function or_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.or(aProc, bProc); + function or_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); + euint32 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function xor_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.xor(aProc, bProc); + function xor_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); + euint32 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); + function eq_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); + function ne_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); + function ge_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); + function gt_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function le_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); + function le_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); + function lt_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function min_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.min(aProc, bProc); + function min_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); + euint32 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function max_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.max(aProc, bProc); + function max_euint32_euint4(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint4 bProc = TFHE.asEuint4(b); + euint32 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function add_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - euint64 result = TFHE.add(aProc, bProc); + function add_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + euint32 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function add_uint64_euint64(uint64 a, bytes calldata b) public view returns (uint64) { - uint64 aProc = a; - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.add(aProc, bProc); + function sub_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + euint32 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function sub_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - euint64 result = TFHE.sub(aProc, bProc); + function mul_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + euint32 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function sub_uint64_euint64(uint64 a, bytes calldata b) public view returns (uint64) { - uint64 aProc = a; - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.sub(aProc, bProc); + function and_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + euint32 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } } diff --git a/examples/tests/TFHETestSuite4.sol b/examples/tests/TFHETestSuite4.sol index afdbb1af..5232a689 100644 --- a/examples/tests/TFHETestSuite4.sol +++ b/examples/tests/TFHETestSuite4.sol @@ -4,519 +4,703 @@ pragma solidity ^0.8.20; import "../../lib/TFHE.sol"; contract TFHETestSuite4 { - function mul_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - euint64 result = TFHE.mul(aProc, bProc); + function or_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + euint32 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function mul_uint64_euint64(uint64 a, bytes calldata b) public view returns (uint64) { - uint64 aProc = a; - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.mul(aProc, bProc); + function xor_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + euint32 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function div_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - euint64 result = TFHE.div(aProc, bProc); + function eq_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function rem_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - euint64 result = TFHE.rem(aProc, bProc); + function ne_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function eq_euint64_uint64(bytes calldata a, uint64 b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - ebool result = TFHE.eq(aProc, bProc); + function ge_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function eq_uint64_euint64(uint64 a, bytes calldata b) public view returns (bool) { - uint64 aProc = a; - euint64 bProc = TFHE.asEuint64(b); - ebool result = TFHE.eq(aProc, bProc); + function gt_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function ne_euint64_uint64(bytes calldata a, uint64 b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - ebool result = TFHE.ne(aProc, bProc); + function le_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function ne_uint64_euint64(uint64 a, bytes calldata b) public view returns (bool) { - uint64 aProc = a; - euint64 bProc = TFHE.asEuint64(b); - ebool result = TFHE.ne(aProc, bProc); + function lt_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function ge_euint64_uint64(bytes calldata a, uint64 b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - ebool result = TFHE.ge(aProc, bProc); + function min_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + euint32 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function ge_uint64_euint64(uint64 a, bytes calldata b) public view returns (bool) { - uint64 aProc = a; - euint64 bProc = TFHE.asEuint64(b); - ebool result = TFHE.ge(aProc, bProc); + function max_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + euint32 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function gt_euint64_uint64(bytes calldata a, uint64 b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - ebool result = TFHE.gt(aProc, bProc); + function add_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + euint32 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function gt_uint64_euint64(uint64 a, bytes calldata b) public view returns (bool) { - uint64 aProc = a; - euint64 bProc = TFHE.asEuint64(b); - ebool result = TFHE.gt(aProc, bProc); + function sub_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + euint32 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function le_euint64_uint64(bytes calldata a, uint64 b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - ebool result = TFHE.le(aProc, bProc); + function mul_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + euint32 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function le_uint64_euint64(uint64 a, bytes calldata b) public view returns (bool) { - uint64 aProc = a; - euint64 bProc = TFHE.asEuint64(b); - ebool result = TFHE.le(aProc, bProc); + function and_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + euint32 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function lt_euint64_uint64(bytes calldata a, uint64 b) public view returns (bool) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - ebool result = TFHE.lt(aProc, bProc); + function or_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + euint32 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function lt_uint64_euint64(uint64 a, bytes calldata b) public view returns (bool) { - uint64 aProc = a; - euint64 bProc = TFHE.asEuint64(b); - ebool result = TFHE.lt(aProc, bProc); + function xor_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + euint32 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function min_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - euint64 result = TFHE.min(aProc, bProc); + function eq_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function min_uint64_euint64(uint64 a, bytes calldata b) public view returns (uint64) { - uint64 aProc = a; - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.min(aProc, bProc); + function ne_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function max_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - uint64 bProc = b; - euint64 result = TFHE.max(aProc, bProc); + function ge_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function max_uint64_euint64(uint64 a, bytes calldata b) public view returns (uint64) { - uint64 aProc = a; - euint64 bProc = TFHE.asEuint64(b); - euint64 result = TFHE.max(aProc, bProc); + function gt_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function shl_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - euint8 bProc = TFHE.asEuint8(b); - euint8 result = TFHE.shl(aProc, bProc); + function le_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function shl_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - uint8 bProc = b; - euint8 result = TFHE.shl(aProc, bProc); + function lt_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function shr_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - euint8 bProc = TFHE.asEuint8(b); - euint8 result = TFHE.shr(aProc, bProc); + function min_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + euint32 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function shr_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - uint8 bProc = b; - euint8 result = TFHE.shr(aProc, bProc); + function max_euint32_euint16(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint16 bProc = TFHE.asEuint16(b); + euint32 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function shl_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - euint16 result = TFHE.shl(aProc, bProc); + function add_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function shl_euint16_uint8(bytes calldata a, uint8 b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - uint8 bProc = b; - euint16 result = TFHE.shl(aProc, bProc); + function sub_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function shr_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint8 bProc = TFHE.asEuint8(b); - euint16 result = TFHE.shr(aProc, bProc); + function mul_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function shr_euint16_uint8(bytes calldata a, uint8 b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - uint8 bProc = b; - euint16 result = TFHE.shr(aProc, bProc); + function and_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function shl_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { + function or_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { euint32 aProc = TFHE.asEuint32(a); - euint8 bProc = TFHE.asEuint8(b); - euint32 result = TFHE.shl(aProc, bProc); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function shl_euint32_uint8(bytes calldata a, uint8 b) public view returns (uint32) { + function xor_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { euint32 aProc = TFHE.asEuint32(a); - uint8 bProc = b; - euint32 result = TFHE.shl(aProc, bProc); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function shr_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { + function eq_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { euint32 aProc = TFHE.asEuint32(a); - euint8 bProc = TFHE.asEuint8(b); - euint32 result = TFHE.shr(aProc, bProc); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function shr_euint32_uint8(bytes calldata a, uint8 b) public view returns (uint32) { + function ne_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { euint32 aProc = TFHE.asEuint32(a); - uint8 bProc = b; - euint32 result = TFHE.shr(aProc, bProc); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function shl_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); - euint64 result = TFHE.shl(aProc, bProc); + function ge_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function shl_euint64_uint8(bytes calldata a, uint8 b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - uint8 bProc = b; - euint64 result = TFHE.shl(aProc, bProc); + function gt_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function shr_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint8 bProc = TFHE.asEuint8(b); - euint64 result = TFHE.shr(aProc, bProc); + function le_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function shr_euint64_uint8(bytes calldata a, uint8 b) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - uint8 bProc = b; - euint64 result = TFHE.shr(aProc, bProc); + function lt_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function neg_euint8(bytes calldata a) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - euint8 result = TFHE.neg(aProc); + function min_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function not_euint8(bytes calldata a) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - euint8 result = TFHE.not(aProc); + function max_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function neg_euint16(bytes calldata a) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 result = TFHE.neg(aProc); + function add_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint32 aProc = TFHE.asEuint32(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function not_euint16(bytes calldata a) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 result = TFHE.not(aProc); + function sub_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint32 aProc = TFHE.asEuint32(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function neg_euint32(bytes calldata a) public view returns (uint32) { + function mul_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { euint32 aProc = TFHE.asEuint32(a); - euint32 result = TFHE.neg(aProc); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function not_euint32(bytes calldata a) public view returns (uint32) { + function and_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { euint32 aProc = TFHE.asEuint32(a); - euint32 result = TFHE.not(aProc); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function neg_euint64(bytes calldata a) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint64 result = TFHE.neg(aProc); + function or_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint32 aProc = TFHE.asEuint32(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function not_euint64(bytes calldata a) public view returns (uint64) { - euint64 aProc = TFHE.asEuint64(a); - euint64 result = TFHE.not(aProc); + function xor_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint32 aProc = TFHE.asEuint32(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.xor(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_add_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - euint8 bProc = TFHE.asEuint8(b); - euint8 result = aProc + bProc; + function eq_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_sub_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - euint8 bProc = TFHE.asEuint8(b); - euint8 result = aProc - bProc; + function ne_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_mul_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - euint8 bProc = TFHE.asEuint8(b); - euint8 result = aProc * bProc; + function ge_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_and_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - euint8 bProc = TFHE.asEuint8(b); - euint8 result = aProc & bProc; + function gt_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_or_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - euint8 bProc = TFHE.asEuint8(b); - euint8 result = aProc | bProc; + function le_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_xor_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - euint8 bProc = TFHE.asEuint8(b); - euint8 result = aProc ^ bProc; + function lt_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint32 aProc = TFHE.asEuint32(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function unary_op_neg_euint8(bytes calldata a) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - euint8 result = -aProc; + function min_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint32 aProc = TFHE.asEuint32(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function unary_op_not_euint8(bytes calldata a) public view returns (uint8) { - euint8 aProc = TFHE.asEuint8(a); - euint8 result = ~aProc; + function max_euint32_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint32 aProc = TFHE.asEuint32(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_add_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = aProc + bProc; + function add_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + uint32 bProc = b; + euint32 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_sub_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = aProc - bProc; + function add_uint32_euint32(uint32 a, bytes calldata b) public view returns (uint32) { + uint32 aProc = a; + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_mul_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = aProc * bProc; + function sub_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + uint32 bProc = b; + euint32 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_and_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = aProc & bProc; + function sub_uint32_euint32(uint32 a, bytes calldata b) public view returns (uint32) { + uint32 aProc = a; + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_or_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = aProc | bProc; + function mul_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + uint32 bProc = b; + euint32 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_xor_euint16_euint16(bytes calldata a, bytes calldata b) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 bProc = TFHE.asEuint16(b); - euint16 result = aProc ^ bProc; + function mul_uint32_euint32(uint32 a, bytes calldata b) public view returns (uint32) { + uint32 aProc = a; + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function unary_op_neg_euint16(bytes calldata a) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 result = -aProc; + function div_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + uint32 bProc = b; + euint32 result = TFHE.div(aProc, bProc); return TFHE.decrypt(result); } - function unary_op_not_euint16(bytes calldata a) public view returns (uint16) { - euint16 aProc = TFHE.asEuint16(a); - euint16 result = ~aProc; + function rem_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + uint32 bProc = b; + euint32 result = TFHE.rem(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_add_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + function eq_euint32_uint32(bytes calldata a, uint32 b) public view returns (bool) { euint32 aProc = TFHE.asEuint32(a); + uint32 bProc = b; + ebool result = TFHE.eq(aProc, bProc); + return TFHE.decrypt(result); + } + + function eq_uint32_euint32(uint32 a, bytes calldata b) public view returns (bool) { + uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b); - euint32 result = aProc + bProc; + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_sub_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + function ne_euint32_uint32(bytes calldata a, uint32 b) public view returns (bool) { euint32 aProc = TFHE.asEuint32(a); + uint32 bProc = b; + ebool result = TFHE.ne(aProc, bProc); + return TFHE.decrypt(result); + } + + function ne_uint32_euint32(uint32 a, bytes calldata b) public view returns (bool) { + uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b); - euint32 result = aProc - bProc; + ebool result = TFHE.ne(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_mul_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + function ge_euint32_uint32(bytes calldata a, uint32 b) public view returns (bool) { euint32 aProc = TFHE.asEuint32(a); + uint32 bProc = b; + ebool result = TFHE.ge(aProc, bProc); + return TFHE.decrypt(result); + } + + function ge_uint32_euint32(uint32 a, bytes calldata b) public view returns (bool) { + uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b); - euint32 result = aProc * bProc; + ebool result = TFHE.ge(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_and_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + function gt_euint32_uint32(bytes calldata a, uint32 b) public view returns (bool) { euint32 aProc = TFHE.asEuint32(a); + uint32 bProc = b; + ebool result = TFHE.gt(aProc, bProc); + return TFHE.decrypt(result); + } + + function gt_uint32_euint32(uint32 a, bytes calldata b) public view returns (bool) { + uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b); - euint32 result = aProc & bProc; + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_or_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + function le_euint32_uint32(bytes calldata a, uint32 b) public view returns (bool) { euint32 aProc = TFHE.asEuint32(a); + uint32 bProc = b; + ebool result = TFHE.le(aProc, bProc); + return TFHE.decrypt(result); + } + + function le_uint32_euint32(uint32 a, bytes calldata b) public view returns (bool) { + uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b); - euint32 result = aProc | bProc; + ebool result = TFHE.le(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_xor_euint32_euint32(bytes calldata a, bytes calldata b) public view returns (uint32) { + function lt_euint32_uint32(bytes calldata a, uint32 b) public view returns (bool) { euint32 aProc = TFHE.asEuint32(a); + uint32 bProc = b; + ebool result = TFHE.lt(aProc, bProc); + return TFHE.decrypt(result); + } + + function lt_uint32_euint32(uint32 a, bytes calldata b) public view returns (bool) { + uint32 aProc = a; euint32 bProc = TFHE.asEuint32(b); - euint32 result = aProc ^ bProc; + ebool result = TFHE.lt(aProc, bProc); return TFHE.decrypt(result); } - function unary_op_neg_euint32(bytes calldata a) public view returns (uint32) { + function min_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { euint32 aProc = TFHE.asEuint32(a); - euint32 result = -aProc; + uint32 bProc = b; + euint32 result = TFHE.min(aProc, bProc); return TFHE.decrypt(result); } - function unary_op_not_euint32(bytes calldata a) public view returns (uint32) { + function min_uint32_euint32(uint32 a, bytes calldata b) public view returns (uint32) { + uint32 aProc = a; + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.min(aProc, bProc); + return TFHE.decrypt(result); + } + + function max_euint32_uint32(bytes calldata a, uint32 b) public view returns (uint32) { euint32 aProc = TFHE.asEuint32(a); - euint32 result = ~aProc; + uint32 bProc = b; + euint32 result = TFHE.max(aProc, bProc); + return TFHE.decrypt(result); + } + + function max_uint32_euint32(uint32 a, bytes calldata b) public view returns (uint32) { + uint32 aProc = a; + euint32 bProc = TFHE.asEuint32(b); + euint32 result = TFHE.max(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_add_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + function add_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (uint64) { euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = aProc + bProc; + euint4 bProc = TFHE.asEuint4(b); + euint64 result = TFHE.add(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_sub_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + function sub_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (uint64) { euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = aProc - bProc; + euint4 bProc = TFHE.asEuint4(b); + euint64 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_mul_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + function mul_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (uint64) { euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = aProc * bProc; + euint4 bProc = TFHE.asEuint4(b); + euint64 result = TFHE.mul(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_and_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + function and_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (uint64) { euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = aProc & bProc; + euint4 bProc = TFHE.asEuint4(b); + euint64 result = TFHE.and(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_or_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + function or_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (uint64) { euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = aProc | bProc; + euint4 bProc = TFHE.asEuint4(b); + euint64 result = TFHE.or(aProc, bProc); return TFHE.decrypt(result); } - function bin_op_xor_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + function xor_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (uint64) { euint64 aProc = TFHE.asEuint64(a); - euint64 bProc = TFHE.asEuint64(b); - euint64 result = aProc ^ bProc; + euint4 bProc = TFHE.asEuint4(b); + euint64 result = TFHE.xor(aProc, bProc); + return TFHE.decrypt(result); + } + + function eq_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint4 bProc = TFHE.asEuint4(b); + ebool result = TFHE.eq(aProc, bProc); return TFHE.decrypt(result); } - function unary_op_neg_euint64(bytes calldata a) public view returns (uint64) { + function ne_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { euint64 aProc = TFHE.asEuint64(a); - euint64 result = -aProc; + euint4 bProc = TFHE.asEuint4(b); + ebool result = TFHE.ne(aProc, bProc); + return TFHE.decrypt(result); + } + + function ge_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint4 bProc = TFHE.asEuint4(b); + ebool result = TFHE.ge(aProc, bProc); + return TFHE.decrypt(result); + } + + function gt_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint4 bProc = TFHE.asEuint4(b); + ebool result = TFHE.gt(aProc, bProc); + return TFHE.decrypt(result); + } + + function le_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint4 bProc = TFHE.asEuint4(b); + ebool result = TFHE.le(aProc, bProc); + return TFHE.decrypt(result); + } + + function lt_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint4 bProc = TFHE.asEuint4(b); + ebool result = TFHE.lt(aProc, bProc); + return TFHE.decrypt(result); + } + + function min_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint4 bProc = TFHE.asEuint4(b); + euint64 result = TFHE.min(aProc, bProc); + return TFHE.decrypt(result); + } + + function max_euint64_euint4(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint4 bProc = TFHE.asEuint4(b); + euint64 result = TFHE.max(aProc, bProc); + return TFHE.decrypt(result); + } + + function add_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + euint64 result = TFHE.add(aProc, bProc); + return TFHE.decrypt(result); + } + + function sub_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + euint64 result = TFHE.sub(aProc, bProc); return TFHE.decrypt(result); } - function unary_op_not_euint64(bytes calldata a) public view returns (uint64) { + function mul_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { euint64 aProc = TFHE.asEuint64(a); - euint64 result = ~aProc; + euint8 bProc = TFHE.asEuint8(b); + euint64 result = TFHE.mul(aProc, bProc); + return TFHE.decrypt(result); + } + + function and_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + euint64 result = TFHE.and(aProc, bProc); + return TFHE.decrypt(result); + } + + function or_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + euint64 result = TFHE.or(aProc, bProc); + return TFHE.decrypt(result); + } + + function xor_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + euint64 result = TFHE.xor(aProc, bProc); + return TFHE.decrypt(result); + } + + function eq_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.eq(aProc, bProc); + return TFHE.decrypt(result); + } + + function ne_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.ne(aProc, bProc); + return TFHE.decrypt(result); + } + + function ge_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.ge(aProc, bProc); + return TFHE.decrypt(result); + } + + function gt_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.gt(aProc, bProc); return TFHE.decrypt(result); } } diff --git a/examples/tests/TFHETestSuite5.sol b/examples/tests/TFHETestSuite5.sol new file mode 100644 index 00000000..3359c1ab --- /dev/null +++ b/examples/tests/TFHETestSuite5.sol @@ -0,0 +1,682 @@ +// SPDX-License-Identifier: BSD-3-Clause-Clear +pragma solidity ^0.8.20; + +import "../../lib/TFHE.sol"; + +contract TFHETestSuite5 { + function le_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.le(aProc, bProc); + return TFHE.decrypt(result); + } + + function lt_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + ebool result = TFHE.lt(aProc, bProc); + return TFHE.decrypt(result); + } + + function min_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + euint64 result = TFHE.min(aProc, bProc); + return TFHE.decrypt(result); + } + + function max_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + euint64 result = TFHE.max(aProc, bProc); + return TFHE.decrypt(result); + } + + function add_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + euint64 result = TFHE.add(aProc, bProc); + return TFHE.decrypt(result); + } + + function sub_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + euint64 result = TFHE.sub(aProc, bProc); + return TFHE.decrypt(result); + } + + function mul_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + euint64 result = TFHE.mul(aProc, bProc); + return TFHE.decrypt(result); + } + + function and_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + euint64 result = TFHE.and(aProc, bProc); + return TFHE.decrypt(result); + } + + function or_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + euint64 result = TFHE.or(aProc, bProc); + return TFHE.decrypt(result); + } + + function xor_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + euint64 result = TFHE.xor(aProc, bProc); + return TFHE.decrypt(result); + } + + function eq_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.eq(aProc, bProc); + return TFHE.decrypt(result); + } + + function ne_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.ne(aProc, bProc); + return TFHE.decrypt(result); + } + + function ge_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.ge(aProc, bProc); + return TFHE.decrypt(result); + } + + function gt_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.gt(aProc, bProc); + return TFHE.decrypt(result); + } + + function le_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.le(aProc, bProc); + return TFHE.decrypt(result); + } + + function lt_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + ebool result = TFHE.lt(aProc, bProc); + return TFHE.decrypt(result); + } + + function min_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + euint64 result = TFHE.min(aProc, bProc); + return TFHE.decrypt(result); + } + + function max_euint64_euint16(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint16 bProc = TFHE.asEuint16(b); + euint64 result = TFHE.max(aProc, bProc); + return TFHE.decrypt(result); + } + + function add_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + euint64 result = TFHE.add(aProc, bProc); + return TFHE.decrypt(result); + } + + function sub_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + euint64 result = TFHE.sub(aProc, bProc); + return TFHE.decrypt(result); + } + + function mul_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + euint64 result = TFHE.mul(aProc, bProc); + return TFHE.decrypt(result); + } + + function and_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + euint64 result = TFHE.and(aProc, bProc); + return TFHE.decrypt(result); + } + + function or_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + euint64 result = TFHE.or(aProc, bProc); + return TFHE.decrypt(result); + } + + function xor_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + euint64 result = TFHE.xor(aProc, bProc); + return TFHE.decrypt(result); + } + + function eq_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.eq(aProc, bProc); + return TFHE.decrypt(result); + } + + function ne_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.ne(aProc, bProc); + return TFHE.decrypt(result); + } + + function ge_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.ge(aProc, bProc); + return TFHE.decrypt(result); + } + + function gt_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.gt(aProc, bProc); + return TFHE.decrypt(result); + } + + function le_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.le(aProc, bProc); + return TFHE.decrypt(result); + } + + function lt_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + ebool result = TFHE.lt(aProc, bProc); + return TFHE.decrypt(result); + } + + function min_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + euint64 result = TFHE.min(aProc, bProc); + return TFHE.decrypt(result); + } + + function max_euint64_euint32(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint32 bProc = TFHE.asEuint32(b); + euint64 result = TFHE.max(aProc, bProc); + return TFHE.decrypt(result); + } + + function add_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.add(aProc, bProc); + return TFHE.decrypt(result); + } + + function sub_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.sub(aProc, bProc); + return TFHE.decrypt(result); + } + + function mul_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.mul(aProc, bProc); + return TFHE.decrypt(result); + } + + function and_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.and(aProc, bProc); + return TFHE.decrypt(result); + } + + function or_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.or(aProc, bProc); + return TFHE.decrypt(result); + } + + function xor_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.xor(aProc, bProc); + return TFHE.decrypt(result); + } + + function eq_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.eq(aProc, bProc); + return TFHE.decrypt(result); + } + + function ne_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.ne(aProc, bProc); + return TFHE.decrypt(result); + } + + function ge_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.ge(aProc, bProc); + return TFHE.decrypt(result); + } + + function gt_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.gt(aProc, bProc); + return TFHE.decrypt(result); + } + + function le_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.le(aProc, bProc); + return TFHE.decrypt(result); + } + + function lt_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.lt(aProc, bProc); + return TFHE.decrypt(result); + } + + function min_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.min(aProc, bProc); + return TFHE.decrypt(result); + } + + function max_euint64_euint64(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.max(aProc, bProc); + return TFHE.decrypt(result); + } + + function add_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + euint64 result = TFHE.add(aProc, bProc); + return TFHE.decrypt(result); + } + + function add_uint64_euint64(uint64 a, bytes calldata b) public view returns (uint64) { + uint64 aProc = a; + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.add(aProc, bProc); + return TFHE.decrypt(result); + } + + function sub_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + euint64 result = TFHE.sub(aProc, bProc); + return TFHE.decrypt(result); + } + + function sub_uint64_euint64(uint64 a, bytes calldata b) public view returns (uint64) { + uint64 aProc = a; + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.sub(aProc, bProc); + return TFHE.decrypt(result); + } + + function mul_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + euint64 result = TFHE.mul(aProc, bProc); + return TFHE.decrypt(result); + } + + function mul_uint64_euint64(uint64 a, bytes calldata b) public view returns (uint64) { + uint64 aProc = a; + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.mul(aProc, bProc); + return TFHE.decrypt(result); + } + + function div_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + euint64 result = TFHE.div(aProc, bProc); + return TFHE.decrypt(result); + } + + function rem_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + euint64 result = TFHE.rem(aProc, bProc); + return TFHE.decrypt(result); + } + + function eq_euint64_uint64(bytes calldata a, uint64 b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + ebool result = TFHE.eq(aProc, bProc); + return TFHE.decrypt(result); + } + + function eq_uint64_euint64(uint64 a, bytes calldata b) public view returns (bool) { + uint64 aProc = a; + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.eq(aProc, bProc); + return TFHE.decrypt(result); + } + + function ne_euint64_uint64(bytes calldata a, uint64 b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + ebool result = TFHE.ne(aProc, bProc); + return TFHE.decrypt(result); + } + + function ne_uint64_euint64(uint64 a, bytes calldata b) public view returns (bool) { + uint64 aProc = a; + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.ne(aProc, bProc); + return TFHE.decrypt(result); + } + + function ge_euint64_uint64(bytes calldata a, uint64 b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + ebool result = TFHE.ge(aProc, bProc); + return TFHE.decrypt(result); + } + + function ge_uint64_euint64(uint64 a, bytes calldata b) public view returns (bool) { + uint64 aProc = a; + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.ge(aProc, bProc); + return TFHE.decrypt(result); + } + + function gt_euint64_uint64(bytes calldata a, uint64 b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + ebool result = TFHE.gt(aProc, bProc); + return TFHE.decrypt(result); + } + + function gt_uint64_euint64(uint64 a, bytes calldata b) public view returns (bool) { + uint64 aProc = a; + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.gt(aProc, bProc); + return TFHE.decrypt(result); + } + + function le_euint64_uint64(bytes calldata a, uint64 b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + ebool result = TFHE.le(aProc, bProc); + return TFHE.decrypt(result); + } + + function le_uint64_euint64(uint64 a, bytes calldata b) public view returns (bool) { + uint64 aProc = a; + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.le(aProc, bProc); + return TFHE.decrypt(result); + } + + function lt_euint64_uint64(bytes calldata a, uint64 b) public view returns (bool) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + ebool result = TFHE.lt(aProc, bProc); + return TFHE.decrypt(result); + } + + function lt_uint64_euint64(uint64 a, bytes calldata b) public view returns (bool) { + uint64 aProc = a; + euint64 bProc = TFHE.asEuint64(b); + ebool result = TFHE.lt(aProc, bProc); + return TFHE.decrypt(result); + } + + function min_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + euint64 result = TFHE.min(aProc, bProc); + return TFHE.decrypt(result); + } + + function min_uint64_euint64(uint64 a, bytes calldata b) public view returns (uint64) { + uint64 aProc = a; + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.min(aProc, bProc); + return TFHE.decrypt(result); + } + + function max_euint64_uint64(bytes calldata a, uint64 b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + uint64 bProc = b; + euint64 result = TFHE.max(aProc, bProc); + return TFHE.decrypt(result); + } + + function max_uint64_euint64(uint64 a, bytes calldata b) public view returns (uint64) { + uint64 aProc = a; + euint64 bProc = TFHE.asEuint64(b); + euint64 result = TFHE.max(aProc, bProc); + return TFHE.decrypt(result); + } + + function shl_euint4_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); + uint8 bProc = b; + euint4 result = TFHE.shl(aProc, bProc); + return TFHE.decrypt(result); + } + + function shr_euint4_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); + uint8 bProc = b; + euint4 result = TFHE.shr(aProc, bProc); + return TFHE.decrypt(result); + } + + function shl_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); + euint8 result = TFHE.shl(aProc, bProc); + return TFHE.decrypt(result); + } + + function shl_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + euint8 result = TFHE.shl(aProc, bProc); + return TFHE.decrypt(result); + } + + function shr_euint8_euint8(bytes calldata a, bytes calldata b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 bProc = TFHE.asEuint8(b); + euint8 result = TFHE.shr(aProc, bProc); + return TFHE.decrypt(result); + } + + function shr_euint8_uint8(bytes calldata a, uint8 b) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + uint8 bProc = b; + euint8 result = TFHE.shr(aProc, bProc); + return TFHE.decrypt(result); + } + + function shl_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); + euint16 result = TFHE.shl(aProc, bProc); + return TFHE.decrypt(result); + } + + function shl_euint16_uint8(bytes calldata a, uint8 b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + uint8 bProc = b; + euint16 result = TFHE.shl(aProc, bProc); + return TFHE.decrypt(result); + } + + function shr_euint16_euint8(bytes calldata a, bytes calldata b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint8 bProc = TFHE.asEuint8(b); + euint16 result = TFHE.shr(aProc, bProc); + return TFHE.decrypt(result); + } + + function shr_euint16_uint8(bytes calldata a, uint8 b) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + uint8 bProc = b; + euint16 result = TFHE.shr(aProc, bProc); + return TFHE.decrypt(result); + } + + function shl_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + euint32 result = TFHE.shl(aProc, bProc); + return TFHE.decrypt(result); + } + + function shl_euint32_uint8(bytes calldata a, uint8 b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + uint8 bProc = b; + euint32 result = TFHE.shl(aProc, bProc); + return TFHE.decrypt(result); + } + + function shr_euint32_euint8(bytes calldata a, bytes calldata b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint8 bProc = TFHE.asEuint8(b); + euint32 result = TFHE.shr(aProc, bProc); + return TFHE.decrypt(result); + } + + function shr_euint32_uint8(bytes calldata a, uint8 b) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + uint8 bProc = b; + euint32 result = TFHE.shr(aProc, bProc); + return TFHE.decrypt(result); + } + + function shl_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + euint64 result = TFHE.shl(aProc, bProc); + return TFHE.decrypt(result); + } + + function shl_euint64_uint8(bytes calldata a, uint8 b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + uint8 bProc = b; + euint64 result = TFHE.shl(aProc, bProc); + return TFHE.decrypt(result); + } + + function shr_euint64_euint8(bytes calldata a, bytes calldata b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint8 bProc = TFHE.asEuint8(b); + euint64 result = TFHE.shr(aProc, bProc); + return TFHE.decrypt(result); + } + + function shr_euint64_uint8(bytes calldata a, uint8 b) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + uint8 bProc = b; + euint64 result = TFHE.shr(aProc, bProc); + return TFHE.decrypt(result); + } + + function neg_euint4(bytes calldata a) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); + euint4 result = TFHE.neg(aProc); + return TFHE.decrypt(result); + } + + function not_euint4(bytes calldata a) public view returns (uint8) { + euint4 aProc = TFHE.asEuint4(a); + euint4 result = TFHE.not(aProc); + return TFHE.decrypt(result); + } + + function neg_euint8(bytes calldata a) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 result = TFHE.neg(aProc); + return TFHE.decrypt(result); + } + + function not_euint8(bytes calldata a) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 result = TFHE.not(aProc); + return TFHE.decrypt(result); + } + + function neg_euint16(bytes calldata a) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint16 result = TFHE.neg(aProc); + return TFHE.decrypt(result); + } + + function not_euint16(bytes calldata a) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint16 result = TFHE.not(aProc); + return TFHE.decrypt(result); + } + + function neg_euint32(bytes calldata a) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint32 result = TFHE.neg(aProc); + return TFHE.decrypt(result); + } + + function not_euint32(bytes calldata a) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint32 result = TFHE.not(aProc); + return TFHE.decrypt(result); + } + + function neg_euint64(bytes calldata a) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint64 result = TFHE.neg(aProc); + return TFHE.decrypt(result); + } + + function not_euint64(bytes calldata a) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint64 result = TFHE.not(aProc); + return TFHE.decrypt(result); + } +} diff --git a/examples/tests/TFHETestSuite6.sol b/examples/tests/TFHETestSuite6.sol new file mode 100644 index 00000000..ce286168 --- /dev/null +++ b/examples/tests/TFHETestSuite6.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: BSD-3-Clause-Clear +pragma solidity ^0.8.20; + +import "../../lib/TFHE.sol"; + +contract TFHETestSuite6 { + function unary_op_neg_euint8(bytes calldata a) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 result = -aProc; + return TFHE.decrypt(result); + } + + function unary_op_not_euint8(bytes calldata a) public view returns (uint8) { + euint8 aProc = TFHE.asEuint8(a); + euint8 result = ~aProc; + return TFHE.decrypt(result); + } + + function unary_op_neg_euint16(bytes calldata a) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint16 result = -aProc; + return TFHE.decrypt(result); + } + + function unary_op_not_euint16(bytes calldata a) public view returns (uint16) { + euint16 aProc = TFHE.asEuint16(a); + euint16 result = ~aProc; + return TFHE.decrypt(result); + } + + function unary_op_neg_euint32(bytes calldata a) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint32 result = -aProc; + return TFHE.decrypt(result); + } + + function unary_op_not_euint32(bytes calldata a) public view returns (uint32) { + euint32 aProc = TFHE.asEuint32(a); + euint32 result = ~aProc; + return TFHE.decrypt(result); + } + + function unary_op_neg_euint64(bytes calldata a) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint64 result = -aProc; + return TFHE.decrypt(result); + } + + function unary_op_not_euint64(bytes calldata a) public view returns (uint64) { + euint64 aProc = TFHE.asEuint64(a); + euint64 result = ~aProc; + return TFHE.decrypt(result); + } +} diff --git a/lib/TFHE.sol b/lib/TFHE.sol index be2c520f..17a15656 100644 --- a/lib/TFHE.sol +++ b/lib/TFHE.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.20; type ebool is uint256; +type euint4 is uint256; type euint8 is uint256; type euint16 is uint256; type euint32 is uint256; @@ -11,15 +12,17 @@ type euint64 is uint256; library Common { // Values used to communicate types to the runtime. uint8 internal constant ebool_t = 0; - uint8 internal constant euint8_t = 0; - uint8 internal constant euint16_t = 1; - uint8 internal constant euint32_t = 2; - uint8 internal constant euint64_t = 3; + uint8 internal constant euint4_t = 1; + uint8 internal constant euint8_t = 2; + uint8 internal constant euint16_t = 3; + uint8 internal constant euint32_t = 4; + uint8 internal constant euint64_t = 5; } import "./Impl.sol"; library TFHE { + euint4 constant NIL4 = euint4.wrap(0); euint8 constant NIL8 = euint8.wrap(0); euint16 constant NIL16 = euint16.wrap(0); euint32 constant NIL32 = euint32.wrap(0); @@ -30,24 +33,1146 @@ library TFHE { return ebool.unwrap(v) != 0; } + // Return true if the enrypted integer is initialized and false otherwise. + function isInitialized(euint4 v) internal pure returns (bool) { + return euint4.unwrap(v) != 0; + } + // Return true if the enrypted integer is initialized and false otherwise. function isInitialized(euint8 v) internal pure returns (bool) { return euint8.unwrap(v) != 0; } - // Return true if the enrypted integer is initialized and false otherwise. - function isInitialized(euint16 v) internal pure returns (bool) { - return euint16.unwrap(v) != 0; + // Return true if the enrypted integer is initialized and false otherwise. + function isInitialized(euint16 v) internal pure returns (bool) { + return euint16.unwrap(v) != 0; + } + + // Return true if the enrypted integer is initialized and false otherwise. + function isInitialized(euint32 v) internal pure returns (bool) { + return euint32.unwrap(v) != 0; + } + + // Return true if the enrypted integer is initialized and false otherwise. + function isInitialized(euint64 v) internal pure returns (bool) { + return euint64.unwrap(v) != 0; + } + + // Evaluate add(a, b) and return the result. + function add(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.add(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.sub(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.mul(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.and(euint4.unwrap(a), euint4.unwrap(b))); + } + + // Evaluate or(a, b) and return the result. + function or(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.or(euint4.unwrap(a), euint4.unwrap(b))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.xor(euint4.unwrap(a), euint4.unwrap(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint4 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.eq(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint4 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ne(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint4 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ge(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint4 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.gt(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint4 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.le(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint4 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.lt(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.min(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.max(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate add(a, b) and return the result. + function add(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.add(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.sub(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.mul(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.and(euint8.unwrap(asEuint8(a)), euint8.unwrap(b))); + } + + // Evaluate or(a, b) and return the result. + function or(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.or(euint8.unwrap(asEuint8(a)), euint8.unwrap(b))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.xor(euint8.unwrap(asEuint8(a)), euint8.unwrap(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint4 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.eq(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint4 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.ne(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint4 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.ge(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint4 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.gt(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint4 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.le(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint4 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.lt(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.min(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.max(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate add(a, b) and return the result. + function add(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.add(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.sub(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.mul(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.and(euint16.unwrap(asEuint16(a)), euint16.unwrap(b))); + } + + // Evaluate or(a, b) and return the result. + function or(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.or(euint16.unwrap(asEuint16(a)), euint16.unwrap(b))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.xor(euint16.unwrap(asEuint16(a)), euint16.unwrap(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint4 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.eq(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint4 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.ne(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint4 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.ge(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint4 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.gt(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint4 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.le(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint4 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.lt(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.min(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.max(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate add(a, b) and return the result. + function add(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.add(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.sub(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.mul(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.and(euint32.unwrap(asEuint32(a)), euint32.unwrap(b))); + } + + // Evaluate or(a, b) and return the result. + function or(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.or(euint32.unwrap(asEuint32(a)), euint32.unwrap(b))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.xor(euint32.unwrap(asEuint32(a)), euint32.unwrap(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint4 a, euint32 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return ebool.wrap(Impl.eq(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint4 a, euint32 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return ebool.wrap(Impl.ne(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint4 a, euint32 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return ebool.wrap(Impl.ge(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint4 a, euint32 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return ebool.wrap(Impl.gt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint4 a, euint32 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return ebool.wrap(Impl.le(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint4 a, euint32 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return ebool.wrap(Impl.lt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.min(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.max(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate add(a, b) and return the result. + function add(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.add(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.sub(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.mul(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.and(euint64.unwrap(asEuint64(a)), euint64.unwrap(b))); + } + + // Evaluate or(a, b) and return the result. + function or(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.or(euint64.unwrap(asEuint64(a)), euint64.unwrap(b))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.xor(euint64.unwrap(asEuint64(a)), euint64.unwrap(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint4 a, euint64 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return ebool.wrap(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint4 a, euint64 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return ebool.wrap(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint4 a, euint64 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return ebool.wrap(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint4 a, euint64 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return ebool.wrap(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint4 a, euint64 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return ebool.wrap(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint4 a, euint64 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return ebool.wrap(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.min(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.max(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate add(a, b) and return the result. + function add(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.add(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate add(a, b) and return the result. + function add(uint8 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.add(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.sub(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate sub(a, b) and return the result. + function sub(uint8 a, euint4 b) internal pure returns (euint4) { + euint4 aEnc = asEuint4(a); + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.sub(euint4.unwrap(aEnc), euint4.unwrap(b), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.mul(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate mul(a, b) and return the result. + function mul(uint8 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.mul(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate div(a, b) and return the result. + function div(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.div(euint4.unwrap(a), uint256(b))); + } + + // Evaluate rem(a, b) and return the result. + function rem(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.rem(euint4.unwrap(a), uint256(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint4 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return ebool.wrap(Impl.eq(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate eq(a, b) and return the result. + function eq(uint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.eq(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint4 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return ebool.wrap(Impl.ne(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate ne(a, b) and return the result. + function ne(uint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ne(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint4 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return ebool.wrap(Impl.ge(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate ge(a, b) and return the result. + function ge(uint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.le(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint4 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return ebool.wrap(Impl.gt(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate gt(a, b) and return the result. + function gt(uint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.lt(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate le(a, b) and return the result. + function le(euint4 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return ebool.wrap(Impl.le(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate le(a, b) and return the result. + function le(uint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ge(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint4 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return ebool.wrap(Impl.lt(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate lt(a, b) and return the result. + function lt(uint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.gt(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate min(a, b) and return the result. + function min(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.min(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate min(a, b) and return the result. + function min(uint8 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.min(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate max(a, b) and return the result. + function max(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.max(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate max(a, b) and return the result. + function max(uint8 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.max(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate add(a, b) and return the result. + function add(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.add(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.sub(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.mul(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.and(euint8.unwrap(a), euint8.unwrap(asEuint8(b)))); + } + + // Evaluate or(a, b) and return the result. + function or(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.or(euint8.unwrap(a), euint8.unwrap(asEuint8(b)))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.xor(euint8.unwrap(a), euint8.unwrap(asEuint8(b)))); } - // Return true if the enrypted integer is initialized and false otherwise. - function isInitialized(euint32 v) internal pure returns (bool) { - return euint32.unwrap(v) != 0; + // Evaluate eq(a, b) and return the result. + function eq(euint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.eq(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); } - // Return true if the enrypted integer is initialized and false otherwise. - function isInitialized(euint64 v) internal pure returns (bool) { - return euint64.unwrap(v) != 0; + // Evaluate ne(a, b) and return the result. + function ne(euint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ne(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ge(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.gt(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.le(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.lt(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.min(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.max(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); } // Evaluate add(a, b) and return the result. @@ -278,7 +1403,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -289,7 +1414,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -300,7 +1425,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -311,7 +1436,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -322,7 +1447,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.le(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -333,7 +1458,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -432,7 +1557,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -443,7 +1568,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -454,7 +1579,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -465,7 +1590,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -476,7 +1601,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -487,7 +1612,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -586,7 +1711,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -597,7 +1722,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -608,7 +1733,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -619,7 +1744,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -630,7 +1755,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -641,7 +1766,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -704,159 +1829,313 @@ library TFHE { if (!isInitialized(a)) { a = asEuint8(0); } - return euint8.wrap(Impl.mul(euint8.unwrap(a), uint256(b), true)); + return euint8.wrap(Impl.mul(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate mul(a, b) and return the result. + function mul(uint8 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.mul(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate div(a, b) and return the result. + function div(euint8 a, uint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return euint8.wrap(Impl.div(euint8.unwrap(a), uint256(b))); + } + + // Evaluate rem(a, b) and return the result. + function rem(euint8 a, uint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return euint8.wrap(Impl.rem(euint8.unwrap(a), uint256(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint8 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return ebool.wrap(Impl.eq(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate eq(a, b) and return the result. + function eq(uint8 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.eq(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint8 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return ebool.wrap(Impl.ne(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate ne(a, b) and return the result. + function ne(uint8 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.ne(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint8 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return ebool.wrap(Impl.ge(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate ge(a, b) and return the result. + function ge(uint8 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.le(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint8 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return ebool.wrap(Impl.gt(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate gt(a, b) and return the result. + function gt(uint8 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.lt(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate le(a, b) and return the result. + function le(euint8 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return ebool.wrap(Impl.le(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate le(a, b) and return the result. + function le(uint8 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.ge(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint8 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return ebool.wrap(Impl.lt(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate lt(a, b) and return the result. + function lt(uint8 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.gt(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate min(a, b) and return the result. + function min(euint8 a, uint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return euint8.wrap(Impl.min(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate min(a, b) and return the result. + function min(uint8 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.min(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate max(a, b) and return the result. + function max(euint8 a, uint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return euint8.wrap(Impl.max(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate max(a, b) and return the result. + function max(uint8 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.max(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate add(a, b) and return the result. + function add(euint16 a, euint4 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint16.wrap(Impl.add(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint16 a, euint4 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint16.wrap(Impl.sub(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint16 a, euint4 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint16.wrap(Impl.mul(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } - // Evaluate mul(a, b) and return the result. - function mul(uint8 a, euint8 b) internal pure returns (euint8) { + // Evaluate and(a, b) and return the result. + function and(euint16 a, euint4 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint16(0); + } if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return euint8.wrap(Impl.mul(euint8.unwrap(b), uint256(a), true)); + return euint16.wrap(Impl.and(euint16.unwrap(a), euint16.unwrap(asEuint16(b)))); } - // Evaluate div(a, b) and return the result. - function div(euint8 a, uint8 b) internal pure returns (euint8) { + // Evaluate or(a, b) and return the result. + function or(euint16 a, euint4 b) internal pure returns (euint16) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return euint8.wrap(Impl.div(euint8.unwrap(a), uint256(b))); + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint16.wrap(Impl.or(euint16.unwrap(a), euint16.unwrap(asEuint16(b)))); } - // Evaluate rem(a, b) and return the result. - function rem(euint8 a, uint8 b) internal pure returns (euint8) { + // Evaluate xor(a, b) and return the result. + function xor(euint16 a, euint4 b) internal pure returns (euint16) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return euint8.wrap(Impl.rem(euint8.unwrap(a), uint256(b))); + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint16.wrap(Impl.xor(euint16.unwrap(a), euint16.unwrap(asEuint16(b)))); } // Evaluate eq(a, b) and return the result. - function eq(euint8 a, uint8 b) internal pure returns (ebool) { + function eq(euint16 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return ebool.wrap(Impl.eq(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate eq(a, b) and return the result. - function eq(uint8 a, euint8 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return ebool.wrap(Impl.eq(euint8.unwrap(b), uint256(a), true)); + return ebool.wrap(Impl.eq(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate ne(a, b) and return the result. - function ne(euint8 a, uint8 b) internal pure returns (ebool) { + function ne(euint16 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return ebool.wrap(Impl.ne(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate ne(a, b) and return the result. - function ne(uint8 a, euint8 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return ebool.wrap(Impl.ne(euint8.unwrap(b), uint256(a), true)); + return ebool.wrap(Impl.ne(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate ge(a, b) and return the result. - function ge(euint8 a, uint8 b) internal pure returns (ebool) { + function ge(euint16 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return ebool.wrap(Impl.ge(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate ge(a, b) and return the result. - function ge(uint8 a, euint8 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return ebool.wrap(Impl.le(euint8.unwrap(b), uint256(a), true)); + return ebool.wrap(Impl.ge(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate gt(a, b) and return the result. - function gt(euint8 a, uint8 b) internal pure returns (ebool) { + function gt(euint16 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return ebool.wrap(Impl.gt(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate gt(a, b) and return the result. - function gt(uint8 a, euint8 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return ebool.wrap(Impl.lt(euint8.unwrap(b), uint256(a), true)); + return ebool.wrap(Impl.gt(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate le(a, b) and return the result. - function le(euint8 a, uint8 b) internal pure returns (ebool) { + function le(euint16 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return ebool.wrap(Impl.le(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate le(a, b) and return the result. - function le(uint8 a, euint8 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return ebool.wrap(Impl.ge(euint8.unwrap(b), uint256(a), true)); + return ebool.wrap(Impl.le(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate lt(a, b) and return the result. - function lt(euint8 a, uint8 b) internal pure returns (ebool) { + function lt(euint16 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return ebool.wrap(Impl.lt(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate lt(a, b) and return the result. - function lt(uint8 a, euint8 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return ebool.wrap(Impl.gt(euint8.unwrap(b), uint256(a), true)); + return ebool.wrap(Impl.lt(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate min(a, b) and return the result. - function min(euint8 a, uint8 b) internal pure returns (euint8) { + function min(euint16 a, euint4 b) internal pure returns (euint16) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return euint8.wrap(Impl.min(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate min(a, b) and return the result. - function min(uint8 a, euint8 b) internal pure returns (euint8) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return euint8.wrap(Impl.min(euint8.unwrap(b), uint256(a), true)); + return euint16.wrap(Impl.min(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate max(a, b) and return the result. - function max(euint8 a, uint8 b) internal pure returns (euint8) { + function max(euint16 a, euint4 b) internal pure returns (euint16) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return euint8.wrap(Impl.max(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate max(a, b) and return the result. - function max(uint8 a, euint8 b) internal pure returns (euint8) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return euint8.wrap(Impl.max(euint8.unwrap(b), uint256(a), true)); + return euint16.wrap(Impl.max(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate add(a, b) and return the result. @@ -933,7 +2212,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate ne(a, b) and return the result. @@ -944,7 +2223,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate ge(a, b) and return the result. @@ -955,7 +2234,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate gt(a, b) and return the result. @@ -966,7 +2245,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate le(a, b) and return the result. @@ -977,7 +2256,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.le(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate lt(a, b) and return the result. @@ -988,7 +2267,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate min(a, b) and return the result. @@ -1087,7 +2366,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint16.unwrap(a), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint16.unwrap(a), euint16.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -1098,7 +2377,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint16.unwrap(a), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint16.unwrap(a), euint16.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -1109,7 +2388,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint16.unwrap(a), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint16.unwrap(a), euint16.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -1120,7 +2399,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint16.unwrap(a), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint16.unwrap(a), euint16.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -1131,7 +2410,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.le(euint16.unwrap(a), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint16.unwrap(a), euint16.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -1142,7 +2421,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint16.unwrap(a), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint16.unwrap(a), euint16.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -1241,7 +2520,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -1252,7 +2531,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -1263,7 +2542,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -1274,7 +2553,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -1285,7 +2564,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -1296,7 +2575,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -1395,7 +2674,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -1406,7 +2685,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -1417,7 +2696,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -1428,7 +2707,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -1439,7 +2718,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -1450,7 +2729,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -1545,7 +2824,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint16.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint16.unwrap(a), uint256(b), true)); } // Evaluate eq(a, b) and return the result. @@ -1553,7 +2832,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint16.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint16.unwrap(b), uint256(a), true)); } // Evaluate ne(a, b) and return the result. @@ -1561,7 +2840,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint16.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint16.unwrap(a), uint256(b), true)); } // Evaluate ne(a, b) and return the result. @@ -1569,7 +2848,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint16.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint16.unwrap(b), uint256(a), true)); } // Evaluate ge(a, b) and return the result. @@ -1577,7 +2856,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint16.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint16.unwrap(a), uint256(b), true)); } // Evaluate ge(a, b) and return the result. @@ -1585,7 +2864,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.le(euint16.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.le(euint16.unwrap(b), uint256(a), true)); } // Evaluate gt(a, b) and return the result. @@ -1593,79 +2872,233 @@ library TFHE { if (!isInitialized(a)) { a = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint16.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint16.unwrap(a), uint256(b), true)); } // Evaluate gt(a, b) and return the result. function gt(uint16 a, euint16 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint16(0); + b = asEuint16(0); + } + return ebool.wrap(Impl.lt(euint16.unwrap(b), uint256(a), true)); + } + + // Evaluate le(a, b) and return the result. + function le(euint16 a, uint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + return ebool.wrap(Impl.le(euint16.unwrap(a), uint256(b), true)); + } + + // Evaluate le(a, b) and return the result. + function le(uint16 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.ge(euint16.unwrap(b), uint256(a), true)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint16 a, uint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + return ebool.wrap(Impl.lt(euint16.unwrap(a), uint256(b), true)); + } + + // Evaluate lt(a, b) and return the result. + function lt(uint16 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.gt(euint16.unwrap(b), uint256(a), true)); + } + + // Evaluate min(a, b) and return the result. + function min(euint16 a, uint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + return euint16.wrap(Impl.min(euint16.unwrap(a), uint256(b), true)); + } + + // Evaluate min(a, b) and return the result. + function min(uint16 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.min(euint16.unwrap(b), uint256(a), true)); + } + + // Evaluate max(a, b) and return the result. + function max(euint16 a, uint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + return euint16.wrap(Impl.max(euint16.unwrap(a), uint256(b), true)); + } + + // Evaluate max(a, b) and return the result. + function max(uint16 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.max(euint16.unwrap(b), uint256(a), true)); + } + + // Evaluate add(a, b) and return the result. + function add(euint32 a, euint4 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint32.wrap(Impl.add(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint32 a, euint4 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint32.wrap(Impl.sub(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint32 a, euint4 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint32.wrap(Impl.mul(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint32 a, euint4 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint32.wrap(Impl.and(euint32.unwrap(a), euint32.unwrap(asEuint32(b)))); + } + + // Evaluate or(a, b) and return the result. + function or(euint32 a, euint4 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint32.wrap(Impl.or(euint32.unwrap(a), euint32.unwrap(asEuint32(b)))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint32 a, euint4 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint32.wrap(Impl.xor(euint32.unwrap(a), euint32.unwrap(asEuint32(b)))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint32 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.eq(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint32 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ne(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint32 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ge(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint32 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint16.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate le(a, b) and return the result. - function le(euint16 a, uint16 b) internal pure returns (ebool) { + function le(euint32 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint16(0); + a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint16.unwrap(a), uint256(b), true), Common.ebool_t)); - } - - // Evaluate le(a, b) and return the result. - function le(uint16 a, euint16 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint16(0); + b = asEuint4(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint16.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate lt(a, b) and return the result. - function lt(euint16 a, uint16 b) internal pure returns (ebool) { + function lt(euint32 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint16(0); + a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint16.unwrap(a), uint256(b), true), Common.ebool_t)); - } - - // Evaluate lt(a, b) and return the result. - function lt(uint16 a, euint16 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint16(0); + b = asEuint4(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint16.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate min(a, b) and return the result. - function min(euint16 a, uint16 b) internal pure returns (euint16) { + function min(euint32 a, euint4 b) internal pure returns (euint32) { if (!isInitialized(a)) { - a = asEuint16(0); + a = asEuint32(0); } - return euint16.wrap(Impl.min(euint16.unwrap(a), uint256(b), true)); - } - - // Evaluate min(a, b) and return the result. - function min(uint16 a, euint16 b) internal pure returns (euint16) { if (!isInitialized(b)) { - b = asEuint16(0); + b = asEuint4(0); } - return euint16.wrap(Impl.min(euint16.unwrap(b), uint256(a), true)); + return euint32.wrap(Impl.min(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate max(a, b) and return the result. - function max(euint16 a, uint16 b) internal pure returns (euint16) { + function max(euint32 a, euint4 b) internal pure returns (euint32) { if (!isInitialized(a)) { - a = asEuint16(0); + a = asEuint32(0); } - return euint16.wrap(Impl.max(euint16.unwrap(a), uint256(b), true)); - } - - // Evaluate max(a, b) and return the result. - function max(uint16 a, euint16 b) internal pure returns (euint16) { if (!isInitialized(b)) { - b = asEuint16(0); + b = asEuint4(0); } - return euint16.wrap(Impl.max(euint16.unwrap(b), uint256(a), true)); + return euint32.wrap(Impl.max(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate add(a, b) and return the result. @@ -1742,7 +3175,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate ne(a, b) and return the result. @@ -1753,7 +3186,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate ge(a, b) and return the result. @@ -1764,7 +3197,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate gt(a, b) and return the result. @@ -1775,7 +3208,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate le(a, b) and return the result. @@ -1786,7 +3219,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate lt(a, b) and return the result. @@ -1797,7 +3230,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate min(a, b) and return the result. @@ -1896,7 +3329,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate ne(a, b) and return the result. @@ -1907,7 +3340,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate ge(a, b) and return the result. @@ -1918,7 +3351,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate gt(a, b) and return the result. @@ -1929,7 +3362,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate le(a, b) and return the result. @@ -1940,7 +3373,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate lt(a, b) and return the result. @@ -1951,7 +3384,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate min(a, b) and return the result. @@ -2050,7 +3483,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(a), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(a), euint32.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -2061,7 +3494,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(a), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(a), euint32.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -2072,7 +3505,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(a), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(a), euint32.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -2083,7 +3516,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(a), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(a), euint32.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -2094,7 +3527,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(a), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(a), euint32.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -2105,7 +3538,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(a), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(a), euint32.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -2204,7 +3637,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -2215,7 +3648,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -2226,7 +3659,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -2237,7 +3670,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -2248,7 +3681,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -2259,7 +3692,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -2354,7 +3787,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(a), uint256(b), true)); } // Evaluate eq(a, b) and return the result. @@ -2362,7 +3795,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(b), uint256(a), true)); } // Evaluate ne(a, b) and return the result. @@ -2370,7 +3803,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(a), uint256(b), true)); } // Evaluate ne(a, b) and return the result. @@ -2378,7 +3811,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(b), uint256(a), true)); } // Evaluate ge(a, b) and return the result. @@ -2386,7 +3819,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(a), uint256(b), true)); } // Evaluate ge(a, b) and return the result. @@ -2394,7 +3827,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(b), uint256(a), true)); } // Evaluate gt(a, b) and return the result. @@ -2402,7 +3835,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(a), uint256(b), true)); } // Evaluate gt(a, b) and return the result. @@ -2410,7 +3843,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(b), uint256(a), true)); } // Evaluate le(a, b) and return the result. @@ -2418,7 +3851,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(a), uint256(b), true)); } // Evaluate le(a, b) and return the result. @@ -2426,7 +3859,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(b), uint256(a), true)); } // Evaluate lt(a, b) and return the result. @@ -2434,7 +3867,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(a), uint256(b), true)); } // Evaluate lt(a, b) and return the result. @@ -2442,7 +3875,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(b), uint256(a), true)); } // Evaluate min(a, b) and return the result. @@ -2477,6 +3910,160 @@ library TFHE { return euint32.wrap(Impl.max(euint32.unwrap(b), uint256(a), true)); } + // Evaluate add(a, b) and return the result. + function add(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.add(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.sub(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.mul(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.and(euint64.unwrap(a), euint64.unwrap(asEuint64(b)))); + } + + // Evaluate or(a, b) and return the result. + function or(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.or(euint64.unwrap(a), euint64.unwrap(asEuint64(b)))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.xor(euint64.unwrap(a), euint64.unwrap(asEuint64(b)))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint64 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint64 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint64 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint64 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint64 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint64 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.min(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.max(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + // Evaluate add(a, b) and return the result. function add(euint64 a, euint8 b) internal pure returns (euint64) { if (!isInitialized(a)) { @@ -2551,7 +4138,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate ne(a, b) and return the result. @@ -2562,7 +4149,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate ge(a, b) and return the result. @@ -2573,7 +4160,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate gt(a, b) and return the result. @@ -2584,7 +4171,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate le(a, b) and return the result. @@ -2595,7 +4182,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate lt(a, b) and return the result. @@ -2606,7 +4193,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate min(a, b) and return the result. @@ -2705,7 +4292,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate ne(a, b) and return the result. @@ -2716,7 +4303,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate ge(a, b) and return the result. @@ -2727,7 +4314,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate gt(a, b) and return the result. @@ -2738,7 +4325,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate le(a, b) and return the result. @@ -2749,7 +4336,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate lt(a, b) and return the result. @@ -2760,7 +4347,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate min(a, b) and return the result. @@ -2859,7 +4446,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate ne(a, b) and return the result. @@ -2870,7 +4457,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate ge(a, b) and return the result. @@ -2881,7 +4468,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate gt(a, b) and return the result. @@ -2892,7 +4479,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate le(a, b) and return the result. @@ -2903,7 +4490,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate lt(a, b) and return the result. @@ -2914,7 +4501,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate min(a, b) and return the result. @@ -3013,7 +4600,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(a), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(a), euint64.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -3024,7 +4611,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(a), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(a), euint64.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -3035,7 +4622,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(a), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(a), euint64.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -3046,7 +4633,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(a), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(a), euint64.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -3057,7 +4644,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(a), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(a), euint64.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -3068,7 +4655,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(a), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(a), euint64.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -3163,7 +4750,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(a), uint256(b), true)); } // Evaluate eq(a, b) and return the result. @@ -3171,7 +4758,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(b), uint256(a), true)); } // Evaluate ne(a, b) and return the result. @@ -3179,7 +4766,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(a), uint256(b), true)); } // Evaluate ne(a, b) and return the result. @@ -3187,7 +4774,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(b), uint256(a), true)); } // Evaluate ge(a, b) and return the result. @@ -3195,7 +4782,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(a), uint256(b), true)); } // Evaluate ge(a, b) and return the result. @@ -3203,7 +4790,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(b), uint256(a), true)); } // Evaluate gt(a, b) and return the result. @@ -3211,7 +4798,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(a), uint256(b), true)); } // Evaluate gt(a, b) and return the result. @@ -3219,7 +4806,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(b), uint256(a), true)); } // Evaluate le(a, b) and return the result. @@ -3227,7 +4814,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(a), uint256(b), true)); } // Evaluate le(a, b) and return the result. @@ -3235,7 +4822,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(b), uint256(a), true)); } // Evaluate lt(a, b) and return the result. @@ -3243,7 +4830,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(a), uint256(b), true)); } // Evaluate lt(a, b) and return the result. @@ -3251,7 +4838,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(b), uint256(a), true)); } // Evaluate min(a, b) and return the result. @@ -3286,6 +4873,22 @@ library TFHE { return euint64.wrap(Impl.max(euint64.unwrap(b), uint256(a), true)); } + // Evaluate shl(a, b) and return the result. + function shl(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.shl(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate shr(a, b) and return the result. + function shr(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.shr(euint4.unwrap(a), uint256(b), true)); + } + // Evaluate shl(a, b) and return the result. function shl(euint8 a, euint8 b) internal pure returns (euint8) { if (!isInitialized(a)) { @@ -3438,6 +5041,12 @@ library TFHE { return euint64.wrap(Impl.shr(euint64.unwrap(a), uint256(b), true)); } + // If 'control''s value is 'true', the result has the same value as 'a'. + // If 'control''s value is 'false', the result has the same value as 'b'. + function cmux(ebool control, euint4 a, euint4 b) internal pure returns (euint4) { + return euint4.wrap(Impl.cmux(ebool.unwrap(control), euint4.unwrap(a), euint4.unwrap(b))); + } + // If 'control''s value is 'true', the result has the same value as 'a'. // If 'control''s value is 'false', the result has the same value as 'b'. function cmux(ebool control, euint8 a, euint8 b) internal pure returns (euint8) { @@ -3462,6 +5071,41 @@ library TFHE { return euint64.wrap(Impl.cmux(ebool.unwrap(control), euint64.unwrap(a), euint64.unwrap(b))); } + // Cast an encrypted integer from euint8 to euint4. + function asEuint4(euint8 value) internal pure returns (euint4) { + return euint4.wrap(Impl.cast(euint8.unwrap(value), Common.euint4_t)); + } + + // Cast an encrypted integer from euint16 to euint4. + function asEuint4(euint16 value) internal pure returns (euint4) { + return euint4.wrap(Impl.cast(euint16.unwrap(value), Common.euint4_t)); + } + + // Cast an encrypted integer from euint32 to euint4. + function asEuint4(euint32 value) internal pure returns (euint4) { + return euint4.wrap(Impl.cast(euint32.unwrap(value), Common.euint4_t)); + } + + // Cast an encrypted integer from euint64 to euint4. + function asEuint4(euint64 value) internal pure returns (euint4) { + return euint4.wrap(Impl.cast(euint64.unwrap(value), Common.euint4_t)); + } + + // Cast an encrypted integer from euint4 to ebool. + function asEbool(euint4 value) internal pure returns (ebool) { + return ne(value, 0); + } + + // Converts an 'ebool' to an 'euint4'. + function asEuint4(ebool b) internal pure returns (euint4) { + return euint4.wrap(Impl.cast(ebool.unwrap(b), Common.euint4_t)); + } + + // Cast an encrypted integer from euint4 to euint8. + function asEuint8(euint4 value) internal pure returns (euint8) { + return euint8.wrap(Impl.cast(euint4.unwrap(value), Common.euint8_t)); + } + // Cast an encrypted integer from euint16 to euint8. function asEuint8(euint16 value) internal pure returns (euint8) { return euint8.wrap(Impl.cast(euint16.unwrap(value), Common.euint8_t)); @@ -3482,48 +5126,52 @@ library TFHE { return ne(value, 0); } - // Convert a serialized 'ciphertext' to an encrypted boolean. + // Convert a serialized 'ciphertext' to an encrypted euint8 integer. function asEbool(bytes memory ciphertext) internal pure returns (ebool) { - return asEbool(asEuint8(ciphertext)); + return ebool.wrap(Impl.verify(ciphertext, Common.ebool_t)); + } + + // Convert a plaintext value to an encrypted euint8 integer. + function asEbool(uint256 value) internal pure returns (ebool) { + return ebool.wrap(Impl.trivialEncrypt(value, Common.ebool_t)); } // Convert a plaintext boolean to an encrypted boolean. function asEbool(bool value) internal pure returns (ebool) { if (value) { - return asEbool(asEuint8(1)); + return asEbool(1); } else { - return asEbool(asEuint8(0)); + return asEbool(0); } } // Converts an 'ebool' to an 'euint8'. - function asEuint8(ebool b) internal pure returns (euint8) { - return euint8.wrap(ebool.unwrap(b)); + function asEuint8(ebool value) internal pure returns (euint8) { + return euint8.wrap(Impl.cast(ebool.unwrap(value), Common.euint8_t)); } // Evaluate and(a, b) and return the result. function and(ebool a, ebool b) internal pure returns (ebool) { - return asEbool(and(asEuint8(a), asEuint8(b))); + return ebool.wrap(Impl.and(ebool.unwrap(a), ebool.unwrap(b))); } // Evaluate or(a, b) and return the result. function or(ebool a, ebool b) internal pure returns (ebool) { - return asEbool(or(asEuint8(a), asEuint8(b))); + return ebool.wrap(Impl.or(ebool.unwrap(a), ebool.unwrap(b))); } // Evaluate xor(a, b) and return the result. function xor(ebool a, ebool b) internal pure returns (ebool) { - return asEbool(xor(asEuint8(a), asEuint8(b))); + return ebool.wrap(Impl.xor(ebool.unwrap(a), ebool.unwrap(b))); } function not(ebool a) internal pure returns (ebool) { - return asEbool(and(not(asEuint8(a)), asEuint8(1))); + return ebool.wrap(Impl.not(ebool.unwrap(a))); } - // If 'control''s value is 'true', the result has the same value as 'a'. - // If 'control''s value is 'false', the result has the same value as 'b'. - function cmux(ebool cond, ebool a, ebool b) internal pure returns (ebool) { - return asEbool(cmux(cond, asEuint8(a), asEuint8(b))); + // Cast an encrypted integer from euint4 to euint16. + function asEuint16(euint4 value) internal pure returns (euint16) { + return euint16.wrap(Impl.cast(euint4.unwrap(value), Common.euint16_t)); } // Cast an encrypted integer from euint8 to euint16. @@ -3551,6 +5199,11 @@ library TFHE { return euint16.wrap(Impl.cast(ebool.unwrap(b), Common.euint16_t)); } + // Cast an encrypted integer from euint4 to euint32. + function asEuint32(euint4 value) internal pure returns (euint32) { + return euint32.wrap(Impl.cast(euint4.unwrap(value), Common.euint32_t)); + } + // Cast an encrypted integer from euint8 to euint32. function asEuint32(euint8 value) internal pure returns (euint32) { return euint32.wrap(Impl.cast(euint8.unwrap(value), Common.euint32_t)); @@ -3576,6 +5229,11 @@ library TFHE { return euint32.wrap(Impl.cast(ebool.unwrap(b), Common.euint32_t)); } + // Cast an encrypted integer from euint4 to euint64. + function asEuint64(euint4 value) internal pure returns (euint64) { + return euint64.wrap(Impl.cast(euint4.unwrap(value), Common.euint64_t)); + } + // Cast an encrypted integer from euint8 to euint64. function asEuint64(euint8 value) internal pure returns (euint64) { return euint64.wrap(Impl.cast(euint8.unwrap(value), Common.euint64_t)); @@ -3601,6 +5259,14 @@ library TFHE { return euint64.wrap(Impl.cast(ebool.unwrap(b), Common.euint64_t)); } + function neg(euint4 value) internal pure returns (euint4) { + return euint4.wrap(Impl.neg(euint4.unwrap(value))); + } + + function not(euint4 value) internal pure returns (euint4) { + return euint4.wrap(Impl.not(euint4.unwrap(value))); + } + function neg(euint8 value) internal pure returns (euint8) { return euint8.wrap(Impl.neg(euint8.unwrap(value))); } @@ -3633,6 +5299,42 @@ library TFHE { return euint64.wrap(Impl.not(euint64.unwrap(value))); } + // Convert a serialized 'ciphertext' to an encrypted euint4 integer. + function asEuint4(bytes memory ciphertext) internal pure returns (euint4) { + return euint4.wrap(Impl.verify(ciphertext, Common.euint4_t)); + } + + // Convert a plaintext value to an encrypted euint4 integer. + function asEuint4(uint256 value) internal pure returns (euint4) { + return euint4.wrap(Impl.trivialEncrypt(value, Common.euint4_t)); + } + + // Reencrypt the given 'value' under the given 'publicKey'. + // Return a serialized euint4 ciphertext. + function reencrypt(euint4 value, bytes32 publicKey) internal view returns (bytes memory reencrypted) { + return Impl.reencrypt(euint4.unwrap(value), publicKey); + } + + // Reencrypt the given 'value' under the given 'publicKey'. + // If 'value' is not initialized, the returned value will contain the 'defaultValue' constant. + // Return a serialized euint4 ciphertext. + function reencrypt( + euint4 value, + bytes32 publicKey, + uint8 defaultValue + ) internal view returns (bytes memory reencrypted) { + if (euint4.unwrap(value) != 0) { + return Impl.reencrypt(euint4.unwrap(value), publicKey); + } else { + return Impl.reencrypt(euint4.unwrap(asEuint4(defaultValue)), publicKey); + } + } + + // Decrypts the encrypted 'value'. + function decrypt(euint4 value) internal view returns (uint8) { + return uint8(Impl.decrypt(euint4.unwrap(value))); + } + // Convert a serialized 'ciphertext' to an encrypted euint8 integer. function asEuint8(bytes memory ciphertext) internal pure returns (euint8) { return euint8.wrap(Impl.verify(ciphertext, Common.euint8_t)); @@ -3798,7 +5500,7 @@ library TFHE { // because there is a single call to the decryption oracle per transaction, irrespective // of how many optimistic requires were used. function optReq(ebool b) internal view { - Impl.optReq(ebool.unwrap(b)); + Impl.optReq(euint8.unwrap(asEuint8(b))); } // Decrypts the encrypted 'value'. @@ -3872,6 +5574,54 @@ library TFHE { } } +using {tfheBinaryOperatorAdd4 as +} for euint4 global; + +function tfheBinaryOperatorAdd4(euint4 lhs, euint4 rhs) pure returns (euint4) { + return TFHE.add(lhs, rhs); +} + +using {tfheBinaryOperatorSub4 as -} for euint4 global; + +function tfheBinaryOperatorSub4(euint4 lhs, euint4 rhs) pure returns (euint4) { + return TFHE.sub(lhs, rhs); +} + +using {tfheBinaryOperatorMul4 as *} for euint4 global; + +function tfheBinaryOperatorMul4(euint4 lhs, euint4 rhs) pure returns (euint4) { + return TFHE.mul(lhs, rhs); +} + +using {tfheBinaryOperatorAnd4 as &} for euint4 global; + +function tfheBinaryOperatorAnd4(euint4 lhs, euint4 rhs) pure returns (euint4) { + return TFHE.and(lhs, rhs); +} + +using {tfheBinaryOperatorOr4 as |} for euint4 global; + +function tfheBinaryOperatorOr4(euint4 lhs, euint4 rhs) pure returns (euint4) { + return TFHE.or(lhs, rhs); +} + +using {tfheBinaryOperatorXor4 as ^} for euint4 global; + +function tfheBinaryOperatorXor4(euint4 lhs, euint4 rhs) pure returns (euint4) { + return TFHE.xor(lhs, rhs); +} + +using {tfheUnaryOperatorNeg4 as -} for euint4 global; + +function tfheUnaryOperatorNeg4(euint4 input) pure returns (euint4) { + return TFHE.neg(input); +} + +using {tfheUnaryOperatorNot4 as ~} for euint4 global; + +function tfheUnaryOperatorNot4(euint4 input) pure returns (euint4) { + return TFHE.not(input); +} + using {tfheBinaryOperatorAdd8 as +} for euint8 global; function tfheBinaryOperatorAdd8(euint8 lhs, euint8 rhs) pure returns (euint8) { diff --git a/mocks/TFHE.sol b/mocks/TFHE.sol index 77c4010f..36f97ce9 100644 --- a/mocks/TFHE.sol +++ b/mocks/TFHE.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.20; type ebool is uint256; +type euint4 is uint256; type euint8 is uint256; type euint16 is uint256; type euint32 is uint256; @@ -11,15 +12,17 @@ type euint64 is uint256; library Common { // Values used to communicate types to the runtime. uint8 internal constant ebool_t = 0; - uint8 internal constant euint8_t = 0; - uint8 internal constant euint16_t = 1; - uint8 internal constant euint32_t = 2; - uint8 internal constant euint64_t = 3; + uint8 internal constant euint4_t = 1; + uint8 internal constant euint8_t = 2; + uint8 internal constant euint16_t = 3; + uint8 internal constant euint32_t = 4; + uint8 internal constant euint64_t = 5; } import "./Impl.sol"; library TFHE { + euint4 constant NIL4 = euint4.wrap(0); euint8 constant NIL8 = euint8.wrap(0); euint16 constant NIL16 = euint16.wrap(0); euint32 constant NIL32 = euint32.wrap(0); @@ -30,24 +33,1146 @@ library TFHE { return true; } + // Return true if the enrypted integer is initialized and false otherwise. + function isInitialized(euint4 /*v*/) internal pure returns (bool) { + return true; + } + // Return true if the enrypted integer is initialized and false otherwise. function isInitialized(euint8 /*v*/) internal pure returns (bool) { return true; } - // Return true if the enrypted integer is initialized and false otherwise. - function isInitialized(euint16 /*v*/) internal pure returns (bool) { - return true; + // Return true if the enrypted integer is initialized and false otherwise. + function isInitialized(euint16 /*v*/) internal pure returns (bool) { + return true; + } + + // Return true if the enrypted integer is initialized and false otherwise. + function isInitialized(euint32 /*v*/) internal pure returns (bool) { + return true; + } + + // Return true if the enrypted integer is initialized and false otherwise. + function isInitialized(euint64 /*v*/) internal pure returns (bool) { + return true; + } + + // Evaluate add(a, b) and return the result. + function add(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.add(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.sub(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.mul(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.and(euint4.unwrap(a), euint4.unwrap(b))); + } + + // Evaluate or(a, b) and return the result. + function or(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.or(euint4.unwrap(a), euint4.unwrap(b))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.xor(euint4.unwrap(a), euint4.unwrap(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint4 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.eq(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint4 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ne(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint4 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ge(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint4 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.gt(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint4 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.le(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint4 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.lt(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.min(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint4 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.max(euint4.unwrap(a), euint4.unwrap(b), false)); + } + + // Evaluate add(a, b) and return the result. + function add(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.add(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.sub(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.mul(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.and(euint8.unwrap(asEuint8(a)), euint8.unwrap(b))); + } + + // Evaluate or(a, b) and return the result. + function or(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.or(euint8.unwrap(asEuint8(a)), euint8.unwrap(b))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.xor(euint8.unwrap(asEuint8(a)), euint8.unwrap(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint4 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.eq(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint4 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.ne(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint4 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.ge(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint4 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.gt(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint4 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.le(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint4 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.lt(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.min(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint4 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.max(euint8.unwrap(asEuint8(a)), euint8.unwrap(b), false)); + } + + // Evaluate add(a, b) and return the result. + function add(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.add(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.sub(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.mul(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.and(euint16.unwrap(asEuint16(a)), euint16.unwrap(b))); + } + + // Evaluate or(a, b) and return the result. + function or(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.or(euint16.unwrap(asEuint16(a)), euint16.unwrap(b))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.xor(euint16.unwrap(asEuint16(a)), euint16.unwrap(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint4 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.eq(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint4 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.ne(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint4 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.ge(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint4 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.gt(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint4 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.le(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint4 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.lt(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.min(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint4 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.max(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); + } + + // Evaluate add(a, b) and return the result. + function add(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.add(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.sub(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.mul(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.and(euint32.unwrap(asEuint32(a)), euint32.unwrap(b))); + } + + // Evaluate or(a, b) and return the result. + function or(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.or(euint32.unwrap(asEuint32(a)), euint32.unwrap(b))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.xor(euint32.unwrap(asEuint32(a)), euint32.unwrap(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint4 a, euint32 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return ebool.wrap(Impl.eq(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint4 a, euint32 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return ebool.wrap(Impl.ne(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint4 a, euint32 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return ebool.wrap(Impl.ge(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint4 a, euint32 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return ebool.wrap(Impl.gt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint4 a, euint32 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return ebool.wrap(Impl.le(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint4 a, euint32 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return ebool.wrap(Impl.lt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.min(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint4 a, euint32 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint32(0); + } + return euint32.wrap(Impl.max(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); + } + + // Evaluate add(a, b) and return the result. + function add(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.add(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.sub(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.mul(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.and(euint64.unwrap(asEuint64(a)), euint64.unwrap(b))); + } + + // Evaluate or(a, b) and return the result. + function or(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.or(euint64.unwrap(asEuint64(a)), euint64.unwrap(b))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.xor(euint64.unwrap(asEuint64(a)), euint64.unwrap(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint4 a, euint64 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return ebool.wrap(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint4 a, euint64 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return ebool.wrap(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint4 a, euint64 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return ebool.wrap(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint4 a, euint64 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return ebool.wrap(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint4 a, euint64 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return ebool.wrap(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint4 a, euint64 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return ebool.wrap(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.min(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint4 a, euint64 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + if (!isInitialized(b)) { + b = asEuint64(0); + } + return euint64.wrap(Impl.max(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); + } + + // Evaluate add(a, b) and return the result. + function add(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.add(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate add(a, b) and return the result. + function add(uint8 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.add(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.sub(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate sub(a, b) and return the result. + function sub(uint8 a, euint4 b) internal pure returns (euint4) { + euint4 aEnc = asEuint4(a); + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.sub(euint4.unwrap(aEnc), euint4.unwrap(b), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.mul(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate mul(a, b) and return the result. + function mul(uint8 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.mul(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate div(a, b) and return the result. + function div(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.div(euint4.unwrap(a), uint256(b))); + } + + // Evaluate rem(a, b) and return the result. + function rem(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.rem(euint4.unwrap(a), uint256(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint4 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return ebool.wrap(Impl.eq(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate eq(a, b) and return the result. + function eq(uint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.eq(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint4 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return ebool.wrap(Impl.ne(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate ne(a, b) and return the result. + function ne(uint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ne(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint4 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return ebool.wrap(Impl.ge(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate ge(a, b) and return the result. + function ge(uint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.le(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint4 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return ebool.wrap(Impl.gt(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate gt(a, b) and return the result. + function gt(uint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.lt(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate le(a, b) and return the result. + function le(euint4 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return ebool.wrap(Impl.le(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate le(a, b) and return the result. + function le(uint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ge(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint4 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return ebool.wrap(Impl.lt(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate lt(a, b) and return the result. + function lt(uint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.gt(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate min(a, b) and return the result. + function min(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.min(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate min(a, b) and return the result. + function min(uint8 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.min(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate max(a, b) and return the result. + function max(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.max(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate max(a, b) and return the result. + function max(uint8 a, euint4 b) internal pure returns (euint4) { + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint4.wrap(Impl.max(euint4.unwrap(b), uint256(a), true)); + } + + // Evaluate add(a, b) and return the result. + function add(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.add(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.sub(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.mul(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.and(euint8.unwrap(a), euint8.unwrap(asEuint8(b)))); + } + + // Evaluate or(a, b) and return the result. + function or(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.or(euint8.unwrap(a), euint8.unwrap(asEuint8(b)))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.xor(euint8.unwrap(a), euint8.unwrap(asEuint8(b)))); } - // Return true if the enrypted integer is initialized and false otherwise. - function isInitialized(euint32 /*v*/) internal pure returns (bool) { - return true; + // Evaluate eq(a, b) and return the result. + function eq(euint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.eq(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); } - // Return true if the enrypted integer is initialized and false otherwise. - function isInitialized(euint64 /*v*/) internal pure returns (bool) { - return true; + // Evaluate ne(a, b) and return the result. + function ne(euint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ne(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ge(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.gt(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.le(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint8 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.lt(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.min(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint8 a, euint4 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint8.wrap(Impl.max(euint8.unwrap(a), euint8.unwrap(asEuint8(b)), false)); } // Evaluate add(a, b) and return the result. @@ -278,7 +1403,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -289,7 +1414,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -300,7 +1425,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -311,7 +1436,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -322,7 +1447,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.le(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -333,7 +1458,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint16.unwrap(asEuint16(a)), euint16.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -432,7 +1557,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -443,7 +1568,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -454,7 +1579,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -465,7 +1590,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -476,7 +1601,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -487,7 +1612,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -586,7 +1711,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -597,7 +1722,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -608,7 +1733,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -619,7 +1744,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -630,7 +1755,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -641,7 +1766,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -704,159 +1829,313 @@ library TFHE { if (!isInitialized(a)) { a = asEuint8(0); } - return euint8.wrap(Impl.mul(euint8.unwrap(a), uint256(b), true)); + return euint8.wrap(Impl.mul(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate mul(a, b) and return the result. + function mul(uint8 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.mul(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate div(a, b) and return the result. + function div(euint8 a, uint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return euint8.wrap(Impl.div(euint8.unwrap(a), uint256(b))); + } + + // Evaluate rem(a, b) and return the result. + function rem(euint8 a, uint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return euint8.wrap(Impl.rem(euint8.unwrap(a), uint256(b))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint8 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return ebool.wrap(Impl.eq(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate eq(a, b) and return the result. + function eq(uint8 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.eq(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint8 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return ebool.wrap(Impl.ne(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate ne(a, b) and return the result. + function ne(uint8 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.ne(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint8 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return ebool.wrap(Impl.ge(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate ge(a, b) and return the result. + function ge(uint8 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.le(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint8 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return ebool.wrap(Impl.gt(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate gt(a, b) and return the result. + function gt(uint8 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.lt(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate le(a, b) and return the result. + function le(euint8 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return ebool.wrap(Impl.le(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate le(a, b) and return the result. + function le(uint8 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.ge(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint8 a, uint8 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return ebool.wrap(Impl.lt(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate lt(a, b) and return the result. + function lt(uint8 a, euint8 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return ebool.wrap(Impl.gt(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate min(a, b) and return the result. + function min(euint8 a, uint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return euint8.wrap(Impl.min(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate min(a, b) and return the result. + function min(uint8 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.min(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate max(a, b) and return the result. + function max(euint8 a, uint8 b) internal pure returns (euint8) { + if (!isInitialized(a)) { + a = asEuint8(0); + } + return euint8.wrap(Impl.max(euint8.unwrap(a), uint256(b), true)); + } + + // Evaluate max(a, b) and return the result. + function max(uint8 a, euint8 b) internal pure returns (euint8) { + if (!isInitialized(b)) { + b = asEuint8(0); + } + return euint8.wrap(Impl.max(euint8.unwrap(b), uint256(a), true)); + } + + // Evaluate add(a, b) and return the result. + function add(euint16 a, euint4 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint16.wrap(Impl.add(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint16 a, euint4 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint16.wrap(Impl.sub(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint16 a, euint4 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint16.wrap(Impl.mul(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } - // Evaluate mul(a, b) and return the result. - function mul(uint8 a, euint8 b) internal pure returns (euint8) { + // Evaluate and(a, b) and return the result. + function and(euint16 a, euint4 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint16(0); + } if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return euint8.wrap(Impl.mul(euint8.unwrap(b), uint256(a), true)); + return euint16.wrap(Impl.and(euint16.unwrap(a), euint16.unwrap(asEuint16(b)))); } - // Evaluate div(a, b) and return the result. - function div(euint8 a, uint8 b) internal pure returns (euint8) { + // Evaluate or(a, b) and return the result. + function or(euint16 a, euint4 b) internal pure returns (euint16) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return euint8.wrap(Impl.div(euint8.unwrap(a), uint256(b))); + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint16.wrap(Impl.or(euint16.unwrap(a), euint16.unwrap(asEuint16(b)))); } - // Evaluate rem(a, b) and return the result. - function rem(euint8 a, uint8 b) internal pure returns (euint8) { + // Evaluate xor(a, b) and return the result. + function xor(euint16 a, euint4 b) internal pure returns (euint16) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return euint8.wrap(Impl.rem(euint8.unwrap(a), uint256(b))); + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint16.wrap(Impl.xor(euint16.unwrap(a), euint16.unwrap(asEuint16(b)))); } // Evaluate eq(a, b) and return the result. - function eq(euint8 a, uint8 b) internal pure returns (ebool) { + function eq(euint16 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return ebool.wrap(Impl.eq(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate eq(a, b) and return the result. - function eq(uint8 a, euint8 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return ebool.wrap(Impl.eq(euint8.unwrap(b), uint256(a), true)); + return ebool.wrap(Impl.eq(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate ne(a, b) and return the result. - function ne(euint8 a, uint8 b) internal pure returns (ebool) { + function ne(euint16 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return ebool.wrap(Impl.ne(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate ne(a, b) and return the result. - function ne(uint8 a, euint8 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return ebool.wrap(Impl.ne(euint8.unwrap(b), uint256(a), true)); + return ebool.wrap(Impl.ne(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate ge(a, b) and return the result. - function ge(euint8 a, uint8 b) internal pure returns (ebool) { + function ge(euint16 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return ebool.wrap(Impl.ge(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate ge(a, b) and return the result. - function ge(uint8 a, euint8 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return ebool.wrap(Impl.le(euint8.unwrap(b), uint256(a), true)); + return ebool.wrap(Impl.ge(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate gt(a, b) and return the result. - function gt(euint8 a, uint8 b) internal pure returns (ebool) { + function gt(euint16 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return ebool.wrap(Impl.gt(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate gt(a, b) and return the result. - function gt(uint8 a, euint8 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return ebool.wrap(Impl.lt(euint8.unwrap(b), uint256(a), true)); + return ebool.wrap(Impl.gt(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate le(a, b) and return the result. - function le(euint8 a, uint8 b) internal pure returns (ebool) { + function le(euint16 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return ebool.wrap(Impl.le(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate le(a, b) and return the result. - function le(uint8 a, euint8 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return ebool.wrap(Impl.ge(euint8.unwrap(b), uint256(a), true)); + return ebool.wrap(Impl.le(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate lt(a, b) and return the result. - function lt(euint8 a, uint8 b) internal pure returns (ebool) { + function lt(euint16 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return ebool.wrap(Impl.lt(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate lt(a, b) and return the result. - function lt(uint8 a, euint8 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return ebool.wrap(Impl.gt(euint8.unwrap(b), uint256(a), true)); + return ebool.wrap(Impl.lt(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate min(a, b) and return the result. - function min(euint8 a, uint8 b) internal pure returns (euint8) { + function min(euint16 a, euint4 b) internal pure returns (euint16) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return euint8.wrap(Impl.min(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate min(a, b) and return the result. - function min(uint8 a, euint8 b) internal pure returns (euint8) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return euint8.wrap(Impl.min(euint8.unwrap(b), uint256(a), true)); + return euint16.wrap(Impl.min(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate max(a, b) and return the result. - function max(euint8 a, uint8 b) internal pure returns (euint8) { + function max(euint16 a, euint4 b) internal pure returns (euint16) { if (!isInitialized(a)) { - a = asEuint8(0); + a = asEuint16(0); } - return euint8.wrap(Impl.max(euint8.unwrap(a), uint256(b), true)); - } - - // Evaluate max(a, b) and return the result. - function max(uint8 a, euint8 b) internal pure returns (euint8) { if (!isInitialized(b)) { - b = asEuint8(0); + b = asEuint4(0); } - return euint8.wrap(Impl.max(euint8.unwrap(b), uint256(a), true)); + return euint16.wrap(Impl.max(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate add(a, b) and return the result. @@ -933,7 +2212,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate ne(a, b) and return the result. @@ -944,7 +2223,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate ge(a, b) and return the result. @@ -955,7 +2234,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate gt(a, b) and return the result. @@ -966,7 +2245,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate le(a, b) and return the result. @@ -977,7 +2256,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.le(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate lt(a, b) and return the result. @@ -988,7 +2267,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint16.unwrap(a), euint16.unwrap(asEuint16(b)), false)); } // Evaluate min(a, b) and return the result. @@ -1087,7 +2366,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint16.unwrap(a), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint16.unwrap(a), euint16.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -1098,7 +2377,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint16.unwrap(a), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint16.unwrap(a), euint16.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -1109,7 +2388,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint16.unwrap(a), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint16.unwrap(a), euint16.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -1120,7 +2399,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint16.unwrap(a), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint16.unwrap(a), euint16.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -1131,7 +2410,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.le(euint16.unwrap(a), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint16.unwrap(a), euint16.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -1142,7 +2421,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint16.unwrap(a), euint16.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint16.unwrap(a), euint16.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -1241,7 +2520,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -1252,7 +2531,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -1263,7 +2542,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -1274,7 +2553,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -1285,7 +2564,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -1296,7 +2575,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(asEuint32(a)), euint32.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -1395,7 +2674,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -1406,7 +2685,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -1417,7 +2696,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -1428,7 +2707,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -1439,7 +2718,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -1450,7 +2729,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -1545,7 +2824,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint16.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint16.unwrap(a), uint256(b), true)); } // Evaluate eq(a, b) and return the result. @@ -1553,7 +2832,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint16.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint16.unwrap(b), uint256(a), true)); } // Evaluate ne(a, b) and return the result. @@ -1561,7 +2840,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint16.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint16.unwrap(a), uint256(b), true)); } // Evaluate ne(a, b) and return the result. @@ -1569,7 +2848,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint16.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint16.unwrap(b), uint256(a), true)); } // Evaluate ge(a, b) and return the result. @@ -1577,7 +2856,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint16.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint16.unwrap(a), uint256(b), true)); } // Evaluate ge(a, b) and return the result. @@ -1585,7 +2864,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.le(euint16.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.le(euint16.unwrap(b), uint256(a), true)); } // Evaluate gt(a, b) and return the result. @@ -1593,79 +2872,233 @@ library TFHE { if (!isInitialized(a)) { a = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint16.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint16.unwrap(a), uint256(b), true)); } // Evaluate gt(a, b) and return the result. function gt(uint16 a, euint16 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint16(0); + b = asEuint16(0); + } + return ebool.wrap(Impl.lt(euint16.unwrap(b), uint256(a), true)); + } + + // Evaluate le(a, b) and return the result. + function le(euint16 a, uint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + return ebool.wrap(Impl.le(euint16.unwrap(a), uint256(b), true)); + } + + // Evaluate le(a, b) and return the result. + function le(uint16 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.ge(euint16.unwrap(b), uint256(a), true)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint16 a, uint16 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + return ebool.wrap(Impl.lt(euint16.unwrap(a), uint256(b), true)); + } + + // Evaluate lt(a, b) and return the result. + function lt(uint16 a, euint16 b) internal pure returns (ebool) { + if (!isInitialized(b)) { + b = asEuint16(0); + } + return ebool.wrap(Impl.gt(euint16.unwrap(b), uint256(a), true)); + } + + // Evaluate min(a, b) and return the result. + function min(euint16 a, uint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + return euint16.wrap(Impl.min(euint16.unwrap(a), uint256(b), true)); + } + + // Evaluate min(a, b) and return the result. + function min(uint16 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.min(euint16.unwrap(b), uint256(a), true)); + } + + // Evaluate max(a, b) and return the result. + function max(euint16 a, uint16 b) internal pure returns (euint16) { + if (!isInitialized(a)) { + a = asEuint16(0); + } + return euint16.wrap(Impl.max(euint16.unwrap(a), uint256(b), true)); + } + + // Evaluate max(a, b) and return the result. + function max(uint16 a, euint16 b) internal pure returns (euint16) { + if (!isInitialized(b)) { + b = asEuint16(0); + } + return euint16.wrap(Impl.max(euint16.unwrap(b), uint256(a), true)); + } + + // Evaluate add(a, b) and return the result. + function add(euint32 a, euint4 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint32.wrap(Impl.add(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint32 a, euint4 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint32.wrap(Impl.sub(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint32 a, euint4 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint32.wrap(Impl.mul(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint32 a, euint4 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint32.wrap(Impl.and(euint32.unwrap(a), euint32.unwrap(asEuint32(b)))); + } + + // Evaluate or(a, b) and return the result. + function or(euint32 a, euint4 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint32.wrap(Impl.or(euint32.unwrap(a), euint32.unwrap(asEuint32(b)))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint32 a, euint4 b) internal pure returns (euint32) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint32.wrap(Impl.xor(euint32.unwrap(a), euint32.unwrap(asEuint32(b)))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint32 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.eq(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint32 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ne(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint32 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ge(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint32 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint32(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint16.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate le(a, b) and return the result. - function le(euint16 a, uint16 b) internal pure returns (ebool) { + function le(euint32 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint16(0); + a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint16.unwrap(a), uint256(b), true), Common.ebool_t)); - } - - // Evaluate le(a, b) and return the result. - function le(uint16 a, euint16 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint16(0); + b = asEuint4(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint16.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate lt(a, b) and return the result. - function lt(euint16 a, uint16 b) internal pure returns (ebool) { + function lt(euint32 a, euint4 b) internal pure returns (ebool) { if (!isInitialized(a)) { - a = asEuint16(0); + a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint16.unwrap(a), uint256(b), true), Common.ebool_t)); - } - - // Evaluate lt(a, b) and return the result. - function lt(uint16 a, euint16 b) internal pure returns (ebool) { if (!isInitialized(b)) { - b = asEuint16(0); + b = asEuint4(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint16.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate min(a, b) and return the result. - function min(euint16 a, uint16 b) internal pure returns (euint16) { + function min(euint32 a, euint4 b) internal pure returns (euint32) { if (!isInitialized(a)) { - a = asEuint16(0); + a = asEuint32(0); } - return euint16.wrap(Impl.min(euint16.unwrap(a), uint256(b), true)); - } - - // Evaluate min(a, b) and return the result. - function min(uint16 a, euint16 b) internal pure returns (euint16) { if (!isInitialized(b)) { - b = asEuint16(0); + b = asEuint4(0); } - return euint16.wrap(Impl.min(euint16.unwrap(b), uint256(a), true)); + return euint32.wrap(Impl.min(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate max(a, b) and return the result. - function max(euint16 a, uint16 b) internal pure returns (euint16) { + function max(euint32 a, euint4 b) internal pure returns (euint32) { if (!isInitialized(a)) { - a = asEuint16(0); + a = asEuint32(0); } - return euint16.wrap(Impl.max(euint16.unwrap(a), uint256(b), true)); - } - - // Evaluate max(a, b) and return the result. - function max(uint16 a, euint16 b) internal pure returns (euint16) { if (!isInitialized(b)) { - b = asEuint16(0); + b = asEuint4(0); } - return euint16.wrap(Impl.max(euint16.unwrap(b), uint256(a), true)); + return euint32.wrap(Impl.max(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate add(a, b) and return the result. @@ -1742,7 +3175,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate ne(a, b) and return the result. @@ -1753,7 +3186,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate ge(a, b) and return the result. @@ -1764,7 +3197,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate gt(a, b) and return the result. @@ -1775,7 +3208,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate le(a, b) and return the result. @@ -1786,7 +3219,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate lt(a, b) and return the result. @@ -1797,7 +3230,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate min(a, b) and return the result. @@ -1896,7 +3329,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate ne(a, b) and return the result. @@ -1907,7 +3340,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate ge(a, b) and return the result. @@ -1918,7 +3351,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate gt(a, b) and return the result. @@ -1929,7 +3362,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate le(a, b) and return the result. @@ -1940,7 +3373,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate lt(a, b) and return the result. @@ -1951,7 +3384,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(a), euint32.unwrap(asEuint32(b)), false)); } // Evaluate min(a, b) and return the result. @@ -2050,7 +3483,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(a), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(a), euint32.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -2061,7 +3494,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(a), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(a), euint32.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -2072,7 +3505,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(a), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(a), euint32.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -2083,7 +3516,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(a), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(a), euint32.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -2094,7 +3527,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(a), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(a), euint32.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -2105,7 +3538,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(a), euint32.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(a), euint32.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -2204,7 +3637,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -2215,7 +3648,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -2226,7 +3659,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -2237,7 +3670,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -2248,7 +3681,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -2259,7 +3692,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(asEuint64(a)), euint64.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -2354,7 +3787,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(a), uint256(b), true)); } // Evaluate eq(a, b) and return the result. @@ -2362,7 +3795,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint32.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint32.unwrap(b), uint256(a), true)); } // Evaluate ne(a, b) and return the result. @@ -2370,7 +3803,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(a), uint256(b), true)); } // Evaluate ne(a, b) and return the result. @@ -2378,7 +3811,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint32.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint32.unwrap(b), uint256(a), true)); } // Evaluate ge(a, b) and return the result. @@ -2386,7 +3819,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(a), uint256(b), true)); } // Evaluate ge(a, b) and return the result. @@ -2394,7 +3827,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(b), uint256(a), true)); } // Evaluate gt(a, b) and return the result. @@ -2402,7 +3835,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(a), uint256(b), true)); } // Evaluate gt(a, b) and return the result. @@ -2410,7 +3843,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(b), uint256(a), true)); } // Evaluate le(a, b) and return the result. @@ -2418,7 +3851,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint32.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.le(euint32.unwrap(a), uint256(b), true)); } // Evaluate le(a, b) and return the result. @@ -2426,7 +3859,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint32.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint32.unwrap(b), uint256(a), true)); } // Evaluate lt(a, b) and return the result. @@ -2434,7 +3867,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint32.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint32.unwrap(a), uint256(b), true)); } // Evaluate lt(a, b) and return the result. @@ -2442,7 +3875,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint32.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint32.unwrap(b), uint256(a), true)); } // Evaluate min(a, b) and return the result. @@ -2477,6 +3910,160 @@ library TFHE { return euint32.wrap(Impl.max(euint32.unwrap(b), uint256(a), true)); } + // Evaluate add(a, b) and return the result. + function add(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.add(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate sub(a, b) and return the result. + function sub(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.sub(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate mul(a, b) and return the result. + function mul(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.mul(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate and(a, b) and return the result. + function and(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.and(euint64.unwrap(a), euint64.unwrap(asEuint64(b)))); + } + + // Evaluate or(a, b) and return the result. + function or(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.or(euint64.unwrap(a), euint64.unwrap(asEuint64(b)))); + } + + // Evaluate xor(a, b) and return the result. + function xor(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.xor(euint64.unwrap(a), euint64.unwrap(asEuint64(b)))); + } + + // Evaluate eq(a, b) and return the result. + function eq(euint64 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate ne(a, b) and return the result. + function ne(euint64 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate ge(a, b) and return the result. + function ge(euint64 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate gt(a, b) and return the result. + function gt(euint64 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate le(a, b) and return the result. + function le(euint64 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate lt(a, b) and return the result. + function lt(euint64 a, euint4 b) internal pure returns (ebool) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return ebool.wrap(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate min(a, b) and return the result. + function min(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.min(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + + // Evaluate max(a, b) and return the result. + function max(euint64 a, euint4 b) internal pure returns (euint64) { + if (!isInitialized(a)) { + a = asEuint64(0); + } + if (!isInitialized(b)) { + b = asEuint4(0); + } + return euint64.wrap(Impl.max(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); + } + // Evaluate add(a, b) and return the result. function add(euint64 a, euint8 b) internal pure returns (euint64) { if (!isInitialized(a)) { @@ -2551,7 +4138,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate ne(a, b) and return the result. @@ -2562,7 +4149,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate ge(a, b) and return the result. @@ -2573,7 +4160,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate gt(a, b) and return the result. @@ -2584,7 +4171,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate le(a, b) and return the result. @@ -2595,7 +4182,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate lt(a, b) and return the result. @@ -2606,7 +4193,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint8(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate min(a, b) and return the result. @@ -2705,7 +4292,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate ne(a, b) and return the result. @@ -2716,7 +4303,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate ge(a, b) and return the result. @@ -2727,7 +4314,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate gt(a, b) and return the result. @@ -2738,7 +4325,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate le(a, b) and return the result. @@ -2749,7 +4336,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate lt(a, b) and return the result. @@ -2760,7 +4347,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint16(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate min(a, b) and return the result. @@ -2859,7 +4446,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate ne(a, b) and return the result. @@ -2870,7 +4457,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate ge(a, b) and return the result. @@ -2881,7 +4468,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate gt(a, b) and return the result. @@ -2892,7 +4479,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate le(a, b) and return the result. @@ -2903,7 +4490,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate lt(a, b) and return the result. @@ -2914,7 +4501,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint32(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(a), euint64.unwrap(asEuint64(b)), false)); } // Evaluate min(a, b) and return the result. @@ -3013,7 +4600,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(a), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(a), euint64.unwrap(b), false)); } // Evaluate ne(a, b) and return the result. @@ -3024,7 +4611,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(a), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(a), euint64.unwrap(b), false)); } // Evaluate ge(a, b) and return the result. @@ -3035,7 +4622,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(a), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(a), euint64.unwrap(b), false)); } // Evaluate gt(a, b) and return the result. @@ -3046,7 +4633,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(a), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(a), euint64.unwrap(b), false)); } // Evaluate le(a, b) and return the result. @@ -3057,7 +4644,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(a), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(a), euint64.unwrap(b), false)); } // Evaluate lt(a, b) and return the result. @@ -3068,7 +4655,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(a), euint64.unwrap(b), false), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(a), euint64.unwrap(b), false)); } // Evaluate min(a, b) and return the result. @@ -3163,7 +4750,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(a), uint256(b), true)); } // Evaluate eq(a, b) and return the result. @@ -3171,7 +4758,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.eq(euint64.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.eq(euint64.unwrap(b), uint256(a), true)); } // Evaluate ne(a, b) and return the result. @@ -3179,7 +4766,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(a), uint256(b), true)); } // Evaluate ne(a, b) and return the result. @@ -3187,7 +4774,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ne(euint64.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.ne(euint64.unwrap(b), uint256(a), true)); } // Evaluate ge(a, b) and return the result. @@ -3195,7 +4782,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(a), uint256(b), true)); } // Evaluate ge(a, b) and return the result. @@ -3203,7 +4790,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(b), uint256(a), true)); } // Evaluate gt(a, b) and return the result. @@ -3211,7 +4798,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(a), uint256(b), true)); } // Evaluate gt(a, b) and return the result. @@ -3219,7 +4806,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(b), uint256(a), true)); } // Evaluate le(a, b) and return the result. @@ -3227,7 +4814,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.le(euint64.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.le(euint64.unwrap(a), uint256(b), true)); } // Evaluate le(a, b) and return the result. @@ -3235,7 +4822,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.ge(euint64.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.ge(euint64.unwrap(b), uint256(a), true)); } // Evaluate lt(a, b) and return the result. @@ -3243,7 +4830,7 @@ library TFHE { if (!isInitialized(a)) { a = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.lt(euint64.unwrap(a), uint256(b), true), Common.ebool_t)); + return ebool.wrap(Impl.lt(euint64.unwrap(a), uint256(b), true)); } // Evaluate lt(a, b) and return the result. @@ -3251,7 +4838,7 @@ library TFHE { if (!isInitialized(b)) { b = asEuint64(0); } - return ebool.wrap(Impl.cast(Impl.gt(euint64.unwrap(b), uint256(a), true), Common.ebool_t)); + return ebool.wrap(Impl.gt(euint64.unwrap(b), uint256(a), true)); } // Evaluate min(a, b) and return the result. @@ -3286,6 +4873,22 @@ library TFHE { return euint64.wrap(Impl.max(euint64.unwrap(b), uint256(a), true)); } + // Evaluate shl(a, b) and return the result. + function shl(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.shl(euint4.unwrap(a), uint256(b), true)); + } + + // Evaluate shr(a, b) and return the result. + function shr(euint4 a, uint8 b) internal pure returns (euint4) { + if (!isInitialized(a)) { + a = asEuint4(0); + } + return euint4.wrap(Impl.shr(euint4.unwrap(a), uint256(b), true)); + } + // Evaluate shl(a, b) and return the result. function shl(euint8 a, euint8 b) internal pure returns (euint8) { if (!isInitialized(a)) { @@ -3438,6 +5041,12 @@ library TFHE { return euint64.wrap(Impl.shr(euint64.unwrap(a), uint256(b), true)); } + // If 'control''s value is 'true', the result has the same value as 'a'. + // If 'control''s value is 'false', the result has the same value as 'b'. + function cmux(ebool control, euint4 a, euint4 b) internal pure returns (euint4) { + return euint4.wrap(Impl.cmux(ebool.unwrap(control), euint4.unwrap(a), euint4.unwrap(b))); + } + // If 'control''s value is 'true', the result has the same value as 'a'. // If 'control''s value is 'false', the result has the same value as 'b'. function cmux(ebool control, euint8 a, euint8 b) internal pure returns (euint8) { @@ -3462,6 +5071,41 @@ library TFHE { return euint64.wrap(Impl.cmux(ebool.unwrap(control), euint64.unwrap(a), euint64.unwrap(b))); } + // Cast an encrypted integer from euint8 to euint4. + function asEuint4(euint8 value) internal pure returns (euint4) { + return euint4.wrap(Impl.cast(euint8.unwrap(value), Common.euint4_t)); + } + + // Cast an encrypted integer from euint16 to euint4. + function asEuint4(euint16 value) internal pure returns (euint4) { + return euint4.wrap(Impl.cast(euint16.unwrap(value), Common.euint4_t)); + } + + // Cast an encrypted integer from euint32 to euint4. + function asEuint4(euint32 value) internal pure returns (euint4) { + return euint4.wrap(Impl.cast(euint32.unwrap(value), Common.euint4_t)); + } + + // Cast an encrypted integer from euint64 to euint4. + function asEuint4(euint64 value) internal pure returns (euint4) { + return euint4.wrap(Impl.cast(euint64.unwrap(value), Common.euint4_t)); + } + + // Cast an encrypted integer from euint4 to ebool. + function asEbool(euint4 value) internal pure returns (ebool) { + return ne(value, 0); + } + + // Converts an 'ebool' to an 'euint4'. + function asEuint4(ebool b) internal pure returns (euint4) { + return euint4.wrap(Impl.cast(ebool.unwrap(b), Common.euint4_t)); + } + + // Cast an encrypted integer from euint4 to euint8. + function asEuint8(euint4 value) internal pure returns (euint8) { + return euint8.wrap(Impl.cast(euint4.unwrap(value), Common.euint8_t)); + } + // Cast an encrypted integer from euint16 to euint8. function asEuint8(euint16 value) internal pure returns (euint8) { return euint8.wrap(Impl.cast(euint16.unwrap(value), Common.euint8_t)); @@ -3482,48 +5126,52 @@ library TFHE { return ne(value, 0); } - // Convert a serialized 'ciphertext' to an encrypted boolean. + // Convert a serialized 'ciphertext' to an encrypted euint8 integer. function asEbool(bytes memory ciphertext) internal pure returns (ebool) { - return asEbool(asEuint8(ciphertext)); + return ebool.wrap(Impl.verify(ciphertext, Common.ebool_t)); + } + + // Convert a plaintext value to an encrypted euint8 integer. + function asEbool(uint256 value) internal pure returns (ebool) { + return ebool.wrap(Impl.trivialEncrypt(value, Common.ebool_t)); } // Convert a plaintext boolean to an encrypted boolean. function asEbool(bool value) internal pure returns (ebool) { if (value) { - return asEbool(asEuint8(1)); + return asEbool(1); } else { - return asEbool(asEuint8(0)); + return asEbool(0); } } // Converts an 'ebool' to an 'euint8'. - function asEuint8(ebool b) internal pure returns (euint8) { - return euint8.wrap(ebool.unwrap(b)); + function asEuint8(ebool value) internal pure returns (euint8) { + return euint8.wrap(Impl.cast(ebool.unwrap(value), Common.euint8_t)); } // Evaluate and(a, b) and return the result. function and(ebool a, ebool b) internal pure returns (ebool) { - return asEbool(and(asEuint8(a), asEuint8(b))); + return ebool.wrap(Impl.and(ebool.unwrap(a), ebool.unwrap(b))); } // Evaluate or(a, b) and return the result. function or(ebool a, ebool b) internal pure returns (ebool) { - return asEbool(or(asEuint8(a), asEuint8(b))); + return ebool.wrap(Impl.or(ebool.unwrap(a), ebool.unwrap(b))); } // Evaluate xor(a, b) and return the result. function xor(ebool a, ebool b) internal pure returns (ebool) { - return asEbool(xor(asEuint8(a), asEuint8(b))); + return ebool.wrap(Impl.xor(ebool.unwrap(a), ebool.unwrap(b))); } function not(ebool a) internal pure returns (ebool) { - return asEbool(and(not(asEuint8(a)), asEuint8(1))); + return ebool.wrap(Impl.not(ebool.unwrap(a))); } - // If 'control''s value is 'true', the result has the same value as 'a'. - // If 'control''s value is 'false', the result has the same value as 'b'. - function cmux(ebool cond, ebool a, ebool b) internal pure returns (ebool) { - return asEbool(cmux(cond, asEuint8(a), asEuint8(b))); + // Cast an encrypted integer from euint4 to euint16. + function asEuint16(euint4 value) internal pure returns (euint16) { + return euint16.wrap(Impl.cast(euint4.unwrap(value), Common.euint16_t)); } // Cast an encrypted integer from euint8 to euint16. @@ -3551,6 +5199,11 @@ library TFHE { return euint16.wrap(Impl.cast(ebool.unwrap(b), Common.euint16_t)); } + // Cast an encrypted integer from euint4 to euint32. + function asEuint32(euint4 value) internal pure returns (euint32) { + return euint32.wrap(Impl.cast(euint4.unwrap(value), Common.euint32_t)); + } + // Cast an encrypted integer from euint8 to euint32. function asEuint32(euint8 value) internal pure returns (euint32) { return euint32.wrap(Impl.cast(euint8.unwrap(value), Common.euint32_t)); @@ -3576,6 +5229,11 @@ library TFHE { return euint32.wrap(Impl.cast(ebool.unwrap(b), Common.euint32_t)); } + // Cast an encrypted integer from euint4 to euint64. + function asEuint64(euint4 value) internal pure returns (euint64) { + return euint64.wrap(Impl.cast(euint4.unwrap(value), Common.euint64_t)); + } + // Cast an encrypted integer from euint8 to euint64. function asEuint64(euint8 value) internal pure returns (euint64) { return euint64.wrap(Impl.cast(euint8.unwrap(value), Common.euint64_t)); @@ -3601,6 +5259,14 @@ library TFHE { return euint64.wrap(Impl.cast(ebool.unwrap(b), Common.euint64_t)); } + function neg(euint4 value) internal pure returns (euint4) { + return euint4.wrap(Impl.neg(euint4.unwrap(value))); + } + + function not(euint4 value) internal pure returns (euint4) { + return euint4.wrap(Impl.not(euint4.unwrap(value))); + } + function neg(euint8 value) internal pure returns (euint8) { return euint8.wrap(Impl.neg(euint8.unwrap(value))); } @@ -3633,6 +5299,42 @@ library TFHE { return euint64.wrap(Impl.not(euint64.unwrap(value))); } + // Convert a serialized 'ciphertext' to an encrypted euint4 integer. + function asEuint4(bytes memory ciphertext) internal pure returns (euint4) { + return euint4.wrap(Impl.verify(ciphertext, Common.euint4_t)); + } + + // Convert a plaintext value to an encrypted euint4 integer. + function asEuint4(uint256 value) internal pure returns (euint4) { + return euint4.wrap(Impl.trivialEncrypt(value, Common.euint4_t)); + } + + // Reencrypt the given 'value' under the given 'publicKey'. + // Return a serialized euint4 ciphertext. + function reencrypt(euint4 value, bytes32 publicKey) internal view returns (bytes memory reencrypted) { + return Impl.reencrypt(euint4.unwrap(value), publicKey); + } + + // Reencrypt the given 'value' under the given 'publicKey'. + // If 'value' is not initialized, the returned value will contain the 'defaultValue' constant. + // Return a serialized euint4 ciphertext. + function reencrypt( + euint4 value, + bytes32 publicKey, + uint8 defaultValue + ) internal view returns (bytes memory reencrypted) { + if (euint4.unwrap(value) != 0) { + return Impl.reencrypt(euint4.unwrap(value), publicKey); + } else { + return Impl.reencrypt(euint4.unwrap(asEuint4(defaultValue)), publicKey); + } + } + + // Decrypts the encrypted 'value'. + function decrypt(euint4 value) internal view returns (uint8) { + return uint8(Impl.decrypt(euint4.unwrap(value))); + } + // Convert a serialized 'ciphertext' to an encrypted euint8 integer. function asEuint8(bytes memory ciphertext) internal pure returns (euint8) { return euint8.wrap(Impl.verify(ciphertext, Common.euint8_t)); @@ -3798,7 +5500,7 @@ library TFHE { // because there is a single call to the decryption oracle per transaction, irrespective // of how many optimistic requires were used. function optReq(ebool b) internal view { - Impl.optReq(ebool.unwrap(b)); + Impl.optReq(euint8.unwrap(asEuint8(b))); } // Decrypts the encrypted 'value'. @@ -3872,6 +5574,54 @@ library TFHE { } } +using {tfheBinaryOperatorAdd4 as +} for euint4 global; + +function tfheBinaryOperatorAdd4(euint4 lhs, euint4 rhs) pure returns (euint4) { + return TFHE.add(lhs, rhs); +} + +using {tfheBinaryOperatorSub4 as -} for euint4 global; + +function tfheBinaryOperatorSub4(euint4 lhs, euint4 rhs) pure returns (euint4) { + return TFHE.sub(lhs, rhs); +} + +using {tfheBinaryOperatorMul4 as *} for euint4 global; + +function tfheBinaryOperatorMul4(euint4 lhs, euint4 rhs) pure returns (euint4) { + return TFHE.mul(lhs, rhs); +} + +using {tfheBinaryOperatorAnd4 as &} for euint4 global; + +function tfheBinaryOperatorAnd4(euint4 lhs, euint4 rhs) pure returns (euint4) { + return TFHE.and(lhs, rhs); +} + +using {tfheBinaryOperatorOr4 as |} for euint4 global; + +function tfheBinaryOperatorOr4(euint4 lhs, euint4 rhs) pure returns (euint4) { + return TFHE.or(lhs, rhs); +} + +using {tfheBinaryOperatorXor4 as ^} for euint4 global; + +function tfheBinaryOperatorXor4(euint4 lhs, euint4 rhs) pure returns (euint4) { + return TFHE.xor(lhs, rhs); +} + +using {tfheUnaryOperatorNeg4 as -} for euint4 global; + +function tfheUnaryOperatorNeg4(euint4 input) pure returns (euint4) { + return TFHE.neg(input); +} + +using {tfheUnaryOperatorNot4 as ~} for euint4 global; + +function tfheUnaryOperatorNot4(euint4 input) pure returns (euint4) { + return TFHE.not(input); +} + using {tfheBinaryOperatorAdd8 as +} for euint8 global; function tfheBinaryOperatorAdd8(euint8 lhs, euint8 rhs) pure returns (euint8) { diff --git a/package-lock.json b/package-lock.json index 33ec15a5..9abfd2ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", "ethers": "^6.8.0", - "fhevmjs": "^0.4.0-4", + "fhevmjs": "^0.4.0-5", "fs-extra": "^10.1.0", "ganache": "^7.9.0", "hardhat": "^2.19.4", @@ -50,7 +50,7 @@ "rimraf": "^4.1.2", "solidity-coverage": "^0.8.1", "ts-generator": "^0.1.1", - "ts-node": "^10.9.1", + "ts-node": "^10.9.2", "typechain": "^8.2.0", "typescript": "^5.1.6" } @@ -4686,9 +4686,9 @@ } }, "node_modules/fhevmjs": { - "version": "0.4.0-4", - "resolved": "https://registry.npmjs.org/fhevmjs/-/fhevmjs-0.4.0-4.tgz", - "integrity": "sha512-aCEtp3cNGIc8wuAaxnXaztfP6VLzIHPTFKgCT3izAaWLoo50P6xZ1okbKdeX3vT+lmOYdszwY03ICooKZO68xg==", + "version": "0.4.0-5", + "resolved": "https://registry.npmjs.org/fhevmjs/-/fhevmjs-0.4.0-5.tgz", + "integrity": "sha512-iR4lV9ou+fz4f2cQfCLA5T5lD5COadyzQLnKb7wO4ZO1cRj37g+ZnUXXQRk3OyXEAihSlkzGXDPaoZgqC5jv8A==", "dev": true, "dependencies": { "bigint-buffer": "^1.1.5", @@ -5119,7 +5119,6 @@ "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz", "integrity": "sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==", "dev": true, - "hasInstallScript": true, "optional": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -5477,7 +5476,6 @@ "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.7.tgz", "integrity": "sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==", "dev": true, - "hasInstallScript": true, "optional": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -8801,9 +8799,9 @@ "dev": true }, "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "devOptional": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -12784,9 +12782,9 @@ } }, "fhevmjs": { - "version": "0.4.0-4", - "resolved": "https://registry.npmjs.org/fhevmjs/-/fhevmjs-0.4.0-4.tgz", - "integrity": "sha512-aCEtp3cNGIc8wuAaxnXaztfP6VLzIHPTFKgCT3izAaWLoo50P6xZ1okbKdeX3vT+lmOYdszwY03ICooKZO68xg==", + "version": "0.4.0-5", + "resolved": "https://registry.npmjs.org/fhevmjs/-/fhevmjs-0.4.0-5.tgz", + "integrity": "sha512-iR4lV9ou+fz4f2cQfCLA5T5lD5COadyzQLnKb7wO4ZO1cRj37g+ZnUXXQRk3OyXEAihSlkzGXDPaoZgqC5jv8A==", "dev": true, "requires": { "bigint-buffer": "^1.1.5", @@ -15862,9 +15860,9 @@ } }, "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "devOptional": true, "requires": { "@cspotcode/source-map-support": "^0.8.0", diff --git a/package.json b/package.json index e1713db2..50da44c8 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "coverage:mock": "HARDHAT_NETWORK=hardhat npx hardhat coverage-mock --network hardhat", "typechain": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat typechain", "codegen": "npx ts-node codegen/main.ts && npm run prettier", + "codegen:overloads": "npx ts-node codegen/generateOverloads.ts", "task:getEthereumAddress": "hardhat task:getEthereumAddress", "task:deployIdentity": "hardhat task:deployIdentity", "fhevm:start": "docker run -i -p 8545:8545 --rm --name fhevm ghcr.io/zama-ai/ethermint-dev-node:v0.3.0-0", @@ -68,7 +69,7 @@ "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", "ethers": "^6.8.0", - "fhevmjs": "^0.4.0-4", + "fhevmjs": "^0.4.0-5", "fs-extra": "^10.1.0", "ganache": "^7.9.0", "hardhat": "^2.19.4", @@ -81,7 +82,7 @@ "rimraf": "^4.1.2", "solidity-coverage": "^0.8.1", "ts-generator": "^0.1.1", - "ts-node": "^10.9.1", + "ts-node": "^10.9.2", "typechain": "^8.2.0", "typescript": "^5.1.6" }, diff --git a/test/governor/GovernorZama.ts b/test/governor/GovernorZama.ts index c8abefb1..127131fb 100644 --- a/test/governor/GovernorZama.ts +++ b/test/governor/GovernorZama.ts @@ -88,14 +88,14 @@ describe('GovernorZama', function () { } await waitForBlock(proposals.startBlock + 1n); // Cast some votes - const encryptedSupportBob = this.instances.bob.encrypt8(1); + const encryptedSupportBob = this.instances.bob.encryptBool(true); const txVoteBob = await createTransaction( this.governor.connect(this.signers.bob)['castVote(uint256,bytes)'], proposalId, encryptedSupportBob, ); - const encryptedSupportCarol = this.instances.carol.encrypt8(1); + const encryptedSupportCarol = this.instances.carol.encryptBool(true); const txVoteCarol = await createTransaction( this.governor.connect(this.signers.carol)['castVote(uint256,bytes)'], proposalId, @@ -135,14 +135,14 @@ describe('GovernorZama', function () { await waitForBlock(proposals.startBlock + 1n); // Cast some votes - const encryptedSupportBob = this.instances.bob.encrypt8(0); + const encryptedSupportBob = this.instances.bob.encryptBool(false); const txVoteBob = await createTransaction( this.governor.connect(this.signers.bob)['castVote(uint256,bytes)'], proposalId, encryptedSupportBob, ); - const encryptedSupportCarol = this.instances.carol.encrypt8(0); + const encryptedSupportCarol = this.instances.carol.encryptBool(true); const txVoteCarol = await createTransaction( this.governor.connect(this.signers.carol)['castVote(uint256,bytes)'], proposalId, diff --git a/test/tfheOperations/manual.ts b/test/tfheOperations/manual.ts index 9a9dac70..17dd7b89 100644 --- a/test/tfheOperations/manual.ts +++ b/test/tfheOperations/manual.ts @@ -32,7 +32,7 @@ describe('TFHE manual operations', function () { it('Cmux works returning if false', async function () { const res = await this.contract.test_cmux( - this.instances.alice.encrypt8(0), + this.instances.alice.encryptBool(false), this.instances.alice.encrypt32(3), this.instances.alice.encrypt32(4), ); @@ -41,13 +41,33 @@ describe('TFHE manual operations', function () { it('Cmux works returning if true', async function () { const res = await this.contract.test_cmux( - this.instances.alice.encrypt8(1), + this.instances.alice.encryptBool(true), this.instances.alice.encrypt32(3), this.instances.alice.encrypt32(4), ); expect(res).to.equal(3); }); + it('ebool to euint4 casting works with true', async function () { + const res = await this.contract.test_ebool_to_euint4_cast(true); + expect(res).to.equal(1); + }); + + it('ebool to euint4 casting works with false', async function () { + const res = await this.contract.test_ebool_to_euint4_cast(false); + expect(res).to.equal(0); + }); + + it('ebool to euint8 casting works with true', async function () { + const res = await this.contract.test_ebool_to_euint8_cast(true); + expect(res).to.equal(1); + }); + + it('ebool to euint8 casting works with false', async function () { + const res = await this.contract.test_ebool_to_euint8_cast(false); + expect(res).to.equal(0); + }); + it('ebool to euint16 casting works with true', async function () { const res = await this.contract.test_ebool_to_euint16_cast(true); expect(res).to.equal(1); diff --git a/test/tfheOperations/tfheOperations.ts b/test/tfheOperations/tfheOperations.ts index 0c73a0e4..581204c6 100644 --- a/test/tfheOperations/tfheOperations.ts +++ b/test/tfheOperations/tfheOperations.ts @@ -5,6 +5,7 @@ import type { TFHETestSuite1 } from '../../types/contracts/tests/TFHETestSuite1' import type { TFHETestSuite2 } from '../../types/contracts/tests/TFHETestSuite2'; import type { TFHETestSuite3 } from '../../types/contracts/tests/TFHETestSuite3'; import type { TFHETestSuite4 } from '../../types/contracts/tests/TFHETestSuite4'; +import type { TFHETestSuite5 } from '../../types/contracts/tests/TFHETestSuite5'; import { createInstances } from '../instance'; import { getSigners, initSigners } from '../signers'; @@ -52,6 +53,17 @@ async function deployTfheTestFixture4(): Promise { return contract; } +async function deployTfheTestFixture5(): Promise { + const signers = await getSigners(); + const admin = signers.alice; + + const contractFactory = await ethers.getContractFactory('TFHETestSuite5'); + const contract = await contractFactory.connect(admin).deploy(); + await contract.waitForDeployment(); + + return contract; +} + describe('TFHE operations', function () { before(async function () { await initSigners(1); @@ -80,5465 +92,13869 @@ describe('TFHE operations', function () { this.contract4 = contract4; const instances4 = await createInstances(this.contract4Address, ethers, this.signers); this.instances4 = instances4; + + const contract5 = await deployTfheTestFixture5(); + this.contract5Address = await contract5.getAddress(); + this.contract5 = contract5; + const instances5 = await createInstances(this.contract5Address, ethers, this.signers); + this.instances5 = instances5; }); - it('test operator "add" overload (euint8, euint8) => euint8 test 1 (3, 4)', async function () { - const res = await this.contract1.add_euint8_euint8( - this.instances1.alice.encrypt8(3), - this.instances1.alice.encrypt8(4), + it('test operator "add" overload (euint4, euint4) => euint4 test 1 (11, 1)', async function () { + const res = await this.contract1.add_euint4_euint4( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt4(1), ); - expect(res).to.equal(7); + expect(res).to.equal(12n); }); - it('test operator "sub" overload (euint8, euint8) => euint8 test 1 (4, 3)', async function () { - const res = await this.contract1.sub_euint8_euint8( - this.instances1.alice.encrypt8(4), - this.instances1.alice.encrypt8(3), + it('test operator "add" overload (euint4, euint4) => euint4 test 2 (4, 8)', async function () { + const res = await this.contract1.add_euint4_euint4( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(1); + expect(res).to.equal(12n); }); - it('test operator "mul" overload (euint8, euint8) => euint8 test 1 (3, 4)', async function () { - const res = await this.contract1.mul_euint8_euint8( - this.instances1.alice.encrypt8(3), - this.instances1.alice.encrypt8(4), + it('test operator "add" overload (euint4, euint4) => euint4 test 3 (5, 5)', async function () { + const res = await this.contract1.add_euint4_euint4( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt4(5), ); - expect(res).to.equal(12); + expect(res).to.equal(10n); }); - it('test operator "and" overload (euint8, euint8) => euint8 test 1 (255, 15)', async function () { - const res = await this.contract1.and_euint8_euint8( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt8(15), + it('test operator "add" overload (euint4, euint4) => euint4 test 4 (8, 4)', async function () { + const res = await this.contract1.add_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(4), ); - expect(res).to.equal(15); + expect(res).to.equal(12n); }); - it('test operator "or" overload (euint8, euint8) => euint8 test 1 (112, 15)', async function () { - const res = await this.contract1.or_euint8_euint8( - this.instances1.alice.encrypt8(112), - this.instances1.alice.encrypt8(15), + it('test operator "sub" overload (euint4, euint4) => euint4 test 1 (8, 8)', async function () { + const res = await this.contract1.sub_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(127); + expect(res).to.equal(0n); }); - it('test operator "xor" overload (euint8, euint8) => euint8 test 1 (119, 119)', async function () { - const res = await this.contract1.xor_euint8_euint8( - this.instances1.alice.encrypt8(119), - this.instances1.alice.encrypt8(119), + it('test operator "sub" overload (euint4, euint4) => euint4 test 2 (8, 4)', async function () { + const res = await this.contract1.sub_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(4), ); - expect(res).to.equal(0); + expect(res).to.equal(4n); }); - it('test operator "xor" overload (euint8, euint8) => euint8 test 2 (12, 34)', async function () { - const res = await this.contract1.xor_euint8_euint8( - this.instances1.alice.encrypt8(12), - this.instances1.alice.encrypt8(34), + it('test operator "mul" overload (euint4, euint4) => euint4 test 1 (3, 3)', async function () { + const res = await this.contract1.mul_euint4_euint4( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt4(3), ); - expect(res).to.equal(46); + expect(res).to.equal(9n); }); - it('test operator "eq" overload (euint8, euint8) => ebool test 1 (12, 49)', async function () { - const res = await this.contract1.eq_euint8_euint8( - this.instances1.alice.encrypt8(12), - this.instances1.alice.encrypt8(49), + it('test operator "mul" overload (euint4, euint4) => euint4 test 2 (3, 4)', async function () { + const res = await this.contract1.mul_euint4_euint4( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt4(4), ); - expect(res).to.equal(false); + expect(res).to.equal(12n); }); - it('test operator "eq" overload (euint8, euint8) => ebool test 2 (7, 7)', async function () { - const res = await this.contract1.eq_euint8_euint8( - this.instances1.alice.encrypt8(7), - this.instances1.alice.encrypt8(7), + it('test operator "mul" overload (euint4, euint4) => euint4 test 3 (3, 3)', async function () { + const res = await this.contract1.mul_euint4_euint4( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt4(3), ); - expect(res).to.equal(true); + expect(res).to.equal(9n); }); - it('test operator "ne" overload (euint8, euint8) => ebool test 1 (1, 2)', async function () { - const res = await this.contract1.ne_euint8_euint8( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt8(2), + it('test operator "mul" overload (euint4, euint4) => euint4 test 4 (4, 3)', async function () { + const res = await this.contract1.mul_euint4_euint4( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt4(3), ); - expect(res).to.equal(true); + expect(res).to.equal(12n); }); - it('test operator "ne" overload (euint8, euint8) => ebool test 2 (2, 2)', async function () { - const res = await this.contract1.ne_euint8_euint8( - this.instances1.alice.encrypt8(2), - this.instances1.alice.encrypt8(2), + it('test operator "and" overload (euint4, euint4) => euint4 test 1 (5, 2)', async function () { + const res = await this.contract1.and_euint4_euint4( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt4(2), ); - expect(res).to.equal(false); + expect(res).to.equal(0n); }); - it('test operator "ge" overload (euint8, euint8) => ebool test 1 (10, 10)', async function () { - const res = await this.contract1.ge_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(10), + it('test operator "and" overload (euint4, euint4) => euint4 test 2 (4, 8)', async function () { + const res = await this.contract1.and_euint4_euint4( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(true); + expect(res).to.equal(0n); }); - it('test operator "ge" overload (euint8, euint8) => ebool test 2 (10, 9)', async function () { - const res = await this.contract1.ge_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(9), + it('test operator "and" overload (euint4, euint4) => euint4 test 3 (8, 8)', async function () { + const res = await this.contract1.and_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(true); + expect(res).to.equal(8n); }); - it('test operator "ge" overload (euint8, euint8) => ebool test 3 (10, 11)', async function () { - const res = await this.contract1.ge_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(11), + it('test operator "and" overload (euint4, euint4) => euint4 test 4 (8, 4)', async function () { + const res = await this.contract1.and_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(4), ); - expect(res).to.equal(false); + expect(res).to.equal(0n); }); - it('test operator "gt" overload (euint8, euint8) => ebool test 1 (10, 10)', async function () { - const res = await this.contract1.gt_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(10), + it('test operator "or" overload (euint4, euint4) => euint4 test 1 (6, 5)', async function () { + const res = await this.contract1.or_euint4_euint4( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt4(5), ); - expect(res).to.equal(false); + expect(res).to.equal(7n); }); - it('test operator "gt" overload (euint8, euint8) => ebool test 2 (10, 9)', async function () { - const res = await this.contract1.gt_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(9), + it('test operator "or" overload (euint4, euint4) => euint4 test 2 (4, 8)', async function () { + const res = await this.contract1.or_euint4_euint4( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(true); + expect(res).to.equal(12n); }); - it('test operator "gt" overload (euint8, euint8) => ebool test 3 (10, 11)', async function () { - const res = await this.contract1.gt_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(11), + it('test operator "or" overload (euint4, euint4) => euint4 test 3 (8, 8)', async function () { + const res = await this.contract1.or_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(false); + expect(res).to.equal(8n); }); - it('test operator "le" overload (euint8, euint8) => ebool test 1 (10, 10)', async function () { - const res = await this.contract1.le_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(10), + it('test operator "or" overload (euint4, euint4) => euint4 test 4 (8, 4)', async function () { + const res = await this.contract1.or_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(4), ); - expect(res).to.equal(true); + expect(res).to.equal(12n); }); - it('test operator "le" overload (euint8, euint8) => ebool test 2 (10, 9)', async function () { - const res = await this.contract1.le_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(9), + it('test operator "xor" overload (euint4, euint4) => euint4 test 1 (2, 10)', async function () { + const res = await this.contract1.xor_euint4_euint4( + this.instances1.alice.encrypt4(2), + this.instances1.alice.encrypt4(10), ); - expect(res).to.equal(false); + expect(res).to.equal(8n); }); - it('test operator "le" overload (euint8, euint8) => ebool test 3 (10, 11)', async function () { - const res = await this.contract1.le_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(11), + it('test operator "xor" overload (euint4, euint4) => euint4 test 2 (4, 8)', async function () { + const res = await this.contract1.xor_euint4_euint4( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(true); + expect(res).to.equal(12n); }); - it('test operator "lt" overload (euint8, euint8) => ebool test 1 (10, 10)', async function () { - const res = await this.contract1.lt_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(10), + it('test operator "xor" overload (euint4, euint4) => euint4 test 3 (8, 8)', async function () { + const res = await this.contract1.xor_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(8), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint4, euint4) => euint4 test 4 (8, 4)', async function () { + const res = await this.contract1.xor_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "eq" overload (euint4, euint4) => ebool test 1 (8, 2)', async function () { + const res = await this.contract1.eq_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(2), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint8, euint8) => ebool test 2 (10, 9)', async function () { - const res = await this.contract1.lt_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(9), + it('test operator "eq" overload (euint4, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.eq_euint4_euint4( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt4(8), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint8, euint8) => ebool test 3 (10, 11)', async function () { - const res = await this.contract1.lt_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(11), + it('test operator "eq" overload (euint4, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.eq_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(8), ); expect(res).to.equal(true); }); - it('test operator "min" overload (euint8, euint8) => euint8 test 1 (10, 10)', async function () { - const res = await this.contract1.min_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(10), + it('test operator "eq" overload (euint4, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.eq_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(4), ); - expect(res).to.equal(10); + expect(res).to.equal(false); }); - it('test operator "min" overload (euint8, euint8) => euint8 test 2 (12, 10)', async function () { - const res = await this.contract1.min_euint8_euint8( - this.instances1.alice.encrypt8(12), - this.instances1.alice.encrypt8(10), + it('test operator "ne" overload (euint4, euint4) => ebool test 1 (11, 12)', async function () { + const res = await this.contract1.ne_euint4_euint4( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt4(12), ); - expect(res).to.equal(10); + expect(res).to.equal(true); }); - it('test operator "min" overload (euint8, euint8) => euint8 test 3 (9, 12)', async function () { - const res = await this.contract1.min_euint8_euint8( - this.instances1.alice.encrypt8(9), - this.instances1.alice.encrypt8(12), + it('test operator "ne" overload (euint4, euint4) => ebool test 2 (7, 11)', async function () { + const res = await this.contract1.ne_euint4_euint4( + this.instances1.alice.encrypt4(7), + this.instances1.alice.encrypt4(11), ); - expect(res).to.equal(9); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint8, euint8) => euint8 test 1 (10, 10)', async function () { - const res = await this.contract1.max_euint8_euint8( - this.instances1.alice.encrypt8(10), - this.instances1.alice.encrypt8(10), + it('test operator "ne" overload (euint4, euint4) => ebool test 3 (11, 11)', async function () { + const res = await this.contract1.ne_euint4_euint4( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt4(11), ); - expect(res).to.equal(10); + expect(res).to.equal(false); }); - it('test operator "max" overload (euint8, euint8) => euint8 test 2 (12, 10)', async function () { - const res = await this.contract1.max_euint8_euint8( - this.instances1.alice.encrypt8(12), - this.instances1.alice.encrypt8(10), + it('test operator "ne" overload (euint4, euint4) => ebool test 4 (11, 7)', async function () { + const res = await this.contract1.ne_euint4_euint4( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt4(7), ); - expect(res).to.equal(12); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint8, euint8) => euint8 test 3 (9, 12)', async function () { - const res = await this.contract1.max_euint8_euint8( - this.instances1.alice.encrypt8(9), - this.instances1.alice.encrypt8(12), + it('test operator "ge" overload (euint4, euint4) => ebool test 1 (3, 4)', async function () { + const res = await this.contract1.ge_euint4_euint4( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt4(4), ); - expect(res).to.equal(12); + expect(res).to.equal(false); }); - it('test operator "add" overload (euint8, euint16) => euint16 test 1 (3, 65280)', async function () { - const res = await this.contract1.add_euint8_euint16( - this.instances1.alice.encrypt8(3), - this.instances1.alice.encrypt16(65280), + it('test operator "ge" overload (euint4, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.ge_euint4_euint4( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(65283); + expect(res).to.equal(false); }); - it('test operator "sub" overload (euint8, euint16) => euint16 test 1 (3, 4096)', async function () { - const res = await this.contract1.sub_euint8_euint16( - this.instances1.alice.encrypt8(3), - this.instances1.alice.encrypt16(4096), + it('test operator "ge" overload (euint4, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.ge_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(61443); + expect(res).to.equal(true); }); - it('test operator "mul" overload (euint8, euint16) => euint16 test 1 (3, 4096)', async function () { - const res = await this.contract1.mul_euint8_euint16( - this.instances1.alice.encrypt8(3), - this.instances1.alice.encrypt16(4096), + it('test operator "ge" overload (euint4, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.ge_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(4), ); - expect(res).to.equal(12288); + expect(res).to.equal(true); }); - it('test operator "and" overload (euint8, euint16) => euint16 test 1 (3, 4096)', async function () { - const res = await this.contract1.and_euint8_euint16( - this.instances1.alice.encrypt8(3), - this.instances1.alice.encrypt16(4096), + it('test operator "gt" overload (euint4, euint4) => ebool test 1 (9, 12)', async function () { + const res = await this.contract1.gt_euint4_euint4( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt4(12), ); - expect(res).to.equal(0); + expect(res).to.equal(false); }); - it('test operator "and" overload (euint8, euint16) => euint16 test 2 (3, 4097)', async function () { - const res = await this.contract1.and_euint8_euint16( - this.instances1.alice.encrypt8(3), - this.instances1.alice.encrypt16(4097), + it('test operator "gt" overload (euint4, euint4) => ebool test 2 (5, 9)', async function () { + const res = await this.contract1.gt_euint4_euint4( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt4(9), ); - expect(res).to.equal(1); + expect(res).to.equal(false); }); - it('test operator "or" overload (euint8, euint16) => euint16 test 1 (3, 4096)', async function () { - const res = await this.contract1.or_euint8_euint16( - this.instances1.alice.encrypt8(3), - this.instances1.alice.encrypt16(4096), + it('test operator "gt" overload (euint4, euint4) => ebool test 3 (9, 9)', async function () { + const res = await this.contract1.gt_euint4_euint4( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt4(9), ); - expect(res).to.equal(4099); + expect(res).to.equal(false); }); - it('test operator "or" overload (euint8, euint16) => euint16 test 2 (3, 4097)', async function () { - const res = await this.contract1.or_euint8_euint16( - this.instances1.alice.encrypt8(3), - this.instances1.alice.encrypt16(4097), + it('test operator "gt" overload (euint4, euint4) => ebool test 4 (9, 5)', async function () { + const res = await this.contract1.gt_euint4_euint4( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt4(5), ); - expect(res).to.equal(4099); + expect(res).to.equal(true); }); - it('test operator "xor" overload (euint8, euint16) => euint16 test 1 (255, 65535)', async function () { - const res = await this.contract1.xor_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(65535), + it('test operator "le" overload (euint4, euint4) => ebool test 1 (8, 6)', async function () { + const res = await this.contract1.le_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(6), ); - expect(res).to.equal(65280); + expect(res).to.equal(false); }); - it('test operator "xor" overload (euint8, euint16) => euint16 test 2 (255, 65280)', async function () { - const res = await this.contract1.xor_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(65280), + it('test operator "le" overload (euint4, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.le_euint4_euint4( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(65535); + expect(res).to.equal(true); }); - it('test operator "eq" overload (euint8, euint16) => ebool test 1 (255, 255)', async function () { - const res = await this.contract1.eq_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(255), + it('test operator "le" overload (euint4, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.le_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(8), ); expect(res).to.equal(true); }); - it('test operator "eq" overload (euint8, euint16) => ebool test 2 (255, 511)', async function () { - const res = await this.contract1.eq_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(511), + it('test operator "le" overload (euint4, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.le_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(4), ); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint8, euint16) => ebool test 1 (255, 255)', async function () { - const res = await this.contract1.ne_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(255), + it('test operator "lt" overload (euint4, euint4) => ebool test 1 (10, 9)', async function () { + const res = await this.contract1.lt_euint4_euint4( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt4(9), ); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint8, euint16) => ebool test 2 (255, 511)', async function () { - const res = await this.contract1.ne_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(511), + it('test operator "lt" overload (euint4, euint4) => ebool test 2 (5, 9)', async function () { + const res = await this.contract1.lt_euint4_euint4( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt4(9), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint8, euint16) => ebool test 1 (255, 255)', async function () { - const res = await this.contract1.ge_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(255), + it('test operator "lt" overload (euint4, euint4) => ebool test 3 (9, 9)', async function () { + const res = await this.contract1.lt_euint4_euint4( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt4(9), ); - expect(res).to.equal(true); + expect(res).to.equal(false); }); - it('test operator "ge" overload (euint8, euint16) => ebool test 2 (255, 511)', async function () { - const res = await this.contract1.ge_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(511), + it('test operator "lt" overload (euint4, euint4) => ebool test 4 (9, 5)', async function () { + const res = await this.contract1.lt_euint4_euint4( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt4(5), ); expect(res).to.equal(false); }); - it('test operator "ge" overload (euint8, euint16) => ebool test 3 (255, 127)', async function () { - const res = await this.contract1.ge_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(127), + it('test operator "min" overload (euint4, euint4) => euint4 test 1 (6, 5)', async function () { + const res = await this.contract1.min_euint4_euint4( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt4(5), ); - expect(res).to.equal(true); + expect(res).to.equal(5n); }); - it('test operator "gt" overload (euint8, euint16) => ebool test 1 (255, 255)', async function () { - const res = await this.contract1.gt_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(255), + it('test operator "min" overload (euint4, euint4) => euint4 test 2 (4, 8)', async function () { + const res = await this.contract1.min_euint4_euint4( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(false); + expect(res).to.equal(4n); }); - it('test operator "gt" overload (euint8, euint16) => ebool test 2 (255, 511)', async function () { - const res = await this.contract1.gt_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(511), + it('test operator "min" overload (euint4, euint4) => euint4 test 3 (8, 8)', async function () { + const res = await this.contract1.min_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(false); + expect(res).to.equal(8n); }); - it('test operator "gt" overload (euint8, euint16) => ebool test 3 (255, 127)', async function () { - const res = await this.contract1.gt_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(127), + it('test operator "min" overload (euint4, euint4) => euint4 test 4 (8, 4)', async function () { + const res = await this.contract1.min_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(4), ); - expect(res).to.equal(true); + expect(res).to.equal(4n); }); - it('test operator "le" overload (euint8, euint16) => ebool test 1 (255, 255)', async function () { - const res = await this.contract1.le_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(255), + it('test operator "max" overload (euint4, euint4) => euint4 test 1 (8, 3)', async function () { + const res = await this.contract1.max_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(3), ); - expect(res).to.equal(true); + expect(res).to.equal(8n); }); - it('test operator "le" overload (euint8, euint16) => ebool test 2 (255, 511)', async function () { - const res = await this.contract1.le_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(511), + it('test operator "max" overload (euint4, euint4) => euint4 test 2 (4, 8)', async function () { + const res = await this.contract1.max_euint4_euint4( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(true); + expect(res).to.equal(8n); }); - it('test operator "le" overload (euint8, euint16) => ebool test 3 (255, 127)', async function () { - const res = await this.contract1.le_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(127), + it('test operator "max" overload (euint4, euint4) => euint4 test 3 (8, 8)', async function () { + const res = await this.contract1.max_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(8), ); - expect(res).to.equal(false); + expect(res).to.equal(8n); }); - it('test operator "lt" overload (euint8, euint16) => ebool test 1 (255, 255)', async function () { - const res = await this.contract1.lt_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(255), + it('test operator "max" overload (euint4, euint4) => euint4 test 4 (8, 4)', async function () { + const res = await this.contract1.max_euint4_euint4( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt4(4), ); - expect(res).to.equal(false); + expect(res).to.equal(8n); }); - it('test operator "lt" overload (euint8, euint16) => ebool test 2 (255, 511)', async function () { - const res = await this.contract1.lt_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(511), + it('test operator "add" overload (euint4, euint8) => euint8 test 1 (2, 12)', async function () { + const res = await this.contract1.add_euint4_euint8( + this.instances1.alice.encrypt4(2), + this.instances1.alice.encrypt8(12), ); - expect(res).to.equal(true); + expect(res).to.equal(14n); }); - it('test operator "lt" overload (euint8, euint16) => ebool test 3 (255, 127)', async function () { - const res = await this.contract1.lt_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(127), + it('test operator "add" overload (euint4, euint8) => euint8 test 2 (4, 8)', async function () { + const res = await this.contract1.add_euint4_euint8( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt8(8), ); - expect(res).to.equal(false); + expect(res).to.equal(12n); }); - it('test operator "min" overload (euint8, euint16) => euint16 test 1 (255, 255)', async function () { - const res = await this.contract1.min_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(255), + it('test operator "add" overload (euint4, euint8) => euint8 test 3 (5, 5)', async function () { + const res = await this.contract1.add_euint4_euint8( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt8(5), ); - expect(res).to.equal(255); + expect(res).to.equal(10n); }); - it('test operator "min" overload (euint8, euint16) => euint16 test 2 (255, 511)', async function () { - const res = await this.contract1.min_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(511), + it('test operator "add" overload (euint4, euint8) => euint8 test 4 (8, 4)', async function () { + const res = await this.contract1.add_euint4_euint8( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt8(4), ); - expect(res).to.equal(255); + expect(res).to.equal(12n); }); - it('test operator "min" overload (euint8, euint16) => euint16 test 3 (255, 127)', async function () { - const res = await this.contract1.min_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(127), + it('test operator "sub" overload (euint4, euint8) => euint8 test 1 (8, 8)', async function () { + const res = await this.contract1.sub_euint4_euint8( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt8(8), ); - expect(res).to.equal(127); + expect(res).to.equal(0n); }); - it('test operator "max" overload (euint8, euint16) => euint16 test 1 (255, 255)', async function () { - const res = await this.contract1.max_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(255), + it('test operator "sub" overload (euint4, euint8) => euint8 test 2 (8, 4)', async function () { + const res = await this.contract1.sub_euint4_euint8( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt8(4), ); - expect(res).to.equal(255); + expect(res).to.equal(4n); }); - it('test operator "max" overload (euint8, euint16) => euint16 test 2 (255, 511)', async function () { - const res = await this.contract1.max_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(511), + it('test operator "mul" overload (euint4, euint8) => euint8 test 1 (1, 14)', async function () { + const res = await this.contract1.mul_euint4_euint8( + this.instances1.alice.encrypt4(1), + this.instances1.alice.encrypt8(14), ); - expect(res).to.equal(511); + expect(res).to.equal(14n); }); - it('test operator "max" overload (euint8, euint16) => euint16 test 3 (255, 127)', async function () { - const res = await this.contract1.max_euint8_euint16( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt16(127), + it('test operator "mul" overload (euint4, euint8) => euint8 test 2 (3, 5)', async function () { + const res = await this.contract1.mul_euint4_euint8( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt8(5), ); - expect(res).to.equal(255); + expect(res).to.equal(15n); }); - it('test operator "add" overload (euint8, euint32) => euint32 test 1 (255, 4294902015)', async function () { - const res = await this.contract1.add_euint8_euint32( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt32(4294902015), + it('test operator "mul" overload (euint4, euint8) => euint8 test 3 (3, 3)', async function () { + const res = await this.contract1.mul_euint4_euint8( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt8(3), ); - expect(res).to.equal(4294902270); + expect(res).to.equal(9n); }); - it('test operator "sub" overload (euint8, euint32) => euint32 test 1 (255, 4294902015)', async function () { - const res = await this.contract1.sub_euint8_euint32( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt32(4294902015), + it('test operator "mul" overload (euint4, euint8) => euint8 test 4 (5, 3)', async function () { + const res = await this.contract1.mul_euint4_euint8( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt8(3), ); - expect(res).to.equal(65536); + expect(res).to.equal(15n); }); - it('test operator "sub" overload (euint8, euint32) => euint32 test 2 (255, 16)', async function () { - const res = await this.contract1.sub_euint8_euint32( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt32(16), + it('test operator "and" overload (euint4, euint8) => euint8 test 1 (12, 110)', async function () { + const res = await this.contract1.and_euint4_euint8( + this.instances1.alice.encrypt4(12), + this.instances1.alice.encrypt8(110), ); - expect(res).to.equal(239); + expect(res).to.equal(12n); }); - it('test operator "mul" overload (euint8, euint32) => euint32 test 1 (16, 65536)', async function () { - const res = await this.contract1.mul_euint8_euint32( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt32(65536), + it('test operator "and" overload (euint4, euint8) => euint8 test 2 (8, 12)', async function () { + const res = await this.contract1.and_euint4_euint8( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt8(12), ); - expect(res).to.equal(1048576); + expect(res).to.equal(8n); }); - it('test operator "and" overload (euint8, euint32) => euint32 test 1 (16, 65536)', async function () { - const res = await this.contract1.and_euint8_euint32( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt32(65536), + it('test operator "and" overload (euint4, euint8) => euint8 test 3 (12, 12)', async function () { + const res = await this.contract1.and_euint4_euint8( + this.instances1.alice.encrypt4(12), + this.instances1.alice.encrypt8(12), ); - expect(res).to.equal(0); + expect(res).to.equal(12n); }); - it('test operator "and" overload (euint8, euint32) => euint32 test 2 (17, 65552)', async function () { - const res = await this.contract1.and_euint8_euint32( - this.instances1.alice.encrypt8(17), - this.instances1.alice.encrypt32(65552), + it('test operator "and" overload (euint4, euint8) => euint8 test 4 (12, 8)', async function () { + const res = await this.contract1.and_euint4_euint8( + this.instances1.alice.encrypt4(12), + this.instances1.alice.encrypt8(8), ); - expect(res).to.equal(16); + expect(res).to.equal(8n); }); - it('test operator "or" overload (euint8, euint32) => euint32 test 1 (16, 65536)', async function () { - const res = await this.contract1.or_euint8_euint32( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt32(65536), + it('test operator "or" overload (euint4, euint8) => euint8 test 1 (14, 110)', async function () { + const res = await this.contract1.or_euint4_euint8( + this.instances1.alice.encrypt4(14), + this.instances1.alice.encrypt8(110), ); - expect(res).to.equal(65552); + expect(res).to.equal(110n); }); - it('test operator "or" overload (euint8, euint32) => euint32 test 2 (17, 65552)', async function () { - const res = await this.contract1.or_euint8_euint32( - this.instances1.alice.encrypt8(17), - this.instances1.alice.encrypt32(65552), + it('test operator "or" overload (euint4, euint8) => euint8 test 2 (10, 14)', async function () { + const res = await this.contract1.or_euint4_euint8( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt8(14), ); - expect(res).to.equal(65553); + expect(res).to.equal(14n); }); - it('test operator "xor" overload (euint8, euint32) => euint32 test 1 (16, 65536)', async function () { - const res = await this.contract1.xor_euint8_euint32( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt32(65536), + it('test operator "or" overload (euint4, euint8) => euint8 test 3 (14, 14)', async function () { + const res = await this.contract1.or_euint4_euint8( + this.instances1.alice.encrypt4(14), + this.instances1.alice.encrypt8(14), ); - expect(res).to.equal(65552); + expect(res).to.equal(14n); }); - it('test operator "xor" overload (euint8, euint32) => euint32 test 2 (17, 65552)', async function () { - const res = await this.contract1.xor_euint8_euint32( - this.instances1.alice.encrypt8(17), - this.instances1.alice.encrypt32(65552), + it('test operator "or" overload (euint4, euint8) => euint8 test 4 (14, 10)', async function () { + const res = await this.contract1.or_euint4_euint8( + this.instances1.alice.encrypt4(14), + this.instances1.alice.encrypt8(10), ); - expect(res).to.equal(65537); + expect(res).to.equal(14n); }); - it('test operator "eq" overload (euint8, euint32) => ebool test 1 (1, 1)', async function () { - const res = await this.contract1.eq_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(1), + it('test operator "xor" overload (euint4, euint8) => euint8 test 1 (12, 244)', async function () { + const res = await this.contract1.xor_euint4_euint8( + this.instances1.alice.encrypt4(12), + this.instances1.alice.encrypt8(244), ); - expect(res).to.equal(true); + expect(res).to.equal(248n); }); - it('test operator "eq" overload (euint8, euint32) => ebool test 2 (1, 65537)', async function () { - const res = await this.contract1.eq_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(65537), + it('test operator "xor" overload (euint4, euint8) => euint8 test 2 (8, 12)', async function () { + const res = await this.contract1.xor_euint4_euint8( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt8(12), ); - expect(res).to.equal(false); + expect(res).to.equal(4n); }); - it('test operator "ne" overload (euint8, euint32) => ebool test 1 (1, 1)', async function () { - const res = await this.contract1.ne_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(1), + it('test operator "xor" overload (euint4, euint8) => euint8 test 3 (12, 12)', async function () { + const res = await this.contract1.xor_euint4_euint8( + this.instances1.alice.encrypt4(12), + this.instances1.alice.encrypt8(12), ); - expect(res).to.equal(false); + expect(res).to.equal(0n); }); - it('test operator "ne" overload (euint8, euint32) => ebool test 2 (1, 65537)', async function () { - const res = await this.contract1.ne_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(65537), + it('test operator "xor" overload (euint4, euint8) => euint8 test 4 (12, 8)', async function () { + const res = await this.contract1.xor_euint4_euint8( + this.instances1.alice.encrypt4(12), + this.instances1.alice.encrypt8(8), ); - expect(res).to.equal(true); + expect(res).to.equal(4n); }); - it('test operator "ge" overload (euint8, euint32) => ebool test 1 (1, 1)', async function () { - const res = await this.contract1.ge_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(1), + it('test operator "eq" overload (euint4, euint8) => ebool test 1 (14, 180)', async function () { + const res = await this.contract1.eq_euint4_euint8( + this.instances1.alice.encrypt4(14), + this.instances1.alice.encrypt8(180), ); - expect(res).to.equal(true); + expect(res).to.equal(false); }); - it('test operator "ge" overload (euint8, euint32) => ebool test 2 (1, 65537)', async function () { - const res = await this.contract1.ge_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(65537), + it('test operator "eq" overload (euint4, euint8) => ebool test 2 (10, 14)', async function () { + const res = await this.contract1.eq_euint4_euint8( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt8(14), ); expect(res).to.equal(false); }); - it('test operator "ge" overload (euint8, euint32) => ebool test 3 (16, 1)', async function () { - const res = await this.contract1.ge_euint8_euint32( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt32(1), + it('test operator "eq" overload (euint4, euint8) => ebool test 3 (14, 14)', async function () { + const res = await this.contract1.eq_euint4_euint8( + this.instances1.alice.encrypt4(14), + this.instances1.alice.encrypt8(14), ); expect(res).to.equal(true); }); - it('test operator "gt" overload (euint8, euint32) => ebool test 1 (1, 1)', async function () { - const res = await this.contract1.gt_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(1), + it('test operator "eq" overload (euint4, euint8) => ebool test 4 (14, 10)', async function () { + const res = await this.contract1.eq_euint4_euint8( + this.instances1.alice.encrypt4(14), + this.instances1.alice.encrypt8(10), ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint8, euint32) => ebool test 2 (1, 65537)', async function () { - const res = await this.contract1.gt_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(65537), + it('test operator "ne" overload (euint4, euint8) => ebool test 1 (7, 94)', async function () { + const res = await this.contract1.ne_euint4_euint8( + this.instances1.alice.encrypt4(7), + this.instances1.alice.encrypt8(94), ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "gt" overload (euint8, euint32) => ebool test 3 (16, 1)', async function () { - const res = await this.contract1.gt_euint8_euint32( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt32(1), + it('test operator "ne" overload (euint4, euint8) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.ne_euint4_euint8( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt8(8), ); expect(res).to.equal(true); }); - it('test operator "le" overload (euint8, euint32) => ebool test 1 (1, 1)', async function () { - const res = await this.contract1.le_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(1), + it('test operator "ne" overload (euint4, euint8) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.ne_euint4_euint8( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt8(8), ); - expect(res).to.equal(true); + expect(res).to.equal(false); }); - it('test operator "le" overload (euint8, euint32) => ebool test 2 (1, 65537)', async function () { - const res = await this.contract1.le_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(65537), + it('test operator "ne" overload (euint4, euint8) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.ne_euint4_euint8( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt8(4), ); expect(res).to.equal(true); }); - it('test operator "le" overload (euint8, euint32) => ebool test 3 (16, 1)', async function () { - const res = await this.contract1.le_euint8_euint32( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt32(1), + it('test operator "ge" overload (euint4, euint8) => ebool test 1 (12, 141)', async function () { + const res = await this.contract1.ge_euint4_euint8( + this.instances1.alice.encrypt4(12), + this.instances1.alice.encrypt8(141), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint8, euint32) => ebool test 1 (1, 1)', async function () { - const res = await this.contract1.lt_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(1), + it('test operator "ge" overload (euint4, euint8) => ebool test 2 (8, 12)', async function () { + const res = await this.contract1.ge_euint4_euint8( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt8(12), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint8, euint32) => ebool test 2 (1, 65537)', async function () { - const res = await this.contract1.lt_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(65537), + it('test operator "ge" overload (euint4, euint8) => ebool test 3 (12, 12)', async function () { + const res = await this.contract1.ge_euint4_euint8( + this.instances1.alice.encrypt4(12), + this.instances1.alice.encrypt8(12), ); expect(res).to.equal(true); }); - it('test operator "lt" overload (euint8, euint32) => ebool test 3 (16, 1)', async function () { - const res = await this.contract1.lt_euint8_euint32( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt32(1), + it('test operator "ge" overload (euint4, euint8) => ebool test 4 (12, 8)', async function () { + const res = await this.contract1.ge_euint4_euint8( + this.instances1.alice.encrypt4(12), + this.instances1.alice.encrypt8(8), ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "min" overload (euint8, euint32) => euint32 test 1 (1, 1)', async function () { - const res = await this.contract1.min_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(1), + it('test operator "gt" overload (euint4, euint8) => ebool test 1 (7, 49)', async function () { + const res = await this.contract1.gt_euint4_euint8( + this.instances1.alice.encrypt4(7), + this.instances1.alice.encrypt8(49), ); - expect(res).to.equal(1); + expect(res).to.equal(false); }); - it('test operator "min" overload (euint8, euint32) => euint32 test 2 (1, 65537)', async function () { - const res = await this.contract1.min_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(65537), + it('test operator "gt" overload (euint4, euint8) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.gt_euint4_euint8( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt8(8), ); - expect(res).to.equal(1); + expect(res).to.equal(false); }); - it('test operator "min" overload (euint8, euint32) => euint32 test 3 (16, 4)', async function () { - const res = await this.contract1.min_euint8_euint32( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt32(4), + it('test operator "gt" overload (euint4, euint8) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.gt_euint4_euint8( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt8(8), ); - expect(res).to.equal(4); + expect(res).to.equal(false); }); - it('test operator "max" overload (euint8, euint32) => euint32 test 1 (1, 1)', async function () { - const res = await this.contract1.max_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(1), + it('test operator "gt" overload (euint4, euint8) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.gt_euint4_euint8( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt8(4), ); - expect(res).to.equal(1); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint8, euint32) => euint32 test 2 (1, 65537)', async function () { - const res = await this.contract1.max_euint8_euint32( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt32(65537), + it('test operator "le" overload (euint4, euint8) => ebool test 1 (14, 151)', async function () { + const res = await this.contract1.le_euint4_euint8( + this.instances1.alice.encrypt4(14), + this.instances1.alice.encrypt8(151), ); - expect(res).to.equal(65537); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint8, euint32) => euint32 test 3 (16, 4)', async function () { - const res = await this.contract1.max_euint8_euint32( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt32(4), + it('test operator "le" overload (euint4, euint8) => ebool test 2 (10, 14)', async function () { + const res = await this.contract1.le_euint4_euint8( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt8(14), ); - expect(res).to.equal(16); + expect(res).to.equal(true); }); - it('test operator "add" overload (euint8, euint64) => euint64 test 1 (255, 4294902015)', async function () { - const res = await this.contract1.add_euint8_euint64( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt64(4294902015), + it('test operator "le" overload (euint4, euint8) => ebool test 3 (14, 14)', async function () { + const res = await this.contract1.le_euint4_euint8( + this.instances1.alice.encrypt4(14), + this.instances1.alice.encrypt8(14), ); - expect(res).to.equal(4294902270); + expect(res).to.equal(true); }); - it('test operator "sub" overload (euint8, euint64) => euint64 test 1 (255, 4294902015)', async function () { - const res = await this.contract1.sub_euint8_euint64( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt64(4294902015), + it('test operator "le" overload (euint4, euint8) => ebool test 4 (14, 10)', async function () { + const res = await this.contract1.le_euint4_euint8( + this.instances1.alice.encrypt4(14), + this.instances1.alice.encrypt8(10), ); - expect(res).to.equal(18446744069414649856n); + expect(res).to.equal(false); }); - it('test operator "sub" overload (euint8, euint64) => euint64 test 2 (255, 16)', async function () { - const res = await this.contract1.sub_euint8_euint64( - this.instances1.alice.encrypt8(255), - this.instances1.alice.encrypt64(16), + it('test operator "lt" overload (euint4, euint8) => ebool test 1 (7, 92)', async function () { + const res = await this.contract1.lt_euint4_euint8( + this.instances1.alice.encrypt4(7), + this.instances1.alice.encrypt8(92), ); - expect(res).to.equal(239); + expect(res).to.equal(true); }); - it('test operator "mul" overload (euint8, euint64) => euint64 test 1 (16, 65536)', async function () { - const res = await this.contract1.mul_euint8_euint64( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt64(65536), + it('test operator "lt" overload (euint4, euint8) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.lt_euint4_euint8( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt8(8), ); - expect(res).to.equal(1048576); + expect(res).to.equal(true); }); - it('test operator "and" overload (euint8, euint64) => euint64 test 1 (16, 65536)', async function () { - const res = await this.contract1.and_euint8_euint64( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt64(65536), + it('test operator "lt" overload (euint4, euint8) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.lt_euint4_euint8( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt8(8), ); - expect(res).to.equal(0); + expect(res).to.equal(false); }); - it('test operator "and" overload (euint8, euint64) => euint64 test 2 (17, 65552)', async function () { - const res = await this.contract1.and_euint8_euint64( - this.instances1.alice.encrypt8(17), - this.instances1.alice.encrypt64(65552), + it('test operator "lt" overload (euint4, euint8) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.lt_euint4_euint8( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt8(4), ); - expect(res).to.equal(16); + expect(res).to.equal(false); }); - it('test operator "or" overload (euint8, euint64) => euint64 test 1 (16, 65536)', async function () { - const res = await this.contract1.or_euint8_euint64( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt64(65536), + it('test operator "min" overload (euint4, euint8) => euint8 test 1 (11, 237)', async function () { + const res = await this.contract1.min_euint4_euint8( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt8(237), ); - expect(res).to.equal(65552); + expect(res).to.equal(11n); }); - it('test operator "or" overload (euint8, euint64) => euint64 test 2 (17, 65552)', async function () { - const res = await this.contract1.or_euint8_euint64( - this.instances1.alice.encrypt8(17), - this.instances1.alice.encrypt64(65552), + it('test operator "min" overload (euint4, euint8) => euint8 test 2 (7, 11)', async function () { + const res = await this.contract1.min_euint4_euint8( + this.instances1.alice.encrypt4(7), + this.instances1.alice.encrypt8(11), ); - expect(res).to.equal(65553); + expect(res).to.equal(7n); }); - it('test operator "xor" overload (euint8, euint64) => euint64 test 1 (16, 65536)', async function () { - const res = await this.contract1.xor_euint8_euint64( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt64(65536), + it('test operator "min" overload (euint4, euint8) => euint8 test 3 (11, 11)', async function () { + const res = await this.contract1.min_euint4_euint8( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt8(11), ); - expect(res).to.equal(65552); + expect(res).to.equal(11n); }); - it('test operator "xor" overload (euint8, euint64) => euint64 test 2 (17, 65552)', async function () { - const res = await this.contract1.xor_euint8_euint64( - this.instances1.alice.encrypt8(17), - this.instances1.alice.encrypt64(65552), + it('test operator "min" overload (euint4, euint8) => euint8 test 4 (11, 7)', async function () { + const res = await this.contract1.min_euint4_euint8( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt8(7), ); - expect(res).to.equal(65537); + expect(res).to.equal(7n); }); - it('test operator "eq" overload (euint8, euint64) => ebool test 1 (1, 1)', async function () { - const res = await this.contract1.eq_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(1), + it('test operator "max" overload (euint4, euint8) => euint8 test 1 (11, 181)', async function () { + const res = await this.contract1.max_euint4_euint8( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt8(181), ); - expect(res).to.equal(true); + expect(res).to.equal(181n); }); - it('test operator "eq" overload (euint8, euint64) => ebool test 2 (1, 65537)', async function () { - const res = await this.contract1.eq_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(65537), + it('test operator "max" overload (euint4, euint8) => euint8 test 2 (7, 11)', async function () { + const res = await this.contract1.max_euint4_euint8( + this.instances1.alice.encrypt4(7), + this.instances1.alice.encrypt8(11), ); - expect(res).to.equal(false); + expect(res).to.equal(11n); }); - it('test operator "ne" overload (euint8, euint64) => ebool test 1 (1, 1)', async function () { - const res = await this.contract1.ne_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(1), + it('test operator "max" overload (euint4, euint8) => euint8 test 3 (11, 11)', async function () { + const res = await this.contract1.max_euint4_euint8( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt8(11), ); - expect(res).to.equal(false); + expect(res).to.equal(11n); }); - it('test operator "ne" overload (euint8, euint64) => ebool test 2 (1, 65537)', async function () { - const res = await this.contract1.ne_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(65537), + it('test operator "max" overload (euint4, euint8) => euint8 test 4 (11, 7)', async function () { + const res = await this.contract1.max_euint4_euint8( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt8(7), ); - expect(res).to.equal(true); + expect(res).to.equal(11n); }); - it('test operator "ge" overload (euint8, euint64) => ebool test 1 (1, 1)', async function () { - const res = await this.contract1.ge_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(1), + it('test operator "add" overload (euint4, euint16) => euint16 test 1 (2, 9)', async function () { + const res = await this.contract1.add_euint4_euint16( + this.instances1.alice.encrypt4(2), + this.instances1.alice.encrypt16(9), ); - expect(res).to.equal(true); + expect(res).to.equal(11n); }); - it('test operator "ge" overload (euint8, euint64) => ebool test 2 (1, 65537)', async function () { - const res = await this.contract1.ge_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(65537), + it('test operator "add" overload (euint4, euint16) => euint16 test 2 (6, 8)', async function () { + const res = await this.contract1.add_euint4_euint16( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt16(8), ); - expect(res).to.equal(false); + expect(res).to.equal(14n); }); - it('test operator "ge" overload (euint8, euint64) => ebool test 3 (16, 1)', async function () { - const res = await this.contract1.ge_euint8_euint64( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt64(1), + it('test operator "add" overload (euint4, euint16) => euint16 test 3 (5, 5)', async function () { + const res = await this.contract1.add_euint4_euint16( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt16(5), ); - expect(res).to.equal(true); + expect(res).to.equal(10n); }); - it('test operator "gt" overload (euint8, euint64) => ebool test 1 (1, 1)', async function () { - const res = await this.contract1.gt_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(1), + it('test operator "add" overload (euint4, euint16) => euint16 test 4 (8, 6)', async function () { + const res = await this.contract1.add_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(6), ); - expect(res).to.equal(false); + expect(res).to.equal(14n); }); - it('test operator "gt" overload (euint8, euint64) => ebool test 2 (1, 65537)', async function () { - const res = await this.contract1.gt_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(65537), + it('test operator "sub" overload (euint4, euint16) => euint16 test 1 (8, 8)', async function () { + const res = await this.contract1.sub_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(8), ); - expect(res).to.equal(false); + expect(res).to.equal(0n); }); - it('test operator "gt" overload (euint8, euint64) => ebool test 3 (16, 1)', async function () { - const res = await this.contract1.gt_euint8_euint64( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt64(1), + it('test operator "sub" overload (euint4, euint16) => euint16 test 2 (8, 4)', async function () { + const res = await this.contract1.sub_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(4), ); - expect(res).to.equal(true); + expect(res).to.equal(4n); }); - it('test operator "le" overload (euint8, euint64) => ebool test 1 (1, 1)', async function () { - const res = await this.contract1.le_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(1), + it('test operator "mul" overload (euint4, euint16) => euint16 test 1 (2, 5)', async function () { + const res = await this.contract1.mul_euint4_euint16( + this.instances1.alice.encrypt4(2), + this.instances1.alice.encrypt16(5), ); - expect(res).to.equal(true); + expect(res).to.equal(10n); }); - it('test operator "le" overload (euint8, euint64) => ebool test 2 (1, 65537)', async function () { - const res = await this.contract1.le_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(65537), + it('test operator "mul" overload (euint4, euint16) => euint16 test 2 (3, 5)', async function () { + const res = await this.contract1.mul_euint4_euint16( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt16(5), ); - expect(res).to.equal(true); + expect(res).to.equal(15n); }); - it('test operator "le" overload (euint8, euint64) => ebool test 3 (16, 1)', async function () { - const res = await this.contract1.le_euint8_euint64( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt64(1), + it('test operator "mul" overload (euint4, euint16) => euint16 test 3 (3, 3)', async function () { + const res = await this.contract1.mul_euint4_euint16( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt16(3), ); - expect(res).to.equal(false); + expect(res).to.equal(9n); }); - it('test operator "lt" overload (euint8, euint64) => ebool test 1 (1, 1)', async function () { - const res = await this.contract1.lt_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(1), + it('test operator "mul" overload (euint4, euint16) => euint16 test 4 (5, 3)', async function () { + const res = await this.contract1.mul_euint4_euint16( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt16(3), ); - expect(res).to.equal(false); + expect(res).to.equal(15n); }); - it('test operator "lt" overload (euint8, euint64) => ebool test 2 (1, 65537)', async function () { - const res = await this.contract1.lt_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(65537), + it('test operator "and" overload (euint4, euint16) => euint16 test 1 (10, 16702)', async function () { + const res = await this.contract1.and_euint4_euint16( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt16(16702), ); - expect(res).to.equal(true); + expect(res).to.equal(10n); }); - it('test operator "lt" overload (euint8, euint64) => ebool test 3 (16, 1)', async function () { - const res = await this.contract1.lt_euint8_euint64( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt64(1), + it('test operator "and" overload (euint4, euint16) => euint16 test 2 (6, 10)', async function () { + const res = await this.contract1.and_euint4_euint16( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt16(10), ); - expect(res).to.equal(false); + expect(res).to.equal(2n); }); - it('test operator "min" overload (euint8, euint64) => euint64 test 1 (1, 1)', async function () { - const res = await this.contract1.min_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(1), + it('test operator "and" overload (euint4, euint16) => euint16 test 3 (10, 10)', async function () { + const res = await this.contract1.and_euint4_euint16( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt16(10), ); - expect(res).to.equal(1); + expect(res).to.equal(10n); }); - it('test operator "min" overload (euint8, euint64) => euint64 test 2 (1, 65537)', async function () { - const res = await this.contract1.min_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(65537), + it('test operator "and" overload (euint4, euint16) => euint16 test 4 (10, 6)', async function () { + const res = await this.contract1.and_euint4_euint16( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt16(6), ); - expect(res).to.equal(1); + expect(res).to.equal(2n); }); - it('test operator "min" overload (euint8, euint64) => euint64 test 3 (16, 4)', async function () { - const res = await this.contract1.min_euint8_euint64( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt64(4), + it('test operator "or" overload (euint4, euint16) => euint16 test 1 (3, 60460)', async function () { + const res = await this.contract1.or_euint4_euint16( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt16(60460), ); - expect(res).to.equal(4); + expect(res).to.equal(60463n); }); - it('test operator "max" overload (euint8, euint64) => euint64 test 1 (1, 1)', async function () { - const res = await this.contract1.max_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(1), + it('test operator "or" overload (euint4, euint16) => euint16 test 2 (4, 8)', async function () { + const res = await this.contract1.or_euint4_euint16( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt16(8), ); - expect(res).to.equal(1); + expect(res).to.equal(12n); }); - it('test operator "max" overload (euint8, euint64) => euint64 test 2 (1, 65537)', async function () { - const res = await this.contract1.max_euint8_euint64( - this.instances1.alice.encrypt8(1), - this.instances1.alice.encrypt64(65537), + it('test operator "or" overload (euint4, euint16) => euint16 test 3 (8, 8)', async function () { + const res = await this.contract1.or_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(8), ); - expect(res).to.equal(65537); + expect(res).to.equal(8n); }); - it('test operator "max" overload (euint8, euint64) => euint64 test 3 (16, 4)', async function () { - const res = await this.contract1.max_euint8_euint64( - this.instances1.alice.encrypt8(16), - this.instances1.alice.encrypt64(4), + it('test operator "or" overload (euint4, euint16) => euint16 test 4 (8, 4)', async function () { + const res = await this.contract1.or_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(4), ); - expect(res).to.equal(16); + expect(res).to.equal(12n); }); - it('test operator "add" overload (euint8, uint8) => euint8 test 1 (4, 3)', async function () { - const res = await this.contract1.add_euint8_uint8(this.instances1.alice.encrypt8(4), 3); - expect(res).to.equal(7); + it('test operator "xor" overload (euint4, euint16) => euint16 test 1 (6, 58722)', async function () { + const res = await this.contract1.xor_euint4_euint16( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt16(58722), + ); + expect(res).to.equal(58724n); }); - it('test operator "add" overload (uint8, euint8) => euint8 test 1 (4, 3)', async function () { - const res = await this.contract1.add_uint8_euint8(4, this.instances1.alice.encrypt8(3)); - expect(res).to.equal(7); + it('test operator "xor" overload (euint4, euint16) => euint16 test 2 (4, 8)', async function () { + const res = await this.contract1.xor_euint4_euint16( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt16(8), + ); + expect(res).to.equal(12n); }); - it('test operator "sub" overload (euint8, uint8) => euint8 test 1 (4, 3)', async function () { - const res = await this.contract1.sub_euint8_uint8(this.instances1.alice.encrypt8(4), 3); - expect(res).to.equal(1); + it('test operator "xor" overload (euint4, euint16) => euint16 test 3 (8, 8)', async function () { + const res = await this.contract1.xor_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(8), + ); + expect(res).to.equal(0n); }); - it('test operator "sub" overload (euint8, uint8) => euint8 test 2 (3, 4)', async function () { - const res = await this.contract1.sub_euint8_uint8(this.instances1.alice.encrypt8(3), 4); - expect(res).to.equal(255); + it('test operator "xor" overload (euint4, euint16) => euint16 test 4 (8, 4)', async function () { + const res = await this.contract1.xor_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(4), + ); + expect(res).to.equal(12n); }); - it('test operator "sub" overload (uint8, euint8) => euint8 test 1 (4, 3)', async function () { - const res = await this.contract1.sub_uint8_euint8(4, this.instances1.alice.encrypt8(3)); - expect(res).to.equal(1); + it('test operator "eq" overload (euint4, euint16) => ebool test 1 (9, 7831)', async function () { + const res = await this.contract1.eq_euint4_euint16( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt16(7831), + ); + expect(res).to.equal(false); }); - it('test operator "sub" overload (uint8, euint8) => euint8 test 2 (3, 4)', async function () { - const res = await this.contract1.sub_uint8_euint8(3, this.instances1.alice.encrypt8(4)); - expect(res).to.equal(255); + it('test operator "eq" overload (euint4, euint16) => ebool test 2 (5, 9)', async function () { + const res = await this.contract1.eq_euint4_euint16( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt16(9), + ); + expect(res).to.equal(false); }); - it('test operator "mul" overload (euint8, uint8) => euint8 test 1 (4, 3)', async function () { - const res = await this.contract1.mul_euint8_uint8(this.instances1.alice.encrypt8(4), 3); - expect(res).to.equal(12); + it('test operator "eq" overload (euint4, euint16) => ebool test 3 (9, 9)', async function () { + const res = await this.contract1.eq_euint4_euint16( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt16(9), + ); + expect(res).to.equal(true); }); - it('test operator "mul" overload (euint8, uint8) => euint8 test 2 (3, 4)', async function () { - const res = await this.contract1.mul_euint8_uint8(this.instances1.alice.encrypt8(3), 4); - expect(res).to.equal(12); + it('test operator "eq" overload (euint4, euint16) => ebool test 4 (9, 5)', async function () { + const res = await this.contract1.eq_euint4_euint16( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt16(5), + ); + expect(res).to.equal(false); }); - it('test operator "mul" overload (euint8, uint8) => euint8 test 3 (8, 2)', async function () { - const res = await this.contract1.mul_euint8_uint8(this.instances1.alice.encrypt8(8), 2); - expect(res).to.equal(16); + it('test operator "ne" overload (euint4, euint16) => ebool test 1 (2, 63787)', async function () { + const res = await this.contract1.ne_euint4_euint16( + this.instances1.alice.encrypt4(2), + this.instances1.alice.encrypt16(63787), + ); + expect(res).to.equal(true); }); - it('test operator "mul" overload (uint8, euint8) => euint8 test 1 (4, 3)', async function () { - const res = await this.contract1.mul_uint8_euint8(4, this.instances1.alice.encrypt8(3)); - expect(res).to.equal(12); + it('test operator "ne" overload (euint4, euint16) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.ne_euint4_euint16( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt16(8), + ); + expect(res).to.equal(true); }); - it('test operator "mul" overload (uint8, euint8) => euint8 test 2 (3, 4)', async function () { - const res = await this.contract1.mul_uint8_euint8(3, this.instances1.alice.encrypt8(4)); - expect(res).to.equal(12); + it('test operator "ne" overload (euint4, euint16) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.ne_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(8), + ); + expect(res).to.equal(false); }); - it('test operator "mul" overload (uint8, euint8) => euint8 test 3 (8, 2)', async function () { - const res = await this.contract1.mul_uint8_euint8(8, this.instances1.alice.encrypt8(2)); - expect(res).to.equal(16); + it('test operator "ne" overload (euint4, euint16) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.ne_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(4), + ); + expect(res).to.equal(true); }); - it('test operator "div" overload (euint8, uint8) => euint8 test 1 (16, 2)', async function () { - const res = await this.contract1.div_euint8_uint8(this.instances1.alice.encrypt8(16), 2); - expect(res).to.equal(8); + it('test operator "ge" overload (euint4, euint16) => ebool test 1 (9, 63554)', async function () { + const res = await this.contract1.ge_euint4_euint16( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt16(63554), + ); + expect(res).to.equal(false); }); - it('test operator "rem" overload (euint8, uint8) => euint8 test 1 (8, 3)', async function () { - const res = await this.contract1.rem_euint8_uint8(this.instances1.alice.encrypt8(8), 3); - expect(res).to.equal(2); + it('test operator "ge" overload (euint4, euint16) => ebool test 2 (5, 9)', async function () { + const res = await this.contract1.ge_euint4_euint16( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt16(9), + ); + expect(res).to.equal(false); }); - it('test operator "eq" overload (euint8, uint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.eq_euint8_uint8(this.instances1.alice.encrypt8(16), 16); + it('test operator "ge" overload (euint4, euint16) => ebool test 3 (9, 9)', async function () { + const res = await this.contract1.ge_euint4_euint16( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt16(9), + ); expect(res).to.equal(true); }); - it('test operator "eq" overload (euint8, uint8) => ebool test 2 (16, 2)', async function () { - const res = await this.contract1.eq_euint8_uint8(this.instances1.alice.encrypt8(16), 2); - expect(res).to.equal(false); - }); - - it('test operator "eq" overload (uint8, euint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.eq_uint8_euint8(16, this.instances1.alice.encrypt8(16)); + it('test operator "ge" overload (euint4, euint16) => ebool test 4 (9, 5)', async function () { + const res = await this.contract1.ge_euint4_euint16( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt16(5), + ); expect(res).to.equal(true); }); - it('test operator "eq" overload (uint8, euint8) => ebool test 2 (16, 2)', async function () { - const res = await this.contract1.eq_uint8_euint8(16, this.instances1.alice.encrypt8(2)); + it('test operator "gt" overload (euint4, euint16) => ebool test 1 (13, 28270)', async function () { + const res = await this.contract1.gt_euint4_euint16( + this.instances1.alice.encrypt4(13), + this.instances1.alice.encrypt16(28270), + ); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint8, uint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.ne_euint8_uint8(this.instances1.alice.encrypt8(16), 16); + it('test operator "gt" overload (euint4, euint16) => ebool test 2 (9, 13)', async function () { + const res = await this.contract1.gt_euint4_euint16( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt16(13), + ); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint8, uint8) => ebool test 2 (16, 2)', async function () { - const res = await this.contract1.ne_euint8_uint8(this.instances1.alice.encrypt8(16), 2); - expect(res).to.equal(true); + it('test operator "gt" overload (euint4, euint16) => ebool test 3 (13, 13)', async function () { + const res = await this.contract1.gt_euint4_euint16( + this.instances1.alice.encrypt4(13), + this.instances1.alice.encrypt16(13), + ); + expect(res).to.equal(false); }); - it('test operator "ne" overload (uint8, euint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.ne_uint8_euint8(16, this.instances1.alice.encrypt8(16)); - expect(res).to.equal(false); + it('test operator "gt" overload (euint4, euint16) => ebool test 4 (13, 9)', async function () { + const res = await this.contract1.gt_euint4_euint16( + this.instances1.alice.encrypt4(13), + this.instances1.alice.encrypt16(9), + ); + expect(res).to.equal(true); }); - it('test operator "ne" overload (uint8, euint8) => ebool test 2 (16, 2)', async function () { - const res = await this.contract1.ne_uint8_euint8(16, this.instances1.alice.encrypt8(2)); + it('test operator "le" overload (euint4, euint16) => ebool test 1 (1, 51341)', async function () { + const res = await this.contract1.le_euint4_euint16( + this.instances1.alice.encrypt4(1), + this.instances1.alice.encrypt16(51341), + ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint8, uint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.ge_euint8_uint8(this.instances1.alice.encrypt8(16), 16); + it('test operator "le" overload (euint4, euint16) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.le_euint4_euint16( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt16(8), + ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint8, uint8) => ebool test 2 (16, 2)', async function () { - const res = await this.contract1.ge_euint8_uint8(this.instances1.alice.encrypt8(16), 2); + it('test operator "le" overload (euint4, euint16) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.le_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(8), + ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint8, uint8) => ebool test 3 (16, 17)', async function () { - const res = await this.contract1.ge_euint8_uint8(this.instances1.alice.encrypt8(16), 17); + it('test operator "le" overload (euint4, euint16) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.le_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(4), + ); expect(res).to.equal(false); }); - it('test operator "ge" overload (uint8, euint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.ge_uint8_euint8(16, this.instances1.alice.encrypt8(16)); + it('test operator "lt" overload (euint4, euint16) => ebool test 1 (6, 15496)', async function () { + const res = await this.contract1.lt_euint4_euint16( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt16(15496), + ); expect(res).to.equal(true); }); - it('test operator "ge" overload (uint8, euint8) => ebool test 2 (16, 2)', async function () { - const res = await this.contract1.ge_uint8_euint8(16, this.instances1.alice.encrypt8(2)); + it('test operator "lt" overload (euint4, euint16) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.lt_euint4_euint16( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt16(8), + ); expect(res).to.equal(true); }); - it('test operator "ge" overload (uint8, euint8) => ebool test 3 (16, 17)', async function () { - const res = await this.contract1.ge_uint8_euint8(16, this.instances1.alice.encrypt8(17)); + it('test operator "lt" overload (euint4, euint16) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.lt_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(8), + ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint8, uint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.gt_euint8_uint8(this.instances1.alice.encrypt8(16), 16); + it('test operator "lt" overload (euint4, euint16) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.lt_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(4), + ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint8, uint8) => ebool test 2 (16, 2)', async function () { - const res = await this.contract1.gt_euint8_uint8(this.instances1.alice.encrypt8(16), 2); - expect(res).to.equal(true); + it('test operator "min" overload (euint4, euint16) => euint16 test 1 (10, 26263)', async function () { + const res = await this.contract1.min_euint4_euint16( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt16(26263), + ); + expect(res).to.equal(10n); }); - it('test operator "gt" overload (euint8, uint8) => ebool test 3 (16, 17)', async function () { - const res = await this.contract1.gt_euint8_uint8(this.instances1.alice.encrypt8(16), 17); - expect(res).to.equal(false); + it('test operator "min" overload (euint4, euint16) => euint16 test 2 (6, 10)', async function () { + const res = await this.contract1.min_euint4_euint16( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt16(10), + ); + expect(res).to.equal(6n); }); - it('test operator "gt" overload (uint8, euint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.gt_uint8_euint8(16, this.instances1.alice.encrypt8(16)); - expect(res).to.equal(false); + it('test operator "min" overload (euint4, euint16) => euint16 test 3 (10, 10)', async function () { + const res = await this.contract1.min_euint4_euint16( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt16(10), + ); + expect(res).to.equal(10n); }); - it('test operator "gt" overload (uint8, euint8) => ebool test 2 (16, 2)', async function () { - const res = await this.contract1.gt_uint8_euint8(16, this.instances1.alice.encrypt8(2)); - expect(res).to.equal(true); + it('test operator "min" overload (euint4, euint16) => euint16 test 4 (10, 6)', async function () { + const res = await this.contract1.min_euint4_euint16( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt16(6), + ); + expect(res).to.equal(6n); }); - it('test operator "gt" overload (uint8, euint8) => ebool test 3 (16, 17)', async function () { - const res = await this.contract1.gt_uint8_euint8(16, this.instances1.alice.encrypt8(17)); - expect(res).to.equal(false); + it('test operator "max" overload (euint4, euint16) => euint16 test 1 (2, 61770)', async function () { + const res = await this.contract1.max_euint4_euint16( + this.instances1.alice.encrypt4(2), + this.instances1.alice.encrypt16(61770), + ); + expect(res).to.equal(61770n); }); - it('test operator "le" overload (euint8, uint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.le_euint8_uint8(this.instances1.alice.encrypt8(16), 16); - expect(res).to.equal(true); + it('test operator "max" overload (euint4, euint16) => euint16 test 2 (4, 8)', async function () { + const res = await this.contract1.max_euint4_euint16( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt16(8), + ); + expect(res).to.equal(8n); }); - it('test operator "le" overload (euint8, uint8) => ebool test 2 (16, 2)', async function () { - const res = await this.contract1.le_euint8_uint8(this.instances1.alice.encrypt8(16), 2); - expect(res).to.equal(false); + it('test operator "max" overload (euint4, euint16) => euint16 test 3 (8, 8)', async function () { + const res = await this.contract1.max_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(8), + ); + expect(res).to.equal(8n); }); - it('test operator "le" overload (euint8, uint8) => ebool test 3 (16, 17)', async function () { - const res = await this.contract1.le_euint8_uint8(this.instances1.alice.encrypt8(16), 17); - expect(res).to.equal(true); + it('test operator "max" overload (euint4, euint16) => euint16 test 4 (8, 4)', async function () { + const res = await this.contract1.max_euint4_euint16( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt16(4), + ); + expect(res).to.equal(8n); }); - it('test operator "le" overload (uint8, euint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.le_uint8_euint8(16, this.instances1.alice.encrypt8(16)); - expect(res).to.equal(true); + it('test operator "add" overload (euint4, euint32) => euint32 test 1 (2, 11)', async function () { + const res = await this.contract1.add_euint4_euint32( + this.instances1.alice.encrypt4(2), + this.instances1.alice.encrypt32(11), + ); + expect(res).to.equal(13n); }); - it('test operator "le" overload (uint8, euint8) => ebool test 2 (16, 2)', async function () { - const res = await this.contract1.le_uint8_euint8(16, this.instances1.alice.encrypt8(2)); - expect(res).to.equal(false); + it('test operator "add" overload (euint4, euint32) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract1.add_euint4_euint32( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(12n); }); - it('test operator "le" overload (uint8, euint8) => ebool test 3 (16, 17)', async function () { - const res = await this.contract1.le_uint8_euint8(16, this.instances1.alice.encrypt8(17)); - expect(res).to.equal(true); + it('test operator "add" overload (euint4, euint32) => euint32 test 3 (5, 5)', async function () { + const res = await this.contract1.add_euint4_euint32( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt32(5), + ); + expect(res).to.equal(10n); }); - it('test operator "lt" overload (euint8, uint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.lt_euint8_uint8(this.instances1.alice.encrypt8(16), 16); - expect(res).to.equal(false); + it('test operator "add" overload (euint4, euint32) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract1.add_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "sub" overload (euint4, euint32) => euint32 test 1 (8, 8)', async function () { + const res = await this.contract1.sub_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint4, euint32) => euint32 test 2 (8, 4)', async function () { + const res = await this.contract1.sub_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(4), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint4, euint32) => euint32 test 1 (2, 7)', async function () { + const res = await this.contract1.mul_euint4_euint32( + this.instances1.alice.encrypt4(2), + this.instances1.alice.encrypt32(7), + ); + expect(res).to.equal(14n); + }); + + it('test operator "mul" overload (euint4, euint32) => euint32 test 2 (3, 4)', async function () { + const res = await this.contract1.mul_euint4_euint32( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt32(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "mul" overload (euint4, euint32) => euint32 test 3 (3, 3)', async function () { + const res = await this.contract1.mul_euint4_euint32( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt32(3), + ); + expect(res).to.equal(9n); + }); + + it('test operator "mul" overload (euint4, euint32) => euint32 test 4 (4, 3)', async function () { + const res = await this.contract1.mul_euint4_euint32( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt32(3), + ); + expect(res).to.equal(12n); + }); + + it('test operator "and" overload (euint4, euint32) => euint32 test 1 (6, 3534750602)', async function () { + const res = await this.contract1.and_euint4_euint32( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt32(3534750602), + ); + expect(res).to.equal(2n); + }); + + it('test operator "and" overload (euint4, euint32) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract1.and_euint4_euint32( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(0n); + }); + + it('test operator "and" overload (euint4, euint32) => euint32 test 3 (8, 8)', async function () { + const res = await this.contract1.and_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "and" overload (euint4, euint32) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract1.and_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(4), + ); + expect(res).to.equal(0n); + }); + + it('test operator "or" overload (euint4, euint32) => euint32 test 1 (3, 2840015564)', async function () { + const res = await this.contract1.or_euint4_euint32( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt32(2840015564), + ); + expect(res).to.equal(2840015567n); + }); + + it('test operator "or" overload (euint4, euint32) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract1.or_euint4_euint32( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(12n); + }); + + it('test operator "or" overload (euint4, euint32) => euint32 test 3 (8, 8)', async function () { + const res = await this.contract1.or_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "or" overload (euint4, euint32) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract1.or_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "xor" overload (euint4, euint32) => euint32 test 1 (6, 2183122437)', async function () { + const res = await this.contract1.xor_euint4_euint32( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt32(2183122437), + ); + expect(res).to.equal(2183122435n); + }); + + it('test operator "xor" overload (euint4, euint32) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract1.xor_euint4_euint32( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(12n); + }); + + it('test operator "xor" overload (euint4, euint32) => euint32 test 3 (8, 8)', async function () { + const res = await this.contract1.xor_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint4, euint32) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract1.xor_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "eq" overload (euint4, euint32) => ebool test 1 (6, 2902824357)', async function () { + const res = await this.contract1.eq_euint4_euint32( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt32(2902824357), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint4, euint32) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.eq_euint4_euint32( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint4, euint32) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.eq_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint4, euint32) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.eq_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(4), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint4, euint32) => ebool test 1 (13, 3287915476)', async function () { + const res = await this.contract1.ne_euint4_euint32( + this.instances1.alice.encrypt4(13), + this.instances1.alice.encrypt32(3287915476), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint4, euint32) => ebool test 2 (9, 13)', async function () { + const res = await this.contract1.ne_euint4_euint32( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt32(13), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint4, euint32) => ebool test 3 (13, 13)', async function () { + const res = await this.contract1.ne_euint4_euint32( + this.instances1.alice.encrypt4(13), + this.instances1.alice.encrypt32(13), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint4, euint32) => ebool test 4 (13, 9)', async function () { + const res = await this.contract1.ne_euint4_euint32( + this.instances1.alice.encrypt4(13), + this.instances1.alice.encrypt32(9), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint4, euint32) => ebool test 1 (9, 3023026099)', async function () { + const res = await this.contract1.ge_euint4_euint32( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt32(3023026099), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint4, euint32) => ebool test 2 (5, 9)', async function () { + const res = await this.contract1.ge_euint4_euint32( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt32(9), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint4, euint32) => ebool test 3 (9, 9)', async function () { + const res = await this.contract1.ge_euint4_euint32( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt32(9), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint4, euint32) => ebool test 4 (9, 5)', async function () { + const res = await this.contract1.ge_euint4_euint32( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt32(5), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint4, euint32) => ebool test 1 (10, 2302702329)', async function () { + const res = await this.contract1.gt_euint4_euint32( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt32(2302702329), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint4, euint32) => ebool test 2 (6, 10)', async function () { + const res = await this.contract1.gt_euint4_euint32( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt32(10), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint4, euint32) => ebool test 3 (10, 10)', async function () { + const res = await this.contract1.gt_euint4_euint32( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt32(10), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint4, euint32) => ebool test 4 (10, 6)', async function () { + const res = await this.contract1.gt_euint4_euint32( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt32(6), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint4, euint32) => ebool test 1 (9, 467708048)', async function () { + const res = await this.contract1.le_euint4_euint32( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt32(467708048), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint4, euint32) => ebool test 2 (5, 9)', async function () { + const res = await this.contract1.le_euint4_euint32( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt32(9), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint4, euint32) => ebool test 3 (9, 9)', async function () { + const res = await this.contract1.le_euint4_euint32( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt32(9), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint4, euint32) => ebool test 4 (9, 5)', async function () { + const res = await this.contract1.le_euint4_euint32( + this.instances1.alice.encrypt4(9), + this.instances1.alice.encrypt32(5), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint4, euint32) => ebool test 1 (11, 1378961804)', async function () { + const res = await this.contract1.lt_euint4_euint32( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt32(1378961804), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint4, euint32) => ebool test 2 (7, 11)', async function () { + const res = await this.contract1.lt_euint4_euint32( + this.instances1.alice.encrypt4(7), + this.instances1.alice.encrypt32(11), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint4, euint32) => ebool test 3 (11, 11)', async function () { + const res = await this.contract1.lt_euint4_euint32( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt32(11), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint4, euint32) => ebool test 4 (11, 7)', async function () { + const res = await this.contract1.lt_euint4_euint32( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt32(7), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint4, euint32) => euint32 test 1 (5, 2670542696)', async function () { + const res = await this.contract1.min_euint4_euint32( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt32(2670542696), + ); + expect(res).to.equal(5n); + }); + + it('test operator "min" overload (euint4, euint32) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract1.min_euint4_euint32( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(4n); + }); + + it('test operator "min" overload (euint4, euint32) => euint32 test 3 (8, 8)', async function () { + const res = await this.contract1.min_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "min" overload (euint4, euint32) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract1.min_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(4), + ); + expect(res).to.equal(4n); + }); + + it('test operator "max" overload (euint4, euint32) => euint32 test 1 (2, 1031795645)', async function () { + const res = await this.contract1.max_euint4_euint32( + this.instances1.alice.encrypt4(2), + this.instances1.alice.encrypt32(1031795645), + ); + expect(res).to.equal(1031795645n); + }); + + it('test operator "max" overload (euint4, euint32) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract1.max_euint4_euint32( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "max" overload (euint4, euint32) => euint32 test 3 (8, 8)', async function () { + const res = await this.contract1.max_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "max" overload (euint4, euint32) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract1.max_euint4_euint32( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt32(4), + ); + expect(res).to.equal(8n); + }); + + it('test operator "add" overload (euint4, euint64) => euint64 test 1 (2, 9)', async function () { + const res = await this.contract1.add_euint4_euint64( + this.instances1.alice.encrypt4(2), + this.instances1.alice.encrypt64(9), + ); + expect(res).to.equal(11n); + }); + + it('test operator "add" overload (euint4, euint64) => euint64 test 2 (4, 6)', async function () { + const res = await this.contract1.add_euint4_euint64( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt64(6), + ); + expect(res).to.equal(10n); + }); + + it('test operator "add" overload (euint4, euint64) => euint64 test 3 (6, 6)', async function () { + const res = await this.contract1.add_euint4_euint64( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt64(6), + ); + expect(res).to.equal(12n); + }); + + it('test operator "add" overload (euint4, euint64) => euint64 test 4 (6, 4)', async function () { + const res = await this.contract1.add_euint4_euint64( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt64(4), + ); + expect(res).to.equal(10n); + }); + + it('test operator "sub" overload (euint4, euint64) => euint64 test 1 (8, 8)', async function () { + const res = await this.contract1.sub_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint4, euint64) => euint64 test 2 (8, 4)', async function () { + const res = await this.contract1.sub_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(4), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint4, euint64) => euint64 test 1 (2, 5)', async function () { + const res = await this.contract1.mul_euint4_euint64( + this.instances1.alice.encrypt4(2), + this.instances1.alice.encrypt64(5), + ); + expect(res).to.equal(10n); + }); + + it('test operator "mul" overload (euint4, euint64) => euint64 test 2 (3, 5)', async function () { + const res = await this.contract1.mul_euint4_euint64( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt64(5), + ); + expect(res).to.equal(15n); + }); + + it('test operator "mul" overload (euint4, euint64) => euint64 test 3 (3, 3)', async function () { + const res = await this.contract1.mul_euint4_euint64( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt64(3), + ); + expect(res).to.equal(9n); + }); + + it('test operator "mul" overload (euint4, euint64) => euint64 test 4 (5, 3)', async function () { + const res = await this.contract1.mul_euint4_euint64( + this.instances1.alice.encrypt4(5), + this.instances1.alice.encrypt64(3), + ); + expect(res).to.equal(15n); + }); + + it('test operator "and" overload (euint4, euint64) => euint64 test 1 (7, 18444452142912700231)', async function () { + const res = await this.contract1.and_euint4_euint64( + this.instances1.alice.encrypt4(7), + this.instances1.alice.encrypt64(18444452142912700231), + ); + expect(res).to.equal(7n); + }); + + it('test operator "and" overload (euint4, euint64) => euint64 test 2 (4, 8)', async function () { + const res = await this.contract1.and_euint4_euint64( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(0n); + }); + + it('test operator "and" overload (euint4, euint64) => euint64 test 3 (8, 8)', async function () { + const res = await this.contract1.and_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "and" overload (euint4, euint64) => euint64 test 4 (8, 4)', async function () { + const res = await this.contract1.and_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(4), + ); + expect(res).to.equal(0n); + }); + + it('test operator "or" overload (euint4, euint64) => euint64 test 1 (10, 18439589984533574615)', async function () { + const res = await this.contract1.or_euint4_euint64( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt64(18439589984533574615), + ); + expect(res).to.equal(18439589984533574623n); + }); + + it('test operator "or" overload (euint4, euint64) => euint64 test 2 (6, 10)', async function () { + const res = await this.contract1.or_euint4_euint64( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt64(10), + ); + expect(res).to.equal(14n); + }); + + it('test operator "or" overload (euint4, euint64) => euint64 test 3 (10, 10)', async function () { + const res = await this.contract1.or_euint4_euint64( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt64(10), + ); + expect(res).to.equal(10n); + }); + + it('test operator "or" overload (euint4, euint64) => euint64 test 4 (10, 6)', async function () { + const res = await this.contract1.or_euint4_euint64( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt64(6), + ); + expect(res).to.equal(14n); + }); + + it('test operator "xor" overload (euint4, euint64) => euint64 test 1 (7, 18438536745518625067)', async function () { + const res = await this.contract1.xor_euint4_euint64( + this.instances1.alice.encrypt4(7), + this.instances1.alice.encrypt64(18438536745518625067), + ); + expect(res).to.equal(18438536745518625068n); + }); + + it('test operator "xor" overload (euint4, euint64) => euint64 test 2 (4, 8)', async function () { + const res = await this.contract1.xor_euint4_euint64( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(12n); + }); + + it('test operator "xor" overload (euint4, euint64) => euint64 test 3 (8, 8)', async function () { + const res = await this.contract1.xor_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint4, euint64) => euint64 test 4 (8, 4)', async function () { + const res = await this.contract1.xor_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "eq" overload (euint4, euint64) => ebool test 1 (4, 18441783865246079825)', async function () { + const res = await this.contract1.eq_euint4_euint64( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt64(18441783865246079825), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint4, euint64) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.eq_euint4_euint64( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint4, euint64) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.eq_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint4, euint64) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.eq_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(4), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint4, euint64) => ebool test 1 (11, 18442031616327904827)', async function () { + const res = await this.contract1.ne_euint4_euint64( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt64(18442031616327904827), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint4, euint64) => ebool test 2 (7, 11)', async function () { + const res = await this.contract1.ne_euint4_euint64( + this.instances1.alice.encrypt4(7), + this.instances1.alice.encrypt64(11), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint4, euint64) => ebool test 3 (11, 11)', async function () { + const res = await this.contract1.ne_euint4_euint64( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt64(11), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint4, euint64) => ebool test 4 (11, 7)', async function () { + const res = await this.contract1.ne_euint4_euint64( + this.instances1.alice.encrypt4(11), + this.instances1.alice.encrypt64(7), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint4, euint64) => ebool test 1 (14, 18441505983320830973)', async function () { + const res = await this.contract1.ge_euint4_euint64( + this.instances1.alice.encrypt4(14), + this.instances1.alice.encrypt64(18441505983320830973), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint4, euint64) => ebool test 2 (10, 14)', async function () { + const res = await this.contract1.ge_euint4_euint64( + this.instances1.alice.encrypt4(10), + this.instances1.alice.encrypt64(14), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint4, euint64) => ebool test 3 (14, 14)', async function () { + const res = await this.contract1.ge_euint4_euint64( + this.instances1.alice.encrypt4(14), + this.instances1.alice.encrypt64(14), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint4, euint64) => ebool test 4 (14, 10)', async function () { + const res = await this.contract1.ge_euint4_euint64( + this.instances1.alice.encrypt4(14), + this.instances1.alice.encrypt64(10), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint4, euint64) => ebool test 1 (8, 18443962302044821049)', async function () { + const res = await this.contract1.gt_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(18443962302044821049), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint4, euint64) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.gt_euint4_euint64( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint4, euint64) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.gt_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint4, euint64) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.gt_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(4), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint4, euint64) => ebool test 1 (12, 18438657387678135029)', async function () { + const res = await this.contract1.le_euint4_euint64( + this.instances1.alice.encrypt4(12), + this.instances1.alice.encrypt64(18438657387678135029), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint4, euint64) => ebool test 2 (8, 12)', async function () { + const res = await this.contract1.le_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(12), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint4, euint64) => ebool test 3 (12, 12)', async function () { + const res = await this.contract1.le_euint4_euint64( + this.instances1.alice.encrypt4(12), + this.instances1.alice.encrypt64(12), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint4, euint64) => ebool test 4 (12, 8)', async function () { + const res = await this.contract1.le_euint4_euint64( + this.instances1.alice.encrypt4(12), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint4, euint64) => ebool test 1 (8, 18442139041620940861)', async function () { + const res = await this.contract1.lt_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(18442139041620940861), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint4, euint64) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.lt_euint4_euint64( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint4, euint64) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.lt_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint4, euint64) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.lt_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(4), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint4, euint64) => euint64 test 1 (6, 18437937380503493287)', async function () { + const res = await this.contract1.min_euint4_euint64( + this.instances1.alice.encrypt4(6), + this.instances1.alice.encrypt64(18437937380503493287), + ); + expect(res).to.equal(6n); + }); + + it('test operator "min" overload (euint4, euint64) => euint64 test 2 (4, 8)', async function () { + const res = await this.contract1.min_euint4_euint64( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(4n); + }); + + it('test operator "min" overload (euint4, euint64) => euint64 test 3 (8, 8)', async function () { + const res = await this.contract1.min_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "min" overload (euint4, euint64) => euint64 test 4 (8, 4)', async function () { + const res = await this.contract1.min_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(4), + ); + expect(res).to.equal(4n); + }); + + it('test operator "max" overload (euint4, euint64) => euint64 test 1 (3, 18443395042624107977)', async function () { + const res = await this.contract1.max_euint4_euint64( + this.instances1.alice.encrypt4(3), + this.instances1.alice.encrypt64(18443395042624107977), + ); + expect(res).to.equal(18443395042624107977n); + }); + + it('test operator "max" overload (euint4, euint64) => euint64 test 2 (4, 8)', async function () { + const res = await this.contract1.max_euint4_euint64( + this.instances1.alice.encrypt4(4), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "max" overload (euint4, euint64) => euint64 test 3 (8, 8)', async function () { + const res = await this.contract1.max_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "max" overload (euint4, euint64) => euint64 test 4 (8, 4)', async function () { + const res = await this.contract1.max_euint4_euint64( + this.instances1.alice.encrypt4(8), + this.instances1.alice.encrypt64(4), + ); + expect(res).to.equal(8n); + }); + + it('test operator "add" overload (euint4, uint8) => euint4 test 1 (7, 7)', async function () { + const res = await this.contract1.add_euint4_uint8(this.instances1.alice.encrypt4(7), 7); + expect(res).to.equal(14n); + }); + + it('test operator "add" overload (euint4, uint8) => euint4 test 2 (4, 8)', async function () { + const res = await this.contract1.add_euint4_uint8(this.instances1.alice.encrypt4(4), 8); + expect(res).to.equal(12n); + }); + + it('test operator "add" overload (euint4, uint8) => euint4 test 3 (5, 5)', async function () { + const res = await this.contract1.add_euint4_uint8(this.instances1.alice.encrypt4(5), 5); + expect(res).to.equal(10n); + }); + + it('test operator "add" overload (euint4, uint8) => euint4 test 4 (8, 4)', async function () { + const res = await this.contract1.add_euint4_uint8(this.instances1.alice.encrypt4(8), 4); + expect(res).to.equal(12n); + }); + + it('test operator "add" overload (uint8, euint4) => euint4 test 1 (12, 3)', async function () { + const res = await this.contract1.add_uint8_euint4(12, this.instances1.alice.encrypt4(3)); + expect(res).to.equal(15n); + }); + + it('test operator "add" overload (uint8, euint4) => euint4 test 2 (4, 8)', async function () { + const res = await this.contract1.add_uint8_euint4(4, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(12n); + }); + + it('test operator "add" overload (uint8, euint4) => euint4 test 3 (5, 5)', async function () { + const res = await this.contract1.add_uint8_euint4(5, this.instances1.alice.encrypt4(5)); + expect(res).to.equal(10n); + }); + + it('test operator "add" overload (uint8, euint4) => euint4 test 4 (8, 4)', async function () { + const res = await this.contract1.add_uint8_euint4(8, this.instances1.alice.encrypt4(4)); + expect(res).to.equal(12n); + }); + + it('test operator "sub" overload (euint4, uint8) => euint4 test 1 (8, 8)', async function () { + const res = await this.contract1.sub_euint4_uint8(this.instances1.alice.encrypt4(8), 8); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint4, uint8) => euint4 test 2 (8, 4)', async function () { + const res = await this.contract1.sub_euint4_uint8(this.instances1.alice.encrypt4(8), 4); + expect(res).to.equal(4n); + }); + + it('test operator "sub" overload (uint8, euint4) => euint4 test 1 (8, 8)', async function () { + const res = await this.contract1.sub_uint8_euint4(8, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (uint8, euint4) => euint4 test 2 (8, 4)', async function () { + const res = await this.contract1.sub_uint8_euint4(8, this.instances1.alice.encrypt4(4)); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint4, uint8) => euint4 test 1 (1, 10)', async function () { + const res = await this.contract1.mul_euint4_uint8(this.instances1.alice.encrypt4(1), 10); + expect(res).to.equal(10n); + }); + + it('test operator "mul" overload (euint4, uint8) => euint4 test 2 (3, 5)', async function () { + const res = await this.contract1.mul_euint4_uint8(this.instances1.alice.encrypt4(3), 5); + expect(res).to.equal(15n); + }); + + it('test operator "mul" overload (euint4, uint8) => euint4 test 3 (3, 3)', async function () { + const res = await this.contract1.mul_euint4_uint8(this.instances1.alice.encrypt4(3), 3); + expect(res).to.equal(9n); + }); + + it('test operator "mul" overload (euint4, uint8) => euint4 test 4 (5, 3)', async function () { + const res = await this.contract1.mul_euint4_uint8(this.instances1.alice.encrypt4(5), 3); + expect(res).to.equal(15n); + }); + + it('test operator "mul" overload (uint8, euint4) => euint4 test 1 (1, 10)', async function () { + const res = await this.contract1.mul_uint8_euint4(1, this.instances1.alice.encrypt4(10)); + expect(res).to.equal(10n); + }); + + it('test operator "mul" overload (uint8, euint4) => euint4 test 2 (3, 4)', async function () { + const res = await this.contract1.mul_uint8_euint4(3, this.instances1.alice.encrypt4(4)); + expect(res).to.equal(12n); + }); + + it('test operator "mul" overload (uint8, euint4) => euint4 test 3 (3, 3)', async function () { + const res = await this.contract1.mul_uint8_euint4(3, this.instances1.alice.encrypt4(3)); + expect(res).to.equal(9n); + }); + + it('test operator "mul" overload (uint8, euint4) => euint4 test 4 (4, 3)', async function () { + const res = await this.contract1.mul_uint8_euint4(4, this.instances1.alice.encrypt4(3)); + expect(res).to.equal(12n); + }); + + it('test operator "div" overload (euint4, uint8) => euint4 test 1 (3, 6)', async function () { + const res = await this.contract1.div_euint4_uint8(this.instances1.alice.encrypt4(3), 6); + expect(res).to.equal(0n); + }); + + it('test operator "div" overload (euint4, uint8) => euint4 test 2 (4, 8)', async function () { + const res = await this.contract1.div_euint4_uint8(this.instances1.alice.encrypt4(4), 8); + expect(res).to.equal(0n); + }); + + it('test operator "div" overload (euint4, uint8) => euint4 test 3 (8, 8)', async function () { + const res = await this.contract1.div_euint4_uint8(this.instances1.alice.encrypt4(8), 8); + expect(res).to.equal(1n); + }); + + it('test operator "div" overload (euint4, uint8) => euint4 test 4 (8, 4)', async function () { + const res = await this.contract1.div_euint4_uint8(this.instances1.alice.encrypt4(8), 4); + expect(res).to.equal(2n); + }); + + it('test operator "rem" overload (euint4, uint8) => euint4 test 1 (4, 10)', async function () { + const res = await this.contract1.rem_euint4_uint8(this.instances1.alice.encrypt4(4), 10); + expect(res).to.equal(4n); + }); + + it('test operator "rem" overload (euint4, uint8) => euint4 test 2 (4, 8)', async function () { + const res = await this.contract1.rem_euint4_uint8(this.instances1.alice.encrypt4(4), 8); + expect(res).to.equal(4n); + }); + + it('test operator "rem" overload (euint4, uint8) => euint4 test 3 (8, 8)', async function () { + const res = await this.contract1.rem_euint4_uint8(this.instances1.alice.encrypt4(8), 8); + expect(res).to.equal(0n); + }); + + it('test operator "rem" overload (euint4, uint8) => euint4 test 4 (8, 4)', async function () { + const res = await this.contract1.rem_euint4_uint8(this.instances1.alice.encrypt4(8), 4); + expect(res).to.equal(0n); + }); + + it('test operator "eq" overload (euint4, uint8) => ebool test 1 (14, 4)', async function () { + const res = await this.contract1.eq_euint4_uint8(this.instances1.alice.encrypt4(14), 4); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint4, uint8) => ebool test 2 (10, 14)', async function () { + const res = await this.contract1.eq_euint4_uint8(this.instances1.alice.encrypt4(10), 14); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint4, uint8) => ebool test 3 (14, 14)', async function () { + const res = await this.contract1.eq_euint4_uint8(this.instances1.alice.encrypt4(14), 14); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint4, uint8) => ebool test 4 (14, 10)', async function () { + const res = await this.contract1.eq_euint4_uint8(this.instances1.alice.encrypt4(14), 10); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (uint8, euint4) => ebool test 1 (11, 1)', async function () { + const res = await this.contract1.eq_uint8_euint4(11, this.instances1.alice.encrypt4(1)); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (uint8, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.eq_uint8_euint4(4, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (uint8, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.eq_uint8_euint4(8, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (uint8, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.eq_uint8_euint4(8, this.instances1.alice.encrypt4(4)); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint4, uint8) => ebool test 1 (7, 12)', async function () { + const res = await this.contract1.ne_euint4_uint8(this.instances1.alice.encrypt4(7), 12); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint4, uint8) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.ne_euint4_uint8(this.instances1.alice.encrypt4(4), 8); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint4, uint8) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.ne_euint4_uint8(this.instances1.alice.encrypt4(8), 8); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint4, uint8) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.ne_euint4_uint8(this.instances1.alice.encrypt4(8), 4); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (uint8, euint4) => ebool test 1 (3, 1)', async function () { + const res = await this.contract1.ne_uint8_euint4(3, this.instances1.alice.encrypt4(1)); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (uint8, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.ne_uint8_euint4(4, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (uint8, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.ne_uint8_euint4(8, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (uint8, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.ne_uint8_euint4(8, this.instances1.alice.encrypt4(4)); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint4, uint8) => ebool test 1 (12, 11)', async function () { + const res = await this.contract1.ge_euint4_uint8(this.instances1.alice.encrypt4(12), 11); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint4, uint8) => ebool test 2 (8, 12)', async function () { + const res = await this.contract1.ge_euint4_uint8(this.instances1.alice.encrypt4(8), 12); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint4, uint8) => ebool test 3 (12, 12)', async function () { + const res = await this.contract1.ge_euint4_uint8(this.instances1.alice.encrypt4(12), 12); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint4, uint8) => ebool test 4 (12, 8)', async function () { + const res = await this.contract1.ge_euint4_uint8(this.instances1.alice.encrypt4(12), 8); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (uint8, euint4) => ebool test 1 (2, 4)', async function () { + const res = await this.contract1.ge_uint8_euint4(2, this.instances1.alice.encrypt4(4)); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (uint8, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.ge_uint8_euint4(4, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (uint8, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.ge_uint8_euint4(8, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (uint8, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.ge_uint8_euint4(8, this.instances1.alice.encrypt4(4)); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint4, uint8) => ebool test 1 (7, 10)', async function () { + const res = await this.contract1.gt_euint4_uint8(this.instances1.alice.encrypt4(7), 10); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint4, uint8) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.gt_euint4_uint8(this.instances1.alice.encrypt4(4), 8); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint4, uint8) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.gt_euint4_uint8(this.instances1.alice.encrypt4(8), 8); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint4, uint8) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.gt_euint4_uint8(this.instances1.alice.encrypt4(8), 4); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (uint8, euint4) => ebool test 1 (4, 14)', async function () { + const res = await this.contract1.gt_uint8_euint4(4, this.instances1.alice.encrypt4(14)); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (uint8, euint4) => ebool test 2 (10, 14)', async function () { + const res = await this.contract1.gt_uint8_euint4(10, this.instances1.alice.encrypt4(14)); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (uint8, euint4) => ebool test 3 (14, 14)', async function () { + const res = await this.contract1.gt_uint8_euint4(14, this.instances1.alice.encrypt4(14)); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (uint8, euint4) => ebool test 4 (14, 10)', async function () { + const res = await this.contract1.gt_uint8_euint4(14, this.instances1.alice.encrypt4(10)); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint4, uint8) => ebool test 1 (14, 8)', async function () { + const res = await this.contract1.le_euint4_uint8(this.instances1.alice.encrypt4(14), 8); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (euint4, uint8) => ebool test 2 (10, 14)', async function () { + const res = await this.contract1.le_euint4_uint8(this.instances1.alice.encrypt4(10), 14); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint4, uint8) => ebool test 3 (14, 14)', async function () { + const res = await this.contract1.le_euint4_uint8(this.instances1.alice.encrypt4(14), 14); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint4, uint8) => ebool test 4 (14, 10)', async function () { + const res = await this.contract1.le_euint4_uint8(this.instances1.alice.encrypt4(14), 10); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (uint8, euint4) => ebool test 1 (11, 8)', async function () { + const res = await this.contract1.le_uint8_euint4(11, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (uint8, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.le_uint8_euint4(4, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (uint8, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.le_uint8_euint4(8, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (uint8, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.le_uint8_euint4(8, this.instances1.alice.encrypt4(4)); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint4, uint8) => ebool test 1 (7, 14)', async function () { + const res = await this.contract1.lt_euint4_uint8(this.instances1.alice.encrypt4(7), 14); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint4, uint8) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.lt_euint4_uint8(this.instances1.alice.encrypt4(4), 8); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint4, uint8) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.lt_euint4_uint8(this.instances1.alice.encrypt4(8), 8); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint4, uint8) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.lt_euint4_uint8(this.instances1.alice.encrypt4(8), 4); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (uint8, euint4) => ebool test 1 (12, 5)', async function () { + const res = await this.contract1.lt_uint8_euint4(12, this.instances1.alice.encrypt4(5)); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (uint8, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract1.lt_uint8_euint4(4, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (uint8, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract1.lt_uint8_euint4(8, this.instances1.alice.encrypt4(8)); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (uint8, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract1.lt_uint8_euint4(8, this.instances1.alice.encrypt4(4)); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint4, uint8) => euint4 test 1 (11, 10)', async function () { + const res = await this.contract1.min_euint4_uint8(this.instances1.alice.encrypt4(11), 10); + expect(res).to.equal(10n); + }); + + it('test operator "min" overload (euint4, uint8) => euint4 test 2 (7, 11)', async function () { + const res = await this.contract1.min_euint4_uint8(this.instances1.alice.encrypt4(7), 11); + expect(res).to.equal(7n); + }); + + it('test operator "min" overload (euint4, uint8) => euint4 test 3 (11, 11)', async function () { + const res = await this.contract1.min_euint4_uint8(this.instances1.alice.encrypt4(11), 11); + expect(res).to.equal(11n); + }); + + it('test operator "min" overload (euint4, uint8) => euint4 test 4 (11, 7)', async function () { + const res = await this.contract1.min_euint4_uint8(this.instances1.alice.encrypt4(11), 7); + expect(res).to.equal(7n); + }); + + it('test operator "min" overload (uint8, euint4) => euint4 test 1 (8, 11)', async function () { + const res = await this.contract1.min_uint8_euint4(8, this.instances1.alice.encrypt4(11)); + expect(res).to.equal(8n); + }); + + it('test operator "min" overload (uint8, euint4) => euint4 test 2 (7, 11)', async function () { + const res = await this.contract1.min_uint8_euint4(7, this.instances1.alice.encrypt4(11)); + expect(res).to.equal(7n); + }); + + it('test operator "min" overload (uint8, euint4) => euint4 test 3 (11, 11)', async function () { + const res = await this.contract1.min_uint8_euint4(11, this.instances1.alice.encrypt4(11)); + expect(res).to.equal(11n); + }); + + it('test operator "min" overload (uint8, euint4) => euint4 test 4 (11, 7)', async function () { + const res = await this.contract1.min_uint8_euint4(11, this.instances1.alice.encrypt4(7)); + expect(res).to.equal(7n); + }); + + it('test operator "max" overload (euint4, uint8) => euint4 test 1 (11, 7)', async function () { + const res = await this.contract1.max_euint4_uint8(this.instances1.alice.encrypt4(11), 7); + expect(res).to.equal(11n); + }); + + it('test operator "max" overload (euint4, uint8) => euint4 test 2 (7, 11)', async function () { + const res = await this.contract1.max_euint4_uint8(this.instances1.alice.encrypt4(7), 11); + expect(res).to.equal(11n); + }); + + it('test operator "max" overload (euint4, uint8) => euint4 test 3 (11, 11)', async function () { + const res = await this.contract1.max_euint4_uint8(this.instances1.alice.encrypt4(11), 11); + expect(res).to.equal(11n); + }); + + it('test operator "max" overload (euint4, uint8) => euint4 test 4 (11, 7)', async function () { + const res = await this.contract1.max_euint4_uint8(this.instances1.alice.encrypt4(11), 7); + expect(res).to.equal(11n); + }); + + it('test operator "max" overload (uint8, euint4) => euint4 test 1 (7, 14)', async function () { + const res = await this.contract1.max_uint8_euint4(7, this.instances1.alice.encrypt4(14)); + expect(res).to.equal(14n); + }); + + it('test operator "max" overload (uint8, euint4) => euint4 test 2 (10, 14)', async function () { + const res = await this.contract1.max_uint8_euint4(10, this.instances1.alice.encrypt4(14)); + expect(res).to.equal(14n); + }); + + it('test operator "max" overload (uint8, euint4) => euint4 test 3 (14, 14)', async function () { + const res = await this.contract1.max_uint8_euint4(14, this.instances1.alice.encrypt4(14)); + expect(res).to.equal(14n); + }); + + it('test operator "max" overload (uint8, euint4) => euint4 test 4 (14, 10)', async function () { + const res = await this.contract1.max_uint8_euint4(14, this.instances1.alice.encrypt4(10)); + expect(res).to.equal(14n); + }); + + it('test operator "add" overload (euint8, euint4) => euint8 test 1 (9, 2)', async function () { + const res = await this.contract1.add_euint8_euint4( + this.instances1.alice.encrypt8(9), + this.instances1.alice.encrypt4(2), + ); + expect(res).to.equal(11n); + }); + + it('test operator "add" overload (euint8, euint4) => euint8 test 2 (4, 8)', async function () { + const res = await this.contract1.add_euint8_euint4( + this.instances1.alice.encrypt8(4), + this.instances1.alice.encrypt4(8), + ); + expect(res).to.equal(12n); + }); + + it('test operator "add" overload (euint8, euint4) => euint8 test 3 (5, 5)', async function () { + const res = await this.contract1.add_euint8_euint4( + this.instances1.alice.encrypt8(5), + this.instances1.alice.encrypt4(5), + ); + expect(res).to.equal(10n); + }); + + it('test operator "add" overload (euint8, euint4) => euint8 test 4 (8, 4)', async function () { + const res = await this.contract1.add_euint8_euint4( + this.instances1.alice.encrypt8(8), + this.instances1.alice.encrypt4(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "sub" overload (euint8, euint4) => euint8 test 1 (8, 8)', async function () { + const res = await this.contract1.sub_euint8_euint4( + this.instances1.alice.encrypt8(8), + this.instances1.alice.encrypt4(8), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint8, euint4) => euint8 test 2 (8, 4)', async function () { + const res = await this.contract1.sub_euint8_euint4( + this.instances1.alice.encrypt8(8), + this.instances1.alice.encrypt4(4), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint8, euint4) => euint8 test 1 (5, 2)', async function () { + const res = await this.contract1.mul_euint8_euint4( + this.instances1.alice.encrypt8(5), + this.instances1.alice.encrypt4(2), + ); + expect(res).to.equal(10n); + }); + + it('test operator "mul" overload (euint8, euint4) => euint8 test 2 (3, 4)', async function () { + const res = await this.contract1.mul_euint8_euint4( + this.instances1.alice.encrypt8(3), + this.instances1.alice.encrypt4(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "mul" overload (euint8, euint4) => euint8 test 3 (3, 3)', async function () { + const res = await this.contract1.mul_euint8_euint4( + this.instances1.alice.encrypt8(3), + this.instances1.alice.encrypt4(3), + ); + expect(res).to.equal(9n); + }); + + it('test operator "mul" overload (euint8, euint4) => euint8 test 4 (4, 3)', async function () { + const res = await this.contract1.mul_euint8_euint4( + this.instances1.alice.encrypt8(4), + this.instances1.alice.encrypt4(3), + ); + expect(res).to.equal(12n); + }); + + it('test operator "and" overload (euint8, euint4) => euint8 test 1 (143, 6)', async function () { + const res = await this.contract1.and_euint8_euint4( + this.instances1.alice.encrypt8(143), + this.instances1.alice.encrypt4(6), + ); + expect(res).to.equal(6n); + }); + + it('test operator "and" overload (euint8, euint4) => euint8 test 2 (4, 8)', async function () { + const res = await this.contract1.and_euint8_euint4( + this.instances1.alice.encrypt8(4), + this.instances1.alice.encrypt4(8), + ); + expect(res).to.equal(0n); + }); + + it('test operator "and" overload (euint8, euint4) => euint8 test 3 (8, 8)', async function () { + const res = await this.contract1.and_euint8_euint4( + this.instances1.alice.encrypt8(8), + this.instances1.alice.encrypt4(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "and" overload (euint8, euint4) => euint8 test 4 (8, 4)', async function () { + const res = await this.contract1.and_euint8_euint4( + this.instances1.alice.encrypt8(8), + this.instances1.alice.encrypt4(4), + ); + expect(res).to.equal(0n); + }); + + it('test operator "or" overload (euint8, euint4) => euint8 test 1 (89, 1)', async function () { + const res = await this.contract1.or_euint8_euint4( + this.instances1.alice.encrypt8(89), + this.instances1.alice.encrypt4(1), + ); + expect(res).to.equal(89n); + }); + + it('test operator "or" overload (euint8, euint4) => euint8 test 2 (4, 8)', async function () { + const res = await this.contract1.or_euint8_euint4( + this.instances1.alice.encrypt8(4), + this.instances1.alice.encrypt4(8), + ); + expect(res).to.equal(12n); + }); + + it('test operator "or" overload (euint8, euint4) => euint8 test 3 (8, 8)', async function () { + const res = await this.contract1.or_euint8_euint4( + this.instances1.alice.encrypt8(8), + this.instances1.alice.encrypt4(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "or" overload (euint8, euint4) => euint8 test 4 (8, 4)', async function () { + const res = await this.contract1.or_euint8_euint4( + this.instances1.alice.encrypt8(8), + this.instances1.alice.encrypt4(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "xor" overload (euint8, euint4) => euint8 test 1 (100, 12)', async function () { + const res = await this.contract1.xor_euint8_euint4( + this.instances1.alice.encrypt8(100), + this.instances1.alice.encrypt4(12), + ); + expect(res).to.equal(104n); + }); + + it('test operator "xor" overload (euint8, euint4) => euint8 test 2 (8, 12)', async function () { + const res = await this.contract1.xor_euint8_euint4( + this.instances1.alice.encrypt8(8), + this.instances1.alice.encrypt4(12), + ); + expect(res).to.equal(4n); + }); + + it('test operator "xor" overload (euint8, euint4) => euint8 test 3 (12, 12)', async function () { + const res = await this.contract1.xor_euint8_euint4( + this.instances1.alice.encrypt8(12), + this.instances1.alice.encrypt4(12), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint8, euint4) => euint8 test 4 (12, 8)', async function () { + const res = await this.contract1.xor_euint8_euint4( + this.instances1.alice.encrypt8(12), + this.instances1.alice.encrypt4(8), + ); + expect(res).to.equal(4n); + }); + + it('test operator "eq" overload (euint8, euint4) => ebool test 1 (168, 1)', async function () { + const res = await this.contract2.eq_euint8_euint4( + this.instances2.alice.encrypt8(168), + this.instances2.alice.encrypt4(1), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint8, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract2.eq_euint8_euint4( + this.instances2.alice.encrypt8(4), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint8, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract2.eq_euint8_euint4( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint8, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract2.eq_euint8_euint4( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint8, euint4) => ebool test 1 (237, 1)', async function () { + const res = await this.contract2.ne_euint8_euint4( + this.instances2.alice.encrypt8(237), + this.instances2.alice.encrypt4(1), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint8, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract2.ne_euint8_euint4( + this.instances2.alice.encrypt8(4), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint8, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract2.ne_euint8_euint4( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint8, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract2.ne_euint8_euint4( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, euint4) => ebool test 1 (228, 4)', async function () { + const res = await this.contract2.ge_euint8_euint4( + this.instances2.alice.encrypt8(228), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract2.ge_euint8_euint4( + this.instances2.alice.encrypt8(4), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint8, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract2.ge_euint8_euint4( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract2.ge_euint8_euint4( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint8, euint4) => ebool test 1 (53, 14)', async function () { + const res = await this.contract2.gt_euint8_euint4( + this.instances2.alice.encrypt8(53), + this.instances2.alice.encrypt4(14), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint8, euint4) => ebool test 2 (10, 14)', async function () { + const res = await this.contract2.gt_euint8_euint4( + this.instances2.alice.encrypt8(10), + this.instances2.alice.encrypt4(14), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint4) => ebool test 3 (14, 14)', async function () { + const res = await this.contract2.gt_euint8_euint4( + this.instances2.alice.encrypt8(14), + this.instances2.alice.encrypt4(14), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint4) => ebool test 4 (14, 10)', async function () { + const res = await this.contract2.gt_euint8_euint4( + this.instances2.alice.encrypt8(14), + this.instances2.alice.encrypt4(10), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint4) => ebool test 1 (194, 8)', async function () { + const res = await this.contract2.le_euint8_euint4( + this.instances2.alice.encrypt8(194), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (euint8, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract2.le_euint8_euint4( + this.instances2.alice.encrypt8(4), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract2.le_euint8_euint4( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract2.le_euint8_euint4( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, euint4) => ebool test 1 (130, 5)', async function () { + const res = await this.contract2.lt_euint8_euint4( + this.instances2.alice.encrypt8(130), + this.instances2.alice.encrypt4(5), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract2.lt_euint8_euint4( + this.instances2.alice.encrypt8(4), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint8, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract2.lt_euint8_euint4( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract2.lt_euint8_euint4( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint8, euint4) => euint8 test 1 (58, 11)', async function () { + const res = await this.contract2.min_euint8_euint4( + this.instances2.alice.encrypt8(58), + this.instances2.alice.encrypt4(11), + ); + expect(res).to.equal(11n); + }); + + it('test operator "min" overload (euint8, euint4) => euint8 test 2 (7, 11)', async function () { + const res = await this.contract2.min_euint8_euint4( + this.instances2.alice.encrypt8(7), + this.instances2.alice.encrypt4(11), + ); + expect(res).to.equal(7n); + }); + + it('test operator "min" overload (euint8, euint4) => euint8 test 3 (11, 11)', async function () { + const res = await this.contract2.min_euint8_euint4( + this.instances2.alice.encrypt8(11), + this.instances2.alice.encrypt4(11), + ); + expect(res).to.equal(11n); + }); + + it('test operator "min" overload (euint8, euint4) => euint8 test 4 (11, 7)', async function () { + const res = await this.contract2.min_euint8_euint4( + this.instances2.alice.encrypt8(11), + this.instances2.alice.encrypt4(7), + ); + expect(res).to.equal(7n); + }); + + it('test operator "max" overload (euint8, euint4) => euint8 test 1 (211, 14)', async function () { + const res = await this.contract2.max_euint8_euint4( + this.instances2.alice.encrypt8(211), + this.instances2.alice.encrypt4(14), + ); + expect(res).to.equal(211n); + }); + + it('test operator "max" overload (euint8, euint4) => euint8 test 2 (10, 14)', async function () { + const res = await this.contract2.max_euint8_euint4( + this.instances2.alice.encrypt8(10), + this.instances2.alice.encrypt4(14), + ); + expect(res).to.equal(14n); + }); + + it('test operator "max" overload (euint8, euint4) => euint8 test 3 (14, 14)', async function () { + const res = await this.contract2.max_euint8_euint4( + this.instances2.alice.encrypt8(14), + this.instances2.alice.encrypt4(14), + ); + expect(res).to.equal(14n); + }); + + it('test operator "max" overload (euint8, euint4) => euint8 test 4 (14, 10)', async function () { + const res = await this.contract2.max_euint8_euint4( + this.instances2.alice.encrypt8(14), + this.instances2.alice.encrypt4(10), + ); + expect(res).to.equal(14n); + }); + + it('test operator "add" overload (euint8, euint8) => euint8 test 1 (93, 114)', async function () { + const res = await this.contract2.add_euint8_euint8( + this.instances2.alice.encrypt8(93), + this.instances2.alice.encrypt8(114), + ); + expect(res).to.equal(207n); + }); + + it('test operator "add" overload (euint8, euint8) => euint8 test 2 (91, 93)', async function () { + const res = await this.contract2.add_euint8_euint8( + this.instances2.alice.encrypt8(91), + this.instances2.alice.encrypt8(93), + ); + expect(res).to.equal(184n); + }); + + it('test operator "add" overload (euint8, euint8) => euint8 test 3 (93, 93)', async function () { + const res = await this.contract2.add_euint8_euint8( + this.instances2.alice.encrypt8(93), + this.instances2.alice.encrypt8(93), + ); + expect(res).to.equal(186n); + }); + + it('test operator "add" overload (euint8, euint8) => euint8 test 4 (93, 91)', async function () { + const res = await this.contract2.add_euint8_euint8( + this.instances2.alice.encrypt8(93), + this.instances2.alice.encrypt8(91), + ); + expect(res).to.equal(184n); + }); + + it('test operator "sub" overload (euint8, euint8) => euint8 test 1 (52, 52)', async function () { + const res = await this.contract2.sub_euint8_euint8( + this.instances2.alice.encrypt8(52), + this.instances2.alice.encrypt8(52), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint8, euint8) => euint8 test 2 (52, 48)', async function () { + const res = await this.contract2.sub_euint8_euint8( + this.instances2.alice.encrypt8(52), + this.instances2.alice.encrypt8(48), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint8, euint8) => euint8 test 1 (9, 17)', async function () { + const res = await this.contract2.mul_euint8_euint8( + this.instances2.alice.encrypt8(9), + this.instances2.alice.encrypt8(17), + ); + expect(res).to.equal(153n); + }); + + it('test operator "mul" overload (euint8, euint8) => euint8 test 2 (15, 16)', async function () { + const res = await this.contract2.mul_euint8_euint8( + this.instances2.alice.encrypt8(15), + this.instances2.alice.encrypt8(16), + ); + expect(res).to.equal(240n); + }); + + it('test operator "mul" overload (euint8, euint8) => euint8 test 3 (9, 9)', async function () { + const res = await this.contract2.mul_euint8_euint8( + this.instances2.alice.encrypt8(9), + this.instances2.alice.encrypt8(9), + ); + expect(res).to.equal(81n); + }); + + it('test operator "mul" overload (euint8, euint8) => euint8 test 4 (16, 15)', async function () { + const res = await this.contract2.mul_euint8_euint8( + this.instances2.alice.encrypt8(16), + this.instances2.alice.encrypt8(15), + ); + expect(res).to.equal(240n); + }); + + it('test operator "and" overload (euint8, euint8) => euint8 test 1 (254, 204)', async function () { + const res = await this.contract2.and_euint8_euint8( + this.instances2.alice.encrypt8(254), + this.instances2.alice.encrypt8(204), + ); + expect(res).to.equal(204n); + }); + + it('test operator "and" overload (euint8, euint8) => euint8 test 2 (200, 204)', async function () { + const res = await this.contract2.and_euint8_euint8( + this.instances2.alice.encrypt8(200), + this.instances2.alice.encrypt8(204), + ); + expect(res).to.equal(200n); + }); + + it('test operator "and" overload (euint8, euint8) => euint8 test 3 (204, 204)', async function () { + const res = await this.contract2.and_euint8_euint8( + this.instances2.alice.encrypt8(204), + this.instances2.alice.encrypt8(204), + ); + expect(res).to.equal(204n); + }); + + it('test operator "and" overload (euint8, euint8) => euint8 test 4 (204, 200)', async function () { + const res = await this.contract2.and_euint8_euint8( + this.instances2.alice.encrypt8(204), + this.instances2.alice.encrypt8(200), + ); + expect(res).to.equal(200n); + }); + + it('test operator "or" overload (euint8, euint8) => euint8 test 1 (174, 137)', async function () { + const res = await this.contract2.or_euint8_euint8( + this.instances2.alice.encrypt8(174), + this.instances2.alice.encrypt8(137), + ); + expect(res).to.equal(175n); + }); + + it('test operator "or" overload (euint8, euint8) => euint8 test 2 (133, 137)', async function () { + const res = await this.contract2.or_euint8_euint8( + this.instances2.alice.encrypt8(133), + this.instances2.alice.encrypt8(137), + ); + expect(res).to.equal(141n); + }); + + it('test operator "or" overload (euint8, euint8) => euint8 test 3 (137, 137)', async function () { + const res = await this.contract2.or_euint8_euint8( + this.instances2.alice.encrypt8(137), + this.instances2.alice.encrypt8(137), + ); + expect(res).to.equal(137n); + }); + + it('test operator "or" overload (euint8, euint8) => euint8 test 4 (137, 133)', async function () { + const res = await this.contract2.or_euint8_euint8( + this.instances2.alice.encrypt8(137), + this.instances2.alice.encrypt8(133), + ); + expect(res).to.equal(141n); + }); + + it('test operator "xor" overload (euint8, euint8) => euint8 test 1 (183, 10)', async function () { + const res = await this.contract2.xor_euint8_euint8( + this.instances2.alice.encrypt8(183), + this.instances2.alice.encrypt8(10), + ); + expect(res).to.equal(189n); + }); + + it('test operator "xor" overload (euint8, euint8) => euint8 test 2 (6, 10)', async function () { + const res = await this.contract2.xor_euint8_euint8( + this.instances2.alice.encrypt8(6), + this.instances2.alice.encrypt8(10), + ); + expect(res).to.equal(12n); + }); + + it('test operator "xor" overload (euint8, euint8) => euint8 test 3 (10, 10)', async function () { + const res = await this.contract2.xor_euint8_euint8( + this.instances2.alice.encrypt8(10), + this.instances2.alice.encrypt8(10), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint8, euint8) => euint8 test 4 (10, 6)', async function () { + const res = await this.contract2.xor_euint8_euint8( + this.instances2.alice.encrypt8(10), + this.instances2.alice.encrypt8(6), + ); + expect(res).to.equal(12n); + }); + + it('test operator "eq" overload (euint8, euint8) => ebool test 1 (101, 188)', async function () { + const res = await this.contract2.eq_euint8_euint8( + this.instances2.alice.encrypt8(101), + this.instances2.alice.encrypt8(188), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint8, euint8) => ebool test 2 (97, 101)', async function () { + const res = await this.contract2.eq_euint8_euint8( + this.instances2.alice.encrypt8(97), + this.instances2.alice.encrypt8(101), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint8, euint8) => ebool test 3 (101, 101)', async function () { + const res = await this.contract2.eq_euint8_euint8( + this.instances2.alice.encrypt8(101), + this.instances2.alice.encrypt8(101), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint8, euint8) => ebool test 4 (101, 97)', async function () { + const res = await this.contract2.eq_euint8_euint8( + this.instances2.alice.encrypt8(101), + this.instances2.alice.encrypt8(97), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint8, euint8) => ebool test 1 (250, 143)', async function () { + const res = await this.contract2.ne_euint8_euint8( + this.instances2.alice.encrypt8(250), + this.instances2.alice.encrypt8(143), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint8, euint8) => ebool test 2 (139, 143)', async function () { + const res = await this.contract2.ne_euint8_euint8( + this.instances2.alice.encrypt8(139), + this.instances2.alice.encrypt8(143), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint8, euint8) => ebool test 3 (143, 143)', async function () { + const res = await this.contract2.ne_euint8_euint8( + this.instances2.alice.encrypt8(143), + this.instances2.alice.encrypt8(143), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint8, euint8) => ebool test 4 (143, 139)', async function () { + const res = await this.contract2.ne_euint8_euint8( + this.instances2.alice.encrypt8(143), + this.instances2.alice.encrypt8(139), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, euint8) => ebool test 1 (41, 173)', async function () { + const res = await this.contract2.ge_euint8_euint8( + this.instances2.alice.encrypt8(41), + this.instances2.alice.encrypt8(173), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint8, euint8) => ebool test 2 (37, 41)', async function () { + const res = await this.contract2.ge_euint8_euint8( + this.instances2.alice.encrypt8(37), + this.instances2.alice.encrypt8(41), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint8, euint8) => ebool test 3 (41, 41)', async function () { + const res = await this.contract2.ge_euint8_euint8( + this.instances2.alice.encrypt8(41), + this.instances2.alice.encrypt8(41), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, euint8) => ebool test 4 (41, 37)', async function () { + const res = await this.contract2.ge_euint8_euint8( + this.instances2.alice.encrypt8(41), + this.instances2.alice.encrypt8(37), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint8, euint8) => ebool test 1 (225, 96)', async function () { + const res = await this.contract2.gt_euint8_euint8( + this.instances2.alice.encrypt8(225), + this.instances2.alice.encrypt8(96), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint8, euint8) => ebool test 2 (92, 96)', async function () { + const res = await this.contract2.gt_euint8_euint8( + this.instances2.alice.encrypt8(92), + this.instances2.alice.encrypt8(96), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint8) => ebool test 3 (96, 96)', async function () { + const res = await this.contract2.gt_euint8_euint8( + this.instances2.alice.encrypt8(96), + this.instances2.alice.encrypt8(96), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint8) => ebool test 4 (96, 92)', async function () { + const res = await this.contract2.gt_euint8_euint8( + this.instances2.alice.encrypt8(96), + this.instances2.alice.encrypt8(92), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint8) => ebool test 1 (102, 4)', async function () { + const res = await this.contract2.le_euint8_euint8( + this.instances2.alice.encrypt8(102), + this.instances2.alice.encrypt8(4), + ); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (euint8, euint8) => ebool test 2 (4, 8)', async function () { + const res = await this.contract2.le_euint8_euint8( + this.instances2.alice.encrypt8(4), + this.instances2.alice.encrypt8(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint8) => ebool test 3 (8, 8)', async function () { + const res = await this.contract2.le_euint8_euint8( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt8(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint8) => ebool test 4 (8, 4)', async function () { + const res = await this.contract2.le_euint8_euint8( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt8(4), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, euint8) => ebool test 1 (253, 98)', async function () { + const res = await this.contract2.lt_euint8_euint8( + this.instances2.alice.encrypt8(253), + this.instances2.alice.encrypt8(98), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, euint8) => ebool test 2 (94, 98)', async function () { + const res = await this.contract2.lt_euint8_euint8( + this.instances2.alice.encrypt8(94), + this.instances2.alice.encrypt8(98), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint8, euint8) => ebool test 3 (98, 98)', async function () { + const res = await this.contract2.lt_euint8_euint8( + this.instances2.alice.encrypt8(98), + this.instances2.alice.encrypt8(98), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, euint8) => ebool test 4 (98, 94)', async function () { + const res = await this.contract2.lt_euint8_euint8( + this.instances2.alice.encrypt8(98), + this.instances2.alice.encrypt8(94), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint8, euint8) => euint8 test 1 (53, 97)', async function () { + const res = await this.contract2.min_euint8_euint8( + this.instances2.alice.encrypt8(53), + this.instances2.alice.encrypt8(97), + ); + expect(res).to.equal(53n); + }); + + it('test operator "min" overload (euint8, euint8) => euint8 test 2 (49, 53)', async function () { + const res = await this.contract2.min_euint8_euint8( + this.instances2.alice.encrypt8(49), + this.instances2.alice.encrypt8(53), + ); + expect(res).to.equal(49n); + }); + + it('test operator "min" overload (euint8, euint8) => euint8 test 3 (53, 53)', async function () { + const res = await this.contract2.min_euint8_euint8( + this.instances2.alice.encrypt8(53), + this.instances2.alice.encrypt8(53), + ); + expect(res).to.equal(53n); + }); + + it('test operator "min" overload (euint8, euint8) => euint8 test 4 (53, 49)', async function () { + const res = await this.contract2.min_euint8_euint8( + this.instances2.alice.encrypt8(53), + this.instances2.alice.encrypt8(49), + ); + expect(res).to.equal(49n); + }); + + it('test operator "max" overload (euint8, euint8) => euint8 test 1 (198, 211)', async function () { + const res = await this.contract2.max_euint8_euint8( + this.instances2.alice.encrypt8(198), + this.instances2.alice.encrypt8(211), + ); + expect(res).to.equal(211n); + }); + + it('test operator "max" overload (euint8, euint8) => euint8 test 2 (194, 198)', async function () { + const res = await this.contract2.max_euint8_euint8( + this.instances2.alice.encrypt8(194), + this.instances2.alice.encrypt8(198), + ); + expect(res).to.equal(198n); + }); + + it('test operator "max" overload (euint8, euint8) => euint8 test 3 (198, 198)', async function () { + const res = await this.contract2.max_euint8_euint8( + this.instances2.alice.encrypt8(198), + this.instances2.alice.encrypt8(198), + ); + expect(res).to.equal(198n); + }); + + it('test operator "max" overload (euint8, euint8) => euint8 test 4 (198, 194)', async function () { + const res = await this.contract2.max_euint8_euint8( + this.instances2.alice.encrypt8(198), + this.instances2.alice.encrypt8(194), + ); + expect(res).to.equal(198n); + }); + + it('test operator "add" overload (euint8, euint16) => euint16 test 1 (2, 208)', async function () { + const res = await this.contract2.add_euint8_euint16( + this.instances2.alice.encrypt8(2), + this.instances2.alice.encrypt16(208), + ); + expect(res).to.equal(210n); + }); + + it('test operator "add" overload (euint8, euint16) => euint16 test 2 (83, 85)', async function () { + const res = await this.contract2.add_euint8_euint16( + this.instances2.alice.encrypt8(83), + this.instances2.alice.encrypt16(85), + ); + expect(res).to.equal(168n); + }); + + it('test operator "add" overload (euint8, euint16) => euint16 test 3 (85, 85)', async function () { + const res = await this.contract2.add_euint8_euint16( + this.instances2.alice.encrypt8(85), + this.instances2.alice.encrypt16(85), + ); + expect(res).to.equal(170n); + }); + + it('test operator "add" overload (euint8, euint16) => euint16 test 4 (85, 83)', async function () { + const res = await this.contract2.add_euint8_euint16( + this.instances2.alice.encrypt8(85), + this.instances2.alice.encrypt16(83), + ); + expect(res).to.equal(168n); + }); + + it('test operator "sub" overload (euint8, euint16) => euint16 test 1 (236, 236)', async function () { + const res = await this.contract2.sub_euint8_euint16( + this.instances2.alice.encrypt8(236), + this.instances2.alice.encrypt16(236), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint8, euint16) => euint16 test 2 (236, 232)', async function () { + const res = await this.contract2.sub_euint8_euint16( + this.instances2.alice.encrypt8(236), + this.instances2.alice.encrypt16(232), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint8, euint16) => euint16 test 1 (3, 60)', async function () { + const res = await this.contract2.mul_euint8_euint16( + this.instances2.alice.encrypt8(3), + this.instances2.alice.encrypt16(60), + ); + expect(res).to.equal(180n); + }); + + it('test operator "mul" overload (euint8, euint16) => euint16 test 2 (9, 9)', async function () { + const res = await this.contract2.mul_euint8_euint16( + this.instances2.alice.encrypt8(9), + this.instances2.alice.encrypt16(9), + ); + expect(res).to.equal(81n); + }); + + it('test operator "mul" overload (euint8, euint16) => euint16 test 3 (9, 9)', async function () { + const res = await this.contract2.mul_euint8_euint16( + this.instances2.alice.encrypt8(9), + this.instances2.alice.encrypt16(9), + ); + expect(res).to.equal(81n); + }); + + it('test operator "mul" overload (euint8, euint16) => euint16 test 4 (9, 9)', async function () { + const res = await this.contract2.mul_euint8_euint16( + this.instances2.alice.encrypt8(9), + this.instances2.alice.encrypt16(9), + ); + expect(res).to.equal(81n); + }); + + it('test operator "and" overload (euint8, euint16) => euint16 test 1 (112, 22367)', async function () { + const res = await this.contract2.and_euint8_euint16( + this.instances2.alice.encrypt8(112), + this.instances2.alice.encrypt16(22367), + ); + expect(res).to.equal(80n); + }); + + it('test operator "and" overload (euint8, euint16) => euint16 test 2 (108, 112)', async function () { + const res = await this.contract2.and_euint8_euint16( + this.instances2.alice.encrypt8(108), + this.instances2.alice.encrypt16(112), + ); + expect(res).to.equal(96n); + }); + + it('test operator "and" overload (euint8, euint16) => euint16 test 3 (112, 112)', async function () { + const res = await this.contract2.and_euint8_euint16( + this.instances2.alice.encrypt8(112), + this.instances2.alice.encrypt16(112), + ); + expect(res).to.equal(112n); + }); + + it('test operator "and" overload (euint8, euint16) => euint16 test 4 (112, 108)', async function () { + const res = await this.contract2.and_euint8_euint16( + this.instances2.alice.encrypt8(112), + this.instances2.alice.encrypt16(108), + ); + expect(res).to.equal(96n); + }); + + it('test operator "or" overload (euint8, euint16) => euint16 test 1 (99, 46031)', async function () { + const res = await this.contract2.or_euint8_euint16( + this.instances2.alice.encrypt8(99), + this.instances2.alice.encrypt16(46031), + ); + expect(res).to.equal(46063n); + }); + + it('test operator "or" overload (euint8, euint16) => euint16 test 2 (95, 99)', async function () { + const res = await this.contract2.or_euint8_euint16( + this.instances2.alice.encrypt8(95), + this.instances2.alice.encrypt16(99), + ); + expect(res).to.equal(127n); + }); + + it('test operator "or" overload (euint8, euint16) => euint16 test 3 (99, 99)', async function () { + const res = await this.contract2.or_euint8_euint16( + this.instances2.alice.encrypt8(99), + this.instances2.alice.encrypt16(99), + ); + expect(res).to.equal(99n); + }); + + it('test operator "or" overload (euint8, euint16) => euint16 test 4 (99, 95)', async function () { + const res = await this.contract2.or_euint8_euint16( + this.instances2.alice.encrypt8(99), + this.instances2.alice.encrypt16(95), + ); + expect(res).to.equal(127n); + }); + + it('test operator "xor" overload (euint8, euint16) => euint16 test 1 (129, 2322)', async function () { + const res = await this.contract2.xor_euint8_euint16( + this.instances2.alice.encrypt8(129), + this.instances2.alice.encrypt16(2322), + ); + expect(res).to.equal(2451n); + }); + + it('test operator "xor" overload (euint8, euint16) => euint16 test 2 (125, 129)', async function () { + const res = await this.contract2.xor_euint8_euint16( + this.instances2.alice.encrypt8(125), + this.instances2.alice.encrypt16(129), + ); + expect(res).to.equal(252n); + }); + + it('test operator "xor" overload (euint8, euint16) => euint16 test 3 (129, 129)', async function () { + const res = await this.contract2.xor_euint8_euint16( + this.instances2.alice.encrypt8(129), + this.instances2.alice.encrypt16(129), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint8, euint16) => euint16 test 4 (129, 125)', async function () { + const res = await this.contract2.xor_euint8_euint16( + this.instances2.alice.encrypt8(129), + this.instances2.alice.encrypt16(125), + ); + expect(res).to.equal(252n); + }); + + it('test operator "eq" overload (euint8, euint16) => ebool test 1 (111, 58517)', async function () { + const res = await this.contract2.eq_euint8_euint16( + this.instances2.alice.encrypt8(111), + this.instances2.alice.encrypt16(58517), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint8, euint16) => ebool test 2 (107, 111)', async function () { + const res = await this.contract2.eq_euint8_euint16( + this.instances2.alice.encrypt8(107), + this.instances2.alice.encrypt16(111), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint8, euint16) => ebool test 3 (111, 111)', async function () { + const res = await this.contract2.eq_euint8_euint16( + this.instances2.alice.encrypt8(111), + this.instances2.alice.encrypt16(111), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint8, euint16) => ebool test 4 (111, 107)', async function () { + const res = await this.contract2.eq_euint8_euint16( + this.instances2.alice.encrypt8(111), + this.instances2.alice.encrypt16(107), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint8, euint16) => ebool test 1 (86, 21243)', async function () { + const res = await this.contract2.ne_euint8_euint16( + this.instances2.alice.encrypt8(86), + this.instances2.alice.encrypt16(21243), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint8, euint16) => ebool test 2 (82, 86)', async function () { + const res = await this.contract2.ne_euint8_euint16( + this.instances2.alice.encrypt8(82), + this.instances2.alice.encrypt16(86), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint8, euint16) => ebool test 3 (86, 86)', async function () { + const res = await this.contract2.ne_euint8_euint16( + this.instances2.alice.encrypt8(86), + this.instances2.alice.encrypt16(86), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint8, euint16) => ebool test 4 (86, 82)', async function () { + const res = await this.contract2.ne_euint8_euint16( + this.instances2.alice.encrypt8(86), + this.instances2.alice.encrypt16(82), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, euint16) => ebool test 1 (204, 4953)', async function () { + const res = await this.contract2.ge_euint8_euint16( + this.instances2.alice.encrypt8(204), + this.instances2.alice.encrypt16(4953), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint8, euint16) => ebool test 2 (200, 204)', async function () { + const res = await this.contract2.ge_euint8_euint16( + this.instances2.alice.encrypt8(200), + this.instances2.alice.encrypt16(204), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint8, euint16) => ebool test 3 (204, 204)', async function () { + const res = await this.contract2.ge_euint8_euint16( + this.instances2.alice.encrypt8(204), + this.instances2.alice.encrypt16(204), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, euint16) => ebool test 4 (204, 200)', async function () { + const res = await this.contract2.ge_euint8_euint16( + this.instances2.alice.encrypt8(204), + this.instances2.alice.encrypt16(200), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint8, euint16) => ebool test 1 (254, 24172)', async function () { + const res = await this.contract2.gt_euint8_euint16( + this.instances2.alice.encrypt8(254), + this.instances2.alice.encrypt16(24172), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint16) => ebool test 2 (250, 254)', async function () { + const res = await this.contract2.gt_euint8_euint16( + this.instances2.alice.encrypt8(250), + this.instances2.alice.encrypt16(254), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint16) => ebool test 3 (254, 254)', async function () { + const res = await this.contract2.gt_euint8_euint16( + this.instances2.alice.encrypt8(254), + this.instances2.alice.encrypt16(254), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint16) => ebool test 4 (254, 250)', async function () { + const res = await this.contract2.gt_euint8_euint16( + this.instances2.alice.encrypt8(254), + this.instances2.alice.encrypt16(250), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint16) => ebool test 1 (31, 28651)', async function () { + const res = await this.contract2.le_euint8_euint16( + this.instances2.alice.encrypt8(31), + this.instances2.alice.encrypt16(28651), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint16) => ebool test 2 (27, 31)', async function () { + const res = await this.contract2.le_euint8_euint16( + this.instances2.alice.encrypt8(27), + this.instances2.alice.encrypt16(31), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint16) => ebool test 3 (31, 31)', async function () { + const res = await this.contract2.le_euint8_euint16( + this.instances2.alice.encrypt8(31), + this.instances2.alice.encrypt16(31), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint16) => ebool test 4 (31, 27)', async function () { + const res = await this.contract2.le_euint8_euint16( + this.instances2.alice.encrypt8(31), + this.instances2.alice.encrypt16(27), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, euint16) => ebool test 1 (113, 2877)', async function () { + const res = await this.contract2.lt_euint8_euint16( + this.instances2.alice.encrypt8(113), + this.instances2.alice.encrypt16(2877), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint8, euint16) => ebool test 2 (109, 113)', async function () { + const res = await this.contract2.lt_euint8_euint16( + this.instances2.alice.encrypt8(109), + this.instances2.alice.encrypt16(113), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint8, euint16) => ebool test 3 (113, 113)', async function () { + const res = await this.contract2.lt_euint8_euint16( + this.instances2.alice.encrypt8(113), + this.instances2.alice.encrypt16(113), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, euint16) => ebool test 4 (113, 109)', async function () { + const res = await this.contract2.lt_euint8_euint16( + this.instances2.alice.encrypt8(113), + this.instances2.alice.encrypt16(109), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint8, euint16) => euint16 test 1 (190, 58049)', async function () { + const res = await this.contract2.min_euint8_euint16( + this.instances2.alice.encrypt8(190), + this.instances2.alice.encrypt16(58049), + ); + expect(res).to.equal(190n); + }); + + it('test operator "min" overload (euint8, euint16) => euint16 test 2 (186, 190)', async function () { + const res = await this.contract2.min_euint8_euint16( + this.instances2.alice.encrypt8(186), + this.instances2.alice.encrypt16(190), + ); + expect(res).to.equal(186n); + }); + + it('test operator "min" overload (euint8, euint16) => euint16 test 3 (190, 190)', async function () { + const res = await this.contract2.min_euint8_euint16( + this.instances2.alice.encrypt8(190), + this.instances2.alice.encrypt16(190), + ); + expect(res).to.equal(190n); + }); + + it('test operator "min" overload (euint8, euint16) => euint16 test 4 (190, 186)', async function () { + const res = await this.contract2.min_euint8_euint16( + this.instances2.alice.encrypt8(190), + this.instances2.alice.encrypt16(186), + ); + expect(res).to.equal(186n); + }); + + it('test operator "max" overload (euint8, euint16) => euint16 test 1 (8, 11440)', async function () { + const res = await this.contract2.max_euint8_euint16( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt16(11440), + ); + expect(res).to.equal(11440n); + }); + + it('test operator "max" overload (euint8, euint16) => euint16 test 2 (4, 8)', async function () { + const res = await this.contract2.max_euint8_euint16( + this.instances2.alice.encrypt8(4), + this.instances2.alice.encrypt16(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "max" overload (euint8, euint16) => euint16 test 3 (8, 8)', async function () { + const res = await this.contract2.max_euint8_euint16( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt16(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "max" overload (euint8, euint16) => euint16 test 4 (8, 4)', async function () { + const res = await this.contract2.max_euint8_euint16( + this.instances2.alice.encrypt8(8), + this.instances2.alice.encrypt16(4), + ); + expect(res).to.equal(8n); + }); + + it('test operator "add" overload (euint8, euint32) => euint32 test 1 (2, 161)', async function () { + const res = await this.contract2.add_euint8_euint32( + this.instances2.alice.encrypt8(2), + this.instances2.alice.encrypt32(161), + ); + expect(res).to.equal(163n); + }); + + it('test operator "add" overload (euint8, euint32) => euint32 test 2 (96, 100)', async function () { + const res = await this.contract2.add_euint8_euint32( + this.instances2.alice.encrypt8(96), + this.instances2.alice.encrypt32(100), + ); + expect(res).to.equal(196n); + }); + + it('test operator "add" overload (euint8, euint32) => euint32 test 3 (100, 100)', async function () { + const res = await this.contract2.add_euint8_euint32( + this.instances2.alice.encrypt8(100), + this.instances2.alice.encrypt32(100), + ); + expect(res).to.equal(200n); + }); + + it('test operator "add" overload (euint8, euint32) => euint32 test 4 (100, 96)', async function () { + const res = await this.contract2.add_euint8_euint32( + this.instances2.alice.encrypt8(100), + this.instances2.alice.encrypt32(96), + ); + expect(res).to.equal(196n); + }); + + it('test operator "sub" overload (euint8, euint32) => euint32 test 1 (83, 83)', async function () { + const res = await this.contract2.sub_euint8_euint32( + this.instances2.alice.encrypt8(83), + this.instances2.alice.encrypt32(83), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint8, euint32) => euint32 test 2 (83, 79)', async function () { + const res = await this.contract2.sub_euint8_euint32( + this.instances2.alice.encrypt8(83), + this.instances2.alice.encrypt32(79), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint8, euint32) => euint32 test 1 (2, 96)', async function () { + const res = await this.contract2.mul_euint8_euint32( + this.instances2.alice.encrypt8(2), + this.instances2.alice.encrypt32(96), + ); + expect(res).to.equal(192n); + }); + + it('test operator "mul" overload (euint8, euint32) => euint32 test 2 (10, 12)', async function () { + const res = await this.contract2.mul_euint8_euint32( + this.instances2.alice.encrypt8(10), + this.instances2.alice.encrypt32(12), + ); + expect(res).to.equal(120n); + }); + + it('test operator "mul" overload (euint8, euint32) => euint32 test 3 (12, 12)', async function () { + const res = await this.contract2.mul_euint8_euint32( + this.instances2.alice.encrypt8(12), + this.instances2.alice.encrypt32(12), + ); + expect(res).to.equal(144n); + }); + + it('test operator "mul" overload (euint8, euint32) => euint32 test 4 (12, 10)', async function () { + const res = await this.contract2.mul_euint8_euint32( + this.instances2.alice.encrypt8(12), + this.instances2.alice.encrypt32(10), + ); + expect(res).to.equal(120n); + }); + + it('test operator "and" overload (euint8, euint32) => euint32 test 1 (36, 664013992)', async function () { + const res = await this.contract2.and_euint8_euint32( + this.instances2.alice.encrypt8(36), + this.instances2.alice.encrypt32(664013992), + ); + expect(res).to.equal(32n); + }); + + it('test operator "and" overload (euint8, euint32) => euint32 test 2 (32, 36)', async function () { + const res = await this.contract2.and_euint8_euint32( + this.instances2.alice.encrypt8(32), + this.instances2.alice.encrypt32(36), + ); + expect(res).to.equal(32n); + }); + + it('test operator "and" overload (euint8, euint32) => euint32 test 3 (36, 36)', async function () { + const res = await this.contract2.and_euint8_euint32( + this.instances2.alice.encrypt8(36), + this.instances2.alice.encrypt32(36), + ); + expect(res).to.equal(36n); + }); + + it('test operator "and" overload (euint8, euint32) => euint32 test 4 (36, 32)', async function () { + const res = await this.contract2.and_euint8_euint32( + this.instances2.alice.encrypt8(36), + this.instances2.alice.encrypt32(32), + ); + expect(res).to.equal(32n); + }); + + it('test operator "or" overload (euint8, euint32) => euint32 test 1 (50, 1388677537)', async function () { + const res = await this.contract2.or_euint8_euint32( + this.instances2.alice.encrypt8(50), + this.instances2.alice.encrypt32(1388677537), + ); + expect(res).to.equal(1388677555n); + }); + + it('test operator "or" overload (euint8, euint32) => euint32 test 2 (46, 50)', async function () { + const res = await this.contract2.or_euint8_euint32( + this.instances2.alice.encrypt8(46), + this.instances2.alice.encrypt32(50), + ); + expect(res).to.equal(62n); + }); + + it('test operator "or" overload (euint8, euint32) => euint32 test 3 (50, 50)', async function () { + const res = await this.contract2.or_euint8_euint32( + this.instances2.alice.encrypt8(50), + this.instances2.alice.encrypt32(50), + ); + expect(res).to.equal(50n); + }); + + it('test operator "or" overload (euint8, euint32) => euint32 test 4 (50, 46)', async function () { + const res = await this.contract2.or_euint8_euint32( + this.instances2.alice.encrypt8(50), + this.instances2.alice.encrypt32(46), + ); + expect(res).to.equal(62n); + }); + + it('test operator "xor" overload (euint8, euint32) => euint32 test 1 (67, 2386754441)', async function () { + const res = await this.contract2.xor_euint8_euint32( + this.instances2.alice.encrypt8(67), + this.instances2.alice.encrypt32(2386754441), + ); + expect(res).to.equal(2386754506n); + }); + + it('test operator "xor" overload (euint8, euint32) => euint32 test 2 (63, 67)', async function () { + const res = await this.contract2.xor_euint8_euint32( + this.instances2.alice.encrypt8(63), + this.instances2.alice.encrypt32(67), + ); + expect(res).to.equal(124n); + }); + + it('test operator "xor" overload (euint8, euint32) => euint32 test 3 (67, 67)', async function () { + const res = await this.contract2.xor_euint8_euint32( + this.instances2.alice.encrypt8(67), + this.instances2.alice.encrypt32(67), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint8, euint32) => euint32 test 4 (67, 63)', async function () { + const res = await this.contract2.xor_euint8_euint32( + this.instances2.alice.encrypt8(67), + this.instances2.alice.encrypt32(63), + ); + expect(res).to.equal(124n); + }); + + it('test operator "eq" overload (euint8, euint32) => ebool test 1 (161, 1325601812)', async function () { + const res = await this.contract2.eq_euint8_euint32( + this.instances2.alice.encrypt8(161), + this.instances2.alice.encrypt32(1325601812), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint8, euint32) => ebool test 2 (157, 161)', async function () { + const res = await this.contract2.eq_euint8_euint32( + this.instances2.alice.encrypt8(157), + this.instances2.alice.encrypt32(161), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint8, euint32) => ebool test 3 (161, 161)', async function () { + const res = await this.contract2.eq_euint8_euint32( + this.instances2.alice.encrypt8(161), + this.instances2.alice.encrypt32(161), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint8, euint32) => ebool test 4 (161, 157)', async function () { + const res = await this.contract2.eq_euint8_euint32( + this.instances2.alice.encrypt8(161), + this.instances2.alice.encrypt32(157), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint8, euint32) => ebool test 1 (185, 1521229668)', async function () { + const res = await this.contract2.ne_euint8_euint32( + this.instances2.alice.encrypt8(185), + this.instances2.alice.encrypt32(1521229668), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint8, euint32) => ebool test 2 (181, 185)', async function () { + const res = await this.contract2.ne_euint8_euint32( + this.instances2.alice.encrypt8(181), + this.instances2.alice.encrypt32(185), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint8, euint32) => ebool test 3 (185, 185)', async function () { + const res = await this.contract2.ne_euint8_euint32( + this.instances2.alice.encrypt8(185), + this.instances2.alice.encrypt32(185), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint8, euint32) => ebool test 4 (185, 181)', async function () { + const res = await this.contract2.ne_euint8_euint32( + this.instances2.alice.encrypt8(185), + this.instances2.alice.encrypt32(181), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, euint32) => ebool test 1 (214, 2636986545)', async function () { + const res = await this.contract2.ge_euint8_euint32( + this.instances2.alice.encrypt8(214), + this.instances2.alice.encrypt32(2636986545), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint8, euint32) => ebool test 2 (210, 214)', async function () { + const res = await this.contract2.ge_euint8_euint32( + this.instances2.alice.encrypt8(210), + this.instances2.alice.encrypt32(214), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint8, euint32) => ebool test 3 (214, 214)', async function () { + const res = await this.contract2.ge_euint8_euint32( + this.instances2.alice.encrypt8(214), + this.instances2.alice.encrypt32(214), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, euint32) => ebool test 4 (214, 210)', async function () { + const res = await this.contract2.ge_euint8_euint32( + this.instances2.alice.encrypt8(214), + this.instances2.alice.encrypt32(210), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint8, euint32) => ebool test 1 (254, 3644170480)', async function () { + const res = await this.contract2.gt_euint8_euint32( + this.instances2.alice.encrypt8(254), + this.instances2.alice.encrypt32(3644170480), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint32) => ebool test 2 (250, 254)', async function () { + const res = await this.contract2.gt_euint8_euint32( + this.instances2.alice.encrypt8(250), + this.instances2.alice.encrypt32(254), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint32) => ebool test 3 (254, 254)', async function () { + const res = await this.contract2.gt_euint8_euint32( + this.instances2.alice.encrypt8(254), + this.instances2.alice.encrypt32(254), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint32) => ebool test 4 (254, 250)', async function () { + const res = await this.contract2.gt_euint8_euint32( + this.instances2.alice.encrypt8(254), + this.instances2.alice.encrypt32(250), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint32) => ebool test 1 (200, 2966523441)', async function () { + const res = await this.contract2.le_euint8_euint32( + this.instances2.alice.encrypt8(200), + this.instances2.alice.encrypt32(2966523441), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint32) => ebool test 2 (196, 200)', async function () { + const res = await this.contract2.le_euint8_euint32( + this.instances2.alice.encrypt8(196), + this.instances2.alice.encrypt32(200), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint32) => ebool test 3 (200, 200)', async function () { + const res = await this.contract2.le_euint8_euint32( + this.instances2.alice.encrypt8(200), + this.instances2.alice.encrypt32(200), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint32) => ebool test 4 (200, 196)', async function () { + const res = await this.contract2.le_euint8_euint32( + this.instances2.alice.encrypt8(200), + this.instances2.alice.encrypt32(196), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, euint32) => ebool test 1 (80, 2205479823)', async function () { + const res = await this.contract2.lt_euint8_euint32( + this.instances2.alice.encrypt8(80), + this.instances2.alice.encrypt32(2205479823), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint8, euint32) => ebool test 2 (76, 80)', async function () { + const res = await this.contract2.lt_euint8_euint32( + this.instances2.alice.encrypt8(76), + this.instances2.alice.encrypt32(80), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint8, euint32) => ebool test 3 (80, 80)', async function () { + const res = await this.contract2.lt_euint8_euint32( + this.instances2.alice.encrypt8(80), + this.instances2.alice.encrypt32(80), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, euint32) => ebool test 4 (80, 76)', async function () { + const res = await this.contract2.lt_euint8_euint32( + this.instances2.alice.encrypt8(80), + this.instances2.alice.encrypt32(76), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint8, euint32) => euint32 test 1 (253, 2965000543)', async function () { + const res = await this.contract2.min_euint8_euint32( + this.instances2.alice.encrypt8(253), + this.instances2.alice.encrypt32(2965000543), + ); + expect(res).to.equal(253n); + }); + + it('test operator "min" overload (euint8, euint32) => euint32 test 2 (249, 253)', async function () { + const res = await this.contract2.min_euint8_euint32( + this.instances2.alice.encrypt8(249), + this.instances2.alice.encrypt32(253), + ); + expect(res).to.equal(249n); + }); + + it('test operator "min" overload (euint8, euint32) => euint32 test 3 (253, 253)', async function () { + const res = await this.contract2.min_euint8_euint32( + this.instances2.alice.encrypt8(253), + this.instances2.alice.encrypt32(253), + ); + expect(res).to.equal(253n); + }); + + it('test operator "min" overload (euint8, euint32) => euint32 test 4 (253, 249)', async function () { + const res = await this.contract2.min_euint8_euint32( + this.instances2.alice.encrypt8(253), + this.instances2.alice.encrypt32(249), + ); + expect(res).to.equal(249n); + }); + + it('test operator "max" overload (euint8, euint32) => euint32 test 1 (130, 566960922)', async function () { + const res = await this.contract2.max_euint8_euint32( + this.instances2.alice.encrypt8(130), + this.instances2.alice.encrypt32(566960922), + ); + expect(res).to.equal(566960922n); + }); + + it('test operator "max" overload (euint8, euint32) => euint32 test 2 (126, 130)', async function () { + const res = await this.contract2.max_euint8_euint32( + this.instances2.alice.encrypt8(126), + this.instances2.alice.encrypt32(130), + ); + expect(res).to.equal(130n); + }); + + it('test operator "max" overload (euint8, euint32) => euint32 test 3 (130, 130)', async function () { + const res = await this.contract2.max_euint8_euint32( + this.instances2.alice.encrypt8(130), + this.instances2.alice.encrypt32(130), + ); + expect(res).to.equal(130n); + }); + + it('test operator "max" overload (euint8, euint32) => euint32 test 4 (130, 126)', async function () { + const res = await this.contract2.max_euint8_euint32( + this.instances2.alice.encrypt8(130), + this.instances2.alice.encrypt32(126), + ); + expect(res).to.equal(130n); + }); + + it('test operator "add" overload (euint8, euint64) => euint64 test 1 (2, 129)', async function () { + const res = await this.contract2.add_euint8_euint64( + this.instances2.alice.encrypt8(2), + this.instances2.alice.encrypt64(129), + ); + expect(res).to.equal(131n); + }); + + it('test operator "add" overload (euint8, euint64) => euint64 test 2 (115, 119)', async function () { + const res = await this.contract2.add_euint8_euint64( + this.instances2.alice.encrypt8(115), + this.instances2.alice.encrypt64(119), + ); + expect(res).to.equal(234n); + }); + + it('test operator "add" overload (euint8, euint64) => euint64 test 3 (119, 119)', async function () { + const res = await this.contract2.add_euint8_euint64( + this.instances2.alice.encrypt8(119), + this.instances2.alice.encrypt64(119), + ); + expect(res).to.equal(238n); + }); + + it('test operator "add" overload (euint8, euint64) => euint64 test 4 (119, 115)', async function () { + const res = await this.contract2.add_euint8_euint64( + this.instances2.alice.encrypt8(119), + this.instances2.alice.encrypt64(115), + ); + expect(res).to.equal(234n); + }); + + it('test operator "sub" overload (euint8, euint64) => euint64 test 1 (168, 168)', async function () { + const res = await this.contract2.sub_euint8_euint64( + this.instances2.alice.encrypt8(168), + this.instances2.alice.encrypt64(168), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint8, euint64) => euint64 test 2 (168, 164)', async function () { + const res = await this.contract2.sub_euint8_euint64( + this.instances2.alice.encrypt8(168), + this.instances2.alice.encrypt64(164), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint8, euint64) => euint64 test 1 (2, 65)', async function () { + const res = await this.contract2.mul_euint8_euint64( + this.instances2.alice.encrypt8(2), + this.instances2.alice.encrypt64(65), + ); + expect(res).to.equal(130n); + }); + + it('test operator "mul" overload (euint8, euint64) => euint64 test 2 (10, 11)', async function () { + const res = await this.contract2.mul_euint8_euint64( + this.instances2.alice.encrypt8(10), + this.instances2.alice.encrypt64(11), + ); + expect(res).to.equal(110n); + }); + + it('test operator "mul" overload (euint8, euint64) => euint64 test 3 (11, 11)', async function () { + const res = await this.contract2.mul_euint8_euint64( + this.instances2.alice.encrypt8(11), + this.instances2.alice.encrypt64(11), + ); + expect(res).to.equal(121n); + }); + + it('test operator "mul" overload (euint8, euint64) => euint64 test 4 (11, 10)', async function () { + const res = await this.contract2.mul_euint8_euint64( + this.instances2.alice.encrypt8(11), + this.instances2.alice.encrypt64(10), + ); + expect(res).to.equal(110n); + }); + + it('test operator "and" overload (euint8, euint64) => euint64 test 1 (187, 18444084668783699555)', async function () { + const res = await this.contract2.and_euint8_euint64( + this.instances2.alice.encrypt8(187), + this.instances2.alice.encrypt64(18444084668783699555), + ); + expect(res).to.equal(35n); + }); + + it('test operator "and" overload (euint8, euint64) => euint64 test 2 (183, 187)', async function () { + const res = await this.contract2.and_euint8_euint64( + this.instances2.alice.encrypt8(183), + this.instances2.alice.encrypt64(187), + ); + expect(res).to.equal(179n); + }); + + it('test operator "and" overload (euint8, euint64) => euint64 test 3 (187, 187)', async function () { + const res = await this.contract2.and_euint8_euint64( + this.instances2.alice.encrypt8(187), + this.instances2.alice.encrypt64(187), + ); + expect(res).to.equal(187n); + }); + + it('test operator "and" overload (euint8, euint64) => euint64 test 4 (187, 183)', async function () { + const res = await this.contract2.and_euint8_euint64( + this.instances2.alice.encrypt8(187), + this.instances2.alice.encrypt64(183), + ); + expect(res).to.equal(179n); + }); + + it('test operator "or" overload (euint8, euint64) => euint64 test 1 (135, 18439029290182698975)', async function () { + const res = await this.contract2.or_euint8_euint64( + this.instances2.alice.encrypt8(135), + this.instances2.alice.encrypt64(18439029290182698975), + ); + expect(res).to.equal(18439029290182698975n); + }); + + it('test operator "or" overload (euint8, euint64) => euint64 test 2 (131, 135)', async function () { + const res = await this.contract2.or_euint8_euint64( + this.instances2.alice.encrypt8(131), + this.instances2.alice.encrypt64(135), + ); + expect(res).to.equal(135n); + }); + + it('test operator "or" overload (euint8, euint64) => euint64 test 3 (135, 135)', async function () { + const res = await this.contract2.or_euint8_euint64( + this.instances2.alice.encrypt8(135), + this.instances2.alice.encrypt64(135), + ); + expect(res).to.equal(135n); + }); + + it('test operator "or" overload (euint8, euint64) => euint64 test 4 (135, 131)', async function () { + const res = await this.contract2.or_euint8_euint64( + this.instances2.alice.encrypt8(135), + this.instances2.alice.encrypt64(131), + ); + expect(res).to.equal(135n); + }); + + it('test operator "xor" overload (euint8, euint64) => euint64 test 1 (84, 18444990477299490715)', async function () { + const res = await this.contract2.xor_euint8_euint64( + this.instances2.alice.encrypt8(84), + this.instances2.alice.encrypt64(18444990477299490715), + ); + expect(res).to.equal(18444990477299490767n); + }); + + it('test operator "xor" overload (euint8, euint64) => euint64 test 2 (80, 84)', async function () { + const res = await this.contract2.xor_euint8_euint64( + this.instances2.alice.encrypt8(80), + this.instances2.alice.encrypt64(84), + ); + expect(res).to.equal(4n); + }); + + it('test operator "xor" overload (euint8, euint64) => euint64 test 3 (84, 84)', async function () { + const res = await this.contract2.xor_euint8_euint64( + this.instances2.alice.encrypt8(84), + this.instances2.alice.encrypt64(84), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint8, euint64) => euint64 test 4 (84, 80)', async function () { + const res = await this.contract2.xor_euint8_euint64( + this.instances2.alice.encrypt8(84), + this.instances2.alice.encrypt64(80), + ); + expect(res).to.equal(4n); + }); + + it('test operator "eq" overload (euint8, euint64) => ebool test 1 (91, 18446457346943992227)', async function () { + const res = await this.contract2.eq_euint8_euint64( + this.instances2.alice.encrypt8(91), + this.instances2.alice.encrypt64(18446457346943992227), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint8, euint64) => ebool test 2 (87, 91)', async function () { + const res = await this.contract2.eq_euint8_euint64( + this.instances2.alice.encrypt8(87), + this.instances2.alice.encrypt64(91), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint8, euint64) => ebool test 3 (91, 91)', async function () { + const res = await this.contract2.eq_euint8_euint64( + this.instances2.alice.encrypt8(91), + this.instances2.alice.encrypt64(91), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint8, euint64) => ebool test 4 (91, 87)', async function () { + const res = await this.contract2.eq_euint8_euint64( + this.instances2.alice.encrypt8(91), + this.instances2.alice.encrypt64(87), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint8, euint64) => ebool test 1 (109, 18443318570639553087)', async function () { + const res = await this.contract2.ne_euint8_euint64( + this.instances2.alice.encrypt8(109), + this.instances2.alice.encrypt64(18443318570639553087), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint8, euint64) => ebool test 2 (105, 109)', async function () { + const res = await this.contract2.ne_euint8_euint64( + this.instances2.alice.encrypt8(105), + this.instances2.alice.encrypt64(109), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint8, euint64) => ebool test 3 (109, 109)', async function () { + const res = await this.contract2.ne_euint8_euint64( + this.instances2.alice.encrypt8(109), + this.instances2.alice.encrypt64(109), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint8, euint64) => ebool test 4 (109, 105)', async function () { + const res = await this.contract2.ne_euint8_euint64( + this.instances2.alice.encrypt8(109), + this.instances2.alice.encrypt64(105), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, euint64) => ebool test 1 (27, 18445930867214181117)', async function () { + const res = await this.contract2.ge_euint8_euint64( + this.instances2.alice.encrypt8(27), + this.instances2.alice.encrypt64(18445930867214181117), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint8, euint64) => ebool test 2 (23, 27)', async function () { + const res = await this.contract2.ge_euint8_euint64( + this.instances2.alice.encrypt8(23), + this.instances2.alice.encrypt64(27), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint8, euint64) => ebool test 3 (27, 27)', async function () { + const res = await this.contract2.ge_euint8_euint64( + this.instances2.alice.encrypt8(27), + this.instances2.alice.encrypt64(27), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, euint64) => ebool test 4 (27, 23)', async function () { + const res = await this.contract2.ge_euint8_euint64( + this.instances2.alice.encrypt8(27), + this.instances2.alice.encrypt64(23), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint8, euint64) => ebool test 1 (235, 18439120393033635471)', async function () { + const res = await this.contract2.gt_euint8_euint64( + this.instances2.alice.encrypt8(235), + this.instances2.alice.encrypt64(18439120393033635471), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint64) => ebool test 2 (231, 235)', async function () { + const res = await this.contract2.gt_euint8_euint64( + this.instances2.alice.encrypt8(231), + this.instances2.alice.encrypt64(235), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint64) => ebool test 3 (235, 235)', async function () { + const res = await this.contract2.gt_euint8_euint64( + this.instances2.alice.encrypt8(235), + this.instances2.alice.encrypt64(235), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, euint64) => ebool test 4 (235, 231)', async function () { + const res = await this.contract2.gt_euint8_euint64( + this.instances2.alice.encrypt8(235), + this.instances2.alice.encrypt64(231), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint64) => ebool test 1 (80, 18440486388708045995)', async function () { + const res = await this.contract2.le_euint8_euint64( + this.instances2.alice.encrypt8(80), + this.instances2.alice.encrypt64(18440486388708045995), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint64) => ebool test 2 (76, 80)', async function () { + const res = await this.contract2.le_euint8_euint64( + this.instances2.alice.encrypt8(76), + this.instances2.alice.encrypt64(80), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint64) => ebool test 3 (80, 80)', async function () { + const res = await this.contract2.le_euint8_euint64( + this.instances2.alice.encrypt8(80), + this.instances2.alice.encrypt64(80), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, euint64) => ebool test 4 (80, 76)', async function () { + const res = await this.contract2.le_euint8_euint64( + this.instances2.alice.encrypt8(80), + this.instances2.alice.encrypt64(76), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, euint64) => ebool test 1 (190, 18443665731691391943)', async function () { + const res = await this.contract2.lt_euint8_euint64( + this.instances2.alice.encrypt8(190), + this.instances2.alice.encrypt64(18443665731691391943), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint8, euint64) => ebool test 2 (186, 190)', async function () { + const res = await this.contract2.lt_euint8_euint64( + this.instances2.alice.encrypt8(186), + this.instances2.alice.encrypt64(190), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint8, euint64) => ebool test 3 (190, 190)', async function () { + const res = await this.contract2.lt_euint8_euint64( + this.instances2.alice.encrypt8(190), + this.instances2.alice.encrypt64(190), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, euint64) => ebool test 4 (190, 186)', async function () { + const res = await this.contract2.lt_euint8_euint64( + this.instances2.alice.encrypt8(190), + this.instances2.alice.encrypt64(186), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint8, euint64) => euint64 test 1 (18, 18446036892619585799)', async function () { + const res = await this.contract2.min_euint8_euint64( + this.instances2.alice.encrypt8(18), + this.instances2.alice.encrypt64(18446036892619585799), + ); + expect(res).to.equal(18n); + }); + + it('test operator "min" overload (euint8, euint64) => euint64 test 2 (14, 18)', async function () { + const res = await this.contract2.min_euint8_euint64( + this.instances2.alice.encrypt8(14), + this.instances2.alice.encrypt64(18), + ); + expect(res).to.equal(14n); + }); + + it('test operator "min" overload (euint8, euint64) => euint64 test 3 (18, 18)', async function () { + const res = await this.contract2.min_euint8_euint64( + this.instances2.alice.encrypt8(18), + this.instances2.alice.encrypt64(18), + ); + expect(res).to.equal(18n); + }); + + it('test operator "min" overload (euint8, euint64) => euint64 test 4 (18, 14)', async function () { + const res = await this.contract2.min_euint8_euint64( + this.instances2.alice.encrypt8(18), + this.instances2.alice.encrypt64(14), + ); + expect(res).to.equal(14n); + }); + + it('test operator "max" overload (euint8, euint64) => euint64 test 1 (172, 18445195398017975891)', async function () { + const res = await this.contract2.max_euint8_euint64( + this.instances2.alice.encrypt8(172), + this.instances2.alice.encrypt64(18445195398017975891), + ); + expect(res).to.equal(18445195398017975891n); + }); + + it('test operator "max" overload (euint8, euint64) => euint64 test 2 (168, 172)', async function () { + const res = await this.contract2.max_euint8_euint64( + this.instances2.alice.encrypt8(168), + this.instances2.alice.encrypt64(172), + ); + expect(res).to.equal(172n); + }); + + it('test operator "max" overload (euint8, euint64) => euint64 test 3 (172, 172)', async function () { + const res = await this.contract2.max_euint8_euint64( + this.instances2.alice.encrypt8(172), + this.instances2.alice.encrypt64(172), + ); + expect(res).to.equal(172n); + }); + + it('test operator "max" overload (euint8, euint64) => euint64 test 4 (172, 168)', async function () { + const res = await this.contract2.max_euint8_euint64( + this.instances2.alice.encrypt8(172), + this.instances2.alice.encrypt64(168), + ); + expect(res).to.equal(172n); + }); + + it('test operator "add" overload (euint8, uint8) => euint8 test 1 (93, 112)', async function () { + const res = await this.contract2.add_euint8_uint8(this.instances2.alice.encrypt8(93), 112); + expect(res).to.equal(205n); + }); + + it('test operator "add" overload (euint8, uint8) => euint8 test 2 (91, 93)', async function () { + const res = await this.contract2.add_euint8_uint8(this.instances2.alice.encrypt8(91), 93); + expect(res).to.equal(184n); + }); + + it('test operator "add" overload (euint8, uint8) => euint8 test 3 (93, 93)', async function () { + const res = await this.contract2.add_euint8_uint8(this.instances2.alice.encrypt8(93), 93); + expect(res).to.equal(186n); + }); + + it('test operator "add" overload (euint8, uint8) => euint8 test 4 (93, 91)', async function () { + const res = await this.contract2.add_euint8_uint8(this.instances2.alice.encrypt8(93), 91); + expect(res).to.equal(184n); + }); + + it('test operator "add" overload (uint8, euint8) => euint8 test 1 (34, 112)', async function () { + const res = await this.contract2.add_uint8_euint8(34, this.instances2.alice.encrypt8(112)); + expect(res).to.equal(146n); + }); + + it('test operator "add" overload (uint8, euint8) => euint8 test 2 (91, 93)', async function () { + const res = await this.contract2.add_uint8_euint8(91, this.instances2.alice.encrypt8(93)); + expect(res).to.equal(184n); + }); + + it('test operator "add" overload (uint8, euint8) => euint8 test 3 (93, 93)', async function () { + const res = await this.contract2.add_uint8_euint8(93, this.instances2.alice.encrypt8(93)); + expect(res).to.equal(186n); + }); + + it('test operator "add" overload (uint8, euint8) => euint8 test 4 (93, 91)', async function () { + const res = await this.contract2.add_uint8_euint8(93, this.instances2.alice.encrypt8(91)); + expect(res).to.equal(184n); + }); + + it('test operator "sub" overload (euint8, uint8) => euint8 test 1 (52, 52)', async function () { + const res = await this.contract2.sub_euint8_uint8(this.instances2.alice.encrypt8(52), 52); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint8, uint8) => euint8 test 2 (52, 48)', async function () { + const res = await this.contract2.sub_euint8_uint8(this.instances2.alice.encrypt8(52), 48); + expect(res).to.equal(4n); + }); + + it('test operator "sub" overload (uint8, euint8) => euint8 test 1 (52, 52)', async function () { + const res = await this.contract2.sub_uint8_euint8(52, this.instances2.alice.encrypt8(52)); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (uint8, euint8) => euint8 test 2 (52, 48)', async function () { + const res = await this.contract2.sub_uint8_euint8(52, this.instances2.alice.encrypt8(48)); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint8, uint8) => euint8 test 1 (16, 7)', async function () { + const res = await this.contract2.mul_euint8_uint8(this.instances2.alice.encrypt8(16), 7); + expect(res).to.equal(112n); + }); + + it('test operator "mul" overload (euint8, uint8) => euint8 test 2 (15, 16)', async function () { + const res = await this.contract2.mul_euint8_uint8(this.instances2.alice.encrypt8(15), 16); + expect(res).to.equal(240n); + }); + + it('test operator "mul" overload (euint8, uint8) => euint8 test 3 (9, 9)', async function () { + const res = await this.contract2.mul_euint8_uint8(this.instances2.alice.encrypt8(9), 9); + expect(res).to.equal(81n); + }); + + it('test operator "mul" overload (euint8, uint8) => euint8 test 4 (16, 15)', async function () { + const res = await this.contract2.mul_euint8_uint8(this.instances2.alice.encrypt8(16), 15); + expect(res).to.equal(240n); + }); + + it('test operator "mul" overload (uint8, euint8) => euint8 test 1 (14, 12)', async function () { + const res = await this.contract2.mul_uint8_euint8(14, this.instances2.alice.encrypt8(12)); + expect(res).to.equal(168n); + }); + + it('test operator "mul" overload (uint8, euint8) => euint8 test 2 (15, 16)', async function () { + const res = await this.contract2.mul_uint8_euint8(15, this.instances2.alice.encrypt8(16)); + expect(res).to.equal(240n); + }); + + it('test operator "mul" overload (uint8, euint8) => euint8 test 3 (9, 9)', async function () { + const res = await this.contract2.mul_uint8_euint8(9, this.instances2.alice.encrypt8(9)); + expect(res).to.equal(81n); + }); + + it('test operator "mul" overload (uint8, euint8) => euint8 test 4 (16, 15)', async function () { + const res = await this.contract2.mul_uint8_euint8(16, this.instances2.alice.encrypt8(15)); + expect(res).to.equal(240n); + }); + + it('test operator "div" overload (euint8, uint8) => euint8 test 1 (123, 214)', async function () { + const res = await this.contract2.div_euint8_uint8(this.instances2.alice.encrypt8(123), 214); + expect(res).to.equal(0n); + }); + + it('test operator "div" overload (euint8, uint8) => euint8 test 2 (20, 24)', async function () { + const res = await this.contract2.div_euint8_uint8(this.instances2.alice.encrypt8(20), 24); + expect(res).to.equal(0n); + }); + + it('test operator "div" overload (euint8, uint8) => euint8 test 3 (24, 24)', async function () { + const res = await this.contract2.div_euint8_uint8(this.instances2.alice.encrypt8(24), 24); + expect(res).to.equal(1n); + }); + + it('test operator "div" overload (euint8, uint8) => euint8 test 4 (24, 20)', async function () { + const res = await this.contract2.div_euint8_uint8(this.instances2.alice.encrypt8(24), 20); + expect(res).to.equal(1n); + }); + + it('test operator "rem" overload (euint8, uint8) => euint8 test 1 (144, 19)', async function () { + const res = await this.contract2.rem_euint8_uint8(this.instances2.alice.encrypt8(144), 19); + expect(res).to.equal(11n); + }); + + it('test operator "rem" overload (euint8, uint8) => euint8 test 2 (140, 144)', async function () { + const res = await this.contract2.rem_euint8_uint8(this.instances2.alice.encrypt8(140), 144); + expect(res).to.equal(140n); + }); + + it('test operator "rem" overload (euint8, uint8) => euint8 test 3 (144, 144)', async function () { + const res = await this.contract2.rem_euint8_uint8(this.instances2.alice.encrypt8(144), 144); + expect(res).to.equal(0n); + }); + + it('test operator "rem" overload (euint8, uint8) => euint8 test 4 (144, 140)', async function () { + const res = await this.contract2.rem_euint8_uint8(this.instances2.alice.encrypt8(144), 140); + expect(res).to.equal(4n); + }); + + it('test operator "eq" overload (euint8, uint8) => ebool test 1 (101, 175)', async function () { + const res = await this.contract2.eq_euint8_uint8(this.instances2.alice.encrypt8(101), 175); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint8, uint8) => ebool test 2 (97, 101)', async function () { + const res = await this.contract2.eq_euint8_uint8(this.instances2.alice.encrypt8(97), 101); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint8, uint8) => ebool test 3 (101, 101)', async function () { + const res = await this.contract2.eq_euint8_uint8(this.instances2.alice.encrypt8(101), 101); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint8, uint8) => ebool test 4 (101, 97)', async function () { + const res = await this.contract2.eq_euint8_uint8(this.instances2.alice.encrypt8(101), 97); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (uint8, euint8) => ebool test 1 (182, 175)', async function () { + const res = await this.contract2.eq_uint8_euint8(182, this.instances2.alice.encrypt8(175)); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (uint8, euint8) => ebool test 2 (97, 101)', async function () { + const res = await this.contract2.eq_uint8_euint8(97, this.instances2.alice.encrypt8(101)); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (uint8, euint8) => ebool test 3 (101, 101)', async function () { + const res = await this.contract2.eq_uint8_euint8(101, this.instances2.alice.encrypt8(101)); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (uint8, euint8) => ebool test 4 (101, 97)', async function () { + const res = await this.contract2.eq_uint8_euint8(101, this.instances2.alice.encrypt8(97)); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint8, uint8) => ebool test 1 (250, 114)', async function () { + const res = await this.contract2.ne_euint8_uint8(this.instances2.alice.encrypt8(250), 114); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint8, uint8) => ebool test 2 (139, 143)', async function () { + const res = await this.contract2.ne_euint8_uint8(this.instances2.alice.encrypt8(139), 143); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint8, uint8) => ebool test 3 (143, 143)', async function () { + const res = await this.contract2.ne_euint8_uint8(this.instances2.alice.encrypt8(143), 143); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint8, uint8) => ebool test 4 (143, 139)', async function () { + const res = await this.contract2.ne_euint8_uint8(this.instances2.alice.encrypt8(143), 139); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (uint8, euint8) => ebool test 1 (139, 114)', async function () { + const res = await this.contract2.ne_uint8_euint8(139, this.instances2.alice.encrypt8(114)); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (uint8, euint8) => ebool test 2 (139, 143)', async function () { + const res = await this.contract2.ne_uint8_euint8(139, this.instances2.alice.encrypt8(143)); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (uint8, euint8) => ebool test 3 (143, 143)', async function () { + const res = await this.contract2.ne_uint8_euint8(143, this.instances2.alice.encrypt8(143)); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (uint8, euint8) => ebool test 4 (143, 139)', async function () { + const res = await this.contract2.ne_uint8_euint8(143, this.instances2.alice.encrypt8(139)); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, uint8) => ebool test 1 (41, 155)', async function () { + const res = await this.contract2.ge_euint8_uint8(this.instances2.alice.encrypt8(41), 155); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint8, uint8) => ebool test 2 (37, 41)', async function () { + const res = await this.contract2.ge_euint8_uint8(this.instances2.alice.encrypt8(37), 41); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint8, uint8) => ebool test 3 (41, 41)', async function () { + const res = await this.contract2.ge_euint8_uint8(this.instances2.alice.encrypt8(41), 41); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint8, uint8) => ebool test 4 (41, 37)', async function () { + const res = await this.contract2.ge_euint8_uint8(this.instances2.alice.encrypt8(41), 37); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (uint8, euint8) => ebool test 1 (28, 155)', async function () { + const res = await this.contract2.ge_uint8_euint8(28, this.instances2.alice.encrypt8(155)); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (uint8, euint8) => ebool test 2 (37, 41)', async function () { + const res = await this.contract2.ge_uint8_euint8(37, this.instances2.alice.encrypt8(41)); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (uint8, euint8) => ebool test 3 (41, 41)', async function () { + const res = await this.contract2.ge_uint8_euint8(41, this.instances2.alice.encrypt8(41)); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (uint8, euint8) => ebool test 4 (41, 37)', async function () { + const res = await this.contract2.ge_uint8_euint8(41, this.instances2.alice.encrypt8(37)); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint8, uint8) => ebool test 1 (225, 176)', async function () { + const res = await this.contract2.gt_euint8_uint8(this.instances2.alice.encrypt8(225), 176); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint8, uint8) => ebool test 2 (92, 96)', async function () { + const res = await this.contract2.gt_euint8_uint8(this.instances2.alice.encrypt8(92), 96); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, uint8) => ebool test 3 (96, 96)', async function () { + const res = await this.contract2.gt_euint8_uint8(this.instances2.alice.encrypt8(96), 96); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint8, uint8) => ebool test 4 (96, 92)', async function () { + const res = await this.contract2.gt_euint8_uint8(this.instances2.alice.encrypt8(96), 92); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (uint8, euint8) => ebool test 1 (34, 176)', async function () { + const res = await this.contract2.gt_uint8_euint8(34, this.instances2.alice.encrypt8(176)); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (uint8, euint8) => ebool test 2 (92, 96)', async function () { + const res = await this.contract2.gt_uint8_euint8(92, this.instances2.alice.encrypt8(96)); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (uint8, euint8) => ebool test 3 (96, 96)', async function () { + const res = await this.contract2.gt_uint8_euint8(96, this.instances2.alice.encrypt8(96)); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (uint8, euint8) => ebool test 4 (96, 92)', async function () { + const res = await this.contract2.gt_uint8_euint8(96, this.instances2.alice.encrypt8(92)); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, uint8) => ebool test 1 (102, 85)', async function () { + const res = await this.contract2.le_euint8_uint8(this.instances2.alice.encrypt8(102), 85); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (euint8, uint8) => ebool test 2 (4, 8)', async function () { + const res = await this.contract2.le_euint8_uint8(this.instances2.alice.encrypt8(4), 8); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, uint8) => ebool test 3 (8, 8)', async function () { + const res = await this.contract2.le_euint8_uint8(this.instances2.alice.encrypt8(8), 8); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint8, uint8) => ebool test 4 (8, 4)', async function () { + const res = await this.contract2.le_euint8_uint8(this.instances2.alice.encrypt8(8), 4); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (uint8, euint8) => ebool test 1 (46, 85)', async function () { + const res = await this.contract2.le_uint8_euint8(46, this.instances2.alice.encrypt8(85)); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (uint8, euint8) => ebool test 2 (4, 8)', async function () { + const res = await this.contract2.le_uint8_euint8(4, this.instances2.alice.encrypt8(8)); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (uint8, euint8) => ebool test 3 (8, 8)', async function () { + const res = await this.contract2.le_uint8_euint8(8, this.instances2.alice.encrypt8(8)); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (uint8, euint8) => ebool test 4 (8, 4)', async function () { + const res = await this.contract2.le_uint8_euint8(8, this.instances2.alice.encrypt8(4)); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, uint8) => ebool test 1 (253, 9)', async function () { + const res = await this.contract2.lt_euint8_uint8(this.instances2.alice.encrypt8(253), 9); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, uint8) => ebool test 2 (94, 98)', async function () { + const res = await this.contract2.lt_euint8_uint8(this.instances2.alice.encrypt8(94), 98); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint8, uint8) => ebool test 3 (98, 98)', async function () { + const res = await this.contract2.lt_euint8_uint8(this.instances2.alice.encrypt8(98), 98); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint8, uint8) => ebool test 4 (98, 94)', async function () { + const res = await this.contract2.lt_euint8_uint8(this.instances2.alice.encrypt8(98), 94); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (uint8, euint8) => ebool test 1 (79, 9)', async function () { + const res = await this.contract2.lt_uint8_euint8(79, this.instances2.alice.encrypt8(9)); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (uint8, euint8) => ebool test 2 (94, 98)', async function () { + const res = await this.contract2.lt_uint8_euint8(94, this.instances2.alice.encrypt8(98)); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (uint8, euint8) => ebool test 3 (98, 98)', async function () { + const res = await this.contract2.lt_uint8_euint8(98, this.instances2.alice.encrypt8(98)); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (uint8, euint8) => ebool test 4 (98, 94)', async function () { + const res = await this.contract2.lt_uint8_euint8(98, this.instances2.alice.encrypt8(94)); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint8, uint8) => euint8 test 1 (53, 70)', async function () { + const res = await this.contract2.min_euint8_uint8(this.instances2.alice.encrypt8(53), 70); + expect(res).to.equal(53n); + }); + + it('test operator "min" overload (euint8, uint8) => euint8 test 2 (49, 53)', async function () { + const res = await this.contract2.min_euint8_uint8(this.instances2.alice.encrypt8(49), 53); + expect(res).to.equal(49n); + }); + + it('test operator "min" overload (euint8, uint8) => euint8 test 3 (53, 53)', async function () { + const res = await this.contract2.min_euint8_uint8(this.instances2.alice.encrypt8(53), 53); + expect(res).to.equal(53n); + }); + + it('test operator "min" overload (euint8, uint8) => euint8 test 4 (53, 49)', async function () { + const res = await this.contract2.min_euint8_uint8(this.instances2.alice.encrypt8(53), 49); + expect(res).to.equal(49n); + }); + + it('test operator "min" overload (uint8, euint8) => euint8 test 1 (109, 70)', async function () { + const res = await this.contract2.min_uint8_euint8(109, this.instances2.alice.encrypt8(70)); + expect(res).to.equal(70n); + }); + + it('test operator "min" overload (uint8, euint8) => euint8 test 2 (49, 53)', async function () { + const res = await this.contract2.min_uint8_euint8(49, this.instances2.alice.encrypt8(53)); + expect(res).to.equal(49n); + }); + + it('test operator "min" overload (uint8, euint8) => euint8 test 3 (53, 53)', async function () { + const res = await this.contract2.min_uint8_euint8(53, this.instances2.alice.encrypt8(53)); + expect(res).to.equal(53n); + }); + + it('test operator "min" overload (uint8, euint8) => euint8 test 4 (53, 49)', async function () { + const res = await this.contract2.min_uint8_euint8(53, this.instances2.alice.encrypt8(49)); + expect(res).to.equal(49n); + }); + + it('test operator "max" overload (euint8, uint8) => euint8 test 1 (198, 31)', async function () { + const res = await this.contract2.max_euint8_uint8(this.instances2.alice.encrypt8(198), 31); + expect(res).to.equal(198n); + }); + + it('test operator "max" overload (euint8, uint8) => euint8 test 2 (194, 198)', async function () { + const res = await this.contract2.max_euint8_uint8(this.instances2.alice.encrypt8(194), 198); + expect(res).to.equal(198n); + }); + + it('test operator "max" overload (euint8, uint8) => euint8 test 3 (198, 198)', async function () { + const res = await this.contract2.max_euint8_uint8(this.instances2.alice.encrypt8(198), 198); + expect(res).to.equal(198n); + }); + + it('test operator "max" overload (euint8, uint8) => euint8 test 4 (198, 194)', async function () { + const res = await this.contract2.max_euint8_uint8(this.instances2.alice.encrypt8(198), 194); + expect(res).to.equal(198n); + }); + + it('test operator "max" overload (uint8, euint8) => euint8 test 1 (102, 31)', async function () { + const res = await this.contract2.max_uint8_euint8(102, this.instances2.alice.encrypt8(31)); + expect(res).to.equal(102n); + }); + + it('test operator "max" overload (uint8, euint8) => euint8 test 2 (194, 198)', async function () { + const res = await this.contract2.max_uint8_euint8(194, this.instances2.alice.encrypt8(198)); + expect(res).to.equal(198n); + }); + + it('test operator "max" overload (uint8, euint8) => euint8 test 3 (198, 198)', async function () { + const res = await this.contract2.max_uint8_euint8(198, this.instances2.alice.encrypt8(198)); + expect(res).to.equal(198n); + }); + + it('test operator "max" overload (uint8, euint8) => euint8 test 4 (198, 194)', async function () { + const res = await this.contract2.max_uint8_euint8(198, this.instances2.alice.encrypt8(194)); + expect(res).to.equal(198n); + }); + + it('test operator "add" overload (euint16, euint4) => euint16 test 1 (13, 2)', async function () { + const res = await this.contract2.add_euint16_euint4( + this.instances2.alice.encrypt16(13), + this.instances2.alice.encrypt4(2), + ); + expect(res).to.equal(15n); + }); + + it('test operator "add" overload (euint16, euint4) => euint16 test 2 (4, 8)', async function () { + const res = await this.contract2.add_euint16_euint4( + this.instances2.alice.encrypt16(4), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(12n); + }); + + it('test operator "add" overload (euint16, euint4) => euint16 test 3 (5, 5)', async function () { + const res = await this.contract2.add_euint16_euint4( + this.instances2.alice.encrypt16(5), + this.instances2.alice.encrypt4(5), + ); + expect(res).to.equal(10n); + }); + + it('test operator "add" overload (euint16, euint4) => euint16 test 4 (8, 4)', async function () { + const res = await this.contract2.add_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "sub" overload (euint16, euint4) => euint16 test 1 (14, 14)', async function () { + const res = await this.contract2.sub_euint16_euint4( + this.instances2.alice.encrypt16(14), + this.instances2.alice.encrypt4(14), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint16, euint4) => euint16 test 2 (14, 10)', async function () { + const res = await this.contract2.sub_euint16_euint4( + this.instances2.alice.encrypt16(14), + this.instances2.alice.encrypt4(10), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint16, euint4) => euint16 test 1 (7, 2)', async function () { + const res = await this.contract2.mul_euint16_euint4( + this.instances2.alice.encrypt16(7), + this.instances2.alice.encrypt4(2), + ); + expect(res).to.equal(14n); + }); + + it('test operator "mul" overload (euint16, euint4) => euint16 test 2 (3, 5)', async function () { + const res = await this.contract2.mul_euint16_euint4( + this.instances2.alice.encrypt16(3), + this.instances2.alice.encrypt4(5), + ); + expect(res).to.equal(15n); + }); + + it('test operator "mul" overload (euint16, euint4) => euint16 test 3 (3, 3)', async function () { + const res = await this.contract2.mul_euint16_euint4( + this.instances2.alice.encrypt16(3), + this.instances2.alice.encrypt4(3), + ); + expect(res).to.equal(9n); + }); + + it('test operator "mul" overload (euint16, euint4) => euint16 test 4 (5, 3)', async function () { + const res = await this.contract2.mul_euint16_euint4( + this.instances2.alice.encrypt16(5), + this.instances2.alice.encrypt4(3), + ); + expect(res).to.equal(15n); + }); + + it('test operator "and" overload (euint16, euint4) => euint16 test 1 (6680, 4)', async function () { + const res = await this.contract2.and_euint16_euint4( + this.instances2.alice.encrypt16(6680), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(0n); + }); + + it('test operator "and" overload (euint16, euint4) => euint16 test 2 (4, 8)', async function () { + const res = await this.contract2.and_euint16_euint4( + this.instances2.alice.encrypt16(4), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(0n); + }); + + it('test operator "and" overload (euint16, euint4) => euint16 test 3 (8, 8)', async function () { + const res = await this.contract2.and_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "and" overload (euint16, euint4) => euint16 test 4 (8, 4)', async function () { + const res = await this.contract2.and_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(0n); + }); + + it('test operator "or" overload (euint16, euint4) => euint16 test 1 (57838, 2)', async function () { + const res = await this.contract2.or_euint16_euint4( + this.instances2.alice.encrypt16(57838), + this.instances2.alice.encrypt4(2), + ); + expect(res).to.equal(57838n); + }); + + it('test operator "or" overload (euint16, euint4) => euint16 test 2 (4, 8)', async function () { + const res = await this.contract2.or_euint16_euint4( + this.instances2.alice.encrypt16(4), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(12n); + }); + + it('test operator "or" overload (euint16, euint4) => euint16 test 3 (8, 8)', async function () { + const res = await this.contract2.or_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "or" overload (euint16, euint4) => euint16 test 4 (8, 4)', async function () { + const res = await this.contract2.or_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "xor" overload (euint16, euint4) => euint16 test 1 (29564, 14)', async function () { + const res = await this.contract2.xor_euint16_euint4( + this.instances2.alice.encrypt16(29564), + this.instances2.alice.encrypt4(14), + ); + expect(res).to.equal(29554n); + }); + + it('test operator "xor" overload (euint16, euint4) => euint16 test 2 (10, 14)', async function () { + const res = await this.contract2.xor_euint16_euint4( + this.instances2.alice.encrypt16(10), + this.instances2.alice.encrypt4(14), + ); + expect(res).to.equal(4n); + }); + + it('test operator "xor" overload (euint16, euint4) => euint16 test 3 (14, 14)', async function () { + const res = await this.contract2.xor_euint16_euint4( + this.instances2.alice.encrypt16(14), + this.instances2.alice.encrypt4(14), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint16, euint4) => euint16 test 4 (14, 10)', async function () { + const res = await this.contract2.xor_euint16_euint4( + this.instances2.alice.encrypt16(14), + this.instances2.alice.encrypt4(10), + ); + expect(res).to.equal(4n); + }); + + it('test operator "eq" overload (euint16, euint4) => ebool test 1 (43178, 6)', async function () { + const res = await this.contract2.eq_euint16_euint4( + this.instances2.alice.encrypt16(43178), + this.instances2.alice.encrypt4(6), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint16, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract2.eq_euint16_euint4( + this.instances2.alice.encrypt16(4), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint16, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract2.eq_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint16, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract2.eq_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint16, euint4) => ebool test 1 (36210, 8)', async function () { + const res = await this.contract2.ne_euint16_euint4( + this.instances2.alice.encrypt16(36210), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint16, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract2.ne_euint16_euint4( + this.instances2.alice.encrypt16(4), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint16, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract2.ne_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint16, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract2.ne_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint4) => ebool test 1 (9661, 2)', async function () { + const res = await this.contract2.ge_euint16_euint4( + this.instances2.alice.encrypt16(9661), + this.instances2.alice.encrypt4(2), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract2.ge_euint16_euint4( + this.instances2.alice.encrypt16(4), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint16, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract2.ge_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract2.ge_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint16, euint4) => ebool test 1 (36260, 13)', async function () { + const res = await this.contract2.gt_euint16_euint4( + this.instances2.alice.encrypt16(36260), + this.instances2.alice.encrypt4(13), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint16, euint4) => ebool test 2 (9, 13)', async function () { + const res = await this.contract2.gt_euint16_euint4( + this.instances2.alice.encrypt16(9), + this.instances2.alice.encrypt4(13), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint4) => ebool test 3 (13, 13)', async function () { + const res = await this.contract2.gt_euint16_euint4( + this.instances2.alice.encrypt16(13), + this.instances2.alice.encrypt4(13), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint4) => ebool test 4 (13, 9)', async function () { + const res = await this.contract2.gt_euint16_euint4( + this.instances2.alice.encrypt16(13), + this.instances2.alice.encrypt4(9), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint4) => ebool test 1 (7456, 9)', async function () { + const res = await this.contract2.le_euint16_euint4( + this.instances2.alice.encrypt16(7456), + this.instances2.alice.encrypt4(9), + ); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (euint16, euint4) => ebool test 2 (5, 9)', async function () { + const res = await this.contract2.le_euint16_euint4( + this.instances2.alice.encrypt16(5), + this.instances2.alice.encrypt4(9), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint4) => ebool test 3 (9, 9)', async function () { + const res = await this.contract2.le_euint16_euint4( + this.instances2.alice.encrypt16(9), + this.instances2.alice.encrypt4(9), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint4) => ebool test 4 (9, 5)', async function () { + const res = await this.contract2.le_euint16_euint4( + this.instances2.alice.encrypt16(9), + this.instances2.alice.encrypt4(5), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint4) => ebool test 1 (53504, 6)', async function () { + const res = await this.contract2.lt_euint16_euint4( + this.instances2.alice.encrypt16(53504), + this.instances2.alice.encrypt4(6), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract2.lt_euint16_euint4( + this.instances2.alice.encrypt16(4), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint16, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract2.lt_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract2.lt_euint16_euint4( + this.instances2.alice.encrypt16(8), + this.instances2.alice.encrypt4(4), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint16, euint4) => euint16 test 1 (37174, 5)', async function () { + const res = await this.contract3.min_euint16_euint4( + this.instances3.alice.encrypt16(37174), + this.instances3.alice.encrypt4(5), + ); + expect(res).to.equal(5n); + }); + + it('test operator "min" overload (euint16, euint4) => euint16 test 2 (4, 8)', async function () { + const res = await this.contract3.min_euint16_euint4( + this.instances3.alice.encrypt16(4), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(4n); + }); + + it('test operator "min" overload (euint16, euint4) => euint16 test 3 (8, 8)', async function () { + const res = await this.contract3.min_euint16_euint4( + this.instances3.alice.encrypt16(8), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "min" overload (euint16, euint4) => euint16 test 4 (8, 4)', async function () { + const res = await this.contract3.min_euint16_euint4( + this.instances3.alice.encrypt16(8), + this.instances3.alice.encrypt4(4), + ); + expect(res).to.equal(4n); + }); + + it('test operator "max" overload (euint16, euint4) => euint16 test 1 (29272, 10)', async function () { + const res = await this.contract3.max_euint16_euint4( + this.instances3.alice.encrypt16(29272), + this.instances3.alice.encrypt4(10), + ); + expect(res).to.equal(29272n); + }); + + it('test operator "max" overload (euint16, euint4) => euint16 test 2 (6, 10)', async function () { + const res = await this.contract3.max_euint16_euint4( + this.instances3.alice.encrypt16(6), + this.instances3.alice.encrypt4(10), + ); + expect(res).to.equal(10n); + }); + + it('test operator "max" overload (euint16, euint4) => euint16 test 3 (10, 10)', async function () { + const res = await this.contract3.max_euint16_euint4( + this.instances3.alice.encrypt16(10), + this.instances3.alice.encrypt4(10), + ); + expect(res).to.equal(10n); + }); + + it('test operator "max" overload (euint16, euint4) => euint16 test 4 (10, 6)', async function () { + const res = await this.contract3.max_euint16_euint4( + this.instances3.alice.encrypt16(10), + this.instances3.alice.encrypt4(6), + ); + expect(res).to.equal(10n); + }); + + it('test operator "add" overload (euint16, euint8) => euint16 test 1 (171, 2)', async function () { + const res = await this.contract3.add_euint16_euint8( + this.instances3.alice.encrypt16(171), + this.instances3.alice.encrypt8(2), + ); + expect(res).to.equal(173n); + }); + + it('test operator "add" overload (euint16, euint8) => euint16 test 2 (7, 11)', async function () { + const res = await this.contract3.add_euint16_euint8( + this.instances3.alice.encrypt16(7), + this.instances3.alice.encrypt8(11), + ); + expect(res).to.equal(18n); + }); + + it('test operator "add" overload (euint16, euint8) => euint16 test 3 (11, 11)', async function () { + const res = await this.contract3.add_euint16_euint8( + this.instances3.alice.encrypt16(11), + this.instances3.alice.encrypt8(11), + ); + expect(res).to.equal(22n); + }); + + it('test operator "add" overload (euint16, euint8) => euint16 test 4 (11, 7)', async function () { + const res = await this.contract3.add_euint16_euint8( + this.instances3.alice.encrypt16(11), + this.instances3.alice.encrypt8(7), + ); + expect(res).to.equal(18n); + }); + + it('test operator "sub" overload (euint16, euint8) => euint16 test 1 (166, 166)', async function () { + const res = await this.contract3.sub_euint16_euint8( + this.instances3.alice.encrypt16(166), + this.instances3.alice.encrypt8(166), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint16, euint8) => euint16 test 2 (166, 162)', async function () { + const res = await this.contract3.sub_euint16_euint8( + this.instances3.alice.encrypt16(166), + this.instances3.alice.encrypt8(162), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint16, euint8) => euint16 test 1 (110, 2)', async function () { + const res = await this.contract3.mul_euint16_euint8( + this.instances3.alice.encrypt16(110), + this.instances3.alice.encrypt8(2), + ); + expect(res).to.equal(220n); + }); + + it('test operator "mul" overload (euint16, euint8) => euint16 test 2 (13, 13)', async function () { + const res = await this.contract3.mul_euint16_euint8( + this.instances3.alice.encrypt16(13), + this.instances3.alice.encrypt8(13), + ); + expect(res).to.equal(169n); + }); + + it('test operator "mul" overload (euint16, euint8) => euint16 test 3 (13, 13)', async function () { + const res = await this.contract3.mul_euint16_euint8( + this.instances3.alice.encrypt16(13), + this.instances3.alice.encrypt8(13), + ); + expect(res).to.equal(169n); + }); + + it('test operator "mul" overload (euint16, euint8) => euint16 test 4 (13, 13)', async function () { + const res = await this.contract3.mul_euint16_euint8( + this.instances3.alice.encrypt16(13), + this.instances3.alice.encrypt8(13), + ); + expect(res).to.equal(169n); + }); + + it('test operator "and" overload (euint16, euint8) => euint16 test 1 (18191, 188)', async function () { + const res = await this.contract3.and_euint16_euint8( + this.instances3.alice.encrypt16(18191), + this.instances3.alice.encrypt8(188), + ); + expect(res).to.equal(12n); + }); + + it('test operator "and" overload (euint16, euint8) => euint16 test 2 (184, 188)', async function () { + const res = await this.contract3.and_euint16_euint8( + this.instances3.alice.encrypt16(184), + this.instances3.alice.encrypt8(188), + ); + expect(res).to.equal(184n); + }); + + it('test operator "and" overload (euint16, euint8) => euint16 test 3 (188, 188)', async function () { + const res = await this.contract3.and_euint16_euint8( + this.instances3.alice.encrypt16(188), + this.instances3.alice.encrypt8(188), + ); + expect(res).to.equal(188n); + }); + + it('test operator "and" overload (euint16, euint8) => euint16 test 4 (188, 184)', async function () { + const res = await this.contract3.and_euint16_euint8( + this.instances3.alice.encrypt16(188), + this.instances3.alice.encrypt8(184), + ); + expect(res).to.equal(184n); + }); + + it('test operator "or" overload (euint16, euint8) => euint16 test 1 (60745, 176)', async function () { + const res = await this.contract3.or_euint16_euint8( + this.instances3.alice.encrypt16(60745), + this.instances3.alice.encrypt8(176), + ); + expect(res).to.equal(60921n); + }); + + it('test operator "or" overload (euint16, euint8) => euint16 test 2 (172, 176)', async function () { + const res = await this.contract3.or_euint16_euint8( + this.instances3.alice.encrypt16(172), + this.instances3.alice.encrypt8(176), + ); + expect(res).to.equal(188n); + }); + + it('test operator "or" overload (euint16, euint8) => euint16 test 3 (176, 176)', async function () { + const res = await this.contract3.or_euint16_euint8( + this.instances3.alice.encrypt16(176), + this.instances3.alice.encrypt8(176), + ); + expect(res).to.equal(176n); + }); + + it('test operator "or" overload (euint16, euint8) => euint16 test 4 (176, 172)', async function () { + const res = await this.contract3.or_euint16_euint8( + this.instances3.alice.encrypt16(176), + this.instances3.alice.encrypt8(172), + ); + expect(res).to.equal(188n); + }); + + it('test operator "xor" overload (euint16, euint8) => euint16 test 1 (24120, 221)', async function () { + const res = await this.contract3.xor_euint16_euint8( + this.instances3.alice.encrypt16(24120), + this.instances3.alice.encrypt8(221), + ); + expect(res).to.equal(24293n); + }); + + it('test operator "xor" overload (euint16, euint8) => euint16 test 2 (217, 221)', async function () { + const res = await this.contract3.xor_euint16_euint8( + this.instances3.alice.encrypt16(217), + this.instances3.alice.encrypt8(221), + ); + expect(res).to.equal(4n); + }); + + it('test operator "xor" overload (euint16, euint8) => euint16 test 3 (221, 221)', async function () { + const res = await this.contract3.xor_euint16_euint8( + this.instances3.alice.encrypt16(221), + this.instances3.alice.encrypt8(221), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint16, euint8) => euint16 test 4 (221, 217)', async function () { + const res = await this.contract3.xor_euint16_euint8( + this.instances3.alice.encrypt16(221), + this.instances3.alice.encrypt8(217), + ); + expect(res).to.equal(4n); + }); + + it('test operator "eq" overload (euint16, euint8) => ebool test 1 (52156, 49)', async function () { + const res = await this.contract3.eq_euint16_euint8( + this.instances3.alice.encrypt16(52156), + this.instances3.alice.encrypt8(49), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint16, euint8) => ebool test 2 (45, 49)', async function () { + const res = await this.contract3.eq_euint16_euint8( + this.instances3.alice.encrypt16(45), + this.instances3.alice.encrypt8(49), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint16, euint8) => ebool test 3 (49, 49)', async function () { + const res = await this.contract3.eq_euint16_euint8( + this.instances3.alice.encrypt16(49), + this.instances3.alice.encrypt8(49), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint16, euint8) => ebool test 4 (49, 45)', async function () { + const res = await this.contract3.eq_euint16_euint8( + this.instances3.alice.encrypt16(49), + this.instances3.alice.encrypt8(45), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint16, euint8) => ebool test 1 (45762, 206)', async function () { + const res = await this.contract3.ne_euint16_euint8( + this.instances3.alice.encrypt16(45762), + this.instances3.alice.encrypt8(206), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint16, euint8) => ebool test 2 (202, 206)', async function () { + const res = await this.contract3.ne_euint16_euint8( + this.instances3.alice.encrypt16(202), + this.instances3.alice.encrypt8(206), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint16, euint8) => ebool test 3 (206, 206)', async function () { + const res = await this.contract3.ne_euint16_euint8( + this.instances3.alice.encrypt16(206), + this.instances3.alice.encrypt8(206), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint16, euint8) => ebool test 4 (206, 202)', async function () { + const res = await this.contract3.ne_euint16_euint8( + this.instances3.alice.encrypt16(206), + this.instances3.alice.encrypt8(202), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint8) => ebool test 1 (3763, 81)', async function () { + const res = await this.contract3.ge_euint16_euint8( + this.instances3.alice.encrypt16(3763), + this.instances3.alice.encrypt8(81), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint8) => ebool test 2 (77, 81)', async function () { + const res = await this.contract3.ge_euint16_euint8( + this.instances3.alice.encrypt16(77), + this.instances3.alice.encrypt8(81), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint16, euint8) => ebool test 3 (81, 81)', async function () { + const res = await this.contract3.ge_euint16_euint8( + this.instances3.alice.encrypt16(81), + this.instances3.alice.encrypt8(81), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint8) => ebool test 4 (81, 77)', async function () { + const res = await this.contract3.ge_euint16_euint8( + this.instances3.alice.encrypt16(81), + this.instances3.alice.encrypt8(77), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint16, euint8) => ebool test 1 (17649, 8)', async function () { + const res = await this.contract3.gt_euint16_euint8( + this.instances3.alice.encrypt16(17649), + this.instances3.alice.encrypt8(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint16, euint8) => ebool test 2 (4, 8)', async function () { + const res = await this.contract3.gt_euint16_euint8( + this.instances3.alice.encrypt16(4), + this.instances3.alice.encrypt8(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint8) => ebool test 3 (8, 8)', async function () { + const res = await this.contract3.gt_euint16_euint8( + this.instances3.alice.encrypt16(8), + this.instances3.alice.encrypt8(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint8) => ebool test 4 (8, 4)', async function () { + const res = await this.contract3.gt_euint16_euint8( + this.instances3.alice.encrypt16(8), + this.instances3.alice.encrypt8(4), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint8) => ebool test 1 (3242, 147)', async function () { + const res = await this.contract3.le_euint16_euint8( + this.instances3.alice.encrypt16(3242), + this.instances3.alice.encrypt8(147), + ); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (euint16, euint8) => ebool test 2 (143, 147)', async function () { + const res = await this.contract3.le_euint16_euint8( + this.instances3.alice.encrypt16(143), + this.instances3.alice.encrypt8(147), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint8) => ebool test 3 (147, 147)', async function () { + const res = await this.contract3.le_euint16_euint8( + this.instances3.alice.encrypt16(147), + this.instances3.alice.encrypt8(147), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint8) => ebool test 4 (147, 143)', async function () { + const res = await this.contract3.le_euint16_euint8( + this.instances3.alice.encrypt16(147), + this.instances3.alice.encrypt8(143), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint8) => ebool test 1 (42518, 110)', async function () { + const res = await this.contract3.lt_euint16_euint8( + this.instances3.alice.encrypt16(42518), + this.instances3.alice.encrypt8(110), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint8) => ebool test 2 (106, 110)', async function () { + const res = await this.contract3.lt_euint16_euint8( + this.instances3.alice.encrypt16(106), + this.instances3.alice.encrypt8(110), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint16, euint8) => ebool test 3 (110, 110)', async function () { + const res = await this.contract3.lt_euint16_euint8( + this.instances3.alice.encrypt16(110), + this.instances3.alice.encrypt8(110), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint8) => ebool test 4 (110, 106)', async function () { + const res = await this.contract3.lt_euint16_euint8( + this.instances3.alice.encrypt16(110), + this.instances3.alice.encrypt8(106), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint16, euint8) => euint16 test 1 (25144, 64)', async function () { + const res = await this.contract3.min_euint16_euint8( + this.instances3.alice.encrypt16(25144), + this.instances3.alice.encrypt8(64), + ); + expect(res).to.equal(64n); + }); + + it('test operator "min" overload (euint16, euint8) => euint16 test 2 (60, 64)', async function () { + const res = await this.contract3.min_euint16_euint8( + this.instances3.alice.encrypt16(60), + this.instances3.alice.encrypt8(64), + ); + expect(res).to.equal(60n); + }); + + it('test operator "min" overload (euint16, euint8) => euint16 test 3 (64, 64)', async function () { + const res = await this.contract3.min_euint16_euint8( + this.instances3.alice.encrypt16(64), + this.instances3.alice.encrypt8(64), + ); + expect(res).to.equal(64n); + }); + + it('test operator "min" overload (euint16, euint8) => euint16 test 4 (64, 60)', async function () { + const res = await this.contract3.min_euint16_euint8( + this.instances3.alice.encrypt16(64), + this.instances3.alice.encrypt8(60), + ); + expect(res).to.equal(60n); + }); + + it('test operator "max" overload (euint16, euint8) => euint16 test 1 (18336, 117)', async function () { + const res = await this.contract3.max_euint16_euint8( + this.instances3.alice.encrypt16(18336), + this.instances3.alice.encrypt8(117), + ); + expect(res).to.equal(18336n); + }); + + it('test operator "max" overload (euint16, euint8) => euint16 test 2 (113, 117)', async function () { + const res = await this.contract3.max_euint16_euint8( + this.instances3.alice.encrypt16(113), + this.instances3.alice.encrypt8(117), + ); + expect(res).to.equal(117n); + }); + + it('test operator "max" overload (euint16, euint8) => euint16 test 3 (117, 117)', async function () { + const res = await this.contract3.max_euint16_euint8( + this.instances3.alice.encrypt16(117), + this.instances3.alice.encrypt8(117), + ); + expect(res).to.equal(117n); + }); + + it('test operator "max" overload (euint16, euint8) => euint16 test 4 (117, 113)', async function () { + const res = await this.contract3.max_euint16_euint8( + this.instances3.alice.encrypt16(117), + this.instances3.alice.encrypt8(113), + ); + expect(res).to.equal(117n); + }); + + it('test operator "add" overload (euint16, euint16) => euint16 test 1 (27226, 22058)', async function () { + const res = await this.contract3.add_euint16_euint16( + this.instances3.alice.encrypt16(27226), + this.instances3.alice.encrypt16(22058), + ); + expect(res).to.equal(49284n); + }); + + it('test operator "add" overload (euint16, euint16) => euint16 test 2 (22056, 22058)', async function () { + const res = await this.contract3.add_euint16_euint16( + this.instances3.alice.encrypt16(22056), + this.instances3.alice.encrypt16(22058), + ); + expect(res).to.equal(44114n); + }); + + it('test operator "add" overload (euint16, euint16) => euint16 test 3 (22058, 22058)', async function () { + const res = await this.contract3.add_euint16_euint16( + this.instances3.alice.encrypt16(22058), + this.instances3.alice.encrypt16(22058), + ); + expect(res).to.equal(44116n); + }); + + it('test operator "add" overload (euint16, euint16) => euint16 test 4 (22058, 22056)', async function () { + const res = await this.contract3.add_euint16_euint16( + this.instances3.alice.encrypt16(22058), + this.instances3.alice.encrypt16(22056), + ); + expect(res).to.equal(44114n); + }); + + it('test operator "sub" overload (euint16, euint16) => euint16 test 1 (56955, 56955)', async function () { + const res = await this.contract3.sub_euint16_euint16( + this.instances3.alice.encrypt16(56955), + this.instances3.alice.encrypt16(56955), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint16, euint16) => euint16 test 2 (56955, 56951)', async function () { + const res = await this.contract3.sub_euint16_euint16( + this.instances3.alice.encrypt16(56955), + this.instances3.alice.encrypt16(56951), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint16, euint16) => euint16 test 1 (120, 150)', async function () { + const res = await this.contract3.mul_euint16_euint16( + this.instances3.alice.encrypt16(120), + this.instances3.alice.encrypt16(150), + ); + expect(res).to.equal(18000n); + }); + + it('test operator "mul" overload (euint16, euint16) => euint16 test 2 (239, 239)', async function () { + const res = await this.contract3.mul_euint16_euint16( + this.instances3.alice.encrypt16(239), + this.instances3.alice.encrypt16(239), + ); + expect(res).to.equal(57121n); + }); + + it('test operator "mul" overload (euint16, euint16) => euint16 test 3 (239, 239)', async function () { + const res = await this.contract3.mul_euint16_euint16( + this.instances3.alice.encrypt16(239), + this.instances3.alice.encrypt16(239), + ); + expect(res).to.equal(57121n); + }); + + it('test operator "mul" overload (euint16, euint16) => euint16 test 4 (239, 239)', async function () { + const res = await this.contract3.mul_euint16_euint16( + this.instances3.alice.encrypt16(239), + this.instances3.alice.encrypt16(239), + ); + expect(res).to.equal(57121n); + }); + + it('test operator "and" overload (euint16, euint16) => euint16 test 1 (63103, 25335)', async function () { + const res = await this.contract3.and_euint16_euint16( + this.instances3.alice.encrypt16(63103), + this.instances3.alice.encrypt16(25335), + ); + expect(res).to.equal(25207n); + }); + + it('test operator "and" overload (euint16, euint16) => euint16 test 2 (25331, 25335)', async function () { + const res = await this.contract3.and_euint16_euint16( + this.instances3.alice.encrypt16(25331), + this.instances3.alice.encrypt16(25335), + ); + expect(res).to.equal(25331n); + }); + + it('test operator "and" overload (euint16, euint16) => euint16 test 3 (25335, 25335)', async function () { + const res = await this.contract3.and_euint16_euint16( + this.instances3.alice.encrypt16(25335), + this.instances3.alice.encrypt16(25335), + ); + expect(res).to.equal(25335n); + }); + + it('test operator "and" overload (euint16, euint16) => euint16 test 4 (25335, 25331)', async function () { + const res = await this.contract3.and_euint16_euint16( + this.instances3.alice.encrypt16(25335), + this.instances3.alice.encrypt16(25331), + ); + expect(res).to.equal(25331n); + }); + + it('test operator "or" overload (euint16, euint16) => euint16 test 1 (53682, 14727)', async function () { + const res = await this.contract3.or_euint16_euint16( + this.instances3.alice.encrypt16(53682), + this.instances3.alice.encrypt16(14727), + ); + expect(res).to.equal(63927n); + }); + + it('test operator "or" overload (euint16, euint16) => euint16 test 2 (14723, 14727)', async function () { + const res = await this.contract3.or_euint16_euint16( + this.instances3.alice.encrypt16(14723), + this.instances3.alice.encrypt16(14727), + ); + expect(res).to.equal(14727n); + }); + + it('test operator "or" overload (euint16, euint16) => euint16 test 3 (14727, 14727)', async function () { + const res = await this.contract3.or_euint16_euint16( + this.instances3.alice.encrypt16(14727), + this.instances3.alice.encrypt16(14727), + ); + expect(res).to.equal(14727n); + }); + + it('test operator "or" overload (euint16, euint16) => euint16 test 4 (14727, 14723)', async function () { + const res = await this.contract3.or_euint16_euint16( + this.instances3.alice.encrypt16(14727), + this.instances3.alice.encrypt16(14723), + ); + expect(res).to.equal(14727n); + }); + + it('test operator "xor" overload (euint16, euint16) => euint16 test 1 (272, 42865)', async function () { + const res = await this.contract3.xor_euint16_euint16( + this.instances3.alice.encrypt16(272), + this.instances3.alice.encrypt16(42865), + ); + expect(res).to.equal(42593n); + }); + + it('test operator "xor" overload (euint16, euint16) => euint16 test 2 (268, 272)', async function () { + const res = await this.contract3.xor_euint16_euint16( + this.instances3.alice.encrypt16(268), + this.instances3.alice.encrypt16(272), + ); + expect(res).to.equal(28n); + }); + + it('test operator "xor" overload (euint16, euint16) => euint16 test 3 (272, 272)', async function () { + const res = await this.contract3.xor_euint16_euint16( + this.instances3.alice.encrypt16(272), + this.instances3.alice.encrypt16(272), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint16, euint16) => euint16 test 4 (272, 268)', async function () { + const res = await this.contract3.xor_euint16_euint16( + this.instances3.alice.encrypt16(272), + this.instances3.alice.encrypt16(268), + ); + expect(res).to.equal(28n); + }); + + it('test operator "eq" overload (euint16, euint16) => ebool test 1 (53936, 55687)', async function () { + const res = await this.contract3.eq_euint16_euint16( + this.instances3.alice.encrypt16(53936), + this.instances3.alice.encrypt16(55687), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint16, euint16) => ebool test 2 (53932, 53936)', async function () { + const res = await this.contract3.eq_euint16_euint16( + this.instances3.alice.encrypt16(53932), + this.instances3.alice.encrypt16(53936), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint16, euint16) => ebool test 3 (53936, 53936)', async function () { + const res = await this.contract3.eq_euint16_euint16( + this.instances3.alice.encrypt16(53936), + this.instances3.alice.encrypt16(53936), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint16, euint16) => ebool test 4 (53936, 53932)', async function () { + const res = await this.contract3.eq_euint16_euint16( + this.instances3.alice.encrypt16(53936), + this.instances3.alice.encrypt16(53932), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint16, euint16) => ebool test 1 (64200, 17038)', async function () { + const res = await this.contract3.ne_euint16_euint16( + this.instances3.alice.encrypt16(64200), + this.instances3.alice.encrypt16(17038), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint16, euint16) => ebool test 2 (17034, 17038)', async function () { + const res = await this.contract3.ne_euint16_euint16( + this.instances3.alice.encrypt16(17034), + this.instances3.alice.encrypt16(17038), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint16, euint16) => ebool test 3 (17038, 17038)', async function () { + const res = await this.contract3.ne_euint16_euint16( + this.instances3.alice.encrypt16(17038), + this.instances3.alice.encrypt16(17038), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint16, euint16) => ebool test 4 (17038, 17034)', async function () { + const res = await this.contract3.ne_euint16_euint16( + this.instances3.alice.encrypt16(17038), + this.instances3.alice.encrypt16(17034), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint16) => ebool test 1 (18226, 11817)', async function () { + const res = await this.contract3.ge_euint16_euint16( + this.instances3.alice.encrypt16(18226), + this.instances3.alice.encrypt16(11817), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint16) => ebool test 2 (11813, 11817)', async function () { + const res = await this.contract3.ge_euint16_euint16( + this.instances3.alice.encrypt16(11813), + this.instances3.alice.encrypt16(11817), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint16, euint16) => ebool test 3 (11817, 11817)', async function () { + const res = await this.contract3.ge_euint16_euint16( + this.instances3.alice.encrypt16(11817), + this.instances3.alice.encrypt16(11817), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint16) => ebool test 4 (11817, 11813)', async function () { + const res = await this.contract3.ge_euint16_euint16( + this.instances3.alice.encrypt16(11817), + this.instances3.alice.encrypt16(11813), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint16, euint16) => ebool test 1 (46712, 53146)', async function () { + const res = await this.contract3.gt_euint16_euint16( + this.instances3.alice.encrypt16(46712), + this.instances3.alice.encrypt16(53146), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint16) => ebool test 2 (46708, 46712)', async function () { + const res = await this.contract3.gt_euint16_euint16( + this.instances3.alice.encrypt16(46708), + this.instances3.alice.encrypt16(46712), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint16) => ebool test 3 (46712, 46712)', async function () { + const res = await this.contract3.gt_euint16_euint16( + this.instances3.alice.encrypt16(46712), + this.instances3.alice.encrypt16(46712), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint16) => ebool test 4 (46712, 46708)', async function () { + const res = await this.contract3.gt_euint16_euint16( + this.instances3.alice.encrypt16(46712), + this.instances3.alice.encrypt16(46708), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint16) => ebool test 1 (9281, 48556)', async function () { + const res = await this.contract3.le_euint16_euint16( + this.instances3.alice.encrypt16(9281), + this.instances3.alice.encrypt16(48556), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint16) => ebool test 2 (9277, 9281)', async function () { + const res = await this.contract3.le_euint16_euint16( + this.instances3.alice.encrypt16(9277), + this.instances3.alice.encrypt16(9281), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint16) => ebool test 3 (9281, 9281)', async function () { + const res = await this.contract3.le_euint16_euint16( + this.instances3.alice.encrypt16(9281), + this.instances3.alice.encrypt16(9281), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint16) => ebool test 4 (9281, 9277)', async function () { + const res = await this.contract3.le_euint16_euint16( + this.instances3.alice.encrypt16(9281), + this.instances3.alice.encrypt16(9277), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint16) => ebool test 1 (44794, 23290)', async function () { + const res = await this.contract3.lt_euint16_euint16( + this.instances3.alice.encrypt16(44794), + this.instances3.alice.encrypt16(23290), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint16) => ebool test 2 (23286, 23290)', async function () { + const res = await this.contract3.lt_euint16_euint16( + this.instances3.alice.encrypt16(23286), + this.instances3.alice.encrypt16(23290), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint16, euint16) => ebool test 3 (23290, 23290)', async function () { + const res = await this.contract3.lt_euint16_euint16( + this.instances3.alice.encrypt16(23290), + this.instances3.alice.encrypt16(23290), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint16) => ebool test 4 (23290, 23286)', async function () { + const res = await this.contract3.lt_euint16_euint16( + this.instances3.alice.encrypt16(23290), + this.instances3.alice.encrypt16(23286), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint16, euint16) => euint16 test 1 (30936, 9027)', async function () { + const res = await this.contract3.min_euint16_euint16( + this.instances3.alice.encrypt16(30936), + this.instances3.alice.encrypt16(9027), + ); + expect(res).to.equal(9027n); + }); + + it('test operator "min" overload (euint16, euint16) => euint16 test 2 (9023, 9027)', async function () { + const res = await this.contract3.min_euint16_euint16( + this.instances3.alice.encrypt16(9023), + this.instances3.alice.encrypt16(9027), + ); + expect(res).to.equal(9023n); + }); + + it('test operator "min" overload (euint16, euint16) => euint16 test 3 (9027, 9027)', async function () { + const res = await this.contract3.min_euint16_euint16( + this.instances3.alice.encrypt16(9027), + this.instances3.alice.encrypt16(9027), + ); + expect(res).to.equal(9027n); + }); + + it('test operator "min" overload (euint16, euint16) => euint16 test 4 (9027, 9023)', async function () { + const res = await this.contract3.min_euint16_euint16( + this.instances3.alice.encrypt16(9027), + this.instances3.alice.encrypt16(9023), + ); + expect(res).to.equal(9023n); + }); + + it('test operator "max" overload (euint16, euint16) => euint16 test 1 (34561, 34789)', async function () { + const res = await this.contract3.max_euint16_euint16( + this.instances3.alice.encrypt16(34561), + this.instances3.alice.encrypt16(34789), + ); + expect(res).to.equal(34789n); + }); + + it('test operator "max" overload (euint16, euint16) => euint16 test 2 (34557, 34561)', async function () { + const res = await this.contract3.max_euint16_euint16( + this.instances3.alice.encrypt16(34557), + this.instances3.alice.encrypt16(34561), + ); + expect(res).to.equal(34561n); + }); + + it('test operator "max" overload (euint16, euint16) => euint16 test 3 (34561, 34561)', async function () { + const res = await this.contract3.max_euint16_euint16( + this.instances3.alice.encrypt16(34561), + this.instances3.alice.encrypt16(34561), + ); + expect(res).to.equal(34561n); + }); + + it('test operator "max" overload (euint16, euint16) => euint16 test 4 (34561, 34557)', async function () { + const res = await this.contract3.max_euint16_euint16( + this.instances3.alice.encrypt16(34561), + this.instances3.alice.encrypt16(34557), + ); + expect(res).to.equal(34561n); + }); + + it('test operator "add" overload (euint16, euint32) => euint32 test 1 (2, 41075)', async function () { + const res = await this.contract3.add_euint16_euint32( + this.instances3.alice.encrypt16(2), + this.instances3.alice.encrypt32(41075), + ); + expect(res).to.equal(41077n); + }); + + it('test operator "add" overload (euint16, euint32) => euint32 test 2 (25150, 25154)', async function () { + const res = await this.contract3.add_euint16_euint32( + this.instances3.alice.encrypt16(25150), + this.instances3.alice.encrypt32(25154), + ); + expect(res).to.equal(50304n); + }); + + it('test operator "add" overload (euint16, euint32) => euint32 test 3 (25154, 25154)', async function () { + const res = await this.contract3.add_euint16_euint32( + this.instances3.alice.encrypt16(25154), + this.instances3.alice.encrypt32(25154), + ); + expect(res).to.equal(50308n); + }); + + it('test operator "add" overload (euint16, euint32) => euint32 test 4 (25154, 25150)', async function () { + const res = await this.contract3.add_euint16_euint32( + this.instances3.alice.encrypt16(25154), + this.instances3.alice.encrypt32(25150), + ); + expect(res).to.equal(50304n); + }); + + it('test operator "sub" overload (euint16, euint32) => euint32 test 1 (42408, 42408)', async function () { + const res = await this.contract3.sub_euint16_euint32( + this.instances3.alice.encrypt16(42408), + this.instances3.alice.encrypt32(42408), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint16, euint32) => euint32 test 2 (42408, 42404)', async function () { + const res = await this.contract3.sub_euint16_euint32( + this.instances3.alice.encrypt16(42408), + this.instances3.alice.encrypt32(42404), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint16, euint32) => euint32 test 1 (2, 32121)', async function () { + const res = await this.contract3.mul_euint16_euint32( + this.instances3.alice.encrypt16(2), + this.instances3.alice.encrypt32(32121), + ); + expect(res).to.equal(64242n); + }); + + it('test operator "mul" overload (euint16, euint32) => euint32 test 2 (235, 235)', async function () { + const res = await this.contract3.mul_euint16_euint32( + this.instances3.alice.encrypt16(235), + this.instances3.alice.encrypt32(235), + ); + expect(res).to.equal(55225n); + }); + + it('test operator "mul" overload (euint16, euint32) => euint32 test 3 (235, 235)', async function () { + const res = await this.contract3.mul_euint16_euint32( + this.instances3.alice.encrypt16(235), + this.instances3.alice.encrypt32(235), + ); + expect(res).to.equal(55225n); + }); + + it('test operator "mul" overload (euint16, euint32) => euint32 test 4 (235, 235)', async function () { + const res = await this.contract3.mul_euint16_euint32( + this.instances3.alice.encrypt16(235), + this.instances3.alice.encrypt32(235), + ); + expect(res).to.equal(55225n); + }); + + it('test operator "and" overload (euint16, euint32) => euint32 test 1 (31764, 719791208)', async function () { + const res = await this.contract3.and_euint16_euint32( + this.instances3.alice.encrypt16(31764), + this.instances3.alice.encrypt32(719791208), + ); + expect(res).to.equal(9216n); + }); + + it('test operator "and" overload (euint16, euint32) => euint32 test 2 (31760, 31764)', async function () { + const res = await this.contract3.and_euint16_euint32( + this.instances3.alice.encrypt16(31760), + this.instances3.alice.encrypt32(31764), + ); + expect(res).to.equal(31760n); + }); + + it('test operator "and" overload (euint16, euint32) => euint32 test 3 (31764, 31764)', async function () { + const res = await this.contract3.and_euint16_euint32( + this.instances3.alice.encrypt16(31764), + this.instances3.alice.encrypt32(31764), + ); + expect(res).to.equal(31764n); + }); + + it('test operator "and" overload (euint16, euint32) => euint32 test 4 (31764, 31760)', async function () { + const res = await this.contract3.and_euint16_euint32( + this.instances3.alice.encrypt16(31764), + this.instances3.alice.encrypt32(31760), + ); + expect(res).to.equal(31760n); + }); + + it('test operator "or" overload (euint16, euint32) => euint32 test 1 (47569, 1867557342)', async function () { + const res = await this.contract3.or_euint16_euint32( + this.instances3.alice.encrypt16(47569), + this.instances3.alice.encrypt32(1867557342), + ); + expect(res).to.equal(1867561439n); + }); + + it('test operator "or" overload (euint16, euint32) => euint32 test 2 (47565, 47569)', async function () { + const res = await this.contract3.or_euint16_euint32( + this.instances3.alice.encrypt16(47565), + this.instances3.alice.encrypt32(47569), + ); + expect(res).to.equal(47581n); + }); + + it('test operator "or" overload (euint16, euint32) => euint32 test 3 (47569, 47569)', async function () { + const res = await this.contract3.or_euint16_euint32( + this.instances3.alice.encrypt16(47569), + this.instances3.alice.encrypt32(47569), + ); + expect(res).to.equal(47569n); + }); + + it('test operator "or" overload (euint16, euint32) => euint32 test 4 (47569, 47565)', async function () { + const res = await this.contract3.or_euint16_euint32( + this.instances3.alice.encrypt16(47569), + this.instances3.alice.encrypt32(47565), + ); + expect(res).to.equal(47581n); + }); + + it('test operator "xor" overload (euint16, euint32) => euint32 test 1 (49958, 2256953798)', async function () { + const res = await this.contract3.xor_euint16_euint32( + this.instances3.alice.encrypt16(49958), + this.instances3.alice.encrypt32(2256953798), + ); + expect(res).to.equal(2256970464n); + }); + + it('test operator "xor" overload (euint16, euint32) => euint32 test 2 (49954, 49958)', async function () { + const res = await this.contract3.xor_euint16_euint32( + this.instances3.alice.encrypt16(49954), + this.instances3.alice.encrypt32(49958), + ); + expect(res).to.equal(4n); + }); + + it('test operator "xor" overload (euint16, euint32) => euint32 test 3 (49958, 49958)', async function () { + const res = await this.contract3.xor_euint16_euint32( + this.instances3.alice.encrypt16(49958), + this.instances3.alice.encrypt32(49958), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint16, euint32) => euint32 test 4 (49958, 49954)', async function () { + const res = await this.contract3.xor_euint16_euint32( + this.instances3.alice.encrypt16(49958), + this.instances3.alice.encrypt32(49954), + ); + expect(res).to.equal(4n); + }); + + it('test operator "eq" overload (euint16, euint32) => ebool test 1 (26213, 2142712247)', async function () { + const res = await this.contract3.eq_euint16_euint32( + this.instances3.alice.encrypt16(26213), + this.instances3.alice.encrypt32(2142712247), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint16, euint32) => ebool test 2 (26209, 26213)', async function () { + const res = await this.contract3.eq_euint16_euint32( + this.instances3.alice.encrypt16(26209), + this.instances3.alice.encrypt32(26213), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint16, euint32) => ebool test 3 (26213, 26213)', async function () { + const res = await this.contract3.eq_euint16_euint32( + this.instances3.alice.encrypt16(26213), + this.instances3.alice.encrypt32(26213), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint16, euint32) => ebool test 4 (26213, 26209)', async function () { + const res = await this.contract3.eq_euint16_euint32( + this.instances3.alice.encrypt16(26213), + this.instances3.alice.encrypt32(26209), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint16, euint32) => ebool test 1 (52545, 2079966846)', async function () { + const res = await this.contract3.ne_euint16_euint32( + this.instances3.alice.encrypt16(52545), + this.instances3.alice.encrypt32(2079966846), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint16, euint32) => ebool test 2 (52541, 52545)', async function () { + const res = await this.contract3.ne_euint16_euint32( + this.instances3.alice.encrypt16(52541), + this.instances3.alice.encrypt32(52545), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint16, euint32) => ebool test 3 (52545, 52545)', async function () { + const res = await this.contract3.ne_euint16_euint32( + this.instances3.alice.encrypt16(52545), + this.instances3.alice.encrypt32(52545), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint16, euint32) => ebool test 4 (52545, 52541)', async function () { + const res = await this.contract3.ne_euint16_euint32( + this.instances3.alice.encrypt16(52545), + this.instances3.alice.encrypt32(52541), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint32) => ebool test 1 (19364, 2908406445)', async function () { + const res = await this.contract3.ge_euint16_euint32( + this.instances3.alice.encrypt16(19364), + this.instances3.alice.encrypt32(2908406445), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint16, euint32) => ebool test 2 (19360, 19364)', async function () { + const res = await this.contract3.ge_euint16_euint32( + this.instances3.alice.encrypt16(19360), + this.instances3.alice.encrypt32(19364), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint16, euint32) => ebool test 3 (19364, 19364)', async function () { + const res = await this.contract3.ge_euint16_euint32( + this.instances3.alice.encrypt16(19364), + this.instances3.alice.encrypt32(19364), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint32) => ebool test 4 (19364, 19360)', async function () { + const res = await this.contract3.ge_euint16_euint32( + this.instances3.alice.encrypt16(19364), + this.instances3.alice.encrypt32(19360), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint16, euint32) => ebool test 1 (61440, 2523716364)', async function () { + const res = await this.contract3.gt_euint16_euint32( + this.instances3.alice.encrypt16(61440), + this.instances3.alice.encrypt32(2523716364), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint32) => ebool test 2 (61436, 61440)', async function () { + const res = await this.contract3.gt_euint16_euint32( + this.instances3.alice.encrypt16(61436), + this.instances3.alice.encrypt32(61440), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint32) => ebool test 3 (61440, 61440)', async function () { + const res = await this.contract3.gt_euint16_euint32( + this.instances3.alice.encrypt16(61440), + this.instances3.alice.encrypt32(61440), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint32) => ebool test 4 (61440, 61436)', async function () { + const res = await this.contract3.gt_euint16_euint32( + this.instances3.alice.encrypt16(61440), + this.instances3.alice.encrypt32(61436), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint32) => ebool test 1 (42248, 3250361677)', async function () { + const res = await this.contract3.le_euint16_euint32( + this.instances3.alice.encrypt16(42248), + this.instances3.alice.encrypt32(3250361677), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint32) => ebool test 2 (42244, 42248)', async function () { + const res = await this.contract3.le_euint16_euint32( + this.instances3.alice.encrypt16(42244), + this.instances3.alice.encrypt32(42248), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint32) => ebool test 3 (42248, 42248)', async function () { + const res = await this.contract3.le_euint16_euint32( + this.instances3.alice.encrypt16(42248), + this.instances3.alice.encrypt32(42248), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint32) => ebool test 4 (42248, 42244)', async function () { + const res = await this.contract3.le_euint16_euint32( + this.instances3.alice.encrypt16(42248), + this.instances3.alice.encrypt32(42244), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint32) => ebool test 1 (45430, 522886914)', async function () { + const res = await this.contract3.lt_euint16_euint32( + this.instances3.alice.encrypt16(45430), + this.instances3.alice.encrypt32(522886914), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint16, euint32) => ebool test 2 (45426, 45430)', async function () { + const res = await this.contract3.lt_euint16_euint32( + this.instances3.alice.encrypt16(45426), + this.instances3.alice.encrypt32(45430), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint16, euint32) => ebool test 3 (45430, 45430)', async function () { + const res = await this.contract3.lt_euint16_euint32( + this.instances3.alice.encrypt16(45430), + this.instances3.alice.encrypt32(45430), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint32) => ebool test 4 (45430, 45426)', async function () { + const res = await this.contract3.lt_euint16_euint32( + this.instances3.alice.encrypt16(45430), + this.instances3.alice.encrypt32(45426), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint16, euint32) => euint32 test 1 (3581, 3061947173)', async function () { + const res = await this.contract3.min_euint16_euint32( + this.instances3.alice.encrypt16(3581), + this.instances3.alice.encrypt32(3061947173), + ); + expect(res).to.equal(3581n); + }); + + it('test operator "min" overload (euint16, euint32) => euint32 test 2 (3577, 3581)', async function () { + const res = await this.contract3.min_euint16_euint32( + this.instances3.alice.encrypt16(3577), + this.instances3.alice.encrypt32(3581), + ); + expect(res).to.equal(3577n); + }); + + it('test operator "min" overload (euint16, euint32) => euint32 test 3 (3581, 3581)', async function () { + const res = await this.contract3.min_euint16_euint32( + this.instances3.alice.encrypt16(3581), + this.instances3.alice.encrypt32(3581), + ); + expect(res).to.equal(3581n); + }); + + it('test operator "min" overload (euint16, euint32) => euint32 test 4 (3581, 3577)', async function () { + const res = await this.contract3.min_euint16_euint32( + this.instances3.alice.encrypt16(3581), + this.instances3.alice.encrypt32(3577), + ); + expect(res).to.equal(3577n); + }); + + it('test operator "max" overload (euint16, euint32) => euint32 test 1 (50723, 1432053137)', async function () { + const res = await this.contract3.max_euint16_euint32( + this.instances3.alice.encrypt16(50723), + this.instances3.alice.encrypt32(1432053137), + ); + expect(res).to.equal(1432053137n); + }); + + it('test operator "max" overload (euint16, euint32) => euint32 test 2 (50719, 50723)', async function () { + const res = await this.contract3.max_euint16_euint32( + this.instances3.alice.encrypt16(50719), + this.instances3.alice.encrypt32(50723), + ); + expect(res).to.equal(50723n); + }); + + it('test operator "max" overload (euint16, euint32) => euint32 test 3 (50723, 50723)', async function () { + const res = await this.contract3.max_euint16_euint32( + this.instances3.alice.encrypt16(50723), + this.instances3.alice.encrypt32(50723), + ); + expect(res).to.equal(50723n); + }); + + it('test operator "max" overload (euint16, euint32) => euint32 test 4 (50723, 50719)', async function () { + const res = await this.contract3.max_euint16_euint32( + this.instances3.alice.encrypt16(50723), + this.instances3.alice.encrypt32(50719), + ); + expect(res).to.equal(50723n); + }); + + it('test operator "add" overload (euint16, euint64) => euint64 test 1 (2, 65518)', async function () { + const res = await this.contract3.add_euint16_euint64( + this.instances3.alice.encrypt16(2), + this.instances3.alice.encrypt64(65518), + ); + expect(res).to.equal(65520n); + }); + + it('test operator "add" overload (euint16, euint64) => euint64 test 2 (22742, 22744)', async function () { + const res = await this.contract3.add_euint16_euint64( + this.instances3.alice.encrypt16(22742), + this.instances3.alice.encrypt64(22744), + ); + expect(res).to.equal(45486n); + }); + + it('test operator "add" overload (euint16, euint64) => euint64 test 3 (22744, 22744)', async function () { + const res = await this.contract3.add_euint16_euint64( + this.instances3.alice.encrypt16(22744), + this.instances3.alice.encrypt64(22744), + ); + expect(res).to.equal(45488n); + }); + + it('test operator "add" overload (euint16, euint64) => euint64 test 4 (22744, 22742)', async function () { + const res = await this.contract3.add_euint16_euint64( + this.instances3.alice.encrypt16(22744), + this.instances3.alice.encrypt64(22742), + ); + expect(res).to.equal(45486n); + }); + + it('test operator "sub" overload (euint16, euint64) => euint64 test 1 (8385, 8385)', async function () { + const res = await this.contract3.sub_euint16_euint64( + this.instances3.alice.encrypt16(8385), + this.instances3.alice.encrypt64(8385), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint16, euint64) => euint64 test 2 (8385, 8381)', async function () { + const res = await this.contract3.sub_euint16_euint64( + this.instances3.alice.encrypt16(8385), + this.instances3.alice.encrypt64(8381), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint16, euint64) => euint64 test 1 (2, 32761)', async function () { + const res = await this.contract3.mul_euint16_euint64( + this.instances3.alice.encrypt16(2), + this.instances3.alice.encrypt64(32761), + ); + expect(res).to.equal(65522n); + }); + + it('test operator "mul" overload (euint16, euint64) => euint64 test 2 (251, 251)', async function () { + const res = await this.contract3.mul_euint16_euint64( + this.instances3.alice.encrypt16(251), + this.instances3.alice.encrypt64(251), + ); + expect(res).to.equal(63001n); + }); + + it('test operator "mul" overload (euint16, euint64) => euint64 test 3 (251, 251)', async function () { + const res = await this.contract3.mul_euint16_euint64( + this.instances3.alice.encrypt16(251), + this.instances3.alice.encrypt64(251), + ); + expect(res).to.equal(63001n); + }); + + it('test operator "mul" overload (euint16, euint64) => euint64 test 4 (251, 251)', async function () { + const res = await this.contract3.mul_euint16_euint64( + this.instances3.alice.encrypt16(251), + this.instances3.alice.encrypt64(251), + ); + expect(res).to.equal(63001n); + }); + + it('test operator "and" overload (euint16, euint64) => euint64 test 1 (3617, 18445521461849474399)', async function () { + const res = await this.contract3.and_euint16_euint64( + this.instances3.alice.encrypt16(3617), + this.instances3.alice.encrypt64(18445521461849474399), + ); + expect(res).to.equal(1025n); + }); + + it('test operator "and" overload (euint16, euint64) => euint64 test 2 (3613, 3617)', async function () { + const res = await this.contract3.and_euint16_euint64( + this.instances3.alice.encrypt16(3613), + this.instances3.alice.encrypt64(3617), + ); + expect(res).to.equal(3585n); + }); + + it('test operator "and" overload (euint16, euint64) => euint64 test 3 (3617, 3617)', async function () { + const res = await this.contract3.and_euint16_euint64( + this.instances3.alice.encrypt16(3617), + this.instances3.alice.encrypt64(3617), + ); + expect(res).to.equal(3617n); + }); + + it('test operator "and" overload (euint16, euint64) => euint64 test 4 (3617, 3613)', async function () { + const res = await this.contract3.and_euint16_euint64( + this.instances3.alice.encrypt16(3617), + this.instances3.alice.encrypt64(3613), + ); + expect(res).to.equal(3585n); + }); + + it('test operator "or" overload (euint16, euint64) => euint64 test 1 (3594, 18443975303513898329)', async function () { + const res = await this.contract3.or_euint16_euint64( + this.instances3.alice.encrypt16(3594), + this.instances3.alice.encrypt64(18443975303513898329), + ); + expect(res).to.equal(18443975303513898843n); + }); + + it('test operator "or" overload (euint16, euint64) => euint64 test 2 (3590, 3594)', async function () { + const res = await this.contract3.or_euint16_euint64( + this.instances3.alice.encrypt16(3590), + this.instances3.alice.encrypt64(3594), + ); + expect(res).to.equal(3598n); + }); + + it('test operator "or" overload (euint16, euint64) => euint64 test 3 (3594, 3594)', async function () { + const res = await this.contract3.or_euint16_euint64( + this.instances3.alice.encrypt16(3594), + this.instances3.alice.encrypt64(3594), + ); + expect(res).to.equal(3594n); + }); + + it('test operator "or" overload (euint16, euint64) => euint64 test 4 (3594, 3590)', async function () { + const res = await this.contract3.or_euint16_euint64( + this.instances3.alice.encrypt16(3594), + this.instances3.alice.encrypt64(3590), + ); + expect(res).to.equal(3598n); + }); + + it('test operator "xor" overload (euint16, euint64) => euint64 test 1 (31158, 18442847100019644985)', async function () { + const res = await this.contract3.xor_euint16_euint64( + this.instances3.alice.encrypt16(31158), + this.instances3.alice.encrypt64(18442847100019644985), + ); + expect(res).to.equal(18442847100019663759n); + }); + + it('test operator "xor" overload (euint16, euint64) => euint64 test 2 (31154, 31158)', async function () { + const res = await this.contract3.xor_euint16_euint64( + this.instances3.alice.encrypt16(31154), + this.instances3.alice.encrypt64(31158), + ); + expect(res).to.equal(4n); + }); + + it('test operator "xor" overload (euint16, euint64) => euint64 test 3 (31158, 31158)', async function () { + const res = await this.contract3.xor_euint16_euint64( + this.instances3.alice.encrypt16(31158), + this.instances3.alice.encrypt64(31158), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint16, euint64) => euint64 test 4 (31158, 31154)', async function () { + const res = await this.contract3.xor_euint16_euint64( + this.instances3.alice.encrypt16(31158), + this.instances3.alice.encrypt64(31154), + ); + expect(res).to.equal(4n); + }); + + it('test operator "eq" overload (euint16, euint64) => ebool test 1 (38256, 18442430973530036421)', async function () { + const res = await this.contract3.eq_euint16_euint64( + this.instances3.alice.encrypt16(38256), + this.instances3.alice.encrypt64(18442430973530036421), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint16, euint64) => ebool test 2 (38252, 38256)', async function () { + const res = await this.contract3.eq_euint16_euint64( + this.instances3.alice.encrypt16(38252), + this.instances3.alice.encrypt64(38256), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint16, euint64) => ebool test 3 (38256, 38256)', async function () { + const res = await this.contract3.eq_euint16_euint64( + this.instances3.alice.encrypt16(38256), + this.instances3.alice.encrypt64(38256), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint16, euint64) => ebool test 4 (38256, 38252)', async function () { + const res = await this.contract3.eq_euint16_euint64( + this.instances3.alice.encrypt16(38256), + this.instances3.alice.encrypt64(38252), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint16, euint64) => ebool test 1 (33238, 18440140341099634203)', async function () { + const res = await this.contract3.ne_euint16_euint64( + this.instances3.alice.encrypt16(33238), + this.instances3.alice.encrypt64(18440140341099634203), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint16, euint64) => ebool test 2 (33234, 33238)', async function () { + const res = await this.contract3.ne_euint16_euint64( + this.instances3.alice.encrypt16(33234), + this.instances3.alice.encrypt64(33238), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint16, euint64) => ebool test 3 (33238, 33238)', async function () { + const res = await this.contract3.ne_euint16_euint64( + this.instances3.alice.encrypt16(33238), + this.instances3.alice.encrypt64(33238), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint16, euint64) => ebool test 4 (33238, 33234)', async function () { + const res = await this.contract3.ne_euint16_euint64( + this.instances3.alice.encrypt16(33238), + this.instances3.alice.encrypt64(33234), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint64) => ebool test 1 (17006, 18440111639904808773)', async function () { + const res = await this.contract3.ge_euint16_euint64( + this.instances3.alice.encrypt16(17006), + this.instances3.alice.encrypt64(18440111639904808773), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint16, euint64) => ebool test 2 (17002, 17006)', async function () { + const res = await this.contract3.ge_euint16_euint64( + this.instances3.alice.encrypt16(17002), + this.instances3.alice.encrypt64(17006), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint16, euint64) => ebool test 3 (17006, 17006)', async function () { + const res = await this.contract3.ge_euint16_euint64( + this.instances3.alice.encrypt16(17006), + this.instances3.alice.encrypt64(17006), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, euint64) => ebool test 4 (17006, 17002)', async function () { + const res = await this.contract3.ge_euint16_euint64( + this.instances3.alice.encrypt16(17006), + this.instances3.alice.encrypt64(17002), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint16, euint64) => ebool test 1 (13915, 18437957835114177845)', async function () { + const res = await this.contract3.gt_euint16_euint64( + this.instances3.alice.encrypt16(13915), + this.instances3.alice.encrypt64(18437957835114177845), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint64) => ebool test 2 (13911, 13915)', async function () { + const res = await this.contract3.gt_euint16_euint64( + this.instances3.alice.encrypt16(13911), + this.instances3.alice.encrypt64(13915), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint64) => ebool test 3 (13915, 13915)', async function () { + const res = await this.contract3.gt_euint16_euint64( + this.instances3.alice.encrypt16(13915), + this.instances3.alice.encrypt64(13915), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, euint64) => ebool test 4 (13915, 13911)', async function () { + const res = await this.contract3.gt_euint16_euint64( + this.instances3.alice.encrypt16(13915), + this.instances3.alice.encrypt64(13911), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint64) => ebool test 1 (16281, 18438048148950562767)', async function () { + const res = await this.contract3.le_euint16_euint64( + this.instances3.alice.encrypt16(16281), + this.instances3.alice.encrypt64(18438048148950562767), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint64) => ebool test 2 (16277, 16281)', async function () { + const res = await this.contract3.le_euint16_euint64( + this.instances3.alice.encrypt16(16277), + this.instances3.alice.encrypt64(16281), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint64) => ebool test 3 (16281, 16281)', async function () { + const res = await this.contract3.le_euint16_euint64( + this.instances3.alice.encrypt16(16281), + this.instances3.alice.encrypt64(16281), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, euint64) => ebool test 4 (16281, 16277)', async function () { + const res = await this.contract3.le_euint16_euint64( + this.instances3.alice.encrypt16(16281), + this.instances3.alice.encrypt64(16277), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint64) => ebool test 1 (18995, 18443093417222594453)', async function () { + const res = await this.contract3.lt_euint16_euint64( + this.instances3.alice.encrypt16(18995), + this.instances3.alice.encrypt64(18443093417222594453), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint16, euint64) => ebool test 2 (18991, 18995)', async function () { + const res = await this.contract3.lt_euint16_euint64( + this.instances3.alice.encrypt16(18991), + this.instances3.alice.encrypt64(18995), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint16, euint64) => ebool test 3 (18995, 18995)', async function () { + const res = await this.contract3.lt_euint16_euint64( + this.instances3.alice.encrypt16(18995), + this.instances3.alice.encrypt64(18995), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, euint64) => ebool test 4 (18995, 18991)', async function () { + const res = await this.contract3.lt_euint16_euint64( + this.instances3.alice.encrypt16(18995), + this.instances3.alice.encrypt64(18991), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint16, euint64) => euint64 test 1 (60945, 18442404212044065569)', async function () { + const res = await this.contract3.min_euint16_euint64( + this.instances3.alice.encrypt16(60945), + this.instances3.alice.encrypt64(18442404212044065569), + ); + expect(res).to.equal(60945n); + }); + + it('test operator "min" overload (euint16, euint64) => euint64 test 2 (60941, 60945)', async function () { + const res = await this.contract3.min_euint16_euint64( + this.instances3.alice.encrypt16(60941), + this.instances3.alice.encrypt64(60945), + ); + expect(res).to.equal(60941n); + }); + + it('test operator "min" overload (euint16, euint64) => euint64 test 3 (60945, 60945)', async function () { + const res = await this.contract3.min_euint16_euint64( + this.instances3.alice.encrypt16(60945), + this.instances3.alice.encrypt64(60945), + ); + expect(res).to.equal(60945n); + }); + + it('test operator "min" overload (euint16, euint64) => euint64 test 4 (60945, 60941)', async function () { + const res = await this.contract3.min_euint16_euint64( + this.instances3.alice.encrypt16(60945), + this.instances3.alice.encrypt64(60941), + ); + expect(res).to.equal(60941n); + }); + + it('test operator "max" overload (euint16, euint64) => euint64 test 1 (23644, 18446414081706845657)', async function () { + const res = await this.contract3.max_euint16_euint64( + this.instances3.alice.encrypt16(23644), + this.instances3.alice.encrypt64(18446414081706845657), + ); + expect(res).to.equal(18446414081706845657n); + }); + + it('test operator "max" overload (euint16, euint64) => euint64 test 2 (23640, 23644)', async function () { + const res = await this.contract3.max_euint16_euint64( + this.instances3.alice.encrypt16(23640), + this.instances3.alice.encrypt64(23644), + ); + expect(res).to.equal(23644n); + }); + + it('test operator "max" overload (euint16, euint64) => euint64 test 3 (23644, 23644)', async function () { + const res = await this.contract3.max_euint16_euint64( + this.instances3.alice.encrypt16(23644), + this.instances3.alice.encrypt64(23644), + ); + expect(res).to.equal(23644n); + }); + + it('test operator "max" overload (euint16, euint64) => euint64 test 4 (23644, 23640)', async function () { + const res = await this.contract3.max_euint16_euint64( + this.instances3.alice.encrypt16(23644), + this.instances3.alice.encrypt64(23640), + ); + expect(res).to.equal(23644n); + }); + + it('test operator "add" overload (euint16, uint16) => euint16 test 1 (54451, 6303)', async function () { + const res = await this.contract3.add_euint16_uint16(this.instances3.alice.encrypt16(54451), 6303); + expect(res).to.equal(60754n); + }); + + it('test operator "add" overload (euint16, uint16) => euint16 test 2 (22056, 22058)', async function () { + const res = await this.contract3.add_euint16_uint16(this.instances3.alice.encrypt16(22056), 22058); + expect(res).to.equal(44114n); + }); + + it('test operator "add" overload (euint16, uint16) => euint16 test 3 (22058, 22058)', async function () { + const res = await this.contract3.add_euint16_uint16(this.instances3.alice.encrypt16(22058), 22058); + expect(res).to.equal(44116n); + }); + + it('test operator "add" overload (euint16, uint16) => euint16 test 4 (22058, 22056)', async function () { + const res = await this.contract3.add_euint16_uint16(this.instances3.alice.encrypt16(22058), 22056); + expect(res).to.equal(44114n); + }); + + it('test operator "add" overload (uint16, euint16) => euint16 test 1 (29751, 3152)', async function () { + const res = await this.contract3.add_uint16_euint16(29751, this.instances3.alice.encrypt16(3152)); + expect(res).to.equal(32903n); + }); + + it('test operator "add" overload (uint16, euint16) => euint16 test 2 (22056, 22058)', async function () { + const res = await this.contract3.add_uint16_euint16(22056, this.instances3.alice.encrypt16(22058)); + expect(res).to.equal(44114n); + }); + + it('test operator "add" overload (uint16, euint16) => euint16 test 3 (22058, 22058)', async function () { + const res = await this.contract3.add_uint16_euint16(22058, this.instances3.alice.encrypt16(22058)); + expect(res).to.equal(44116n); + }); + + it('test operator "add" overload (uint16, euint16) => euint16 test 4 (22058, 22056)', async function () { + const res = await this.contract3.add_uint16_euint16(22058, this.instances3.alice.encrypt16(22056)); + expect(res).to.equal(44114n); + }); + + it('test operator "sub" overload (euint16, uint16) => euint16 test 1 (56955, 56955)', async function () { + const res = await this.contract3.sub_euint16_uint16(this.instances3.alice.encrypt16(56955), 56955); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint16, uint16) => euint16 test 2 (56955, 56951)', async function () { + const res = await this.contract3.sub_euint16_uint16(this.instances3.alice.encrypt16(56955), 56951); + expect(res).to.equal(4n); + }); + + it('test operator "sub" overload (uint16, euint16) => euint16 test 1 (56955, 56955)', async function () { + const res = await this.contract3.sub_uint16_euint16(56955, this.instances3.alice.encrypt16(56955)); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (uint16, euint16) => euint16 test 2 (56955, 56951)', async function () { + const res = await this.contract3.sub_uint16_euint16(56955, this.instances3.alice.encrypt16(56951)); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint16, uint16) => euint16 test 1 (239, 131)', async function () { + const res = await this.contract3.mul_euint16_uint16(this.instances3.alice.encrypt16(239), 131); + expect(res).to.equal(31309n); + }); + + it('test operator "mul" overload (euint16, uint16) => euint16 test 2 (239, 239)', async function () { + const res = await this.contract3.mul_euint16_uint16(this.instances3.alice.encrypt16(239), 239); + expect(res).to.equal(57121n); + }); + + it('test operator "mul" overload (euint16, uint16) => euint16 test 3 (239, 239)', async function () { + const res = await this.contract3.mul_euint16_uint16(this.instances3.alice.encrypt16(239), 239); + expect(res).to.equal(57121n); + }); + + it('test operator "mul" overload (euint16, uint16) => euint16 test 4 (239, 239)', async function () { + const res = await this.contract3.mul_euint16_uint16(this.instances3.alice.encrypt16(239), 239); + expect(res).to.equal(57121n); + }); + + it('test operator "mul" overload (uint16, euint16) => euint16 test 1 (190, 131)', async function () { + const res = await this.contract3.mul_uint16_euint16(190, this.instances3.alice.encrypt16(131)); + expect(res).to.equal(24890n); + }); + + it('test operator "mul" overload (uint16, euint16) => euint16 test 2 (239, 239)', async function () { + const res = await this.contract3.mul_uint16_euint16(239, this.instances3.alice.encrypt16(239)); + expect(res).to.equal(57121n); + }); + + it('test operator "mul" overload (uint16, euint16) => euint16 test 3 (239, 239)', async function () { + const res = await this.contract3.mul_uint16_euint16(239, this.instances3.alice.encrypt16(239)); + expect(res).to.equal(57121n); + }); + + it('test operator "mul" overload (uint16, euint16) => euint16 test 4 (239, 239)', async function () { + const res = await this.contract3.mul_uint16_euint16(239, this.instances3.alice.encrypt16(239)); + expect(res).to.equal(57121n); + }); + + it('test operator "div" overload (euint16, uint16) => euint16 test 1 (61139, 60988)', async function () { + const res = await this.contract3.div_euint16_uint16(this.instances3.alice.encrypt16(61139), 60988); + expect(res).to.equal(1n); + }); + + it('test operator "div" overload (euint16, uint16) => euint16 test 2 (59165, 59169)', async function () { + const res = await this.contract3.div_euint16_uint16(this.instances3.alice.encrypt16(59165), 59169); + expect(res).to.equal(0n); + }); + + it('test operator "div" overload (euint16, uint16) => euint16 test 3 (59169, 59169)', async function () { + const res = await this.contract3.div_euint16_uint16(this.instances3.alice.encrypt16(59169), 59169); + expect(res).to.equal(1n); + }); + + it('test operator "div" overload (euint16, uint16) => euint16 test 4 (59169, 59165)', async function () { + const res = await this.contract3.div_euint16_uint16(this.instances3.alice.encrypt16(59169), 59165); + expect(res).to.equal(1n); + }); + + it('test operator "rem" overload (euint16, uint16) => euint16 test 1 (18856, 18330)', async function () { + const res = await this.contract3.rem_euint16_uint16(this.instances3.alice.encrypt16(18856), 18330); + expect(res).to.equal(526n); + }); + + it('test operator "rem" overload (euint16, uint16) => euint16 test 2 (18852, 18856)', async function () { + const res = await this.contract3.rem_euint16_uint16(this.instances3.alice.encrypt16(18852), 18856); + expect(res).to.equal(18852n); + }); + + it('test operator "rem" overload (euint16, uint16) => euint16 test 3 (18856, 18856)', async function () { + const res = await this.contract3.rem_euint16_uint16(this.instances3.alice.encrypt16(18856), 18856); + expect(res).to.equal(0n); + }); + + it('test operator "rem" overload (euint16, uint16) => euint16 test 4 (18856, 18852)', async function () { + const res = await this.contract3.rem_euint16_uint16(this.instances3.alice.encrypt16(18856), 18852); + expect(res).to.equal(4n); + }); + + it('test operator "eq" overload (euint16, uint16) => ebool test 1 (53936, 62296)', async function () { + const res = await this.contract3.eq_euint16_uint16(this.instances3.alice.encrypt16(53936), 62296); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint16, uint16) => ebool test 2 (53932, 53936)', async function () { + const res = await this.contract3.eq_euint16_uint16(this.instances3.alice.encrypt16(53932), 53936); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint16, uint16) => ebool test 3 (53936, 53936)', async function () { + const res = await this.contract3.eq_euint16_uint16(this.instances3.alice.encrypt16(53936), 53936); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint16, uint16) => ebool test 4 (53936, 53932)', async function () { + const res = await this.contract3.eq_euint16_uint16(this.instances3.alice.encrypt16(53936), 53932); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (uint16, euint16) => ebool test 1 (49783, 62296)', async function () { + const res = await this.contract3.eq_uint16_euint16(49783, this.instances3.alice.encrypt16(62296)); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (uint16, euint16) => ebool test 2 (53932, 53936)', async function () { + const res = await this.contract3.eq_uint16_euint16(53932, this.instances3.alice.encrypt16(53936)); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (uint16, euint16) => ebool test 3 (53936, 53936)', async function () { + const res = await this.contract3.eq_uint16_euint16(53936, this.instances3.alice.encrypt16(53936)); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (uint16, euint16) => ebool test 4 (53936, 53932)', async function () { + const res = await this.contract3.eq_uint16_euint16(53936, this.instances3.alice.encrypt16(53932)); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint16, uint16) => ebool test 1 (64200, 15145)', async function () { + const res = await this.contract3.ne_euint16_uint16(this.instances3.alice.encrypt16(64200), 15145); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint16, uint16) => ebool test 2 (17034, 17038)', async function () { + const res = await this.contract3.ne_euint16_uint16(this.instances3.alice.encrypt16(17034), 17038); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint16, uint16) => ebool test 3 (17038, 17038)', async function () { + const res = await this.contract3.ne_euint16_uint16(this.instances3.alice.encrypt16(17038), 17038); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint16, uint16) => ebool test 4 (17038, 17034)', async function () { + const res = await this.contract3.ne_euint16_uint16(this.instances3.alice.encrypt16(17038), 17034); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (uint16, euint16) => ebool test 1 (35214, 15145)', async function () { + const res = await this.contract3.ne_uint16_euint16(35214, this.instances3.alice.encrypt16(15145)); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (uint16, euint16) => ebool test 2 (17034, 17038)', async function () { + const res = await this.contract3.ne_uint16_euint16(17034, this.instances3.alice.encrypt16(17038)); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (uint16, euint16) => ebool test 3 (17038, 17038)', async function () { + const res = await this.contract3.ne_uint16_euint16(17038, this.instances3.alice.encrypt16(17038)); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (uint16, euint16) => ebool test 4 (17038, 17034)', async function () { + const res = await this.contract3.ne_uint16_euint16(17038, this.instances3.alice.encrypt16(17034)); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, uint16) => ebool test 1 (18226, 26413)', async function () { + const res = await this.contract3.ge_euint16_uint16(this.instances3.alice.encrypt16(18226), 26413); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint16, uint16) => ebool test 2 (11813, 11817)', async function () { + const res = await this.contract3.ge_euint16_uint16(this.instances3.alice.encrypt16(11813), 11817); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint16, uint16) => ebool test 3 (11817, 11817)', async function () { + const res = await this.contract3.ge_euint16_uint16(this.instances3.alice.encrypt16(11817), 11817); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint16, uint16) => ebool test 4 (11817, 11813)', async function () { + const res = await this.contract3.ge_euint16_uint16(this.instances3.alice.encrypt16(11817), 11813); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (uint16, euint16) => ebool test 1 (45131, 26413)', async function () { + const res = await this.contract3.ge_uint16_euint16(45131, this.instances3.alice.encrypt16(26413)); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (uint16, euint16) => ebool test 2 (11813, 11817)', async function () { + const res = await this.contract3.ge_uint16_euint16(11813, this.instances3.alice.encrypt16(11817)); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (uint16, euint16) => ebool test 3 (11817, 11817)', async function () { + const res = await this.contract3.ge_uint16_euint16(11817, this.instances3.alice.encrypt16(11817)); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (uint16, euint16) => ebool test 4 (11817, 11813)', async function () { + const res = await this.contract3.ge_uint16_euint16(11817, this.instances3.alice.encrypt16(11813)); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint16, uint16) => ebool test 1 (46712, 65342)', async function () { + const res = await this.contract3.gt_euint16_uint16(this.instances3.alice.encrypt16(46712), 65342); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, uint16) => ebool test 2 (46708, 46712)', async function () { + const res = await this.contract3.gt_euint16_uint16(this.instances3.alice.encrypt16(46708), 46712); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, uint16) => ebool test 3 (46712, 46712)', async function () { + const res = await this.contract3.gt_euint16_uint16(this.instances3.alice.encrypt16(46712), 46712); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint16, uint16) => ebool test 4 (46712, 46708)', async function () { + const res = await this.contract3.gt_euint16_uint16(this.instances3.alice.encrypt16(46712), 46708); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (uint16, euint16) => ebool test 1 (58255, 65342)', async function () { + const res = await this.contract3.gt_uint16_euint16(58255, this.instances3.alice.encrypt16(65342)); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (uint16, euint16) => ebool test 2 (46708, 46712)', async function () { + const res = await this.contract3.gt_uint16_euint16(46708, this.instances3.alice.encrypt16(46712)); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (uint16, euint16) => ebool test 3 (46712, 46712)', async function () { + const res = await this.contract3.gt_uint16_euint16(46712, this.instances3.alice.encrypt16(46712)); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (uint16, euint16) => ebool test 4 (46712, 46708)', async function () { + const res = await this.contract3.gt_uint16_euint16(46712, this.instances3.alice.encrypt16(46708)); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, uint16) => ebool test 1 (9281, 23936)', async function () { + const res = await this.contract3.le_euint16_uint16(this.instances3.alice.encrypt16(9281), 23936); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, uint16) => ebool test 2 (9277, 9281)', async function () { + const res = await this.contract3.le_euint16_uint16(this.instances3.alice.encrypt16(9277), 9281); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, uint16) => ebool test 3 (9281, 9281)', async function () { + const res = await this.contract3.le_euint16_uint16(this.instances3.alice.encrypt16(9281), 9281); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint16, uint16) => ebool test 4 (9281, 9277)', async function () { + const res = await this.contract3.le_euint16_uint16(this.instances3.alice.encrypt16(9281), 9277); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (uint16, euint16) => ebool test 1 (49675, 23936)', async function () { + const res = await this.contract3.le_uint16_euint16(49675, this.instances3.alice.encrypt16(23936)); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (uint16, euint16) => ebool test 2 (9277, 9281)', async function () { + const res = await this.contract3.le_uint16_euint16(9277, this.instances3.alice.encrypt16(9281)); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (uint16, euint16) => ebool test 3 (9281, 9281)', async function () { + const res = await this.contract3.le_uint16_euint16(9281, this.instances3.alice.encrypt16(9281)); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (uint16, euint16) => ebool test 4 (9281, 9277)', async function () { + const res = await this.contract3.le_uint16_euint16(9281, this.instances3.alice.encrypt16(9277)); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, uint16) => ebool test 1 (44794, 29106)', async function () { + const res = await this.contract3.lt_euint16_uint16(this.instances3.alice.encrypt16(44794), 29106); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, uint16) => ebool test 2 (23286, 23290)', async function () { + const res = await this.contract3.lt_euint16_uint16(this.instances3.alice.encrypt16(23286), 23290); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint16, uint16) => ebool test 3 (23290, 23290)', async function () { + const res = await this.contract3.lt_euint16_uint16(this.instances3.alice.encrypt16(23290), 23290); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint16, uint16) => ebool test 4 (23290, 23286)', async function () { + const res = await this.contract3.lt_euint16_uint16(this.instances3.alice.encrypt16(23290), 23286); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (uint16, euint16) => ebool test 1 (11942, 29106)', async function () { + const res = await this.contract3.lt_uint16_euint16(11942, this.instances3.alice.encrypt16(29106)); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (uint16, euint16) => ebool test 2 (23286, 23290)', async function () { + const res = await this.contract3.lt_uint16_euint16(23286, this.instances3.alice.encrypt16(23290)); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (uint16, euint16) => ebool test 3 (23290, 23290)', async function () { + const res = await this.contract3.lt_uint16_euint16(23290, this.instances3.alice.encrypt16(23290)); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (uint16, euint16) => ebool test 4 (23290, 23286)', async function () { + const res = await this.contract3.lt_uint16_euint16(23290, this.instances3.alice.encrypt16(23286)); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint16, uint16) => euint16 test 1 (30936, 64470)', async function () { + const res = await this.contract3.min_euint16_uint16(this.instances3.alice.encrypt16(30936), 64470); + expect(res).to.equal(30936n); + }); + + it('test operator "min" overload (euint16, uint16) => euint16 test 2 (9023, 9027)', async function () { + const res = await this.contract3.min_euint16_uint16(this.instances3.alice.encrypt16(9023), 9027); + expect(res).to.equal(9023n); + }); + + it('test operator "min" overload (euint16, uint16) => euint16 test 3 (9027, 9027)', async function () { + const res = await this.contract3.min_euint16_uint16(this.instances3.alice.encrypt16(9027), 9027); + expect(res).to.equal(9027n); + }); + + it('test operator "min" overload (euint16, uint16) => euint16 test 4 (9027, 9023)', async function () { + const res = await this.contract3.min_euint16_uint16(this.instances3.alice.encrypt16(9027), 9023); + expect(res).to.equal(9023n); + }); + + it('test operator "min" overload (uint16, euint16) => euint16 test 1 (10499, 64470)', async function () { + const res = await this.contract3.min_uint16_euint16(10499, this.instances3.alice.encrypt16(64470)); + expect(res).to.equal(10499n); + }); + + it('test operator "min" overload (uint16, euint16) => euint16 test 2 (9023, 9027)', async function () { + const res = await this.contract3.min_uint16_euint16(9023, this.instances3.alice.encrypt16(9027)); + expect(res).to.equal(9023n); + }); + + it('test operator "min" overload (uint16, euint16) => euint16 test 3 (9027, 9027)', async function () { + const res = await this.contract3.min_uint16_euint16(9027, this.instances3.alice.encrypt16(9027)); + expect(res).to.equal(9027n); + }); + + it('test operator "min" overload (uint16, euint16) => euint16 test 4 (9027, 9023)', async function () { + const res = await this.contract3.min_uint16_euint16(9027, this.instances3.alice.encrypt16(9023)); + expect(res).to.equal(9023n); + }); + + it('test operator "max" overload (euint16, uint16) => euint16 test 1 (34561, 63895)', async function () { + const res = await this.contract3.max_euint16_uint16(this.instances3.alice.encrypt16(34561), 63895); + expect(res).to.equal(63895n); + }); + + it('test operator "max" overload (euint16, uint16) => euint16 test 2 (34557, 34561)', async function () { + const res = await this.contract3.max_euint16_uint16(this.instances3.alice.encrypt16(34557), 34561); + expect(res).to.equal(34561n); + }); + + it('test operator "max" overload (euint16, uint16) => euint16 test 3 (34561, 34561)', async function () { + const res = await this.contract3.max_euint16_uint16(this.instances3.alice.encrypt16(34561), 34561); + expect(res).to.equal(34561n); + }); + + it('test operator "max" overload (euint16, uint16) => euint16 test 4 (34561, 34557)', async function () { + const res = await this.contract3.max_euint16_uint16(this.instances3.alice.encrypt16(34561), 34557); + expect(res).to.equal(34561n); + }); + + it('test operator "max" overload (uint16, euint16) => euint16 test 1 (52784, 63895)', async function () { + const res = await this.contract3.max_uint16_euint16(52784, this.instances3.alice.encrypt16(63895)); + expect(res).to.equal(63895n); + }); + + it('test operator "max" overload (uint16, euint16) => euint16 test 2 (34557, 34561)', async function () { + const res = await this.contract3.max_uint16_euint16(34557, this.instances3.alice.encrypt16(34561)); + expect(res).to.equal(34561n); + }); + + it('test operator "max" overload (uint16, euint16) => euint16 test 3 (34561, 34561)', async function () { + const res = await this.contract3.max_uint16_euint16(34561, this.instances3.alice.encrypt16(34561)); + expect(res).to.equal(34561n); + }); + + it('test operator "max" overload (uint16, euint16) => euint16 test 4 (34561, 34557)', async function () { + const res = await this.contract3.max_uint16_euint16(34561, this.instances3.alice.encrypt16(34557)); + expect(res).to.equal(34561n); + }); + + it('test operator "add" overload (euint32, euint4) => euint32 test 1 (11, 2)', async function () { + const res = await this.contract3.add_euint32_euint4( + this.instances3.alice.encrypt32(11), + this.instances3.alice.encrypt4(2), + ); + expect(res).to.equal(13n); + }); + + it('test operator "add" overload (euint32, euint4) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract3.add_euint32_euint4( + this.instances3.alice.encrypt32(4), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(12n); + }); + + it('test operator "add" overload (euint32, euint4) => euint32 test 3 (5, 5)', async function () { + const res = await this.contract3.add_euint32_euint4( + this.instances3.alice.encrypt32(5), + this.instances3.alice.encrypt4(5), + ); + expect(res).to.equal(10n); + }); + + it('test operator "add" overload (euint32, euint4) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract3.add_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "sub" overload (euint32, euint4) => euint32 test 1 (8, 8)', async function () { + const res = await this.contract3.sub_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint32, euint4) => euint32 test 2 (8, 4)', async function () { + const res = await this.contract3.sub_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(4), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint32, euint4) => euint32 test 1 (5, 2)', async function () { + const res = await this.contract3.mul_euint32_euint4( + this.instances3.alice.encrypt32(5), + this.instances3.alice.encrypt4(2), + ); + expect(res).to.equal(10n); + }); + + it('test operator "mul" overload (euint32, euint4) => euint32 test 2 (3, 3)', async function () { + const res = await this.contract3.mul_euint32_euint4( + this.instances3.alice.encrypt32(3), + this.instances3.alice.encrypt4(3), + ); + expect(res).to.equal(9n); + }); + + it('test operator "mul" overload (euint32, euint4) => euint32 test 3 (3, 3)', async function () { + const res = await this.contract3.mul_euint32_euint4( + this.instances3.alice.encrypt32(3), + this.instances3.alice.encrypt4(3), + ); + expect(res).to.equal(9n); + }); + + it('test operator "mul" overload (euint32, euint4) => euint32 test 4 (3, 3)', async function () { + const res = await this.contract3.mul_euint32_euint4( + this.instances3.alice.encrypt32(3), + this.instances3.alice.encrypt4(3), + ); + expect(res).to.equal(9n); + }); + + it('test operator "and" overload (euint32, euint4) => euint32 test 1 (1301921086, 9)', async function () { + const res = await this.contract3.and_euint32_euint4( + this.instances3.alice.encrypt32(1301921086), + this.instances3.alice.encrypt4(9), + ); + expect(res).to.equal(8n); + }); + + it('test operator "and" overload (euint32, euint4) => euint32 test 2 (5, 9)', async function () { + const res = await this.contract3.and_euint32_euint4( + this.instances3.alice.encrypt32(5), + this.instances3.alice.encrypt4(9), + ); + expect(res).to.equal(1n); + }); + + it('test operator "and" overload (euint32, euint4) => euint32 test 3 (9, 9)', async function () { + const res = await this.contract3.and_euint32_euint4( + this.instances3.alice.encrypt32(9), + this.instances3.alice.encrypt4(9), + ); + expect(res).to.equal(9n); + }); + + it('test operator "and" overload (euint32, euint4) => euint32 test 4 (9, 5)', async function () { + const res = await this.contract3.and_euint32_euint4( + this.instances3.alice.encrypt32(9), + this.instances3.alice.encrypt4(5), + ); + expect(res).to.equal(1n); + }); + + it('test operator "or" overload (euint32, euint4) => euint32 test 1 (2406735968, 5)', async function () { + const res = await this.contract3.or_euint32_euint4( + this.instances3.alice.encrypt32(2406735968), + this.instances3.alice.encrypt4(5), + ); + expect(res).to.equal(2406735973n); + }); + + it('test operator "or" overload (euint32, euint4) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract3.or_euint32_euint4( + this.instances3.alice.encrypt32(4), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(12n); + }); + + it('test operator "or" overload (euint32, euint4) => euint32 test 3 (8, 8)', async function () { + const res = await this.contract3.or_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "or" overload (euint32, euint4) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract3.or_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(4), + ); + expect(res).to.equal(12n); + }); + + it('test operator "xor" overload (euint32, euint4) => euint32 test 1 (3625477729, 13)', async function () { + const res = await this.contract3.xor_euint32_euint4( + this.instances3.alice.encrypt32(3625477729), + this.instances3.alice.encrypt4(13), + ); + expect(res).to.equal(3625477740n); + }); + + it('test operator "xor" overload (euint32, euint4) => euint32 test 2 (9, 13)', async function () { + const res = await this.contract3.xor_euint32_euint4( + this.instances3.alice.encrypt32(9), + this.instances3.alice.encrypt4(13), + ); + expect(res).to.equal(4n); + }); + + it('test operator "xor" overload (euint32, euint4) => euint32 test 3 (13, 13)', async function () { + const res = await this.contract3.xor_euint32_euint4( + this.instances3.alice.encrypt32(13), + this.instances3.alice.encrypt4(13), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint32, euint4) => euint32 test 4 (13, 9)', async function () { + const res = await this.contract3.xor_euint32_euint4( + this.instances3.alice.encrypt32(13), + this.instances3.alice.encrypt4(9), + ); + expect(res).to.equal(4n); + }); + + it('test operator "eq" overload (euint32, euint4) => ebool test 1 (2724048740, 14)', async function () { + const res = await this.contract3.eq_euint32_euint4( + this.instances3.alice.encrypt32(2724048740), + this.instances3.alice.encrypt4(14), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint32, euint4) => ebool test 2 (10, 14)', async function () { + const res = await this.contract3.eq_euint32_euint4( + this.instances3.alice.encrypt32(10), + this.instances3.alice.encrypt4(14), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint32, euint4) => ebool test 3 (14, 14)', async function () { + const res = await this.contract3.eq_euint32_euint4( + this.instances3.alice.encrypt32(14), + this.instances3.alice.encrypt4(14), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint32, euint4) => ebool test 4 (14, 10)', async function () { + const res = await this.contract3.eq_euint32_euint4( + this.instances3.alice.encrypt32(14), + this.instances3.alice.encrypt4(10), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint32, euint4) => ebool test 1 (2506657954, 7)', async function () { + const res = await this.contract3.ne_euint32_euint4( + this.instances3.alice.encrypt32(2506657954), + this.instances3.alice.encrypt4(7), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint32, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract3.ne_euint32_euint4( + this.instances3.alice.encrypt32(4), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint32, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract3.ne_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint32, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract3.ne_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(4), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint32, euint4) => ebool test 1 (4064050662, 13)', async function () { + const res = await this.contract3.ge_euint32_euint4( + this.instances3.alice.encrypt32(4064050662), + this.instances3.alice.encrypt4(13), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint32, euint4) => ebool test 2 (9, 13)', async function () { + const res = await this.contract3.ge_euint32_euint4( + this.instances3.alice.encrypt32(9), + this.instances3.alice.encrypt4(13), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint32, euint4) => ebool test 3 (13, 13)', async function () { + const res = await this.contract3.ge_euint32_euint4( + this.instances3.alice.encrypt32(13), + this.instances3.alice.encrypt4(13), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint32, euint4) => ebool test 4 (13, 9)', async function () { + const res = await this.contract3.ge_euint32_euint4( + this.instances3.alice.encrypt32(13), + this.instances3.alice.encrypt4(9), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint32, euint4) => ebool test 1 (2933730621, 7)', async function () { + const res = await this.contract3.gt_euint32_euint4( + this.instances3.alice.encrypt32(2933730621), + this.instances3.alice.encrypt4(7), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint32, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract3.gt_euint32_euint4( + this.instances3.alice.encrypt32(4), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint32, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract3.gt_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint32, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract3.gt_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(4), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint32, euint4) => ebool test 1 (4064031115, 9)', async function () { + const res = await this.contract3.le_euint32_euint4( + this.instances3.alice.encrypt32(4064031115), + this.instances3.alice.encrypt4(9), + ); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (euint32, euint4) => ebool test 2 (5, 9)', async function () { + const res = await this.contract3.le_euint32_euint4( + this.instances3.alice.encrypt32(5), + this.instances3.alice.encrypt4(9), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint32, euint4) => ebool test 3 (9, 9)', async function () { + const res = await this.contract3.le_euint32_euint4( + this.instances3.alice.encrypt32(9), + this.instances3.alice.encrypt4(9), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint32, euint4) => ebool test 4 (9, 5)', async function () { + const res = await this.contract3.le_euint32_euint4( + this.instances3.alice.encrypt32(9), + this.instances3.alice.encrypt4(5), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint32, euint4) => ebool test 1 (3623618060, 5)', async function () { + const res = await this.contract3.lt_euint32_euint4( + this.instances3.alice.encrypt32(3623618060), + this.instances3.alice.encrypt4(5), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint32, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract3.lt_euint32_euint4( + this.instances3.alice.encrypt32(4), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint32, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract3.lt_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint32, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract3.lt_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(4), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint32, euint4) => euint32 test 1 (3192029980, 3)', async function () { + const res = await this.contract3.min_euint32_euint4( + this.instances3.alice.encrypt32(3192029980), + this.instances3.alice.encrypt4(3), + ); + expect(res).to.equal(3n); + }); + + it('test operator "min" overload (euint32, euint4) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract3.min_euint32_euint4( + this.instances3.alice.encrypt32(4), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(4n); + }); + + it('test operator "min" overload (euint32, euint4) => euint32 test 3 (8, 8)', async function () { + const res = await this.contract3.min_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "min" overload (euint32, euint4) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract3.min_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(4), + ); + expect(res).to.equal(4n); + }); + + it('test operator "max" overload (euint32, euint4) => euint32 test 1 (681402629, 7)', async function () { + const res = await this.contract3.max_euint32_euint4( + this.instances3.alice.encrypt32(681402629), + this.instances3.alice.encrypt4(7), + ); + expect(res).to.equal(681402629n); + }); + + it('test operator "max" overload (euint32, euint4) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract3.max_euint32_euint4( + this.instances3.alice.encrypt32(4), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "max" overload (euint32, euint4) => euint32 test 3 (8, 8)', async function () { + const res = await this.contract3.max_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(8), + ); + expect(res).to.equal(8n); + }); + + it('test operator "max" overload (euint32, euint4) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract3.max_euint32_euint4( + this.instances3.alice.encrypt32(8), + this.instances3.alice.encrypt4(4), + ); + expect(res).to.equal(8n); + }); + + it('test operator "add" overload (euint32, euint8) => euint32 test 1 (186, 2)', async function () { + const res = await this.contract3.add_euint32_euint8( + this.instances3.alice.encrypt32(186), + this.instances3.alice.encrypt8(2), + ); + expect(res).to.equal(188n); + }); + + it('test operator "add" overload (euint32, euint8) => euint32 test 2 (69, 71)', async function () { + const res = await this.contract3.add_euint32_euint8( + this.instances3.alice.encrypt32(69), + this.instances3.alice.encrypt8(71), + ); + expect(res).to.equal(140n); + }); + + it('test operator "add" overload (euint32, euint8) => euint32 test 3 (71, 71)', async function () { + const res = await this.contract3.add_euint32_euint8( + this.instances3.alice.encrypt32(71), + this.instances3.alice.encrypt8(71), + ); + expect(res).to.equal(142n); + }); + + it('test operator "add" overload (euint32, euint8) => euint32 test 4 (71, 69)', async function () { + const res = await this.contract3.add_euint32_euint8( + this.instances3.alice.encrypt32(71), + this.instances3.alice.encrypt8(69), + ); + expect(res).to.equal(140n); + }); + + it('test operator "sub" overload (euint32, euint8) => euint32 test 1 (179, 179)', async function () { + const res = await this.contract3.sub_euint32_euint8( + this.instances3.alice.encrypt32(179), + this.instances3.alice.encrypt8(179), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint32, euint8) => euint32 test 2 (179, 175)', async function () { + const res = await this.contract3.sub_euint32_euint8( + this.instances3.alice.encrypt32(179), + this.instances3.alice.encrypt8(175), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint32, euint8) => euint32 test 1 (107, 2)', async function () { + const res = await this.contract3.mul_euint32_euint8( + this.instances3.alice.encrypt32(107), + this.instances3.alice.encrypt8(2), + ); + expect(res).to.equal(214n); + }); + + it('test operator "mul" overload (euint32, euint8) => euint32 test 2 (12, 12)', async function () { + const res = await this.contract3.mul_euint32_euint8( + this.instances3.alice.encrypt32(12), + this.instances3.alice.encrypt8(12), + ); + expect(res).to.equal(144n); + }); + + it('test operator "mul" overload (euint32, euint8) => euint32 test 3 (12, 12)', async function () { + const res = await this.contract3.mul_euint32_euint8( + this.instances3.alice.encrypt32(12), + this.instances3.alice.encrypt8(12), + ); + expect(res).to.equal(144n); + }); + + it('test operator "mul" overload (euint32, euint8) => euint32 test 4 (12, 12)', async function () { + const res = await this.contract3.mul_euint32_euint8( + this.instances3.alice.encrypt32(12), + this.instances3.alice.encrypt8(12), + ); + expect(res).to.equal(144n); + }); + + it('test operator "and" overload (euint32, euint8) => euint32 test 1 (2684075699, 16)', async function () { + const res = await this.contract3.and_euint32_euint8( + this.instances3.alice.encrypt32(2684075699), + this.instances3.alice.encrypt8(16), + ); + expect(res).to.equal(16n); + }); + + it('test operator "and" overload (euint32, euint8) => euint32 test 2 (12, 16)', async function () { + const res = await this.contract3.and_euint32_euint8( + this.instances3.alice.encrypt32(12), + this.instances3.alice.encrypt8(16), + ); + expect(res).to.equal(0n); + }); + + it('test operator "and" overload (euint32, euint8) => euint32 test 3 (16, 16)', async function () { + const res = await this.contract3.and_euint32_euint8( + this.instances3.alice.encrypt32(16), + this.instances3.alice.encrypt8(16), + ); + expect(res).to.equal(16n); + }); + + it('test operator "and" overload (euint32, euint8) => euint32 test 4 (16, 12)', async function () { + const res = await this.contract3.and_euint32_euint8( + this.instances3.alice.encrypt32(16), + this.instances3.alice.encrypt8(12), + ); + expect(res).to.equal(0n); + }); + + it('test operator "or" overload (euint32, euint8) => euint32 test 1 (3961011805, 118)', async function () { + const res = await this.contract4.or_euint32_euint8( + this.instances4.alice.encrypt32(3961011805), + this.instances4.alice.encrypt8(118), + ); + expect(res).to.equal(3961011839n); + }); + + it('test operator "or" overload (euint32, euint8) => euint32 test 2 (114, 118)', async function () { + const res = await this.contract4.or_euint32_euint8( + this.instances4.alice.encrypt32(114), + this.instances4.alice.encrypt8(118), + ); + expect(res).to.equal(118n); + }); + + it('test operator "or" overload (euint32, euint8) => euint32 test 3 (118, 118)', async function () { + const res = await this.contract4.or_euint32_euint8( + this.instances4.alice.encrypt32(118), + this.instances4.alice.encrypt8(118), + ); + expect(res).to.equal(118n); + }); + + it('test operator "or" overload (euint32, euint8) => euint32 test 4 (118, 114)', async function () { + const res = await this.contract4.or_euint32_euint8( + this.instances4.alice.encrypt32(118), + this.instances4.alice.encrypt8(114), + ); + expect(res).to.equal(118n); + }); + + it('test operator "xor" overload (euint32, euint8) => euint32 test 1 (2615810877, 184)', async function () { + const res = await this.contract4.xor_euint32_euint8( + this.instances4.alice.encrypt32(2615810877), + this.instances4.alice.encrypt8(184), + ); + expect(res).to.equal(2615810949n); + }); + + it('test operator "xor" overload (euint32, euint8) => euint32 test 2 (180, 184)', async function () { + const res = await this.contract4.xor_euint32_euint8( + this.instances4.alice.encrypt32(180), + this.instances4.alice.encrypt8(184), + ); + expect(res).to.equal(12n); + }); + + it('test operator "xor" overload (euint32, euint8) => euint32 test 3 (184, 184)', async function () { + const res = await this.contract4.xor_euint32_euint8( + this.instances4.alice.encrypt32(184), + this.instances4.alice.encrypt8(184), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint32, euint8) => euint32 test 4 (184, 180)', async function () { + const res = await this.contract4.xor_euint32_euint8( + this.instances4.alice.encrypt32(184), + this.instances4.alice.encrypt8(180), + ); + expect(res).to.equal(12n); + }); + + it('test operator "eq" overload (euint32, euint8) => ebool test 1 (2890164202, 10)', async function () { + const res = await this.contract4.eq_euint32_euint8( + this.instances4.alice.encrypt32(2890164202), + this.instances4.alice.encrypt8(10), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint32, euint8) => ebool test 2 (6, 10)', async function () { + const res = await this.contract4.eq_euint32_euint8( + this.instances4.alice.encrypt32(6), + this.instances4.alice.encrypt8(10), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint32, euint8) => ebool test 3 (10, 10)', async function () { + const res = await this.contract4.eq_euint32_euint8( + this.instances4.alice.encrypt32(10), + this.instances4.alice.encrypt8(10), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint32, euint8) => ebool test 4 (10, 6)', async function () { + const res = await this.contract4.eq_euint32_euint8( + this.instances4.alice.encrypt32(10), + this.instances4.alice.encrypt8(6), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint32, euint8) => ebool test 1 (874720156, 10)', async function () { + const res = await this.contract4.ne_euint32_euint8( + this.instances4.alice.encrypt32(874720156), + this.instances4.alice.encrypt8(10), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint32, euint8) => ebool test 2 (6, 10)', async function () { + const res = await this.contract4.ne_euint32_euint8( + this.instances4.alice.encrypt32(6), + this.instances4.alice.encrypt8(10), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint32, euint8) => ebool test 3 (10, 10)', async function () { + const res = await this.contract4.ne_euint32_euint8( + this.instances4.alice.encrypt32(10), + this.instances4.alice.encrypt8(10), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint32, euint8) => ebool test 4 (10, 6)', async function () { + const res = await this.contract4.ne_euint32_euint8( + this.instances4.alice.encrypt32(10), + this.instances4.alice.encrypt8(6), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint32, euint8) => ebool test 1 (4107105674, 147)', async function () { + const res = await this.contract4.ge_euint32_euint8( + this.instances4.alice.encrypt32(4107105674), + this.instances4.alice.encrypt8(147), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint32, euint8) => ebool test 2 (143, 147)', async function () { + const res = await this.contract4.ge_euint32_euint8( + this.instances4.alice.encrypt32(143), + this.instances4.alice.encrypt8(147), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint32, euint8) => ebool test 3 (147, 147)', async function () { + const res = await this.contract4.ge_euint32_euint8( + this.instances4.alice.encrypt32(147), + this.instances4.alice.encrypt8(147), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint32, euint8) => ebool test 4 (147, 143)', async function () { + const res = await this.contract4.ge_euint32_euint8( + this.instances4.alice.encrypt32(147), + this.instances4.alice.encrypt8(143), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint32, euint8) => ebool test 1 (1917780828, 163)', async function () { + const res = await this.contract4.gt_euint32_euint8( + this.instances4.alice.encrypt32(1917780828), + this.instances4.alice.encrypt8(163), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint32, euint8) => ebool test 2 (159, 163)', async function () { + const res = await this.contract4.gt_euint32_euint8( + this.instances4.alice.encrypt32(159), + this.instances4.alice.encrypt8(163), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint32, euint8) => ebool test 3 (163, 163)', async function () { + const res = await this.contract4.gt_euint32_euint8( + this.instances4.alice.encrypt32(163), + this.instances4.alice.encrypt8(163), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint32, euint8) => ebool test 4 (163, 159)', async function () { + const res = await this.contract4.gt_euint32_euint8( + this.instances4.alice.encrypt32(163), + this.instances4.alice.encrypt8(159), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint32, euint8) => ebool test 1 (3743657855, 103)', async function () { + const res = await this.contract4.le_euint32_euint8( + this.instances4.alice.encrypt32(3743657855), + this.instances4.alice.encrypt8(103), + ); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (euint32, euint8) => ebool test 2 (99, 103)', async function () { + const res = await this.contract4.le_euint32_euint8( + this.instances4.alice.encrypt32(99), + this.instances4.alice.encrypt8(103), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint32, euint8) => ebool test 3 (103, 103)', async function () { + const res = await this.contract4.le_euint32_euint8( + this.instances4.alice.encrypt32(103), + this.instances4.alice.encrypt8(103), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint32, euint8) => ebool test 4 (103, 99)', async function () { + const res = await this.contract4.le_euint32_euint8( + this.instances4.alice.encrypt32(103), + this.instances4.alice.encrypt8(99), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint32, euint8) => ebool test 1 (800790361, 82)', async function () { + const res = await this.contract4.lt_euint32_euint8( + this.instances4.alice.encrypt32(800790361), + this.instances4.alice.encrypt8(82), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint32, euint8) => ebool test 2 (78, 82)', async function () { + const res = await this.contract4.lt_euint32_euint8( + this.instances4.alice.encrypt32(78), + this.instances4.alice.encrypt8(82), + ); + expect(res).to.equal(true); + }); + + it('test operator "lt" overload (euint32, euint8) => ebool test 3 (82, 82)', async function () { + const res = await this.contract4.lt_euint32_euint8( + this.instances4.alice.encrypt32(82), + this.instances4.alice.encrypt8(82), + ); + expect(res).to.equal(false); + }); + + it('test operator "lt" overload (euint32, euint8) => ebool test 4 (82, 78)', async function () { + const res = await this.contract4.lt_euint32_euint8( + this.instances4.alice.encrypt32(82), + this.instances4.alice.encrypt8(78), + ); + expect(res).to.equal(false); + }); + + it('test operator "min" overload (euint32, euint8) => euint32 test 1 (2128865754, 127)', async function () { + const res = await this.contract4.min_euint32_euint8( + this.instances4.alice.encrypt32(2128865754), + this.instances4.alice.encrypt8(127), + ); + expect(res).to.equal(127n); + }); + + it('test operator "min" overload (euint32, euint8) => euint32 test 2 (123, 127)', async function () { + const res = await this.contract4.min_euint32_euint8( + this.instances4.alice.encrypt32(123), + this.instances4.alice.encrypt8(127), + ); + expect(res).to.equal(123n); + }); + + it('test operator "min" overload (euint32, euint8) => euint32 test 3 (127, 127)', async function () { + const res = await this.contract4.min_euint32_euint8( + this.instances4.alice.encrypt32(127), + this.instances4.alice.encrypt8(127), + ); + expect(res).to.equal(127n); + }); + + it('test operator "min" overload (euint32, euint8) => euint32 test 4 (127, 123)', async function () { + const res = await this.contract4.min_euint32_euint8( + this.instances4.alice.encrypt32(127), + this.instances4.alice.encrypt8(123), + ); + expect(res).to.equal(123n); + }); + + it('test operator "max" overload (euint32, euint8) => euint32 test 1 (1610798197, 160)', async function () { + const res = await this.contract4.max_euint32_euint8( + this.instances4.alice.encrypt32(1610798197), + this.instances4.alice.encrypt8(160), + ); + expect(res).to.equal(1610798197n); + }); + + it('test operator "max" overload (euint32, euint8) => euint32 test 2 (156, 160)', async function () { + const res = await this.contract4.max_euint32_euint8( + this.instances4.alice.encrypt32(156), + this.instances4.alice.encrypt8(160), + ); + expect(res).to.equal(160n); + }); + + it('test operator "max" overload (euint32, euint8) => euint32 test 3 (160, 160)', async function () { + const res = await this.contract4.max_euint32_euint8( + this.instances4.alice.encrypt32(160), + this.instances4.alice.encrypt8(160), + ); + expect(res).to.equal(160n); + }); + + it('test operator "max" overload (euint32, euint8) => euint32 test 4 (160, 156)', async function () { + const res = await this.contract4.max_euint32_euint8( + this.instances4.alice.encrypt32(160), + this.instances4.alice.encrypt8(156), + ); + expect(res).to.equal(160n); + }); + + it('test operator "add" overload (euint32, euint16) => euint32 test 1 (40687, 4)', async function () { + const res = await this.contract4.add_euint32_euint16( + this.instances4.alice.encrypt32(40687), + this.instances4.alice.encrypt16(4), + ); + expect(res).to.equal(40691n); + }); + + it('test operator "add" overload (euint32, euint16) => euint32 test 2 (18607, 18611)', async function () { + const res = await this.contract4.add_euint32_euint16( + this.instances4.alice.encrypt32(18607), + this.instances4.alice.encrypt16(18611), + ); + expect(res).to.equal(37218n); + }); + + it('test operator "add" overload (euint32, euint16) => euint32 test 3 (18611, 18611)', async function () { + const res = await this.contract4.add_euint32_euint16( + this.instances4.alice.encrypt32(18611), + this.instances4.alice.encrypt16(18611), + ); + expect(res).to.equal(37222n); + }); + + it('test operator "add" overload (euint32, euint16) => euint32 test 4 (18611, 18607)', async function () { + const res = await this.contract4.add_euint32_euint16( + this.instances4.alice.encrypt32(18611), + this.instances4.alice.encrypt16(18607), + ); + expect(res).to.equal(37218n); + }); + + it('test operator "sub" overload (euint32, euint16) => euint32 test 1 (47991, 47991)', async function () { + const res = await this.contract4.sub_euint32_euint16( + this.instances4.alice.encrypt32(47991), + this.instances4.alice.encrypt16(47991), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint32, euint16) => euint32 test 2 (47991, 47987)', async function () { + const res = await this.contract4.sub_euint32_euint16( + this.instances4.alice.encrypt32(47991), + this.instances4.alice.encrypt16(47987), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint32, euint16) => euint32 test 1 (30409, 2)', async function () { + const res = await this.contract4.mul_euint32_euint16( + this.instances4.alice.encrypt32(30409), + this.instances4.alice.encrypt16(2), + ); + expect(res).to.equal(60818n); + }); + + it('test operator "mul" overload (euint32, euint16) => euint32 test 2 (152, 152)', async function () { + const res = await this.contract4.mul_euint32_euint16( + this.instances4.alice.encrypt32(152), + this.instances4.alice.encrypt16(152), + ); + expect(res).to.equal(23104n); + }); + + it('test operator "mul" overload (euint32, euint16) => euint32 test 3 (152, 152)', async function () { + const res = await this.contract4.mul_euint32_euint16( + this.instances4.alice.encrypt32(152), + this.instances4.alice.encrypt16(152), + ); + expect(res).to.equal(23104n); + }); + + it('test operator "mul" overload (euint32, euint16) => euint32 test 4 (152, 152)', async function () { + const res = await this.contract4.mul_euint32_euint16( + this.instances4.alice.encrypt32(152), + this.instances4.alice.encrypt16(152), + ); + expect(res).to.equal(23104n); + }); + + it('test operator "and" overload (euint32, euint16) => euint32 test 1 (1113519013, 16851)', async function () { + const res = await this.contract4.and_euint32_euint16( + this.instances4.alice.encrypt32(1113519013), + this.instances4.alice.encrypt16(16851), + ); + expect(res).to.equal(16769n); + }); + + it('test operator "and" overload (euint32, euint16) => euint32 test 2 (16847, 16851)', async function () { + const res = await this.contract4.and_euint32_euint16( + this.instances4.alice.encrypt32(16847), + this.instances4.alice.encrypt16(16851), + ); + expect(res).to.equal(16835n); + }); + + it('test operator "and" overload (euint32, euint16) => euint32 test 3 (16851, 16851)', async function () { + const res = await this.contract4.and_euint32_euint16( + this.instances4.alice.encrypt32(16851), + this.instances4.alice.encrypt16(16851), + ); + expect(res).to.equal(16851n); + }); + + it('test operator "and" overload (euint32, euint16) => euint32 test 4 (16851, 16847)', async function () { + const res = await this.contract4.and_euint32_euint16( + this.instances4.alice.encrypt32(16851), + this.instances4.alice.encrypt16(16847), + ); + expect(res).to.equal(16835n); + }); + + it('test operator "or" overload (euint32, euint16) => euint32 test 1 (2441286673, 26427)', async function () { + const res = await this.contract4.or_euint32_euint16( + this.instances4.alice.encrypt32(2441286673), + this.instances4.alice.encrypt16(26427), + ); + expect(res).to.equal(2441312059n); + }); + + it('test operator "or" overload (euint32, euint16) => euint32 test 2 (26423, 26427)', async function () { + const res = await this.contract4.or_euint32_euint16( + this.instances4.alice.encrypt32(26423), + this.instances4.alice.encrypt16(26427), + ); + expect(res).to.equal(26431n); + }); + + it('test operator "or" overload (euint32, euint16) => euint32 test 3 (26427, 26427)', async function () { + const res = await this.contract4.or_euint32_euint16( + this.instances4.alice.encrypt32(26427), + this.instances4.alice.encrypt16(26427), + ); + expect(res).to.equal(26427n); + }); + + it('test operator "or" overload (euint32, euint16) => euint32 test 4 (26427, 26423)', async function () { + const res = await this.contract4.or_euint32_euint16( + this.instances4.alice.encrypt32(26427), + this.instances4.alice.encrypt16(26423), + ); + expect(res).to.equal(26431n); + }); + + it('test operator "xor" overload (euint32, euint16) => euint32 test 1 (2697992454, 47573)', async function () { + const res = await this.contract4.xor_euint32_euint16( + this.instances4.alice.encrypt32(2697992454), + this.instances4.alice.encrypt16(47573), + ); + expect(res).to.equal(2698027219n); + }); + + it('test operator "xor" overload (euint32, euint16) => euint32 test 2 (47569, 47573)', async function () { + const res = await this.contract4.xor_euint32_euint16( + this.instances4.alice.encrypt32(47569), + this.instances4.alice.encrypt16(47573), + ); + expect(res).to.equal(4n); + }); + + it('test operator "xor" overload (euint32, euint16) => euint32 test 3 (47573, 47573)', async function () { + const res = await this.contract4.xor_euint32_euint16( + this.instances4.alice.encrypt32(47573), + this.instances4.alice.encrypt16(47573), + ); + expect(res).to.equal(0n); + }); + + it('test operator "xor" overload (euint32, euint16) => euint32 test 4 (47573, 47569)', async function () { + const res = await this.contract4.xor_euint32_euint16( + this.instances4.alice.encrypt32(47573), + this.instances4.alice.encrypt16(47569), + ); + expect(res).to.equal(4n); + }); + + it('test operator "eq" overload (euint32, euint16) => ebool test 1 (3540063980, 53142)', async function () { + const res = await this.contract4.eq_euint32_euint16( + this.instances4.alice.encrypt32(3540063980), + this.instances4.alice.encrypt16(53142), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint32, euint16) => ebool test 2 (53138, 53142)', async function () { + const res = await this.contract4.eq_euint32_euint16( + this.instances4.alice.encrypt32(53138), + this.instances4.alice.encrypt16(53142), + ); + expect(res).to.equal(false); + }); + + it('test operator "eq" overload (euint32, euint16) => ebool test 3 (53142, 53142)', async function () { + const res = await this.contract4.eq_euint32_euint16( + this.instances4.alice.encrypt32(53142), + this.instances4.alice.encrypt16(53142), + ); + expect(res).to.equal(true); + }); + + it('test operator "eq" overload (euint32, euint16) => ebool test 4 (53142, 53138)', async function () { + const res = await this.contract4.eq_euint32_euint16( + this.instances4.alice.encrypt32(53142), + this.instances4.alice.encrypt16(53138), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint32, euint16) => ebool test 1 (2729404223, 63905)', async function () { + const res = await this.contract4.ne_euint32_euint16( + this.instances4.alice.encrypt32(2729404223), + this.instances4.alice.encrypt16(63905), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint32, euint16) => ebool test 2 (63901, 63905)', async function () { + const res = await this.contract4.ne_euint32_euint16( + this.instances4.alice.encrypt32(63901), + this.instances4.alice.encrypt16(63905), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint32, euint16) => ebool test 3 (63905, 63905)', async function () { + const res = await this.contract4.ne_euint32_euint16( + this.instances4.alice.encrypt32(63905), + this.instances4.alice.encrypt16(63905), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint32, euint16) => ebool test 4 (63905, 63901)', async function () { + const res = await this.contract4.ne_euint32_euint16( + this.instances4.alice.encrypt32(63905), + this.instances4.alice.encrypt16(63901), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint32, euint16) => ebool test 1 (3202817970, 50829)', async function () { + const res = await this.contract4.ge_euint32_euint16( + this.instances4.alice.encrypt32(3202817970), + this.instances4.alice.encrypt16(50829), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint32, euint16) => ebool test 2 (50825, 50829)', async function () { + const res = await this.contract4.ge_euint32_euint16( + this.instances4.alice.encrypt32(50825), + this.instances4.alice.encrypt16(50829), + ); + expect(res).to.equal(false); + }); + + it('test operator "ge" overload (euint32, euint16) => ebool test 3 (50829, 50829)', async function () { + const res = await this.contract4.ge_euint32_euint16( + this.instances4.alice.encrypt32(50829), + this.instances4.alice.encrypt16(50829), + ); + expect(res).to.equal(true); + }); + + it('test operator "ge" overload (euint32, euint16) => ebool test 4 (50829, 50825)', async function () { + const res = await this.contract4.ge_euint32_euint16( + this.instances4.alice.encrypt32(50829), + this.instances4.alice.encrypt16(50825), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint32, euint16) => ebool test 1 (1221805876, 57752)', async function () { + const res = await this.contract4.gt_euint32_euint16( + this.instances4.alice.encrypt32(1221805876), + this.instances4.alice.encrypt16(57752), + ); + expect(res).to.equal(true); + }); + + it('test operator "gt" overload (euint32, euint16) => ebool test 2 (57748, 57752)', async function () { + const res = await this.contract4.gt_euint32_euint16( + this.instances4.alice.encrypt32(57748), + this.instances4.alice.encrypt16(57752), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint32, euint16) => ebool test 3 (57752, 57752)', async function () { + const res = await this.contract4.gt_euint32_euint16( + this.instances4.alice.encrypt32(57752), + this.instances4.alice.encrypt16(57752), + ); + expect(res).to.equal(false); + }); + + it('test operator "gt" overload (euint32, euint16) => ebool test 4 (57752, 57748)', async function () { + const res = await this.contract4.gt_euint32_euint16( + this.instances4.alice.encrypt32(57752), + this.instances4.alice.encrypt16(57748), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint32, euint16) => ebool test 1 (1673073080, 44621)', async function () { + const res = await this.contract4.le_euint32_euint16( + this.instances4.alice.encrypt32(1673073080), + this.instances4.alice.encrypt16(44621), + ); + expect(res).to.equal(false); + }); + + it('test operator "le" overload (euint32, euint16) => ebool test 2 (44617, 44621)', async function () { + const res = await this.contract4.le_euint32_euint16( + this.instances4.alice.encrypt32(44617), + this.instances4.alice.encrypt16(44621), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint32, euint16) => ebool test 3 (44621, 44621)', async function () { + const res = await this.contract4.le_euint32_euint16( + this.instances4.alice.encrypt32(44621), + this.instances4.alice.encrypt16(44621), + ); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (euint32, euint16) => ebool test 4 (44621, 44617)', async function () { + const res = await this.contract4.le_euint32_euint16( + this.instances4.alice.encrypt32(44621), + this.instances4.alice.encrypt16(44617), + ); + expect(res).to.equal(false); }); - it('test operator "lt" overload (euint8, uint8) => ebool test 2 (16, 2)', async function () { - const res = await this.contract1.lt_euint8_uint8(this.instances1.alice.encrypt8(16), 2); + it('test operator "lt" overload (euint32, euint16) => ebool test 1 (2528767958, 64360)', async function () { + const res = await this.contract4.lt_euint32_euint16( + this.instances4.alice.encrypt32(2528767958), + this.instances4.alice.encrypt16(64360), + ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint8, uint8) => ebool test 3 (16, 17)', async function () { - const res = await this.contract1.lt_euint8_uint8(this.instances1.alice.encrypt8(16), 17); + it('test operator "lt" overload (euint32, euint16) => ebool test 2 (64356, 64360)', async function () { + const res = await this.contract4.lt_euint32_euint16( + this.instances4.alice.encrypt32(64356), + this.instances4.alice.encrypt16(64360), + ); expect(res).to.equal(true); }); - it('test operator "lt" overload (uint8, euint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.lt_uint8_euint8(16, this.instances1.alice.encrypt8(16)); + it('test operator "lt" overload (euint32, euint16) => ebool test 3 (64360, 64360)', async function () { + const res = await this.contract4.lt_euint32_euint16( + this.instances4.alice.encrypt32(64360), + this.instances4.alice.encrypt16(64360), + ); expect(res).to.equal(false); }); - it('test operator "lt" overload (uint8, euint8) => ebool test 2 (16, 2)', async function () { - const res = await this.contract1.lt_uint8_euint8(16, this.instances1.alice.encrypt8(2)); + it('test operator "lt" overload (euint32, euint16) => ebool test 4 (64360, 64356)', async function () { + const res = await this.contract4.lt_euint32_euint16( + this.instances4.alice.encrypt32(64360), + this.instances4.alice.encrypt16(64356), + ); expect(res).to.equal(false); }); - it('test operator "lt" overload (uint8, euint8) => ebool test 3 (16, 17)', async function () { - const res = await this.contract1.lt_uint8_euint8(16, this.instances1.alice.encrypt8(17)); - expect(res).to.equal(true); + it('test operator "min" overload (euint32, euint16) => euint32 test 1 (2025213170, 65001)', async function () { + const res = await this.contract4.min_euint32_euint16( + this.instances4.alice.encrypt32(2025213170), + this.instances4.alice.encrypt16(65001), + ); + expect(res).to.equal(65001n); }); - it('test operator "min" overload (euint8, uint8) => euint8 test 1 (16, 16)', async function () { - const res = await this.contract1.min_euint8_uint8(this.instances1.alice.encrypt8(16), 16); - expect(res).to.equal(16); + it('test operator "min" overload (euint32, euint16) => euint32 test 2 (64997, 65001)', async function () { + const res = await this.contract4.min_euint32_euint16( + this.instances4.alice.encrypt32(64997), + this.instances4.alice.encrypt16(65001), + ); + expect(res).to.equal(64997n); }); - it('test operator "min" overload (euint8, uint8) => euint8 test 2 (16, 2)', async function () { - const res = await this.contract1.min_euint8_uint8(this.instances1.alice.encrypt8(16), 2); - expect(res).to.equal(2); + it('test operator "min" overload (euint32, euint16) => euint32 test 3 (65001, 65001)', async function () { + const res = await this.contract4.min_euint32_euint16( + this.instances4.alice.encrypt32(65001), + this.instances4.alice.encrypt16(65001), + ); + expect(res).to.equal(65001n); }); - it('test operator "min" overload (euint8, uint8) => euint8 test 3 (16, 17)', async function () { - const res = await this.contract1.min_euint8_uint8(this.instances1.alice.encrypt8(16), 17); - expect(res).to.equal(16); + it('test operator "min" overload (euint32, euint16) => euint32 test 4 (65001, 64997)', async function () { + const res = await this.contract4.min_euint32_euint16( + this.instances4.alice.encrypt32(65001), + this.instances4.alice.encrypt16(64997), + ); + expect(res).to.equal(64997n); }); - it('test operator "min" overload (uint8, euint8) => euint8 test 1 (16, 16)', async function () { - const res = await this.contract1.min_uint8_euint8(16, this.instances1.alice.encrypt8(16)); - expect(res).to.equal(16); + it('test operator "max" overload (euint32, euint16) => euint32 test 1 (4136615954, 9960)', async function () { + const res = await this.contract4.max_euint32_euint16( + this.instances4.alice.encrypt32(4136615954), + this.instances4.alice.encrypt16(9960), + ); + expect(res).to.equal(4136615954n); }); - it('test operator "min" overload (uint8, euint8) => euint8 test 2 (16, 2)', async function () { - const res = await this.contract1.min_uint8_euint8(16, this.instances1.alice.encrypt8(2)); - expect(res).to.equal(2); + it('test operator "max" overload (euint32, euint16) => euint32 test 2 (9956, 9960)', async function () { + const res = await this.contract4.max_euint32_euint16( + this.instances4.alice.encrypt32(9956), + this.instances4.alice.encrypt16(9960), + ); + expect(res).to.equal(9960n); }); - it('test operator "min" overload (uint8, euint8) => euint8 test 3 (16, 17)', async function () { - const res = await this.contract1.min_uint8_euint8(16, this.instances1.alice.encrypt8(17)); - expect(res).to.equal(16); + it('test operator "max" overload (euint32, euint16) => euint32 test 3 (9960, 9960)', async function () { + const res = await this.contract4.max_euint32_euint16( + this.instances4.alice.encrypt32(9960), + this.instances4.alice.encrypt16(9960), + ); + expect(res).to.equal(9960n); }); - it('test operator "max" overload (euint8, uint8) => euint8 test 1 (16, 16)', async function () { - const res = await this.contract1.max_euint8_uint8(this.instances1.alice.encrypt8(16), 16); - expect(res).to.equal(16); + it('test operator "max" overload (euint32, euint16) => euint32 test 4 (9960, 9956)', async function () { + const res = await this.contract4.max_euint32_euint16( + this.instances4.alice.encrypt32(9960), + this.instances4.alice.encrypt16(9956), + ); + expect(res).to.equal(9960n); }); - it('test operator "max" overload (euint8, uint8) => euint8 test 2 (16, 2)', async function () { - const res = await this.contract1.max_euint8_uint8(this.instances1.alice.encrypt8(16), 2); - expect(res).to.equal(16); + it('test operator "add" overload (euint32, euint32) => euint32 test 1 (2163343287, 829836787)', async function () { + const res = await this.contract4.add_euint32_euint32( + this.instances4.alice.encrypt32(2163343287), + this.instances4.alice.encrypt32(829836787), + ); + expect(res).to.equal(2993180074n); }); - it('test operator "max" overload (euint8, uint8) => euint8 test 3 (16, 17)', async function () { - const res = await this.contract1.max_euint8_uint8(this.instances1.alice.encrypt8(16), 17); - expect(res).to.equal(17); + it('test operator "add" overload (euint32, euint32) => euint32 test 2 (829836783, 829836787)', async function () { + const res = await this.contract4.add_euint32_euint32( + this.instances4.alice.encrypt32(829836783), + this.instances4.alice.encrypt32(829836787), + ); + expect(res).to.equal(1659673570n); }); - it('test operator "max" overload (uint8, euint8) => euint8 test 1 (16, 16)', async function () { - const res = await this.contract1.max_uint8_euint8(16, this.instances1.alice.encrypt8(16)); - expect(res).to.equal(16); + it('test operator "add" overload (euint32, euint32) => euint32 test 3 (829836787, 829836787)', async function () { + const res = await this.contract4.add_euint32_euint32( + this.instances4.alice.encrypt32(829836787), + this.instances4.alice.encrypt32(829836787), + ); + expect(res).to.equal(1659673574n); }); - it('test operator "max" overload (uint8, euint8) => euint8 test 2 (16, 2)', async function () { - const res = await this.contract1.max_uint8_euint8(16, this.instances1.alice.encrypt8(2)); - expect(res).to.equal(16); + it('test operator "add" overload (euint32, euint32) => euint32 test 4 (829836787, 829836783)', async function () { + const res = await this.contract4.add_euint32_euint32( + this.instances4.alice.encrypt32(829836787), + this.instances4.alice.encrypt32(829836783), + ); + expect(res).to.equal(1659673570n); }); - it('test operator "max" overload (uint8, euint8) => euint8 test 3 (16, 17)', async function () { - const res = await this.contract1.max_uint8_euint8(16, this.instances1.alice.encrypt8(17)); - expect(res).to.equal(17); + it('test operator "sub" overload (euint32, euint32) => euint32 test 1 (3061205449, 3061205449)', async function () { + const res = await this.contract4.sub_euint32_euint32( + this.instances4.alice.encrypt32(3061205449), + this.instances4.alice.encrypt32(3061205449), + ); + expect(res).to.equal(0n); }); - it('test operator "add" overload (euint16, euint8) => euint16 test 1 (4096, 16)', async function () { - const res = await this.contract1.add_euint16_euint8( - this.instances1.alice.encrypt16(4096), - this.instances1.alice.encrypt8(16), + it('test operator "sub" overload (euint32, euint32) => euint32 test 2 (3061205449, 3061205445)', async function () { + const res = await this.contract4.sub_euint32_euint32( + this.instances4.alice.encrypt32(3061205449), + this.instances4.alice.encrypt32(3061205445), ); - expect(res).to.equal(4112); + expect(res).to.equal(4n); }); - it('test operator "add" overload (euint16, euint8) => euint16 test 2 (4112, 16)', async function () { - const res = await this.contract1.add_euint16_euint8( - this.instances1.alice.encrypt16(4112), - this.instances1.alice.encrypt8(16), + it('test operator "mul" overload (euint32, euint32) => euint32 test 1 (42467, 41983)', async function () { + const res = await this.contract4.mul_euint32_euint32( + this.instances4.alice.encrypt32(42467), + this.instances4.alice.encrypt32(41983), ); - expect(res).to.equal(4128); + expect(res).to.equal(1782892061n); }); - it('test operator "sub" overload (euint16, euint8) => euint16 test 1 (4096, 16)', async function () { - const res = await this.contract1.sub_euint16_euint8( - this.instances1.alice.encrypt16(4096), - this.instances1.alice.encrypt8(16), + it('test operator "mul" overload (euint32, euint32) => euint32 test 2 (41983, 41983)', async function () { + const res = await this.contract4.mul_euint32_euint32( + this.instances4.alice.encrypt32(41983), + this.instances4.alice.encrypt32(41983), ); - expect(res).to.equal(4080); + expect(res).to.equal(1762572289n); }); - it('test operator "sub" overload (euint16, euint8) => euint16 test 2 (4112, 16)', async function () { - const res = await this.contract1.sub_euint16_euint8( - this.instances1.alice.encrypt16(4112), - this.instances1.alice.encrypt8(16), + it('test operator "mul" overload (euint32, euint32) => euint32 test 3 (41983, 41983)', async function () { + const res = await this.contract4.mul_euint32_euint32( + this.instances4.alice.encrypt32(41983), + this.instances4.alice.encrypt32(41983), ); - expect(res).to.equal(4096); + expect(res).to.equal(1762572289n); }); - it('test operator "mul" overload (euint16, euint8) => euint16 test 1 (4096, 4)', async function () { - const res = await this.contract1.mul_euint16_euint8( - this.instances1.alice.encrypt16(4096), - this.instances1.alice.encrypt8(4), + it('test operator "mul" overload (euint32, euint32) => euint32 test 4 (41983, 41983)', async function () { + const res = await this.contract4.mul_euint32_euint32( + this.instances4.alice.encrypt32(41983), + this.instances4.alice.encrypt32(41983), ); - expect(res).to.equal(16384); + expect(res).to.equal(1762572289n); }); - it('test operator "and" overload (euint16, euint8) => euint16 test 1 (4096, 4)', async function () { - const res = await this.contract1.and_euint16_euint8( - this.instances1.alice.encrypt16(4096), - this.instances1.alice.encrypt8(4), + it('test operator "and" overload (euint32, euint32) => euint32 test 1 (749010015, 1458345079)', async function () { + const res = await this.contract4.and_euint32_euint32( + this.instances4.alice.encrypt32(749010015), + this.instances4.alice.encrypt32(1458345079), ); - expect(res).to.equal(0); + expect(res).to.equal(77894743n); }); - it('test operator "and" overload (euint16, euint8) => euint16 test 2 (4336, 240)', async function () { - const res = await this.contract1.and_euint16_euint8( - this.instances1.alice.encrypt16(4336), - this.instances1.alice.encrypt8(240), + it('test operator "and" overload (euint32, euint32) => euint32 test 2 (749010011, 749010015)', async function () { + const res = await this.contract4.and_euint32_euint32( + this.instances4.alice.encrypt32(749010011), + this.instances4.alice.encrypt32(749010015), ); - expect(res).to.equal(240); + expect(res).to.equal(749010011n); }); - it('test operator "or" overload (euint16, euint8) => euint16 test 1 (4096, 4)', async function () { - const res = await this.contract1.or_euint16_euint8( - this.instances1.alice.encrypt16(4096), - this.instances1.alice.encrypt8(4), + it('test operator "and" overload (euint32, euint32) => euint32 test 3 (749010015, 749010015)', async function () { + const res = await this.contract4.and_euint32_euint32( + this.instances4.alice.encrypt32(749010015), + this.instances4.alice.encrypt32(749010015), ); - expect(res).to.equal(4100); + expect(res).to.equal(749010015n); }); - it('test operator "or" overload (euint16, euint8) => euint16 test 2 (4336, 240)', async function () { - const res = await this.contract1.or_euint16_euint8( - this.instances1.alice.encrypt16(4336), - this.instances1.alice.encrypt8(240), + it('test operator "and" overload (euint32, euint32) => euint32 test 4 (749010015, 749010011)', async function () { + const res = await this.contract4.and_euint32_euint32( + this.instances4.alice.encrypt32(749010015), + this.instances4.alice.encrypt32(749010011), ); - expect(res).to.equal(4336); + expect(res).to.equal(749010011n); }); - it('test operator "xor" overload (euint16, euint8) => euint16 test 1 (4096, 4)', async function () { - const res = await this.contract1.xor_euint16_euint8( - this.instances1.alice.encrypt16(4096), - this.instances1.alice.encrypt8(4), + it('test operator "or" overload (euint32, euint32) => euint32 test 1 (183558137, 3592149879)', async function () { + const res = await this.contract4.or_euint32_euint32( + this.instances4.alice.encrypt32(183558137), + this.instances4.alice.encrypt32(3592149879), ); - expect(res).to.equal(4100); + expect(res).to.equal(3741048831n); }); - it('test operator "xor" overload (euint16, euint8) => euint16 test 2 (4336, 242)', async function () { - const res = await this.contract1.xor_euint16_euint8( - this.instances1.alice.encrypt16(4336), - this.instances1.alice.encrypt8(242), + it('test operator "or" overload (euint32, euint32) => euint32 test 2 (183558133, 183558137)', async function () { + const res = await this.contract4.or_euint32_euint32( + this.instances4.alice.encrypt32(183558133), + this.instances4.alice.encrypt32(183558137), ); - expect(res).to.equal(4098); + expect(res).to.equal(183558141n); }); - it('test operator "eq" overload (euint16, euint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.eq_euint16_euint8( - this.instances1.alice.encrypt16(16), - this.instances1.alice.encrypt8(16), + it('test operator "or" overload (euint32, euint32) => euint32 test 3 (183558137, 183558137)', async function () { + const res = await this.contract4.or_euint32_euint32( + this.instances4.alice.encrypt32(183558137), + this.instances4.alice.encrypt32(183558137), ); - expect(res).to.equal(true); + expect(res).to.equal(183558137n); }); - it('test operator "eq" overload (euint16, euint8) => ebool test 2 (272, 16)', async function () { - const res = await this.contract1.eq_euint16_euint8( - this.instances1.alice.encrypt16(272), - this.instances1.alice.encrypt8(16), + it('test operator "or" overload (euint32, euint32) => euint32 test 4 (183558137, 183558133)', async function () { + const res = await this.contract4.or_euint32_euint32( + this.instances4.alice.encrypt32(183558137), + this.instances4.alice.encrypt32(183558133), ); - expect(res).to.equal(false); + expect(res).to.equal(183558141n); }); - it('test operator "ne" overload (euint16, euint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.ne_euint16_euint8( - this.instances1.alice.encrypt16(16), - this.instances1.alice.encrypt8(16), + it('test operator "xor" overload (euint32, euint32) => euint32 test 1 (3727740302, 3007364521)', async function () { + const res = await this.contract4.xor_euint32_euint32( + this.instances4.alice.encrypt32(3727740302), + this.instances4.alice.encrypt32(3007364521), ); - expect(res).to.equal(false); + expect(res).to.equal(1836085287n); }); - it('test operator "ne" overload (euint16, euint8) => ebool test 2 (272, 16)', async function () { - const res = await this.contract1.ne_euint16_euint8( - this.instances1.alice.encrypt16(272), - this.instances1.alice.encrypt8(16), + it('test operator "xor" overload (euint32, euint32) => euint32 test 2 (3007364517, 3007364521)', async function () { + const res = await this.contract4.xor_euint32_euint32( + this.instances4.alice.encrypt32(3007364517), + this.instances4.alice.encrypt32(3007364521), ); - expect(res).to.equal(true); + expect(res).to.equal(12n); }); - it('test operator "ge" overload (euint16, euint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.ge_euint16_euint8( - this.instances1.alice.encrypt16(16), - this.instances1.alice.encrypt8(16), + it('test operator "xor" overload (euint32, euint32) => euint32 test 3 (3007364521, 3007364521)', async function () { + const res = await this.contract4.xor_euint32_euint32( + this.instances4.alice.encrypt32(3007364521), + this.instances4.alice.encrypt32(3007364521), ); - expect(res).to.equal(true); + expect(res).to.equal(0n); }); - it('test operator "ge" overload (euint16, euint8) => ebool test 2 (272, 16)', async function () { - const res = await this.contract1.ge_euint16_euint8( - this.instances1.alice.encrypt16(272), - this.instances1.alice.encrypt8(16), + it('test operator "xor" overload (euint32, euint32) => euint32 test 4 (3007364521, 3007364517)', async function () { + const res = await this.contract4.xor_euint32_euint32( + this.instances4.alice.encrypt32(3007364521), + this.instances4.alice.encrypt32(3007364517), ); - expect(res).to.equal(true); + expect(res).to.equal(12n); }); - it('test operator "ge" overload (euint16, euint8) => ebool test 3 (15, 16)', async function () { - const res = await this.contract1.ge_euint16_euint8( - this.instances1.alice.encrypt16(15), - this.instances1.alice.encrypt8(16), + it('test operator "eq" overload (euint32, euint32) => ebool test 1 (3674813327, 3173886291)', async function () { + const res = await this.contract4.eq_euint32_euint32( + this.instances4.alice.encrypt32(3674813327), + this.instances4.alice.encrypt32(3173886291), ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint16, euint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.gt_euint16_euint8( - this.instances1.alice.encrypt16(16), - this.instances1.alice.encrypt8(16), + it('test operator "eq" overload (euint32, euint32) => ebool test 2 (3173886287, 3173886291)', async function () { + const res = await this.contract4.eq_euint32_euint32( + this.instances4.alice.encrypt32(3173886287), + this.instances4.alice.encrypt32(3173886291), ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint16, euint8) => ebool test 2 (272, 16)', async function () { - const res = await this.contract1.gt_euint16_euint8( - this.instances1.alice.encrypt16(272), - this.instances1.alice.encrypt8(16), + it('test operator "eq" overload (euint32, euint32) => ebool test 3 (3173886291, 3173886291)', async function () { + const res = await this.contract4.eq_euint32_euint32( + this.instances4.alice.encrypt32(3173886291), + this.instances4.alice.encrypt32(3173886291), ); expect(res).to.equal(true); }); - it('test operator "gt" overload (euint16, euint8) => ebool test 3 (15, 16)', async function () { - const res = await this.contract1.gt_euint16_euint8( - this.instances1.alice.encrypt16(15), - this.instances1.alice.encrypt8(16), + it('test operator "eq" overload (euint32, euint32) => ebool test 4 (3173886291, 3173886287)', async function () { + const res = await this.contract4.eq_euint32_euint32( + this.instances4.alice.encrypt32(3173886291), + this.instances4.alice.encrypt32(3173886287), ); expect(res).to.equal(false); }); - it('test operator "le" overload (euint16, euint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.le_euint16_euint8( - this.instances1.alice.encrypt16(16), - this.instances1.alice.encrypt8(16), + it('test operator "ne" overload (euint32, euint32) => ebool test 1 (40863923, 1726230330)', async function () { + const res = await this.contract4.ne_euint32_euint32( + this.instances4.alice.encrypt32(40863923), + this.instances4.alice.encrypt32(1726230330), + ); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint32, euint32) => ebool test 2 (40863919, 40863923)', async function () { + const res = await this.contract4.ne_euint32_euint32( + this.instances4.alice.encrypt32(40863919), + this.instances4.alice.encrypt32(40863923), ); expect(res).to.equal(true); }); - it('test operator "le" overload (euint16, euint8) => ebool test 2 (272, 16)', async function () { - const res = await this.contract1.le_euint16_euint8( - this.instances1.alice.encrypt16(272), - this.instances1.alice.encrypt8(16), + it('test operator "ne" overload (euint32, euint32) => ebool test 3 (40863923, 40863923)', async function () { + const res = await this.contract4.ne_euint32_euint32( + this.instances4.alice.encrypt32(40863923), + this.instances4.alice.encrypt32(40863923), ); expect(res).to.equal(false); }); - it('test operator "le" overload (euint16, euint8) => ebool test 3 (15, 16)', async function () { - const res = await this.contract1.le_euint16_euint8( - this.instances1.alice.encrypt16(15), - this.instances1.alice.encrypt8(16), + it('test operator "ne" overload (euint32, euint32) => ebool test 4 (40863923, 40863919)', async function () { + const res = await this.contract4.ne_euint32_euint32( + this.instances4.alice.encrypt32(40863923), + this.instances4.alice.encrypt32(40863919), ); expect(res).to.equal(true); }); - it('test operator "lt" overload (euint16, euint8) => ebool test 1 (16, 16)', async function () { - const res = await this.contract1.lt_euint16_euint8( - this.instances1.alice.encrypt16(16), - this.instances1.alice.encrypt8(16), + it('test operator "ge" overload (euint32, euint32) => ebool test 1 (1970784794, 1596956634)', async function () { + const res = await this.contract4.ge_euint32_euint32( + this.instances4.alice.encrypt32(1970784794), + this.instances4.alice.encrypt32(1596956634), ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "lt" overload (euint16, euint8) => ebool test 2 (272, 16)', async function () { - const res = await this.contract1.lt_euint16_euint8( - this.instances1.alice.encrypt16(272), - this.instances1.alice.encrypt8(16), + it('test operator "ge" overload (euint32, euint32) => ebool test 2 (1596956630, 1596956634)', async function () { + const res = await this.contract4.ge_euint32_euint32( + this.instances4.alice.encrypt32(1596956630), + this.instances4.alice.encrypt32(1596956634), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint16, euint8) => ebool test 3 (15, 16)', async function () { - const res = await this.contract1.lt_euint16_euint8( - this.instances1.alice.encrypt16(15), - this.instances1.alice.encrypt8(16), + it('test operator "ge" overload (euint32, euint32) => ebool test 3 (1596956634, 1596956634)', async function () { + const res = await this.contract4.ge_euint32_euint32( + this.instances4.alice.encrypt32(1596956634), + this.instances4.alice.encrypt32(1596956634), ); expect(res).to.equal(true); }); - it('test operator "min" overload (euint16, euint8) => euint16 test 1 (16, 16)', async function () { - const res = await this.contract1.min_euint16_euint8( - this.instances1.alice.encrypt16(16), - this.instances1.alice.encrypt8(16), + it('test operator "ge" overload (euint32, euint32) => ebool test 4 (1596956634, 1596956630)', async function () { + const res = await this.contract4.ge_euint32_euint32( + this.instances4.alice.encrypt32(1596956634), + this.instances4.alice.encrypt32(1596956630), ); - expect(res).to.equal(16); + expect(res).to.equal(true); }); - it('test operator "min" overload (euint16, euint8) => euint16 test 2 (272, 16)', async function () { - const res = await this.contract1.min_euint16_euint8( - this.instances1.alice.encrypt16(272), - this.instances1.alice.encrypt8(16), + it('test operator "gt" overload (euint32, euint32) => ebool test 1 (2212514392, 854163759)', async function () { + const res = await this.contract4.gt_euint32_euint32( + this.instances4.alice.encrypt32(2212514392), + this.instances4.alice.encrypt32(854163759), ); - expect(res).to.equal(16); + expect(res).to.equal(true); }); - it('test operator "min" overload (euint16, euint8) => euint16 test 3 (15, 16)', async function () { - const res = await this.contract1.min_euint16_euint8( - this.instances1.alice.encrypt16(15), - this.instances1.alice.encrypt8(16), + it('test operator "gt" overload (euint32, euint32) => ebool test 2 (854163755, 854163759)', async function () { + const res = await this.contract4.gt_euint32_euint32( + this.instances4.alice.encrypt32(854163755), + this.instances4.alice.encrypt32(854163759), ); - expect(res).to.equal(15); + expect(res).to.equal(false); }); - it('test operator "max" overload (euint16, euint8) => euint16 test 1 (16, 16)', async function () { - const res = await this.contract1.max_euint16_euint8( - this.instances1.alice.encrypt16(16), - this.instances1.alice.encrypt8(16), + it('test operator "gt" overload (euint32, euint32) => ebool test 3 (854163759, 854163759)', async function () { + const res = await this.contract4.gt_euint32_euint32( + this.instances4.alice.encrypt32(854163759), + this.instances4.alice.encrypt32(854163759), ); - expect(res).to.equal(16); + expect(res).to.equal(false); }); - it('test operator "max" overload (euint16, euint8) => euint16 test 2 (272, 16)', async function () { - const res = await this.contract1.max_euint16_euint8( - this.instances1.alice.encrypt16(272), - this.instances1.alice.encrypt8(16), + it('test operator "gt" overload (euint32, euint32) => ebool test 4 (854163759, 854163755)', async function () { + const res = await this.contract4.gt_euint32_euint32( + this.instances4.alice.encrypt32(854163759), + this.instances4.alice.encrypt32(854163755), ); - expect(res).to.equal(272); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint16, euint8) => euint16 test 3 (15, 16)', async function () { - const res = await this.contract1.max_euint16_euint8( - this.instances1.alice.encrypt16(15), - this.instances1.alice.encrypt8(16), + it('test operator "le" overload (euint32, euint32) => ebool test 1 (989604334, 3011475023)', async function () { + const res = await this.contract4.le_euint32_euint32( + this.instances4.alice.encrypt32(989604334), + this.instances4.alice.encrypt32(3011475023), ); - expect(res).to.equal(16); + expect(res).to.equal(true); }); - it('test operator "add" overload (euint16, euint16) => euint16 test 1 (258, 513)', async function () { - const res = await this.contract1.add_euint16_euint16( - this.instances1.alice.encrypt16(258), - this.instances1.alice.encrypt16(513), + it('test operator "le" overload (euint32, euint32) => ebool test 2 (989604330, 989604334)', async function () { + const res = await this.contract4.le_euint32_euint32( + this.instances4.alice.encrypt32(989604330), + this.instances4.alice.encrypt32(989604334), ); - expect(res).to.equal(771); + expect(res).to.equal(true); }); - it('test operator "sub" overload (euint16, euint16) => euint16 test 1 (1027, 258)', async function () { - const res = await this.contract1.sub_euint16_euint16( - this.instances1.alice.encrypt16(1027), - this.instances1.alice.encrypt16(258), + it('test operator "le" overload (euint32, euint32) => ebool test 3 (989604334, 989604334)', async function () { + const res = await this.contract4.le_euint32_euint32( + this.instances4.alice.encrypt32(989604334), + this.instances4.alice.encrypt32(989604334), ); - expect(res).to.equal(769); + expect(res).to.equal(true); }); - it('test operator "mul" overload (euint16, euint16) => euint16 test 1 (512, 2)', async function () { - const res = await this.contract1.mul_euint16_euint16( - this.instances1.alice.encrypt16(512), - this.instances1.alice.encrypt16(2), + it('test operator "le" overload (euint32, euint32) => ebool test 4 (989604334, 989604330)', async function () { + const res = await this.contract4.le_euint32_euint32( + this.instances4.alice.encrypt32(989604334), + this.instances4.alice.encrypt32(989604330), ); - expect(res).to.equal(1024); + expect(res).to.equal(false); }); - it('test operator "and" overload (euint16, euint16) => euint16 test 1 (512, 2)', async function () { - const res = await this.contract1.and_euint16_euint16( - this.instances1.alice.encrypt16(512), - this.instances1.alice.encrypt16(2), + it('test operator "lt" overload (euint32, euint32) => ebool test 1 (3432727362, 2953663248)', async function () { + const res = await this.contract4.lt_euint32_euint32( + this.instances4.alice.encrypt32(3432727362), + this.instances4.alice.encrypt32(2953663248), ); - expect(res).to.equal(0); + expect(res).to.equal(false); }); - it('test operator "and" overload (euint16, euint16) => euint16 test 2 (528, 18)', async function () { - const res = await this.contract1.and_euint16_euint16( - this.instances1.alice.encrypt16(528), - this.instances1.alice.encrypt16(18), + it('test operator "lt" overload (euint32, euint32) => ebool test 2 (2953663244, 2953663248)', async function () { + const res = await this.contract4.lt_euint32_euint32( + this.instances4.alice.encrypt32(2953663244), + this.instances4.alice.encrypt32(2953663248), ); - expect(res).to.equal(16); + expect(res).to.equal(true); }); - it('test operator "or" overload (euint16, euint16) => euint16 test 1 (512, 2)', async function () { - const res = await this.contract1.or_euint16_euint16( - this.instances1.alice.encrypt16(512), - this.instances1.alice.encrypt16(2), + it('test operator "lt" overload (euint32, euint32) => ebool test 3 (2953663248, 2953663248)', async function () { + const res = await this.contract4.lt_euint32_euint32( + this.instances4.alice.encrypt32(2953663248), + this.instances4.alice.encrypt32(2953663248), ); - expect(res).to.equal(514); + expect(res).to.equal(false); }); - it('test operator "or" overload (euint16, euint16) => euint16 test 2 (528, 18)', async function () { - const res = await this.contract1.or_euint16_euint16( - this.instances1.alice.encrypt16(528), - this.instances1.alice.encrypt16(18), + it('test operator "lt" overload (euint32, euint32) => ebool test 4 (2953663248, 2953663244)', async function () { + const res = await this.contract4.lt_euint32_euint32( + this.instances4.alice.encrypt32(2953663248), + this.instances4.alice.encrypt32(2953663244), ); - expect(res).to.equal(530); + expect(res).to.equal(false); }); - it('test operator "xor" overload (euint16, euint16) => euint16 test 1 (512, 2)', async function () { - const res = await this.contract1.xor_euint16_euint16( - this.instances1.alice.encrypt16(512), - this.instances1.alice.encrypt16(2), + it('test operator "min" overload (euint32, euint32) => euint32 test 1 (1800381916, 3495424142)', async function () { + const res = await this.contract4.min_euint32_euint32( + this.instances4.alice.encrypt32(1800381916), + this.instances4.alice.encrypt32(3495424142), ); - expect(res).to.equal(514); + expect(res).to.equal(1800381916n); }); - it('test operator "xor" overload (euint16, euint16) => euint16 test 2 (528, 18)', async function () { - const res = await this.contract1.xor_euint16_euint16( - this.instances1.alice.encrypt16(528), - this.instances1.alice.encrypt16(18), + it('test operator "min" overload (euint32, euint32) => euint32 test 2 (1800381912, 1800381916)', async function () { + const res = await this.contract4.min_euint32_euint32( + this.instances4.alice.encrypt32(1800381912), + this.instances4.alice.encrypt32(1800381916), ); - expect(res).to.equal(514); + expect(res).to.equal(1800381912n); }); - it('test operator "eq" overload (euint16, euint16) => ebool test 1 (512, 2)', async function () { - const res = await this.contract2.eq_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(2), + it('test operator "min" overload (euint32, euint32) => euint32 test 3 (1800381916, 1800381916)', async function () { + const res = await this.contract4.min_euint32_euint32( + this.instances4.alice.encrypt32(1800381916), + this.instances4.alice.encrypt32(1800381916), ); - expect(res).to.equal(false); + expect(res).to.equal(1800381916n); }); - it('test operator "eq" overload (euint16, euint16) => ebool test 2 (512, 512)', async function () { - const res = await this.contract2.eq_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(512), + it('test operator "min" overload (euint32, euint32) => euint32 test 4 (1800381916, 1800381912)', async function () { + const res = await this.contract4.min_euint32_euint32( + this.instances4.alice.encrypt32(1800381916), + this.instances4.alice.encrypt32(1800381912), ); - expect(res).to.equal(true); + expect(res).to.equal(1800381912n); }); - it('test operator "ne" overload (euint16, euint16) => ebool test 1 (512, 2)', async function () { - const res = await this.contract2.ne_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(2), + it('test operator "max" overload (euint32, euint32) => euint32 test 1 (2043312979, 3247295293)', async function () { + const res = await this.contract4.max_euint32_euint32( + this.instances4.alice.encrypt32(2043312979), + this.instances4.alice.encrypt32(3247295293), ); - expect(res).to.equal(true); + expect(res).to.equal(3247295293n); }); - it('test operator "ne" overload (euint16, euint16) => ebool test 2 (512, 512)', async function () { - const res = await this.contract2.ne_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(512), + it('test operator "max" overload (euint32, euint32) => euint32 test 2 (2043312975, 2043312979)', async function () { + const res = await this.contract4.max_euint32_euint32( + this.instances4.alice.encrypt32(2043312975), + this.instances4.alice.encrypt32(2043312979), ); - expect(res).to.equal(false); + expect(res).to.equal(2043312979n); }); - it('test operator "ge" overload (euint16, euint16) => ebool test 1 (512, 2)', async function () { - const res = await this.contract2.ge_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(2), + it('test operator "max" overload (euint32, euint32) => euint32 test 3 (2043312979, 2043312979)', async function () { + const res = await this.contract4.max_euint32_euint32( + this.instances4.alice.encrypt32(2043312979), + this.instances4.alice.encrypt32(2043312979), ); - expect(res).to.equal(true); + expect(res).to.equal(2043312979n); }); - it('test operator "ge" overload (euint16, euint16) => ebool test 2 (512, 512)', async function () { - const res = await this.contract2.ge_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(512), + it('test operator "max" overload (euint32, euint32) => euint32 test 4 (2043312979, 2043312975)', async function () { + const res = await this.contract4.max_euint32_euint32( + this.instances4.alice.encrypt32(2043312979), + this.instances4.alice.encrypt32(2043312975), ); - expect(res).to.equal(true); + expect(res).to.equal(2043312979n); }); - it('test operator "ge" overload (euint16, euint16) => ebool test 3 (512, 513)', async function () { - const res = await this.contract2.ge_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(513), + it('test operator "add" overload (euint32, euint64) => euint64 test 1 (2, 4293304478)', async function () { + const res = await this.contract4.add_euint32_euint64( + this.instances4.alice.encrypt32(2), + this.instances4.alice.encrypt64(4293304478), ); - expect(res).to.equal(false); + expect(res).to.equal(4293304480n); }); - it('test operator "gt" overload (euint16, euint16) => ebool test 1 (512, 2)', async function () { - const res = await this.contract2.gt_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(2), + it('test operator "add" overload (euint32, euint64) => euint64 test 2 (2093298939, 2093298943)', async function () { + const res = await this.contract4.add_euint32_euint64( + this.instances4.alice.encrypt32(2093298939), + this.instances4.alice.encrypt64(2093298943), ); - expect(res).to.equal(true); + expect(res).to.equal(4186597882n); }); - it('test operator "gt" overload (euint16, euint16) => ebool test 2 (512, 512)', async function () { - const res = await this.contract2.gt_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(512), + it('test operator "add" overload (euint32, euint64) => euint64 test 3 (2093298943, 2093298943)', async function () { + const res = await this.contract4.add_euint32_euint64( + this.instances4.alice.encrypt32(2093298943), + this.instances4.alice.encrypt64(2093298943), ); - expect(res).to.equal(false); + expect(res).to.equal(4186597886n); }); - it('test operator "gt" overload (euint16, euint16) => ebool test 3 (512, 513)', async function () { - const res = await this.contract2.gt_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(513), + it('test operator "add" overload (euint32, euint64) => euint64 test 4 (2093298943, 2093298939)', async function () { + const res = await this.contract4.add_euint32_euint64( + this.instances4.alice.encrypt32(2093298943), + this.instances4.alice.encrypt64(2093298939), ); - expect(res).to.equal(false); + expect(res).to.equal(4186597882n); }); - it('test operator "le" overload (euint16, euint16) => ebool test 1 (512, 2)', async function () { - const res = await this.contract2.le_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(2), + it('test operator "sub" overload (euint32, euint64) => euint64 test 1 (1018084759, 1018084759)', async function () { + const res = await this.contract4.sub_euint32_euint64( + this.instances4.alice.encrypt32(1018084759), + this.instances4.alice.encrypt64(1018084759), ); - expect(res).to.equal(false); + expect(res).to.equal(0n); }); - it('test operator "le" overload (euint16, euint16) => ebool test 2 (512, 512)', async function () { - const res = await this.contract2.le_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(512), + it('test operator "sub" overload (euint32, euint64) => euint64 test 2 (1018084759, 1018084755)', async function () { + const res = await this.contract4.sub_euint32_euint64( + this.instances4.alice.encrypt32(1018084759), + this.instances4.alice.encrypt64(1018084755), ); - expect(res).to.equal(true); + expect(res).to.equal(4n); }); - it('test operator "le" overload (euint16, euint16) => ebool test 3 (512, 513)', async function () { - const res = await this.contract2.le_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(513), + it('test operator "mul" overload (euint32, euint64) => euint64 test 1 (2, 2147115345)', async function () { + const res = await this.contract4.mul_euint32_euint64( + this.instances4.alice.encrypt32(2), + this.instances4.alice.encrypt64(2147115345), ); - expect(res).to.equal(true); + expect(res).to.equal(4294230690n); }); - it('test operator "lt" overload (euint16, euint16) => ebool test 1 (512, 2)', async function () { - const res = await this.contract2.lt_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(2), + it('test operator "mul" overload (euint32, euint64) => euint64 test 2 (46957, 46957)', async function () { + const res = await this.contract4.mul_euint32_euint64( + this.instances4.alice.encrypt32(46957), + this.instances4.alice.encrypt64(46957), ); - expect(res).to.equal(false); + expect(res).to.equal(2204959849n); }); - it('test operator "lt" overload (euint16, euint16) => ebool test 2 (512, 512)', async function () { - const res = await this.contract2.lt_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(512), + it('test operator "mul" overload (euint32, euint64) => euint64 test 3 (46957, 46957)', async function () { + const res = await this.contract4.mul_euint32_euint64( + this.instances4.alice.encrypt32(46957), + this.instances4.alice.encrypt64(46957), ); - expect(res).to.equal(false); + expect(res).to.equal(2204959849n); }); - it('test operator "lt" overload (euint16, euint16) => ebool test 3 (512, 513)', async function () { - const res = await this.contract2.lt_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(513), + it('test operator "mul" overload (euint32, euint64) => euint64 test 4 (46957, 46957)', async function () { + const res = await this.contract4.mul_euint32_euint64( + this.instances4.alice.encrypt32(46957), + this.instances4.alice.encrypt64(46957), ); - expect(res).to.equal(true); + expect(res).to.equal(2204959849n); }); - it('test operator "min" overload (euint16, euint16) => euint16 test 1 (512, 2)', async function () { - const res = await this.contract2.min_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(2), + it('test operator "and" overload (euint32, euint64) => euint64 test 1 (365928159, 18445926323394727831)', async function () { + const res = await this.contract4.and_euint32_euint64( + this.instances4.alice.encrypt32(365928159), + this.instances4.alice.encrypt64(18445926323394727831), ); - expect(res).to.equal(2); + expect(res).to.equal(13110935n); }); - it('test operator "min" overload (euint16, euint16) => euint16 test 2 (512, 512)', async function () { - const res = await this.contract2.min_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(512), + it('test operator "and" overload (euint32, euint64) => euint64 test 2 (365928155, 365928159)', async function () { + const res = await this.contract4.and_euint32_euint64( + this.instances4.alice.encrypt32(365928155), + this.instances4.alice.encrypt64(365928159), ); - expect(res).to.equal(512); + expect(res).to.equal(365928155n); }); - it('test operator "min" overload (euint16, euint16) => euint16 test 3 (512, 513)', async function () { - const res = await this.contract2.min_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(513), + it('test operator "and" overload (euint32, euint64) => euint64 test 3 (365928159, 365928159)', async function () { + const res = await this.contract4.and_euint32_euint64( + this.instances4.alice.encrypt32(365928159), + this.instances4.alice.encrypt64(365928159), ); - expect(res).to.equal(512); + expect(res).to.equal(365928159n); }); - it('test operator "max" overload (euint16, euint16) => euint16 test 1 (512, 2)', async function () { - const res = await this.contract2.max_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(2), + it('test operator "and" overload (euint32, euint64) => euint64 test 4 (365928159, 365928155)', async function () { + const res = await this.contract4.and_euint32_euint64( + this.instances4.alice.encrypt32(365928159), + this.instances4.alice.encrypt64(365928155), ); - expect(res).to.equal(512); + expect(res).to.equal(365928155n); }); - it('test operator "max" overload (euint16, euint16) => euint16 test 2 (512, 512)', async function () { - const res = await this.contract2.max_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(512), + it('test operator "or" overload (euint32, euint64) => euint64 test 1 (1857122149, 18440946789011191531)', async function () { + const res = await this.contract4.or_euint32_euint64( + this.instances4.alice.encrypt32(1857122149), + this.instances4.alice.encrypt64(18440946789011191531), ); - expect(res).to.equal(512); + expect(res).to.equal(18440946789112971247n); }); - it('test operator "max" overload (euint16, euint16) => euint16 test 3 (512, 513)', async function () { - const res = await this.contract2.max_euint16_euint16( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt16(513), + it('test operator "or" overload (euint32, euint64) => euint64 test 2 (1857122145, 1857122149)', async function () { + const res = await this.contract4.or_euint32_euint64( + this.instances4.alice.encrypt32(1857122145), + this.instances4.alice.encrypt64(1857122149), ); - expect(res).to.equal(513); + expect(res).to.equal(1857122149n); }); - it('test operator "add" overload (euint16, euint32) => euint32 test 1 (514, 131074)', async function () { - const res = await this.contract2.add_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(131074), + it('test operator "or" overload (euint32, euint64) => euint64 test 3 (1857122149, 1857122149)', async function () { + const res = await this.contract4.or_euint32_euint64( + this.instances4.alice.encrypt32(1857122149), + this.instances4.alice.encrypt64(1857122149), ); - expect(res).to.equal(131588); + expect(res).to.equal(1857122149n); }); - it('test operator "sub" overload (euint16, euint32) => euint32 test 1 (514, 2)', async function () { - const res = await this.contract2.sub_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(2), + it('test operator "or" overload (euint32, euint64) => euint64 test 4 (1857122149, 1857122145)', async function () { + const res = await this.contract4.or_euint32_euint64( + this.instances4.alice.encrypt32(1857122149), + this.instances4.alice.encrypt64(1857122145), ); - expect(res).to.equal(512); + expect(res).to.equal(1857122149n); }); - it('test operator "sub" overload (euint16, euint32) => euint32 test 2 (514, 65536)', async function () { - const res = await this.contract2.sub_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(65536), + it('test operator "xor" overload (euint32, euint64) => euint64 test 1 (2536876532, 18445343517070927715)', async function () { + const res = await this.contract4.xor_euint32_euint64( + this.instances4.alice.encrypt32(2536876532), + this.instances4.alice.encrypt64(18445343517070927715), ); - expect(res).to.equal(4294902274); + expect(res).to.equal(18445343518833806999n); }); - it('test operator "mul" overload (euint16, euint32) => euint32 test 1 (512, 65536)', async function () { - const res = await this.contract2.mul_euint16_euint32( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt32(65536), + it('test operator "xor" overload (euint32, euint64) => euint64 test 2 (2536876528, 2536876532)', async function () { + const res = await this.contract4.xor_euint32_euint64( + this.instances4.alice.encrypt32(2536876528), + this.instances4.alice.encrypt64(2536876532), ); - expect(res).to.equal(33554432); + expect(res).to.equal(4n); }); - it('test operator "and" overload (euint16, euint32) => euint32 test 1 (514, 65536)', async function () { - const res = await this.contract2.and_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(65536), + it('test operator "xor" overload (euint32, euint64) => euint64 test 3 (2536876532, 2536876532)', async function () { + const res = await this.contract4.xor_euint32_euint64( + this.instances4.alice.encrypt32(2536876532), + this.instances4.alice.encrypt64(2536876532), ); - expect(res).to.equal(0); + expect(res).to.equal(0n); }); - it('test operator "and" overload (euint16, euint32) => euint32 test 2 (514, 65538)', async function () { - const res = await this.contract2.and_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(65538), + it('test operator "xor" overload (euint32, euint64) => euint64 test 4 (2536876532, 2536876528)', async function () { + const res = await this.contract4.xor_euint32_euint64( + this.instances4.alice.encrypt32(2536876532), + this.instances4.alice.encrypt64(2536876528), ); - expect(res).to.equal(2); + expect(res).to.equal(4n); }); - it('test operator "or" overload (euint16, euint32) => euint32 test 1 (514, 65536)', async function () { - const res = await this.contract2.or_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(65536), + it('test operator "eq" overload (euint32, euint64) => ebool test 1 (2805333302, 18443732701658209223)', async function () { + const res = await this.contract4.eq_euint32_euint64( + this.instances4.alice.encrypt32(2805333302), + this.instances4.alice.encrypt64(18443732701658209223), ); - expect(res).to.equal(66050); + expect(res).to.equal(false); }); - it('test operator "or" overload (euint16, euint32) => euint32 test 2 (514, 65538)', async function () { - const res = await this.contract2.or_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(65538), + it('test operator "eq" overload (euint32, euint64) => ebool test 2 (2805333298, 2805333302)', async function () { + const res = await this.contract4.eq_euint32_euint64( + this.instances4.alice.encrypt32(2805333298), + this.instances4.alice.encrypt64(2805333302), ); - expect(res).to.equal(66050); + expect(res).to.equal(false); }); - it('test operator "xor" overload (euint16, euint32) => euint32 test 1 (514, 65536)', async function () { - const res = await this.contract2.xor_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(65536), + it('test operator "eq" overload (euint32, euint64) => ebool test 3 (2805333302, 2805333302)', async function () { + const res = await this.contract4.eq_euint32_euint64( + this.instances4.alice.encrypt32(2805333302), + this.instances4.alice.encrypt64(2805333302), ); - expect(res).to.equal(66050); + expect(res).to.equal(true); }); - it('test operator "xor" overload (euint16, euint32) => euint32 test 2 (514, 65538)', async function () { - const res = await this.contract2.xor_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(65538), + it('test operator "eq" overload (euint32, euint64) => ebool test 4 (2805333302, 2805333298)', async function () { + const res = await this.contract4.eq_euint32_euint64( + this.instances4.alice.encrypt32(2805333302), + this.instances4.alice.encrypt64(2805333298), ); - expect(res).to.equal(66048); + expect(res).to.equal(false); }); - it('test operator "eq" overload (euint16, euint32) => ebool test 1 (514, 66050)', async function () { - const res = await this.contract2.eq_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(66050), + it('test operator "ne" overload (euint32, euint64) => ebool test 1 (734315994, 18437906324621631829)', async function () { + const res = await this.contract4.ne_euint32_euint64( + this.instances4.alice.encrypt32(734315994), + this.instances4.alice.encrypt64(18437906324621631829), ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "eq" overload (euint16, euint32) => ebool test 2 (514, 514)', async function () { - const res = await this.contract2.eq_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(514), + it('test operator "ne" overload (euint32, euint64) => ebool test 2 (734315990, 734315994)', async function () { + const res = await this.contract4.ne_euint32_euint64( + this.instances4.alice.encrypt32(734315990), + this.instances4.alice.encrypt64(734315994), ); expect(res).to.equal(true); }); - it('test operator "ne" overload (euint16, euint32) => ebool test 1 (514, 66050)', async function () { - const res = await this.contract2.ne_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(66050), + it('test operator "ne" overload (euint32, euint64) => ebool test 3 (734315994, 734315994)', async function () { + const res = await this.contract4.ne_euint32_euint64( + this.instances4.alice.encrypt32(734315994), + this.instances4.alice.encrypt64(734315994), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint32, euint64) => ebool test 4 (734315994, 734315990)', async function () { + const res = await this.contract4.ne_euint32_euint64( + this.instances4.alice.encrypt32(734315994), + this.instances4.alice.encrypt64(734315990), ); expect(res).to.equal(true); }); - it('test operator "ne" overload (euint16, euint32) => ebool test 2 (514, 514)', async function () { - const res = await this.contract2.ne_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(514), + it('test operator "ge" overload (euint32, euint64) => ebool test 1 (1126093045, 18444900127425225651)', async function () { + const res = await this.contract4.ge_euint32_euint64( + this.instances4.alice.encrypt32(1126093045), + this.instances4.alice.encrypt64(18444900127425225651), ); expect(res).to.equal(false); }); - it('test operator "ge" overload (euint16, euint32) => ebool test 1 (514, 66050)', async function () { - const res = await this.contract2.ge_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(66050), + it('test operator "ge" overload (euint32, euint64) => ebool test 2 (1126093041, 1126093045)', async function () { + const res = await this.contract4.ge_euint32_euint64( + this.instances4.alice.encrypt32(1126093041), + this.instances4.alice.encrypt64(1126093045), ); expect(res).to.equal(false); }); - it('test operator "ge" overload (euint16, euint32) => ebool test 2 (514, 514)', async function () { - const res = await this.contract2.ge_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(514), + it('test operator "ge" overload (euint32, euint64) => ebool test 3 (1126093045, 1126093045)', async function () { + const res = await this.contract4.ge_euint32_euint64( + this.instances4.alice.encrypt32(1126093045), + this.instances4.alice.encrypt64(1126093045), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint16, euint32) => ebool test 3 (514, 513)', async function () { - const res = await this.contract2.ge_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(513), + it('test operator "ge" overload (euint32, euint64) => ebool test 4 (1126093045, 1126093041)', async function () { + const res = await this.contract4.ge_euint32_euint64( + this.instances4.alice.encrypt32(1126093045), + this.instances4.alice.encrypt64(1126093041), ); expect(res).to.equal(true); }); - it('test operator "gt" overload (euint16, euint32) => ebool test 1 (514, 66050)', async function () { - const res = await this.contract2.gt_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(66050), + it('test operator "gt" overload (euint32, euint64) => ebool test 1 (1296765186, 18439742981119094705)', async function () { + const res = await this.contract4.gt_euint32_euint64( + this.instances4.alice.encrypt32(1296765186), + this.instances4.alice.encrypt64(18439742981119094705), ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint16, euint32) => ebool test 2 (514, 514)', async function () { - const res = await this.contract2.gt_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(514), + it('test operator "gt" overload (euint32, euint64) => ebool test 2 (1296765182, 1296765186)', async function () { + const res = await this.contract4.gt_euint32_euint64( + this.instances4.alice.encrypt32(1296765182), + this.instances4.alice.encrypt64(1296765186), ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint16, euint32) => ebool test 3 (514, 513)', async function () { - const res = await this.contract2.gt_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(513), + it('test operator "gt" overload (euint32, euint64) => ebool test 3 (1296765186, 1296765186)', async function () { + const res = await this.contract4.gt_euint32_euint64( + this.instances4.alice.encrypt32(1296765186), + this.instances4.alice.encrypt64(1296765186), ); - expect(res).to.equal(true); + expect(res).to.equal(false); }); - it('test operator "le" overload (euint16, euint32) => ebool test 1 (514, 66050)', async function () { - const res = await this.contract2.le_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(66050), + it('test operator "gt" overload (euint32, euint64) => ebool test 4 (1296765186, 1296765182)', async function () { + const res = await this.contract4.gt_euint32_euint64( + this.instances4.alice.encrypt32(1296765186), + this.instances4.alice.encrypt64(1296765182), ); expect(res).to.equal(true); }); - it('test operator "le" overload (euint16, euint32) => ebool test 2 (514, 514)', async function () { - const res = await this.contract2.le_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(514), + it('test operator "le" overload (euint32, euint64) => ebool test 1 (3652038615, 18440248369616077365)', async function () { + const res = await this.contract4.le_euint32_euint64( + this.instances4.alice.encrypt32(3652038615), + this.instances4.alice.encrypt64(18440248369616077365), ); expect(res).to.equal(true); }); - it('test operator "le" overload (euint16, euint32) => ebool test 3 (514, 513)', async function () { - const res = await this.contract2.le_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(513), + it('test operator "le" overload (euint32, euint64) => ebool test 2 (3652038611, 3652038615)', async function () { + const res = await this.contract4.le_euint32_euint64( + this.instances4.alice.encrypt32(3652038611), + this.instances4.alice.encrypt64(3652038615), ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "lt" overload (euint16, euint32) => ebool test 1 (514, 66050)', async function () { - const res = await this.contract2.lt_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(66050), + it('test operator "le" overload (euint32, euint64) => ebool test 3 (3652038615, 3652038615)', async function () { + const res = await this.contract4.le_euint32_euint64( + this.instances4.alice.encrypt32(3652038615), + this.instances4.alice.encrypt64(3652038615), ); expect(res).to.equal(true); }); - it('test operator "lt" overload (euint16, euint32) => ebool test 2 (514, 514)', async function () { - const res = await this.contract2.lt_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(514), + it('test operator "le" overload (euint32, euint64) => ebool test 4 (3652038615, 3652038611)', async function () { + const res = await this.contract4.le_euint32_euint64( + this.instances4.alice.encrypt32(3652038615), + this.instances4.alice.encrypt64(3652038611), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint16, euint32) => ebool test 3 (514, 513)', async function () { - const res = await this.contract2.lt_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(513), + it('test operator "lt" overload (euint32, euint64) => ebool test 1 (1728686329, 18442541149578902807)', async function () { + const res = await this.contract4.lt_euint32_euint64( + this.instances4.alice.encrypt32(1728686329), + this.instances4.alice.encrypt64(18442541149578902807), ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "min" overload (euint16, euint32) => euint32 test 1 (514, 66050)', async function () { - const res = await this.contract2.min_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(66050), + it('test operator "lt" overload (euint32, euint64) => ebool test 2 (1728686325, 1728686329)', async function () { + const res = await this.contract4.lt_euint32_euint64( + this.instances4.alice.encrypt32(1728686325), + this.instances4.alice.encrypt64(1728686329), ); - expect(res).to.equal(514); + expect(res).to.equal(true); }); - it('test operator "min" overload (euint16, euint32) => euint32 test 2 (514, 514)', async function () { - const res = await this.contract2.min_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(514), + it('test operator "lt" overload (euint32, euint64) => ebool test 3 (1728686329, 1728686329)', async function () { + const res = await this.contract4.lt_euint32_euint64( + this.instances4.alice.encrypt32(1728686329), + this.instances4.alice.encrypt64(1728686329), ); - expect(res).to.equal(514); + expect(res).to.equal(false); }); - it('test operator "min" overload (euint16, euint32) => euint32 test 3 (514, 513)', async function () { - const res = await this.contract2.min_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(513), + it('test operator "lt" overload (euint32, euint64) => ebool test 4 (1728686329, 1728686325)', async function () { + const res = await this.contract4.lt_euint32_euint64( + this.instances4.alice.encrypt32(1728686329), + this.instances4.alice.encrypt64(1728686325), ); - expect(res).to.equal(513); + expect(res).to.equal(false); }); - it('test operator "max" overload (euint16, euint32) => euint32 test 1 (514, 66050)', async function () { - const res = await this.contract2.max_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(66050), + it('test operator "min" overload (euint32, euint64) => euint64 test 1 (968740054, 18439525226452222255)', async function () { + const res = await this.contract4.min_euint32_euint64( + this.instances4.alice.encrypt32(968740054), + this.instances4.alice.encrypt64(18439525226452222255), ); - expect(res).to.equal(66050); + expect(res).to.equal(968740054n); }); - it('test operator "max" overload (euint16, euint32) => euint32 test 2 (514, 514)', async function () { - const res = await this.contract2.max_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(514), + it('test operator "min" overload (euint32, euint64) => euint64 test 2 (968740050, 968740054)', async function () { + const res = await this.contract4.min_euint32_euint64( + this.instances4.alice.encrypt32(968740050), + this.instances4.alice.encrypt64(968740054), ); - expect(res).to.equal(514); + expect(res).to.equal(968740050n); }); - it('test operator "max" overload (euint16, euint32) => euint32 test 3 (514, 513)', async function () { - const res = await this.contract2.max_euint16_euint32( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt32(513), + it('test operator "min" overload (euint32, euint64) => euint64 test 3 (968740054, 968740054)', async function () { + const res = await this.contract4.min_euint32_euint64( + this.instances4.alice.encrypt32(968740054), + this.instances4.alice.encrypt64(968740054), ); - expect(res).to.equal(514); + expect(res).to.equal(968740054n); }); - it('test operator "add" overload (euint16, euint64) => euint64 test 1 (514, 131074)', async function () { - const res = await this.contract2.add_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(131074), + it('test operator "min" overload (euint32, euint64) => euint64 test 4 (968740054, 968740050)', async function () { + const res = await this.contract4.min_euint32_euint64( + this.instances4.alice.encrypt32(968740054), + this.instances4.alice.encrypt64(968740050), ); - expect(res).to.equal(131588); + expect(res).to.equal(968740050n); }); - it('test operator "sub" overload (euint16, euint64) => euint64 test 1 (514, 2)', async function () { - const res = await this.contract2.sub_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(2), + it('test operator "max" overload (euint32, euint64) => euint64 test 1 (340812031, 18443150842651286449)', async function () { + const res = await this.contract4.max_euint32_euint64( + this.instances4.alice.encrypt32(340812031), + this.instances4.alice.encrypt64(18443150842651286449), ); - expect(res).to.equal(512); + expect(res).to.equal(18443150842651286449n); }); - it('test operator "sub" overload (euint16, euint64) => euint64 test 2 (514, 65536)', async function () { - const res = await this.contract2.sub_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(65536), + it('test operator "max" overload (euint32, euint64) => euint64 test 2 (340812027, 340812031)', async function () { + const res = await this.contract4.max_euint32_euint64( + this.instances4.alice.encrypt32(340812027), + this.instances4.alice.encrypt64(340812031), ); - expect(res).to.equal(18446744073709486594n); + expect(res).to.equal(340812031n); }); - it('test operator "mul" overload (euint16, euint64) => euint64 test 1 (512, 65536)', async function () { - const res = await this.contract2.mul_euint16_euint64( - this.instances2.alice.encrypt16(512), - this.instances2.alice.encrypt64(65536), + it('test operator "max" overload (euint32, euint64) => euint64 test 3 (340812031, 340812031)', async function () { + const res = await this.contract4.max_euint32_euint64( + this.instances4.alice.encrypt32(340812031), + this.instances4.alice.encrypt64(340812031), ); - expect(res).to.equal(33554432); + expect(res).to.equal(340812031n); }); - it('test operator "and" overload (euint16, euint64) => euint64 test 1 (514, 65536)', async function () { - const res = await this.contract2.and_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(65536), + it('test operator "max" overload (euint32, euint64) => euint64 test 4 (340812031, 340812027)', async function () { + const res = await this.contract4.max_euint32_euint64( + this.instances4.alice.encrypt32(340812031), + this.instances4.alice.encrypt64(340812027), ); - expect(res).to.equal(0); + expect(res).to.equal(340812031n); }); - it('test operator "and" overload (euint16, euint64) => euint64 test 2 (514, 65538)', async function () { - const res = await this.contract2.and_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(65538), - ); - expect(res).to.equal(2); + it('test operator "add" overload (euint32, uint32) => euint32 test 1 (1081671644, 1277295402)', async function () { + const res = await this.contract4.add_euint32_uint32(this.instances4.alice.encrypt32(1081671644), 1277295402); + expect(res).to.equal(2358967046n); }); - it('test operator "or" overload (euint16, euint64) => euint64 test 1 (514, 65536)', async function () { - const res = await this.contract2.or_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(65536), - ); - expect(res).to.equal(66050); + it('test operator "add" overload (euint32, uint32) => euint32 test 2 (829836783, 829836787)', async function () { + const res = await this.contract4.add_euint32_uint32(this.instances4.alice.encrypt32(829836783), 829836787); + expect(res).to.equal(1659673570n); }); - it('test operator "or" overload (euint16, euint64) => euint64 test 2 (514, 65538)', async function () { - const res = await this.contract2.or_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(65538), - ); - expect(res).to.equal(66050); + it('test operator "add" overload (euint32, uint32) => euint32 test 3 (829836787, 829836787)', async function () { + const res = await this.contract4.add_euint32_uint32(this.instances4.alice.encrypt32(829836787), 829836787); + expect(res).to.equal(1659673574n); }); - it('test operator "xor" overload (euint16, euint64) => euint64 test 1 (514, 65536)', async function () { - const res = await this.contract2.xor_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(65536), - ); - expect(res).to.equal(66050); + it('test operator "add" overload (euint32, uint32) => euint32 test 4 (829836787, 829836783)', async function () { + const res = await this.contract4.add_euint32_uint32(this.instances4.alice.encrypt32(829836787), 829836783); + expect(res).to.equal(1659673570n); }); - it('test operator "xor" overload (euint16, euint64) => euint64 test 2 (514, 65538)', async function () { - const res = await this.contract2.xor_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(65538), - ); - expect(res).to.equal(66048); + it('test operator "add" overload (uint32, euint32) => euint32 test 1 (1301306419, 1277295402)', async function () { + const res = await this.contract4.add_uint32_euint32(1301306419, this.instances4.alice.encrypt32(1277295402)); + expect(res).to.equal(2578601821n); }); - it('test operator "eq" overload (euint16, euint64) => ebool test 1 (514, 66050)', async function () { - const res = await this.contract2.eq_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(66050), - ); + it('test operator "add" overload (uint32, euint32) => euint32 test 2 (829836783, 829836787)', async function () { + const res = await this.contract4.add_uint32_euint32(829836783, this.instances4.alice.encrypt32(829836787)); + expect(res).to.equal(1659673570n); + }); + + it('test operator "add" overload (uint32, euint32) => euint32 test 3 (829836787, 829836787)', async function () { + const res = await this.contract4.add_uint32_euint32(829836787, this.instances4.alice.encrypt32(829836787)); + expect(res).to.equal(1659673574n); + }); + + it('test operator "add" overload (uint32, euint32) => euint32 test 4 (829836787, 829836783)', async function () { + const res = await this.contract4.add_uint32_euint32(829836787, this.instances4.alice.encrypt32(829836783)); + expect(res).to.equal(1659673570n); + }); + + it('test operator "sub" overload (euint32, uint32) => euint32 test 1 (3061205449, 3061205449)', async function () { + const res = await this.contract4.sub_euint32_uint32(this.instances4.alice.encrypt32(3061205449), 3061205449); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint32, uint32) => euint32 test 2 (3061205449, 3061205445)', async function () { + const res = await this.contract4.sub_euint32_uint32(this.instances4.alice.encrypt32(3061205449), 3061205445); + expect(res).to.equal(4n); + }); + + it('test operator "sub" overload (uint32, euint32) => euint32 test 1 (3061205449, 3061205449)', async function () { + const res = await this.contract4.sub_uint32_euint32(3061205449, this.instances4.alice.encrypt32(3061205449)); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (uint32, euint32) => euint32 test 2 (3061205449, 3061205445)', async function () { + const res = await this.contract4.sub_uint32_euint32(3061205449, this.instances4.alice.encrypt32(3061205445)); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint32, uint32) => euint32 test 1 (42467, 65037)', async function () { + const res = await this.contract4.mul_euint32_uint32(this.instances4.alice.encrypt32(42467), 65037); + expect(res).to.equal(2761926279n); + }); + + it('test operator "mul" overload (euint32, uint32) => euint32 test 2 (41983, 41983)', async function () { + const res = await this.contract4.mul_euint32_uint32(this.instances4.alice.encrypt32(41983), 41983); + expect(res).to.equal(1762572289n); + }); + + it('test operator "mul" overload (euint32, uint32) => euint32 test 3 (41983, 41983)', async function () { + const res = await this.contract4.mul_euint32_uint32(this.instances4.alice.encrypt32(41983), 41983); + expect(res).to.equal(1762572289n); + }); + + it('test operator "mul" overload (euint32, uint32) => euint32 test 4 (41983, 41983)', async function () { + const res = await this.contract4.mul_euint32_uint32(this.instances4.alice.encrypt32(41983), 41983); + expect(res).to.equal(1762572289n); + }); + + it('test operator "mul" overload (uint32, euint32) => euint32 test 1 (17461, 65037)', async function () { + const res = await this.contract4.mul_uint32_euint32(17461, this.instances4.alice.encrypt32(65037)); + expect(res).to.equal(1135611057n); + }); + + it('test operator "mul" overload (uint32, euint32) => euint32 test 2 (41983, 41983)', async function () { + const res = await this.contract4.mul_uint32_euint32(41983, this.instances4.alice.encrypt32(41983)); + expect(res).to.equal(1762572289n); + }); + + it('test operator "mul" overload (uint32, euint32) => euint32 test 3 (41983, 41983)', async function () { + const res = await this.contract4.mul_uint32_euint32(41983, this.instances4.alice.encrypt32(41983)); + expect(res).to.equal(1762572289n); + }); + + it('test operator "mul" overload (uint32, euint32) => euint32 test 4 (41983, 41983)', async function () { + const res = await this.contract4.mul_uint32_euint32(41983, this.instances4.alice.encrypt32(41983)); + expect(res).to.equal(1762572289n); + }); + + it('test operator "div" overload (euint32, uint32) => euint32 test 1 (1945845245, 755191882)', async function () { + const res = await this.contract4.div_euint32_uint32(this.instances4.alice.encrypt32(1945845245), 755191882); + expect(res).to.equal(2n); + }); + + it('test operator "div" overload (euint32, uint32) => euint32 test 2 (1945845241, 1945845245)', async function () { + const res = await this.contract4.div_euint32_uint32(this.instances4.alice.encrypt32(1945845241), 1945845245); + expect(res).to.equal(0n); + }); + + it('test operator "div" overload (euint32, uint32) => euint32 test 3 (1945845245, 1945845245)', async function () { + const res = await this.contract4.div_euint32_uint32(this.instances4.alice.encrypt32(1945845245), 1945845245); + expect(res).to.equal(1n); + }); + + it('test operator "div" overload (euint32, uint32) => euint32 test 4 (1945845245, 1945845241)', async function () { + const res = await this.contract4.div_euint32_uint32(this.instances4.alice.encrypt32(1945845245), 1945845241); + expect(res).to.equal(1n); + }); + + it('test operator "rem" overload (euint32, uint32) => euint32 test 1 (2521442787, 706504920)', async function () { + const res = await this.contract4.rem_euint32_uint32(this.instances4.alice.encrypt32(2521442787), 706504920); + expect(res).to.equal(401928027n); + }); + + it('test operator "rem" overload (euint32, uint32) => euint32 test 2 (2521442783, 2521442787)', async function () { + const res = await this.contract4.rem_euint32_uint32(this.instances4.alice.encrypt32(2521442783), 2521442787); + expect(res).to.equal(2521442783n); + }); + + it('test operator "rem" overload (euint32, uint32) => euint32 test 3 (2521442787, 2521442787)', async function () { + const res = await this.contract4.rem_euint32_uint32(this.instances4.alice.encrypt32(2521442787), 2521442787); + expect(res).to.equal(0n); + }); + + it('test operator "rem" overload (euint32, uint32) => euint32 test 4 (2521442787, 2521442783)', async function () { + const res = await this.contract4.rem_euint32_uint32(this.instances4.alice.encrypt32(2521442787), 2521442783); + expect(res).to.equal(4n); + }); + + it('test operator "eq" overload (euint32, uint32) => ebool test 1 (3674813327, 340447461)', async function () { + const res = await this.contract4.eq_euint32_uint32(this.instances4.alice.encrypt32(3674813327), 340447461); expect(res).to.equal(false); }); - it('test operator "eq" overload (euint16, euint64) => ebool test 2 (514, 514)', async function () { - const res = await this.contract2.eq_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(514), - ); - expect(res).to.equal(true); + it('test operator "eq" overload (euint32, uint32) => ebool test 2 (3173886287, 3173886291)', async function () { + const res = await this.contract4.eq_euint32_uint32(this.instances4.alice.encrypt32(3173886287), 3173886291); + expect(res).to.equal(false); }); - it('test operator "ne" overload (euint16, euint64) => ebool test 1 (514, 66050)', async function () { - const res = await this.contract2.ne_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(66050), - ); + it('test operator "eq" overload (euint32, uint32) => ebool test 3 (3173886291, 3173886291)', async function () { + const res = await this.contract4.eq_euint32_uint32(this.instances4.alice.encrypt32(3173886291), 3173886291); expect(res).to.equal(true); }); - it('test operator "ne" overload (euint16, euint64) => ebool test 2 (514, 514)', async function () { - const res = await this.contract2.ne_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(514), - ); + it('test operator "eq" overload (euint32, uint32) => ebool test 4 (3173886291, 3173886287)', async function () { + const res = await this.contract4.eq_euint32_uint32(this.instances4.alice.encrypt32(3173886291), 3173886287); expect(res).to.equal(false); }); - it('test operator "ge" overload (euint16, euint64) => ebool test 1 (514, 66050)', async function () { - const res = await this.contract2.ge_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(66050), - ); + it('test operator "eq" overload (uint32, euint32) => ebool test 1 (630917914, 340447461)', async function () { + const res = await this.contract4.eq_uint32_euint32(630917914, this.instances4.alice.encrypt32(340447461)); expect(res).to.equal(false); }); - it('test operator "ge" overload (euint16, euint64) => ebool test 2 (514, 514)', async function () { - const res = await this.contract2.ge_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(514), - ); - expect(res).to.equal(true); + it('test operator "eq" overload (uint32, euint32) => ebool test 2 (3173886287, 3173886291)', async function () { + const res = await this.contract4.eq_uint32_euint32(3173886287, this.instances4.alice.encrypt32(3173886291)); + expect(res).to.equal(false); }); - it('test operator "ge" overload (euint16, euint64) => ebool test 3 (514, 513)', async function () { - const res = await this.contract2.ge_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(513), - ); + it('test operator "eq" overload (uint32, euint32) => ebool test 3 (3173886291, 3173886291)', async function () { + const res = await this.contract4.eq_uint32_euint32(3173886291, this.instances4.alice.encrypt32(3173886291)); expect(res).to.equal(true); }); - it('test operator "gt" overload (euint16, euint64) => ebool test 1 (514, 66050)', async function () { - const res = await this.contract2.gt_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(66050), - ); + it('test operator "eq" overload (uint32, euint32) => ebool test 4 (3173886291, 3173886287)', async function () { + const res = await this.contract4.eq_uint32_euint32(3173886291, this.instances4.alice.encrypt32(3173886287)); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint16, euint64) => ebool test 2 (514, 514)', async function () { - const res = await this.contract2.gt_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(514), - ); + it('test operator "ne" overload (euint32, uint32) => ebool test 1 (40863923, 740881042)', async function () { + const res = await this.contract4.ne_euint32_uint32(this.instances4.alice.encrypt32(40863923), 740881042); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint32, uint32) => ebool test 2 (40863919, 40863923)', async function () { + const res = await this.contract4.ne_euint32_uint32(this.instances4.alice.encrypt32(40863919), 40863923); + expect(res).to.equal(true); + }); + + it('test operator "ne" overload (euint32, uint32) => ebool test 3 (40863923, 40863923)', async function () { + const res = await this.contract4.ne_euint32_uint32(this.instances4.alice.encrypt32(40863923), 40863923); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint16, euint64) => ebool test 3 (514, 513)', async function () { - const res = await this.contract2.gt_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(513), - ); + it('test operator "ne" overload (euint32, uint32) => ebool test 4 (40863923, 40863919)', async function () { + const res = await this.contract4.ne_euint32_uint32(this.instances4.alice.encrypt32(40863923), 40863919); expect(res).to.equal(true); }); - it('test operator "le" overload (euint16, euint64) => ebool test 1 (514, 66050)', async function () { - const res = await this.contract2.le_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(66050), - ); + it('test operator "ne" overload (uint32, euint32) => ebool test 1 (3944008003, 740881042)', async function () { + const res = await this.contract4.ne_uint32_euint32(3944008003, this.instances4.alice.encrypt32(740881042)); expect(res).to.equal(true); }); - it('test operator "le" overload (euint16, euint64) => ebool test 2 (514, 514)', async function () { - const res = await this.contract2.le_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(514), - ); + it('test operator "ne" overload (uint32, euint32) => ebool test 2 (40863919, 40863923)', async function () { + const res = await this.contract4.ne_uint32_euint32(40863919, this.instances4.alice.encrypt32(40863923)); expect(res).to.equal(true); }); - it('test operator "le" overload (euint16, euint64) => ebool test 3 (514, 513)', async function () { - const res = await this.contract2.le_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(513), - ); + it('test operator "ne" overload (uint32, euint32) => ebool test 3 (40863923, 40863923)', async function () { + const res = await this.contract4.ne_uint32_euint32(40863923, this.instances4.alice.encrypt32(40863923)); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint16, euint64) => ebool test 1 (514, 66050)', async function () { - const res = await this.contract2.lt_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(66050), - ); + it('test operator "ne" overload (uint32, euint32) => ebool test 4 (40863923, 40863919)', async function () { + const res = await this.contract4.ne_uint32_euint32(40863923, this.instances4.alice.encrypt32(40863919)); expect(res).to.equal(true); }); - it('test operator "lt" overload (euint16, euint64) => ebool test 2 (514, 514)', async function () { - const res = await this.contract2.lt_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(514), - ); + it('test operator "ge" overload (euint32, uint32) => ebool test 1 (1970784794, 2198890323)', async function () { + const res = await this.contract4.ge_euint32_uint32(this.instances4.alice.encrypt32(1970784794), 2198890323); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint16, euint64) => ebool test 3 (514, 513)', async function () { - const res = await this.contract2.lt_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(513), - ); + it('test operator "ge" overload (euint32, uint32) => ebool test 2 (1596956630, 1596956634)', async function () { + const res = await this.contract4.ge_euint32_uint32(this.instances4.alice.encrypt32(1596956630), 1596956634); expect(res).to.equal(false); }); - it('test operator "min" overload (euint16, euint64) => euint64 test 1 (514, 66050)', async function () { - const res = await this.contract2.min_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(66050), - ); - expect(res).to.equal(514); + it('test operator "ge" overload (euint32, uint32) => ebool test 3 (1596956634, 1596956634)', async function () { + const res = await this.contract4.ge_euint32_uint32(this.instances4.alice.encrypt32(1596956634), 1596956634); + expect(res).to.equal(true); }); - it('test operator "min" overload (euint16, euint64) => euint64 test 2 (514, 514)', async function () { - const res = await this.contract2.min_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(514), - ); - expect(res).to.equal(514); + it('test operator "ge" overload (euint32, uint32) => ebool test 4 (1596956634, 1596956630)', async function () { + const res = await this.contract4.ge_euint32_uint32(this.instances4.alice.encrypt32(1596956634), 1596956630); + expect(res).to.equal(true); }); - it('test operator "min" overload (euint16, euint64) => euint64 test 3 (514, 513)', async function () { - const res = await this.contract2.min_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(513), - ); - expect(res).to.equal(513); + it('test operator "ge" overload (uint32, euint32) => ebool test 1 (3128599756, 2198890323)', async function () { + const res = await this.contract4.ge_uint32_euint32(3128599756, this.instances4.alice.encrypt32(2198890323)); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint16, euint64) => euint64 test 1 (514, 66050)', async function () { - const res = await this.contract2.max_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(66050), - ); - expect(res).to.equal(66050); + it('test operator "ge" overload (uint32, euint32) => ebool test 2 (1596956630, 1596956634)', async function () { + const res = await this.contract4.ge_uint32_euint32(1596956630, this.instances4.alice.encrypt32(1596956634)); + expect(res).to.equal(false); }); - it('test operator "max" overload (euint16, euint64) => euint64 test 2 (514, 514)', async function () { - const res = await this.contract2.max_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(514), - ); - expect(res).to.equal(514); + it('test operator "ge" overload (uint32, euint32) => ebool test 3 (1596956634, 1596956634)', async function () { + const res = await this.contract4.ge_uint32_euint32(1596956634, this.instances4.alice.encrypt32(1596956634)); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint16, euint64) => euint64 test 3 (514, 513)', async function () { - const res = await this.contract2.max_euint16_euint64( - this.instances2.alice.encrypt16(514), - this.instances2.alice.encrypt64(513), - ); - expect(res).to.equal(514); + it('test operator "ge" overload (uint32, euint32) => ebool test 4 (1596956634, 1596956630)', async function () { + const res = await this.contract4.ge_uint32_euint32(1596956634, this.instances4.alice.encrypt32(1596956630)); + expect(res).to.equal(true); }); - it('test operator "add" overload (euint16, uint16) => euint16 test 1 (514, 546)', async function () { - const res = await this.contract2.add_euint16_uint16(this.instances2.alice.encrypt16(514), 546); - expect(res).to.equal(1060); + it('test operator "gt" overload (euint32, uint32) => ebool test 1 (2212514392, 3587264713)', async function () { + const res = await this.contract4.gt_euint32_uint32(this.instances4.alice.encrypt32(2212514392), 3587264713); + expect(res).to.equal(false); }); - it('test operator "add" overload (uint16, euint16) => euint16 test 1 (514, 546)', async function () { - const res = await this.contract2.add_uint16_euint16(514, this.instances2.alice.encrypt16(546)); - expect(res).to.equal(1060); + it('test operator "gt" overload (euint32, uint32) => ebool test 2 (854163755, 854163759)', async function () { + const res = await this.contract4.gt_euint32_uint32(this.instances4.alice.encrypt32(854163755), 854163759); + expect(res).to.equal(false); }); - it('test operator "sub" overload (euint16, uint16) => euint16 test 1 (514, 513)', async function () { - const res = await this.contract2.sub_euint16_uint16(this.instances2.alice.encrypt16(514), 513); - expect(res).to.equal(1); + it('test operator "gt" overload (euint32, uint32) => ebool test 3 (854163759, 854163759)', async function () { + const res = await this.contract4.gt_euint32_uint32(this.instances4.alice.encrypt32(854163759), 854163759); + expect(res).to.equal(false); }); - it('test operator "sub" overload (uint16, euint16) => euint16 test 1 (514, 513)', async function () { - const res = await this.contract2.sub_uint16_euint16(514, this.instances2.alice.encrypt16(513)); - expect(res).to.equal(1); + it('test operator "gt" overload (euint32, uint32) => ebool test 4 (854163759, 854163755)', async function () { + const res = await this.contract4.gt_euint32_uint32(this.instances4.alice.encrypt32(854163759), 854163755); + expect(res).to.equal(true); }); - it('test operator "mul" overload (euint16, uint16) => euint16 test 1 (514, 3)', async function () { - const res = await this.contract2.mul_euint16_uint16(this.instances2.alice.encrypt16(514), 3); - expect(res).to.equal(1542); + it('test operator "gt" overload (uint32, euint32) => ebool test 1 (405003775, 3587264713)', async function () { + const res = await this.contract4.gt_uint32_euint32(405003775, this.instances4.alice.encrypt32(3587264713)); + expect(res).to.equal(false); }); - it('test operator "mul" overload (uint16, euint16) => euint16 test 1 (514, 3)', async function () { - const res = await this.contract2.mul_uint16_euint16(514, this.instances2.alice.encrypt16(3)); - expect(res).to.equal(1542); + it('test operator "gt" overload (uint32, euint32) => ebool test 2 (854163755, 854163759)', async function () { + const res = await this.contract4.gt_uint32_euint32(854163755, this.instances4.alice.encrypt32(854163759)); + expect(res).to.equal(false); }); - it('test operator "div" overload (euint16, uint16) => euint16 test 1 (1542, 3)', async function () { - const res = await this.contract2.div_euint16_uint16(this.instances2.alice.encrypt16(1542), 3); - expect(res).to.equal(514); + it('test operator "gt" overload (uint32, euint32) => ebool test 3 (854163759, 854163759)', async function () { + const res = await this.contract4.gt_uint32_euint32(854163759, this.instances4.alice.encrypt32(854163759)); + expect(res).to.equal(false); }); - it('test operator "rem" overload (euint16, uint16) => euint16 test 1 (1544, 3)', async function () { - const res = await this.contract2.rem_euint16_uint16(this.instances2.alice.encrypt16(1544), 3); - expect(res).to.equal(2); + it('test operator "gt" overload (uint32, euint32) => ebool test 4 (854163759, 854163755)', async function () { + const res = await this.contract4.gt_uint32_euint32(854163759, this.instances4.alice.encrypt32(854163755)); + expect(res).to.equal(true); }); - it('test operator "eq" overload (euint16, uint16) => ebool test 1 (1542, 1542)', async function () { - const res = await this.contract2.eq_euint16_uint16(this.instances2.alice.encrypt16(1542), 1542); + it('test operator "le" overload (euint32, uint32) => ebool test 1 (989604334, 2400461325)', async function () { + const res = await this.contract4.le_euint32_uint32(this.instances4.alice.encrypt32(989604334), 2400461325); expect(res).to.equal(true); }); - it('test operator "eq" overload (euint16, uint16) => ebool test 2 (1542, 1541)', async function () { - const res = await this.contract2.eq_euint16_uint16(this.instances2.alice.encrypt16(1542), 1541); - expect(res).to.equal(false); + it('test operator "le" overload (euint32, uint32) => ebool test 2 (989604330, 989604334)', async function () { + const res = await this.contract4.le_euint32_uint32(this.instances4.alice.encrypt32(989604330), 989604334); + expect(res).to.equal(true); }); - it('test operator "eq" overload (uint16, euint16) => ebool test 1 (1542, 1542)', async function () { - const res = await this.contract2.eq_uint16_euint16(1542, this.instances2.alice.encrypt16(1542)); + it('test operator "le" overload (euint32, uint32) => ebool test 3 (989604334, 989604334)', async function () { + const res = await this.contract4.le_euint32_uint32(this.instances4.alice.encrypt32(989604334), 989604334); expect(res).to.equal(true); }); - it('test operator "eq" overload (uint16, euint16) => ebool test 2 (1542, 1541)', async function () { - const res = await this.contract2.eq_uint16_euint16(1542, this.instances2.alice.encrypt16(1541)); + it('test operator "le" overload (euint32, uint32) => ebool test 4 (989604334, 989604330)', async function () { + const res = await this.contract4.le_euint32_uint32(this.instances4.alice.encrypt32(989604334), 989604330); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint16, uint16) => ebool test 1 (1542, 1542)', async function () { - const res = await this.contract2.ne_euint16_uint16(this.instances2.alice.encrypt16(1542), 1542); + it('test operator "le" overload (uint32, euint32) => ebool test 1 (3171491075, 2400461325)', async function () { + const res = await this.contract4.le_uint32_euint32(3171491075, this.instances4.alice.encrypt32(2400461325)); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint16, uint16) => ebool test 2 (1542, 1541)', async function () { - const res = await this.contract2.ne_euint16_uint16(this.instances2.alice.encrypt16(1542), 1541); + it('test operator "le" overload (uint32, euint32) => ebool test 2 (989604330, 989604334)', async function () { + const res = await this.contract4.le_uint32_euint32(989604330, this.instances4.alice.encrypt32(989604334)); expect(res).to.equal(true); }); - it('test operator "ne" overload (uint16, euint16) => ebool test 1 (1542, 1542)', async function () { - const res = await this.contract2.ne_uint16_euint16(1542, this.instances2.alice.encrypt16(1542)); + it('test operator "le" overload (uint32, euint32) => ebool test 3 (989604334, 989604334)', async function () { + const res = await this.contract4.le_uint32_euint32(989604334, this.instances4.alice.encrypt32(989604334)); + expect(res).to.equal(true); + }); + + it('test operator "le" overload (uint32, euint32) => ebool test 4 (989604334, 989604330)', async function () { + const res = await this.contract4.le_uint32_euint32(989604334, this.instances4.alice.encrypt32(989604330)); expect(res).to.equal(false); }); - it('test operator "ne" overload (uint16, euint16) => ebool test 2 (1542, 1541)', async function () { - const res = await this.contract2.ne_uint16_euint16(1542, this.instances2.alice.encrypt16(1541)); - expect(res).to.equal(true); + it('test operator "lt" overload (euint32, uint32) => ebool test 1 (3432727362, 340267218)', async function () { + const res = await this.contract4.lt_euint32_uint32(this.instances4.alice.encrypt32(3432727362), 340267218); + expect(res).to.equal(false); }); - it('test operator "ge" overload (euint16, uint16) => ebool test 1 (1542, 1542)', async function () { - const res = await this.contract2.ge_euint16_uint16(this.instances2.alice.encrypt16(1542), 1542); + it('test operator "lt" overload (euint32, uint32) => ebool test 2 (2953663244, 2953663248)', async function () { + const res = await this.contract4.lt_euint32_uint32(this.instances4.alice.encrypt32(2953663244), 2953663248); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint16, uint16) => ebool test 2 (1542, 1541)', async function () { - const res = await this.contract2.ge_euint16_uint16(this.instances2.alice.encrypt16(1542), 1541); - expect(res).to.equal(true); + it('test operator "lt" overload (euint32, uint32) => ebool test 3 (2953663248, 2953663248)', async function () { + const res = await this.contract4.lt_euint32_uint32(this.instances4.alice.encrypt32(2953663248), 2953663248); + expect(res).to.equal(false); }); - it('test operator "ge" overload (euint16, uint16) => ebool test 3 (1542, 1543)', async function () { - const res = await this.contract2.ge_euint16_uint16(this.instances2.alice.encrypt16(1542), 1543); + it('test operator "lt" overload (euint32, uint32) => ebool test 4 (2953663248, 2953663244)', async function () { + const res = await this.contract4.lt_euint32_uint32(this.instances4.alice.encrypt32(2953663248), 2953663244); expect(res).to.equal(false); }); - it('test operator "ge" overload (uint16, euint16) => ebool test 1 (1542, 1542)', async function () { - const res = await this.contract2.ge_uint16_euint16(1542, this.instances2.alice.encrypt16(1542)); + it('test operator "lt" overload (uint32, euint32) => ebool test 1 (254860119, 340267218)', async function () { + const res = await this.contract4.lt_uint32_euint32(254860119, this.instances4.alice.encrypt32(340267218)); expect(res).to.equal(true); }); - it('test operator "ge" overload (uint16, euint16) => ebool test 2 (1542, 1541)', async function () { - const res = await this.contract2.ge_uint16_euint16(1542, this.instances2.alice.encrypt16(1541)); + it('test operator "lt" overload (uint32, euint32) => ebool test 2 (2953663244, 2953663248)', async function () { + const res = await this.contract4.lt_uint32_euint32(2953663244, this.instances4.alice.encrypt32(2953663248)); expect(res).to.equal(true); }); - it('test operator "ge" overload (uint16, euint16) => ebool test 3 (1542, 1543)', async function () { - const res = await this.contract2.ge_uint16_euint16(1542, this.instances2.alice.encrypt16(1543)); + it('test operator "lt" overload (uint32, euint32) => ebool test 3 (2953663248, 2953663248)', async function () { + const res = await this.contract4.lt_uint32_euint32(2953663248, this.instances4.alice.encrypt32(2953663248)); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint16, uint16) => ebool test 1 (1542, 1542)', async function () { - const res = await this.contract2.gt_euint16_uint16(this.instances2.alice.encrypt16(1542), 1542); + it('test operator "lt" overload (uint32, euint32) => ebool test 4 (2953663248, 2953663244)', async function () { + const res = await this.contract4.lt_uint32_euint32(2953663248, this.instances4.alice.encrypt32(2953663244)); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint16, uint16) => ebool test 2 (1542, 1541)', async function () { - const res = await this.contract2.gt_euint16_uint16(this.instances2.alice.encrypt16(1542), 1541); - expect(res).to.equal(true); + it('test operator "min" overload (euint32, uint32) => euint32 test 1 (1800381916, 3488347882)', async function () { + const res = await this.contract4.min_euint32_uint32(this.instances4.alice.encrypt32(1800381916), 3488347882); + expect(res).to.equal(1800381916n); }); - it('test operator "gt" overload (euint16, uint16) => ebool test 3 (1542, 1543)', async function () { - const res = await this.contract2.gt_euint16_uint16(this.instances2.alice.encrypt16(1542), 1543); - expect(res).to.equal(false); + it('test operator "min" overload (euint32, uint32) => euint32 test 2 (1800381912, 1800381916)', async function () { + const res = await this.contract4.min_euint32_uint32(this.instances4.alice.encrypt32(1800381912), 1800381916); + expect(res).to.equal(1800381912n); + }); + + it('test operator "min" overload (euint32, uint32) => euint32 test 3 (1800381916, 1800381916)', async function () { + const res = await this.contract4.min_euint32_uint32(this.instances4.alice.encrypt32(1800381916), 1800381916); + expect(res).to.equal(1800381916n); + }); + + it('test operator "min" overload (euint32, uint32) => euint32 test 4 (1800381916, 1800381912)', async function () { + const res = await this.contract4.min_euint32_uint32(this.instances4.alice.encrypt32(1800381916), 1800381912); + expect(res).to.equal(1800381912n); + }); + + it('test operator "min" overload (uint32, euint32) => euint32 test 1 (2638635782, 3488347882)', async function () { + const res = await this.contract4.min_uint32_euint32(2638635782, this.instances4.alice.encrypt32(3488347882)); + expect(res).to.equal(2638635782n); + }); + + it('test operator "min" overload (uint32, euint32) => euint32 test 2 (1800381912, 1800381916)', async function () { + const res = await this.contract4.min_uint32_euint32(1800381912, this.instances4.alice.encrypt32(1800381916)); + expect(res).to.equal(1800381912n); + }); + + it('test operator "min" overload (uint32, euint32) => euint32 test 3 (1800381916, 1800381916)', async function () { + const res = await this.contract4.min_uint32_euint32(1800381916, this.instances4.alice.encrypt32(1800381916)); + expect(res).to.equal(1800381916n); + }); + + it('test operator "min" overload (uint32, euint32) => euint32 test 4 (1800381916, 1800381912)', async function () { + const res = await this.contract4.min_uint32_euint32(1800381916, this.instances4.alice.encrypt32(1800381912)); + expect(res).to.equal(1800381912n); + }); + + it('test operator "max" overload (euint32, uint32) => euint32 test 1 (2043312979, 706283813)', async function () { + const res = await this.contract4.max_euint32_uint32(this.instances4.alice.encrypt32(2043312979), 706283813); + expect(res).to.equal(2043312979n); + }); + + it('test operator "max" overload (euint32, uint32) => euint32 test 2 (2043312975, 2043312979)', async function () { + const res = await this.contract4.max_euint32_uint32(this.instances4.alice.encrypt32(2043312975), 2043312979); + expect(res).to.equal(2043312979n); + }); + + it('test operator "max" overload (euint32, uint32) => euint32 test 3 (2043312979, 2043312979)', async function () { + const res = await this.contract4.max_euint32_uint32(this.instances4.alice.encrypt32(2043312979), 2043312979); + expect(res).to.equal(2043312979n); + }); + + it('test operator "max" overload (euint32, uint32) => euint32 test 4 (2043312979, 2043312975)', async function () { + const res = await this.contract4.max_euint32_uint32(this.instances4.alice.encrypt32(2043312979), 2043312975); + expect(res).to.equal(2043312979n); + }); + + it('test operator "max" overload (uint32, euint32) => euint32 test 1 (1094445398, 706283813)', async function () { + const res = await this.contract4.max_uint32_euint32(1094445398, this.instances4.alice.encrypt32(706283813)); + expect(res).to.equal(1094445398n); + }); + + it('test operator "max" overload (uint32, euint32) => euint32 test 2 (2043312975, 2043312979)', async function () { + const res = await this.contract4.max_uint32_euint32(2043312975, this.instances4.alice.encrypt32(2043312979)); + expect(res).to.equal(2043312979n); + }); + + it('test operator "max" overload (uint32, euint32) => euint32 test 3 (2043312979, 2043312979)', async function () { + const res = await this.contract4.max_uint32_euint32(2043312979, this.instances4.alice.encrypt32(2043312979)); + expect(res).to.equal(2043312979n); + }); + + it('test operator "max" overload (uint32, euint32) => euint32 test 4 (2043312979, 2043312975)', async function () { + const res = await this.contract4.max_uint32_euint32(2043312979, this.instances4.alice.encrypt32(2043312975)); + expect(res).to.equal(2043312979n); + }); + + it('test operator "add" overload (euint64, euint4) => euint64 test 1 (9, 2)', async function () { + const res = await this.contract4.add_euint64_euint4( + this.instances4.alice.encrypt64(9), + this.instances4.alice.encrypt4(2), + ); + expect(res).to.equal(11n); + }); + + it('test operator "add" overload (euint64, euint4) => euint64 test 2 (6, 8)', async function () { + const res = await this.contract4.add_euint64_euint4( + this.instances4.alice.encrypt64(6), + this.instances4.alice.encrypt4(8), + ); + expect(res).to.equal(14n); + }); + + it('test operator "add" overload (euint64, euint4) => euint64 test 3 (5, 5)', async function () { + const res = await this.contract4.add_euint64_euint4( + this.instances4.alice.encrypt64(5), + this.instances4.alice.encrypt4(5), + ); + expect(res).to.equal(10n); + }); + + it('test operator "add" overload (euint64, euint4) => euint64 test 4 (8, 6)', async function () { + const res = await this.contract4.add_euint64_euint4( + this.instances4.alice.encrypt64(8), + this.instances4.alice.encrypt4(6), + ); + expect(res).to.equal(14n); + }); + + it('test operator "sub" overload (euint64, euint4) => euint64 test 1 (8, 8)', async function () { + const res = await this.contract4.sub_euint64_euint4( + this.instances4.alice.encrypt64(8), + this.instances4.alice.encrypt4(8), + ); + expect(res).to.equal(0n); + }); + + it('test operator "sub" overload (euint64, euint4) => euint64 test 2 (8, 4)', async function () { + const res = await this.contract4.sub_euint64_euint4( + this.instances4.alice.encrypt64(8), + this.instances4.alice.encrypt4(4), + ); + expect(res).to.equal(4n); + }); + + it('test operator "mul" overload (euint64, euint4) => euint64 test 1 (5, 2)', async function () { + const res = await this.contract4.mul_euint64_euint4( + this.instances4.alice.encrypt64(5), + this.instances4.alice.encrypt4(2), + ); + expect(res).to.equal(10n); + }); + + it('test operator "mul" overload (euint64, euint4) => euint64 test 2 (3, 5)', async function () { + const res = await this.contract4.mul_euint64_euint4( + this.instances4.alice.encrypt64(3), + this.instances4.alice.encrypt4(5), + ); + expect(res).to.equal(15n); + }); + + it('test operator "mul" overload (euint64, euint4) => euint64 test 3 (3, 3)', async function () { + const res = await this.contract4.mul_euint64_euint4( + this.instances4.alice.encrypt64(3), + this.instances4.alice.encrypt4(3), + ); + expect(res).to.equal(9n); + }); + + it('test operator "mul" overload (euint64, euint4) => euint64 test 4 (5, 3)', async function () { + const res = await this.contract4.mul_euint64_euint4( + this.instances4.alice.encrypt64(5), + this.instances4.alice.encrypt4(3), + ); + expect(res).to.equal(15n); }); - it('test operator "gt" overload (uint16, euint16) => ebool test 1 (1542, 1542)', async function () { - const res = await this.contract2.gt_uint16_euint16(1542, this.instances2.alice.encrypt16(1542)); - expect(res).to.equal(false); + it('test operator "and" overload (euint64, euint4) => euint64 test 1 (18442416087216426369, 12)', async function () { + const res = await this.contract4.and_euint64_euint4( + this.instances4.alice.encrypt64(18442416087216426369), + this.instances4.alice.encrypt4(12), + ); + expect(res).to.equal(0n); }); - it('test operator "gt" overload (uint16, euint16) => ebool test 2 (1542, 1541)', async function () { - const res = await this.contract2.gt_uint16_euint16(1542, this.instances2.alice.encrypt16(1541)); - expect(res).to.equal(true); + it('test operator "and" overload (euint64, euint4) => euint64 test 2 (8, 12)', async function () { + const res = await this.contract4.and_euint64_euint4( + this.instances4.alice.encrypt64(8), + this.instances4.alice.encrypt4(12), + ); + expect(res).to.equal(8n); }); - it('test operator "gt" overload (uint16, euint16) => ebool test 3 (1542, 1543)', async function () { - const res = await this.contract2.gt_uint16_euint16(1542, this.instances2.alice.encrypt16(1543)); - expect(res).to.equal(false); + it('test operator "and" overload (euint64, euint4) => euint64 test 3 (12, 12)', async function () { + const res = await this.contract4.and_euint64_euint4( + this.instances4.alice.encrypt64(12), + this.instances4.alice.encrypt4(12), + ); + expect(res).to.equal(12n); }); - it('test operator "le" overload (euint16, uint16) => ebool test 1 (1542, 1542)', async function () { - const res = await this.contract2.le_euint16_uint16(this.instances2.alice.encrypt16(1542), 1542); - expect(res).to.equal(true); + it('test operator "and" overload (euint64, euint4) => euint64 test 4 (12, 8)', async function () { + const res = await this.contract4.and_euint64_euint4( + this.instances4.alice.encrypt64(12), + this.instances4.alice.encrypt4(8), + ); + expect(res).to.equal(8n); }); - it('test operator "le" overload (euint16, uint16) => ebool test 2 (1542, 1541)', async function () { - const res = await this.contract2.le_euint16_uint16(this.instances2.alice.encrypt16(1542), 1541); - expect(res).to.equal(false); + it('test operator "or" overload (euint64, euint4) => euint64 test 1 (18445233461885169423, 12)', async function () { + const res = await this.contract4.or_euint64_euint4( + this.instances4.alice.encrypt64(18445233461885169423), + this.instances4.alice.encrypt4(12), + ); + expect(res).to.equal(18445233461885169423n); }); - it('test operator "le" overload (euint16, uint16) => ebool test 3 (1542, 1543)', async function () { - const res = await this.contract2.le_euint16_uint16(this.instances2.alice.encrypt16(1542), 1543); - expect(res).to.equal(true); + it('test operator "or" overload (euint64, euint4) => euint64 test 2 (8, 12)', async function () { + const res = await this.contract4.or_euint64_euint4( + this.instances4.alice.encrypt64(8), + this.instances4.alice.encrypt4(12), + ); + expect(res).to.equal(12n); }); - it('test operator "le" overload (uint16, euint16) => ebool test 1 (1542, 1542)', async function () { - const res = await this.contract2.le_uint16_euint16(1542, this.instances2.alice.encrypt16(1542)); - expect(res).to.equal(true); + it('test operator "or" overload (euint64, euint4) => euint64 test 3 (12, 12)', async function () { + const res = await this.contract4.or_euint64_euint4( + this.instances4.alice.encrypt64(12), + this.instances4.alice.encrypt4(12), + ); + expect(res).to.equal(12n); }); - it('test operator "le" overload (uint16, euint16) => ebool test 2 (1542, 1541)', async function () { - const res = await this.contract2.le_uint16_euint16(1542, this.instances2.alice.encrypt16(1541)); - expect(res).to.equal(false); + it('test operator "or" overload (euint64, euint4) => euint64 test 4 (12, 8)', async function () { + const res = await this.contract4.or_euint64_euint4( + this.instances4.alice.encrypt64(12), + this.instances4.alice.encrypt4(8), + ); + expect(res).to.equal(12n); }); - it('test operator "le" overload (uint16, euint16) => ebool test 3 (1542, 1543)', async function () { - const res = await this.contract2.le_uint16_euint16(1542, this.instances2.alice.encrypt16(1543)); - expect(res).to.equal(true); + it('test operator "xor" overload (euint64, euint4) => euint64 test 1 (18444022948851042337, 14)', async function () { + const res = await this.contract4.xor_euint64_euint4( + this.instances4.alice.encrypt64(18444022948851042337), + this.instances4.alice.encrypt4(14), + ); + expect(res).to.equal(18444022948851042351n); }); - it('test operator "lt" overload (euint16, uint16) => ebool test 1 (1542, 1542)', async function () { - const res = await this.contract2.lt_euint16_uint16(this.instances2.alice.encrypt16(1542), 1542); - expect(res).to.equal(false); + it('test operator "xor" overload (euint64, euint4) => euint64 test 2 (10, 14)', async function () { + const res = await this.contract4.xor_euint64_euint4( + this.instances4.alice.encrypt64(10), + this.instances4.alice.encrypt4(14), + ); + expect(res).to.equal(4n); }); - it('test operator "lt" overload (euint16, uint16) => ebool test 2 (1542, 1541)', async function () { - const res = await this.contract2.lt_euint16_uint16(this.instances2.alice.encrypt16(1542), 1541); - expect(res).to.equal(false); + it('test operator "xor" overload (euint64, euint4) => euint64 test 3 (14, 14)', async function () { + const res = await this.contract4.xor_euint64_euint4( + this.instances4.alice.encrypt64(14), + this.instances4.alice.encrypt4(14), + ); + expect(res).to.equal(0n); }); - it('test operator "lt" overload (euint16, uint16) => ebool test 3 (1542, 1543)', async function () { - const res = await this.contract2.lt_euint16_uint16(this.instances2.alice.encrypt16(1542), 1543); - expect(res).to.equal(true); + it('test operator "xor" overload (euint64, euint4) => euint64 test 4 (14, 10)', async function () { + const res = await this.contract4.xor_euint64_euint4( + this.instances4.alice.encrypt64(14), + this.instances4.alice.encrypt4(10), + ); + expect(res).to.equal(4n); }); - it('test operator "lt" overload (uint16, euint16) => ebool test 1 (1542, 1542)', async function () { - const res = await this.contract2.lt_uint16_euint16(1542, this.instances2.alice.encrypt16(1542)); + it('test operator "eq" overload (euint64, euint4) => ebool test 1 (18439121948970600941, 14)', async function () { + const res = await this.contract4.eq_euint64_euint4( + this.instances4.alice.encrypt64(18439121948970600941), + this.instances4.alice.encrypt4(14), + ); expect(res).to.equal(false); }); - it('test operator "lt" overload (uint16, euint16) => ebool test 2 (1542, 1541)', async function () { - const res = await this.contract2.lt_uint16_euint16(1542, this.instances2.alice.encrypt16(1541)); + it('test operator "eq" overload (euint64, euint4) => ebool test 2 (10, 14)', async function () { + const res = await this.contract4.eq_euint64_euint4( + this.instances4.alice.encrypt64(10), + this.instances4.alice.encrypt4(14), + ); expect(res).to.equal(false); }); - it('test operator "lt" overload (uint16, euint16) => ebool test 3 (1542, 1543)', async function () { - const res = await this.contract2.lt_uint16_euint16(1542, this.instances2.alice.encrypt16(1543)); + it('test operator "eq" overload (euint64, euint4) => ebool test 3 (14, 14)', async function () { + const res = await this.contract4.eq_euint64_euint4( + this.instances4.alice.encrypt64(14), + this.instances4.alice.encrypt4(14), + ); expect(res).to.equal(true); }); - it('test operator "min" overload (euint16, uint16) => euint16 test 1 (1542, 1542)', async function () { - const res = await this.contract2.min_euint16_uint16(this.instances2.alice.encrypt16(1542), 1542); - expect(res).to.equal(1542); - }); - - it('test operator "min" overload (euint16, uint16) => euint16 test 2 (1542, 1541)', async function () { - const res = await this.contract2.min_euint16_uint16(this.instances2.alice.encrypt16(1542), 1541); - expect(res).to.equal(1541); + it('test operator "eq" overload (euint64, euint4) => ebool test 4 (14, 10)', async function () { + const res = await this.contract4.eq_euint64_euint4( + this.instances4.alice.encrypt64(14), + this.instances4.alice.encrypt4(10), + ); + expect(res).to.equal(false); }); - it('test operator "min" overload (euint16, uint16) => euint16 test 3 (1542, 1543)', async function () { - const res = await this.contract2.min_euint16_uint16(this.instances2.alice.encrypt16(1542), 1543); - expect(res).to.equal(1542); + it('test operator "ne" overload (euint64, euint4) => ebool test 1 (18442748864669273899, 3)', async function () { + const res = await this.contract4.ne_euint64_euint4( + this.instances4.alice.encrypt64(18442748864669273899), + this.instances4.alice.encrypt4(3), + ); + expect(res).to.equal(true); }); - it('test operator "min" overload (uint16, euint16) => euint16 test 1 (1542, 1542)', async function () { - const res = await this.contract2.min_uint16_euint16(1542, this.instances2.alice.encrypt16(1542)); - expect(res).to.equal(1542); + it('test operator "ne" overload (euint64, euint4) => ebool test 2 (4, 8)', async function () { + const res = await this.contract4.ne_euint64_euint4( + this.instances4.alice.encrypt64(4), + this.instances4.alice.encrypt4(8), + ); + expect(res).to.equal(true); }); - it('test operator "min" overload (uint16, euint16) => euint16 test 2 (1542, 1541)', async function () { - const res = await this.contract2.min_uint16_euint16(1542, this.instances2.alice.encrypt16(1541)); - expect(res).to.equal(1541); + it('test operator "ne" overload (euint64, euint4) => ebool test 3 (8, 8)', async function () { + const res = await this.contract4.ne_euint64_euint4( + this.instances4.alice.encrypt64(8), + this.instances4.alice.encrypt4(8), + ); + expect(res).to.equal(false); }); - it('test operator "min" overload (uint16, euint16) => euint16 test 3 (1542, 1543)', async function () { - const res = await this.contract2.min_uint16_euint16(1542, this.instances2.alice.encrypt16(1543)); - expect(res).to.equal(1542); + it('test operator "ne" overload (euint64, euint4) => ebool test 4 (8, 4)', async function () { + const res = await this.contract4.ne_euint64_euint4( + this.instances4.alice.encrypt64(8), + this.instances4.alice.encrypt4(4), + ); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint16, uint16) => euint16 test 1 (1542, 1542)', async function () { - const res = await this.contract2.max_euint16_uint16(this.instances2.alice.encrypt16(1542), 1542); - expect(res).to.equal(1542); + it('test operator "ge" overload (euint64, euint4) => ebool test 1 (18438518295027982843, 12)', async function () { + const res = await this.contract4.ge_euint64_euint4( + this.instances4.alice.encrypt64(18438518295027982843), + this.instances4.alice.encrypt4(12), + ); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint16, uint16) => euint16 test 2 (1542, 1541)', async function () { - const res = await this.contract2.max_euint16_uint16(this.instances2.alice.encrypt16(1542), 1541); - expect(res).to.equal(1542); + it('test operator "ge" overload (euint64, euint4) => ebool test 2 (8, 12)', async function () { + const res = await this.contract4.ge_euint64_euint4( + this.instances4.alice.encrypt64(8), + this.instances4.alice.encrypt4(12), + ); + expect(res).to.equal(false); }); - it('test operator "max" overload (euint16, uint16) => euint16 test 3 (1542, 1543)', async function () { - const res = await this.contract2.max_euint16_uint16(this.instances2.alice.encrypt16(1542), 1543); - expect(res).to.equal(1543); + it('test operator "ge" overload (euint64, euint4) => ebool test 3 (12, 12)', async function () { + const res = await this.contract4.ge_euint64_euint4( + this.instances4.alice.encrypt64(12), + this.instances4.alice.encrypt4(12), + ); + expect(res).to.equal(true); }); - it('test operator "max" overload (uint16, euint16) => euint16 test 1 (1542, 1542)', async function () { - const res = await this.contract2.max_uint16_euint16(1542, this.instances2.alice.encrypt16(1542)); - expect(res).to.equal(1542); + it('test operator "ge" overload (euint64, euint4) => ebool test 4 (12, 8)', async function () { + const res = await this.contract4.ge_euint64_euint4( + this.instances4.alice.encrypt64(12), + this.instances4.alice.encrypt4(8), + ); + expect(res).to.equal(true); }); - it('test operator "max" overload (uint16, euint16) => euint16 test 2 (1542, 1541)', async function () { - const res = await this.contract2.max_uint16_euint16(1542, this.instances2.alice.encrypt16(1541)); - expect(res).to.equal(1542); + it('test operator "gt" overload (euint64, euint4) => ebool test 1 (18445028672073920305, 11)', async function () { + const res = await this.contract4.gt_euint64_euint4( + this.instances4.alice.encrypt64(18445028672073920305), + this.instances4.alice.encrypt4(11), + ); + expect(res).to.equal(true); }); - it('test operator "max" overload (uint16, euint16) => euint16 test 3 (1542, 1543)', async function () { - const res = await this.contract2.max_uint16_euint16(1542, this.instances2.alice.encrypt16(1543)); - expect(res).to.equal(1543); + it('test operator "gt" overload (euint64, euint4) => ebool test 2 (7, 11)', async function () { + const res = await this.contract4.gt_euint64_euint4( + this.instances4.alice.encrypt64(7), + this.instances4.alice.encrypt4(11), + ); + expect(res).to.equal(false); }); - it('test operator "add" overload (euint32, euint8) => euint32 test 1 (50331648, 3)', async function () { - const res = await this.contract2.add_euint32_euint8( - this.instances2.alice.encrypt32(50331648), - this.instances2.alice.encrypt8(3), + it('test operator "gt" overload (euint64, euint4) => ebool test 3 (11, 11)', async function () { + const res = await this.contract4.gt_euint64_euint4( + this.instances4.alice.encrypt64(11), + this.instances4.alice.encrypt4(11), ); - expect(res).to.equal(50331651); + expect(res).to.equal(false); }); - it('test operator "sub" overload (euint32, euint8) => euint32 test 1 (50331648, 3)', async function () { - const res = await this.contract2.sub_euint32_euint8( - this.instances2.alice.encrypt32(50331648), - this.instances2.alice.encrypt8(3), + it('test operator "gt" overload (euint64, euint4) => ebool test 4 (11, 7)', async function () { + const res = await this.contract4.gt_euint64_euint4( + this.instances4.alice.encrypt64(11), + this.instances4.alice.encrypt4(7), ); - expect(res).to.equal(50331645); + expect(res).to.equal(true); }); - it('test operator "mul" overload (euint32, euint8) => euint32 test 1 (50331648, 3)', async function () { - const res = await this.contract2.mul_euint32_euint8( - this.instances2.alice.encrypt32(50331648), - this.instances2.alice.encrypt8(3), + it('test operator "le" overload (euint64, euint4) => ebool test 1 (18446127513373335953, 14)', async function () { + const res = await this.contract4.le_euint64_euint4( + this.instances4.alice.encrypt64(18446127513373335953), + this.instances4.alice.encrypt4(14), ); - expect(res).to.equal(150994944); + expect(res).to.equal(false); }); - it('test operator "and" overload (euint32, euint8) => euint32 test 1 (50397184, 3)', async function () { - const res = await this.contract2.and_euint32_euint8( - this.instances2.alice.encrypt32(50397184), - this.instances2.alice.encrypt8(3), + it('test operator "le" overload (euint64, euint4) => ebool test 2 (10, 14)', async function () { + const res = await this.contract4.le_euint64_euint4( + this.instances4.alice.encrypt64(10), + this.instances4.alice.encrypt4(14), ); - expect(res).to.equal(0); + expect(res).to.equal(true); }); - it('test operator "and" overload (euint32, euint8) => euint32 test 2 (50397187, 3)', async function () { - const res = await this.contract2.and_euint32_euint8( - this.instances2.alice.encrypt32(50397187), - this.instances2.alice.encrypt8(3), + it('test operator "le" overload (euint64, euint4) => ebool test 3 (14, 14)', async function () { + const res = await this.contract4.le_euint64_euint4( + this.instances4.alice.encrypt64(14), + this.instances4.alice.encrypt4(14), ); - expect(res).to.equal(3); + expect(res).to.equal(true); }); - it('test operator "or" overload (euint32, euint8) => euint32 test 1 (50397184, 3)', async function () { - const res = await this.contract2.or_euint32_euint8( - this.instances2.alice.encrypt32(50397184), - this.instances2.alice.encrypt8(3), + it('test operator "le" overload (euint64, euint4) => ebool test 4 (14, 10)', async function () { + const res = await this.contract4.le_euint64_euint4( + this.instances4.alice.encrypt64(14), + this.instances4.alice.encrypt4(10), ); - expect(res).to.equal(50397187); + expect(res).to.equal(false); }); - it('test operator "or" overload (euint32, euint8) => euint32 test 2 (50397187, 3)', async function () { - const res = await this.contract2.or_euint32_euint8( - this.instances2.alice.encrypt32(50397187), - this.instances2.alice.encrypt8(3), + it('test operator "lt" overload (euint64, euint4) => ebool test 1 (18440890716948813157, 11)', async function () { + const res = await this.contract4.lt_euint64_euint4( + this.instances4.alice.encrypt64(18440890716948813157), + this.instances4.alice.encrypt4(11), ); - expect(res).to.equal(50397187); + expect(res).to.equal(false); }); - it('test operator "xor" overload (euint32, euint8) => euint32 test 1 (50397184, 3)', async function () { - const res = await this.contract2.xor_euint32_euint8( - this.instances2.alice.encrypt32(50397184), - this.instances2.alice.encrypt8(3), + it('test operator "lt" overload (euint64, euint4) => ebool test 2 (7, 11)', async function () { + const res = await this.contract4.lt_euint64_euint4( + this.instances4.alice.encrypt64(7), + this.instances4.alice.encrypt4(11), ); - expect(res).to.equal(50397187); + expect(res).to.equal(true); }); - it('test operator "xor" overload (euint32, euint8) => euint32 test 2 (50397187, 3)', async function () { - const res = await this.contract2.xor_euint32_euint8( - this.instances2.alice.encrypt32(50397187), - this.instances2.alice.encrypt8(3), + it('test operator "lt" overload (euint64, euint4) => ebool test 3 (11, 11)', async function () { + const res = await this.contract4.lt_euint64_euint4( + this.instances4.alice.encrypt64(11), + this.instances4.alice.encrypt4(11), ); - expect(res).to.equal(50397184); + expect(res).to.equal(false); }); - it('test operator "eq" overload (euint32, euint8) => ebool test 1 (3, 3)', async function () { - const res = await this.contract2.eq_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(3), + it('test operator "lt" overload (euint64, euint4) => ebool test 4 (11, 7)', async function () { + const res = await this.contract4.lt_euint64_euint4( + this.instances4.alice.encrypt64(11), + this.instances4.alice.encrypt4(7), ); - expect(res).to.equal(true); + expect(res).to.equal(false); }); - it('test operator "eq" overload (euint32, euint8) => ebool test 2 (50331651, 3)', async function () { - const res = await this.contract2.eq_euint32_euint8( - this.instances2.alice.encrypt32(50331651), - this.instances2.alice.encrypt8(3), + it('test operator "min" overload (euint64, euint4) => euint64 test 1 (18437774930056492317, 14)', async function () { + const res = await this.contract4.min_euint64_euint4( + this.instances4.alice.encrypt64(18437774930056492317), + this.instances4.alice.encrypt4(14), ); - expect(res).to.equal(false); + expect(res).to.equal(14n); }); - it('test operator "ne" overload (euint32, euint8) => ebool test 1 (3, 3)', async function () { - const res = await this.contract2.ne_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(3), + it('test operator "min" overload (euint64, euint4) => euint64 test 2 (10, 14)', async function () { + const res = await this.contract4.min_euint64_euint4( + this.instances4.alice.encrypt64(10), + this.instances4.alice.encrypt4(14), ); - expect(res).to.equal(false); + expect(res).to.equal(10n); }); - it('test operator "ne" overload (euint32, euint8) => ebool test 2 (50331651, 3)', async function () { - const res = await this.contract2.ne_euint32_euint8( - this.instances2.alice.encrypt32(50331651), - this.instances2.alice.encrypt8(3), + it('test operator "min" overload (euint64, euint4) => euint64 test 3 (14, 14)', async function () { + const res = await this.contract4.min_euint64_euint4( + this.instances4.alice.encrypt64(14), + this.instances4.alice.encrypt4(14), ); - expect(res).to.equal(true); + expect(res).to.equal(14n); }); - it('test operator "ge" overload (euint32, euint8) => ebool test 1 (3, 3)', async function () { - const res = await this.contract2.ge_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(3), + it('test operator "min" overload (euint64, euint4) => euint64 test 4 (14, 10)', async function () { + const res = await this.contract4.min_euint64_euint4( + this.instances4.alice.encrypt64(14), + this.instances4.alice.encrypt4(10), ); - expect(res).to.equal(true); + expect(res).to.equal(10n); }); - it('test operator "ge" overload (euint32, euint8) => ebool test 2 (50331651, 3)', async function () { - const res = await this.contract2.ge_euint32_euint8( - this.instances2.alice.encrypt32(50331651), - this.instances2.alice.encrypt8(3), + it('test operator "max" overload (euint64, euint4) => euint64 test 1 (18441711596093702931, 1)', async function () { + const res = await this.contract4.max_euint64_euint4( + this.instances4.alice.encrypt64(18441711596093702931), + this.instances4.alice.encrypt4(1), ); - expect(res).to.equal(true); + expect(res).to.equal(18441711596093702931n); }); - it('test operator "ge" overload (euint32, euint8) => ebool test 3 (3, 4)', async function () { - const res = await this.contract2.ge_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(4), + it('test operator "max" overload (euint64, euint4) => euint64 test 2 (4, 8)', async function () { + const res = await this.contract4.max_euint64_euint4( + this.instances4.alice.encrypt64(4), + this.instances4.alice.encrypt4(8), ); - expect(res).to.equal(false); + expect(res).to.equal(8n); }); - it('test operator "gt" overload (euint32, euint8) => ebool test 1 (3, 3)', async function () { - const res = await this.contract2.gt_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(3), + it('test operator "max" overload (euint64, euint4) => euint64 test 3 (8, 8)', async function () { + const res = await this.contract4.max_euint64_euint4( + this.instances4.alice.encrypt64(8), + this.instances4.alice.encrypt4(8), ); - expect(res).to.equal(false); + expect(res).to.equal(8n); }); - it('test operator "gt" overload (euint32, euint8) => ebool test 2 (50331651, 3)', async function () { - const res = await this.contract2.gt_euint32_euint8( - this.instances2.alice.encrypt32(50331651), - this.instances2.alice.encrypt8(3), + it('test operator "max" overload (euint64, euint4) => euint64 test 4 (8, 4)', async function () { + const res = await this.contract4.max_euint64_euint4( + this.instances4.alice.encrypt64(8), + this.instances4.alice.encrypt4(4), ); - expect(res).to.equal(true); + expect(res).to.equal(8n); }); - it('test operator "gt" overload (euint32, euint8) => ebool test 3 (3, 4)', async function () { - const res = await this.contract2.gt_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(4), + it('test operator "add" overload (euint64, euint8) => euint64 test 1 (129, 2)', async function () { + const res = await this.contract4.add_euint64_euint8( + this.instances4.alice.encrypt64(129), + this.instances4.alice.encrypt8(2), ); - expect(res).to.equal(false); + expect(res).to.equal(131n); }); - it('test operator "le" overload (euint32, euint8) => ebool test 1 (3, 3)', async function () { - const res = await this.contract2.le_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(3), + it('test operator "add" overload (euint64, euint8) => euint64 test 2 (98, 102)', async function () { + const res = await this.contract4.add_euint64_euint8( + this.instances4.alice.encrypt64(98), + this.instances4.alice.encrypt8(102), ); - expect(res).to.equal(true); + expect(res).to.equal(200n); }); - it('test operator "le" overload (euint32, euint8) => ebool test 2 (50331651, 3)', async function () { - const res = await this.contract2.le_euint32_euint8( - this.instances2.alice.encrypt32(50331651), - this.instances2.alice.encrypt8(3), + it('test operator "add" overload (euint64, euint8) => euint64 test 3 (102, 102)', async function () { + const res = await this.contract4.add_euint64_euint8( + this.instances4.alice.encrypt64(102), + this.instances4.alice.encrypt8(102), ); - expect(res).to.equal(false); + expect(res).to.equal(204n); }); - it('test operator "le" overload (euint32, euint8) => ebool test 3 (3, 4)', async function () { - const res = await this.contract2.le_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(4), + it('test operator "add" overload (euint64, euint8) => euint64 test 4 (102, 98)', async function () { + const res = await this.contract4.add_euint64_euint8( + this.instances4.alice.encrypt64(102), + this.instances4.alice.encrypt8(98), ); - expect(res).to.equal(true); + expect(res).to.equal(200n); }); - it('test operator "lt" overload (euint32, euint8) => ebool test 1 (3, 3)', async function () { - const res = await this.contract2.lt_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(3), + it('test operator "sub" overload (euint64, euint8) => euint64 test 1 (101, 101)', async function () { + const res = await this.contract4.sub_euint64_euint8( + this.instances4.alice.encrypt64(101), + this.instances4.alice.encrypt8(101), ); - expect(res).to.equal(false); + expect(res).to.equal(0n); }); - it('test operator "lt" overload (euint32, euint8) => ebool test 2 (50331651, 3)', async function () { - const res = await this.contract2.lt_euint32_euint8( - this.instances2.alice.encrypt32(50331651), - this.instances2.alice.encrypt8(3), + it('test operator "sub" overload (euint64, euint8) => euint64 test 2 (101, 97)', async function () { + const res = await this.contract4.sub_euint64_euint8( + this.instances4.alice.encrypt64(101), + this.instances4.alice.encrypt8(97), ); - expect(res).to.equal(false); + expect(res).to.equal(4n); }); - it('test operator "lt" overload (euint32, euint8) => ebool test 3 (3, 4)', async function () { - const res = await this.contract2.lt_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(4), + it('test operator "mul" overload (euint64, euint8) => euint64 test 1 (65, 2)', async function () { + const res = await this.contract4.mul_euint64_euint8( + this.instances4.alice.encrypt64(65), + this.instances4.alice.encrypt8(2), ); - expect(res).to.equal(true); + expect(res).to.equal(130n); }); - it('test operator "min" overload (euint32, euint8) => euint32 test 1 (3, 3)', async function () { - const res = await this.contract2.min_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(3), + it('test operator "mul" overload (euint64, euint8) => euint64 test 2 (15, 15)', async function () { + const res = await this.contract4.mul_euint64_euint8( + this.instances4.alice.encrypt64(15), + this.instances4.alice.encrypt8(15), ); - expect(res).to.equal(3); + expect(res).to.equal(225n); }); - it('test operator "min" overload (euint32, euint8) => euint32 test 2 (50331651, 3)', async function () { - const res = await this.contract2.min_euint32_euint8( - this.instances2.alice.encrypt32(50331651), - this.instances2.alice.encrypt8(3), + it('test operator "mul" overload (euint64, euint8) => euint64 test 3 (15, 15)', async function () { + const res = await this.contract4.mul_euint64_euint8( + this.instances4.alice.encrypt64(15), + this.instances4.alice.encrypt8(15), ); - expect(res).to.equal(3); + expect(res).to.equal(225n); }); - it('test operator "min" overload (euint32, euint8) => euint32 test 3 (3, 4)', async function () { - const res = await this.contract2.min_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(4), + it('test operator "mul" overload (euint64, euint8) => euint64 test 4 (15, 15)', async function () { + const res = await this.contract4.mul_euint64_euint8( + this.instances4.alice.encrypt64(15), + this.instances4.alice.encrypt8(15), ); - expect(res).to.equal(3); + expect(res).to.equal(225n); }); - it('test operator "max" overload (euint32, euint8) => euint32 test 1 (3, 3)', async function () { - const res = await this.contract2.max_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(3), + it('test operator "and" overload (euint64, euint8) => euint64 test 1 (18438525099029165039, 71)', async function () { + const res = await this.contract4.and_euint64_euint8( + this.instances4.alice.encrypt64(18438525099029165039), + this.instances4.alice.encrypt8(71), ); - expect(res).to.equal(3); + expect(res).to.equal(71n); }); - it('test operator "max" overload (euint32, euint8) => euint32 test 2 (50331651, 3)', async function () { - const res = await this.contract2.max_euint32_euint8( - this.instances2.alice.encrypt32(50331651), - this.instances2.alice.encrypt8(3), + it('test operator "and" overload (euint64, euint8) => euint64 test 2 (67, 71)', async function () { + const res = await this.contract4.and_euint64_euint8( + this.instances4.alice.encrypt64(67), + this.instances4.alice.encrypt8(71), ); - expect(res).to.equal(50331651); + expect(res).to.equal(67n); }); - it('test operator "max" overload (euint32, euint8) => euint32 test 3 (3, 4)', async function () { - const res = await this.contract2.max_euint32_euint8( - this.instances2.alice.encrypt32(3), - this.instances2.alice.encrypt8(4), + it('test operator "and" overload (euint64, euint8) => euint64 test 3 (71, 71)', async function () { + const res = await this.contract4.and_euint64_euint8( + this.instances4.alice.encrypt64(71), + this.instances4.alice.encrypt8(71), ); - expect(res).to.equal(4); + expect(res).to.equal(71n); }); - it('test operator "add" overload (euint32, euint16) => euint32 test 1 (50335779, 4099)', async function () { - const res = await this.contract2.add_euint32_euint16( - this.instances2.alice.encrypt32(50335779), - this.instances2.alice.encrypt16(4099), + it('test operator "and" overload (euint64, euint8) => euint64 test 4 (71, 67)', async function () { + const res = await this.contract4.and_euint64_euint8( + this.instances4.alice.encrypt64(71), + this.instances4.alice.encrypt8(67), ); - expect(res).to.equal(50339878); + expect(res).to.equal(67n); }); - it('test operator "sub" overload (euint32, euint16) => euint32 test 1 (50335779, 4099)', async function () { - const res = await this.contract2.sub_euint32_euint16( - this.instances2.alice.encrypt32(50335779), - this.instances2.alice.encrypt16(4099), + it('test operator "or" overload (euint64, euint8) => euint64 test 1 (18445900286060653541, 17)', async function () { + const res = await this.contract4.or_euint64_euint8( + this.instances4.alice.encrypt64(18445900286060653541), + this.instances4.alice.encrypt8(17), ); - expect(res).to.equal(50331680); + expect(res).to.equal(18445900286060653557n); }); - it('test operator "mul" overload (euint32, euint16) => euint32 test 1 (50335779, 3)', async function () { - const res = await this.contract2.mul_euint32_euint16( - this.instances2.alice.encrypt32(50335779), - this.instances2.alice.encrypt16(3), + it('test operator "or" overload (euint64, euint8) => euint64 test 2 (13, 17)', async function () { + const res = await this.contract4.or_euint64_euint8( + this.instances4.alice.encrypt64(13), + this.instances4.alice.encrypt8(17), ); - expect(res).to.equal(151007337); + expect(res).to.equal(29n); }); - it('test operator "and" overload (euint32, euint16) => euint32 test 1 (50335776, 3)', async function () { - const res = await this.contract2.and_euint32_euint16( - this.instances2.alice.encrypt32(50335776), - this.instances2.alice.encrypt16(3), + it('test operator "or" overload (euint64, euint8) => euint64 test 3 (17, 17)', async function () { + const res = await this.contract4.or_euint64_euint8( + this.instances4.alice.encrypt64(17), + this.instances4.alice.encrypt8(17), ); - expect(res).to.equal(0); + expect(res).to.equal(17n); }); - it('test operator "and" overload (euint32, euint16) => euint32 test 2 (50335779, 4099)', async function () { - const res = await this.contract2.and_euint32_euint16( - this.instances2.alice.encrypt32(50335779), - this.instances2.alice.encrypt16(4099), + it('test operator "or" overload (euint64, euint8) => euint64 test 4 (17, 13)', async function () { + const res = await this.contract4.or_euint64_euint8( + this.instances4.alice.encrypt64(17), + this.instances4.alice.encrypt8(13), ); - expect(res).to.equal(4099); + expect(res).to.equal(29n); }); - it('test operator "or" overload (euint32, euint16) => euint32 test 1 (50331680, 4099)', async function () { - const res = await this.contract2.or_euint32_euint16( - this.instances2.alice.encrypt32(50331680), - this.instances2.alice.encrypt16(4099), + it('test operator "xor" overload (euint64, euint8) => euint64 test 1 (18439418694946486147, 205)', async function () { + const res = await this.contract4.xor_euint64_euint8( + this.instances4.alice.encrypt64(18439418694946486147), + this.instances4.alice.encrypt8(205), ); - expect(res).to.equal(50335779); + expect(res).to.equal(18439418694946486094n); }); - it('test operator "or" overload (euint32, euint16) => euint32 test 2 (50331683, 4099)', async function () { - const res = await this.contract2.or_euint32_euint16( - this.instances2.alice.encrypt32(50331683), - this.instances2.alice.encrypt16(4099), + it('test operator "xor" overload (euint64, euint8) => euint64 test 2 (201, 205)', async function () { + const res = await this.contract4.xor_euint64_euint8( + this.instances4.alice.encrypt64(201), + this.instances4.alice.encrypt8(205), ); - expect(res).to.equal(50335779); + expect(res).to.equal(4n); }); - it('test operator "xor" overload (euint32, euint16) => euint32 test 1 (50331683, 4099)', async function () { - const res = await this.contract2.xor_euint32_euint16( - this.instances2.alice.encrypt32(50331683), - this.instances2.alice.encrypt16(4099), + it('test operator "xor" overload (euint64, euint8) => euint64 test 3 (205, 205)', async function () { + const res = await this.contract4.xor_euint64_euint8( + this.instances4.alice.encrypt64(205), + this.instances4.alice.encrypt8(205), ); - expect(res).to.equal(50335776); + expect(res).to.equal(0n); }); - it('test operator "eq" overload (euint32, euint16) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract2.eq_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4096), + it('test operator "xor" overload (euint64, euint8) => euint64 test 4 (205, 201)', async function () { + const res = await this.contract4.xor_euint64_euint8( + this.instances4.alice.encrypt64(205), + this.instances4.alice.encrypt8(201), ); - expect(res).to.equal(true); + expect(res).to.equal(4n); }); - it('test operator "eq" overload (euint32, euint16) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract2.eq_euint32_euint16( - this.instances2.alice.encrypt32(16781312), - this.instances2.alice.encrypt16(4096), + it('test operator "eq" overload (euint64, euint8) => ebool test 1 (18441725985045807501, 52)', async function () { + const res = await this.contract4.eq_euint64_euint8( + this.instances4.alice.encrypt64(18441725985045807501), + this.instances4.alice.encrypt8(52), ); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint32, euint16) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract2.ne_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4096), + it('test operator "eq" overload (euint64, euint8) => ebool test 2 (48, 52)', async function () { + const res = await this.contract4.eq_euint64_euint8( + this.instances4.alice.encrypt64(48), + this.instances4.alice.encrypt8(52), ); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint32, euint16) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract2.ne_euint32_euint16( - this.instances2.alice.encrypt32(16781312), - this.instances2.alice.encrypt16(4096), + it('test operator "eq" overload (euint64, euint8) => ebool test 3 (52, 52)', async function () { + const res = await this.contract4.eq_euint64_euint8( + this.instances4.alice.encrypt64(52), + this.instances4.alice.encrypt8(52), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint32, euint16) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract2.ge_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4096), + it('test operator "eq" overload (euint64, euint8) => ebool test 4 (52, 48)', async function () { + const res = await this.contract4.eq_euint64_euint8( + this.instances4.alice.encrypt64(52), + this.instances4.alice.encrypt8(48), + ); + expect(res).to.equal(false); + }); + + it('test operator "ne" overload (euint64, euint8) => ebool test 1 (18437879735793971605, 183)', async function () { + const res = await this.contract4.ne_euint64_euint8( + this.instances4.alice.encrypt64(18437879735793971605), + this.instances4.alice.encrypt8(183), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint32, euint16) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract2.ge_euint32_euint16( - this.instances2.alice.encrypt32(16781312), - this.instances2.alice.encrypt16(4096), + it('test operator "ne" overload (euint64, euint8) => ebool test 2 (179, 183)', async function () { + const res = await this.contract4.ne_euint64_euint8( + this.instances4.alice.encrypt64(179), + this.instances4.alice.encrypt8(183), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint32, euint16) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract2.ge_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4097), + it('test operator "ne" overload (euint64, euint8) => ebool test 3 (183, 183)', async function () { + const res = await this.contract4.ne_euint64_euint8( + this.instances4.alice.encrypt64(183), + this.instances4.alice.encrypt8(183), ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint32, euint16) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract2.gt_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4096), + it('test operator "ne" overload (euint64, euint8) => ebool test 4 (183, 179)', async function () { + const res = await this.contract4.ne_euint64_euint8( + this.instances4.alice.encrypt64(183), + this.instances4.alice.encrypt8(179), ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "gt" overload (euint32, euint16) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract2.gt_euint32_euint16( - this.instances2.alice.encrypt32(16781312), - this.instances2.alice.encrypt16(4096), + it('test operator "ge" overload (euint64, euint8) => ebool test 1 (18439034739003983767, 245)', async function () { + const res = await this.contract4.ge_euint64_euint8( + this.instances4.alice.encrypt64(18439034739003983767), + this.instances4.alice.encrypt8(245), ); expect(res).to.equal(true); }); - it('test operator "gt" overload (euint32, euint16) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract2.gt_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4097), + it('test operator "ge" overload (euint64, euint8) => ebool test 2 (241, 245)', async function () { + const res = await this.contract4.ge_euint64_euint8( + this.instances4.alice.encrypt64(241), + this.instances4.alice.encrypt8(245), ); expect(res).to.equal(false); }); - it('test operator "le" overload (euint32, euint16) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract2.le_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4096), + it('test operator "ge" overload (euint64, euint8) => ebool test 3 (245, 245)', async function () { + const res = await this.contract4.ge_euint64_euint8( + this.instances4.alice.encrypt64(245), + this.instances4.alice.encrypt8(245), ); expect(res).to.equal(true); }); - it('test operator "le" overload (euint32, euint16) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract2.le_euint32_euint16( - this.instances2.alice.encrypt32(16781312), - this.instances2.alice.encrypt16(4096), + it('test operator "ge" overload (euint64, euint8) => ebool test 4 (245, 241)', async function () { + const res = await this.contract4.ge_euint64_euint8( + this.instances4.alice.encrypt64(245), + this.instances4.alice.encrypt8(241), ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "le" overload (euint32, euint16) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract2.le_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4097), + it('test operator "gt" overload (euint64, euint8) => ebool test 1 (18444472755157488819, 101)', async function () { + const res = await this.contract4.gt_euint64_euint8( + this.instances4.alice.encrypt64(18444472755157488819), + this.instances4.alice.encrypt8(101), ); expect(res).to.equal(true); }); - it('test operator "lt" overload (euint32, euint16) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract2.lt_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4096), + it('test operator "gt" overload (euint64, euint8) => ebool test 2 (97, 101)', async function () { + const res = await this.contract4.gt_euint64_euint8( + this.instances4.alice.encrypt64(97), + this.instances4.alice.encrypt8(101), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint32, euint16) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract2.lt_euint32_euint16( - this.instances2.alice.encrypt32(16781312), - this.instances2.alice.encrypt16(4096), + it('test operator "gt" overload (euint64, euint8) => ebool test 3 (101, 101)', async function () { + const res = await this.contract4.gt_euint64_euint8( + this.instances4.alice.encrypt64(101), + this.instances4.alice.encrypt8(101), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint32, euint16) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract2.lt_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4097), + it('test operator "gt" overload (euint64, euint8) => ebool test 4 (101, 97)', async function () { + const res = await this.contract4.gt_euint64_euint8( + this.instances4.alice.encrypt64(101), + this.instances4.alice.encrypt8(97), ); expect(res).to.equal(true); }); - it('test operator "min" overload (euint32, euint16) => euint32 test 1 (4096, 4096)', async function () { - const res = await this.contract2.min_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4096), + it('test operator "le" overload (euint64, euint8) => ebool test 1 (18446424442125229129, 19)', async function () { + const res = await this.contract5.le_euint64_euint8( + this.instances5.alice.encrypt64(18446424442125229129), + this.instances5.alice.encrypt8(19), ); - expect(res).to.equal(4096); + expect(res).to.equal(false); }); - it('test operator "min" overload (euint32, euint16) => euint32 test 2 (16781312, 4096)', async function () { - const res = await this.contract2.min_euint32_euint16( - this.instances2.alice.encrypt32(16781312), - this.instances2.alice.encrypt16(4096), + it('test operator "le" overload (euint64, euint8) => ebool test 2 (15, 19)', async function () { + const res = await this.contract5.le_euint64_euint8( + this.instances5.alice.encrypt64(15), + this.instances5.alice.encrypt8(19), ); - expect(res).to.equal(4096); + expect(res).to.equal(true); }); - it('test operator "min" overload (euint32, euint16) => euint32 test 3 (4096, 4097)', async function () { - const res = await this.contract2.min_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4097), + it('test operator "le" overload (euint64, euint8) => ebool test 3 (19, 19)', async function () { + const res = await this.contract5.le_euint64_euint8( + this.instances5.alice.encrypt64(19), + this.instances5.alice.encrypt8(19), ); - expect(res).to.equal(4096); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint32, euint16) => euint32 test 1 (4096, 4096)', async function () { - const res = await this.contract2.max_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4096), + it('test operator "le" overload (euint64, euint8) => ebool test 4 (19, 15)', async function () { + const res = await this.contract5.le_euint64_euint8( + this.instances5.alice.encrypt64(19), + this.instances5.alice.encrypt8(15), ); - expect(res).to.equal(4096); + expect(res).to.equal(false); }); - it('test operator "max" overload (euint32, euint16) => euint32 test 2 (16781312, 4096)', async function () { - const res = await this.contract2.max_euint32_euint16( - this.instances2.alice.encrypt32(16781312), - this.instances2.alice.encrypt16(4096), + it('test operator "lt" overload (euint64, euint8) => ebool test 1 (18445717540030063977, 27)', async function () { + const res = await this.contract5.lt_euint64_euint8( + this.instances5.alice.encrypt64(18445717540030063977), + this.instances5.alice.encrypt8(27), ); - expect(res).to.equal(16781312); + expect(res).to.equal(false); }); - it('test operator "max" overload (euint32, euint16) => euint32 test 3 (4096, 4097)', async function () { - const res = await this.contract2.max_euint32_euint16( - this.instances2.alice.encrypt32(4096), - this.instances2.alice.encrypt16(4097), + it('test operator "lt" overload (euint64, euint8) => ebool test 2 (23, 27)', async function () { + const res = await this.contract5.lt_euint64_euint8( + this.instances5.alice.encrypt64(23), + this.instances5.alice.encrypt8(27), ); - expect(res).to.equal(4097); + expect(res).to.equal(true); }); - it('test operator "add" overload (euint32, euint32) => euint32 test 1 (3280896, 1118208)', async function () { - const res = await this.contract2.add_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(1118208), + it('test operator "lt" overload (euint64, euint8) => ebool test 3 (27, 27)', async function () { + const res = await this.contract5.lt_euint64_euint8( + this.instances5.alice.encrypt64(27), + this.instances5.alice.encrypt8(27), ); - expect(res).to.equal(4399104); + expect(res).to.equal(false); }); - it('test operator "sub" overload (euint32, euint32) => euint32 test 1 (3280896, 1118208)', async function () { - const res = await this.contract2.sub_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(1118208), + it('test operator "lt" overload (euint64, euint8) => ebool test 4 (27, 23)', async function () { + const res = await this.contract5.lt_euint64_euint8( + this.instances5.alice.encrypt64(27), + this.instances5.alice.encrypt8(23), ); - expect(res).to.equal(2162688); + expect(res).to.equal(false); }); - it('test operator "mul" overload (euint32, euint32) => euint32 test 1 (3280896, 32)', async function () { - const res = await this.contract2.mul_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(32), + it('test operator "min" overload (euint64, euint8) => euint64 test 1 (18441639004244956281, 36)', async function () { + const res = await this.contract5.min_euint64_euint8( + this.instances5.alice.encrypt64(18441639004244956281), + this.instances5.alice.encrypt8(36), ); - expect(res).to.equal(104988672); + expect(res).to.equal(36n); }); - it('test operator "and" overload (euint32, euint32) => euint32 test 1 (3280896, 1409286144)', async function () { - const res = await this.contract2.and_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(1409286144), + it('test operator "min" overload (euint64, euint8) => euint64 test 2 (32, 36)', async function () { + const res = await this.contract5.min_euint64_euint8( + this.instances5.alice.encrypt64(32), + this.instances5.alice.encrypt8(36), ); - expect(res).to.equal(0); + expect(res).to.equal(32n); }); - it('test operator "and" overload (euint32, euint32) => euint32 test 2 (3280896, 1409482752)', async function () { - const res = await this.contract2.and_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(1409482752), + it('test operator "min" overload (euint64, euint8) => euint64 test 3 (36, 36)', async function () { + const res = await this.contract5.min_euint64_euint8( + this.instances5.alice.encrypt64(36), + this.instances5.alice.encrypt8(36), ); - expect(res).to.equal(131072); + expect(res).to.equal(36n); }); - it('test operator "or" overload (euint32, euint32) => euint32 test 1 (3280896, 1409286144)', async function () { - const res = await this.contract2.or_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(1409286144), + it('test operator "min" overload (euint64, euint8) => euint64 test 4 (36, 32)', async function () { + const res = await this.contract5.min_euint64_euint8( + this.instances5.alice.encrypt64(36), + this.instances5.alice.encrypt8(32), ); - expect(res).to.equal(1412567040); + expect(res).to.equal(32n); }); - it('test operator "or" overload (euint32, euint32) => euint32 test 2 (3280896, 1409482752)', async function () { - const res = await this.contract2.or_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(1409482752), + it('test operator "max" overload (euint64, euint8) => euint64 test 1 (18442614857754346699, 3)', async function () { + const res = await this.contract5.max_euint64_euint8( + this.instances5.alice.encrypt64(18442614857754346699), + this.instances5.alice.encrypt8(3), ); - expect(res).to.equal(1412632576); + expect(res).to.equal(18442614857754346699n); }); - it('test operator "xor" overload (euint32, euint32) => euint32 test 1 (3280896, 1409286144)', async function () { - const res = await this.contract2.xor_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(1409286144), + it('test operator "max" overload (euint64, euint8) => euint64 test 2 (4, 8)', async function () { + const res = await this.contract5.max_euint64_euint8( + this.instances5.alice.encrypt64(4), + this.instances5.alice.encrypt8(8), ); - expect(res).to.equal(1412567040); + expect(res).to.equal(8n); }); - it('test operator "xor" overload (euint32, euint32) => euint32 test 2 (3280896, 1409482752)', async function () { - const res = await this.contract2.xor_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(1409482752), + it('test operator "max" overload (euint64, euint8) => euint64 test 3 (8, 8)', async function () { + const res = await this.contract5.max_euint64_euint8( + this.instances5.alice.encrypt64(8), + this.instances5.alice.encrypt8(8), ); - expect(res).to.equal(1412501504); + expect(res).to.equal(8n); }); - it('test operator "eq" overload (euint32, euint32) => ebool test 1 (3280896, 3280896)', async function () { - const res = await this.contract2.eq_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280896), + it('test operator "max" overload (euint64, euint8) => euint64 test 4 (8, 4)', async function () { + const res = await this.contract5.max_euint64_euint8( + this.instances5.alice.encrypt64(8), + this.instances5.alice.encrypt8(4), ); - expect(res).to.equal(true); + expect(res).to.equal(8n); }); - it('test operator "eq" overload (euint32, euint32) => ebool test 2 (3280896, 3280897)', async function () { - const res = await this.contract2.eq_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280897), + it('test operator "add" overload (euint64, euint16) => euint64 test 1 (65532, 2)', async function () { + const res = await this.contract5.add_euint64_euint16( + this.instances5.alice.encrypt64(65532), + this.instances5.alice.encrypt16(2), ); - expect(res).to.equal(false); + expect(res).to.equal(65534n); }); - it('test operator "ne" overload (euint32, euint32) => ebool test 1 (3280896, 3280896)', async function () { - const res = await this.contract2.ne_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280896), + it('test operator "add" overload (euint64, euint16) => euint64 test 2 (23282, 23284)', async function () { + const res = await this.contract5.add_euint64_euint16( + this.instances5.alice.encrypt64(23282), + this.instances5.alice.encrypt16(23284), ); - expect(res).to.equal(false); + expect(res).to.equal(46566n); }); - it('test operator "ne" overload (euint32, euint32) => ebool test 2 (3280896, 3280897)', async function () { - const res = await this.contract2.ne_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280897), + it('test operator "add" overload (euint64, euint16) => euint64 test 3 (23284, 23284)', async function () { + const res = await this.contract5.add_euint64_euint16( + this.instances5.alice.encrypt64(23284), + this.instances5.alice.encrypt16(23284), ); - expect(res).to.equal(true); + expect(res).to.equal(46568n); }); - it('test operator "ge" overload (euint32, euint32) => ebool test 1 (3280896, 3280896)', async function () { - const res = await this.contract2.ge_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280896), + it('test operator "add" overload (euint64, euint16) => euint64 test 4 (23284, 23282)', async function () { + const res = await this.contract5.add_euint64_euint16( + this.instances5.alice.encrypt64(23284), + this.instances5.alice.encrypt16(23282), ); - expect(res).to.equal(true); + expect(res).to.equal(46566n); }); - it('test operator "ge" overload (euint32, euint32) => ebool test 2 (3280896, 3280897)', async function () { - const res = await this.contract2.ge_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280897), + it('test operator "sub" overload (euint64, euint16) => euint64 test 1 (25338, 25338)', async function () { + const res = await this.contract5.sub_euint64_euint16( + this.instances5.alice.encrypt64(25338), + this.instances5.alice.encrypt16(25338), ); - expect(res).to.equal(false); + expect(res).to.equal(0n); }); - it('test operator "ge" overload (euint32, euint32) => ebool test 3 (3280896, 3280895)', async function () { - const res = await this.contract2.ge_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280895), + it('test operator "sub" overload (euint64, euint16) => euint64 test 2 (25338, 25334)', async function () { + const res = await this.contract5.sub_euint64_euint16( + this.instances5.alice.encrypt64(25338), + this.instances5.alice.encrypt16(25334), ); - expect(res).to.equal(true); + expect(res).to.equal(4n); }); - it('test operator "gt" overload (euint32, euint32) => ebool test 1 (3280896, 3280896)', async function () { - const res = await this.contract2.gt_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280896), + it('test operator "mul" overload (euint64, euint16) => euint64 test 1 (32765, 2)', async function () { + const res = await this.contract5.mul_euint64_euint16( + this.instances5.alice.encrypt64(32765), + this.instances5.alice.encrypt16(2), ); - expect(res).to.equal(false); + expect(res).to.equal(65530n); }); - it('test operator "gt" overload (euint32, euint32) => ebool test 2 (3280896, 3280897)', async function () { - const res = await this.contract2.gt_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280897), + it('test operator "mul" overload (euint64, euint16) => euint64 test 2 (163, 163)', async function () { + const res = await this.contract5.mul_euint64_euint16( + this.instances5.alice.encrypt64(163), + this.instances5.alice.encrypt16(163), ); - expect(res).to.equal(false); + expect(res).to.equal(26569n); }); - it('test operator "gt" overload (euint32, euint32) => ebool test 3 (3280896, 3280895)', async function () { - const res = await this.contract2.gt_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280895), + it('test operator "mul" overload (euint64, euint16) => euint64 test 3 (163, 163)', async function () { + const res = await this.contract5.mul_euint64_euint16( + this.instances5.alice.encrypt64(163), + this.instances5.alice.encrypt16(163), ); - expect(res).to.equal(true); + expect(res).to.equal(26569n); }); - it('test operator "le" overload (euint32, euint32) => ebool test 1 (3280896, 3280896)', async function () { - const res = await this.contract2.le_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280896), + it('test operator "mul" overload (euint64, euint16) => euint64 test 4 (163, 163)', async function () { + const res = await this.contract5.mul_euint64_euint16( + this.instances5.alice.encrypt64(163), + this.instances5.alice.encrypt16(163), ); - expect(res).to.equal(true); + expect(res).to.equal(26569n); }); - it('test operator "le" overload (euint32, euint32) => ebool test 2 (3280896, 3280897)', async function () { - const res = await this.contract2.le_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280897), + it('test operator "and" overload (euint64, euint16) => euint64 test 1 (18444131025157690381, 45908)', async function () { + const res = await this.contract5.and_euint64_euint16( + this.instances5.alice.encrypt64(18444131025157690381), + this.instances5.alice.encrypt16(45908), ); - expect(res).to.equal(true); + expect(res).to.equal(4100n); }); - it('test operator "le" overload (euint32, euint32) => ebool test 3 (3280896, 3280895)', async function () { - const res = await this.contract2.le_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280895), + it('test operator "and" overload (euint64, euint16) => euint64 test 2 (45904, 45908)', async function () { + const res = await this.contract5.and_euint64_euint16( + this.instances5.alice.encrypt64(45904), + this.instances5.alice.encrypt16(45908), ); - expect(res).to.equal(false); + expect(res).to.equal(45904n); }); - it('test operator "lt" overload (euint32, euint32) => ebool test 1 (3280896, 3280896)', async function () { - const res = await this.contract2.lt_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280896), + it('test operator "and" overload (euint64, euint16) => euint64 test 3 (45908, 45908)', async function () { + const res = await this.contract5.and_euint64_euint16( + this.instances5.alice.encrypt64(45908), + this.instances5.alice.encrypt16(45908), ); - expect(res).to.equal(false); + expect(res).to.equal(45908n); }); - it('test operator "lt" overload (euint32, euint32) => ebool test 2 (3280896, 3280897)', async function () { - const res = await this.contract2.lt_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280897), + it('test operator "and" overload (euint64, euint16) => euint64 test 4 (45908, 45904)', async function () { + const res = await this.contract5.and_euint64_euint16( + this.instances5.alice.encrypt64(45908), + this.instances5.alice.encrypt16(45904), ); - expect(res).to.equal(true); + expect(res).to.equal(45904n); }); - it('test operator "lt" overload (euint32, euint32) => ebool test 3 (3280896, 3280895)', async function () { - const res = await this.contract2.lt_euint32_euint32( - this.instances2.alice.encrypt32(3280896), - this.instances2.alice.encrypt32(3280895), + it('test operator "or" overload (euint64, euint16) => euint64 test 1 (18445329388989380329, 5327)', async function () { + const res = await this.contract5.or_euint64_euint16( + this.instances5.alice.encrypt64(18445329388989380329), + this.instances5.alice.encrypt16(5327), ); - expect(res).to.equal(false); + expect(res).to.equal(18445329388989380335n); }); - it('test operator "min" overload (euint32, euint32) => euint32 test 1 (3280896, 3280896)', async function () { - const res = await this.contract3.min_euint32_euint32( - this.instances3.alice.encrypt32(3280896), - this.instances3.alice.encrypt32(3280896), + it('test operator "or" overload (euint64, euint16) => euint64 test 2 (5323, 5327)', async function () { + const res = await this.contract5.or_euint64_euint16( + this.instances5.alice.encrypt64(5323), + this.instances5.alice.encrypt16(5327), ); - expect(res).to.equal(3280896); + expect(res).to.equal(5327n); }); - it('test operator "min" overload (euint32, euint32) => euint32 test 2 (3280896, 3280897)', async function () { - const res = await this.contract3.min_euint32_euint32( - this.instances3.alice.encrypt32(3280896), - this.instances3.alice.encrypt32(3280897), + it('test operator "or" overload (euint64, euint16) => euint64 test 3 (5327, 5327)', async function () { + const res = await this.contract5.or_euint64_euint16( + this.instances5.alice.encrypt64(5327), + this.instances5.alice.encrypt16(5327), ); - expect(res).to.equal(3280896); + expect(res).to.equal(5327n); }); - it('test operator "min" overload (euint32, euint32) => euint32 test 3 (3280896, 3280895)', async function () { - const res = await this.contract3.min_euint32_euint32( - this.instances3.alice.encrypt32(3280896), - this.instances3.alice.encrypt32(3280895), + it('test operator "or" overload (euint64, euint16) => euint64 test 4 (5327, 5323)', async function () { + const res = await this.contract5.or_euint64_euint16( + this.instances5.alice.encrypt64(5327), + this.instances5.alice.encrypt16(5323), ); - expect(res).to.equal(3280895); + expect(res).to.equal(5327n); }); - it('test operator "max" overload (euint32, euint32) => euint32 test 1 (3280896, 3280896)', async function () { - const res = await this.contract3.max_euint32_euint32( - this.instances3.alice.encrypt32(3280896), - this.instances3.alice.encrypt32(3280896), + it('test operator "xor" overload (euint64, euint16) => euint64 test 1 (18443398919380985157, 45655)', async function () { + const res = await this.contract5.xor_euint64_euint16( + this.instances5.alice.encrypt64(18443398919380985157), + this.instances5.alice.encrypt16(45655), ); - expect(res).to.equal(3280896); + expect(res).to.equal(18443398919380948754n); }); - it('test operator "max" overload (euint32, euint32) => euint32 test 2 (3280896, 3280897)', async function () { - const res = await this.contract3.max_euint32_euint32( - this.instances3.alice.encrypt32(3280896), - this.instances3.alice.encrypt32(3280897), + it('test operator "xor" overload (euint64, euint16) => euint64 test 2 (45651, 45655)', async function () { + const res = await this.contract5.xor_euint64_euint16( + this.instances5.alice.encrypt64(45651), + this.instances5.alice.encrypt16(45655), ); - expect(res).to.equal(3280897); + expect(res).to.equal(4n); }); - it('test operator "max" overload (euint32, euint32) => euint32 test 3 (3280896, 3280895)', async function () { - const res = await this.contract3.max_euint32_euint32( - this.instances3.alice.encrypt32(3280896), - this.instances3.alice.encrypt32(3280895), + it('test operator "xor" overload (euint64, euint16) => euint64 test 3 (45655, 45655)', async function () { + const res = await this.contract5.xor_euint64_euint16( + this.instances5.alice.encrypt64(45655), + this.instances5.alice.encrypt16(45655), ); - expect(res).to.equal(3280896); + expect(res).to.equal(0n); }); - it('test operator "add" overload (euint32, euint64) => euint64 test 1 (50335779, 4099)', async function () { - const res = await this.contract3.add_euint32_euint64( - this.instances3.alice.encrypt32(50335779), - this.instances3.alice.encrypt64(4099), + it('test operator "xor" overload (euint64, euint16) => euint64 test 4 (45655, 45651)', async function () { + const res = await this.contract5.xor_euint64_euint16( + this.instances5.alice.encrypt64(45655), + this.instances5.alice.encrypt16(45651), ); - expect(res).to.equal(50339878); + expect(res).to.equal(4n); }); - it('test operator "sub" overload (euint32, euint64) => euint64 test 1 (50335779, 4099)', async function () { - const res = await this.contract3.sub_euint32_euint64( - this.instances3.alice.encrypt32(50335779), - this.instances3.alice.encrypt64(4099), + it('test operator "eq" overload (euint64, euint16) => ebool test 1 (18444068251063204057, 45460)', async function () { + const res = await this.contract5.eq_euint64_euint16( + this.instances5.alice.encrypt64(18444068251063204057), + this.instances5.alice.encrypt16(45460), ); - expect(res).to.equal(50331680); + expect(res).to.equal(false); }); - it('test operator "mul" overload (euint32, euint64) => euint64 test 1 (50335779, 3)', async function () { - const res = await this.contract3.mul_euint32_euint64( - this.instances3.alice.encrypt32(50335779), - this.instances3.alice.encrypt64(3), + it('test operator "eq" overload (euint64, euint16) => ebool test 2 (45456, 45460)', async function () { + const res = await this.contract5.eq_euint64_euint16( + this.instances5.alice.encrypt64(45456), + this.instances5.alice.encrypt16(45460), ); - expect(res).to.equal(151007337); + expect(res).to.equal(false); }); - it('test operator "and" overload (euint32, euint64) => euint64 test 1 (50335776, 3)', async function () { - const res = await this.contract3.and_euint32_euint64( - this.instances3.alice.encrypt32(50335776), - this.instances3.alice.encrypt64(3), + it('test operator "eq" overload (euint64, euint16) => ebool test 3 (45460, 45460)', async function () { + const res = await this.contract5.eq_euint64_euint16( + this.instances5.alice.encrypt64(45460), + this.instances5.alice.encrypt16(45460), ); - expect(res).to.equal(0); + expect(res).to.equal(true); }); - it('test operator "and" overload (euint32, euint64) => euint64 test 2 (50335779, 4099)', async function () { - const res = await this.contract3.and_euint32_euint64( - this.instances3.alice.encrypt32(50335779), - this.instances3.alice.encrypt64(4099), + it('test operator "eq" overload (euint64, euint16) => ebool test 4 (45460, 45456)', async function () { + const res = await this.contract5.eq_euint64_euint16( + this.instances5.alice.encrypt64(45460), + this.instances5.alice.encrypt16(45456), ); - expect(res).to.equal(4099); + expect(res).to.equal(false); }); - it('test operator "or" overload (euint32, euint64) => euint64 test 1 (50331680, 4099)', async function () { - const res = await this.contract3.or_euint32_euint64( - this.instances3.alice.encrypt32(50331680), - this.instances3.alice.encrypt64(4099), + it('test operator "ne" overload (euint64, euint16) => ebool test 1 (18439766867707518465, 19155)', async function () { + const res = await this.contract5.ne_euint64_euint16( + this.instances5.alice.encrypt64(18439766867707518465), + this.instances5.alice.encrypt16(19155), ); - expect(res).to.equal(50335779); + expect(res).to.equal(true); }); - it('test operator "or" overload (euint32, euint64) => euint64 test 2 (50331683, 4099)', async function () { - const res = await this.contract3.or_euint32_euint64( - this.instances3.alice.encrypt32(50331683), - this.instances3.alice.encrypt64(4099), + it('test operator "ne" overload (euint64, euint16) => ebool test 2 (19151, 19155)', async function () { + const res = await this.contract5.ne_euint64_euint16( + this.instances5.alice.encrypt64(19151), + this.instances5.alice.encrypt16(19155), ); - expect(res).to.equal(50335779); + expect(res).to.equal(true); }); - it('test operator "xor" overload (euint32, euint64) => euint64 test 1 (50331683, 4099)', async function () { - const res = await this.contract3.xor_euint32_euint64( - this.instances3.alice.encrypt32(50331683), - this.instances3.alice.encrypt64(4099), + it('test operator "ne" overload (euint64, euint16) => ebool test 3 (19155, 19155)', async function () { + const res = await this.contract5.ne_euint64_euint16( + this.instances5.alice.encrypt64(19155), + this.instances5.alice.encrypt16(19155), ); - expect(res).to.equal(50335776); + expect(res).to.equal(false); }); - it('test operator "eq" overload (euint32, euint64) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.eq_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4096), + it('test operator "ne" overload (euint64, euint16) => ebool test 4 (19155, 19151)', async function () { + const res = await this.contract5.ne_euint64_euint16( + this.instances5.alice.encrypt64(19155), + this.instances5.alice.encrypt16(19151), ); expect(res).to.equal(true); }); - it('test operator "eq" overload (euint32, euint64) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.eq_euint32_euint64( - this.instances3.alice.encrypt32(16781312), - this.instances3.alice.encrypt64(4096), + it('test operator "ge" overload (euint64, euint16) => ebool test 1 (18440840766291159069, 55918)', async function () { + const res = await this.contract5.ge_euint64_euint16( + this.instances5.alice.encrypt64(18440840766291159069), + this.instances5.alice.encrypt16(55918), ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "ne" overload (euint32, euint64) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.ne_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4096), + it('test operator "ge" overload (euint64, euint16) => ebool test 2 (55914, 55918)', async function () { + const res = await this.contract5.ge_euint64_euint16( + this.instances5.alice.encrypt64(55914), + this.instances5.alice.encrypt16(55918), ); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint32, euint64) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.ne_euint32_euint64( - this.instances3.alice.encrypt32(16781312), - this.instances3.alice.encrypt64(4096), + it('test operator "ge" overload (euint64, euint16) => ebool test 3 (55918, 55918)', async function () { + const res = await this.contract5.ge_euint64_euint16( + this.instances5.alice.encrypt64(55918), + this.instances5.alice.encrypt16(55918), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint32, euint64) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.ge_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4096), + it('test operator "ge" overload (euint64, euint16) => ebool test 4 (55918, 55914)', async function () { + const res = await this.contract5.ge_euint64_euint16( + this.instances5.alice.encrypt64(55918), + this.instances5.alice.encrypt16(55914), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint32, euint64) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.ge_euint32_euint64( - this.instances3.alice.encrypt32(16781312), - this.instances3.alice.encrypt64(4096), + it('test operator "gt" overload (euint64, euint16) => ebool test 1 (18446239272421398075, 52612)', async function () { + const res = await this.contract5.gt_euint64_euint16( + this.instances5.alice.encrypt64(18446239272421398075), + this.instances5.alice.encrypt16(52612), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint32, euint64) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract3.ge_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4097), + it('test operator "gt" overload (euint64, euint16) => ebool test 2 (52608, 52612)', async function () { + const res = await this.contract5.gt_euint64_euint16( + this.instances5.alice.encrypt64(52608), + this.instances5.alice.encrypt16(52612), ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint32, euint64) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.gt_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4096), + it('test operator "gt" overload (euint64, euint16) => ebool test 3 (52612, 52612)', async function () { + const res = await this.contract5.gt_euint64_euint16( + this.instances5.alice.encrypt64(52612), + this.instances5.alice.encrypt16(52612), ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint32, euint64) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.gt_euint32_euint64( - this.instances3.alice.encrypt32(16781312), - this.instances3.alice.encrypt64(4096), + it('test operator "gt" overload (euint64, euint16) => ebool test 4 (52612, 52608)', async function () { + const res = await this.contract5.gt_euint64_euint16( + this.instances5.alice.encrypt64(52612), + this.instances5.alice.encrypt16(52608), ); expect(res).to.equal(true); }); - it('test operator "gt" overload (euint32, euint64) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract3.gt_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4097), + it('test operator "le" overload (euint64, euint16) => ebool test 1 (18442809234541757919, 39205)', async function () { + const res = await this.contract5.le_euint64_euint16( + this.instances5.alice.encrypt64(18442809234541757919), + this.instances5.alice.encrypt16(39205), ); expect(res).to.equal(false); }); - it('test operator "le" overload (euint32, euint64) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.le_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4096), + it('test operator "le" overload (euint64, euint16) => ebool test 2 (39201, 39205)', async function () { + const res = await this.contract5.le_euint64_euint16( + this.instances5.alice.encrypt64(39201), + this.instances5.alice.encrypt16(39205), ); expect(res).to.equal(true); }); - it('test operator "le" overload (euint32, euint64) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.le_euint32_euint64( - this.instances3.alice.encrypt32(16781312), - this.instances3.alice.encrypt64(4096), - ); - expect(res).to.equal(false); - }); - - it('test operator "le" overload (euint32, euint64) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract3.le_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4097), + it('test operator "le" overload (euint64, euint16) => ebool test 3 (39205, 39205)', async function () { + const res = await this.contract5.le_euint64_euint16( + this.instances5.alice.encrypt64(39205), + this.instances5.alice.encrypt16(39205), ); expect(res).to.equal(true); }); - it('test operator "lt" overload (euint32, euint64) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.lt_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4096), + it('test operator "le" overload (euint64, euint16) => ebool test 4 (39205, 39201)', async function () { + const res = await this.contract5.le_euint64_euint16( + this.instances5.alice.encrypt64(39205), + this.instances5.alice.encrypt16(39201), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint32, euint64) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.lt_euint32_euint64( - this.instances3.alice.encrypt32(16781312), - this.instances3.alice.encrypt64(4096), + it('test operator "lt" overload (euint64, euint16) => ebool test 1 (18443664339829863559, 39059)', async function () { + const res = await this.contract5.lt_euint64_euint16( + this.instances5.alice.encrypt64(18443664339829863559), + this.instances5.alice.encrypt16(39059), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint32, euint64) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract3.lt_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4097), + it('test operator "lt" overload (euint64, euint16) => ebool test 2 (39055, 39059)', async function () { + const res = await this.contract5.lt_euint64_euint16( + this.instances5.alice.encrypt64(39055), + this.instances5.alice.encrypt16(39059), ); expect(res).to.equal(true); }); - it('test operator "min" overload (euint32, euint64) => euint64 test 1 (4096, 4096)', async function () { - const res = await this.contract3.min_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4096), + it('test operator "lt" overload (euint64, euint16) => ebool test 3 (39059, 39059)', async function () { + const res = await this.contract5.lt_euint64_euint16( + this.instances5.alice.encrypt64(39059), + this.instances5.alice.encrypt16(39059), ); - expect(res).to.equal(4096); + expect(res).to.equal(false); }); - it('test operator "min" overload (euint32, euint64) => euint64 test 2 (16781312, 4096)', async function () { - const res = await this.contract3.min_euint32_euint64( - this.instances3.alice.encrypt32(16781312), - this.instances3.alice.encrypt64(4096), + it('test operator "lt" overload (euint64, euint16) => ebool test 4 (39059, 39055)', async function () { + const res = await this.contract5.lt_euint64_euint16( + this.instances5.alice.encrypt64(39059), + this.instances5.alice.encrypt16(39055), ); - expect(res).to.equal(4096); + expect(res).to.equal(false); }); - it('test operator "min" overload (euint32, euint64) => euint64 test 3 (4096, 4097)', async function () { - const res = await this.contract3.min_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4097), + it('test operator "min" overload (euint64, euint16) => euint64 test 1 (18440273866551894469, 42779)', async function () { + const res = await this.contract5.min_euint64_euint16( + this.instances5.alice.encrypt64(18440273866551894469), + this.instances5.alice.encrypt16(42779), ); - expect(res).to.equal(4096); + expect(res).to.equal(42779n); }); - it('test operator "max" overload (euint32, euint64) => euint64 test 1 (4096, 4096)', async function () { - const res = await this.contract3.max_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4096), + it('test operator "min" overload (euint64, euint16) => euint64 test 2 (42775, 42779)', async function () { + const res = await this.contract5.min_euint64_euint16( + this.instances5.alice.encrypt64(42775), + this.instances5.alice.encrypt16(42779), ); - expect(res).to.equal(4096); + expect(res).to.equal(42775n); }); - it('test operator "max" overload (euint32, euint64) => euint64 test 2 (16781312, 4096)', async function () { - const res = await this.contract3.max_euint32_euint64( - this.instances3.alice.encrypt32(16781312), - this.instances3.alice.encrypt64(4096), + it('test operator "min" overload (euint64, euint16) => euint64 test 3 (42779, 42779)', async function () { + const res = await this.contract5.min_euint64_euint16( + this.instances5.alice.encrypt64(42779), + this.instances5.alice.encrypt16(42779), ); - expect(res).to.equal(16781312); + expect(res).to.equal(42779n); }); - it('test operator "max" overload (euint32, euint64) => euint64 test 3 (4096, 4097)', async function () { - const res = await this.contract3.max_euint32_euint64( - this.instances3.alice.encrypt32(4096), - this.instances3.alice.encrypt64(4097), + it('test operator "min" overload (euint64, euint16) => euint64 test 4 (42779, 42775)', async function () { + const res = await this.contract5.min_euint64_euint16( + this.instances5.alice.encrypt64(42779), + this.instances5.alice.encrypt16(42775), ); - expect(res).to.equal(4097); + expect(res).to.equal(42775n); }); - it('test operator "add" overload (euint32, uint32) => euint32 test 1 (3416064, 3280896)', async function () { - const res = await this.contract3.add_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3280896); - expect(res).to.equal(6696960); + it('test operator "max" overload (euint64, euint16) => euint64 test 1 (18439537518803733101, 41315)', async function () { + const res = await this.contract5.max_euint64_euint16( + this.instances5.alice.encrypt64(18439537518803733101), + this.instances5.alice.encrypt16(41315), + ); + expect(res).to.equal(18439537518803733101n); }); - it('test operator "add" overload (uint32, euint32) => euint32 test 1 (3416064, 3280896)', async function () { - const res = await this.contract3.add_uint32_euint32(3416064, this.instances3.alice.encrypt32(3280896)); - expect(res).to.equal(6696960); + it('test operator "max" overload (euint64, euint16) => euint64 test 2 (41311, 41315)', async function () { + const res = await this.contract5.max_euint64_euint16( + this.instances5.alice.encrypt64(41311), + this.instances5.alice.encrypt16(41315), + ); + expect(res).to.equal(41315n); }); - it('test operator "sub" overload (euint32, uint32) => euint32 test 1 (3416064, 3280896)', async function () { - const res = await this.contract3.sub_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3280896); - expect(res).to.equal(135168); + it('test operator "max" overload (euint64, euint16) => euint64 test 3 (41315, 41315)', async function () { + const res = await this.contract5.max_euint64_euint16( + this.instances5.alice.encrypt64(41315), + this.instances5.alice.encrypt16(41315), + ); + expect(res).to.equal(41315n); }); - it('test operator "sub" overload (uint32, euint32) => euint32 test 1 (3416064, 3280896)', async function () { - const res = await this.contract3.sub_uint32_euint32(3416064, this.instances3.alice.encrypt32(3280896)); - expect(res).to.equal(135168); + it('test operator "max" overload (euint64, euint16) => euint64 test 4 (41315, 41311)', async function () { + const res = await this.contract5.max_euint64_euint16( + this.instances5.alice.encrypt64(41315), + this.instances5.alice.encrypt16(41311), + ); + expect(res).to.equal(41315n); }); - it('test operator "mul" overload (euint32, uint32) => euint32 test 1 (3416064, 256)', async function () { - const res = await this.contract3.mul_euint32_uint32(this.instances3.alice.encrypt32(3416064), 256); - expect(res).to.equal(874512384); + it('test operator "add" overload (euint64, euint32) => euint64 test 1 (4293362093, 2)', async function () { + const res = await this.contract5.add_euint64_euint32( + this.instances5.alice.encrypt64(4293362093), + this.instances5.alice.encrypt32(2), + ); + expect(res).to.equal(4293362095n); }); - it('test operator "mul" overload (uint32, euint32) => euint32 test 1 (3416064, 256)', async function () { - const res = await this.contract3.mul_uint32_euint32(3416064, this.instances3.alice.encrypt32(256)); - expect(res).to.equal(874512384); + it('test operator "add" overload (euint64, euint32) => euint64 test 2 (1194292230, 1194292232)', async function () { + const res = await this.contract5.add_euint64_euint32( + this.instances5.alice.encrypt64(1194292230), + this.instances5.alice.encrypt32(1194292232), + ); + expect(res).to.equal(2388584462n); }); - it('test operator "div" overload (euint32, uint32) => euint32 test 1 (3416064, 256)', async function () { - const res = await this.contract3.div_euint32_uint32(this.instances3.alice.encrypt32(3416064), 256); - expect(res).to.equal(13344); + it('test operator "add" overload (euint64, euint32) => euint64 test 3 (1194292232, 1194292232)', async function () { + const res = await this.contract5.add_euint64_euint32( + this.instances5.alice.encrypt64(1194292232), + this.instances5.alice.encrypt32(1194292232), + ); + expect(res).to.equal(2388584464n); }); - it('test operator "rem" overload (euint32, uint32) => euint32 test 1 (3416121, 256)', async function () { - const res = await this.contract3.rem_euint32_uint32(this.instances3.alice.encrypt32(3416121), 256); - expect(res).to.equal(57); + it('test operator "add" overload (euint64, euint32) => euint64 test 4 (1194292232, 1194292230)', async function () { + const res = await this.contract5.add_euint64_euint32( + this.instances5.alice.encrypt64(1194292232), + this.instances5.alice.encrypt32(1194292230), + ); + expect(res).to.equal(2388584462n); }); - it('test operator "eq" overload (euint32, uint32) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.eq_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416064); - expect(res).to.equal(true); + it('test operator "sub" overload (euint64, euint32) => euint64 test 1 (624820999, 624820999)', async function () { + const res = await this.contract5.sub_euint64_euint32( + this.instances5.alice.encrypt64(624820999), + this.instances5.alice.encrypt32(624820999), + ); + expect(res).to.equal(0n); }); - it('test operator "eq" overload (euint32, uint32) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.eq_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416065); - expect(res).to.equal(false); + it('test operator "sub" overload (euint64, euint32) => euint64 test 2 (624820999, 624820995)', async function () { + const res = await this.contract5.sub_euint64_euint32( + this.instances5.alice.encrypt64(624820999), + this.instances5.alice.encrypt32(624820995), + ); + expect(res).to.equal(4n); }); - it('test operator "eq" overload (uint32, euint32) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.eq_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416064)); - expect(res).to.equal(true); + it('test operator "mul" overload (euint64, euint32) => euint64 test 1 (2147410658, 2)', async function () { + const res = await this.contract5.mul_euint64_euint32( + this.instances5.alice.encrypt64(2147410658), + this.instances5.alice.encrypt32(2), + ); + expect(res).to.equal(4294821316n); }); - it('test operator "eq" overload (uint32, euint32) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.eq_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416065)); - expect(res).to.equal(false); + it('test operator "mul" overload (euint64, euint32) => euint64 test 2 (32881, 32881)', async function () { + const res = await this.contract5.mul_euint64_euint32( + this.instances5.alice.encrypt64(32881), + this.instances5.alice.encrypt32(32881), + ); + expect(res).to.equal(1081160161n); }); - it('test operator "ne" overload (euint32, uint32) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.ne_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416064); - expect(res).to.equal(false); + it('test operator "mul" overload (euint64, euint32) => euint64 test 3 (32881, 32881)', async function () { + const res = await this.contract5.mul_euint64_euint32( + this.instances5.alice.encrypt64(32881), + this.instances5.alice.encrypt32(32881), + ); + expect(res).to.equal(1081160161n); }); - it('test operator "ne" overload (euint32, uint32) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.ne_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416065); - expect(res).to.equal(true); + it('test operator "mul" overload (euint64, euint32) => euint64 test 4 (32881, 32881)', async function () { + const res = await this.contract5.mul_euint64_euint32( + this.instances5.alice.encrypt64(32881), + this.instances5.alice.encrypt32(32881), + ); + expect(res).to.equal(1081160161n); }); - it('test operator "ne" overload (uint32, euint32) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.ne_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416064)); - expect(res).to.equal(false); + it('test operator "and" overload (euint64, euint32) => euint64 test 1 (18444449709394842073, 3823819229)', async function () { + const res = await this.contract5.and_euint64_euint32( + this.instances5.alice.encrypt64(18444449709394842073), + this.instances5.alice.encrypt32(3823819229), + ); + expect(res).to.equal(2718454233n); }); - it('test operator "ne" overload (uint32, euint32) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.ne_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416065)); - expect(res).to.equal(true); + it('test operator "and" overload (euint64, euint32) => euint64 test 2 (3823819225, 3823819229)', async function () { + const res = await this.contract5.and_euint64_euint32( + this.instances5.alice.encrypt64(3823819225), + this.instances5.alice.encrypt32(3823819229), + ); + expect(res).to.equal(3823819225n); }); - it('test operator "ge" overload (euint32, uint32) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.ge_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416064); - expect(res).to.equal(true); + it('test operator "and" overload (euint64, euint32) => euint64 test 3 (3823819229, 3823819229)', async function () { + const res = await this.contract5.and_euint64_euint32( + this.instances5.alice.encrypt64(3823819229), + this.instances5.alice.encrypt32(3823819229), + ); + expect(res).to.equal(3823819229n); }); - it('test operator "ge" overload (euint32, uint32) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.ge_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416065); - expect(res).to.equal(false); + it('test operator "and" overload (euint64, euint32) => euint64 test 4 (3823819229, 3823819225)', async function () { + const res = await this.contract5.and_euint64_euint32( + this.instances5.alice.encrypt64(3823819229), + this.instances5.alice.encrypt32(3823819225), + ); + expect(res).to.equal(3823819225n); }); - it('test operator "ge" overload (euint32, uint32) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract3.ge_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416063); - expect(res).to.equal(true); + it('test operator "or" overload (euint64, euint32) => euint64 test 1 (18444852954550836631, 3550708762)', async function () { + const res = await this.contract5.or_euint64_euint32( + this.instances5.alice.encrypt64(18444852954550836631), + this.instances5.alice.encrypt32(3550708762), + ); + expect(res).to.equal(18444852955920440735n); }); - it('test operator "ge" overload (uint32, euint32) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.ge_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416064)); - expect(res).to.equal(true); + it('test operator "or" overload (euint64, euint32) => euint64 test 2 (3550708758, 3550708762)', async function () { + const res = await this.contract5.or_euint64_euint32( + this.instances5.alice.encrypt64(3550708758), + this.instances5.alice.encrypt32(3550708762), + ); + expect(res).to.equal(3550708766n); }); - it('test operator "ge" overload (uint32, euint32) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.ge_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416065)); - expect(res).to.equal(false); + it('test operator "or" overload (euint64, euint32) => euint64 test 3 (3550708762, 3550708762)', async function () { + const res = await this.contract5.or_euint64_euint32( + this.instances5.alice.encrypt64(3550708762), + this.instances5.alice.encrypt32(3550708762), + ); + expect(res).to.equal(3550708762n); }); - it('test operator "ge" overload (uint32, euint32) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract3.ge_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416063)); - expect(res).to.equal(true); + it('test operator "or" overload (euint64, euint32) => euint64 test 4 (3550708762, 3550708758)', async function () { + const res = await this.contract5.or_euint64_euint32( + this.instances5.alice.encrypt64(3550708762), + this.instances5.alice.encrypt32(3550708758), + ); + expect(res).to.equal(3550708766n); }); - it('test operator "gt" overload (euint32, uint32) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.gt_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416064); - expect(res).to.equal(false); + it('test operator "xor" overload (euint64, euint32) => euint64 test 1 (18445532500811503869, 2578227181)', async function () { + const res = await this.contract5.xor_euint64_euint32( + this.instances5.alice.encrypt64(18445532500811503869), + this.instances5.alice.encrypt32(2578227181), + ); + expect(res).to.equal(18445532498506434320n); }); - it('test operator "gt" overload (euint32, uint32) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.gt_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416065); - expect(res).to.equal(false); + it('test operator "xor" overload (euint64, euint32) => euint64 test 2 (2578227177, 2578227181)', async function () { + const res = await this.contract5.xor_euint64_euint32( + this.instances5.alice.encrypt64(2578227177), + this.instances5.alice.encrypt32(2578227181), + ); + expect(res).to.equal(4n); }); - it('test operator "gt" overload (euint32, uint32) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract3.gt_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416063); - expect(res).to.equal(true); + it('test operator "xor" overload (euint64, euint32) => euint64 test 3 (2578227181, 2578227181)', async function () { + const res = await this.contract5.xor_euint64_euint32( + this.instances5.alice.encrypt64(2578227181), + this.instances5.alice.encrypt32(2578227181), + ); + expect(res).to.equal(0n); }); - it('test operator "gt" overload (uint32, euint32) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.gt_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416064)); - expect(res).to.equal(false); + it('test operator "xor" overload (euint64, euint32) => euint64 test 4 (2578227181, 2578227177)', async function () { + const res = await this.contract5.xor_euint64_euint32( + this.instances5.alice.encrypt64(2578227181), + this.instances5.alice.encrypt32(2578227177), + ); + expect(res).to.equal(4n); }); - it('test operator "gt" overload (uint32, euint32) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.gt_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416065)); + it('test operator "eq" overload (euint64, euint32) => ebool test 1 (18444814847193612111, 3675625287)', async function () { + const res = await this.contract5.eq_euint64_euint32( + this.instances5.alice.encrypt64(18444814847193612111), + this.instances5.alice.encrypt32(3675625287), + ); expect(res).to.equal(false); }); - it('test operator "gt" overload (uint32, euint32) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract3.gt_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416063)); - expect(res).to.equal(true); - }); - - it('test operator "le" overload (euint32, uint32) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.le_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416064); - expect(res).to.equal(true); + it('test operator "eq" overload (euint64, euint32) => ebool test 2 (3675625283, 3675625287)', async function () { + const res = await this.contract5.eq_euint64_euint32( + this.instances5.alice.encrypt64(3675625283), + this.instances5.alice.encrypt32(3675625287), + ); + expect(res).to.equal(false); }); - it('test operator "le" overload (euint32, uint32) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.le_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416065); + it('test operator "eq" overload (euint64, euint32) => ebool test 3 (3675625287, 3675625287)', async function () { + const res = await this.contract5.eq_euint64_euint32( + this.instances5.alice.encrypt64(3675625287), + this.instances5.alice.encrypt32(3675625287), + ); expect(res).to.equal(true); }); - it('test operator "le" overload (euint32, uint32) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract3.le_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416063); + it('test operator "eq" overload (euint64, euint32) => ebool test 4 (3675625287, 3675625283)', async function () { + const res = await this.contract5.eq_euint64_euint32( + this.instances5.alice.encrypt64(3675625287), + this.instances5.alice.encrypt32(3675625283), + ); expect(res).to.equal(false); }); - it('test operator "le" overload (uint32, euint32) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.le_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416064)); + it('test operator "ne" overload (euint64, euint32) => ebool test 1 (18442332740658370363, 1304399628)', async function () { + const res = await this.contract5.ne_euint64_euint32( + this.instances5.alice.encrypt64(18442332740658370363), + this.instances5.alice.encrypt32(1304399628), + ); expect(res).to.equal(true); }); - it('test operator "le" overload (uint32, euint32) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.le_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416065)); + it('test operator "ne" overload (euint64, euint32) => ebool test 2 (1304399624, 1304399628)', async function () { + const res = await this.contract5.ne_euint64_euint32( + this.instances5.alice.encrypt64(1304399624), + this.instances5.alice.encrypt32(1304399628), + ); expect(res).to.equal(true); }); - it('test operator "le" overload (uint32, euint32) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract3.le_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416063)); - expect(res).to.equal(false); - }); - - it('test operator "lt" overload (euint32, uint32) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.lt_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416064); + it('test operator "ne" overload (euint64, euint32) => ebool test 3 (1304399628, 1304399628)', async function () { + const res = await this.contract5.ne_euint64_euint32( + this.instances5.alice.encrypt64(1304399628), + this.instances5.alice.encrypt32(1304399628), + ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint32, uint32) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.lt_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416065); + it('test operator "ne" overload (euint64, euint32) => ebool test 4 (1304399628, 1304399624)', async function () { + const res = await this.contract5.ne_euint64_euint32( + this.instances5.alice.encrypt64(1304399628), + this.instances5.alice.encrypt32(1304399624), + ); expect(res).to.equal(true); }); - it('test operator "lt" overload (euint32, uint32) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract3.lt_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416063); - expect(res).to.equal(false); - }); - - it('test operator "lt" overload (uint32, euint32) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.lt_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416064)); - expect(res).to.equal(false); - }); - - it('test operator "lt" overload (uint32, euint32) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.lt_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416065)); + it('test operator "ge" overload (euint64, euint32) => ebool test 1 (18443677328726027173, 2889413053)', async function () { + const res = await this.contract5.ge_euint64_euint32( + this.instances5.alice.encrypt64(18443677328726027173), + this.instances5.alice.encrypt32(2889413053), + ); expect(res).to.equal(true); }); - it('test operator "lt" overload (uint32, euint32) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract3.lt_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416063)); + it('test operator "ge" overload (euint64, euint32) => ebool test 2 (2889413049, 2889413053)', async function () { + const res = await this.contract5.ge_euint64_euint32( + this.instances5.alice.encrypt64(2889413049), + this.instances5.alice.encrypt32(2889413053), + ); expect(res).to.equal(false); }); - it('test operator "min" overload (euint32, uint32) => euint32 test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.min_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416064); - expect(res).to.equal(3416064); + it('test operator "ge" overload (euint64, euint32) => ebool test 3 (2889413053, 2889413053)', async function () { + const res = await this.contract5.ge_euint64_euint32( + this.instances5.alice.encrypt64(2889413053), + this.instances5.alice.encrypt32(2889413053), + ); + expect(res).to.equal(true); }); - it('test operator "min" overload (euint32, uint32) => euint32 test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.min_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416065); - expect(res).to.equal(3416064); + it('test operator "ge" overload (euint64, euint32) => ebool test 4 (2889413053, 2889413049)', async function () { + const res = await this.contract5.ge_euint64_euint32( + this.instances5.alice.encrypt64(2889413053), + this.instances5.alice.encrypt32(2889413049), + ); + expect(res).to.equal(true); }); - it('test operator "min" overload (euint32, uint32) => euint32 test 3 (3416064, 3416063)', async function () { - const res = await this.contract3.min_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416063); - expect(res).to.equal(3416063); + it('test operator "gt" overload (euint64, euint32) => ebool test 1 (18445619408455524051, 2595159918)', async function () { + const res = await this.contract5.gt_euint64_euint32( + this.instances5.alice.encrypt64(18445619408455524051), + this.instances5.alice.encrypt32(2595159918), + ); + expect(res).to.equal(true); }); - it('test operator "min" overload (uint32, euint32) => euint32 test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.min_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416064)); - expect(res).to.equal(3416064); + it('test operator "gt" overload (euint64, euint32) => ebool test 2 (2595159914, 2595159918)', async function () { + const res = await this.contract5.gt_euint64_euint32( + this.instances5.alice.encrypt64(2595159914), + this.instances5.alice.encrypt32(2595159918), + ); + expect(res).to.equal(false); }); - it('test operator "min" overload (uint32, euint32) => euint32 test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.min_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416065)); - expect(res).to.equal(3416064); + it('test operator "gt" overload (euint64, euint32) => ebool test 3 (2595159918, 2595159918)', async function () { + const res = await this.contract5.gt_euint64_euint32( + this.instances5.alice.encrypt64(2595159918), + this.instances5.alice.encrypt32(2595159918), + ); + expect(res).to.equal(false); }); - it('test operator "min" overload (uint32, euint32) => euint32 test 3 (3416064, 3416063)', async function () { - const res = await this.contract3.min_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416063)); - expect(res).to.equal(3416063); + it('test operator "gt" overload (euint64, euint32) => ebool test 4 (2595159918, 2595159914)', async function () { + const res = await this.contract5.gt_euint64_euint32( + this.instances5.alice.encrypt64(2595159918), + this.instances5.alice.encrypt32(2595159914), + ); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint32, uint32) => euint32 test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.max_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416064); - expect(res).to.equal(3416064); + it('test operator "le" overload (euint64, euint32) => ebool test 1 (18439009396144568585, 2271345781)', async function () { + const res = await this.contract5.le_euint64_euint32( + this.instances5.alice.encrypt64(18439009396144568585), + this.instances5.alice.encrypt32(2271345781), + ); + expect(res).to.equal(false); }); - it('test operator "max" overload (euint32, uint32) => euint32 test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.max_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416065); - expect(res).to.equal(3416065); + it('test operator "le" overload (euint64, euint32) => ebool test 2 (2271345777, 2271345781)', async function () { + const res = await this.contract5.le_euint64_euint32( + this.instances5.alice.encrypt64(2271345777), + this.instances5.alice.encrypt32(2271345781), + ); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint32, uint32) => euint32 test 3 (3416064, 3416063)', async function () { - const res = await this.contract3.max_euint32_uint32(this.instances3.alice.encrypt32(3416064), 3416063); - expect(res).to.equal(3416064); + it('test operator "le" overload (euint64, euint32) => ebool test 3 (2271345781, 2271345781)', async function () { + const res = await this.contract5.le_euint64_euint32( + this.instances5.alice.encrypt64(2271345781), + this.instances5.alice.encrypt32(2271345781), + ); + expect(res).to.equal(true); }); - it('test operator "max" overload (uint32, euint32) => euint32 test 1 (3416064, 3416064)', async function () { - const res = await this.contract3.max_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416064)); - expect(res).to.equal(3416064); + it('test operator "le" overload (euint64, euint32) => ebool test 4 (2271345781, 2271345777)', async function () { + const res = await this.contract5.le_euint64_euint32( + this.instances5.alice.encrypt64(2271345781), + this.instances5.alice.encrypt32(2271345777), + ); + expect(res).to.equal(false); }); - it('test operator "max" overload (uint32, euint32) => euint32 test 2 (3416064, 3416065)', async function () { - const res = await this.contract3.max_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416065)); - expect(res).to.equal(3416065); + it('test operator "lt" overload (euint64, euint32) => ebool test 1 (18439663977987842087, 2158000734)', async function () { + const res = await this.contract5.lt_euint64_euint32( + this.instances5.alice.encrypt64(18439663977987842087), + this.instances5.alice.encrypt32(2158000734), + ); + expect(res).to.equal(false); }); - it('test operator "max" overload (uint32, euint32) => euint32 test 3 (3416064, 3416063)', async function () { - const res = await this.contract3.max_uint32_euint32(3416064, this.instances3.alice.encrypt32(3416063)); - expect(res).to.equal(3416064); + it('test operator "lt" overload (euint64, euint32) => ebool test 2 (2158000730, 2158000734)', async function () { + const res = await this.contract5.lt_euint64_euint32( + this.instances5.alice.encrypt64(2158000730), + this.instances5.alice.encrypt32(2158000734), + ); + expect(res).to.equal(true); }); - it('test operator "add" overload (euint64, euint8) => euint64 test 1 (50331648, 3)', async function () { - const res = await this.contract3.add_euint64_euint8( - this.instances3.alice.encrypt64(50331648), - this.instances3.alice.encrypt8(3), + it('test operator "lt" overload (euint64, euint32) => ebool test 3 (2158000734, 2158000734)', async function () { + const res = await this.contract5.lt_euint64_euint32( + this.instances5.alice.encrypt64(2158000734), + this.instances5.alice.encrypt32(2158000734), ); - expect(res).to.equal(50331651); + expect(res).to.equal(false); }); - it('test operator "sub" overload (euint64, euint8) => euint64 test 1 (50331648, 3)', async function () { - const res = await this.contract3.sub_euint64_euint8( - this.instances3.alice.encrypt64(50331648), - this.instances3.alice.encrypt8(3), + it('test operator "lt" overload (euint64, euint32) => ebool test 4 (2158000734, 2158000730)', async function () { + const res = await this.contract5.lt_euint64_euint32( + this.instances5.alice.encrypt64(2158000734), + this.instances5.alice.encrypt32(2158000730), ); - expect(res).to.equal(50331645); + expect(res).to.equal(false); }); - it('test operator "mul" overload (euint64, euint8) => euint64 test 1 (50331648, 3)', async function () { - const res = await this.contract3.mul_euint64_euint8( - this.instances3.alice.encrypt64(50331648), - this.instances3.alice.encrypt8(3), + it('test operator "min" overload (euint64, euint32) => euint64 test 1 (18442182412102668107, 657148413)', async function () { + const res = await this.contract5.min_euint64_euint32( + this.instances5.alice.encrypt64(18442182412102668107), + this.instances5.alice.encrypt32(657148413), ); - expect(res).to.equal(150994944); + expect(res).to.equal(657148413n); }); - it('test operator "and" overload (euint64, euint8) => euint64 test 1 (50397184, 3)', async function () { - const res = await this.contract3.and_euint64_euint8( - this.instances3.alice.encrypt64(50397184), - this.instances3.alice.encrypt8(3), + it('test operator "min" overload (euint64, euint32) => euint64 test 2 (657148409, 657148413)', async function () { + const res = await this.contract5.min_euint64_euint32( + this.instances5.alice.encrypt64(657148409), + this.instances5.alice.encrypt32(657148413), ); - expect(res).to.equal(0); + expect(res).to.equal(657148409n); }); - it('test operator "and" overload (euint64, euint8) => euint64 test 2 (50397187, 3)', async function () { - const res = await this.contract3.and_euint64_euint8( - this.instances3.alice.encrypt64(50397187), - this.instances3.alice.encrypt8(3), + it('test operator "min" overload (euint64, euint32) => euint64 test 3 (657148413, 657148413)', async function () { + const res = await this.contract5.min_euint64_euint32( + this.instances5.alice.encrypt64(657148413), + this.instances5.alice.encrypt32(657148413), ); - expect(res).to.equal(3); + expect(res).to.equal(657148413n); }); - it('test operator "or" overload (euint64, euint8) => euint64 test 1 (50397184, 3)', async function () { - const res = await this.contract3.or_euint64_euint8( - this.instances3.alice.encrypt64(50397184), - this.instances3.alice.encrypt8(3), + it('test operator "min" overload (euint64, euint32) => euint64 test 4 (657148413, 657148409)', async function () { + const res = await this.contract5.min_euint64_euint32( + this.instances5.alice.encrypt64(657148413), + this.instances5.alice.encrypt32(657148409), ); - expect(res).to.equal(50397187); + expect(res).to.equal(657148409n); }); - it('test operator "or" overload (euint64, euint8) => euint64 test 2 (50397187, 3)', async function () { - const res = await this.contract3.or_euint64_euint8( - this.instances3.alice.encrypt64(50397187), - this.instances3.alice.encrypt8(3), + it('test operator "max" overload (euint64, euint32) => euint64 test 1 (18439662390589911437, 4249693397)', async function () { + const res = await this.contract5.max_euint64_euint32( + this.instances5.alice.encrypt64(18439662390589911437), + this.instances5.alice.encrypt32(4249693397), ); - expect(res).to.equal(50397187); + expect(res).to.equal(18439662390589911437n); }); - it('test operator "xor" overload (euint64, euint8) => euint64 test 1 (50397184, 3)', async function () { - const res = await this.contract3.xor_euint64_euint8( - this.instances3.alice.encrypt64(50397184), - this.instances3.alice.encrypt8(3), + it('test operator "max" overload (euint64, euint32) => euint64 test 2 (4249693393, 4249693397)', async function () { + const res = await this.contract5.max_euint64_euint32( + this.instances5.alice.encrypt64(4249693393), + this.instances5.alice.encrypt32(4249693397), ); - expect(res).to.equal(50397187); + expect(res).to.equal(4249693397n); }); - it('test operator "xor" overload (euint64, euint8) => euint64 test 2 (50397187, 3)', async function () { - const res = await this.contract3.xor_euint64_euint8( - this.instances3.alice.encrypt64(50397187), - this.instances3.alice.encrypt8(3), + it('test operator "max" overload (euint64, euint32) => euint64 test 3 (4249693397, 4249693397)', async function () { + const res = await this.contract5.max_euint64_euint32( + this.instances5.alice.encrypt64(4249693397), + this.instances5.alice.encrypt32(4249693397), ); - expect(res).to.equal(50397184); + expect(res).to.equal(4249693397n); }); - it('test operator "eq" overload (euint64, euint8) => ebool test 1 (3, 3)', async function () { - const res = await this.contract3.eq_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(3), + it('test operator "max" overload (euint64, euint32) => euint64 test 4 (4249693397, 4249693393)', async function () { + const res = await this.contract5.max_euint64_euint32( + this.instances5.alice.encrypt64(4249693397), + this.instances5.alice.encrypt32(4249693393), ); - expect(res).to.equal(true); + expect(res).to.equal(4249693397n); }); - it('test operator "eq" overload (euint64, euint8) => ebool test 2 (50331651, 3)', async function () { - const res = await this.contract3.eq_euint64_euint8( - this.instances3.alice.encrypt64(50331651), - this.instances3.alice.encrypt8(3), + it('test operator "add" overload (euint64, euint64) => euint64 test 1 (9223329218882461797, 9219964371310000511)', async function () { + const res = await this.contract5.add_euint64_euint64( + this.instances5.alice.encrypt64(9223329218882461797), + this.instances5.alice.encrypt64(9219964371310000511), ); - expect(res).to.equal(false); + expect(res).to.equal(18443293590192462308n); }); - it('test operator "ne" overload (euint64, euint8) => ebool test 1 (3, 3)', async function () { - const res = await this.contract3.ne_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(3), + it('test operator "add" overload (euint64, euint64) => euint64 test 2 (9219964371310000509, 9219964371310000511)', async function () { + const res = await this.contract5.add_euint64_euint64( + this.instances5.alice.encrypt64(9219964371310000509), + this.instances5.alice.encrypt64(9219964371310000511), ); - expect(res).to.equal(false); + expect(res).to.equal(18439928742620001020n); }); - it('test operator "ne" overload (euint64, euint8) => ebool test 2 (50331651, 3)', async function () { - const res = await this.contract3.ne_euint64_euint8( - this.instances3.alice.encrypt64(50331651), - this.instances3.alice.encrypt8(3), + it('test operator "add" overload (euint64, euint64) => euint64 test 3 (9219964371310000511, 9219964371310000511)', async function () { + const res = await this.contract5.add_euint64_euint64( + this.instances5.alice.encrypt64(9219964371310000511), + this.instances5.alice.encrypt64(9219964371310000511), ); - expect(res).to.equal(true); + expect(res).to.equal(18439928742620001022n); }); - it('test operator "ge" overload (euint64, euint8) => ebool test 1 (3, 3)', async function () { - const res = await this.contract3.ge_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(3), + it('test operator "add" overload (euint64, euint64) => euint64 test 4 (9219964371310000511, 9219964371310000509)', async function () { + const res = await this.contract5.add_euint64_euint64( + this.instances5.alice.encrypt64(9219964371310000511), + this.instances5.alice.encrypt64(9219964371310000509), ); - expect(res).to.equal(true); + expect(res).to.equal(18439928742620001020n); }); - it('test operator "ge" overload (euint64, euint8) => ebool test 2 (50331651, 3)', async function () { - const res = await this.contract3.ge_euint64_euint8( - this.instances3.alice.encrypt64(50331651), - this.instances3.alice.encrypt8(3), + it('test operator "sub" overload (euint64, euint64) => euint64 test 1 (18445117613821089157, 18445117613821089157)', async function () { + const res = await this.contract5.sub_euint64_euint64( + this.instances5.alice.encrypt64(18445117613821089157), + this.instances5.alice.encrypt64(18445117613821089157), ); - expect(res).to.equal(true); + expect(res).to.equal(0n); }); - it('test operator "ge" overload (euint64, euint8) => ebool test 3 (3, 4)', async function () { - const res = await this.contract3.ge_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(4), + it('test operator "sub" overload (euint64, euint64) => euint64 test 2 (18445117613821089157, 18445117613821089153)', async function () { + const res = await this.contract5.sub_euint64_euint64( + this.instances5.alice.encrypt64(18445117613821089157), + this.instances5.alice.encrypt64(18445117613821089153), ); - expect(res).to.equal(false); + expect(res).to.equal(4n); }); - it('test operator "gt" overload (euint64, euint8) => ebool test 1 (3, 3)', async function () { - const res = await this.contract3.gt_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(3), + it('test operator "mul" overload (euint64, euint64) => euint64 test 1 (4294635170, 4293288604)', async function () { + const res = await this.contract5.mul_euint64_euint64( + this.instances5.alice.encrypt64(4294635170), + this.instances5.alice.encrypt64(4293288604), ); - expect(res).to.equal(false); + expect(res).to.equal(18438108233698602680n); }); - it('test operator "gt" overload (euint64, euint8) => ebool test 2 (50331651, 3)', async function () { - const res = await this.contract3.gt_euint64_euint8( - this.instances3.alice.encrypt64(50331651), - this.instances3.alice.encrypt8(3), + it('test operator "mul" overload (euint64, euint64) => euint64 test 2 (4293288604, 4293288604)', async function () { + const res = await this.contract5.mul_euint64_euint64( + this.instances5.alice.encrypt64(4293288604), + this.instances5.alice.encrypt64(4293288604), ); - expect(res).to.equal(true); + expect(res).to.equal(18432327037236268816n); }); - it('test operator "gt" overload (euint64, euint8) => ebool test 3 (3, 4)', async function () { - const res = await this.contract3.gt_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(4), + it('test operator "mul" overload (euint64, euint64) => euint64 test 3 (4293288604, 4293288604)', async function () { + const res = await this.contract5.mul_euint64_euint64( + this.instances5.alice.encrypt64(4293288604), + this.instances5.alice.encrypt64(4293288604), ); - expect(res).to.equal(false); + expect(res).to.equal(18432327037236268816n); }); - it('test operator "le" overload (euint64, euint8) => ebool test 1 (3, 3)', async function () { - const res = await this.contract3.le_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(3), + it('test operator "mul" overload (euint64, euint64) => euint64 test 4 (4293288604, 4293288604)', async function () { + const res = await this.contract5.mul_euint64_euint64( + this.instances5.alice.encrypt64(4293288604), + this.instances5.alice.encrypt64(4293288604), ); - expect(res).to.equal(true); + expect(res).to.equal(18432327037236268816n); }); - it('test operator "le" overload (euint64, euint8) => ebool test 2 (50331651, 3)', async function () { - const res = await this.contract3.le_euint64_euint8( - this.instances3.alice.encrypt64(50331651), - this.instances3.alice.encrypt8(3), + it('test operator "and" overload (euint64, euint64) => euint64 test 1 (18441848963293247005, 18437762817766608073)', async function () { + const res = await this.contract5.and_euint64_euint64( + this.instances5.alice.encrypt64(18441848963293247005), + this.instances5.alice.encrypt64(18437762817766608073), ); - expect(res).to.equal(false); + expect(res).to.equal(18437758350371472393n); }); - it('test operator "le" overload (euint64, euint8) => ebool test 3 (3, 4)', async function () { - const res = await this.contract3.le_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(4), + it('test operator "and" overload (euint64, euint64) => euint64 test 2 (18437762817766608069, 18437762817766608073)', async function () { + const res = await this.contract5.and_euint64_euint64( + this.instances5.alice.encrypt64(18437762817766608069), + this.instances5.alice.encrypt64(18437762817766608073), ); - expect(res).to.equal(true); + expect(res).to.equal(18437762817766608065n); }); - it('test operator "lt" overload (euint64, euint8) => ebool test 1 (3, 3)', async function () { - const res = await this.contract3.lt_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(3), + it('test operator "and" overload (euint64, euint64) => euint64 test 3 (18437762817766608073, 18437762817766608073)', async function () { + const res = await this.contract5.and_euint64_euint64( + this.instances5.alice.encrypt64(18437762817766608073), + this.instances5.alice.encrypt64(18437762817766608073), ); - expect(res).to.equal(false); + expect(res).to.equal(18437762817766608073n); }); - it('test operator "lt" overload (euint64, euint8) => ebool test 2 (50331651, 3)', async function () { - const res = await this.contract3.lt_euint64_euint8( - this.instances3.alice.encrypt64(50331651), - this.instances3.alice.encrypt8(3), + it('test operator "and" overload (euint64, euint64) => euint64 test 4 (18437762817766608073, 18437762817766608069)', async function () { + const res = await this.contract5.and_euint64_euint64( + this.instances5.alice.encrypt64(18437762817766608073), + this.instances5.alice.encrypt64(18437762817766608069), ); - expect(res).to.equal(false); + expect(res).to.equal(18437762817766608065n); }); - it('test operator "lt" overload (euint64, euint8) => ebool test 3 (3, 4)', async function () { - const res = await this.contract3.lt_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(4), + it('test operator "or" overload (euint64, euint64) => euint64 test 1 (18439947486770357681, 18442205516883919361)', async function () { + const res = await this.contract5.or_euint64_euint64( + this.instances5.alice.encrypt64(18439947486770357681), + this.instances5.alice.encrypt64(18442205516883919361), ); - expect(res).to.equal(true); + expect(res).to.equal(18442234697046943665n); }); - it('test operator "min" overload (euint64, euint8) => euint64 test 1 (3, 3)', async function () { - const res = await this.contract3.min_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(3), + it('test operator "or" overload (euint64, euint64) => euint64 test 2 (18439947486770357677, 18439947486770357681)', async function () { + const res = await this.contract5.or_euint64_euint64( + this.instances5.alice.encrypt64(18439947486770357677), + this.instances5.alice.encrypt64(18439947486770357681), ); - expect(res).to.equal(3); + expect(res).to.equal(18439947486770357693n); }); - it('test operator "min" overload (euint64, euint8) => euint64 test 2 (50331651, 3)', async function () { - const res = await this.contract3.min_euint64_euint8( - this.instances3.alice.encrypt64(50331651), - this.instances3.alice.encrypt8(3), + it('test operator "or" overload (euint64, euint64) => euint64 test 3 (18439947486770357681, 18439947486770357681)', async function () { + const res = await this.contract5.or_euint64_euint64( + this.instances5.alice.encrypt64(18439947486770357681), + this.instances5.alice.encrypt64(18439947486770357681), ); - expect(res).to.equal(3); + expect(res).to.equal(18439947486770357681n); }); - it('test operator "min" overload (euint64, euint8) => euint64 test 3 (3, 4)', async function () { - const res = await this.contract3.min_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(4), + it('test operator "or" overload (euint64, euint64) => euint64 test 4 (18439947486770357681, 18439947486770357677)', async function () { + const res = await this.contract5.or_euint64_euint64( + this.instances5.alice.encrypt64(18439947486770357681), + this.instances5.alice.encrypt64(18439947486770357677), ); - expect(res).to.equal(3); + expect(res).to.equal(18439947486770357693n); }); - it('test operator "max" overload (euint64, euint8) => euint64 test 1 (2, 3)', async function () { - const res = await this.contract3.max_euint64_euint8( - this.instances3.alice.encrypt64(2), - this.instances3.alice.encrypt8(3), + it('test operator "xor" overload (euint64, euint64) => euint64 test 1 (18444700078916958431, 18443866708631144651)', async function () { + const res = await this.contract5.xor_euint64_euint64( + this.instances5.alice.encrypt64(18444700078916958431), + this.instances5.alice.encrypt64(18443866708631144651), ); - expect(res).to.equal(3); + expect(res).to.equal(3795455568392212n); }); - it('test operator "max" overload (euint64, euint8) => euint64 test 2 (50331651, 3)', async function () { - const res = await this.contract3.max_euint64_euint8( - this.instances3.alice.encrypt64(50331651), - this.instances3.alice.encrypt8(3), + it('test operator "xor" overload (euint64, euint64) => euint64 test 2 (18443866708631144647, 18443866708631144651)', async function () { + const res = await this.contract5.xor_euint64_euint64( + this.instances5.alice.encrypt64(18443866708631144647), + this.instances5.alice.encrypt64(18443866708631144651), ); - expect(res).to.equal(50331651); + expect(res).to.equal(12n); }); - it('test operator "max" overload (euint64, euint8) => euint64 test 3 (3, 4)', async function () { - const res = await this.contract3.max_euint64_euint8( - this.instances3.alice.encrypt64(3), - this.instances3.alice.encrypt8(4), + it('test operator "xor" overload (euint64, euint64) => euint64 test 3 (18443866708631144651, 18443866708631144651)', async function () { + const res = await this.contract5.xor_euint64_euint64( + this.instances5.alice.encrypt64(18443866708631144651), + this.instances5.alice.encrypt64(18443866708631144651), ); - expect(res).to.equal(4); + expect(res).to.equal(0n); }); - it('test operator "add" overload (euint64, euint16) => euint64 test 1 (50335779, 4099)', async function () { - const res = await this.contract3.add_euint64_euint16( - this.instances3.alice.encrypt64(50335779), - this.instances3.alice.encrypt16(4099), + it('test operator "xor" overload (euint64, euint64) => euint64 test 4 (18443866708631144651, 18443866708631144647)', async function () { + const res = await this.contract5.xor_euint64_euint64( + this.instances5.alice.encrypt64(18443866708631144651), + this.instances5.alice.encrypt64(18443866708631144647), ); - expect(res).to.equal(50339878); + expect(res).to.equal(12n); }); - it('test operator "sub" overload (euint64, euint16) => euint64 test 1 (50335779, 4099)', async function () { - const res = await this.contract3.sub_euint64_euint16( - this.instances3.alice.encrypt64(50335779), - this.instances3.alice.encrypt16(4099), + it('test operator "eq" overload (euint64, euint64) => ebool test 1 (18443330521266220729, 18438253731135327627)', async function () { + const res = await this.contract5.eq_euint64_euint64( + this.instances5.alice.encrypt64(18443330521266220729), + this.instances5.alice.encrypt64(18438253731135327627), ); - expect(res).to.equal(50331680); + expect(res).to.equal(false); }); - it('test operator "mul" overload (euint64, euint16) => euint64 test 1 (50335779, 3)', async function () { - const res = await this.contract3.mul_euint64_euint16( - this.instances3.alice.encrypt64(50335779), - this.instances3.alice.encrypt16(3), + it('test operator "eq" overload (euint64, euint64) => ebool test 2 (18438253731135327623, 18438253731135327627)', async function () { + const res = await this.contract5.eq_euint64_euint64( + this.instances5.alice.encrypt64(18438253731135327623), + this.instances5.alice.encrypt64(18438253731135327627), ); - expect(res).to.equal(151007337); + expect(res).to.equal(false); }); - it('test operator "and" overload (euint64, euint16) => euint64 test 1 (50335776, 3)', async function () { - const res = await this.contract3.and_euint64_euint16( - this.instances3.alice.encrypt64(50335776), - this.instances3.alice.encrypt16(3), + it('test operator "eq" overload (euint64, euint64) => ebool test 3 (18438253731135327627, 18438253731135327627)', async function () { + const res = await this.contract5.eq_euint64_euint64( + this.instances5.alice.encrypt64(18438253731135327627), + this.instances5.alice.encrypt64(18438253731135327627), ); - expect(res).to.equal(0); + expect(res).to.equal(true); }); - it('test operator "and" overload (euint64, euint16) => euint64 test 2 (50335779, 4099)', async function () { - const res = await this.contract3.and_euint64_euint16( - this.instances3.alice.encrypt64(50335779), - this.instances3.alice.encrypt16(4099), + it('test operator "eq" overload (euint64, euint64) => ebool test 4 (18438253731135327627, 18438253731135327623)', async function () { + const res = await this.contract5.eq_euint64_euint64( + this.instances5.alice.encrypt64(18438253731135327627), + this.instances5.alice.encrypt64(18438253731135327623), ); - expect(res).to.equal(4099); + expect(res).to.equal(false); }); - it('test operator "or" overload (euint64, euint16) => euint64 test 1 (50331680, 4099)', async function () { - const res = await this.contract3.or_euint64_euint16( - this.instances3.alice.encrypt64(50331680), - this.instances3.alice.encrypt16(4099), + it('test operator "ne" overload (euint64, euint64) => ebool test 1 (18445140354518938845, 18441391037965649995)', async function () { + const res = await this.contract5.ne_euint64_euint64( + this.instances5.alice.encrypt64(18445140354518938845), + this.instances5.alice.encrypt64(18441391037965649995), ); - expect(res).to.equal(50335779); + expect(res).to.equal(true); }); - it('test operator "or" overload (euint64, euint16) => euint64 test 2 (50331683, 4099)', async function () { - const res = await this.contract3.or_euint64_euint16( - this.instances3.alice.encrypt64(50331683), - this.instances3.alice.encrypt16(4099), + it('test operator "ne" overload (euint64, euint64) => ebool test 2 (18441391037965649991, 18441391037965649995)', async function () { + const res = await this.contract5.ne_euint64_euint64( + this.instances5.alice.encrypt64(18441391037965649991), + this.instances5.alice.encrypt64(18441391037965649995), ); - expect(res).to.equal(50335779); + expect(res).to.equal(true); }); - it('test operator "xor" overload (euint64, euint16) => euint64 test 1 (50331683, 4099)', async function () { - const res = await this.contract3.xor_euint64_euint16( - this.instances3.alice.encrypt64(50331683), - this.instances3.alice.encrypt16(4099), + it('test operator "ne" overload (euint64, euint64) => ebool test 3 (18441391037965649995, 18441391037965649995)', async function () { + const res = await this.contract5.ne_euint64_euint64( + this.instances5.alice.encrypt64(18441391037965649995), + this.instances5.alice.encrypt64(18441391037965649995), ); - expect(res).to.equal(50335776); + expect(res).to.equal(false); }); - it('test operator "eq" overload (euint64, euint16) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.eq_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4096), + it('test operator "ne" overload (euint64, euint64) => ebool test 4 (18441391037965649995, 18441391037965649991)', async function () { + const res = await this.contract5.ne_euint64_euint64( + this.instances5.alice.encrypt64(18441391037965649995), + this.instances5.alice.encrypt64(18441391037965649991), ); expect(res).to.equal(true); }); - it('test operator "eq" overload (euint64, euint16) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.eq_euint64_euint16( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt16(4096), + it('test operator "ge" overload (euint64, euint64) => ebool test 1 (18444991478795579145, 18445260307161364245)', async function () { + const res = await this.contract5.ge_euint64_euint64( + this.instances5.alice.encrypt64(18444991478795579145), + this.instances5.alice.encrypt64(18445260307161364245), ); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint64, euint16) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.ne_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4096), + it('test operator "ge" overload (euint64, euint64) => ebool test 2 (18444991478795579141, 18444991478795579145)', async function () { + const res = await this.contract5.ge_euint64_euint64( + this.instances5.alice.encrypt64(18444991478795579141), + this.instances5.alice.encrypt64(18444991478795579145), ); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint64, euint16) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.ne_euint64_euint16( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt16(4096), + it('test operator "ge" overload (euint64, euint64) => ebool test 3 (18444991478795579145, 18444991478795579145)', async function () { + const res = await this.contract5.ge_euint64_euint64( + this.instances5.alice.encrypt64(18444991478795579145), + this.instances5.alice.encrypt64(18444991478795579145), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint64, euint16) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.ge_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4096), + it('test operator "ge" overload (euint64, euint64) => ebool test 4 (18444991478795579145, 18444991478795579141)', async function () { + const res = await this.contract5.ge_euint64_euint64( + this.instances5.alice.encrypt64(18444991478795579145), + this.instances5.alice.encrypt64(18444991478795579141), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint64, euint16) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.ge_euint64_euint16( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt16(4096), + it('test operator "gt" overload (euint64, euint64) => ebool test 1 (18439787790330435145, 18439484090308827429)', async function () { + const res = await this.contract5.gt_euint64_euint64( + this.instances5.alice.encrypt64(18439787790330435145), + this.instances5.alice.encrypt64(18439484090308827429), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint64, euint16) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract3.ge_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4097), + it('test operator "gt" overload (euint64, euint64) => ebool test 2 (18439484090308827425, 18439484090308827429)', async function () { + const res = await this.contract5.gt_euint64_euint64( + this.instances5.alice.encrypt64(18439484090308827425), + this.instances5.alice.encrypt64(18439484090308827429), ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint64, euint16) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.gt_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4096), + it('test operator "gt" overload (euint64, euint64) => ebool test 3 (18439484090308827429, 18439484090308827429)', async function () { + const res = await this.contract5.gt_euint64_euint64( + this.instances5.alice.encrypt64(18439484090308827429), + this.instances5.alice.encrypt64(18439484090308827429), ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint64, euint16) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.gt_euint64_euint16( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt16(4096), + it('test operator "gt" overload (euint64, euint64) => ebool test 4 (18439484090308827429, 18439484090308827425)', async function () { + const res = await this.contract5.gt_euint64_euint64( + this.instances5.alice.encrypt64(18439484090308827429), + this.instances5.alice.encrypt64(18439484090308827425), ); expect(res).to.equal(true); }); - it('test operator "gt" overload (euint64, euint16) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract3.gt_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4097), - ); - expect(res).to.equal(false); - }); - - it('test operator "le" overload (euint64, euint16) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.le_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4096), + it('test operator "le" overload (euint64, euint64) => ebool test 1 (18440769778451615393, 18446070761608442971)', async function () { + const res = await this.contract5.le_euint64_euint64( + this.instances5.alice.encrypt64(18440769778451615393), + this.instances5.alice.encrypt64(18446070761608442971), ); expect(res).to.equal(true); }); - it('test operator "le" overload (euint64, euint16) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.le_euint64_euint16( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt16(4096), + it('test operator "le" overload (euint64, euint64) => ebool test 2 (18440769778451615389, 18440769778451615393)', async function () { + const res = await this.contract5.le_euint64_euint64( + this.instances5.alice.encrypt64(18440769778451615389), + this.instances5.alice.encrypt64(18440769778451615393), ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "le" overload (euint64, euint16) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract3.le_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4097), + it('test operator "le" overload (euint64, euint64) => ebool test 3 (18440769778451615393, 18440769778451615393)', async function () { + const res = await this.contract5.le_euint64_euint64( + this.instances5.alice.encrypt64(18440769778451615393), + this.instances5.alice.encrypt64(18440769778451615393), ); expect(res).to.equal(true); }); - it('test operator "lt" overload (euint64, euint16) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.lt_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4096), + it('test operator "le" overload (euint64, euint64) => ebool test 4 (18440769778451615393, 18440769778451615389)', async function () { + const res = await this.contract5.le_euint64_euint64( + this.instances5.alice.encrypt64(18440769778451615393), + this.instances5.alice.encrypt64(18440769778451615389), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint64, euint16) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.lt_euint64_euint16( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt16(4096), + it('test operator "lt" overload (euint64, euint64) => ebool test 1 (18446718131340158589, 18444160910497783341)', async function () { + const res = await this.contract5.lt_euint64_euint64( + this.instances5.alice.encrypt64(18446718131340158589), + this.instances5.alice.encrypt64(18444160910497783341), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint64, euint16) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract3.lt_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4097), + it('test operator "lt" overload (euint64, euint64) => ebool test 2 (18444160910497783337, 18444160910497783341)', async function () { + const res = await this.contract5.lt_euint64_euint64( + this.instances5.alice.encrypt64(18444160910497783337), + this.instances5.alice.encrypt64(18444160910497783341), ); expect(res).to.equal(true); }); - it('test operator "min" overload (euint64, euint16) => euint64 test 1 (4096, 4096)', async function () { - const res = await this.contract3.min_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4096), + it('test operator "lt" overload (euint64, euint64) => ebool test 3 (18444160910497783341, 18444160910497783341)', async function () { + const res = await this.contract5.lt_euint64_euint64( + this.instances5.alice.encrypt64(18444160910497783341), + this.instances5.alice.encrypt64(18444160910497783341), ); - expect(res).to.equal(4096); + expect(res).to.equal(false); }); - it('test operator "min" overload (euint64, euint16) => euint64 test 2 (16781312, 4096)', async function () { - const res = await this.contract3.min_euint64_euint16( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt16(4096), + it('test operator "lt" overload (euint64, euint64) => ebool test 4 (18444160910497783341, 18444160910497783337)', async function () { + const res = await this.contract5.lt_euint64_euint64( + this.instances5.alice.encrypt64(18444160910497783341), + this.instances5.alice.encrypt64(18444160910497783337), ); - expect(res).to.equal(4096); + expect(res).to.equal(false); }); - it('test operator "min" overload (euint64, euint16) => euint64 test 3 (4096, 4097)', async function () { - const res = await this.contract3.min_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4097), + it('test operator "min" overload (euint64, euint64) => euint64 test 1 (18444400472074074345, 18442962239103377481)', async function () { + const res = await this.contract5.min_euint64_euint64( + this.instances5.alice.encrypt64(18444400472074074345), + this.instances5.alice.encrypt64(18442962239103377481), ); - expect(res).to.equal(4096); + expect(res).to.equal(18442962239103377481n); }); - it('test operator "max" overload (euint64, euint16) => euint64 test 1 (4096, 4096)', async function () { - const res = await this.contract3.max_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4096), + it('test operator "min" overload (euint64, euint64) => euint64 test 2 (18442962239103377477, 18442962239103377481)', async function () { + const res = await this.contract5.min_euint64_euint64( + this.instances5.alice.encrypt64(18442962239103377477), + this.instances5.alice.encrypt64(18442962239103377481), ); - expect(res).to.equal(4096); + expect(res).to.equal(18442962239103377477n); }); - it('test operator "max" overload (euint64, euint16) => euint64 test 2 (16781312, 4096)', async function () { - const res = await this.contract3.max_euint64_euint16( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt16(4096), + it('test operator "min" overload (euint64, euint64) => euint64 test 3 (18442962239103377481, 18442962239103377481)', async function () { + const res = await this.contract5.min_euint64_euint64( + this.instances5.alice.encrypt64(18442962239103377481), + this.instances5.alice.encrypt64(18442962239103377481), ); - expect(res).to.equal(16781312); + expect(res).to.equal(18442962239103377481n); }); - it('test operator "max" overload (euint64, euint16) => euint64 test 3 (4096, 4097)', async function () { - const res = await this.contract3.max_euint64_euint16( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt16(4097), + it('test operator "min" overload (euint64, euint64) => euint64 test 4 (18442962239103377481, 18442962239103377477)', async function () { + const res = await this.contract5.min_euint64_euint64( + this.instances5.alice.encrypt64(18442962239103377481), + this.instances5.alice.encrypt64(18442962239103377477), ); - expect(res).to.equal(4097); + expect(res).to.equal(18442962239103377477n); }); - it('test operator "add" overload (euint64, euint32) => euint64 test 1 (50335779, 4099)', async function () { - const res = await this.contract3.add_euint64_euint32( - this.instances3.alice.encrypt64(50335779), - this.instances3.alice.encrypt32(4099), + it('test operator "max" overload (euint64, euint64) => euint64 test 1 (18440739371866435289, 18438298584940765731)', async function () { + const res = await this.contract5.max_euint64_euint64( + this.instances5.alice.encrypt64(18440739371866435289), + this.instances5.alice.encrypt64(18438298584940765731), ); - expect(res).to.equal(50339878); + expect(res).to.equal(18440739371866435289n); }); - it('test operator "sub" overload (euint64, euint32) => euint64 test 1 (50335779, 4099)', async function () { - const res = await this.contract3.sub_euint64_euint32( - this.instances3.alice.encrypt64(50335779), - this.instances3.alice.encrypt32(4099), + it('test operator "max" overload (euint64, euint64) => euint64 test 2 (18438298584940765727, 18438298584940765731)', async function () { + const res = await this.contract5.max_euint64_euint64( + this.instances5.alice.encrypt64(18438298584940765727), + this.instances5.alice.encrypt64(18438298584940765731), ); - expect(res).to.equal(50331680); + expect(res).to.equal(18438298584940765731n); }); - it('test operator "mul" overload (euint64, euint32) => euint64 test 1 (50335779, 3)', async function () { - const res = await this.contract3.mul_euint64_euint32( - this.instances3.alice.encrypt64(50335779), - this.instances3.alice.encrypt32(3), + it('test operator "max" overload (euint64, euint64) => euint64 test 3 (18438298584940765731, 18438298584940765731)', async function () { + const res = await this.contract5.max_euint64_euint64( + this.instances5.alice.encrypt64(18438298584940765731), + this.instances5.alice.encrypt64(18438298584940765731), ); - expect(res).to.equal(151007337); + expect(res).to.equal(18438298584940765731n); }); - it('test operator "and" overload (euint64, euint32) => euint64 test 1 (50335776, 3)', async function () { - const res = await this.contract3.and_euint64_euint32( - this.instances3.alice.encrypt64(50335776), - this.instances3.alice.encrypt32(3), + it('test operator "max" overload (euint64, euint64) => euint64 test 4 (18438298584940765731, 18438298584940765727)', async function () { + const res = await this.contract5.max_euint64_euint64( + this.instances5.alice.encrypt64(18438298584940765731), + this.instances5.alice.encrypt64(18438298584940765727), ); - expect(res).to.equal(0); + expect(res).to.equal(18438298584940765731n); }); - it('test operator "and" overload (euint64, euint32) => euint64 test 2 (50335779, 4099)', async function () { - const res = await this.contract3.and_euint64_euint32( - this.instances3.alice.encrypt64(50335779), - this.instances3.alice.encrypt32(4099), + it('test operator "add" overload (euint64, uint64) => euint64 test 1 (9223329218882461797, 9220956803715422232)', async function () { + const res = await this.contract5.add_euint64_uint64( + this.instances5.alice.encrypt64(9223329218882461797), + 9220956803715422232, ); - expect(res).to.equal(4099); + expect(res).to.equal(18444286022597884029n); }); - it('test operator "or" overload (euint64, euint32) => euint64 test 1 (50331680, 4099)', async function () { - const res = await this.contract3.or_euint64_euint32( - this.instances3.alice.encrypt64(50331680), - this.instances3.alice.encrypt32(4099), + it('test operator "add" overload (euint64, uint64) => euint64 test 2 (9219964371310000509, 9219964371310000511)', async function () { + const res = await this.contract5.add_euint64_uint64( + this.instances5.alice.encrypt64(9219964371310000509), + 9219964371310000511, ); - expect(res).to.equal(50335779); + expect(res).to.equal(18439928742620001020n); }); - it('test operator "or" overload (euint64, euint32) => euint64 test 2 (50331683, 4099)', async function () { - const res = await this.contract3.or_euint64_euint32( - this.instances3.alice.encrypt64(50331683), - this.instances3.alice.encrypt32(4099), + it('test operator "add" overload (euint64, uint64) => euint64 test 3 (9219964371310000511, 9219964371310000511)', async function () { + const res = await this.contract5.add_euint64_uint64( + this.instances5.alice.encrypt64(9219964371310000511), + 9219964371310000511, ); - expect(res).to.equal(50335779); + expect(res).to.equal(18439928742620001022n); }); - it('test operator "xor" overload (euint64, euint32) => euint64 test 1 (50331683, 4099)', async function () { - const res = await this.contract3.xor_euint64_euint32( - this.instances3.alice.encrypt64(50331683), - this.instances3.alice.encrypt32(4099), + it('test operator "add" overload (euint64, uint64) => euint64 test 4 (9219964371310000511, 9219964371310000509)', async function () { + const res = await this.contract5.add_euint64_uint64( + this.instances5.alice.encrypt64(9219964371310000511), + 9219964371310000509, ); - expect(res).to.equal(50335776); + expect(res).to.equal(18439928742620001020n); }); - it('test operator "eq" overload (euint64, euint32) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.eq_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4096), + it('test operator "add" overload (uint64, euint64) => euint64 test 1 (9219177655732910821, 9220956803715422232)', async function () { + const res = await this.contract5.add_uint64_euint64( + 9219177655732910821, + this.instances5.alice.encrypt64(9220956803715422232), ); - expect(res).to.equal(true); + expect(res).to.equal(18440134459448333053n); }); - it('test operator "eq" overload (euint64, euint32) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.eq_euint64_euint32( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt32(4096), + it('test operator "add" overload (uint64, euint64) => euint64 test 2 (9219964371310000509, 9219964371310000511)', async function () { + const res = await this.contract5.add_uint64_euint64( + 9219964371310000509, + this.instances5.alice.encrypt64(9219964371310000511), ); - expect(res).to.equal(false); + expect(res).to.equal(18439928742620001020n); }); - it('test operator "ne" overload (euint64, euint32) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.ne_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4096), + it('test operator "add" overload (uint64, euint64) => euint64 test 3 (9219964371310000511, 9219964371310000511)', async function () { + const res = await this.contract5.add_uint64_euint64( + 9219964371310000511, + this.instances5.alice.encrypt64(9219964371310000511), ); - expect(res).to.equal(false); + expect(res).to.equal(18439928742620001022n); }); - it('test operator "ne" overload (euint64, euint32) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.ne_euint64_euint32( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt32(4096), + it('test operator "add" overload (uint64, euint64) => euint64 test 4 (9219964371310000511, 9219964371310000509)', async function () { + const res = await this.contract5.add_uint64_euint64( + 9219964371310000511, + this.instances5.alice.encrypt64(9219964371310000509), ); - expect(res).to.equal(true); + expect(res).to.equal(18439928742620001020n); }); - it('test operator "ge" overload (euint64, euint32) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.ge_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4096), + it('test operator "sub" overload (euint64, uint64) => euint64 test 1 (18445117613821089157, 18445117613821089157)', async function () { + const res = await this.contract5.sub_euint64_uint64( + this.instances5.alice.encrypt64(18445117613821089157), + 18445117613821089157, ); - expect(res).to.equal(true); + expect(res).to.equal(0n); }); - it('test operator "ge" overload (euint64, euint32) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.ge_euint64_euint32( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt32(4096), + it('test operator "sub" overload (euint64, uint64) => euint64 test 2 (18445117613821089157, 18445117613821089153)', async function () { + const res = await this.contract5.sub_euint64_uint64( + this.instances5.alice.encrypt64(18445117613821089157), + 18445117613821089153, ); - expect(res).to.equal(true); + expect(res).to.equal(4n); }); - it('test operator "ge" overload (euint64, euint32) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract3.ge_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4097), + it('test operator "sub" overload (uint64, euint64) => euint64 test 1 (18445117613821089157, 18445117613821089157)', async function () { + const res = await this.contract5.sub_uint64_euint64( + 18445117613821089157, + this.instances5.alice.encrypt64(18445117613821089157), ); - expect(res).to.equal(false); + expect(res).to.equal(0n); }); - it('test operator "gt" overload (euint64, euint32) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.gt_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4096), + it('test operator "sub" overload (uint64, euint64) => euint64 test 2 (18445117613821089157, 18445117613821089153)', async function () { + const res = await this.contract5.sub_uint64_euint64( + 18445117613821089157, + this.instances5.alice.encrypt64(18445117613821089153), ); - expect(res).to.equal(false); + expect(res).to.equal(4n); }); - it('test operator "gt" overload (euint64, euint32) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.gt_euint64_euint32( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt32(4096), - ); - expect(res).to.equal(true); + it('test operator "mul" overload (euint64, uint64) => euint64 test 1 (4294635170, 4293232253)', async function () { + const res = await this.contract5.mul_euint64_uint64(this.instances5.alice.encrypt64(4294635170), 4293232253); + expect(res).to.equal(18437866226712138010n); }); - it('test operator "gt" overload (euint64, euint32) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract3.gt_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4097), - ); - expect(res).to.equal(false); + it('test operator "mul" overload (euint64, uint64) => euint64 test 2 (4293288604, 4293288604)', async function () { + const res = await this.contract5.mul_euint64_uint64(this.instances5.alice.encrypt64(4293288604), 4293288604); + expect(res).to.equal(18432327037236268816n); }); - it('test operator "le" overload (euint64, euint32) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.le_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4096), - ); - expect(res).to.equal(true); + it('test operator "mul" overload (euint64, uint64) => euint64 test 3 (4293288604, 4293288604)', async function () { + const res = await this.contract5.mul_euint64_uint64(this.instances5.alice.encrypt64(4293288604), 4293288604); + expect(res).to.equal(18432327037236268816n); }); - it('test operator "le" overload (euint64, euint32) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.le_euint64_euint32( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt32(4096), - ); - expect(res).to.equal(false); + it('test operator "mul" overload (euint64, uint64) => euint64 test 4 (4293288604, 4293288604)', async function () { + const res = await this.contract5.mul_euint64_uint64(this.instances5.alice.encrypt64(4293288604), 4293288604); + expect(res).to.equal(18432327037236268816n); }); - it('test operator "le" overload (euint64, euint32) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract3.le_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4097), - ); - expect(res).to.equal(true); + it('test operator "mul" overload (uint64, euint64) => euint64 test 1 (4294226236, 4293232253)', async function () { + const res = await this.contract5.mul_uint64_euint64(4294226236, this.instances5.alice.encrypt64(4293232253)); + expect(res).to.equal(18436110578073989708n); }); - it('test operator "lt" overload (euint64, euint32) => ebool test 1 (4096, 4096)', async function () { - const res = await this.contract3.lt_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4096), - ); - expect(res).to.equal(false); + it('test operator "mul" overload (uint64, euint64) => euint64 test 2 (4293288604, 4293288604)', async function () { + const res = await this.contract5.mul_uint64_euint64(4293288604, this.instances5.alice.encrypt64(4293288604)); + expect(res).to.equal(18432327037236268816n); + }); + + it('test operator "mul" overload (uint64, euint64) => euint64 test 3 (4293288604, 4293288604)', async function () { + const res = await this.contract5.mul_uint64_euint64(4293288604, this.instances5.alice.encrypt64(4293288604)); + expect(res).to.equal(18432327037236268816n); + }); + + it('test operator "mul" overload (uint64, euint64) => euint64 test 4 (4293288604, 4293288604)', async function () { + const res = await this.contract5.mul_uint64_euint64(4293288604, this.instances5.alice.encrypt64(4293288604)); + expect(res).to.equal(18432327037236268816n); }); - it('test operator "lt" overload (euint64, euint32) => ebool test 2 (16781312, 4096)', async function () { - const res = await this.contract3.lt_euint64_euint32( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt32(4096), + it('test operator "div" overload (euint64, uint64) => euint64 test 1 (18441976837575510865, 18441212274805422577)', async function () { + const res = await this.contract5.div_euint64_uint64( + this.instances5.alice.encrypt64(18441976837575510865), + 18441212274805422577, ); - expect(res).to.equal(false); + expect(res).to.equal(1n); }); - it('test operator "lt" overload (euint64, euint32) => ebool test 3 (4096, 4097)', async function () { - const res = await this.contract3.lt_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4097), + it('test operator "div" overload (euint64, uint64) => euint64 test 2 (18441976837575510861, 18441976837575510865)', async function () { + const res = await this.contract5.div_euint64_uint64( + this.instances5.alice.encrypt64(18441976837575510861), + 18441976837575510865, ); - expect(res).to.equal(true); + expect(res).to.equal(0n); }); - it('test operator "min" overload (euint64, euint32) => euint64 test 1 (4096, 4096)', async function () { - const res = await this.contract3.min_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4096), + it('test operator "div" overload (euint64, uint64) => euint64 test 3 (18441976837575510865, 18441976837575510865)', async function () { + const res = await this.contract5.div_euint64_uint64( + this.instances5.alice.encrypt64(18441976837575510865), + 18441976837575510865, ); - expect(res).to.equal(4096); + expect(res).to.equal(1n); }); - it('test operator "min" overload (euint64, euint32) => euint64 test 2 (16781312, 4096)', async function () { - const res = await this.contract3.min_euint64_euint32( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt32(4096), + it('test operator "div" overload (euint64, uint64) => euint64 test 4 (18441976837575510865, 18441976837575510861)', async function () { + const res = await this.contract5.div_euint64_uint64( + this.instances5.alice.encrypt64(18441976837575510865), + 18441976837575510861, ); - expect(res).to.equal(4096); + expect(res).to.equal(1n); }); - it('test operator "min" overload (euint64, euint32) => euint64 test 3 (4096, 4097)', async function () { - const res = await this.contract3.min_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4097), + it('test operator "rem" overload (euint64, uint64) => euint64 test 1 (18443785129295236141, 18441307989286811147)', async function () { + const res = await this.contract5.rem_euint64_uint64( + this.instances5.alice.encrypt64(18443785129295236141), + 18441307989286811147, ); - expect(res).to.equal(4096); + expect(res).to.equal(2477140008424994n); }); - it('test operator "max" overload (euint64, euint32) => euint64 test 1 (4096, 4096)', async function () { - const res = await this.contract3.max_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4096), + it('test operator "rem" overload (euint64, uint64) => euint64 test 2 (18438390548915069819, 18438390548915069823)', async function () { + const res = await this.contract5.rem_euint64_uint64( + this.instances5.alice.encrypt64(18438390548915069819), + 18438390548915069823, ); - expect(res).to.equal(4096); + expect(res).to.equal(18438390548915069819n); }); - it('test operator "max" overload (euint64, euint32) => euint64 test 2 (16781312, 4096)', async function () { - const res = await this.contract3.max_euint64_euint32( - this.instances3.alice.encrypt64(16781312), - this.instances3.alice.encrypt32(4096), + it('test operator "rem" overload (euint64, uint64) => euint64 test 3 (18438390548915069823, 18438390548915069823)', async function () { + const res = await this.contract5.rem_euint64_uint64( + this.instances5.alice.encrypt64(18438390548915069823), + 18438390548915069823, ); - expect(res).to.equal(16781312); + expect(res).to.equal(0n); }); - it('test operator "max" overload (euint64, euint32) => euint64 test 3 (4096, 4097)', async function () { - const res = await this.contract3.max_euint64_euint32( - this.instances3.alice.encrypt64(4096), - this.instances3.alice.encrypt32(4097), + it('test operator "rem" overload (euint64, uint64) => euint64 test 4 (18438390548915069823, 18438390548915069819)', async function () { + const res = await this.contract5.rem_euint64_uint64( + this.instances5.alice.encrypt64(18438390548915069823), + 18438390548915069819, ); - expect(res).to.equal(4097); + expect(res).to.equal(4n); }); - it('test operator "add" overload (euint64, euint64) => euint64 test 1 (3280896, 1118208)', async function () { - const res = await this.contract3.add_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(1118208), + it('test operator "eq" overload (euint64, uint64) => ebool test 1 (18443330521266220729, 18446706410531688277)', async function () { + const res = await this.contract5.eq_euint64_uint64( + this.instances5.alice.encrypt64(18443330521266220729), + 18446706410531688277, ); - expect(res).to.equal(4399104); + expect(res).to.equal(false); }); - it('test operator "sub" overload (euint64, euint64) => euint64 test 1 (3280896, 1118208)', async function () { - const res = await this.contract3.sub_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(1118208), + it('test operator "eq" overload (euint64, uint64) => ebool test 2 (18438253731135327623, 18438253731135327627)', async function () { + const res = await this.contract5.eq_euint64_uint64( + this.instances5.alice.encrypt64(18438253731135327623), + 18438253731135327627, ); - expect(res).to.equal(2162688); + expect(res).to.equal(false); }); - it('test operator "mul" overload (euint64, euint64) => euint64 test 1 (3280896, 32)', async function () { - const res = await this.contract3.mul_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(32), + it('test operator "eq" overload (euint64, uint64) => ebool test 3 (18438253731135327627, 18438253731135327627)', async function () { + const res = await this.contract5.eq_euint64_uint64( + this.instances5.alice.encrypt64(18438253731135327627), + 18438253731135327627, ); - expect(res).to.equal(104988672); + expect(res).to.equal(true); }); - it('test operator "and" overload (euint64, euint64) => euint64 test 1 (3280896, 1409286144)', async function () { - const res = await this.contract3.and_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(1409286144), + it('test operator "eq" overload (euint64, uint64) => ebool test 4 (18438253731135327627, 18438253731135327623)', async function () { + const res = await this.contract5.eq_euint64_uint64( + this.instances5.alice.encrypt64(18438253731135327627), + 18438253731135327623, ); - expect(res).to.equal(0); + expect(res).to.equal(false); }); - it('test operator "and" overload (euint64, euint64) => euint64 test 2 (3280896, 1409482752)', async function () { - const res = await this.contract3.and_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(1409482752), + it('test operator "eq" overload (uint64, euint64) => ebool test 1 (18444395277752785729, 18446706410531688277)', async function () { + const res = await this.contract5.eq_uint64_euint64( + 18444395277752785729, + this.instances5.alice.encrypt64(18446706410531688277), ); - expect(res).to.equal(131072); + expect(res).to.equal(false); }); - it('test operator "or" overload (euint64, euint64) => euint64 test 1 (3280896, 1409286144)', async function () { - const res = await this.contract3.or_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(1409286144), + it('test operator "eq" overload (uint64, euint64) => ebool test 2 (18438253731135327623, 18438253731135327627)', async function () { + const res = await this.contract5.eq_uint64_euint64( + 18438253731135327623, + this.instances5.alice.encrypt64(18438253731135327627), ); - expect(res).to.equal(1412567040); + expect(res).to.equal(false); }); - it('test operator "or" overload (euint64, euint64) => euint64 test 2 (3280896, 1409482752)', async function () { - const res = await this.contract3.or_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(1409482752), + it('test operator "eq" overload (uint64, euint64) => ebool test 3 (18438253731135327627, 18438253731135327627)', async function () { + const res = await this.contract5.eq_uint64_euint64( + 18438253731135327627, + this.instances5.alice.encrypt64(18438253731135327627), ); - expect(res).to.equal(1412632576); + expect(res).to.equal(true); }); - it('test operator "xor" overload (euint64, euint64) => euint64 test 1 (3280896, 1409286144)', async function () { - const res = await this.contract3.xor_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(1409286144), + it('test operator "eq" overload (uint64, euint64) => ebool test 4 (18438253731135327627, 18438253731135327623)', async function () { + const res = await this.contract5.eq_uint64_euint64( + 18438253731135327627, + this.instances5.alice.encrypt64(18438253731135327623), ); - expect(res).to.equal(1412567040); + expect(res).to.equal(false); }); - it('test operator "xor" overload (euint64, euint64) => euint64 test 2 (3280896, 1409482752)', async function () { - const res = await this.contract3.xor_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(1409482752), + it('test operator "ne" overload (euint64, uint64) => ebool test 1 (18445140354518938845, 18438176226766160787)', async function () { + const res = await this.contract5.ne_euint64_uint64( + this.instances5.alice.encrypt64(18445140354518938845), + 18438176226766160787, ); - expect(res).to.equal(1412501504); + expect(res).to.equal(true); }); - it('test operator "eq" overload (euint64, euint64) => ebool test 1 (3280896, 3280896)', async function () { - const res = await this.contract3.eq_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280896), + it('test operator "ne" overload (euint64, uint64) => ebool test 2 (18441391037965649991, 18441391037965649995)', async function () { + const res = await this.contract5.ne_euint64_uint64( + this.instances5.alice.encrypt64(18441391037965649991), + 18441391037965649995, ); expect(res).to.equal(true); }); - it('test operator "eq" overload (euint64, euint64) => ebool test 2 (3280896, 3280897)', async function () { - const res = await this.contract3.eq_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280897), + it('test operator "ne" overload (euint64, uint64) => ebool test 3 (18441391037965649995, 18441391037965649995)', async function () { + const res = await this.contract5.ne_euint64_uint64( + this.instances5.alice.encrypt64(18441391037965649995), + 18441391037965649995, ); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint64, euint64) => ebool test 1 (3280896, 3280896)', async function () { - const res = await this.contract3.ne_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280896), + it('test operator "ne" overload (euint64, uint64) => ebool test 4 (18441391037965649995, 18441391037965649991)', async function () { + const res = await this.contract5.ne_euint64_uint64( + this.instances5.alice.encrypt64(18441391037965649995), + 18441391037965649991, ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "ne" overload (euint64, euint64) => ebool test 2 (3280896, 3280897)', async function () { - const res = await this.contract3.ne_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280897), + it('test operator "ne" overload (uint64, euint64) => ebool test 1 (18443547473224968383, 18438176226766160787)', async function () { + const res = await this.contract5.ne_uint64_euint64( + 18443547473224968383, + this.instances5.alice.encrypt64(18438176226766160787), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint64, euint64) => ebool test 1 (3280896, 3280896)', async function () { - const res = await this.contract3.ge_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280896), + it('test operator "ne" overload (uint64, euint64) => ebool test 2 (18441391037965649991, 18441391037965649995)', async function () { + const res = await this.contract5.ne_uint64_euint64( + 18441391037965649991, + this.instances5.alice.encrypt64(18441391037965649995), ); expect(res).to.equal(true); }); - it('test operator "ge" overload (euint64, euint64) => ebool test 2 (3280896, 3280897)', async function () { - const res = await this.contract3.ge_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280897), + it('test operator "ne" overload (uint64, euint64) => ebool test 3 (18441391037965649995, 18441391037965649995)', async function () { + const res = await this.contract5.ne_uint64_euint64( + 18441391037965649995, + this.instances5.alice.encrypt64(18441391037965649995), ); expect(res).to.equal(false); }); - it('test operator "ge" overload (euint64, euint64) => ebool test 3 (3280896, 3280895)', async function () { - const res = await this.contract3.ge_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280895), + it('test operator "ne" overload (uint64, euint64) => ebool test 4 (18441391037965649995, 18441391037965649991)', async function () { + const res = await this.contract5.ne_uint64_euint64( + 18441391037965649995, + this.instances5.alice.encrypt64(18441391037965649991), ); expect(res).to.equal(true); }); - it('test operator "gt" overload (euint64, euint64) => ebool test 1 (3280896, 3280896)', async function () { - const res = await this.contract3.gt_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280896), + it('test operator "ge" overload (euint64, uint64) => ebool test 1 (18444991478795579145, 18439567451994245465)', async function () { + const res = await this.contract5.ge_euint64_uint64( + this.instances5.alice.encrypt64(18444991478795579145), + 18439567451994245465, ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "gt" overload (euint64, euint64) => ebool test 2 (3280896, 3280897)', async function () { - const res = await this.contract3.gt_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280897), + it('test operator "ge" overload (euint64, uint64) => ebool test 2 (18444991478795579141, 18444991478795579145)', async function () { + const res = await this.contract5.ge_euint64_uint64( + this.instances5.alice.encrypt64(18444991478795579141), + 18444991478795579145, ); expect(res).to.equal(false); }); - it('test operator "gt" overload (euint64, euint64) => ebool test 3 (3280896, 3280895)', async function () { - const res = await this.contract3.gt_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280895), + it('test operator "ge" overload (euint64, uint64) => ebool test 3 (18444991478795579145, 18444991478795579145)', async function () { + const res = await this.contract5.ge_euint64_uint64( + this.instances5.alice.encrypt64(18444991478795579145), + 18444991478795579145, ); expect(res).to.equal(true); }); - it('test operator "le" overload (euint64, euint64) => ebool test 1 (3280896, 3280896)', async function () { - const res = await this.contract3.le_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280896), + it('test operator "ge" overload (euint64, uint64) => ebool test 4 (18444991478795579145, 18444991478795579141)', async function () { + const res = await this.contract5.ge_euint64_uint64( + this.instances5.alice.encrypt64(18444991478795579145), + 18444991478795579141, ); expect(res).to.equal(true); }); - it('test operator "le" overload (euint64, euint64) => ebool test 2 (3280896, 3280897)', async function () { - const res = await this.contract3.le_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280897), + it('test operator "ge" overload (uint64, euint64) => ebool test 1 (18444429093181704535, 18439567451994245465)', async function () { + const res = await this.contract5.ge_uint64_euint64( + 18444429093181704535, + this.instances5.alice.encrypt64(18439567451994245465), ); expect(res).to.equal(true); }); - it('test operator "le" overload (euint64, euint64) => ebool test 3 (3280896, 3280895)', async function () { - const res = await this.contract3.le_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280895), + it('test operator "ge" overload (uint64, euint64) => ebool test 2 (18444991478795579141, 18444991478795579145)', async function () { + const res = await this.contract5.ge_uint64_euint64( + 18444991478795579141, + this.instances5.alice.encrypt64(18444991478795579145), ); expect(res).to.equal(false); }); - it('test operator "lt" overload (euint64, euint64) => ebool test 1 (3280896, 3280896)', async function () { - const res = await this.contract3.lt_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280896), + it('test operator "ge" overload (uint64, euint64) => ebool test 3 (18444991478795579145, 18444991478795579145)', async function () { + const res = await this.contract5.ge_uint64_euint64( + 18444991478795579145, + this.instances5.alice.encrypt64(18444991478795579145), ); - expect(res).to.equal(false); + expect(res).to.equal(true); }); - it('test operator "lt" overload (euint64, euint64) => ebool test 2 (3280896, 3280897)', async function () { - const res = await this.contract3.lt_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280897), + it('test operator "ge" overload (uint64, euint64) => ebool test 4 (18444991478795579145, 18444991478795579141)', async function () { + const res = await this.contract5.ge_uint64_euint64( + 18444991478795579145, + this.instances5.alice.encrypt64(18444991478795579141), ); expect(res).to.equal(true); }); - it('test operator "lt" overload (euint64, euint64) => ebool test 3 (3280896, 3280895)', async function () { - const res = await this.contract3.lt_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280895), + it('test operator "gt" overload (euint64, uint64) => ebool test 1 (18439787790330435145, 18441907321511169065)', async function () { + const res = await this.contract5.gt_euint64_uint64( + this.instances5.alice.encrypt64(18439787790330435145), + 18441907321511169065, ); expect(res).to.equal(false); }); - it('test operator "min" overload (euint64, euint64) => euint64 test 1 (3280896, 3280896)', async function () { - const res = await this.contract3.min_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280896), + it('test operator "gt" overload (euint64, uint64) => ebool test 2 (18439484090308827425, 18439484090308827429)', async function () { + const res = await this.contract5.gt_euint64_uint64( + this.instances5.alice.encrypt64(18439484090308827425), + 18439484090308827429, ); - expect(res).to.equal(3280896); + expect(res).to.equal(false); }); - it('test operator "min" overload (euint64, euint64) => euint64 test 2 (3280896, 3280897)', async function () { - const res = await this.contract3.min_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280897), + it('test operator "gt" overload (euint64, uint64) => ebool test 3 (18439484090308827429, 18439484090308827429)', async function () { + const res = await this.contract5.gt_euint64_uint64( + this.instances5.alice.encrypt64(18439484090308827429), + 18439484090308827429, ); - expect(res).to.equal(3280896); + expect(res).to.equal(false); }); - it('test operator "min" overload (euint64, euint64) => euint64 test 3 (3280896, 3280895)', async function () { - const res = await this.contract3.min_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280895), + it('test operator "gt" overload (euint64, uint64) => ebool test 4 (18439484090308827429, 18439484090308827425)', async function () { + const res = await this.contract5.gt_euint64_uint64( + this.instances5.alice.encrypt64(18439484090308827429), + 18439484090308827425, ); - expect(res).to.equal(3280895); + expect(res).to.equal(true); }); - it('test operator "max" overload (euint64, euint64) => euint64 test 1 (3280896, 3280896)', async function () { - const res = await this.contract3.max_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280896), + it('test operator "gt" overload (uint64, euint64) => ebool test 1 (18438935380134710315, 18441907321511169065)', async function () { + const res = await this.contract5.gt_uint64_euint64( + 18438935380134710315, + this.instances5.alice.encrypt64(18441907321511169065), ); - expect(res).to.equal(3280896); + expect(res).to.equal(false); }); - it('test operator "max" overload (euint64, euint64) => euint64 test 2 (3280896, 3280897)', async function () { - const res = await this.contract3.max_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280897), + it('test operator "gt" overload (uint64, euint64) => ebool test 2 (18439484090308827425, 18439484090308827429)', async function () { + const res = await this.contract5.gt_uint64_euint64( + 18439484090308827425, + this.instances5.alice.encrypt64(18439484090308827429), ); - expect(res).to.equal(3280897); + expect(res).to.equal(false); }); - it('test operator "max" overload (euint64, euint64) => euint64 test 3 (3280896, 3280895)', async function () { - const res = await this.contract3.max_euint64_euint64( - this.instances3.alice.encrypt64(3280896), - this.instances3.alice.encrypt64(3280895), + it('test operator "gt" overload (uint64, euint64) => ebool test 3 (18439484090308827429, 18439484090308827429)', async function () { + const res = await this.contract5.gt_uint64_euint64( + 18439484090308827429, + this.instances5.alice.encrypt64(18439484090308827429), ); - expect(res).to.equal(3280896); - }); - - it('test operator "add" overload (euint64, uint64) => euint64 test 1 (3416064, 3280896)', async function () { - const res = await this.contract3.add_euint64_uint64(this.instances3.alice.encrypt64(3416064), 3280896); - expect(res).to.equal(6696960); - }); - - it('test operator "add" overload (uint64, euint64) => euint64 test 1 (3416064, 3280896)', async function () { - const res = await this.contract3.add_uint64_euint64(3416064, this.instances3.alice.encrypt64(3280896)); - expect(res).to.equal(6696960); + expect(res).to.equal(false); }); - it('test operator "sub" overload (euint64, uint64) => euint64 test 1 (3416064, 3280896)', async function () { - const res = await this.contract3.sub_euint64_uint64(this.instances3.alice.encrypt64(3416064), 3280896); - expect(res).to.equal(135168); + it('test operator "gt" overload (uint64, euint64) => ebool test 4 (18439484090308827429, 18439484090308827425)', async function () { + const res = await this.contract5.gt_uint64_euint64( + 18439484090308827429, + this.instances5.alice.encrypt64(18439484090308827425), + ); + expect(res).to.equal(true); }); - it('test operator "sub" overload (uint64, euint64) => euint64 test 1 (3416064, 3280896)', async function () { - const res = await this.contract3.sub_uint64_euint64(3416064, this.instances3.alice.encrypt64(3280896)); - expect(res).to.equal(135168); + it('test operator "le" overload (euint64, uint64) => ebool test 1 (18440769778451615393, 18439065451314752761)', async function () { + const res = await this.contract5.le_euint64_uint64( + this.instances5.alice.encrypt64(18440769778451615393), + 18439065451314752761, + ); + expect(res).to.equal(false); }); - it('test operator "mul" overload (euint64, uint64) => euint64 test 1 (3416064, 256)', async function () { - const res = await this.contract4.mul_euint64_uint64(this.instances4.alice.encrypt64(3416064), 256); - expect(res).to.equal(874512384); + it('test operator "le" overload (euint64, uint64) => ebool test 2 (18440769778451615389, 18440769778451615393)', async function () { + const res = await this.contract5.le_euint64_uint64( + this.instances5.alice.encrypt64(18440769778451615389), + 18440769778451615393, + ); + expect(res).to.equal(true); }); - it('test operator "mul" overload (uint64, euint64) => euint64 test 1 (3416064, 256)', async function () { - const res = await this.contract4.mul_uint64_euint64(3416064, this.instances4.alice.encrypt64(256)); - expect(res).to.equal(874512384); + it('test operator "le" overload (euint64, uint64) => ebool test 3 (18440769778451615393, 18440769778451615393)', async function () { + const res = await this.contract5.le_euint64_uint64( + this.instances5.alice.encrypt64(18440769778451615393), + 18440769778451615393, + ); + expect(res).to.equal(true); }); - it('test operator "div" overload (euint64, uint64) => euint64 test 1 (3416064, 256)', async function () { - const res = await this.contract4.div_euint64_uint64(this.instances4.alice.encrypt64(3416064), 256); - expect(res).to.equal(13344); + it('test operator "le" overload (euint64, uint64) => ebool test 4 (18440769778451615393, 18440769778451615389)', async function () { + const res = await this.contract5.le_euint64_uint64( + this.instances5.alice.encrypt64(18440769778451615393), + 18440769778451615389, + ); + expect(res).to.equal(false); }); - it('test operator "rem" overload (euint64, uint64) => euint64 test 1 (3416121, 256)', async function () { - const res = await this.contract4.rem_euint64_uint64(this.instances4.alice.encrypt64(3416121), 256); - expect(res).to.equal(57); + it('test operator "le" overload (uint64, euint64) => ebool test 1 (18440980092932624951, 18439065451314752761)', async function () { + const res = await this.contract5.le_uint64_euint64( + 18440980092932624951, + this.instances5.alice.encrypt64(18439065451314752761), + ); + expect(res).to.equal(false); }); - it('test operator "eq" overload (euint64, uint64) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.eq_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416064); + it('test operator "le" overload (uint64, euint64) => ebool test 2 (18440769778451615389, 18440769778451615393)', async function () { + const res = await this.contract5.le_uint64_euint64( + 18440769778451615389, + this.instances5.alice.encrypt64(18440769778451615393), + ); expect(res).to.equal(true); }); - it('test operator "eq" overload (euint64, uint64) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.eq_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416065); - expect(res).to.equal(false); - }); - - it('test operator "eq" overload (uint64, euint64) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.eq_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416064)); + it('test operator "le" overload (uint64, euint64) => ebool test 3 (18440769778451615393, 18440769778451615393)', async function () { + const res = await this.contract5.le_uint64_euint64( + 18440769778451615393, + this.instances5.alice.encrypt64(18440769778451615393), + ); expect(res).to.equal(true); }); - it('test operator "eq" overload (uint64, euint64) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.eq_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416065)); + it('test operator "le" overload (uint64, euint64) => ebool test 4 (18440769778451615393, 18440769778451615389)', async function () { + const res = await this.contract5.le_uint64_euint64( + 18440769778451615393, + this.instances5.alice.encrypt64(18440769778451615389), + ); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint64, uint64) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.ne_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416064); + it('test operator "lt" overload (euint64, uint64) => ebool test 1 (18446718131340158589, 18438438177494413269)', async function () { + const res = await this.contract5.lt_euint64_uint64( + this.instances5.alice.encrypt64(18446718131340158589), + 18438438177494413269, + ); expect(res).to.equal(false); }); - it('test operator "ne" overload (euint64, uint64) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.ne_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416065); + it('test operator "lt" overload (euint64, uint64) => ebool test 2 (18444160910497783337, 18444160910497783341)', async function () { + const res = await this.contract5.lt_euint64_uint64( + this.instances5.alice.encrypt64(18444160910497783337), + 18444160910497783341, + ); expect(res).to.equal(true); }); - it('test operator "ne" overload (uint64, euint64) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.ne_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416064)); + it('test operator "lt" overload (euint64, uint64) => ebool test 3 (18444160910497783341, 18444160910497783341)', async function () { + const res = await this.contract5.lt_euint64_uint64( + this.instances5.alice.encrypt64(18444160910497783341), + 18444160910497783341, + ); expect(res).to.equal(false); }); - it('test operator "ne" overload (uint64, euint64) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.ne_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416065)); - expect(res).to.equal(true); - }); - - it('test operator "ge" overload (euint64, uint64) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.ge_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416064); - expect(res).to.equal(true); + it('test operator "lt" overload (euint64, uint64) => ebool test 4 (18444160910497783341, 18444160910497783337)', async function () { + const res = await this.contract5.lt_euint64_uint64( + this.instances5.alice.encrypt64(18444160910497783341), + 18444160910497783337, + ); + expect(res).to.equal(false); }); - it('test operator "ge" overload (euint64, uint64) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.ge_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416065); + it('test operator "lt" overload (uint64, euint64) => ebool test 1 (18445719507413937869, 18438438177494413269)', async function () { + const res = await this.contract5.lt_uint64_euint64( + 18445719507413937869, + this.instances5.alice.encrypt64(18438438177494413269), + ); expect(res).to.equal(false); }); - it('test operator "ge" overload (euint64, uint64) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract4.ge_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416063); + it('test operator "lt" overload (uint64, euint64) => ebool test 2 (18444160910497783337, 18444160910497783341)', async function () { + const res = await this.contract5.lt_uint64_euint64( + 18444160910497783337, + this.instances5.alice.encrypt64(18444160910497783341), + ); expect(res).to.equal(true); }); - it('test operator "ge" overload (uint64, euint64) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.ge_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416064)); - expect(res).to.equal(true); + it('test operator "lt" overload (uint64, euint64) => ebool test 3 (18444160910497783341, 18444160910497783341)', async function () { + const res = await this.contract5.lt_uint64_euint64( + 18444160910497783341, + this.instances5.alice.encrypt64(18444160910497783341), + ); + expect(res).to.equal(false); }); - it('test operator "ge" overload (uint64, euint64) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.ge_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416065)); + it('test operator "lt" overload (uint64, euint64) => ebool test 4 (18444160910497783341, 18444160910497783337)', async function () { + const res = await this.contract5.lt_uint64_euint64( + 18444160910497783341, + this.instances5.alice.encrypt64(18444160910497783337), + ); expect(res).to.equal(false); }); - it('test operator "ge" overload (uint64, euint64) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract4.ge_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416063)); - expect(res).to.equal(true); + it('test operator "min" overload (euint64, uint64) => euint64 test 1 (18444400472074074345, 18445675871085860653)', async function () { + const res = await this.contract5.min_euint64_uint64( + this.instances5.alice.encrypt64(18444400472074074345), + 18445675871085860653, + ); + expect(res).to.equal(18444400472074074345n); }); - it('test operator "gt" overload (euint64, uint64) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.gt_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416064); - expect(res).to.equal(false); + it('test operator "min" overload (euint64, uint64) => euint64 test 2 (18442962239103377477, 18442962239103377481)', async function () { + const res = await this.contract5.min_euint64_uint64( + this.instances5.alice.encrypt64(18442962239103377477), + 18442962239103377481, + ); + expect(res).to.equal(18442962239103377477n); }); - it('test operator "gt" overload (euint64, uint64) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.gt_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416065); - expect(res).to.equal(false); + it('test operator "min" overload (euint64, uint64) => euint64 test 3 (18442962239103377481, 18442962239103377481)', async function () { + const res = await this.contract5.min_euint64_uint64( + this.instances5.alice.encrypt64(18442962239103377481), + 18442962239103377481, + ); + expect(res).to.equal(18442962239103377481n); }); - it('test operator "gt" overload (euint64, uint64) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract4.gt_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416063); - expect(res).to.equal(true); + it('test operator "min" overload (euint64, uint64) => euint64 test 4 (18442962239103377481, 18442962239103377477)', async function () { + const res = await this.contract5.min_euint64_uint64( + this.instances5.alice.encrypt64(18442962239103377481), + 18442962239103377477, + ); + expect(res).to.equal(18442962239103377477n); }); - it('test operator "gt" overload (uint64, euint64) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.gt_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416064)); - expect(res).to.equal(false); + it('test operator "min" overload (uint64, euint64) => euint64 test 1 (18443908139931756717, 18445675871085860653)', async function () { + const res = await this.contract5.min_uint64_euint64( + 18443908139931756717, + this.instances5.alice.encrypt64(18445675871085860653), + ); + expect(res).to.equal(18443908139931756717n); }); - it('test operator "gt" overload (uint64, euint64) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.gt_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416065)); - expect(res).to.equal(false); + it('test operator "min" overload (uint64, euint64) => euint64 test 2 (18442962239103377477, 18442962239103377481)', async function () { + const res = await this.contract5.min_uint64_euint64( + 18442962239103377477, + this.instances5.alice.encrypt64(18442962239103377481), + ); + expect(res).to.equal(18442962239103377477n); }); - it('test operator "gt" overload (uint64, euint64) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract4.gt_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416063)); - expect(res).to.equal(true); + it('test operator "min" overload (uint64, euint64) => euint64 test 3 (18442962239103377481, 18442962239103377481)', async function () { + const res = await this.contract5.min_uint64_euint64( + 18442962239103377481, + this.instances5.alice.encrypt64(18442962239103377481), + ); + expect(res).to.equal(18442962239103377481n); }); - it('test operator "le" overload (euint64, uint64) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.le_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416064); - expect(res).to.equal(true); + it('test operator "min" overload (uint64, euint64) => euint64 test 4 (18442962239103377481, 18442962239103377477)', async function () { + const res = await this.contract5.min_uint64_euint64( + 18442962239103377481, + this.instances5.alice.encrypt64(18442962239103377477), + ); + expect(res).to.equal(18442962239103377477n); }); - it('test operator "le" overload (euint64, uint64) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.le_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416065); - expect(res).to.equal(true); + it('test operator "max" overload (euint64, uint64) => euint64 test 1 (18440739371866435289, 18440643015791741637)', async function () { + const res = await this.contract5.max_euint64_uint64( + this.instances5.alice.encrypt64(18440739371866435289), + 18440643015791741637, + ); + expect(res).to.equal(18440739371866435289n); }); - it('test operator "le" overload (euint64, uint64) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract4.le_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416063); - expect(res).to.equal(false); + it('test operator "max" overload (euint64, uint64) => euint64 test 2 (18438298584940765727, 18438298584940765731)', async function () { + const res = await this.contract5.max_euint64_uint64( + this.instances5.alice.encrypt64(18438298584940765727), + 18438298584940765731, + ); + expect(res).to.equal(18438298584940765731n); }); - it('test operator "le" overload (uint64, euint64) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.le_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416064)); - expect(res).to.equal(true); + it('test operator "max" overload (euint64, uint64) => euint64 test 3 (18438298584940765731, 18438298584940765731)', async function () { + const res = await this.contract5.max_euint64_uint64( + this.instances5.alice.encrypt64(18438298584940765731), + 18438298584940765731, + ); + expect(res).to.equal(18438298584940765731n); }); - it('test operator "le" overload (uint64, euint64) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.le_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416065)); - expect(res).to.equal(true); + it('test operator "max" overload (euint64, uint64) => euint64 test 4 (18438298584940765731, 18438298584940765727)', async function () { + const res = await this.contract5.max_euint64_uint64( + this.instances5.alice.encrypt64(18438298584940765731), + 18438298584940765727, + ); + expect(res).to.equal(18438298584940765731n); }); - it('test operator "le" overload (uint64, euint64) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract4.le_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416063)); - expect(res).to.equal(false); + it('test operator "max" overload (uint64, euint64) => euint64 test 1 (18441357041435050863, 18440643015791741637)', async function () { + const res = await this.contract5.max_uint64_euint64( + 18441357041435050863, + this.instances5.alice.encrypt64(18440643015791741637), + ); + expect(res).to.equal(18441357041435050863n); }); - it('test operator "lt" overload (euint64, uint64) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.lt_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416064); - expect(res).to.equal(false); + it('test operator "max" overload (uint64, euint64) => euint64 test 2 (18438298584940765727, 18438298584940765731)', async function () { + const res = await this.contract5.max_uint64_euint64( + 18438298584940765727, + this.instances5.alice.encrypt64(18438298584940765731), + ); + expect(res).to.equal(18438298584940765731n); }); - it('test operator "lt" overload (euint64, uint64) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.lt_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416065); - expect(res).to.equal(true); + it('test operator "max" overload (uint64, euint64) => euint64 test 3 (18438298584940765731, 18438298584940765731)', async function () { + const res = await this.contract5.max_uint64_euint64( + 18438298584940765731, + this.instances5.alice.encrypt64(18438298584940765731), + ); + expect(res).to.equal(18438298584940765731n); }); - it('test operator "lt" overload (euint64, uint64) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract4.lt_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416063); - expect(res).to.equal(false); + it('test operator "max" overload (uint64, euint64) => euint64 test 4 (18438298584940765731, 18438298584940765727)', async function () { + const res = await this.contract5.max_uint64_euint64( + 18438298584940765731, + this.instances5.alice.encrypt64(18438298584940765727), + ); + expect(res).to.equal(18438298584940765731n); }); - it('test operator "lt" overload (uint64, euint64) => ebool test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.lt_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416064)); - expect(res).to.equal(false); + it('test operator "shl" overload (euint4, uint8) => euint4 test 1 (13, 5)', async function () { + const res = await this.contract5.shl_euint4_uint8(this.instances5.alice.encrypt4(13), 5); + expect(res).to.equal(10); }); - it('test operator "lt" overload (uint64, euint64) => ebool test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.lt_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416065)); - expect(res).to.equal(true); + it('test operator "shl" overload (euint4, uint8) => euint4 test 2 (4, 8)', async function () { + const res = await this.contract5.shl_euint4_uint8(this.instances5.alice.encrypt4(4), 8); + expect(res).to.equal(4); }); - it('test operator "lt" overload (uint64, euint64) => ebool test 3 (3416064, 3416063)', async function () { - const res = await this.contract4.lt_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416063)); - expect(res).to.equal(false); + it('test operator "shl" overload (euint4, uint8) => euint4 test 3 (8, 8)', async function () { + const res = await this.contract5.shl_euint4_uint8(this.instances5.alice.encrypt4(8), 8); + expect(res).to.equal(8); + }); + + it('test operator "shl" overload (euint4, uint8) => euint4 test 4 (8, 4)', async function () { + const res = await this.contract5.shl_euint4_uint8(this.instances5.alice.encrypt4(8), 4); + expect(res).to.equal(8); }); - it('test operator "min" overload (euint64, uint64) => euint64 test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.min_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416064); - expect(res).to.equal(3416064); + it('test operator "shr" overload (euint4, uint8) => euint4 test 1 (14, 4)', async function () { + const res = await this.contract5.shr_euint4_uint8(this.instances5.alice.encrypt4(14), 4); + expect(res).to.equal(14); }); - it('test operator "min" overload (euint64, uint64) => euint64 test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.min_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416065); - expect(res).to.equal(3416064); + it('test operator "shr" overload (euint4, uint8) => euint4 test 2 (4, 8)', async function () { + const res = await this.contract5.shr_euint4_uint8(this.instances5.alice.encrypt4(4), 8); + expect(res).to.equal(4); }); - it('test operator "min" overload (euint64, uint64) => euint64 test 3 (3416064, 3416063)', async function () { - const res = await this.contract4.min_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416063); - expect(res).to.equal(3416063); + it('test operator "shr" overload (euint4, uint8) => euint4 test 3 (8, 8)', async function () { + const res = await this.contract5.shr_euint4_uint8(this.instances5.alice.encrypt4(8), 8); + expect(res).to.equal(8); }); - it('test operator "min" overload (uint64, euint64) => euint64 test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.min_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416064)); - expect(res).to.equal(3416064); + it('test operator "shr" overload (euint4, uint8) => euint4 test 4 (8, 4)', async function () { + const res = await this.contract5.shr_euint4_uint8(this.instances5.alice.encrypt4(8), 4); + expect(res).to.equal(8); }); - it('test operator "min" overload (uint64, euint64) => euint64 test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.min_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416065)); - expect(res).to.equal(3416064); + it('test operator "shl" overload (euint8, euint8) => euint8 test 1 (34, 4)', async function () { + const res = await this.contract5.shl_euint8_euint8( + this.instances5.alice.encrypt8(34), + this.instances5.alice.encrypt8(4), + ); + expect(res).to.equal(32); }); - it('test operator "min" overload (uint64, euint64) => euint64 test 3 (3416064, 3416063)', async function () { - const res = await this.contract4.min_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416063)); - expect(res).to.equal(3416063); + it('test operator "shl" overload (euint8, euint8) => euint8 test 2 (4, 8)', async function () { + const res = await this.contract5.shl_euint8_euint8( + this.instances5.alice.encrypt8(4), + this.instances5.alice.encrypt8(8), + ); + expect(res).to.equal(4); }); - it('test operator "max" overload (euint64, uint64) => euint64 test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.max_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416064); - expect(res).to.equal(3416064); + it('test operator "shl" overload (euint8, euint8) => euint8 test 3 (8, 8)', async function () { + const res = await this.contract5.shl_euint8_euint8( + this.instances5.alice.encrypt8(8), + this.instances5.alice.encrypt8(8), + ); + expect(res).to.equal(8); }); - it('test operator "max" overload (euint64, uint64) => euint64 test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.max_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416065); - expect(res).to.equal(3416065); + it('test operator "shl" overload (euint8, euint8) => euint8 test 4 (8, 4)', async function () { + const res = await this.contract5.shl_euint8_euint8( + this.instances5.alice.encrypt8(8), + this.instances5.alice.encrypt8(4), + ); + expect(res).to.equal(128); }); - it('test operator "max" overload (euint64, uint64) => euint64 test 3 (3416064, 3416063)', async function () { - const res = await this.contract4.max_euint64_uint64(this.instances4.alice.encrypt64(3416064), 3416063); - expect(res).to.equal(3416064); + it('test operator "shl" overload (euint8, uint8) => euint8 test 1 (34, 4)', async function () { + const res = await this.contract5.shl_euint8_uint8(this.instances5.alice.encrypt8(34), 4); + expect(res).to.equal(32); }); - it('test operator "max" overload (uint64, euint64) => euint64 test 1 (3416064, 3416064)', async function () { - const res = await this.contract4.max_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416064)); - expect(res).to.equal(3416064); + it('test operator "shl" overload (euint8, uint8) => euint8 test 2 (4, 8)', async function () { + const res = await this.contract5.shl_euint8_uint8(this.instances5.alice.encrypt8(4), 8); + expect(res).to.equal(4); }); - it('test operator "max" overload (uint64, euint64) => euint64 test 2 (3416064, 3416065)', async function () { - const res = await this.contract4.max_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416065)); - expect(res).to.equal(3416065); + it('test operator "shl" overload (euint8, uint8) => euint8 test 3 (8, 8)', async function () { + const res = await this.contract5.shl_euint8_uint8(this.instances5.alice.encrypt8(8), 8); + expect(res).to.equal(8); }); - it('test operator "max" overload (uint64, euint64) => euint64 test 3 (3416064, 3416063)', async function () { - const res = await this.contract4.max_uint64_euint64(3416064, this.instances4.alice.encrypt64(3416063)); - expect(res).to.equal(3416064); + it('test operator "shl" overload (euint8, uint8) => euint8 test 4 (8, 4)', async function () { + const res = await this.contract5.shl_euint8_uint8(this.instances5.alice.encrypt8(8), 4); + expect(res).to.equal(128); }); - it('test operator "shl" overload (euint8, euint8) => euint8 test 1 (2, 1)', async function () { - const res = await this.contract4.shl_euint8_euint8( - this.instances4.alice.encrypt8(2), - this.instances4.alice.encrypt8(1), + it('test operator "shr" overload (euint8, euint8) => euint8 test 1 (68, 4)', async function () { + const res = await this.contract5.shr_euint8_euint8( + this.instances5.alice.encrypt8(68), + this.instances5.alice.encrypt8(4), ); expect(res).to.equal(4); }); - it('test operator "shl" overload (euint8, euint8) => euint8 test 2 (2, 4)', async function () { - const res = await this.contract4.shl_euint8_euint8( - this.instances4.alice.encrypt8(2), - this.instances4.alice.encrypt8(4), + it('test operator "shr" overload (euint8, euint8) => euint8 test 2 (4, 8)', async function () { + const res = await this.contract5.shr_euint8_euint8( + this.instances5.alice.encrypt8(4), + this.instances5.alice.encrypt8(8), ); - expect(res).to.equal(32); + expect(res).to.equal(4); }); - it('test operator "shl" overload (euint8, uint8) => euint8 test 1 (16, 1)', async function () { - const res = await this.contract4.shl_euint8_uint8(this.instances4.alice.encrypt8(16), 1); - expect(res).to.equal(32); + it('test operator "shr" overload (euint8, euint8) => euint8 test 3 (8, 8)', async function () { + const res = await this.contract5.shr_euint8_euint8( + this.instances5.alice.encrypt8(8), + this.instances5.alice.encrypt8(8), + ); + expect(res).to.equal(8); }); - it('test operator "shl" overload (euint8, uint8) => euint8 test 2 (16, 2)', async function () { - const res = await this.contract4.shl_euint8_uint8(this.instances4.alice.encrypt8(16), 2); - expect(res).to.equal(64); + it('test operator "shr" overload (euint8, euint8) => euint8 test 4 (8, 4)', async function () { + const res = await this.contract5.shr_euint8_euint8( + this.instances5.alice.encrypt8(8), + this.instances5.alice.encrypt8(4), + ); + expect(res).to.equal(0); }); - it('test operator "shr" overload (euint8, euint8) => euint8 test 1 (2, 1)', async function () { - const res = await this.contract4.shr_euint8_euint8( - this.instances4.alice.encrypt8(2), - this.instances4.alice.encrypt8(1), - ); - expect(res).to.equal(1); + it('test operator "shr" overload (euint8, uint8) => euint8 test 1 (68, 4)', async function () { + const res = await this.contract5.shr_euint8_uint8(this.instances5.alice.encrypt8(68), 4); + expect(res).to.equal(4); }); - it('test operator "shr" overload (euint8, euint8) => euint8 test 2 (32, 4)', async function () { - const res = await this.contract4.shr_euint8_euint8( - this.instances4.alice.encrypt8(32), - this.instances4.alice.encrypt8(4), - ); - expect(res).to.equal(2); + it('test operator "shr" overload (euint8, uint8) => euint8 test 2 (4, 8)', async function () { + const res = await this.contract5.shr_euint8_uint8(this.instances5.alice.encrypt8(4), 8); + expect(res).to.equal(4); }); - it('test operator "shr" overload (euint8, uint8) => euint8 test 1 (16, 1)', async function () { - const res = await this.contract4.shr_euint8_uint8(this.instances4.alice.encrypt8(16), 1); + it('test operator "shr" overload (euint8, uint8) => euint8 test 3 (8, 8)', async function () { + const res = await this.contract5.shr_euint8_uint8(this.instances5.alice.encrypt8(8), 8); expect(res).to.equal(8); }); - it('test operator "shr" overload (euint8, uint8) => euint8 test 2 (16, 2)', async function () { - const res = await this.contract4.shr_euint8_uint8(this.instances4.alice.encrypt8(16), 2); - expect(res).to.equal(4); + it('test operator "shr" overload (euint8, uint8) => euint8 test 4 (8, 4)', async function () { + const res = await this.contract5.shr_euint8_uint8(this.instances5.alice.encrypt8(8), 4); + expect(res).to.equal(0); }); - it('test operator "shl" overload (euint16, euint8) => euint16 test 1 (4112, 2)', async function () { - const res = await this.contract4.shl_euint16_euint8( - this.instances4.alice.encrypt16(4112), - this.instances4.alice.encrypt8(2), + it('test operator "shl" overload (euint16, euint8) => euint16 test 1 (15362, 2)', async function () { + const res = await this.contract5.shl_euint16_euint8( + this.instances5.alice.encrypt16(15362), + this.instances5.alice.encrypt8(2), ); - expect(res).to.equal(16448); + expect(res).to.equal(61448); }); - it('test operator "shl" overload (euint16, uint8) => euint16 test 1 (4112, 2)', async function () { - const res = await this.contract4.shl_euint16_uint8(this.instances4.alice.encrypt16(4112), 2); - expect(res).to.equal(16448); + it('test operator "shl" overload (euint16, euint8) => euint16 test 2 (4, 8)', async function () { + const res = await this.contract5.shl_euint16_euint8( + this.instances5.alice.encrypt16(4), + this.instances5.alice.encrypt8(8), + ); + expect(res).to.equal(1024); }); - it('test operator "shr" overload (euint16, euint8) => euint16 test 1 (4112, 2)', async function () { - const res = await this.contract4.shr_euint16_euint8( - this.instances4.alice.encrypt16(4112), - this.instances4.alice.encrypt8(2), + it('test operator "shl" overload (euint16, euint8) => euint16 test 3 (8, 8)', async function () { + const res = await this.contract5.shl_euint16_euint8( + this.instances5.alice.encrypt16(8), + this.instances5.alice.encrypt8(8), ); - expect(res).to.equal(1028); + expect(res).to.equal(2048); }); - it('test operator "shr" overload (euint16, uint8) => euint16 test 1 (4112, 2)', async function () { - const res = await this.contract4.shr_euint16_uint8(this.instances4.alice.encrypt16(4112), 2); - expect(res).to.equal(1028); + it('test operator "shl" overload (euint16, euint8) => euint16 test 4 (8, 4)', async function () { + const res = await this.contract5.shl_euint16_euint8( + this.instances5.alice.encrypt16(8), + this.instances5.alice.encrypt8(4), + ); + expect(res).to.equal(128); }); - it('test operator "shl" overload (euint32, euint8) => euint32 test 1 (50397184, 3)', async function () { - const res = await this.contract4.shl_euint32_euint8( - this.instances4.alice.encrypt32(50397184), - this.instances4.alice.encrypt8(3), - ); - expect(res).to.equal(403177472); + it('test operator "shl" overload (euint16, uint8) => euint16 test 1 (15362, 2)', async function () { + const res = await this.contract5.shl_euint16_uint8(this.instances5.alice.encrypt16(15362), 2); + expect(res).to.equal(61448); }); - it('test operator "shl" overload (euint32, uint8) => euint32 test 1 (50397184, 3)', async function () { - const res = await this.contract4.shl_euint32_uint8(this.instances4.alice.encrypt32(50397184), 3); - expect(res).to.equal(403177472); + it('test operator "shl" overload (euint16, uint8) => euint16 test 2 (4, 8)', async function () { + const res = await this.contract5.shl_euint16_uint8(this.instances5.alice.encrypt16(4), 8); + expect(res).to.equal(1024); }); - it('test operator "shr" overload (euint32, euint8) => euint32 test 1 (50397184, 3)', async function () { - const res = await this.contract4.shr_euint32_euint8( - this.instances4.alice.encrypt32(50397184), - this.instances4.alice.encrypt8(3), - ); - expect(res).to.equal(6299648); + it('test operator "shl" overload (euint16, uint8) => euint16 test 3 (8, 8)', async function () { + const res = await this.contract5.shl_euint16_uint8(this.instances5.alice.encrypt16(8), 8); + expect(res).to.equal(2048); }); - it('test operator "shr" overload (euint32, uint8) => euint32 test 1 (50397184, 3)', async function () { - const res = await this.contract4.shr_euint32_uint8(this.instances4.alice.encrypt32(50397184), 3); - expect(res).to.equal(6299648); + it('test operator "shl" overload (euint16, uint8) => euint16 test 4 (8, 4)', async function () { + const res = await this.contract5.shl_euint16_uint8(this.instances5.alice.encrypt16(8), 4); + expect(res).to.equal(128); }); - it('test operator "shl" overload (euint64, euint8) => euint64 test 1 (50397184, 3)', async function () { - const res = await this.contract4.shl_euint64_euint8( - this.instances4.alice.encrypt64(50397184), - this.instances4.alice.encrypt8(3), + it('test operator "shr" overload (euint16, euint8) => euint16 test 1 (25648, 5)', async function () { + const res = await this.contract5.shr_euint16_euint8( + this.instances5.alice.encrypt16(25648), + this.instances5.alice.encrypt8(5), ); - expect(res).to.equal(403177472); + expect(res).to.equal(801); }); - it('test operator "shl" overload (euint64, uint8) => euint64 test 1 (50397184, 3)', async function () { - const res = await this.contract4.shl_euint64_uint8(this.instances4.alice.encrypt64(50397184), 3); - expect(res).to.equal(403177472); + it('test operator "shr" overload (euint16, euint8) => euint16 test 2 (4, 8)', async function () { + const res = await this.contract5.shr_euint16_euint8( + this.instances5.alice.encrypt16(4), + this.instances5.alice.encrypt8(8), + ); + expect(res).to.equal(0); }); - it('test operator "shr" overload (euint64, euint8) => euint64 test 1 (50397184, 3)', async function () { - const res = await this.contract4.shr_euint64_euint8( - this.instances4.alice.encrypt64(50397184), - this.instances4.alice.encrypt8(3), + it('test operator "shr" overload (euint16, euint8) => euint16 test 3 (8, 8)', async function () { + const res = await this.contract5.shr_euint16_euint8( + this.instances5.alice.encrypt16(8), + this.instances5.alice.encrypt8(8), ); - expect(res).to.equal(6299648); + expect(res).to.equal(0); }); - it('test operator "shr" overload (euint64, uint8) => euint64 test 1 (50397184, 3)', async function () { - const res = await this.contract4.shr_euint64_uint8(this.instances4.alice.encrypt64(50397184), 3); - expect(res).to.equal(6299648); + it('test operator "shr" overload (euint16, euint8) => euint16 test 4 (8, 4)', async function () { + const res = await this.contract5.shr_euint16_euint8( + this.instances5.alice.encrypt16(8), + this.instances5.alice.encrypt8(4), + ); + expect(res).to.equal(0); }); - it('test operator "neg" overload (euint8) => euint8 test 1 (1)', async function () { - const res = await this.contract4.neg_euint8(this.instances4.alice.encrypt8(1)); - expect(res).to.equal(255); + it('test operator "shr" overload (euint16, uint8) => euint16 test 1 (25648, 5)', async function () { + const res = await this.contract5.shr_euint16_uint8(this.instances5.alice.encrypt16(25648), 5); + expect(res).to.equal(801); }); - it('test operator "neg" overload (euint8) => euint8 test 2 (2)', async function () { - const res = await this.contract4.neg_euint8(this.instances4.alice.encrypt8(2)); - expect(res).to.equal(254); + it('test operator "shr" overload (euint16, uint8) => euint16 test 2 (4, 8)', async function () { + const res = await this.contract5.shr_euint16_uint8(this.instances5.alice.encrypt16(4), 8); + expect(res).to.equal(0); }); - it('test operator "not" overload (euint8) => euint8 test 1 (3)', async function () { - const res = await this.contract4.not_euint8(this.instances4.alice.encrypt8(3)); - expect(res).to.equal(252); + it('test operator "shr" overload (euint16, uint8) => euint16 test 3 (8, 8)', async function () { + const res = await this.contract5.shr_euint16_uint8(this.instances5.alice.encrypt16(8), 8); + expect(res).to.equal(0); }); - it('test operator "neg" overload (euint16) => euint16 test 1 (1)', async function () { - const res = await this.contract4.neg_euint16(this.instances4.alice.encrypt16(1)); - expect(res).to.equal(65535); + it('test operator "shr" overload (euint16, uint8) => euint16 test 4 (8, 4)', async function () { + const res = await this.contract5.shr_euint16_uint8(this.instances5.alice.encrypt16(8), 4); + expect(res).to.equal(0); }); - it('test operator "neg" overload (euint16) => euint16 test 2 (2)', async function () { - const res = await this.contract4.neg_euint16(this.instances4.alice.encrypt16(2)); - expect(res).to.equal(65534); + it('test operator "shl" overload (euint32, euint8) => euint32 test 1 (833510670, 1)', async function () { + const res = await this.contract5.shl_euint32_euint8( + this.instances5.alice.encrypt32(833510670), + this.instances5.alice.encrypt8(1), + ); + expect(res).to.equal(1667021340); }); - it('test operator "not" overload (euint16) => euint16 test 1 (241)', async function () { - const res = await this.contract4.not_euint16(this.instances4.alice.encrypt16(241)); - expect(res).to.equal(65294); + it('test operator "shl" overload (euint32, euint8) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract5.shl_euint32_euint8( + this.instances5.alice.encrypt32(4), + this.instances5.alice.encrypt8(8), + ); + expect(res).to.equal(1024); }); - it('test operator "neg" overload (euint32) => euint32 test 1 (1)', async function () { - const res = await this.contract4.neg_euint32(this.instances4.alice.encrypt32(1)); - expect(res).to.equal(4294967295); + it('test operator "shl" overload (euint32, euint8) => euint32 test 3 (8, 8)', async function () { + const res = await this.contract5.shl_euint32_euint8( + this.instances5.alice.encrypt32(8), + this.instances5.alice.encrypt8(8), + ); + expect(res).to.equal(2048); }); - it('test operator "neg" overload (euint32) => euint32 test 2 (2)', async function () { - const res = await this.contract4.neg_euint32(this.instances4.alice.encrypt32(2)); - expect(res).to.equal(4294967294); + it('test operator "shl" overload (euint32, euint8) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract5.shl_euint32_euint8( + this.instances5.alice.encrypt32(8), + this.instances5.alice.encrypt8(4), + ); + expect(res).to.equal(128); }); - it('test operator "not" overload (euint32) => euint32 test 1 (65534)', async function () { - const res = await this.contract4.not_euint32(this.instances4.alice.encrypt32(65534)); - expect(res).to.equal(4294901761); + it('test operator "shl" overload (euint32, uint8) => euint32 test 1 (833510670, 1)', async function () { + const res = await this.contract5.shl_euint32_uint8(this.instances5.alice.encrypt32(833510670), 1); + expect(res).to.equal(1667021340); }); - it('test operator "neg" overload (euint64) => euint64 test 1 (1)', async function () { - const res = await this.contract4.neg_euint64(this.instances4.alice.encrypt64(1)); - expect(res).to.equal(18446744073709551615n); + it('test operator "shl" overload (euint32, uint8) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract5.shl_euint32_uint8(this.instances5.alice.encrypt32(4), 8); + expect(res).to.equal(1024); }); - it('test operator "neg" overload (euint64) => euint64 test 2 (2)', async function () { - const res = await this.contract4.neg_euint64(this.instances4.alice.encrypt64(2)); - expect(res).to.equal(18446744073709551614n); + it('test operator "shl" overload (euint32, uint8) => euint32 test 3 (8, 8)', async function () { + const res = await this.contract5.shl_euint32_uint8(this.instances5.alice.encrypt32(8), 8); + expect(res).to.equal(2048); }); - it('test operator "not" overload (euint64) => euint64 test 1 (65534)', async function () { - const res = await this.contract4.not_euint64(this.instances4.alice.encrypt64(65534)); - expect(res).to.equal(18446744073709486081n); + it('test operator "shl" overload (euint32, uint8) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract5.shl_euint32_uint8(this.instances5.alice.encrypt32(8), 4); + expect(res).to.equal(128); }); - it('test operator "bin_op_add" overload (euint8, euint8) => euint8 test 1 (3, 4)', async function () { - const res = await this.contract4.bin_op_add_euint8_euint8( - this.instances4.alice.encrypt8(3), - this.instances4.alice.encrypt8(4), + it('test operator "shr" overload (euint32, euint8) => euint32 test 1 (3957313401, 6)', async function () { + const res = await this.contract5.shr_euint32_euint8( + this.instances5.alice.encrypt32(3957313401), + this.instances5.alice.encrypt8(6), ); - expect(res).to.equal(7); + expect(res).to.equal(61833021); }); - it('test operator "bin_op_sub" overload (euint8, euint8) => euint8 test 1 (4, 3)', async function () { - const res = await this.contract4.bin_op_sub_euint8_euint8( - this.instances4.alice.encrypt8(4), - this.instances4.alice.encrypt8(3), + it('test operator "shr" overload (euint32, euint8) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract5.shr_euint32_euint8( + this.instances5.alice.encrypt32(4), + this.instances5.alice.encrypt8(8), ); - expect(res).to.equal(1); + expect(res).to.equal(0); }); - it('test operator "bin_op_mul" overload (euint8, euint8) => euint8 test 1 (4, 3)', async function () { - const res = await this.contract4.bin_op_mul_euint8_euint8( - this.instances4.alice.encrypt8(4), - this.instances4.alice.encrypt8(3), + it('test operator "shr" overload (euint32, euint8) => euint32 test 3 (8, 8)', async function () { + const res = await this.contract5.shr_euint32_euint8( + this.instances5.alice.encrypt32(8), + this.instances5.alice.encrypt8(8), ); - expect(res).to.equal(12); + expect(res).to.equal(0); }); - it('test operator "bin_op_and" overload (euint8, euint8) => euint8 test 1 (239, 240)', async function () { - const res = await this.contract4.bin_op_and_euint8_euint8( - this.instances4.alice.encrypt8(239), - this.instances4.alice.encrypt8(240), + it('test operator "shr" overload (euint32, euint8) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract5.shr_euint32_euint8( + this.instances5.alice.encrypt32(8), + this.instances5.alice.encrypt8(4), ); - expect(res).to.equal(224); + expect(res).to.equal(0); }); - it('test operator "bin_op_or" overload (euint8, euint8) => euint8 test 1 (239, 240)', async function () { - const res = await this.contract4.bin_op_or_euint8_euint8( - this.instances4.alice.encrypt8(239), - this.instances4.alice.encrypt8(240), - ); - expect(res).to.equal(255); + it('test operator "shr" overload (euint32, uint8) => euint32 test 1 (3957313401, 6)', async function () { + const res = await this.contract5.shr_euint32_uint8(this.instances5.alice.encrypt32(3957313401), 6); + expect(res).to.equal(61833021); }); - it('test operator "bin_op_xor" overload (euint8, euint8) => euint8 test 1 (239, 240)', async function () { - const res = await this.contract4.bin_op_xor_euint8_euint8( - this.instances4.alice.encrypt8(239), - this.instances4.alice.encrypt8(240), - ); - expect(res).to.equal(31); + it('test operator "shr" overload (euint32, uint8) => euint32 test 2 (4, 8)', async function () { + const res = await this.contract5.shr_euint32_uint8(this.instances5.alice.encrypt32(4), 8); + expect(res).to.equal(0); }); - it('test operator "unary_op_neg" overload (euint8) => euint8 test 1 (2)', async function () { - const res = await this.contract4.unary_op_neg_euint8(this.instances4.alice.encrypt8(2)); - expect(res).to.equal(254); + it('test operator "shr" overload (euint32, uint8) => euint32 test 3 (8, 8)', async function () { + const res = await this.contract5.shr_euint32_uint8(this.instances5.alice.encrypt32(8), 8); + expect(res).to.equal(0); }); - it('test operator "unary_op_not" overload (euint8) => euint8 test 1 (15)', async function () { - const res = await this.contract4.unary_op_not_euint8(this.instances4.alice.encrypt8(15)); - expect(res).to.equal(240); + it('test operator "shr" overload (euint32, uint8) => euint32 test 4 (8, 4)', async function () { + const res = await this.contract5.shr_euint32_uint8(this.instances5.alice.encrypt32(8), 4); + expect(res).to.equal(0); }); - it('test operator "bin_op_add" overload (euint16, euint16) => euint16 test 1 (259, 516)', async function () { - const res = await this.contract4.bin_op_add_euint16_euint16( - this.instances4.alice.encrypt16(259), - this.instances4.alice.encrypt16(516), + it('test operator "shl" overload (euint64, euint8) => euint64 test 1 (18445451452906630791, 5)', async function () { + const res = await this.contract5.shl_euint64_euint8( + this.instances5.alice.encrypt64(18445451452906630791), + this.instances5.alice.encrypt8(5), ); - expect(res).to.equal(775); + expect(res).to.equal(18405380208016085000); }); - it('test operator "bin_op_sub" overload (euint16, euint16) => euint16 test 1 (516, 259)', async function () { - const res = await this.contract4.bin_op_sub_euint16_euint16( - this.instances4.alice.encrypt16(516), - this.instances4.alice.encrypt16(259), + it('test operator "shl" overload (euint64, euint8) => euint64 test 2 (4, 8)', async function () { + const res = await this.contract5.shl_euint64_euint8( + this.instances5.alice.encrypt64(4), + this.instances5.alice.encrypt8(8), ); - expect(res).to.equal(257); + expect(res).to.equal(1024); }); - it('test operator "bin_op_mul" overload (euint16, euint16) => euint16 test 1 (260, 3)', async function () { - const res = await this.contract4.bin_op_mul_euint16_euint16( - this.instances4.alice.encrypt16(260), - this.instances4.alice.encrypt16(3), + it('test operator "shl" overload (euint64, euint8) => euint64 test 3 (8, 8)', async function () { + const res = await this.contract5.shl_euint64_euint8( + this.instances5.alice.encrypt64(8), + this.instances5.alice.encrypt8(8), ); - expect(res).to.equal(780); + expect(res).to.equal(2048); }); - it('test operator "bin_op_and" overload (euint16, euint16) => euint16 test 1 (61423, 61680)', async function () { - const res = await this.contract4.bin_op_and_euint16_euint16( - this.instances4.alice.encrypt16(61423), - this.instances4.alice.encrypt16(61680), + it('test operator "shl" overload (euint64, euint8) => euint64 test 4 (8, 4)', async function () { + const res = await this.contract5.shl_euint64_euint8( + this.instances5.alice.encrypt64(8), + this.instances5.alice.encrypt8(4), ); - expect(res).to.equal(57568); + expect(res).to.equal(128); }); - it('test operator "bin_op_or" overload (euint16, euint16) => euint16 test 1 (61423, 496)', async function () { - const res = await this.contract4.bin_op_or_euint16_euint16( - this.instances4.alice.encrypt16(61423), - this.instances4.alice.encrypt16(496), - ); - expect(res).to.equal(61439); + it('test operator "shl" overload (euint64, uint8) => euint64 test 1 (18445451452906630791, 5)', async function () { + const res = await this.contract5.shl_euint64_uint8(this.instances5.alice.encrypt64(18445451452906630791), 5); + expect(res).to.equal(18405380208016085000); }); - it('test operator "bin_op_xor" overload (euint16, euint16) => euint16 test 1 (61423, 61680)', async function () { - const res = await this.contract4.bin_op_xor_euint16_euint16( - this.instances4.alice.encrypt16(61423), - this.instances4.alice.encrypt16(61680), - ); - expect(res).to.equal(7967); + it('test operator "shl" overload (euint64, uint8) => euint64 test 2 (4, 8)', async function () { + const res = await this.contract5.shl_euint64_uint8(this.instances5.alice.encrypt64(4), 8); + expect(res).to.equal(1024); }); - it('test operator "unary_op_neg" overload (euint16) => euint16 test 1 (3)', async function () { - const res = await this.contract4.unary_op_neg_euint16(this.instances4.alice.encrypt16(3)); - expect(res).to.equal(65533); + it('test operator "shl" overload (euint64, uint8) => euint64 test 3 (8, 8)', async function () { + const res = await this.contract5.shl_euint64_uint8(this.instances5.alice.encrypt64(8), 8); + expect(res).to.equal(2048); }); - it('test operator "unary_op_not" overload (euint16) => euint16 test 1 (3855)', async function () { - const res = await this.contract4.unary_op_not_euint16(this.instances4.alice.encrypt16(3855)); - expect(res).to.equal(61680); + it('test operator "shl" overload (euint64, uint8) => euint64 test 4 (8, 4)', async function () { + const res = await this.contract5.shl_euint64_uint8(this.instances5.alice.encrypt64(8), 4); + expect(res).to.equal(128); }); - it('test operator "bin_op_add" overload (euint32, euint32) => euint32 test 1 (1048835, 4194820)', async function () { - const res = await this.contract4.bin_op_add_euint32_euint32( - this.instances4.alice.encrypt32(1048835), - this.instances4.alice.encrypt32(4194820), + it('test operator "shr" overload (euint64, euint8) => euint64 test 1 (18439569308403000305, 1)', async function () { + const res = await this.contract5.shr_euint64_euint8( + this.instances5.alice.encrypt64(18439569308403000305), + this.instances5.alice.encrypt8(1), ); - expect(res).to.equal(5243655); + expect(res).to.equal(9219784654201500000); }); - it('test operator "bin_op_sub" overload (euint32, euint32) => euint32 test 1 (2415919620, 1342177539)', async function () { - const res = await this.contract4.bin_op_sub_euint32_euint32( - this.instances4.alice.encrypt32(2415919620), - this.instances4.alice.encrypt32(1342177539), + it('test operator "shr" overload (euint64, euint8) => euint64 test 2 (4, 8)', async function () { + const res = await this.contract5.shr_euint64_euint8( + this.instances5.alice.encrypt64(4), + this.instances5.alice.encrypt8(8), ); - expect(res).to.equal(1073742081); + expect(res).to.equal(0); }); - it('test operator "bin_op_mul" overload (euint32, euint32) => euint32 test 1 (33554692, 3)', async function () { - const res = await this.contract4.bin_op_mul_euint32_euint32( - this.instances4.alice.encrypt32(33554692), - this.instances4.alice.encrypt32(3), + it('test operator "shr" overload (euint64, euint8) => euint64 test 3 (8, 8)', async function () { + const res = await this.contract5.shr_euint64_euint8( + this.instances5.alice.encrypt64(8), + this.instances5.alice.encrypt8(8), ); - expect(res).to.equal(100664076); + expect(res).to.equal(0); }); - it('test operator "bin_op_and" overload (euint32, euint32) => euint32 test 1 (4025479151, 4042322160)', async function () { - const res = await this.contract4.bin_op_and_euint32_euint32( - this.instances4.alice.encrypt32(4025479151), - this.instances4.alice.encrypt32(4042322160), + it('test operator "shr" overload (euint64, euint8) => euint64 test 4 (8, 4)', async function () { + const res = await this.contract5.shr_euint64_euint8( + this.instances5.alice.encrypt64(8), + this.instances5.alice.encrypt8(4), ); - expect(res).to.equal(3772834016); + expect(res).to.equal(0); }); - it('test operator "bin_op_or" overload (euint32, euint32) => euint32 test 1 (4025479151, 32506352)', async function () { - const res = await this.contract4.bin_op_or_euint32_euint32( - this.instances4.alice.encrypt32(4025479151), - this.instances4.alice.encrypt32(32506352), - ); - expect(res).to.equal(4026527743); + it('test operator "shr" overload (euint64, uint8) => euint64 test 1 (18439569308403000305, 1)', async function () { + const res = await this.contract5.shr_euint64_uint8(this.instances5.alice.encrypt64(18439569308403000305), 1); + expect(res).to.equal(9219784654201500000); }); - it('test operator "bin_op_xor" overload (euint32, euint32) => euint32 test 1 (4025479151, 4042322160)', async function () { - const res = await this.contract4.bin_op_xor_euint32_euint32( - this.instances4.alice.encrypt32(4025479151), - this.instances4.alice.encrypt32(4042322160), - ); - expect(res).to.equal(522133279); + it('test operator "shr" overload (euint64, uint8) => euint64 test 2 (4, 8)', async function () { + const res = await this.contract5.shr_euint64_uint8(this.instances5.alice.encrypt64(4), 8); + expect(res).to.equal(0); }); - it('test operator "unary_op_neg" overload (euint32) => euint32 test 1 (4)', async function () { - const res = await this.contract4.unary_op_neg_euint32(this.instances4.alice.encrypt32(4)); - expect(res).to.equal(4294967292); + it('test operator "shr" overload (euint64, uint8) => euint64 test 3 (8, 8)', async function () { + const res = await this.contract5.shr_euint64_uint8(this.instances5.alice.encrypt64(8), 8); + expect(res).to.equal(0); }); - it('test operator "unary_op_not" overload (euint32) => euint32 test 1 (252645135)', async function () { - const res = await this.contract4.unary_op_not_euint32(this.instances4.alice.encrypt32(252645135)); - expect(res).to.equal(4042322160); + it('test operator "shr" overload (euint64, uint8) => euint64 test 4 (8, 4)', async function () { + const res = await this.contract5.shr_euint64_uint8(this.instances5.alice.encrypt64(8), 4); + expect(res).to.equal(0); }); - it('test operator "bin_op_add" overload (euint64, euint64) => euint64 test 1 (1048835, 4194820)', async function () { - const res = await this.contract4.bin_op_add_euint64_euint64( - this.instances4.alice.encrypt64(1048835), - this.instances4.alice.encrypt64(4194820), - ); - expect(res).to.equal(5243655); + it('test operator "neg" overload (euint4) => euint4 test 1 (11)', async function () { + const res = await this.contract5.neg_euint4(this.instances5.alice.encrypt4(11)); + expect(res).to.equal(5n); }); - it('test operator "bin_op_sub" overload (euint64, euint64) => euint64 test 1 (2415919620, 1342177539)', async function () { - const res = await this.contract4.bin_op_sub_euint64_euint64( - this.instances4.alice.encrypt64(2415919620), - this.instances4.alice.encrypt64(1342177539), - ); - expect(res).to.equal(1073742081); + it('test operator "not" overload (euint4) => euint4 test 1 (13)', async function () { + const res = await this.contract5.not_euint4(this.instances5.alice.encrypt4(13)); + expect(res).to.equal(2n); }); - it('test operator "bin_op_mul" overload (euint64, euint64) => euint64 test 1 (33554692, 3)', async function () { - const res = await this.contract4.bin_op_mul_euint64_euint64( - this.instances4.alice.encrypt64(33554692), - this.instances4.alice.encrypt64(3), - ); - expect(res).to.equal(100664076); + it('test operator "neg" overload (euint8) => euint8 test 1 (251)', async function () { + const res = await this.contract5.neg_euint8(this.instances5.alice.encrypt8(251)); + expect(res).to.equal(5n); }); - it('test operator "bin_op_and" overload (euint64, euint64) => euint64 test 1 (4025479151, 4042322160)', async function () { - const res = await this.contract4.bin_op_and_euint64_euint64( - this.instances4.alice.encrypt64(4025479151), - this.instances4.alice.encrypt64(4042322160), - ); - expect(res).to.equal(3772834016); + it('test operator "not" overload (euint8) => euint8 test 1 (187)', async function () { + const res = await this.contract5.not_euint8(this.instances5.alice.encrypt8(187)); + expect(res).to.equal(68n); }); - it('test operator "bin_op_or" overload (euint64, euint64) => euint64 test 1 (4025479151, 32506352)', async function () { - const res = await this.contract4.bin_op_or_euint64_euint64( - this.instances4.alice.encrypt64(4025479151), - this.instances4.alice.encrypt64(32506352), - ); - expect(res).to.equal(4026527743); + it('test operator "neg" overload (euint16) => euint16 test 1 (25161)', async function () { + const res = await this.contract5.neg_euint16(this.instances5.alice.encrypt16(25161)); + expect(res).to.equal(40375n); }); - it('test operator "bin_op_xor" overload (euint64, euint64) => euint64 test 1 (4025479151, 4042322160)', async function () { - const res = await this.contract4.bin_op_xor_euint64_euint64( - this.instances4.alice.encrypt64(4025479151), - this.instances4.alice.encrypt64(4042322160), - ); - expect(res).to.equal(522133279); + it('test operator "not" overload (euint16) => euint16 test 1 (60538)', async function () { + const res = await this.contract5.not_euint16(this.instances5.alice.encrypt16(60538)); + expect(res).to.equal(4997n); + }); + + it('test operator "neg" overload (euint32) => euint32 test 1 (2156295218)', async function () { + const res = await this.contract5.neg_euint32(this.instances5.alice.encrypt32(2156295218)); + expect(res).to.equal(2138672078n); + }); + + it('test operator "not" overload (euint32) => euint32 test 1 (2475211657)', async function () { + const res = await this.contract5.not_euint32(this.instances5.alice.encrypt32(2475211657)); + expect(res).to.equal(1819755638n); }); - it('test operator "unary_op_neg" overload (euint64) => euint64 test 1 (4)', async function () { - const res = await this.contract4.unary_op_neg_euint64(this.instances4.alice.encrypt64(4)); - expect(res).to.equal(18446744073709551612n); + it('test operator "neg" overload (euint64) => euint64 test 1 (18438244346234461619)', async function () { + const res = await this.contract5.neg_euint64(this.instances5.alice.encrypt64(18438244346234461619)); + expect(res).to.equal(8499727475089997n); }); - it('test operator "unary_op_not" overload (euint64) => euint64 test 1 (252645135)', async function () { - const res = await this.contract4.unary_op_not_euint64(this.instances4.alice.encrypt64(252645135)); - expect(res).to.equal(18446744073456906480n); + it('test operator "not" overload (euint64) => euint64 test 1 (18443955194473722291)', async function () { + const res = await this.contract5.not_euint64(this.instances5.alice.encrypt64(18443955194473722291)); + expect(res).to.equal(2788879235829324n); }); });