Siman 80
Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.
א מִי שֶׁבָּרִי לוֹ שֶׁאֵינוֹ יָכוֹל לַעֲמֹד עַל עַצְמוֹ מִלְּהָפִיחַ עַד שֶׁיִּגְמֹר קְרִיאַת שְׁמַע וּתְפִלָּה, מוּטָב שֶׁיַּעֲבֹר זְמַן קְרִיאַת שְׁמַע וּתְפִלָּה וְלֹא יִתְפַּלֵּל, מִמַּה שֶּׁיִּתְפַּלֵּל בְּלֹא גּוּף. נָקִי וְאִם עָבַר זְמַן תְּפִלָּה אָנוּס הוּא, וּמִתְפַּלֵּל מִנְחָה שְׁתַּיִם, וְאִם יֵרָאֶה לוֹ שֶׁיָּכוֹל לַעֲמֹד עַצְמוֹ בִּשְׁעַת קְרִיאַת שְׁמַע, יָנִיחַ תְּפִלִּין בֵּין אַהֲבָה לִקְרִיאַת שְׁמַע, הַגָּה: וּמְבָרֵךְ עֲלֵיהֶם (טוּר):
1 One Who is Not Able to Guard [Themselves] from Flatulence. Containing 1 S'if: One whose health is such that they are not able restrain themselves from flatulence until they complete the Sh'ma and prayer [i.e. the Amidah] - it is better that they should let the time of the Recitation of the Sh'ma and prayer pass and not pray [during that time] than to pray without a clean body. And if the time of prayer passed, they are considered to have had an extenuating circumstance, and they should pray [the] mincha [Amidah] twice. And if it seems to him that he is able to restrain himself at the time of the Recitation of the Sh'ma, he should don his tefillin between Ahavah [Rabbah/Olam] and the Recitation of the Sh'ma. Rema: and one blesses over them [Tur]