It seems the point where the code hangs depends on the I2D device address used.
With address 0x00 the code hangs after this:
ret = i2c_readNak(); // read one byte
With a random address it hangs after this:
i2c_write(0x00); // read address = 0
And with the supposed correct address (0x90) almost all the code is executed excepted the last line:
i2c_stop();
Also, no value is returned by the I2C slave anyway (the ret variable remains without value).