def visit_flat_fn(self, fn, return_by_ref = False, attributes = None, inline = True):
    if attributes is None:
      attributes = []
    
    c_fn_name = names.refresh(fn.name).replace(".", "_")
    arg_types = [self.to_ctype(t) for t in fn.input_types]
    arg_names = [self.name(old_arg) for old_arg in fn.arg_names]

    return_types = self.return_types(fn)
    n_return = len(return_types)
    
    if n_return == 1:
      return_type = self.to_ctype(return_types[0])
      self.return_void = (return_type == NoneType)
      self.return_by_ref = False
    elif n_return == 0:
      return_type = "void"
      self.return_void = True
      self.return_by_ref = False
    elif return_by_ref:
      return_type = "void"
      self.return_void = True
      self.return_by_ref = True
      self.return_var_types = [self.to_ctype(t) for t in return_types]
      self.return_var_names = [self.fresh_name("return_value%d" % i) for i in xrange(n_return)]
      arg_types = arg_types + ["%s*" % t for t in self.return_var_types] 
      arg_names = arg_names + self.return_var_names
    else:
      return_type = self.struct_type_from_fields(return_types)
      self.return_void = False 
      self.return_by_ref = False 
    args_str = ", ".join("%s %s" % (t, name) for (t,name) in zip(arg_types,arg_names))
    
    body_str = self.visit_block(fn.body) 
    
    if inline:
      attributes = attributes + ["static inline"]
    attr_str = " ".join(attributes)
    sig = (return_type, c_fn_name, args_str) % "%s %s(%s)"
    src = "%s %s {\n\n%s}" % (attr_str, sig, body_str) 
    return c_fn_name, sig, src
dataset/ETHPy150Open iskandr/parakeet/parakeet/c_backend/fn_compiler.py/FnCompiler.visit_flat_fn/swapped operands of `%`