stream_buffer.c.080i.single-use 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490
  1. xStreamBufferSpacesAvailable.part.0 ()
  2. {
  3. const struct StreamBuffer_t * const pxStreamBuffer;
  4. size_t xSpace;
  5. size_t xOriginalTail;
  6. uint32_t ulNewBASEPRI;
  7. struct StreamBufferDef_t * xStreamBuffer;
  8. <bb 5> [local count: 107374]:
  9. # DEBUG D#2 s=> xStreamBuffer
  10. # DEBUG xStreamBuffer => D#2
  11. <bb 2> [local count: 107374]:
  12. # DEBUG BEGIN_STMT
  13. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  14. # DEBUG BEGIN_STMT
  15. # DEBUG BEGIN_STMT
  16. __asm__ __volatile__(" mov %0, %1
  17. msr basepri, %0
  18. isb
  19. dsb
  20. " : "=r" ulNewBASEPRI_1 : "i" 16 : "memory");
  21. # DEBUG ulNewBASEPRI => ulNewBASEPRI_1
  22. <bb 3> [local count: 1073741824]:
  23. # DEBUG ulNewBASEPRI => NULL
  24. # DEBUG BEGIN_STMT
  25. # DEBUG BEGIN_STMT
  26. # DEBUG BEGIN_STMT
  27. <bb 4> [local count: 1073741824]:
  28. goto <bb 3>; [100.00%]
  29. }
  30. prvReadBytesFromBuffer.part.0 (struct StreamBuffer_t * pxStreamBuffer, uint8_t * pucData, size_t xCount, size_t xTail)
  31. {
  32. size_t xFirstLength;
  33. uint32_t ulNewBASEPRI;
  34. uint32_t ulNewBASEPRI;
  35. uint32_t ulNewBASEPRI;
  36. unsigned int _2;
  37. unsigned int _4;
  38. unsigned int _8;
  39. uint8_t * _10;
  40. uint8_t * _11;
  41. uint8_t * _13;
  42. uint8_t * _14;
  43. unsigned int _15;
  44. unsigned int _17;
  45. <bb 15> [local count: 214748]:
  46. <bb 2> [local count: 214748]:
  47. # DEBUG BEGIN_STMT
  48. # DEBUG BEGIN_STMT
  49. _2 = pxStreamBuffer_1(D)->xLength;
  50. _4 = _2 - xTail_3(D);
  51. xFirstLength_6 = MIN_EXPR <_4, xCount_5(D)>;
  52. # DEBUG xFirstLength => xFirstLength_6
  53. # DEBUG BEGIN_STMT
  54. if (xCount_5(D) < xFirstLength_6)
  55. goto <bb 3>; [50.00%]
  56. else
  57. goto <bb 6>; [50.00%]
  58. <bb 3> [local count: 107374]:
  59. # DEBUG BEGIN_STMT
  60. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  61. # DEBUG BEGIN_STMT
  62. # DEBUG BEGIN_STMT
  63. __asm__ __volatile__(" mov %0, %1
  64. msr basepri, %0
  65. isb
  66. dsb
  67. " : "=r" ulNewBASEPRI_7 : "i" 16 : "memory");
  68. # DEBUG ulNewBASEPRI => ulNewBASEPRI_7
  69. <bb 4> [local count: 1073741824]:
  70. # DEBUG ulNewBASEPRI => NULL
  71. # DEBUG BEGIN_STMT
  72. # DEBUG BEGIN_STMT
  73. # DEBUG BEGIN_STMT
  74. <bb 5> [local count: 1073741824]:
  75. goto <bb 4>; [100.00%]
  76. <bb 6> [local count: 107374]:
  77. # DEBUG BEGIN_STMT
  78. # DEBUG BEGIN_STMT
  79. _8 = xTail_3(D) + xFirstLength_6;
  80. if (_2 < _8)
  81. goto <bb 7>; [67.00%]
  82. else
  83. goto <bb 10>; [33.00%]
  84. <bb 7> [local count: 71941]:
  85. # DEBUG BEGIN_STMT
  86. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  87. # DEBUG BEGIN_STMT
  88. # DEBUG BEGIN_STMT
  89. __asm__ __volatile__(" mov %0, %1
  90. msr basepri, %0
  91. isb
  92. dsb
  93. " : "=r" ulNewBASEPRI_9 : "i" 16 : "memory");
  94. # DEBUG ulNewBASEPRI => ulNewBASEPRI_9
  95. <bb 8> [local count: 719407023]:
  96. # DEBUG ulNewBASEPRI => NULL
  97. # DEBUG BEGIN_STMT
  98. # DEBUG BEGIN_STMT
  99. # DEBUG BEGIN_STMT
  100. <bb 9> [local count: 719407023]:
  101. goto <bb 8>; [100.00%]
  102. <bb 10> [local count: 35433]:
  103. # DEBUG BEGIN_STMT
  104. # DEBUG BEGIN_STMT
  105. _10 = pxStreamBuffer_1(D)->pucBuffer;
  106. _11 = _10 + xTail_3(D);
  107. memcpy (pucData_12(D), _11, xFirstLength_6);
  108. # DEBUG BEGIN_STMT
  109. if (xCount_5(D) > xFirstLength_6)
  110. goto <bb 11>; [33.00%]
  111. else
  112. goto <bb 12>; [67.00%]
  113. <bb 11> [local count: 11693]:
  114. # DEBUG BEGIN_STMT
  115. _13 = pucData_12(D) + xFirstLength_6;
  116. _14 = pxStreamBuffer_1(D)->pucBuffer;
  117. _15 = xCount_5(D) - xFirstLength_6;
  118. memcpy (_13, _14, _15);
  119. <bb 12> [local count: 35433]:
  120. # DEBUG BEGIN_STMT
  121. # DEBUG BEGIN_STMT
  122. xTail_16 = xTail_3(D) + xCount_5(D);
  123. # DEBUG xTail => xTail_16
  124. # DEBUG BEGIN_STMT
  125. _17 = pxStreamBuffer_1(D)->xLength;
  126. if (xTail_16 >= _17)
  127. goto <bb 13>; [50.00%]
  128. else
  129. goto <bb 14>; [50.00%]
  130. <bb 13> [local count: 17717]:
  131. # DEBUG BEGIN_STMT
  132. xTail_18 = xTail_16 - _17;
  133. # DEBUG xTail => xTail_18
  134. <bb 14> [local count: 35433]:
  135. # xTail_19 = PHI <xTail_16(12), xTail_18(13)>
  136. # DEBUG xTail => xTail_19
  137. # DEBUG BEGIN_STMT
  138. return xTail_19;
  139. }
  140. prvWriteBytesToBuffer.part.0 (struct StreamBuffer_t * const pxStreamBuffer, const uint8_t * pucData, size_t xCount, size_t xHead)
  141. {
  142. size_t xFirstLength;
  143. uint32_t ulNewBASEPRI;
  144. uint32_t ulNewBASEPRI;
  145. uint32_t ulNewBASEPRI;
  146. unsigned int _2;
  147. unsigned int _4;
  148. unsigned int _7;
  149. uint8_t * _9;
  150. uint8_t * _10;
  151. unsigned int _12;
  152. unsigned int _13;
  153. uint8_t * _15;
  154. const uint8_t * _16;
  155. unsigned int _18;
  156. <bb 15> [local count: 160260]:
  157. <bb 2> [local count: 160260]:
  158. # DEBUG BEGIN_STMT
  159. # DEBUG BEGIN_STMT
  160. _2 = pxStreamBuffer_1(D)->xLength;
  161. _4 = _2 - xHead_3(D);
  162. xFirstLength_6 = MIN_EXPR <_4, xCount_5(D)>;
  163. # DEBUG xFirstLength => xFirstLength_6
  164. # DEBUG BEGIN_STMT
  165. _7 = xHead_3(D) + xFirstLength_6;
  166. if (_2 < _7)
  167. goto <bb 3>; [67.00%]
  168. else
  169. goto <bb 6>; [33.00%]
  170. <bb 3> [local count: 107374]:
  171. # DEBUG BEGIN_STMT
  172. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  173. # DEBUG BEGIN_STMT
  174. # DEBUG BEGIN_STMT
  175. __asm__ __volatile__(" mov %0, %1
  176. msr basepri, %0
  177. isb
  178. dsb
  179. " : "=r" ulNewBASEPRI_8 : "i" 16 : "memory");
  180. # DEBUG ulNewBASEPRI => ulNewBASEPRI_8
  181. <bb 4> [local count: 1073741824]:
  182. # DEBUG ulNewBASEPRI => NULL
  183. # DEBUG BEGIN_STMT
  184. # DEBUG BEGIN_STMT
  185. # DEBUG BEGIN_STMT
  186. <bb 5> [local count: 1073741824]:
  187. goto <bb 4>; [100.00%]
  188. <bb 6> [local count: 52886]:
  189. # DEBUG BEGIN_STMT
  190. # DEBUG BEGIN_STMT
  191. _9 = pxStreamBuffer_1(D)->pucBuffer;
  192. _10 = _9 + xHead_3(D);
  193. memcpy (_10, pucData_11(D), xFirstLength_6);
  194. # DEBUG BEGIN_STMT
  195. if (xCount_5(D) > xFirstLength_6)
  196. goto <bb 7>; [50.00%]
  197. else
  198. goto <bb 12>; [50.00%]
  199. <bb 7> [local count: 26443]:
  200. # DEBUG BEGIN_STMT
  201. _12 = xCount_5(D) - xFirstLength_6;
  202. _13 = pxStreamBuffer_1(D)->xLength;
  203. if (_12 > _13)
  204. goto <bb 8>; [67.00%]
  205. else
  206. goto <bb 11>; [33.00%]
  207. <bb 8> [local count: 17717]:
  208. # DEBUG BEGIN_STMT
  209. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  210. # DEBUG BEGIN_STMT
  211. # DEBUG BEGIN_STMT
  212. __asm__ __volatile__(" mov %0, %1
  213. msr basepri, %0
  214. isb
  215. dsb
  216. " : "=r" ulNewBASEPRI_14 : "i" 16 : "memory");
  217. # DEBUG ulNewBASEPRI => ulNewBASEPRI_14
  218. <bb 9> [local count: 177167401]:
  219. # DEBUG ulNewBASEPRI => NULL
  220. # DEBUG BEGIN_STMT
  221. # DEBUG BEGIN_STMT
  222. # DEBUG BEGIN_STMT
  223. <bb 10> [local count: 177167401]:
  224. goto <bb 9>; [100.00%]
  225. <bb 11> [local count: 8726]:
  226. # DEBUG BEGIN_STMT
  227. # DEBUG BEGIN_STMT
  228. _15 = pxStreamBuffer_1(D)->pucBuffer;
  229. _16 = pucData_11(D) + xFirstLength_6;
  230. memcpy (_15, _16, _12);
  231. <bb 12> [local count: 35169]:
  232. # DEBUG BEGIN_STMT
  233. # DEBUG BEGIN_STMT
  234. xHead_17 = xHead_3(D) + xCount_5(D);
  235. # DEBUG xHead => xHead_17
  236. # DEBUG BEGIN_STMT
  237. _18 = pxStreamBuffer_1(D)->xLength;
  238. if (xHead_17 >= _18)
  239. goto <bb 13>; [50.00%]
  240. else
  241. goto <bb 14>; [50.00%]
  242. <bb 13> [local count: 17584]:
  243. # DEBUG BEGIN_STMT
  244. xHead_19 = xHead_17 - _18;
  245. # DEBUG xHead => xHead_19
  246. <bb 14> [local count: 35169]:
  247. # xHead_20 = PHI <xHead_17(12), xHead_19(13)>
  248. # DEBUG xHead => xHead_20
  249. # DEBUG BEGIN_STMT
  250. # DEBUG BEGIN_STMT
  251. return xHead_20;
  252. }
  253. prvInitialiseNewStreamBuffer.part.0 (struct StreamBuffer_t * const pxStreamBuffer, uint8_t * const pucBuffer, size_t xBufferSizeBytes, size_t xTriggerLevelBytes, uint8_t ucFlags)
  254. {
  255. const BaseType_t xWriteValue;
  256. uint32_t ulNewBASEPRI;
  257. <bb 3> [local count: 1073741824]:
  258. <bb 2> [local count: 1073741824]:
  259. # DEBUG BEGIN_STMT
  260. # DEBUG BEGIN_STMT
  261. memset (pxStreamBuffer_1(D), 0, 36);
  262. # DEBUG BEGIN_STMT
  263. pxStreamBuffer_1(D)->pucBuffer = pucBuffer_2(D);
  264. # DEBUG BEGIN_STMT
  265. pxStreamBuffer_1(D)->xLength = xBufferSizeBytes_3(D);
  266. # DEBUG BEGIN_STMT
  267. pxStreamBuffer_1(D)->xTriggerLevelBytes = xTriggerLevelBytes_4(D);
  268. # DEBUG BEGIN_STMT
  269. pxStreamBuffer_1(D)->ucFlags = ucFlags_5(D);
  270. return;
  271. }
  272. ucStreamBufferGetStreamBufferType (struct StreamBufferDef_t * xStreamBuffer)
  273. {
  274. unsigned char _1;
  275. uint8_t _4;
  276. <bb 2> [local count: 1073741824]:
  277. # DEBUG BEGIN_STMT
  278. _1 = xStreamBuffer_3(D)->ucFlags;
  279. _4 = _1 & 1;
  280. return _4;
  281. }
  282. vStreamBufferSetStreamBufferNumber (struct StreamBufferDef_t * xStreamBuffer, UBaseType_t uxStreamBufferNumber)
  283. {
  284. <bb 2> [local count: 1073741824]:
  285. # DEBUG BEGIN_STMT
  286. xStreamBuffer_2(D)->uxStreamBufferNumber = uxStreamBufferNumber_3(D);
  287. return;
  288. }
  289. uxStreamBufferGetStreamBufferNumber (struct StreamBufferDef_t * xStreamBuffer)
  290. {
  291. UBaseType_t _3;
  292. <bb 2> [local count: 1073741824]:
  293. # DEBUG BEGIN_STMT
  294. _3 = xStreamBuffer_2(D)->uxStreamBufferNumber;
  295. return _3;
  296. }
  297. prvInitialiseNewStreamBuffer (struct StreamBuffer_t * const pxStreamBuffer, uint8_t * const pucBuffer, size_t xBufferSizeBytes, size_t xTriggerLevelBytes, uint8_t ucFlags)
  298. {
  299. uint32_t ulNewBASEPRI;
  300. void * _1;
  301. <bb 2> [local count: 130040]:
  302. # DEBUG BEGIN_STMT
  303. # DEBUG xWriteValue => 85
  304. # DEBUG BEGIN_STMT
  305. _1 = memset (pucBuffer_4(D), 85, xBufferSizeBytes_5(D));
  306. if (_1 != pucBuffer_4(D))
  307. goto <bb 3>; [82.57%]
  308. else
  309. goto <bb 5>; [17.43%]
  310. <bb 3> [local count: 107374]:
  311. # DEBUG BEGIN_STMT
  312. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  313. # DEBUG BEGIN_STMT
  314. # DEBUG BEGIN_STMT
  315. __asm__ __volatile__(" mov %0, %1
  316. msr basepri, %0
  317. isb
  318. dsb
  319. " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
  320. # DEBUG ulNewBASEPRI => ulNewBASEPRI_10
  321. <bb 4> [local count: 1073741824]:
  322. # DEBUG ulNewBASEPRI => NULL
  323. # DEBUG BEGIN_STMT
  324. # DEBUG BEGIN_STMT
  325. # DEBUG BEGIN_STMT
  326. <bb 6> [local count: 1073741824]:
  327. goto <bb 4>; [100.00%]
  328. <bb 5> [local count: 22666]:
  329. prvInitialiseNewStreamBuffer.part.0 (pxStreamBuffer_7(D), pucBuffer_4(D), xBufferSizeBytes_5(D), xTriggerLevelBytes_8(D), ucFlags_9(D));
  330. return;
  331. }
  332. prvBytesInBuffer (const struct StreamBuffer_t * const pxStreamBuffer)
  333. {
  334. size_t xCount;
  335. unsigned int _1;
  336. unsigned int _2;
  337. unsigned int _7;
  338. <bb 2> [local count: 1073741824]:
  339. # DEBUG BEGIN_STMT
  340. # DEBUG BEGIN_STMT
  341. _1 = pxStreamBuffer_5(D)->xLength;
  342. _2 ={v} pxStreamBuffer_5(D)->xHead;
  343. xCount_6 = _1 + _2;
  344. # DEBUG xCount => xCount_6
  345. # DEBUG BEGIN_STMT
  346. _7 ={v} pxStreamBuffer_5(D)->xTail;
  347. xCount_8 = xCount_6 - _7;
  348. # DEBUG xCount => xCount_8
  349. # DEBUG BEGIN_STMT
  350. if (_1 <= xCount_8)
  351. goto <bb 3>; [50.00%]
  352. else
  353. goto <bb 4>; [50.00%]
  354. <bb 3> [local count: 536870913]:
  355. # DEBUG BEGIN_STMT
  356. xCount_9 = xCount_8 - _1;
  357. # DEBUG xCount => xCount_9
  358. <bb 4> [local count: 1073741824]:
  359. # xCount_3 = PHI <xCount_8(2), xCount_9(3)>
  360. # DEBUG xCount => xCount_3
  361. # DEBUG BEGIN_STMT
  362. # DEBUG BEGIN_STMT
  363. return xCount_3;
  364. }
  365. prvReadBytesFromBuffer (struct StreamBuffer_t * pxStreamBuffer, uint8_t * pucData, size_t xCount, size_t xTail)
  366. {
  367. uint32_t ulNewBASEPRI;
  368. <bb 2> [local count: 214748]:
  369. # DEBUG BEGIN_STMT
  370. # DEBUG BEGIN_STMT
  371. if (xCount_3(D) == 0)
  372. goto <bb 3>; [50.00%]
  373. else
  374. goto <bb 5>; [50.00%]
  375. <bb 3> [local count: 107374]:
  376. # DEBUG BEGIN_STMT
  377. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  378. # DEBUG BEGIN_STMT
  379. # DEBUG BEGIN_STMT
  380. __asm__ __volatile__(" mov %0, %1
  381. msr basepri, %0
  382. isb
  383. dsb
  384. " : "=r" ulNewBASEPRI_8 : "i" 16 : "memory");
  385. # DEBUG ulNewBASEPRI => ulNewBASEPRI_8
  386. <bb 4> [local count: 1073741824]:
  387. # DEBUG ulNewBASEPRI => NULL
  388. # DEBUG BEGIN_STMT
  389. # DEBUG BEGIN_STMT
  390. # DEBUG BEGIN_STMT
  391. <bb 6> [local count: 1073741824]:
  392. goto <bb 4>; [100.00%]
  393. <bb 5> [local count: 107374]:
  394. xTail_1 = prvReadBytesFromBuffer.part.0 (pxStreamBuffer_5(D), pucData_7(D), xCount_3(D), xTail_6(D));
  395. # DEBUG xTail => xTail_1
  396. # DEBUG BEGIN_STMT
  397. return xTail_1;
  398. }
  399. prvWriteBytesToBuffer (struct StreamBuffer_t * const pxStreamBuffer, const uint8_t * pucData, size_t xCount, size_t xHead)
  400. {
  401. uint32_t ulNewBASEPRI;
  402. <bb 2> [local count: 214748]:
  403. # DEBUG BEGIN_STMT
  404. # DEBUG BEGIN_STMT
  405. if (xCount_3(D) == 0)
  406. goto <bb 3>; [50.00%]
  407. else
  408. goto <bb 5>; [50.00%]
  409. <bb 3> [local count: 107374]:
  410. # DEBUG BEGIN_STMT
  411. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  412. # DEBUG BEGIN_STMT
  413. # DEBUG BEGIN_STMT
  414. __asm__ __volatile__(" mov %0, %1
  415. msr basepri, %0
  416. isb
  417. dsb
  418. " : "=r" ulNewBASEPRI_8 : "i" 16 : "memory");
  419. # DEBUG ulNewBASEPRI => ulNewBASEPRI_8
  420. <bb 4> [local count: 1073741824]:
  421. # DEBUG ulNewBASEPRI => NULL
  422. # DEBUG BEGIN_STMT
  423. # DEBUG BEGIN_STMT
  424. # DEBUG BEGIN_STMT
  425. <bb 6> [local count: 1073741824]:
  426. goto <bb 4>; [100.00%]
  427. <bb 5> [local count: 107374]:
  428. xHead_1 = prvWriteBytesToBuffer.part.0 (pxStreamBuffer_5(D), pucData_7(D), xCount_3(D), xHead_6(D));
  429. # DEBUG xHead => xHead_1
  430. # DEBUG BEGIN_STMT
  431. # DEBUG BEGIN_STMT
  432. return xHead_1;
  433. }
  434. xStreamBufferReceiveCompletedFromISR (struct StreamBufferDef_t * xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken)
  435. {
  436. uint32_t ulOriginalBASEPRI;
  437. uint32_t ulNewBASEPRI;
  438. uint32_t ulNewBASEPRI;
  439. BaseType_t xReturn;
  440. struct tskTaskControlBlock * _1;
  441. struct tskTaskControlBlock * _2;
  442. <bb 2> [local count: 357913]:
  443. # DEBUG BEGIN_STMT
  444. # DEBUG pxStreamBuffer => xStreamBuffer_5(D)
  445. # DEBUG BEGIN_STMT
  446. # DEBUG BEGIN_STMT
  447. # DEBUG BEGIN_STMT
  448. if (xStreamBuffer_5(D) == 0B)
  449. goto <bb 3>; [30.00%]
  450. else
  451. goto <bb 5>; [70.00%]
  452. <bb 3> [local count: 107374]:
  453. # DEBUG BEGIN_STMT
  454. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  455. # DEBUG BEGIN_STMT
  456. # DEBUG BEGIN_STMT
  457. __asm__ __volatile__(" mov %0, %1
  458. msr basepri, %0
  459. isb
  460. dsb
  461. " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
  462. # DEBUG ulNewBASEPRI => ulNewBASEPRI_10
  463. <bb 4> [local count: 1073741824]:
  464. # DEBUG ulNewBASEPRI => NULL
  465. # DEBUG BEGIN_STMT
  466. # DEBUG BEGIN_STMT
  467. # DEBUG BEGIN_STMT
  468. <bb 8> [local count: 1073741824]:
  469. goto <bb 4>; [100.00%]
  470. <bb 5> [local count: 250539]:
  471. # DEBUG BEGIN_STMT
  472. # DEBUG BEGIN_STMT
  473. # DEBUG INLINE_ENTRY ulPortRaiseBASEPRI
  474. # DEBUG BEGIN_STMT
  475. # DEBUG BEGIN_STMT
  476. __asm__ __volatile__(" mrs %0, basepri
  477. mov %1, %2
  478. msr basepri, %1
  479. isb
  480. dsb
  481. " : "=r" ulOriginalBASEPRI_11, "=r" ulNewBASEPRI_12 : "i" 16 : "memory");
  482. # DEBUG ulNewBASEPRI => ulNewBASEPRI_12
  483. # DEBUG ulOriginalBASEPRI => ulOriginalBASEPRI_11
  484. # DEBUG BEGIN_STMT
  485. # DEBUG ulNewBASEPRI => NULL
  486. # DEBUG ulOriginalBASEPRI => NULL
  487. # DEBUG uxSavedInterruptStatus => ulOriginalBASEPRI_11
  488. # DEBUG BEGIN_STMT
  489. _1 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTaskWaitingToSend;
  490. if (_1 != 0B)
  491. goto <bb 6>; [53.47%]
  492. else
  493. goto <bb 7>; [46.53%]
  494. <bb 6> [local count: 133963]:
  495. # DEBUG BEGIN_STMT
  496. _2 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTaskWaitingToSend;
  497. xTaskGenericNotifyFromISR (_2, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_7(D));
  498. # DEBUG BEGIN_STMT
  499. MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTaskWaitingToSend ={v} 0B;
  500. # DEBUG BEGIN_STMT
  501. # DEBUG xReturn => 1
  502. <bb 7> [local count: 250539]:
  503. # xReturn_3 = PHI <1(6), 0(5)>
  504. # DEBUG xReturn => xReturn_3
  505. # DEBUG BEGIN_STMT
  506. # DEBUG ulNewMaskValue => ulOriginalBASEPRI_11
  507. # DEBUG INLINE_ENTRY vPortSetBASEPRI
  508. # DEBUG BEGIN_STMT
  509. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulOriginalBASEPRI_11 : "memory");
  510. # DEBUG ulNewMaskValue => NULL
  511. # DEBUG BEGIN_STMT
  512. return xReturn_3;
  513. }
  514. xStreamBufferSendCompletedFromISR (struct StreamBufferDef_t * xStreamBuffer, BaseType_t * pxHigherPriorityTaskWoken)
  515. {
  516. uint32_t ulOriginalBASEPRI;
  517. uint32_t ulNewBASEPRI;
  518. uint32_t ulNewBASEPRI;
  519. BaseType_t xReturn;
  520. struct tskTaskControlBlock * _1;
  521. struct tskTaskControlBlock * _2;
  522. <bb 2> [local count: 357913]:
  523. # DEBUG BEGIN_STMT
  524. # DEBUG pxStreamBuffer => xStreamBuffer_5(D)
  525. # DEBUG BEGIN_STMT
  526. # DEBUG BEGIN_STMT
  527. # DEBUG BEGIN_STMT
  528. if (xStreamBuffer_5(D) == 0B)
  529. goto <bb 3>; [30.00%]
  530. else
  531. goto <bb 5>; [70.00%]
  532. <bb 3> [local count: 107374]:
  533. # DEBUG BEGIN_STMT
  534. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  535. # DEBUG BEGIN_STMT
  536. # DEBUG BEGIN_STMT
  537. __asm__ __volatile__(" mov %0, %1
  538. msr basepri, %0
  539. isb
  540. dsb
  541. " : "=r" ulNewBASEPRI_10 : "i" 16 : "memory");
  542. # DEBUG ulNewBASEPRI => ulNewBASEPRI_10
  543. <bb 4> [local count: 1073741824]:
  544. # DEBUG ulNewBASEPRI => NULL
  545. # DEBUG BEGIN_STMT
  546. # DEBUG BEGIN_STMT
  547. # DEBUG BEGIN_STMT
  548. <bb 8> [local count: 1073741824]:
  549. goto <bb 4>; [100.00%]
  550. <bb 5> [local count: 250539]:
  551. # DEBUG BEGIN_STMT
  552. # DEBUG BEGIN_STMT
  553. # DEBUG INLINE_ENTRY ulPortRaiseBASEPRI
  554. # DEBUG BEGIN_STMT
  555. # DEBUG BEGIN_STMT
  556. __asm__ __volatile__(" mrs %0, basepri
  557. mov %1, %2
  558. msr basepri, %1
  559. isb
  560. dsb
  561. " : "=r" ulOriginalBASEPRI_11, "=r" ulNewBASEPRI_12 : "i" 16 : "memory");
  562. # DEBUG ulNewBASEPRI => ulNewBASEPRI_12
  563. # DEBUG ulOriginalBASEPRI => ulOriginalBASEPRI_11
  564. # DEBUG BEGIN_STMT
  565. # DEBUG ulNewBASEPRI => NULL
  566. # DEBUG ulOriginalBASEPRI => NULL
  567. # DEBUG uxSavedInterruptStatus => ulOriginalBASEPRI_11
  568. # DEBUG BEGIN_STMT
  569. _1 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTaskWaitingToReceive;
  570. if (_1 != 0B)
  571. goto <bb 6>; [53.47%]
  572. else
  573. goto <bb 7>; [46.53%]
  574. <bb 6> [local count: 133963]:
  575. # DEBUG BEGIN_STMT
  576. _2 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTaskWaitingToReceive;
  577. xTaskGenericNotifyFromISR (_2, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_7(D));
  578. # DEBUG BEGIN_STMT
  579. MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTaskWaitingToReceive ={v} 0B;
  580. # DEBUG BEGIN_STMT
  581. # DEBUG xReturn => 1
  582. <bb 7> [local count: 250539]:
  583. # xReturn_3 = PHI <1(6), 0(5)>
  584. # DEBUG xReturn => xReturn_3
  585. # DEBUG BEGIN_STMT
  586. # DEBUG ulNewMaskValue => ulOriginalBASEPRI_11
  587. # DEBUG INLINE_ENTRY vPortSetBASEPRI
  588. # DEBUG BEGIN_STMT
  589. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulOriginalBASEPRI_11 : "memory");
  590. # DEBUG ulNewMaskValue => NULL
  591. # DEBUG BEGIN_STMT
  592. return xReturn_3;
  593. }
  594. xStreamBufferIsFull (struct StreamBufferDef_t * xStreamBuffer)
  595. {
  596. uint32_t ulNewBASEPRI;
  597. size_t xBytesToStoreMessageLength;
  598. BaseType_t xReturn;
  599. unsigned char _1;
  600. unsigned int _2;
  601. unsigned char _6;
  602. <bb 2> [local count: 357913]:
  603. # DEBUG BEGIN_STMT
  604. # DEBUG BEGIN_STMT
  605. # DEBUG BEGIN_STMT
  606. # DEBUG pxStreamBuffer => xStreamBuffer_5(D)
  607. # DEBUG BEGIN_STMT
  608. if (xStreamBuffer_5(D) == 0B)
  609. goto <bb 3>; [30.00%]
  610. else
  611. goto <bb 5>; [70.00%]
  612. <bb 3> [local count: 107374]:
  613. # DEBUG BEGIN_STMT
  614. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  615. # DEBUG BEGIN_STMT
  616. # DEBUG BEGIN_STMT
  617. __asm__ __volatile__(" mov %0, %1
  618. msr basepri, %0
  619. isb
  620. dsb
  621. " : "=r" ulNewBASEPRI_9 : "i" 16 : "memory");
  622. # DEBUG ulNewBASEPRI => ulNewBASEPRI_9
  623. <bb 4> [local count: 1073741824]:
  624. # DEBUG ulNewBASEPRI => NULL
  625. # DEBUG BEGIN_STMT
  626. # DEBUG BEGIN_STMT
  627. # DEBUG BEGIN_STMT
  628. <bb 10> [local count: 1073741824]:
  629. goto <bb 4>; [100.00%]
  630. <bb 5> [local count: 250539]:
  631. # DEBUG BEGIN_STMT
  632. # DEBUG BEGIN_STMT
  633. _1 = MEM[(const struct StreamBuffer_t *)xStreamBuffer_5(D)].ucFlags;
  634. _6 = _1 & 1;
  635. if (_6 != 0)
  636. goto <bb 7>; [50.00%]
  637. else
  638. goto <bb 6>; [50.00%]
  639. <bb 6> [local count: 125270]:
  640. # DEBUG BEGIN_STMT
  641. # DEBUG xBytesToStoreMessageLength => 0
  642. <bb 7> [local count: 250539]:
  643. # xBytesToStoreMessageLength_4 = PHI <4(5), 0(6)>
  644. # DEBUG xBytesToStoreMessageLength => xBytesToStoreMessageLength_4
  645. # DEBUG BEGIN_STMT
  646. _2 = xStreamBufferSpacesAvailable (xStreamBuffer_5(D));
  647. if (_2 <= xBytesToStoreMessageLength_4)
  648. goto <bb 9>; [50.00%]
  649. else
  650. goto <bb 8>; [50.00%]
  651. <bb 8> [local count: 125270]:
  652. # DEBUG BEGIN_STMT
  653. # DEBUG xReturn => 0
  654. <bb 9> [local count: 250539]:
  655. # xReturn_3 = PHI <1(7), 0(8)>
  656. # DEBUG xReturn => xReturn_3
  657. # DEBUG BEGIN_STMT
  658. return xReturn_3;
  659. }
  660. xStreamBufferIsEmpty (struct StreamBufferDef_t * xStreamBuffer)
  661. {
  662. uint32_t ulNewBASEPRI;
  663. size_t xTail;
  664. BaseType_t xReturn;
  665. unsigned int _1;
  666. <bb 2> [local count: 357913]:
  667. # DEBUG BEGIN_STMT
  668. # DEBUG pxStreamBuffer => xStreamBuffer_3(D)
  669. # DEBUG BEGIN_STMT
  670. # DEBUG BEGIN_STMT
  671. # DEBUG BEGIN_STMT
  672. if (xStreamBuffer_3(D) == 0B)
  673. goto <bb 3>; [30.00%]
  674. else
  675. goto <bb 5>; [70.00%]
  676. <bb 3> [local count: 107374]:
  677. # DEBUG BEGIN_STMT
  678. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  679. # DEBUG BEGIN_STMT
  680. # DEBUG BEGIN_STMT
  681. __asm__ __volatile__(" mov %0, %1
  682. msr basepri, %0
  683. isb
  684. dsb
  685. " : "=r" ulNewBASEPRI_6 : "i" 16 : "memory");
  686. # DEBUG ulNewBASEPRI => ulNewBASEPRI_6
  687. <bb 4> [local count: 1073741824]:
  688. # DEBUG ulNewBASEPRI => NULL
  689. # DEBUG BEGIN_STMT
  690. # DEBUG BEGIN_STMT
  691. # DEBUG BEGIN_STMT
  692. <bb 8> [local count: 1073741824]:
  693. goto <bb 4>; [100.00%]
  694. <bb 5> [local count: 250539]:
  695. # DEBUG BEGIN_STMT
  696. # DEBUG BEGIN_STMT
  697. xTail_5 ={v} MEM[(const struct StreamBuffer_t *)xStreamBuffer_3(D)].xTail;
  698. # DEBUG xTail => xTail_5
  699. # DEBUG BEGIN_STMT
  700. _1 ={v} MEM[(const struct StreamBuffer_t *)xStreamBuffer_3(D)].xHead;
  701. if (_1 == xTail_5)
  702. goto <bb 7>; [34.00%]
  703. else
  704. goto <bb 6>; [66.00%]
  705. <bb 6> [local count: 165356]:
  706. # DEBUG BEGIN_STMT
  707. # DEBUG xReturn => 0
  708. <bb 7> [local count: 250539]:
  709. # xReturn_2 = PHI <1(5), 0(6)>
  710. # DEBUG xReturn => xReturn_2
  711. # DEBUG BEGIN_STMT
  712. return xReturn_2;
  713. }
  714. prvReadMessageFromBuffer (struct StreamBuffer_t * pxStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, size_t xBytesAvailable)
  715. {
  716. size_t xTail;
  717. size_t xNextTail;
  718. size_t xTempNextMessageLength;
  719. size_t xNextMessageLength;
  720. size_t xCount;
  721. unsigned char _1;
  722. unsigned int _2;
  723. unsigned char _12;
  724. <bb 2> [local count: 1073741824]:
  725. # DEBUG BEGIN_STMT
  726. # DEBUG BEGIN_STMT
  727. # DEBUG BEGIN_STMT
  728. xNextTail_10 ={v} pxStreamBuffer_9(D)->xTail;
  729. # DEBUG xNextTail => xNextTail_10
  730. # DEBUG BEGIN_STMT
  731. _1 = pxStreamBuffer_9(D)->ucFlags;
  732. _12 = _1 & 1;
  733. if (_12 != 0)
  734. goto <bb 3>; [33.00%]
  735. else
  736. goto <bb 5>; [67.00%]
  737. <bb 3> [local count: 354334802]:
  738. # DEBUG BEGIN_STMT
  739. # DEBUG pxStreamBuffer => pxStreamBuffer_9(D)
  740. # DEBUG pucData => &xTempNextMessageLength
  741. # DEBUG xCount => 4
  742. # DEBUG xTail => xNextTail_10
  743. # DEBUG INLINE_ENTRY prvReadBytesFromBuffer
  744. # DEBUG BEGIN_STMT
  745. # DEBUG BEGIN_STMT
  746. xTail_21 = prvReadBytesFromBuffer.part.0 (pxStreamBuffer_9(D), &xTempNextMessageLength, 4, xNextTail_10);
  747. # DEBUG xTail => xTail_21
  748. # DEBUG BEGIN_STMT
  749. # DEBUG pxStreamBuffer => NULL
  750. # DEBUG pucData => NULL
  751. # DEBUG xCount => NULL
  752. # DEBUG xTail => NULL
  753. # DEBUG ulNewBASEPRI => NULL
  754. # DEBUG xNextTail => xTail_21
  755. # DEBUG BEGIN_STMT
  756. xNextMessageLength_14 = xTempNextMessageLength;
  757. # DEBUG xNextMessageLength => xNextMessageLength_14
  758. # DEBUG BEGIN_STMT
  759. xBytesAvailable_15 = xBytesAvailable_13(D) + 4294967292;
  760. # DEBUG xBytesAvailable => xBytesAvailable_15
  761. # DEBUG BEGIN_STMT
  762. if (xBufferLengthBytes_11(D) < xNextMessageLength_14)
  763. goto <bb 4>; [50.00%]
  764. else
  765. goto <bb 5>; [50.00%]
  766. <bb 4> [local count: 177167401]:
  767. # DEBUG BEGIN_STMT
  768. # DEBUG xNextMessageLength => 0
  769. <bb 5> [local count: 1073741824]:
  770. # xBytesAvailable_3 = PHI <xBytesAvailable_15(4), xBytesAvailable_13(D)(2), xBytesAvailable_15(3)>
  771. # xNextMessageLength_4 = PHI <0(4), xBufferLengthBytes_11(D)(2), xNextMessageLength_14(3)>
  772. # xNextTail_5 = PHI <xTail_21(4), xNextTail_10(2), xTail_21(3)>
  773. # DEBUG xNextTail => xNextTail_5
  774. # DEBUG xNextMessageLength => xNextMessageLength_4
  775. # DEBUG xBytesAvailable => xBytesAvailable_3
  776. # DEBUG BEGIN_STMT
  777. xCount_16 = MIN_EXPR <xBytesAvailable_3, xNextMessageLength_4>;
  778. # DEBUG xCount => xCount_16
  779. # DEBUG BEGIN_STMT
  780. if (xCount_16 != 0)
  781. goto <bb 6>; [33.00%]
  782. else
  783. goto <bb 7>; [67.00%]
  784. <bb 6> [local count: 354334802]:
  785. # DEBUG BEGIN_STMT
  786. _2 = prvReadBytesFromBuffer (pxStreamBuffer_9(D), pvRxData_17(D), xCount_16, xNextTail_5);
  787. pxStreamBuffer_9(D)->xTail ={v} _2;
  788. <bb 7> [local count: 1073741824]:
  789. # DEBUG BEGIN_STMT
  790. xTempNextMessageLength ={v} {CLOBBER};
  791. return xCount_16;
  792. }
  793. xStreamBufferReceiveFromISR (struct StreamBufferDef_t * xStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken)
  794. {
  795. uint32_t ulOriginalBASEPRI;
  796. uint32_t ulNewBASEPRI;
  797. uint32_t ulNewBASEPRI;
  798. uint32_t ulNewBASEPRI;
  799. size_t xBytesToStoreMessageLength;
  800. size_t xBytesAvailable;
  801. size_t xReceivedLength;
  802. unsigned char _1;
  803. struct tskTaskControlBlock * _2;
  804. struct tskTaskControlBlock * _3;
  805. unsigned char _9;
  806. <bb 2> [local count: 357913]:
  807. # DEBUG BEGIN_STMT
  808. # DEBUG pxStreamBuffer => xStreamBuffer_8(D)
  809. # DEBUG BEGIN_STMT
  810. # DEBUG xReceivedLength => 0
  811. # DEBUG BEGIN_STMT
  812. if (pvRxData_10(D) == 0B)
  813. goto <bb 3>; [30.00%]
  814. else
  815. goto <bb 5>; [70.00%]
  816. <bb 3> [local count: 107374]:
  817. # DEBUG BEGIN_STMT
  818. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  819. # DEBUG BEGIN_STMT
  820. # DEBUG BEGIN_STMT
  821. __asm__ __volatile__(" mov %0, %1
  822. msr basepri, %0
  823. isb
  824. dsb
  825. " : "=r" ulNewBASEPRI_20 : "i" 16 : "memory");
  826. # DEBUG ulNewBASEPRI => ulNewBASEPRI_20
  827. <bb 4> [local count: 1073741824]:
  828. # DEBUG ulNewBASEPRI => NULL
  829. # DEBUG BEGIN_STMT
  830. # DEBUG BEGIN_STMT
  831. # DEBUG BEGIN_STMT
  832. <bb 16> [local count: 1073741824]:
  833. goto <bb 4>; [100.00%]
  834. <bb 5> [local count: 250539]:
  835. # DEBUG BEGIN_STMT
  836. # DEBUG BEGIN_STMT
  837. if (xStreamBuffer_8(D) == 0B)
  838. goto <bb 6>; [30.00%]
  839. else
  840. goto <bb 8>; [70.00%]
  841. <bb 6> [local count: 75162]:
  842. # DEBUG BEGIN_STMT
  843. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  844. # DEBUG BEGIN_STMT
  845. # DEBUG BEGIN_STMT
  846. __asm__ __volatile__(" mov %0, %1
  847. msr basepri, %0
  848. isb
  849. dsb
  850. " : "=r" ulNewBASEPRI_21 : "i" 16 : "memory");
  851. # DEBUG ulNewBASEPRI => ulNewBASEPRI_21
  852. <bb 7> [local count: 751619279]:
  853. # DEBUG ulNewBASEPRI => NULL
  854. # DEBUG BEGIN_STMT
  855. # DEBUG BEGIN_STMT
  856. # DEBUG BEGIN_STMT
  857. <bb 17> [local count: 751619279]:
  858. goto <bb 7>; [100.00%]
  859. <bb 8> [local count: 175378]:
  860. # DEBUG BEGIN_STMT
  861. # DEBUG BEGIN_STMT
  862. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_8(D)].ucFlags;
  863. _9 = _1 & 1;
  864. if (_9 != 0)
  865. goto <bb 10>; [50.00%]
  866. else
  867. goto <bb 9>; [50.00%]
  868. <bb 9> [local count: 87689]:
  869. # DEBUG BEGIN_STMT
  870. # DEBUG xBytesToStoreMessageLength => 0
  871. <bb 10> [local count: 175378]:
  872. # xBytesToStoreMessageLength_5 = PHI <4(8), 0(9)>
  873. # DEBUG xBytesToStoreMessageLength => xBytesToStoreMessageLength_5
  874. # DEBUG BEGIN_STMT
  875. xBytesAvailable_13 = prvBytesInBuffer (xStreamBuffer_8(D));
  876. # DEBUG xBytesAvailable => xBytesAvailable_13
  877. # DEBUG BEGIN_STMT
  878. if (xBytesToStoreMessageLength_5 < xBytesAvailable_13)
  879. goto <bb 11>; [33.00%]
  880. else
  881. goto <bb 15>; [67.00%]
  882. <bb 11> [local count: 57875]:
  883. # DEBUG BEGIN_STMT
  884. xReceivedLength_16 = prvReadMessageFromBuffer (xStreamBuffer_8(D), pvRxData_10(D), xBufferLengthBytes_14(D), xBytesAvailable_13);
  885. # DEBUG xReceivedLength => xReceivedLength_16
  886. # DEBUG BEGIN_STMT
  887. if (xReceivedLength_16 != 0)
  888. goto <bb 12>; [50.00%]
  889. else
  890. goto <bb 15>; [50.00%]
  891. <bb 12> [local count: 28937]:
  892. # DEBUG BEGIN_STMT
  893. # DEBUG BEGIN_STMT
  894. # DEBUG INLINE_ENTRY ulPortRaiseBASEPRI
  895. # DEBUG BEGIN_STMT
  896. # DEBUG BEGIN_STMT
  897. __asm__ __volatile__(" mrs %0, basepri
  898. mov %1, %2
  899. msr basepri, %1
  900. isb
  901. dsb
  902. " : "=r" ulOriginalBASEPRI_22, "=r" ulNewBASEPRI_23 : "i" 16 : "memory");
  903. # DEBUG ulNewBASEPRI => ulNewBASEPRI_23
  904. # DEBUG ulOriginalBASEPRI => ulOriginalBASEPRI_22
  905. # DEBUG BEGIN_STMT
  906. # DEBUG ulNewBASEPRI => NULL
  907. # DEBUG ulOriginalBASEPRI => NULL
  908. # DEBUG uxSavedInterruptStatus => ulOriginalBASEPRI_22
  909. # DEBUG BEGIN_STMT
  910. _2 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_8(D)].xTaskWaitingToSend;
  911. if (_2 != 0B)
  912. goto <bb 13>; [53.47%]
  913. else
  914. goto <bb 14>; [46.53%]
  915. <bb 13> [local count: 15473]:
  916. # DEBUG BEGIN_STMT
  917. _3 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_8(D)].xTaskWaitingToSend;
  918. xTaskGenericNotifyFromISR (_3, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_17(D));
  919. # DEBUG BEGIN_STMT
  920. MEM[(struct StreamBuffer_t *)xStreamBuffer_8(D)].xTaskWaitingToSend ={v} 0B;
  921. <bb 14> [local count: 28937]:
  922. # DEBUG BEGIN_STMT
  923. # DEBUG ulNewMaskValue => ulOriginalBASEPRI_22
  924. # DEBUG INLINE_ENTRY vPortSetBASEPRI
  925. # DEBUG BEGIN_STMT
  926. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulOriginalBASEPRI_22 : "memory");
  927. <bb 15> [local count: 175378]:
  928. # xReceivedLength_4 = PHI <0(10), xReceivedLength_16(14), xReceivedLength_16(11)>
  929. # DEBUG ulNewMaskValue => NULL
  930. # DEBUG xReceivedLength => xReceivedLength_4
  931. # DEBUG BEGIN_STMT
  932. # DEBUG BEGIN_STMT
  933. # DEBUG BEGIN_STMT
  934. return xReceivedLength_4;
  935. }
  936. xStreamBufferNextMessageLengthBytes (struct StreamBufferDef_t * xStreamBuffer)
  937. {
  938. uint32_t ulNewBASEPRI;
  939. uint32_t ulNewBASEPRI;
  940. size_t xTempReturn;
  941. size_t xBytesAvailable;
  942. size_t xReturn;
  943. unsigned char _1;
  944. unsigned int _2;
  945. unsigned char _6;
  946. <bb 2> [local count: 357913]:
  947. # DEBUG BEGIN_STMT
  948. # DEBUG pxStreamBuffer => xStreamBuffer_5(D)
  949. # DEBUG BEGIN_STMT
  950. # DEBUG BEGIN_STMT
  951. # DEBUG BEGIN_STMT
  952. if (xStreamBuffer_5(D) == 0B)
  953. goto <bb 3>; [30.00%]
  954. else
  955. goto <bb 5>; [70.00%]
  956. <bb 3> [local count: 107374]:
  957. # DEBUG BEGIN_STMT
  958. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  959. # DEBUG BEGIN_STMT
  960. # DEBUG BEGIN_STMT
  961. __asm__ __volatile__(" mov %0, %1
  962. msr basepri, %0
  963. isb
  964. dsb
  965. " : "=r" ulNewBASEPRI_13 : "i" 16 : "memory");
  966. # DEBUG ulNewBASEPRI => ulNewBASEPRI_13
  967. <bb 4> [local count: 1073741824]:
  968. # DEBUG ulNewBASEPRI => NULL
  969. # DEBUG BEGIN_STMT
  970. # DEBUG BEGIN_STMT
  971. # DEBUG BEGIN_STMT
  972. <bb 12> [local count: 1073741824]:
  973. goto <bb 4>; [100.00%]
  974. <bb 5> [local count: 250539]:
  975. # DEBUG BEGIN_STMT
  976. # DEBUG BEGIN_STMT
  977. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].ucFlags;
  978. _6 = _1 & 1;
  979. if (_6 != 0)
  980. goto <bb 6>; [33.00%]
  981. else
  982. goto <bb 11>; [67.00%]
  983. <bb 6> [local count: 82678]:
  984. # DEBUG BEGIN_STMT
  985. xBytesAvailable_9 = prvBytesInBuffer (xStreamBuffer_5(D));
  986. # DEBUG xBytesAvailable => xBytesAvailable_9
  987. # DEBUG BEGIN_STMT
  988. if (xBytesAvailable_9 > 4)
  989. goto <bb 7>; [33.00%]
  990. else
  991. goto <bb 8>; [67.00%]
  992. <bb 7> [local count: 27284]:
  993. # DEBUG BEGIN_STMT
  994. _2 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_5(D)].xTail;
  995. prvReadBytesFromBuffer (xStreamBuffer_5(D), &xTempReturn, 4, _2);
  996. # DEBUG BEGIN_STMT
  997. xReturn_11 = xTempReturn;
  998. # DEBUG xReturn => xReturn_11
  999. goto <bb 11>; [100.00%]
  1000. <bb 8> [local count: 55394]:
  1001. # DEBUG BEGIN_STMT
  1002. if (xBytesAvailable_9 != 0)
  1003. goto <bb 9>; [50.00%]
  1004. else
  1005. goto <bb 11>; [50.00%]
  1006. <bb 9> [local count: 27697]:
  1007. # DEBUG BEGIN_STMT
  1008. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1009. # DEBUG BEGIN_STMT
  1010. # DEBUG BEGIN_STMT
  1011. __asm__ __volatile__(" mov %0, %1
  1012. msr basepri, %0
  1013. isb
  1014. dsb
  1015. " : "=r" ulNewBASEPRI_14 : "i" 16 : "memory");
  1016. # DEBUG ulNewBASEPRI => ulNewBASEPRI_14
  1017. <bb 10> [local count: 276971704]:
  1018. # DEBUG ulNewBASEPRI => NULL
  1019. # DEBUG BEGIN_STMT
  1020. # DEBUG BEGIN_STMT
  1021. # DEBUG BEGIN_STMT
  1022. <bb 13> [local count: 276971704]:
  1023. goto <bb 10>; [100.00%]
  1024. <bb 11> [local count: 222842]:
  1025. # xReturn_3 = PHI <0(8), 0(5), xReturn_11(7)>
  1026. # DEBUG xReturn => xReturn_3
  1027. # DEBUG BEGIN_STMT
  1028. xTempReturn ={v} {CLOBBER};
  1029. return xReturn_3;
  1030. }
  1031. xStreamBufferReceive (struct StreamBufferDef_t * xStreamBuffer, void * pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait)
  1032. {
  1033. uint32_t ulNewBASEPRI;
  1034. uint32_t ulNewBASEPRI;
  1035. uint32_t ulNewBASEPRI;
  1036. size_t xBytesToStoreMessageLength;
  1037. size_t xBytesAvailable;
  1038. size_t xReceivedLength;
  1039. unsigned char _1;
  1040. struct tskTaskControlBlock * _2;
  1041. struct tskTaskControlBlock * _3;
  1042. struct tskTaskControlBlock * _4;
  1043. struct tskTaskControlBlock * _5;
  1044. unsigned char _14;
  1045. <bb 2> [local count: 357913]:
  1046. # DEBUG BEGIN_STMT
  1047. # DEBUG pxStreamBuffer => xStreamBuffer_13(D)
  1048. # DEBUG BEGIN_STMT
  1049. # DEBUG xReceivedLength => 0
  1050. # DEBUG BEGIN_STMT
  1051. if (pvRxData_15(D) == 0B)
  1052. goto <bb 3>; [30.00%]
  1053. else
  1054. goto <bb 5>; [70.00%]
  1055. <bb 3> [local count: 107374]:
  1056. # DEBUG BEGIN_STMT
  1057. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1058. # DEBUG BEGIN_STMT
  1059. # DEBUG BEGIN_STMT
  1060. __asm__ __volatile__(" mov %0, %1
  1061. msr basepri, %0
  1062. isb
  1063. dsb
  1064. " : "=r" ulNewBASEPRI_38 : "i" 16 : "memory");
  1065. # DEBUG ulNewBASEPRI => ulNewBASEPRI_38
  1066. <bb 4> [local count: 1073741824]:
  1067. # DEBUG ulNewBASEPRI => NULL
  1068. # DEBUG BEGIN_STMT
  1069. # DEBUG BEGIN_STMT
  1070. # DEBUG BEGIN_STMT
  1071. <bb 25> [local count: 1073741824]:
  1072. goto <bb 4>; [100.00%]
  1073. <bb 5> [local count: 250539]:
  1074. # DEBUG BEGIN_STMT
  1075. # DEBUG BEGIN_STMT
  1076. if (xStreamBuffer_13(D) == 0B)
  1077. goto <bb 6>; [30.00%]
  1078. else
  1079. goto <bb 8>; [70.00%]
  1080. <bb 6> [local count: 75162]:
  1081. # DEBUG BEGIN_STMT
  1082. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1083. # DEBUG BEGIN_STMT
  1084. # DEBUG BEGIN_STMT
  1085. __asm__ __volatile__(" mov %0, %1
  1086. msr basepri, %0
  1087. isb
  1088. dsb
  1089. " : "=r" ulNewBASEPRI_39 : "i" 16 : "memory");
  1090. # DEBUG ulNewBASEPRI => ulNewBASEPRI_39
  1091. <bb 7> [local count: 751619279]:
  1092. # DEBUG ulNewBASEPRI => NULL
  1093. # DEBUG BEGIN_STMT
  1094. # DEBUG BEGIN_STMT
  1095. # DEBUG BEGIN_STMT
  1096. <bb 26> [local count: 751619279]:
  1097. goto <bb 7>; [100.00%]
  1098. <bb 8> [local count: 175378]:
  1099. # DEBUG BEGIN_STMT
  1100. # DEBUG BEGIN_STMT
  1101. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].ucFlags;
  1102. _14 = _1 & 1;
  1103. if (_14 != 0)
  1104. goto <bb 10>; [50.00%]
  1105. else
  1106. goto <bb 9>; [50.00%]
  1107. <bb 9> [local count: 87689]:
  1108. # DEBUG BEGIN_STMT
  1109. # DEBUG xBytesToStoreMessageLength => 0
  1110. <bb 10> [local count: 175378]:
  1111. # xBytesToStoreMessageLength_8 = PHI <4(8), 0(9)>
  1112. # DEBUG xBytesToStoreMessageLength => xBytesToStoreMessageLength_8
  1113. # DEBUG BEGIN_STMT
  1114. if (xTicksToWait_17(D) != 0)
  1115. goto <bb 11>; [50.00%]
  1116. else
  1117. goto <bb 18>; [50.00%]
  1118. <bb 11> [local count: 87689]:
  1119. # DEBUG BEGIN_STMT
  1120. vPortEnterCritical ();
  1121. # DEBUG BEGIN_STMT
  1122. xBytesAvailable_22 = prvBytesInBuffer (xStreamBuffer_13(D));
  1123. # DEBUG xBytesAvailable => xBytesAvailable_22
  1124. # DEBUG BEGIN_STMT
  1125. if (xBytesToStoreMessageLength_8 >= xBytesAvailable_22)
  1126. goto <bb 12>; [50.00%]
  1127. else
  1128. goto <bb 16>; [50.00%]
  1129. <bb 12> [local count: 43844]:
  1130. # DEBUG BEGIN_STMT
  1131. xTaskGenericNotifyStateClear (0B, 0);
  1132. # DEBUG BEGIN_STMT
  1133. _2 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].xTaskWaitingToReceive;
  1134. if (_2 != 0B)
  1135. goto <bb 13>; [82.57%]
  1136. else
  1137. goto <bb 15>; [17.43%]
  1138. <bb 13> [local count: 36202]:
  1139. # DEBUG BEGIN_STMT
  1140. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1141. # DEBUG BEGIN_STMT
  1142. # DEBUG BEGIN_STMT
  1143. __asm__ __volatile__(" mov %0, %1
  1144. msr basepri, %0
  1145. isb
  1146. dsb
  1147. " : "=r" ulNewBASEPRI_40 : "i" 16 : "memory");
  1148. # DEBUG ulNewBASEPRI => ulNewBASEPRI_40
  1149. <bb 14> [local count: 362023689]:
  1150. # DEBUG ulNewBASEPRI => NULL
  1151. # DEBUG BEGIN_STMT
  1152. # DEBUG BEGIN_STMT
  1153. # DEBUG BEGIN_STMT
  1154. <bb 27> [local count: 362023689]:
  1155. goto <bb 14>; [100.00%]
  1156. <bb 15> [local count: 7642]:
  1157. # DEBUG BEGIN_STMT
  1158. # DEBUG BEGIN_STMT
  1159. _3 = xTaskGetCurrentTaskHandle ();
  1160. MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].xTaskWaitingToReceive ={v} _3;
  1161. <bb 16> [local count: 51486]:
  1162. # DEBUG BEGIN_STMT
  1163. # DEBUG BEGIN_STMT
  1164. vPortExitCritical ();
  1165. # DEBUG BEGIN_STMT
  1166. if (xBytesToStoreMessageLength_8 >= xBytesAvailable_22)
  1167. goto <bb 17>; [33.00%]
  1168. else
  1169. goto <bb 19>; [67.00%]
  1170. <bb 17> [local count: 16991]:
  1171. # DEBUG BEGIN_STMT
  1172. # DEBUG BEGIN_STMT
  1173. xTaskGenericNotifyWait (0, 0, 0, 0B, xTicksToWait_17(D));
  1174. # DEBUG BEGIN_STMT
  1175. MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].xTaskWaitingToReceive ={v} 0B;
  1176. # DEBUG BEGIN_STMT
  1177. xBytesAvailable_30 = prvBytesInBuffer (xStreamBuffer_13(D));
  1178. # DEBUG xBytesAvailable => xBytesAvailable_30
  1179. goto <bb 19>; [100.00%]
  1180. <bb 18> [local count: 87689]:
  1181. # DEBUG BEGIN_STMT
  1182. xBytesAvailable_19 = prvBytesInBuffer (xStreamBuffer_13(D));
  1183. # DEBUG xBytesAvailable => xBytesAvailable_19
  1184. <bb 19> [local count: 139175]:
  1185. # xBytesAvailable_7 = PHI <xBytesAvailable_30(17), xBytesAvailable_19(18), xBytesAvailable_22(16)>
  1186. # DEBUG xBytesAvailable => xBytesAvailable_7
  1187. # DEBUG BEGIN_STMT
  1188. if (xBytesAvailable_7 > xBytesToStoreMessageLength_8)
  1189. goto <bb 20>; [33.00%]
  1190. else
  1191. goto <bb 24>; [67.00%]
  1192. <bb 20> [local count: 45928]:
  1193. # DEBUG BEGIN_STMT
  1194. xReceivedLength_33 = prvReadMessageFromBuffer (xStreamBuffer_13(D), pvRxData_15(D), xBufferLengthBytes_31(D), xBytesAvailable_7);
  1195. # DEBUG xReceivedLength => xReceivedLength_33
  1196. # DEBUG BEGIN_STMT
  1197. if (xReceivedLength_33 != 0)
  1198. goto <bb 21>; [33.00%]
  1199. else
  1200. goto <bb 24>; [67.00%]
  1201. <bb 21> [local count: 15156]:
  1202. # DEBUG BEGIN_STMT
  1203. # DEBUG BEGIN_STMT
  1204. vTaskSuspendAll ();
  1205. # DEBUG BEGIN_STMT
  1206. _4 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].xTaskWaitingToSend;
  1207. if (_4 != 0B)
  1208. goto <bb 22>; [53.47%]
  1209. else
  1210. goto <bb 23>; [46.53%]
  1211. <bb 22> [local count: 8104]:
  1212. # DEBUG BEGIN_STMT
  1213. _5 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].xTaskWaitingToSend;
  1214. xTaskGenericNotify (_5, 0, 0, 0, 0B);
  1215. # DEBUG BEGIN_STMT
  1216. MEM[(struct StreamBuffer_t *)xStreamBuffer_13(D)].xTaskWaitingToSend ={v} 0B;
  1217. <bb 23> [local count: 15156]:
  1218. # DEBUG BEGIN_STMT
  1219. xTaskResumeAll ();
  1220. # DEBUG BEGIN_STMT
  1221. <bb 24> [local count: 139175]:
  1222. # xReceivedLength_6 = PHI <0(19), xReceivedLength_33(23), xReceivedLength_33(20)>
  1223. # DEBUG xReceivedLength => xReceivedLength_6
  1224. # DEBUG BEGIN_STMT
  1225. # DEBUG BEGIN_STMT
  1226. # DEBUG BEGIN_STMT
  1227. return xReceivedLength_6;
  1228. }
  1229. prvWriteMessageToBuffer (struct StreamBuffer_t * const pxStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, size_t xSpace, size_t xRequiredSpace)
  1230. {
  1231. size_t xHead;
  1232. size_t xNextHead;
  1233. unsigned char _1;
  1234. unsigned int xDataLengthBytes.2_2;
  1235. unsigned int _3;
  1236. unsigned int xDataLengthBytes.3_4;
  1237. unsigned int _5;
  1238. size_t _19;
  1239. unsigned char _22;
  1240. <bb 2> [local count: 1073741824]:
  1241. # DEBUG BEGIN_STMT
  1242. xNextHead_11 ={v} pxStreamBuffer_10(D)->xHead;
  1243. # DEBUG xNextHead => xNextHead_11
  1244. # DEBUG BEGIN_STMT
  1245. _1 = pxStreamBuffer_10(D)->ucFlags;
  1246. _22 = _1 & 1;
  1247. if (_22 != 0)
  1248. goto <bb 3>; [50.00%]
  1249. else
  1250. goto <bb 6>; [50.00%]
  1251. <bb 3> [local count: 536870913]:
  1252. # DEBUG BEGIN_STMT
  1253. if (xSpace_12(D) >= xRequiredSpace_14(D))
  1254. goto <bb 4>; [33.00%]
  1255. else
  1256. goto <bb 5>; [67.00%]
  1257. <bb 4> [local count: 177167401]:
  1258. # DEBUG BEGIN_STMT
  1259. # DEBUG pxStreamBuffer => pxStreamBuffer_10(D)
  1260. # DEBUG pucData => &xDataLengthBytes
  1261. # DEBUG xCount => 4
  1262. # DEBUG xHead => xNextHead_11
  1263. # DEBUG INLINE_ENTRY prvWriteBytesToBuffer
  1264. # DEBUG BEGIN_STMT
  1265. # DEBUG BEGIN_STMT
  1266. xHead_20 = prvWriteBytesToBuffer.part.0 (pxStreamBuffer_10(D), &xDataLengthBytes, 4, xNextHead_11);
  1267. # DEBUG xHead => xHead_20
  1268. # DEBUG BEGIN_STMT
  1269. # DEBUG BEGIN_STMT
  1270. # DEBUG pxStreamBuffer => NULL
  1271. # DEBUG pucData => NULL
  1272. # DEBUG xCount => NULL
  1273. # DEBUG xHead => NULL
  1274. # DEBUG ulNewBASEPRI => NULL
  1275. # DEBUG xNextHead => xHead_20
  1276. goto <bb 7>; [100.00%]
  1277. <bb 5> [local count: 359703511]:
  1278. # DEBUG BEGIN_STMT
  1279. xDataLengthBytes = 0;
  1280. goto <bb 7>; [100.00%]
  1281. <bb 6> [local count: 536870913]:
  1282. # DEBUG BEGIN_STMT
  1283. xDataLengthBytes.2_2 = xDataLengthBytes;
  1284. _3 = MIN_EXPR <xDataLengthBytes.2_2, xSpace_12(D)>;
  1285. xDataLengthBytes = _3;
  1286. <bb 7> [local count: 1073741824]:
  1287. # xNextHead_6 = PHI <xNextHead_11(5), xNextHead_11(6), xHead_20(4)>
  1288. # DEBUG xNextHead => xNextHead_6
  1289. # DEBUG BEGIN_STMT
  1290. xDataLengthBytes.3_4 = xDataLengthBytes;
  1291. if (xDataLengthBytes.3_4 != 0)
  1292. goto <bb 8>; [33.00%]
  1293. else
  1294. goto <bb 9>; [67.00%]
  1295. <bb 8> [local count: 354334802]:
  1296. # DEBUG BEGIN_STMT
  1297. _5 = prvWriteBytesToBuffer (pxStreamBuffer_10(D), pvTxData_16(D), xDataLengthBytes.3_4, xNextHead_6);
  1298. pxStreamBuffer_10(D)->xHead ={v} _5;
  1299. <bb 9> [local count: 1073741824]:
  1300. # DEBUG BEGIN_STMT
  1301. _19 = xDataLengthBytes;
  1302. return _19;
  1303. }
  1304. xStreamBufferSendFromISR (struct StreamBufferDef_t * xStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken)
  1305. {
  1306. uint32_t ulOriginalBASEPRI;
  1307. uint32_t ulNewBASEPRI;
  1308. uint32_t ulNewBASEPRI;
  1309. uint32_t ulNewBASEPRI;
  1310. size_t xRequiredSpace;
  1311. size_t xSpace;
  1312. size_t xReturn;
  1313. unsigned char _1;
  1314. unsigned int _2;
  1315. unsigned int _3;
  1316. struct tskTaskControlBlock * _4;
  1317. struct tskTaskControlBlock * _5;
  1318. unsigned char _10;
  1319. <bb 2> [local count: 357913]:
  1320. # DEBUG BEGIN_STMT
  1321. # DEBUG pxStreamBuffer => xStreamBuffer_9(D)
  1322. # DEBUG BEGIN_STMT
  1323. # DEBUG BEGIN_STMT
  1324. # DEBUG xRequiredSpace => xDataLengthBytes_11(D)
  1325. # DEBUG BEGIN_STMT
  1326. if (pvTxData_12(D) == 0B)
  1327. goto <bb 3>; [30.00%]
  1328. else
  1329. goto <bb 5>; [70.00%]
  1330. <bb 3> [local count: 107374]:
  1331. # DEBUG BEGIN_STMT
  1332. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1333. # DEBUG BEGIN_STMT
  1334. # DEBUG BEGIN_STMT
  1335. __asm__ __volatile__(" mov %0, %1
  1336. msr basepri, %0
  1337. isb
  1338. dsb
  1339. " : "=r" ulNewBASEPRI_23 : "i" 16 : "memory");
  1340. # DEBUG ulNewBASEPRI => ulNewBASEPRI_23
  1341. <bb 4> [local count: 1073741824]:
  1342. # DEBUG ulNewBASEPRI => NULL
  1343. # DEBUG BEGIN_STMT
  1344. # DEBUG BEGIN_STMT
  1345. # DEBUG BEGIN_STMT
  1346. <bb 16> [local count: 1073741824]:
  1347. goto <bb 4>; [100.00%]
  1348. <bb 5> [local count: 250539]:
  1349. # DEBUG BEGIN_STMT
  1350. # DEBUG BEGIN_STMT
  1351. if (xStreamBuffer_9(D) == 0B)
  1352. goto <bb 6>; [30.00%]
  1353. else
  1354. goto <bb 8>; [70.00%]
  1355. <bb 6> [local count: 75162]:
  1356. # DEBUG BEGIN_STMT
  1357. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1358. # DEBUG BEGIN_STMT
  1359. # DEBUG BEGIN_STMT
  1360. __asm__ __volatile__(" mov %0, %1
  1361. msr basepri, %0
  1362. isb
  1363. dsb
  1364. " : "=r" ulNewBASEPRI_24 : "i" 16 : "memory");
  1365. # DEBUG ulNewBASEPRI => ulNewBASEPRI_24
  1366. <bb 7> [local count: 751619279]:
  1367. # DEBUG ulNewBASEPRI => NULL
  1368. # DEBUG BEGIN_STMT
  1369. # DEBUG BEGIN_STMT
  1370. # DEBUG BEGIN_STMT
  1371. <bb 17> [local count: 751619279]:
  1372. goto <bb 7>; [100.00%]
  1373. <bb 8> [local count: 175378]:
  1374. # DEBUG BEGIN_STMT
  1375. # DEBUG BEGIN_STMT
  1376. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].ucFlags;
  1377. _10 = _1 & 1;
  1378. if (_10 != 0)
  1379. goto <bb 9>; [50.00%]
  1380. else
  1381. goto <bb 10>; [50.00%]
  1382. <bb 9> [local count: 87689]:
  1383. # DEBUG BEGIN_STMT
  1384. xRequiredSpace_14 = xDataLengthBytes_11(D) + 4;
  1385. # DEBUG xRequiredSpace => xRequiredSpace_14
  1386. <bb 10> [local count: 175378]:
  1387. # xRequiredSpace_6 = PHI <xDataLengthBytes_11(D)(8), xRequiredSpace_14(9)>
  1388. # DEBUG xRequiredSpace => xRequiredSpace_6
  1389. # DEBUG BEGIN_STMT
  1390. # DEBUG BEGIN_STMT
  1391. xSpace_16 = xStreamBufferSpacesAvailable (xStreamBuffer_9(D));
  1392. # DEBUG xSpace => xSpace_16
  1393. # DEBUG BEGIN_STMT
  1394. xReturn_18 = prvWriteMessageToBuffer (xStreamBuffer_9(D), pvTxData_12(D), xDataLengthBytes_11(D), xSpace_16, xRequiredSpace_6);
  1395. # DEBUG xReturn => xReturn_18
  1396. # DEBUG BEGIN_STMT
  1397. if (xReturn_18 != 0)
  1398. goto <bb 11>; [33.00%]
  1399. else
  1400. goto <bb 15>; [67.00%]
  1401. <bb 11> [local count: 57875]:
  1402. # DEBUG BEGIN_STMT
  1403. _2 = prvBytesInBuffer (xStreamBuffer_9(D));
  1404. _3 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTriggerLevelBytes;
  1405. if (_2 >= _3)
  1406. goto <bb 12>; [50.00%]
  1407. else
  1408. goto <bb 15>; [50.00%]
  1409. <bb 12> [local count: 28937]:
  1410. # DEBUG BEGIN_STMT
  1411. # DEBUG BEGIN_STMT
  1412. # DEBUG INLINE_ENTRY ulPortRaiseBASEPRI
  1413. # DEBUG BEGIN_STMT
  1414. # DEBUG BEGIN_STMT
  1415. __asm__ __volatile__(" mrs %0, basepri
  1416. mov %1, %2
  1417. msr basepri, %1
  1418. isb
  1419. dsb
  1420. " : "=r" ulOriginalBASEPRI_25, "=r" ulNewBASEPRI_26 : "i" 16 : "memory");
  1421. # DEBUG ulNewBASEPRI => ulNewBASEPRI_26
  1422. # DEBUG ulOriginalBASEPRI => ulOriginalBASEPRI_25
  1423. # DEBUG BEGIN_STMT
  1424. # DEBUG ulNewBASEPRI => NULL
  1425. # DEBUG ulOriginalBASEPRI => NULL
  1426. # DEBUG uxSavedInterruptStatus => ulOriginalBASEPRI_25
  1427. # DEBUG BEGIN_STMT
  1428. _4 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTaskWaitingToReceive;
  1429. if (_4 != 0B)
  1430. goto <bb 13>; [53.47%]
  1431. else
  1432. goto <bb 14>; [46.53%]
  1433. <bb 13> [local count: 15473]:
  1434. # DEBUG BEGIN_STMT
  1435. _5 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTaskWaitingToReceive;
  1436. xTaskGenericNotifyFromISR (_5, 0, 0, 0, 0B, pxHigherPriorityTaskWoken_20(D));
  1437. # DEBUG BEGIN_STMT
  1438. MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTaskWaitingToReceive ={v} 0B;
  1439. <bb 14> [local count: 28937]:
  1440. # DEBUG BEGIN_STMT
  1441. # DEBUG ulNewMaskValue => ulOriginalBASEPRI_25
  1442. # DEBUG INLINE_ENTRY vPortSetBASEPRI
  1443. # DEBUG BEGIN_STMT
  1444. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulOriginalBASEPRI_25 : "memory");
  1445. <bb 15> [local count: 175378]:
  1446. # DEBUG ulNewMaskValue => NULL
  1447. # DEBUG BEGIN_STMT
  1448. # DEBUG BEGIN_STMT
  1449. # DEBUG BEGIN_STMT
  1450. return xReturn_18;
  1451. }
  1452. xStreamBufferSend (struct StreamBufferDef_t * xStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait)
  1453. {
  1454. uint32_t ulNewBASEPRI;
  1455. uint32_t ulNewBASEPRI;
  1456. uint32_t ulNewBASEPRI;
  1457. uint32_t ulNewBASEPRI;
  1458. size_t xMaxReportedSpace;
  1459. struct TimeOut_t xTimeOut;
  1460. size_t xRequiredSpace;
  1461. size_t xSpace;
  1462. size_t xReturn;
  1463. unsigned int _1;
  1464. unsigned char _2;
  1465. unsigned int _3;
  1466. long unsigned int xTicksToWait.0_4;
  1467. struct tskTaskControlBlock * _5;
  1468. struct tskTaskControlBlock * _6;
  1469. long unsigned int xTicksToWait.1_7;
  1470. long int _8;
  1471. unsigned int _9;
  1472. unsigned int _10;
  1473. struct tskTaskControlBlock * _11;
  1474. struct tskTaskControlBlock * _12;
  1475. unsigned char _23;
  1476. <bb 2> [local count: 357913]:
  1477. # DEBUG BEGIN_STMT
  1478. # DEBUG pxStreamBuffer => xStreamBuffer_22(D)
  1479. # DEBUG BEGIN_STMT
  1480. # DEBUG xSpace => 0
  1481. # DEBUG BEGIN_STMT
  1482. # DEBUG xRequiredSpace => xDataLengthBytes_25(D)
  1483. # DEBUG BEGIN_STMT
  1484. # DEBUG BEGIN_STMT
  1485. # DEBUG xMaxReportedSpace => 0
  1486. # DEBUG BEGIN_STMT
  1487. if (pvTxData_27(D) == 0B)
  1488. goto <bb 3>; [30.00%]
  1489. else
  1490. goto <bb 5>; [70.00%]
  1491. <bb 3> [local count: 107374]:
  1492. # DEBUG BEGIN_STMT
  1493. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1494. # DEBUG BEGIN_STMT
  1495. # DEBUG BEGIN_STMT
  1496. __asm__ __volatile__(" mov %0, %1
  1497. msr basepri, %0
  1498. isb
  1499. dsb
  1500. " : "=r" ulNewBASEPRI_54 : "i" 16 : "memory");
  1501. # DEBUG ulNewBASEPRI => ulNewBASEPRI_54
  1502. <bb 4> [local count: 1073741824]:
  1503. # DEBUG ulNewBASEPRI => NULL
  1504. # DEBUG BEGIN_STMT
  1505. # DEBUG BEGIN_STMT
  1506. # DEBUG BEGIN_STMT
  1507. <bb 31> [local count: 1073741824]:
  1508. goto <bb 4>; [100.00%]
  1509. <bb 5> [local count: 250539]:
  1510. # DEBUG BEGIN_STMT
  1511. # DEBUG BEGIN_STMT
  1512. if (xStreamBuffer_22(D) == 0B)
  1513. goto <bb 6>; [30.00%]
  1514. else
  1515. goto <bb 8>; [70.00%]
  1516. <bb 6> [local count: 75162]:
  1517. # DEBUG BEGIN_STMT
  1518. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1519. # DEBUG BEGIN_STMT
  1520. # DEBUG BEGIN_STMT
  1521. __asm__ __volatile__(" mov %0, %1
  1522. msr basepri, %0
  1523. isb
  1524. dsb
  1525. " : "=r" ulNewBASEPRI_55 : "i" 16 : "memory");
  1526. # DEBUG ulNewBASEPRI => ulNewBASEPRI_55
  1527. <bb 7> [local count: 751619279]:
  1528. # DEBUG ulNewBASEPRI => NULL
  1529. # DEBUG BEGIN_STMT
  1530. # DEBUG BEGIN_STMT
  1531. # DEBUG BEGIN_STMT
  1532. <bb 32> [local count: 751619279]:
  1533. goto <bb 7>; [100.00%]
  1534. <bb 8> [local count: 175378]:
  1535. # DEBUG BEGIN_STMT
  1536. # DEBUG BEGIN_STMT
  1537. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xLength;
  1538. xMaxReportedSpace_29 = _1 + 4294967295;
  1539. # DEBUG xMaxReportedSpace => xMaxReportedSpace_29
  1540. # DEBUG BEGIN_STMT
  1541. _2 = MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].ucFlags;
  1542. _23 = _2 & 1;
  1543. if (_23 != 0)
  1544. goto <bb 9>; [50.00%]
  1545. else
  1546. goto <bb 14>; [50.00%]
  1547. <bb 9> [local count: 87689]:
  1548. # DEBUG BEGIN_STMT
  1549. xRequiredSpace_30 = xDataLengthBytes_25(D) + 4;
  1550. # DEBUG xRequiredSpace => xRequiredSpace_30
  1551. # DEBUG BEGIN_STMT
  1552. if (xDataLengthBytes_25(D) >= xRequiredSpace_30)
  1553. goto <bb 10>; [50.00%]
  1554. else
  1555. goto <bb 12>; [50.00%]
  1556. <bb 10> [local count: 43844]:
  1557. # DEBUG BEGIN_STMT
  1558. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1559. # DEBUG BEGIN_STMT
  1560. # DEBUG BEGIN_STMT
  1561. __asm__ __volatile__(" mov %0, %1
  1562. msr basepri, %0
  1563. isb
  1564. dsb
  1565. " : "=r" ulNewBASEPRI_56 : "i" 16 : "memory");
  1566. # DEBUG ulNewBASEPRI => ulNewBASEPRI_56
  1567. <bb 11> [local count: 438444579]:
  1568. # DEBUG ulNewBASEPRI => NULL
  1569. # DEBUG BEGIN_STMT
  1570. # DEBUG BEGIN_STMT
  1571. # DEBUG BEGIN_STMT
  1572. <bb 33> [local count: 438444579]:
  1573. goto <bb 11>; [100.00%]
  1574. <bb 12> [local count: 43844]:
  1575. # DEBUG BEGIN_STMT
  1576. # DEBUG BEGIN_STMT
  1577. if (xMaxReportedSpace_29 < xRequiredSpace_30)
  1578. goto <bb 13>; [50.00%]
  1579. else
  1580. goto <bb 15>; [50.00%]
  1581. <bb 13> [local count: 21922]:
  1582. # DEBUG BEGIN_STMT
  1583. xTicksToWait = 0;
  1584. goto <bb 15>; [100.00%]
  1585. <bb 14> [local count: 87689]:
  1586. # DEBUG BEGIN_STMT
  1587. _3 = MIN_EXPR <xMaxReportedSpace_29, xDataLengthBytes_25(D)>;
  1588. <bb 15> [local count: 131533]:
  1589. # xRequiredSpace_15 = PHI <xRequiredSpace_30(13), _3(14), xRequiredSpace_30(12)>
  1590. # DEBUG xRequiredSpace => xRequiredSpace_15
  1591. # DEBUG BEGIN_STMT
  1592. # DEBUG BEGIN_STMT
  1593. xTicksToWait.0_4 = xTicksToWait;
  1594. if (xTicksToWait.0_4 != 0)
  1595. goto <bb 16>; [50.00%]
  1596. else
  1597. goto <bb 24>; [50.00%]
  1598. <bb 16> [local count: 65767]:
  1599. # DEBUG BEGIN_STMT
  1600. vTaskSetTimeOutState (&xTimeOut);
  1601. <bb 17> [local count: 621434]:
  1602. # DEBUG BEGIN_STMT
  1603. # DEBUG BEGIN_STMT
  1604. vPortEnterCritical ();
  1605. # DEBUG BEGIN_STMT
  1606. xSpace_35 = xStreamBufferSpacesAvailable (xStreamBuffer_22(D));
  1607. # DEBUG xSpace => xSpace_35
  1608. # DEBUG BEGIN_STMT
  1609. if (xRequiredSpace_15 > xSpace_35)
  1610. goto <bb 18>; [96.34%]
  1611. else
  1612. goto <bb 22>; [3.66%]
  1613. <bb 18> [local count: 598690]:
  1614. # DEBUG BEGIN_STMT
  1615. xTaskGenericNotifyStateClear (0B, 0);
  1616. # DEBUG BEGIN_STMT
  1617. _5 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTaskWaitingToSend;
  1618. if (_5 != 0B)
  1619. goto <bb 19>; [3.66%]
  1620. else
  1621. goto <bb 21>; [96.34%]
  1622. <bb 19> [local count: 21912]:
  1623. # DEBUG BEGIN_STMT
  1624. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1625. # DEBUG BEGIN_STMT
  1626. # DEBUG BEGIN_STMT
  1627. __asm__ __volatile__(" mov %0, %1
  1628. msr basepri, %0
  1629. isb
  1630. dsb
  1631. " : "=r" ulNewBASEPRI_57 : "i" 16 : "memory");
  1632. # DEBUG ulNewBASEPRI => ulNewBASEPRI_57
  1633. <bb 20> [local count: 219120732]:
  1634. # DEBUG ulNewBASEPRI => NULL
  1635. # DEBUG BEGIN_STMT
  1636. # DEBUG BEGIN_STMT
  1637. # DEBUG BEGIN_STMT
  1638. <bb 34> [local count: 219120732]:
  1639. goto <bb 20>; [100.00%]
  1640. <bb 21> [local count: 576777]:
  1641. # DEBUG BEGIN_STMT
  1642. # DEBUG BEGIN_STMT
  1643. _6 = xTaskGetCurrentTaskHandle ();
  1644. MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTaskWaitingToSend ={v} _6;
  1645. # DEBUG BEGIN_STMT
  1646. vPortExitCritical ();
  1647. # DEBUG BEGIN_STMT
  1648. # DEBUG BEGIN_STMT
  1649. xTicksToWait.1_7 = xTicksToWait;
  1650. xTaskGenericNotifyWait (0, 0, 0, 0B, xTicksToWait.1_7);
  1651. # DEBUG BEGIN_STMT
  1652. MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTaskWaitingToSend ={v} 0B;
  1653. # DEBUG BEGIN_STMT
  1654. _8 = xTaskCheckForTimeOut (&xTimeOut, &xTicksToWait);
  1655. if (_8 == 0)
  1656. goto <bb 35>; [96.34%]
  1657. else
  1658. goto <bb 23>; [3.66%]
  1659. <bb 35> [local count: 555667]:
  1660. goto <bb 17>; [100.00%]
  1661. <bb 22> [local count: 22744]:
  1662. # xSpace_24 = PHI <xSpace_35(17)>
  1663. # DEBUG BEGIN_STMT
  1664. vPortExitCritical ();
  1665. # DEBUG BEGIN_STMT
  1666. <bb 23> [local count: 43855]:
  1667. # xSpace_13 = PHI <xSpace_24(22), xSpace_35(21)>
  1668. # DEBUG xSpace => xSpace_13
  1669. # DEBUG BEGIN_STMT
  1670. # DEBUG BEGIN_STMT
  1671. if (xSpace_13 == 0)
  1672. goto <bb 24>; [50.00%]
  1673. else
  1674. goto <bb 25>; [50.00%]
  1675. <bb 24> [local count: 87694]:
  1676. # DEBUG xSpace => NULL
  1677. # DEBUG BEGIN_STMT
  1678. xSpace_45 = xStreamBufferSpacesAvailable (xStreamBuffer_22(D));
  1679. # DEBUG xSpace => xSpace_45
  1680. <bb 25> [local count: 109621]:
  1681. # xSpace_14 = PHI <xSpace_13(23), xSpace_45(24)>
  1682. # DEBUG xSpace => xSpace_14
  1683. # DEBUG BEGIN_STMT
  1684. # DEBUG BEGIN_STMT
  1685. xReturn_47 = prvWriteMessageToBuffer (xStreamBuffer_22(D), pvTxData_27(D), xDataLengthBytes_25(D), xSpace_14, xRequiredSpace_15);
  1686. # DEBUG xReturn => xReturn_47
  1687. # DEBUG BEGIN_STMT
  1688. if (xReturn_47 != 0)
  1689. goto <bb 26>; [33.00%]
  1690. else
  1691. goto <bb 30>; [67.00%]
  1692. <bb 26> [local count: 36175]:
  1693. # DEBUG BEGIN_STMT
  1694. # DEBUG BEGIN_STMT
  1695. _9 = prvBytesInBuffer (xStreamBuffer_22(D));
  1696. _10 = MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTriggerLevelBytes;
  1697. if (_9 >= _10)
  1698. goto <bb 27>; [33.00%]
  1699. else
  1700. goto <bb 30>; [67.00%]
  1701. <bb 27> [local count: 11938]:
  1702. # DEBUG BEGIN_STMT
  1703. vTaskSuspendAll ();
  1704. # DEBUG BEGIN_STMT
  1705. _11 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTaskWaitingToReceive;
  1706. if (_11 != 0B)
  1707. goto <bb 28>; [53.47%]
  1708. else
  1709. goto <bb 29>; [46.53%]
  1710. <bb 28> [local count: 6383]:
  1711. # DEBUG BEGIN_STMT
  1712. _12 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTaskWaitingToReceive;
  1713. xTaskGenericNotify (_12, 0, 0, 0, 0B);
  1714. # DEBUG BEGIN_STMT
  1715. MEM[(struct StreamBuffer_t *)xStreamBuffer_22(D)].xTaskWaitingToReceive ={v} 0B;
  1716. <bb 29> [local count: 11938]:
  1717. # DEBUG BEGIN_STMT
  1718. xTaskResumeAll ();
  1719. # DEBUG BEGIN_STMT
  1720. <bb 30> [local count: 109621]:
  1721. # DEBUG BEGIN_STMT
  1722. # DEBUG BEGIN_STMT
  1723. # DEBUG BEGIN_STMT
  1724. xTimeOut ={v} {CLOBBER};
  1725. return xReturn_47;
  1726. }
  1727. xStreamBufferBytesAvailable (struct StreamBufferDef_t * xStreamBuffer)
  1728. {
  1729. uint32_t ulNewBASEPRI;
  1730. size_t xReturn;
  1731. <bb 2> [local count: 230763]:
  1732. # DEBUG BEGIN_STMT
  1733. # DEBUG pxStreamBuffer => xStreamBuffer_1(D)
  1734. # DEBUG BEGIN_STMT
  1735. # DEBUG BEGIN_STMT
  1736. if (xStreamBuffer_1(D) == 0B)
  1737. goto <bb 3>; [46.53%]
  1738. else
  1739. goto <bb 5>; [53.47%]
  1740. <bb 3> [local count: 107374]:
  1741. # DEBUG BEGIN_STMT
  1742. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1743. # DEBUG BEGIN_STMT
  1744. # DEBUG BEGIN_STMT
  1745. __asm__ __volatile__(" mov %0, %1
  1746. msr basepri, %0
  1747. isb
  1748. dsb
  1749. " : "=r" ulNewBASEPRI_5 : "i" 16 : "memory");
  1750. # DEBUG ulNewBASEPRI => ulNewBASEPRI_5
  1751. <bb 4> [local count: 1073741824]:
  1752. # DEBUG ulNewBASEPRI => NULL
  1753. # DEBUG BEGIN_STMT
  1754. # DEBUG BEGIN_STMT
  1755. # DEBUG BEGIN_STMT
  1756. <bb 6> [local count: 1073741824]:
  1757. goto <bb 4>; [100.00%]
  1758. <bb 5> [local count: 123389]:
  1759. # DEBUG BEGIN_STMT
  1760. # DEBUG BEGIN_STMT
  1761. xReturn_4 = prvBytesInBuffer (xStreamBuffer_1(D));
  1762. # DEBUG xReturn => xReturn_4
  1763. # DEBUG BEGIN_STMT
  1764. return xReturn_4;
  1765. }
  1766. xStreamBufferSpacesAvailable (struct StreamBufferDef_t * xStreamBuffer)
  1767. {
  1768. size_t xOriginalTail;
  1769. size_t xSpace;
  1770. unsigned int _1;
  1771. unsigned int _2;
  1772. unsigned int _3;
  1773. unsigned int _4;
  1774. unsigned int _12;
  1775. <bb 2> [local count: 357913]:
  1776. # DEBUG BEGIN_STMT
  1777. # DEBUG pxStreamBuffer => xStreamBuffer_7(D)
  1778. # DEBUG BEGIN_STMT
  1779. # DEBUG BEGIN_STMT
  1780. # DEBUG BEGIN_STMT
  1781. if (xStreamBuffer_7(D) == 0B)
  1782. goto <bb 3>; [30.00%]
  1783. else
  1784. goto <bb 8>; [70.00%]
  1785. <bb 3> [local count: 107374]:
  1786. # DEBUG D#1 => xStreamBuffer_7(D)
  1787. xStreamBufferSpacesAvailable.part.0 ();
  1788. <bb 8> [local count: 250539]:
  1789. <bb 4> [local count: 2277630]:
  1790. # DEBUG BEGIN_STMT
  1791. # DEBUG BEGIN_STMT
  1792. # DEBUG BEGIN_STMT
  1793. xOriginalTail_10 ={v} MEM[(const struct StreamBuffer_t *)xStreamBuffer_7(D)].xTail;
  1794. # DEBUG xOriginalTail => xOriginalTail_10
  1795. # DEBUG BEGIN_STMT
  1796. _1 = MEM[(const struct StreamBuffer_t *)xStreamBuffer_7(D)].xLength;
  1797. _2 ={v} MEM[(const struct StreamBuffer_t *)xStreamBuffer_7(D)].xTail;
  1798. xSpace_11 = _1 + _2;
  1799. # DEBUG xSpace => xSpace_11
  1800. # DEBUG BEGIN_STMT
  1801. _12 ={v} MEM[(const struct StreamBuffer_t *)xStreamBuffer_7(D)].xHead;
  1802. xSpace_13 = xSpace_11 - _12;
  1803. # DEBUG xSpace => xSpace_13
  1804. # DEBUG BEGIN_STMT
  1805. _3 ={v} MEM[(const struct StreamBuffer_t *)xStreamBuffer_7(D)].xTail;
  1806. if (_3 != xOriginalTail_10)
  1807. goto <bb 9>; [89.00%]
  1808. else
  1809. goto <bb 5>; [11.00%]
  1810. <bb 9> [local count: 2027091]:
  1811. goto <bb 4>; [100.00%]
  1812. <bb 5> [local count: 250539]:
  1813. # _4 = PHI <_1(4)>
  1814. # xSpace_5 = PHI <xSpace_13(4)>
  1815. # DEBUG BEGIN_STMT
  1816. xSpace_14 = xSpace_5 + 4294967295;
  1817. # DEBUG xSpace => xSpace_14
  1818. # DEBUG BEGIN_STMT
  1819. if (_4 <= xSpace_14)
  1820. goto <bb 6>; [50.00%]
  1821. else
  1822. goto <bb 7>; [50.00%]
  1823. <bb 6> [local count: 125270]:
  1824. # DEBUG BEGIN_STMT
  1825. xSpace_15 = xSpace_14 - _4;
  1826. # DEBUG xSpace => xSpace_15
  1827. <bb 7> [local count: 250539]:
  1828. # xSpace_6 = PHI <xSpace_14(5), xSpace_15(6)>
  1829. # DEBUG xSpace => xSpace_6
  1830. # DEBUG BEGIN_STMT
  1831. # DEBUG BEGIN_STMT
  1832. return xSpace_6;
  1833. }
  1834. xStreamBufferSetTriggerLevel (struct StreamBufferDef_t * xStreamBuffer, size_t xTriggerLevel)
  1835. {
  1836. uint32_t ulNewBASEPRI;
  1837. BaseType_t xReturn;
  1838. unsigned int _1;
  1839. <bb 2> [local count: 357913]:
  1840. # DEBUG BEGIN_STMT
  1841. # DEBUG pxStreamBuffer => xStreamBuffer_4(D)
  1842. # DEBUG BEGIN_STMT
  1843. # DEBUG BEGIN_STMT
  1844. if (xStreamBuffer_4(D) == 0B)
  1845. goto <bb 3>; [30.00%]
  1846. else
  1847. goto <bb 5>; [70.00%]
  1848. <bb 3> [local count: 107374]:
  1849. # DEBUG BEGIN_STMT
  1850. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1851. # DEBUG BEGIN_STMT
  1852. # DEBUG BEGIN_STMT
  1853. __asm__ __volatile__(" mov %0, %1
  1854. msr basepri, %0
  1855. isb
  1856. dsb
  1857. " : "=r" ulNewBASEPRI_9 : "i" 16 : "memory");
  1858. # DEBUG ulNewBASEPRI => ulNewBASEPRI_9
  1859. <bb 4> [local count: 1073741824]:
  1860. # DEBUG ulNewBASEPRI => NULL
  1861. # DEBUG BEGIN_STMT
  1862. # DEBUG BEGIN_STMT
  1863. # DEBUG BEGIN_STMT
  1864. <bb 8> [local count: 1073741824]:
  1865. goto <bb 4>; [100.00%]
  1866. <bb 5> [local count: 250539]:
  1867. # DEBUG BEGIN_STMT
  1868. # DEBUG BEGIN_STMT
  1869. xTriggerLevel_8 = MAX_EXPR <1, xTriggerLevel_5(D)>;
  1870. # DEBUG xTriggerLevel => xTriggerLevel_8
  1871. # DEBUG BEGIN_STMT
  1872. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_4(D)].xLength;
  1873. if (_1 > xTriggerLevel_8)
  1874. goto <bb 6>; [50.00%]
  1875. else
  1876. goto <bb 7>; [50.00%]
  1877. <bb 6> [local count: 125270]:
  1878. # DEBUG BEGIN_STMT
  1879. MEM[(struct StreamBuffer_t *)xStreamBuffer_4(D)].xTriggerLevelBytes = xTriggerLevel_8;
  1880. # DEBUG BEGIN_STMT
  1881. # DEBUG xReturn => 1
  1882. <bb 7> [local count: 250539]:
  1883. # xReturn_2 = PHI <1(6), 0(5)>
  1884. # DEBUG xReturn => xReturn_2
  1885. # DEBUG BEGIN_STMT
  1886. return xReturn_2;
  1887. }
  1888. xStreamBufferReset (struct StreamBufferDef_t * xStreamBuffer)
  1889. {
  1890. uint32_t ulNewBASEPRI;
  1891. UBaseType_t uxStreamBufferNumber;
  1892. BaseType_t xReturn;
  1893. struct tskTaskControlBlock * _1;
  1894. struct tskTaskControlBlock * _2;
  1895. uint8_t * _3;
  1896. unsigned int _4;
  1897. unsigned int _5;
  1898. unsigned char _6;
  1899. <bb 2> [local count: 230763]:
  1900. # DEBUG BEGIN_STMT
  1901. # DEBUG pxStreamBuffer => xStreamBuffer_9(D)
  1902. # DEBUG BEGIN_STMT
  1903. # DEBUG xReturn => 0
  1904. # DEBUG BEGIN_STMT
  1905. # DEBUG BEGIN_STMT
  1906. if (xStreamBuffer_9(D) == 0B)
  1907. goto <bb 3>; [46.53%]
  1908. else
  1909. goto <bb 5>; [53.47%]
  1910. <bb 3> [local count: 107374]:
  1911. # DEBUG BEGIN_STMT
  1912. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1913. # DEBUG BEGIN_STMT
  1914. # DEBUG BEGIN_STMT
  1915. __asm__ __volatile__(" mov %0, %1
  1916. msr basepri, %0
  1917. isb
  1918. dsb
  1919. " : "=r" ulNewBASEPRI_16 : "i" 16 : "memory");
  1920. # DEBUG ulNewBASEPRI => ulNewBASEPRI_16
  1921. <bb 4> [local count: 1073741824]:
  1922. # DEBUG ulNewBASEPRI => NULL
  1923. # DEBUG BEGIN_STMT
  1924. # DEBUG BEGIN_STMT
  1925. # DEBUG BEGIN_STMT
  1926. <bb 9> [local count: 1073741824]:
  1927. goto <bb 4>; [100.00%]
  1928. <bb 5> [local count: 123389]:
  1929. # DEBUG BEGIN_STMT
  1930. # DEBUG BEGIN_STMT
  1931. uxStreamBufferNumber_11 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].uxStreamBufferNumber;
  1932. # DEBUG uxStreamBufferNumber => uxStreamBufferNumber_11
  1933. # DEBUG BEGIN_STMT
  1934. vPortEnterCritical ();
  1935. # DEBUG BEGIN_STMT
  1936. _1 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTaskWaitingToReceive;
  1937. if (_1 == 0B)
  1938. goto <bb 6>; [30.00%]
  1939. else
  1940. goto <bb 8>; [70.00%]
  1941. <bb 6> [local count: 37017]:
  1942. # DEBUG BEGIN_STMT
  1943. _2 ={v} MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTaskWaitingToSend;
  1944. if (_2 == 0B)
  1945. goto <bb 7>; [17.43%]
  1946. else
  1947. goto <bb 8>; [82.57%]
  1948. <bb 7> [local count: 6452]:
  1949. # DEBUG BEGIN_STMT
  1950. _3 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].pucBuffer;
  1951. _4 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xLength;
  1952. _5 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].xTriggerLevelBytes;
  1953. _6 = MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].ucFlags;
  1954. prvInitialiseNewStreamBuffer (xStreamBuffer_9(D), _3, _4, _5, _6);
  1955. # DEBUG BEGIN_STMT
  1956. # DEBUG xReturn => 1
  1957. # DEBUG BEGIN_STMT
  1958. MEM[(struct StreamBuffer_t *)xStreamBuffer_9(D)].uxStreamBufferNumber = uxStreamBufferNumber_11;
  1959. <bb 8> [local count: 123389]:
  1960. # xReturn_7 = PHI <0(5), 0(6), 1(7)>
  1961. # DEBUG xReturn => xReturn_7
  1962. # DEBUG BEGIN_STMT
  1963. # DEBUG BEGIN_STMT
  1964. vPortExitCritical ();
  1965. # DEBUG BEGIN_STMT
  1966. return xReturn_7;
  1967. }
  1968. vStreamBufferDelete (struct StreamBufferDef_t * xStreamBuffer)
  1969. {
  1970. uint32_t ulNewBASEPRI;
  1971. unsigned char _1;
  1972. unsigned char _4;
  1973. <bb 2> [local count: 357913]:
  1974. # DEBUG BEGIN_STMT
  1975. # DEBUG pxStreamBuffer => xStreamBuffer_3(D)
  1976. # DEBUG BEGIN_STMT
  1977. if (xStreamBuffer_3(D) == 0B)
  1978. goto <bb 3>; [30.00%]
  1979. else
  1980. goto <bb 5>; [70.00%]
  1981. <bb 3> [local count: 107374]:
  1982. # DEBUG BEGIN_STMT
  1983. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1984. # DEBUG BEGIN_STMT
  1985. # DEBUG BEGIN_STMT
  1986. __asm__ __volatile__(" mov %0, %1
  1987. msr basepri, %0
  1988. isb
  1989. dsb
  1990. " : "=r" ulNewBASEPRI_8 : "i" 16 : "memory");
  1991. # DEBUG ulNewBASEPRI => ulNewBASEPRI_8
  1992. <bb 4> [local count: 1073741824]:
  1993. # DEBUG ulNewBASEPRI => NULL
  1994. # DEBUG BEGIN_STMT
  1995. # DEBUG BEGIN_STMT
  1996. # DEBUG BEGIN_STMT
  1997. <bb 9> [local count: 1073741824]:
  1998. goto <bb 4>; [100.00%]
  1999. <bb 5> [local count: 250539]:
  2000. # DEBUG BEGIN_STMT
  2001. # DEBUG BEGIN_STMT
  2002. # DEBUG BEGIN_STMT
  2003. _1 = MEM[(struct StreamBuffer_t *)xStreamBuffer_3(D)].ucFlags;
  2004. _4 = _1 & 2;
  2005. if (_4 == 0)
  2006. goto <bb 6>; [50.00%]
  2007. else
  2008. goto <bb 7>; [50.00%]
  2009. <bb 6> [local count: 125270]:
  2010. # DEBUG BEGIN_STMT
  2011. vPortFree (xStreamBuffer_3(D));
  2012. goto <bb 8>; [100.00%]
  2013. <bb 7> [local count: 125270]:
  2014. # DEBUG BEGIN_STMT
  2015. memset (xStreamBuffer_3(D), 0, 36);
  2016. <bb 8> [local count: 250539]:
  2017. return;
  2018. }
  2019. xStreamBufferGenericCreate (size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer)
  2020. {
  2021. uint32_t ulNewBASEPRI;
  2022. uint32_t ulNewBASEPRI;
  2023. uint32_t ulNewBASEPRI;
  2024. uint8_t ucFlags;
  2025. uint8_t * pucAllocatedMemory;
  2026. unsigned int _1;
  2027. uint8_t * _2;
  2028. <bb 2> [local count: 325376]:
  2029. # DEBUG BEGIN_STMT
  2030. # DEBUG BEGIN_STMT
  2031. # DEBUG BEGIN_STMT
  2032. if (xIsMessageBuffer_5(D) == 1)
  2033. goto <bb 3>; [34.00%]
  2034. else
  2035. goto <bb 6>; [66.00%]
  2036. <bb 3> [local count: 110628]:
  2037. # DEBUG BEGIN_STMT
  2038. # DEBUG ucFlags => 1
  2039. # DEBUG BEGIN_STMT
  2040. if (xBufferSizeBytes_6(D) <= 4)
  2041. goto <bb 4>; [50.00%]
  2042. else
  2043. goto <bb 9>; [50.00%]
  2044. <bb 4> [local count: 55314]:
  2045. # DEBUG BEGIN_STMT
  2046. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  2047. # DEBUG BEGIN_STMT
  2048. # DEBUG BEGIN_STMT
  2049. __asm__ __volatile__(" mov %0, %1
  2050. msr basepri, %0
  2051. isb
  2052. dsb
  2053. " : "=r" ulNewBASEPRI_15 : "i" 16 : "memory");
  2054. # DEBUG ulNewBASEPRI => ulNewBASEPRI_15
  2055. <bb 5> [local count: 553139728]:
  2056. # DEBUG ulNewBASEPRI => NULL
  2057. # DEBUG BEGIN_STMT
  2058. # DEBUG BEGIN_STMT
  2059. # DEBUG BEGIN_STMT
  2060. <bb 16> [local count: 553139728]:
  2061. goto <bb 5>; [100.00%]
  2062. <bb 6> [local count: 214748]:
  2063. # DEBUG BEGIN_STMT
  2064. # DEBUG ucFlags => 0
  2065. # DEBUG BEGIN_STMT
  2066. if (xBufferSizeBytes_6(D) == 0)
  2067. goto <bb 7>; [50.00%]
  2068. else
  2069. goto <bb 9>; [50.00%]
  2070. <bb 7> [local count: 107374]:
  2071. # DEBUG BEGIN_STMT
  2072. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  2073. # DEBUG BEGIN_STMT
  2074. # DEBUG BEGIN_STMT
  2075. __asm__ __volatile__(" mov %0, %1
  2076. msr basepri, %0
  2077. isb
  2078. dsb
  2079. " : "=r" ulNewBASEPRI_16 : "i" 16 : "memory");
  2080. # DEBUG ulNewBASEPRI => ulNewBASEPRI_16
  2081. <bb 8> [local count: 1073741824]:
  2082. # DEBUG ulNewBASEPRI => NULL
  2083. # DEBUG BEGIN_STMT
  2084. # DEBUG BEGIN_STMT
  2085. # DEBUG BEGIN_STMT
  2086. <bb 18> [local count: 1073741824]:
  2087. goto <bb 8>; [100.00%]
  2088. <bb 9> [local count: 162688]:
  2089. # ucFlags_3 = PHI <1(3), 0(6)>
  2090. # DEBUG ucFlags => ucFlags_3
  2091. # DEBUG BEGIN_STMT
  2092. # DEBUG BEGIN_STMT
  2093. if (xBufferSizeBytes_6(D) < xTriggerLevelBytes_8(D))
  2094. goto <bb 10>; [50.00%]
  2095. else
  2096. goto <bb 12>; [50.00%]
  2097. <bb 10> [local count: 81344]:
  2098. # DEBUG BEGIN_STMT
  2099. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  2100. # DEBUG BEGIN_STMT
  2101. # DEBUG BEGIN_STMT
  2102. __asm__ __volatile__(" mov %0, %1
  2103. msr basepri, %0
  2104. isb
  2105. dsb
  2106. " : "=r" ulNewBASEPRI_17 : "i" 16 : "memory");
  2107. # DEBUG ulNewBASEPRI => ulNewBASEPRI_17
  2108. <bb 11> [local count: 813440776]:
  2109. # DEBUG ulNewBASEPRI => NULL
  2110. # DEBUG BEGIN_STMT
  2111. # DEBUG BEGIN_STMT
  2112. # DEBUG BEGIN_STMT
  2113. <bb 17> [local count: 813440776]:
  2114. goto <bb 11>; [100.00%]
  2115. <bb 12> [local count: 81344]:
  2116. # DEBUG BEGIN_STMT
  2117. # DEBUG BEGIN_STMT
  2118. xTriggerLevelBytes_9 = MAX_EXPR <1, xTriggerLevelBytes_8(D)>;
  2119. # DEBUG xTriggerLevelBytes => xTriggerLevelBytes_9
  2120. # DEBUG BEGIN_STMT
  2121. if (xBufferSizeBytes_6(D) <= 4294967258)
  2122. goto <bb 13>; [54.67%]
  2123. else
  2124. goto <bb 15>; [45.33%]
  2125. <bb 13> [local count: 44471]:
  2126. # DEBUG BEGIN_STMT
  2127. xBufferSizeBytes_11 = xBufferSizeBytes_6(D) + 1;
  2128. # DEBUG xBufferSizeBytes => xBufferSizeBytes_11
  2129. # DEBUG BEGIN_STMT
  2130. _1 = xBufferSizeBytes_6(D) + 37;
  2131. pucAllocatedMemory_13 = pvPortMalloc (_1);
  2132. # DEBUG pucAllocatedMemory => pucAllocatedMemory_13
  2133. # DEBUG xBufferSizeBytes => xBufferSizeBytes_11
  2134. # DEBUG BEGIN_STMT
  2135. if (pucAllocatedMemory_13 != 0B)
  2136. goto <bb 14>; [53.47%]
  2137. else
  2138. goto <bb 15>; [46.53%]
  2139. <bb 14> [local count: 23779]:
  2140. # DEBUG BEGIN_STMT
  2141. _2 = pucAllocatedMemory_13 + 36;
  2142. prvInitialiseNewStreamBuffer (pucAllocatedMemory_13, _2, xBufferSizeBytes_11, xTriggerLevelBytes_9, ucFlags_3);
  2143. # DEBUG BEGIN_STMT
  2144. <bb 15> [local count: 81344]:
  2145. # pucAllocatedMemory_10 = PHI <pucAllocatedMemory_13(13), pucAllocatedMemory_13(14), 0B(12)>
  2146. # DEBUG pucAllocatedMemory => NULL
  2147. # DEBUG xBufferSizeBytes => NULL
  2148. # DEBUG BEGIN_STMT
  2149. # DEBUG BEGIN_STMT
  2150. return pucAllocatedMemory_10;
  2151. }