Linebacker Wesley Woodyard recovered a fumbled snap for the Broncos at the San Francisco 24, and four plays later, Manning found Decker wide open by the back left pylon for his second touchdown and a 17-0 lead.
The Broncos' onside kick backfired when Matthew Willis touched the ball about a yard early.
"I was surprised," Niners coach Jim Harbaugh said. "But I'm glad they did it. It's good for us because you always have to be aware of it."
On the next snap, Smith saw linebacker Von Miller on tight end Vernon Davis and hit Davis all alone along the left sideline for a 49-yard score.
Smith finished 5 of 7 for 69 yards.
"It was a little hard to get in a rhythm," Smith said, who was sacked just once. "I thought the young guys did a great job in the second half. We have some stuff to clean up obviously."
San Francisco's ground game, which had gained an NFL-best 378 yards through the first two weeks of the preseason, was stymied by the Broncos. With LaMichael James (left ankle) and Brandon Jacobs (left knee) sitting this one out, the 49ers were held to 14 yards on nine first-half carries, including two runs for minus-4 yards by Frank Gore.
NOTES: Broncos rookie RB Ronnie Hillman made his preseason debut after dealing with a pulled right hamstring and gained 29 yards on 10 carries. ... X-rays were negative on Ginn's right ankle. ... Rookie CB Omar Bolden bruised his left knee.
Follow AP Pro Football Writer Arnie Stapleton on Twitter: http://twitter.com/arniestapleton
Online: http://bigstory.ap.org/NFL-Pro32 and http://twitter.com/AP_NFL
Copyright 2012 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.