code: def _leave(ins):
      
      global FLAG_use_function_exit
  
      output = []
  
      if ins.quad[1] == '__fastcall__':
          output.append('ret')
          return output
  
      nbytes = int(ins.quad[1])  # Number of bytes to pop (params size)
  
      if nbytes == 0:
          output.append('ld sp, ix')
          output.append('pop ix')
          output.append('ret')
  
          return output
  
      if nbytes == 1:
          output.append('ld sp, ix')
          output.append('pop ix')
          output.append('inc sp')  # "Pops" 1 byte
          output.append('ret')
  
          return output
  
      if nbytes <= 11:  # Number of bytes it worth the hassle to "pop" off the stack
          output.append('ld sp, ix')
          output.append('pop ix')
          output.append('exx')
          output.append('pop hl')
          for i in range((nbytes >> 1) - 1):
              output.append('pop bc')  # Removes (n * 2  - 2) bytes form the stack
  
          if nbytes & 1:  # Odd?
              output.append('inc sp')  # "Pops" 1 byte (This should never happens, since params are always even-sized)
  
          output.append('ex (sp), hl')  # Place back return address
          output.append('exx')
          output.append('ret')
  
          return output
  
      if not FLAG_use_function_exit:
          FLAG_use_function_exit = True  # Use standard exit
          output.append('exx')
          output.append('ld hl, %i' % nbytes)
          output.append('__EXIT_FUNCTION:')
          output.append('ld sp, ix')
          output.append('pop ix')
          output.append('pop de')
          output.append('add hl, sp')
          output.append('ld sp, hl')
          output.append('push de')
          output.append('exx')
          output.append('ret')
      else:
          output.append('exx')
          output.append('ld hl, %i' % nbytes)
          output.append('jp __EXIT_FUNCTION')
  
      return output
docs: Return from a function popping N bytes from the stack
      Use '__fastcall__' as 1st parameter, to just return