What is the meaning of Haywire?

Wire used to bind bales of hay.

Roughly-made, unsophisticated, decrepit (from the use of haywire for temporary repairs).

Behaviorally erratic or uncontrollable, especially of a machine or mechanical process.

Source: wiktionary.org