module {
  func.func @main(%grad: tensor<2x7xf32>) -> (tensor<2x7xf32>, tensor<2x7xf32>) {
    %v0 = stablehlo.constant dense<0.00000000000000000e+00> : tensor<2x7xf32>
    %v1 = stablehlo.constant dense<0.00000000000000000e+00> : tensor<f32>
    %v2 = stablehlo.reduce(%grad init: %v1) applies stablehlo.add across dimensions = [1] : (tensor<2x7xf32>, tensor<f32>) -> tensor<2xf32>
    %v3 = stablehlo.broadcast_in_dim %v2, dims = [0] : (tensor<2xf32>) -> tensor<2x7xf32>
    %v4 = stablehlo.constant dense<7.0> : tensor<2x7xf32>
    %v5 = stablehlo.divide %v3, %v4 : tensor<2x7xf32>
    %v6 = stablehlo.subtract %grad, %v5 : tensor<2x7xf32>
    %v7 = stablehlo.multiply %v6, %v6 : tensor<2x7xf32>
    %v8 = stablehlo.reduce(%v7 init: %v1) applies stablehlo.add across dimensions = [1] : (tensor<2x7xf32>, tensor<f32>) -> tensor<2xf32>
    %v9 = stablehlo.broadcast_in_dim %v8, dims = [0] : (tensor<2xf32>) -> tensor<2x7xf32>
    %v10 = stablehlo.divide %v9, %v4 : tensor<2x7xf32>
    %v11 = stablehlo.sqrt %v10 : tensor<2x7xf32>
    return %v6, %v11 : tensor<2x7xf32>, tensor<2x7xf32>
  }
}
