static void sort_shell_metzner ( int arr [ ] , int n ) {
  int i , j , k , l , m , temp ;
  m = n ;
  while ( m > 0 ) {
    m /= 2 ;
    k = n - m ;
    j = 0 ;
    do {
      i = j ;
      do {
        l = i + m ;
        if ( l < n && arr [ i ] > arr [ l ] ) {
          swap ( arr , i , l ) ;
          i -= m ;
        }
        else {
          break ;
        }
      }
      while ( i >= 0 ) ;
      j ++ ;
    }
    while ( j <= k ) ;
  }
}

static void sort_shell_metzner ( int arr [ ] , int n ) { int i , j , k , l , m , temp ; m = n ; while ( m > 0 ) { m /= 2 ; k = n - m ; j = 0 ; do { i = j ; do { l = i + m ; if ( l < n && arr [ i ] > arr [ l ] ) { swap ( arr , i , l ) ; i -= m ; } else { break ; } } while ( i >= 0 ) ; j ++ ; } while ( j <= k ) ; } }
(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))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) body: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (do_statement body: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (do_statement body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier))))) consequence: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (block (break_statement)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))) (expression_statement (update_expression (identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))))