on a sofa nearby , a gibbon with a hypodermic needle was carefully injecting himself in an arm bandaged tight by a handkerchief , while his companion , another gibbon , inhaled on a clay pipe shaped like a funnel , giving off great clouds of dark smoke .