// Ayzim is better, collapsing an empty label jump into an empty else (emopt doesn't touch it). In theory ayzim could eliminate the else entirely (and does so during a following registerizeHarder pass if run) // search for SEE_HERE function _sqlite3PagerCommitPhaseOne($pPager,$zMaster,$noSync) { $pPager = $pPager|0; $zMaster = $zMaster|0; $noSync = $noSync|0; var $$0 = 0, $$0$i = 0, $$0$i7$ph = 0, $$02$i = 0, $$02$i$lcssa = 0, $$03$i = 0, $$03$i$lcssa = 0, $$old1 = 0, $$phi$trans$insert$i = 0, $$pre = 0, $$pre$i = 0, $$pre$phi39Z2D = 0, $$pre38 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0; var $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0; var $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0; var $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0; var $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0; var $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0; var $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0; var $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0; var $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0; var $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0; var $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0; var $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0; var $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0; var $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0; var $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0; var $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0; var $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0; var $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0; var $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0; var $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0; var $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0; var $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0; var $483 = 0, $484 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0; var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0; var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $cksum$0$lcssa$i = 0, $cksum$04$i = 0; var $currentSize$i = 0, $h$0$i = 0, $h$07$i = 0, $h$08$i = 0, $i$0 = 0, $i$0$in32 = 0, $i$0$in32$phi = 0, $i$031 = 0, $i$033 = 0, $jrnlSize$i = 0, $nMaster$0$lcssa$i = 0, $nMaster$03$i = 0, $or$cond = 0, $p$01$i = 0, $pList$019 = 0, $pPage = 0, $pPage$pn$i$i$i = 0, $pPage$pn$i$i$i10 = 0, $pPageOne = 0, $pPager$idx = 0; var $pPager$idx$val = 0, $pPager$idx2 = 0, $pPager$idx2$val = 0, $pSynced$0$i$i$i = 0, $pSynced$0$i$i$i12 = 0, $pSynced$0$in$i$i$i = 0, $pSynced$0$in$i$i$i11 = 0, $pSynced$0$lcssa$i$i$i = 0, $pSynced$0$lcssa$i$i$i14 = 0, $rc$0$i = 0, $rc$01$i = 0, $rc$1 = 0, $rc$1$i18 = 0, $rc$2 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; $currentSize$i = sp + 8|0; $jrnlSize$i = sp; $pPageOne = sp + 20|0; $pPage = sp + 16|0; $0 = ((($pPager)) + 40|0); $1 = HEAP32[$0>>2]|0; $2 = ($1|0)==(0); if (!($2)) { $$0 = $1; STACKTOP = sp;return ($$0|0); } $3 = ((($pPager)) + 15|0); $4 = HEAP8[$3>>0]|0; $5 = ($4&255)<(3); if ($5) { $$0 = 0; STACKTOP = sp;return ($$0|0); } $6 = ((($pPager)) + 14|0); $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); L7: do { if ($8) { $pPager$idx2 = ((($pPager)) + 172|0); $pPager$idx2$val = HEAP32[$pPager$idx2>>2]|0; $16 = ($pPager$idx2$val|0)==(0|0); if (!($16)) { $17 = ((($pPager)) + 168|0); $18 = HEAP32[$17>>2]|0; $19 = (_sqlite3PcacheDirtyList($18)|0); HEAP32[$pPageOne>>2] = 0; $20 = ($19|0)==(0|0); if ($20) { $21 = (_sqlite3PagerAcquire($pPager,1,$pPageOne,0)|0); $22 = HEAP32[$pPageOne>>2]|0; $23 = ((($22)) + 8|0); HEAP32[$23>>2] = 0; $24 = ($22|0)==(0|0); if ($24) { $35 = 0;$rc$1 = $21; } else { $482 = $22;$pList$019 = $22; label = 9; } } else { $482 = 0;$pList$019 = $19; label = 9; } if ((label|0) == 9) { $25 = ((($pPager)) + 24|0); $26 = HEAP32[$25>>2]|0; $27 = ((($pPager)) + 9|0); $28 = HEAP8[$27>>0]|0; $29 = ($28<<24>>24)==(0); if ($29) { $33 = 0; } else { $30 = ((($pPager)) + 11|0); $31 = HEAP8[$30>>0]|0; $32 = $31&255; $33 = $32; } $34 = (_pagerWalFrames($pPager,$pList$019,$26,1,$33)|0); $35 = $482;$rc$1 = $34; } _sqlite3PagerUnref($35); $36 = ($rc$1|0)==(0); if (!($36)) { $$0 = $rc$1; STACKTOP = sp;return ($$0|0); } $37 = HEAP32[$17>>2]|0; $38 = HEAP32[$37>>2]|0; $39 = ($38|0)==(0|0); if ($39) { break; } else { $41 = $38; } while(1) { $40 = ((($41)) + 20|0); $42 = HEAP16[$40>>1]|0; $43 = $42 & 2; $44 = ($43<<16>>16)==(0); if (!($44)) { $47 = ((($41)) + 24|0); $48 = HEAP32[$47>>2]|0; $49 = ((($48)) + 8|0); $50 = HEAP32[$49>>2]|0; $51 = ($50|0)==($41|0); if ($51) { $pPage$pn$i$i$i = $41; while(1) { $pSynced$0$in$i$i$i = ((($pPage$pn$i$i$i)) + 32|0); $pSynced$0$i$i$i = HEAP32[$pSynced$0$in$i$i$i>>2]|0; $52 = ($pSynced$0$i$i$i|0)==(0|0); if ($52) { $pSynced$0$lcssa$i$i$i = 0; break; } $53 = ((($pSynced$0$i$i$i)) + 20|0); $54 = HEAP16[$53>>1]|0; $55 = $54 & 4; $56 = ($55<<16>>16)==(0); if ($56) { $pSynced$0$lcssa$i$i$i = $pSynced$0$i$i$i; break; } else { $pPage$pn$i$i$i = $pSynced$0$i$i$i; } } HEAP32[$49>>2] = $pSynced$0$lcssa$i$i$i; } $57 = ((($41)) + 28|0); $58 = HEAP32[$57>>2]|0; $59 = ($58|0)==(0|0); $60 = ((($41)) + 32|0); $61 = HEAP32[$60>>2]|0; $62 = $58; if ($59) { $64 = ((($48)) + 4|0); HEAP32[$64>>2] = $61; } else { $63 = ((($58)) + 32|0); HEAP32[$63>>2] = $61; } $65 = HEAP32[$60>>2]|0; $66 = ($65|0)==(0|0); if ($66) { HEAP32[$48>>2] = $62; } else { $67 = ((($65)) + 28|0); HEAP32[$67>>2] = $62; } HEAP32[$57>>2] = 0; HEAP32[$60>>2] = 0; $68 = $42&65535; $69 = $68 & 65529; $70 = $69&65535; HEAP16[$40>>1] = $70; $71 = ((($41)) + 22|0); $72 = HEAP16[$71>>1]|0; $73 = ($72<<16>>16)==(0); if ($73) { $74 = ((($48)) + 28|0); $75 = HEAP32[$74>>2]|0; $76 = ($75|0)==(0); if (!($76)) { $77 = ((($41)) + 12|0); $78 = HEAP32[$77>>2]|0; $79 = ($78|0)==(1); if ($79) { $80 = ((($48)) + 44|0); HEAP32[$80>>2] = 0; } $81 = HEAP32[(324)>>2]|0; $82 = ((($48)) + 40|0); $83 = HEAP32[$82>>2]|0; FUNCTION_TABLE_viii[$81 & 63]($83,$41,0); } } } $45 = HEAP32[$37>>2]|0; $46 = ($45|0)==(0|0); if ($46) { break L7; } else { $41 = $45; } } } $84 = ((($pPager)) + 17|0); $85 = HEAP8[$84>>0]|0; $86 = ($85<<24>>24)==(0); $87 = ((($pPager)) + 24|0); if ($86) { $88 = HEAP32[$87>>2]|0; $89 = ($88|0)==(0); if ($89) { label = 36; } else { $90 = (_sqlite3PagerAcquire($pPager,1,$currentSize$i,0)|0); $91 = ($90|0)==(0); $92 = HEAP32[$currentSize$i>>2]|0; if ($91) { $93 = (_sqlite3PagerWrite($92)|0); $94 = ($93|0)==(0); if ($94) { $95 = ((($92)) + 16|0); $96 = HEAP32[$95>>2]|0; $97 = ((($96)) + 100|0); $98 = HEAP8[$97>>0]|0; $99 = $98&255; $100 = $99 << 24; $101 = ((($96)) + 101|0); $102 = HEAP8[$101>>0]|0; $103 = $102&255; $104 = $103 << 16; $105 = $104 | $100; $106 = ((($96)) + 102|0); $107 = HEAP8[$106>>0]|0; $108 = $107&255; $109 = $108 << 8; $110 = $105 | $109; $111 = ((($96)) + 103|0); $112 = HEAP8[$111>>0]|0; $113 = $112&255; $114 = $110 | $113; $115 = (($114) + 1)|0; $116 = HEAP32[$92>>2]|0; $117 = ((($116)) + 24|0); $118 = $115 >>> 24; $119 = $118&255; HEAP8[$117>>0] = $119; $120 = $115 >>> 16; $121 = $120&255; $122 = ((($116)) + 25|0); HEAP8[$122>>0] = $121; $123 = $115 >>> 8; $124 = $123&255; $125 = ((($116)) + 26|0); HEAP8[$125>>0] = $124; $126 = $115&255; $127 = ((($116)) + 27|0); HEAP8[$127>>0] = $126; $128 = HEAP32[$92>>2]|0; $129 = ((($128)) + 92|0); HEAP8[$129>>0] = $119; $130 = ((($128)) + 93|0); HEAP8[$130>>0] = $121; $131 = ((($128)) + 94|0); HEAP8[$131>>0] = $124; $132 = ((($128)) + 95|0); HEAP8[$132>>0] = $126; $133 = HEAP32[$92>>2]|0; $134 = ((($133)) + 96|0); HEAP8[$134>>0] = 0; $135 = ((($133)) + 97|0); HEAP8[$135>>0] = 45; $136 = ((($133)) + 98|0); HEAP8[$136>>0] = -30; $137 = ((($133)) + 99|0); HEAP8[$137>>0] = 31; HEAP8[$84>>0] = 1; $rc$01$i = 0; } else { $rc$01$i = $93; } } else { $rc$01$i = $90; } _sqlite3PagerUnref($92); $138 = ($rc$01$i|0)==(0); if (!($138)) { $$0 = $rc$01$i; STACKTOP = sp;return ($$0|0); } } // SEE_HERE } else { label = 36; } if ((label|0) == 36) { } $139 = HEAP32[$87>>2]|0; $140 = ((($pPager)) + 28|0); $141 = HEAP32[$140>>2]|0; $142 = ($139>>>0)<($141>>>0); if ($142) { $143 = ((($pPager)) + 5|0); $144 = HEAP8[$143>>0]|0; $145 = ($144<<24>>24)==(2); if (!($145)) { $146 = HEAP32[796>>2]|0; $147 = ((($pPager)) + 128|0); $148 = HEAP32[$147>>2]|0; $149 = (($146|0) / ($148|0))&-1; HEAP32[$87>>2] = $141; $i$031 = (($139) + 1)|0; $150 = ($i$031>>>0)>($141>>>0); L61: do { if (!($150)) { $151 = ((($pPager)) + 56|0); $483 = $141;$i$0$in32 = $139;$i$033 = $i$031; while(1) { $152 = HEAP32[$151>>2]|0; $153 = ($152|0)==(0|0); L65: do { if ($153) { $$0$i = 0; label = 51; } else { $154 = HEAP32[$152>>2]|0; $155 = ($i$0$in32>>>0)<($154>>>0); if ($155) { $$02$i = $i$0$in32;$$03$i = $152; while(1) { $156 = ((($$03$i)) + 8|0); $157 = HEAP32[$156>>2]|0; $158 = ($157|0)==(0); if ($158) { $$02$i$lcssa = $$02$i;$$03$i$lcssa = $$03$i; break; } $159 = (($$02$i>>>0) / ($157>>>0))&-1; $160 = (($$02$i>>>0) % ($157>>>0))&-1; $161 = ((($$03$i)) + 12|0); $162 = (($161) + ($159<<2)|0); $163 = HEAP32[$162>>2]|0; $164 = ($163|0)==(0|0); if ($164) { $$0$i = 0; label = 51; break L65; } else { $$02$i = $160;$$03$i = $163; } } $165 = HEAP32[$$03$i$lcssa>>2]|0; $166 = ($165>>>0)<(4001); if ($166) { $167 = $$02$i$lcssa >>> 3; $168 = ((($$03$i$lcssa)) + 12|0); $169 = (($168) + ($167)|0); $170 = HEAP8[$169>>0]|0; $171 = $170&255; $172 = $$02$i$lcssa & 7; $173 = 1 << $172; $174 = $171 & $173; $175 = ($174|0)!=(0); $176 = $175&1; $$0$i = $176; label = 51; break; } $177 = (($$02$i$lcssa) + 1)|0; $h$07$i = (($$02$i$lcssa>>>0) % 125)&-1; $178 = (((($$03$i$lcssa)) + 12|0) + ($h$07$i<<2)|0); $179 = HEAP32[$178>>2]|0; $180 = ($179|0)==(0); if ($180) { $$0$i = 0; label = 51; } else { $185 = $179;$h$08$i = $h$07$i; while(1) { $186 = ($185|0)==($177|0); if ($186) { $190 = $483; break L65; } $181 = (($h$08$i) + 1)|0; $h$0$i = (($181>>>0) % 125)&-1; $182 = (((($$03$i$lcssa)) + 12|0) + ($h$0$i<<2)|0); $183 = HEAP32[$182>>2]|0; $184 = ($183|0)==(0); if ($184) { $$0$i = 0; label = 51; break; } else { $185 = $183;$h$08$i = $h$0$i; } } } } else { $$0$i = 0; label = 51; } } } while(0); if ((label|0) == 51) { label = 0; $187 = ($$0$i|0)!=(0); $188 = ($i$0$in32|0)==($149|0); $or$cond = $188 | $187; if ($or$cond) { $190 = $483; } else { $191 = (_sqlite3PagerAcquire($pPager,$i$033,$pPage,0)|0); $192 = ($191|0)==(0); if (!($192)) { $$0 = $191; label = 116; break; } $193 = HEAP32[$pPage>>2]|0; $194 = (_sqlite3PagerWrite($193)|0); _sqlite3PagerUnref($193); $195 = ($194|0)==(0); if (!($195)) { $$0 = $194; label = 116; break; } $$pre = HEAP32[$140>>2]|0; $190 = $$pre; } } $i$0 = (($i$033) + 1)|0; $189 = ($i$0>>>0)>($190>>>0); if ($189) { break L61; } else { $i$0$in32$phi = $i$033;$483 = $190;$i$033 = $i$0;$i$0$in32 = $i$0$in32$phi; } } if ((label|0) == 116) { STACKTOP = sp;return ($$0|0); } } } while(0); HEAP32[$87>>2] = $139; } } $196 = ($zMaster|0)==(0|0); L88: do { if ($196) { label = 73; } else { $197 = ((($pPager)) + 5|0); $198 = HEAP8[$197>>0]|0; switch ($198<<24>>24) { case 2: case 4: { label = 73; break L88; break; } default: { } } $199 = ((($pPager)) + 18|0); HEAP8[$199>>0] = 1; $200 = HEAP8[$zMaster>>0]|0; $201 = ($200<<24>>24)==(0); if ($201) { $cksum$0$lcssa$i = 0;$nMaster$0$lcssa$i = 0; } else { $203 = $200;$cksum$04$i = 0;$nMaster$03$i = 0; while(1) { $202 = $203 << 24 >> 24; $204 = (($202) + ($cksum$04$i))|0; $205 = (($nMaster$03$i) + 1)|0; $206 = (($zMaster) + ($205)|0); $207 = HEAP8[$206>>0]|0; $208 = ($207<<24>>24)==(0); if ($208) { $cksum$0$lcssa$i = $204;$nMaster$0$lcssa$i = $205; break; } else { $203 = $207;$cksum$04$i = $204;$nMaster$03$i = $205; } } } $209 = ((($pPager)) + 9|0); $210 = HEAP8[$209>>0]|0; $211 = ($210<<24>>24)==(0); $$phi$trans$insert$i = ((($pPager)) + 72|0); $212 = $$phi$trans$insert$i; $213 = $212; $214 = HEAP32[$213>>2]|0; $215 = (($212) + 4)|0; $216 = $215; $217 = HEAP32[$216>>2]|0; if ($211) { $257 = $214;$258 = $217; } else { $218 = ($214|0)==(0); $219 = ($217|0)==(0); $220 = $218 & $219; if ($220) { $233 = 0;$236 = 0; } else { $221 = (_i64Add(($214|0),($217|0),-1,-1)|0); $222 = tempRet0; $223 = ((($pPager)) + 124|0); $224 = HEAP32[$223>>2]|0; $225 = (___divdi3(($221|0),($222|0),($224|0),0)|0); $226 = tempRet0; $227 = (_i64Add(($225|0),($226|0),1,0)|0); $228 = tempRet0; $229 = (___muldi3(($227|0),($228|0),($224|0),0)|0); $230 = tempRet0; $233 = $229;$236 = $230; } $231 = $$phi$trans$insert$i; $232 = $231; HEAP32[$232>>2] = $233; $234 = (($231) + 4)|0; $235 = $234; HEAP32[$235>>2] = $236; $257 = $233;$258 = $236; } $237 = ((($pPager)) + 64|0); $238 = HEAP32[$237>>2]|0; $239 = HEAP32[796>>2]|0; $240 = ((($pPager)) + 128|0); $241 = HEAP32[$240>>2]|0; $242 = (($239|0) / ($241|0))&-1; $243 = (($242) + 1)|0; $244 = $243 >>> 24; $245 = $244&255; HEAP8[$currentSize$i>>0] = $245; $246 = $243 >>> 16; $247 = $246&255; $248 = ((($currentSize$i)) + 1|0); HEAP8[$248>>0] = $247; $249 = $243 >>> 8; $250 = $249&255; $251 = ((($currentSize$i)) + 2|0); HEAP8[$251>>0] = $250; $252 = $243&255; $253 = ((($currentSize$i)) + 3|0); HEAP8[$253>>0] = $252; $254 = HEAP32[$238>>2]|0; $255 = ((($254)) + 12|0); $256 = HEAP32[$255>>2]|0; $259 = (FUNCTION_TABLE_iiiiii[$256 & 31]($238,$currentSize$i,4,$257,$258)|0); $260 = ($259|0)==(0); if ($260) { $261 = HEAP32[$237>>2]|0; $262 = (_i64Add(($257|0),($258|0),4,0)|0); $263 = tempRet0; $264 = HEAP32[$261>>2]|0; $265 = ((($264)) + 12|0); $266 = HEAP32[$265>>2]|0; $267 = (FUNCTION_TABLE_iiiiii[$266 & 31]($261,$zMaster,$nMaster$0$lcssa$i,$262,$263)|0); $268 = ($267|0)==(0); if ($268) { $269 = HEAP32[$237>>2]|0; $270 = ($nMaster$0$lcssa$i|0)<(0); $271 = $270 << 31 >> 31; $272 = (_i64Add(($262|0),($263|0),($nMaster$0$lcssa$i|0),($271|0))|0); $273 = tempRet0; $274 = $nMaster$0$lcssa$i >>> 24; $275 = $274&255; HEAP8[$currentSize$i>>0] = $275; $276 = $nMaster$0$lcssa$i >>> 16; $277 = $276&255; HEAP8[$248>>0] = $277; $278 = $nMaster$0$lcssa$i >>> 8; $279 = $278&255; HEAP8[$251>>0] = $279; $280 = $nMaster$0$lcssa$i&255; HEAP8[$253>>0] = $280; $281 = HEAP32[$269>>2]|0; $282 = ((($281)) + 12|0); $283 = HEAP32[$282>>2]|0; $284 = (FUNCTION_TABLE_iiiiii[$283 & 31]($269,$currentSize$i,4,$272,$273)|0); $285 = ($284|0)==(0); if ($285) { $286 = HEAP32[$237>>2]|0; $287 = (_i64Add(($272|0),($273|0),4,0)|0); $288 = tempRet0; $289 = $cksum$0$lcssa$i >>> 24; $290 = $289&255; HEAP8[$currentSize$i>>0] = $290; $291 = $cksum$0$lcssa$i >>> 16; $292 = $291&255; HEAP8[$248>>0] = $292; $293 = $cksum$0$lcssa$i >>> 8; $294 = $293&255; HEAP8[$251>>0] = $294; $295 = $cksum$0$lcssa$i&255; HEAP8[$253>>0] = $295; $296 = HEAP32[$286>>2]|0; $297 = ((($296)) + 12|0); $298 = HEAP32[$297>>2]|0; $299 = (FUNCTION_TABLE_iiiiii[$298 & 31]($286,$currentSize$i,4,$287,$288)|0); $300 = ($299|0)==(0); if ($300) { $301 = HEAP32[$237>>2]|0; $302 = (_i64Add(($272|0),($273|0),8,0)|0); $303 = tempRet0; $304 = HEAP32[$301>>2]|0; $305 = ((($304)) + 12|0); $306 = HEAP32[$305>>2]|0; $307 = (FUNCTION_TABLE_iiiiii[$306 & 31]($301,16113,8,$302,$303)|0); $308 = ($307|0)==(0); if ($308) { $309 = (($nMaster$0$lcssa$i) + 20)|0; $310 = ($309|0)<(0); $311 = $310 << 31 >> 31; $312 = $$phi$trans$insert$i; $313 = $312; $314 = HEAP32[$313>>2]|0; $315 = (($312) + 4)|0; $316 = $315; $317 = HEAP32[$316>>2]|0; $318 = (_i64Add(($314|0),($317|0),($309|0),($311|0))|0); $319 = tempRet0; $320 = $$phi$trans$insert$i; $321 = $320; HEAP32[$321>>2] = $318; $322 = (($320) + 4)|0; $323 = $322; HEAP32[$323>>2] = $319; $324 = HEAP32[$237>>2]|0; $325 = HEAP32[$324>>2]|0; $326 = ((($325)) + 24|0); $327 = HEAP32[$326>>2]|0; $328 = (FUNCTION_TABLE_iii[$327 & 127]($324,$jrnlSize$i)|0); $329 = ($328|0)==(0); if ($329) { $330 = $jrnlSize$i; $331 = $330; $332 = HEAP32[$331>>2]|0; $333 = (($330) + 4)|0; $334 = $333; $335 = HEAP32[$334>>2]|0; $336 = $$phi$trans$insert$i; $337 = $336; $338 = HEAP32[$337>>2]|0; $339 = (($336) + 4)|0; $340 = $339; $341 = HEAP32[$340>>2]|0; $342 = ($335|0)>($341|0); $343 = ($332>>>0)>($338>>>0); $344 = ($335|0)==($341|0); $345 = $344 & $343; $346 = $342 | $345; if (!($346)) { label = 73; break; } $347 = HEAP32[$237>>2]|0; $348 = HEAP32[$347>>2]|0; $349 = ((($348)) + 16|0); $350 = HEAP32[$349>>2]|0; $351 = (FUNCTION_TABLE_iiii[$350 & 63]($347,$338,$341)|0); $352 = ($351|0)==(0); if ($352) { break; } else { $$0 = $351; } STACKTOP = sp;return ($$0|0); } else { $$0$i7$ph = $328; } } else { $$0$i7$ph = $307; } } else { $$0$i7$ph = $299; } } else { $$0$i7$ph = $284; } } else { $$0$i7$ph = $267; } } else { $$0$i7$ph = $259; } $$0 = $$0$i7$ph; STACKTOP = sp;return ($$0|0); } } while(0); if ((label|0) == 73) { } $353 = (_syncJournal($pPager,0)|0); $354 = ($353|0)==(0); if (!($354)) { $$0 = $353; STACKTOP = sp;return ($$0|0); } $355 = ((($pPager)) + 168|0); $356 = HEAP32[$355>>2]|0; $357 = (_sqlite3PcacheDirtyList($356)|0); $358 = (_pager_write_pagelist($pPager,$357)|0); $359 = ($358|0)==(0); if (!($359)) { $$0 = $358; STACKTOP = sp;return ($$0|0); } $360 = HEAP32[$355>>2]|0; $361 = HEAP32[$360>>2]|0; $362 = ($361|0)==(0|0); if (!($362)) { $364 = $361; while(1) { $363 = ((($364)) + 20|0); $365 = HEAP16[$363>>1]|0; $366 = $365 & 2; $367 = ($366<<16>>16)==(0); if (!($367)) { $370 = ((($364)) + 24|0); $371 = HEAP32[$370>>2]|0; $372 = ((($371)) + 8|0); $373 = HEAP32[$372>>2]|0; $374 = ($373|0)==($364|0); if ($374) { $pPage$pn$i$i$i10 = $364; while(1) { $pSynced$0$in$i$i$i11 = ((($pPage$pn$i$i$i10)) + 32|0); $pSynced$0$i$i$i12 = HEAP32[$pSynced$0$in$i$i$i11>>2]|0; $375 = ($pSynced$0$i$i$i12|0)==(0|0); if ($375) { $pSynced$0$lcssa$i$i$i14 = 0; break; } $376 = ((($pSynced$0$i$i$i12)) + 20|0); $377 = HEAP16[$376>>1]|0; $378 = $377 & 4; $379 = ($378<<16>>16)==(0); if ($379) { $pSynced$0$lcssa$i$i$i14 = $pSynced$0$i$i$i12; break; } else { $pPage$pn$i$i$i10 = $pSynced$0$i$i$i12; } } HEAP32[$372>>2] = $pSynced$0$lcssa$i$i$i14; } $380 = ((($364)) + 28|0); $381 = HEAP32[$380>>2]|0; $382 = ($381|0)==(0|0); $383 = ((($364)) + 32|0); $384 = HEAP32[$383>>2]|0; $385 = $381; if ($382) { $387 = ((($371)) + 4|0); HEAP32[$387>>2] = $384; } else { $386 = ((($381)) + 32|0); HEAP32[$386>>2] = $384; } $388 = HEAP32[$383>>2]|0; $389 = ($388|0)==(0|0); if ($389) { HEAP32[$371>>2] = $385; } else { $390 = ((($388)) + 28|0); HEAP32[$390>>2] = $385; } HEAP32[$380>>2] = 0; HEAP32[$383>>2] = 0; $391 = $365&65535; $392 = $391 & 65529; $393 = $392&65535; HEAP16[$363>>1] = $393; $394 = ((($364)) + 22|0); $395 = HEAP16[$394>>1]|0; $396 = ($395<<16>>16)==(0); if ($396) { $397 = ((($371)) + 28|0); $398 = HEAP32[$397>>2]|0; $399 = ($398|0)==(0); if (!($399)) { $400 = ((($364)) + 12|0); $401 = HEAP32[$400>>2]|0; $402 = ($401|0)==(1); if ($402) { $403 = ((($371)) + 44|0); HEAP32[$403>>2] = 0; } $404 = HEAP32[(324)>>2]|0; $405 = ((($371)) + 40|0); $406 = HEAP32[$405>>2]|0; FUNCTION_TABLE_viii[$404 & 63]($406,$364,0); } } } $368 = HEAP32[$360>>2]|0; $369 = ($368|0)==(0|0); if ($369) { break; } else { $364 = $368; } } } $407 = HEAP32[$87>>2]|0; $408 = ((($pPager)) + 32|0); $409 = HEAP32[$408>>2]|0; $410 = ($407|0)==($409|0); if ($410) { $$old1 = ($noSync|0)==(0); if (!($$old1)) { break; } $$pre38 = ((($pPager)) + 60|0); $$pre$phi39Z2D = $$pre38; label = 108; } else { $411 = HEAP32[796>>2]|0; $412 = ((($pPager)) + 128|0); $413 = HEAP32[$412>>2]|0; $414 = (($411|0) / ($413|0))&-1; $415 = (($414) + 1)|0; $416 = ($407|0)==($415|0); $417 = $416&1; $418 = (($407) - ($417))|0; $419 = ((($pPager)) + 60|0); $420 = HEAP32[$419>>2]|0; $421 = HEAP32[$420>>2]|0; $422 = ($421|0)==(0|0); if ($422) { $rc$1$i18 = 0; } else { $423 = HEAP8[$3>>0]|0; $424 = (($423) + -1)<<24>>24; $425 = ($424&255)>(2); if ($425) { $426 = ((($421)) + 24|0); $427 = HEAP32[$426>>2]|0; $428 = (FUNCTION_TABLE_iii[$427 & 127]($420,$currentSize$i)|0); $429 = ($413|0)<(0); $430 = $429 << 31 >> 31; $431 = (___muldi3(($413|0),($430|0),($418|0),0)|0); $432 = tempRet0; $433 = ($428|0)==(0); if ($433) { $434 = $currentSize$i; $435 = $434; $436 = HEAP32[$435>>2]|0; $437 = (($434) + 4)|0; $438 = $437; $439 = HEAP32[$438>>2]|0; $440 = ($436|0)==($431|0); $441 = ($439|0)==($432|0); $442 = $440 & $441; if ($442) { $rc$1$i18 = 0; } else { $443 = ($439|0)>($432|0); $444 = ($436>>>0)>($431>>>0); $445 = ($439|0)==($432|0); $446 = $445 & $444; $447 = $443 | $446; if ($447) { $448 = HEAP32[$419>>2]|0; $449 = HEAP32[$448>>2]|0; $450 = ((($449)) + 16|0); $451 = HEAP32[$450>>2]|0; $452 = (FUNCTION_TABLE_iiii[$451 & 63]($448,$431,$432)|0); $rc$0$i = $452; } else { $453 = ((($pPager)) + 164|0); $454 = HEAP32[$453>>2]|0; _memset(($454|0),0,($413|0))|0; $455 = HEAP32[$419>>2]|0; $456 = (_i64Subtract(($431|0),($432|0),($413|0),($430|0))|0); $457 = tempRet0; $458 = HEAP32[$455>>2]|0; $459 = ((($458)) + 12|0); $460 = HEAP32[$459>>2]|0; $461 = (FUNCTION_TABLE_iiiiii[$460 & 31]($455,$454,$413,$456,$457)|0); $rc$0$i = $461; } $462 = ($rc$0$i|0)==(0); if ($462) { HEAP32[$408>>2] = $418; $rc$1$i18 = 0; } else { $rc$1$i18 = $rc$0$i; } } } else { $rc$1$i18 = $428; } } else { $rc$1$i18 = 0; } } $463 = $rc$1$i18 | $noSync; $464 = ($463|0)==(0); if ($464) { $$pre$phi39Z2D = $419; label = 108; } else { $rc$2 = $rc$1$i18; } } if ((label|0) == 108) { HEAP32[$currentSize$i>>2] = 0; $465 = ((($pPager)) + 8|0); $466 = HEAP8[$465>>0]|0; $467 = ($466<<24>>24)==(0); $468 = HEAP32[$$pre$phi39Z2D>>2]|0; if ($467) { $469 = ((($pPager)) + 11|0); $470 = HEAP8[$469>>0]|0; $471 = $470&255; $472 = HEAP32[$468>>2]|0; $473 = ((($472)) + 20|0); $474 = HEAP32[$473>>2]|0; $475 = (FUNCTION_TABLE_iii[$474 & 127]($468,$471)|0); HEAP32[$currentSize$i>>2] = $475; $484 = $475; } else { $476 = HEAP32[$468>>2]|0; $477 = ($476|0)==(0|0); if ($477) { $484 = 0; } else { $478 = ((($476)) + 40|0); $479 = HEAP32[$478>>2]|0; (FUNCTION_TABLE_iiii[$479 & 63]($468,8,$currentSize$i)|0); $$pre$i = HEAP32[$currentSize$i>>2]|0; $484 = $$pre$i; } } $rc$2 = $484; } $480 = ($rc$2|0)==(0); if (!($480)) { $$0 = $rc$2; STACKTOP = sp;return ($$0|0); } } else { $9 = ((($pPager)) + 88|0); $10 = HEAP32[$9>>2]|0; $11 = ($10|0)==(0|0); if (!($11)) { $p$01$i = $10; while(1) { $12 = ((($p$01$i)) + 16|0); HEAP32[$12>>2] = 1; $13 = ((($p$01$i)) + 44|0); $14 = HEAP32[$13>>2]|0; $15 = ($14|0)==(0|0); if ($15) { break; } else { $p$01$i = $14; } } } } } while(0); $pPager$idx = ((($pPager)) + 172|0); $pPager$idx$val = HEAP32[$pPager$idx>>2]|0; $481 = ($pPager$idx$val|0)==(0|0); if (!($481)) { $$0 = 0; STACKTOP = sp;return ($$0|0); } HEAP8[$3>>0] = 5; $$0 = 0; STACKTOP = sp;return ($$0|0); }