@@ -301,42 +301,42 @@ def should_skip_function(func, program):
301301def clean_decompiled_code (code ):
302302 """
303303 Clean up decompiled code by removing unnecessary comments and blank lines.
304-
304+
305305 Removes:
306306 - Function signature comments like /* FuncName(args) */
307307 - Excessive blank lines (keep max 1 between statements, none inside blocks)
308-
308+
309309 Args:
310310 code: Raw decompiled C code
311-
311+
312312 Returns:
313313 Cleaned up code
314314 """
315315 if not code :
316316 return code
317-
318- lines = code .split (' \n ' )
317+
318+ lines = code .split (" \n " )
319319 cleaned_lines = []
320320 prev_blank = False
321321 inside_function = False
322322 brace_depth = 0
323-
323+
324324 for line in lines :
325325 stripped = line .strip ()
326-
326+
327327 # Skip function signature comments: /* FuncName(...) */ or /* FuncName */
328328 # These appear at the start of functions and are redundant
329- if stripped .startswith ('/*' ) and stripped .endswith ('*/' ):
329+ if stripped .startswith ("/*" ) and stripped .endswith ("*/" ):
330330 # Check if it looks like a function signature comment
331331 inner = stripped [2 :- 2 ].strip ()
332332 # Skip if it contains parentheses (function signature) or is just a name
333- if '(' in inner or (inner and ' ' not in inner and len (inner ) < 100 ):
333+ if "(" in inner or (inner and " " not in inner and len (inner ) < 100 ):
334334 continue
335-
335+
336336 # Track brace depth to know if we're inside a function body
337- brace_depth += stripped .count ('{' ) - stripped .count ('}' )
337+ brace_depth += stripped .count ("{" ) - stripped .count ("}" )
338338 inside_function = brace_depth > 0
339-
339+
340340 # Handle blank lines
341341 if not stripped :
342342 # Inside function body: skip all blank lines for compact code
@@ -348,14 +348,14 @@ def clean_decompiled_code(code):
348348 prev_blank = True
349349 else :
350350 prev_blank = False
351-
351+
352352 cleaned_lines .append (line )
353-
353+
354354 # Remove trailing blank lines
355355 while cleaned_lines and not cleaned_lines [- 1 ].strip ():
356356 cleaned_lines .pop ()
357-
358- return ' \n ' .join (cleaned_lines )
357+
358+ return " \n " .join (cleaned_lines )
359359
360360
361361def get_decompiled_function_basic (decomp_ifc , func , monitor ):
0 commit comments