Replace if/loop conditions dependency on input signals with ternary operator.
For compatibility with github.com/iden3/circom-witnesscalc.
Description
For now, circom-witnesscalc does not support input signals in the branch and loop conditions. I have replaced few such conditions with ternary operator that is supported by circom-witnesscalc. Now the witness for circuit https://github.com/zk-passport/openpassport/blob/main/circuits/circuits/register/register_rsa_65537_sha256.circom can be calculated using iden3/circom-witnesscalc.
The demo for this witness generation can be found in https://github.com/olomix/witnesscalc-tests repository. All commands required to install dependencies, generate witness and then validate it are specified in the ./run.sh script. It can be run from the repository directory and all dependencies would be installed locally inside this directory. Repository can be safely deleted afterward without any trash in the system. Everything script installs and generates are documented inside comments of this script.
Apparently removing the optimization in long div might be changing constraints, we should get the constraint count with and without these changes, and see how significant the difference is.