#include "registers.h"
#include <bitset>
#include <cassert>
#include <cstdio>
#include <string>
#include <vector>
using namespace std;
void construct_instructions(int s,int n,int k,int q){
append_move(1, 0);
append_left(1,1,b-k);
append_right(1,1,b-k);
append_move(2,0);
append_right(2,2,k);
append_and(3,1,2);
vector<bool>sq;
for(int i=0;i<b;i++)
sq.push_back(false);
sq[1]=true;
append_store(4,sq);
sq[0]=true,sq[1]=false;
append_store(5,sq);
append_and(6,1,4);
append_and(7,1,5);
append_and(8,2,4);
append_and(9,2,5);
append_xor(10,6,7);
append_xor(10,8,10);
append_xor(10,9,10);
append_move(11,10);
append_right(11,11,1);
append_and(12,11,10);
append_or(3,3,12);
append_move(0,3);
}
Compilation message
registers.cpp: In function 'void construct_instructions(int, int, int, int)':
registers.cpp:10:21: error: 'b' was not declared in this scope
10 | append_left(1,1,b-k);
| ^