replaced address calculation with code inspired by ast2firm.c