  We develop geometric techniques to determine the spectrum and the chiral
indices of matter multiplets for four-dimensional F-theory compactifications on
elliptic Calabi-Yau fourfolds with rank two Mordell-Weil group. The general
elliptic fiber is the Calabi-Yau onefold in dP_2. We classify its resolved
elliptic fibrations over a general base B. The study of singularities of these
fibrations leads to explicit matter representations, that we determine both for
U(1)xU(1) and SU(5)xU(1)xU(1) constructions. We determine for the first time
certain matter curves and surfaces using techniques involving prime ideals. The
vertical cohomology ring of these fourfolds is calculated for both cases and
general formulas for the Euler numbers are derived. Explicit calculations are
presented for a specific base B=P^3. We determine the general G_4-flux that
belongs to H^{(2,2)}_V of the resolved Calabi-Yau fourfolds. As a by-product,
we derive for the first time all conditions on G_4-flux in general F-theory
compactifications with a non-holomorphic zero section. These conditions have to
be formulated after a circle reduction in terms of Chern-Simons terms on the 3D
Coulomb branch and invoke M-theory/F-theory duality. New Chern-Simons terms are
generated by Kaluza-Klein states of the circle compactification. We explicitly
perform the relevant field theory computations, that yield non-vanishing
results precisely for fourfolds with a non-holomorphic zero section. Taking
into account the new Chern-Simons terms, all 4D matter chiralities are
determined via 3D M-theory/F-theory duality. We independently check these
chiralities using the subset of matter surfaces we determined. The presented
techniques are general and do not rely on toric data.
