The stock of Brazil's state-run energy giant Petroleo Brasileiro S.A., or Petrobras PBR, has hardly moved since its third-quarter results were announced on Oct 28. The muted response could be attributed to the company’s mixed performance of lower-than-expected earnings but a top-line beat.What Did Petrobras’ Earnings Unveil?Petrobras announced third-quarter earnings per ADS of 52 cents, missing the Zacks Consensus Estimate of 72 cents. The underperformance can be attributed to unfavorable currency effects and higher pre-salt lifting costs.However, the bottom line improved markedly from the year-ago profit of 9 cents on the back of higher oil prices and strong downstream results. Recurring net income, which strips one-time items, came in at $3,332 million compared to just $633 million a year earlier. Petrobras’ adjusted EBITDA rose to $11,623 million from $6,214 million a year ago.Petrobras, which also hiked its dividend, reported revenues of $23,255 million that overshot the Zacks Consensus Estimate of $22,356 and surged from the year-earlier sales of $13,148 million. Petroleo Brasileiro S.A. Petrobras Price, Consensus and EPS Surprise Petroleo Brasileiro S.A. Petrobras price-consensus-eps-surprise-chart | Petroleo Brasileiro S.A. Petrobras Quote Coming back to earnings, let's take a deeper look at the recent performances of PBR’s two main segments: Upstream (Exploration & Production) and Downstream (or Refining, Transportation and Marketing).Upstream: The Rio de Janeiro-headquartered company’s average oil and gas production during the third quarter reached 2,830 thousand barrels of oil equivalent per day (MBOE/d) — some 80% liquids — down from 2,952 MBOE/d in the same period of 2020. Compared with the year-ago quarter, Brazilian oil and natural gas production — constituting 98.6% of the overall output — decreased 3.9% to 2,790 MBOE/d.In the July to September period, the average sales price of oil in Brazil soared 64.4% from the year-earlier period to $69.54 per barrel. The sharp increase in crude prices had a positive effect on the upstream segment’s earnings.Overall, the segment’s revenues improved to $14,628 million in the quarter under review from $9,358 million in the year-ago period. As far as the bottom line is concerned, despite an uptick in pre-salt lifting costs (which rose 12.7% from the third quarter of 2020 to $4.35 per barrel), the upstream unit recorded a net income of $7,971 million, jumping from the third-quarter 2020 profit of $2,707 million.Downstream (or Refining, Transportation and Marketing): Revenues from the segment totaled $20,500 million, up 71.5% from the year-ago figure of $11,955 million. Petrobras' downstream income of $1,046 million skyrocketed from the year-ago profit of $403 million, primarily due to strong domestic fuel margins.CostsDuring the period, Petrobras’ sales, general and administrative expenses totaled $1,440 million, down 3% from the year-ago period. Selling expenses also declined from $1,175 million to $1,103 million. Moreover, a reverse impairment of $3,098 million meant that total operating expenses fell by $3,751 million from the corresponding quarter last year. This meant that the company reported operating income of $12,392 million in the third quarter of 2021 compared with $3,529 million a year ago.Financial PositionDuring the three months ended Sep 30, 2021, Petrobras’ capital investments and expenditures totaled $1,863 million compared with $1,638 million in the prior-year quarter.Importantly, the company generated positive free cash flow for the 26th consecutive quarter, with the metric coming at $9,019 million, rising from $7,468 million recorded in last year’s corresponding period.At the end of the third quarter, Petrobras had a net debt of $48,132 million, decreasing from $66,218 million a year ago and $53,262 million as of Jun 30, 2021. The company ended the quarter with cash and cash equivalents of $10,925 million.Meanwhile, Petrobras’ net-debt-to-trailing-12-months EBITDA ratio improved to 1.17 from 2.33 in the previous year.Zacks Rank & Stock PickPetrobras currently carries a Zacks Rank #2 (Buy).You can see the complete list of today’s Zacks #1 Rank stocks here.Apart from Petrobras, investors interested in the energy sector might look at the following stocks that presently flaunt a Zacks Rank #1 (Strong Buy).Ovintiv OVV: Formerly known as Encana, it is an upstream operator holding an attractive oil and gas production portfolio in three major North American unconventional basins: Montney, Anadarko and the Permian. Following the Newfield acquisition in 2019, OVV has achieved higher liquids focus, greater scale and cost synergies. The oil and gas finder has also done a commendable job of cutting its expenses in a disciplined manner, which should boost free cash flow generation.The 2021 Zacks Consensus Estimate for Ovintiv indicates 1,442.9% earnings per share growth over 2020. OVV, whose shares have gained 152.1% year to date, is valued at more than $9 billion.EOG Resources EOG: It is a top-tier U.S. shale play. The United States accounts for more than 92% of the total production volumes, with the Eagle Ford and Delaware Basin being the primary contributors. Internationally, EOG has operations in China and Trinidad. The Houston, TX-based operator, which pays a special dividend along with a regular dividend, should benefit from its attractive growth profile, a huge inventory of drilling opportunities, upper quartile returns and a disciplined management team.The 2021 Zacks Consensus Estimate for EOG Resources indicates 491.8% earnings per share growth over 2020. The energy explorer, whose shares have gained 93.5% year to date, is valued at around $55.5 billion.Diamondback Energy FANG: It focuses on growth through a combination of acquisitions and active drilling in the Permian Basin. FANG's leading position in the unconventional play got another leg up with the recently completed takeover of QEP Resources. The Midland, TX-based operator appears well-positioned with its low-cost structure and investment-grade balance sheet, which should allow it to thrive in the ongoing commodity upcycle. The oil and gas finder also approved a new share repurchase program worth $2 billion in September.The 2021 Zacks Consensus Estimate for FANG indicates 265.1% earnings per share growth over 2020. Diamondback, whose shares have gained 134.4% year to date, is valued at approximately $20 billion. Zacks' Top Picks to Cash in on Artificial Intelligence In 2021, this world-changing technology is projected to generate $327.5 billion in revenue. Now Shark Tank star and billionaire investor Mark Cuban says AI will create "the world's first trillionaires." Zacks' urgent special report reveals 3 AI picks investors need to know about today.See 3 Artificial Intelligence Stocks With Extreme Upside Potential>>Want the latest recommendations from Zacks Investment Research? Today, you can download 7 Best Stocks for the Next 30 Days. Click to get this free report Petroleo Brasileiro S.A. Petrobras (PBR): Free Stock Analysis Report EOG Resources, Inc. (EOG): Free Stock Analysis Report Diamondback Energy, Inc. (FANG): Free Stock Analysis Report Ovintiv Inc. (OVV): Free Stock Analysis Report To read this article on Zacks.com click here.