#include <iostream>
int global = 1;
int& getGlobal() {
std::cout << "getGlobal() called\n";
return global;
}
int getSomeInt() {
std::cout << "getSomeInt() called\n";
return 2;
}
int main() {
getGlobal() = getSomeInt();
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IGdsb2JhbCA9IDE7CgppbnQmIGdldEdsb2JhbCgpIHsKICAgIHN0ZDo6Y291dCA8PCAiZ2V0R2xvYmFsKCkgY2FsbGVkXG4iOwogICAgcmV0dXJuIGdsb2JhbDsKfQoKaW50IGdldFNvbWVJbnQoKSB7CiAgICBzdGQ6OmNvdXQgPDwgImdldFNvbWVJbnQoKSBjYWxsZWRcbiI7CiAgICByZXR1cm4gMjsKfQoKaW50IG1haW4oKSB7CiAgICBnZXRHbG9iYWwoKSA9IGdldFNvbWVJbnQoKTsKfQo=