static void formgroups ( int arr [ ] , int x , int g1 [ ] , int a , int g2 [ ] , int b , int n ) {
  if ( x == n ) {
    if ( checksum ( g1 , a , g2 , b ) ) {
      print ( g1 , a , g2 , b ) ;
    }
    return ;
  }
  g1 [ a ] = arr [ x ] ;
  formgroups ( arr , x + 1 , g1 , a + 1 , g2 , b , n ) ;
  g2 [ b ] = arr [ x ] ;
  formgroups ( arr , x + 1 , g1 , a , g2 , b + 1 , n ) ;
}

static void formgroups ( int arr [ ] , int x , int g1 [ ] , int a , int g2 [ ] , int b , int n ) { if ( x == n ) { if ( checksum ( g1 , a , g2 , b ) ) { print ( g1 , a , g2 , b ) ; } return ; } g1 [ a ] = arr [ x ] ; formgroups ( arr , x + 1 , g1 , a + 1 , g2 , b , n ) ; g2 [ b ] = arr [ x ] ; formgroups ( arr , x + 1 , g1 , a , g2 , b + 1 , n ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier) dimensions: (dimensions)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier) dimensions: (dimensions)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier) dimensions: (dimensions)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (if_statement condition: (parenthesized_expression (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier)))) consequence: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier)))))) (return_statement))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier) (identifier) (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier))))))