If the end of the line for the Quinn family was the Four Courts on a chilly Dublin morning earlier this week, the seeds of their downfall can be traced back many years to much sunnier climes.
Avenida Arriaga, a tree-lined boulevard in Funchal, Madeira, was a long way from Sean Quinn's base in Cavan and Fermanagh. But it was here the one-time industrial group magnate chose to locate a company called Bazzely V Consultadoria Economica E Participacoes Sociedade Unipessoal LDA.
His five children, who have spent recent years embroiled in various court battles, may very well wish they had never heard of this company.
Set up in 2005, Bazzely was the vehicle used by Mr Quinn to indulge in massive stock market bets using financial instruments known as contracts for difference (CFDs). These allow investors to speculate on the performance of shares without actually owning them.
Documents shed much light on how the company was used for the secret betting spree.
At the time Bazzely was set up, Quinn Group was worth between €4bn and €5bn, making Mr Quinn one of the richest people in Ireland.
At first his bets were successful, but when the tide turned he would lose billions. This had massive implications for him personally, his business empire, Anglo Irish Bank and taxpayers. It has also haunted his children.
Although he called the shots, Sean Jr, Ciara, Colette, Aoife and Brenda Quinn were the shareholders in Quinn Group.
They were the ones who signed guarantees in connection with €2.34bn in loans advanced by Anglo so their father could cover CFD losses. With Mr Quinn subsequently declared bankrupt, the children were also the ones pursued by Anglo's successor, the Irish Bank Resolution Corporation (IBRC), when debts were being called in.
This sparked a series of legal wrangles which rumbled on for eight years. The children sued IBRC, claiming loan guarantees they signed were invalid. IBRC countersued, seeking €82m from each of them. It also took another case, alleging the family engaged in an asset stripping scheme intended to put €455m of foreign properties beyond IBRC's reach.
On Tuesday, the High Court in Dublin was told all matters had been settled. Under the agreement, the children have had a series of multi-million euro judgments entered against them.
But these will be stayed as long as they co-operate with IBRC's efforts to recover and sell the foreign properties.
Things could have been very different if their father had ditched his share speculation scheme when it began making losses. Instead, he dug himself further and further into a hole.
Between October 2005 and April 2010 Mr Quinn sank €2.4bn into CFDs and Bazzely's losses amounted to €2.1bn.
Bazzely was no ordinary company. It had no staff, no premises and no bank account. Its day to day administration was carried out by certain staff at the headquarters of Quinn Direct Insurance (QDI) in Cavan, with the help of colleagues in other Quinn firms. To make the most of the CFD investments, the company used the Avenida Arriaga address in the Madeira offshore zone to avail of corporate tax exemptions.
Emails show a staff member at QDI kept track of cash transfers and contacts with brokers. Other QDI staff were authorised to sign for payments made on behalf of Bazzely.
The advantage of trading in CFDs was that rather than buying the underlying stock, Bazzely only had to pay a fraction of the share value up front. This is known as the "margin rate" and, in the case of most of Bazzely's initial investments, it tended to be around the fifth of the value of the shares. CFDs also did not have to be declared in the same way as shares, so trading could be largely done in secret.
The downside was that when share prices fell, Bazzely had to make "margin call" payments to keep the CFDs open.
Initially, Bazzely had an extremely diverse CFD portfolio. For example, in December 2006, it had open CFDs on 134 million shares in over 50 companies. These included European banks, international mining corporations, oil exploration firms and Japanese real estate companies. Punts were also taken on Irish companies C&C, CRH, Paddy Power and rival insurance firm FBD. All these bets were placed via major brokers such as Credit Suisse, Bear Stearns, Lehman Brothers, Merrill Lynch, Cantor Fitzgerald, Davy and IG Index.
It is clear Mr Quinn was closely following the fortunes of various companies.
Quite often substantial CFD bets were placed immediately after a positive announcement, such as Ryanair announcing new routes in December 2005.
This and other investments netted Bazzely a tidy profit.
As 2006 drew to a close, Bazzely recorded profits in relation to 36 of the 51 companies whose shares it had speculated on. On paper, Mr Quinn had made €296m.
But in 2007 he changed his investment strategy.
He cashed in most of his portfolio and focused on just 10 companies: Anglo; McInerney Holdings; Tullow Oil; Ryanair; AIB; Bank of Ireland; Banca Italease; Dragon Oil; Hypo Real Estate, and Peter Hambro Mining.
Anglo's shares had proved a very profitable bet for Mr Quinn in 2005 and 2006.
Heading into 2007, Bazzely had already banked €22.9m in profits on Anglo CFDs which had been closed out. Those which were still running were in profit to the tune of €157m.
Although he was speculating on the share price of fewer companies, the number of shares involved skyrocketed.
By the end of 2007, Bazzely had CFD bets open on 272 million shares. Some 209 million of those were in Anglo.
The Anglo holding, which represented CFD positions on around a quarter of all the bank's shares, was built up using nine different brokers and involved shares being traded on the Dublin and London stock exchanges.
The method used to build up the stake meant few observers, least of all the bank, had an appreciation of how deep into Anglo Mr Quinn was.
Various brokerage balance sheets show just how vulnerable he had become after placing so many of his eggs in the Anglo basket. He was buying into Anglo when the share price was as high as €16.22 only to see it slump to €10.94 by the end of the year.
Bazzely would record losses of €168.8m on Anglo CFDs throughout 2007, but worse was in store. Running losses on Anglo CFDs which were still open at that time amounted to €282.9m and these losses would have to be faced up to in 2008.
It wasn't just the Anglo investment which tanked in 2007. The next biggest loss was one of €36.7m on McInerney Holdings CFDs. Punts on Banca Italease, Bank of Ireland and Hypo Real Estate also lost him millions.
After Mr Quinn had burned through his own reserves, including €678m transferred from QDI, borrowings of €1.8bn from Anglo were used to pay down CFD debts and plug holes in Quinn company balance sheets.
Brokerage reports show Bazzely had lost €1.77bn on Anglo shares in 2008 after the controversial unwinding of the CFDs that July.
Astonishingly, Mr Quinn continued to use the company to speculate on the stock market after this. The gambling continued until at least April 2010. By November of the following year he was filing for bankruptcy.