Index: /trunk/Decompiler.class.php
===================================================================
--- /trunk/Decompiler.class.php	(revision 787)
+++ /trunk/Decompiler.class.php	(revision 788)
@@ -653,4 +653,7 @@
 	function decompileBasicBlock(&$EX, $first, $last, $indent) // {{{
 	{
+		if (isset($EX['lastBlock'])) {
+			echo PHP_EOL;
+		}
 		$this->dasmBasicBlock($EX, $first, $last);
 		// $this->dumpRange($EX, $first, $last);
@@ -671,4 +674,17 @@
 	}
 	// }}}
+	function beginComplexBlock(&$EX) // {{{
+	{
+		if (isset($EX['lastBlock'])) {
+			echo PHP_EOL;
+			$EX['lastBlock'] = null;
+		}
+	}
+	// }}}
+	function endComplexBlock(&$EX) // {{{
+	{
+		$EX['lastBlock'] = 'complex';
+	}
+	// }}}
 	function decompileComplexBlock(&$EX, $first, $last, $indent) // {{{
 	{
@@ -681,7 +697,9 @@
 		 && $lastOp['jmpouts'][0] == $first) {
 			$this->removeJmpInfo($EX, $last);
+			$this->beginComplexBlock($EX);
 			echo $indent, 'do {', PHP_EOL;
 			$this->recognizeAndDecompileClosedBlocks($EX, $first, $last, $indent . INDENT);
 			echo $indent, '} while (', str($this->getOpVal($lastOp['op1'], $EX)), ');', PHP_EOL;
+			$this->endComplexBlock($EX);
 			return;
 		}
@@ -704,4 +722,5 @@
 			$this->removeJmpInfo($EX, $last);
 
+			$this->beginComplexBlock($EX);
 			ob_start();
 			$this->recognizeAndDecompileClosedBlocks($EX, $first, $last, $indent . INDENT);
@@ -710,4 +729,5 @@
 			echo $code;
 			echo $indent, '}', PHP_EOL;
+			$this->endComplexBlock($EX);
 			return;
 		}
@@ -719,5 +739,4 @@
 	{
 		$opcodes = &$EX['opcodes'];
-		$firstComplex = false;
 
 		$i = $starti = $first;
