  The interaction of intense light with matter gives rise to competing
nonlinear responses that can dynamically change material properties. Prominent
examples are saturable absorption (SA) and two-photon absorption (TPA), which
dynamically increase and decrease the transmission of a sample depending on
pulse intensity, respectively. The availability of intense soft X-ray pulses
from free-electron lasers (FEL) has led to observations of SA and TPA in
separate experiments, leaving open questions about the possible interplay
between and relative strength of the two phenomena. Here, we systematically
study both phenomena in one experiment by exposing graphite films to soft X-ray
FEL pulses of varying intensity, with the FEL energy tuned to match carbon 1s
to $\pi^*$ or 1s to $\sigma^*$ transitions. It is observed for lower
intensities that the nonlinear contribution to the absorption is dominated by
SA attributed to ground-state depletion; for larger intensities ($>10^{14}$
W/cm$^2$), TPA becomes more dominant. The relative strengths of the two
phenomena depend in turn on the specific transition driven by the X-ray pulse.
Both observations are consistent with our real-time electronic structure
calculations. Our results reveal the competing contributions of distinct
nonlinear material responses to spectroscopic signals measured in the X-ray
regime, demonstrating an approach of general utility for interpreting FEL
spectroscopies.
