static int gcd ( int a , int b ) {
  int dividend = a > b ? a : b ;
  int divisor = a < b ? a : b ;
  int rem = 1 ;
  if ( a == 0 || b == 0 ) return dividend ;
  while ( rem != 0 ) {
    rem = dividend % divisor ;
    dividend = divisor ;
    if ( rem == 0 ) break ;
    divisor = rem ;
  }
  return divisor ;
}

static int gcd ( int a , int b ) { int dividend = a > b ? a : b ; int divisor = a < b ? a : b ; int rem = 1 ; if ( a == 0 || b == 0 ) return dividend ; while ( rem != 0 ) { rem = dividend % divisor ; dividend = divisor ; if ( rem == 0 ) break ; divisor = rem ; } return divisor ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (ternary_expression condition: (binary_expression left: (identifier) right: (identifier)) consequence: (identifier) alternative: (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (ternary_expression condition: (binary_expression left: (identifier) right: (identifier)) consequence: (identifier) alternative: (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (return_statement (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (return_statement (identifier))))