{"matchId":"57663872","creationMatch":"match","runtimeMatch":"match","verifiedAt":"2026-10-30T10:13:34Z","creationBytecode":{"onchainBytecode":"0x60a0806040523461074e5760208161642f803803809161001f8285610769565b83398101031261074e57516001600160601b031981169081900361074e576100cc60405161004e608082610769565b605b81527f536c697070616765416e64416374696f6e73286164647265737320726563697060208201527f69656e742c6164647265737320627579546f6b656e2c75696e74323536206d6960408201527f6e416d6f756e744f75742c62797465735b5d20616374696f6e7329000000000060609091015260016107a0565b61013f6040516100dd608082610769565b604181527f536c697070616765286164647265737320726563697069656e742c616464726560208201527f737320627579546f6b656e2c75696e74323536206d696e416d6f756e744f75746040820152602960f81b60609091015260016107a0565b61017861014a6107f9565b602081519101207f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa146107a0565b61025a604051610189608082610769565b604b8152602081017f5266714f7264657228436f6e73696465726174696f6e206d616b6572436f6e7381527f696465726174696f6e2c436f6e73696465726174696f6e2074616b6572436f6e60408301526a73696465726174696f6e2960a81b60608301526102306101f96107f9565b9160208060405194859382850197518091895e8401908282015f8152815193849201905e01015f815203601f198101835282610769565b5190207f49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a7598276146107a0565b46617a6914908161075a57604051907f16fbd3a71aa6d159973eb9ff1e1199f9fe242767e6f30ac662a492f92ac704115f80a26331a9108f60e11b8152600260048201526020816024816d04533fe15556b1e086bb1a72ceae5afa8015610700575f90610712575b6102d791506001600160a01b031630146107a0565b6001461480918115918261070b575b6102ef906107a0565b60405163313ce56760e01b815260208160048173a0b86991c6218b36c1d19d4a2e9eb0ce3606eb485afa9081156107005761033f91610335915f916106d1575b506107d4565b620f4240146107a0565b60405163313ce56760e01b815260208160048173dac17f958d2ee523a2206206994597c13d831ec75afa9081156107005761038491610335915f916106d157506107d4565b73f6e72db5454dd049d0788e411b06cfaf168530426014525f196034526f095ea7b30000000000000000000000005f5260205f6044601082736b175474e89094c44da98b954eedeac495271d0f5af1156106c1573d153d601f1060015f51141617156106b45773f6e72db5454dd049d0788e411b06cfaf168530426014525f196034526f095ea7b30000000000000000000000005f908152602090604460108273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb485af1156106c1573d153d601f1060015f51141617156106b45773a188eec8f81263234da3622a406892f3d630f98c6014525f196034526f095ea7b30000000000000000000000005f908152602090604460108273dc035d45d973e3ec169d2276ddab16f1e407384f5af1156106c1573d153d601f1060015f51141617156106b45773a188eec8f81263234da3622a406892f3d630f98c6014525f196034526f095ea7b30000000000000000000000005f908152602090604460108273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb485af1156106c1573d153d601f1060015f51141617156106b45773ce355440c00014a229bbec030a2b8f8eb45a28976014525f196034526f095ea7b30000000000000000000000005f9081526020906044601082734f8e5de400de08b164e7421b3ee387f461becd1a5af1156106c1573d153d601f1060015f51141617156106b45773217e42ceb2eae9ecb788fdf0e31c806c531760a36014525f196034526f095ea7b30000000000000000000000005f908152602090604460108273dac17f958d2ee523a2206206994597c13d831ec75af1156106c1573d153d601f1060015f51141617156106b45761062e925f60345273bbbbbbb520d69a9775e85b458c58c648259fad5f3b158015906106ad575b610622906107a0565b916106a5575b506107a0565b6040517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8665f527f574f8ba830fef8423e08e5c83d3cf7988b76ba736a1cb6cd4bd1ca02c0d16edc60205260016040523060605260805f20816040525f606052608052615bae908161088182396080518161295a0152f35b90505f610628565b5081610619565b633e3f8f735f526004601cfd5b60405162ffffff163d5f823e3d90fd5b6106f3915060203d6020116106f9575b6106eb8183610769565b8101906107bb565b5f61032f565b503d6106e1565b6040513d5f823e3d90fd5b50806102e6565b506020813d602011610752575b8161072c60209383610769565b8101031261074e57516001600160a01b038116810361074e576102d7906102c2565b5f80fd5b3d915061071f565b61076490156107a0565b6102d7565b601f909101601f19168101906001600160401b0382119082101761078c57604052565b634e487b7160e01b5f52604160045260245ffd5b156107a757565b634e487b7160e01b5f52600160045260245ffd5b9081602091031261074e575160ff8116810361074e5790565b60ff16604d81116107e557600a0a90565b634e487b7160e01b5f52601160045260245ffd5b60405190610808608083610769565b605882527f626f6f6c207061727469616c46696c6c416c6c6f7765642900000000000000006060837f436f6e73696465726174696f6e286164647265737320746f6b656e2c75696e7460208201527f32353620616d6f756e742c6164647265737320636f756e74657270617274792c6040820152015256fe6080604052600436101561002f575b361561002d5734610029576100216106b6565b602081519101f35b5f80fd5b005b5f3560e01c806306b8524c146100dc5780631fff991f14610076576370a082310361000e57346100295760206003193601126100295761006d6106a0565b505f805360015ff35b60a06003193601126100295761008b366105ae565b6064359067ffffffffffffffff8211610029576100d26100cc6100b460209436906004016105ff565b906100bd611e13565b946100c786611c75565b611cfe565b91611cca565b6040519015158152f35b60c0600319360112610029576100f1366105ae565b60643567ffffffffffffffff8111610029576101119036906004016105ff565b60a43567ffffffffffffffff811161002957610131903690600401610682565b9161013a611e13565b9261014484611c75565b6d1ff3684f28c67538d4d072c2273433036104e65781358201803560a4118415176100295760440135906bcd1e9517bb0cb8d0d5cde8935c918151826020015160f81c83600101915f1901825261019a81611e39565b806103285750516080908301839003126100295760218201516041830151926001600160a01b036081606183015192015193169260205f60e4604051846001600160ff1b03168160d40152858160b401528460ff1c601b0181609401528881607401528681605401526d1ff3684f28c67538d4d072c2273481603401528960601b818501526fd505accf000000000000000000000000815260100182885af1601f3d1160015f5114161615610260575b5050505050506100d2916100cc91602095611cfe565b84979599939694421161031b5789604288610310956100d29b61029e60209f61028c906100cc9e612bdd565b9361029985858984612c10565b612c73565b92604051936119018552602085015283604001927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528685606001526d1ff3684f28c67538d4d072c2273485608001528460a001525f19018360c001528260e0015260c081209052601e0120612c96565b95829482948961024a565b631a15a3cc5f526004601cfd5b91929161033481611e39565b600181036104c457505160a0908201829003126100295760218101516041820151916061810151938415158095036100295760205f6101046001600160a01b0360a1608187015196015194169560405190856001600160ff1b03168260f40152868260d401528560ff1c601b018260b4015289826094015288826074015281605401526d1ff3684f28c67538d4d072c2273481603401528960601b818501526f8fcbaf0c000000000000000000000000815260100182875af1601f3d1160015f5114161615610413575050505050506100d2916100cc91602095611cfe565b8396949795999315158742110261031b578960426100cc98856100d29b61045260209f610443906103109a612bdd565b9261029984845f038984612c10565b92604051936119018552602085015283604001927fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb84528685606001526d1ff3684f28c67538d4d072c2273485608001525f19018460a001528360c001528260e0015260c081209052601e0120612c96565b600281118063b7e59b040263f9ade075185f526021821802186020526024601cfd5b63e758b8d55f526004601cfd5b6060810190811067ffffffffffffffff82111761050f57604052565b634e487b7160e01b5f52604160045260245ffd5b60e0810190811067ffffffffffffffff82111761050f57604052565b6040810190811067ffffffffffffffff82111761050f57604052565b6080810190811067ffffffffffffffff82111761050f57604052565b90601f601f19910116810190811067ffffffffffffffff82111761050f57604052565b35906001600160a01b038216820361002957565b600319606091011261002957604051906105c7826104f3565b816004356001600160a01b03811681036100295781526024356001600160a01b03811681036100295760208201526040604435910152565b9181601f840112156100295782359167ffffffffffffffff8311610029576020808501948460051b01011161002957565b67ffffffffffffffff811161050f57601f01601f191660200190565b92919261065882610630565b916106666040519384610577565b829481845281830111610029578281602093845f960137010152565b9080601f830112156100295781602061069d9335910161064c565b90565b600435906001600160a01b038216820361002957565b60606bcdccd5c65a7d4860ce3abbe95c90813318811b825f351860e01c1715809260a01c61ffff160291611c61575b6106ed612381565b91909280155f1461070c575050610703916126a2565b90156100295790565b83600401909283600314611821578360061461130f5783600514610de05783600414610d1c575082600714610c5f575081600114610790575060021461076057634e487b7160e01b5f52605160045260245ffd5b80604461077592013590602433910135612633565b604051610783602082610577565b5f80825236602083013790565b916107fa9150606460448201359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b6001600160a01b0397939195969497309116036100295761081c9330936136b3565b5050505093919490806040019583875190610c48575b8051607f1c610baf575194828a0195865261084c83613981565b906108556132d5565b9060208201918b8560408301955b8b6030861015610a47575050505050505050855195866020015196519561088b835182613f1c565b8260200151805115610a37575b50805191826109c0575b5050505180602001519051968088106109b957506108c69187916303a65ab6613d6c565b1561098157509081159081156108fc575b5050505b60405182819382526020828101526020826040015201528060800160405290565b841b9061096557604051918452306040528073777777777777777777777777777777777777777760611b141502602c526f03a65ab6000000000000000000000000600c525f806064601c82335af11561095d575f83526040525f80806108d7565b3d5f823e3d90fd5b6020526fcbf0dbf50000000000000000000000005f5260246010fd5b5181811461099c579061099692910390615ac6565b506108db565b826014526ffb772a880000000000000000000000005f5260246010fd5b8791612610565b6109c982613b03565b5190518103610a11575b5060015b828110156108a25780610a0b6109fe6001938560209160051b010151908160200151915190565b9030906303a65ab6613d6c565b016109d7565b60208101519051610a319130906001600160a01b03166303a65ab6613d6c565b5f6109d3565b610a419082613f1c565b5f610898565b60405f610a6d848a953560e81c94600f600e19836003013560a01c9c019201908861399e565b9890966280000087602001956001600160a01b03875199620f42408b51627fffff851602049a602001519051602001519080861b90838084891b92169316918082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159a838383188d0280941816905218168073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028b528d601f198b6020019d019a359052610b298a8d613abf565b16158314610bcc5760e4918451918483528a836020015e87826080015286158260a001528160c00152828160e00152601c0182335af115610bc1575f5192610b8160205194935b848618029485935193849118613acb565b9180519083820390528211911117610baf57610ba38851809381519318613ae6565b01905291858d91610863565b634e487b715f5260116020526024601cfd5b6040513d5f823e3d90fd5b610104918451916f101e8952000000000000000000000000835260148b8701846020015e8a836034015e87826094015286158260b401528160d40152828160f4015260100182335af115610bc1575f51926020518080600f0b188580600f0b18178280600f0b183d604011171761002957610b81909493610b70565b610c588160200151825190615ac6565b8152610832565b909291503581016004810135610c736132d5565b5f92602481015b838510610cbf5750505050506044610ca26064830135610c9d60248501356125d9565b612374565b9101358110610caf575090565b63a55fee2e5f526020526024601cfd5b60048135830101604081013560e01c60446003196020840135019201908260401c9283158091029390610d08575b610d0257505050602060019101940193610c7a565b87612227565b50610d16868484848c613e71565b15610ced565b6080919293506003190110610029573560448301358301906024820135831c9360245f83131591013582180218913084145f14610d65576107759350603833920135901c612633565b5090610d74610ddb9315613698565b60405190610d818261053f565b3382526020820152610d9636602c8401611e57565b90610dd560ac84013560f81c93369060ad7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff77600483013501910161064c565b9161317d565b610775565b505091610e5d91508060446024610e509301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b95869391979894986136b3565b968c868060409d959896979d99949901518c8b8b8b8b8a306001600160a01b038716036112ff575b6112e1575b5050505050908d9493929151910152610ea285613981565b908d85610ead613322565b92610eb66132d5565b945b603582101561110a575050935050505060400151968760200151975199610ee0845182613f1c565b83602001518051156110fa575b508051908161107b575b50508251806020015190519b808d106110745750610f1b918c91630b0d9c09613d6c565b15610ff85750505050508215918215610f54575b5050505060405182819382526020828101526020826040015201528060800160405290565b6001600160a01b03163003610fe45730905b851b91610fc7576040519285526040528073777777777777777777777777777777777777777760611b141502602c526f0b0d9c09000000000000000000000000600c525f806064601c82335af11561095d575f83526040525f808080610f2f565b506020526fcbf0dbf50000000000000000000000005f5260246010fd5b6bcd1e9517bb0cb8d0d5cde8935c90610f66565b89969294969591939501519680880397146110585773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03821618891b61104d57505050505050610996906110475f33613e2c565b33613e55565b906109969691613dbf565b6014526ffb772a880000000000000000000000005f5260246010fd5b8c91612610565b61108481613b03565b51856040015181036110d4575b5060015b8281106110a25750610ef7565b806110ce6110c16001938560209160051b010151908160200151915190565b903090630b0d9c09613d6c565b01611095565b602081015190516110f49130906001600160a01b0316630b0d9c09613d6c565b5f611091565b6111049082613f1c565b5f610eed565b5f620f4240948761121e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe66111698661122d9d60176016196001600160a01b039b60209b3560e81c98604086600301358c1c910152019201908b61399e565b888c8b8a959495019b8c518b015190518b0151918b828b1b848c1b8082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159d8e858518028095181691015218168c526001600160a01b0383358d60408260e81c9101528d8862ffffff8360d01c1660020b91015260301c1660808d01520190601a01919091803560e81c6002198160038185820195010195030192565b93839d85949b9293809f613abf565b88158d5289515102048503868c01526040519363f3cd914c85528a518073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028588015260808b8801866040015e8b8560c0015e61012084810152818461014001528361016001376101440190601c0182335af115610bc1575f51906112c182600f0b9260801d600f0b918383180293519184835191185f0390612374565b90526112d38851809381519318613acb565b019052858f91948e95610eb8565b6112f394866020015190875191613dbf565b81528c8b8b8b8b610e8a565b61130882613835565b8752610e85565b5050905061138e915061137f611323612381565b90919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b958693919598979994996136b3565b9697919492939a90958a84604001998a518c8b8b8b8b8a306001600160a01b03871603611811575b6117f3575b505050505051868301526113ce86613981565b6113d6613322565b925f604051936113e585610523565b8185528160208601528160408601528401525f60808401525f60a08401528d60c08401525b60048110156115e25750505050875197886020015198519b61142d855182613f1c565b84602001518051156115d2575b508051918261155b575b50505082518c816020015191519d8e106115545750611469918d9163ae639329613d6c565b1561152b575050505050831591821561149a575b50505050505b604051906020825281602001528060400160405290565b6001600160a01b031630036115175730905b831b91610fc7576040519383526040528073777777777777777777777777777777777777777760611b141502602c526fae639329000000000000000000000000600c525f806064601c82335af11561150e575f90526040525f8080808061147d565b503d5f823e3d90fd5b6bcd1e9517bb0cb8d0d5cde8935c906114ac565b909396999897999591949295015198808a1461099c5761154e9798990391613ce4565b50611483565b8d91612610565b61156482613b03565b51905181036115ac575b5060015b8281101561144457806115a66115996001938560209160051b010151908160200151915190565b90309063ae639329613d6c565b01611572565b602081015190516115cc9130906001600160a01b031663ae639329613d6c565b5f61156e565b6115dc9082613f1c565b5f61143a565b813560e81c90620f424082623fffff1611610baf578f928f9360021961160e930191600301908a61399e565b9092818462c00000851661173c5750506116908461169c949535831c8760200152620f42408b602001966001600160a01b038851602001511660408a01526001600160a01b038d516020015116858a015287515102046080880152601319604051940190601401919091803560e81c6002198160038185820195010195030192565b9692959196369161064c565b60c08701526116ab8585613abf565b60405190603f19870190815190601f198901938451632bfb780c8552602086528a60c00195875f8d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc60448b805184815191038092520101910182335af115610bc157602051946040519652526040525190815103905261172f8b519182516127d4565b9052526040525b9061140a565b93926117489195613abf565b6240000082166117d0575f60208701526001600160a01b038951602001511660408701525b620f4240623fffff8a602001931683515102048187015260405191601f198701928351926343583be585525f60a46003198b0182335af11561095d57602051926040519452604052519081510390526117c988519182516127d4565b9052611736565b600160208701526001600160a01b0389602001516020015116604087015261176d565b61180594866020015190875191613ce4565b81528c8b8b8b8b6113bb565b61181a82613835565b87526113b6565b50509161189f915080606460446118919301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b9695879391969894986136b3565b9699929398909585604096939601519a306001600160a01b038616149b838d15611c51575b611c35575b8051607f1c610baf5751848f01528d906118e285613981565b91846118ec6132d5565b935b8d6030841015611a565750509250505060400151978860200151985199611916845182613f1c565b8360200151805115611a46575b50805190816119d1575b505082518c816020015191519d8e10611554575061194c918d91613b24565b156119ac57505050505050816119805750505060405182819382526020828101526020826040015201528060800160405290565b6119909215611998573090613b24565b5f80806108d7565b6bcd1e9517bb0cb8d0d5cde8935c90613b24565b909193959294969a9980999850015199808b1461099c576109969798999a039161389d565b6119da81613b03565b5185604001518103611a25575b5060015b8281106119f8575061192d565b80611a1f611a176001938560209160051b010151908160200151915190565b903090613b24565b016119eb565b60208101519051611a409130906001600160a01b0316613b24565b5f6119e7565b611a509082613f1c565b5f611923565b60205f611a7c8489953560e81c94600f600e19836003013560a01c9a019201908861399e565b97909662800000878501956001600160a01b03875199620f42408b51627fffff851602049a88015190518801519080871b908380848a1b92169316918082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159a89848d858518028095181691015218168073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028c52601f198a87019b01993560408d0152611b388a8c613abf565b16158314611bc757608491604051918715601f1b83608001528883607c015282606c01528a8286015e828152601c0182335af115610bc1575f51928080600f0b1861002957611b9a84600f0b9460801d93848618029485935193849118613acb565b9180519083820390528211911117610baf57611bbc8751809381519318613ae6565b019052848f926118ee565b60a491604051918715601f1b836094015288836090015282608001528a826034015e60148a6040018286015e6f101e8952000000000000000000000000815260100182335af115610bc1575f51928080600f0b183d6040111761002957611b9a84600f0b9460801d93610b70565b611c4a8a8a8a8a85602001518b87519161389d565b81526118c9565b611c5a88613835565b82526118c4565b5f6bcdccd5c65a7d4860ce3abbe95d6106e5565b8060601b156104e6576bcd1e9517bb0cb8d0d5cde8935c8060601b611cae57506001600160a01b03166bcd1e9517bb0cb8d0d5cde8935d565b6014526f7407c0f80000000000000000000000005f5260246010fd5b6bcd1e9517bb0cb8d0d5cde8935c1860601b611cf1575f6bcd1e9517bb0cb8d0d5cde8935d565b635149e7955f526004601cfd5b90929180611d18575b50611d1391925061225d565b600190565b8335840180358160200135918260e01c6024600319840192019086604051611d41858585611ecc565b9060405215611da8575b50505050505060208401936001945b828610611d68575050611d07565b80358201806020013560e01c6024600319833501920190611d8c878484848d612b36565b15611da257505050602060019101950194611d5a565b88612227565b8383611db3936128dd565b15611dbf578086611d4b565b60809394507fffffffff0000000000000000000000000000000000000000000000000000000060405195633c74eed687525f876020015216856040015260608581015281858501528460a001370190601c01fd5b33906d1ff3684f28c67538d4d072c227343314611e2c57565b36601319013560601c9150565b60031115611e4357565b634e487b7160e01b5f52602160045260245ffd5b8092910391608083126100295760405190611e71826104f3565b60408294126100295760606040918251611e8a8161053f565b611e938261059a565b81526020820135602082015284528281013560208501520135910152565b3590811515820361002957565b359060ff8216820361002957565b919091611eda8284836123ae565b15611ee757505050600190565b636a92dacb8103611fef575081016101808282031261002957611f098261059a565b611f168260208501611e57565b91611f2360a08501611ebe565b91611f3060c08601611eb1565b9161012086013567ffffffffffffffff81116100295781611f52918801610682565b926101408701359267ffffffffffffffff841161002957875f98976001600160a01b0396611f89611fb696611fbc988d9c01610682565b926d1ff3684f28c67538d4d072c22734331494610160820135968a60e061010085013594013592166127e1565b926128bc565b16611fc681613c57565b82602083519301915af1611fd86132f3565b9015611fe75750611d13613cbe565b602081519101fd5b634150c86c81149291906310cd63431483171561222057810191610160828403126100295761201d8261059a565b9161202b8460208301611e57565b61203760a08301611eb1565b9460e083013560c084013561010085013567ffffffffffffffff81116100295783612063918701610682565b9261012086013567ffffffffffffffff81116100295761014091612088918801610682565b950135976001600160a01b03881696156120f9579463ffffffff946120c9945f9a948b9a99946120d3996d1ff3684f28c67538d4d072c227343314966127e1565b9260801c16613bed565b6020815191018273ba1333333333a1ba1108e8412f11850a5c319ba95af1611fd86132f3565b94919650969291946d1ff3684f28c67538d4d072c227343314936060890298808a046060149015171561220c5760608802978089046060149015171561220c578760801c15158960801c15158260801c15151717610baf575f9889986040610132966101159882519b8051988d81519b8c928c838101938380868801019787601c198a015260200191015e60200191015e60030183528b610131015381816020018c60f1015e518a60b1015e8989609d015288608801528760780152866068015285605801520160d1810184604401526020846024015263f83d08ba846004015201825215158160a801536121ec613b8d565b602081519101826d14aa86c5d3c41765bb24e11bd7015af1611fd86132f3565b634e487b7160e01b5f52601160045260245ffd5b5050505f90565b9291829160405194633c74eed68652856020015260e01b84604001526060848101528184608001528360a0013760840190601c01fd5b906001600160a01b03825116916001600160a01b036020820151169260408201519084158215026122e957612291856125d9565b908282106122e157856060959673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee18861b155f146122cd57506122c89250612693565b389039565b916122dc938111900391612633565b6122c8565b509084612610565b5050509050565b9190916001600160a01b038151166001600160a01b03602083015116604083015191811583150261236c57612324826125d9565b9583871061236457956060959615908418028318918073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee18861b155f146122cd57506122c89250612693565b868484612610565b505050509050565b9190820391821161220c57565b336d1ff3684f28c67538d4d072c22734036123a85760131936019036821161220c575f9190565b5f903690565b90919063c1fb425e8103612448575081019060c081830312610029576123d38161059a565b6123e08360208401611e57565b9160a08101359367ffffffffffffffff851161002957611d13946124049201610682565b90604051906124128261053f565b6001600160a01b0360208301915f835216825261242f845f612cd8565b90526d1ff3684f28c67538d4d072c2273433149261317d565b633036d6a6036125d35781019061010081830312610029576124698161059a565b6124768360208401611e57565b9160a081013567ffffffffffffffff81116100295784612497918301610682565b9360c08201359067ffffffffffffffff8211610029576124b8918301610682565b93602c8151106125c1578451608901938460891161220c5761257495601f196124f96124e388610630565b976124f1604051998a610577565b808952610630565b013660208801376d1ff3684f28c67538d4d072c2273433148251602001518760480152604083602001886068015e8660a801538051906020018660a9015e845181515186602801525f866014015285525191602083015192831990620f4240821061257a575b505060e00135926001600160a01b0316612d39565b50600190565b6001600160a01b039294506125b560e0926125b0856125ba94511691620f424003916bcd1e9517bb0cb8d0d5cde8935c90612ba9565b6135d7565b6135f0565b939161255f565b634e487b715f5260326020526024601cfd5b50505f90565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0382161860601b61260557504790565b61069d903090612ba9565b916054526034526014526f97a6f3b90000000000000000000000005f5260646010fd5b60105f60449260209582956014526034526fa9059cbb00000000000000000000000082525af115612683573d153d601f1060015f5114161715612676575f603452565b6390b8ec185f526004601cfd5b60405162ffffff163d5f823e3d90fd5b5f80809381935af115610bc157565b907f5ea1d46a000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000833581811690600485106127c0575b501614612708576127049161358a565b9091565b50506bcd1e9517bb0cb8d0d5cde8935c908160a01c60011615610029576b3a9113a02a267cff8bfd38516bb39834f1d3371754c5eae0a7905c905c90604051938460c00160405261276a6fffffffffffffffffffffffffffffffff8416613370565b5060e0855284602001526ce000000000000000000000000084600c01528064ffffffffff168460a0015260601c83608001526ca000000000000000000000000083606c015282604001525f82604c015260019190565b828092508560040360031b1b16165f6126f4565b9190820180921161220c57565b92989791909695939860608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c15151717610baf576040610132966101159882519c8d9881519981519b8c928c838101938380868801019787601c198a015260200191015e60200191015e600301835215158c610131015381816020018d60f1015e518b60b1015e5f8a609d015289608801528860780152876068015286605801520160d181018560440152602085602401526348c89491856004015201835215158260a80153565b60ff81166128d857506e04444c5dc75cb358380d2e3de08a9090565b61335d565b9291909263562e052c81146128f7579261069d935f613e71565b5060609150829081010312610029578035604082013590604051928160281c151582421117612b25576084359260206bcd1e9517bb0cb8d0d5cde8935c926129506fffffffffffffffffffffffffffffffff8716613370565b46600103612ac2577f0000000000000000000000000000000000000000000000000000000000000000905b604051957f549c17970871bfdfb0ff321bda3359ea022619d3d8bbae6929a36123a847fb258752868501527fda3359ea022619d3d8bbae6929a36123a847fb2500000000000000000000000086600c01528686604001527fffffffffffffffffffffffff00000000000000000000000000000000000000008816866060015280519084012085608001526119015f52825260a084206040526042601e205f528260ff1c601b01825201356040526001600160ff1b03166060526020600160805f825afa5190813d0215612ab5576040525f6060526b3a9113a02a267cff8bfd3851906bb39834f1d3371754c5eae0a79264ffffffffff169060601b17905d5d6bcd1e9517bb0cb8d0d5cde8935c74010000000000000000000000000000000000000000176bcd1e9517bb0cb8d0d5cde8935d604052600190565b638baa579f5f526004601cfd5b6040517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8665f527f574f8ba830fef8423e08e5c83d3cf7988b76ba736a1cb6cd4bd1ca02c0d16edc8452466040523060605260805f20906040525f6060529061297b565b5063cd21db4f5f526020526024601cfd5b9392919063562e052c8114612b4e5761069d94613e71565b50925060609150829081010312610029578035604082013590604051928160281c151582421117612b25576084359260206bcd1e9517bb0cb8d0d5cde8935c926129506fffffffffffffffffffffffffffffffff8716613370565b602460105f926020946014526f70a0823100000000000000000000000084525afa15610bc1573d601f1015610029575f5190565b602460105f926020946014526f7ecebe0000000000000000000000000084525afa15610bc1573d602011610029575f5190565b5f60446010602093604051956d1ff3684f28c67538d4d072c2273460345260601b85526fdd62ed3e00000000000000000000000084525afa15610bc1573d602011610029575f51906040521415901517612c6657565b63b78cb0dd5f526004601cfd5b5f6004601c602093633644e51584525afa15610bc1573d602011610029575f5190565b92919091604051935f528160ff1c601b016020526040526001600160ff1b03166060526020600160805f825afa511860601b3d1115612ab5576040525f606052565b91905191602083015192831991620f42408310612cf457505050565b6001600160a01b031615612d06575050565b61069d929350906125b06001600160a01b036125b593511691620f424003916bcd1e9517bb0cb8d0d5cde8935c90612ba9565b929491946001600160ff1b038611610baf579094905b602c8651119385602801948551938860010151908960040151958a60180151938b602c0197885180968d6001600160a01b0383166001600160a01b038716109788159684811888029160ff811680155f14612fb2575050936001600160a01b039160e495731f98431c8ad98523631ae4a59f267346ea31f984907fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e33995b62ffffff1691816040519684604052186020525f80521860601b600c521560051b6060035f2090836040525f5260205260405260ff600b536055600b20906040521694159760405197889383519384602001908660c4015e60a08560a401526001600160a01b0316846084015283606401528260440152878a301802301882602401526f128acb0800000000000000000000000082601001528060c40182520101604052816bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa2575081740400000000000000000000000000000000000000005f93849360e01b17176bcdccd5c65a7d4860ce3abbe95d8451908260208701915af1612f036132f3565b9015611fe757612f11613cbe565b604081805181010312610029576040602082015191015192604052821802185f03905f8212610baf578190612f8557507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd4602c91995101808652106125c15790945230601486015260288552909490612d4f565b98505093955050925050818410612f9a575050565b909150612610565b63ab7646c45f526020526024601cfd5b6001810361300c575050936001600160a01b039160e4957341ff9aa7e16b8b1a8a8dc4f0efacd93d02d071c9907f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2926323a69e7599612df2565b60028103613066575050936001600160a01b039160e49573baceb8ec6b9355dfc0269c18bac9d6e2bdc29c4f907fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e3399612df2565b602f81036130c0575050936001600160a01b039160e49573df62d9e51d7c08360dcd41931a2e6b97ff8c73e8907fd3e7f58b9af034cfa7a0597e539bae7c6b393817a47a6fc1e1503cd6eaffe22a9263fa461e3399612df2565b6031810361311a575050936001600160a01b039160e4957386641a77a1172c3ce65bce52ae91bdadef0f74c2907f62441ebe4e4315cf3d49d5957f94d66b253dbabe7006f34ad7f70947e60bf15c92632c8958f699612df2565b94955091939092506032036128d857506001600160a01b038f9160e494938b9173f4fd2e6c5b60c5b365cd1b96dd6245e6d60414c2907f3e77b70b9c4ce644601ed4aab19834375c6a9a2bca7adeb89a7bdd5fd8eb0a7d9263fa461e3399612df2565b9190925f14613259575161324c576020810151610baf57604081015142116132385760845f927fffffffffffffffffffffffffffffffffffffffff000000000000000000000000849351516bcd1e9517bb0cb8d0d5cde8935c60206001600160a01b0385511694015193604051948560800152846060015260601b83604c015260601b1681602c01526f15dacbea00000000000000000000000081600c0152601c01826d1ff3684f28c67538d4d072c227345af115610bc157565b63cd21db4f5f52604001516020526024601cfd5b63c321526c5f526004601cfd5b905f9291839260406bcd1e9517bb0cb8d0d5cde8935c91818051956330f28b7a8752818151886020015e602001866060015e8460a0015e6001600160a01b03168260e0015261010082810152805190816020019083610120015e6101240190601c01826e22d473030f116ddee9f6b43ac78ba35af115610bc157565b604051906132e2826104f3565b5f6040838281528260208201520152565b3d1561331d573d9061330482610630565b916133126040519384610577565b82523d5f602084013e565b606090565b6040519060a0820182811067ffffffffffffffff82111761050f576040525f6080838281528260208201528260408201528260608201520152565b63d3b1276d5f5260ff166020526024601cfd5b6fffffffffffffffffffffffffffffffff166381bf1000808204818082049181808085049606910660401b17910660801b1781830660c01b17806359e6038302602e1c79ffff000000000000ffff000000000000ffff000000000000ffff1663ffff49c002018061e38f0260151c7d07ff000007ff000007ff000007ff000007ff000007ff000007ff000007ff167e07ff000007ff000007ff000007ff000007ff000007ff000007ff000007ff008161e38f02600d1c160160dc02018060081c9072ffffff00000000000000000000000000ffffff75ffffffff000000000000000000000000ffffffff00007effffffffff000000ff00000000000000ffffffffff000000ff00000000000084167affffff00000000000000000000000000ffffff000000000000000084161760101c9316911617177bffffffffffffffffffffffffffffffffffffffff00000000000000008160201c16906bffffffffffffffffffffffff1617910460c01b179060078260881c1e610100030160031c6012810190605360405194838652807f76767676767676767676767676767676767676767676767676767676767676760160071c7f010101010101010101010101010101010101010101010101010101010101010116602702017f3030303030303030303030303030303030303030303030303030303030303030019160110160031b1b189060031b610100031b826020015281604001604052565b600490911015903560e01c6367c4a3b0140290606082156135d1575060405190816040016040526020825273352650ac2653508d946c4912b07895b22edd84cd8260200152565b5f925090565b905f19818309910290818082109103035f526020525f90565b8051906020015181156136405781620f424080620f423f197fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399509830890828211900360fa1b910360061c170290565b620f424091500490565b5f5160205181156136405781620f424080620f423f197fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399509830890828211900360fa1b910360061c170290565b1561369f57565b634e487b7160e01b5f52600160045260245ffd5b90929194935f90604051938460c0015f8152610300386101e08801396104e086016040526136e7828a873560601c846154d0565b918287528287602001528660400199838b5287608001528660a001529495369436935f936020015173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145f146137695761373f906001600160a01b03163014613698565b9851620f42404760148c013560e81c0204905260161901976017015b6137658982613abf565b9796565b6001600160a01b03163081036137ae5750620f42406016196017836014013560e81c930193019a51916137a0308460200151612ba9565b80151590030204905261375b565b935094509750506137c0915015613698565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff48101908060550135600116908681016002198082013560e81c80920301916075019782891161002957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff889103019761375b565b906020820135918219620f4240811061384c575050565b90919250620f42400390356001600160a01b03811680910361002957613880906bcd1e9517bb0cb8d0d5cde8935c90612ba9565b905f19818309910290818082109103035f5260205261069d61364a565b95919491929073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0388161860601b6138db575050505050905061069d8133612693565b866014526ff9b6a7960000000000000000000000005f525f806024601082335af115610bc1576001600160a01b0316300361394c575050505061391f903383612633565b6014526f12e103f10000000000000000000000005f5260105f60248282335af115610bc1575f5160801c90565b61397c9491613974610dd592604051946139658661053f565b33865260208601523690611e57565b93369161064c565b61391f565b6040015180511561398f5750565b8063fb772a8860249252601c01fd5b9190939293813592836001948060f81c91826139c1575b50505050508101920390565b95839496613a06945180604001805115613aa8575b5050818411613a2d575b50601491925001948360800151906001600160a01b038560a001519360581c16906154d0565b9081815260400151809114613a1e57808080806139b5565b8063784cb7b860249252601c01fd5b85602001938451805115613a98575b5060028103613a5757505060149192855190525b82916139e0565b60149350613a69919250600314613698565b8582013592613a9160159287608001516001600160a01b038960a001519260581c168b6154d0565b9052613a50565b613aa2908a613f1c565b5f613a3c565b898051850180825260051b01918252525f806139d6565b5062ffffff106125c157565b905f8212613ad7575090565b80634c085bf160249252601c01fd5b905f8213613af457505f0390565b80633351b26060249252601c01fd5b805115613b105760200190565b634e487b7160e01b5f52603260045260245ffd5b908215613b7057604051926038526028528073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1860601b151502601452633ccfd60b5f525f80603c601c82335af11561095d57604052565b506014526fcbf0dbf50000000000000000000000005f5260246010fd5b6d14aa86c5d3c41765bb24e11bd7016bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa25750740300000000000014aa86c5d3c41765bb24e11bd7016bcdccd5c65a7d4860ce3abbe95d565b73ba1333333333a1ba1108e8412f11850a5c319ba96bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa2575060e01b7406ba1333333333a1ba1108e8412f11850a5c319ba9176bcdccd5c65a7d4860ce3abbe95d565b806bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257506001600160a01b03167f91dd734600000000000000050000000000000000000000000000000000000000176bcdccd5c65a7d4860ce3abbe95d565b6bcdccd5c65a7d4860ce3abbe95c80613cd45750565b63d66fcc385f526020526024601cfd5b9591949392906001600160a01b03163003613d45575050505080613d35575b6034526014526f15afd4090000000000000000000000005f5260205f6044601082335af115612683575f515f60345290565b613d40813384612633565b613d03565b610dd5613d409461397460405193613d5c8561053f565b3385528860208601523690611e57565b919060601b908315610fc757604051936060526040528073777777777777777777777777777777777777777760611b141502602c5260601b600c525f806064601c82335af11561095d575f606052604052565b93959290949194613dd08533613e2c565b6001600160a01b03163003613e0a57505050613dee92503390612633565b6311da60b45f5260205f6004601c82335af115610bc1575f5190565b613e27959492935090613974610dd592604051946139658661053f565b613dee565b602460105f80949381946014526fa584119400000000000000000000000082525af115610bc157565b6004601c6020935f936311da60b485525af115610bc1575f5190565b50909291604051613e83828685613f52565b906040525f14613e965750505050600190565b839163bd01c2268103613ef157506040925081010312610029576020813591013590804211613ee15750803411613ecd5750600190565b634a0944315f52602052346040526044601cfd5b63cd21db4f5f526020526024601cfd5b90915063131ad4280361222057826020918101031261002957613f16611d1392611eb1565b906122f0565b906040019081519182613f2e57505050565b5f905280515f198101825260051b01818103613f48575050565b5180825260400152565b9080929163d92aadfb81145f1461430c5750016101208282031261002957613f798261059a565b613f868260208501611e57565b613f9260a0850161059a565b9260c08501359167ffffffffffffffff831161002957613fb75f939284938801610682565b6001600160a01b03610100613fce60e08a0161059a565b980135961660405190613fe08261053f565b6001600160a01b0360208301978689521682526140f96140008583612cd8565b808952826140676001600160a01b0388515116604051906140208261055b565b815283602082015282604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9b6140d88c6001600160a01b036bcd1e9517bb0cb8d0d5cde8935c6040519261408f8461055b565b8286168452602084015216604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9b6140e33083612ba9565b8181111590821802811880940204809b52612633565b6040805192614109608085610577565b6058845261423760208501947f436f6e73696465726174696f6e286164647265737320746f6b656e2c75696e7486527f32353620616d6f756e742c6164647265737320636f756e74657270617274792c848201527f626f6f6c207061727469616c46696c6c416c6c6f7765642900000000000000006060820152603c8451614192606082610577565b602e815260208101907f546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c7582527f696e7432353620616d6f756e74290000000000000000000000000000000000008782015286519889947f436f6e73696465726174696f6e20636f6e73696465726174696f6e290000000060208701525180918587015e840190838201908d8252519283915e010189815203601f198101865285610577565b8180519663137c29fe8852818151896020015e602001876060015e8560a0015e8360e00152868361010001526101408361012001528051908161016001846101400152816020019084610160015e8151918260200190828501610180015e016101840190601c01826e22d473030f116ddee9f6b43ac78ba35af115610bc1576fffffffffffffffffffffffffffffffff917f49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a75982765f526020526040519260405260605f2092604052166010525f5260305fa0600190565b638d68a15681036143d45750016080828203126100295761432c8261059a565b9060208301359060408401359067ffffffffffffffff821161002957614353918501610682565b9160408351106125c1576013198351019260140180519381526143a16040519461437e606087610577565b602886526040366020880137808660280152308660140152602886523090612ba9565b80151580820394808602958604149114171561220c576001600160a01b03620f4240606061257497013594049216612d39565b63103b48be8103614585575060c09181010312610029576143f48161059a565b906144016020820161059a565b9160408201356144136060840161059a565b9260808101359062ffffff82168203610029576001600160a01b0360a08192013596169416945f928061455b575b50630902f1ac5f5260405f6004601c895afa15610bc15760403d106100295760018083161415928360051b956127108751928860201895848b8851958415801561454d575b61452e575b50505061ffff9060081c168203029202820191821561451a570204928184106144fc5750505f9491936001600160a01b0360a49487966020889586826040519763022c0d9f89528801015285010152168160600152608081810152818160a00152601c01915af115610bc157600190565b9061451587859363dfec36260263d21220a718906159fa565b612610565b634e487b7160e01b5f52601260045260245ffd5b61ffff9394506145429291610c9d91612ba9565b919050848b5f61448b565b5060018085811c1614614486565b620f424091935061456c3087612ba9565b801515900302049161457f838787612633565b5f614441565b6338c9c14781036145f25750019060a081830312610029576145a68161059a565b906145b36040820161059a565b90608081013567ffffffffffffffff811161002957611d13946145d7918301610682565b9260206001600160a01b036060840135941692013590615530565b635f80abae81036146c8575060a09181010312610029576146128161059a565b9061461f6020820161059a565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1491604081013583156146b457475b818111614660575b505050505050600190565b620f424091606083608086013584020494013591030204818111159082180218915f1461469c575061469191612693565b5f8080808080614655565b6001600160a01b036146af931690612633565b614691565b6146be3084612ba9565b801515900361464d565b90506368f5ee258103614768575081019061012081830312610029576146ed8161059a565b6146f96020830161059a565b9161470660608201611ebe565b9161471360808301611eb1565b9460e08301359167ffffffffffffffff8311610029575f96879685614748611fb695611fbc976001600160a01b039901610682565b926101008201359460c08301359389604060a0860135950135921661582f565b63fd8c38e1811492636c5f9cf9821492909183851763f61460f9821417156148e45750810161010082820312610029576147a18261059a565b936147ae6020840161059a565b60408401356147bf60608601611eb1565b9160808601359360a08701359560c088013567ffffffffffffffff81116100295760e0916147ee918a01610682565b970135976001600160a01b038a16911561481f57509463ffffffff946120c9945f9a9893948b9a956120d39961582f565b91985090156148ca57966148329761577c565b73e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4446bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f80917fb45a3c0e0000000000000001e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4446bcdccd5c65a7d4860ce3abbe95d6020815191018273e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4445af1611fd86132f3565b916148dc9593915f988998969461577c565b6121ec613b8d565b90925081935063736180c881145f14614acb575060c091810103126100295761490c8161059a565b9061491960408201611eb1565b9160608201356080830135936001600160a01b03851693848603610029578060206149b06001600160a01b0373ce355440c00014a229bbec030a2b8f8eb45a28978161496b60a0620f4240980161059a565b9916991415737a7916044b0f6e1563f1ff4cb7db270f0b85f58f0273dac17f958d2ee523a2206206994597c13d831ec718169687811886150280981897309118612ba9565b801515900391013502049015614a495763fae036d55f5260205f6004601c885afa15610bc157601f3d111561002957620f4240670de0b6b3a76400005f51019102049181831061451557505060105f60209481946044946034526014526f8d7ef9bb00000000000000000000000082525af115614a30575f603452600190565b6040516bffffffffffffffffffffffff163d5f823e3d90fd5b9092816034959395526014526f959912760000000000000000000000005f5260205f6044601082865af115614a30575f6004601c620f4240670de0b6b3a76400006020958560345202049463568d4b6f84525afa15610bc157601f3d111561002957670de0b6b3a76400005f5182020490039181831061451557505050600190565b639b59756f8103614c7f575060e0918101031261002957614aeb8161059a565b90614af86020820161059a565b916040820135906060830135926001600160a01b0384169384810361002957614b2360808301611eb1565b9560a0830135928360030b8094036100295760c00135948015614c2157918697614b6c60409593620f42405f96614b5d9b9a9b3084612ba9565b801515900302049a8b91612633565b6001600160a01b03602096865192614b848985610577565b868452601f198901368a860137875195845194858b01908860e4015e60c08760c401528660a4015286866084015215159a8b866064015285604401521683602401526f3eece7db00000000000000000000000083601001528060e40183528201610120018452828251928601915af115610bc1575192828410614c0a5750505050600190565b90614515916350a2884b02630fc63d1018906159fa565b5085614c2f91969596612ba9565b91604051631865c57d5f52610120816004601c865afa15610bc157871560051b0151918260801c3d6101201117610029576040936fffffffffffffffffffffffffffffffff5f9416900397614b6c565b905063670335be8103614f5a5750810190808203610160811261002957614ca58261059a565b60e0603f19614cb66020860161059a565b9301126100295760405191614cca83610523565b60408401358352614cdd6060850161059a565b602084015260808401356040840152614cf860a0850161059a565b94606084019586526080840160c0860135815260a085019060e0870135825260c0860196610100810135885261012081013567ffffffffffffffff8111610029578101906040828603126100295760405194614d538661053f565b82359267ffffffffffffffff841161002957614d76602092610140958301610682565b875201356020860152013590614d8c3086612ba9565b90519081811115908218028118809351020497818910614f485750506040519373bbbbbbb520d69a9775e85b458c58c648259fad5f6040523060601b602c526fdd62ed3e000000000000000000000000600c5260205f6044601c875afa15614f3f573d602011610029575f958695865190604052838110614ef3575b506001600160a01b036bcd1e9517bb0cb8d0d5cde8935c9260405196634dcebcba885283518860200152308860400152604084602001896060015e82168760a0015260608381018860c0015e1685610120015260c00151908160f81c9060601b1784610140015260801b8361016001526101a0836101800152826101a001526040826101c001528060200151826101e0015251805190816020019083610200015e6102040190601c018273bbbbbbb520d69a9775e85b458c58c648259fad5f5af115610bc1576fffffffffffffffffffffffffffffffff8091511691166010525f5260305fa0600190565b614f1c575b614f1673bbbbbbb520d69a9775e85b458c58c648259fad5f86615932565b5f614e08565b614f3a73bbbbbbb520d69a9775e85b458c58c648259fad5f866158e2565b614ef8565b843d5f823e3d90fd5b906001600160a01b0389925116612610565b63ca9e5d0f810361504f57508160c0918101031261002957614f7b8161059a565b90614f886020820161059a565b9060408101356060820135916001600160a01b038316928381036100295760105f6024926001600160a01b038560209760a0614fc76080879a01611eb1565b9201359a8a82615028575b50505015991660145288156360f3e02e0263bd6015b41860601b82525af115610bc157601f3d1115610029575f51928284106150115750505050600190565b9061451591639e9dfd6c02634a248d2a18906159fa565b620f42406150479361503a3085612ba9565b8015159003020491612633565b5f808a614fd2565b91929163b8df6d4d810361531357508260a09181010312610029576150738261059a565b60408301356001600160a01b03811691828203610029576150c261509960608701611eb1565b91620f424060808801359760206150b03085612ba9565b8015159003910135020494859161570a565b156153075763ffa642255f5260405f6004601c845afa15610bc157603f3d1115610029575f516020516317be952e5f5260205f6004601c865afa15610bc157601f3d1115610029575f518060081c6100295760ff1661512081611e39565b63796da7af5f5260205f6004601c875afa15610bc157601f3d1115610029575f519063eab5d20e5f5260205f6004601c885afa15610bc157601f3d1115610029575f5163ec2fd46d5f5260205f6004601c895afa15610bc157601f3d111561002957865f51936ec097ce7bc90715b34b9f100000000004926151a181611e39565b600281036152d1575050637c9b8e895f5260205f6004601c895afa15610bc157601f3d1115610029575f51948585038089116152a85750505083670de0b6b3a7640000809592818981950191848303020495800204029080820491061515018202049083030102045b63c0ffa1785f5260205f6004601c855afa15610bc157601f3d1115610029575f5163ab44a7a35f5260205f6004601c865afa15610bc157601f3d111561002957670de0b6b3a764000080915f5101019102049380851061527057509261257492936159b8565b60205f6004601c8895634a248d2a84525afa15610bc157601f3d1115610029575f518060a01c610029576001600160a01b0316612610565b670de0b6b3a76400009296506152c79493919550880302048380615a1e565b810391030161520a565b615300955091670de0b6b3a7640000919693926152ed81611e39565b1515908418028318958692020491615a1e565b900361520a565b90612574929391615976565b9192916342032aef036125d357819281601f1993018435908560200135866040013590878787018184019489868035968486606001359687019c8d86039e8f019f861090608011178b158c60401c171788158960a01c171791111792030160051c85118515171791111782873518178860051c831117610029576153c59060409796975198886020018a60a4013780896044015263a04c36b289600401526064870189526084878a01016040526125d9565b8760840152612000603f840484010195603f195f960190886024019189606401908a602001957fa04c36b2000000000000000700000000000000000000000000000000000000003017995b8060051b90602086830101359184831161002957836020916001946080018a52010135855201938685145a306bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f8f8c8f8380938f926bcdccd5c65a7d4860ce3abbe95d51923090888882180218f180156154bc57615497613cbe565b6154a8578d1117610bc15793615410565b505050505050505050505092505050600190565b5f6bcdccd5c65a7d4860ce3abbe95d615497565b919392610300916001600160a01b031694850906019161012083019261014081019081519081610160858218920151170261551c5750811561550f5752565b63ad1991f55f526004601cfd5b639a62e8b45f52602052506040526044601cfd5b9291906001600160a01b038216936e22d473030f116ddee9f6b43ac78ba385146d1ff3684f28c67538d4d072c2273486141773bbbbbbb520d69a9775e85b458c58c648259fad5f8614176104e6575f906001600160a01b0381169073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee820361567c57505050620f424090470204938051155f146156025750506155da575f80809381935af16155d16132f3565b9015611fe75750565b7f01da1572000000000000000000000000000000000000000000000000000000005f5260045ffd5b9093926020830180841161220c578251106125c157835f9460208695850101525b602083519301915af16156346132f3565b9015611fe75751159081615672575b5061564a57565b7f82d5d76a000000000000000000000000000000000000000000000000000000005f5260045ffd5b90503b155f615643565b9091949282979497155f1461569b575050506155da575f928392615623565b6156aa96939592963083612ba9565b8015159003905f19818309910290818082109103035f526020526156cc61364a565b6020860180871161220c578551106125c15787845f988360208b9a8a010152036156f9575b505050615623565b6157029261570a565b5f80876156f1565b60405192826040523060601b602c526fdd62ed3e000000000000000000000000600c5260205f6044601c855afa15615773573d602011610029575f5193604052831061575557505050565b6157629261576457615932565b565b61576e82826158e2565b615932565b833d5f823e3d90fd5b92939095949796919760608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c1515620f42408c11171717610baf5760d49660405199875180986020018a8d015e8a60b401528960b101523089609d015288608801528760780152866068015285605801526070820185604401526020856024015263f83d08ba856004015260b48201855215158460a80153830101604052565b92939095949796919760608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c1515620f42408c11171717610baf5760d49660405199875180986020018a8d015e8a60b401528960b101523089609d01528860880152876078015286606801528560580152607082018560440152602085602401526348c89491856004015260b48201855215158460a80153830101604052565b604460105f8093602095601452816034526f095ea7b300000000000000000000000082525af115612683573d153d601f1060015f5114161715615925575f603452565b633e3f8f735f526004601cfd5b604460105f809360209560145281196034526f095ea7b300000000000000000000000082525af115612683573d153d601f1060015f5114161715615925575f603452565b6084905f809360209560405191638dae73338352828801528160400152606081810152818160800152601c01915af115610bc157601f3d1115610029575f5190565b6084905f80936020956040519163e67ce7068352828801528160400152606081810152818160800152601c01915af115610bc157601f3d1115610029575f5190565b6004601c5f9260209484525afa15610bc1575f51908160a01c3d6020111761002957565b670de0b6b3a76400008481039594820281900490910292828404019185020480828110615aaf57500392600191670de0b6b3a7640000905b8260021b02048480020193600185811c019185925b838110615aa05750670de0b6b3a76400009394955060011b935f14615a9957015b0290808204910615150190565b9003615a8c565b9250828604830160011c615a6b565b91905003670de0b6b3a76400005f92949194615a56565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0382161860601b615af8575061069d8133612693565b60405191826044015281602401526f0c11dedd00000000000000000000000081601001526044815280606401604052336bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f80917f599d07140000000000000002000000000000000000000000000000000000000033176bcdccd5c65a7d4860ce3abbe95d60208151910182335af1615b996132f3565b9015611fe757615ba7613cbe565b602001519056edd3dd4cdd4018d8461c6e5c8f3a9d271cba3806000000000000000000000000","recompiledBytecode":"0x60a0806040523461074e5760208161642f803803809161001f8285610769565b83398101031261074e57516001600160601b031981169081900361074e576100cc60405161004e608082610769565b605b81527f536c697070616765416e64416374696f6e73286164647265737320726563697060208201527f69656e742c6164647265737320627579546f6b656e2c75696e74323536206d6960408201527f6e416d6f756e744f75742c62797465735b5d20616374696f6e7329000000000060609091015260016107a0565b61013f6040516100dd608082610769565b604181527f536c697070616765286164647265737320726563697069656e742c616464726560208201527f737320627579546f6b656e2c75696e74323536206d696e416d6f756e744f75746040820152602960f81b60609091015260016107a0565b61017861014a6107f9565b602081519101207f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa146107a0565b61025a604051610189608082610769565b604b8152602081017f5266714f7264657228436f6e73696465726174696f6e206d616b6572436f6e7381527f696465726174696f6e2c436f6e73696465726174696f6e2074616b6572436f6e60408301526a73696465726174696f6e2960a81b60608301526102306101f96107f9565b9160208060405194859382850197518091895e8401908282015f8152815193849201905e01015f815203601f198101835282610769565b5190207f49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a7598276146107a0565b46617a6914908161075a57604051907f16fbd3a71aa6d159973eb9ff1e1199f9fe242767e6f30ac662a492f92ac704115f80a26331a9108f60e11b8152600260048201526020816024816d04533fe15556b1e086bb1a72ceae5afa8015610700575f90610712575b6102d791506001600160a01b031630146107a0565b6001461480918115918261070b575b6102ef906107a0565b60405163313ce56760e01b815260208160048173a0b86991c6218b36c1d19d4a2e9eb0ce3606eb485afa9081156107005761033f91610335915f916106d1575b506107d4565b620f4240146107a0565b60405163313ce56760e01b815260208160048173dac17f958d2ee523a2206206994597c13d831ec75afa9081156107005761038491610335915f916106d157506107d4565b73f6e72db5454dd049d0788e411b06cfaf168530426014525f196034526f095ea7b30000000000000000000000005f5260205f6044601082736b175474e89094c44da98b954eedeac495271d0f5af1156106c1573d153d601f1060015f51141617156106b45773f6e72db5454dd049d0788e411b06cfaf168530426014525f196034526f095ea7b30000000000000000000000005f908152602090604460108273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb485af1156106c1573d153d601f1060015f51141617156106b45773a188eec8f81263234da3622a406892f3d630f98c6014525f196034526f095ea7b30000000000000000000000005f908152602090604460108273dc035d45d973e3ec169d2276ddab16f1e407384f5af1156106c1573d153d601f1060015f51141617156106b45773a188eec8f81263234da3622a406892f3d630f98c6014525f196034526f095ea7b30000000000000000000000005f908152602090604460108273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb485af1156106c1573d153d601f1060015f51141617156106b45773ce355440c00014a229bbec030a2b8f8eb45a28976014525f196034526f095ea7b30000000000000000000000005f9081526020906044601082734f8e5de400de08b164e7421b3ee387f461becd1a5af1156106c1573d153d601f1060015f51141617156106b45773217e42ceb2eae9ecb788fdf0e31c806c531760a36014525f196034526f095ea7b30000000000000000000000005f908152602090604460108273dac17f958d2ee523a2206206994597c13d831ec75af1156106c1573d153d601f1060015f51141617156106b45761062e925f60345273bbbbbbb520d69a9775e85b458c58c648259fad5f3b158015906106ad575b610622906107a0565b916106a5575b506107a0565b6040517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8665f527f574f8ba830fef8423e08e5c83d3cf7988b76ba736a1cb6cd4bd1ca02c0d16edc60205260016040523060605260805f20816040525f606052608052615bae908161088182396080518161295a0152f35b90505f610628565b5081610619565b633e3f8f735f526004601cfd5b60405162ffffff163d5f823e3d90fd5b6106f3915060203d6020116106f9575b6106eb8183610769565b8101906107bb565b5f61032f565b503d6106e1565b6040513d5f823e3d90fd5b50806102e6565b506020813d602011610752575b8161072c60209383610769565b8101031261074e57516001600160a01b038116810361074e576102d7906102c2565b5f80fd5b3d915061071f565b61076490156107a0565b6102d7565b601f909101601f19168101906001600160401b0382119082101761078c57604052565b634e487b7160e01b5f52604160045260245ffd5b156107a757565b634e487b7160e01b5f52600160045260245ffd5b9081602091031261074e575160ff8116810361074e5790565b60ff16604d81116107e557600a0a90565b634e487b7160e01b5f52601160045260245ffd5b60405190610808608083610769565b605882527f626f6f6c207061727469616c46696c6c416c6c6f7765642900000000000000006060837f436f6e73696465726174696f6e286164647265737320746f6b656e2c75696e7460208201527f32353620616d6f756e742c6164647265737320636f756e74657270617274792c6040820152015256fe6080604052600436101561002f575b361561002d5734610029576100216106b6565b602081519101f35b5f80fd5b005b5f3560e01c806306b8524c146100dc5780631fff991f14610076576370a082310361000e57346100295760206003193601126100295761006d6106a0565b505f805360015ff35b60a06003193601126100295761008b366105ae565b6064359067ffffffffffffffff8211610029576100d26100cc6100b460209436906004016105ff565b906100bd611e13565b946100c786611c75565b611cfe565b91611cca565b6040519015158152f35b60c0600319360112610029576100f1366105ae565b60643567ffffffffffffffff8111610029576101119036906004016105ff565b60a43567ffffffffffffffff811161002957610131903690600401610682565b9161013a611e13565b9261014484611c75565b6d1ff3684f28c67538d4d072c2273433036104e65781358201803560a4118415176100295760440135906bcd1e9517bb0cb8d0d5cde8935c918151826020015160f81c83600101915f1901825261019a81611e39565b806103285750516080908301839003126100295760218201516041830151926001600160a01b036081606183015192015193169260205f60e4604051846001600160ff1b03168160d40152858160b401528460ff1c601b0181609401528881607401528681605401526d1ff3684f28c67538d4d072c2273481603401528960601b818501526fd505accf000000000000000000000000815260100182885af1601f3d1160015f5114161615610260575b5050505050506100d2916100cc91602095611cfe565b84979599939694421161031b5789604288610310956100d29b61029e60209f61028c906100cc9e612bdd565b9361029985858984612c10565b612c73565b92604051936119018552602085015283604001927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528685606001526d1ff3684f28c67538d4d072c2273485608001528460a001525f19018360c001528260e0015260c081209052601e0120612c96565b95829482948961024a565b631a15a3cc5f526004601cfd5b91929161033481611e39565b600181036104c457505160a0908201829003126100295760218101516041820151916061810151938415158095036100295760205f6101046001600160a01b0360a1608187015196015194169560405190856001600160ff1b03168260f40152868260d401528560ff1c601b018260b4015289826094015288826074015281605401526d1ff3684f28c67538d4d072c2273481603401528960601b818501526f8fcbaf0c000000000000000000000000815260100182875af1601f3d1160015f5114161615610413575050505050506100d2916100cc91602095611cfe565b8396949795999315158742110261031b578960426100cc98856100d29b61045260209f610443906103109a612bdd565b9261029984845f038984612c10565b92604051936119018552602085015283604001927fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb84528685606001526d1ff3684f28c67538d4d072c2273485608001525f19018460a001528360c001528260e0015260c081209052601e0120612c96565b600281118063b7e59b040263f9ade075185f526021821802186020526024601cfd5b63e758b8d55f526004601cfd5b6060810190811067ffffffffffffffff82111761050f57604052565b634e487b7160e01b5f52604160045260245ffd5b60e0810190811067ffffffffffffffff82111761050f57604052565b6040810190811067ffffffffffffffff82111761050f57604052565b6080810190811067ffffffffffffffff82111761050f57604052565b90601f601f19910116810190811067ffffffffffffffff82111761050f57604052565b35906001600160a01b038216820361002957565b600319606091011261002957604051906105c7826104f3565b816004356001600160a01b03811681036100295781526024356001600160a01b03811681036100295760208201526040604435910152565b9181601f840112156100295782359167ffffffffffffffff8311610029576020808501948460051b01011161002957565b67ffffffffffffffff811161050f57601f01601f191660200190565b92919261065882610630565b916106666040519384610577565b829481845281830111610029578281602093845f960137010152565b9080601f830112156100295781602061069d9335910161064c565b90565b600435906001600160a01b038216820361002957565b60606bcdccd5c65a7d4860ce3abbe95c90813318811b825f351860e01c1715809260a01c61ffff160291611c61575b6106ed612381565b91909280155f1461070c575050610703916126a2565b90156100295790565b83600401909283600314611821578360061461130f5783600514610de05783600414610d1c575082600714610c5f575081600114610790575060021461076057634e487b7160e01b5f52605160045260245ffd5b80604461077592013590602433910135612633565b604051610783602082610577565b5f80825236602083013790565b916107fa9150606460448201359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b6001600160a01b0397939195969497309116036100295761081c9330936136b3565b5050505093919490806040019583875190610c48575b8051607f1c610baf575194828a0195865261084c83613981565b906108556132d5565b9060208201918b8560408301955b8b6030861015610a47575050505050505050855195866020015196519561088b835182613f1c565b8260200151805115610a37575b50805191826109c0575b5050505180602001519051968088106109b957506108c69187916303a65ab6613d6c565b1561098157509081159081156108fc575b5050505b60405182819382526020828101526020826040015201528060800160405290565b841b9061096557604051918452306040528073777777777777777777777777777777777777777760611b141502602c526f03a65ab6000000000000000000000000600c525f806064601c82335af11561095d575f83526040525f80806108d7565b3d5f823e3d90fd5b6020526fcbf0dbf50000000000000000000000005f5260246010fd5b5181811461099c579061099692910390615ac6565b506108db565b826014526ffb772a880000000000000000000000005f5260246010fd5b8791612610565b6109c982613b03565b5190518103610a11575b5060015b828110156108a25780610a0b6109fe6001938560209160051b010151908160200151915190565b9030906303a65ab6613d6c565b016109d7565b60208101519051610a319130906001600160a01b03166303a65ab6613d6c565b5f6109d3565b610a419082613f1c565b5f610898565b60405f610a6d848a953560e81c94600f600e19836003013560a01c9c019201908861399e565b9890966280000087602001956001600160a01b03875199620f42408b51627fffff851602049a602001519051602001519080861b90838084891b92169316918082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159a838383188d0280941816905218168073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028b528d601f198b6020019d019a359052610b298a8d613abf565b16158314610bcc5760e4918451918483528a836020015e87826080015286158260a001528160c00152828160e00152601c0182335af115610bc1575f5192610b8160205194935b848618029485935193849118613acb565b9180519083820390528211911117610baf57610ba38851809381519318613ae6565b01905291858d91610863565b634e487b715f5260116020526024601cfd5b6040513d5f823e3d90fd5b610104918451916f101e8952000000000000000000000000835260148b8701846020015e8a836034015e87826094015286158260b401528160d40152828160f4015260100182335af115610bc1575f51926020518080600f0b188580600f0b18178280600f0b183d604011171761002957610b81909493610b70565b610c588160200151825190615ac6565b8152610832565b909291503581016004810135610c736132d5565b5f92602481015b838510610cbf5750505050506044610ca26064830135610c9d60248501356125d9565b612374565b9101358110610caf575090565b63a55fee2e5f526020526024601cfd5b60048135830101604081013560e01c60446003196020840135019201908260401c9283158091029390610d08575b610d0257505050602060019101940193610c7a565b87612227565b50610d16868484848c613e71565b15610ced565b6080919293506003190110610029573560448301358301906024820135831c9360245f83131591013582180218913084145f14610d65576107759350603833920135901c612633565b5090610d74610ddb9315613698565b60405190610d818261053f565b3382526020820152610d9636602c8401611e57565b90610dd560ac84013560f81c93369060ad7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff77600483013501910161064c565b9161317d565b610775565b505091610e5d91508060446024610e509301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b95869391979894986136b3565b968c868060409d959896979d99949901518c8b8b8b8b8a306001600160a01b038716036112ff575b6112e1575b5050505050908d9493929151910152610ea285613981565b908d85610ead613322565b92610eb66132d5565b945b603582101561110a575050935050505060400151968760200151975199610ee0845182613f1c565b83602001518051156110fa575b508051908161107b575b50508251806020015190519b808d106110745750610f1b918c91630b0d9c09613d6c565b15610ff85750505050508215918215610f54575b5050505060405182819382526020828101526020826040015201528060800160405290565b6001600160a01b03163003610fe45730905b851b91610fc7576040519285526040528073777777777777777777777777777777777777777760611b141502602c526f0b0d9c09000000000000000000000000600c525f806064601c82335af11561095d575f83526040525f808080610f2f565b506020526fcbf0dbf50000000000000000000000005f5260246010fd5b6bcd1e9517bb0cb8d0d5cde8935c90610f66565b89969294969591939501519680880397146110585773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03821618891b61104d57505050505050610996906110475f33613e2c565b33613e55565b906109969691613dbf565b6014526ffb772a880000000000000000000000005f5260246010fd5b8c91612610565b61108481613b03565b51856040015181036110d4575b5060015b8281106110a25750610ef7565b806110ce6110c16001938560209160051b010151908160200151915190565b903090630b0d9c09613d6c565b01611095565b602081015190516110f49130906001600160a01b0316630b0d9c09613d6c565b5f611091565b6111049082613f1c565b5f610eed565b5f620f4240948761121e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe66111698661122d9d60176016196001600160a01b039b60209b3560e81c98604086600301358c1c910152019201908b61399e565b888c8b8a959495019b8c518b015190518b0151918b828b1b848c1b8082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159d8e858518028095181691015218168c526001600160a01b0383358d60408260e81c9101528d8862ffffff8360d01c1660020b91015260301c1660808d01520190601a01919091803560e81c6002198160038185820195010195030192565b93839d85949b9293809f613abf565b88158d5289515102048503868c01526040519363f3cd914c85528a518073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028588015260808b8801866040015e8b8560c0015e61012084810152818461014001528361016001376101440190601c0182335af115610bc1575f51906112c182600f0b9260801d600f0b918383180293519184835191185f0390612374565b90526112d38851809381519318613acb565b019052858f91948e95610eb8565b6112f394866020015190875191613dbf565b81528c8b8b8b8b610e8a565b61130882613835565b8752610e85565b5050905061138e915061137f611323612381565b90919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b958693919598979994996136b3565b9697919492939a90958a84604001998a518c8b8b8b8b8a306001600160a01b03871603611811575b6117f3575b505050505051868301526113ce86613981565b6113d6613322565b925f604051936113e585610523565b8185528160208601528160408601528401525f60808401525f60a08401528d60c08401525b60048110156115e25750505050875197886020015198519b61142d855182613f1c565b84602001518051156115d2575b508051918261155b575b50505082518c816020015191519d8e106115545750611469918d9163ae639329613d6c565b1561152b575050505050831591821561149a575b50505050505b604051906020825281602001528060400160405290565b6001600160a01b031630036115175730905b831b91610fc7576040519383526040528073777777777777777777777777777777777777777760611b141502602c526fae639329000000000000000000000000600c525f806064601c82335af11561150e575f90526040525f8080808061147d565b503d5f823e3d90fd5b6bcd1e9517bb0cb8d0d5cde8935c906114ac565b909396999897999591949295015198808a1461099c5761154e9798990391613ce4565b50611483565b8d91612610565b61156482613b03565b51905181036115ac575b5060015b8281101561144457806115a66115996001938560209160051b010151908160200151915190565b90309063ae639329613d6c565b01611572565b602081015190516115cc9130906001600160a01b031663ae639329613d6c565b5f61156e565b6115dc9082613f1c565b5f61143a565b813560e81c90620f424082623fffff1611610baf578f928f9360021961160e930191600301908a61399e565b9092818462c00000851661173c5750506116908461169c949535831c8760200152620f42408b602001966001600160a01b038851602001511660408a01526001600160a01b038d516020015116858a015287515102046080880152601319604051940190601401919091803560e81c6002198160038185820195010195030192565b9692959196369161064c565b60c08701526116ab8585613abf565b60405190603f19870190815190601f198901938451632bfb780c8552602086528a60c00195875f8d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc60448b805184815191038092520101910182335af115610bc157602051946040519652526040525190815103905261172f8b519182516127d4565b9052526040525b9061140a565b93926117489195613abf565b6240000082166117d0575f60208701526001600160a01b038951602001511660408701525b620f4240623fffff8a602001931683515102048187015260405191601f198701928351926343583be585525f60a46003198b0182335af11561095d57602051926040519452604052519081510390526117c988519182516127d4565b9052611736565b600160208701526001600160a01b0389602001516020015116604087015261176d565b61180594866020015190875191613ce4565b81528c8b8b8b8b6113bb565b61181a82613835565b87526113b6565b50509161189f915080606460446118919301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b9695879391969894986136b3565b9699929398909585604096939601519a306001600160a01b038616149b838d15611c51575b611c35575b8051607f1c610baf5751848f01528d906118e285613981565b91846118ec6132d5565b935b8d6030841015611a565750509250505060400151978860200151985199611916845182613f1c565b8360200151805115611a46575b50805190816119d1575b505082518c816020015191519d8e10611554575061194c918d91613b24565b156119ac57505050505050816119805750505060405182819382526020828101526020826040015201528060800160405290565b6119909215611998573090613b24565b5f80806108d7565b6bcd1e9517bb0cb8d0d5cde8935c90613b24565b909193959294969a9980999850015199808b1461099c576109969798999a039161389d565b6119da81613b03565b5185604001518103611a25575b5060015b8281106119f8575061192d565b80611a1f611a176001938560209160051b010151908160200151915190565b903090613b24565b016119eb565b60208101519051611a409130906001600160a01b0316613b24565b5f6119e7565b611a509082613f1c565b5f611923565b60205f611a7c8489953560e81c94600f600e19836003013560a01c9a019201908861399e565b97909662800000878501956001600160a01b03875199620f42408b51627fffff851602049a88015190518801519080871b908380848a1b92169316918082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159a89848d858518028095181691015218168073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028c52601f198a87019b01993560408d0152611b388a8c613abf565b16158314611bc757608491604051918715601f1b83608001528883607c015282606c01528a8286015e828152601c0182335af115610bc1575f51928080600f0b1861002957611b9a84600f0b9460801d93848618029485935193849118613acb565b9180519083820390528211911117610baf57611bbc8751809381519318613ae6565b019052848f926118ee565b60a491604051918715601f1b836094015288836090015282608001528a826034015e60148a6040018286015e6f101e8952000000000000000000000000815260100182335af115610bc1575f51928080600f0b183d6040111761002957611b9a84600f0b9460801d93610b70565b611c4a8a8a8a8a85602001518b87519161389d565b81526118c9565b611c5a88613835565b82526118c4565b5f6bcdccd5c65a7d4860ce3abbe95d6106e5565b8060601b156104e6576bcd1e9517bb0cb8d0d5cde8935c8060601b611cae57506001600160a01b03166bcd1e9517bb0cb8d0d5cde8935d565b6014526f7407c0f80000000000000000000000005f5260246010fd5b6bcd1e9517bb0cb8d0d5cde8935c1860601b611cf1575f6bcd1e9517bb0cb8d0d5cde8935d565b635149e7955f526004601cfd5b90929180611d18575b50611d1391925061225d565b600190565b8335840180358160200135918260e01c6024600319840192019086604051611d41858585611ecc565b9060405215611da8575b50505050505060208401936001945b828610611d68575050611d07565b80358201806020013560e01c6024600319833501920190611d8c878484848d612b36565b15611da257505050602060019101950194611d5a565b88612227565b8383611db3936128dd565b15611dbf578086611d4b565b60809394507fffffffff0000000000000000000000000000000000000000000000000000000060405195633c74eed687525f876020015216856040015260608581015281858501528460a001370190601c01fd5b33906d1ff3684f28c67538d4d072c227343314611e2c57565b36601319013560601c9150565b60031115611e4357565b634e487b7160e01b5f52602160045260245ffd5b8092910391608083126100295760405190611e71826104f3565b60408294126100295760606040918251611e8a8161053f565b611e938261059a565b81526020820135602082015284528281013560208501520135910152565b3590811515820361002957565b359060ff8216820361002957565b919091611eda8284836123ae565b15611ee757505050600190565b636a92dacb8103611fef575081016101808282031261002957611f098261059a565b611f168260208501611e57565b91611f2360a08501611ebe565b91611f3060c08601611eb1565b9161012086013567ffffffffffffffff81116100295781611f52918801610682565b926101408701359267ffffffffffffffff841161002957875f98976001600160a01b0396611f89611fb696611fbc988d9c01610682565b926d1ff3684f28c67538d4d072c22734331494610160820135968a60e061010085013594013592166127e1565b926128bc565b16611fc681613c57565b82602083519301915af1611fd86132f3565b9015611fe75750611d13613cbe565b602081519101fd5b634150c86c81149291906310cd63431483171561222057810191610160828403126100295761201d8261059a565b9161202b8460208301611e57565b61203760a08301611eb1565b9460e083013560c084013561010085013567ffffffffffffffff81116100295783612063918701610682565b9261012086013567ffffffffffffffff81116100295761014091612088918801610682565b950135976001600160a01b03881696156120f9579463ffffffff946120c9945f9a948b9a99946120d3996d1ff3684f28c67538d4d072c227343314966127e1565b9260801c16613bed565b6020815191018273ba1333333333a1ba1108e8412f11850a5c319ba95af1611fd86132f3565b94919650969291946d1ff3684f28c67538d4d072c227343314936060890298808a046060149015171561220c5760608802978089046060149015171561220c578760801c15158960801c15158260801c15151717610baf575f9889986040610132966101159882519b8051988d81519b8c928c838101938380868801019787601c198a015260200191015e60200191015e60030183528b610131015381816020018c60f1015e518a60b1015e8989609d015288608801528760780152866068015285605801520160d1810184604401526020846024015263f83d08ba846004015201825215158160a801536121ec613b8d565b602081519101826d14aa86c5d3c41765bb24e11bd7015af1611fd86132f3565b634e487b7160e01b5f52601160045260245ffd5b5050505f90565b9291829160405194633c74eed68652856020015260e01b84604001526060848101528184608001528360a0013760840190601c01fd5b906001600160a01b03825116916001600160a01b036020820151169260408201519084158215026122e957612291856125d9565b908282106122e157856060959673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee18861b155f146122cd57506122c89250612693565b389039565b916122dc938111900391612633565b6122c8565b509084612610565b5050509050565b9190916001600160a01b038151166001600160a01b03602083015116604083015191811583150261236c57612324826125d9565b9583871061236457956060959615908418028318918073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee18861b155f146122cd57506122c89250612693565b868484612610565b505050509050565b9190820391821161220c57565b336d1ff3684f28c67538d4d072c22734036123a85760131936019036821161220c575f9190565b5f903690565b90919063c1fb425e8103612448575081019060c081830312610029576123d38161059a565b6123e08360208401611e57565b9160a08101359367ffffffffffffffff851161002957611d13946124049201610682565b90604051906124128261053f565b6001600160a01b0360208301915f835216825261242f845f612cd8565b90526d1ff3684f28c67538d4d072c2273433149261317d565b633036d6a6036125d35781019061010081830312610029576124698161059a565b6124768360208401611e57565b9160a081013567ffffffffffffffff81116100295784612497918301610682565b9360c08201359067ffffffffffffffff8211610029576124b8918301610682565b93602c8151106125c1578451608901938460891161220c5761257495601f196124f96124e388610630565b976124f1604051998a610577565b808952610630565b013660208801376d1ff3684f28c67538d4d072c2273433148251602001518760480152604083602001886068015e8660a801538051906020018660a9015e845181515186602801525f866014015285525191602083015192831990620f4240821061257a575b505060e00135926001600160a01b0316612d39565b50600190565b6001600160a01b039294506125b560e0926125b0856125ba94511691620f424003916bcd1e9517bb0cb8d0d5cde8935c90612ba9565b6135d7565b6135f0565b939161255f565b634e487b715f5260326020526024601cfd5b50505f90565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0382161860601b61260557504790565b61069d903090612ba9565b916054526034526014526f97a6f3b90000000000000000000000005f5260646010fd5b60105f60449260209582956014526034526fa9059cbb00000000000000000000000082525af115612683573d153d601f1060015f5114161715612676575f603452565b6390b8ec185f526004601cfd5b60405162ffffff163d5f823e3d90fd5b5f80809381935af115610bc157565b907f5ea1d46a000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000833581811690600485106127c0575b501614612708576127049161358a565b9091565b50506bcd1e9517bb0cb8d0d5cde8935c908160a01c60011615610029576b3a9113a02a267cff8bfd38516bb39834f1d3371754c5eae0a7905c905c90604051938460c00160405261276a6fffffffffffffffffffffffffffffffff8416613370565b5060e0855284602001526ce000000000000000000000000084600c01528064ffffffffff168460a0015260601c83608001526ca000000000000000000000000083606c015282604001525f82604c015260019190565b828092508560040360031b1b16165f6126f4565b9190820180921161220c57565b92989791909695939860608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c15151717610baf576040610132966101159882519c8d9881519981519b8c928c838101938380868801019787601c198a015260200191015e60200191015e600301835215158c610131015381816020018d60f1015e518b60b1015e5f8a609d015289608801528860780152876068015286605801520160d181018560440152602085602401526348c89491856004015201835215158260a80153565b60ff81166128d857506e04444c5dc75cb358380d2e3de08a9090565b61335d565b9291909263562e052c81146128f7579261069d935f613e71565b5060609150829081010312610029578035604082013590604051928160281c151582421117612b25576084359260206bcd1e9517bb0cb8d0d5cde8935c926129506fffffffffffffffffffffffffffffffff8716613370565b46600103612ac2577f0000000000000000000000000000000000000000000000000000000000000000905b604051957f549c17970871bfdfb0ff321bda3359ea022619d3d8bbae6929a36123a847fb258752868501527fda3359ea022619d3d8bbae6929a36123a847fb2500000000000000000000000086600c01528686604001527fffffffffffffffffffffffff00000000000000000000000000000000000000008816866060015280519084012085608001526119015f52825260a084206040526042601e205f528260ff1c601b01825201356040526001600160ff1b03166060526020600160805f825afa5190813d0215612ab5576040525f6060526b3a9113a02a267cff8bfd3851906bb39834f1d3371754c5eae0a79264ffffffffff169060601b17905d5d6bcd1e9517bb0cb8d0d5cde8935c74010000000000000000000000000000000000000000176bcd1e9517bb0cb8d0d5cde8935d604052600190565b638baa579f5f526004601cfd5b6040517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8665f527f574f8ba830fef8423e08e5c83d3cf7988b76ba736a1cb6cd4bd1ca02c0d16edc8452466040523060605260805f20906040525f6060529061297b565b5063cd21db4f5f526020526024601cfd5b9392919063562e052c8114612b4e5761069d94613e71565b50925060609150829081010312610029578035604082013590604051928160281c151582421117612b25576084359260206bcd1e9517bb0cb8d0d5cde8935c926129506fffffffffffffffffffffffffffffffff8716613370565b602460105f926020946014526f70a0823100000000000000000000000084525afa15610bc1573d601f1015610029575f5190565b602460105f926020946014526f7ecebe0000000000000000000000000084525afa15610bc1573d602011610029575f5190565b5f60446010602093604051956d1ff3684f28c67538d4d072c2273460345260601b85526fdd62ed3e00000000000000000000000084525afa15610bc1573d602011610029575f51906040521415901517612c6657565b63b78cb0dd5f526004601cfd5b5f6004601c602093633644e51584525afa15610bc1573d602011610029575f5190565b92919091604051935f528160ff1c601b016020526040526001600160ff1b03166060526020600160805f825afa511860601b3d1115612ab5576040525f606052565b91905191602083015192831991620f42408310612cf457505050565b6001600160a01b031615612d06575050565b61069d929350906125b06001600160a01b036125b593511691620f424003916bcd1e9517bb0cb8d0d5cde8935c90612ba9565b929491946001600160ff1b038611610baf579094905b602c8651119385602801948551938860010151908960040151958a60180151938b602c0197885180968d6001600160a01b0383166001600160a01b038716109788159684811888029160ff811680155f14612fb2575050936001600160a01b039160e495731f98431c8ad98523631ae4a59f267346ea31f984907fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e33995b62ffffff1691816040519684604052186020525f80521860601b600c521560051b6060035f2090836040525f5260205260405260ff600b536055600b20906040521694159760405197889383519384602001908660c4015e60a08560a401526001600160a01b0316846084015283606401528260440152878a301802301882602401526f128acb0800000000000000000000000082601001528060c40182520101604052816bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa2575081740400000000000000000000000000000000000000005f93849360e01b17176bcdccd5c65a7d4860ce3abbe95d8451908260208701915af1612f036132f3565b9015611fe757612f11613cbe565b604081805181010312610029576040602082015191015192604052821802185f03905f8212610baf578190612f8557507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd4602c91995101808652106125c15790945230601486015260288552909490612d4f565b98505093955050925050818410612f9a575050565b909150612610565b63ab7646c45f526020526024601cfd5b6001810361300c575050936001600160a01b039160e4957341ff9aa7e16b8b1a8a8dc4f0efacd93d02d071c9907f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2926323a69e7599612df2565b60028103613066575050936001600160a01b039160e49573baceb8ec6b9355dfc0269c18bac9d6e2bdc29c4f907fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e3399612df2565b602f81036130c0575050936001600160a01b039160e49573df62d9e51d7c08360dcd41931a2e6b97ff8c73e8907fd3e7f58b9af034cfa7a0597e539bae7c6b393817a47a6fc1e1503cd6eaffe22a9263fa461e3399612df2565b6031810361311a575050936001600160a01b039160e4957386641a77a1172c3ce65bce52ae91bdadef0f74c2907f62441ebe4e4315cf3d49d5957f94d66b253dbabe7006f34ad7f70947e60bf15c92632c8958f699612df2565b94955091939092506032036128d857506001600160a01b038f9160e494938b9173f4fd2e6c5b60c5b365cd1b96dd6245e6d60414c2907f3e77b70b9c4ce644601ed4aab19834375c6a9a2bca7adeb89a7bdd5fd8eb0a7d9263fa461e3399612df2565b9190925f14613259575161324c576020810151610baf57604081015142116132385760845f927fffffffffffffffffffffffffffffffffffffffff000000000000000000000000849351516bcd1e9517bb0cb8d0d5cde8935c60206001600160a01b0385511694015193604051948560800152846060015260601b83604c015260601b1681602c01526f15dacbea00000000000000000000000081600c0152601c01826d1ff3684f28c67538d4d072c227345af115610bc157565b63cd21db4f5f52604001516020526024601cfd5b63c321526c5f526004601cfd5b905f9291839260406bcd1e9517bb0cb8d0d5cde8935c91818051956330f28b7a8752818151886020015e602001866060015e8460a0015e6001600160a01b03168260e0015261010082810152805190816020019083610120015e6101240190601c01826e22d473030f116ddee9f6b43ac78ba35af115610bc157565b604051906132e2826104f3565b5f6040838281528260208201520152565b3d1561331d573d9061330482610630565b916133126040519384610577565b82523d5f602084013e565b606090565b6040519060a0820182811067ffffffffffffffff82111761050f576040525f6080838281528260208201528260408201528260608201520152565b63d3b1276d5f5260ff166020526024601cfd5b6fffffffffffffffffffffffffffffffff166381bf1000808204818082049181808085049606910660401b17910660801b1781830660c01b17806359e6038302602e1c79ffff000000000000ffff000000000000ffff000000000000ffff1663ffff49c002018061e38f0260151c7d07ff000007ff000007ff000007ff000007ff000007ff000007ff000007ff167e07ff000007ff000007ff000007ff000007ff000007ff000007ff000007ff008161e38f02600d1c160160dc02018060081c9072ffffff00000000000000000000000000ffffff75ffffffff000000000000000000000000ffffffff00007effffffffff000000ff00000000000000ffffffffff000000ff00000000000084167affffff00000000000000000000000000ffffff000000000000000084161760101c9316911617177bffffffffffffffffffffffffffffffffffffffff00000000000000008160201c16906bffffffffffffffffffffffff1617910460c01b179060078260881c1e610100030160031c6012810190605360405194838652807f76767676767676767676767676767676767676767676767676767676767676760160071c7f010101010101010101010101010101010101010101010101010101010101010116602702017f3030303030303030303030303030303030303030303030303030303030303030019160110160031b1b189060031b610100031b826020015281604001604052565b600490911015903560e01c6367c4a3b0140290606082156135d1575060405190816040016040526020825273352650ac2653508d946c4912b07895b22edd84cd8260200152565b5f925090565b905f19818309910290818082109103035f526020525f90565b8051906020015181156136405781620f424080620f423f197fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399509830890828211900360fa1b910360061c170290565b620f424091500490565b5f5160205181156136405781620f424080620f423f197fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399509830890828211900360fa1b910360061c170290565b1561369f57565b634e487b7160e01b5f52600160045260245ffd5b90929194935f90604051938460c0015f8152610300386101e08801396104e086016040526136e7828a873560601c846154d0565b918287528287602001528660400199838b5287608001528660a001529495369436935f936020015173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145f146137695761373f906001600160a01b03163014613698565b9851620f42404760148c013560e81c0204905260161901976017015b6137658982613abf565b9796565b6001600160a01b03163081036137ae5750620f42406016196017836014013560e81c930193019a51916137a0308460200151612ba9565b80151590030204905261375b565b935094509750506137c0915015613698565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff48101908060550135600116908681016002198082013560e81c80920301916075019782891161002957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff889103019761375b565b906020820135918219620f4240811061384c575050565b90919250620f42400390356001600160a01b03811680910361002957613880906bcd1e9517bb0cb8d0d5cde8935c90612ba9565b905f19818309910290818082109103035f5260205261069d61364a565b95919491929073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0388161860601b6138db575050505050905061069d8133612693565b866014526ff9b6a7960000000000000000000000005f525f806024601082335af115610bc1576001600160a01b0316300361394c575050505061391f903383612633565b6014526f12e103f10000000000000000000000005f5260105f60248282335af115610bc1575f5160801c90565b61397c9491613974610dd592604051946139658661053f565b33865260208601523690611e57565b93369161064c565b61391f565b6040015180511561398f5750565b8063fb772a8860249252601c01fd5b9190939293813592836001948060f81c91826139c1575b50505050508101920390565b95839496613a06945180604001805115613aa8575b5050818411613a2d575b50601491925001948360800151906001600160a01b038560a001519360581c16906154d0565b9081815260400151809114613a1e57808080806139b5565b8063784cb7b860249252601c01fd5b85602001938451805115613a98575b5060028103613a5757505060149192855190525b82916139e0565b60149350613a69919250600314613698565b8582013592613a9160159287608001516001600160a01b038960a001519260581c168b6154d0565b9052613a50565b613aa2908a613f1c565b5f613a3c565b898051850180825260051b01918252525f806139d6565b5062ffffff106125c157565b905f8212613ad7575090565b80634c085bf160249252601c01fd5b905f8213613af457505f0390565b80633351b26060249252601c01fd5b805115613b105760200190565b634e487b7160e01b5f52603260045260245ffd5b908215613b7057604051926038526028528073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1860601b151502601452633ccfd60b5f525f80603c601c82335af11561095d57604052565b506014526fcbf0dbf50000000000000000000000005f5260246010fd5b6d14aa86c5d3c41765bb24e11bd7016bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa25750740300000000000014aa86c5d3c41765bb24e11bd7016bcdccd5c65a7d4860ce3abbe95d565b73ba1333333333a1ba1108e8412f11850a5c319ba96bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa2575060e01b7406ba1333333333a1ba1108e8412f11850a5c319ba9176bcdccd5c65a7d4860ce3abbe95d565b806bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257506001600160a01b03167f91dd734600000000000000050000000000000000000000000000000000000000176bcdccd5c65a7d4860ce3abbe95d565b6bcdccd5c65a7d4860ce3abbe95c80613cd45750565b63d66fcc385f526020526024601cfd5b9591949392906001600160a01b03163003613d45575050505080613d35575b6034526014526f15afd4090000000000000000000000005f5260205f6044601082335af115612683575f515f60345290565b613d40813384612633565b613d03565b610dd5613d409461397460405193613d5c8561053f565b3385528860208601523690611e57565b919060601b908315610fc757604051936060526040528073777777777777777777777777777777777777777760611b141502602c5260601b600c525f806064601c82335af11561095d575f606052604052565b93959290949194613dd08533613e2c565b6001600160a01b03163003613e0a57505050613dee92503390612633565b6311da60b45f5260205f6004601c82335af115610bc1575f5190565b613e27959492935090613974610dd592604051946139658661053f565b613dee565b602460105f80949381946014526fa584119400000000000000000000000082525af115610bc157565b6004601c6020935f936311da60b485525af115610bc1575f5190565b50909291604051613e83828685613f52565b906040525f14613e965750505050600190565b839163bd01c2268103613ef157506040925081010312610029576020813591013590804211613ee15750803411613ecd5750600190565b634a0944315f52602052346040526044601cfd5b63cd21db4f5f526020526024601cfd5b90915063131ad4280361222057826020918101031261002957613f16611d1392611eb1565b906122f0565b906040019081519182613f2e57505050565b5f905280515f198101825260051b01818103613f48575050565b5180825260400152565b9080929163d92aadfb81145f1461430c5750016101208282031261002957613f798261059a565b613f868260208501611e57565b613f9260a0850161059a565b9260c08501359167ffffffffffffffff831161002957613fb75f939284938801610682565b6001600160a01b03610100613fce60e08a0161059a565b980135961660405190613fe08261053f565b6001600160a01b0360208301978689521682526140f96140008583612cd8565b808952826140676001600160a01b0388515116604051906140208261055b565b815283602082015282604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9b6140d88c6001600160a01b036bcd1e9517bb0cb8d0d5cde8935c6040519261408f8461055b565b8286168452602084015216604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9b6140e33083612ba9565b8181111590821802811880940204809b52612633565b6040805192614109608085610577565b6058845261423760208501947f436f6e73696465726174696f6e286164647265737320746f6b656e2c75696e7486527f32353620616d6f756e742c6164647265737320636f756e74657270617274792c848201527f626f6f6c207061727469616c46696c6c416c6c6f7765642900000000000000006060820152603c8451614192606082610577565b602e815260208101907f546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c7582527f696e7432353620616d6f756e74290000000000000000000000000000000000008782015286519889947f436f6e73696465726174696f6e20636f6e73696465726174696f6e290000000060208701525180918587015e840190838201908d8252519283915e010189815203601f198101865285610577565b8180519663137c29fe8852818151896020015e602001876060015e8560a0015e8360e00152868361010001526101408361012001528051908161016001846101400152816020019084610160015e8151918260200190828501610180015e016101840190601c01826e22d473030f116ddee9f6b43ac78ba35af115610bc1576fffffffffffffffffffffffffffffffff917f49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a75982765f526020526040519260405260605f2092604052166010525f5260305fa0600190565b638d68a15681036143d45750016080828203126100295761432c8261059a565b9060208301359060408401359067ffffffffffffffff821161002957614353918501610682565b9160408351106125c1576013198351019260140180519381526143a16040519461437e606087610577565b602886526040366020880137808660280152308660140152602886523090612ba9565b80151580820394808602958604149114171561220c576001600160a01b03620f4240606061257497013594049216612d39565b63103b48be8103614585575060c09181010312610029576143f48161059a565b906144016020820161059a565b9160408201356144136060840161059a565b9260808101359062ffffff82168203610029576001600160a01b0360a08192013596169416945f928061455b575b50630902f1ac5f5260405f6004601c895afa15610bc15760403d106100295760018083161415928360051b956127108751928860201895848b8851958415801561454d575b61452e575b50505061ffff9060081c168203029202820191821561451a570204928184106144fc5750505f9491936001600160a01b0360a49487966020889586826040519763022c0d9f89528801015285010152168160600152608081810152818160a00152601c01915af115610bc157600190565b9061451587859363dfec36260263d21220a718906159fa565b612610565b634e487b7160e01b5f52601260045260245ffd5b61ffff9394506145429291610c9d91612ba9565b919050848b5f61448b565b5060018085811c1614614486565b620f424091935061456c3087612ba9565b801515900302049161457f838787612633565b5f614441565b6338c9c14781036145f25750019060a081830312610029576145a68161059a565b906145b36040820161059a565b90608081013567ffffffffffffffff811161002957611d13946145d7918301610682565b9260206001600160a01b036060840135941692013590615530565b635f80abae81036146c8575060a09181010312610029576146128161059a565b9061461f6020820161059a565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1491604081013583156146b457475b818111614660575b505050505050600190565b620f424091606083608086013584020494013591030204818111159082180218915f1461469c575061469191612693565b5f8080808080614655565b6001600160a01b036146af931690612633565b614691565b6146be3084612ba9565b801515900361464d565b90506368f5ee258103614768575081019061012081830312610029576146ed8161059a565b6146f96020830161059a565b9161470660608201611ebe565b9161471360808301611eb1565b9460e08301359167ffffffffffffffff8311610029575f96879685614748611fb695611fbc976001600160a01b039901610682565b926101008201359460c08301359389604060a0860135950135921661582f565b63fd8c38e1811492636c5f9cf9821492909183851763f61460f9821417156148e45750810161010082820312610029576147a18261059a565b936147ae6020840161059a565b60408401356147bf60608601611eb1565b9160808601359360a08701359560c088013567ffffffffffffffff81116100295760e0916147ee918a01610682565b970135976001600160a01b038a16911561481f57509463ffffffff946120c9945f9a9893948b9a956120d39961582f565b91985090156148ca57966148329761577c565b73e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4446bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f80917fb45a3c0e0000000000000001e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4446bcdccd5c65a7d4860ce3abbe95d6020815191018273e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4445af1611fd86132f3565b916148dc9593915f988998969461577c565b6121ec613b8d565b90925081935063736180c881145f14614acb575060c091810103126100295761490c8161059a565b9061491960408201611eb1565b9160608201356080830135936001600160a01b03851693848603610029578060206149b06001600160a01b0373ce355440c00014a229bbec030a2b8f8eb45a28978161496b60a0620f4240980161059a565b9916991415737a7916044b0f6e1563f1ff4cb7db270f0b85f58f0273dac17f958d2ee523a2206206994597c13d831ec718169687811886150280981897309118612ba9565b801515900391013502049015614a495763fae036d55f5260205f6004601c885afa15610bc157601f3d111561002957620f4240670de0b6b3a76400005f51019102049181831061451557505060105f60209481946044946034526014526f8d7ef9bb00000000000000000000000082525af115614a30575f603452600190565b6040516bffffffffffffffffffffffff163d5f823e3d90fd5b9092816034959395526014526f959912760000000000000000000000005f5260205f6044601082865af115614a30575f6004601c620f4240670de0b6b3a76400006020958560345202049463568d4b6f84525afa15610bc157601f3d111561002957670de0b6b3a76400005f5182020490039181831061451557505050600190565b639b59756f8103614c7f575060e0918101031261002957614aeb8161059a565b90614af86020820161059a565b916040820135906060830135926001600160a01b0384169384810361002957614b2360808301611eb1565b9560a0830135928360030b8094036100295760c00135948015614c2157918697614b6c60409593620f42405f96614b5d9b9a9b3084612ba9565b801515900302049a8b91612633565b6001600160a01b03602096865192614b848985610577565b868452601f198901368a860137875195845194858b01908860e4015e60c08760c401528660a4015286866084015215159a8b866064015285604401521683602401526f3eece7db00000000000000000000000083601001528060e40183528201610120018452828251928601915af115610bc1575192828410614c0a5750505050600190565b90614515916350a2884b02630fc63d1018906159fa565b5085614c2f91969596612ba9565b91604051631865c57d5f52610120816004601c865afa15610bc157871560051b0151918260801c3d6101201117610029576040936fffffffffffffffffffffffffffffffff5f9416900397614b6c565b905063670335be8103614f5a5750810190808203610160811261002957614ca58261059a565b60e0603f19614cb66020860161059a565b9301126100295760405191614cca83610523565b60408401358352614cdd6060850161059a565b602084015260808401356040840152614cf860a0850161059a565b94606084019586526080840160c0860135815260a085019060e0870135825260c0860196610100810135885261012081013567ffffffffffffffff8111610029578101906040828603126100295760405194614d538661053f565b82359267ffffffffffffffff841161002957614d76602092610140958301610682565b875201356020860152013590614d8c3086612ba9565b90519081811115908218028118809351020497818910614f485750506040519373bbbbbbb520d69a9775e85b458c58c648259fad5f6040523060601b602c526fdd62ed3e000000000000000000000000600c5260205f6044601c875afa15614f3f573d602011610029575f958695865190604052838110614ef3575b506001600160a01b036bcd1e9517bb0cb8d0d5cde8935c9260405196634dcebcba885283518860200152308860400152604084602001896060015e82168760a0015260608381018860c0015e1685610120015260c00151908160f81c9060601b1784610140015260801b8361016001526101a0836101800152826101a001526040826101c001528060200151826101e0015251805190816020019083610200015e6102040190601c018273bbbbbbb520d69a9775e85b458c58c648259fad5f5af115610bc1576fffffffffffffffffffffffffffffffff8091511691166010525f5260305fa0600190565b614f1c575b614f1673bbbbbbb520d69a9775e85b458c58c648259fad5f86615932565b5f614e08565b614f3a73bbbbbbb520d69a9775e85b458c58c648259fad5f866158e2565b614ef8565b843d5f823e3d90fd5b906001600160a01b0389925116612610565b63ca9e5d0f810361504f57508160c0918101031261002957614f7b8161059a565b90614f886020820161059a565b9060408101356060820135916001600160a01b038316928381036100295760105f6024926001600160a01b038560209760a0614fc76080879a01611eb1565b9201359a8a82615028575b50505015991660145288156360f3e02e0263bd6015b41860601b82525af115610bc157601f3d1115610029575f51928284106150115750505050600190565b9061451591639e9dfd6c02634a248d2a18906159fa565b620f42406150479361503a3085612ba9565b8015159003020491612633565b5f808a614fd2565b91929163b8df6d4d810361531357508260a09181010312610029576150738261059a565b60408301356001600160a01b03811691828203610029576150c261509960608701611eb1565b91620f424060808801359760206150b03085612ba9565b8015159003910135020494859161570a565b156153075763ffa642255f5260405f6004601c845afa15610bc157603f3d1115610029575f516020516317be952e5f5260205f6004601c865afa15610bc157601f3d1115610029575f518060081c6100295760ff1661512081611e39565b63796da7af5f5260205f6004601c875afa15610bc157601f3d1115610029575f519063eab5d20e5f5260205f6004601c885afa15610bc157601f3d1115610029575f5163ec2fd46d5f5260205f6004601c895afa15610bc157601f3d111561002957865f51936ec097ce7bc90715b34b9f100000000004926151a181611e39565b600281036152d1575050637c9b8e895f5260205f6004601c895afa15610bc157601f3d1115610029575f51948585038089116152a85750505083670de0b6b3a7640000809592818981950191848303020495800204029080820491061515018202049083030102045b63c0ffa1785f5260205f6004601c855afa15610bc157601f3d1115610029575f5163ab44a7a35f5260205f6004601c865afa15610bc157601f3d111561002957670de0b6b3a764000080915f5101019102049380851061527057509261257492936159b8565b60205f6004601c8895634a248d2a84525afa15610bc157601f3d1115610029575f518060a01c610029576001600160a01b0316612610565b670de0b6b3a76400009296506152c79493919550880302048380615a1e565b810391030161520a565b615300955091670de0b6b3a7640000919693926152ed81611e39565b1515908418028318958692020491615a1e565b900361520a565b90612574929391615976565b9192916342032aef036125d357819281601f1993018435908560200135866040013590878787018184019489868035968486606001359687019c8d86039e8f019f861090608011178b158c60401c171788158960a01c171791111792030160051c85118515171791111782873518178860051c831117610029576153c59060409796975198886020018a60a4013780896044015263a04c36b289600401526064870189526084878a01016040526125d9565b8760840152612000603f840484010195603f195f960190886024019189606401908a602001957fa04c36b2000000000000000700000000000000000000000000000000000000003017995b8060051b90602086830101359184831161002957836020916001946080018a52010135855201938685145a306bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f8f8c8f8380938f926bcdccd5c65a7d4860ce3abbe95d51923090888882180218f180156154bc57615497613cbe565b6154a8578d1117610bc15793615410565b505050505050505050505092505050600190565b5f6bcdccd5c65a7d4860ce3abbe95d615497565b919392610300916001600160a01b031694850906019161012083019261014081019081519081610160858218920151170261551c5750811561550f5752565b63ad1991f55f526004601cfd5b639a62e8b45f52602052506040526044601cfd5b9291906001600160a01b038216936e22d473030f116ddee9f6b43ac78ba385146d1ff3684f28c67538d4d072c2273486141773bbbbbbb520d69a9775e85b458c58c648259fad5f8614176104e6575f906001600160a01b0381169073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee820361567c57505050620f424090470204938051155f146156025750506155da575f80809381935af16155d16132f3565b9015611fe75750565b7f01da1572000000000000000000000000000000000000000000000000000000005f5260045ffd5b9093926020830180841161220c578251106125c157835f9460208695850101525b602083519301915af16156346132f3565b9015611fe75751159081615672575b5061564a57565b7f82d5d76a000000000000000000000000000000000000000000000000000000005f5260045ffd5b90503b155f615643565b9091949282979497155f1461569b575050506155da575f928392615623565b6156aa96939592963083612ba9565b8015159003905f19818309910290818082109103035f526020526156cc61364a565b6020860180871161220c578551106125c15787845f988360208b9a8a010152036156f9575b505050615623565b6157029261570a565b5f80876156f1565b60405192826040523060601b602c526fdd62ed3e000000000000000000000000600c5260205f6044601c855afa15615773573d602011610029575f5193604052831061575557505050565b6157629261576457615932565b565b61576e82826158e2565b615932565b833d5f823e3d90fd5b92939095949796919760608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c1515620f42408c11171717610baf5760d49660405199875180986020018a8d015e8a60b401528960b101523089609d015288608801528760780152866068015285605801526070820185604401526020856024015263f83d08ba856004015260b48201855215158460a80153830101604052565b92939095949796919760608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c1515620f42408c11171717610baf5760d49660405199875180986020018a8d015e8a60b401528960b101523089609d01528860880152876078015286606801528560580152607082018560440152602085602401526348c89491856004015260b48201855215158460a80153830101604052565b604460105f8093602095601452816034526f095ea7b300000000000000000000000082525af115612683573d153d601f1060015f5114161715615925575f603452565b633e3f8f735f526004601cfd5b604460105f809360209560145281196034526f095ea7b300000000000000000000000082525af115612683573d153d601f1060015f5114161715615925575f603452565b6084905f809360209560405191638dae73338352828801528160400152606081810152818160800152601c01915af115610bc157601f3d1115610029575f5190565b6084905f80936020956040519163e67ce7068352828801528160400152606081810152818160800152601c01915af115610bc157601f3d1115610029575f5190565b6004601c5f9260209484525afa15610bc1575f51908160a01c3d6020111761002957565b670de0b6b3a76400008481039594820281900490910292828404019185020480828110615aaf57500392600191670de0b6b3a7640000905b8260021b02048480020193600185811c019185925b838110615aa05750670de0b6b3a76400009394955060011b935f14615a9957015b0290808204910615150190565b9003615a8c565b9250828604830160011c615a6b565b91905003670de0b6b3a76400005f92949194615a56565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0382161860601b615af8575061069d8133612693565b60405191826044015281602401526f0c11dedd00000000000000000000000081601001526044815280606401604052336bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f80917f599d07140000000000000002000000000000000000000000000000000000000033176bcdccd5c65a7d4860ce3abbe95d60208151910182335af1615b996132f3565b9015611fe757615ba7613cbe565b602001519056","sourceMap":"483557:3627:0:-:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;-1:-1:-1;;;;;;483557:3627:0;;;;;;;;233478:84;483557:3627;;;235675:66;483557:3627;;:::i;:::-;233114:66;235675;;233114;483557:3627;233114:66;;;;483557:3627;233114:66;;;;483557:3627;233114:66;;;;233485:76;233478:84;:::i;:::-;233572:60;483557:3627;;;235675:66;483557:3627;;:::i;:::-;233381:66;235675;;233381;483557:3627;233381:66;;;;483557:3627;233381:66;;;-1:-1:-1;;;483557:3627:0;233381:66;;;;233579:52;233572:60;:::i;:::-;237075:70;235675:66;;:::i;:::-;483557:3627;235257:90;;;;237108:36;235675:66;237082:62;237075:70;:::i;:::-;237155:72;483557:3627;;;235675:66;483557:3627;;:::i;:::-;236046:66;235675;;483557:3627;236046:66;;;;;;483557:3627;236046:66;;;-1:-1:-1;;;483557:3627:0;236046:66;;;235940:52;235675:66;;:::i;:::-;483557:3627;;;;;235940:52;;;;;;235257:90;;235798:77;;;;;;;;;;-1:-1:-1;235798:77:0;;235257:90;;235798:77;;;;;;;;-1:-1:-1;235798:77:0;;235940:52;483557:3627;;235940:52;;;;;;:::i;:::-;235257:90;237184:42;;236046:66;237162:64;237155:72;:::i;:::-;443275:13;443292:5;443275:22;;;;;483557:3627;;443318:20;;-1:-1:-1;443318:20:0;;-1:-1:-1;;;443359:42:0;;464907:1;443359:42;;;2347;483557:3627;443359:42;;;2347;443359;;;;;;-1:-1:-1;443359:42:0;;;443271:221;443352:67;;-1:-1:-1;;;;;;483557:3627:0;443413:4;443359:59;443352:67;:::i;:::-;427751:14;443275:13;259989:18;;:44;;;;;;;443271:221;259982:52;;;:::i;:::-;483557:3627;;-1:-1:-1;;;260070:15:0;;483557:3627;;260070:15;483557:3627;259127:42;260070:15;;;;;;;260044:42;260070:15;260064:21;260070:15;-1:-1:-1;260070:15:0;;;443271:221;260064:21;;:::i;:::-;259942:9;260051:34;260044:42;:::i;:::-;483557:3627;;-1:-1:-1;;;260122:15:0;;483557:3627;;260070:15;483557:3627;259202:42;260122:15;;;;;;;260096:42;260122:15;260116:21;260122:15;-1:-1:-1;260122:15:0;;;260116:21;;:::i;260096:42::-;483557:3627;83245:1422;;260217:17;;83245:1422;;;-1:-1:-1;83245:1422:0;483557:3627;-1:-1:-1;83245:1422:0;;;483557:3627;83245:1422;;;;;;;;483557:3627;83245:1422;427751:14;-1:-1:-1;83245:1422:0;;;;;;;483557:3627;83245:1422;;-1:-1:-1;;83245:1422:0;;;-1:-1:-1;83245:1422:0;;;-1:-1:-1;;83245:1422:0;;-1:-1:-1;259127:42:0;83245:1422;;;;;;;;483557:3627;83245:1422;427751:14;-1:-1:-1;83245:1422:0;;;;;;;483557:3627;83245:1422;;-1:-1:-1;;83245:1422:0;;;-1:-1:-1;83245:1422:0;;;-1:-1:-1;;83245:1422:0;;-1:-1:-1;483557:3627:0;83245:1422;;;;;;;;483557:3627;83245:1422;427751:14;-1:-1:-1;83245:1422:0;;;;;;;483557:3627;83245:1422;;-1:-1:-1;;83245:1422:0;;;-1:-1:-1;83245:1422:0;;;-1:-1:-1;;83245:1422:0;;-1:-1:-1;259127:42:0;83245:1422;;;;;;;;483557:3627;83245:1422;427751:14;-1:-1:-1;83245:1422:0;;;;;;;483557:3627;83245:1422;;-1:-1:-1;;83245:1422:0;;;-1:-1:-1;83245:1422:0;;;-1:-1:-1;;83245:1422:0;;-1:-1:-1;483557:3627:0;83245:1422;;;;;;;;483557:3627;83245:1422;427751:14;-1:-1:-1;83245:1422:0;;;;;;;259574:42;83245:1422;;-1:-1:-1;;83245:1422:0;;;-1:-1:-1;83245:1422:0;;;-1:-1:-1;;83245:1422:0;;-1:-1:-1;259202:42:0;83245:1422;;;;;;;;483557:3627;83245:1422;427751:14;-1:-1:-1;83245:1422:0;;;;;;;472607:61;83245:1422;-1:-1:-1;83245:1422:0;;284148:42;284229:27;:31;;;:57;;;443271:221;284222:65;;;:::i;:::-;472614:53;;;443271:221;472607:61;;:::i;:::-;483557:3627;458467:322;457906:80;-1:-1:-1;458467:322:0;458030:22;483557:3627;458467:322;427751:14;483557:3627;458467:322;;483557:3627;458467:322;235675:66;-1:-1:-1;458467:322:0;;483557:3627;458467:322;-1:-1:-1;483557:3627:0;458467:322;235675:66;458132:48;483557:3627;;;;;;235675:66;483557:3627;;;;;;472614:53;;;;;;284229:57;-1:-1:-1;284229:57:0;;;83245:1422;;-1:-1:-1;83245:1422:0;260070:15;83245:1422;;;483557:3627;83245:1422;;;;-1:-1:-1;83245:1422:0;;;;;260122:15;;;;483557:3627;260122:15;483557:3627;260122:15;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;483557:3627;;259120:50;-1:-1:-1;259120:50:0;;;;;259989:44;-1:-1:-1;259989:44:0;;;443359:42;;483557:3627;443359:42;;483557:3627;443359:42;;;;;;483557:3627;443359:42;;;:::i;:::-;;;2347;;;;;-1:-1:-1;;;;;483557:3627:0;;2347:42;;;;443352:67;443359:42;;;2347;-1:-1:-1;2347:42:0;;443359;;;-1:-1:-1;443359:42:0;;443271:221;443450:31;443457:23;;443450:31;:::i;:::-;443271:221;;483557:3627;;;;;-1:-1:-1;;483557:3627:0;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;:::o;:::-;;;;-1:-1:-1;483557:3627:0;;;;;-1:-1:-1;483557:3627:0;;;;;:::o;:::-;;;;;;;;;;;;259120:50;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::o;:::-;483557:3627;;;259120:50;;;;;;;;235675:66;483557:3627;;;;235675:66;483557:3627;;:::i;:::-;235675:66;;;;483557:3627;235675:66;;;;;;;483557:3627;235675:66;;;;;:::o","linkReferences":{},"cborAuxdata":{},"transformations":[{"type":"insert","offset":25647,"reason":"constructorArguments"}],"transformationValues":{"constructorArguments":"0xedd3dd4cdd4018d8461c6e5c8f3a9d271cba3806000000000000000000000000"}},"runtimeBytecode":{"onchainBytecode":"0x6080604052600436101561002f575b361561002d5734610029576100216106b6565b602081519101f35b5f80fd5b005b5f3560e01c806306b8524c146100dc5780631fff991f14610076576370a082310361000e57346100295760206003193601126100295761006d6106a0565b505f805360015ff35b60a06003193601126100295761008b366105ae565b6064359067ffffffffffffffff8211610029576100d26100cc6100b460209436906004016105ff565b906100bd611e13565b946100c786611c75565b611cfe565b91611cca565b6040519015158152f35b60c0600319360112610029576100f1366105ae565b60643567ffffffffffffffff8111610029576101119036906004016105ff565b60a43567ffffffffffffffff811161002957610131903690600401610682565b9161013a611e13565b9261014484611c75565b6d1ff3684f28c67538d4d072c2273433036104e65781358201803560a4118415176100295760440135906bcd1e9517bb0cb8d0d5cde8935c918151826020015160f81c83600101915f1901825261019a81611e39565b806103285750516080908301839003126100295760218201516041830151926001600160a01b036081606183015192015193169260205f60e4604051846001600160ff1b03168160d40152858160b401528460ff1c601b0181609401528881607401528681605401526d1ff3684f28c67538d4d072c2273481603401528960601b818501526fd505accf000000000000000000000000815260100182885af1601f3d1160015f5114161615610260575b5050505050506100d2916100cc91602095611cfe565b84979599939694421161031b5789604288610310956100d29b61029e60209f61028c906100cc9e612bdd565b9361029985858984612c10565b612c73565b92604051936119018552602085015283604001927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528685606001526d1ff3684f28c67538d4d072c2273485608001528460a001525f19018360c001528260e0015260c081209052601e0120612c96565b95829482948961024a565b631a15a3cc5f526004601cfd5b91929161033481611e39565b600181036104c457505160a0908201829003126100295760218101516041820151916061810151938415158095036100295760205f6101046001600160a01b0360a1608187015196015194169560405190856001600160ff1b03168260f40152868260d401528560ff1c601b018260b4015289826094015288826074015281605401526d1ff3684f28c67538d4d072c2273481603401528960601b818501526f8fcbaf0c000000000000000000000000815260100182875af1601f3d1160015f5114161615610413575050505050506100d2916100cc91602095611cfe565b8396949795999315158742110261031b578960426100cc98856100d29b61045260209f610443906103109a612bdd565b9261029984845f038984612c10565b92604051936119018552602085015283604001927fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb84528685606001526d1ff3684f28c67538d4d072c2273485608001525f19018460a001528360c001528260e0015260c081209052601e0120612c96565b600281118063b7e59b040263f9ade075185f526021821802186020526024601cfd5b63e758b8d55f526004601cfd5b6060810190811067ffffffffffffffff82111761050f57604052565b634e487b7160e01b5f52604160045260245ffd5b60e0810190811067ffffffffffffffff82111761050f57604052565b6040810190811067ffffffffffffffff82111761050f57604052565b6080810190811067ffffffffffffffff82111761050f57604052565b90601f601f19910116810190811067ffffffffffffffff82111761050f57604052565b35906001600160a01b038216820361002957565b600319606091011261002957604051906105c7826104f3565b816004356001600160a01b03811681036100295781526024356001600160a01b03811681036100295760208201526040604435910152565b9181601f840112156100295782359167ffffffffffffffff8311610029576020808501948460051b01011161002957565b67ffffffffffffffff811161050f57601f01601f191660200190565b92919261065882610630565b916106666040519384610577565b829481845281830111610029578281602093845f960137010152565b9080601f830112156100295781602061069d9335910161064c565b90565b600435906001600160a01b038216820361002957565b60606bcdccd5c65a7d4860ce3abbe95c90813318811b825f351860e01c1715809260a01c61ffff160291611c61575b6106ed612381565b91909280155f1461070c575050610703916126a2565b90156100295790565b83600401909283600314611821578360061461130f5783600514610de05783600414610d1c575082600714610c5f575081600114610790575060021461076057634e487b7160e01b5f52605160045260245ffd5b80604461077592013590602433910135612633565b604051610783602082610577565b5f80825236602083013790565b916107fa9150606460448201359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b6001600160a01b0397939195969497309116036100295761081c9330936136b3565b5050505093919490806040019583875190610c48575b8051607f1c610baf575194828a0195865261084c83613981565b906108556132d5565b9060208201918b8560408301955b8b6030861015610a47575050505050505050855195866020015196519561088b835182613f1c565b8260200151805115610a37575b50805191826109c0575b5050505180602001519051968088106109b957506108c69187916303a65ab6613d6c565b1561098157509081159081156108fc575b5050505b60405182819382526020828101526020826040015201528060800160405290565b841b9061096557604051918452306040528073777777777777777777777777777777777777777760611b141502602c526f03a65ab6000000000000000000000000600c525f806064601c82335af11561095d575f83526040525f80806108d7565b3d5f823e3d90fd5b6020526fcbf0dbf50000000000000000000000005f5260246010fd5b5181811461099c579061099692910390615ac6565b506108db565b826014526ffb772a880000000000000000000000005f5260246010fd5b8791612610565b6109c982613b03565b5190518103610a11575b5060015b828110156108a25780610a0b6109fe6001938560209160051b010151908160200151915190565b9030906303a65ab6613d6c565b016109d7565b60208101519051610a319130906001600160a01b03166303a65ab6613d6c565b5f6109d3565b610a419082613f1c565b5f610898565b60405f610a6d848a953560e81c94600f600e19836003013560a01c9c019201908861399e565b9890966280000087602001956001600160a01b03875199620f42408b51627fffff851602049a602001519051602001519080861b90838084891b92169316918082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159a838383188d0280941816905218168073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028b528d601f198b6020019d019a359052610b298a8d613abf565b16158314610bcc5760e4918451918483528a836020015e87826080015286158260a001528160c00152828160e00152601c0182335af115610bc1575f5192610b8160205194935b848618029485935193849118613acb565b9180519083820390528211911117610baf57610ba38851809381519318613ae6565b01905291858d91610863565b634e487b715f5260116020526024601cfd5b6040513d5f823e3d90fd5b610104918451916f101e8952000000000000000000000000835260148b8701846020015e8a836034015e87826094015286158260b401528160d40152828160f4015260100182335af115610bc1575f51926020518080600f0b188580600f0b18178280600f0b183d604011171761002957610b81909493610b70565b610c588160200151825190615ac6565b8152610832565b909291503581016004810135610c736132d5565b5f92602481015b838510610cbf5750505050506044610ca26064830135610c9d60248501356125d9565b612374565b9101358110610caf575090565b63a55fee2e5f526020526024601cfd5b60048135830101604081013560e01c60446003196020840135019201908260401c9283158091029390610d08575b610d0257505050602060019101940193610c7a565b87612227565b50610d16868484848c613e71565b15610ced565b6080919293506003190110610029573560448301358301906024820135831c9360245f83131591013582180218913084145f14610d65576107759350603833920135901c612633565b5090610d74610ddb9315613698565b60405190610d818261053f565b3382526020820152610d9636602c8401611e57565b90610dd560ac84013560f81c93369060ad7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff77600483013501910161064c565b9161317d565b610775565b505091610e5d91508060446024610e509301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b95869391979894986136b3565b968c868060409d959896979d99949901518c8b8b8b8b8a306001600160a01b038716036112ff575b6112e1575b5050505050908d9493929151910152610ea285613981565b908d85610ead613322565b92610eb66132d5565b945b603582101561110a575050935050505060400151968760200151975199610ee0845182613f1c565b83602001518051156110fa575b508051908161107b575b50508251806020015190519b808d106110745750610f1b918c91630b0d9c09613d6c565b15610ff85750505050508215918215610f54575b5050505060405182819382526020828101526020826040015201528060800160405290565b6001600160a01b03163003610fe45730905b851b91610fc7576040519285526040528073777777777777777777777777777777777777777760611b141502602c526f0b0d9c09000000000000000000000000600c525f806064601c82335af11561095d575f83526040525f808080610f2f565b506020526fcbf0dbf50000000000000000000000005f5260246010fd5b6bcd1e9517bb0cb8d0d5cde8935c90610f66565b89969294969591939501519680880397146110585773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03821618891b61104d57505050505050610996906110475f33613e2c565b33613e55565b906109969691613dbf565b6014526ffb772a880000000000000000000000005f5260246010fd5b8c91612610565b61108481613b03565b51856040015181036110d4575b5060015b8281106110a25750610ef7565b806110ce6110c16001938560209160051b010151908160200151915190565b903090630b0d9c09613d6c565b01611095565b602081015190516110f49130906001600160a01b0316630b0d9c09613d6c565b5f611091565b6111049082613f1c565b5f610eed565b5f620f4240948761121e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe66111698661122d9d60176016196001600160a01b039b60209b3560e81c98604086600301358c1c910152019201908b61399e565b888c8b8a959495019b8c518b015190518b0151918b828b1b848c1b8082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159d8e858518028095181691015218168c526001600160a01b0383358d60408260e81c9101528d8862ffffff8360d01c1660020b91015260301c1660808d01520190601a01919091803560e81c6002198160038185820195010195030192565b93839d85949b9293809f613abf565b88158d5289515102048503868c01526040519363f3cd914c85528a518073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028588015260808b8801866040015e8b8560c0015e61012084810152818461014001528361016001376101440190601c0182335af115610bc1575f51906112c182600f0b9260801d600f0b918383180293519184835191185f0390612374565b90526112d38851809381519318613acb565b019052858f91948e95610eb8565b6112f394866020015190875191613dbf565b81528c8b8b8b8b610e8a565b61130882613835565b8752610e85565b5050905061138e915061137f611323612381565b90919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b958693919598979994996136b3565b9697919492939a90958a84604001998a518c8b8b8b8b8a306001600160a01b03871603611811575b6117f3575b505050505051868301526113ce86613981565b6113d6613322565b925f604051936113e585610523565b8185528160208601528160408601528401525f60808401525f60a08401528d60c08401525b60048110156115e25750505050875197886020015198519b61142d855182613f1c565b84602001518051156115d2575b508051918261155b575b50505082518c816020015191519d8e106115545750611469918d9163ae639329613d6c565b1561152b575050505050831591821561149a575b50505050505b604051906020825281602001528060400160405290565b6001600160a01b031630036115175730905b831b91610fc7576040519383526040528073777777777777777777777777777777777777777760611b141502602c526fae639329000000000000000000000000600c525f806064601c82335af11561150e575f90526040525f8080808061147d565b503d5f823e3d90fd5b6bcd1e9517bb0cb8d0d5cde8935c906114ac565b909396999897999591949295015198808a1461099c5761154e9798990391613ce4565b50611483565b8d91612610565b61156482613b03565b51905181036115ac575b5060015b8281101561144457806115a66115996001938560209160051b010151908160200151915190565b90309063ae639329613d6c565b01611572565b602081015190516115cc9130906001600160a01b031663ae639329613d6c565b5f61156e565b6115dc9082613f1c565b5f61143a565b813560e81c90620f424082623fffff1611610baf578f928f9360021961160e930191600301908a61399e565b9092818462c00000851661173c5750506116908461169c949535831c8760200152620f42408b602001966001600160a01b038851602001511660408a01526001600160a01b038d516020015116858a015287515102046080880152601319604051940190601401919091803560e81c6002198160038185820195010195030192565b9692959196369161064c565b60c08701526116ab8585613abf565b60405190603f19870190815190601f198901938451632bfb780c8552602086528a60c00195875f8d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc60448b805184815191038092520101910182335af115610bc157602051946040519652526040525190815103905261172f8b519182516127d4565b9052526040525b9061140a565b93926117489195613abf565b6240000082166117d0575f60208701526001600160a01b038951602001511660408701525b620f4240623fffff8a602001931683515102048187015260405191601f198701928351926343583be585525f60a46003198b0182335af11561095d57602051926040519452604052519081510390526117c988519182516127d4565b9052611736565b600160208701526001600160a01b0389602001516020015116604087015261176d565b61180594866020015190875191613ce4565b81528c8b8b8b8b6113bb565b61181a82613835565b87526113b6565b50509161189f915080606460446118919301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b9695879391969894986136b3565b9699929398909585604096939601519a306001600160a01b038616149b838d15611c51575b611c35575b8051607f1c610baf5751848f01528d906118e285613981565b91846118ec6132d5565b935b8d6030841015611a565750509250505060400151978860200151985199611916845182613f1c565b8360200151805115611a46575b50805190816119d1575b505082518c816020015191519d8e10611554575061194c918d91613b24565b156119ac57505050505050816119805750505060405182819382526020828101526020826040015201528060800160405290565b6119909215611998573090613b24565b5f80806108d7565b6bcd1e9517bb0cb8d0d5cde8935c90613b24565b909193959294969a9980999850015199808b1461099c576109969798999a039161389d565b6119da81613b03565b5185604001518103611a25575b5060015b8281106119f8575061192d565b80611a1f611a176001938560209160051b010151908160200151915190565b903090613b24565b016119eb565b60208101519051611a409130906001600160a01b0316613b24565b5f6119e7565b611a509082613f1c565b5f611923565b60205f611a7c8489953560e81c94600f600e19836003013560a01c9a019201908861399e565b97909662800000878501956001600160a01b03875199620f42408b51627fffff851602049a88015190518801519080871b908380848a1b92169316918082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159a89848d858518028095181691015218168073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028c52601f198a87019b01993560408d0152611b388a8c613abf565b16158314611bc757608491604051918715601f1b83608001528883607c015282606c01528a8286015e828152601c0182335af115610bc1575f51928080600f0b1861002957611b9a84600f0b9460801d93848618029485935193849118613acb565b9180519083820390528211911117610baf57611bbc8751809381519318613ae6565b019052848f926118ee565b60a491604051918715601f1b836094015288836090015282608001528a826034015e60148a6040018286015e6f101e8952000000000000000000000000815260100182335af115610bc1575f51928080600f0b183d6040111761002957611b9a84600f0b9460801d93610b70565b611c4a8a8a8a8a85602001518b87519161389d565b81526118c9565b611c5a88613835565b82526118c4565b5f6bcdccd5c65a7d4860ce3abbe95d6106e5565b8060601b156104e6576bcd1e9517bb0cb8d0d5cde8935c8060601b611cae57506001600160a01b03166bcd1e9517bb0cb8d0d5cde8935d565b6014526f7407c0f80000000000000000000000005f5260246010fd5b6bcd1e9517bb0cb8d0d5cde8935c1860601b611cf1575f6bcd1e9517bb0cb8d0d5cde8935d565b635149e7955f526004601cfd5b90929180611d18575b50611d1391925061225d565b600190565b8335840180358160200135918260e01c6024600319840192019086604051611d41858585611ecc565b9060405215611da8575b50505050505060208401936001945b828610611d68575050611d07565b80358201806020013560e01c6024600319833501920190611d8c878484848d612b36565b15611da257505050602060019101950194611d5a565b88612227565b8383611db3936128dd565b15611dbf578086611d4b565b60809394507fffffffff0000000000000000000000000000000000000000000000000000000060405195633c74eed687525f876020015216856040015260608581015281858501528460a001370190601c01fd5b33906d1ff3684f28c67538d4d072c227343314611e2c57565b36601319013560601c9150565b60031115611e4357565b634e487b7160e01b5f52602160045260245ffd5b8092910391608083126100295760405190611e71826104f3565b60408294126100295760606040918251611e8a8161053f565b611e938261059a565b81526020820135602082015284528281013560208501520135910152565b3590811515820361002957565b359060ff8216820361002957565b919091611eda8284836123ae565b15611ee757505050600190565b636a92dacb8103611fef575081016101808282031261002957611f098261059a565b611f168260208501611e57565b91611f2360a08501611ebe565b91611f3060c08601611eb1565b9161012086013567ffffffffffffffff81116100295781611f52918801610682565b926101408701359267ffffffffffffffff841161002957875f98976001600160a01b0396611f89611fb696611fbc988d9c01610682565b926d1ff3684f28c67538d4d072c22734331494610160820135968a60e061010085013594013592166127e1565b926128bc565b16611fc681613c57565b82602083519301915af1611fd86132f3565b9015611fe75750611d13613cbe565b602081519101fd5b634150c86c81149291906310cd63431483171561222057810191610160828403126100295761201d8261059a565b9161202b8460208301611e57565b61203760a08301611eb1565b9460e083013560c084013561010085013567ffffffffffffffff81116100295783612063918701610682565b9261012086013567ffffffffffffffff81116100295761014091612088918801610682565b950135976001600160a01b03881696156120f9579463ffffffff946120c9945f9a948b9a99946120d3996d1ff3684f28c67538d4d072c227343314966127e1565b9260801c16613bed565b6020815191018273ba1333333333a1ba1108e8412f11850a5c319ba95af1611fd86132f3565b94919650969291946d1ff3684f28c67538d4d072c227343314936060890298808a046060149015171561220c5760608802978089046060149015171561220c578760801c15158960801c15158260801c15151717610baf575f9889986040610132966101159882519b8051988d81519b8c928c838101938380868801019787601c198a015260200191015e60200191015e60030183528b610131015381816020018c60f1015e518a60b1015e8989609d015288608801528760780152866068015285605801520160d1810184604401526020846024015263f83d08ba846004015201825215158160a801536121ec613b8d565b602081519101826d14aa86c5d3c41765bb24e11bd7015af1611fd86132f3565b634e487b7160e01b5f52601160045260245ffd5b5050505f90565b9291829160405194633c74eed68652856020015260e01b84604001526060848101528184608001528360a0013760840190601c01fd5b906001600160a01b03825116916001600160a01b036020820151169260408201519084158215026122e957612291856125d9565b908282106122e157856060959673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee18861b155f146122cd57506122c89250612693565b389039565b916122dc938111900391612633565b6122c8565b509084612610565b5050509050565b9190916001600160a01b038151166001600160a01b03602083015116604083015191811583150261236c57612324826125d9565b9583871061236457956060959615908418028318918073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee18861b155f146122cd57506122c89250612693565b868484612610565b505050509050565b9190820391821161220c57565b336d1ff3684f28c67538d4d072c22734036123a85760131936019036821161220c575f9190565b5f903690565b90919063c1fb425e8103612448575081019060c081830312610029576123d38161059a565b6123e08360208401611e57565b9160a08101359367ffffffffffffffff851161002957611d13946124049201610682565b90604051906124128261053f565b6001600160a01b0360208301915f835216825261242f845f612cd8565b90526d1ff3684f28c67538d4d072c2273433149261317d565b633036d6a6036125d35781019061010081830312610029576124698161059a565b6124768360208401611e57565b9160a081013567ffffffffffffffff81116100295784612497918301610682565b9360c08201359067ffffffffffffffff8211610029576124b8918301610682565b93602c8151106125c1578451608901938460891161220c5761257495601f196124f96124e388610630565b976124f1604051998a610577565b808952610630565b013660208801376d1ff3684f28c67538d4d072c2273433148251602001518760480152604083602001886068015e8660a801538051906020018660a9015e845181515186602801525f866014015285525191602083015192831990620f4240821061257a575b505060e00135926001600160a01b0316612d39565b50600190565b6001600160a01b039294506125b560e0926125b0856125ba94511691620f424003916bcd1e9517bb0cb8d0d5cde8935c90612ba9565b6135d7565b6135f0565b939161255f565b634e487b715f5260326020526024601cfd5b50505f90565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0382161860601b61260557504790565b61069d903090612ba9565b916054526034526014526f97a6f3b90000000000000000000000005f5260646010fd5b60105f60449260209582956014526034526fa9059cbb00000000000000000000000082525af115612683573d153d601f1060015f5114161715612676575f603452565b6390b8ec185f526004601cfd5b60405162ffffff163d5f823e3d90fd5b5f80809381935af115610bc157565b907f5ea1d46a000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000833581811690600485106127c0575b501614612708576127049161358a565b9091565b50506bcd1e9517bb0cb8d0d5cde8935c908160a01c60011615610029576b3a9113a02a267cff8bfd38516bb39834f1d3371754c5eae0a7905c905c90604051938460c00160405261276a6fffffffffffffffffffffffffffffffff8416613370565b5060e0855284602001526ce000000000000000000000000084600c01528064ffffffffff168460a0015260601c83608001526ca000000000000000000000000083606c015282604001525f82604c015260019190565b828092508560040360031b1b16165f6126f4565b9190820180921161220c57565b92989791909695939860608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c15151717610baf576040610132966101159882519c8d9881519981519b8c928c838101938380868801019787601c198a015260200191015e60200191015e600301835215158c610131015381816020018d60f1015e518b60b1015e5f8a609d015289608801528860780152876068015286605801520160d181018560440152602085602401526348c89491856004015201835215158260a80153565b60ff81166128d857506e04444c5dc75cb358380d2e3de08a9090565b61335d565b9291909263562e052c81146128f7579261069d935f613e71565b5060609150829081010312610029578035604082013590604051928160281c151582421117612b25576084359260206bcd1e9517bb0cb8d0d5cde8935c926129506fffffffffffffffffffffffffffffffff8716613370565b46600103612ac2577f11c311bbf9e46313a50034f62fc51e2fcb2bc140420484728aed15298e118e97905b604051957f549c17970871bfdfb0ff321bda3359ea022619d3d8bbae6929a36123a847fb258752868501527fda3359ea022619d3d8bbae6929a36123a847fb2500000000000000000000000086600c01528686604001527fffffffffffffffffffffffff00000000000000000000000000000000000000008816866060015280519084012085608001526119015f52825260a084206040526042601e205f528260ff1c601b01825201356040526001600160ff1b03166060526020600160805f825afa5190813d0215612ab5576040525f6060526b3a9113a02a267cff8bfd3851906bb39834f1d3371754c5eae0a79264ffffffffff169060601b17905d5d6bcd1e9517bb0cb8d0d5cde8935c74010000000000000000000000000000000000000000176bcd1e9517bb0cb8d0d5cde8935d604052600190565b638baa579f5f526004601cfd5b6040517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8665f527f574f8ba830fef8423e08e5c83d3cf7988b76ba736a1cb6cd4bd1ca02c0d16edc8452466040523060605260805f20906040525f6060529061297b565b5063cd21db4f5f526020526024601cfd5b9392919063562e052c8114612b4e5761069d94613e71565b50925060609150829081010312610029578035604082013590604051928160281c151582421117612b25576084359260206bcd1e9517bb0cb8d0d5cde8935c926129506fffffffffffffffffffffffffffffffff8716613370565b602460105f926020946014526f70a0823100000000000000000000000084525afa15610bc1573d601f1015610029575f5190565b602460105f926020946014526f7ecebe0000000000000000000000000084525afa15610bc1573d602011610029575f5190565b5f60446010602093604051956d1ff3684f28c67538d4d072c2273460345260601b85526fdd62ed3e00000000000000000000000084525afa15610bc1573d602011610029575f51906040521415901517612c6657565b63b78cb0dd5f526004601cfd5b5f6004601c602093633644e51584525afa15610bc1573d602011610029575f5190565b92919091604051935f528160ff1c601b016020526040526001600160ff1b03166060526020600160805f825afa511860601b3d1115612ab5576040525f606052565b91905191602083015192831991620f42408310612cf457505050565b6001600160a01b031615612d06575050565b61069d929350906125b06001600160a01b036125b593511691620f424003916bcd1e9517bb0cb8d0d5cde8935c90612ba9565b929491946001600160ff1b038611610baf579094905b602c8651119385602801948551938860010151908960040151958a60180151938b602c0197885180968d6001600160a01b0383166001600160a01b038716109788159684811888029160ff811680155f14612fb2575050936001600160a01b039160e495731f98431c8ad98523631ae4a59f267346ea31f984907fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e33995b62ffffff1691816040519684604052186020525f80521860601b600c521560051b6060035f2090836040525f5260205260405260ff600b536055600b20906040521694159760405197889383519384602001908660c4015e60a08560a401526001600160a01b0316846084015283606401528260440152878a301802301882602401526f128acb0800000000000000000000000082601001528060c40182520101604052816bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa2575081740400000000000000000000000000000000000000005f93849360e01b17176bcdccd5c65a7d4860ce3abbe95d8451908260208701915af1612f036132f3565b9015611fe757612f11613cbe565b604081805181010312610029576040602082015191015192604052821802185f03905f8212610baf578190612f8557507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd4602c91995101808652106125c15790945230601486015260288552909490612d4f565b98505093955050925050818410612f9a575050565b909150612610565b63ab7646c45f526020526024601cfd5b6001810361300c575050936001600160a01b039160e4957341ff9aa7e16b8b1a8a8dc4f0efacd93d02d071c9907f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2926323a69e7599612df2565b60028103613066575050936001600160a01b039160e49573baceb8ec6b9355dfc0269c18bac9d6e2bdc29c4f907fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e3399612df2565b602f81036130c0575050936001600160a01b039160e49573df62d9e51d7c08360dcd41931a2e6b97ff8c73e8907fd3e7f58b9af034cfa7a0597e539bae7c6b393817a47a6fc1e1503cd6eaffe22a9263fa461e3399612df2565b6031810361311a575050936001600160a01b039160e4957386641a77a1172c3ce65bce52ae91bdadef0f74c2907f62441ebe4e4315cf3d49d5957f94d66b253dbabe7006f34ad7f70947e60bf15c92632c8958f699612df2565b94955091939092506032036128d857506001600160a01b038f9160e494938b9173f4fd2e6c5b60c5b365cd1b96dd6245e6d60414c2907f3e77b70b9c4ce644601ed4aab19834375c6a9a2bca7adeb89a7bdd5fd8eb0a7d9263fa461e3399612df2565b9190925f14613259575161324c576020810151610baf57604081015142116132385760845f927fffffffffffffffffffffffffffffffffffffffff000000000000000000000000849351516bcd1e9517bb0cb8d0d5cde8935c60206001600160a01b0385511694015193604051948560800152846060015260601b83604c015260601b1681602c01526f15dacbea00000000000000000000000081600c0152601c01826d1ff3684f28c67538d4d072c227345af115610bc157565b63cd21db4f5f52604001516020526024601cfd5b63c321526c5f526004601cfd5b905f9291839260406bcd1e9517bb0cb8d0d5cde8935c91818051956330f28b7a8752818151886020015e602001866060015e8460a0015e6001600160a01b03168260e0015261010082810152805190816020019083610120015e6101240190601c01826e22d473030f116ddee9f6b43ac78ba35af115610bc157565b604051906132e2826104f3565b5f6040838281528260208201520152565b3d1561331d573d9061330482610630565b916133126040519384610577565b82523d5f602084013e565b606090565b6040519060a0820182811067ffffffffffffffff82111761050f576040525f6080838281528260208201528260408201528260608201520152565b63d3b1276d5f5260ff166020526024601cfd5b6fffffffffffffffffffffffffffffffff166381bf1000808204818082049181808085049606910660401b17910660801b1781830660c01b17806359e6038302602e1c79ffff000000000000ffff000000000000ffff000000000000ffff1663ffff49c002018061e38f0260151c7d07ff000007ff000007ff000007ff000007ff000007ff000007ff000007ff167e07ff000007ff000007ff000007ff000007ff000007ff000007ff000007ff008161e38f02600d1c160160dc02018060081c9072ffffff00000000000000000000000000ffffff75ffffffff000000000000000000000000ffffffff00007effffffffff000000ff00000000000000ffffffffff000000ff00000000000084167affffff00000000000000000000000000ffffff000000000000000084161760101c9316911617177bffffffffffffffffffffffffffffffffffffffff00000000000000008160201c16906bffffffffffffffffffffffff1617910460c01b179060078260881c1e610100030160031c6012810190605360405194838652807f76767676767676767676767676767676767676767676767676767676767676760160071c7f010101010101010101010101010101010101010101010101010101010101010116602702017f3030303030303030303030303030303030303030303030303030303030303030019160110160031b1b189060031b610100031b826020015281604001604052565b600490911015903560e01c6367c4a3b0140290606082156135d1575060405190816040016040526020825273352650ac2653508d946c4912b07895b22edd84cd8260200152565b5f925090565b905f19818309910290818082109103035f526020525f90565b8051906020015181156136405781620f424080620f423f197fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399509830890828211900360fa1b910360061c170290565b620f424091500490565b5f5160205181156136405781620f424080620f423f197fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399509830890828211900360fa1b910360061c170290565b1561369f57565b634e487b7160e01b5f52600160045260245ffd5b90929194935f90604051938460c0015f8152610300386101e08801396104e086016040526136e7828a873560601c846154d0565b918287528287602001528660400199838b5287608001528660a001529495369436935f936020015173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145f146137695761373f906001600160a01b03163014613698565b9851620f42404760148c013560e81c0204905260161901976017015b6137658982613abf565b9796565b6001600160a01b03163081036137ae5750620f42406016196017836014013560e81c930193019a51916137a0308460200151612ba9565b80151590030204905261375b565b935094509750506137c0915015613698565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff48101908060550135600116908681016002198082013560e81c80920301916075019782891161002957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff889103019761375b565b906020820135918219620f4240811061384c575050565b90919250620f42400390356001600160a01b03811680910361002957613880906bcd1e9517bb0cb8d0d5cde8935c90612ba9565b905f19818309910290818082109103035f5260205261069d61364a565b95919491929073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0388161860601b6138db575050505050905061069d8133612693565b866014526ff9b6a7960000000000000000000000005f525f806024601082335af115610bc1576001600160a01b0316300361394c575050505061391f903383612633565b6014526f12e103f10000000000000000000000005f5260105f60248282335af115610bc1575f5160801c90565b61397c9491613974610dd592604051946139658661053f565b33865260208601523690611e57565b93369161064c565b61391f565b6040015180511561398f5750565b8063fb772a8860249252601c01fd5b9190939293813592836001948060f81c91826139c1575b50505050508101920390565b95839496613a06945180604001805115613aa8575b5050818411613a2d575b50601491925001948360800151906001600160a01b038560a001519360581c16906154d0565b9081815260400151809114613a1e57808080806139b5565b8063784cb7b860249252601c01fd5b85602001938451805115613a98575b5060028103613a5757505060149192855190525b82916139e0565b60149350613a69919250600314613698565b8582013592613a9160159287608001516001600160a01b038960a001519260581c168b6154d0565b9052613a50565b613aa2908a613f1c565b5f613a3c565b898051850180825260051b01918252525f806139d6565b5062ffffff106125c157565b905f8212613ad7575090565b80634c085bf160249252601c01fd5b905f8213613af457505f0390565b80633351b26060249252601c01fd5b805115613b105760200190565b634e487b7160e01b5f52603260045260245ffd5b908215613b7057604051926038526028528073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1860601b151502601452633ccfd60b5f525f80603c601c82335af11561095d57604052565b506014526fcbf0dbf50000000000000000000000005f5260246010fd5b6d14aa86c5d3c41765bb24e11bd7016bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa25750740300000000000014aa86c5d3c41765bb24e11bd7016bcdccd5c65a7d4860ce3abbe95d565b73ba1333333333a1ba1108e8412f11850a5c319ba96bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa2575060e01b7406ba1333333333a1ba1108e8412f11850a5c319ba9176bcdccd5c65a7d4860ce3abbe95d565b806bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257506001600160a01b03167f91dd734600000000000000050000000000000000000000000000000000000000176bcdccd5c65a7d4860ce3abbe95d565b6bcdccd5c65a7d4860ce3abbe95c80613cd45750565b63d66fcc385f526020526024601cfd5b9591949392906001600160a01b03163003613d45575050505080613d35575b6034526014526f15afd4090000000000000000000000005f5260205f6044601082335af115612683575f515f60345290565b613d40813384612633565b613d03565b610dd5613d409461397460405193613d5c8561053f565b3385528860208601523690611e57565b919060601b908315610fc757604051936060526040528073777777777777777777777777777777777777777760611b141502602c5260601b600c525f806064601c82335af11561095d575f606052604052565b93959290949194613dd08533613e2c565b6001600160a01b03163003613e0a57505050613dee92503390612633565b6311da60b45f5260205f6004601c82335af115610bc1575f5190565b613e27959492935090613974610dd592604051946139658661053f565b613dee565b602460105f80949381946014526fa584119400000000000000000000000082525af115610bc157565b6004601c6020935f936311da60b485525af115610bc1575f5190565b50909291604051613e83828685613f52565b906040525f14613e965750505050600190565b839163bd01c2268103613ef157506040925081010312610029576020813591013590804211613ee15750803411613ecd5750600190565b634a0944315f52602052346040526044601cfd5b63cd21db4f5f526020526024601cfd5b90915063131ad4280361222057826020918101031261002957613f16611d1392611eb1565b906122f0565b906040019081519182613f2e57505050565b5f905280515f198101825260051b01818103613f48575050565b5180825260400152565b9080929163d92aadfb81145f1461430c5750016101208282031261002957613f798261059a565b613f868260208501611e57565b613f9260a0850161059a565b9260c08501359167ffffffffffffffff831161002957613fb75f939284938801610682565b6001600160a01b03610100613fce60e08a0161059a565b980135961660405190613fe08261053f565b6001600160a01b0360208301978689521682526140f96140008583612cd8565b808952826140676001600160a01b0388515116604051906140208261055b565b815283602082015282604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9b6140d88c6001600160a01b036bcd1e9517bb0cb8d0d5cde8935c6040519261408f8461055b565b8286168452602084015216604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9b6140e33083612ba9565b8181111590821802811880940204809b52612633565b6040805192614109608085610577565b6058845261423760208501947f436f6e73696465726174696f6e286164647265737320746f6b656e2c75696e7486527f32353620616d6f756e742c6164647265737320636f756e74657270617274792c848201527f626f6f6c207061727469616c46696c6c416c6c6f7765642900000000000000006060820152603c8451614192606082610577565b602e815260208101907f546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c7582527f696e7432353620616d6f756e74290000000000000000000000000000000000008782015286519889947f436f6e73696465726174696f6e20636f6e73696465726174696f6e290000000060208701525180918587015e840190838201908d8252519283915e010189815203601f198101865285610577565b8180519663137c29fe8852818151896020015e602001876060015e8560a0015e8360e00152868361010001526101408361012001528051908161016001846101400152816020019084610160015e8151918260200190828501610180015e016101840190601c01826e22d473030f116ddee9f6b43ac78ba35af115610bc1576fffffffffffffffffffffffffffffffff917f49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a75982765f526020526040519260405260605f2092604052166010525f5260305fa0600190565b638d68a15681036143d45750016080828203126100295761432c8261059a565b9060208301359060408401359067ffffffffffffffff821161002957614353918501610682565b9160408351106125c1576013198351019260140180519381526143a16040519461437e606087610577565b602886526040366020880137808660280152308660140152602886523090612ba9565b80151580820394808602958604149114171561220c576001600160a01b03620f4240606061257497013594049216612d39565b63103b48be8103614585575060c09181010312610029576143f48161059a565b906144016020820161059a565b9160408201356144136060840161059a565b9260808101359062ffffff82168203610029576001600160a01b0360a08192013596169416945f928061455b575b50630902f1ac5f5260405f6004601c895afa15610bc15760403d106100295760018083161415928360051b956127108751928860201895848b8851958415801561454d575b61452e575b50505061ffff9060081c168203029202820191821561451a570204928184106144fc5750505f9491936001600160a01b0360a49487966020889586826040519763022c0d9f89528801015285010152168160600152608081810152818160a00152601c01915af115610bc157600190565b9061451587859363dfec36260263d21220a718906159fa565b612610565b634e487b7160e01b5f52601260045260245ffd5b61ffff9394506145429291610c9d91612ba9565b919050848b5f61448b565b5060018085811c1614614486565b620f424091935061456c3087612ba9565b801515900302049161457f838787612633565b5f614441565b6338c9c14781036145f25750019060a081830312610029576145a68161059a565b906145b36040820161059a565b90608081013567ffffffffffffffff811161002957611d13946145d7918301610682565b9260206001600160a01b036060840135941692013590615530565b635f80abae81036146c8575060a09181010312610029576146128161059a565b9061461f6020820161059a565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1491604081013583156146b457475b818111614660575b505050505050600190565b620f424091606083608086013584020494013591030204818111159082180218915f1461469c575061469191612693565b5f8080808080614655565b6001600160a01b036146af931690612633565b614691565b6146be3084612ba9565b801515900361464d565b90506368f5ee258103614768575081019061012081830312610029576146ed8161059a565b6146f96020830161059a565b9161470660608201611ebe565b9161471360808301611eb1565b9460e08301359167ffffffffffffffff8311610029575f96879685614748611fb695611fbc976001600160a01b039901610682565b926101008201359460c08301359389604060a0860135950135921661582f565b63fd8c38e1811492636c5f9cf9821492909183851763f61460f9821417156148e45750810161010082820312610029576147a18261059a565b936147ae6020840161059a565b60408401356147bf60608601611eb1565b9160808601359360a08701359560c088013567ffffffffffffffff81116100295760e0916147ee918a01610682565b970135976001600160a01b038a16911561481f57509463ffffffff946120c9945f9a9893948b9a956120d39961582f565b91985090156148ca57966148329761577c565b73e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4446bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f80917fb45a3c0e0000000000000001e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4446bcdccd5c65a7d4860ce3abbe95d6020815191018273e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4445af1611fd86132f3565b916148dc9593915f988998969461577c565b6121ec613b8d565b90925081935063736180c881145f14614acb575060c091810103126100295761490c8161059a565b9061491960408201611eb1565b9160608201356080830135936001600160a01b03851693848603610029578060206149b06001600160a01b0373ce355440c00014a229bbec030a2b8f8eb45a28978161496b60a0620f4240980161059a565b9916991415737a7916044b0f6e1563f1ff4cb7db270f0b85f58f0273dac17f958d2ee523a2206206994597c13d831ec718169687811886150280981897309118612ba9565b801515900391013502049015614a495763fae036d55f5260205f6004601c885afa15610bc157601f3d111561002957620f4240670de0b6b3a76400005f51019102049181831061451557505060105f60209481946044946034526014526f8d7ef9bb00000000000000000000000082525af115614a30575f603452600190565b6040516bffffffffffffffffffffffff163d5f823e3d90fd5b9092816034959395526014526f959912760000000000000000000000005f5260205f6044601082865af115614a30575f6004601c620f4240670de0b6b3a76400006020958560345202049463568d4b6f84525afa15610bc157601f3d111561002957670de0b6b3a76400005f5182020490039181831061451557505050600190565b639b59756f8103614c7f575060e0918101031261002957614aeb8161059a565b90614af86020820161059a565b916040820135906060830135926001600160a01b0384169384810361002957614b2360808301611eb1565b9560a0830135928360030b8094036100295760c00135948015614c2157918697614b6c60409593620f42405f96614b5d9b9a9b3084612ba9565b801515900302049a8b91612633565b6001600160a01b03602096865192614b848985610577565b868452601f198901368a860137875195845194858b01908860e4015e60c08760c401528660a4015286866084015215159a8b866064015285604401521683602401526f3eece7db00000000000000000000000083601001528060e40183528201610120018452828251928601915af115610bc1575192828410614c0a5750505050600190565b90614515916350a2884b02630fc63d1018906159fa565b5085614c2f91969596612ba9565b91604051631865c57d5f52610120816004601c865afa15610bc157871560051b0151918260801c3d6101201117610029576040936fffffffffffffffffffffffffffffffff5f9416900397614b6c565b905063670335be8103614f5a5750810190808203610160811261002957614ca58261059a565b60e0603f19614cb66020860161059a565b9301126100295760405191614cca83610523565b60408401358352614cdd6060850161059a565b602084015260808401356040840152614cf860a0850161059a565b94606084019586526080840160c0860135815260a085019060e0870135825260c0860196610100810135885261012081013567ffffffffffffffff8111610029578101906040828603126100295760405194614d538661053f565b82359267ffffffffffffffff841161002957614d76602092610140958301610682565b875201356020860152013590614d8c3086612ba9565b90519081811115908218028118809351020497818910614f485750506040519373bbbbbbb520d69a9775e85b458c58c648259fad5f6040523060601b602c526fdd62ed3e000000000000000000000000600c5260205f6044601c875afa15614f3f573d602011610029575f958695865190604052838110614ef3575b506001600160a01b036bcd1e9517bb0cb8d0d5cde8935c9260405196634dcebcba885283518860200152308860400152604084602001896060015e82168760a0015260608381018860c0015e1685610120015260c00151908160f81c9060601b1784610140015260801b8361016001526101a0836101800152826101a001526040826101c001528060200151826101e0015251805190816020019083610200015e6102040190601c018273bbbbbbb520d69a9775e85b458c58c648259fad5f5af115610bc1576fffffffffffffffffffffffffffffffff8091511691166010525f5260305fa0600190565b614f1c575b614f1673bbbbbbb520d69a9775e85b458c58c648259fad5f86615932565b5f614e08565b614f3a73bbbbbbb520d69a9775e85b458c58c648259fad5f866158e2565b614ef8565b843d5f823e3d90fd5b906001600160a01b0389925116612610565b63ca9e5d0f810361504f57508160c0918101031261002957614f7b8161059a565b90614f886020820161059a565b9060408101356060820135916001600160a01b038316928381036100295760105f6024926001600160a01b038560209760a0614fc76080879a01611eb1565b9201359a8a82615028575b50505015991660145288156360f3e02e0263bd6015b41860601b82525af115610bc157601f3d1115610029575f51928284106150115750505050600190565b9061451591639e9dfd6c02634a248d2a18906159fa565b620f42406150479361503a3085612ba9565b8015159003020491612633565b5f808a614fd2565b91929163b8df6d4d810361531357508260a09181010312610029576150738261059a565b60408301356001600160a01b03811691828203610029576150c261509960608701611eb1565b91620f424060808801359760206150b03085612ba9565b8015159003910135020494859161570a565b156153075763ffa642255f5260405f6004601c845afa15610bc157603f3d1115610029575f516020516317be952e5f5260205f6004601c865afa15610bc157601f3d1115610029575f518060081c6100295760ff1661512081611e39565b63796da7af5f5260205f6004601c875afa15610bc157601f3d1115610029575f519063eab5d20e5f5260205f6004601c885afa15610bc157601f3d1115610029575f5163ec2fd46d5f5260205f6004601c895afa15610bc157601f3d111561002957865f51936ec097ce7bc90715b34b9f100000000004926151a181611e39565b600281036152d1575050637c9b8e895f5260205f6004601c895afa15610bc157601f3d1115610029575f51948585038089116152a85750505083670de0b6b3a7640000809592818981950191848303020495800204029080820491061515018202049083030102045b63c0ffa1785f5260205f6004601c855afa15610bc157601f3d1115610029575f5163ab44a7a35f5260205f6004601c865afa15610bc157601f3d111561002957670de0b6b3a764000080915f5101019102049380851061527057509261257492936159b8565b60205f6004601c8895634a248d2a84525afa15610bc157601f3d1115610029575f518060a01c610029576001600160a01b0316612610565b670de0b6b3a76400009296506152c79493919550880302048380615a1e565b810391030161520a565b615300955091670de0b6b3a7640000919693926152ed81611e39565b1515908418028318958692020491615a1e565b900361520a565b90612574929391615976565b9192916342032aef036125d357819281601f1993018435908560200135866040013590878787018184019489868035968486606001359687019c8d86039e8f019f861090608011178b158c60401c171788158960a01c171791111792030160051c85118515171791111782873518178860051c831117610029576153c59060409796975198886020018a60a4013780896044015263a04c36b289600401526064870189526084878a01016040526125d9565b8760840152612000603f840484010195603f195f960190886024019189606401908a602001957fa04c36b2000000000000000700000000000000000000000000000000000000003017995b8060051b90602086830101359184831161002957836020916001946080018a52010135855201938685145a306bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f8f8c8f8380938f926bcdccd5c65a7d4860ce3abbe95d51923090888882180218f180156154bc57615497613cbe565b6154a8578d1117610bc15793615410565b505050505050505050505092505050600190565b5f6bcdccd5c65a7d4860ce3abbe95d615497565b919392610300916001600160a01b031694850906019161012083019261014081019081519081610160858218920151170261551c5750811561550f5752565b63ad1991f55f526004601cfd5b639a62e8b45f52602052506040526044601cfd5b9291906001600160a01b038216936e22d473030f116ddee9f6b43ac78ba385146d1ff3684f28c67538d4d072c2273486141773bbbbbbb520d69a9775e85b458c58c648259fad5f8614176104e6575f906001600160a01b0381169073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee820361567c57505050620f424090470204938051155f146156025750506155da575f80809381935af16155d16132f3565b9015611fe75750565b7f01da1572000000000000000000000000000000000000000000000000000000005f5260045ffd5b9093926020830180841161220c578251106125c157835f9460208695850101525b602083519301915af16156346132f3565b9015611fe75751159081615672575b5061564a57565b7f82d5d76a000000000000000000000000000000000000000000000000000000005f5260045ffd5b90503b155f615643565b9091949282979497155f1461569b575050506155da575f928392615623565b6156aa96939592963083612ba9565b8015159003905f19818309910290818082109103035f526020526156cc61364a565b6020860180871161220c578551106125c15787845f988360208b9a8a010152036156f9575b505050615623565b6157029261570a565b5f80876156f1565b60405192826040523060601b602c526fdd62ed3e000000000000000000000000600c5260205f6044601c855afa15615773573d602011610029575f5193604052831061575557505050565b6157629261576457615932565b565b61576e82826158e2565b615932565b833d5f823e3d90fd5b92939095949796919760608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c1515620f42408c11171717610baf5760d49660405199875180986020018a8d015e8a60b401528960b101523089609d015288608801528760780152866068015285605801526070820185604401526020856024015263f83d08ba856004015260b48201855215158460a80153830101604052565b92939095949796919760608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c1515620f42408c11171717610baf5760d49660405199875180986020018a8d015e8a60b401528960b101523089609d01528860880152876078015286606801528560580152607082018560440152602085602401526348c89491856004015260b48201855215158460a80153830101604052565b604460105f8093602095601452816034526f095ea7b300000000000000000000000082525af115612683573d153d601f1060015f5114161715615925575f603452565b633e3f8f735f526004601cfd5b604460105f809360209560145281196034526f095ea7b300000000000000000000000082525af115612683573d153d601f1060015f5114161715615925575f603452565b6084905f809360209560405191638dae73338352828801528160400152606081810152818160800152601c01915af115610bc157601f3d1115610029575f5190565b6084905f80936020956040519163e67ce7068352828801528160400152606081810152818160800152601c01915af115610bc157601f3d1115610029575f5190565b6004601c5f9260209484525afa15610bc1575f51908160a01c3d6020111761002957565b670de0b6b3a76400008481039594820281900490910292828404019185020480828110615aaf57500392600191670de0b6b3a7640000905b8260021b02048480020193600185811c019185925b838110615aa05750670de0b6b3a76400009394955060011b935f14615a9957015b0290808204910615150190565b9003615a8c565b9250828604830160011c615a6b565b91905003670de0b6b3a76400005f92949194615a56565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0382161860601b615af8575061069d8133612693565b60405191826044015281602401526f0c11dedd00000000000000000000000081601001526044815280606401604052336bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f80917f599d07140000000000000002000000000000000000000000000000000000000033176bcdccd5c65a7d4860ce3abbe95d60208151910182335af1615b996132f3565b9015611fe757615ba7613cbe565b602001519056","recompiledBytecode":"0x6080604052600436101561002f575b361561002d5734610029576100216106b6565b602081519101f35b5f80fd5b005b5f3560e01c806306b8524c146100dc5780631fff991f14610076576370a082310361000e57346100295760206003193601126100295761006d6106a0565b505f805360015ff35b60a06003193601126100295761008b366105ae565b6064359067ffffffffffffffff8211610029576100d26100cc6100b460209436906004016105ff565b906100bd611e13565b946100c786611c75565b611cfe565b91611cca565b6040519015158152f35b60c0600319360112610029576100f1366105ae565b60643567ffffffffffffffff8111610029576101119036906004016105ff565b60a43567ffffffffffffffff811161002957610131903690600401610682565b9161013a611e13565b9261014484611c75565b6d1ff3684f28c67538d4d072c2273433036104e65781358201803560a4118415176100295760440135906bcd1e9517bb0cb8d0d5cde8935c918151826020015160f81c83600101915f1901825261019a81611e39565b806103285750516080908301839003126100295760218201516041830151926001600160a01b036081606183015192015193169260205f60e4604051846001600160ff1b03168160d40152858160b401528460ff1c601b0181609401528881607401528681605401526d1ff3684f28c67538d4d072c2273481603401528960601b818501526fd505accf000000000000000000000000815260100182885af1601f3d1160015f5114161615610260575b5050505050506100d2916100cc91602095611cfe565b84979599939694421161031b5789604288610310956100d29b61029e60209f61028c906100cc9e612bdd565b9361029985858984612c10565b612c73565b92604051936119018552602085015283604001927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528685606001526d1ff3684f28c67538d4d072c2273485608001528460a001525f19018360c001528260e0015260c081209052601e0120612c96565b95829482948961024a565b631a15a3cc5f526004601cfd5b91929161033481611e39565b600181036104c457505160a0908201829003126100295760218101516041820151916061810151938415158095036100295760205f6101046001600160a01b0360a1608187015196015194169560405190856001600160ff1b03168260f40152868260d401528560ff1c601b018260b4015289826094015288826074015281605401526d1ff3684f28c67538d4d072c2273481603401528960601b818501526f8fcbaf0c000000000000000000000000815260100182875af1601f3d1160015f5114161615610413575050505050506100d2916100cc91602095611cfe565b8396949795999315158742110261031b578960426100cc98856100d29b61045260209f610443906103109a612bdd565b9261029984845f038984612c10565b92604051936119018552602085015283604001927fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb84528685606001526d1ff3684f28c67538d4d072c2273485608001525f19018460a001528360c001528260e0015260c081209052601e0120612c96565b600281118063b7e59b040263f9ade075185f526021821802186020526024601cfd5b63e758b8d55f526004601cfd5b6060810190811067ffffffffffffffff82111761050f57604052565b634e487b7160e01b5f52604160045260245ffd5b60e0810190811067ffffffffffffffff82111761050f57604052565b6040810190811067ffffffffffffffff82111761050f57604052565b6080810190811067ffffffffffffffff82111761050f57604052565b90601f601f19910116810190811067ffffffffffffffff82111761050f57604052565b35906001600160a01b038216820361002957565b600319606091011261002957604051906105c7826104f3565b816004356001600160a01b03811681036100295781526024356001600160a01b03811681036100295760208201526040604435910152565b9181601f840112156100295782359167ffffffffffffffff8311610029576020808501948460051b01011161002957565b67ffffffffffffffff811161050f57601f01601f191660200190565b92919261065882610630565b916106666040519384610577565b829481845281830111610029578281602093845f960137010152565b9080601f830112156100295781602061069d9335910161064c565b90565b600435906001600160a01b038216820361002957565b60606bcdccd5c65a7d4860ce3abbe95c90813318811b825f351860e01c1715809260a01c61ffff160291611c61575b6106ed612381565b91909280155f1461070c575050610703916126a2565b90156100295790565b83600401909283600314611821578360061461130f5783600514610de05783600414610d1c575082600714610c5f575081600114610790575060021461076057634e487b7160e01b5f52605160045260245ffd5b80604461077592013590602433910135612633565b604051610783602082610577565b5f80825236602083013790565b916107fa9150606460448201359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b6001600160a01b0397939195969497309116036100295761081c9330936136b3565b5050505093919490806040019583875190610c48575b8051607f1c610baf575194828a0195865261084c83613981565b906108556132d5565b9060208201918b8560408301955b8b6030861015610a47575050505050505050855195866020015196519561088b835182613f1c565b8260200151805115610a37575b50805191826109c0575b5050505180602001519051968088106109b957506108c69187916303a65ab6613d6c565b1561098157509081159081156108fc575b5050505b60405182819382526020828101526020826040015201528060800160405290565b841b9061096557604051918452306040528073777777777777777777777777777777777777777760611b141502602c526f03a65ab6000000000000000000000000600c525f806064601c82335af11561095d575f83526040525f80806108d7565b3d5f823e3d90fd5b6020526fcbf0dbf50000000000000000000000005f5260246010fd5b5181811461099c579061099692910390615ac6565b506108db565b826014526ffb772a880000000000000000000000005f5260246010fd5b8791612610565b6109c982613b03565b5190518103610a11575b5060015b828110156108a25780610a0b6109fe6001938560209160051b010151908160200151915190565b9030906303a65ab6613d6c565b016109d7565b60208101519051610a319130906001600160a01b03166303a65ab6613d6c565b5f6109d3565b610a419082613f1c565b5f610898565b60405f610a6d848a953560e81c94600f600e19836003013560a01c9c019201908861399e565b9890966280000087602001956001600160a01b03875199620f42408b51627fffff851602049a602001519051602001519080861b90838084891b92169316918082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159a838383188d0280941816905218168073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028b528d601f198b6020019d019a359052610b298a8d613abf565b16158314610bcc5760e4918451918483528a836020015e87826080015286158260a001528160c00152828160e00152601c0182335af115610bc1575f5192610b8160205194935b848618029485935193849118613acb565b9180519083820390528211911117610baf57610ba38851809381519318613ae6565b01905291858d91610863565b634e487b715f5260116020526024601cfd5b6040513d5f823e3d90fd5b610104918451916f101e8952000000000000000000000000835260148b8701846020015e8a836034015e87826094015286158260b401528160d40152828160f4015260100182335af115610bc1575f51926020518080600f0b188580600f0b18178280600f0b183d604011171761002957610b81909493610b70565b610c588160200151825190615ac6565b8152610832565b909291503581016004810135610c736132d5565b5f92602481015b838510610cbf5750505050506044610ca26064830135610c9d60248501356125d9565b612374565b9101358110610caf575090565b63a55fee2e5f526020526024601cfd5b60048135830101604081013560e01c60446003196020840135019201908260401c9283158091029390610d08575b610d0257505050602060019101940193610c7a565b87612227565b50610d16868484848c613e71565b15610ced565b6080919293506003190110610029573560448301358301906024820135831c9360245f83131591013582180218913084145f14610d65576107759350603833920135901c612633565b5090610d74610ddb9315613698565b60405190610d818261053f565b3382526020820152610d9636602c8401611e57565b90610dd560ac84013560f81c93369060ad7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff77600483013501910161064c565b9161317d565b610775565b505091610e5d91508060446024610e509301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b95869391979894986136b3565b968c868060409d959896979d99949901518c8b8b8b8b8a306001600160a01b038716036112ff575b6112e1575b5050505050908d9493929151910152610ea285613981565b908d85610ead613322565b92610eb66132d5565b945b603582101561110a575050935050505060400151968760200151975199610ee0845182613f1c565b83602001518051156110fa575b508051908161107b575b50508251806020015190519b808d106110745750610f1b918c91630b0d9c09613d6c565b15610ff85750505050508215918215610f54575b5050505060405182819382526020828101526020826040015201528060800160405290565b6001600160a01b03163003610fe45730905b851b91610fc7576040519285526040528073777777777777777777777777777777777777777760611b141502602c526f0b0d9c09000000000000000000000000600c525f806064601c82335af11561095d575f83526040525f808080610f2f565b506020526fcbf0dbf50000000000000000000000005f5260246010fd5b6bcd1e9517bb0cb8d0d5cde8935c90610f66565b89969294969591939501519680880397146110585773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03821618891b61104d57505050505050610996906110475f33613e2c565b33613e55565b906109969691613dbf565b6014526ffb772a880000000000000000000000005f5260246010fd5b8c91612610565b61108481613b03565b51856040015181036110d4575b5060015b8281106110a25750610ef7565b806110ce6110c16001938560209160051b010151908160200151915190565b903090630b0d9c09613d6c565b01611095565b602081015190516110f49130906001600160a01b0316630b0d9c09613d6c565b5f611091565b6111049082613f1c565b5f610eed565b5f620f4240948761121e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe66111698661122d9d60176016196001600160a01b039b60209b3560e81c98604086600301358c1c910152019201908b61399e565b888c8b8a959495019b8c518b015190518b0151918b828b1b848c1b8082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159d8e858518028095181691015218168c526001600160a01b0383358d60408260e81c9101528d8862ffffff8360d01c1660020b91015260301c1660808d01520190601a01919091803560e81c6002198160038185820195010195030192565b93839d85949b9293809f613abf565b88158d5289515102048503868c01526040519363f3cd914c85528a518073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028588015260808b8801866040015e8b8560c0015e61012084810152818461014001528361016001376101440190601c0182335af115610bc1575f51906112c182600f0b9260801d600f0b918383180293519184835191185f0390612374565b90526112d38851809381519318613acb565b019052858f91948e95610eb8565b6112f394866020015190875191613dbf565b81528c8b8b8b8b610e8a565b61130882613835565b8752610e85565b5050905061138e915061137f611323612381565b90919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b958693919598979994996136b3565b9697919492939a90958a84604001998a518c8b8b8b8b8a306001600160a01b03871603611811575b6117f3575b505050505051868301526113ce86613981565b6113d6613322565b925f604051936113e585610523565b8185528160208601528160408601528401525f60808401525f60a08401528d60c08401525b60048110156115e25750505050875197886020015198519b61142d855182613f1c565b84602001518051156115d2575b508051918261155b575b50505082518c816020015191519d8e106115545750611469918d9163ae639329613d6c565b1561152b575050505050831591821561149a575b50505050505b604051906020825281602001528060400160405290565b6001600160a01b031630036115175730905b831b91610fc7576040519383526040528073777777777777777777777777777777777777777760611b141502602c526fae639329000000000000000000000000600c525f806064601c82335af11561150e575f90526040525f8080808061147d565b503d5f823e3d90fd5b6bcd1e9517bb0cb8d0d5cde8935c906114ac565b909396999897999591949295015198808a1461099c5761154e9798990391613ce4565b50611483565b8d91612610565b61156482613b03565b51905181036115ac575b5060015b8281101561144457806115a66115996001938560209160051b010151908160200151915190565b90309063ae639329613d6c565b01611572565b602081015190516115cc9130906001600160a01b031663ae639329613d6c565b5f61156e565b6115dc9082613f1c565b5f61143a565b813560e81c90620f424082623fffff1611610baf578f928f9360021961160e930191600301908a61399e565b9092818462c00000851661173c5750506116908461169c949535831c8760200152620f42408b602001966001600160a01b038851602001511660408a01526001600160a01b038d516020015116858a015287515102046080880152601319604051940190601401919091803560e81c6002198160038185820195010195030192565b9692959196369161064c565b60c08701526116ab8585613abf565b60405190603f19870190815190601f198901938451632bfb780c8552602086528a60c00195875f8d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc60448b805184815191038092520101910182335af115610bc157602051946040519652526040525190815103905261172f8b519182516127d4565b9052526040525b9061140a565b93926117489195613abf565b6240000082166117d0575f60208701526001600160a01b038951602001511660408701525b620f4240623fffff8a602001931683515102048187015260405191601f198701928351926343583be585525f60a46003198b0182335af11561095d57602051926040519452604052519081510390526117c988519182516127d4565b9052611736565b600160208701526001600160a01b0389602001516020015116604087015261176d565b61180594866020015190875191613ce4565b81528c8b8b8b8b6113bb565b61181a82613835565b87526113b6565b50509161189f915080606460446118919301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b9695879391969894986136b3565b9699929398909585604096939601519a306001600160a01b038616149b838d15611c51575b611c35575b8051607f1c610baf5751848f01528d906118e285613981565b91846118ec6132d5565b935b8d6030841015611a565750509250505060400151978860200151985199611916845182613f1c565b8360200151805115611a46575b50805190816119d1575b505082518c816020015191519d8e10611554575061194c918d91613b24565b156119ac57505050505050816119805750505060405182819382526020828101526020826040015201528060800160405290565b6119909215611998573090613b24565b5f80806108d7565b6bcd1e9517bb0cb8d0d5cde8935c90613b24565b909193959294969a9980999850015199808b1461099c576109969798999a039161389d565b6119da81613b03565b5185604001518103611a25575b5060015b8281106119f8575061192d565b80611a1f611a176001938560209160051b010151908160200151915190565b903090613b24565b016119eb565b60208101519051611a409130906001600160a01b0316613b24565b5f6119e7565b611a509082613f1c565b5f611923565b60205f611a7c8489953560e81c94600f600e19836003013560a01c9a019201908861399e565b97909662800000878501956001600160a01b03875199620f42408b51627fffff851602049a88015190518801519080871b908380848a1b92169316918082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159a89848d858518028095181691015218168073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028c52601f198a87019b01993560408d0152611b388a8c613abf565b16158314611bc757608491604051918715601f1b83608001528883607c015282606c01528a8286015e828152601c0182335af115610bc1575f51928080600f0b1861002957611b9a84600f0b9460801d93848618029485935193849118613acb565b9180519083820390528211911117610baf57611bbc8751809381519318613ae6565b019052848f926118ee565b60a491604051918715601f1b836094015288836090015282608001528a826034015e60148a6040018286015e6f101e8952000000000000000000000000815260100182335af115610bc1575f51928080600f0b183d6040111761002957611b9a84600f0b9460801d93610b70565b611c4a8a8a8a8a85602001518b87519161389d565b81526118c9565b611c5a88613835565b82526118c4565b5f6bcdccd5c65a7d4860ce3abbe95d6106e5565b8060601b156104e6576bcd1e9517bb0cb8d0d5cde8935c8060601b611cae57506001600160a01b03166bcd1e9517bb0cb8d0d5cde8935d565b6014526f7407c0f80000000000000000000000005f5260246010fd5b6bcd1e9517bb0cb8d0d5cde8935c1860601b611cf1575f6bcd1e9517bb0cb8d0d5cde8935d565b635149e7955f526004601cfd5b90929180611d18575b50611d1391925061225d565b600190565b8335840180358160200135918260e01c6024600319840192019086604051611d41858585611ecc565b9060405215611da8575b50505050505060208401936001945b828610611d68575050611d07565b80358201806020013560e01c6024600319833501920190611d8c878484848d612b36565b15611da257505050602060019101950194611d5a565b88612227565b8383611db3936128dd565b15611dbf578086611d4b565b60809394507fffffffff0000000000000000000000000000000000000000000000000000000060405195633c74eed687525f876020015216856040015260608581015281858501528460a001370190601c01fd5b33906d1ff3684f28c67538d4d072c227343314611e2c57565b36601319013560601c9150565b60031115611e4357565b634e487b7160e01b5f52602160045260245ffd5b8092910391608083126100295760405190611e71826104f3565b60408294126100295760606040918251611e8a8161053f565b611e938261059a565b81526020820135602082015284528281013560208501520135910152565b3590811515820361002957565b359060ff8216820361002957565b919091611eda8284836123ae565b15611ee757505050600190565b636a92dacb8103611fef575081016101808282031261002957611f098261059a565b611f168260208501611e57565b91611f2360a08501611ebe565b91611f3060c08601611eb1565b9161012086013567ffffffffffffffff81116100295781611f52918801610682565b926101408701359267ffffffffffffffff841161002957875f98976001600160a01b0396611f89611fb696611fbc988d9c01610682565b926d1ff3684f28c67538d4d072c22734331494610160820135968a60e061010085013594013592166127e1565b926128bc565b16611fc681613c57565b82602083519301915af1611fd86132f3565b9015611fe75750611d13613cbe565b602081519101fd5b634150c86c81149291906310cd63431483171561222057810191610160828403126100295761201d8261059a565b9161202b8460208301611e57565b61203760a08301611eb1565b9460e083013560c084013561010085013567ffffffffffffffff81116100295783612063918701610682565b9261012086013567ffffffffffffffff81116100295761014091612088918801610682565b950135976001600160a01b03881696156120f9579463ffffffff946120c9945f9a948b9a99946120d3996d1ff3684f28c67538d4d072c227343314966127e1565b9260801c16613bed565b6020815191018273ba1333333333a1ba1108e8412f11850a5c319ba95af1611fd86132f3565b94919650969291946d1ff3684f28c67538d4d072c227343314936060890298808a046060149015171561220c5760608802978089046060149015171561220c578760801c15158960801c15158260801c15151717610baf575f9889986040610132966101159882519b8051988d81519b8c928c838101938380868801019787601c198a015260200191015e60200191015e60030183528b610131015381816020018c60f1015e518a60b1015e8989609d015288608801528760780152866068015285605801520160d1810184604401526020846024015263f83d08ba846004015201825215158160a801536121ec613b8d565b602081519101826d14aa86c5d3c41765bb24e11bd7015af1611fd86132f3565b634e487b7160e01b5f52601160045260245ffd5b5050505f90565b9291829160405194633c74eed68652856020015260e01b84604001526060848101528184608001528360a0013760840190601c01fd5b906001600160a01b03825116916001600160a01b036020820151169260408201519084158215026122e957612291856125d9565b908282106122e157856060959673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee18861b155f146122cd57506122c89250612693565b389039565b916122dc938111900391612633565b6122c8565b509084612610565b5050509050565b9190916001600160a01b038151166001600160a01b03602083015116604083015191811583150261236c57612324826125d9565b9583871061236457956060959615908418028318918073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee18861b155f146122cd57506122c89250612693565b868484612610565b505050509050565b9190820391821161220c57565b336d1ff3684f28c67538d4d072c22734036123a85760131936019036821161220c575f9190565b5f903690565b90919063c1fb425e8103612448575081019060c081830312610029576123d38161059a565b6123e08360208401611e57565b9160a08101359367ffffffffffffffff851161002957611d13946124049201610682565b90604051906124128261053f565b6001600160a01b0360208301915f835216825261242f845f612cd8565b90526d1ff3684f28c67538d4d072c2273433149261317d565b633036d6a6036125d35781019061010081830312610029576124698161059a565b6124768360208401611e57565b9160a081013567ffffffffffffffff81116100295784612497918301610682565b9360c08201359067ffffffffffffffff8211610029576124b8918301610682565b93602c8151106125c1578451608901938460891161220c5761257495601f196124f96124e388610630565b976124f1604051998a610577565b808952610630565b013660208801376d1ff3684f28c67538d4d072c2273433148251602001518760480152604083602001886068015e8660a801538051906020018660a9015e845181515186602801525f866014015285525191602083015192831990620f4240821061257a575b505060e00135926001600160a01b0316612d39565b50600190565b6001600160a01b039294506125b560e0926125b0856125ba94511691620f424003916bcd1e9517bb0cb8d0d5cde8935c90612ba9565b6135d7565b6135f0565b939161255f565b634e487b715f5260326020526024601cfd5b50505f90565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0382161860601b61260557504790565b61069d903090612ba9565b916054526034526014526f97a6f3b90000000000000000000000005f5260646010fd5b60105f60449260209582956014526034526fa9059cbb00000000000000000000000082525af115612683573d153d601f1060015f5114161715612676575f603452565b6390b8ec185f526004601cfd5b60405162ffffff163d5f823e3d90fd5b5f80809381935af115610bc157565b907f5ea1d46a000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000833581811690600485106127c0575b501614612708576127049161358a565b9091565b50506bcd1e9517bb0cb8d0d5cde8935c908160a01c60011615610029576b3a9113a02a267cff8bfd38516bb39834f1d3371754c5eae0a7905c905c90604051938460c00160405261276a6fffffffffffffffffffffffffffffffff8416613370565b5060e0855284602001526ce000000000000000000000000084600c01528064ffffffffff168460a0015260601c83608001526ca000000000000000000000000083606c015282604001525f82604c015260019190565b828092508560040360031b1b16165f6126f4565b9190820180921161220c57565b92989791909695939860608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c15151717610baf576040610132966101159882519c8d9881519981519b8c928c838101938380868801019787601c198a015260200191015e60200191015e600301835215158c610131015381816020018d60f1015e518b60b1015e5f8a609d015289608801528860780152876068015286605801520160d181018560440152602085602401526348c89491856004015201835215158260a80153565b60ff81166128d857506e04444c5dc75cb358380d2e3de08a9090565b61335d565b9291909263562e052c81146128f7579261069d935f613e71565b5060609150829081010312610029578035604082013590604051928160281c151582421117612b25576084359260206bcd1e9517bb0cb8d0d5cde8935c926129506fffffffffffffffffffffffffffffffff8716613370565b46600103612ac2577f0000000000000000000000000000000000000000000000000000000000000000905b604051957f549c17970871bfdfb0ff321bda3359ea022619d3d8bbae6929a36123a847fb258752868501527fda3359ea022619d3d8bbae6929a36123a847fb2500000000000000000000000086600c01528686604001527fffffffffffffffffffffffff00000000000000000000000000000000000000008816866060015280519084012085608001526119015f52825260a084206040526042601e205f528260ff1c601b01825201356040526001600160ff1b03166060526020600160805f825afa5190813d0215612ab5576040525f6060526b3a9113a02a267cff8bfd3851906bb39834f1d3371754c5eae0a79264ffffffffff169060601b17905d5d6bcd1e9517bb0cb8d0d5cde8935c74010000000000000000000000000000000000000000176bcd1e9517bb0cb8d0d5cde8935d604052600190565b638baa579f5f526004601cfd5b6040517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8665f527f574f8ba830fef8423e08e5c83d3cf7988b76ba736a1cb6cd4bd1ca02c0d16edc8452466040523060605260805f20906040525f6060529061297b565b5063cd21db4f5f526020526024601cfd5b9392919063562e052c8114612b4e5761069d94613e71565b50925060609150829081010312610029578035604082013590604051928160281c151582421117612b25576084359260206bcd1e9517bb0cb8d0d5cde8935c926129506fffffffffffffffffffffffffffffffff8716613370565b602460105f926020946014526f70a0823100000000000000000000000084525afa15610bc1573d601f1015610029575f5190565b602460105f926020946014526f7ecebe0000000000000000000000000084525afa15610bc1573d602011610029575f5190565b5f60446010602093604051956d1ff3684f28c67538d4d072c2273460345260601b85526fdd62ed3e00000000000000000000000084525afa15610bc1573d602011610029575f51906040521415901517612c6657565b63b78cb0dd5f526004601cfd5b5f6004601c602093633644e51584525afa15610bc1573d602011610029575f5190565b92919091604051935f528160ff1c601b016020526040526001600160ff1b03166060526020600160805f825afa511860601b3d1115612ab5576040525f606052565b91905191602083015192831991620f42408310612cf457505050565b6001600160a01b031615612d06575050565b61069d929350906125b06001600160a01b036125b593511691620f424003916bcd1e9517bb0cb8d0d5cde8935c90612ba9565b929491946001600160ff1b038611610baf579094905b602c8651119385602801948551938860010151908960040151958a60180151938b602c0197885180968d6001600160a01b0383166001600160a01b038716109788159684811888029160ff811680155f14612fb2575050936001600160a01b039160e495731f98431c8ad98523631ae4a59f267346ea31f984907fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e33995b62ffffff1691816040519684604052186020525f80521860601b600c521560051b6060035f2090836040525f5260205260405260ff600b536055600b20906040521694159760405197889383519384602001908660c4015e60a08560a401526001600160a01b0316846084015283606401528260440152878a301802301882602401526f128acb0800000000000000000000000082601001528060c40182520101604052816bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa2575081740400000000000000000000000000000000000000005f93849360e01b17176bcdccd5c65a7d4860ce3abbe95d8451908260208701915af1612f036132f3565b9015611fe757612f11613cbe565b604081805181010312610029576040602082015191015192604052821802185f03905f8212610baf578190612f8557507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd4602c91995101808652106125c15790945230601486015260288552909490612d4f565b98505093955050925050818410612f9a575050565b909150612610565b63ab7646c45f526020526024601cfd5b6001810361300c575050936001600160a01b039160e4957341ff9aa7e16b8b1a8a8dc4f0efacd93d02d071c9907f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2926323a69e7599612df2565b60028103613066575050936001600160a01b039160e49573baceb8ec6b9355dfc0269c18bac9d6e2bdc29c4f907fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e3399612df2565b602f81036130c0575050936001600160a01b039160e49573df62d9e51d7c08360dcd41931a2e6b97ff8c73e8907fd3e7f58b9af034cfa7a0597e539bae7c6b393817a47a6fc1e1503cd6eaffe22a9263fa461e3399612df2565b6031810361311a575050936001600160a01b039160e4957386641a77a1172c3ce65bce52ae91bdadef0f74c2907f62441ebe4e4315cf3d49d5957f94d66b253dbabe7006f34ad7f70947e60bf15c92632c8958f699612df2565b94955091939092506032036128d857506001600160a01b038f9160e494938b9173f4fd2e6c5b60c5b365cd1b96dd6245e6d60414c2907f3e77b70b9c4ce644601ed4aab19834375c6a9a2bca7adeb89a7bdd5fd8eb0a7d9263fa461e3399612df2565b9190925f14613259575161324c576020810151610baf57604081015142116132385760845f927fffffffffffffffffffffffffffffffffffffffff000000000000000000000000849351516bcd1e9517bb0cb8d0d5cde8935c60206001600160a01b0385511694015193604051948560800152846060015260601b83604c015260601b1681602c01526f15dacbea00000000000000000000000081600c0152601c01826d1ff3684f28c67538d4d072c227345af115610bc157565b63cd21db4f5f52604001516020526024601cfd5b63c321526c5f526004601cfd5b905f9291839260406bcd1e9517bb0cb8d0d5cde8935c91818051956330f28b7a8752818151886020015e602001866060015e8460a0015e6001600160a01b03168260e0015261010082810152805190816020019083610120015e6101240190601c01826e22d473030f116ddee9f6b43ac78ba35af115610bc157565b604051906132e2826104f3565b5f6040838281528260208201520152565b3d1561331d573d9061330482610630565b916133126040519384610577565b82523d5f602084013e565b606090565b6040519060a0820182811067ffffffffffffffff82111761050f576040525f6080838281528260208201528260408201528260608201520152565b63d3b1276d5f5260ff166020526024601cfd5b6fffffffffffffffffffffffffffffffff166381bf1000808204818082049181808085049606910660401b17910660801b1781830660c01b17806359e6038302602e1c79ffff000000000000ffff000000000000ffff000000000000ffff1663ffff49c002018061e38f0260151c7d07ff000007ff000007ff000007ff000007ff000007ff000007ff000007ff167e07ff000007ff000007ff000007ff000007ff000007ff000007ff000007ff008161e38f02600d1c160160dc02018060081c9072ffffff00000000000000000000000000ffffff75ffffffff000000000000000000000000ffffffff00007effffffffff000000ff00000000000000ffffffffff000000ff00000000000084167affffff00000000000000000000000000ffffff000000000000000084161760101c9316911617177bffffffffffffffffffffffffffffffffffffffff00000000000000008160201c16906bffffffffffffffffffffffff1617910460c01b179060078260881c1e610100030160031c6012810190605360405194838652807f76767676767676767676767676767676767676767676767676767676767676760160071c7f010101010101010101010101010101010101010101010101010101010101010116602702017f3030303030303030303030303030303030303030303030303030303030303030019160110160031b1b189060031b610100031b826020015281604001604052565b600490911015903560e01c6367c4a3b0140290606082156135d1575060405190816040016040526020825273352650ac2653508d946c4912b07895b22edd84cd8260200152565b5f925090565b905f19818309910290818082109103035f526020525f90565b8051906020015181156136405781620f424080620f423f197fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399509830890828211900360fa1b910360061c170290565b620f424091500490565b5f5160205181156136405781620f424080620f423f197fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399509830890828211900360fa1b910360061c170290565b1561369f57565b634e487b7160e01b5f52600160045260245ffd5b90929194935f90604051938460c0015f8152610300386101e08801396104e086016040526136e7828a873560601c846154d0565b918287528287602001528660400199838b5287608001528660a001529495369436935f936020015173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145f146137695761373f906001600160a01b03163014613698565b9851620f42404760148c013560e81c0204905260161901976017015b6137658982613abf565b9796565b6001600160a01b03163081036137ae5750620f42406016196017836014013560e81c930193019a51916137a0308460200151612ba9565b80151590030204905261375b565b935094509750506137c0915015613698565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff48101908060550135600116908681016002198082013560e81c80920301916075019782891161002957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff889103019761375b565b906020820135918219620f4240811061384c575050565b90919250620f42400390356001600160a01b03811680910361002957613880906bcd1e9517bb0cb8d0d5cde8935c90612ba9565b905f19818309910290818082109103035f5260205261069d61364a565b95919491929073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0388161860601b6138db575050505050905061069d8133612693565b866014526ff9b6a7960000000000000000000000005f525f806024601082335af115610bc1576001600160a01b0316300361394c575050505061391f903383612633565b6014526f12e103f10000000000000000000000005f5260105f60248282335af115610bc1575f5160801c90565b61397c9491613974610dd592604051946139658661053f565b33865260208601523690611e57565b93369161064c565b61391f565b6040015180511561398f5750565b8063fb772a8860249252601c01fd5b9190939293813592836001948060f81c91826139c1575b50505050508101920390565b95839496613a06945180604001805115613aa8575b5050818411613a2d575b50601491925001948360800151906001600160a01b038560a001519360581c16906154d0565b9081815260400151809114613a1e57808080806139b5565b8063784cb7b860249252601c01fd5b85602001938451805115613a98575b5060028103613a5757505060149192855190525b82916139e0565b60149350613a69919250600314613698565b8582013592613a9160159287608001516001600160a01b038960a001519260581c168b6154d0565b9052613a50565b613aa2908a613f1c565b5f613a3c565b898051850180825260051b01918252525f806139d6565b5062ffffff106125c157565b905f8212613ad7575090565b80634c085bf160249252601c01fd5b905f8213613af457505f0390565b80633351b26060249252601c01fd5b805115613b105760200190565b634e487b7160e01b5f52603260045260245ffd5b908215613b7057604051926038526028528073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1860601b151502601452633ccfd60b5f525f80603c601c82335af11561095d57604052565b506014526fcbf0dbf50000000000000000000000005f5260246010fd5b6d14aa86c5d3c41765bb24e11bd7016bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa25750740300000000000014aa86c5d3c41765bb24e11bd7016bcdccd5c65a7d4860ce3abbe95d565b73ba1333333333a1ba1108e8412f11850a5c319ba96bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa2575060e01b7406ba1333333333a1ba1108e8412f11850a5c319ba9176bcdccd5c65a7d4860ce3abbe95d565b806bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257506001600160a01b03167f91dd734600000000000000050000000000000000000000000000000000000000176bcdccd5c65a7d4860ce3abbe95d565b6bcdccd5c65a7d4860ce3abbe95c80613cd45750565b63d66fcc385f526020526024601cfd5b9591949392906001600160a01b03163003613d45575050505080613d35575b6034526014526f15afd4090000000000000000000000005f5260205f6044601082335af115612683575f515f60345290565b613d40813384612633565b613d03565b610dd5613d409461397460405193613d5c8561053f565b3385528860208601523690611e57565b919060601b908315610fc757604051936060526040528073777777777777777777777777777777777777777760611b141502602c5260601b600c525f806064601c82335af11561095d575f606052604052565b93959290949194613dd08533613e2c565b6001600160a01b03163003613e0a57505050613dee92503390612633565b6311da60b45f5260205f6004601c82335af115610bc1575f5190565b613e27959492935090613974610dd592604051946139658661053f565b613dee565b602460105f80949381946014526fa584119400000000000000000000000082525af115610bc157565b6004601c6020935f936311da60b485525af115610bc1575f5190565b50909291604051613e83828685613f52565b906040525f14613e965750505050600190565b839163bd01c2268103613ef157506040925081010312610029576020813591013590804211613ee15750803411613ecd5750600190565b634a0944315f52602052346040526044601cfd5b63cd21db4f5f526020526024601cfd5b90915063131ad4280361222057826020918101031261002957613f16611d1392611eb1565b906122f0565b906040019081519182613f2e57505050565b5f905280515f198101825260051b01818103613f48575050565b5180825260400152565b9080929163d92aadfb81145f1461430c5750016101208282031261002957613f798261059a565b613f868260208501611e57565b613f9260a0850161059a565b9260c08501359167ffffffffffffffff831161002957613fb75f939284938801610682565b6001600160a01b03610100613fce60e08a0161059a565b980135961660405190613fe08261053f565b6001600160a01b0360208301978689521682526140f96140008583612cd8565b808952826140676001600160a01b0388515116604051906140208261055b565b815283602082015282604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9b6140d88c6001600160a01b036bcd1e9517bb0cb8d0d5cde8935c6040519261408f8461055b565b8286168452602084015216604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9b6140e33083612ba9565b8181111590821802811880940204809b52612633565b6040805192614109608085610577565b6058845261423760208501947f436f6e73696465726174696f6e286164647265737320746f6b656e2c75696e7486527f32353620616d6f756e742c6164647265737320636f756e74657270617274792c848201527f626f6f6c207061727469616c46696c6c416c6c6f7765642900000000000000006060820152603c8451614192606082610577565b602e815260208101907f546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c7582527f696e7432353620616d6f756e74290000000000000000000000000000000000008782015286519889947f436f6e73696465726174696f6e20636f6e73696465726174696f6e290000000060208701525180918587015e840190838201908d8252519283915e010189815203601f198101865285610577565b8180519663137c29fe8852818151896020015e602001876060015e8560a0015e8360e00152868361010001526101408361012001528051908161016001846101400152816020019084610160015e8151918260200190828501610180015e016101840190601c01826e22d473030f116ddee9f6b43ac78ba35af115610bc1576fffffffffffffffffffffffffffffffff917f49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a75982765f526020526040519260405260605f2092604052166010525f5260305fa0600190565b638d68a15681036143d45750016080828203126100295761432c8261059a565b9060208301359060408401359067ffffffffffffffff821161002957614353918501610682565b9160408351106125c1576013198351019260140180519381526143a16040519461437e606087610577565b602886526040366020880137808660280152308660140152602886523090612ba9565b80151580820394808602958604149114171561220c576001600160a01b03620f4240606061257497013594049216612d39565b63103b48be8103614585575060c09181010312610029576143f48161059a565b906144016020820161059a565b9160408201356144136060840161059a565b9260808101359062ffffff82168203610029576001600160a01b0360a08192013596169416945f928061455b575b50630902f1ac5f5260405f6004601c895afa15610bc15760403d106100295760018083161415928360051b956127108751928860201895848b8851958415801561454d575b61452e575b50505061ffff9060081c168203029202820191821561451a570204928184106144fc5750505f9491936001600160a01b0360a49487966020889586826040519763022c0d9f89528801015285010152168160600152608081810152818160a00152601c01915af115610bc157600190565b9061451587859363dfec36260263d21220a718906159fa565b612610565b634e487b7160e01b5f52601260045260245ffd5b61ffff9394506145429291610c9d91612ba9565b919050848b5f61448b565b5060018085811c1614614486565b620f424091935061456c3087612ba9565b801515900302049161457f838787612633565b5f614441565b6338c9c14781036145f25750019060a081830312610029576145a68161059a565b906145b36040820161059a565b90608081013567ffffffffffffffff811161002957611d13946145d7918301610682565b9260206001600160a01b036060840135941692013590615530565b635f80abae81036146c8575060a09181010312610029576146128161059a565b9061461f6020820161059a565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1491604081013583156146b457475b818111614660575b505050505050600190565b620f424091606083608086013584020494013591030204818111159082180218915f1461469c575061469191612693565b5f8080808080614655565b6001600160a01b036146af931690612633565b614691565b6146be3084612ba9565b801515900361464d565b90506368f5ee258103614768575081019061012081830312610029576146ed8161059a565b6146f96020830161059a565b9161470660608201611ebe565b9161471360808301611eb1565b9460e08301359167ffffffffffffffff8311610029575f96879685614748611fb695611fbc976001600160a01b039901610682565b926101008201359460c08301359389604060a0860135950135921661582f565b63fd8c38e1811492636c5f9cf9821492909183851763f61460f9821417156148e45750810161010082820312610029576147a18261059a565b936147ae6020840161059a565b60408401356147bf60608601611eb1565b9160808601359360a08701359560c088013567ffffffffffffffff81116100295760e0916147ee918a01610682565b970135976001600160a01b038a16911561481f57509463ffffffff946120c9945f9a9893948b9a956120d39961582f565b91985090156148ca57966148329761577c565b73e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4446bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f80917fb45a3c0e0000000000000001e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4446bcdccd5c65a7d4860ce3abbe95d6020815191018273e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4445af1611fd86132f3565b916148dc9593915f988998969461577c565b6121ec613b8d565b90925081935063736180c881145f14614acb575060c091810103126100295761490c8161059a565b9061491960408201611eb1565b9160608201356080830135936001600160a01b03851693848603610029578060206149b06001600160a01b0373ce355440c00014a229bbec030a2b8f8eb45a28978161496b60a0620f4240980161059a565b9916991415737a7916044b0f6e1563f1ff4cb7db270f0b85f58f0273dac17f958d2ee523a2206206994597c13d831ec718169687811886150280981897309118612ba9565b801515900391013502049015614a495763fae036d55f5260205f6004601c885afa15610bc157601f3d111561002957620f4240670de0b6b3a76400005f51019102049181831061451557505060105f60209481946044946034526014526f8d7ef9bb00000000000000000000000082525af115614a30575f603452600190565b6040516bffffffffffffffffffffffff163d5f823e3d90fd5b9092816034959395526014526f959912760000000000000000000000005f5260205f6044601082865af115614a30575f6004601c620f4240670de0b6b3a76400006020958560345202049463568d4b6f84525afa15610bc157601f3d111561002957670de0b6b3a76400005f5182020490039181831061451557505050600190565b639b59756f8103614c7f575060e0918101031261002957614aeb8161059a565b90614af86020820161059a565b916040820135906060830135926001600160a01b0384169384810361002957614b2360808301611eb1565b9560a0830135928360030b8094036100295760c00135948015614c2157918697614b6c60409593620f42405f96614b5d9b9a9b3084612ba9565b801515900302049a8b91612633565b6001600160a01b03602096865192614b848985610577565b868452601f198901368a860137875195845194858b01908860e4015e60c08760c401528660a4015286866084015215159a8b866064015285604401521683602401526f3eece7db00000000000000000000000083601001528060e40183528201610120018452828251928601915af115610bc1575192828410614c0a5750505050600190565b90614515916350a2884b02630fc63d1018906159fa565b5085614c2f91969596612ba9565b91604051631865c57d5f52610120816004601c865afa15610bc157871560051b0151918260801c3d6101201117610029576040936fffffffffffffffffffffffffffffffff5f9416900397614b6c565b905063670335be8103614f5a5750810190808203610160811261002957614ca58261059a565b60e0603f19614cb66020860161059a565b9301126100295760405191614cca83610523565b60408401358352614cdd6060850161059a565b602084015260808401356040840152614cf860a0850161059a565b94606084019586526080840160c0860135815260a085019060e0870135825260c0860196610100810135885261012081013567ffffffffffffffff8111610029578101906040828603126100295760405194614d538661053f565b82359267ffffffffffffffff841161002957614d76602092610140958301610682565b875201356020860152013590614d8c3086612ba9565b90519081811115908218028118809351020497818910614f485750506040519373bbbbbbb520d69a9775e85b458c58c648259fad5f6040523060601b602c526fdd62ed3e000000000000000000000000600c5260205f6044601c875afa15614f3f573d602011610029575f958695865190604052838110614ef3575b506001600160a01b036bcd1e9517bb0cb8d0d5cde8935c9260405196634dcebcba885283518860200152308860400152604084602001896060015e82168760a0015260608381018860c0015e1685610120015260c00151908160f81c9060601b1784610140015260801b8361016001526101a0836101800152826101a001526040826101c001528060200151826101e0015251805190816020019083610200015e6102040190601c018273bbbbbbb520d69a9775e85b458c58c648259fad5f5af115610bc1576fffffffffffffffffffffffffffffffff8091511691166010525f5260305fa0600190565b614f1c575b614f1673bbbbbbb520d69a9775e85b458c58c648259fad5f86615932565b5f614e08565b614f3a73bbbbbbb520d69a9775e85b458c58c648259fad5f866158e2565b614ef8565b843d5f823e3d90fd5b906001600160a01b0389925116612610565b63ca9e5d0f810361504f57508160c0918101031261002957614f7b8161059a565b90614f886020820161059a565b9060408101356060820135916001600160a01b038316928381036100295760105f6024926001600160a01b038560209760a0614fc76080879a01611eb1565b9201359a8a82615028575b50505015991660145288156360f3e02e0263bd6015b41860601b82525af115610bc157601f3d1115610029575f51928284106150115750505050600190565b9061451591639e9dfd6c02634a248d2a18906159fa565b620f42406150479361503a3085612ba9565b8015159003020491612633565b5f808a614fd2565b91929163b8df6d4d810361531357508260a09181010312610029576150738261059a565b60408301356001600160a01b03811691828203610029576150c261509960608701611eb1565b91620f424060808801359760206150b03085612ba9565b8015159003910135020494859161570a565b156153075763ffa642255f5260405f6004601c845afa15610bc157603f3d1115610029575f516020516317be952e5f5260205f6004601c865afa15610bc157601f3d1115610029575f518060081c6100295760ff1661512081611e39565b63796da7af5f5260205f6004601c875afa15610bc157601f3d1115610029575f519063eab5d20e5f5260205f6004601c885afa15610bc157601f3d1115610029575f5163ec2fd46d5f5260205f6004601c895afa15610bc157601f3d111561002957865f51936ec097ce7bc90715b34b9f100000000004926151a181611e39565b600281036152d1575050637c9b8e895f5260205f6004601c895afa15610bc157601f3d1115610029575f51948585038089116152a85750505083670de0b6b3a7640000809592818981950191848303020495800204029080820491061515018202049083030102045b63c0ffa1785f5260205f6004601c855afa15610bc157601f3d1115610029575f5163ab44a7a35f5260205f6004601c865afa15610bc157601f3d111561002957670de0b6b3a764000080915f5101019102049380851061527057509261257492936159b8565b60205f6004601c8895634a248d2a84525afa15610bc157601f3d1115610029575f518060a01c610029576001600160a01b0316612610565b670de0b6b3a76400009296506152c79493919550880302048380615a1e565b810391030161520a565b615300955091670de0b6b3a7640000919693926152ed81611e39565b1515908418028318958692020491615a1e565b900361520a565b90612574929391615976565b9192916342032aef036125d357819281601f1993018435908560200135866040013590878787018184019489868035968486606001359687019c8d86039e8f019f861090608011178b158c60401c171788158960a01c171791111792030160051c85118515171791111782873518178860051c831117610029576153c59060409796975198886020018a60a4013780896044015263a04c36b289600401526064870189526084878a01016040526125d9565b8760840152612000603f840484010195603f195f960190886024019189606401908a602001957fa04c36b2000000000000000700000000000000000000000000000000000000003017995b8060051b90602086830101359184831161002957836020916001946080018a52010135855201938685145a306bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f8f8c8f8380938f926bcdccd5c65a7d4860ce3abbe95d51923090888882180218f180156154bc57615497613cbe565b6154a8578d1117610bc15793615410565b505050505050505050505092505050600190565b5f6bcdccd5c65a7d4860ce3abbe95d615497565b919392610300916001600160a01b031694850906019161012083019261014081019081519081610160858218920151170261551c5750811561550f5752565b63ad1991f55f526004601cfd5b639a62e8b45f52602052506040526044601cfd5b9291906001600160a01b038216936e22d473030f116ddee9f6b43ac78ba385146d1ff3684f28c67538d4d072c2273486141773bbbbbbb520d69a9775e85b458c58c648259fad5f8614176104e6575f906001600160a01b0381169073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee820361567c57505050620f424090470204938051155f146156025750506155da575f80809381935af16155d16132f3565b9015611fe75750565b7f01da1572000000000000000000000000000000000000000000000000000000005f5260045ffd5b9093926020830180841161220c578251106125c157835f9460208695850101525b602083519301915af16156346132f3565b9015611fe75751159081615672575b5061564a57565b7f82d5d76a000000000000000000000000000000000000000000000000000000005f5260045ffd5b90503b155f615643565b9091949282979497155f1461569b575050506155da575f928392615623565b6156aa96939592963083612ba9565b8015159003905f19818309910290818082109103035f526020526156cc61364a565b6020860180871161220c578551106125c15787845f988360208b9a8a010152036156f9575b505050615623565b6157029261570a565b5f80876156f1565b60405192826040523060601b602c526fdd62ed3e000000000000000000000000600c5260205f6044601c855afa15615773573d602011610029575f5193604052831061575557505050565b6157629261576457615932565b565b61576e82826158e2565b615932565b833d5f823e3d90fd5b92939095949796919760608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c1515620f42408c11171717610baf5760d49660405199875180986020018a8d015e8a60b401528960b101523089609d015288608801528760780152866068015285605801526070820185604401526020856024015263f83d08ba856004015260b48201855215158460a80153830101604052565b92939095949796919760608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c1515620f42408c11171717610baf5760d49660405199875180986020018a8d015e8a60b401528960b101523089609d01528860880152876078015286606801528560580152607082018560440152602085602401526348c89491856004015260b48201855215158460a80153830101604052565b604460105f8093602095601452816034526f095ea7b300000000000000000000000082525af115612683573d153d601f1060015f5114161715615925575f603452565b633e3f8f735f526004601cfd5b604460105f809360209560145281196034526f095ea7b300000000000000000000000082525af115612683573d153d601f1060015f5114161715615925575f603452565b6084905f809360209560405191638dae73338352828801528160400152606081810152818160800152601c01915af115610bc157601f3d1115610029575f5190565b6084905f80936020956040519163e67ce7068352828801528160400152606081810152818160800152601c01915af115610bc157601f3d1115610029575f5190565b6004601c5f9260209484525afa15610bc1575f51908160a01c3d6020111761002957565b670de0b6b3a76400008481039594820281900490910292828404019185020480828110615aaf57500392600191670de0b6b3a7640000905b8260021b02048480020193600185811c019185925b838110615aa05750670de0b6b3a76400009394955060011b935f14615a9957015b0290808204910615150190565b9003615a8c565b9250828604830160011c615a6b565b91905003670de0b6b3a76400005f92949194615a56565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0382161860601b615af8575061069d8133612693565b60405191826044015281602401526f0c11dedd00000000000000000000000081601001526044815280606401604052336bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f80917f599d07140000000000000002000000000000000000000000000000000000000033176bcdccd5c65a7d4860ce3abbe95d60208151910182335af1615b996132f3565b9015611fe757615ba7613cbe565b602001519056","sourceMap":"483557:3627:0:-:0;;;;;;;;;-1:-1:-1;483557:3627:0;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;184423:248;483557:3627;184423:248;;;483557:3627;;;;;;;;-1:-1:-1;;483557:3627:0;;;;;;;:::i;:::-;;;55440:99;;;483557:3627;55440:99;483557:3627;;-1:-1:-1;;483557:3627:0;;;;;;;;:::i;:::-;;;;;;;;;435235:9;468862:27;483557:3627;;;;;;;;:::i;:::-;418600:18;;;:::i;:::-;435176:9;;;;:::i;:::-;468862:27;:::i;:::-;435235:9;;:::i;:::-;483557:3627;;;;;;;;;;-1:-1:-1;;483557:3627:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;418600:18;;;:::i;:::-;435176:9;;;;:::i;:::-;3459:42;2042:10;54398:47;469146:68;;469527:805;;;;;;483557:3627;469527:805;;;;;;;;;417138:76;;;184423:248;;;;;;;;;;483557:3627;184423:248;;;;;;;483557:3627;;;:::i;:::-;186105:32;;;-1:-1:-1;483557:3627:0;;184849:60;;;483557:3627;;;;;;184849:60;;;483557:3627;;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;87430:866;184423:248;483557:3627;87430:866;483557:3627;87430:866;;-1:-1:-1;;;;;87430:866:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3459:42;87430:866;;;;;483557:3627;87430:866;;;;;;;;;;;;;;;;;483557:3627;;87430:866;;;;95447:58;95443:1308;;186101:401;;;;;;;435235:9;186101:401;470406:27;186101:401;184423:248;186101:401;470406:27;:::i;95443:1308::-;95568:15;;;;;;;;:26;95564:118;;95711:53;96094:591;95711:53;96738:1;95711:53;435235:9;95711:53;95932:66;184423:248;95711:53;;;470406:27;95711:53;;:::i;:::-;95778:51;;;;;;;:::i;:::-;95932:66;:::i;:::-;96094:591;483557:3627;96094:591;;;;;184423:248;96094:591;;;;483557:3627;96094:591;;93274:95;96094:591;;;;483557:3627;96094:591;;3459:42;96094:591;483557:3627;96094:591;;;483557:3627;96094:591;;184423:248;;483557:3627;96094:591;483557:3627;96094:591;;;483557:3627;96094:591;;483557:3627;96094:591;;;;;;;96738:1;:::i;:::-;95443:1308;;;;;;;;95564:118;95622:10;483557:3627;93738:97;483557:3627;93738:97;;186101:401;483557:3627;;;;;;:::i;:::-;;186210:34;;483557:3627;;-1:-1:-1;483557:3627:0;;185197:66;;;483557:3627;;;;;;185197:66;;;483557:3627;;;;;;;;;;;;;;;;;;;184423:248;483557:3627;88566:900;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;88566:900;483557:3627;88566:900;;;-1:-1:-1;;;;;88566:900:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3459:42;88566:900;;;;;483557:3627;88566:900;;;;;;;;;;;;;;;;;483557:3627;;88566:900;;;;97031:69;97027:1557;;186206:296;;;;;;435235:9;186206:296;470406:27;186206:296;184423:248;186206:296;470406:27;:::i;97027:1557::-;97291:12;;;;;;;;;97259:15;;:26;2657:73;97254:104;;97379:53;97916:602;470406:27;97379:53;;435235:9;97379:53;97746:66;184423:248;97379:53;;;98571:1;97379:53;;:::i;:::-;483557:3627;97581:62;483557:3627;;;;97581:62;;;:::i;97746:66::-;97916:602;483557:3627;97916:602;;;;;184423:248;97916:602;;;;483557:3627;97916:602;;93436:93;97916:602;;;;483557:3627;97916:602;;3459:42;97916:602;483557:3627;97916:602;;184423:248;;483557:3627;97916:602;483557:3627;97916:602;;;483557:3627;97916:602;;;483557:3627;97916:602;;483557:3627;97916:602;;;;;;;98571:1;:::i;186206:296::-;186592:335;;;;;;;;483557:3627;186592:335;;;;;;184423:248;186592:335;;;;469146:68;40444:127;483557:3627;40444:127;483557:3627;40444:127;;483557:3627;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;;483557:3627:0;;;;;-1:-1:-1;483557:3627:0;;414756:381;483557:3627;;;;;;;;;;;;;:::o;:::-;351729:340;483557:3627;;;;;;;;;;;351729:340;483557:3627;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;-1:-1:-1;;483557:3627:0;;;;;;;;;;;;;;;;:::o;:::-;;;-1:-1:-1;;;;;483557:3627:0;;;;;;:::o;:::-;-1:-1:-1;;483557:3627:0;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;-1:-1:-1;;483557:3627:0;;;;:::o;:::-;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;-1:-1:-1;483557:3627:0;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;:::o;421672:610::-;483557:3627;414756:381;;;;;;;;;-1:-1:-1;414756:381:0;;;;;;;;;;;;;;;;421672:610;435782:16;;:::i;:::-;411652:70;;;;;421897:379;421901:17;;;483312:21;;;;;:::i;:::-;483557:3627;;;;422035:17;:::o;421897:379::-;422083:148;;;422251:14;483557:3627;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;483557:3627:0;;422083:148;483557:3627;;-1:-1:-1;483557:3627:0;;308492:325;;308924:10;308492:325;;;414756:381;308492:325;414756:381;308492:325;;;308924:10;:::i;:::-;308492:325;483557:3627;;;;;:::i;:::-;-1:-1:-1;341537:4:0;;;;483557:3627;341537:4;;;422244:21;:::o;483557:3627::-;297696:150;299773:26;297696:150;;;;;;;;;209450:1525;;;209925:664;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;210650:294:0;209925:664;;;210650:294;209925:664;210650:294;;;;;209450:1525;;299773:26;-1:-1:-1;;;;;299834:4:0;;;;;;;;483557:3627;;299817:22;483557:3627;;300131:57;299834:4;;300131:57;;:::i;:::-;198776:80;;;;;;;;;297696:150;198776:80;;;;;300265:126;;;483557:3627;189855:65;;300431:3;384544:60;300404:108;;189855:65;199135:94;;;;;;;300591:25;;;:::i;:::-;300628:14;483557:3627;;:::i;:::-;302593:14;;;;303509;;;297696:150;303509:14;;300688:4836;300695:31;;322824:2;300695:31;;;;;198776:80;;;;;;;;;;190164:76;;302593:14;190164:76;;189855:65;;306157:88;217268:11;198449:69;;217268:11;;:::i;:::-;198604:80;302593:14;198604:80;;189855:65;;217294:26;217290:80;;300688:4836;483557:3627;;;217674:11;;217670:800;;300688:4836;198449:69;;;;190164:76;302593:14;190164:76;;189855:65;;218788:24;;;;218784:119;;218916:55;;;;;483557:3627;218916:55;:::i;:::-;306259:1598;;;306559:21;;;;;;;306555:320;;306259:1598;;;;;297696:150;307959:342;;;;;;302593:14;307959:342;;;;302593:14;307959:342;297696:150;307959:342;;;;;;;297696:150;307959:342;422244:21;:::o;306555:320::-;215396:1065;;;;;297696:150;215396:1065;;;;299834:4;297696:150;215396:1065;;-1:-1:-1;;;215396:1065:0;;;;;;;;-1:-1:-1;414756:381:0;297696:150;215396:1065;414756:381;;215396:1065;;;;;-1:-1:-1;215396:1065:0;;297696:150;215396:1065;306555:320;;;;;215396:1065;;-1:-1:-1;215396:1065:0;;;;;;302593:14;215396:1065;;-1:-1:-1;215396:1065:0;;;;306259:1598;198951:77;307447:9;;;307443:348;;483557:3627;307808:34;483557:3627;;;307808:34;;:::i;:::-;;306259:1598;;307443:348;307480:293;;;;-1:-1:-1;307480:293:0;;;;218784:119;218878:9;;;:::i;217670:800::-;217752:8;;;:::i;:::-;;198776:80;;190934:62;;217809:418;;217670:800;218259:13;218271:1;218274:10;;;;;217670:800;218274:10;218356:18;218392:53;218356:18;218271:1;218356:18;;191124:174;191008:296;191124:174;;;;;;;;;;;;191008:296;;218356:18;299834:4;;218392:53;483557:3627;218392:53;:::i;:::-;483557:3627;218259:13;;217809:418;302593:14;218159:15;;483557:3627;;;218135:73;;299834:4;;-1:-1:-1;;;;;483557:3627:0;;218135:73;:::i;:::-;217809:418;;;217290:80;217346:12;;;;:::i;:::-;217290:80;;;300688:4836;297696:150;-1:-1:-1;301267:39:0;300802:444;;;;;;;;-1:-1:-1;;300802:444:0;;;;414756:381;300802:444;;;;;301267:39;;;:::i;:::-;198604:80;;;303708:8;198604:80;302593:14;198604:80;;-1:-1:-1;;;;;198604:80:0;;189855:65;86062:9;189855:65;;301672:8;301666:14;;322824:2;50991:88;190164:76;302593:14;190164:76;;198449:69;;302593:14;190164:76;;301907:652;;;;;;;;;;483557:3627;;;;301907:652;;;;;-1:-1:-1;;;301907:652:0;;;;-1:-1:-1;;;301907:652:0;;48506:137;;;;;;;;;;;483557:3627;;;48506:137;483557:3627;302686:281;;;;;;;303158:334;-1:-1:-1;;303158:334:0;302593:14;303158:334;;;;;483557:3627;;303598:4;;;;:::i;:::-;303702:14;:19;303708:8;;;;290726:959;;;;;;;;;;302593:14;290726:959;;;;;;;;;;414756:381;290726:959;;;;;;;;414756:381;290726:959;;;;414756:381;;290726:959;;;;;-1:-1:-1;290726:959:0;;304759:32;302593:14;290726:959;303745:101;303698:342;;48506:137;;;;198604:80;;;;48506:137;;;;304759:32;:::i;:::-;189855:65;;;483557:3627;;;;;;305001:35;;304953:43;;2513:62;304948:178;;305452:28;198449:69;;189855:65;;;;48506:137;;305452:28;:::i;:::-;483557:3627;;;300688:4836;;;;;;304948:178;9109:168;-1:-1:-1;9109:168:0;9537:4;302593:14;9109:168;;;;290726:959;297696:150;290726:959;;-1:-1:-1;290726:959:0;;;;;303698:342;291927:1183;;;;;;;;;;;;;302593:14;291927:1183;;;;;;;;;;;;;;;;;;;;;;;;;;;;;414756:381;;291927:1183;;;;;-1:-1:-1;291927:1183:0;;302593:14;291927:1183;;;300802:444;291927:1183;;;;300802:444;291927:1183;;;;;300802:444;291927:1183;;;297696:150;291927:1183;;;;;304759:32;303893:128;;303698:342;;;300265:126;300323:52;190164:76;;;;189855:65;;300323:52;;:::i;:::-;483557:3627;;300265:126;;483557:3627;450802:408;;;;;;;422083:148;450802:408;;;483557:3627;;:::i;:::-;-1:-1:-1;;450802:408:0;;;456677:18;;;;;;450802:408;;;;;;451623:40;450802:408;;;;451623:24;450802:408;;;;451623:24;:::i;:::-;:40;:::i;:::-;450802:408;;;451677:14;;451673:233;;483557:3627;422244:21;:::o;451673:233::-;451707:189;-1:-1:-1;451707:189:0;450802:408;451707:189;450802:408;451707:189;;456697:43;422083:148;441788:767;;;;;450802:408;441788:767;;;414756:381;441788:767;450802:408;-1:-1:-1;;450802:408:0;441788:767;;;;;;456949:157;;450802:408;456949:157;;;;;;;457206:58;;;;456697:43;457202:133;;456697:43;;;450802:408;49839:1;456697:43;52653:63;483557:3627;;456666:9;;;457202:133;457315:4;;:::i;457206:58::-;449699:42;;;;;;;;:::i;:::-;457218:46;457206:58;;483557:3627;351656:4;422083:148;;;;-1:-1:-1;;422083:148:0;351641:19;483557:3627;;351729:340;;;;;;;;;;;352738:461;;;353230:16;351729:340;-1:-1:-1;353230:16:0;;47077:87;351729:340;;;47077:87;;;;353465:4;;353448:22;;353444:1325;353465:4;;;353728:6;414756:381;;352738:461;414756:381;352738:461;;353512:109;;;353728:6;:::i;353444:1325::-;353773:19;;353766:27;354702:56;353773:19;;353766:27;:::i;:::-;351729:340;483557:3627;;;;;:::i;:::-;414756:381;483557:3627;;351729:340;354602:86;;483557:3627;;;353936:568;;;483557:3627;:::i;:::-;353936:568;483557:3627;353936:568;;;;;;483557:3627;;351729:340;353936:568;;422083:148;351729:340;;;353936:568;;;483557:3627;:::i;:::-;354702:56;;:::i;:::-;353444:1325;;483557:3627;361302:150;;;366455:49;361302:150;;;;;366004:26;361302:150;;;;;209450:1525;;;209925:664;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;210650:294:0;209925:664;;;210650:294;209925:664;210650:294;;;;;209450:1525;;366004:26;366455:49;;;;;;;;;:::i;:::-;198776:80;;;;361302:150;198776:80;;;;;;;;;;;366602:4;;;;;;;-1:-1:-1;;;;;483557:3627:0;;366585:22;366581:272;;483557:3627;366866:152;;483557:3627;189855:65;;;;;;;;;;;;199135:94;;;367097:25;;;:::i;:::-;367134:14;483557:3627;;;;:::i;:::-;;;;:::i;:::-;367378:2285;367385:31;363168:2;367385:31;;;;;198776:80;;;;;;;361302:150;198776:80;;190164:76;;361302:150;190164:76;;189855:65;;370296:84;217268:11;198449:69;;217268:11;;:::i;:::-;198604:80;361302:150;198604:80;;189855:65;;217294:26;217290:80;;367378:2285;483557:3627;;;217674:11;;217670:800;;367378:2285;198449:69;;;;190164:76;361302:150;190164:76;;189855:65;;218788:24;;;;218784:119;;218916:55;;;;;483557:3627;218916:55;:::i;:::-;370394:1995;;;370708:21;;;;;;;;;;370704:404;;370394:1995;;;;;361302:150;372491:342;;;;;;361302:150;372491:342;;;;361302:150;372491:342;361302:150;372491:342;;;;;364728:9;372491:342;361302:150;372491:342;422244:21;:::o;370704:404::-;-1:-1:-1;;;;;483557:3627:0;366602:4;366585:22;366602:4;;;370779:53;;215396:1065;;;;;361302:150;215396:1065;;;;361302:150;215396:1065;;-1:-1:-1;;;215396:1065:0;;;;;;;;-1:-1:-1;414756:381:0;215396:1065;228933:956;414756:381;;215396:1065;;;;;-1:-1:-1;215396:1065:0;;361302:150;215396:1065;370704:404;;;;;;215396:1065;;361302:150;215396:1065;;-1:-1:-1;215396:1065:0;361302:150;215396:1065;;370779:53;417138:76;;370779:53;;;370394:1995;199135:94;;;;;;;;;;198951:77;483557:3627;;;;371713:9;;371709:348;;228933:956;-1:-1:-1;;;;;483557:3627:0;;86250:88;;;483557:3627;;414756:381;;;;;;372206:43;414756:381;372165:18;-1:-1:-1;414756:381:0;372165:18;:::i;:::-;414756:381;372206:43;:::i;372074:301::-;372296:60;;;;;:::i;371709:348::-;367518:480;371746:293;;-1:-1:-1;371746:293:0;361302:150;371746:293;;218784:119;218878:9;;;:::i;217670:800::-;217752:8;;;:::i;:::-;;198776:80;361302:150;198776:80;;190934:62;;217809:418;;217670:800;218259:13;218271:1;218274:10;;;;;;217670:800;;;218286:17;218356:18;218392:53;218356:18;218271:1;218356:18;;191124:174;191008:296;191124:174;;;;;;;;;;;;191008:296;;218356:18;366602:4;;218392:53;483557:3627;218392:53;:::i;:::-;483557:3627;218259:13;;217809:418;361302:150;218159:15;;483557:3627;;;218135:73;;366602:4;;-1:-1:-1;;;;;483557:3627:0;;218135:73;:::i;:::-;217809:418;;;217290:80;217346:12;;;;:::i;:::-;217290:80;;;367378:2285;-1:-1:-1;86062:9:0;367518:480;;368297:25;364315:306;368095:39;367518:480;368358:4;367518:480;;-1:-1:-1;;;;;;;367518:480:0;361302:150;367518:480;;;;;361302:150;367518:480;;;;;;368015:24;;483557:3627;367518:480;;;368095:39;;;:::i;:::-;198604:80;;;;;;;;;;;190164:76;;;198449:69;;190164:76;;;363691:512;;;;;;;;;;;;-1:-1:-1;;;363691:512:0;;;;-1:-1:-1;;;363691:512:0;;48506:137;;;;;;;;;;483557:3627;364225:10;;483557:3627;48506:137;483557:3627;;;-1:-1:-1;;;;;364315:306:0;;384544:60;361302:150;384544:60;367518:480;384544:60;364631:7;;483557:3627;384544:60;;483557:3627;384544:60;;;483557:3627;;;364672:15;;483557:3627;364315:306;;483557:3627;364728:9;;;483557:3627;364315:306;;;;209001:443;;;209125:313;;;;-1:-1:-1;;209125:313:0;;;;;;;;;;;;209001:443;;368297:25;368278:44;;;;;;;;;368358:4;;:::i;:::-;483557:3627;;363168:2;;198604:80;;189855:65;322824:2;50991:88;483557:3627;;368450:22;;;483557:3627;361302:150;228933:956;;;;;;;;;;;;;;;;364728:9;228933:956;;;;361302:150;228933:956;;;;;;;;;;;;;;;;;;;;;;;;;;414756:381;;228933:956;;;;;-1:-1:-1;228933:956:0;223559:91;369241:54;223559:91;;;223369:84;364728:9;223369:84;223559:91;363168:2;48506:137;;;;;198604:80;;189855:65;;;;48506:137;;-1:-1:-1;483557:3627:0;369241:54;;:::i;:::-;483557:3627;;369589:30;198449:69;;189855:65;;;;48506:137;;369589:30;:::i;:::-;483557:3627;;;367378:2285;;;;;;;;366866:152;366924:78;190164:76;;361302:150;190164:76;;189855:65;;;366924:78;;:::i;:::-;483557:3627;;366866:152;;;;;;;366581:272;366669:151;;;:::i;:::-;483557:3627;;366581:272;;483557:3627;435782:16;;;;396032:49;435782:16;;395581:26;435782:16;;:::i;:::-;391657:31;209450:1525;;;209925:664;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;210650:294:0;209925:664;;;210650:294;209925:664;210650:294;;;;;209450:1525;;395581:26;396032:49;;;;;;;;;;;:::i;:::-;198776:80;;;;;;;;;;;;;;;;396179:4;;;;;;;-1:-1:-1;;;;;483557:3627:0;;396162:22;396158:272;;483557:3627;396443:195;;483557:3627;189855:65;;;;;;199135:94;;;;396717:25;;;:::i;:::-;483557:3627;;:::i;:::-;;-1:-1:-1;198776:80:0;483557:3627;;;;;:::i;:::-;;;;;;;;;;198776:80;483557:3627;;;;;;-1:-1:-1;483557:3627:0;;;;-1:-1:-1;414756:381:0;483557:3627;;;;;;;;397376:31;422083:148;397376:31;;;;;198776:80;;;;;;190164:76;;483557:3627;190164:76;;189855:65;;399888:90;217268:11;198449:69;;217268:11;;:::i;:::-;198604:80;483557:3627;198604:80;;189855:65;;217294:26;217290:80;;397369:1886;483557:3627;;;217674:11;;217670:800;;397369:1886;198449:69;;;;;190164:76;;483557:3627;190164:76;;189855:65;;218788:24;;;218784:119;;218916:55;;;;;483557:3627;218916:55;:::i;:::-;399992:1719;;;400292:21;;;;;;;;;;400288:410;;399992:1719;;;;;;;198776:80;401762:238;;483557:3627;401762:238;;;483557:3627;401762:238;;;198776:80;401762:238;198776:80;401762:238;422244:21;:::o;400288:410::-;-1:-1:-1;;;;;483557:3627:0;396179:4;396162:22;396179:4;;;400363:53;;215396:1065;;;;;198776:80;215396:1065;;;;198776:80;215396:1065;;-1:-1:-1;;;215396:1065:0;;;;;;;;-1:-1:-1;414756:381:0;215396:1065;;414756:381;;215396:1065;;;;;-1:-1:-1;215396:1065:0;;198776:80;215396:1065;400288:410;;;;;;;215396:1065;;;-1:-1:-1;215396:1065:0;;;;;400363:53;417138:76;;400363:53;;;399992:1719;199135:94;;;;;;;;;;;;;198951:77;401270:9;;;;401266:348;;401631:65;483557:3627;;;;401631:65;;:::i;:::-;;399992:1719;;218784:119;218878:9;;;:::i;217670:800::-;217752:8;;;:::i;:::-;;198776:80;;190934:62;;217809:418;;217670:800;218259:13;218271:1;218274:10;;;;;217670:800;218274:10;218356:18;218392:53;218356:18;218271:1;218356:18;;191124:174;191008:296;191124:174;;;;;;;;;;;;191008:296;;218356:18;396179:4;;218392:53;483557:3627;218392:53;:::i;:::-;483557:3627;218259:13;;217809:418;483557:3627;218159:15;;483557:3627;;;218135:73;;396179:4;;-1:-1:-1;;;;;483557:3627:0;;218135:73;:::i;:::-;217809:418;;;217290:80;217346:12;;;;:::i;:::-;217290:80;;;397369:1886;397506:612;;;;;86062:9;397506:612;;;;;;;;;;-1:-1:-1;;398152:39:0;397506:612;;;;;398152:39;;;:::i;:::-;398145:46;;;;398216:8;398210:14;;398216:8;;391887:326;;392590:25;391887:326;483557:3627;391887:326;;;;;;483557:3627;391887:326;;86062:9;198604:80;483557:3627;198604:80;;-1:-1:-1;;;;;198604:80:0;;483557:3627;190164:76;;483557:3627;198776:80;483557:3627;;;-1:-1:-1;;;;;198449:69:0;;483557:3627;190164:76;;483557:3627;;;;;198604:80;;189855:65;322824:2;50991:88;483557:3627;;;;-1:-1:-1;;198776:80:0;3175:74;391887:326;;;;;209001:443;;;209125:313;;;;-1:-1:-1;;209125:313:0;;;;;;;;;;;;209001:443;;392590:25;483557:3627;;;;;;;;:::i;:::-;;;;392560:55;392647:4;;;;:::i;:::-;198776:80;379877:3157;;-1:-1:-1;;379877:3157:0;;;;;;-1:-1:-1;;379877:3157:0;;;;;;;;483557:3627;379877:3157;;;483557:3627;379877:3157;;;-1:-1:-1;379877:3157:0;;;;;;;;;;;;;;;;;;414756:381;;379877:3157;;;;;483557:3627;379877:3157;;198776:80;379877:3157;;;;198776:80;379877:3157;198604:80;189855:65;;;483557:3627;;;393375:24;198449:69;;189855:65;;;393375:24;:::i;:::-;483557:3627;;393410:84;198776:80;3269:73;398206:1039;397369:1886;;;398206:1039;398567:4;;;;;;:::i;:::-;398601:8;398595:14;;398601:8;;-1:-1:-1;483557:3627:0;398638:20;;395250:1;-1:-1:-1;;;;;198449:69:0;;483557:3627;190164:76;;483557:3627;198776:80;398722:23;;483557:3627;398591:412;86062:9;397506:612;198604:80;483557:3627;198604:80;399020:15;;198604:80;;189855:65;322824:2;50991:88;399085:22;;;483557:3627;198776:80;383255:1245;;-1:-1:-1;;383255:1245:0;;;;;;;;;-1:-1:-1;383255:1245:0;-1:-1:-1;;383255:1245:0;;414756:381;;383255:1245;;;;;483557:3627;383255:1245;;198776:80;383255:1245;;;198776:80;383255:1245;198604:80;189855:65;;;483557:3627;;;394193:24;198449:69;;189855:65;;;394193:24;:::i;:::-;483557:3627;;398206:1039;;398591:412;398856:41;483557:3627;398833:20;;395250:1;-1:-1:-1;;;;;198604:80:0;483557:3627;198604:80;;483557:3627;190164:76;;483557:3627;198776:80;398919:23;;483557:3627;398591:412;;396443:195;396522:83;190164:76;;;;;189855:65;;;396522:83;;:::i;:::-;483557:3627;;396443:195;;;;;;;396158:272;396246:151;;;:::i;:::-;483557:3627;;396158:272;;483557:3627;321303:150;;;323605:49;321303:150;;;;;323154:26;321303:150;;;;;209450:1525;;;209925:664;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;210650:294:0;209925:664;;;210650:294;209925:664;210650:294;;;;;209450:1525;;323154:26;323605:49;;;;;;;;;;:::i;:::-;198776:80;;;;;;;;321303:150;198776:80;;;;;323752:4;;-1:-1:-1;;;;;483557:3627:0;;323735:22;;;;;323731:272;;483557:3627;324016:197;;483557:3627;189855:65;;324253:3;384544:60;324226:108;;189855:65;199135:94;;;;189855:65;;324413:25;199135:94;324413:25;:::i;:::-;324450:14;483557:3627;;;:::i;:::-;324510:4807;324517:31;;322824:2;324517:31;;;;;198776:80;;;;;;321303:150;198776:80;;190164:76;;326386:14;190164:76;;189855:65;;198449:69;221132:11;198449:69;;221132:11;;:::i;:::-;198604:80;326386:14;198604:80;;189855:65;;221158:26;221154:80;;324510:4807;483557:3627;;;221538:11;;221534:800;;324510:4807;198449:69;;;;190164:76;;326386:14;190164:76;;189855:65;;222652:24;;;222648:119;;222780:55;;;;;;:::i;:::-;330059:1726;;;330359:21;;;;;;;330355:415;;330059:1726;;;321303:150;331887:342;;;;;;326386:14;331887:342;;;;326386:14;331887:342;321303:150;331887:342;;;;;;;321303:150;331887:342;422244:21;:::o;330355:415::-;330588:163;;330430:53;;;323752:4;330430:53;330588:163;:::i;:::-;330355:415;;;;;330430:53;417138:76;;330430:53;330588:163;:::i;330059:1726::-;199135:94;;;;;;;;;;;;;;198951:77;331342:9;;;;331338:348;;331703:67;483557:3627;;;;;331703:67;;:::i;221534:800::-;221616:8;;;:::i;:::-;;198776:80;321303:150;198776:80;;190934:62;;221673:418;;221534:800;222123:13;222135:1;222138:10;;;;;;221534:800;;;222150:17;222220:18;222256:53;222220:18;222135:1;222220:18;;191124:174;191008:296;191124:174;;;;;;;;;;;;191008:296;;222220:18;323752:4;;222256:53;;:::i;:::-;483557:3627;222123:13;;221673:418;326386:14;222023:15;;483557:3627;;;221999:73;;323752:4;;-1:-1:-1;;;;;483557:3627:0;221999:73;:::i;:::-;221673:418;;;221154:80;221210:12;;;;:::i;:::-;221154:80;;;324510:4807;326386:14;-1:-1:-1;325089:39:0;324624:444;;;;;;;;-1:-1:-1;;324624:444:0;;;;414756:381;324624:444;;;;;325089:39;;;:::i;:::-;198604:80;;;327501:8;198604:80;;;;-1:-1:-1;;;;;198604:80:0;;189855:65;86062:9;189855:65;;325465:8;325459:14;;322824:2;50991:88;190164:76;;;;198449:69;;190164:76;;;325700:652;;;;;;;;;;483557:3627;;;;325700:652;;;;;-1:-1:-1;;;325700:652:0;;;;-1:-1:-1;;;325700:652:0;;48506:137;;;;;;;;;;;;483557:3627;326386:14;;483557:3627;48506:137;483557:3627;326479:281;;;;;;;-1:-1:-1;;326951:334:0;;;;;;;321303:150;327302:14;;483557:3627;327391:4;;;;:::i;:::-;327495:14;:19;327501:8;;;;310657:1332;;321303:150;310657:1332;;;;;;;;;;;;;;;;;;;;;;;;;;;;;414756:381;;310657:1332;;;;;-1:-1:-1;310657:1332:0;;;;324624:444;310657:1332;;;;328552:32;310657:1332;324624:444;310657:1332;;;;327491:342;48506:137;;;;198604:80;;;;48506:137;;;;328552:32;:::i;:::-;189855:65;;;483557:3627;;;;;;328794:35;;328746:43;;2513:62;328741:178;;329245:28;198449:69;;189855:65;;;;48506:137;;329245:28;:::i;:::-;483557:3627;;;324510:4807;;;;;327491:342;312231:1607;;321303:150;312231:1607;;;;;;;;;;;;;;;;;;;;;;;;;;321303:150;312231:1607;;;;;;;;;;414756:381;;312231:1607;;;;;-1:-1:-1;312231:1607:0;;;;324624:444;312231:1607;;;321303:150;312231:1607;;;;328552:32;312231:1607;324624:444;312231:1607;;;;327491:342;;;324016:197;324095:85;190164:76;;;;;;;;189855:65;;;324095:85;;:::i;:::-;483557:3627;;324016:197;;323731:272;323819:151;;;:::i;:::-;483557:3627;;323731:272;;414756:381;-1:-1:-1;414756:381:0;;;;416406:658;416458:600;;;;;;;;;;;;;;-1:-1:-1;;;;;416458:600:0;;;416406:658::o;416458:600::-;;;;;;;;;417828:365;417138:76;;417932:255;;;;;;417138:76;417932:255;417828:365::o;417932:255::-;;;;;;;470446:1032;;;;470561:19;470557:841;;470446:1032;471444:5;;;;;;:::i;:::-;471467:4;470446:1032;:::o;470557:841::-;441788:767;;;;;;;;;;;;;;;-1:-1:-1;;441788:767:0;;;;3175:74;;;;483991:2561;;;;;:::i;:::-;3269:73;3175:74;3269:73;470812:27;470808:201;;470557:841;52653:63;;;;;;441788:767;52653:63;;471076:13;471088:1;471071:317;471091:18;;;;;;470557:841;;;;471111:43;441788:767;;;;;;;;;;;-1:-1:-1;;441788:767:0;;;;;482832:42;;;;;;;;:::i;:::-;471258:37;471254:120;;471111:43;;;441788:767;471088:1;471111:43;52653:63;483557:3627;;471076:13;;;471254:120;471350:4;;:::i;470808:201::-;482832:42;;;;;:::i;:::-;470867:37;470863:128;;470808:201;;;;470863:128;42745:510;;;;;3175:74;42745:510;;;;;470579:1;42745:510;441788:767;42745:510;;;;3175:74;42745:510;;;;;;;;;;;;;;;;;;;;;54718:524;2042:10;;3459:42;2042:10;54847:35;54843:393;;54718:524::o;54843:393::-;2158:8;-1:-1:-1;;55094:132:0;;;;;-1:-1:-1;54718:524:0:o;483557:3627::-;;-1:-1:-1;483557:3627:0;;;:::o;:::-;-1:-1:-1;;;483557:3627:0;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;:::o;483991:2561::-;;;;484118:32;;;;;:::i;:::-;;;;484166:11;;;484173:4;484166:11;:::o;484114:2411::-;483557:3627;484198:56;;483557:3627;;484631:166;;;483557:3627;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;483557:3627:0;;-1:-1:-1;;;;;483557:3627:0;;360138:294;483557:3627;360515:22;483557:3627;;;;;:::i;:::-;435562:20;3459:42;2042:10;54398:47;483557:3627;;;;;;;;;;;;;;;;;360138:294;:::i;:::-;360515:22;;:::i;:::-;483557:3627;419816:67;;;:::i;:::-;419935:31;483557:3627;419935:31;;;;;;;;;:::i;:::-;10212:8;;10208:54;;420017:16;;;:::i;10208:54::-;10027:89;;;;;;484194:2331;483557:3627;484938:57;;;;;483557:3627;485017:54;2513:62;;483557:3627;;;485419:143;;483557:3627;;;;;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;-1:-1:-1;;;;;483557:3627:0;;;485577:389;;;435562:20;483557:3627;435562:20;390249:298;435562:20;-1:-1:-1;435562:20:0;;;;;;419816:67;435562:20;3459:42;2042:10;54398:47;390249:298;;:::i;:::-;384544:60;390809:3;384544:60;;419816:67;:::i;:::-;483557:3627;419935:31;;;;;384561:42;419935:31;;;;:::i;485577:389::-;435562:20;;;;;;;;3459:42;2042:10;54398:47;320114:292;203193:2;483557:3627;;;;;;203193:2;483557:3627;;;;;;;203193:2;483557:3627;;;;;;203193:2;483557:3627;;;;;;;384544:60;203249:3;384544:60;203286:19;;384544:60;203249:3;384544:60;203262:19;;384544:60;203249:3;384544:60;203233:24;;2513:62;;203228:143;;-1:-1:-1;203380:1552:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;203380:1552:0;;;483557:3627;203380:1552;;;;483557:3627;203380:1552;;;;;;;;;;;;;;483557:3627;203380:1552;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;483557:3627;203380:1552;;;;483557:3627;203380:1552;;;;;;;;;;;;;419816:67;;:::i;:::-;483557:3627;419935:31;;;;;309617:42;419935:31;;;;:::i;483557:3627::-;-1:-1:-1;;;;483557:3627:0;;;;;-1:-1:-1;483557:3627:0;484933:1592;486502:12;;;486509:5;486502:12;:::o;42657:600::-;;;;;42745:510;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;444087:1516;;-1:-1:-1;;;;;483557:3627:0;;;444723:17;-1:-1:-1;;;;;444723:17:0;;;483557:3627;;444742:21;;;;483557:3627;444890:31;;;444867:17;;2657:73;444862:93;;444984:27;;;:::i;:::-;445025:24;;;;445021:111;;86250:88;;;;;;;;;445275:197;86250:88;;;445341:9;;;;;:::i;:::-;445512:85;;;444087:1516::o;445275:197::-;445435:24;445382:79;445435:24;;;50372:73;;445382:79;;:::i;:::-;445275:197;;445021:111;445111:9;;;;:::i;444862:93::-;444938:7;;;;;:::o;444087:1516::-;;;;-1:-1:-1;;;;;483557:3627:0;;;-1:-1:-1;;;;;444723:17:0;;;483557:3627;;444742:21;;;483557:3627;444890:31;;;444867:17;;2657:73;444862:93;;444984:27;;;:::i;:::-;445025:24;;;;445021:111;;47077:87;86250:88;47077:87;;;;;;;;;86250:88;;;;;;;445275:197;86250:88;;;445341:9;;;;;:::i;445021:111::-;445111:9;;;;:::i;444862:93::-;444938:7;;;;;;:::o;483557:3627::-;;;;;;;;;;:::o;54458:254::-;2042:10;3459:42;54548:47;3459:42;;-1:-1:-1;;54618:8:0;483557:3627;54618:8;;483557:3627;;;;-1:-1:-1;54611:38:0;;:::o;54544:162::-;54687:8;;;54680:15;:::o;466318:2286::-;;;;483557:3627;466423:56;;483557:3627;;466604:73;;;483557:3627;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;427376:14;483557:3627;;;;;:::i;:::-;466779:167;483557:3627;;;;;;:::i;:::-;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;422692:34;;483557:3627;422692:34;:::i;:::-;483557:3627;;3459:42;2042:10;54398:47;427376:14;;:::i;466419:2158::-;483557:3627;468057:56;483557:3627;;468357:89;;483557:3627;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;341025:4;483557:3627;;344380:34;344376:103;;483557:3627;;341478:4;;;;;;;;345080:261;344532:97;-1:-1:-1;;341537:4:0;;;;:::i;:::-;483557:3627;;;;;;;:::i;:::-;341537:4;;;;:::i;:::-;;;483557:3627;341537:4;;;3459:42;2042:10;54398:47;349359:699;;483557:3627;349359:699;;;;;;483557:3627;349359:699;483557:3627;349359:699;;;;;;;;;;;;483557:3627;349359:699;;;;;344803:255;;;;;;341232:4;344803:255;;483557:3627;344803:255;;;;;;428642:16;:23;483557:3627;428642:23;;483557:3627;428679:11;;;:19;86062:9;428679:19;;428675:392;;468053:524;-1:-1:-1;;483557:3627:0;;;;-1:-1:-1;;;;;483557:3627:0;345080:261;:::i;:::-;;468593:4;466318:2286;:::o;428675:392::-;-1:-1:-1;;;;;86062:9:0;;;428922:82;483557:3627;86062:9;428933:58;86062:9;428922:120;86062:9;;483557:3627;;86062:9;483557:3627;417138:76;;;428933:58;;:::i;:::-;428922:82;:::i;:::-;:120;:::i;:::-;428675:392;;;;344376:103;9109:168;483557:3627;9109:168;9802:4;483557:3627;9109:168;;;;468053:524;468554:12;;483557:3627;468554:12;:::o;86615:530::-;86250:88;-1:-1:-1;;;;;483557:3627:0;;86250:88;;;483557:3627;;86816:67;;86687:456;86615:530::o;86687:456::-;87094:42;87015:66;;87094:42;;:::i;41441:423::-;;41552:310;;;;;;;;;;;;81644:1513;81727:1424;;;81644:1513;81727:1424;81644:1513;;;81727:1424;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81644:1513::o;81727:1424::-;;;;;;;;;;;;;;;;;;;78393:410;78473:324;78393:410;;;;;78473:324;;;;;78393:410::o;459291:276::-;;459435:33;483557:3627;;;;;;;;;;;;459291:276;483557:3627;;459419:49;459415:108;;482170:21;;;:::i;:::-;459532:28;;459291:276::o;459415:108::-;417601:128;;;;;;;;;;483557:3627;;;;;463327:173;;;;463819:114;;;;;;;;;463942:39;457639:77;;;463942:39;:::i;:::-;;463991:568;;;;;;;;;;;;;;;;417601:128;463991:568;;483557:3627;463327:173;463991:568;;;;;;;;;;463819:114;463991:568;;483557:3627;463991:568;;;;417601:128;459484:28;;:::o;483557:3627::-;;;;;;;;;;;;;;;;341478:4;;;;;;;;;;:::o;202766:2172::-;;;;;;;;;;203193:2;483557:3627;;;;;;203193:2;483557:3627;;;;;;;203193:2;483557:3627;;;;;;203193:2;483557:3627;;;;;;;384544:60;203249:3;384544:60;203286:19;;384544:60;203249:3;384544:60;203262:19;;384544:60;203249:3;384544:60;203233:24;;2513:62;;203228:143;;203380:1552;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;203380:1552:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;203380:1552:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;483557:3627;203380:1552;;;;;;;;;;;;;202766:2172::o;481660:267::-;483557:3627;;;;;481811:41;231050:42;481766:155;481660:267::o;481766:155::-;481903:6;:::i;458801:484::-;;;;;483557:3627;458992:49;;458988:232;;449699:42;;;470579:1;449699:42;:::i;458988:232::-;459101:45;483557:3627;459101:45;;;;;;483557:3627;;;;;;;;;;459876:74;483557:3627;459876:74;384544:60;;460007:2;384544:60;459995:19;;459964:15;;:26;2513:62;459959:281;;460410:79;;417138:76;483557:3627;417138:76;;457639:77;460558:39;457639:77;;;460558:39;:::i;:::-;460662:13;483557:3627;460662:27;483557:3627;;460692:17;460662:81;;483557:3627;461159:1196;;457767:81;461159:1196;;;;;;;;;;;;;483557:3627;461159:1196;;;;;;483557:3627;461159:1196;;;;;;;;;;;;;470579:1;461159:1196;;;;;;483557:3627;461159:1196;;;;470579:1;461159:1196;;483557:3627;461159:1196;;;;;483557:3627;;;461159:1196;-1:-1:-1;;;;;461159:1196:0;483557:3627;461159:1196;483557:3627;;461159:1196;470579:1;461159:1196;;;;;;;;;;;483557:3627;461159:1196;470579:1;483557:3627;461159:1196;483557:3627;462439:17;483557:3627;462597:171;;;;483557:3627;462597:171;;;;;417138:76;417312:109;;;417138:76;417312:109;483557:3627;462817:73;483557:3627;459198:11;:::o;461159:1196::-;;470579:1;461159:1196;;;;460662:81;483557:3627;458467:322;457906:80;470579:1;458467:322;458030:22;458467:322;;460662:13;483557:3627;458467:322;;483557:3627;458467:322;;470579:1;458467:322;;483557:3627;458467:322;470579:1;483557:3627;458467:322;460662:81;;;459959:281;460031:199;;470579:1;460031:199;483557:3627;460031:199;;;;458801:484;;;;;483557:3627;458992:49;;458988:232;;449699:42;;;:::i;458988:232::-;459101:45;;;483557:3627;459101:45;;;;;;483557:3627;;;;;;;;;;459876:74;483557:3627;459876:74;384544:60;;460007:2;384544:60;459995:19;;459964:15;;:26;2513:62;459959:281;;460410:79;;417138:76;483557:3627;417138:76;;457639:77;460558:39;457639:77;;;460558:39;:::i;78993:946::-;79088:845;;;78993:946;79088:845;78993:946;79088:845;;;;;;;;;;;;;;;;;;78993:946;:::o;91540:628::-;91658:504;;;91540:628;91658:504;91540:628;91658:504;;;;;;;;;;;;;;;;;91540:628;:::o;93847:275::-;93985:1;92295:703;;;93847:275;92295:703;;;483557:3627;92295:703;;;;;;;;;;;;;;;;;;;93985:1;92295:703;;;;93991:45;;93976:10;;2513:62;93971:145;;93847:275::o;93971:145::-;94061:10;93985:1;93738:97;;;;90912:622;91073:455;;;;90912:622;483557:3627;91073:455;;;;;;;;;;;;;;90912:622;:::o;94128:780::-;;;;;94236:666;;;;;;;;;;;;;;-1:-1:-1;;;;;94236:666:0;;;;;;;;;;;;;;;;;;;;;;;;94128:780::o;428434:639::-;;;428642:16;:23;;;;483557:3627;428679:11;;;:19;86062:9;428679:19;;428675:392;;428434:639;;;:::o;428675:392::-;-1:-1:-1;;;;;483557:3627:0;428718:19;428714:343;;428434:639;;:::o;428714:343::-;428922:120;86062:9;;;;428933:58;-1:-1:-1;;;;;428922:82:0;86062:9;;483557:3627;;86062:9;483557:3627;417138:76;;;428933:58;;:::i;345418:3726::-;;;;;-1:-1:-1;;;;;345657:38:0;;345653:107;;345770:18;;;345798:3217;341025:4;483557:3627;;345847:34;346174:369;;;;;;;;;345805:4;346174:369;;;;;;;;;;;;;;341025:4;346174:369;;;;483557:3627;;;-1:-1:-1;;;;;483557:3627:0;;-1:-1:-1;;;;;483557:3627:0;;346632:15;48506:137;;;;;;;;;346799:22;483557:3627;;;480108:25;;480104:1392;480108:25;;;480149:33;;;-1:-1:-1;;;;;480149:33:0;339430:953;480149:33;13729:42;480196:28;15101:66;480238:76;483557:3627;480104:1392;;350644:363;;;;339430:953;350644:363;;;339430:953;350644:363;48506:137;339430:953;350644:363;483557:3627;350644:363;;48506:137;350644:363;;;;;;;;;483557:3627;350644:363;;;339430:953;350644:363;483557:3627;73050:371;339430:953;73050:371;339430:953;73050:371;483557:3627;73050:371;;;;;;339430:953;73050:371;483557:3627;47641:87;;339430:953;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;339430:953:0;;;;;;;;;;;;;347065:4;;;47641:87;;347065:4;47641:87;339430:953;;;;;;;;;;;;;;;;;;417138:76;;;413077:1012;350644:363;413077:1012;;;;;;;;;;;;483557:3627;413077:1012;;;;;;;;;419935:31;;;;339430:953;419935:31;;;;;;;:::i;:::-;10212:8;;10208:54;;420017:16;;:::i;:::-;339430:953;483557:3627;;;347423:138;;483557:3627;;;;339430:953;;347423:138;;483557:3627;;;;347576:143;339430:953;347576:143;47264:87;;;;483557:3627;;347841:14;483557:3627;347841:14;;347837:99;;347953:31;348012:84;;;348149:22;348232:224;341025:4;348149:22;348232:224;;;;;;348473:34;348469:111;;348764:241;;;347065:4;348764:241;;;;346174:369;348764:241;;345798:3217;;;;;348012:84;348076:5;;;;;;;;;;349028:24;;;349024:114;;345418:3726;;:::o;349024:114::-;349117:9;;;;:::i;413077:1012::-;;483557:3627;413077:1012;339430:953;413077:1012;339430:953;413077:1012;;480104:1392;345805:4;480335:29;;345805:4;;480380:30;;;-1:-1:-1;;;;;480380:30:0;339430:953;480380:30;8672:42;480424:32;8757:66;480470:80;483557:3627;480331:1165;480104:1392;;480331:1165;13644:1;480571:27;;13644:1;;480614:35;;;-1:-1:-1;;;;;480614:35:0;339430:953;480614:35;12843:42;480663:28;15101:66;480705:76;483557:3627;480567:929;480104:1392;;480567:929;10536:2;480802:27;;10536:2;;480845:28;;;-1:-1:-1;;;;;480845:28:0;339430:953;480845:28;10350:42;480887:30;10433:66;480931:76;483557:3627;480798:698;480104:1392;;480798:698;8585:2;481028:20;;8585:2;;481064:28;;;-1:-1:-1;;;;;481064:28:0;339430:953;481064:28;8250:42;481106:23;8489:66;481143:72;483557:3627;481024:472;480104:1392;;481024:472;481236:20;;-1:-1:-1;481236:20:0;;;;-1:-1:-1;9802:4:0;481236:20;9802:4;;481272:28;-1:-1:-1;;;;;481272:28:0;;339430:953;481272:28;;;;406:42;481314:23;722:66;481351:76;483557:3627;481232:264;480104:1392;;429275:4114;;;;429933:3450;;;;483557:3627;429964:221;;430202:12;;;483557:3627;430198:61;;430295:15;;;483557:3627;430277:15;:33;430273:302;;434061:991;-1:-1:-1;430729:16:0;434061:991;430729:16;;;86062:9;417138:76;;430202:12;-1:-1:-1;;;;;86062:9:0;;483557:3627;430865:31;;483557:3627;434061:991;430295:15;434061:991;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3459:42;434061:991;;;;;429275:4114::o;430273:302::-;430330:231;-1:-1:-1;430330:231:0;430295:15;430330:231;;430202:12;430330:231;;;;429964:221;430003:168;-1:-1:-1;430003:168:0;;;;429933:3450;417138:76;-1:-1:-1;417138:76:0;;;;431808:1565;417138:76;;431808:1565;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;431808:1565:0;;;;;;;;;;;;;;;;;;;;;;;;;;;411445:42;431808:1565;;;;;429275:4114::o;483557:3627::-;;;;;;;:::i;:::-;-1:-1:-1;483557:3627:0;;;;;;;;;;;;:::o;:::-;;;;;;341537:4;;;;:::i;:::-;483557:3627;;;;;;;:::i;:::-;341537:4;;483557:3627;-1:-1:-1;483557:3627:0;;;;:::o;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;483557:3627:0;;;;;;;;;;;;;;;;;;;;;;:::o;43437:227::-;43491:171;;;;;;;;;;16005:3951;16276:2738;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;384544:60;19210:1;384544:60;19191:3;384544:60;1429;1604:3;483557:3627;;19216:1;384544:60;19239:711;;;;;16276:2738;19239:711;;;;;;;;19210:1;19239:711;;;;;;;;483557:3627;19173:2;483557:3627;19216:1;19239:711;;;;19216:1;19239:711;1604:3;19239:711;;;16276:2738;19239:711;;;16276:2738;19239:711;16276:2738;19239:711;16005:3951::o;372886:734::-;373035:1;373020:16;;;;373072:97;;;;483557:3627;373200:57;2657:73;;483557:3627;373272:8;;373268:67;;373344:270;;;;;;;;;;;;;;;;;372886:734::o;373268:67::-;-1:-1:-1;;;373296:28:0;:::o;117115:172::-;;-1:-1:-1;;117115:172:0;;116938:165;;;;;;;;;;;428642:16;108058:126;;;428642:16;117115:172;:::o;131873:239::-;108901:105;;;;;;132009:9;;132005:64;;121971:357;86062:9;121971:357;-1:-1:-1;;127129:1424:0;121971:357;;;;;;;;;;125409:235;;121971:357;;125409:235;;;322824:2;131873:239;:::o;132005:64::-;86062:9;50991:88;;;132034:24;:::o;131873:239::-;427997:16;108901:105;;;132009:9;;132005:64;;121971:357;86062:9;121971:357;-1:-1:-1;;127129:1424:0;121971:357;;;;;;;;;;125409:235;;121971:357;;125409:235;;;322824:2;131873:239;:::o;483557:3627::-;;;;:::o;:::-;-1:-1:-1;;;483557:3627:0;;;;;;;;210981:4177;;;;;;483557:3627;197527:143;;;;;;;483557:3627;189403:366;;;;;;;;;;;197527:143;189403:366;197897:34;211418:106;;;;;;197897:34;;:::i;:::-;483557:3627;;;;200037:82;;;;;198080:284;197527:143;198080:284;;;;;;;;;;;;;211776:64;212047:145;;;;;483557:3627;190369:92;200037:82;190369:92;;86142:42;190369:92;212202:2888;190369:92;;;212253:30;;-1:-1:-1;;;;;483557:3627:0;212277:4;212260:22;212253:30;:::i;:::-;198776:80;;86062:9;212892:21;212323:497;;;;;;322824:2;50991:88;483557:3627;;-1:-1:-1;;212323:497:0;;;;212202:2888;215122:4;;;;:::i;:::-;215137:14;210981:4177;:::o;212202:2888::-;-1:-1:-1;;;;;483557:3627:0;213004:4;212987:22;;213004:4;;213058:529;86062:9;-1:-1:-1;;213058:529:0;;;;;;;;;;;198776:80;;213004:4;80123:35;213004:4;190164:76;200037:82;190164:76;;80123:35;:::i;:::-;53844:73;;;;;322824:2;50991:88;483557:3627;;212202:2888;;212983:2097;213850:19;;;;;;;213843:27;213850:19;;;213843:27;:::i;:::-;213889:1177;;;;;;;;;;;;;;-1:-1:-1;;213889:1177:0;;;;;;;;;;;;;;;;;;;;;;;;212983:2097;212202:2888;;427779:649;;427997:23;;;483557:3627;428034:11;;;86062:9;428034:19;;428030:392;;427779:649;;:::o;428030:392::-;483557:3627;;;;86062:9;483557:3627;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;428288:58;417138:76;;;428288:58;;:::i;:::-;184423:248;-1:-1:-1;;184423:248:0;;116938:165;;;;;;;;;;;483557:3627;108058:126;427997:23;108058:126;428277:120;;:::i;321505:1107::-;;;;;;;86250:88;-1:-1:-1;;;;;483557:3627:0;;86250:88;;;483557:3627;;321851:10;;;;;;;321864;321851;;321864;:::i;321770:836::-;313935:663;;;;483557:3627;313935:663;483557:3627;321986:10;313935:663;;321986:10;;313935:663;;;;;-1:-1:-1;;;;;483557:3627:0;322064:4;322047:22;322064:4;;321986:10;;;;322195;321986;;322195;;:::i;:::-;313935:663;314724:615;;483557:3627;314724:615;313935:663;483557:3627;313935:663;321986:10;;;314724:615;;;;;483557:3627;314724:615;;;321770:836;321505:1107::o;322043:470::-;322442:56;483557:3627;;;;;;;;;;;:::i;:::-;321986:10;483557:3627;;322334:90;;;483557:3627;;;;:::i;:::-;;;;;:::i;322442:56::-;322043:470;;199567:393;198776:80;;;189855:65;;199687:25;199683:271;;199567:393;:::o;199683:271::-;199728:216;;;;;;;;206407:2029;;;;;;206595:86;;;;206713:1;384544:60;;206764:3;384544:60;206781:12;;206777:1368;;206407:2029;208155:253;;;;;;;;;206407:2029;:::o;206777:1368::-;198449:69;;;;200572:50;198449:69;;194676:627;;;;;;;;206777:1368;206850:11;;;;;206846:699;;206777:1368;483557:3627;207684:2;483557:3627;;;;199315:77;;;;;199478;-1:-1:-1;;;;;199478:77:0;;;;384544:60;207621:2;384544:60;483557:3627;200572:50;;:::i;:::-;483557:3627;;;;194676:627;198776:80;;190934:62;;;207758:377;;206777:1368;;;;;;207758:377;207816:305;;;;;;;;206846:699;198604:80;;;;;;189855:65;;206885:26;206881:96;;206846:699;-1:-1:-1;207009:1:0;206998:12;;207009:1;;198449:69;;207684:2;198449:69;;;;200037:82;;206994:537;206846:699;;;;206994:537;207684:2;207114:12;;207107:20;207114:12;;;207125:1;207114:12;207107:20;:::i;:::-;207240:121;;;;207418:18;200244:50;483557:3627;199315:77;;;;;-1:-1:-1;;;;;199478:77:0;;;;384544:60;207213:2;384544:60;483557:3627;200244:50;;:::i;:::-;200037:82;;206994:537;;206881:96;206945:12;;;;:::i;:::-;206881:96;;;194676:627;;;;;;;;;;;;;;;;;;;;208442:165;;208528:8;-1:-1:-1;208510:91:0;;208442:165::o;187035:361::-;;187135:1;187127:9;;187123:236;;187368:21;187035:361;:::o;187123:236::-;187152:197;;;;;;;;187402:371;;187500:1;187492:9;;187488:236;;483557:3627;187500:1;483557:3627;187402:371;:::o;187488:236::-;187517:197;;;;;;;;483557:3627;;;;;;;;;:::o;:::-;-1:-1:-1;;;;483557:3627:0;;;;;-1:-1:-1;483557:3627:0;219221:1112;;219323:1004;;;;;;;;;;;;;;;;;;;;;483557:3627;219323:1004;;;;;;;;;;;;;;;219221:1112::o;219323:1004::-;;;;;;;;;;412858:1237;483557:3627;417138:76;;413077:1012;;;;;;;;;;;;;;;412858:1237::o;:::-;483557:3627;417138:76;;413077:1012;;;;;;;;;;;-1:-1:-1;413077:1012:0;;;;;;412858:1237::o;:::-;417138:76;;;413077:1012;;;;;;;;;;;-1:-1:-1;;;;;;413077:1012:0;;;;;412858:1237::o;414101:359::-;414166:288;;;;;414101:359;:::o;414166:288::-;;;;;;;;;394231:885;;;;;;;-1:-1:-1;;;;;483557:3627:0;394507:4;394490:22;394507:4;;394532:15;;;;;394528:171;;394486:543;379078:610;;;;;-1:-1:-1;379078:610:0;;-1:-1:-1;379078:610:0;;395062:10;;379078:610;;;;;-1:-1:-1;379078:610:0;-1:-1:-1;379078:610:0;;394231:885;:::o;394528:171::-;394673:10;394661;;394673;;:::i;:::-;394528:171;;394486:543;483557:3627;394962:56;483557:3627;;;;;;;;:::i;:::-;394907:10;483557:3627;;394858:90;;;;483557:3627;;;;:::i;215294:1173::-;;;215396:1065;;;;;;;;;;;;;;;-1:-1:-1;;;215396:1065:0;;;;;;;;;;;;;;;;;;;;;;;;;215294:1173::o;364826:854::-;;;;;;;;365112:9;365089:10;;365112:9;:::i;:::-;-1:-1:-1;;;;;483557:3627:0;365153:4;365136:22;365153:4;;365089:10;;;365276;365089;;;365276;;:::i;:::-;230003:369;-1:-1:-1;230003:369:0;;-1:-1:-1;230003:369:0;;365089:10;;230003:369;;;;;-1:-1:-1;230003:369:0;364826:854;:::o;365132:486::-;365551:56;483557:3627;;;;;;;;;;;;;;;:::i;365551:56::-;365132:486;;227822:880;228273:423;;;227822:880;;;;;228273:423;;;;;;;;;;227822:880::o;229901:477::-;230003:369;;;229901:477;230003:369;229901:477;230003:369;;;;;;;;;;229901:477;:::o;465017:1295::-;;;;;3175:74;;472773:7149;;;;;:::i;:::-;3269:73;3175:74;3269:73;465204:1081;473001:4;;;465266:11;;;;465273:4;465266:11;:::o;465204:1081::-;465298:55;;483557:3627;465298:55;;483557:3627;;465408:36;3175:74;465408:36;;;;483557:3627;;;;;;;;;;465462:15;;;:26;465458:279;;465754:9;;;:20;465750:327;;465294:991;466301:4;465017:1295;:::o;465750:327::-;465794:269;483557:3627;465794:269;483557:3627;465794:269;465754:9;3175:74;465794:269;;;;465458:279;465508:215;483557:3627;465508:215;483557:3627;465508:215;;;;465294:991;466097:57;;-1:-1:-1;483557:3627:0;466097:57;483557:3627;;466206:24;483557:3627;466206:24;;;483557:3627;;;;;466206:24;483557:3627;;:::i;:::-;466206:24;;:::i;195499:1161::-;;195564:1090;;;;;;;;;195499:1161;;;:::o;195564:1090::-;;;;;;-1:-1:-1;;195564:1090:0;;;;;;;;;;;;195499:1161;;:::o;195564:1090::-;;;;;;;;428434:639::o;472773:7149::-;;;;;483557:3627;473218:46;;473214:6681;483557:3627;;;473546:99;;483557:3627;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;483557:3627:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;483557:3627:0;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;241985:11;422692:34;;;;:::i;:::-;483557:3627;;;240958:16;240880:242;-1:-1:-1;;;;;240958:16:0;;86062:9;483557:3627;;;;;;;:::i;:::-;;;240912:200;483557:3627;240912:200;;483557:3627;240912:200;483557:3627;240912:200;;483557:3627;;240912:200;;;363168:2;-1:-1:-1;;236232:248:0;;;;;;;;;;;;236119:367;240880:242;417138:76;241155:184;417138:76;-1:-1:-1;;;;;417138:76:0;;483557:3627;;;;;;:::i;:::-;;;;;;;241187:142;;483557:3627;;;241187:142;;483557:3627;;240912:200;241187:142;;363168:2;-1:-1:-1;;236232:248:0;;;;;;;;;;;;236119:367;241155:184;241546:4;241513:39;241546:4;241513:39;;:::i;:::-;241577:28;;;47077:87;;;;;;;322824:2;;;50991:88;483557:3627;;;241985:11;:::i;:::-;483557:3627;;;;;;;;:::i;:::-;;341537:4;;235517:92;483557:3627;;;;;;;;;;;;;240912:200;483557:3627;;;74754:48;483557:3627;;;240912:200;483557:3627;;:::i;:::-;235257:90;341537:4;;483557:3627;235257:90;;;;;;;;;;;483557:3627;;235517:92;;;74754:48;483557:3627;235517:92;;74754:48;483557:3627;74754:48;;;;;;;;;;;;;;;;483557:3627;74754:48;;;;;;;;;235517:92;-1:-1:-1;;235517:92:0;;;;;;:::i;:::-;424463:2129;;;;;;;;;;;483557:3627;424463:2129;;483557:3627;424463:2129;;240912:200;424463:2129;;;483557:3627;424463:2129;;;483557:3627;424463:2129;;;;483557:3627;424463:2129;;;;483557:3627;424463:2129;;;;;;;;;;;;;483557:3627;424463:2129;;;;;;;;;;483557:3627;424463:2129;;;;;;;;;;;;74754:48;424463:2129;;411445:42;424463:2129;;;;;457639:77;236635:404;;-1:-1:-1;236635:404:0;483557:3627;236635:404;483557:3627;236635:404;;483557:3627;236635:404;240912:200;-1:-1:-1;236635:404:0;;483557:3627;236635:404;457639:77;236635:404;;-1:-1:-1;236635:404:0;;-1:-1:-1;236635:404:0;479911:4;472773:7149;:::o;473214:6681::-;483557:3627;473767:52;;483557:3627;;473927:52;;483557:3627;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;342237:41;342233:110;;-1:-1:-1;;342485:269:0;;;;;;;;;;;80123:35;483557:3627;;;;;;;:::i;:::-;341232:4;341537;;;;483557:3627;341537:4;;;342934:224;;341232:4;342934:224;;;;342485:269;342934:224;;341232:4;342934:224;;;80123:35;;:::i;:::-;53844:73;;;;;;343438:39;483557:3627;;;;;;;;;;;;;-1:-1:-1;;;;;86062:9:0;483557:3627;343180:381;483557:3627;;;50991:88;;483557:3627;;343180:381;:::i;473763:6132::-;483557:3627;474066:52;;483557:3627;;474257:71;483557:3627;474257:71;;;483557:3627;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;335787:18;-1:-1:-1;336066:8:0;;336062:753;;474062:5833;332813:535;;-1:-1:-1;332813:535:0;483557:3627;-1:-1:-1;332813:535:0;;;;;;;;483557:3627;332813:535;;;;483557:3627;335545:12;;;335544:19;332813:535;;;;;;337164:6;332813:535;;;;483557:3627;332813:535;;;;;;336933:15;;;:34;;;;474062:5833;336929:160;;474062:5833;384544:60;;;;;335775:1;384544:60;;483557:3627;;322824:2;;;483557:3627;;337206:77;483557:3627;;;;322824:2;483557:3627;337307:24;;;;337303:133;;333733:1095;;-1:-1:-1;333733:1095:0;;;-1:-1:-1;;;;;333733:1095:0;;;;483557:3627;333733:1095;;;;483557:3627;333733:1095;;;;;;;;;;;;;483557:3627;333733:1095;483557:3627;333733:1095;;483557:3627;333733:1095;;;;;;483557:3627;333733:1095;;332813:535;333733:1095;;;;;;;471467:4;470446:1032;:::o;337303:133::-;337369:30;333474:140;337369:30;;;47077:87;;483557:3627;47077:87;333474:140;;:::i;:::-;337415:9;:::i;483557:3627::-;-1:-1:-1;;;;483557:3627:0;;332813:535;483557:3627;;-1:-1:-1;483557:3627:0;336929:160;384544:60;336997:37;;;337061:17;336997:37;;;;;:::i;337061:17::-;336929:160;;;;;;;;336933:34;384544:60;483557:3627;384544:60;;;;;335641:24;336933:34;;336062:753;86062:9;80152:4;;;80123:35;80152:4;80123:35;;:::i;:::-;53844:73;;;;;322824:2;483557:3627;336793:10;;;;;;:::i;:::-;336062:753;;;474062:5833;483557:3627;474436:48;;483557:3627;;474600:60;;483557:3627;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;474721:5;483557:3627;;;;;;:::i;:::-;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;474721:5;;:::i;474432:5463::-;483557:3627;474785:60;;483557:3627;;474981:62;483557:3627;474981:62;;;483557:3627;;;;;;;:::i;:::-;;;;;;;:::i;:::-;-1:-1:-1;;;;;483557:3627:0;;86142:42;475133:29;;483557:3627;;;;475195:60;;;;475203:21;475195:60;475273:24;;;475269:532;;475195:60;474781:5114;;;;;;471467:4;470446:1032;:::o;475269:532::-;86062:9;483557:3627;;;;;;;322824:2;;483557:3627;;;;;;322824:2;483557:3627;475562:13;;;47077:87;;;;;;475616:171;;;;;475675:7;;;;:::i;:::-;475269:532;;;;;;;;475616:171;-1:-1:-1;;;;;475730:38:0;483557:3627;;475730:38;;:::i;:::-;475616:171;;475195:60;80123:35;80152:4;80123:35;;:::i;:::-;53844:73;;;;;475195:60;;474781:5114;475821:52;-1:-1:-1;483557:3627:0;475821:52;;483557:3627;;476210:91;;;483557:3627;;;;;;;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;483557:3627:0;;;;;358880:266;483557:3627;359229:22;483557:3627;-1:-1:-1;;;;;483557:3627:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;358880:266;:::i;475817:4078::-;483557:3627;476442:53;;;483557:3627;476517:48;;;476442:53;;2513:62;;;483557:3627;476587:50;;2513:62;483557:3627;;;476945:84;;;483557:3627;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;-1:-1:-1;;;;;483557:3627:0;;;477044:568;;;388308:270;;483557:3627;388308:270;;;-1:-1:-1;388308:270:0;;;;;;;419816:67;388308:270;;:::i;477044:568::-;477239:373;;-1:-1:-1;477239:373:0;;;;296578:264;;;;:::i;:::-;289397:42;417138:76;;413077:1012;483557:3627;413077:1012;;;;;;;;;;-1:-1:-1;413077:1012:0;;;;;483557:3627;419935:31;;;;;289397:42;419935:31;;;;:::i;477239:373::-;318881:264;;;;;-1:-1:-1;318881:264:0;;;;;;:::i;:::-;419816:67;;:::i;476437:3458::-;477632:51;;;;;;483557:3627;477632:51;;477628:2267;483557:3627;;;477807:65;483557:3627;477807:65;;;483557:3627;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;80123:35;-1:-1:-1;;;;;259498:42:0;483557:3627;;;86062:9;483557:3627;;;:::i;:::-;;;477887:62;260942:14;47641:87;;;259202:42;47641:87;483557:3627;48506:137;;;;;;;;;;80152:4;;48506:137;;80123:35;:::i;:::-;53844:73;;;;;483557:3627;;;322824:2;50991:88;;261914:958;;;258313:435;-1:-1:-1;258313:435:0;483557:3627;-1:-1:-1;258313:435:0;;;;;;;;;;;;;;86062:9;258937:8;-1:-1:-1;258313:435:0;483557:3627;322824:2;;50991:88;262300:24;;;;262296:127;;257047:519;;;-1:-1:-1;483557:3627:0;257047:519;;;;;;;;;;;;;;;;;-1:-1:-1;257047:519:0;;471467:4;470446:1032;:::o;257047:519::-;483557:3627;257047:519;;;;-1:-1:-1;257047:519:0;;;;;261914:958;256437:520;;;;;;;;;;;-1:-1:-1;256437:520:0;483557:3627;-1:-1:-1;256437:520:0;;;;;;;;;-1:-1:-1;257793:433:0;;86062:9;258937:8;483557:3627;256437:520;;;;322824:2;483557:3627;257793:433;;;;;;;;;;;;;;;258937:8;-1:-1:-1;257793:433:0;322824:2;;50991:88;483557:3627;;262747:24;;;;262743:119;;261914:958;;;471467:4;470446:1032;:::o;477628:2267::-;483557:3627;477970:53;;483557:3627;;478294:83;483557:3627;478294:83;;;483557:3627;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;410415:8;;;;80152:4;;;410886:10;483557:3627;80152:4;;86062:9;-1:-1:-1;80152:4:0;80123:35;80152:4;;;;80123:35;;:::i;:::-;53844:73;;;;;322824:2;50991:88;410886:10;;;;:::i;:::-;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;:::i;:::-;341537:4;;;-1:-1:-1;;341537:4:0;;;;;;;407197:840;;;;;;;;;;;;;;483557:3627;407197:840;;;;;;;;;;;;;;;;;;;;;;;;;483557:3627;407197:840;;;;;;;;;;;;;;;;;;;;409645:323;;;;;;;;;;;;;409982:24;;;;409978:132;;477966:1929;;;;471467:4;470446:1032;:::o;409978:132::-;410044:29;406777:161;410044:29;47077:87;;483557:3627;47077:87;406777:161;;:::i;410411:682::-;410941:38;;;;;;;;:::i;:::-;408204:498;483557:3627;408204:498;;-1:-1:-1;408204:498:0;;;;;;;;;;;408866:9;;408889:1;483557:3627;408204:498;;;;483557:3627;408204:498;;;;;;;483557:3627;457639:77;;-1:-1:-1;457639:77:0;;483557:3627;;410411:682;;;477966:1929;478497:48;-1:-1:-1;483557:3627:0;478497:48;;483557:3627;;478817:139;;;483557:3627;;;;;;;;;;;;:::i;:::-;;-1:-1:-1;;483557:3627:0;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;285201:4;285169:38;285201:4;285169:38;;:::i;:::-;483557:3627;;285309:34;;;;47077:87;;;;;;;483557:3627;;;322824:2;50991:88;285553:32;;;;285549:144;;84800:913;;483557:3627;84800:913;;284148:42;483557:3627;84800:913;285201:4;483557:3627;84800:913;;;;;;483557:3627;-1:-1:-1;84800:913:0;;;;;;;;;483557:3627;84800:913;;;-1:-1:-1;84800:913:0;;;;;;483557:3627;84800:913;85727:18;;;85723:191;;478493:1402;417138:76;-1:-1:-1;;;;;417138:76:0;;281717:2134;483557:3627;281717:2134;;;;;;;;483557:3627;281717:2134;;285201:4;281717:2134;483557:3627;281717:2134;;483557:3627;281717:2134;483557:3627;281717:2134;;483557:3627;281717:2134;;;;;483557:3627;281717:2134;;483557:3627;281717:2134;;;;483557:3627;281717:2134;;483557:3627;281717:2134;483557:3627;281717:2134;;483557:3627;281717:2134;;;;;;;483557:3627;281717:2134;;;483557:3627;281717:2134;;483557:3627;281717:2134;;483557:3627;281717:2134;;;;;;;;;;;483557:3627;281717:2134;;;;;483557:3627;281717:2134;;;;;;;;;;;483557:3627;281717:2134;;;;;;;;;84800:913;281717:2134;;284148:42;281717:2134;;;;;457639:77;483557:3627;;;457639:77;;;284572:184;;-1:-1:-1;284572:184:0;;-1:-1:-1;284572:184:0;471467:4;470446:1032;:::o;85723:191::-;85761:83;;85723:191;85885:17;284148:42;85885:17;;:::i;:::-;85723:191;;;85761:83;85799:30;284148:42;85799:30;;:::i;:::-;85761:83;;84800:913;;;-1:-1:-1;84800:913:0;;;;;285549:144;86062:9;-1:-1:-1;;;;;86062:9:0;;;483557:3627;285664:17;:::i;478493:1402::-;483557:3627;479071:49;;483557:3627;;479260:68;;483557:3627;479260:68;;;483557:3627;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;286471:443;-1:-1:-1;286471:443:0;483557:3627;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;:::i;:::-;;;;287830:8;;;287826:316;;479067:828;288331:13;;;;483557:3627;;286471:443;;483557:3627;;47077:87;;287355:13;47077:87;483557:3627;286471:443;;;;;;;;;;;;;;-1:-1:-1;286471:443:0;288370:24;;;;288366:131;;479067:828;;;;471467:4;470446:1032;:::o;288366:131::-;288432:28;287020:138;288432:28;47077:87;;287083:17;47077:87;287020:138;;:::i;287826:316::-;86062:9;288120:10;80152:4;80123:35;80152:4;80123:35;;:::i;:::-;53844:73;;;;;322824:2;50991:88;288120:10;;:::i;:::-;287826:316;;;;;479067:828;479437:49;;;483557:3627;479437:49;;483557:3627;;479607:59;;483557:3627;479607:59;;;483557:3627;;;;;;;:::i;:::-;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;254572:10;483557:3627;;;;;:::i;:::-;;86062:9;483557:3627;;;;80152:4;483557:3627;80123:35;80152:4;80123:35;;:::i;:::-;53844:73;;;;;483557:3627;;;322824:2;50991:88;;;;254572:10;:::i;:::-;254593:388;;;246053:456;-1:-1:-1;246053:456:0;483557:3627;-1:-1:-1;246053:456:0;;;;;;;;;;;;;;-1:-1:-1;246053:456:0;483557:3627;246053:456;483557:3627;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;-1:-1:-1;244514:401:0;384544:60;245103:1;384544:60;483557:3627;;;;;;;:::i;:::-;;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;-1:-1:-1;244514:401:0;245415:48;483557:3627;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;;-1:-1:-1;244514:401:0;252573:20;322824:2;50991:88;483557:3627;;;;:::i;:::-;252803:17;252792:28;;252803:17;;245253:49;;483557:3627;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;-1:-1:-1;244514:401:0;;483557:3627;;;253010:22;;;;;483557:3627;;;;258937:8;483557:3627;;;;;;;;248779:27;483557:3627;;;322824:2;483557:3627;322824:2;;;50991:88;322824:2;248930:28;52168:89;;;;;;;;322824:2;;483557:3627;248996:58;483557:3627;;;322824:2;483557:3627;253006:325;483557:3627;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;258937:8;244514:401;;-1:-1:-1;244514:401:0;483557:3627;;322824:2;;50991:88;254704:24;;;;254700:134;;244318:99;;;;;;:::i;254700:134::-;483557:3627;-1:-1:-1;246053:456:0;;246788:46;;483557:3627;244514:401;;;;;;;;;;;;;-1:-1:-1;244514:401:0;384544:60;483557:3627;384544:60;483557:3627;;-1:-1:-1;;;;;483557:3627:0;254809:9;:::i;253006:325::-;258937:8;254012:26;;;253963:86;254012:26;;;;;483557:3627;;322824:2;483557:3627;253963:86;;;:::i;:::-;483557:3627;;;;;253006:325;;252788:734;253963:86;483557:3627;;;258937:8;483557:3627;;;;;;;:::i;:::-;253383:22;47077:87;;;;;;;254012:26;;;322824:2;483557:3627;253963:86;;:::i;:::-;483557:3627;;252788:734;;254593:388;244080:104;;;;;;:::i;479433:462::-;479764:49;;;483557:3627;479764:49;483557:3627;;452351:1895;;;-1:-1:-1;;452351:1895:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;454294:24;452351:1895;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;454294:24;:::i;:::-;454387:99;452351:1895;454387:99;;450336:4;454865:2;483557:3627;;;;;454888:9;-1:-1:-1;;483557:3627:0;455063:343;;;;;;;;452351:1895;455063:343;421129:130;;452351:1895;421129:130;455601:4;413077:1012;455601:4;413077:1012;454907:1348;;455063:343;452351:1895;455063:343;;452351:1895;455063:343;;;;;;;;;;;;452351:1895;455063:343;450336:4;455063:343;452351:1895;455063:343;;;;;;;;450336:4;455493:6;;;;455782:9;455601:4;417138:76;;413077:1012;452351:1895;413077:1012;;;;;;;;;;483557:3627;413077:1012;;;;;;;;;;421129:130;455601:4;;47077:87;;;;;;;421129:130;421268:237;;;;421295:16;;:::i;:::-;455545:305;;455878:30;-1:-1:-1;2513:62:0;455864:381;;454907:1348;;;455545:305;455830:5;;;;;;;;;;;;;;;471467:4;470446:1032;:::o;421268:237::-;483557:3627;413077:1012;414521:77;421268:237;;192935:1486;;;;193060:1355;192935:1486;-1:-1:-1;;;;;193060:1355:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;192935:1486::o;193060:1355::-;;;;;;;;;;;;;-1:-1:-1;193060:1355:0;;;;;278477:1886;;;;-1:-1:-1;;;;;483557:3627:0;;418435:26;411445:42;418435:26;;3459:42;429188:35;;2513:62;284148:42;284409:25;;2513:62;278601:78;;-1:-1:-1;;;;;;;483557:3627:0;;;86142:42;278771:33;;86142:42;;278857:21;;;86062:9;278857:21;;322824:2;50991:88;483557:3627;;;278934:16;278930:510;278934:11;;;278974;;278970:39;;-1:-1:-1;279051:36:0;;;;;;;;;:::i;:::-;10212:8;;10208:54;;279154:7;:::o;278970:39::-;278994:15;-1:-1:-1;278994:15:0;;-1:-1:-1;278994:15:0;278930:510;341478:4;;;279214:2;341478:4;;;;;;;483557:3627;;-1:-1:-1;279199:113:0;;279329:97;-1:-1:-1;279329:97:0;279214:2;279329:97;;;;;;278767:1353;280153:38;;;;;;;;;;:::i;:::-;10212:8;;10208:54;;483557:3627;280285:22;:47;;;;278767:1353;280281:75;;;278477:1886::o;280281:75::-;280341:15;-1:-1:-1;280341:15:0;;-1:-1:-1;280341:15:0;280285:47;280311:16;;;:21;280285:47;;;278767:1353;279460:32;;;;;;;;;279456:664;279460:32;;;279554:11;;;279550:39;;-1:-1:-1;279456:664:0;;;278767:1353;;279456:664;80123:35;80152:4;;;;;;80123:35;;:::i;:::-;53844:73;;;;;;-1:-1:-1;;184423:248:0;53844:73;116938:165;;;;;;;;;;;-1:-1:-1;108058:126:0;;;279701:66;;:::i;:::-;108058:126;341478:4;;;;;;;483557:3627;;-1:-1:-1;279782:105:0;;279900:90;;-1:-1:-1;279900:90:0;;108058:126;279900:90;;;;;;280007:26;280003:107;;279456:664;;;;278767:1353;;280003:107;280088:6;;;:::i;:::-;280003:107;;;;;84679:1241;84800:913;;;;;;;;;;;;;;;-1:-1:-1;84800:913:0;;;;;;;;;;;;;-1:-1:-1;84800:913:0;;;;85727:18;;85723:191;;84679:1241;;;:::o;85723:191::-;85885:17;85765:14;85761:83;;85885:17;:::i;:::-;84679:1241::o;85761:83::-;85799:30;;;;:::i;:::-;85885:17;:::i;84800:913::-;;;-1:-1:-1;84800:913:0;;;;;201089:1517;;;;;;;;;;201447:2;483557:3627;;;;;;201447:2;483557:3627;;;;;;;201447:2;483557:3627;;;;;;201447:2;483557:3627;;;;;;;384544:60;201519:3;384544:60;201556:19;;384544:60;201519:3;384544:60;201532:19;;384544:60;201519:3;384544:60;201503:24;;86062:9;201487:11;;2513:62;;;201482:159;;201650:950;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;483557:3627;201650:950;;;;;;;;;;;;;;;;;;;;201089:1517::o;:::-;;;;;;;;;;201447:2;483557:3627;;;;;;201447:2;483557:3627;;;;;;;201447:2;483557:3627;;;;;;201447:2;483557:3627;;;;;;;384544:60;201519:3;384544:60;201556:19;;384544:60;201519:3;384544:60;201532:19;;384544:60;201519:3;384544:60;201503:24;;86062:9;201487:11;;2513:62;;;201482:159;;201650:950;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;483557:3627;201650:950;;;;;;;;;;;;;;;;;;;;201089:1517::o;83163:1510::-;83245:1422;;-1:-1:-1;83163:1510:0;;83245:1422;83163:1510;83245:1422;;;;;;;;;;;;;;;;;;;-1:-1:-1;83245:1422:0;;;;;;;-1:-1:-1;83245:1422:0;;83163:1510::o;83245:1422::-;;-1:-1:-1;83245:1422:0;;;;83163:1510;83245:1422;;;83163:1510;;83245:1422;83163:1510;83245:1422;;184423:248;;83245:1422;;;;;;;;;;;;;;;;;;;;;;;;;;;83163:1510::o;243182:766::-;243335:607;243182:766;243335:607;243182:766;;243335:607;243182:766;243335:607;;;483557:3627;243335:607;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;243182:766;:::o;:::-;243335:607;243182:766;243335:607;243182:766;;243335:607;243182:766;243335:607;;;483557:3627;243335:607;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;243182:766;:::o;48936:740::-;49287:387;;;48936:740;49287:387;48936:740;49287:387;;;;;;;;;;;;;;;;;;;48936:740::o;249577:1572::-;258937:8;483557:3627;;;;249577:1572;322824:2;;483557:3627;;;322824:2;;;;50991:88;;;483557:3627;;322824:2;;483557:3627;;250240:11;;;;;-1:-1:-1;483557:3627:0;;250048:4;;258937:8;;250236:183;322824:2;;;;483557:3627;322824:2;;;483557:3627;250597:27;250048:4;483557:3627;;;;247370:5;;247389:98;247396:5;;;;;;322824:2;258937:8;322824:2;;;;250048:4;322824:2;250761:17;250792:139;;;;483557:3627;250792:139;322824:2;52168:89;;;;;;;;;249577:1572;:::o;250792:139::-;483557:3627;;250792:139;;247389:98;247421:5;-1:-1:-1;50991:88:0;;;483557:3627;;250048:4;483557:3627;247389:98;;250236:183;483557:3627;;;;258937:8;-1:-1:-1;250236:183:0;;;;;;297887:1355;86250:88;-1:-1:-1;;;;;483557:3627:0;;86250:88;;;483557:3627;;298071:10;298084;298071;;298084;:::i;297990:1246::-;298282:475;;;;;;;;;;;;;;;;;;;;;;;;298840:10;417138:76;;413077:1012;86250:88;413077:1012;;;;;;;;;298840:10;483557:3627;298840:10;;413077:1012;298840:10;413077:1012;;;419935:31;;;;;298840:10;;419935:31;;;;:::i;:::-;10212:8;;10208:54;;420017:16;;:::i;:::-;419935:31;298932:294;;297990:1246;297887:1355::o","linkReferences":{},"cborAuxdata":{},"immutableReferences":{"21447":[{"start":10586,"length":32}]},"transformations":[{"id":"21447","type":"replace","offset":10586,"reason":"immutable"}],"transformationValues":{"immutables":{"21447":"0x11c311bbf9e46313a50034f62fc51e2fcb2bc140420484728aed15298e118e97"}}},"deployment":{"transactionHash":"0x6050acc28c4cf57fa5576be05fce3940f16a35b887cacc9c9fffefffa64f17a2","blockNumber":"26304853","transactionIndex":"182","deployer":"0xEf37aD2BACD70119F141140f7B5E46Cd53a65fc4"},"sources":{"src/flat/MainnetTakerSubmittedFlat.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.34 >=0.6.2 >=0.8.25 ^0.8.0 ^0.8.25;\n\n// src/core/univ3forks/Aero.sol\n\naddress constant aeroBaseFactory = 0x9CB220581b91b0C83223012FE69688b92aD07a76;\naddress constant aeroOptimismFactory = 0xfeaB42D90055db3a0616249f76B6002D72266778;\naddress constant aeroArbitrumFactory = 0x88a60ee77392577c355C0acb2A8d476D5a4EC03a;\naddress constant aeroMainnetFactory = 0xF4Fd2E6c5B60c5b365cd1B96DD6245E6D60414c2;\naddress constant aeroInkFactory = 0x7660BF2aDefC687C22906112ca323d60A00358cF;\naddress constant aeroRobinHoodFactory = 0xc63d7338c178e805c544B8f897066bD3BBcBE136;\naddress constant aeroArcFactory = 0x7F83235643181E440433400a027618Cd50879751;\nbytes32 constant aeroInitHash = 0x3e77b70b9c4ce644601ed4aab19834375c6a9a2bca7adeb89a7bdd5fd8eb0a7d; // ERC1167 proxy targeting 0x1642634C8CB1C9f1B84c9a1a08534F8c3F4E89f8\nuint8 constant aeroForkId = 50;\n\n// src/core/univ3forks/Algebra.sol\n\nbytes32 constant algebraV4InitHash = 0xf96d2474815c32e070cd63233f06af5413efc5dcb430aee4ff18cc29007c562d;\n\ninterface IAlgebraCallback {\n    function algebraSwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external;\n}\n\n// src/vendor/Clz.sol\n\nlibrary Clz {\n    /// @dev Count leading zeros.\n    /// Returns the number of zeros preceding the most significant one bit.\n    /// If `x` is zero, returns 256.\n    function clz(uint256 x) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := clz(x)\n        }\n    }\n\n    function bitLength(uint256 x) internal pure returns (uint256) {\n        unchecked {\n            return 256 - clz(x);\n        }\n    }\n}\n\n// src/Context.sol\n\nabstract contract AbstractContext {\n    function _msgSender() internal view virtual returns (address);\n\n    function _msgData() internal view virtual returns (bytes calldata);\n\n    function _isForwarded() internal view virtual returns (bool);\n}\n\nabstract contract Context is AbstractContext {\n    function _msgSender() internal view virtual override returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual override returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _isForwarded() internal view virtual override returns (bool) {\n        return false;\n    }\n}\n\n// src/deployer/DeployerAddress.sol\n\naddress constant DEPLOYER = 0x00000000000004533Fe15556B1E086BB1A72cEae;\n\n// src/utils/FastLogic.sol\n\nlibrary FastLogic {\n    function or(bool a, bool b) internal pure returns (bool r) {\n        assembly (\"memory-safe\") {\n            r := or(a, b)\n        }\n    }\n\n    function and(bool a, bool b) internal pure returns (bool r) {\n        assembly (\"memory-safe\") {\n            r := mul(a, lt(0x00, b))\n        }\n    }\n\n    function andNot(bool a, bool b) internal pure returns (bool r) {\n        assembly (\"memory-safe\") {\n            r := mul(a, iszero(b))\n        }\n    }\n\n    function toUint(bool b) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := lt(0x00, b)\n        }\n    }\n}\n\n// src/utils/FreeMemory.sol\n\nabstract contract FreeMemory {\n    modifier DANGEROUS_freeMemory() {\n        uint256 freeMemPtr;\n        assembly (\"memory-safe\") {\n            freeMemPtr := mload(0x40)\n        }\n        _;\n        assembly (\"memory-safe\") {\n            mstore(0x40, freeMemPtr)\n        }\n    }\n}\n\n// src/allowanceholder/IAllowanceHolder.sol\n\nIAllowanceHolder constant ALLOWANCE_HOLDER = IAllowanceHolder(0x0000000000001fF3684f28c67538d4D072C22734);\n\ninterface IAllowanceHolder {\n    /// @notice Executes against `target` with the `data` payload. Prior to execution, token permits\n    ///         are temporarily stored for the duration of the transaction. These permits can be\n    ///         consumed by the `operator` during the execution\n    /// @notice `operator` consumes the funds during its operations by calling back into\n    ///         `AllowanceHolder` with `transferFrom`, consuming a token permit.\n    /// @dev Neither `exec` nor `transferFrom` check that `token` contains code.\n    /// @dev msg.sender is forwarded to target appended to the msg data (similar to ERC-2771)\n    /// @param operator An address which is allowed to consume the token permits\n    /// @param token The ERC20 token the caller has authorised to be consumed\n    /// @param amount The quantity of `token` the caller has authorised to be consumed\n    /// @param target A contract to execute operations with `data`\n    /// @param data The data to forward to `target`\n    /// @return result The returndata from calling `target` with `data`\n    /// @notice If calling `target` with `data` reverts, the revert is propagated\n    function exec(address operator, address token, uint256 amount, address payable target, bytes calldata data)\n        external\n        payable\n        returns (bytes memory result);\n\n    /// @notice The counterpart to `exec` which allows for the consumption of token permits later\n    ///         during execution\n    /// @dev *DOES NOT* check that `token` contains code. This function vacuously succeeds if\n    ///      `token` is empty.\n    /// @dev can only be called by the `operator` previously registered in `exec`\n    /// @param token The ERC20 token to transfer\n    /// @param owner The owner of tokens to transfer\n    /// @param recipient The destination/beneficiary of the ERC20 `transferFrom`\n    /// @param amount The quantity of `token` to transfer`\n    /// @return true\n    function transferFrom(address token, address owner, address recipient, uint256 amount) external returns (bool);\n}\n\n// src/interfaces/IAttestation.sol\n\ninterface IAttestation {\n    function attestation()\n        external\n        view\n        returns (address taker, bytes12 zid, string memory appid, address authority, uint40 deadline);\n}\n\n// lib/permit2/src/interfaces/IEIP712.sol\n\ninterface IEIP712 {\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n\n// lib/forge-std/src/interfaces/IERC20.sol\n\n/// @dev Interface of the ERC20 standard as defined in the EIP.\n/// @dev This includes the optional name, symbol, and decimals metadata.\ninterface IERC20 {\n    /// @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`).\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /// @dev Emitted when the allowance of a `spender` for an `owner` is set, where `value`\n    /// is the new allowance.\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /// @notice Returns the amount of tokens in existence.\n    function totalSupply() external view returns (uint256);\n\n    /// @notice Returns the amount of tokens owned by `account`.\n    function balanceOf(address account) external view returns (uint256);\n\n    /// @notice Moves `amount` tokens from the caller's account to `to`.\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    /// @notice Returns the remaining number of tokens that `spender` is allowed\n    /// to spend on behalf of `owner`\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /// @notice Sets `amount` as the allowance of `spender` over the caller's tokens.\n    /// @dev Be aware of front-running risks: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /// @notice Moves `amount` tokens from `from` to `to` using the allowance mechanism.\n    /// `amount` is then deducted from the caller's allowance.\n    function transferFrom(address from, address to, uint256 amount) external returns (bool);\n\n    /// @notice Returns the name of the token.\n    function name() external view returns (string memory);\n\n    /// @notice Returns the symbol of the token.\n    function symbol() external view returns (string memory);\n\n    /// @notice Returns the decimals places of the token.\n    function decimals() external view returns (uint8);\n}\n\n// src/IERC721Owner.sol\n\ninterface IERC721Owner {\n    function ownerOf(uint256) external view returns (address);\n}\n\n// src/core/univ3forks/Nami.sol\n\n// Algebra pools use the pool deployer, rather than the factory, for CREATE2 derivation.\naddress constant namiMainnetFactory = 0x86641A77A1172c3CE65bCE52aE91BDADEf0f74c2;\naddress constant namiBaseFactory = 0x79Ea2E90590089bbD13A0C6B5593D71C9E6f78ad;\naddress constant namiRobinhoodFactory = 0xC75fbF81cc29d71589bE9D3c70E6a4eDC41Ac6BC;\nbytes32 constant namiInitHash = 0x62441ebe4e4315cf3d49d5957f94d66b253dbabe7006f34ad7f70947e60bf15c;\nuint8 constant namiForkId = 49;\n\n// src/core/univ3forks/PancakeSwapV3.sol\n\naddress constant pancakeSwapV3Factory = 0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9;\nbytes32 constant pancakeSwapV3InitHash = 0x6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2;\nuint8 constant pancakeSwapV3ForkId = 1;\n\ninterface IPancakeSwapV3Callback {\n    function pancakeV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external;\n}\n\n// src/utils/Panic.sol\n\nlibrary Panic {\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71) // selector for `Panic(uint256)`\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\n\n    // https://docs.soliditylang.org/en/latest/control-structures.html#panic-via-assert-and-error-via-require\n    uint8 internal constant GENERIC = 0x00;\n    uint8 internal constant ASSERT_FAIL = 0x01;\n    uint8 internal constant ARITHMETIC_OVERFLOW = 0x11;\n    uint8 internal constant DIVISION_BY_ZERO = 0x12;\n    uint8 internal constant ENUM_CAST = 0x21;\n    uint8 internal constant CORRUPT_STORAGE_ARRAY = 0x22;\n    uint8 internal constant POP_EMPTY_ARRAY = 0x31;\n    uint8 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    uint8 internal constant OUT_OF_MEMORY = 0x41;\n    uint8 internal constant ZERO_FUNCTION_POINTER = 0x51;\n}\n\n// src/utils/Revert.sol\n\nlibrary Revert {\n    function _revert(bytes memory reason) internal pure {\n        assembly (\"memory-safe\") {\n            revert(add(reason, 0x20), mload(reason))\n        }\n    }\n\n    function maybeRevert(bool success, bytes memory reason) internal pure {\n        if (!success) {\n            _revert(reason);\n        }\n    }\n}\n\n// src/core/univ3forks/RubiconCLMM.sol\n\naddress constant rubiconCLMMFactory = 0xDf62D9e51d7c08360dcd41931A2e6B97FF8C73E8;\nbytes32 constant rubiconCLMMInitHash = 0xd3e7f58b9af034cfa7a0597e539bae7c6b393817a47a6fc1e1503cd6eaffe22a;\nuint8 constant rubiconCLMMForkId = 47;\n\n// src/vendor/Sqrt.sol\n\n// @author Modified from Solady by Vectorized and Akshay Tarpara https://github.com/Vectorized/solady/blob/1198c9f70b30d472a7d0ec021bec080622191b03/src/utils/clz/FixedPointMathLib.sol#L769-L797 under the MIT license.\nlibrary Sqrt {\n    /// @dev Returns the square root of `x`, rounded maybe-up maybe-down. For expert use only.\n    function _sqrt(uint256 x) private pure returns (uint256 z) {\n        assembly (\"memory-safe\") {\n            // Initial guess z = 2^⌊(n+1)/2⌋ where n = ⌊log₂(x)⌋. This seed gives ε₁ = 0.0607 after\n            // one Babylonian step for all inputs. With ε_{n+1} ≈ ε²/2, 6 steps yield 2⁻¹⁶⁰ relative\n            // error (>128 correct bits).\n            z := shl(shr(1, sub(256, clz(x))), 1)\n\n            // 6 Babylonian steps\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n        }\n    }\n\n    /// @dev Returns the square root of `x`, rounded down.\n    function sqrt(uint256 x) internal pure returns (uint256 z) {\n        z = _sqrt(x);\n        assembly (\"memory-safe\") {\n            // If `x+1` is a perfect square, the Babylonian method oscillates between ⌊√x⌋ and\n            // ⌈√x⌉. Floor it. See:\n            // https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\n            z := sub(z, lt(div(x, z), z))\n        }\n    }\n\n    /// @dev Returns the square root of `x`, rounded up.\n    function sqrtUp(uint256 x) internal pure returns (uint256 z) {\n        z = _sqrt(x);\n        assembly (\"memory-safe\") {\n            // `mul(z, z)` can overflow when `x == type(uint256).max`. This is because `_sqrt(x)`\n            // can return ⌈√x⌉ when `x + 1` is square. An overflow in `zz` causes a spurious\n            // round-up (`z` is already rounded up) and causes the result to be `2**128 + 1`, an\n            // off-by-one. To compensate, we detect this overflow and avoid rounding.\n            let zz := mul(z, z)\n            z := add(gt(lt(zz, x), lt(zz, z)), z)\n        }\n    }\n}\n\n// src/core/univ3forks/SushiswapV3.sol\n\naddress constant sushiswapV3MainnetFactory = 0xbACEB8eC6b9355Dfc0269C18bac9d6E2Bdc29C4F;\naddress constant sushiswapV3Factory = 0xc35DADB65012eC5796536bD9864eD8773aBc74C4; // Base, Linea\naddress constant sushiswapV3ArbitrumFactory = 0x1af415a1EbA07a4986a52B6f2e7dE7003D82231e;\naddress constant sushiswapV3ArcFactory = 0x7282249282902e1f99c2CB0A04230091bd30FE3A;\n//address constant sushiswapV3AvalancheFactory = 0x3e603C14aF37EBdaD31709C4f848Fc6aD5BEc715;\n//address constant sushiswapV3BnbFactory = 0x126555dd55a39328F69400d6aE4F782Bd4C34ABb;\naddress constant sushiswapV3OptimismFactory = 0x9c6522117e2ed1fE5bdb72bb0eD5E3f2bdE7DBe0;\naddress constant sushiswapV3PolygonFactory = 0x917933899c6a5F8E37F31E19f92CdBFF7e8FF0e2;\naddress constant sushiswapV3RobinhoodFactory = 0xE51960f1B45f1C9FB6D166E6a884F866fC70433B;\nuint8 constant sushiswapV3ForkId = 2;\n\n// src/core/univ3forks/UniswapV3.sol\n\naddress constant uniswapV3MainnetFactory = 0x1F98431c8aD98523631AE4a59f267346ea31F984;\naddress constant uniswapV3SepoliaFactory = 0x0227628f3F023bb0B980b67D528571c95c6DaC1c;\naddress constant uniswapV3BaseFactory = 0x33128a8fC17869897dcE68Ed026d694621f6FDfD;\naddress constant uniswapV3BnbFactory = 0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7;\naddress constant uniswapV3AvalancheFactory = 0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD;\naddress constant uniswapV3LineaFactory = 0x31FAfd4889FA1269F7a13A66eE0fB458f27D72A9;\naddress constant uniswapV3WorldChainFactory = 0x7a5028BDa40e7B173C278C5342087826455ea25a;\naddress constant uniswapV3InkFactory = 0x640887A9ba3A9C53Ed27D0F7e8246A4F933f3424;\naddress constant uniswapV3UnichainFactory = 0x1F98400000000000000000000000000000000003; // https://github.com/Uniswap/contracts/blob/main/deployments/130.md#fri-nov-08-2024\naddress constant uniswapV3PlasmaFactory = 0xcb2436774C3e191c85056d248EF4260ce5f27A9D;\naddress constant uniswapV3MonadFactory = 0x204FAca1764B154221e35c0d20aBb3c525710498;\naddress constant uniswapV3AbstractFactory = 0xA1160e73B63F322ae88cC2d8E700833e71D0b2a1;\naddress constant uniswapV3TempoFactory = 0x24a3d4757E330890A8b8978028c9e58E04611fd6;\naddress constant uniswapV3RobinhoodFactory = 0x1f7d7550B1b028f7571E69A784071F0205FD2EfA;\naddress constant uniswapV3ArcFactory = 0xf0db7b58379503491d857dB50AC9ece64c653918;\n\nbytes32 constant uniswapV3InitHash = 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54;\n// This isn't a \"hash\" inasmuch as it's a versioned discriminator\n// ref: https://web.archive.org/web/20251108134721/https://matter-labs.github.io/zksync-era/core/latest/guides/advanced/12_alternative_vm_intro.html#bytecode-hashes\nbytes32 constant uniswapV3InitHashEraVm = 0x010013f177ea1fcbc4520f9a3ca7cd2d1d77959e05aa66484027cb38e712aeed;\nuint8 constant uniswapV3ForkId = 0;\n\ninterface IUniswapV3Callback {\n    function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external;\n}\n\n// src/utils/Cuid.sol\n\nlibrary Cuid {\n    using Clz for uint256;\n\n    // CUIDv1: https://github.com/paralleldrive/cuid/blob/master/index.js\n    // The integer encodes the base-36 text after `c`. The timestamp has no leading zeros;\n    // the counter, fingerprint, and random suffix occupy exactly 16 characters.\n    function decode(uint128 packed) internal pure returns (string memory result) {\n        uint256 digits;\n        // Assembly converts independent groups of base-36 digits in one word without temporary memory.\n        // result = \"c\" + base36(packed, minDigits=17).\n        assembly (\"memory-safe\") {\n            packed := and(0xffffffffffffffffffffffffffffffff, packed)\n            // 0x81bf1000 = 36**6 fits in 32 bits; 64-bit lanes also hold each reciprocal product below.\n            // Four lanes take 24 digits. The remainder is at most floor(2**128 / 36**24) = 15: one digit.\n            let sextets := mod(packed, 0x81bf1000)\n            packed := div(packed, 0x81bf1000)\n            sextets := or(shl(0x40, mod(packed, 0x81bf1000)), sextets)\n            packed := div(packed, 0x81bf1000)\n            sextets := or(shl(0x80, mod(packed, 0x81bf1000)), sextets)\n            packed := div(packed, 0x81bf1000)\n            sextets := or(shl(0xc0, mod(packed, 0x81bf1000)), sextets)\n            packed := div(packed, 0x81bf1000)\n\n            // floor(x / d) = (x * ceil(2**s / d)) >> s when (d * ceil(2**s / d) - 2**s) * x < 2**s.\n            // For x < 36**6, d = 36**3, s = 46: 0x59e60383 = ceil(2**46 / 36**3) and the error factor is\n            // 704. Products fit in 64 bits. Each quotient is below 36**3 < 2**16, so 0xffff separates it\n            // from the next lane's product.\n            let upperTriples :=\n                and(mul(0xffff, div(not(0x00), 0xffffffffffffffff)), shr(0x2e, mul(0x59e60383, sextets)))\n            // Adding (2**32 - 36**3) * quotient splits each 64-bit lane into two 32-bit lanes of three digits.\n            let triples := add(mul(0xffff49c0, upperTriples), sextets)\n\n            // For x < 36**3, d = 36, s = 21: 0xe38f = ceil(2**21 / 36) and the error factor is 28.\n            // Products fit in 32 bits. Each quotient is below 36**2 < 2**11, so 0x7ff separates it from\n            // the next lane's product.\n            let mask := mul(0x7ff, div(not(0x00), 0xffffffff))\n            let highPairs := and(mask, shr(0x15, mul(0xe38f, triples)))\n            let highDigits := and(mask, shr(0x15, mul(0xe38f, highPairs)))\n            // x + (256 - 36) * (x / 36 + 256 * (x / 36**2)) places each base-36 digit in one byte.\n            digits := add(mul(0xdc, add(shl(0x08, highDigits), highPairs)), triples)\n\n            // Each 32-bit lane holds three digit bytes under a zero byte. Three merges drop the zero\n            // bytes: lanes of 3+1 bytes become 6+2, then 12+4, then 24+8.\n            mask := mul(0xffffff, div(not(0x00), 0xffffffffffffffff))\n            digits := or(and(mask, digits), shr(0x08, and(not(mask), digits)))\n            mask := 0xffffffffffff00000000000000000000ffffffffffff\n            digits := or(and(mask, digits), shr(0x10, and(not(mask), digits)))\n            mask := 0xffffffffffffffffffffffff\n            digits := or(and(mask, digits), shr(0x20, and(not(mask), digits)))\n            digits := or(shl(0xc0, packed), digits)\n        }\n\n        uint256 length;\n        unchecked {\n            // 17 digits minimum, plus every byte up to the highest nonzero one above them.\n            length = 17 + (((digits >> 136).bitLength() + 7) >> 3);\n        }\n\n        assembly (\"memory-safe\") {\n            let ones := div(not(0x00), 0xff)\n            // Digits are at most 35: adding 118 sets bit 7 exactly for letters, without byte carries.\n            let letters := and(ones, shr(0x07, add(mul(0x76, ones), digits)))\n            digits := add(mul(0x30, ones), add(mul(0x27, letters), digits))\n            // The byte before the first digit is '0'; 0x30 ^ 0x53 = 'c'.\n            digits := xor(shl(shl(0x03, length), 0x53), digits)\n            length := add(0x01, length)\n            result := mload(0x40)\n            mstore(result, length)\n            mstore(add(0x20, result), shl(sub(0x100, shl(0x03, length)), digits))\n            mstore(0x40, add(0x40, result))\n        }\n    }\n}\n\n// src/interfaces/IERC2612.sol\n\ninterface IERC20PermitCommon is IERC20 {\n    function nonces(address owner) external view returns (uint256);\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n\ninterface IERC2612 is IERC20PermitCommon {\n    function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)\n        external;\n}\n\ninterface IDAIStylePermit is IERC20PermitCommon {\n    function permit(\n        address holder,\n        address spender,\n        uint256 nonce,\n        uint256 expiry,\n        bool allowed,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n}\n\n// lib/forge-std/src/interfaces/IERC4626.sol\n\n/// @dev Interface of the ERC4626 \"Tokenized Vault Standard\", as defined in\n/// https://eips.ethereum.org/EIPS/eip-4626\ninterface IERC4626 is IERC20 {\n    event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);\n\n    event Withdraw(\n        address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares\n    );\n\n    /// @notice Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.\n    /// @dev\n    /// - MUST be an ERC-20 token contract.\n    /// - MUST NOT revert.\n    function asset() external view returns (address assetTokenAddress);\n\n    /// @notice Returns the total amount of the underlying asset that is “managed” by Vault.\n    /// @dev\n    /// - SHOULD include any compounding that occurs from yield.\n    /// - MUST be inclusive of any fees that are charged against assets in the Vault.\n    /// - MUST NOT revert.\n    function totalAssets() external view returns (uint256 totalManagedAssets);\n\n    /// @notice Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal\n    /// scenario where all the conditions are met.\n    /// @dev\n    /// - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\n    /// - MUST NOT show any variations depending on the caller.\n    /// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\n    /// - MUST NOT revert.\n    ///\n    /// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the\n    /// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and\n    /// from.\n    function convertToShares(uint256 assets) external view returns (uint256 shares);\n\n    /// @notice Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal\n    /// scenario where all the conditions are met.\n    /// @dev\n    /// - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\n    /// - MUST NOT show any variations depending on the caller.\n    /// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\n    /// - MUST NOT revert.\n    ///\n    /// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the\n    /// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and\n    /// from.\n    function convertToAssets(uint256 shares) external view returns (uint256 assets);\n\n    /// @notice Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,\n    /// through a deposit call.\n    /// @dev\n    /// - MUST return a limited value if receiver is subject to some deposit limit.\n    /// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.\n    /// - MUST NOT revert.\n    function maxDeposit(address receiver) external view returns (uint256 maxAssets);\n\n    /// @notice Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given\n    /// current on-chain conditions.\n    /// @dev\n    /// - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit\n    ///   call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called\n    ///   in the same transaction.\n    /// - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the\n    ///   deposit would be accepted, regardless if the user has enough tokens approved, etc.\n    /// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\n    /// - MUST NOT revert.\n    ///\n    /// NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in\n    /// share price or some other type of condition, meaning the depositor will lose assets by depositing.\n    function previewDeposit(uint256 assets) external view returns (uint256 shares);\n\n    /// @notice Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.\n    /// @dev\n    /// - MUST emit the Deposit event.\n    /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\n    ///   deposit execution, and are accounted for during deposit.\n    /// - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not\n    ///   approving enough underlying tokens to the Vault contract, etc).\n    ///\n    /// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.\n    function deposit(uint256 assets, address receiver) external returns (uint256 shares);\n\n    /// @notice Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.\n    /// @dev\n    /// - MUST return a limited value if receiver is subject to some mint limit.\n    /// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.\n    /// - MUST NOT revert.\n    function maxMint(address receiver) external view returns (uint256 maxShares);\n\n    /// @notice Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given\n    /// current on-chain conditions.\n    /// @dev\n    /// - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call\n    ///   in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the\n    ///   same transaction.\n    /// - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint\n    ///   would be accepted, regardless if the user has enough tokens approved, etc.\n    /// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\n    /// - MUST NOT revert.\n    ///\n    /// NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in\n    /// share price or some other type of condition, meaning the depositor will lose assets by minting.\n    function previewMint(uint256 shares) external view returns (uint256 assets);\n\n    /// @notice Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.\n    /// @dev\n    /// - MUST emit the Deposit event.\n    /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint\n    ///   execution, and are accounted for during mint.\n    /// - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not\n    ///   approving enough underlying tokens to the Vault contract, etc).\n    ///\n    /// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.\n    function mint(uint256 shares, address receiver) external returns (uint256 assets);\n\n    /// @notice Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the\n    /// Vault, through a withdrawal call.\n    /// @dev\n    /// - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\n    /// - MUST NOT revert.\n    function maxWithdraw(address owner) external view returns (uint256 maxAssets);\n\n    /// @notice Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,\n    /// given current on-chain conditions.\n    /// @dev\n    /// - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw\n    ///   call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if\n    ///   called\n    ///   in the same transaction.\n    /// - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though\n    ///   the withdrawal would be accepted, regardless if the user has enough shares, etc.\n    /// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\n    /// - MUST NOT revert.\n    ///\n    /// NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in\n    /// share price or some other type of condition, meaning the depositor will lose assets by depositing.\n    function previewWithdraw(uint256 assets) external view returns (uint256 shares);\n\n    /// @notice Burns shares from owner and sends exactly assets of underlying tokens to receiver.\n    /// @dev\n    /// - MUST emit the Withdraw event.\n    /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\n    ///   withdraw execution, and are accounted for during withdrawal.\n    /// - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner\n    ///   not having enough shares, etc).\n    ///\n    /// Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\n    /// Those methods should be performed separately.\n    function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);\n\n    /// @notice Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,\n    /// through a redeem call.\n    /// @dev\n    /// - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\n    /// - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.\n    /// - MUST NOT revert.\n    function maxRedeem(address owner) external view returns (uint256 maxShares);\n\n    /// @notice Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,\n    /// given current on-chain conditions.\n    /// @dev\n    /// - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call\n    ///   in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the\n    ///   same transaction.\n    /// - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the\n    ///   redemption would be accepted, regardless if the user has enough shares, etc.\n    /// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\n    /// - MUST NOT revert.\n    ///\n    /// NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in\n    /// share price or some other type of condition, meaning the depositor will lose assets by redeeming.\n    function previewRedeem(uint256 shares) external view returns (uint256 assets);\n\n    /// @notice Burns exactly shares from owner and sends assets of underlying tokens to receiver.\n    /// @dev\n    /// - MUST emit the Withdraw event.\n    /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\n    ///   redeem execution, and are accounted for during redeem.\n    /// - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner\n    ///   not having enough shares, etc).\n    ///\n    /// NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\n    /// Those methods should be performed separately.\n    function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);\n}\n\n// src/interfaces/INativeMetaTransaction.sol\n\ninterface INativeMetaTransaction {\n    function executeMetaTransaction(\n        address userAddress,\n        bytes memory functionSignature,\n        bytes32 sigR,\n        bytes32 sigS,\n        uint8 sigV\n    ) external payable returns (bytes memory);\n    function getNonce(address userAddress) external view returns (uint256);\n    function getDomainSeperator() external view returns (bytes32);\n}\n\ninterface IERC20MetaTransaction is INativeMetaTransaction, IERC20 {}\n\n// src/interfaces/ISettlerBase.sol\n\ninterface ISettlerBase {\n    struct AllowedSlippage {\n        address payable recipient;\n        IERC20 buyToken;\n        uint256 minAmountOut;\n    }\n}\n\n// lib/permit2/src/interfaces/ISignatureTransfer.sol\n\n/// @title SignatureTransfer\n/// @notice Handles ERC20 token transfers through signature based actions\n/// @dev Requires user's token approval on the Permit2 contract\ninterface ISignatureTransfer is IEIP712 {\n    /// @notice Thrown when the requested amount for a transfer is larger than the permissioned amount\n    /// @param maxAmount The maximum amount a spender can request to transfer\n    error InvalidAmount(uint256 maxAmount);\n\n    /// @notice Thrown when the number of tokens permissioned to a spender does not match the number of tokens being transferred\n    /// @dev If the spender does not need to transfer the number of tokens permitted, the spender can request amount 0 to be transferred\n    error LengthMismatch();\n\n    /// @notice Emits an event when the owner successfully invalidates an unordered nonce.\n    event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 mask);\n\n    /// @notice The token and amount details for a transfer signed in the permit transfer signature\n    struct TokenPermissions {\n        // ERC20 token address\n        address token;\n        // the maximum amount that can be spent\n        uint256 amount;\n    }\n\n    /// @notice The signed permit message for a single token transfer\n    struct PermitTransferFrom {\n        TokenPermissions permitted;\n        // a unique value for every token owner's signature to prevent signature replays\n        uint256 nonce;\n        // deadline on the permit signature\n        uint256 deadline;\n    }\n\n    /// @notice Specifies the recipient address and amount for batched transfers.\n    /// @dev Recipients and amounts correspond to the index of the signed token permissions array.\n    /// @dev Reverts if the requested amount is greater than the permitted signed amount.\n    struct SignatureTransferDetails {\n        // recipient address\n        address to;\n        // spender requested amount\n        uint256 requestedAmount;\n    }\n\n    /// @notice Used to reconstruct the signed permit message for multiple token transfers\n    /// @dev Do not need to pass in spender address as it is required that it is msg.sender\n    /// @dev Note that a user still signs over a spender address\n    struct PermitBatchTransferFrom {\n        // the tokens and corresponding amounts permitted for a transfer\n        TokenPermissions[] permitted;\n        // a unique value for every token owner's signature to prevent signature replays\n        uint256 nonce;\n        // deadline on the permit signature\n        uint256 deadline;\n    }\n\n    /// @notice A map from token owner address and a caller specified word index to a bitmap. Used to set bits in the bitmap to prevent against signature replay protection\n    /// @dev Uses unordered nonces so that permit messages do not need to be spent in a certain order\n    /// @dev The mapping is indexed first by the token owner, then by an index specified in the nonce\n    /// @dev It returns a uint256 bitmap\n    /// @dev The index, or wordPosition is capped at type(uint248).max\n    function nonceBitmap(address, uint256) external view returns (uint256);\n\n    /// @notice Transfers a token using a signed permit message\n    /// @dev Reverts if the requested amount is greater than the permitted signed amount\n    /// @param permit The permit data signed over by the owner\n    /// @param owner The owner of the tokens to transfer\n    /// @param transferDetails The spender's requested transfer details for the permitted token\n    /// @param signature The signature to verify\n    function permitTransferFrom(\n        PermitTransferFrom memory permit,\n        SignatureTransferDetails calldata transferDetails,\n        address owner,\n        bytes calldata signature\n    ) external;\n\n    /// @notice Transfers a token using a signed permit message\n    /// @notice Includes extra data provided by the caller to verify signature over\n    /// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition\n    /// @dev Reverts if the requested amount is greater than the permitted signed amount\n    /// @param permit The permit data signed over by the owner\n    /// @param owner The owner of the tokens to transfer\n    /// @param transferDetails The spender's requested transfer details for the permitted token\n    /// @param witness Extra data to include when checking the user signature\n    /// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash\n    /// @param signature The signature to verify\n    function permitWitnessTransferFrom(\n        PermitTransferFrom memory permit,\n        SignatureTransferDetails calldata transferDetails,\n        address owner,\n        bytes32 witness,\n        string calldata witnessTypeString,\n        bytes calldata signature\n    ) external;\n\n    /// @notice Transfers multiple tokens using a signed permit message\n    /// @param permit The permit data signed over by the owner\n    /// @param owner The owner of the tokens to transfer\n    /// @param transferDetails Specifies the recipient and requested amount for the token transfer\n    /// @param signature The signature to verify\n    function permitTransferFrom(\n        PermitBatchTransferFrom memory permit,\n        SignatureTransferDetails[] calldata transferDetails,\n        address owner,\n        bytes calldata signature\n    ) external;\n\n    /// @notice Transfers multiple tokens using a signed permit message\n    /// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition\n    /// @notice Includes extra data provided by the caller to verify signature over\n    /// @param permit The permit data signed over by the owner\n    /// @param owner The owner of the tokens to transfer\n    /// @param transferDetails Specifies the recipient and requested amount for the token transfer\n    /// @param witness Extra data to include when checking the user signature\n    /// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash\n    /// @param signature The signature to verify\n    function permitWitnessTransferFrom(\n        PermitBatchTransferFrom memory permit,\n        SignatureTransferDetails[] calldata transferDetails,\n        address owner,\n        bytes32 witness,\n        string calldata witnessTypeString,\n        bytes calldata signature\n    ) external;\n\n    /// @notice Invalidates the bits specified in mask for the bitmap at the word position\n    /// @dev The wordPos is maxed at type(uint248).max\n    /// @param wordPos A number to index the nonceBitmap at\n    /// @param mask A bitmap masked against msg.sender's current bitmap at the word position\n    function invalidateUnorderedNonces(uint256 wordPos, uint256 mask) external;\n}\n\n// src/core/SettlerErrors.sol\n\n/// @notice Thrown when an offset is not the expected value\nerror InvalidOffset();\n\n/// @notice Thrown when a SELECT candidate misses its target.\nerror Shortfall(uint256 score);\n\n/// @notice Thrown when a validating a target contract to avoid certain types of targets\nerror ConfusedDeputy();\n\nfunction revertConfusedDeputy() pure {\n    assembly (\"memory-safe\") {\n        mstore(0x00, 0xe758b8d5) // selector for `ConfusedDeputy()`\n        revert(0x1c, 0x04)\n    }\n}\n\n/// @notice Thrown when a target contract is invalid given the context\nerror InvalidTarget();\n\n/// @notice Thrown when the payout recipient's TIP-1028 receive policy would divert the transfer\nerror ReceivePolicyBlocked(address recipient);\n\n/// @notice Thrown when a transfer to a HyperCore system address would be credited to its sender instead of to the named recipient\nerror HyperCoreSystemAddress(address recipient);\n\n/// @notice Thrown when validating the caller against the expected caller\nerror InvalidSender();\n\n/// @notice Thrown in cases when using a Trusted Forwarder / AllowanceHolder is not allowed\nerror ForwarderNotAllowed();\n\n/// @notice Thrown when a signature length is not the expected length\nerror InvalidSignatureLen();\n\n/// @notice Thrown when a slippage limit is exceeded\nerror TooMuchSlippage(IERC20 token, uint256 expected, uint256 actual);\n\nfunction revertTooMuchSlippage(IERC20 buyToken, uint256 expectedBuyAmount, uint256 actualBuyAmount) pure {\n    assembly (\"memory-safe\") {\n        mstore(0x54, actualBuyAmount)\n        mstore(0x34, expectedBuyAmount)\n        mstore(0x14, buyToken)\n        mstore(0x00, 0x97a6f3b9000000000000000000000000) // selector for `TooMuchSlippage(address,uint256,uint256)` with `buyToken`'s padding\n        revert(0x10, 0x64)\n    }\n}\n\n/// @notice Thrown when a pool demands more of the sell token than the action offered\nerror ExcessiveSellAmount(IERC20 sellToken, uint256 maxSellAmount, uint256 sellAmount);\n\nfunction revertExcessiveSellAmount(IERC20 sellToken, uint256 maxSellAmount, uint256 sellAmount) pure {\n    assembly (\"memory-safe\") {\n        mstore(0x54, sellAmount)\n        mstore(0x34, maxSellAmount)\n        mstore(0x14, sellToken)\n        mstore(0x00, 0x8b115ca5000000000000000000000000) // selector for `ExcessiveSellAmount(address,uint256,uint256)` with `sellToken`'s padding\n        revert(0x10, 0x64)\n    }\n}\n\n/// @notice Thrown when a byte array that is supposed to encode a function from ISettlerActions is\n///         not recognized in context.\nerror ActionInvalid(uint256 i, bytes4 action, bytes data);\n\nfunction revertActionInvalid(uint256 i, uint256 action, bytes calldata data) pure {\n    assembly (\"memory-safe\") {\n        let ptr := mload(0x40)\n        mstore(ptr, 0x3c74eed6) // selector for `ActionInvalid(uint256,bytes4,bytes)`\n        mstore(add(0x20, ptr), i)\n        mstore(add(0x40, ptr), shl(0xe0, action)) // align as `bytes4`\n        mstore(add(0x60, ptr), 0x60) // offset to the length slot of the dynamic value `data`\n        mstore(add(0x80, ptr), data.length)\n        calldatacopy(add(0xa0, ptr), data.offset, data.length)\n        revert(add(0x1c, ptr), add(0x84, data.length))\n    }\n}\n\n/// @notice Thrown when the encoded fork ID as part of UniswapV3 fork path is not on the list of\n///         recognized forks for this chain.\nerror UnknownForkId(uint8 forkId);\n\nfunction revertUnknownForkId(uint8 forkId) pure {\n    assembly (\"memory-safe\") {\n        mstore(0x00, 0xd3b1276d) // selector for `UnknownForkId(uint8)`\n        mstore(0x20, and(0xff, forkId))\n        revert(0x1c, 0x24)\n    }\n}\n\n/// @notice Thrown when an AllowanceHolder transfer's permit is past its deadline\nerror SignatureExpired(uint256 deadline);\n\n/// @notice Thrown when selling the native asset, but `msg.value` exceeds the value from the generated quote\nerror MsgValueMismatch(uint256 expected, uint256 actual);\n\n/// @notice An internal error that should never be thrown. Thrown when a callback reenters the\n///         entrypoint and attempts to clobber the existing callback.\nerror ReentrantCallback(uint256 callbackInt);\n\n/// @notice An internal error that should never be thrown. This error can only be thrown by\n///         non-metatx-supporting Settler instances. Thrown when a callback-requiring liquidity\n///         source is called, but Settler never receives the callback.\nerror CallbackNotSpent(uint256 callbackInt);\n\n/// @notice Thrown when a metatransaction has reentrancy.\nerror ReentrantMetatransaction(bytes32 oldWitness);\n\n/// @notice Thrown when any transaction has reentrancy, not just taker-submitted or metatransaction.\nerror ReentrantPayer(address oldPayer);\n\n/// @notice An internal error that should never be thrown. Thrown when a metatransaction fails to\n///         spend a coupon.\nerror WitnessNotSpent(bytes32 oldWitness);\n\n/// @notice An internal error that should never be thrown. Thrown when the payer is unset\n///         unexpectedly.\nerror PayerSpent();\n\nerror DeltaNotPositive(IERC20 token);\nerror DeltaNotNegative(IERC20 token);\nerror ZeroSellAmount(IERC20 token);\nerror ZeroBuyAmount(IERC20 buyToken);\nerror BoughtSellToken(IERC20 sellToken);\nerror TokenHashCollision(IERC20 token0, IERC20 token1);\nerror ZeroToken();\n\n/// @notice Thrown for liquidities that require a Newton-Raphson approximation to solve their\n///         constant function when Newton-Raphson fails to converge on the solution in a\n///         \"reasonable\" number of iterations.\nerror NotConverged();\n\n/// @notice Thrown when the encoded pool manager ID as part of PancakeSwap Infinity fill is not on\n///         the list of recognized pool managers.\nerror UnknownPoolManagerId(uint8 poolManagerId);\n\nfunction revertUnknownPoolManagerId(uint256 poolManagerId) pure {\n    assembly (\"memory-safe\") {\n        mstore(0x00, 0x0a9a7da6) // selector for `UnknownPoolManagerId(uint8)`\n        mstore(0x20, and(0xff, poolManagerId))\n        revert(0x1c, 0x24)\n    }\n}\n\n/// @notice Thrown when the `msg.value` is less than the minimum expected value.\nerror Underpayment(uint256 msgValueMin, uint256 msgValueActual);\n\n/// @notice Thrown when a permit call fails.\nerror PermitFailed();\n\n/// @notice Thrown when a permit signature is incorrect\nerror InvalidSignature();\n\n/// @notice Thrown when a permit signature is expired\nerror PermitExpired();\n\n/// @notice Thrown when a permit type is unsupported\nerror UnsupportedPermitType();\n\n/// @notice Thrown when a CCIP message specifies a non-zero feeToken (only native fees are supported)\nerror InvalidFeeToken();\n\n/// @notice Thrown when a CCIP message does not have exactly 1 tokenAmounts element\nerror InvalidTokenAmountsLength();\n\n// src/utils/Ternary.sol\n\nlibrary Ternary {\n    //// All the code duplication in this file is because solc isn't smart enough to figure out that\n    //// it doesn't need to do a ton of masking when types are cast to each other without\n    //// modification.\n\n    function ternary(bool c, uint256 x, uint256 y) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := xor(x, mul(xor(x, y), iszero(c)))\n        }\n    }\n\n    function ternary(bool c, int256 x, int256 y) internal pure returns (int256 r) {\n        assembly (\"memory-safe\") {\n            r := xor(x, mul(xor(x, y), iszero(c)))\n        }\n    }\n\n    function ternary(bool c, bytes4 x, bytes4 y) internal pure returns (bytes4 r) {\n        assembly (\"memory-safe\") {\n            r := xor(x, mul(xor(x, y), iszero(c)))\n        }\n    }\n\n    function ternary(bool c, address x, address y) internal pure returns (address r) {\n        assembly (\"memory-safe\") {\n            r := xor(x, mul(xor(x, y), iszero(c)))\n        }\n    }\n\n    function orZero(bool c, uint256 x) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mul(lt(0x00, c), x)\n        }\n    }\n\n    function maybeSwap(bool c, uint256 x, uint256 y) internal pure returns (uint256 a, uint256 b) {\n        assembly (\"memory-safe\") {\n            let t := mul(iszero(c), xor(y, x))\n            a := xor(y, t)\n            b := xor(x, t)\n        }\n    }\n\n    function maybeSwap(bool c, int256 x, int256 y) internal pure returns (int256 a, int256 b) {\n        assembly (\"memory-safe\") {\n            let t := mul(iszero(c), xor(y, x))\n            a := xor(y, t)\n            b := xor(x, t)\n        }\n    }\n\n    function maybeSwap(bool c, IERC20 x, IERC20 y) internal pure returns (IERC20 a, IERC20 b) {\n        assembly (\"memory-safe\") {\n            let t := mul(iszero(c), xor(y, x))\n            a := xor(y, t)\n            b := xor(x, t)\n        }\n    }\n\n    function maybeSwap(bool c, address x, address y) internal pure returns (address a, address b) {\n        assembly (\"memory-safe\") {\n            let t := mul(iszero(c), xor(y, x))\n            a := xor(y, t)\n            b := xor(x, t)\n        }\n    }\n}\n\n// src/utils/TokenGetter.sol\n\nfunction fastGetToken(address pool, uint256 selector) view returns (IERC20 token) {\n    // Scratch memory avoids allocating calldata and return buffers.\n    // (bool success, bytes memory data) = pool.staticcall(abi.encodeWithSelector(bytes4(uint32(selector))));\n    // if (!success) bubbleRevert(data);\n    // token = abi.decode(data, (IERC20));\n    assembly (\"memory-safe\") {\n        mstore(0x00, selector)\n        if iszero(staticcall(gas(), pool, 0x1c, 0x04, 0x00, 0x20)) {\n            let ptr := mload(0x40)\n            returndatacopy(ptr, 0x00, returndatasize())\n            revert(ptr, returndatasize())\n        }\n        token := mload(0x00)\n        if or(gt(0x20, returndatasize()), shr(0xa0, token)) { revert(0x00, 0x00) }\n    }\n}\n\n// src/utils/UnsafeMath.sol\n\nlibrary UnsafeMath {\n    function unsafeInc(uint256 x) internal pure returns (uint256) {\n        unchecked {\n            return x + 1;\n        }\n    }\n\n    function unsafeInc(uint256 x, bool b) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := add(x, lt(0x00, b))\n        }\n    }\n\n    function unsafeInc(int256 x) internal pure returns (int256) {\n        unchecked {\n            return x + 1;\n        }\n    }\n\n    function unsafeDec(uint256 x) internal pure returns (uint256) {\n        unchecked {\n            return x - 1;\n        }\n    }\n\n    function unsafeDec(uint256 x, bool b) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := sub(x, lt(0x00, b))\n        }\n    }\n\n    function unsafeDec(int256 x) internal pure returns (int256) {\n        unchecked {\n            return x - 1;\n        }\n    }\n\n    function unsafeNeg(int256 x) internal pure returns (int256) {\n        unchecked {\n            return -x;\n        }\n    }\n\n    function unsafeAbs(int256 x) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mul(or(0x01, sar(0xff, x)), x)\n        }\n    }\n\n    function unsafeDiv(uint256 numerator, uint256 denominator) internal pure returns (uint256 quotient) {\n        assembly (\"memory-safe\") {\n            quotient := div(numerator, denominator)\n        }\n    }\n\n    function unsafeDiv(int256 numerator, int256 denominator) internal pure returns (int256 quotient) {\n        assembly (\"memory-safe\") {\n            quotient := sdiv(numerator, denominator)\n        }\n    }\n\n    function unsafeMod(uint256 numerator, uint256 denominator) internal pure returns (uint256 remainder) {\n        assembly (\"memory-safe\") {\n            remainder := mod(numerator, denominator)\n        }\n    }\n\n    function unsafeMod(int256 numerator, int256 denominator) internal pure returns (int256 remainder) {\n        assembly (\"memory-safe\") {\n            remainder := smod(numerator, denominator)\n        }\n    }\n\n    function unsafeMulMod(uint256 a, uint256 b, uint256 m) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mulmod(a, b, m)\n        }\n    }\n\n    function unsafeAddMod(uint256 a, uint256 b, uint256 m) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := addmod(a, b, m)\n        }\n    }\n\n    function unsafeDivUp(uint256 n, uint256 d) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := add(gt(mod(n, d), 0x00), div(n, d))\n        }\n    }\n\n    /// rounds away from zero\n    function unsafeDivOut(int256 n, int256 d) internal pure returns (int256 r) {\n        assembly (\"memory-safe\") {\n            let s := sar(0xff, xor(n, d))\n            let c := lt(0x00, smod(n, d))\n            r := add(sdiv(n, d), sub(xor(s, c), s))\n        }\n    }\n\n    function unsafeAdd(uint256 a, uint256 b) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := add(a, b)\n        }\n    }\n}\n\nlibrary Math_0 {\n    function inc(uint256 x, bool c) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := add(x, lt(0x00, c))\n        }\n        if (r < x) {\n            Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n        }\n    }\n\n    function dec(uint256 x, bool c) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := sub(x, lt(0x00, c))\n        }\n        if (r > x) {\n            Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n        }\n    }\n\n    function toInt(bool c) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := lt(0x00, c)\n        }\n    }\n\n    function saturatingAdd(uint256 x, uint256 y) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := add(x, y)\n            r := or(r, sub(0x00, lt(r, y)))\n        }\n    }\n\n    function saturatingSub(uint256 x, uint256 y) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mul(gt(x, y), sub(x, y))\n        }\n    }\n\n    function saturatingDec(uint256 x) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := sub(x, lt(0x00, x))\n        }\n    }\n\n    function absDiff(uint256 x, uint256 y) internal pure returns (uint256 r, bool sign) {\n        assembly (\"memory-safe\") {\n            sign := lt(x, y)\n            let m := sub(0x00, sign)\n            r := sub(xor(sub(x, y), m), m)\n        }\n    }\n}\n\n// src/allowanceholder/AllowanceHolderContext.sol\n\nabstract contract AllowanceHolderContext is Context {\n    function _isForwarded() internal view virtual override returns (bool) {\n        return super._isForwarded() || super._msgSender() == address(ALLOWANCE_HOLDER);\n    }\n\n    function _msgData() internal view virtual override returns (bytes calldata) {\n        if (super._msgSender() == address(ALLOWANCE_HOLDER)) {\n            return msg.data[:msg.data.length - 20];\n        } else {\n            return msg.data;\n        }\n    }\n\n    function _msgSender() internal view virtual override returns (address sender) {\n        sender = super._msgSender();\n        if (sender == address(ALLOWANCE_HOLDER)) {\n            // ERC-2771 like usage where the _trusted_ `AllowanceHolder` has appended the appropriate\n            // msg.sender to the msg data\n            bytes calldata data = super._msgData();\n            assembly (\"memory-safe\") {\n                sender := shr(0x60, calldataload(add(data.offset, sub(data.length, 0x14))))\n            }\n        }\n    }\n\n    // this is here to avoid foot-guns and make it very explicit that we intend\n    // to pass the confused deputy check in AllowanceHolder\n    function balanceOf(address) external pure {\n        assembly (\"memory-safe\") {\n            mstore8(0x00, 0x00)\n            return(0x00, 0x01)\n        }\n    }\n}\n\n// src/ISettlerActions.sol\n\ninterface ISettlerActions {\n    /// VIP actions should always start with `recipient` address and the `permit` from the taker\n    /// followed by all the other parameters to ensure compatibility with `executeWithPermit` entrypoint.\n    /// `minBuyAmount`/`amountOutMin` should always be the last parameter.\n\n    /// @dev Transfer funds from msg.sender Permit2.\n    function TRANSFER_FROM(address recipient, ISignatureTransfer.PermitTransferFrom memory permit, bytes memory sig)\n        external;\n\n    // @dev msgValue is interpreted as an upper bound on the expected msg.value, not as an exact specification\n    function NATIVE_CHECK(uint256 deadline, uint256 msgValue) external;\n\n    /// @dev Verify an EIP-712 signature over the taker and the entrypoint's `zid` argument, then\n    ///      expose the signer to liquidity sources through `attestation()` for the rest of the\n    ///      swap.\n    function ATTEST(uint256 deadline, bytes32 r, bytes32 vs) external;\n\n    /// @dev Transfer funds from metatransaction requestor into the Settler contract using Permit2. Only for use in `Settler.executeMetaTxn` where the signature is provided as calldata\n    function METATXN_TRANSFER_FROM(address recipient, ISignatureTransfer.PermitTransferFrom memory permit) external;\n\n    /// @dev Settle an RfqOrder between maker and taker transfering funds directly between the parties\n    // Post-req: Payout if recipient != taker\n    function RFQ_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory takerPermit,\n        ISignatureTransfer.PermitTransferFrom memory makerPermit,\n        address maker,\n        bytes memory makerSig,\n        bytes memory takerSig\n    ) external;\n\n    /// @dev Settle an RfqOrder between maker and taker transfering funds directly between the parties for the entire amount\n    function METATXN_RFQ_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory takerPermit,\n        ISignatureTransfer.PermitTransferFrom memory makerPermit,\n        address maker,\n        bytes memory makerSig\n    ) external;\n\n    /// @dev Settle an RfqOrder between Maker and Settler. Transfering funds from the Settler contract to maker.\n    /// Retaining funds in the settler contract.\n    // Pre-req: Funded\n    // Post-req: Payout\n    function RFQ(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        address maker,\n        bytes memory makerSig,\n        address takerToken,\n        uint256 maxTakerAmount\n    ) external;\n\n    function UNISWAPV4(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n    function UNISWAPV4_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) external;\n    function METATXN_UNISWAPV4_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n\n    function BALANCERV3(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n    function BALANCERV3_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) external;\n    function METATXN_BALANCERV3_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n\n    function PANCAKE_INFINITY(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n    function PANCAKE_INFINITY_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) external;\n    function METATXN_PANCAKE_INFINITY_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n\n    /// @dev Trades against UniswapV3 using the contracts balance for funding\n    // Pre-req: Funded\n    // Post-req: Payout\n    function UNISWAPV3(address recipient, uint256 ppm, bytes memory path, uint256 amountOutMin) external;\n    /// @dev Trades against UniswapV3 using user funds via Permit2 for funding\n    function UNISWAPV3_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory path,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) external;\n    /// @dev Trades against UniswapV3 using user funds via Permit2 for funding. Metatransaction variant. Signature is over all actions.\n    function METATXN_UNISWAPV3_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory path,\n        uint256 amountOutMin\n    ) external;\n\n    function MAKERPSM(address recipient, uint256 ppm, bool buyGem, uint256 amountOutMin, address psm, address dai)\n        external;\n\n    function CURVE_TRICRYPTO_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        uint80 poolInfo,\n        bytes memory sig,\n        uint256 minBuyAmount\n    ) external;\n    function METATXN_CURVE_TRICRYPTO_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        uint80 poolInfo,\n        uint256 minBuyAmount\n    ) external;\n\n    function DODOV1(address sellToken, uint256 ppm, address pool, bool quoteForBase, uint256 minBuyAmount) external;\n    function DODOV2(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        address pool,\n        bool quoteForBase,\n        uint256 minBuyAmount\n    ) external;\n\n    function VELODROME(address recipient, uint256 ppm, address pool, uint24 swapInfo, uint256 minBuyAmount) external;\n\n    /// @dev Trades against MaverickV2 using the contracts balance for funding\n    /// This action does not use the MaverickV2 callback, so it takes an arbitrary pool address to make calls against.\n    /// Passing `tokenAIn` as a parameter actually saves gas relative to introspecting the pool's `tokenA()` accessor.\n    function MAVERICKV2(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        address pool,\n        bool tokenAIn,\n        int32 tickLimit,\n        uint256 minBuyAmount\n    ) external;\n\n    /// @dev Trades against UniswapV2 using the contracts balance for funding\n    /// @param swapInfo is encoded as the upper 16 bits as the fee of the pool in bps, the second\n    ///                 lowest bit as \"sell token has transfer fee\", and the lowest bit as the\n    ///                 \"token0 for token1\" flag.\n    function UNISWAPV2(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        address pool,\n        uint24 swapInfo,\n        uint256 amountOutMin\n    ) external;\n\n    function POSITIVE_SLIPPAGE(\n        address payable recipient,\n        address token,\n        uint256 expectedAmount,\n        uint256 surplusPpm,\n        uint256 maxPpm\n    ) external;\n\n    /// @dev Trades against a basic AMM which follows the approval, transferFrom(msg.sender) interaction\n    // Pre-req: Funded\n    // Post-req: Payout\n    function BASIC(address sellToken, uint256 ppm, address pool, uint256 offset, bytes calldata data) external;\n\n    /// @dev Fills one Deepstate book with the current `sellToken` balance. Native ETH is the ERC-7528 address in\n    /// both `sellToken` and `buyToken`. Unmatched quantity is discarded rather than rested, so it stays in the\n    /// Settler as `sellToken` for later actions.\n    /// @param epoch Book epoch to match against. The book must already be initialized.\n    /// @param tick Limit price enforced by the engine: `2 ** (96 * tick / 2**31)` units of the higher-addressed\n    /// token per unit of the lower-addressed token.\n    /// @param inversePriceX128 `floor(2**(128 + shift) / factor)` where `(factor, shift)` is Deepstate's\n    /// `TickMath32.getPriceFactorAtTick(tick)`: the Q128 reciprocal of the limit price as the engine represents it.\n    /// Only used when selling the higher-addressed token (a bid): Deepstate sizes bids in the lower-addressed\n    /// token, so the sell amount is converted through this value. Sizing at the limit price means the engine can\n    /// never take more than the sell amount. A larger value lets it take more. If the book is better than the limit,\n    /// the leftover stays in the Settler as `sellToken`. Ignored for an ask.\n    // Pre-req: Funded\n    // Post-req: Payout\n    function DEEPSTATE(\n        address sellToken,\n        uint256 ppm,\n        address buyToken,\n        uint256 epoch,\n        int32 tick,\n        uint256 inversePriceX128\n    ) external;\n\n    /// @dev Tries `candidates` in order and commits the first whose increase in Settler's `token`\n    ///      balance meets its `targets` entry. A decrease reverts the candidate. Candidates run\n    ///      with Settler as the caller and no value, so they must not contain `CHECK_SLIPPAGE` or\n    ///      `NATIVE_CHECK`. Each non-final candidate gets `trialGasLimit` gas, which must be\n    ///      nonzero and fit in 64 bits.\n    // Pre-req: Funded\n    function SELECT(uint256 trialGasLimit, address token, uint256[] calldata targets, bytes[][] calldata candidates)\n        external;\n\n    function EKUBO(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n\n    function EKUBOV3(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n\n    function EKUBOV3_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) external;\n\n    function METATXN_EKUBOV3_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n\n    function FLUXPOOL(address sellToken, uint256 ppm, bytes32 poolId, bool zeroForOne, uint256 minBuyAmount) external;\n\n    struct BebopMakerSignature {\n        bytes signatureBytes;\n        uint256 flags;\n    }\n\n    struct BebopOrder {\n        uint256 expiry;\n        address maker_address;\n        uint256 maker_nonce;\n        address maker_token;\n        uint256 taker_amount;\n        uint256 maker_amount;\n\n        // the high 5 bits are unused\n        // the next 3 bits are the `takerHasNative`, `makerHasNative`, and\n        //   `takerUsingPermit2` flags (in that order from high to low) from the\n        //   original `packed_commands` field\n        // the next 120 bits are unused\n        // the low 128 bits are the `event_id` from the original `flags` field\n        uint256 event_id_and_flags;\n    }\n\n    function BEBOP(\n        address recipient,\n        address sellToken,\n        BebopOrder memory order,\n        BebopMakerSignature memory makerSignature,\n        uint256 amountOutMin\n    ) external;\n\n    function HANJI(\n        address sellToken,\n        uint256 ppm,\n        address pool,\n        uint256 sellScalingFactor,\n        uint256 buyScalingFactor,\n        bool isAsk,\n        uint256 priceLimit,\n        uint256 minBuyAmount\n    ) external;\n\n    function CHECK_SLIPPAGE(bool transferExactLimit) external;\n}\n\n// src/interfaces/ISettlerTakerSubmitted.sol\n\ninterface ISettlerTakerSubmitted is ISettlerBase {\n    function execute(\n        AllowedSlippage memory slippage,\n        bytes[] calldata actions,\n        bytes32 /* zid & affiliate */\n    )\n        external\n        payable\n        returns (bool);\n\n    function executeWithPermit(\n        AllowedSlippage memory slippage,\n        bytes[] calldata actions,\n        bytes32 /* zid & affiliate */,\n        bytes memory permitData\n    ) external payable returns (bool);\n}\n\n// src/utils/AddressDerivation.sol\n\nlibrary AddressDerivation {\n    using UnsafeMath for uint256;\n    using FastLogic for bool;\n\n    uint256 internal constant _SECP256K1_P = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F;\n    uint256 internal constant _SECP256K1_N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141;\n    uint256 internal constant SECP256K1_GX = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798;\n    uint256 internal constant SECP256K1_GY = 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8;\n\n    error InvalidCurve(uint256 x, uint256 y);\n\n    // keccak256(abi.encodePacked(ECMUL([x, y], k)))[12:]\n    function deriveEOA(uint256 x, uint256 y, uint256 k) internal pure returns (address) {\n        if (k == 0) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        if ((k >= _SECP256K1_N).or(x >= _SECP256K1_P).or(y >= _SECP256K1_P)) {\n            Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n        }\n\n        // +/-7 are neither square nor cube mod p, so we only have to check one\n        // coordinate against 0. if it is 0, then the other is too (the point at\n        // infinity) or the point is invalid\n        if ((x == 0)\n            .or(\n                y.unsafeMulMod(y, _SECP256K1_P)\n                    != x.unsafeMulMod(x, _SECP256K1_P).unsafeMulMod(x, _SECP256K1_P).unsafeAddMod(7, _SECP256K1_P)\n            )) {\n            revert InvalidCurve(x, y);\n        }\n\n        unchecked {\n            // https://ethresear.ch/t/you-can-kinda-abuse-ecrecover-to-do-ecmul-in-secp256k1-today/2384\n            return ecrecover(\n                bytes32(0), uint8(27 + (y & 1)), bytes32(x), bytes32(UnsafeMath.unsafeMulMod(x, k, _SECP256K1_N))\n            );\n        }\n    }\n\n    // keccak256(RLP([deployer, nonce]))[12:]\n    function deriveContract(address deployer, uint64 nonce) internal pure returns (address result) {\n        if (nonce == 0) {\n            assembly (\"memory-safe\") {\n                mstore(\n                    0x00,\n                    or(\n                        0xd694000000000000000000000000000000000000000080,\n                        shl(8, and(0xffffffffffffffffffffffffffffffffffffffff, deployer))\n                    )\n                )\n                result := keccak256(0x09, 0x17)\n            }\n        } else if (nonce < 0x80) {\n            assembly (\"memory-safe\") {\n                // we don't care about dirty bits in `deployer`; they'll be overwritten later\n                mstore(0x14, deployer)\n                mstore(0x00, 0xd694)\n                mstore8(0x34, nonce)\n                result := keccak256(0x1e, 0x17)\n            }\n        } else {\n            if (~uint256(nonce) << 192 == 0) {\n                Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n            }\n            // compute ceil(log_256(nonce)) + 1\n            uint256 nonceLength = 8;\n            unchecked {\n                nonceLength += (0 < (uint256(nonce) >> 32)).toUint() << 5;\n                nonceLength += ((uint256(nonce) >> 8) >= (1 << nonceLength)).toUint() << 4;\n                nonceLength += (uint256(nonce) >= (1 << nonceLength)).toUint() << 3;\n                // ceil\n                nonceLength += ((uint256(nonce) << 8) >= (1 << nonceLength)).toUint() << 3;\n                // bytes, not bits\n                nonceLength >>= 3;\n            }\n            assembly (\"memory-safe\") {\n                // we don't care about dirty bits in `deployer` or `nonce`. they'll be overwritten later\n                mstore(nonceLength, nonce)\n                mstore8(0x20, add(0x7f, nonceLength))\n                mstore(0x00, deployer)\n                mstore8(0x0a, add(0xd5, nonceLength))\n                mstore8(0x0b, 0x94)\n                result := keccak256(0x0a, add(0x16, nonceLength))\n            }\n        }\n    }\n\n    // keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initHash))[12:]\n    function deriveDeterministicContract(address deployer, bytes32 salt, bytes32 initHash)\n        internal\n        pure\n        returns (address result)\n    {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n\n            // we don't care about dirty bits in `deployer`; they'll be overwritten later\n            mstore(0x00, deployer)\n            mstore(0x20, salt)\n            mstore(0x40, initHash)\n            mstore8(0x0b, 0xff)\n\n            result := keccak256(0x0b, 0x55)\n\n            mstore(0x40, ptr)\n        }\n    }\n\n    function deriveContractEraVm(address deployer, uint64 nonce) internal pure returns (address result) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x63bae3a9951d38e8a3fbb7b70909afc1200610fc5bc55ade242f815974674f23)\n            mstore(add(0x20, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, deployer))\n            mstore(add(0x40, ptr), and(0xffffffffffffffff, nonce))\n            result := keccak256(ptr, 0x60)\n        }\n    }\n\n    function deriveDeterministicContractEraVm(\n        address deployer,\n        bytes32 salt,\n        bytes32 initCodeWithoutArgsHash,\n        bytes32 initArgsHash\n    ) internal pure returns (address result) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x2020dba91b30cc0006188af794c2fb30dd8520db7e2c088b7fc7c103c00ca494)\n            mstore(add(0x20, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, deployer))\n            mstore(add(0x40, ptr), salt)\n            mstore(add(0x60, ptr), initCodeWithoutArgsHash)\n            mstore(add(0x80, ptr), initArgsHash)\n            result := keccak256(ptr, 0xa0)\n        }\n    }\n}\n\n// src/core/Permit2PaymentAbstract.sol\n\nabstract contract Permit2PaymentAbstract is AbstractContext {\n    string internal constant TOKEN_PERMISSIONS_TYPE = \"TokenPermissions(address token,uint256 amount)\";\n\n    function _isRestrictedTarget(address) internal view virtual returns (bool) {\n        return false;\n    }\n\n    function _fallback(bytes calldata) internal virtual returns (bool success, bytes memory returndata) {\n        return (success, returndata);\n    }\n\n    function _operator() internal view virtual returns (address);\n\n    function _permitToSellAmountCalldata(address owner, ISignatureTransfer.PermitTransferFrom calldata permit)\n        internal\n        view\n        virtual\n        returns (uint256 sellAmount);\n\n    function _permitToSellAmount(address owner, ISignatureTransfer.PermitTransferFrom memory permit)\n        internal\n        view\n        virtual\n        returns (uint256 sellAmount);\n\n    function _permitToTransferDetails(\n        address owner,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        address recipient\n    )\n        internal\n        view\n        virtual\n        returns (ISignatureTransfer.SignatureTransferDetails memory transferDetails, uint256 sellAmount);\n\n    function _transferFromIKnowWhatImDoing(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        address from,\n        bytes32 witness,\n        string memory witnessTypeString,\n        bytes memory sig,\n        bool isForwarded\n    ) internal virtual;\n\n    function _transferFromIKnowWhatImDoing(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        address from,\n        bytes32 witness,\n        string memory witnessTypeString,\n        bytes memory sig\n    ) internal virtual;\n\n    function _transferFrom(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        bytes memory sig,\n        bool isForwarded\n    ) internal virtual;\n\n    function _transferFrom(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        bytes memory sig\n    ) internal virtual;\n\n    function _setOperatorAndCall(\n        address target,\n        bytes memory data,\n        uint32 selector,\n        function(bytes calldata) internal returns (bytes memory) callback\n    ) internal virtual returns (bytes memory);\n\n    function _setOperatorAndTryCall(\n        address target,\n        bytes memory data,\n        uint32 selector,\n        function(bytes calldata) internal returns (bytes memory) callback,\n        uint256 gasLimit\n    ) internal virtual returns (bool);\n\n    modifier metaTx(address msgSender, bytes32 witness) virtual;\n\n    modifier takerSubmitted() virtual;\n\n    function _allowanceHolderTransferFrom(address token, address owner, address recipient, uint256 amount)\n        internal\n        virtual;\n}\n\n// src/vendor/SafeTransferLib.sol\n\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\n/// @author Modified from Solady (https://github.com/vectorized/solady/blob/main/src/utils/SafeTransferLib.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)\n/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.\nlibrary SafeTransferLib {\n    /*//////////////////////////////////////////////////////////////\n                             ETH OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function safeTransferETH(address payable to, uint256 amount) internal {\n        assembly (\"memory-safe\") {\n            // Transfer the ETH and revert if it fails.\n            if iszero(call(gas(), to, amount, 0x00, 0x00, 0x00, 0x00)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n        }\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                            ERC20 OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function fastBalanceOf(IERC20 token, address acct) internal view returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            mstore(0x14, acct) // Store the `acct` argument.\n            mstore(0x00, 0x70a08231000000000000000000000000) // Selector for `balanceOf(address)`, with `acct`'s padding.\n\n            // Call and check for revert. Storing the selector with padding in\n            // memory at 0 results in a start of calldata at offset 16. Calldata\n            // is 36 bytes long (4 bytes selector, 32 bytes argument)\n            if iszero(staticcall(gas(), token, 0x10, 0x24, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            // Check for short returndata and missing code\n            if iszero(lt(0x1f, returndatasize())) { revert(0x00, 0x00) }\n\n            r := mload(0x00)\n        }\n    }\n\n    // Retain one wei to avoid clearing the ERC20 balance slot.\n    function fastSpendableBalance(IERC20 token) internal view returns (uint256) {\n        return Math_0.saturatingDec(fastBalanceOf(token, address(this)));\n    }\n\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 amount) internal {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40) // Cache the free memory pointer.\n\n            mstore(0x60, amount) // Store the `amount` argument.\n            mstore(0x40, to) // Store the `to` argument.\n            mstore(0x2c, shl(0x60, from)) // Store the `from` argument. (Clears `to`'s padding.)\n            mstore(0x0c, 0x23b872dd000000000000000000000000) // Selector for `transferFrom(address,address,uint256)`, with `from`'s padding.\n\n            // Calldata starts at offset 28 and is 100 bytes long (3 * 32 + 4).\n            // If there is returndata (optional) we copy the first 32 bytes into the first slot of memory.\n            if iszero(call(gas(), token, 0x00, 0x1c, 0x64, 0x00, 0x20)) {\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            // We check that the call either returned exactly 1 [true] (can't just be non-zero\n            // data), or had no return data.\n            if iszero(or(and(eq(mload(0x00), 0x01), lt(0x1f, returndatasize())), iszero(returndatasize()))) {\n                mstore(0x00, 0x7939f424) // Selector for `TransferFromFailed()`\n                revert(0x1c, 0x04)\n            }\n\n            mstore(0x60, 0x00) // Restore the zero slot to zero.\n            mstore(0x40, ptr) // Restore the free memory pointer.\n        }\n    }\n\n    function safeTransfer(IERC20 token, address to, uint256 amount) internal {\n        assembly (\"memory-safe\") {\n            mstore(0x14, to) // Store the `to` argument.\n            mstore(0x34, amount) // Store the `amount` argument.\n            // Storing `amount` clobbers the upper bits of the free memory pointer, but those bits\n            // can never be set without running into an OOG, so it's safe. We'll restore them to\n            // zero at the end.\n            mstore(0x00, 0xa9059cbb000000000000000000000000) // Selector for `transfer(address,uint256)`, with `to`'s padding.\n\n            // Calldata starts at offset 16 and is 68 bytes long (2 * 32 + 4).\n            // If there is returndata (optional) we copy the first 32 bytes into the first slot of memory.\n            if iszero(call(gas(), token, 0x00, 0x10, 0x44, 0x00, 0x20)) {\n                let ptr := and(0xffffff, mload(0x40))\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            // We check that the call either returned exactly 1 [true] (can't just be non-zero\n            // data), or had no return data.\n            if iszero(or(and(eq(mload(0x00), 0x01), lt(0x1f, returndatasize())), iszero(returndatasize()))) {\n                mstore(0x00, 0x90b8ec18) // Selector for `TransferFailed()`\n                revert(0x1c, 0x04)\n            }\n\n            mstore(0x34, 0x00) // Restore the part of the free memory pointer that was overwritten.\n        }\n    }\n\n    function safeApprove(IERC20 token, address to, uint256 amount) internal {\n        assembly (\"memory-safe\") {\n            mstore(0x14, to) // Store the `to` argument.\n            mstore(0x34, amount) // Store the `amount` argument.\n            // Storing `amount` clobbers the upper bits of the free memory pointer, but those bits\n            // can never be set without running into an OOG, so it's safe. We'll restore them to\n            // zero at the end.\n            mstore(0x00, 0x095ea7b3000000000000000000000000) // Selector for `approve(address,uint256)`, with `to`'s padding.\n\n            // Calldata starts at offset 16 and is 68 bytes long (2 * 32 + 4).\n            // If there is returndata (optional) we copy the first 32 bytes into the first slot of memory.\n            if iszero(call(gas(), token, 0x00, 0x10, 0x44, 0x00, 0x20)) {\n                let ptr := and(0xffffff, mload(0x40))\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            // We check that the call either returned exactly 1 [true] (can't just be non-zero\n            // data), or had no return data.\n            if iszero(or(and(eq(mload(0x00), 0x01), lt(0x1f, returndatasize())), iszero(returndatasize()))) {\n                mstore(0x00, 0x3e3f8f73) // Selector for `ApproveFailed()`\n                revert(0x1c, 0x04)\n            }\n\n            mstore(0x34, 0x00) // Restore the part of the free memory pointer that was overwritten.\n        }\n    }\n\n    function safeApproveIfBelow(IERC20 token, address spender, uint256 amount) internal {\n        uint256 allowance;\n        assembly (\"memory-safe\") {\n            // Save the free memory pointer for restoration after we clobber it\n            let ptr := mload(0x40)\n\n            mstore(0x40, spender)\n            mstore(0x2c, shl(0x60, address())) // Also clears `spender`'s padding\n            mstore(0x0c, 0xdd62ed3e000000000000000000000000) // Selector for `allowance(address,address)` with `address()`'s padding\n\n            // Calldata starts at offset 28 and is 68 bytes long\n            if iszero(staticcall(gas(), token, 0x1c, 0x44, 0x00, 0x20)) {\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n\n            // Revert on short returndata\n            if gt(0x20, returndatasize()) {\n                revert(0x00, 0x00)\n            }\n\n            allowance := mload(0x00)\n\n            // Restore the free memory pointer\n            mstore(0x40, ptr)\n        }\n\n        if (allowance < amount) {\n            if (allowance != 0) {\n                safeApprove(token, spender, 0);\n            }\n            safeApprove(token, spender, type(uint256).max);\n        }\n    }\n}\n\n// src/core/Constants.sol\n\n// The denominator for all balance-proportional action arguments (parts-per-million).\nuint256 constant BASIS = 1_000_000;\n\n// ERC-7528 native asset designator.\naddress constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\nfunction isNative_0(address token) pure returns (bool r) {\n    assembly (\"memory-safe\") {\n        r := iszero(shl(0x60, xor(ETH_ADDRESS, token)))\n    }\n}\n\nfunction isNative_1(IERC20 token) pure returns (bool) {\n    return isNative_0(address(token));\n}\n\nfunction compatBalance(IERC20 token, address holder) view returns (uint256) {\n    return isNative_1(token) ? holder.balance : SafeTransferLib.fastBalanceOf(token, holder);\n}\n\nfunction compatSelfBalance(IERC20 token) view returns (uint256 r) {\n    if (isNative_1(token)) {\n        // Free functions cannot use `this`. Equivalent Solidity: return address(this).balance;\n        assembly (\"memory-safe\") {\n            r := selfbalance()\n        }\n    } else {\n        address self;\n        // Free functions cannot use `this`. Equivalent Solidity: self = address(this);\n        assembly (\"memory-safe\") {\n            self := address()\n        }\n        r = SafeTransferLib.fastBalanceOf(token, self);\n    }\n}\n\n// src/utils/SafePermit.sol\n\nlibrary FastPermit {\n    function fastPermit(\n        IERC2612 token,\n        address owner,\n        address spender,\n        uint256 amount,\n        uint256 deadline,\n        bytes32 vs,\n        bytes32 r\n    ) internal returns (bool success) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(add(0xd4, ptr), and(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, vs)) // `s`.\n            mstore(add(0xb4, ptr), r) // `r`.\n            mstore(add(0x94, ptr), add(0x1b, shr(0xff, vs))) // `v`.\n            mstore(add(0x74, ptr), deadline)\n            mstore(add(0x54, ptr), amount)\n            mstore(add(0x34, ptr), spender)\n            mstore(add(0x20, ptr), shl(0x60, owner)) // with `spender`'s padding\n            mstore(ptr, 0xd505accf000000000000000000000000) // selector for `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` with `owner`'s padding\n\n            success := call(gas(), token, 0x00, add(0x10, ptr), 0xe4, 0x00, 0x20)\n            success := and(success, and(iszero(xor(mload(0x00), 0x01)), gt(returndatasize(), 0x1f)))\n        }\n    }\n\n    function fastDAIPermit(\n        IDAIStylePermit token,\n        address owner,\n        address spender,\n        uint256 nonce,\n        uint256 expiry,\n        bool allowed,\n        bytes32 vs,\n        bytes32 r\n    ) internal returns (bool success) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(add(0xf4, ptr), and(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, vs)) // `s`.\n            mstore(add(0xd4, ptr), r) // `r`.\n            mstore(add(0xb4, ptr), add(0x1b, shr(0xff, vs))) // `v`.\n            mstore(add(0x94, ptr), lt(0x00, allowed))\n            mstore(add(0x74, ptr), expiry)\n            mstore(add(0x54, ptr), nonce)\n            mstore(add(0x34, ptr), spender)\n            mstore(add(0x20, ptr), shl(0x60, owner)) // with `spender`'s padding\n            mstore(ptr, 0x8fcbaf0c000000000000000000000000) // selector for `permit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32)`\n\n            success := call(gas(), token, 0x00, add(0x10, ptr), 0x104, 0x00, 0x20)\n            success := and(success, and(iszero(xor(mload(0x00), 0x01)), gt(returndatasize(), 0x1f)))\n        }\n    }\n\n    function fastApproveMetaTransaction(\n        IERC20MetaTransaction token,\n        address owner,\n        address spender,\n        uint256 amount,\n        bytes32 vs,\n        bytes32 r\n    ) internal returns (bool success, bytes32 functionSignatureHash) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(add(0xf8, ptr), amount)\n            mstore(add(0xd8, ptr), spender)\n            mstore(add(0xc4, ptr), 0x095ea7b3000000000000000000000000) // selector for `approve(address,uint256)` with `spender` padding\n            mstore(add(0xb4, ptr), 0x44) // length of approve call\n            mstore(add(0x94, ptr), add(0x1b, shr(0xff, vs))) // `v`.\n            mstore(add(0x74, ptr), and(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, vs)) // `s`.\n            mstore(add(0x54, ptr), r) // `r`.\n            mstore(add(0x34, ptr), 0xa0) // offset to function signature\n            mstore(add(0x14, ptr), owner)\n            mstore(ptr, 0x0c53c51c000000000000000000000000) // selector for `executeMetaTransaction(address,bytes,bytes32,bytes32,uint8)` with `owner`'s padding\n\n            functionSignatureHash := keccak256(add(0xd4, ptr), 0x44)\n\n            success := call(gas(), token, 0x00, add(0x10, ptr), 0x108, 0x00, 0x60)\n            success := and(success, and(iszero(xor(mload(0x40), 0x01)), gt(returndatasize(), 0x5f)))\n\n            mstore(0x40, ptr)\n        }\n    }\n\n    function fastDomainSeparator(IERC20 token, uint32 domainSeparatorSelector)\n        internal\n        view\n        returns (bytes32 domainSeparator)\n    {\n        assembly (\"memory-safe\") {\n            mstore(0x00, domainSeparatorSelector)\n            if iszero(staticcall(gas(), token, 0x1c, 0x04, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if gt(0x20, returndatasize()) {\n                revert(0x00, 0x00)\n            }\n            domainSeparator := mload(0x00)\n        }\n    }\n\n    function fastNonce(IERC20 token, address owner, uint32 nonceSelector) internal view returns (uint256 nonce) {\n        assembly (\"memory-safe\") {\n            mstore(0x14, owner)\n            mstore(0x00, shl(0x60, nonceSelector)) // with `owner`'s padding\n            if iszero(staticcall(gas(), token, 0x10, 0x24, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if gt(0x20, returndatasize()) {\n                revert(0x00, 0x00)\n            }\n            nonce := mload(0x00)\n        }\n    }\n\n    function fastAllowance(IERC20 token, address owner, address spender) internal view returns (uint256 allowance) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(0x34, spender)\n            mstore(0x20, shl(0x60, owner)) // with `spender`'s padding\n            mstore(0x00, 0xdd62ed3e000000000000000000000000) // selector for `allowance(address,address)` with `spender`'s padding\n            if iszero(staticcall(gas(), token, 0x10, 0x44, 0x00, 0x20)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            if gt(0x20, returndatasize()) {\n                revert(0x00, 0x00)\n            }\n            allowance := mload(0x00)\n            mstore(0x40, ptr)\n        }\n    }\n}\n\nlibrary SafePermit {\n    using FastLogic for bool;\n    using FastPermit for IERC2612;\n    using FastPermit for IDAIStylePermit;\n    using FastPermit for IERC20MetaTransaction;\n    using FastPermit for IERC20;\n\n    bytes32 private constant _PERMIT_TYPEHASH =\n        keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n    bytes32 private constant _PERMIT_ALLOWED_TYPEHASH =\n        keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n\n    bytes32 private constant _META_TRANSACTION_TYPEHASH =\n        keccak256(\"MetaTransaction(uint256 nonce,address from,bytes functionSignature)\");\n\n    function _revert(uint32 err) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, err)\n            revert(0x1c, 0x04)\n        }\n    }\n\n    function _checkEffects(IERC20 token, address owner, address spender, uint256 amount, uint256 nonce) internal view {\n        if ((nonce == 0).or(token.fastAllowance(owner, spender) != amount)) {\n            _revert(0xb78cb0dd); // selector for `PermitFailed()`\n        }\n    }\n\n    function _checkSignature(bytes32 signingHash, address owner, bytes32 vs, bytes32 r) internal view {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(0x00, signingHash)\n            mstore(0x20, add(0x1b, shr(0xff, vs))) // `v`.\n            mstore(0x40, r) // `r`.\n            mstore(0x60, and(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, vs)) // `s`.\n            let recovered := mload(staticcall(gas(), 0x01, 0x00, 0x80, 0x01, 0x20))\n            if iszero(gt(returndatasize(), shl(0x60, xor(owner, recovered)))) {\n                mstore(0x00, 0x8baa579f) // selector for `InvalidSignature()`\n                revert(0x1c, 0x04)\n            }\n            mstore(0x40, ptr)\n            mstore(0x60, 0x00)\n        }\n    }\n\n    function safePermit(\n        IERC2612 token,\n        address owner,\n        address spender,\n        uint256 amount,\n        uint256 deadline,\n        bytes32 vs,\n        bytes32 r\n    ) internal {\n        // `permit` could succeed vacuously with no returndata if there's a fallback\n        // function (e.g. WETH). `permit` could fail spuriously if it was\n        // replayed/frontrun. Avoid these by manually verifying the effects and\n        // signature. Insufficient gas griefing is defused by checking the effects.\n        if (!token.fastPermit(owner, spender, amount, deadline, vs, r)) {\n            // Check effects and signature\n            if (block.timestamp > deadline) {\n                _revert(0x1a15a3cc); // selector for `PermitExpired()`\n            }\n            uint256 nonce = token.fastNonce(owner, uint32(token.nonces.selector));\n            _checkEffects(token, owner, spender, amount, nonce);\n            unchecked {\n                nonce--;\n            }\n            bytes32 domainSeparator = token.fastDomainSeparator(uint32(token.DOMAIN_SEPARATOR.selector));\n            bytes32 typeHash = _PERMIT_TYPEHASH;\n            bytes32 signingHash;\n            assembly (\"memory-safe\") {\n                let ptr := mload(0x40)\n                mstore(ptr, 0x1901)\n                mstore(add(0x20, ptr), domainSeparator)\n                mstore(add(0x40, ptr), typeHash)\n                mstore(add(0x60, ptr), owner)\n                mstore(add(0x80, ptr), spender)\n                mstore(add(0xa0, ptr), amount)\n                mstore(add(0xc0, ptr), nonce)\n                mstore(add(0xe0, ptr), deadline)\n                mstore(add(0x40, ptr), keccak256(add(0x40, ptr), 0xc0))\n                signingHash := keccak256(add(0x1e, ptr), 0x42)\n            }\n            _checkSignature(signingHash, owner, vs, r);\n        }\n    }\n\n    function safePermit(\n        IDAIStylePermit token,\n        address owner,\n        address spender,\n        uint256 nonce,\n        uint256 deadline,\n        bool allowed,\n        bytes32 vs,\n        bytes32 r\n    ) internal {\n        // See comments above\n        if (!token.fastDAIPermit(owner, spender, nonce, deadline, allowed, vs, r)) {\n            // Check effects and signature\n            // https://etherscan.io/token/0x6b175474e89094c44da98b954eedeac495271d0f#code#L188\n            if ((block.timestamp > deadline).and(deadline > 0)) {\n                _revert(0x1a15a3cc);\n            }\n            nonce = token.fastNonce(owner, uint32(token.nonces.selector));\n            uint256 expectedAllowance;\n            unchecked {\n                expectedAllowance = 0 - allowed.toUint();\n            }\n            _checkEffects(token, owner, spender, expectedAllowance, nonce);\n            unchecked {\n                nonce--;\n            }\n            bytes32 domainSeparator = token.fastDomainSeparator(uint32(token.DOMAIN_SEPARATOR.selector));\n            bytes32 typeHash = _PERMIT_ALLOWED_TYPEHASH;\n            bytes32 signingHash;\n            assembly (\"memory-safe\") {\n                let ptr := mload(0x40)\n                mstore(ptr, 0x1901)\n                mstore(add(0x20, ptr), domainSeparator)\n                mstore(add(0x40, ptr), typeHash)\n                mstore(add(0x60, ptr), owner)\n                mstore(add(0x80, ptr), spender)\n                mstore(add(0xa0, ptr), nonce)\n                mstore(add(0xc0, ptr), deadline)\n                mstore(add(0xe0, ptr), lt(0x00, allowed))\n                mstore(add(0x40, ptr), keccak256(add(0x40, ptr), 0xc0))\n                signingHash := keccak256(add(0x1e, ptr), 0x42)\n            }\n            _checkSignature(signingHash, owner, vs, r);\n        }\n    }\n\n    function safePermit(\n        IERC20MetaTransaction token,\n        address owner,\n        address spender,\n        uint256 amount,\n        bytes32 vs,\n        bytes32 r\n    ) internal {\n        // See comments above\n        (bool success, bytes32 functionSignatureHash) = token.fastApproveMetaTransaction(owner, spender, amount, vs, r);\n        if (!success) {\n            // Check effects and signature\n            uint256 nonce = token.fastNonce(owner, uint32(token.getNonce.selector));\n            _checkEffects(token, owner, spender, amount, nonce);\n            unchecked {\n                nonce--;\n            }\n            bytes32 domainSeparator = token.fastDomainSeparator(uint32(token.getDomainSeperator.selector));\n            bytes32 typeHash = _META_TRANSACTION_TYPEHASH;\n            bytes32 signingHash;\n            assembly (\"memory-safe\") {\n                let ptr := mload(0x40)\n                mstore(ptr, 0x1901)\n                mstore(add(0x20, ptr), domainSeparator)\n                mstore(add(0x40, ptr), typeHash)\n                mstore(add(0x60, ptr), nonce)\n                mstore(add(0x80, ptr), owner)\n                mstore(add(0xa0, ptr), functionSignatureHash)\n                mstore(add(0x40, ptr), keccak256(add(0x40, ptr), 0x80))\n                signingHash := keccak256(add(0x1e, ptr), 0x42)\n            }\n            _checkSignature(signingHash, owner, vs, r);\n        }\n    }\n}\n\n// src/utils/512Math.sol\n\n/*\n\nWARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING\n  ***                                                                     ***\nWARNING                     This code is unaudited                      WARNING\n  ***                                                                     ***\nWARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING\n\n*/\n\n/// The type uint512 behaves as if it were declared as\n///     struct uint512 {\n///         uint256 hi;\n///         uint256 lo;\n///     }\n/// However, returning `memory` references from internal functions is impossible\n/// to do efficiently, especially when the functions are small and are called\n/// frequently. Therefore, we assume direct control over memory allocation using\n/// the functions `tmp()` and `alloc()` defined below. If you need to pass\n/// 512-bit integers between contracts (generally a bad idea), the struct\n/// `uint512_external` defined at the end of this file is provided for this\n/// purpose and has exactly the definition you'd expect (as well as convenient\n/// conversion functions).\n///\n/// MAKING A DECLARATION OF THE FOLLOWING FORM WILL CAUSE UNEXPECTED BEHAVIOR:\n///     uint512 x;\n/// INSTEAD OF DOING THAT, YOU MUST USE `alloc()`, LIKE THIS:\n///     uint512 x = alloc();\n/// IF YOU REALLY WANTED TO DO THAT (ADVANCED USAGE) THEN FOR CLARITY, WRITE THE\n/// FOLLOWING:\n///     uint512 x = tmp();\n///\n/// While user-defined arithmetic operations (i.e. +, -, *, %, /) are provided\n/// for `uint512`, they are not gas-optimal, full-featured, or composable. You\n/// will get a revert upon incorrect usage. Their primary usage is when a simple\n/// arithmetic operation needs to be performed followed by a comparison (e.g. <,\n/// >, ==, etc.) or conversion to a pair of `uint256`s (i.e. `.into()`). The use\n/// of the user-defined arithmetic operations is not composable with the usage\n/// of `tmp()`.\n///\n/// In general, correct usage of `uint512` requires always specifying the output\n/// location of each operation. For each `o*` operation (mnemonic:\n/// out-of-place), the first argument is the output location and the remaining\n/// arguments are the input. For each `i*` operation (mnemonic: in-place), the\n/// first argument is both input and output and the remaining arguments are\n/// purely input. For each `ir*` operation (mnemonic: in-place reverse; only for\n/// non-commutative operations), the semantics of the input arguments are\n/// flipped (i.e. `irsub(foo, bar)` is semantically equivalent to `foo = bar -\n/// foo`); the first argument is still the output location. Only `irsub`,\n/// `irmod`, `irdiv`, `irmodAlt`, and `irdivAlt` exist. Unless otherwise noted,\n/// the return value of each function is the output location. This supports\n/// chaining/pipeline/tacit-style programming.\n///\n/// All provided arithmetic operations behave as if they were inside an\n/// `unchecked` block. We assume that because you're reaching for 512-bit math,\n/// you have domain knowledge about the range of values that you will\n/// encounter. Overflow causes truncation, not a revert. Division or modulo by\n/// zero still causes a panic revert with code 18 (identical behavior to\n/// \"normal\" unchecked arithmetic). The `unsafe*` functions do not perform\n/// checking for division or modulo by zero; in this case division or modulo by\n/// zero is undefined behavior.\n///\n/// Three additional arithmetic operations are provided, bare `sub`, `mod`, and\n/// `div`. These are provided for use when it is known that the result of the\n/// operation will fit into 256 bits. This fact is not checked, but more\n/// efficient algorithms are employed assuming this. The result is a `uint256`.\n///\n/// The operations `*mod` and `*div` with 512-bit denominator are `view` instead\n/// of `pure` because they make use of the MODEXP (5) precompile. Some EVM L2s\n/// and sidechains do not support MODEXP with 512-bit arguments. On those\n/// chains, the `*modAlt` and `*divAlt` functions are provided. These functions\n/// are truly `pure` and do not rely on MODEXP at all. The downside is that they\n/// consume slightly (really only *slightly*) more gas.\n///\n/// ## Full list of provided functions\n///\n/// Unless otherwise noted, all functions return `(uint512)`\n///\n/// ### Utility\n///\n/// * from(uint256)\n/// * from(uint256,uint256) -- The EVM is big-endian. The most-significant word is first.\n/// * from(uint512) -- performs a copy\n/// * into() returns (uint256,uint256) -- Again, the most-significant word is first.\n/// * toExternal(uint512) returns (uint512_external memory)\n///\n/// ### Comparison (all functions return `(bool)`)\n///\n/// * isZero(uint512)\n/// * isMax(uint512)\n/// * eq(uint512,uint256)\n/// * eq(uint512,uint512)\n/// * ne(uint512,uint256)\n/// * ne(uint512,uint512)\n/// * gt(uint512,uint256)\n/// * gt(uint512,uint512)\n/// * ge(uint512,uint256)\n/// * ge(uint512,uint512)\n/// * lt(uint512,uint256)\n/// * lt(uint512,uint512)\n/// * le(uint512,uint256)\n/// * le(uint512,uint512)\n///\n/// ### Addition\n///\n/// * oadd(uint512,uint256,uint256) -- iadd(uint256,uint256) is not provided for somewhat obvious reasons\n/// * oadd(uint512,uint512,uint256)\n/// * iadd(uint512,uint256)\n/// * oadd(uint512,uint512,uint512)\n/// * iadd(uint512,uint512)\n///\n/// ### Subtraction\n///\n/// * sub(uint512,uint256) returns (uint256)\n/// * sub(uint512,uint512) returns (uint256)\n/// * osub(uint512,uint512,uint256)\n/// * isub(uint512,uint256)\n/// * osub(uint512,uint512,uint512)\n/// * isub(uint512,uint512)\n/// * irsub(uint512,uint512)\n///\n/// ### Multiplication\n///\n/// * omul(uint512,uint256,uint256)\n/// * omul(uint512,uint512,uint256)\n/// * imul(uint512,uint256)\n/// * omul(uint512,uint512,uint512)\n/// * imul(uint512,uint512)\n///\n/// ### Modulo\n///\n/// * mod(uint512,uint256) returns (uint256) -- mod(uint512,uint512) is not provided for less obvious reasons\n/// * omod(uint512,uint512,uint512)\n/// * imod(uint512,uint512)\n/// * irmod(uint512,uint512)\n/// * omodAlt(uint512,uint512,uint512)\n/// * imodAlt(uint512,uint512)\n/// * irmodAlt(uint512,uint512)\n///\n/// ### Division\n///\n/// * div(uint512,uint256) returns (uint256)\n/// * divUp(uint512,uint256) returns (uint256)\n/// * unsafeDiv(uint512,uint256) returns (uint256)\n/// * unsafeDivUp(uint512,uint256) returns (uint256)\n/// * div(uint512,uint512) returns (uint256)\n/// * divUp(uint512,uint512) returns (uint256)\n/// * odiv(uint512,uint512,uint256)\n/// * idiv(uint512,uint256)\n/// * odivUp(uint512,uint512,uint256)\n/// * idivUp(uint512,uint256)\n/// * odiv(uint512,uint512,uint512)\n/// * idiv(uint512,uint512)\n/// * irdiv(uint512,uint512)\n/// * odivUp(uint512,uint512,uint512)\n/// * idivUp(uint512,uint512)\n/// * irdivUp(uint512,uint512)\n/// * divAlt(uint512,uint512) returns (uint256) -- divAlt(uint512,uint256) is not provided because div(uint512,uint256) is suitable for chains without MODEXP\n/// * odivAlt(uint512,uint512,uint512)\n/// * idivAlt(uint512,uint512)\n/// * irdivAlt(uint512,uint512)\n/// * divUpAlt(uint512,uint512) returns (uint256)\n/// * odivUpAlt(uint512,uint512,uint512)\n/// * idivUpAlt(uint512,uint512)\n/// * irdivUpAlt(uint512,uint512)\n///\n/// ### Square root\n///\n/// * sqrt(uint512) returns (uint256)\n/// * osqrtUp(uint512,uint512)\n/// * isqrtUp(uint512)\n///\n/// ### Shifting\n///\n/// * oshr(uint512,uint512,uint256)\n/// * ishr(uint512,uint256)\n/// * oshrUp(uint512,uint512,uint256)\n/// * ishrUp(uint512,uint256)\n/// * oshl(uint512,uint512,uint256)\n/// * ishl(uint512,uint256)\ntype uint512 is bytes32;\n\nfunction alloc() pure returns (uint512 r) {\n    assembly (\"memory-safe\") {\n        r := mload(0x40)\n        mstore(0x40, add(0x40, r))\n    }\n}\n\nfunction tmp() pure returns (uint512 r) {}\n\nlibrary Lib512MathAccessors {\n    function from(uint512 r, uint256 x) internal pure returns (uint512 r_out) {\n        assembly (\"memory-safe\") {\n            mstore(r, 0x00)\n            mstore(add(0x20, r), x)\n            r_out := r\n        }\n    }\n\n    function from(uint512 r, uint256 x_hi, uint256 x_lo) internal pure returns (uint512 r_out) {\n        assembly (\"memory-safe\") {\n            mstore(r, x_hi)\n            mstore(add(0x20, r), x_lo)\n            r_out := r\n        }\n    }\n\n    function from(uint512 r, uint512 x) internal pure returns (uint512 r_out) {\n        assembly (\"memory-safe\") {\n            // Paradoxically, using `mload` and `mstore` here (instead of\n            // `mcopy`) produces more optimal code because it gives solc the\n            // opportunity to optimize-out the use of memory entirely, in\n            // typical usage. As a happy side effect, it also means that we\n            // don't have to deal with Cancun hardfork compatibility issues.\n            mstore(r, mload(x))\n            mstore(add(0x20, r), mload(add(0x20, x)))\n            r_out := r\n        }\n    }\n\n    function into(uint512 x) internal pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            r_hi := mload(x)\n            r_lo := mload(add(0x20, x))\n        }\n    }\n}\n\nusing Lib512MathAccessors for uint512 global;\n\nlibrary Lib512MathComparisons {\n    function isZero(uint512 x) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        assembly (\"memory-safe\") {\n            r := iszero(or(x_hi, x_lo))\n        }\n    }\n\n    function isMax(uint512 x) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        assembly (\"memory-safe\") {\n            r := iszero(not(and(x_hi, x_lo)))\n        }\n    }\n\n    function eq(uint512 x, uint256 y) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        assembly (\"memory-safe\") {\n            r := and(iszero(x_hi), eq(x_lo, y))\n        }\n    }\n\n    function gt(uint512 x, uint256 y) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        assembly (\"memory-safe\") {\n            r := or(gt(x_hi, 0x00), gt(x_lo, y))\n        }\n    }\n\n    function lt(uint512 x, uint256 y) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        assembly (\"memory-safe\") {\n            r := and(iszero(x_hi), lt(x_lo, y))\n        }\n    }\n\n    function ne(uint512 x, uint256 y) internal pure returns (bool) {\n        return !eq(x, y);\n    }\n\n    function ge(uint512 x, uint256 y) internal pure returns (bool) {\n        return !lt(x, y);\n    }\n\n    function le(uint512 x, uint256 y) internal pure returns (bool) {\n        return !gt(x, y);\n    }\n\n    function eq(uint512 x, uint512 y) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        assembly (\"memory-safe\") {\n            r := and(eq(x_hi, y_hi), eq(x_lo, y_lo))\n        }\n    }\n\n    function gt(uint512 x, uint512 y) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        assembly (\"memory-safe\") {\n            r := or(gt(x_hi, y_hi), and(eq(x_hi, y_hi), gt(x_lo, y_lo)))\n        }\n    }\n\n    function lt(uint512 x, uint512 y) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        assembly (\"memory-safe\") {\n            r := or(lt(x_hi, y_hi), and(eq(x_hi, y_hi), lt(x_lo, y_lo)))\n        }\n    }\n\n    function ne(uint512 x, uint512 y) internal pure returns (bool) {\n        return !eq(x, y);\n    }\n\n    function ge(uint512 x, uint512 y) internal pure returns (bool) {\n        return !lt(x, y);\n    }\n\n    function le(uint512 x, uint512 y) internal pure returns (bool) {\n        return !gt(x, y);\n    }\n}\n\nusing Lib512MathComparisons for uint512 global;\n\nfunction __eq(uint512 x, uint512 y) pure returns (bool) {\n    return x.eq(y);\n}\n\nfunction __gt(uint512 x, uint512 y) pure returns (bool) {\n    return x.gt(y);\n}\n\nfunction __lt(uint512 x, uint512 y) pure returns (bool r) {\n    return x.lt(y);\n}\n\nfunction __ne(uint512 x, uint512 y) pure returns (bool) {\n    return x.ne(y);\n}\n\nfunction __ge(uint512 x, uint512 y) pure returns (bool) {\n    return x.ge(y);\n}\n\nfunction __le(uint512 x, uint512 y) pure returns (bool) {\n    return x.le(y);\n}\n\nusing {__eq as ==, __gt as >, __lt as <, __ne as !=, __ge as >=, __le as <=} for uint512 global;\n\nlibrary Lib512MathArithmetic {\n    using UnsafeMath for uint256;\n    using Clz for uint256;\n    using Ternary for bool;\n    using FastLogic for bool;\n    using Sqrt for uint256;\n\n    function _add(uint256 x, uint256 y) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            r_lo := add(x, y)\n            // `lt(r_lo, x)` indicates overflow in the lower addition. We can\n            // add the bool directly to the integer to perform carry\n            r_hi := lt(r_lo, x)\n        }\n    }\n\n    function _add(uint256 x_hi, uint256 x_lo, uint256 y) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            r_lo := add(x_lo, y)\n            // `lt(r_lo, x_lo)` indicates overflow in the lower\n            // addition. Overflow in the high limb is simply ignored\n            r_hi := add(x_hi, lt(r_lo, x_lo))\n        }\n    }\n\n    function _add(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (uint256 r_hi, uint256 r_lo)\n    {\n        assembly (\"memory-safe\") {\n            r_lo := add(x_lo, y_lo)\n            // `lt(r_lo, x_lo)` indicates overflow in the lower\n            // addition. Overflow in the high limb is simply ignored.\n            r_hi := add(add(x_hi, y_hi), lt(r_lo, x_lo))\n        }\n    }\n\n    function oadd(uint512 r, uint256 x, uint256 y) internal pure returns (uint512) {\n        (uint256 r_hi, uint256 r_lo) = _add(x, y);\n        return r.from(r_hi, r_lo);\n    }\n\n    function oadd(uint512 r, uint512 x, uint256 y) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 r_hi, uint256 r_lo) = _add(x_hi, x_lo, y);\n        return r.from(r_hi, r_lo);\n    }\n\n    function iadd(uint512 r, uint256 y) internal pure returns (uint512) {\n        return oadd(r, r, y);\n    }\n\n    function oadd(uint512 r, uint512 x, uint512 y) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        (uint256 r_hi, uint256 r_lo) = _add(x_hi, x_lo, y_hi, y_lo);\n        return r.from(r_hi, r_lo);\n    }\n\n    function iadd(uint512 r, uint512 y) internal pure returns (uint512) {\n        return oadd(r, r, y);\n    }\n\n    function _sub(uint256 x_hi, uint256 x_lo, uint256 y) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            r_lo := sub(x_lo, y)\n            // `gt(r_lo, x_lo)` indicates underflow in the lower subtraction. We\n            // can subtract the bool directly from the integer to perform carry.\n            r_hi := sub(x_hi, gt(r_lo, x_lo))\n        }\n    }\n\n    function osub(uint512 r, uint512 x, uint256 y) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 r_hi, uint256 r_lo) = _sub(x_hi, x_lo, y);\n        return r.from(r_hi, r_lo);\n    }\n\n    function isub(uint512 r, uint256 y) internal pure returns (uint512) {\n        return osub(r, r, y);\n    }\n\n    function _sub(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (uint256 r_hi, uint256 r_lo)\n    {\n        assembly (\"memory-safe\") {\n            r_lo := sub(x_lo, y_lo)\n            // `gt(r_lo, x_lo)` indicates underflow in the lower subtraction.\n            // Underflow in the high limb is simply ignored.\n            r_hi := sub(sub(x_hi, y_hi), gt(r_lo, x_lo))\n        }\n    }\n\n    function osub(uint512 r, uint512 x, uint512 y) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        (uint256 r_hi, uint256 r_lo) = _sub(x_hi, x_lo, y_hi, y_lo);\n        return r.from(r_hi, r_lo);\n    }\n\n    function isub(uint512 r, uint512 y) internal pure returns (uint512) {\n        return osub(r, r, y);\n    }\n\n    function irsub(uint512 r, uint512 y) internal pure returns (uint512) {\n        return osub(r, y, r);\n    }\n\n    function sub(uint512 x, uint256 y) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := sub(mload(add(0x20, x)), y)\n        }\n    }\n\n    function sub(uint512 x, uint512 y) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := sub(mload(add(0x20, x)), mload(add(0x20, y)))\n        }\n    }\n\n    //// The technique implemented in the following functions for multiplication is\n    //// adapted from Remco Bloemen's work https://2π.com/17/full-mul/ .\n    //// The original code was released under the MIT license.\n\n    function _mul(uint256 x, uint256 y) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            let mm := mulmod(x, y, not(0x00))\n            r_lo := mul(x, y)\n            r_hi := sub(sub(mm, r_lo), lt(mm, r_lo))\n        }\n    }\n\n    function omul(uint512 r, uint256 x, uint256 y) internal pure returns (uint512) {\n        (uint256 r_hi, uint256 r_lo) = _mul(x, y);\n        return r.from(r_hi, r_lo);\n    }\n\n    function _mul(uint256 x_hi, uint256 x_lo, uint256 y) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            let mm := mulmod(x_lo, y, not(0x00))\n            r_lo := mul(x_lo, y)\n            r_hi := add(mul(x_hi, y), sub(sub(mm, r_lo), lt(mm, r_lo)))\n        }\n    }\n\n    function omul(uint512 r, uint512 x, uint256 y) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 r_hi, uint256 r_lo) = _mul(x_hi, x_lo, y);\n        return r.from(r_hi, r_lo);\n    }\n\n    function imul(uint512 r, uint256 y) internal pure returns (uint512) {\n        return omul(r, r, y);\n    }\n\n    function _mul(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (uint256 r_hi, uint256 r_lo)\n    {\n        assembly (\"memory-safe\") {\n            let mm := mulmod(x_lo, y_lo, not(0x00))\n            r_lo := mul(x_lo, y_lo)\n            r_hi := add(add(mul(x_hi, y_lo), mul(x_lo, y_hi)), sub(sub(mm, r_lo), lt(mm, r_lo)))\n        }\n    }\n\n    function omul(uint512 r, uint512 x, uint512 y) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        (uint256 r_hi, uint256 r_lo) = _mul(x_hi, x_lo, y_hi, y_lo);\n        return r.from(r_hi, r_lo);\n    }\n\n    function imul(uint512 r, uint512 y) internal pure returns (uint512) {\n        return omul(r, r, y);\n    }\n\n    function mod(uint512 n, uint256 d) internal pure returns (uint256 r) {\n        if (d == 0) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        (uint256 n_hi, uint256 n_lo) = n.into();\n        assembly (\"memory-safe\") {\n            r := mulmod(n_hi, sub(0x00, d), d)\n            r := addmod(n_lo, r, d)\n        }\n    }\n\n    function omod(uint512 r, uint512 x, uint512 y) internal view returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        assembly (\"memory-safe\") {\n            // We use the MODEXP (5) precompile with an exponent of 1. We encode\n            // the arguments to the precompile at the beginning of free memory\n            // without allocating. Arguments are encoded as:\n            //     [64 32 64 x_hi x_lo 1 y_hi y_lo]\n            let ptr := mload(0x40)\n            mstore(ptr, 0x40)\n            mstore(add(0x20, ptr), 0x20)\n            mstore(add(0x40, ptr), 0x40)\n            // See comment in `from` about why `mstore` is more efficient than `mcopy`\n            mstore(add(0x60, ptr), x_hi)\n            mstore(add(0x80, ptr), x_lo)\n            mstore(add(0xa0, ptr), 0x01)\n            mstore(add(0xc0, ptr), y_hi)\n            mstore(add(0xe0, ptr), y_lo)\n\n            // We write the result of MODEXP directly into the output space r.\n            pop(staticcall(gas(), 0x05, ptr, 0x100, r, 0x40))\n            // The MODEXP precompile can only fail due to out-of-gas. This call\n            // consumes only 200 gas, so if it failed, there is only 4 gas\n            // remaining in this context. Therefore, we will out-of-gas\n            // immediately when we attempt to read the result. We don't bother\n            // to check for failure.\n        }\n        return r;\n    }\n\n    function imod(uint512 r, uint512 y) internal view returns (uint512) {\n        return omod(r, r, y);\n    }\n\n    function irmod(uint512 r, uint512 y) internal view returns (uint512) {\n        return omod(r, y, r);\n    }\n\n    /// Multiply 512-bit [x_hi x_lo] by 256-bit [y] giving 768-bit [r_ex r_hi r_lo]\n    function _mul768(uint256 x_hi, uint256 x_lo, uint256 y)\n        private\n        pure\n        returns (uint256 r_ex, uint256 r_hi, uint256 r_lo)\n    {\n        assembly (\"memory-safe\") {\n            let mm0 := mulmod(x_lo, y, not(0x00))\n            r_lo := mul(x_lo, y)\n            let mm1 := mulmod(x_hi, y, not(0x00))\n            let r_partial := mul(x_hi, y)\n            r_ex := sub(sub(mm1, r_partial), lt(mm1, r_partial))\n\n            r_hi := add(r_partial, sub(sub(mm0, r_lo), lt(mm0, r_lo)))\n            // `lt(r_hi, r_partial)` indicates overflow in the addition to form\n            // `r_hi`. We can add the bool directly to the integer to perform\n            // carry.\n            r_ex := add(r_ex, lt(r_hi, r_partial))\n        }\n    }\n\n    //// The technique implemented in the following functions for division is\n    //// adapted from Remco Bloemen's work https://2π.com/21/muldiv/ .\n    //// The original code was released under the MIT license.\n\n    function _roundDown(uint256 x_hi, uint256 x_lo, uint256 d)\n        private\n        pure\n        returns (uint256 r_hi, uint256 r_lo, uint256 rem)\n    {\n        assembly (\"memory-safe\") {\n            // Get the remainder [n_hi n_lo] % d (< 2²⁵⁶ - 1)\n            // 2**256 % d = -d % 2**256 % d -- https://2π.com/17/512-bit-division/\n            rem := mulmod(x_hi, sub(0x00, d), d)\n            rem := addmod(x_lo, rem, d)\n\n            r_hi := sub(x_hi, gt(rem, x_lo))\n            r_lo := sub(x_lo, rem)\n        }\n    }\n\n    // TODO: remove and replace existing division operations with the Algorithm\n    // D variants\n    function _roundDown(uint256 x_hi, uint256 x_lo, uint256 d_hi, uint256 d_lo)\n        private\n        view\n        returns (uint256 r_hi, uint256 r_lo, uint256 rem_hi, uint256 rem_lo)\n    {\n        uint512 r;\n        assembly (\"memory-safe\") {\n            // We point `r` to the beginning of free memory WITHOUT allocating.\n            // This is not technically \"memory-safe\" because solc might use that\n            // memory for something in between the end of this assembly block\n            // and the beginning of the call to `into()`, but empirically and\n            // practically speaking that won't and doesn't happen. We save some\n            // gas by not bumping the free pointer.\n            r := mload(0x40)\n\n            // Get the remainder [x_hi x_lo] % [d_hi d_lo] (< 2⁵¹² - 1) We use\n            // the MODEXP (5) precompile with an exponent of 1. We encode the\n            // arguments to the precompile at the beginning of free memory\n            // without allocating. Conveniently, `r` already points to this\n            // region. Arguments are encoded as:\n            //     [64 32 64 x_hi x_lo 1 d_hi d_lo]\n            mstore(r, 0x40)\n            mstore(add(0x20, r), 0x20)\n            mstore(add(0x40, r), 0x40)\n            mstore(add(0x60, r), x_hi)\n            mstore(add(0x80, r), x_lo)\n            mstore(add(0xa0, r), 0x01)\n            mstore(add(0xc0, r), d_hi)\n            mstore(add(0xe0, r), d_lo)\n\n            // The MODEXP precompile can only fail due to out-of-gas. This call\n            // consumes only 200 gas, so if it failed, there is only 4 gas\n            // remaining in this context. Therefore, we will out-of-gas\n            // immediately when we attempt to read the result. We don't bother\n            // to check for failure.\n            pop(staticcall(gas(), 0x05, r, 0x100, r, 0x40))\n        }\n        (rem_hi, rem_lo) = r.into();\n        // Round down by subtracting the remainder from the numerator\n        (r_hi, r_lo) = _sub(x_hi, x_lo, rem_hi, rem_lo);\n    }\n\n    function _twos(uint256 x) private pure returns (uint256 twos, uint256 twosInv) {\n        assembly (\"memory-safe\") {\n            // Compute largest power of two divisor of `x`. `x` is nonzero, so\n            // this is always ≥ 1.\n            twos := and(sub(0x00, x), x)\n\n            // To shift up (bits from the high limb into the low limb) we need\n            // the inverse of `twos`. That is, 2²⁵⁶ / twos.\n            //     2**256 / twos = -twos % 2**256 / twos + 1 -- https://2π.com/17/512-bit-division/\n            // If `twos` is zero, then `twosInv` becomes one (not possible)\n            twosInv := add(div(sub(0x00, twos), twos), 0x01)\n        }\n    }\n\n    function _toOdd256(uint256 x_hi, uint256 x_lo, uint256 y) private pure returns (uint256 x_lo_out, uint256 y_out) {\n        // Factor powers of two out of `y` and apply the same shift to [x_hi\n        // x_lo]\n        (uint256 twos, uint256 twosInv) = _twos(y);\n\n        assembly (\"memory-safe\") {\n            // Divide `y` by the power of two\n            y_out := div(y, twos)\n\n            // Divide [x_hi x_lo] by the power of two\n            x_lo_out := or(div(x_lo, twos), mul(x_hi, twosInv))\n        }\n    }\n\n    function _toOdd256(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (uint256 x_lo_out, uint256 y_lo_out)\n    {\n        // Factor powers of two out of `y_lo` and apply the same shift to `x_lo`\n        (uint256 twos, uint256 twosInv) = _twos(y_lo);\n\n        assembly (\"memory-safe\") {\n            // Divide [y_hi y_lo] by the power of two, returning only the low limb\n            y_lo_out := or(div(y_lo, twos), mul(y_hi, twosInv))\n\n            // Divide [x_hi x_lo] by the power of two, returning only the low limb\n            x_lo_out := or(div(x_lo, twos), mul(x_hi, twosInv))\n        }\n    }\n\n    function _toOdd512(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (uint256 x_hi_out, uint256 x_lo_out, uint256 y_hi_out, uint256 y_lo_out)\n    {\n        // Factor powers of two out of [y_hi y_lo] and apply the same shift to\n        // [x_hi x_lo] and [y_hi y_lo]\n        (uint256 twos, uint256 twosInv) = _twos(y_lo);\n\n        assembly (\"memory-safe\") {\n            // Divide [y_hi y_lo] by the power of two\n            y_hi_out := div(y_hi, twos)\n            y_lo_out := or(div(y_lo, twos), mul(y_hi, twosInv))\n\n            // Divide [x_hi x_lo] by the power of two\n            x_hi_out := div(x_hi, twos)\n            x_lo_out := or(div(x_lo, twos), mul(x_hi, twosInv))\n        }\n    }\n\n    function _invert256(uint256 d) private pure returns (uint256 inv) {\n        assembly (\"memory-safe\") {\n            // Invert `d` mod 2²⁵⁶ -- https://2π.com/18/multiplitcative-inverses/\n            // `d` is an odd number (from _toOdd*). It has an inverse modulo\n            // 2²⁵⁶ such that d * inv ≡ 1 mod 2²⁵⁶.\n            // We use Newton-Raphson iterations compute inv. Thanks to Hensel's\n            // lifting lemma, this also works in modular arithmetic, doubling\n            // the correct bits in each step. The Newton-Raphson-Hensel step is:\n            //    inv_{n+1} = inv_n * (2 - d*inv_n) % 2**512\n\n            // To kick off Newton-Raphson-Hensel iterations, we start with a\n            // seed of the inverse that is correct correct for four bits.\n            //     d * inv ≡ 1 mod 2⁴\n            inv := xor(mul(0x03, d), 0x02)\n\n            // Each Newton-Raphson-Hensel step doubles the number of correct\n            // bits in `inv`. After 6 iterations, full convergence is\n            // guaranteed.\n            inv := mul(inv, sub(0x02, mul(d, inv))) // inverse mod 2⁸\n            inv := mul(inv, sub(0x02, mul(d, inv))) // inverse mod 2¹⁶\n            inv := mul(inv, sub(0x02, mul(d, inv))) // inverse mod 2³²\n            inv := mul(inv, sub(0x02, mul(d, inv))) // inverse mod 2⁶⁴\n            inv := mul(inv, sub(0x02, mul(d, inv))) // inverse mod 2¹²⁸\n            inv := mul(inv, sub(0x02, mul(d, inv))) // inverse mod 2²⁵⁶\n        }\n    }\n\n    // TODO: once the existing division routines are ported over to the\n    // Algorithm D variants (avoiding the use of the `MODEXP` precompile), this\n    // function is no longer needed.\n    function _invert512(uint256 d_hi, uint256 d_lo) private pure returns (uint256 inv_hi, uint256 inv_lo) {\n        // First, we get the inverse of `d` mod 2²⁵⁶\n        inv_lo = _invert256(d_lo);\n\n        // To extend this to the inverse mod 2⁵¹², we perform a more elaborate\n        // 7th Newton-Raphson-Hensel iteration with 512 bits of precision.\n\n        // tmp = d * inv_lo % 2**512\n        (uint256 tmp_hi, uint256 tmp_lo) = _mul(d_hi, d_lo, inv_lo);\n        // tmp = 2 - tmp % 2**512\n        (tmp_hi, tmp_lo) = _sub(0, 2, tmp_hi, tmp_lo);\n\n        assembly (\"memory-safe\") {\n            // inv_hi = inv_lo * tmp / 2**256 % 2**256\n            let mm := mulmod(inv_lo, tmp_lo, not(0x00))\n            inv_hi := add(mul(inv_lo, tmp_hi), sub(sub(mm, inv_lo), lt(mm, inv_lo)))\n        }\n    }\n\n    function _div(uint256 n_hi, uint256 n_lo, uint256 d) private pure returns (uint256) {\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result.\n        (n_hi, n_lo,) = _roundDown(n_hi, n_lo, d);\n\n        // Make `d` odd so that it has a multiplicative inverse mod 2²⁵⁶.\n        // After this we can discard `n_hi` because our result is only 256 bits\n        (n_lo, d) = _toOdd256(n_hi, n_lo, d);\n\n        // We perform division by multiplying by the multiplicative inverse of\n        // the denominator mod 2²⁵⁶. Since `d` is odd, this inverse\n        // exists. Compute that inverse\n        d = _invert256(d);\n\n        unchecked {\n            // Because the division is now exact (we rounded `n` down to a\n            // multiple of `d`), we perform it by multiplying with the modular\n            // inverse of the denominator. This is the correct result mod 2²⁵⁶.\n            return n_lo * d;\n        }\n    }\n\n    function _divUp(uint256 n_hi, uint256 n_lo, uint256 d) private pure returns (uint256) {\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result. Store the remainder\n        // for later to determine whether we must increment the result in order\n        // to round up.\n        uint256 rem;\n        (n_hi, n_lo, rem) = _roundDown(n_hi, n_lo, d);\n\n        // Make `d` odd so that it has a multiplicative inverse mod 2²⁵⁶.\n        // After this we can discard `n_hi` because our result is only 256 bits\n        (n_lo, d) = _toOdd256(n_hi, n_lo, d);\n\n        // We perform division by multiplying by the multiplicative inverse of\n        // the denominator mod 2²⁵⁶. Since `d` is odd, this inverse\n        // exists. Compute that inverse\n        d = _invert256(d);\n\n        unchecked {\n            // Because the division is now exact (we rounded `n` down to a\n            // multiple of `d`), we perform it by multiplying with the modular\n            // inverse of the denominator. This is the floor of the division,\n            // mod 2²⁵⁶. To obtain the ceiling, we conditionally add 1 if the\n            // remainder was nonzero.\n            return (n_lo * d).unsafeInc(0 < rem);\n        }\n    }\n\n    function unsafeDiv(uint512 n, uint256 d) internal pure returns (uint256) {\n        (uint256 n_hi, uint256 n_lo) = n.into();\n        if (n_hi == 0) {\n            return n_lo.unsafeDiv(d);\n        }\n\n        return _div(n_hi, n_lo, d);\n    }\n\n    function div(uint512 n, uint256 d) internal pure returns (uint256) {\n        if (d == 0) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        return unsafeDiv(n, d);\n    }\n\n    function unsafeDivUp(uint512 n, uint256 d) internal pure returns (uint256) {\n        (uint256 n_hi, uint256 n_lo) = n.into();\n        if (n_hi == 0) {\n            return n_lo.unsafeDivUp(d);\n        }\n\n        return _divUp(n_hi, n_lo, d);\n    }\n\n    function divUp(uint512 n, uint256 d) internal pure returns (uint256) {\n        if (d == 0) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        return unsafeDivUp(n, d);\n    }\n\n    function _gt(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo) private pure returns (bool r) {\n        assembly (\"memory-safe\") {\n            r := or(gt(x_hi, y_hi), and(eq(x_hi, y_hi), gt(x_lo, y_lo)))\n        }\n    }\n\n    function div(uint512 n, uint512 d) internal view returns (uint256) {\n        (uint256 d_hi, uint256 d_lo) = d.into();\n        if (d_hi == 0) {\n            return div(n, d_lo);\n        }\n        (uint256 n_hi, uint256 n_lo) = n.into();\n        if (d_lo == 0) {\n            return n_hi.unsafeDiv(d_hi);\n        }\n        if (_gt(d_hi, d_lo, n_hi, n_lo)) {\n            // TODO: this optimization may not be overall optimizing\n            return 0;\n        }\n\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result.\n        (n_hi, n_lo,,) = _roundDown(n_hi, n_lo, d_hi, d_lo);\n\n        // Make `d_lo` odd so that it has a multiplicative inverse mod 2²⁵⁶.\n        // After this we can discard `n_hi` and `d_hi` because our result is\n        // only 256 bits\n        (n_lo, d_lo) = _toOdd256(n_hi, n_lo, d_hi, d_lo);\n\n        // We perform division by multiplying by the multiplicative inverse of\n        // the denominator mod 2²⁵⁶. Since `d_lo` is odd, this inverse\n        // exists. Compute that inverse\n        d_lo = _invert256(d_lo);\n\n        unchecked {\n            // Because the division is now exact (we rounded `n` down to a\n            // multiple of `d`), we perform it by multiplying with the modular\n            // inverse of the denominator. This is the correct result mod 2²⁵⁶.\n            return n_lo * d_lo;\n        }\n    }\n\n    function divUp(uint512 n, uint512 d) internal view returns (uint256) {\n        (uint256 d_hi, uint256 d_lo) = d.into();\n        if (d_hi == 0) {\n            return divUp(n, d_lo);\n        }\n        (uint256 n_hi, uint256 n_lo) = n.into();\n        if (d_lo == 0) {\n            return n_hi.unsafeDiv(d_hi).unsafeInc(0 < (n_lo | n_hi.unsafeMod(d_hi)));\n        }\n\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result. Save the remainder\n        // for later to determine whether we need to increment to round up.\n        uint256 rem_hi;\n        uint256 rem_lo;\n        (n_hi, n_lo, rem_hi, rem_lo) = _roundDown(n_hi, n_lo, d_hi, d_lo);\n\n        // Make `d_lo` odd so that it has a multiplicative inverse mod 2²⁵⁶.\n        // After this we can discard `n_hi` and `d_hi` because our result is\n        // only 256 bits\n        (n_lo, d_lo) = _toOdd256(n_hi, n_lo, d_hi, d_lo);\n\n        // We perform division by multiplying by the multiplicative inverse of\n        // the denominator mod 2²⁵⁶. Since `d_lo` is odd, this inverse\n        // exists. Compute that inverse\n        d_lo = _invert256(d_lo);\n\n        unchecked {\n            // Because the division is now exact (we rounded `n` down to a\n            // multiple of `d`), we perform it by multiplying with the modular\n            // inverse of the denominator. This is the floor of the division,\n            // mod 2²⁵⁶. To obtain the ceiling, we conditionally add 1 if the\n            // remainder was nonzero.\n            return (n_lo * d_lo).unsafeInc(0 < (rem_hi | rem_lo));\n        }\n    }\n\n    function odiv(uint512 r, uint512 x, uint256 y) internal pure returns (uint512) {\n        if (y == 0) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (x_hi == 0) {\n            return r.from(0, x_lo.unsafeDiv(y));\n        }\n\n        // The upper word of the quotient is straightforward. We can use\n        // \"normal\" division to obtain it. The remainder after that division\n        // must be carried forward to the later steps, however, because the next\n        // operation we perform is a `mulmod` of `x_hi` with `y`, there's no\n        // need to reduce `x_hi` mod `y` as would be ordinarily expected.\n        uint256 r_hi = x_hi.unsafeDiv(y);\n\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result.\n        (x_hi, x_lo,) = _roundDown(x_hi, x_lo, y);\n\n        // Make `y` odd so that it has a multiplicative inverse mod 2²⁵⁶. After\n        // this we can discard `x_hi` because we have already obtained the upper\n        // word.\n        (x_lo, y) = _toOdd256(x_hi, x_lo, y);\n\n        // The lower word of the quotient is obtained from division by\n        // multiplying by the multiplicative inverse of the denominator mod\n        // 2²⁵⁶. Since `y` is odd, this inverse exists. Compute that inverse\n        y = _invert256(y);\n\n        uint256 r_lo;\n        unchecked {\n            // Because the division is now exact (we rounded `x` down to a\n            // multiple of the original `y`), we perform it by multiplying with\n            // the modular inverse of the denominator. This is the correct\n            // result mod 2²⁵⁶.\n            r_lo = x_lo * y;\n        }\n\n        return r.from(r_hi, r_lo);\n    }\n\n    function idiv(uint512 r, uint256 y) internal pure returns (uint512) {\n        return odiv(r, r, y);\n    }\n\n    function odivUp(uint512 r, uint512 x, uint256 y) internal pure returns (uint512) {\n        if (y == 0) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (x_hi == 0) {\n            return r.from(0, x_lo.unsafeDivUp(y));\n        }\n\n        // The upper word of the quotient is straightforward. We can use\n        // \"normal\" division to obtain it. The remainder after that division\n        // must be carried forward to the later steps, however, because the next\n        // operation we perform is a `mulmod` of `x_hi` with `y`, there's no\n        // need to reduce `x_hi` mod `y` as would be ordinarily expected.\n        uint256 r_hi = x_hi.unsafeDiv(y);\n\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result. Save the remainder\n        // for later to determine whether we need to increment to round up.\n        uint256 rem;\n        (x_hi, x_lo, rem) = _roundDown(x_hi, x_lo, y);\n\n        // Make `y` odd so that it has a multiplicative inverse mod 2²⁵⁶. After\n        // this we can discard `x_hi` because we have already obtained the upper\n        // word.\n        (x_lo, y) = _toOdd256(x_hi, x_lo, y);\n\n        // The lower word of the quotient is obtained from division by\n        // multiplying by the multiplicative inverse of the denominator mod\n        // 2²⁵⁶. Since `y` is odd, this inverse exists. Compute that inverse\n        y = _invert256(y);\n\n        uint256 r_lo;\n        unchecked {\n            // Because the division is now exact (we rounded `x` down to a\n            // multiple of the original `y`), we perform it by multiplying with\n            // the modular inverse of the denominator. This is the floor of the\n            // division, mod 2²⁵⁶.\n            r_lo = x_lo * y;\n        }\n        // To obtain the ceiling, we conditionally add 1 if the remainder was\n        // nonzero.\n        (r_hi, r_lo) = _add(r_hi, r_lo, (0 < rem).toUint());\n\n        return r.from(r_hi, r_lo);\n    }\n\n    function idivUp(uint512 r, uint256 y) internal pure returns (uint512) {\n        return odivUp(r, r, y);\n    }\n\n    function odiv(uint512 r, uint512 x, uint512 y) internal view returns (uint512) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            return odiv(r, x, y_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            return r.from(0, x_hi.unsafeDiv(y_hi));\n        }\n        if (_gt(y_hi, y_lo, x_hi, x_lo)) {\n            // TODO: this optimization may not be overall optimizing\n            return r.from(0, 0);\n        }\n\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result.\n        (x_hi, x_lo,,) = _roundDown(x_hi, x_lo, y_hi, y_lo);\n\n        // Make `y` odd so that it has a multiplicative inverse mod 2⁵¹²\n        (x_hi, x_lo, y_hi, y_lo) = _toOdd512(x_hi, x_lo, y_hi, y_lo);\n\n        // We perform division by multiplying by the multiplicative inverse of\n        // the denominator mod 2⁵¹². Since `y` is odd, this inverse\n        // exists. Compute that inverse\n        (y_hi, y_lo) = _invert512(y_hi, y_lo);\n\n        // Because the division is now exact (we rounded `x` down to a multiple\n        // of `y`), we perform it by multiplying with the modular inverse of the\n        // denominator.\n        (uint256 r_hi, uint256 r_lo) = _mul(x_hi, x_lo, y_hi, y_lo);\n        return r.from(r_hi, r_lo);\n    }\n\n    function idiv(uint512 r, uint512 y) internal view returns (uint512) {\n        return odiv(r, r, y);\n    }\n\n    function irdiv(uint512 r, uint512 y) internal view returns (uint512) {\n        return odiv(r, y, r);\n    }\n\n    function odivUp(uint512 r, uint512 x, uint512 y) internal view returns (uint512) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            return odivUp(r, x, y_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            (uint256 r_hi_, uint256 r_lo_) = _add(0, x_hi.unsafeDiv(y_hi), (0 < (x_lo | x_hi.unsafeMod(y_hi))).toUint());\n            return r.from(r_hi_, r_lo_);\n        }\n\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result. Save the remainder\n        // for later to determine whether we need to increment to round up.\n        uint256 rem_hi;\n        uint256 rem_lo;\n        (x_hi, x_lo, rem_hi, rem_lo) = _roundDown(x_hi, x_lo, y_hi, y_lo);\n\n        // Make `y` odd so that it has a multiplicative inverse mod 2⁵¹²\n        (x_hi, x_lo, y_hi, y_lo) = _toOdd512(x_hi, x_lo, y_hi, y_lo);\n\n        // We perform division by multiplying by the multiplicative inverse of\n        // the denominator mod 2⁵¹². Since `y` is odd, this inverse\n        // exists. Compute that inverse\n        (y_hi, y_lo) = _invert512(y_hi, y_lo);\n\n        // Because the division is now exact (we rounded `x` down to a multiple\n        // of `y`), we perform it by multiplying with the modular inverse of the\n        // denominator. This is the floor of the division.\n        (uint256 r_hi, uint256 r_lo) = _mul(x_hi, x_lo, y_hi, y_lo);\n\n        // To obtain the ceiling, we conditionally add 1 if the remainder was\n        // nonzero.\n        (r_hi, r_lo) = _add(r_hi, r_lo, (0 < (rem_hi | rem_lo)).toUint());\n\n        return r.from(r_hi, r_lo);\n    }\n\n    function idivUp(uint512 r, uint512 y) internal view returns (uint512) {\n        return odivUp(r, r, y);\n    }\n\n    function irdivUp(uint512 r, uint512 y) internal view returns (uint512) {\n        return odivUp(r, y, r);\n    }\n\n    function _gt(uint256 x_ex, uint256 x_hi, uint256 x_lo, uint256 y_ex, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (bool r)\n    {\n        assembly (\"memory-safe\") {\n            r := or(\n                or(gt(x_ex, y_ex), and(eq(x_ex, y_ex), gt(x_hi, y_hi))),\n                and(and(eq(x_ex, y_ex), eq(x_hi, y_hi)), gt(x_lo, y_lo))\n            )\n        }\n    }\n\n    /// The technique implemented in the following helper function for Knuth\n    /// Algorithm D (a modification of the citation further below) is adapted\n    /// from ridiculous fish's (aka corydoras) work\n    /// https://ridiculousfish.com/blog/posts/labor-of-division-episode-iv.html\n    /// and\n    /// https://ridiculousfish.com/blog/posts/labor-of-division-episode-v.html .\n\n    function _correctQ(uint256 q, uint256 r, uint256 x_next, uint256 y_next, uint256 y_whole)\n        private\n        pure\n        returns (uint256 q_out)\n    {\n        assembly (\"memory-safe\") {\n            let c1 := mul(q, y_next)\n            let c2 := or(shl(0x80, r), x_next)\n            q_out := sub(q, shl(gt(sub(c1, c2), y_whole), gt(c1, c2)))\n        }\n    }\n\n    /// The technique implemented in the following function for division is\n    /// adapted from Donald Knuth, The Art of Computer Programming (TAOCP)\n    /// Volume 2, Section 4.3.1, Algorithm D.\n\n    function _algorithmD(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo) private pure returns (uint256 q) {\n        // We treat `x` and `y` each as ≤4-limb bigints where each limb is half\n        // a machine word (128 bits). This lets us perform 2-limb ÷ 1-limb\n        // divisions as a single operation (`div`) as required by Algorithm\n        // D. It also simplifies/optimizes some of the multiplications.\n\n        if (y_hi >> 128 != 0) {\n            // y is 4 limbs, x is 4 limbs, q is 1 limb\n\n            // Normalize. Ensure the uppermost limb of y ≥ 2¹²⁷ (equivalently\n            // y_hi >= 2**255). This is step D1 of Algorithm D. We use `CLZ` to\n            // find the shift amount, then shift both `x` and `y` left. This is\n            // more gas-efficient than multiplication-based normalization.\n            uint256 s = y_hi.clz();\n            uint256 x_ex;\n            (x_ex, x_hi, x_lo) = _shl256(x_hi, x_lo, s);\n            (, y_hi, y_lo) = _shl256(y_hi, y_lo, s);\n\n            // `n_approx` is the 2 most-significant limbs of x, after\n            // normalization\n            uint256 n_approx = (x_ex << 128) | (x_hi >> 128);\n            // `d_approx` is the most significant limb of y, after normalization\n            uint256 d_approx = y_hi >> 128;\n            // Normalization ensures that result of this division is an\n            // approximation of the most significant (and only) limb of the\n            // quotient and is too high by at most 3. This is the \"Calculate\n            // q-hat\" (D3) step of Algorithm D. (did you know that U+0302,\n            // COMBINING CIRCUMFLEX ACCENT cannot be combined with q? shameful)\n            q = n_approx.unsafeDiv(d_approx);\n            uint256 r_hat = n_approx.unsafeMod(d_approx);\n\n            // The process of `_correctQ` subtracts up to 2 from `q`, to make it\n            // more accurate. This is still part of the \"Calculate q-hat\" (D3)\n            // step of Algorithm D.\n            q = _correctQ(q, r_hat, x_hi & type(uint128).max, y_hi & type(uint128).max, y_hi);\n\n            // This final, low-probability, computationally-expensive correction\n            // conditionally subtracts 1 from `q` to make it exactly the\n            // most-significant limb of the quotient. This is the \"Multiply and\n            // subtract\" (D4), \"Test remainder\" (D5), and \"Add back\" (D6) steps\n            // of Algorithm D, with substantial shortcutting\n            {\n                (uint256 tmp_ex, uint256 tmp_hi, uint256 tmp_lo) = _mul768(y_hi, y_lo, q);\n                bool neg = _gt(tmp_ex, tmp_hi, tmp_lo, x_ex, x_hi, x_lo);\n                q = q.unsafeDec(neg);\n            }\n        } else {\n            // y is 3 limbs\n\n            // Normalize. Ensure the most significant limb of y ≥ 2¹²⁷ (step D1)\n            // We use `CLZ` to find the shift amount for normalization\n            uint256 s = (y_hi << 128).clz();\n            (, y_hi, y_lo) = _shl256(y_hi, y_lo, s);\n            // `y_next` is the second-most-significant, nonzero, normalized limb\n            // of y\n            uint256 y_next = y_lo >> 128;\n            // `y_whole` is the 2 most-significant, nonzero, normalized limbs of\n            // y\n            uint256 y_whole = (y_hi << 128) | y_next;\n\n            if (x_hi >> 128 != 0) {\n                // x is 4 limbs, q is 2 limbs\n\n                // Finish normalizing (step D1)\n                uint256 x_ex;\n                (x_ex, x_hi, x_lo) = _shl256(x_hi, x_lo, s);\n\n                uint256 n_approx = (x_ex << 128) | (x_hi >> 128);\n                // As before, `q_hat` is the most significant limb of the\n                // quotient and too high by at most 3 (step D3)\n                uint256 q_hat = n_approx.unsafeDiv(y_hi);\n                uint256 r_hat = n_approx.unsafeMod(y_hi);\n\n                // Subtract up to 2 from `q_hat`, improving our estimate (step\n                // D3)\n                q_hat = _correctQ(q_hat, r_hat, x_hi & type(uint128).max, y_next, y_whole);\n                q = q_hat << 128;\n\n                {\n                    // \"Multiply and subtract\" (D4) step of Algorithm D\n                    (uint256 tmp_hi, uint256 tmp_lo) = _mul(y_hi, y_lo, q_hat);\n                    uint256 tmp_ex = tmp_hi >> 128;\n                    tmp_hi = (tmp_hi << 128) | (tmp_lo >> 128);\n                    tmp_lo <<= 128;\n\n                    // \"Test remainder\" (D5) step of Algorithm D\n                    bool neg = _gt(tmp_ex, tmp_hi, tmp_lo, x_ex, x_hi, x_lo);\n                    // Finish step D4\n                    (x_hi, x_lo) = _sub(x_hi, x_lo, tmp_hi, tmp_lo);\n\n                    // \"Add back\" (D6) step of Algorithm D\n                    if (neg) {\n                        // This branch is quite rare, so it's gas-advantageous\n                        // to actually branch and usually skip the costly `_add`\n                        unchecked {\n                            q -= 1 << 128;\n                        }\n                        (x_hi, x_lo) = _add(x_hi, x_lo, y_whole, y_lo << 128);\n                    }\n                }\n                // `x_ex` is now zero (implicitly)\n\n                // Run another loop (steps D3 through D6) of Algorithm D to get\n                // the lower limb of the quotient\n                q_hat = x_hi.unsafeDiv(y_hi);\n                r_hat = x_hi.unsafeMod(y_hi);\n\n                q_hat = _correctQ(q_hat, r_hat, x_lo >> 128, y_next, y_whole);\n\n                {\n                    (uint256 tmp_hi, uint256 tmp_lo) = _mul(y_hi, y_lo, q_hat);\n                    bool neg = _gt(tmp_hi, tmp_lo, x_hi, x_lo);\n                    q_hat = q_hat.unsafeDec(neg);\n                }\n\n                q |= q_hat;\n            } else {\n                // x is 3 limbs, q is 1 limb\n\n                // Finish normalizing (step D1)\n                (, x_hi, x_lo) = _shl256(x_hi, x_lo, s);\n\n                // `q` is the most significant (and only) limb of the quotient\n                // and too high by at most 3 (step D3)\n                q = x_hi.unsafeDiv(y_hi);\n                uint256 r_hat = x_hi.unsafeMod(y_hi);\n\n                // Subtract up to 2 from `q`, improving our estimate (step D3)\n                q = _correctQ(q, r_hat, x_lo >> 128, y_next, y_whole);\n\n                // Subtract up to 1 from `q` to make it exact (steps D4 through\n                // D6)\n                {\n                    (uint256 tmp_hi, uint256 tmp_lo) = _mul(y_hi, y_lo, q);\n                    bool neg = _gt(tmp_hi, tmp_lo, x_hi, x_lo);\n                    q = q.unsafeDec(neg);\n                }\n            }\n        }\n        // All other cases are handled by the checks that y ≥ 2²⁵⁶ (equivalently\n        // y_hi != 0) and that x ≥ y\n    }\n\n    function _shl256(uint256 x_lo, uint256 s) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            r_hi := shr(sub(0x100, s), x_lo)\n            r_lo := shl(s, x_lo)\n        }\n    }\n\n    function _shl256(uint256 x_hi, uint256 x_lo, uint256 s)\n        private\n        pure\n        returns (uint256 r_ex, uint256 r_hi, uint256 r_lo)\n    {\n        assembly (\"memory-safe\") {\n            let neg_s := sub(0x100, s)\n            r_ex := shr(neg_s, x_hi)\n            r_hi := or(shl(s, x_hi), shr(neg_s, x_lo))\n            r_lo := shl(s, x_lo)\n        }\n    }\n\n    function _shl(uint256 x_lo, uint256 s) private pure returns (uint256 r_hi, uint256 r_lo) {\n        (r_hi, r_lo) = _shl256(x_lo, s);\n        unchecked {\n            r_hi |= x_lo << s - 256;\n        }\n    }\n\n    function _shl(uint256 x_hi, uint256 x_lo, uint256 s) private pure returns (uint256 r_hi, uint256 r_lo) {\n        (, r_hi, r_lo) = _shl256(x_hi, x_lo, s);\n        unchecked {\n            r_hi |= x_lo << s - 256;\n        }\n    }\n\n    function _shr256(uint256 x_hi, uint256 x_lo, uint256 s) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            r_hi := shr(s, x_hi)\n            r_lo := shr(s, x_lo)\n            r_lo := or(shl(sub(0x100, s), x_hi), r_lo)\n        }\n    }\n\n    function _shr(uint256 x_hi, uint256 x_lo, uint256 s) private pure returns (uint256 r_hi, uint256 r_lo) {\n        (r_hi, r_lo) = _shr256(x_hi, x_lo, s);\n        unchecked {\n            r_lo |= x_hi >> s - 256;\n        }\n    }\n\n    // This function is a different modification of Knuth's Algorithm D. In this\n    // case, we're only interested in the (normalized) remainder instead of the\n    // quotient. We also substitute the normalization by division for\n    // normalization by shifting because it makes un-normalization more\n    // gas-efficient.\n\n    function _algorithmDRemainder(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (uint256, uint256)\n    {\n        // We treat `x` and `y` each as ≤4-limb bigints where each limb is half\n        // a machine word (128 bits). This lets us perform 2-limb ÷ 1-limb\n        // divisions as a single operation (`div`) as required by Algorithm D.\n\n        uint256 s;\n        if (y_hi >> 128 != 0) {\n            // y is 4 limbs, x is 4 limbs\n\n            // Normalize. Ensure the uppermost limb of y ≥ 2¹²⁷ (equivalently\n            // y_hi >= 2**255). This is step D1 of Algorithm D. Unlike the\n            // preceeding implementation of Algorithm D, we use a binary shift\n            // instead of a multiply to normalize. This performs a costly \"count\n            // leading zeroes\" operation, but it lets us transform an\n            // even-more-costly division-by-inversion operation later into a\n            // simple shift. This still ultimately satisfies the postcondition\n            // (y_hi >> 128 >= 1 << 127) without overflowing.\n            s = y_hi.clz();\n            uint256 x_ex;\n            (x_ex, x_hi, x_lo) = _shl256(x_hi, x_lo, s);\n            (, y_hi, y_lo) = _shl256(y_hi, y_lo, s);\n\n            // `n_approx` is the 2 most-significant limbs of x, after\n            // normalization\n            uint256 n_approx = (x_ex << 128) | (x_hi >> 128); // TODO: this can probably be optimized (combined with `_shl`)\n            // `d_approx` is the most significant limb of y, after normalization\n            uint256 d_approx = y_hi >> 128; // TODO: this can probably be optimized (combined with `_shl`)\n            // Normalization ensures that result of this division is an\n            // approximation of the most significant (and only) limb of the\n            // quotient and is too high by at most 3. This is the \"Calculate\n            // q-hat\" (D3) step of Algorithm D. (did you know that U+0302,\n            // COMBINING CIRCUMFLEX ACCENT cannot be combined with q? shameful)\n            uint256 q_hat = n_approx.unsafeDiv(d_approx);\n            uint256 r_hat = n_approx.unsafeMod(d_approx);\n\n            // The process of `_correctQ` subtracts up to 2 from `q_hat`, to\n            // make it more accurate. This is still part of the \"Calculate\n            // q-hat\" (D3) step of Algorithm D.\n            q_hat = _correctQ(q_hat, r_hat, x_hi & type(uint128).max, y_hi & type(uint128).max, y_hi);\n\n            {\n                // This penultimate correction subtracts q-hat × y from x to\n                // obtain the normalized remainder. This is the \"Multiply and\n                // subtract\" (D4) and \"Test remainder\" (D5) steps of Algorithm\n                // D, with some shortcutting\n                (uint256 tmp_ex, uint256 tmp_hi, uint256 tmp_lo) = _mul768(y_hi, y_lo, q_hat);\n                bool neg = _gt(tmp_ex, tmp_hi, tmp_lo, x_ex, x_hi, x_lo);\n                (x_hi, x_lo) = _sub(x_hi, x_lo, tmp_hi, tmp_lo);\n                // `x_ex` is now implicitly zero (or signals a carry that we\n                // will clear in the next step)\n\n                // Because `q_hat` may be too high by 1, we have to detect\n                // underflow from the previous step and correct it. This is the\n                // \"Add back\" (D6) step of Algorithm D\n                if (neg) {\n                    (x_hi, x_lo) = _add(x_hi, x_lo, y_hi, y_lo);\n                }\n            }\n        } else {\n            // y is 3 limbs\n\n            // Normalize. Ensure the most significant limb of y ≥ 2¹²⁷ (step D1)\n            // See above comment about the use of a shift instead of division.\n            s = (y_hi << 128).clz();\n            (, y_hi, y_lo) = _shl256(y_hi, y_lo, s);\n            // `y_next` is the second-most-significant, nonzero, normalized limb\n            // of y\n            uint256 y_next = y_lo >> 128; // TODO: this can probably be optimized (combined with `_shl`)\n            // `y_whole` is the 2 most-significant, nonzero, normalized limbs of\n            // y\n            uint256 y_whole = (y_hi << 128) | y_next; // TODO: this can probably be optimized (combined with `_shl`)\n\n            if (x_hi >> 128 != 0) {\n                // x is 4 limbs; we have to run 2 iterations of Algorithm D to\n                // fully divide out by y\n\n                // Finish normalizing (step D1)\n                uint256 x_ex;\n                (x_ex, x_hi, x_lo) = _shl256(x_hi, x_lo, s);\n\n                uint256 n_approx = (x_ex << 128) | (x_hi >> 128); // TODO: this can probably be optimized (combined with `_shl768`)\n                // As before, `q_hat` is the most significant limb of the\n                // quotient and too high by at most 3 (step D3)\n                uint256 q_hat = n_approx.unsafeDiv(y_hi);\n                uint256 r_hat = n_approx.unsafeMod(y_hi);\n\n                // Subtract up to 2 from `q_hat`, improving our estimate (step\n                // D3)\n                q_hat = _correctQ(q_hat, r_hat, x_hi & type(uint128).max, y_next, y_whole);\n\n                // Subtract up to 1 from q-hat to make it exactly the\n                // most-significant limb of the quotient and subtract q-hat × y\n                // from x to clear the most-significant limb of x.\n                {\n                    // \"Multiply and subtract\" (D4) step of Algorithm D\n                    (uint256 tmp_hi, uint256 tmp_lo) = _mul(y_hi, y_lo, q_hat);\n                    uint256 tmp_ex = tmp_hi >> 128;\n                    tmp_hi = (tmp_hi << 128) | (tmp_lo >> 128);\n                    tmp_lo <<= 128;\n\n                    // \"Test remainder\" (D5) step of Algorithm D\n                    bool neg = _gt(tmp_ex, tmp_hi, tmp_lo, x_ex, x_hi, x_lo);\n                    // Finish step D4\n                    (x_hi, x_lo) = _sub(x_hi, x_lo, tmp_hi, tmp_lo);\n\n                    // \"Add back\" (D6) step of Algorithm D. We implicitly\n                    // subtract 1 from `q_hat`, but elide explicitly\n                    // representing that because `q_hat` is no longer needed.\n                    if (neg) {\n                        // This branch is quite rare, so it's gas-advantageous\n                        // to actually branch and usually skip the costly `_add`\n                        (x_hi, x_lo) = _add(x_hi, x_lo, y_whole, y_lo << 128);\n                    }\n                }\n                // `x_ex` is now zero (implicitly)\n                // [x_hi x_lo] now represents the partial, normalized remainder.\n\n                // Run another loop (steps D3 through D6) of Algorithm D to get\n                // the lower limb of the quotient\n                // Step D3\n                q_hat = x_hi.unsafeDiv(y_hi);\n                r_hat = x_hi.unsafeMod(y_hi);\n\n                // Step D3\n                q_hat = _correctQ(q_hat, r_hat, x_lo >> 128, y_next, y_whole);\n\n                // Again, implicitly correct q-hat to make it exactly the\n                // least-significant limb of the quotient. Subtract q-hat × y\n                // from x to obtain the normalized remainder.\n                {\n                    // Steps D4 and D5\n                    (uint256 tmp_hi, uint256 tmp_lo) = _mul(y_hi, y_lo, q_hat);\n                    bool neg = _gt(tmp_hi, tmp_lo, x_hi, x_lo);\n                    (x_hi, x_lo) = _sub(x_hi, x_lo, tmp_hi, tmp_lo);\n\n                    // Step D6\n                    if (neg) {\n                        (x_hi, x_lo) = _add(x_hi, x_lo, y_hi, y_lo);\n                    }\n                }\n            } else {\n                // x is 3 limbs\n\n                // Finish normalizing (step D1)\n                (, x_hi, x_lo) = _shl256(x_hi, x_lo, s);\n\n                // `q_hat` is the most significant (and only) limb of the\n                // quotient and too high by at most 3 (step D3)\n                uint256 q_hat = x_hi.unsafeDiv(y_hi);\n                uint256 r_hat = x_hi.unsafeMod(y_hi);\n\n                // Subtract up to 2 from `q_hat`, improving our estimate (step\n                // D3)\n                q_hat = _correctQ(q_hat, r_hat, x_lo >> 128, y_next, y_whole);\n\n                // Make `q_hat` exact (implicitly) and subtract q-hat × y from x\n                // to obtain the normalized remainder. (steps D4 through D6)\n                {\n                    (uint256 tmp_hi, uint256 tmp_lo) = _mul(y_hi, y_lo, q_hat);\n                    bool neg = _gt(tmp_hi, tmp_lo, x_hi, x_lo);\n                    (x_hi, x_lo) = _sub(x_hi, x_lo, tmp_hi, tmp_lo);\n                    if (neg) {\n                        (x_hi, x_lo) = _add(x_hi, x_lo, y_hi, y_lo);\n                    }\n                }\n            }\n        }\n        // All other cases are handled by the checks that y ≥ 2²⁵⁶ (equivalently\n        // y_hi != 0) and that x ≥ y\n\n        // The second-most-significant limb of normalized x is now zero\n        // (equivalently x_hi < 2**128), but because the entire machine word is\n        // not guaranteed to be cleared, we can't optimize any further.\n\n        // [x_hi x_lo] now represents remainder × 2ˢ (the normalized remainder);\n        // we shift right by `s` (un-normalize) to obtain the result.\n        return _shr256(x_hi, x_lo, s);\n    }\n\n    function odivAlt(uint512 r, uint512 x, uint512 y) internal pure returns (uint512) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            // This is the only case where we can have a 2-word quotient\n            return odiv(r, x, y_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            uint256 r_lo = x_hi.unsafeDiv(y_hi);\n            return r.from(0, r_lo);\n        }\n        if (_gt(y_hi, y_lo, x_hi, x_lo)) {\n            return r.from(0, 0);\n        }\n\n        // At this point, we know that both `x` and `y` are fully represented by\n        // 2 words. There is no simpler representation for the problem. We must\n        // use Knuth's Algorithm D.\n        {\n            uint256 r_lo = _algorithmD(x_hi, x_lo, y_hi, y_lo);\n            return r.from(0, r_lo);\n        }\n    }\n\n    function idivAlt(uint512 r, uint512 y) internal pure returns (uint512) {\n        return odivAlt(r, r, y);\n    }\n\n    function irdivAlt(uint512 r, uint512 y) internal pure returns (uint512) {\n        return odivAlt(r, y, r);\n    }\n\n    function divAlt(uint512 x, uint512 y) internal pure returns (uint256) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            return div(x, y_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            return x_hi.unsafeDiv(y_hi);\n        }\n        if (_gt(y_hi, y_lo, x_hi, x_lo)) {\n            return 0;\n        }\n\n        // At this point, we know that both `x` and `y` are fully represented by\n        // 2 words. There is no simpler representation for the problem. We must\n        // use Knuth's Algorithm D.\n        return _algorithmD(x_hi, x_lo, y_hi, y_lo);\n    }\n\n    function divUpAlt(uint512 x, uint512 y) internal pure returns (uint256) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            return divUp(x, y_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            return x_hi.unsafeDiv(y_hi).unsafeInc(0 < (x_lo | x_hi.unsafeMod(y_hi)));\n        }\n        if (_gt(y_hi, y_lo, x_hi, x_lo)) {\n            return (0 < (x_hi | x_lo)).toUint();\n        }\n\n        // At this point, we know that both `x` and `y` are fully represented by\n        // 2 words. There is no simpler representation for the problem. We must\n        // use Knuth's Algorithm D.\n        uint256 q = _algorithmD(x_hi, x_lo, y_hi, y_lo);\n\n        // If the division was not exact, then we must round up. This is more\n        // efficient than explicitly computing whether the remainder is nonzero\n        // inside `_algorithmD`.\n        (uint256 prod_hi, uint256 prod_lo) = _mul(y_hi, y_lo, q);\n        return q.unsafeInc(0 < (prod_hi ^ x_hi) | (prod_lo ^ x_lo));\n    }\n\n    function odivUpAlt(uint512 r, uint512 x, uint512 y) internal pure returns (uint512) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            return odivUp(r, x, y_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            (uint256 r_hi_, uint256 r_lo_) = _add(0, x_hi.unsafeDiv(y_hi), (0 < (x_lo | x_hi.unsafeMod(y_hi))).toUint());\n            return r.from(r_hi_, r_lo_);\n        }\n        if (_gt(y_hi, y_lo, x_hi, x_lo)) {\n            return r.from(0, (0 < (x_hi | x_lo)).toUint());\n        }\n\n        // At this point, we know that both `x` and `y` are fully represented by\n        // 2 words. There is no simpler representation for the problem. We must\n        // use Knuth's Algorithm D.\n        uint256 q = _algorithmD(x_hi, x_lo, y_hi, y_lo);\n\n        // If the division was not exact, then we must round up. This is more\n        // efficient than explicitly computing whether the remainder is nonzero\n        // inside `_algorithmD`.\n        (uint256 prod_hi, uint256 prod_lo) = _mul(y_hi, y_lo, q);\n        (uint256 r_hi, uint256 r_lo) = _add(0, q, (0 < (prod_hi ^ x_hi) | (prod_lo ^ x_lo)).toUint());\n        return r.from(r_hi, r_lo);\n    }\n\n    function idivUpAlt(uint512 r, uint512 y) internal pure returns (uint512) {\n        return odivUpAlt(r, r, y);\n    }\n\n    function irdivUpAlt(uint512 r, uint512 y) internal pure returns (uint512) {\n        return odivUpAlt(r, y, r);\n    }\n\n    function omodAlt(uint512 r, uint512 x, uint512 y) internal pure returns (uint512) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            uint256 r_lo = mod(x, y_lo);\n            return r.from(0, r_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            uint256 r_hi = x_hi.unsafeMod(y_hi);\n            return r.from(r_hi, x_lo);\n        }\n        if (_gt(y_hi, y_lo, x_hi, x_lo)) {\n            return r.from(x_hi, x_lo);\n        }\n\n        // At this point, we know that both `x` and `y` are fully represented by\n        // 2 words. There is no simpler representation for the problem. We must\n        // use Knuth's Algorithm D.\n        {\n            (uint256 r_hi, uint256 r_lo) = _algorithmDRemainder(x_hi, x_lo, y_hi, y_lo);\n            return r.from(r_hi, r_lo);\n        }\n    }\n\n    function imodAlt(uint512 r, uint512 y) internal pure returns (uint512) {\n        return omodAlt(r, r, y);\n    }\n\n    function irmodAlt(uint512 r, uint512 y) internal pure returns (uint512) {\n        return omodAlt(r, y, r);\n    }\n\n    // hi ≈ x · y / 2²⁵⁶ (±1)\n    function _inaccurateMulHi(uint256 x, uint256 y) private pure returns (uint256 hi) {\n        assembly (\"memory-safe\") {\n            hi := sub(mulmod(x, y, not(0x00)), mul(x, y))\n        }\n    }\n\n    // gas benchmark 2025/09/20: ~1425 gas\n    function _sqrt(uint256 x_hi, uint256 x_lo) private pure returns (uint256 r) {\n        /// Our general approach here is to compute the inverse of the square root of the argument\n        /// using Newton-Raphson iterations. Then we combine (multiply) this inverse square root\n        /// approximation with the argument to approximate the square root of the argument. After\n        /// that, a final fixup step is applied to get the exact result. We compute the inverse of\n        /// the square root rather than the square root directly because then our Newton-Raphson\n        /// iteration can avoid the extremely expensive 512-bit division subroutine.\n        unchecked {\n            /// First, we normalize `x` by separating it into a mantissa and exponent. We use\n            /// even-exponent normalization.\n\n            // `e` is half the exponent of `x`\n            // e    = ⌊bitlength(x)/2⌋\n            // invE = 256 - e\n            uint256 invE = (x_hi.clz() + 1) >> 1; // invE ∈ [0, 128]\n\n            // Extract mantissa M by shifting x right by 2·e - 255 bits\n            // `M` is the mantissa of `x` as a Q1.255; M ∈ [½, 2)\n            (, uint256 M) = _shr(x_hi, x_lo, 257 - (invE << 1)); // scale: 2⁽²⁵⁵⁻²ᵉ⁾\n\n            /// Pick an initial estimate (seed) for Y using a lookup table. Even-exponent\n            /// normalization means our mantissa is geometrically symmetric around 1, leading to 16\n            /// buckets on the low side and 32 buckets on the high side.\n            // `Y` _ultimately_ approximates the inverse square root of fixnum `M` as a\n            // Q3.253. However, as a gas optimization, the number of fractional bits in `Y` rises\n            // through the steps, giving an inhomogeneous fixed-point representation. Y ≈∈ [√½, √2]\n            uint256 Y; // scale: 2⁽²⁵³⁺ᵉ⁾\n            uint256 Mbucket;\n            assembly (\"memory-safe\") {\n                // Extract the upper 6 bits of `M` to be used as a table index. `M >> 250 < 16` is\n                // invalid (that would imply M<½), so our lookup table only needs to handle only 16\n                // through 63.\n                Mbucket := shr(0xfa, M)\n                // We can't fit 48 seeds into a single word, so we split the table in 2 and use `c`\n                // to select which table we index.\n                let c := lt(0x27, Mbucket)\n\n                // Each entry is 10 bits and the entries are ordered from lowest `i` to highest. The\n                // seed is the value for `Y` for the midpoint of the bucket, rounded to 10\n                // significant bits. That is, Y ≈ 1/√(2·M_mid), as a Q247.9. The 2 comes from the\n                // half-scale difference between Y and √M. The optimality of this choice was\n                // verified by fuzzing.\n                let table_hi := 0x71dc26f1b76c9ad6a5a46819c661946418c621856057e5ed775d1715b96b\n                let table_lo := 0xb26b4a8690a027198e559263e8ce2887e15832047f1f47b5e677dd974dcd\n                let table := xor(table_lo, mul(xor(table_hi, table_lo), c))\n\n                // Index the table to obtain the initial seed of `Y`.\n                let shift := add(0x186, mul(0x0a, sub(mul(0x18, c), Mbucket)))\n                // We begin the Newton-Raphson iterations with `Y` in Q247.9 format.\n                Y := and(0x3ff, shr(shift, table))\n\n                // The worst-case seed for `Y` occurs when `Mbucket = 16`. For monotone quadratic\n                // convergence, we desire that 1/√3 < Y·√M < √(5/3). At the boundaries (worst case)\n                // of the `Mbucket = 16` range, we are 0.407351 (41.3680%) from the lower bound and\n                // 0.275987 (27.1906%) from the higher bound.\n            }\n\n            /// Perform 5 Newton-Raphson iterations. 5 is enough iterations for sufficient\n            /// convergence that our final fixup step produces an exact result.\n            // The Newton-Raphson iteration for 1/√M is:\n            //     Y ≈ Y · (3 - M · Y²) / 2\n            // The implementation of this iteration is deliberately imprecise. No matter how many\n            // times you run it, you won't converge `Y` on the closest Q3.253 to √M. However, this\n            // is acceptable because the cleanup step applied after the final call is very tolerant\n            // of error in the low bits of `Y`.\n\n            // `M` is Q1.255\n            // `Y` is Q247.9\n            {\n                uint256 Y2 = Y * Y;                    // scale: 2¹⁸\n                // Because `M` is Q1.255, multiplying `Y2` by `M` and taking the high word\n                // implicitly divides `MY2` by 2. We move the division by 2 inside the subtraction\n                // from 3 by adjusting the minuend.\n                uint256 MY2 = _inaccurateMulHi(M, Y2); // scale: 2¹⁸\n                uint256 T = 1.5 * 2 ** 18 - MY2;       // scale: 2¹⁸\n                Y *= T;                                // scale: 2²⁷\n            }\n            // `Y` is Q229.27\n            {\n                uint256 Y2 = Y * Y;                    // scale: 2⁵⁴\n                uint256 MY2 = _inaccurateMulHi(M, Y2); // scale: 2⁵⁴\n                uint256 T = 1.5 * 2 ** 54 - MY2;       // scale: 2⁵⁴\n                Y *= T;                                // scale: 2⁸¹\n            }\n            // `Y` is Q175.81\n            {\n                uint256 Y2 = Y * Y;                    // scale: 2¹⁶²\n                uint256 MY2 = _inaccurateMulHi(M, Y2); // scale: 2¹⁶²\n                uint256 T = 1.5 * 2 ** 162 - MY2;      // scale: 2¹⁶²\n                Y = Y * T >> 116;                      // scale: 2¹²⁷\n            }\n            // `Y` is Q129.127\n            if (invE < 95 - Mbucket) {\n                // Generally speaking, for relatively smaller `e` (lower values of `x`) and for\n                // relatively larger `M`, we can skip the 5th N-R iteration. The constant `95` is\n                // derived by extensive fuzzing. Attempting a higher-order approximation of the\n                // relationship between `M` and `invE` consumes, on average, more gas. When this\n                // branch is not taken, the correct bits that this iteration would obtain are\n                // shifted away during the denormalization step. This branch is net gas-optimizing.\n                uint256 Y2 = Y * Y;                    // scale: 2²⁵⁴\n                uint256 MY2 = _inaccurateMulHi(M, Y2); // scale: 2²⁵⁴\n                uint256 T = 1.5 * 2 ** 254 - MY2;      // scale: 2²⁵⁴\n                Y = _inaccurateMulHi(Y << 2, T);       // scale: 2¹²⁷\n            }\n            // `Y` is Q129.127\n            {\n                uint256 Y2 = Y * Y;                    // scale: 2²⁵⁴\n                uint256 MY2 = _inaccurateMulHi(M, Y2); // scale: 2²⁵⁴\n                uint256 T = 1.5 * 2 ** 254 - MY2;      // scale: 2²⁵⁴\n                Y = _inaccurateMulHi(Y << 128, T);     // scale: 2²⁵³\n            }\n            // `Y` is Q3.253\n\n            /// When we combine `Y` with `M` to form our approximation of the square root, we have\n            /// to un-normalize by the half-scale value. This is where even-exponent normalization\n            /// comes in because the half-scale is integral.\n            ///     M   = ⌊x · 2⁽²⁵⁵⁻²ᵉ⁾⌋\n            ///     Y   ≈ 2²⁵³ / √(M / 2²⁵⁵)\n            ///     Y   ≈ 2³⁸¹ / √(2·M)\n            ///     M·Y ≈ 2³⁸¹ · √(M/2)\n            ///     M·Y ≈ 2⁽⁵⁰⁸⁻ᵉ⁾ · √x\n            ///     r0  ≈ M·Y / 2⁽⁵⁰⁸⁻ᵉ⁾ ≈ ⌊√x⌋\n            // We shift right by `508 - e` to account for both the Q3.253 scaling and\n            // denormalization. We don't care about accuracy in the low bits of `r0`, so we can cut\n            // some corners.\n            (, uint256 r0) = _shr(_inaccurateMulHi(M, Y), 0, 252 + invE);\n\n            /// `r0` is only an approximation of √x, so we perform a single Babylonian step to fully\n            /// converge on ⌊√x⌋ or ⌈√x⌉.  The Babylonian step is:\n            ///     r = ⌊(r0 + ⌊x/r0⌋) / 2⌋\n            // Rather than use the more-expensive division routine that returns a 512-bit result,\n            // because the value the upper word of the quotient can take is highly constrained, we\n            // can compute the quotient mod 2²⁵⁶ and recover the high word separately. Although\n            // `_div` does an expensive Newton-Raphson-Hensel modular inversion:\n            //     ⌊x/r0⌋ ≡ ⌊x/2ⁿ⌋·⌊r0/2ⁿ⌋⁻¹ mod 2²⁵⁶ (for r % 2⁽ⁿ⁺¹⁾ = 2ⁿ)\n            // and we already have a pretty good estimate for r0⁻¹, namely `Y`, refining `Y` into\n            // the appropriate inverse requires a series of 768-bit multiplications that take more\n            // gas.\n            uint256 q_lo = _div(x_hi, x_lo, r0);\n            uint256 q_hi = (r0 <= x_hi).toUint();\n            (uint256 s_hi, uint256 s_lo) = _add(q_hi, q_lo, r0);\n            // `oflo` here is either 0 or 1. When `oflo == 1`, `r == 0`, and the correct value for\n            // `r` is `type(uint256).max`.\n            uint256 oflo;\n            (oflo, r) = _shr256(s_hi, s_lo, 1);\n            r -= oflo; // underflow is desired\n        }\n    }\n\n    function sqrt(uint512 x) internal pure returns (uint256) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n\n        if (x_hi == 0) {\n            return x_lo.sqrt();\n        }\n\n        uint256 r = _sqrt(x_hi, x_lo);\n\n        // Because the Babylonian step can give ⌈√x⌉ if x+1 is a perfect square, we have to\n        // check whether we've overstepped by 1 and clamp as appropriate. ref:\n        // https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\n        (uint256 r2_hi, uint256 r2_lo) = _mul(r, r);\n        return r.unsafeDec(_gt(r2_hi, r2_lo, x_hi, x_lo));\n    }\n\n    function osqrtUp(uint512 r, uint512 x) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n\n        if (x_hi == 0) {\n            return r.from(0, x_lo.sqrtUp());\n        }\n\n        uint256 r_lo = _sqrt(x_hi, x_lo);\n\n        // The Babylonian step can give ⌈√x⌉ if x+1 is a perfect square. This is\n        // fine. If the Babylonian step gave ⌊√x⌋ ≠ √x, we have to round up.\n        (uint256 r2_hi, uint256 r2_lo) = _mul(r_lo, r_lo);\n        uint256 r_hi;\n        (r_hi, r_lo) = _add(0, r_lo, _gt(x_hi, x_lo, r2_hi, r2_lo).toUint());\n        return r.from(r_hi, r_lo);\n    }\n\n    function isqrtUp(uint512 r) internal pure returns (uint512) {\n        return osqrtUp(r, r);\n    }\n\n    function oshr(uint512 r, uint512 x, uint256 s) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 r_hi, uint256 r_lo) = _shr(x_hi, x_lo, s);\n        return r.from(r_hi, r_lo);\n    }\n\n    function ishr(uint512 r, uint256 s) internal pure returns (uint512) {\n        return oshr(r, r, s);\n    }\n\n    function _shrUp(uint256 x_hi, uint256 x_lo, uint256 s) internal pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            let neg_s := sub(0x100, s)\n            let s_256 := sub(s, 0x100)\n\n            // compute `(x_hi, x_lo) >> s`, retaining intermediate values\n            let x_lo_shr := shr(s, x_lo)\n            let x_hi_shr := shr(s_256, x_hi)\n            r_hi := shr(s, x_hi)\n            r_lo := or(or(shl(neg_s, x_hi), x_lo_shr), x_hi_shr)\n\n            // detect if nonzero bits were truncated\n            let inc := lt(0x00, or(xor(x_lo, shl(s, x_lo_shr)), mul(xor(x_hi, shl(s_256, x_hi_shr)), lt(0x100, neg_s))))\n\n            // conditionally increment the result\n            r_lo := add(inc, r_lo)\n            r_hi := add(lt(r_lo, inc), r_hi)\n        }\n    }\n\n    function oshrUp(uint512 r, uint512 x, uint256 s) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 r_hi, uint256 r_lo) = _shrUp(x_hi, x_lo, s);\n        return r.from(r_hi, r_lo);\n    }\n\n    function ishrUp(uint512 r, uint256 s) internal pure returns (uint512) {\n        return oshrUp(r, r, s);\n    }\n\n    function oshl(uint512 r, uint512 x, uint256 s) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 r_hi, uint256 r_lo) = _shl(x_hi, x_lo, s);\n        return r.from(r_hi, r_lo);\n    }\n\n    function ishl(uint512 r, uint256 s) internal pure returns (uint512) {\n        return oshl(r, r, s);\n    }\n}\n\nusing Lib512MathArithmetic for uint512 global;\n\nlibrary Lib512MathUserDefinedHelpers {\n    function checkNull(uint512 x, uint512 y) internal pure {\n        unchecked {\n            if (uint256(uint512.unwrap(x)) * uint256(uint512.unwrap(y)) == 0) {\n                Panic.panic(Panic.ASSERT_FAIL);\n            }\n        }\n    }\n\n    function smuggleToPure(function(uint512, uint512, uint512) internal view returns (uint512) f)\n        internal\n        pure\n        returns (function(uint512, uint512, uint512) internal pure returns (uint512) r)\n    {\n        assembly (\"memory-safe\") {\n            r := f\n        }\n    }\n\n    function omod(uint512 r, uint512 x, uint512 y) internal view returns (uint512) {\n        return r.omod(x, y);\n    }\n\n    function odiv(uint512 r, uint512 x, uint512 y) internal view returns (uint512) {\n        return r.odiv(x, y);\n    }\n}\n\nfunction __add(uint512 x, uint512 y) pure returns (uint512 r) {\n    Lib512MathUserDefinedHelpers.checkNull(x, y);\n    r.oadd(x, y);\n}\n\nfunction __sub(uint512 x, uint512 y) pure returns (uint512 r) {\n    Lib512MathUserDefinedHelpers.checkNull(x, y);\n    r.osub(x, y);\n}\n\nfunction __mul(uint512 x, uint512 y) pure returns (uint512 r) {\n    Lib512MathUserDefinedHelpers.checkNull(x, y);\n    r.omul(x, y);\n}\n\nfunction __mod(uint512 x, uint512 y) pure returns (uint512 r) {\n    Lib512MathUserDefinedHelpers.checkNull(x, y);\n    Lib512MathUserDefinedHelpers.smuggleToPure(Lib512MathUserDefinedHelpers.omod)(r, x, y);\n}\n\nfunction __div(uint512 x, uint512 y) pure returns (uint512 r) {\n    Lib512MathUserDefinedHelpers.checkNull(x, y);\n    Lib512MathUserDefinedHelpers.smuggleToPure(Lib512MathUserDefinedHelpers.odiv)(r, x, y);\n}\n\nusing {__add as +, __sub as -, __mul as *, __mod as %, __div as /} for uint512 global;\n\nstruct uint512_external {\n    uint256 hi;\n    uint256 lo;\n}\n\nlibrary Lib512MathExternal {\n    function from(uint512 r, uint512_external memory x) internal pure returns (uint512) {\n        assembly (\"memory-safe\") {\n            // This *could* be done with `mcopy`, but that would mean giving up compatibility with\n            // Shanghai (or less) chains. If you care about gas efficiency, you should be using\n            // `into()` instead.\n            mstore(r, mload(x))\n            mstore(add(0x20, r), mload(add(0x20, x)))\n        }\n        return r;\n    }\n\n    function into(uint512_external memory x) internal pure returns (uint512 r) {\n        assembly (\"memory-safe\") {\n            r := x\n        }\n    }\n\n    function toExternal(uint512 x) internal pure returns (uint512_external memory r) {\n        assembly (\"memory-safe\") {\n            if iszero(eq(mload(0x40), add(0x40, r))) { revert(0x00, 0x00) }\n            mstore(0x40, r)\n            r := x\n        }\n    }\n}\n\nusing Lib512MathExternal for uint512 global;\nusing Lib512MathExternal for uint512_external global;\n\n// src/core/Permit.sol\n\ncontract Permit {\n    using SafePermit for IERC2612;\n    using SafePermit for IDAIStylePermit;\n    using SafePermit for IERC20MetaTransaction;\n\n    enum PermitType {\n        ERC2612,\n        DAIPermit,\n        NativeMetaTransaction\n    }\n\n    function getPermitType(bytes memory permitData)\n        internal\n        pure\n        returns (PermitType permitType, bytes memory permitParams)\n    {\n        assembly (\"memory-safe\") {\n            let length := mload(permitData)\n            permitType := shr(0xf8, mload(add(0x20, permitData)))\n            permitParams := add(0x01, permitData)\n            mstore(permitParams, sub(length, 0x01))\n        }\n    }\n\n    function callPermit(address owner, address token, bytes memory permitData) internal {\n        (uint256 amount, uint256 deadline, bytes32 r, bytes32 vs) =\n            abi.decode(permitData, (uint256, uint256, bytes32, bytes32));\n        IERC2612(token).safePermit(owner, address(ALLOWANCE_HOLDER), amount, deadline, vs, r);\n    }\n\n    function callDAIPermit(address owner, address token, bytes memory permitData) internal {\n        (uint256 nonce, uint256 expiry, bool allowed, bytes32 r, bytes32 vs) =\n            abi.decode(permitData, (uint256, uint256, bool, bytes32, bytes32));\n        IDAIStylePermit(token).safePermit(owner, address(ALLOWANCE_HOLDER), nonce, expiry, allowed, vs, r);\n    }\n\n    function callNativeMetaTransaction(address owner, address token, bytes memory permitData) internal {\n        (uint256 amount, bytes32 r, bytes32 vs) = abi.decode(permitData, (uint256, bytes32, bytes32));\n        IERC20MetaTransaction(token).safePermit(owner, address(ALLOWANCE_HOLDER), amount, vs, r);\n    }\n\n    function _dispatchPermit(address owner, address token, bytes memory permitData) internal {\n        PermitType permitType;\n        (permitType, permitData) = getPermitType(permitData);\n        _handlePermit(owner, token, permitType, permitData);\n    }\n\n    function _handlePermit(address owner, address token, PermitType permitType, bytes memory permitData)\n        internal\n        virtual\n    {\n        if (permitType == PermitType.ERC2612) {\n            callPermit(owner, token, permitData);\n        } else if (permitType == PermitType.DAIPermit) {\n            callDAIPermit(owner, token, permitData);\n        } else {\n            // NativeMetaTransaction is disabled by default\n            // callNativeMetaTransaction(owner, token, permitData);\n            unsupportedPermitType(permitType);\n        }\n    }\n\n    function unsupportedPermitType(PermitType permitType) internal pure {\n        assembly (\"memory-safe\") {\n            let castError := gt(permitType, 0x02)\n            mstore(0x00, xor(0xf9ade075, mul(0xb7e59b04, castError))) // selector for `UnsupportedPermitType(uint8)` or `Panic(uint256)`\n            mstore(0x20, xor(permitType, mul(xor(permitType, 0x21), castError)))\n            revert(0x1c, 0x24)\n        }\n    }\n}\n\n// src/core/FlashAccountingCommon.sol\n\nlibrary CreditDebt {\n    using UnsafeMath for int256;\n\n    function asCredit(int256 delta, NotePtr note) internal pure returns (uint256) {\n        if (delta < 0) {\n            assembly (\"memory-safe\") {\n                mstore(note, 0x4c085bf1) // selector for `DeltaNotPositive(address)`; clobbers `note.amount()`\n                revert(add(0x1c, note), 0x24)\n            }\n        }\n        return uint256(delta);\n    }\n\n    function asDebt(int256 delta, NotePtr note) internal pure returns (uint256) {\n        if (delta > 0) {\n            assembly (\"memory-safe\") {\n                mstore(note, 0x3351b260) // selector for `DeltaNotNegative(address)`; clobbers `note.amount()`\n                revert(add(0x1c, note), 0x24)\n            }\n        }\n        return uint256(delta.unsafeNeg());\n    }\n}\n\n/// This type is the same as `NotesLib.Note`, but as a user-defined value type to sidestep solc's\n/// awful memory handling.\ntype NotePtr is uint256;\n\n/// This library is a highly-optimized, in-memory, enumerable mapping from tokens to amounts. It\n/// consists of 2 components that must be kept synchronized. There is a `memory` array of `Note`\n/// (aka `Note[] memory`) that has up to `MAX_TOKENS` pre-allocated. And there is an implicit heap\n/// packed at the end of the array that stores the `Note`s. Each `Note` has a backpointer that knows\n/// its location in the `Notes[] memory`. While the length of the `Notes[]` array grows and shrinks\n/// as tokens are added and retired, heap objects are only cleared/deallocated when the context\n/// returns. Looking up the `Note` object corresponding to a token uses the perfect hash formed by\n/// `hashMul` and `hashMod`. Pay special attention to these parameters. See further below for\n/// recommendations on how to select values for them. A hash collision will result in a revert with\n/// signature `TokenHashCollision(address,address)`.\nlibrary NotesLib {\n    uint256 private constant _ADDRESS_MASK = 0x00ffffffffffffffffffffffffffffffffffffffff;\n\n    /// This is the maximum number of tokens that may be involved in an action. Increasing or\n    /// decreasing this value requires no other changes elsewhere in this file.\n    uint256 internal constant MAX_TOKENS = 8;\n\n    type NotePtrPtr is uint256;\n\n    struct Note {\n        uint256 amount;\n        IERC20 token;\n        NotePtrPtr backPtr;\n    }\n\n    function construct() internal pure returns (Note[] memory r) {\n        assembly (\"memory-safe\") {\n            r := mload(0x40)\n            // set the length of `r` to zero\n            mstore(r, 0x00)\n            // zeroize the heap\n            codecopy(add(add(0x20, shl(0x05, MAX_TOKENS)), r), codesize(), mul(0x60, MAX_TOKENS))\n            // allocate memory\n            mstore(0x40, add(add(0x20, shl(0x07, MAX_TOKENS)), r))\n        }\n    }\n\n    function amount(NotePtr note) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mload(note)\n        }\n    }\n\n    function setAmount(NotePtr note, uint256 newAmount) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(note, newAmount)\n        }\n    }\n\n    function token(NotePtr note) internal pure returns (IERC20 r) {\n        assembly (\"memory-safe\") {\n            r := mload(add(0x20, note))\n        }\n    }\n\n    function tokenIsEth(NotePtr note) internal pure returns (bool r) {\n        address ethAddress = ETH_ADDRESS;\n        assembly (\"memory-safe\") {\n            r := eq(ethAddress, mload(add(0x20, note)))\n        }\n    }\n\n    function eq(Note memory x, Note memory y) internal pure returns (bool) {\n        NotePtr yp;\n        assembly (\"memory-safe\") {\n            yp := y\n        }\n        return eq(x, yp);\n    }\n\n    function eq(Note memory x, NotePtr y) internal pure returns (bool) {\n        NotePtr xp;\n        assembly (\"memory-safe\") {\n            xp := x\n        }\n        return eq(xp, y);\n    }\n\n    function eq(NotePtr x, NotePtr y) internal pure returns (bool r) {\n        assembly (\"memory-safe\") {\n            r := eq(x, y)\n        }\n    }\n\n    function unsafeGet(Note[] memory a, uint256 i) internal pure returns (IERC20 retToken, uint256 retAmount) {\n        assembly (\"memory-safe\") {\n            let x := mload(add(add(0x20, shl(0x05, i)), a))\n            retToken := mload(add(0x20, x))\n            retAmount := mload(x)\n        }\n    }\n\n    //// How to generate a perfect hash:\n    ////\n    //// The arguments `hashMul` and `hashMod` are required to form a perfect hash for a table with\n    //// size `NotesLib.MAX_TOKENS` when applied to all the tokens involved in fills. The hash\n    //// function is constructed as `uint256 hash = mulmod(uint256(uint160(address(token))),\n    //// hashMul, hashMod) % NotesLib.MAX_TOKENS`.\n    ////\n    //// The \"simple\" or \"obvious\" way to do this is to simply try random 128-bit numbers for both\n    //// `hashMul` and `hashMod` until you obtain a function that has no collisions when applied to\n    //// the tokens involved in fills. A substantially more optimized algorithm can be obtained by\n    //// selecting several (at least 10) prime values for `hashMod`, precomputing the limb moduluses\n    //// for each value, and then selecting randomly from among them. The author recommends using\n    //// the 10 largest 64-bit prime numbers: 2^64 - {59, 83, 95, 179, 189, 257, 279, 323, 353,\n    //// 363}. `hashMul` can then be selected randomly or via some other optimized method.\n    ////\n    //// Note that in spite of the fact that some AMMs represent Ether (or the native asset of the\n    //// chain) as `address(0)`, we represent Ether as `Constants.ETH_ADDRESS` (the address of\n    //// all `e`s) for homogeneity with other parts of the codebase, and because the decision to\n    //// represent Ether as `address(0)` was stupid in the first place. `address(0)` represents the\n    //// absence of a thing, not a special case of the thing. It creates confusion with\n    //// uninitialized memory, storage, and variables.\n    function get(Note[] memory a, IERC20 newToken, uint256 hashMul, uint256 hashMod) internal pure returns (NotePtr x) {\n        assembly (\"memory-safe\") {\n            newToken := and(_ADDRESS_MASK, newToken)\n            x := add(add(0x20, shl(0x05, MAX_TOKENS)), a) // `x` now points at the first `Note` on the heap\n            x := add(mod(mulmod(newToken, hashMul, hashMod), mul(0x60, MAX_TOKENS)), x) // combine with token hash\n            // `x` now points at the exact `Note` object we want; let's check it to be sure, though\n            let x_token_ptr := add(0x20, x)\n\n            // check that we haven't encountered a hash collision. checking for a hash collision is\n            // equivalent to checking for array out-of-bounds or overflow.\n            {\n                let old_token := mload(x_token_ptr)\n                if mul(or(mload(add(0x40, x)), old_token), xor(old_token, newToken)) {\n                    mstore(0x00, 0x9a62e8b4) // selector for `TokenHashCollision(address,address)`\n                    mstore(0x20, old_token)\n                    mstore(0x40, newToken)\n                    revert(0x1c, 0x44)\n                }\n            }\n\n            // zero `newToken` is a footgun; check for it\n            if iszero(newToken) {\n                mstore(0x00, 0xad1991f5) // selector for `ZeroToken()`\n                revert(0x1c, 0x04)\n            }\n\n            // initialize the token (possibly redundant)\n            mstore(x_token_ptr, newToken)\n        }\n    }\n\n    function add(Note[] memory a, Note memory x) internal pure {\n        NotePtr xp;\n        assembly (\"memory-safe\") {\n            xp := x\n        }\n        return add(a, xp);\n    }\n\n    function add(Note[] memory a, NotePtr x) internal pure {\n        assembly (\"memory-safe\") {\n            let backptr_ptr := add(0x40, x)\n            let backptr := mload(backptr_ptr)\n            if iszero(backptr) {\n                let len := add(0x01, mload(a))\n                // We don't need to check for overflow or out-of-bounds access here; the checks in\n                // `get` above for token collision handle that for us. It's not possible to `get`\n                // more than `MAX_TOKENS` tokens\n                mstore(a, len)\n                backptr := add(shl(0x05, len), a)\n                mstore(backptr, x)\n                mstore(backptr_ptr, backptr)\n            }\n        }\n    }\n\n    function del(Note[] memory a, Note memory x) internal pure {\n        NotePtr xp;\n        assembly (\"memory-safe\") {\n            xp := x\n        }\n        return del(a, xp);\n    }\n\n    function del(Note[] memory a, NotePtr x) internal pure {\n        assembly (\"memory-safe\") {\n            let x_backptr_ptr := add(0x40, x)\n            let x_backptr := mload(x_backptr_ptr)\n            if x_backptr {\n                // Clear the backpointer in the referred-to `Note`\n                mstore(x_backptr_ptr, 0x00)\n                // We do not deallocate `x`\n\n                // Decrement the length of `a`\n                let len := mload(a)\n                mstore(a, sub(len, 0x01))\n\n                // Check if this is a \"swap and pop\" or just a \"pop\"\n                let end_ptr := add(shl(0x05, len), a)\n                if iszero(eq(end_ptr, x_backptr)) {\n                    // Overwrite the vacated indirection pointer `x_backptr` with the value at the end.\n                    let end := mload(end_ptr)\n                    mstore(x_backptr, end)\n\n                    // Fix up the backpointer in `end` to point to the new location of the indirection\n                    // pointer.\n                    let end_backptr_ptr := add(0x40, end)\n                    mstore(end_backptr_ptr, x_backptr)\n                }\n            }\n        }\n    }\n}\n\nusing NotesLib for NotePtr global;\n\n/// `State` behaves as if it were declared as:\n///     struct State {\n///         NotesLib.Note buy;\n///         NotesLib.Note sell;\n///         NotesLib.Note globalSell;\n///         uint256 globalSellAmount;\n///         uint256 _hashMul;\n///         uint256 _hashMod;\n///     }\n/// but we use a user-defined value type because solc generates very gas-inefficient boilerplate\n/// that allocates and zeroes a bunch of memory. Consequently, everything is written in assembly and\n/// accessors are provided for the relevant members.\ntype State is bytes32;\n\nlibrary StateLib {\n    using NotesLib for NotesLib.Note;\n    using NotesLib for NotesLib.Note[];\n\n    function construct(IERC20 token, uint256 hashMul, uint256 hashMod)\n        internal\n        pure\n        returns (State state, NotesLib.Note[] memory notes)\n    {\n        assembly (\"memory-safe\") {\n            // Allocate memory\n            state := mload(0x40)\n            mstore(0x40, add(0xc0, state))\n        }\n        // All the pointers in `state` are now pointing into unallocated memory\n        notes = NotesLib.construct();\n        // The pointers in `state` are now illegally aliasing elements in `notes`\n        NotePtr notePtr = notes.get(token, hashMul, hashMod);\n\n        // Here we actually set the pointers into a legal area of memory\n        setBuy(state, notePtr);\n        setSell(state, notePtr);\n        assembly (\"memory-safe\") {\n            // Set `state.globalSell`\n            mstore(add(0x40, state), notePtr)\n            // Set `state._hashMul`\n            mstore(add(0x80, state), hashMul)\n            // Set `state._hashMod`\n            mstore(add(0xa0, state), hashMod)\n        }\n    }\n\n    function buy(State state) internal pure returns (NotePtr note) {\n        assembly (\"memory-safe\") {\n            note := mload(state)\n        }\n    }\n\n    function sell(State state) internal pure returns (NotePtr note) {\n        assembly (\"memory-safe\") {\n            note := mload(add(0x20, state))\n        }\n    }\n\n    function globalSell(State state) internal pure returns (NotePtr note) {\n        assembly (\"memory-safe\") {\n            note := mload(add(0x40, state))\n        }\n    }\n\n    function globalSellAmount(State state) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mload(add(0x60, state))\n        }\n    }\n\n    function setGlobalSellAmount(State state, uint256 newGlobalSellAmount) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(add(0x60, state), newGlobalSellAmount)\n        }\n    }\n\n    function _hashMul(State state) private pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mload(add(0x80, state))\n        }\n    }\n\n    function _hashMod(State state) private pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mload(add(0xa0, state))\n        }\n    }\n\n    function checkZeroSellAmount(State state) internal pure {\n        NotePtr globalSell_ = state.globalSell();\n        if (globalSell_.amount() == 0) {\n            assembly (\"memory-safe\") {\n                mstore(globalSell_, 0xfb772a88) // selector for `ZeroSellAmount(address)`; clobbers `globalSell_.amount()`\n                revert(add(0x1c, globalSell_), 0x24)\n            }\n        }\n    }\n\n    function setSell(State state, NotePtr notePtr) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(add(0x20, state), notePtr)\n        }\n    }\n\n    function setSell(State state, NotesLib.Note[] memory notes, IERC20 token) internal pure {\n        setSell(state, notes.get(token, _hashMul(state), _hashMod(state)));\n    }\n\n    function setBuy(State state, NotePtr notePtr) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(state, notePtr)\n        }\n    }\n\n    function setBuy(State state, NotesLib.Note[] memory notes, IERC20 token) internal pure {\n        setBuy(state, notes.get(token, _hashMul(state), _hashMod(state)));\n    }\n}\n\nusing StateLib for State global;\n\nlibrary Encoder {\n    using FastLogic for bool;\n\n    // Offsets, from an encoded `bytes memory` pointer, of the bytes between the header and the fills\n    uint256 private constant _EXTRA_DATA_OFFSET = 212;\n    uint256 private constant _EXTRA_DATA_OFFSET_VIP = 306;\n\n    /// `extraDataSize` uninitialized bytes are reserved between the header and the fills for the\n    /// caller to fill in; `extraData` locates them.\n    function encode(\n        uint256 unlockSelector,\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin,\n        uint256 extraDataSize\n    ) internal view returns (bytes memory data) {\n        hashMul *= 96;\n        hashMod *= 96;\n        if ((ppm > BASIS).or(amountOutMin >> 128 != 0).or(hashMul >> 128 != 0).or(hashMod >> 128 != 0)) {\n            Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n        }\n        assembly (\"memory-safe\") {\n            data := mload(0x40)\n\n            let pathLen := mload(fills)\n            mcopy(add(add(_EXTRA_DATA_OFFSET, extraDataSize), data), add(0x20, fills), pathLen)\n\n            mstore(add(0xb4, data), ppm)\n            mstore(add(0xb1, data), sellToken)\n            mstore(add(0x9d, data), address()) // payer\n            // feeOnTransfer (1 byte)\n\n            mstore(add(0x88, data), hashMod)\n            mstore(add(0x78, data), hashMul)\n            mstore(add(0x68, data), amountOutMin)\n            mstore(add(0x58, data), recipient)\n            mstore(add(0x44, data), add(add(0x70, pathLen), extraDataSize))\n            mstore(add(0x24, data), 0x20)\n            mstore(add(0x04, data), unlockSelector)\n            mstore(data, add(add(0xb4, pathLen), extraDataSize))\n            mstore8(add(0xa8, data), lt(0x00, feeOnTransfer))\n\n            mstore(0x40, add(add(data, add(0xd4, pathLen)), extraDataSize))\n        }\n    }\n\n    /// `extraDataSize` uninitialized bytes are reserved between the header and the fills for the\n    /// caller to fill in; `extraDataVIP` locates them.\n    function encodeVIP(\n        uint256 unlockSelector,\n        address recipient,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory sig,\n        bool isForwarded,\n        uint256 amountOutMin,\n        uint256 extraDataSize\n    ) internal pure returns (bytes memory data) {\n        hashMul *= 96;\n        hashMod *= 96;\n        if ((amountOutMin >> 128 != 0).or(hashMul >> 128 != 0).or(hashMod >> 128 != 0)) {\n            Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n        }\n        assembly (\"memory-safe\") {\n            data := mload(0x40)\n\n            let pathLen := mload(fills)\n            let sigLen := mload(sig)\n\n            {\n                let ptr := add(add(_EXTRA_DATA_OFFSET_VIP, extraDataSize), data)\n\n                // sig length as 3 bytes goes at the end of the callback\n                mstore(sub(add(sigLen, add(pathLen, ptr)), 0x1d), sigLen)\n\n                // fills go at the end of the header\n                mcopy(ptr, add(0x20, fills), pathLen)\n                ptr := add(pathLen, ptr)\n\n                // signature comes after the fills\n                mcopy(ptr, add(0x20, sig), sigLen)\n                ptr := add(sigLen, ptr)\n\n                mstore(0x40, add(0x03, ptr))\n            }\n\n            mstore8(add(0x131, data), lt(0x00, isForwarded))\n            mcopy(add(0xf1, data), add(0x20, permit), 0x40)\n            mcopy(add(0xb1, data), mload(permit), 0x40) // aliases `payer` on purpose\n            mstore(add(0x9d, data), 0x00) // payer\n            // feeOnTransfer (1 byte)\n\n            mstore(add(0x88, data), hashMod)\n            mstore(add(0x78, data), hashMul)\n            mstore(add(0x68, data), amountOutMin)\n            mstore(add(0x58, data), recipient)\n            mstore(add(0x44, data), add(add(0xd1, add(pathLen, sigLen)), extraDataSize))\n            mstore(add(0x24, data), 0x20)\n            mstore(add(0x04, data), unlockSelector)\n            mstore(data, add(add(0x115, add(pathLen, sigLen)), extraDataSize))\n\n            mstore8(add(0xa8, data), lt(0x00, feeOnTransfer))\n        }\n    }\n\n    function extraData(bytes memory data) internal pure returns (uint256 ptr) {\n        assembly (\"memory-safe\") {\n            ptr := add(_EXTRA_DATA_OFFSET, data)\n        }\n    }\n\n    function extraDataVIP(bytes memory data) internal pure returns (uint256 ptr) {\n        assembly (\"memory-safe\") {\n            ptr := add(_EXTRA_DATA_OFFSET_VIP, data)\n        }\n    }\n}\n\nlibrary Decoder {\n    using SafeTransferLib for IERC20;\n    using UnsafeMath for uint256;\n    using NotesLib for NotesLib.Note;\n    using NotesLib for NotesLib.Note[];\n\n    /// Update `state` for the next fill packed in `data`. This also may allocate/append `Note`s\n    /// into `notes`. Returns the suffix of the bytes that are not consumed in the decoding\n    /// process. The first byte of `data` describes which of the compact representations for the hop\n    /// is used.\n    ///\n    ///   0 -> sell and buy tokens remain unchanged from the previous fill (pure multiplex)\n    ///   1 -> sell token remains unchanged from the previous fill, buy token is read from `data` (diamond multiplex)\n    ///   2 -> sell token becomes the buy token from the previous fill, new buy token is read from `data` (multihop)\n    ///   3 -> both sell and buy token are read from `data`\n    ///\n    /// This function is responsible for calling `NotesLib.get(Note[] memory, IERC20, uint256,\n    /// uint256)` (via `StateLib.setSell` and `StateLib.setBuy`), which maintains the `notes` array\n    /// and heap.\n    function updateState(State state, NotesLib.Note[] memory notes, bytes calldata data)\n        internal\n        pure\n        returns (bytes calldata)\n    {\n        bytes32 dataWord;\n        assembly (\"memory-safe\") {\n            dataWord := calldataload(data.offset)\n        }\n        uint256 dataConsumed = 1;\n\n        uint256 caseKey = uint256(dataWord) >> 248;\n        if (caseKey != 0) {\n            notes.add(state.buy());\n\n            if (caseKey > 1) {\n                if (state.sell().amount() == 0) {\n                    notes.del(state.sell());\n                }\n                if (caseKey == 2) {\n                    state.setSell(state.buy());\n                } else {\n                    assert(caseKey == 3);\n\n                    IERC20 sellToken = IERC20(address(uint160(uint256(dataWord) >> 88)));\n                    assembly (\"memory-safe\") {\n                        dataWord := calldataload(add(0x14, data.offset))\n                    }\n                    unchecked {\n                        dataConsumed += 20;\n                    }\n\n                    state.setSell(notes, sellToken);\n                }\n            }\n\n            IERC20 buyToken = IERC20(address(uint160(uint256(dataWord) >> 88)));\n            unchecked {\n                dataConsumed += 20;\n            }\n\n            state.setBuy(notes, buyToken);\n            if (state.buy().eq(state.globalSell())) {\n                assembly (\"memory-safe\") {\n                    let ptr := mload(add(0x40, state)) // dereference `state.globalSell`\n                    mstore(ptr, 0x784cb7b8) // selector for `BoughtSellToken(address)`; clobbers `state.globalSell.amount`\n                    revert(add(0x1c, ptr), 0x24)\n                }\n            }\n        }\n\n        assembly (\"memory-safe\") {\n            data.offset := add(dataConsumed, data.offset)\n            data.length := sub(data.length, dataConsumed)\n            // we don't check for array out-of-bounds here; we will check it later in `_getHookData`\n        }\n\n        return data;\n    }\n\n    function overflowCheck(bytes calldata data) internal pure {\n        if (data.length > 16777215) {\n            Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n        }\n    }\n\n    /// Decode an ABI-ish encoded `bytes` from `data`. It is \"-ish\" in the sense that the encoding\n    /// of the length doesn't take up an entire word. The length is encoded as only 3 bytes (2^24\n    /// bytes of calldata consumes ~67M gas, much more than the block limit). The payload is also\n    /// unpadded. The next fill's `ppm` is encoded immediately after the `hookData` payload.\n    function decodeBytes(bytes calldata data) internal pure returns (bytes calldata retData, bytes calldata hookData) {\n        assembly (\"memory-safe\") {\n            hookData.length := shr(0xe8, calldataload(data.offset))\n            hookData.offset := add(0x03, data.offset)\n            let hop := add(0x03, hookData.length)\n\n            retData.offset := add(data.offset, hop)\n            retData.length := sub(data.length, hop)\n        }\n    }\n\n    function decodeHeader(bytes calldata data)\n        internal\n        pure\n        returns (\n            bytes calldata newData,\n            // These values are user-supplied\n            address recipient,\n            uint256 minBuyAmount,\n            uint256 hashMul,\n            uint256 hashMod,\n            bool feeOnTransfer,\n            // `payer` is special and is authenticated\n            address payer\n        )\n    {\n        // These values are user-supplied\n        assembly (\"memory-safe\") {\n            recipient := shr(0x60, calldataload(data.offset))\n            let packed := calldataload(add(0x14, data.offset))\n            minBuyAmount := shr(0x80, packed)\n            hashMul := and(0xffffffffffffffffffffffffffffffff, packed)\n            packed := calldataload(add(0x34, data.offset))\n            hashMod := shr(0x80, packed)\n            feeOnTransfer := lt(0x00, and(0x1000000000000000000000000000000, packed))\n\n            data.offset := add(0x45, data.offset)\n            data.length := sub(data.length, 0x45)\n            // we don't check for array out-of-bounds here; we will check it later in `initialize`\n        }\n\n        // `payer` is special and is authenticated\n        assembly (\"memory-safe\") {\n            payer := shr(0x60, calldataload(data.offset))\n\n            data.offset := add(0x14, data.offset)\n            data.length := sub(data.length, 0x14)\n            // we don't check for array out-of-bounds here; we will check it later in `initialize`\n        }\n\n        newData = data;\n    }\n\n    function initialize(bytes calldata data, uint256 hashMul, uint256 hashMod, address payer)\n        internal\n        view\n        returns (\n            bytes calldata newData,\n            State state,\n            NotesLib.Note[] memory notes,\n            ISignatureTransfer.PermitTransferFrom calldata permit,\n            bool isForwarded,\n            bytes calldata sig\n        )\n    {\n        {\n            IERC20 sellToken;\n            assembly (\"memory-safe\") {\n                sellToken := shr(0x60, calldataload(data.offset))\n            }\n            // We don't advance `data` here because there's a special interaction between `payer`\n            // (which is the 20 bytes in calldata immediately before `data`), `sellToken`, and\n            // `permit` that's handled below.\n            (state, notes) = StateLib.construct(sellToken, hashMul, hashMod);\n        }\n\n        // This assembly block is just here to appease the compiler. We only use `permit` and `sig`\n        // in the codepaths where they are set away from the values initialized here.\n        assembly (\"memory-safe\") {\n            permit := calldatasize()\n            sig.offset := calldatasize()\n            sig.length := 0x00\n        }\n\n        if (state.globalSell().tokenIsEth()) {\n            assert(payer == address(this));\n\n            uint256 ppm;\n            assembly (\"memory-safe\") {\n                // `data` hasn't been advanced from decoding `sellToken` above. so we have to\n                // advance it by 20 bytes to decode `ppm` then advance by 3 bytes\n\n                data.offset := add(0x14, data.offset)\n                ppm := shr(0xe8, calldataload(data.offset))\n\n                data.offset := add(0x3, data.offset)\n                data.length := sub(data.length, 0x17)\n                // We check for array out-of-bounds below\n            }\n\n            unchecked {\n                state.globalSell().setAmount((address(this).balance * ppm).unsafeDiv(BASIS));\n            }\n        } else {\n            if (payer == address(this)) {\n                uint256 ppm;\n                assembly (\"memory-safe\") {\n                    // `data` hasn't been advanced from decoding `sellToken` above. so we have to\n                    // advance it by 20 bytes to decode `ppm` then advance by 3 bytes\n\n                    data.offset := add(0x14, data.offset)\n                    ppm := shr(0xe8, calldataload(data.offset))\n\n                    data.offset := add(0x3, data.offset)\n                    data.length := sub(data.length, 0x17)\n                    // We check for array out-of-bounds below\n                }\n\n                unchecked {\n                    NotePtr globalSell = state.globalSell();\n                    globalSell.setAmount((globalSell.token().fastSpendableBalance() * ppm).unsafeDiv(BASIS));\n                }\n            } else {\n                assert(payer == address(0));\n\n                assembly (\"memory-safe\") {\n                    // this is super dirty, but it works because although `permit` is aliasing in\n                    // the middle of `payer`, because `payer` is all zeroes, it's treated as padding\n                    // for the first word of `permit`, which is the sell token\n                    permit := sub(data.offset, 0x0c)\n                    isForwarded := and(0x01, calldataload(add(0x55, data.offset)))\n\n                    // `sig` is packed at the end of `data`, in \"reverse ABI-ish encoded\" fashion\n                    sig.offset := sub(add(data.offset, data.length), 0x03)\n                    sig.length := shr(0xe8, calldataload(sig.offset))\n                    sig.offset := sub(sig.offset, sig.length)\n\n                    // Remove `permit` and `isForwarded` from the front of `data`\n                    data.offset := add(0x75, data.offset)\n                    if gt(data.offset, sig.offset) { revert(0x00, 0x00) }\n\n                    // Remove `sig` from the back of `data`\n                    data.length := sub(sub(data.length, 0x78), sig.length)\n                    // We check for array out-of-bounds below\n                }\n            }\n        }\n\n        Decoder.overflowCheck(data);\n        newData = data;\n    }\n}\n\nlibrary Take {\n    using UnsafeMath for uint256;\n    using NotesLib for NotesLib.Note;\n    using NotesLib for NotesLib.Note[];\n\n    function _callSelector(uint256 selector, IERC20 token, address to, uint256 amount) internal {\n        assembly (\"memory-safe\") {\n            token := shl(0x60, token)\n            if iszero(amount) {\n                mstore(0x20, token)\n                mstore(0x00, 0xcbf0dbf5000000000000000000000000) // selector for `ZeroBuyAmount(address)` with `token`'s padding\n                revert(0x10, 0x24)\n            }\n\n            // save the free memory pointer because we're about to clobber it\n            let ptr := mload(0x40)\n\n            mstore(0x60, amount)\n            mstore(0x40, to)\n            mstore(\n                0x2c,\n                mul(iszero(eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, token)), token)\n            ) // clears `to`'s padding\n            mstore(0x0c, shl(0x60, selector)) // clears `token`'s padding\n\n            if iszero(call(gas(), caller(), 0x00, 0x1c, 0x64, 0x00, 0x00)) {\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n\n            // restore clobbered slots\n            mstore(0x60, 0x00)\n            mstore(0x40, ptr)\n        }\n    }\n\n    /// `take` is responsible for removing the accumulated credit in each token from the vault. The\n    /// current `state.buy` is the global buy token. We return the settled amount of that token\n    /// (`buyAmount`), after checking it against the slippage limit (`minBuyAmount`). Each token\n    /// with credit causes a corresponding call to `msg.sender.<selector>(token, recipient,\n    /// amount)`.\n    function take(State state, NotesLib.Note[] memory notes, uint32 selector, address recipient, uint256 minBuyAmount)\n        internal\n        returns (uint256 buyAmount)\n    {\n        // NOTICE: Any changes done in this function most likely need to be applied to `CompactTake.take`\n        // as well because it is a copy of this one with a different `_callSelector` function\n        notes.del(state.buy());\n        if (state.sell().amount() == 0) {\n            notes.del(state.sell());\n        }\n\n        uint256 length = notes.length;\n        // `length` of zero implies that we fully liquidated the global sell token (there is no\n        // `amount` remaining) and that the only token in which we have credit is the global buy\n        // token. We're about to `take` that token below.\n        if (length != 0) {\n            {\n                NotesLib.Note memory firstNote = notes[0]; // out-of-bounds is impossible\n                if (!firstNote.eq(state.globalSell())) {\n                    // The global sell token being in a position other than the 1st would imply that\n                    // at some point we _bought_ that token. This is illegal and results in a revert\n                    // with reason `BoughtSellToken(address)`.\n                    _callSelector(selector, firstNote.token, address(this), firstNote.amount);\n                }\n            }\n            for (uint256 i = 1; i < length; i = i.unsafeInc()) {\n                (IERC20 token, uint256 amount) = notes.unsafeGet(i);\n                _callSelector(selector, token, address(this), amount);\n            }\n        }\n\n        // The final token to be bought is considered the global buy token. We bypass `notes` and\n        // read it directly from `state`. Check the slippage limit. Transfer to the recipient.\n        {\n            IERC20 buyToken = state.buy().token();\n            buyAmount = state.buy().amount();\n            if (buyAmount < minBuyAmount) {\n                revertTooMuchSlippage(buyToken, minBuyAmount, buyAmount);\n            }\n            _callSelector(selector, buyToken, recipient, buyAmount);\n        }\n    }\n}\n\nlibrary CompactTake {\n    // NOTICE: This library is a copy of `Take` with a different `_callSelector` function\n    using UnsafeMath for uint256;\n    using NotesLib for NotesLib.Note;\n    using NotesLib for NotesLib.Note[];\n\n    function _callSelector(uint256 selector, IERC20 token, address to, uint256 amount) internal {\n        assembly (\"memory-safe\") {\n            if iszero(amount) {\n                mstore(0x14, token)\n                mstore(0x00, 0xcbf0dbf5000000000000000000000000) // selector for `ZeroBuyAmount(address)` with `token`'s padding\n                revert(0x10, 0x24)\n            }\n\n            // save the free memory pointer because we're about to clobber it\n            let ptr := mload(0x40)\n\n            mstore(0x38, amount)\n            mstore(0x28, to)\n            mstore(\n                0x14,\n                mul(\n                    lt(0x00, shl(0x60, xor(0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, token))),\n                    token\n                )\n            )\n            mstore(0x00, selector)\n\n            if iszero(call(gas(), caller(), 0x00, 0x1c, 0x3c, 0x00, 0x00)) {\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n\n            // restore clobbered slots\n            mstore(0x40, ptr)\n        }\n    }\n\n    /// `take` is responsible for removing the accumulated credit in each token from the vault. The\n    /// current `state.buy` is the global buy token. We return the settled amount of that token\n    /// (`buyAmount`), after checking it against the slippage limit (`minBuyAmount`). Each token\n    /// with credit causes a corresponding call to `msg.sender.<selector>(token, recipient,\n    /// amount)`.\n    function take(State state, NotesLib.Note[] memory notes, uint32 selector, address recipient, uint256 minBuyAmount)\n        internal\n        returns (uint256 buyAmount)\n    {\n        // NOTICE: Any changes done in this function most likely need to be applied to `Take.take`\n        // as well because this function is a copy of it with a different `_callSelector` function\n        notes.del(state.buy());\n        if (state.sell().amount() == 0) {\n            notes.del(state.sell());\n        }\n\n        uint256 length = notes.length;\n        // `length` of zero implies that we fully liquidated the global sell token (there is no\n        // `amount` remaining) and that the only token in which we have credit is the global buy\n        // token. We're about to `take` that token below.\n        if (length != 0) {\n            {\n                NotesLib.Note memory firstNote = notes[0]; // out-of-bounds is impossible\n                if (!firstNote.eq(state.globalSell())) {\n                    // The global sell token being in a position other than the 1st would imply that\n                    // at some point we _bought_ that token. This is illegal and results in a revert\n                    // with reason `BoughtSellToken(address)`.\n                    _callSelector(selector, firstNote.token, address(this), firstNote.amount);\n                }\n            }\n            for (uint256 i = 1; i < length; i = i.unsafeInc()) {\n                (IERC20 token, uint256 amount) = notes.unsafeGet(i);\n                _callSelector(selector, token, address(this), amount);\n            }\n        }\n\n        // The final token to be bought is considered the global buy token. We bypass `notes` and\n        // read it directly from `state`. Check the slippage limit. Transfer to the recipient.\n        {\n            IERC20 buyToken = state.buy().token();\n            buyAmount = state.buy().amount();\n            if (buyAmount < minBuyAmount) {\n                revertTooMuchSlippage(buyToken, minBuyAmount, buyAmount);\n            }\n            _callSelector(selector, buyToken, recipient, buyAmount);\n        }\n    }\n}\n\n// src/core/UniswapV4Types.sol\n\ntype IHooks is address;\n\n/// @dev Two `int128` values packed into a single `int256` where the upper 128 bits represent the amount0\n/// and the lower 128 bits represent the amount1.\ntype BalanceDelta is int256;\n\nusing BalanceDeltaLibrary for BalanceDelta global;\n\n/// @notice Library for getting the amount0 and amount1 deltas from the BalanceDelta type\nlibrary BalanceDeltaLibrary {\n    function amount0(BalanceDelta balanceDelta) internal pure returns (int128 _amount0) {\n        assembly (\"memory-safe\") {\n            _amount0 := sar(0x80, balanceDelta)\n        }\n    }\n\n    function amount1(BalanceDelta balanceDelta) internal pure returns (int128 _amount1) {\n        assembly (\"memory-safe\") {\n            _amount1 := signextend(0x0f, balanceDelta)\n        }\n    }\n}\n\ninterface IPoolManager {\n    /// @notice All interactions on the contract that account deltas require unlocking. A caller that calls `unlock` must implement\n    /// `IUnlockCallback(msg.sender).unlockCallback(data)`, where they interact with the remaining functions on this contract.\n    /// @dev The only functions callable without an unlocking are `initialize` and `updateDynamicLPFee`\n    /// @param data Any data to pass to the callback, via `IUnlockCallback(msg.sender).unlockCallback(data)`\n    /// @return The data returned by the call to `IUnlockCallback(msg.sender).unlockCallback(data)`\n    function unlock(bytes calldata data) external returns (bytes memory);\n\n    /// @notice Returns the key for identifying a pool\n    struct PoolKey {\n        /// @notice The lower token of the pool, sorted numerically\n        IERC20 token0;\n        /// @notice The higher token of the pool, sorted numerically\n        IERC20 token1;\n        /// @notice The pool LP fee, capped at 1_000_000. If the highest bit is 1, the pool has a dynamic fee and must be exactly equal to 0x800000\n        uint24 fee;\n        /// @notice Ticks that involve positions must be a multiple of tick spacing\n        int24 tickSpacing;\n        /// @notice The hooks of the pool\n        IHooks hooks;\n    }\n\n    struct SwapParams {\n        /// Whether to swap token0 for token1 or vice versa\n        bool zeroForOne;\n        /// The desired input amount if negative (exactIn), or the desired output amount if positive (exactOut)\n        int256 amountSpecified;\n        /// The sqrt price at which, if reached, the swap will stop executing\n        uint160 sqrtPriceLimitX96;\n    }\n\n    /// @notice Swap against the given pool\n    /// @param key The pool to swap in\n    /// @param params The parameters for swapping\n    /// @param hookData The data to pass through to the swap hooks\n    /// @return swapDelta The balance delta of the address swapping\n    /// @dev Swapping on low liquidity pools may cause unexpected swap amounts when liquidity available is less than amountSpecified.\n    /// Additionally note that if interacting with hooks that have the BEFORE_SWAP_RETURNS_DELTA_FLAG or AFTER_SWAP_RETURNS_DELTA_FLAG\n    /// the hook may alter the swap input/output. Integrators should perform checks on the returned swapDelta.\n    function swap(PoolKey memory key, SwapParams memory params, bytes calldata hookData)\n        external\n        returns (BalanceDelta swapDelta);\n\n    /// @notice Writes the current ERC20 balance of the specified token to transient storage\n    /// This is used to checkpoint balances for the manager and derive deltas for the caller.\n    /// @dev This MUST be called before any ERC20 tokens are sent into the contract, but can be skipped\n    /// for native tokens because the amount to settle is determined by the sent value.\n    /// However, if an ERC20 token has been synced and not settled, and the caller instead wants to settle\n    /// native funds, this function can be called with the native currency to then be able to settle the native currency\n    function sync(IERC20 token) external;\n\n    /// @notice Called by the user to net out some value owed to the user\n    /// @dev Can also be used as a mechanism for _free_ flash loans\n    /// @param token The token to withdraw from the pool manager\n    /// @param to The address to withdraw to\n    /// @param amount The amount of token to withdraw\n    function take(IERC20 token, address to, uint256 amount) external;\n\n    /// @notice Called by the user to pay what is owed\n    /// @return paid The amount of token settled\n    function settle() external payable returns (uint256 paid);\n}\n\n/// Solc emits code that is both gas inefficient and codesize bloated. By reimplementing these\n/// function calls in Yul, we obtain significant improvements. Solc also emits an EXTCODESIZE check\n/// when an external function doesn't return anything (`sync`). Obviously, we know that POOL_MANAGER\n/// has code, so this omits those checks. Also, for compatibility, these functions identify\n/// `SettlerAbstract.ETH_ADDRESS` (the address of all `e`s) and replace it with `address(0)`.\nlibrary UnsafePoolManager {\n    function unsafeSync(IPoolManager poolManager, IERC20 token) internal {\n        // It is the responsibility of the calling code to determine whether `token` is\n        // `ETH_ADDRESS` and substitute it with `IERC20(address(0))` appropriately. This delegation\n        // of responsibility is required because a call to `unsafeSync(0)` must be followed by a\n        // value-bearing call to `unsafeSettle` instead of using `IERC20.safeTransfer`\n        assembly (\"memory-safe\") {\n            mstore(0x14, token)\n            mstore(0x00, 0xa5841194000000000000000000000000) // selector for `sync(address)` with `token`'s padding\n            if iszero(call(gas(), poolManager, 0x00, 0x10, 0x24, 0x00, 0x00)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n        }\n    }\n\n    function unsafeSwap(\n        IPoolManager poolManager,\n        IPoolManager.PoolKey memory key,\n        IPoolManager.SwapParams memory params,\n        bytes calldata hookData\n    ) internal returns (BalanceDelta r) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, 0xf3cd914c) // selector for `swap((address,address,uint24,int24,address),(bool,int256,uint160),bytes)`\n            let token0 := mload(key)\n            token0 := mul(token0, iszero(eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, token0)))\n            mstore(add(0x20, ptr), token0)\n            mcopy(add(0x40, ptr), add(0x20, key), 0x80)\n            mcopy(add(0xc0, ptr), params, 0x60)\n            mstore(add(0x120, ptr), 0x120)\n            mstore(add(0x140, ptr), hookData.length)\n            calldatacopy(add(0x160, ptr), hookData.offset, hookData.length)\n            if iszero(call(gas(), poolManager, 0x00, add(0x1c, ptr), add(0x144, hookData.length), 0x00, 0x20)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            r := mload(0x00)\n        }\n    }\n\n    function unsafeSettle(IPoolManager poolManager, uint256 value) internal returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x11da60b4) // selector for `settle()`\n            if iszero(call(gas(), poolManager, value, 0x1c, 0x04, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            r := mload(0x00)\n        }\n    }\n\n    function unsafeSettle(IPoolManager poolManager) internal returns (uint256) {\n        return unsafeSettle(poolManager, 0);\n    }\n}\n\n/// @notice Interface for the callback executed when an address unlocks the pool manager\ninterface IUnlockCallback {\n    /// @notice Called by the pool manager on `msg.sender` when the manager is unlocked\n    /// @param data The data that was passed to the call to unlock\n    /// @return Any data that you want to be returned from the unlock call\n    function unlockCallback(bytes calldata data) external returns (bytes memory);\n}\n\n// src/core/univ4forks/UniswapV4.sol\n\nIPoolManager constant uniswapV4MainnetPoolManager = IPoolManager(0x000000000004444c5dc75cB358380D2e3dE08A90);\nIPoolManager constant uniswapV4ArbitrumPoolManager = IPoolManager(0x360E68faCcca8cA495c1B759Fd9EEe466db9FB32);\nIPoolManager constant uniswapV4AvalanchePoolManager = IPoolManager(0x06380C0e0912312B5150364B9DC4542BA0DbBc85);\nIPoolManager constant uniswapV4BasePoolManager = IPoolManager(0x498581fF718922c3f8e6A244956aF099B2652b2b);\nIPoolManager constant uniswapV4BnbPoolManager = IPoolManager(0x28e2Ea090877bF75740558f6BFB36A5ffeE9e9dF);\nIPoolManager constant uniswapV4OptimismPoolManager = IPoolManager(0x9a13F98Cb987694C9F086b1F5eB990EeA8264Ec3);\nIPoolManager constant uniswapV4PolygonPoolManager = IPoolManager(0x67366782805870060151383F4BbFF9daB53e5cD6);\nIPoolManager constant uniswapV4WorldChainPoolManager = IPoolManager(0xb1860D529182ac3BC1F51Fa2ABd56662b7D13f33);\nIPoolManager constant uniswapV4InkPoolManager = IPoolManager(0x360E68faCcca8cA495c1B759Fd9EEe466db9FB32);\nIPoolManager constant uniswapV4UnichainPoolManager = IPoolManager(0x1F98400000000000000000000000000000000004); // https://github.com/Uniswap/contracts/blob/main/deployments/130.md#wed-jan-22-2025\nIPoolManager constant uniswapV4SepoliaPoolManager = IPoolManager(0xE03A1074c86CFeDd5C142C4F04F1a1536e203543);\nIPoolManager constant uniswapV4MonadPoolManager = IPoolManager(0x188d586Ddcf52439676Ca21A244753fA19F9Ea8e);\nIPoolManager constant uniswapV4TempoPoolManager = IPoolManager(0x33620f62C5b9B2086dD6b62F4A297A9f30347029);\nIPoolManager constant uniswapV4RobinhoodPoolManager = IPoolManager(0x8366a39CC670B4001A1121B8F6A443A643e40951);\nIPoolManager constant uniswapV4ArcPoolManager = IPoolManager(0x8366a39CC670B4001A1121B8F6A443A643e40951);\n\nuint8 constant uniswapV4ForkId = 0;\n\n// src/SettlerAbstract.sol\n\nabstract contract SettlerAbstract is Permit2PaymentAbstract {\n    // Permit2 Witness for meta transactions\n    string internal constant SLIPPAGE_AND_ACTIONS_TYPE =\n        \"SlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)\";\n    bytes32 internal constant SLIPPAGE_AND_ACTIONS_TYPEHASH =\n        0x615e8d716cef7295e75dd3f1f10d679914ad6d7759e8e9459f0109ef75241701;\n    // Permit2 Witness for intents\n    string internal constant SLIPPAGE_TYPE = \"Slippage(address recipient,address buyToken,uint256 minAmountOut)\";\n    bytes32 internal constant SLIPPAGE_TYPEHASH = 0xdc83993a2ffc65b01b71ed08790b6e39c5c55d76937b62a3b5085b02071f1259;\n\n    constructor() {\n        assert(SLIPPAGE_AND_ACTIONS_TYPEHASH == keccak256(bytes(SLIPPAGE_AND_ACTIONS_TYPE)));\n        assert(SLIPPAGE_TYPEHASH == keccak256(bytes(SLIPPAGE_TYPE)));\n    }\n\n    function _hasMetaTxn() internal pure virtual returns (bool);\n\n    function _tokenId() internal pure virtual returns (uint256);\n\n    function _div512to256(uint512 n, uint512 d) internal view virtual returns (uint256);\n\n    function _checkRecipient(address sender, address recipient, IERC20 buyToken) internal view virtual;\n\n    // True when `_checkRecipient` is not empty. Call sites that must first resolve the sender or\n    // the recipient at a cost consult this before invoking the hook.\n    function _hasRecipientCheck() internal pure virtual returns (bool);\n\n    // True when `_checkRecipient` reads the buy token. Pool call sites that must look the token\n    // up at a cost consult this before passing it to the hook.\n    function _recipientCheckNeedsToken() internal pure virtual returns (bool);\n}\n\nabstract contract SettlerSwapAbstract is ISettlerBase, SettlerAbstract {\n    function _dispatch(uint256 i, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        virtual\n        returns (bool);\n}\n\nabstract contract SettlerBridgeAbstract is SettlerAbstract {\n    function _dispatch(uint256 i, uint256 action, bytes calldata data) internal virtual returns (bool);\n}\n\n// src/core/RfqOrderSettlement.sol\n\nabstract contract RfqOrderSettlement is SettlerSwapAbstract {\n    using Ternary for bool;\n    using SafeTransferLib for IERC20;\n    using UnsafeMath for uint256;\n\n    struct Consideration {\n        IERC20 token;\n        uint256 amount;\n        address counterparty;\n        bool partialFillAllowed;\n    }\n\n    string internal constant CONSIDERATION_TYPE =\n        \"Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)\";\n    // `string.concat` isn't recognized by solc as compile-time constant, but `abi.encodePacked` is\n    string internal constant CONSIDERATION_WITNESS =\n        string(abi.encodePacked(\"Consideration consideration)\", CONSIDERATION_TYPE, TOKEN_PERMISSIONS_TYPE));\n    bytes32 internal constant CONSIDERATION_TYPEHASH =\n        0x7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa;\n\n    string internal constant RFQ_ORDER_TYPE =\n        \"RfqOrder(Consideration makerConsideration,Consideration takerConsideration)\";\n    string internal constant RFQ_ORDER_TYPE_RECURSIVE = string(abi.encodePacked(RFQ_ORDER_TYPE, CONSIDERATION_TYPE));\n    bytes32 internal constant RFQ_ORDER_TYPEHASH = 0x49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a7598276;\n\n    function _hashConsideration(Consideration memory consideration) internal pure returns (bytes32 result) {\n        assembly (\"memory-safe\") {\n            let ptr := sub(consideration, 0x20)\n            let oldValue := mload(ptr)\n            mstore(ptr, CONSIDERATION_TYPEHASH)\n            result := keccak256(ptr, 0xa0)\n            mstore(ptr, oldValue)\n        }\n    }\n\n    function _logRfqOrder(bytes32 makerConsiderationHash, bytes32 takerConsiderationHash, uint128 makerFilledAmount)\n        private\n    {\n        assembly (\"memory-safe\") {\n            mstore(0x00, RFQ_ORDER_TYPEHASH)\n            mstore(0x20, makerConsiderationHash)\n            let ptr := mload(0x40)\n            mstore(0x40, takerConsiderationHash)\n            let orderHash := keccak256(0x00, 0x60)\n            mstore(0x40, ptr)\n            mstore(0x10, makerFilledAmount)\n            mstore(0x00, orderHash)\n            log0(0x00, 0x30)\n        }\n    }\n\n    constructor() {\n        assert(CONSIDERATION_TYPEHASH == keccak256(bytes(CONSIDERATION_TYPE)));\n        assert(RFQ_ORDER_TYPEHASH == keccak256(bytes(RFQ_ORDER_TYPE_RECURSIVE)));\n    }\n\n    /// @dev Settle an RfqOrder between maker and taker transferring funds directly between the counterparties. Either\n    ///      two Permit2 signatures are consumed, with the maker Permit2 containing a witness of the RfqOrder, or\n    ///      AllowanceHolder is supported for the taker payment. The Maker has signed the same order as the\n    ///      Taker. Submission may be directly by the taker or via a third party with the Taker signing a witness.\n    /// @dev if used, the taker's witness is not calculated nor verified here as calling function is trusted\n    function fillRfqOrderVIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory makerPermit,\n        address maker,\n        bytes memory makerSig,\n        ISignatureTransfer.PermitTransferFrom memory takerPermit,\n        bytes memory takerSig\n    ) internal {\n        (ISignatureTransfer.SignatureTransferDetails memory makerTransferDetails, uint256 makerAmount) =\n            _permitToTransferDetails(maker, makerPermit, recipient);\n        // In theory, the taker permit could invoke the balance-proportional sell amount logic. However,\n        // because we hash the sell amount computed here into the maker's consideration (witness) only a\n        // balance-proportional sell amount that corresponds exactly to the signed order would avoid a\n        // revert. In other words, no unexpected behavior is possible. It's pointless to prohibit the\n        // use of that logic.\n        (ISignatureTransfer.SignatureTransferDetails memory takerTransferDetails, uint256 takerAmount) =\n            _permitToTransferDetails(\n                address(0) /* sentinel for `_msgSender()` */,\n                takerPermit,\n                maker\n            );\n\n        bytes32 witness = _hashConsideration(\n            Consideration({\n                token: IERC20(takerPermit.permitted.token),\n                amount: takerAmount,\n                counterparty: _msgSender(),\n                partialFillAllowed: false\n            })\n        );\n        _transferFrom(takerPermit, takerTransferDetails, takerSig);\n        _transferFromIKnowWhatImDoing(\n            makerPermit, makerTransferDetails, maker, witness, CONSIDERATION_WITNESS, makerSig, false\n        );\n\n        _logRfqOrder(\n            witness,\n            _hashConsideration(\n                Consideration({\n                    token: IERC20(makerPermit.permitted.token),\n                    amount: makerAmount,\n                    counterparty: maker,\n                    partialFillAllowed: false\n                })\n            ),\n            uint128(makerAmount)\n        );\n    }\n\n    /// @dev Settle an RfqOrder between maker and Settler retaining funds in this contract.\n    /// @dev pre-condition: msgSender has been authenticated against the requestor\n    /// One Permit2 signature is consumed, with the maker Permit2 containing a witness of the RfqOrder.\n    // In this variant, Maker pays recipient and Settler pays Maker\n    function fillRfqOrderSelfFunded(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        address maker,\n        bytes memory makerSig,\n        IERC20 takerToken,\n        uint256 maxTakerAmount\n    ) internal {\n        // Compute witnesses. These are based on the quoted maximum amounts. We will modify them\n        // later to adjust for the actual settled amount, which may be modified by encountered\n        // slippage.\n        (ISignatureTransfer.SignatureTransferDetails memory transferDetails, uint256 makerAmount) =\n            _permitToTransferDetails(maker, permit, recipient);\n\n        bytes32 takerWitness = _hashConsideration(\n            Consideration({\n                token: IERC20(permit.permitted.token),\n                amount: makerAmount,\n                counterparty: maker,\n                partialFillAllowed: true\n            })\n        );\n        bytes32 makerWitness = _hashConsideration(\n            Consideration({\n                token: takerToken, amount: maxTakerAmount, counterparty: _msgSender(), partialFillAllowed: true\n            })\n        );\n\n        // Now we adjust the transfer amounts to compensate for encountered slippage. Rounding is\n        // performed in the maker's favor.\n        uint256 takerAmount = takerToken.fastBalanceOf(address(this));\n        takerAmount = (takerAmount > maxTakerAmount).ternary(maxTakerAmount, takerAmount);\n        unchecked {\n            transferDetails.requestedAmount = makerAmount = (makerAmount * takerAmount).unsafeDiv(maxTakerAmount);\n        }\n\n        // Now that we have all the relevant information, make the transfers and log the order.\n        _checkRecipient(address(this), maker, takerToken);\n        takerToken.safeTransfer(maker, takerAmount);\n        _transferFromIKnowWhatImDoing(\n            permit, transferDetails, maker, makerWitness, CONSIDERATION_WITNESS, makerSig, false\n        );\n\n        _logRfqOrder(makerWitness, takerWitness, uint128(makerAmount));\n    }\n}\n\n// src/core/DodoV1.sol\n\ninterface IDodoV1 {\n    function sellBaseToken(uint256 amount, uint256 minReceiveQuote, bytes calldata data) external returns (uint256);\n\n    function buyBaseToken(uint256 amount, uint256 maxPayQuote, bytes calldata data) external returns (uint256);\n\n    function _R_STATUS_() external view returns (uint8);\n\n    function _QUOTE_BALANCE_() external view returns (uint256);\n\n    function _BASE_BALANCE_() external view returns (uint256);\n\n    function _K_() external view returns (uint256);\n\n    function _MT_FEE_RATE_() external view returns (uint256);\n\n    function _LP_FEE_RATE_() external view returns (uint256);\n\n    function getExpectedTarget() external view returns (uint256 baseTarget, uint256 quoteTarget);\n\n    function getOraclePrice() external view returns (uint256);\n\n    function _BASE_TOKEN_() external view returns (IERC20);\n\n    function _QUOTE_TOKEN_() external view returns (IERC20);\n}\n\nlibrary FastDodoV1 {\n    function _callAddressUintEmptyBytesReturnUint(IDodoV1 dodo, uint256 sig, uint256 a, uint256 b)\n        private\n        returns (uint256 r)\n    {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, sig)\n            mstore(add(0x20, ptr), a)\n            mstore(add(0x40, ptr), b)\n            mstore(add(0x60, ptr), 0x60)\n            mstore(add(0x80, ptr), 0x00)\n\n            if iszero(call(gas(), dodo, 0x00, add(0x1c, ptr), 0x84, 0x00, 0x20)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            if iszero(gt(returndatasize(), 0x1f)) { revert(0x00, 0x00) }\n\n            r := mload(0x00)\n        }\n    }\n\n    function fastSellBaseToken(IDodoV1 dodo, uint256 amount, uint256 minReceiveQuote) internal returns (uint256) {\n        return _callAddressUintEmptyBytesReturnUint(dodo, uint32(dodo.sellBaseToken.selector), amount, minReceiveQuote);\n    }\n\n    function fastBuyBaseToken(IDodoV1 dodo, uint256 amount, uint256 maxPayQuote) internal returns (uint256) {\n        return _callAddressUintEmptyBytesReturnUint(dodo, uint32(dodo.buyBaseToken.selector), amount, maxPayQuote);\n    }\n\n    function _get(IDodoV1 dodo, uint256 sig) private view returns (bytes32 r) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, sig)\n            if iszero(staticcall(gas(), dodo, 0x1c, 0x04, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if iszero(gt(returndatasize(), 0x1f)) { revert(0x00, 0x00) }\n\n            r := mload(0x00)\n        }\n    }\n\n    function fast_R_STATUS_(IDodoV1 dodo) internal view returns (uint8) {\n        uint256 result = uint256(_get(dodo, uint32(dodo._R_STATUS_.selector)));\n        require(result >> 8 == 0);\n        return uint8(result);\n    }\n\n    function fast_QUOTE_BALANCE_(IDodoV1 dodo) internal view returns (uint256) {\n        return uint256(_get(dodo, uint32(dodo._QUOTE_BALANCE_.selector)));\n    }\n\n    function fast_BASE_BALANCE_(IDodoV1 dodo) internal view returns (uint256) {\n        return uint256(_get(dodo, uint32(dodo._BASE_BALANCE_.selector)));\n    }\n\n    function fast_K_(IDodoV1 dodo) internal view returns (uint256) {\n        return uint256(_get(dodo, uint32(dodo._K_.selector)));\n    }\n\n    function fast_MT_FEE_RATE_(IDodoV1 dodo) internal view returns (uint256) {\n        return uint256(_get(dodo, uint32(dodo._MT_FEE_RATE_.selector)));\n    }\n\n    function fast_LP_FEE_RATE_(IDodoV1 dodo) internal view returns (uint256) {\n        return uint256(_get(dodo, uint32(dodo._LP_FEE_RATE_.selector)));\n    }\n\n    function fastGetExpectedTarget(IDodoV1 dodo) internal view returns (uint256 baseTarget, uint256 quoteTarget) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0xffa64225)\n            if iszero(staticcall(gas(), dodo, 0x1c, 0x04, 0x00, 0x40)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if iszero(gt(returndatasize(), 0x3f)) { revert(0x00, 0x00) }\n\n            baseTarget := mload(0x00)\n            quoteTarget := mload(0x20)\n        }\n    }\n\n    function fastGetOraclePrice(IDodoV1 dodo) internal view returns (uint256) {\n        return uint256(_get(dodo, uint32(dodo.getOraclePrice.selector)));\n    }\n\n    function fast_BASE_TOKEN_(IDodoV1 dodo) internal view returns (IERC20) {\n        uint256 result = uint256(_get(dodo, uint32(dodo._BASE_TOKEN_.selector)));\n        require(result >> 160 == 0);\n        return IERC20(address(uint160(result)));\n    }\n\n    function fast_QUOTE_TOKEN_(IDodoV1 dodo) internal view returns (IERC20) {\n        uint256 result = uint256(_get(dodo, uint32(dodo._QUOTE_TOKEN_.selector)));\n        require(result >> 160 == 0);\n        return IERC20(address(uint160(result)));\n    }\n}\n\nlibrary Math_1 {\n    using UnsafeMath for uint256;\n\n    function sqrt(uint256 x) internal pure returns (uint256 y) {\n        unchecked {\n            uint256 z = x / 2 + 1;\n            y = x;\n            while (z < y) {\n                y = z;\n                z = (x.unsafeDiv(z) + z) / 2;\n            }\n        }\n    }\n}\n\nlibrary DecimalMath {\n    using UnsafeMath for uint256;\n    using Math_1 for uint256;\n\n    uint256 constant ONE = 10 ** 18;\n\n    function mul(uint256 target, uint256 d) internal pure returns (uint256) {\n        unchecked {\n            return target * d / ONE;\n        }\n    }\n\n    function mulCeil(uint256 target, uint256 d) internal pure returns (uint256) {\n        unchecked {\n            return (target * d).unsafeDivUp(ONE);\n        }\n    }\n\n    function divFloor(uint256 target, uint256 d) internal pure returns (uint256) {\n        unchecked {\n            return (target * ONE).unsafeDiv(d);\n        }\n    }\n\n    function divCeil(uint256 target, uint256 d) internal pure returns (uint256) {\n        unchecked {\n            return (target * ONE).unsafeDivUp(d);\n        }\n    }\n}\n\nlibrary DodoMath {\n    using UnsafeMath for uint256;\n    using Math_1 for uint256;\n\n    /*\n        Integrate dodo curve fron V1 to V2\n        require V0>=V1>=V2>0\n        res = (1-k)i(V1-V2)+ikV0*V0(1/V2-1/V1)\n        let V1-V2=delta\n        res = i*delta*(1-k+k(V0^2/V1/V2))\n    */\n    function _GeneralIntegrate(uint256 V0, uint256 V1, uint256 V2, uint256 i, uint256 k)\n        internal\n        pure\n        returns (uint256)\n    {\n        unchecked {\n            uint256 fairAmount = DecimalMath.mul(i, V1 - V2); // i*delta\n            uint256 V0V0V1V2 = DecimalMath.divCeil((V0 * V0).unsafeDiv(V1), V2);\n            uint256 penalty = DecimalMath.mul(k, V0V0V1V2); // k(V0^2/V1/V2)\n            return DecimalMath.mul(fairAmount, DecimalMath.ONE - k + penalty);\n        }\n    }\n\n    /*\n        The same with integration expression above, we have:\n        i*deltaB = (Q2-Q1)*(1-k+kQ0^2/Q1/Q2)\n        Given Q1 and deltaB, solve Q2\n        This is a quadratic function and the standard version is\n        aQ2^2 + bQ2 + c = 0, where\n        a=1-k\n        -b=(1-k)Q1-kQ0^2/Q1+i*deltaB\n        c=-kQ0^2\n        and Q2=(-b+sqrt(b^2+4(1-k)kQ0^2))/2(1-k)\n        note: another root is negative, abondan\n        if deltaBSig=true, then Q2>Q1\n        if deltaBSig=false, then Q2<Q1\n    */\n    function _SolveQuadraticFunctionForTrade(uint256 Q0, uint256 Q1, uint256 ideltaB, bool deltaBSig, uint256 k)\n        internal\n        pure\n        returns (uint256)\n    {\n        unchecked {\n            // calculate -b value and sig\n            // -b = (1-k)Q1-kQ0^2/Q1+i*deltaB\n            uint256 kQ02Q1 = (DecimalMath.mul(k, Q0) * Q0).unsafeDiv(Q1); // kQ0^2/Q1\n            uint256 b = DecimalMath.mul(DecimalMath.ONE - k, Q1); // (1-k)Q1\n            bool minusbSig = true;\n            if (deltaBSig) {\n                b += ideltaB; // (1-k)Q1+i*deltaB\n            } else {\n                kQ02Q1 += ideltaB; // i*deltaB+kQ0^2/Q1\n            }\n            if (b >= kQ02Q1) {\n                b -= kQ02Q1;\n                minusbSig = true;\n            } else {\n                b = kQ02Q1 - b;\n                minusbSig = false;\n            }\n\n            // calculate sqrt\n            uint256 squareRoot = DecimalMath.mul((DecimalMath.ONE - k) * 4, DecimalMath.mul(k, Q0) * Q0); // 4(1-k)kQ0^2\n            squareRoot = (b * b + squareRoot).sqrt(); // sqrt(b*b+4(1-k)kQ0*Q0)\n\n            // final res\n            uint256 denominator = (DecimalMath.ONE - k) * 2; // 2(1-k)\n            uint256 numerator;\n            if (minusbSig) {\n                numerator = b + squareRoot;\n            } else {\n                numerator = squareRoot - b;\n            }\n\n            if (deltaBSig) {\n                return DecimalMath.divFloor(numerator, denominator);\n            } else {\n                return DecimalMath.divCeil(numerator, denominator);\n            }\n        }\n    }\n\n    /*\n        Start from the integration function\n        i*deltaB = (Q2-Q1)*(1-k+kQ0^2/Q1/Q2)\n        Assume Q2=Q0, Given Q1 and deltaB, solve Q0\n        let fairAmount = i*deltaB\n    */\n    function _SolveQuadraticFunctionForTarget(uint256 V1, uint256 k, uint256 fairAmount)\n        internal\n        pure\n        returns (uint256 V0)\n    {\n        unchecked {\n            // V0 = V1+V1*(sqrt-1)/2k\n            uint256 sqrt = DecimalMath.divCeil(DecimalMath.mul(k, fairAmount) * 4, V1);\n            sqrt = ((sqrt + DecimalMath.ONE) * DecimalMath.ONE).sqrt();\n            uint256 premium = DecimalMath.divCeil(sqrt - DecimalMath.ONE, k * 2);\n            // V0 is greater than or equal to V1 according to the solution\n            return DecimalMath.mul(V1, DecimalMath.ONE + premium);\n        }\n    }\n}\n\nabstract contract DodoSellHelper {\n    using Math_1 for uint256;\n    using FastDodoV1 for IDodoV1;\n    using Ternary for bool;\n\n    enum RStatus {\n        ONE,\n        ABOVE_ONE,\n        BELOW_ONE\n    }\n\n    function dodoQuerySellQuoteToken(IDodoV1 dodo, uint256 amount) internal view returns (uint256) {\n        (uint256 baseTarget, uint256 quoteTarget) = dodo.fastGetExpectedTarget();\n        RStatus rStatus = RStatus(dodo.fast_R_STATUS_());\n        uint256 oraclePrice = dodo.fastGetOraclePrice();\n        uint256 B = dodo.fast_BASE_BALANCE_();\n        uint256 K = dodo.fast_K_();\n\n        unchecked {\n            uint256 boughtAmount;\n            uint256 i = DecimalMath.divFloor(DecimalMath.ONE, oraclePrice);\n            // Determine the status (RStatus) and calculate the amount based on the\n            // state\n            if (rStatus == RStatus.BELOW_ONE) {\n                uint256 Q = dodo.fast_QUOTE_BALANCE_();\n                uint256 backOneBase = B - baseTarget;\n                uint256 backOneQuote = quoteTarget - Q;\n                if (amount <= backOneQuote) {\n                    uint256 Q1 = Q + amount;\n                    boughtAmount = DodoMath._GeneralIntegrate(quoteTarget, Q1, Q, i, K);\n                } else {\n                    boughtAmount = backOneBase + _SellQuoteToken(amount - backOneQuote, i, baseTarget, baseTarget, K);\n                }\n            } else {\n                uint256 Q1 = (rStatus == RStatus.ONE).ternary(baseTarget, B);\n                boughtAmount = _SellQuoteToken(amount, i, baseTarget, Q1, K);\n            }\n            // Calculate fees\n            return\n                DecimalMath.divFloor(\n                    boughtAmount, DecimalMath.ONE + dodo.fast_MT_FEE_RATE_() + dodo.fast_LP_FEE_RATE_()\n                );\n        }\n    }\n\n    function _SellQuoteToken(uint256 amount, uint256 i, uint256 Q0, uint256 Q1, uint256 K)\n        private\n        pure\n        returns (uint256 receiveBaseToken)\n    {\n        unchecked {\n            return Q1 - DodoMath._SolveQuadraticFunctionForTrade(Q0, Q1, DecimalMath.mul(i, amount), false, K);\n        }\n    }\n}\n\nabstract contract DodoV1 is SettlerSwapAbstract, DodoSellHelper {\n    using UnsafeMath for uint256;\n    using SafeTransferLib for IERC20;\n    using FastDodoV1 for IDodoV1;\n\n    function sellToDodoV1(IERC20 sellToken, uint256 ppm, IDodoV1 dodo, bool quoteForBase, uint256 minBuyAmount)\n        internal\n    {\n        uint256 sellAmount;\n        unchecked {\n            sellAmount = (sellToken.fastSpendableBalance() * ppm).unsafeDiv(BASIS);\n        }\n        sellToken.safeApproveIfBelow(address(dodo), sellAmount);\n        if (quoteForBase) {\n            uint256 buyAmount = dodoQuerySellQuoteToken(dodo, sellAmount);\n            if (buyAmount < minBuyAmount) {\n                revertTooMuchSlippage(dodo.fast_BASE_TOKEN_(), minBuyAmount, buyAmount);\n            }\n            dodo.fastBuyBaseToken(buyAmount, sellAmount);\n        } else {\n            dodo.fastSellBaseToken(sellAmount, minBuyAmount);\n        }\n    }\n}\n\n// src/core/MakerPSM.sol\n\ninterface IPSM {\n    /// @dev Fee for selling gem (USDC/USDT) into the PSM\n    /// @return tin toll in [wad]\n    function tin() external view returns (uint256);\n\n    /// @dev Fee for buying gem (USDC/USDT) from the PSM\n    /// @return tout toll out [wad]\n    function tout() external view returns (uint256);\n\n    /// @dev Get the address of the underlying vault powering PSM\n    /// @return address of gemJoin contract\n    function gemJoin() external view returns (address);\n\n    function pocket() external view returns (address);\n\n    function usdsJoin() external view returns (address);\n\n    function usddJoin() external view returns (address);\n\n    /// @dev Sell gem (USDC/USDT) for dai (DAI/USDS/USDD)\n    /// @param usr The address of the account trading gem for dai.\n    /// @param gemAmt The amount of gem to sell in gem base units\n    /// @return daiOutWad The amount of dai bought.\n    function sellGem(address usr, uint256 gemAmt) external returns (uint256 daiOutWad);\n\n    /// @dev Buy gem (USDC/USDT) with dai (DAI/USDS/USDD)\n    /// @param usr The address of the account trading dai for gem\n    /// @param gemAmt The amount of gem to buy in gem base units\n    /// @return daiInWad The amount of dai required to sell.\n    function buyGem(address usr, uint256 gemAmt) external returns (uint256 daiInWad);\n}\n\nlibrary FastPSM {\n    function fastSellGem(IPSM psm, address usr, uint256 gemAmt) internal {\n        assembly (\"memory-safe\") {\n            mstore(0x34, gemAmt)\n            mstore(0x14, usr)\n            mstore(0x00, 0x95991276000000000000000000000000) // selector for `sellGem(address,uint256)` with `usr`'s padding\n\n            if iszero(call(gas(), psm, 0x00, 0x10, 0x44, 0x00, 0x20)) {\n                let ptr := and(0xffffffffffffffffffffffff, mload(0x40))\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            mstore(0x34, 0x00)\n        }\n    }\n\n    function fastBuyGem(IPSM psm, address usr, uint256 gemAmt) internal {\n        assembly (\"memory-safe\") {\n            mstore(0x34, gemAmt)\n            mstore(0x14, usr)\n            mstore(0x00, 0x8d7ef9bb000000000000000000000000) // selector for `buyGem(address,uint256)` with `usr`'s padding\n\n            if iszero(call(gas(), psm, 0x00, 0x10, 0x44, 0x00, 0x20)) {\n                let ptr := and(0xffffffffffffffffffffffff, mload(0x40))\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            mstore(0x34, 0x00)\n        }\n    }\n\n    // Unlike fastSellGem/fastBuyGem, `tin()`/`tout()` are present on both LitePSM and classic DssPsm,\n    // so we require return data here.\n    function fastTin(IPSM psm) internal view returns (uint256 tin) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x568d4b6f) // selector for `tin()`\n\n            if iszero(staticcall(gas(), psm, 0x1c, 0x04, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if iszero(gt(returndatasize(), 0x1f)) { revert(0x00, 0x00) }\n            tin := mload(0x00)\n        }\n    }\n\n    function fastTout(IPSM psm) internal view returns (uint256 tout) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0xfae036d5) // selector for `tout()`\n\n            if iszero(staticcall(gas(), psm, 0x1c, 0x04, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if iszero(gt(returndatasize(), 0x1f)) { revert(0x00, 0x00) }\n            tout := mload(0x00)\n        }\n    }\n}\n\n// Maker units https://github.com/makerdao/dss/blob/master/DEVELOPING.md\n// wad: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)\nuint256 constant WAD = 10 ** 18;\n\nIERC20 constant DAI = IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F);\nIERC20 constant USDS = IERC20(0xdC035D45d973E3EC169d2276DDab16f1e407384F);\nIERC20 constant USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);\nIERC20 constant USDT = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7);\nIERC20 constant USDD = IERC20(0x4f8e5DE400DE08B164E7421B3EE387f461beCD1A);\nIPSM constant LitePSM = IPSM(0xf6e72Db5454dd049d0788e411b06CfAF16853042);\nIPSM constant SkyPSM = IPSM(0xA188EEC8F81263234dA3622A406892F3D630f98c);\nIPSM constant UsddPSM = IPSM(0xcE355440c00014A229bbEc030A2B8f8EB45a2897);\naddress constant UsddGemJoin = 0x217e42CEB2eAE9ECB788fDF0e31c806c531760A3;\n\nabstract contract MakerPSM is SettlerSwapAbstract {\n    using UnsafeMath for uint256;\n    using SafeTransferLib for IERC20;\n    using FastPSM for IPSM;\n    using Ternary for bool;\n\n    // USDC and USDT both have 6 decimals, so GEM_basis (1e6) is safe to use for all supported gems.\n    uint256 private constant GEM_basis = 1_000_000;\n\n    constructor() {\n        assert(block.chainid == 1 || block.chainid == 31337);\n        assert(GEM_basis == 10 ** USDC.decimals());\n        assert(GEM_basis == 10 ** USDT.decimals());\n        // LitePSM is its own join\n        DAI.safeApprove(address(LitePSM), type(uint256).max);\n        USDC.safeApprove(address(LitePSM), type(uint256).max);\n        // SkyPSM is its own join\n        USDS.safeApprove(address(SkyPSM), type(uint256).max);\n        USDC.safeApprove(address(SkyPSM), type(uint256).max);\n        // USDD PSM (classic DssPsm — separate GemJoin)\n        USDD.safeApprove(address(UsddPSM), type(uint256).max);\n        USDT.safeApprove(UsddGemJoin, type(uint256).max);\n    }\n\n    function sellToMakerPsm(address recipient, uint256 ppm, bool buyGem, uint256 amountOutMin, IPSM psm, IERC20 dai)\n        internal\n        returns (uint256 buyAmount)\n    {\n        // Configured approval pairs: LitePSM/DAI/USDC, SkyPSM/USDS/USDC, UsddPSM/USDD/USDT.\n        IERC20 gem = IERC20((psm == UsddPSM).ternary(address(USDT), address(USDC)));\n        (IERC20 sellToken, IERC20 buyToken) = buyGem.maybeSwap(gem, dai);\n        if (_hasRecipientCheck()) {\n            address sender;\n            if (buyGem) {\n                sender = psm == UsddPSM ? UsddGemJoin : psm.pocket();\n            } else if (psm == SkyPSM) {\n                sender = psm.usdsJoin();\n            } else if (psm == UsddPSM) {\n                sender = psm.usddJoin();\n            } else {\n                sender = address(psm);\n            }\n            _checkRecipient(sender, recipient, buyToken);\n        }\n        uint256 sellAmount;\n        unchecked {\n            // phantom overflow can't happen here because:\n            // 1. sellToken has decimals = 18 (sellToken is DAI, USDS, or USDD)\n            // 2. PSM prohibits gemToken with decimals > 18 (sellToken is USDC or USDT)\n            sellAmount = (sellToken.fastSpendableBalance() * ppm).unsafeDiv(BASIS);\n        }\n        if (buyGem) {\n            unchecked {\n                uint256 feeDivisor = psm.fastTout() + WAD; // eg. 1.001 * 10 ** 18 with 0.1% fee [tout is in wad];\n                // overflow can't happen at all because DAI, USDS, and USDD are reasonable and PSM prohibits gemToken with decimals > 18\n                buyAmount = (sellAmount * GEM_basis).unsafeDiv(feeDivisor);\n                if (buyAmount < amountOutMin) {\n                    revertTooMuchSlippage(buyToken, amountOutMin, buyAmount);\n                }\n\n                psm.fastBuyGem(recipient, buyAmount);\n            }\n        } else {\n            psm.fastSellGem(recipient, sellAmount);\n            unchecked {\n                buyAmount = sellAmount * WAD / GEM_basis;\n                buyAmount -= (buyAmount * psm.fastTin()).unsafeDiv(WAD);\n            }\n            if (buyAmount < amountOutMin) {\n                revertTooMuchSlippage(buyToken, amountOutMin, buyAmount);\n            }\n        }\n    }\n}\n\n// src/core/Velodrome.sol\n\n//import {Panic} from \"../utils/Panic.sol\";\n\ninterface IVelodromePair {\n    function metadata()\n        external\n        view\n        returns (\n            uint256 basis0,\n            uint256 basis1,\n            uint256 reserve0,\n            uint256 reserve1,\n            bool stable,\n            IERC20 token0,\n            IERC20 token1\n        );\n    function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;\n}\n\nabstract contract Velodrome is SettlerSwapAbstract {\n    using Math_0 for uint256;\n    using UnsafeMath for uint256;\n    using FastLogic for bool;\n    using SafeTransferLib for IERC20;\n\n    // This is the basis used for token balances. The original token may have fewer decimals, in\n    // which case we scale up by the appropriate factor to give this basis.\n    uint256 internal constant _VELODROME_TOKEN_BASIS = 1 ether;\n\n    // When computing `k`, to minimize rounding error, we use a significantly larger basis. This\n    // also allows us to save work in the Newton-Raphson step because dividing a quantity with this\n    // basis by a quantity with `_VELODROME_TOKEN_BASIS` basis gives that same\n    // `_VELODROME_TOKEN_BASIS` basis. Convenient *and* accurate.\n    uint256 private constant _VELODROME_INTERNAL_BASIS = _VELODROME_TOKEN_BASIS * _VELODROME_TOKEN_BASIS;\n\n    uint256 private constant _VELODROME_INTERNAL_TO_TOKEN_RATIO = _VELODROME_INTERNAL_BASIS / _VELODROME_TOKEN_BASIS;\n\n    // When computing `d` we need to compute the cube of a token quantity and format the result with\n    // `_VELODROME_TOKEN_BASIS`. In order to avoid overflow, we must divide the squared token\n    // quantity by this before multiplying again by the token quantity. Setting this value as small\n    // as possible preserves precision. This gives a result in an awkward basis, but we'll correct\n    // that with `_VELODROME_CUBE_STEP_BASIS` after the cubing\n    uint256 private constant _VELODROME_SQUARE_STEP_BASIS = 216840435;\n\n    // After squaring a token quantity (in `_VELODROME_TOKEN_BASIS`), we need to multiply again by a\n    // token quantity and then divide out the awkward basis to get back to\n    // `_VELODROME_TOKEN_BASIS`. This constant is what gets us back to the original token quantity\n    // basis. `_VELODROME_TOKEN_BASIS * _VELODROME_TOKEN_BASIS / _VELODROME_SQUARE_STEP_BASIS *\n    // _VELODROME_TOKEN_BASIS / _VELODROME_CUBE_STEP_BASIS == _VELODROME_TOKEN_BASIS`\n    uint256 private constant _VELODROME_CUBE_STEP_BASIS = 4611686007731906643703237360;\n\n    // The maximum balance in the AMM's reference implementation of `k` is `b` such that `(b * b) /\n    // 1 ether * ((b * b) / 1 ether + (b * b) / 1 ether)` does not overflow. This that quantity,\n    // `b`. This is roughly 15.5 billion ether.\n    uint256 internal constant _VELODROME_MAX_BALANCE = 15511800964685064948225197537;\n\n    // This is the `k = x^3 * y + y^3 * x` constant function. Unlike the original formulation, the\n    // result has a basis of `_VELODROME_INTERNAL_BASIS` instead of `_VELODROME_TOKEN_BASIS`\n    function _k(uint256 x, uint256 y) private pure returns (uint256) {\n        unchecked {\n            return _k(x, y, x * x);\n        }\n    }\n\n    function _k(uint256 x, uint256 y, uint256 x_squared) private pure returns (uint256) {\n        unchecked {\n            return _k(x, y, x_squared, y * y);\n        }\n    }\n\n    function _k(uint256 x, uint256 y, uint256 x_squared, uint256 y_squared) private pure returns (uint256) {\n        unchecked {\n            return tmp().omul(x * y, x_squared + y_squared).unsafeDiv(_VELODROME_INTERNAL_BASIS);\n        }\n    }\n\n    function _k_compat(uint256 x, uint256 y) internal pure returns (uint256) {\n        unchecked {\n            return tmp().omul(x * y, x * x + y * y).unsafeDiv(_VELODROME_INTERNAL_BASIS * _VELODROME_TOKEN_BASIS);\n        }\n    }\n\n    function _k_compat(uint256 x, uint256 y, uint256 x_squared) private pure returns (uint256) {\n        unchecked {\n            return tmp().omul(x * y, x_squared + y * y).unsafeDiv(_VELODROME_INTERNAL_BASIS * _VELODROME_TOKEN_BASIS);\n        }\n    }\n\n    // For numerically approximating a solution to the `k = x^3 * y + y^3 * x` constant function\n    // using Newton-Raphson, this is `∂k/∂y = 3 * x * y^2 + x^3`. The result has a basis of\n    // `_VELODROME_TOKEN_BASIS`.\n    function _d(uint256 y, uint256 x) private pure returns (uint256) {\n        unchecked {\n            return _d(y, 3 * x, x * x / _VELODROME_SQUARE_STEP_BASIS * x);\n        }\n    }\n\n    function _d(uint256 y, uint256 three_x, uint256 x_cubed) private pure returns (uint256) {\n        unchecked {\n            return _d(y, three_x, x_cubed, y * y / _VELODROME_SQUARE_STEP_BASIS);\n        }\n    }\n\n    function _d(uint256, uint256 three_x, uint256 x_cubed, uint256 y_squared) private pure returns (uint256) {\n        unchecked {\n            return (y_squared * three_x + x_cubed) / _VELODROME_CUBE_STEP_BASIS;\n        }\n    }\n\n    // Using Newton-Raphson iterations, compute the smallest `new_y` such that `_k(x + dx, new_y) >=\n    // _k(x, y)`. As a function of `new_y`, we find the root of `_k(x + dx, new_y) - _k(x, y)`.\n    function _get_y(uint256 x, uint256 dx, uint256 y) internal pure returns (uint256) {\n        unchecked {\n            uint256 k_orig = _k(x, y);\n            // `k_orig` has a basis much greater than is actually required for correctness. To\n            // achieve wei-level accuracy, we perform our final comparisons agains `k_target`\n            // instead, which has the same precision as the AMM itself.\n            uint256 k_target = _k_compat(x, y);\n\n            // Now that we have `k` computed, we offset `x` to account for the sell amount and use\n            // the constant-product formula to compute an initial estimate for `y`.\n            x += dx;\n            y -= (dx * y).unsafeDiv(x);\n\n            // These intermediate values do not change throughout the Newton-Raphson iterations, so\n            // precomputing and caching them saves us gas.\n            uint256 three_x = 3 * x;\n            uint256 x_squared_raw = x * x;\n            uint256 x_cubed_raw = x_squared_raw / _VELODROME_SQUARE_STEP_BASIS * x;\n\n            for (uint256 i; i < 255; i++) {\n                uint256 y_squared_raw = y * y;\n                uint256 k = _k(x, y, x_squared_raw, y_squared_raw);\n                uint256 d = _d(y, three_x, x_cubed_raw, y_squared_raw / _VELODROME_SQUARE_STEP_BASIS);\n\n                // This would exactly solve *OUR* formulation of the `k=x^3*y+y^3*x` constant\n                // function. However, not only is it computationally and contract-size expensive, it\n                // also does not necessarily exactly satisfy the *REFERENCE* implementations of the\n                // same constant function (SolidlyV1, VelodromeV2). Therefore, it is commented out\n                // and the relevant condition is handled by the \"ordinary\" parts of the\n                // Newton-Raphson loop.\n                /* if (k / _VELODROME_INTERNAL_TO_TOKEN_RATIO == k_target) {\n                    uint256 hi = y;\n                    uint256 lo = y - 1;\n                    uint256 k_next = _k_compat(x, lo, x_squared_raw);\n                    while (k_next == k_target) {\n                        (hi, lo) = (lo, lo - (hi - lo) * 2);\n                        k_next = _k_compat(x, lo, x_squared_raw);\n                    }\n                    while (hi != lo) {\n                        uint256 mid = (hi - lo) / 2 + lo;\n                        k_next = _k_compat(x, mid, x_squared_raw);\n                        if (k_next == k_target) {\n                            hi = mid;\n                        } else {\n                            lo = mid + 1;\n                        }\n                    }\n                    return lo;\n                } else */ if (k < k_orig) {\n                    uint256 dy = (k_orig - k).unsafeDiv(d);\n                    // There are two cases where `dy == 0`\n                    // Case 1: The `y` is converged and we find the correct answer\n                    // Case 2: `_d(y, x)` is too large compare to `(k_orig - k)` and the rounding\n                    //         error screwed us.\n                    //         In this case, we need to increase `y` by 1\n                    if (dy == 0) {\n                        if (_k_compat(x, y + 1, x_squared_raw) >= k_target) {\n                            // If `_k(x, y + 1) >= k_orig`, then we are close to the correct answer.\n                            // There's no closer answer than `y + 1`\n                            return y + 1;\n                        }\n                        // `y + 1` does not give us the condition `k >= k_orig`, so we have to do at\n                        // least 1 more iteration to find a satisfactory `y` value. Setting `dy = y\n                        // / 2` also solves the problem where the constant-product estimate of `y`\n                        // is very bad and convergence is only linear.\n                        dy = y / 2;\n                    }\n                    y += dy;\n                    if (y > _VELODROME_MAX_BALANCE) {\n                        y = _VELODROME_MAX_BALANCE;\n                    }\n                } else {\n                    uint256 dy = (k - k_orig).unsafeDiv(d);\n                    if (dy == 0) {\n                        if (_k_compat(x, y - 1, x_squared_raw) < k_target) {\n                            // If `_k(x, y - 1) < k_orig`, then we are close to the correct answer.\n                            // There's no closer answer than `y`. We need to find `y` where `_k(x,\n                            // y) >= k_orig`. As a result, we can't return `y - 1` even it's closer\n                            // to the correct answer\n                            return y;\n                        }\n                        if (_k(x, y - 2, x_squared_raw) < k_orig) {\n                            // It may be the case that all 3 of `y`, `y - 1`, and `y - 2` give the\n                            // same value for `_k_compat`, but that `y - 2` gives a value for `_k`\n                            // that brackets `k_orig`. In this case, we would loop forever. This\n                            // branch causes us to bail out with the approximately correct value.\n                            return y - 1;\n                        }\n                        // It's possible that `y - 1` is the correct answer. To know that, we must\n                        // check that `y - 2` gives `k < k_orig`. We must do at least 1 more\n                        // iteration to determine this.\n                        dy = 2;\n                    }\n                    if (dy > y / 2) {\n                        dy = y / 2;\n                    }\n                    y -= dy;\n                }\n            }\n            assembly (\"memory-safe\") {\n                mstore(0x00, 0x481b61af) // selector for `NotConverged()`\n                revert(0x1c, 0x04)\n            }\n        }\n    }\n\n    function sellToVelodrome(address recipient, uint256 ppm, IVelodromePair pair, uint24 swapInfo, uint256 minAmountOut)\n        internal\n    {\n        // Preventing calls to Permit2 or AH is not explicitly required as neither of these contracts implement the `swap` nor `transfer` selector\n\n        // |7|6|5|4|3|2|1|0| - bit positions in swapInfo (uint8)\n        // |0|0|0|0|0|0|F|Z| - Z: zeroForOne flag, F: sellTokenHasFee flag\n        bool zeroForOne = (swapInfo & 1) == 1; // Extract the least significant bit (bit 0)\n        bool sellTokenHasFee = (swapInfo & 2) >> 1 == 1; // Extract the second least significant bit (bit 1) and shift it right\n        uint256 feeBps = swapInfo >> 8;\n\n        (\n            uint256 sellBasis,\n            uint256 buyBasis,\n            uint256 sellReserve,\n            uint256 buyReserve,\n            bool stable,\n            IERC20 sellToken,\n            IERC20 buyToken\n        ) = pair.metadata();\n        assert(stable);\n        if (!zeroForOne) {\n            (sellBasis, buyBasis, sellReserve, buyReserve, sellToken, buyToken) =\n            (buyBasis, sellBasis, buyReserve, sellReserve, buyToken, sellToken);\n        }\n\n        uint256 buyAmount;\n        unchecked {\n            // Compute sell amount in native units\n            uint256 sellAmount;\n            if (ppm != 0) {\n                // It must be possible to square the sell token balance of the pool, otherwise it\n                // will revert with an overflow. Therefore, it can't be so large that multiplying by\n                // a \"reasonable\" `ppm` value could overflow. We don't care to protect against\n                // unreasonable `ppm` values because that just means the taker is griefing themself.\n                sellAmount = (sellToken.fastSpendableBalance() * ppm).unsafeDiv(BASIS);\n            }\n            if (sellAmount != 0) {\n                _checkRecipient(address(this), address(pair), sellToken);\n                sellToken.safeTransfer(address(pair), sellAmount);\n            }\n            if ((sellAmount == 0).or(sellTokenHasFee)) {\n                sellAmount = sellToken.fastBalanceOf(address(pair)) - sellReserve;\n            }\n\n            // Convert reserves from native units to `_VELODROME_TOKEN_BASIS`\n            sellReserve = (sellReserve * _VELODROME_TOKEN_BASIS).unsafeDiv(sellBasis);\n            buyReserve = (buyReserve * _VELODROME_TOKEN_BASIS).unsafeDiv(buyBasis);\n\n            // This check is commented because values that are too large will\n            // result in reverts inside the pool anyways. We don't need to\n            // bother.\n            /*\n            // Check for overflow\n            if (buyReserve > _VELODROME_MAX_BALANCE) {\n                Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n            }\n            if (sellReserve + (sellAmount * _VELODROME_TOKEN_BASIS).unsafeDiv(sellBasis) > _VELODROME_MAX_BALANCE) {\n                Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n            }\n            */\n\n            // Apply the fee in native units\n            sellAmount -= sellAmount * feeBps / 10_000; // can't overflow\n            // Convert sell amount from native units to `_VELODROME_TOKEN_BASIS`\n            sellAmount = (sellAmount * _VELODROME_TOKEN_BASIS).unsafeDiv(sellBasis);\n\n            // Solve the constant function numerically to get `buyAmount` from `sellAmount`\n            buyAmount = buyReserve - _get_y(sellReserve, sellAmount, buyReserve);\n\n            // Convert `buyAmount` from `_VELODROME_TOKEN_BASIS` to native units\n            buyAmount = buyAmount * buyBasis / _VELODROME_TOKEN_BASIS;\n        }\n\n        // Compensate for rounding error in the reference implementation of the constant-function\n        buyAmount--;\n        buyAmount.dec((sellReserve < sellBasis).or(buyReserve < buyBasis));\n\n        // Check slippage\n        if (buyAmount < minAmountOut) {\n            revertTooMuchSlippage(buyToken, minAmountOut, buyAmount);\n        }\n\n        // Perform the swap\n        {\n            _checkRecipient(address(pair), recipient, buyToken);\n            (uint256 buyAmount0, uint256 buyAmount1) = zeroForOne ? (uint256(0), buyAmount) : (buyAmount, uint256(0));\n            pair.swap(buyAmount0, buyAmount1, recipient, new bytes(0));\n        }\n    }\n}\n\n// src/core/Basic.sol\n\nabstract contract Basic is SettlerAbstract {\n    using UnsafeMath for uint256;\n    using SafeTransferLib for IERC20;\n    using Revert for bool;\n\n    /// @dev Sell to a pool with a generic approval, transferFrom interaction.\n    /// offset in the calldata is used to update the sellAmount given a proportion of the sellToken balance\n    function basicSellToPool(IERC20 sellToken, uint256 ppm, address pool, uint256 offset, bytes memory data) internal {\n        if (_isRestrictedTarget(pool)) {\n            revertConfusedDeputy();\n        }\n\n        bool success;\n        bytes memory returnData;\n        uint256 value;\n        if (address(sellToken) == ETH_ADDRESS) {\n            unchecked {\n                value = (address(this).balance * ppm).unsafeDiv(BASIS);\n            }\n            if (data.length == 0) {\n                if (offset != 0) revert InvalidOffset();\n                (success, returnData) = payable(pool).call{value: value}(\"\");\n                success.maybeRevert(returnData);\n                return;\n            } else {\n                if ((offset += 32) > data.length) {\n                    Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n                }\n                assembly (\"memory-safe\") {\n                    mstore(add(data, offset), value)\n                }\n            }\n        } else if (address(sellToken) == address(0)) {\n            // TODO: check for zero `ppm`\n            if (offset != 0) revert InvalidOffset();\n        } else {\n            // We treat `ppm > Constants.BASIS` as a GIGO error\n            uint256 amount = tmp().omul(sellToken.fastSpendableBalance(), ppm).unsafeDiv(BASIS);\n\n            if ((offset += 32) > data.length) {\n                Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n            }\n            assembly (\"memory-safe\") {\n                mstore(add(data, offset), amount)\n            }\n            if (address(sellToken) != pool) {\n                sellToken.safeApproveIfBelow(pool, amount);\n            }\n        }\n        (success, returnData) = payable(pool).call{value: value}(data);\n        success.maybeRevert(returnData);\n        // forbid sending data to EOAs\n        if (returnData.length == 0 && pool.code.length == 0) revert InvalidTarget();\n    }\n}\n\n// src/core/Bebop.sol\n\ninterface IBebopSettlement {\n    event BebopOrder(uint128 indexed eventId);\n\n    /// @notice Struct for one-to-one trade with one maker\n    struct Single {\n        uint256 expiry;\n        address taker_address;\n        address maker_address;\n        uint256 maker_nonce;\n        IERC20 taker_token;\n        IERC20 maker_token;\n        uint256 taker_amount;\n        uint256 maker_amount;\n        address payable receiver;\n        uint256 packed_commands;\n        uint256 flags; // `hashSingleOrder` doesn't use this field for SingleOrder hash\n    }\n\n    /// @notice Taker execution of one-to-one trade with one maker\n    /// @param order Single order struct\n    /// @param makerSignature Maker's signature for SingleOrder\n    /// @param filledTakerAmount Partially filled taker amount, 0 for full fill\n    function swapSingle(\n        Single calldata order,\n        ISettlerActions.BebopMakerSignature calldata makerSignature,\n        uint256 filledTakerAmount\n    ) external payable;\n}\n\nlibrary FastBebop {\n    function fastSwapSingle(\n        IBebopSettlement bebop,\n        address payable recipient,\n        address taker,\n        IERC20 sellToken,\n        ISettlerActions.BebopOrder memory order,\n        ISettlerActions.BebopMakerSignature memory makerSignature,\n        uint256 filledTakerAmount\n    ) internal {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x4dcebcba)                                                             // IBebopSettlement.swapSingle.selector\n            mstore(add(0x20, ptr), mload(order))                                                // expiry\n            mstore(add(0x40, ptr), address())                                                   // taker_address\n            mcopy(add(0x60, ptr), add(0x20, order), 0x40)                                       // maker_address; maker_nonce\n            mstore(add(0xa0, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, sellToken))  // taker_token\n            mcopy(add(0xc0, ptr), add(0x60, order), 0x60)                                       // maker_token, taker_amount, maker_amount\n            mstore(add(0x120, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, recipient)) // receiver\n\n            let event_id_and_flags := mload(add(0xc0, order))\n            mstore(add(0x140, ptr), or(shl(0x60, taker), shr(0xf8, event_id_and_flags)))        // packed_commands\n            mstore(add(0x160, ptr), shl(0x80, event_id_and_flags))                              // flags\n\n            mstore(add(0x180, ptr), 0x1a0)                                                      // makerSignature.offset\n            mstore(add(0x1a0, ptr), filledTakerAmount)\n            mstore(add(0x1c0, ptr), 0x40)                                                       // makerSignature.signatureBytes.offset\n            mstore(add(0x1e0, ptr), mload(add(0x20, makerSignature)))                           // makerSignature.flags\n\n            let makerSignatureBytes := mload(makerSignature)\n            let makerSignatureBytesLength := mload(makerSignatureBytes)\n            mcopy(add(0x200, ptr), makerSignatureBytes, add(0x20, makerSignatureBytesLength))\n\n            if iszero(call(gas(), bebop, 0x00, add(0x1c, ptr), add(0x204, makerSignatureBytesLength), 0x00, 0x00)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n        }\n    }\n}\n\nabstract contract Bebop is SettlerSwapAbstract {\n    using FastLogic for bool;\n    using SafeTransferLib for IERC20;\n    using Ternary for bool;\n    using UnsafeMath for uint256;\n    using FastBebop for IBebopSettlement;\n\n    IBebopSettlement internal constant _BEBOP = IBebopSettlement(0xbbbbbBB520d69a9775E85b458C58c648259FAD5F);\n\n    constructor() {\n        assert(address(_BEBOP).code.length > 0 || block.chainid == 31337);\n    }\n\n    function _isRestrictedTarget(address target) internal view virtual override returns (bool) {\n        return (target == address(_BEBOP)).or(super._isRestrictedTarget(target));\n    }\n\n    function _logBebopOrder(uint128 eventId, uint128 makerFilledAmount) private {\n        assembly (\"memory-safe\") {\n            mstore(0x10, makerFilledAmount)\n            mstore(0x00, and(0xffffffffffffffffffffffffffffffff, eventId))\n            log0(0x00, 0x30)\n        }\n    }\n\n    function sellToBebop(\n        address payable recipient,\n        IERC20 sellToken,\n        ISettlerActions.BebopOrder memory order,\n        ISettlerActions.BebopMakerSignature memory makerSignature,\n        uint256 amountOutMin\n    ) internal returns (uint256 makerFilledAmount) {\n        _checkRecipient(order.maker_address, recipient, IERC20(order.maker_token));\n        uint256 takerFilledAmount = sellToken.fastBalanceOf(address(this));\n        {\n            uint256 maxTakerAmount = order.taker_amount;\n            takerFilledAmount = (takerFilledAmount > maxTakerAmount).ternary(maxTakerAmount, takerFilledAmount);\n            unchecked {\n                makerFilledAmount = (order.maker_amount * takerFilledAmount).unsafeDiv(maxTakerAmount);\n            }\n        }\n        if (makerFilledAmount < amountOutMin) {\n            revertTooMuchSlippage(IERC20(order.maker_token), amountOutMin, makerFilledAmount);\n        }\n\n        sellToken.safeApproveIfBelow(address(_BEBOP), takerFilledAmount);\n        _BEBOP.fastSwapSingle(recipient, _msgSender(), sellToken, order, makerSignature, takerFilledAmount);\n\n        _logBebopOrder(uint128(order.event_id_and_flags), uint128(makerFilledAmount));\n    }\n}\n\n// src/core/DodoV2.sol\n\ninterface IDodoV2 {\n    function sellBase(address to) external returns (uint256 receiveQuoteAmount);\n    function sellQuote(address to) external returns (uint256 receiveBaseAmount);\n\n    function _BASE_TOKEN_() external view returns (IERC20);\n    function _QUOTE_TOKEN_() external view returns (IERC20);\n}\n\nlibrary FastDodoV2 {\n    using Ternary for bool;\n\n    function _callAddressReturnUint(IDodoV2 dodo, uint256 sig, address addr) private returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            mstore(0x14, addr)\n            mstore(0x00, shl(0x60, sig))\n            if iszero(call(gas(), dodo, 0x00, 0x10, 0x24, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if iszero(gt(returndatasize(), 0x1f)) { revert(0x00, 0x00) }\n\n            r := mload(0x00)\n        }\n    }\n\n    function fastToken(IDodoV2 dodo, bool isBase) internal view returns (IERC20) {\n        return fastGetToken(\n            address(dodo), isBase.ternary(uint32(dodo._BASE_TOKEN_.selector), uint32(dodo._QUOTE_TOKEN_.selector))\n        );\n    }\n\n    function fastSell(IDodoV2 dodo, bool isBase, address to) internal returns (uint256 receiveQuoteAmount) {\n        return _callAddressReturnUint(\n            dodo, isBase.ternary(uint32(dodo.sellBase.selector), uint32(dodo.sellQuote.selector)), to\n        );\n    }\n}\n\nabstract contract DodoV2 is SettlerSwapAbstract {\n    using UnsafeMath for uint256;\n    using SafeTransferLib for IERC20;\n    using FastDodoV2 for IDodoV2;\n\n    function sellToDodoV2(\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        IDodoV2 dodo,\n        bool quoteForBase,\n        uint256 minBuyAmount\n    ) internal returns (uint256 buyAmount) {\n        if (ppm != 0) {\n            uint256 sellAmount;\n            unchecked {\n                sellAmount = (sellToken.fastSpendableBalance() * ppm).unsafeDiv(BASIS);\n            }\n            _checkRecipient(address(this), address(dodo), sellToken);\n            sellToken.safeTransfer(address(dodo), sellAmount);\n        }\n        _checkRecipient(\n            address(dodo), recipient, _recipientCheckNeedsToken() ? dodo.fastToken(quoteForBase) : IERC20(address(0))\n        );\n        buyAmount = dodo.fastSell(!quoteForBase, recipient);\n        if (buyAmount < minBuyAmount) {\n            revertTooMuchSlippage(dodo.fastToken(quoteForBase), minBuyAmount, buyAmount);\n        }\n    }\n}\n\n// src/core/EkuboV2.sol\n\ntype Config_0 is bytes32;\n\ntype SqrtRatio_0 is uint96;\n\n// Each pool has its own state associated with this key\nstruct PoolKey_0 {\n    address token0;\n    address token1;\n    Config_0 config;\n}\n\ninterface IEkuboCore_0 {\n    // The entrypoint for all operations on the core contract\n    function lock() external;\n\n    // Swap tokens\n    function swap_611415377(\n        PoolKey_0 memory poolKey,\n        int128 amount,\n        bool isToken1,\n        SqrtRatio_0 sqrtRatioLimit,\n        uint256 skipAhead\n    ) external payable returns (int128 delta0, int128 delta1);\n\n    function forward(address to) external;\n\n    // Pay for swapped tokens\n    function pay(address token) external returns (uint128 payment);\n\n    // Get swapped tokens\n    function withdraw(address token, address recipient, uint128 amount) external;\n}\n\nIEkuboCore_0 constant CORE_0 = IEkuboCore_0(0xe0e0e08A6A4b9Dc7bD67BCB7aadE5cF48157d444);\n\n/// @notice Interface for the callback executed when an address locks core\ninterface IEkuboCallbacks_0 {\n    /// @notice Called by Core on `msg.sender` when a lock is acquired\n    /// @param id The id assigned to the action\n    /// @return Any data that you want to be returned from the lock call\n    function locked(uint256 id) external returns (bytes memory);\n\n    /// @notice Called by Core on `msg.sender` to collect assets\n    /// @param id The id assigned to the action\n    /// @param token The token to pay on\n    function payCallback(uint256 id, address token) external;\n}\n\nlibrary UnsafeEkuboCore_0 {\n    /// The `amountSpecified` as well as both `delta`'s are `int256` for contract size savings. If\n    /// `amountSpecified` is not a clean, signed, 128-bit value, the call will revert inside the ABI\n    /// decoding in `CORE`. The `delta`'s are guaranteed clean by the returndata encoding of `CORE`,\n    /// but we keep them as `int256` so as not to duplicate any work.\n    ///\n    /// The `skipAhead` argument of the underlying `swap` function is hardcoded to zero.\n    function unsafeSwap(IEkuboCore_0 core, PoolKey_0 memory poolKey, int256 amount, bool isToken1, SqrtRatio_0 sqrtRatioLimit)\n        internal\n        returns (int256 delta0, int256 delta1)\n    {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n\n            mstore(ptr, 0x00000000) // selector for `swap_611415377((address,address,bytes32),int128,bool,uint96,uint256)`\n            let poolKeyPtr := add(0x20, ptr)\n            mcopy(poolKeyPtr, poolKey, 0x60)\n            // ABI decoding in Ekubo will check if amount fits in int128\n            mstore(add(0x80, ptr), amount)\n            mstore(add(0xa0, ptr), lt(0x00, isToken1))\n            mstore(add(0xc0, ptr), and(0xffffffffffffffffffffffff, sqrtRatioLimit))\n            mstore(add(0xe0, ptr), 0x00)\n\n            if iszero(call(gas(), core, 0x00, add(0x1c, ptr), 0xe4, 0x00, 0x40)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            // Ekubo CORE returns data properly no need to mask\n            delta0 := mload(0x00)\n            delta1 := mload(0x20)\n        }\n    }\n\n    function unsafeForward(\n        IEkuboCore_0 core,\n        PoolKey_0 memory poolKey,\n        int256 amount,\n        bool isToken1,\n        SqrtRatio_0 sqrtRatioLimit\n    ) internal returns (int256 delta0, int256 delta1) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n\n            mstore(ptr, 0x101e8952000000000000000000000000) // selector for `forward(address)` with `to`'s padding\n            mcopy(add(0x20, ptr), add(0x40, poolKey), 0x14) // copy the `extension` from `poolKey.config` as the `to` argument\n\n            let poolKeyPtr := add(0x34, ptr)\n            mcopy(poolKeyPtr, poolKey, 0x60)\n            mstore(add(0x94, ptr), amount)\n            mstore(add(0xb4, ptr), lt(0x00, isToken1))\n            mstore(add(0xd4, ptr), and(0xffffffffffffffffffffffff, sqrtRatioLimit))\n            mstore(add(0xf4, ptr), 0x00)\n\n            if iszero(call(gas(), core, 0x00, add(0x10, ptr), 0x104, 0x00, 0x40)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            delta0 := mload(0x00)\n            delta1 := mload(0x20)\n            if or(\n                or(gt(0x40, returndatasize()), xor(signextend(0x0f, amount), amount)),\n                or(xor(signextend(0x0f, delta0), delta0), xor(signextend(0x0f, delta1), delta1))\n            ) { revert(0x00, 0x00) }\n        }\n    }\n}\n\nabstract contract EkuboV2 is SettlerSwapAbstract {\n    using UnsafeMath for uint256;\n    using UnsafeMath for int256;\n    using CreditDebt for int256;\n    using FastLogic for bool;\n    using Ternary for bool;\n    using SafeTransferLib for IERC20;\n    using NotesLib for NotesLib.Note[];\n    using UnsafeEkuboCore_0 for IEkuboCore_0;\n\n    //// How to generate `fills` for Ekubo\n    ////\n    //// Linearize your DAG of fills by doing a topological sort on the tokens involved. In the\n    //// topological sort of tokens, when there is a choice of the next token, break ties by\n    //// preferring a token if it is the lexicographically largest token that is bought among fills\n    //// with sell token equal to the previous token in the topological sort. Then sort the fills\n    //// belonging to each sell token by their buy token. This technique isn't *quite* optimal, but\n    //// it's pretty close. The buy token of the final fill is special-cased. It is the token that\n    //// will be transferred to `recipient` and have its slippage checked against `amountOutMin`. In\n    //// the event that you are encoding a series of fills with more than one output token, ensure\n    //// that at least one of the global buy token's fills is positioned appropriately.\n    ////\n    //// Take care to note that while Ekubo represents the native asset of the chain as\n    //// the address of all zeroes, Settler represents this as the address of all `e`s. You must use\n    //// Settler's representation. The conversion is performed by Settler before making calls to Ekubo\n    ////\n    //// Now that you have a list of fills, encode each fill as follows.\n    //// First encode the `ppm` for the fill as 3 bytes. Remember that this `ppm` is relative to the\n    //// running balance at the moment that the fill is settled. If the uppermost bit of `ppm` is\n    //// set, then the swap is treated as a swap through an extension that requires forwarding. Only\n    //// the lower 23 bits of `ppm` are used for the amount calculation.\n    //// Second, encode the price caps sqrtRatio as 12 bytes.\n    //// Third, encode the packing key for that fill as 1 byte. The packing key byte depends on the\n    //// tokens involved in the previous fill. The packing key for the first fill must be 1;\n    //// i.e. encode only the buy token for the first fill.\n    ////   0 -> sell and buy tokens remain unchanged from the previous fill (pure multiplex)\n    ////   1 -> sell token remains unchanged from the previous fill, buy token is encoded (diamond multiplex)\n    ////   2 -> sell token becomes the buy token from the previous fill, new buy token is encoded (multihop)\n    ////   3 -> both sell and buy token are encoded\n    //// Obviously, after encoding the packing key, you encode 0, 1, or 2 tokens (each as 20 bytes),\n    //// as appropriate.\n    //// The remaining fields of the fill are mandatory.\n    //// Fourth, encode the config of the pool as 32 bytes. It contains pool parameters which are\n    //// 20 bytes extension address, 8 bytes fee, and 4 bytes tickSpacing.\n    ////\n    //// Repeat the process for each fill and concatenate the results without padding.\n\n    function sellToEkuboV2(\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encode(\n            uint32(IEkuboCore_0.lock.selector),\n            recipient,\n            sellToken,\n            ppm,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            amountOutMin,\n            0\n        );\n        bytes memory encodedBuyAmount =\n            _setOperatorAndCall(address(CORE_0), data, uint32(IEkuboCallbacks_0.locked.selector), _ekuboLockCallbackV2);\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `locked` and that `locked` encoded the buy amount\n            // correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function _ekuboLockCallbackV2(bytes calldata data) private returns (bytes memory) {\n        // We know that our calldata is well-formed. Therefore, the first slot is ekubo lock id,\n        // second slot is 0x20 and third is the length of the strict ABIEncoded payload\n        assembly (\"memory-safe\") {\n            data.length := calldataload(add(0x40, data.offset))\n            data.offset := add(0x60, data.offset)\n        }\n        return locked(data);\n    }\n\n    function _ekuboPayV2(IERC20 sellToken, uint256 sellAmount) private returns (uint256 payment) {\n        if (isNative_1(sellToken)) {\n            SafeTransferLib.safeTransferETH(payable(msg.sender), sellAmount);\n            return sellAmount;\n        } else {\n            // Encode the call plus the extra data that is going to be needed in the callback\n            bytes memory data;\n            assembly (\"memory-safe\") {\n                data := mload(0x40)\n\n                mstore(add(0x44, data), sellAmount)\n                mstore(add(0x24, data), sellToken)\n                mstore(add(0x10, data), 0x0c11dedd000000000000000000000000) // selector for pay(address) with padding for token\n\n                // update data length\n                mstore(data, 0x44)\n\n                // update free memory pointer\n                mstore(0x40, add(0x64, data))\n            }\n            bytes memory encodedPayedAmount =\n                _setOperatorAndCall(msg.sender, data, uint32(IEkuboCallbacks_0.payCallback.selector), payCallback);\n            assembly (\"memory-safe\") {\n                // We can skip all the checks performed by `abi.decode` because we know that `CORE`\n                // is well-behaved and that `CORE`'s `pay` encoded the payment correctly.\n                payment := mload(add(0x20, encodedPayedAmount))\n            }\n        }\n    }\n\n    // the mandatory fields are\n    // 3 - sell ppm\n    // 12 - sqrtRatio\n    // 1 - pool key tokens case\n    // 32 - config (20 extension, 8 fee, 4 tickSpacing)\n    uint256 private constant _HOP_DATA_LENGTH = 48;\n\n    function locked(bytes calldata data) private returns (bytes memory) {\n        address recipient;\n        uint256 minBuyAmount;\n        uint256 hashMul;\n        uint256 hashMod;\n        bool feeOnTransfer;\n        address payer;\n        (data, recipient, minBuyAmount, hashMul, hashMod, feeOnTransfer, payer) = Decoder.decodeHeader(data);\n        require(payer == address(this)); // there is no VIP action\n\n        // Set up `state` and `notes`. The other values are ancillary and might be used when we need\n        // to settle global sell token debt at the end of swapping.\n        (bytes calldata newData, State state, NotesLib.Note[] memory notes,,,) =\n            Decoder.initialize(data, hashMul, hashMod, address(this));\n        {\n            NotePtr globalSell = state.globalSell();\n            if (feeOnTransfer) {\n                globalSell.setAmount(_ekuboPayV2(globalSell.token(), globalSell.amount()));\n            }\n            if (globalSell.amount() >> 127 != 0) {\n                Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n            }\n            state.setGlobalSellAmount(globalSell.amount());\n        }\n        state.checkZeroSellAmount();\n        data = newData;\n\n        PoolKey_0 memory poolKey;\n\n        while (data.length >= _HOP_DATA_LENGTH) {\n            uint256 ppm;\n            SqrtRatio_0 sqrtRatio;\n            assembly (\"memory-safe\") {\n                ppm := shr(0xe8, calldataload(data.offset))\n                data.offset := add(0x03, data.offset)\n\n                sqrtRatio := shr(0xa0, calldataload(data.offset))\n                data.offset := add(0x0c, data.offset)\n\n                data.length := sub(data.length, 0x0f)\n                // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n            }\n\n            data = Decoder.updateState(state, notes, data);\n            // It's not possible for `state.sell.amount` to even *approach* overflowing an `int256`,\n            // given that deltas are `int128`. If it overflows an `int128`, the ABI decoding in\n            // `CORE` will throw.\n            int256 amountSpecified;\n            unchecked {\n                amountSpecified = int256((state.sell().amount() * (ppm & 0x7fffff)).unsafeDiv(BASIS));\n            }\n\n            bool isToken1; // opposite of regular zeroForOne\n            {\n                (IERC20 sellToken, IERC20 buyToken) = (state.sell().token(), state.buy().token());\n                assembly (\"memory-safe\") {\n                    let sellTokenShifted := shl(0x60, sellToken)\n                    let buyTokenShifted := shl(0x60, buyToken)\n                    isToken1 := or(\n                        eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, buyTokenShifted),\n                        and(\n                            iszero(\n                                eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, sellTokenShifted)\n                            ),\n                            lt(buyTokenShifted, sellTokenShifted)\n                        )\n                    )\n                }\n                (poolKey.token0, poolKey.token1) = isToken1.maybeSwap(address(sellToken), address(buyToken));\n                assembly (\"memory-safe\") {\n                    let token0 := mload(poolKey)\n                    // set poolKey to address(0) if it is the native token\n                    mstore(poolKey, mul(token0, iszero(eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, token0))))\n                }\n                // poolKey.token0 is not represented according to ERC-7528 to match the format expected by Ekubo\n            }\n\n            {\n                bytes32 config;\n                assembly (\"memory-safe\") {\n                    config := calldataload(data.offset)\n                    data.offset := add(0x20, data.offset)\n                    data.length := sub(data.length, 0x20)\n                    // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n                }\n                poolKey.config = Config_0.wrap(config);\n            }\n\n            Decoder.overflowCheck(data);\n\n            {\n                int256 delta0;\n                int256 delta1;\n                if (ppm & 0x800000 == 0) {\n                    (delta0, delta1) = IEkuboCore_0(msg.sender).unsafeSwap(poolKey, amountSpecified, isToken1, sqrtRatio);\n                } else {\n                    (delta0, delta1) =\n                        IEkuboCore_0(msg.sender).unsafeForward(poolKey, amountSpecified, isToken1, sqrtRatio);\n                }\n\n                // Ekubo's sign convention here is backwards compared to UniV4/BalV3/PancakeInfinity\n                // `settledSellAmount` is positive, `settledBuyAmount` is negative. So the use of\n                // `asCredit` and `asDebt` below is misleading as they are actually debt and credit,\n                // respectively, in this context.\n                (int256 settledSellAmount, int256 settledBuyAmount) = isToken1.maybeSwap(delta0, delta1);\n\n                // We have to check for underflow in the sell amount (could create more debt than\n                // we're able to pay)\n                unchecked {\n                    NotePtr sell = state.sell();\n                    uint256 sellAmountActual = settledSellAmount.asCredit(sell);\n                    uint256 sellCreditBefore = sell.amount();\n                    sell.setAmount(sellCreditBefore - sellAmountActual);\n                    if ((sellAmountActual > uint256(amountSpecified)).or(sellAmountActual > sellCreditBefore)) {\n                        Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n                    }\n                }\n\n                // We *DON'T* have to check for overflow in the buy amount because adding an\n                // `int128` to a `uint256`, even repeatedly cannot practically overflow.\n                unchecked {\n                    NotePtr buy = state.buy();\n                    buy.setAmount(buy.amount() + settledBuyAmount.asDebt(buy));\n                }\n            }\n        }\n\n        // `data` has been consumed. All that remains is to settle out the net result of all the\n        // swaps. Any credit in any token other than `state.buy.token` will be swept to\n        // Settler. `state.buy.token` will be sent to `recipient`.\n        {\n            NotePtr globalSell = state.globalSell();\n            (IERC20 globalSellToken, uint256 globalSellAmount) = (globalSell.token(), globalSell.amount());\n            _checkRecipient(\n                msg.sender, recipient, _recipientCheckNeedsToken() ? state.buy().token() : IERC20(address(0))\n            );\n            uint256 globalBuyAmount =\n                Take.take(state, notes, uint32(IEkuboCore_0.withdraw.selector), recipient, minBuyAmount);\n            if (feeOnTransfer) {\n                // We've already transferred the sell token to the vault and\n                // `settle`'d. `globalSellAmount` is the verbatim credit in that token stored by the\n                // vault. We only need to handle the case of incomplete filling.\n                if (globalSellAmount != 0) {\n                    Take._callSelector(\n                        uint32(IEkuboCore_0.withdraw.selector),\n                        globalSellToken,\n                        address(this), // there is no VIP action\n                        globalSellAmount\n                    );\n                }\n            } else {\n                // While `notes` records a credit value, the vault actually records a debt for the\n                // global sell token. We recover the exact amount of that debt and then pay it.\n                // `globalSellAmount` is _usually_ zero, but if it isn't it represents a partial\n                // fill. This subtraction recovers the actual debt recorded in the vault.\n                uint256 debt;\n                unchecked {\n                    debt = state.globalSellAmount() - globalSellAmount;\n                }\n                if (debt == 0) {\n                    assembly (\"memory-safe\") {\n                        mstore(0x14, globalSellToken)\n                        mstore(0x00, 0xfb772a88000000000000000000000000) // selector for `ZeroSellAmount(address)` with `globalSellToken`'s padding\n                        revert(0x10, 0x24)\n                    }\n                }\n                _ekuboPayV2(globalSellToken, debt);\n            }\n\n            // return abi.encode(globalBuyAmount);\n            bytes memory returndata;\n            assembly (\"memory-safe\") {\n                returndata := mload(0x40)\n                mstore(returndata, 0x60)\n                mstore(add(0x20, returndata), 0x20)\n                mstore(add(0x40, returndata), 0x20)\n                mstore(add(0x60, returndata), globalBuyAmount)\n                mstore(0x40, add(0x80, returndata))\n            }\n            return returndata;\n        }\n    }\n\n    function payCallback(bytes calldata data) private returns (bytes memory) {\n        IERC20 sellToken;\n        uint256 sellAmount;\n\n        assembly (\"memory-safe\") {\n            // first 2 slots in calldata are id and token\n            // id is not being used so can be skipped\n            sellToken := calldataload(add(0x20, data.offset))\n            // then extra data added in _ekuboPayV2\n            sellAmount := calldataload(add(0x40, data.offset))\n        }\n        _checkRecipient(address(this), msg.sender, sellToken);\n        sellToken.safeTransfer(msg.sender, sellAmount);\n\n        return new bytes(0);\n    }\n}\n\n// src/core/EkuboV3.sol\n\ntype Config_1 is bytes32;\n\ntype SqrtRatio_1 is uint96;\n\n// Each pool has its own state associated with this key\nstruct PoolKey_1 {\n    address token0;\n    address token1;\n    Config_1 config;\n}\n\ninterface IEkuboCore_1 {\n    // The entrypoint for all operations on the core contract\n    function lock() external;\n\n    // Swap tokens\n    function swap_6269342730() external payable;\n\n    function forward(address to) external;\n\n    function startPayments() external;\n\n    function completePayments() external;\n\n    // Get swapped tokens\n    function withdraw() external;\n}\n\nIEkuboCore_1 constant CORE_1 = IEkuboCore_1(0x00000000000014aA86C5d3c41765bb24e11bd701);\n\n/// @notice Interface for the callback executed when an address locks core\ninterface IEkuboCallbacks_1 {\n    /// @notice Called by Core on `msg.sender` when a lock is acquired\n    /// @param id The id assigned to the action\n    /// @return Any data that you want to be returned from the lock call\n    function locked_6416899205(uint256 id) external returns (bytes memory);\n}\n\nlibrary UnsafeEkuboCore_1 {\n    /// The `amount` as well as both `delta`'s are `int256` for contract size savings.  The\n    /// `delta`'s are guaranteed clean by the returndata encoding of `CORE`, but we keep them as\n    /// `int256` so as not to duplicate any work. If `amount` overflows a `int128`, we will throw.\n    ///\n    /// The `skipAhead` argument of the underlying `swap` function is hardcoded to zero.\n    function unsafeSwap(IEkuboCore_1 core, PoolKey_1 memory poolKey, int256 amount, bool isToken1, SqrtRatio_1 sqrtRatioLimit)\n        internal\n        returns (int256 delta0, int256 delta1)\n    {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n\n            // Compact params (uint96 sqrtRatioLimit, int128 amount, bool isToken1, uint32 skipAhead)\n            // skipAhead is encoded as 31 bits\n            // mstore(add(0x80, ptr), 0x00) // skipAhead harcoded to zero\n            mstore(add(0x80, ptr), shl(0x1f, lt(0x00, isToken1))) // sets skipAhead to zero\n            mstore(add(0x7c, ptr), amount)\n            mstore(add(0x6c, ptr), sqrtRatioLimit)\n            mcopy(add(0x20, ptr), poolKey, 0x60)\n            mstore(ptr, 0x00000000) // selector for `swap_6269342730()`\n\n            if iszero(call(gas(), core, 0x00, add(0x1c, ptr), 0x84, 0x00, 0x20)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            let poolBalanceUpdate := mload(0x00)\n            delta1 := signextend(0x0f, poolBalanceUpdate)\n            delta0 := sar(0x80, poolBalanceUpdate)\n            // let poolState := mload(0x20) // unused\n            // Ekubo is well behaved no need to check returndatasize\n            // if gt(0x40, returndatasize()) { revert(0x00, 0x00) }\n            if or(xor(signextend(0x0f, amount), amount), shr(0x60, sqrtRatioLimit)) {\n                revert(0x00, 0x00)\n            }\n        }\n    }\n\n    function unsafeForward(\n        IEkuboCore_1 core,\n        PoolKey_1 memory poolKey,\n        int256 amount,\n        bool isToken1,\n        SqrtRatio_1 sqrtRatioLimit\n    ) internal returns (int256 delta0, int256 delta1) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n\n            /// Compact params (uint96 sqrtRatioLimit, int128 amount, bool isToken1, uint32 skipAhead)\n            // skipAhead is encoded as 31 bits\n            // mstore(add(0x94, ptr), 0x00) // skipAhead harcoded to zero\n            mstore(add(0x94, ptr), shl(0x1f, lt(0x00, isToken1))) // sets skipAhead to zero\n            mstore(add(0x90, ptr), amount)\n            mstore(add(0x80, ptr), sqrtRatioLimit)\n            mcopy(add(0x34, ptr), poolKey, 0x60)\n            mcopy(add(0x20, ptr), add(0x40, poolKey), 0x14) // copy the `extension` from `poolKey.config` as the `to` argument\n            mstore(ptr, 0x101e8952000000000000000000000000) // selector for `forward(address)` with `to`'s padding\n\n            if iszero(call(gas(), core, 0x00, add(0x10, ptr), 0xa4, 0x00, 0x20)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            let poolBalanceUpdate := mload(0x00)\n            delta1 := signextend(0x0f, poolBalanceUpdate)\n            delta0 := sar(0x80, poolBalanceUpdate)\n            // `forward` function returned data depends on the extension implementation\n            // supported extensions are supposed to return same data as `swap_6269342730`\n            // which is (bytes32 balanceUpdate, bytes32 stateAfter), 0x40 bytes long\n            if or(or(gt(0x40, returndatasize()), xor(signextend(0x0f, amount), amount)), shr(0x60, sqrtRatioLimit)) {\n                revert(0x00, 0x00)\n            }\n        }\n    }\n\n    function unsafeStartPayments(IEkuboCore_1 core, IERC20 sellToken) internal {\n        assembly (\"memory-safe\") {\n            mstore(0x14, sellToken)\n            mstore(0x00, 0xf9b6a796000000000000000000000000) // selector for `startPayments()` with `sellToken`'s padding\n            if iszero(call(gas(), core, 0x00, 0x10, 0x24, 0x00, 0x00)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            // Ekubo is well behaved no need to check returndatasize\n            // if gt(0x20, returndatasize()) { revert(0x00, 0x00) }\n            // Ekubo returns its own balance of the token\n            // but the value is unused\n        }\n    }\n\n    function unsafeCompletePayments(IEkuboCore_1 core, IERC20 sellToken) internal returns (uint256 payment) {\n        assembly (\"memory-safe\") {\n            mstore(0x14, sellToken)\n            mstore(0x00, 0x12e103f1000000000000000000000000) // selector for `completePayments()` with `sellToken`'s padding\n            if iszero(call(gas(), core, 0x00, 0x10, 0x24, 0x00, 0x10)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            // Ekubo is well behaved no need to check returndatasize\n            // if gt(0x10, returndatasize()) { revert(0x00, 0x00) }\n            payment := shr(0x80, mload(0x00))\n        }\n    }\n}\n\nabstract contract EkuboV3 is SettlerSwapAbstract {\n    using UnsafeMath for uint256;\n    using UnsafeMath for int256;\n    using CreditDebt for int256;\n    using FastLogic for bool;\n    using Ternary for bool;\n    using SafeTransferLib for IERC20;\n    using NotesLib for NotesLib.Note[];\n    using UnsafeEkuboCore_1 for IEkuboCore_1;\n\n    //// How to generate `fills` for Ekubo\n    ////\n    //// Linearize your DAG of fills by doing a topological sort on the tokens involved. In the\n    //// topological sort of tokens, when there is a choice of the next token, break ties by\n    //// preferring a token if it is the lexicographically largest token that is bought among fills\n    //// with sell token equal to the previous token in the topological sort. Then sort the fills\n    //// belonging to each sell token by their buy token. This technique isn't *quite* optimal, but\n    //// it's pretty close. The buy token of the final fill is special-cased. It is the token that\n    //// will be transferred to `recipient` and have its slippage checked against `amountOutMin`. In\n    //// the event that you are encoding a series of fills with more than one output token, ensure\n    //// that at least one of the global buy token's fills is positioned appropriately.\n    ////\n    //// Take care to note that while Ekubo represents the native asset of the chain as\n    //// the address of all zeroes, Settler represents this as the address of all `e`s. You must use\n    //// Settler's representation. The conversion is performed by Settler before making calls to Ekubo\n    ////\n    //// Now that you have a list of fills, encode each fill as follows.\n    //// First encode the `ppm` for the fill as 3 bytes. Remember that this `ppm` is relative to the\n    //// running balance at the moment that the fill is settled. If the uppermost bit of `ppm` is\n    //// set, then the swap is treated as a swap through an extension that requires forwarding. Only\n    //// the lower 23 bits of `ppm` are used for the amount calculation.\n    //// Second, encode the price caps sqrtRatio as 12 bytes.\n    //// Third, encode the packing key for that fill as 1 byte. The packing key byte depends on the\n    //// tokens involved in the previous fill. The packing key for the first fill must be 1;\n    //// i.e. encode only the buy token for the first fill.\n    ////   0 -> sell and buy tokens remain unchanged from the previous fill (pure multiplex)\n    ////   1 -> sell token remains unchanged from the previous fill, buy token is encoded (diamond multiplex)\n    ////   2 -> sell token becomes the buy token from the previous fill, new buy token is encoded (multihop)\n    ////   3 -> both sell and buy token are encoded\n    //// Obviously, after encoding the packing key, you encode 0, 1, or 2 tokens (each as 20 bytes),\n    //// as appropriate.\n    //// The remaining fields of the fill are mandatory.\n    //// Fourth, encode the config of the pool as 32 bytes. Should be done as described in Ekubo implementation\n    //// https://github.com/EkuboProtocol/evm-contracts/blob/81c2c2642afe321e7f5d7de70f8b3be18f6f80b3/src/types/poolConfig.sol#L6-#L12\n    ////\n    //// Repeat the process for each fill and concatenate the results without padding.\n\n    function sellToEkuboV3(\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encode(\n            uint32(IEkuboCore_1.lock.selector),\n            recipient,\n            sellToken,\n            ppm,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            amountOutMin,\n            0\n        );\n        bytes memory encodedBuyAmount = _setOperatorAndCall(\n            address(CORE_1), data, uint32(IEkuboCallbacks_1.locked_6416899205.selector), _ekuboLockCallbackV3\n        );\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `locked_6416899205` and that `locked_6416899205` encoded the buy amount\n            // correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function sellToEkuboV3VIP(\n        address recipient,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encodeVIP(\n            uint32(IEkuboCore_1.lock.selector),\n            recipient,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            permit,\n            sig,\n            _isForwarded(),\n            amountOutMin,\n            0\n        );\n        bytes memory encodedBuyAmount = _setOperatorAndCall(\n            address(CORE_1), data, uint32(IEkuboCallbacks_1.locked_6416899205.selector), _ekuboLockCallbackV3\n        );\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `locked_6416899205` and that `locked_6416899205` encoded the buy amount\n            // correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function _ekuboLockCallbackV3(bytes calldata data) private returns (bytes memory) {\n        // We know that our calldata is well-formed. Therefore, the first slot is ekubo lock id,\n        // second slot is 0x20 and third is the length of the strict ABIEncoded payload\n        assembly (\"memory-safe\") {\n            data.length := calldataload(add(0x40, data.offset))\n            data.offset := add(0x60, data.offset)\n        }\n        return locked_6416899205(data);\n    }\n\n    function _ekuboPayV3(\n        IERC20 sellToken,\n        address payer,\n        uint256 sellAmount,\n        ISignatureTransfer.PermitTransferFrom calldata permit,\n        bool isForwarded,\n        bytes calldata sig\n    ) private returns (uint256 payment) {\n        if (isNative_1(sellToken)) {\n            SafeTransferLib.safeTransferETH(payable(msg.sender), sellAmount);\n            return sellAmount;\n        } else {\n            // Initiate the payment\n            IEkuboCore_1(msg.sender).unsafeStartPayments(sellToken);\n\n            if (payer == address(this)) {\n                _checkRecipient(address(this), msg.sender, sellToken);\n                sellToken.safeTransfer(msg.sender, sellAmount);\n            } else {\n                ISignatureTransfer.SignatureTransferDetails memory transferDetails =\n                    ISignatureTransfer.SignatureTransferDetails({to: msg.sender, requestedAmount: sellAmount});\n                _transferFrom(permit, transferDetails, sig, isForwarded);\n            }\n\n            payment = IEkuboCore_1(msg.sender).unsafeCompletePayments(sellToken);\n        }\n    }\n\n    // the mandatory fields are\n    // 3 - sell ppm\n    // 12 - sqrtRatio\n    // 1 - pool key tokens case\n    // 32 - config (20 extension, 8 fee, 4 tickSpacing)\n    uint256 private constant _HOP_DATA_LENGTH = 48;\n\n    function locked_6416899205(bytes calldata data) private returns (bytes memory) {\n        address recipient;\n        uint256 minBuyAmount;\n        uint256 hashMul;\n        uint256 hashMod;\n        bool feeOnTransfer;\n        address payer;\n        (data, recipient, minBuyAmount, hashMul, hashMod, feeOnTransfer, payer) = Decoder.decodeHeader(data);\n\n        // Set up `state` and `notes`. The other values are ancillary and might be used when we need\n        // to settle global sell token debt at the end of swapping.\n        (\n            bytes calldata newData,\n            State state,\n            NotesLib.Note[] memory notes,\n            ISignatureTransfer.PermitTransferFrom calldata permit,\n            bool isForwarded,\n            bytes calldata sig\n        ) = Decoder.initialize(data, hashMul, hashMod, payer);\n        {\n            NotePtr globalSell = state.globalSell();\n            if (payer != address(this)) {\n                globalSell.setAmount(\n                    _permitToSellAmountCalldata(\n                        address(0) /* sentinel for `_msgSender()` */,\n                        permit\n                    )\n                );\n            }\n            if (feeOnTransfer) {\n                globalSell.setAmount(\n                    _ekuboPayV3(globalSell.token(), payer, globalSell.amount(), permit, isForwarded, sig)\n                );\n            }\n            if (globalSell.amount() >> 127 != 0) {\n                Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n            }\n            state.setGlobalSellAmount(globalSell.amount());\n        }\n        state.checkZeroSellAmount();\n        data = newData;\n\n        PoolKey_1 memory poolKey;\n\n        while (data.length >= _HOP_DATA_LENGTH) {\n            uint256 ppm;\n            SqrtRatio_1 sqrtRatio;\n            assembly (\"memory-safe\") {\n                ppm := shr(0xe8, calldataload(data.offset))\n                data.offset := add(0x03, data.offset)\n\n                sqrtRatio := shr(0xa0, calldataload(data.offset))\n                data.offset := add(0x0c, data.offset)\n\n                data.length := sub(data.length, 0x0f)\n                // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n            }\n\n            data = Decoder.updateState(state, notes, data);\n            // It's not possible for `state.sell.amount` to even *approach* overflowing an `int256`,\n            // given that deltas are `int128`. If it overflows an `int128`, `unsafeSwap` will throw.\n            int256 amountSpecified;\n            unchecked {\n                amountSpecified = int256((state.sell().amount() * (ppm & 0x7fffff)).unsafeDiv(BASIS));\n            }\n\n            bool isToken1; // opposite of regular zeroForOne\n            {\n                (IERC20 sellToken, IERC20 buyToken) = (state.sell().token(), state.buy().token());\n                assembly (\"memory-safe\") {\n                    let sellTokenShifted := shl(0x60, sellToken)\n                    let buyTokenShifted := shl(0x60, buyToken)\n                    isToken1 := or(\n                        eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, buyTokenShifted),\n                        and(\n                            iszero(\n                                eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, sellTokenShifted)\n                            ),\n                            lt(buyTokenShifted, sellTokenShifted)\n                        )\n                    )\n                }\n                (poolKey.token0, poolKey.token1) = isToken1.maybeSwap(address(sellToken), address(buyToken));\n                assembly (\"memory-safe\") {\n                    let token0 := mload(poolKey)\n                    // set poolKey to address(0) if it is the native token\n                    mstore(poolKey, mul(token0, iszero(eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, token0))))\n                }\n                // poolKey.token0 is not represented according to ERC-7528 to match the format expected by Ekubo\n            }\n\n            {\n                bytes32 config;\n                assembly (\"memory-safe\") {\n                    config := calldataload(data.offset)\n                    data.offset := add(0x20, data.offset)\n                    data.length := sub(data.length, 0x20)\n                    // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n                }\n                poolKey.config = Config_1.wrap(config);\n            }\n\n            Decoder.overflowCheck(data);\n\n            {\n                int256 delta0;\n                int256 delta1;\n                if (ppm & 0x800000 == 0) {\n                    (delta0, delta1) = IEkuboCore_1(msg.sender).unsafeSwap(poolKey, amountSpecified, isToken1, sqrtRatio);\n                } else {\n                    (delta0, delta1) =\n                        IEkuboCore_1(msg.sender).unsafeForward(poolKey, amountSpecified, isToken1, sqrtRatio);\n                }\n\n                // Ekubo's sign convention here is backwards compared to UniV4/BalV3/PancakeInfinity\n                // `settledSellAmount` is positive, `settledBuyAmount` is negative. So the use of\n                // `asCredit` and `asDebt` below is misleading as they are actually debt and credit,\n                // respectively, in this context.\n                (int256 settledSellAmount, int256 settledBuyAmount) = isToken1.maybeSwap(delta0, delta1);\n\n                // We have to check for underflow in the sell amount (could create more debt than\n                // we're able to pay)\n                unchecked {\n                    NotePtr sell = state.sell();\n                    uint256 sellAmountActual = settledSellAmount.asCredit(sell);\n                    uint256 sellCreditBefore = sell.amount();\n                    sell.setAmount(sellCreditBefore - sellAmountActual);\n                    if ((sellAmountActual > uint256(amountSpecified)).or(sellAmountActual > sellCreditBefore)) {\n                        Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n                    }\n                }\n\n                // We *DON'T* have to check for overflow in the buy amount because adding an\n                // `int128` to a `uint256`, even repeatedly cannot practically overflow.\n                unchecked {\n                    NotePtr buy = state.buy();\n                    buy.setAmount(buy.amount() + settledBuyAmount.asDebt(buy));\n                }\n            }\n        }\n\n        // `data` has been consumed. All that remains is to settle out the net result of all the\n        // swaps. Any credit in any token other than `state.buy.token` will be swept to\n        // Settler. `state.buy.token` will be sent to `recipient`.\n        {\n            NotePtr globalSell = state.globalSell();\n            (IERC20 globalSellToken, uint256 globalSellAmount) = (globalSell.token(), globalSell.amount());\n            _checkRecipient(\n                msg.sender, recipient, _recipientCheckNeedsToken() ? state.buy().token() : IERC20(address(0))\n            );\n            uint256 globalBuyAmount =\n                CompactTake.take(state, notes, uint32(IEkuboCore_1.withdraw.selector), recipient, minBuyAmount);\n            if (feeOnTransfer) {\n                // We've already transferred the sell token to the vault and\n                // `settle`'d. `globalSellAmount` is the verbatim credit in that token stored by the\n                // vault. We only need to handle the case of incomplete filling.\n                if (globalSellAmount != 0) {\n                    address refundRecipient = payer == address(this) ? address(this) : _msgSender();\n                    _checkRecipient(msg.sender, refundRecipient, globalSellToken);\n                    CompactTake._callSelector(\n                        uint32(IEkuboCore_1.withdraw.selector), globalSellToken, refundRecipient, globalSellAmount\n                    );\n                }\n            } else {\n                // While `notes` records a credit value, the vault actually records a debt for the\n                // global sell token. We recover the exact amount of that debt and then pay it.\n                // `globalSellAmount` is _usually_ zero, but if it isn't it represents a partial\n                // fill. This subtraction recovers the actual debt recorded in the vault.\n                uint256 debt;\n                unchecked {\n                    debt = state.globalSellAmount() - globalSellAmount;\n                }\n                if (debt == 0) {\n                    assembly (\"memory-safe\") {\n                        mstore(0x14, globalSellToken)\n                        mstore(0x00, 0xfb772a88000000000000000000000000) // selector for `ZeroSellAmount(address)` with `globalSellToken`'s padding\n                        revert(0x10, 0x24)\n                    }\n                }\n                _ekuboPayV3(globalSellToken, payer, debt, permit, isForwarded, sig);\n            }\n\n            // return abi.encode(globalBuyAmount);\n            bytes memory returndata;\n            assembly (\"memory-safe\") {\n                returndata := mload(0x40)\n                mstore(returndata, 0x60)\n                mstore(add(0x20, returndata), 0x20)\n                mstore(add(0x40, returndata), 0x20)\n                mstore(add(0x60, returndata), globalBuyAmount)\n                mstore(0x40, add(0x80, returndata))\n            }\n            return returndata;\n        }\n    }\n}\n\n// src/core/UniswapV2.sol\n\ninterface IUniV2Pair {\n    function token0() external view returns (address);\n\n    function token1() external view returns (address);\n\n    function getReserves() external view returns (uint112, uint112, uint32);\n\n    function swap(uint256, uint256, address, bytes calldata) external;\n}\n\nlibrary FastUniswapV2Pool {\n    using Ternary for bool;\n\n    function fastGetReserves(address pool, bool zeroForOne)\n        internal\n        view\n        returns (uint256 sellReserve, uint256 buyReserve)\n    {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x0902f1ac) // selector for `getReserves()`\n            if iszero(staticcall(gas(), pool, 0x1c, 0x04, 0x00, 0x40)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if lt(returndatasize(), 0x40) { revert(0x00, 0x00) }\n            let r := shl(0x05, iszero(zeroForOne))\n            sellReserve := mload(r)\n            buyReserve := mload(xor(0x20, r))\n        }\n    }\n\n    function fastToken0or1(address pool, bool zeroForOne) internal view returns (IERC20) {\n        return\n            fastGetToken(\n                pool, zeroForOne.ternary(uint32(IUniV2Pair.token1.selector), uint32(IUniV2Pair.token0.selector))\n            );\n    }\n\n    function fastSwap(address pool, bool zeroForOne, uint256 buyAmount, address recipient) internal {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n\n            mstore(ptr, 0x022c0d9f) // selector for `swap(uint256,uint256,address,bytes)`\n            // set amount0Out and amount1Out\n            let buyAmountBaseOffset := add(0x20, ptr)\n            // If `zeroForOne`, buyAmount offset is 0x40, else 0x20\n            let directionOffset := shl(0x05, iszero(zeroForOne))\n            mstore(add(buyAmountBaseOffset, directionOffset), 0x00)\n            mstore(add(buyAmountBaseOffset, xor(0x20, directionOffset)), buyAmount)\n\n            mstore(add(0x60, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, recipient))\n            mstore(add(0x80, ptr), 0x80) // offset to length of data\n            mstore(add(0xa0, ptr), 0x00) // length of data\n\n            // perform swap at the pool sending bought tokens to the recipient\n            if iszero(call(gas(), pool, 0x00, add(0x1c, ptr), 0xa4, 0x00, 0x00)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n        }\n    }\n}\n\nabstract contract UniswapV2 is SettlerSwapAbstract {\n    using SafeTransferLib for IERC20;\n    using FastUniswapV2Pool for address;\n\n    /// @dev Sell a token for another token using UniswapV2.\n    function sellToUniswapV2(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        address pool,\n        uint24 swapInfo,\n        uint256 minBuyAmount\n    ) internal {\n        // Preventing calls to Permit2 or AH is not explicitly required as neither of these contracts implement the `swap` nor `transfer` selector\n\n        // |7|6|5|4|3|2|1|0| - bit positions in swapInfo (uint8)\n        // |0|0|0|0|0|0|F|Z| - Z: zeroForOne flag, F: sellTokenHasFee flag\n        bool zeroForOne = (swapInfo & 1) == 1; // Extract the least significant bit (bit 0)\n        bool sellTokenHasFee = (swapInfo & 2) >> 1 == 1; // Extract the second least significant bit (bit 1) and shift it right\n        uint256 feeBps = swapInfo >> 8;\n\n        uint256 sellAmount;\n        uint256 buyAmount;\n        // If ppm is zero we assume there are no funds within this contract, skip the updating sellAmount.\n        // This case occurs if the pool is being chained, in which the funds have been sent directly to the pool\n        if (ppm != 0) {\n            // We don't care about phantom overflow here because reserves are\n            // limited to 112 bits. Any token balance that would overflow here would\n            // also break UniV2.\n            // It is *possible* to set `ppm` above the basis and therefore\n            // cause an overflow on this multiplication. However, `ppm` is\n            // passed as authenticated calldata, so this is a GIGO error that we\n            // do not attempt to fix.\n            unchecked {\n                sellAmount = IERC20(sellToken).fastSpendableBalance() * ppm / BASIS;\n            }\n            _checkRecipient(address(this), pool, IERC20(sellToken));\n            IERC20(sellToken).safeTransfer(address(pool), sellAmount);\n        }\n        (uint256 sellReserve, uint256 buyReserve) = FastUniswapV2Pool.fastGetReserves(pool, zeroForOne);\n        if (sellAmount == 0 || sellTokenHasFee) {\n            uint256 bal = IERC20(sellToken).fastBalanceOf(pool);\n            sellAmount = bal - sellReserve;\n        }\n        unchecked {\n            uint256 sellAmountWithFee = sellAmount * (10_000 - feeBps);\n            buyAmount = (sellAmountWithFee * buyReserve) / (sellAmountWithFee + sellReserve * 10_000);\n        }\n        if (buyAmount < minBuyAmount) {\n            revertTooMuchSlippage(pool.fastToken0or1(zeroForOne), minBuyAmount, buyAmount);\n        }\n        _checkRecipient(\n            pool, recipient, _recipientCheckNeedsToken() ? pool.fastToken0or1(zeroForOne) : IERC20(address(0))\n        );\n        pool.fastSwap(zeroForOne, buyAmount, recipient);\n    }\n}\n\n// src/core/UniswapV3Fork.sol\n\ninterface IUniswapV3Pool {\n    /// @notice Swap token0 for token1, or token1 for token0\n    /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\n    /// @param recipient The address to receive the output of the swap\n    /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\n    /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive),\n    /// or exact output (negative)\n    /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\n    /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\n    /// @param data Any data to be passed through to the callback\n    /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\n    /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\n    function swap(\n        address recipient,\n        bool zeroForOne,\n        int256 amountSpecified,\n        uint160 sqrtPriceLimitX96,\n        bytes calldata data\n    ) external returns (int256 amount0, int256 amount1);\n}\n\nlibrary FastUniswapV3Pool {\n    function fastEncodeSwap(\n        address recipient,\n        bool zeroForOne,\n        uint256 sellAmount,\n        uint160 sqrtPriceLimitX96,\n        bytes memory swapCallbackData\n    ) internal pure returns (bytes memory data, uint256 freeMemPtr) {\n        // Equivalent to `abi.encodeCall(IUniswapV3Pool.swap, (..., swapCallbackData))`,\n        // but keeps the dynamic bytes tail tightly packed and canonicalizes `zeroForOne`.\n        assembly (\"memory-safe\") {\n            freeMemPtr := mload(0x40)\n            data := freeMemPtr\n\n            // encode the call to pool.swap\n            let callbackLen := mload(swapCallbackData)\n            mcopy(add(0xc4, data), swapCallbackData, add(0x20, callbackLen))\n            mstore(add(0xa4, data), 0xa0)\n            mstore(add(0x84, data), and(0xffffffffffffffffffffffffffffffffffffffff, sqrtPriceLimitX96))\n            mstore(add(0x64, data), sellAmount)\n            mstore(add(0x44, data), lt(0x00, zeroForOne))\n            mstore(add(0x24, data), recipient)\n            mstore(add(0x10, data), 0x128acb08000000000000000000000000) // selector for `swap(address,bool,int256,uint160,bytes)` with `recipient`'s padding\n\n            // set data.length\n            mstore(data, add(0xc4, callbackLen))\n\n            // advance the free memory pointer (we'll put it back later)\n            mstore(0x40, add(add(0xe4, callbackLen), data))\n        }\n    }\n}\n\nabstract contract UniswapV3Fork is SettlerSwapAbstract {\n    using Ternary for bool;\n    using UnsafeMath for uint256;\n    using UnsafeMath for int256;\n    using SafeTransferLib for IERC20;\n\n    /// @dev Minimum size of an encoded swap path:\n    ///      sizeof(address(inputToken) | uint8(forkId) | uint24(poolId) | uint160(sqrtPriceLimitX96) | address(outputToken))\n    uint256 private constant SINGLE_HOP_PATH_SIZE = 0x40;\n    /// @dev The size of each hop after the input token:\n    ///      sizeof(uint8(forkId) | uint24(poolId) | uint160(sqrtPriceLimitX96) | address(outputToken))\n    uint256 private constant PATH_HOP_SIZE = 0x2c;\n    uint256 private constant PATH_INPUT_TOKEN_SIZE = 0x14;\n    /// @dev The size of the swap callback prefix data before the Permit2 data.\n    uint256 private constant SWAP_CALLBACK_PREFIX_DATA_SIZE = 0x28;\n    /// @dev The offset from the pointer to the length of the swap callback prefix data to the start of the Permit2 data.\n    uint256 private constant SWAP_CALLBACK_PERMIT2DATA_OFFSET = 0x48;\n    uint256 private constant PERMIT_DATA_SIZE = 0x60;\n    uint256 private constant ISFORWARDED_DATA_SIZE = 0x01;\n    /// @dev Mask of lower 3 bytes.\n    uint256 private constant UINT24_MASK = 0xffffff;\n\n    /// @dev Sell a token for another token directly against uniswap v3.\n    /// @param encodedPath Uniswap-encoded path.\n    /// @param ppm proportion of current balance of the first token in the path to sell.\n    /// @param minBuyAmount Minimum amount of the last token in the path to buy.\n    /// @param recipient The recipient of the bought tokens.\n    /// @return buyAmount Amount of the last token in the path bought.\n    function sellToUniswapV3(address recipient, uint256 ppm, bytes memory encodedPath, uint256 minBuyAmount)\n        internal\n        returns (uint256 buyAmount)\n    {\n        if (encodedPath.length < SINGLE_HOP_PATH_SIZE) {\n            Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n        }\n        IERC20 inputToken;\n        // inputToken = IERC20(address(bytes20(encodedPath)));\n        // encodedPath = encodedPath[20:];\n        assembly (\"memory-safe\") {\n            let pathLength := sub(mload(encodedPath), PATH_INPUT_TOKEN_SIZE)\n            encodedPath := add(PATH_INPUT_TOKEN_SIZE, encodedPath)\n            inputToken := mload(encodedPath)\n            mstore(encodedPath, pathLength)\n        }\n\n        // bytes memory swapCallbackData = abi.encodePacked(address(this), inputToken)\n        bytes memory swapCallbackData = new bytes(SWAP_CALLBACK_PREFIX_DATA_SIZE);\n        assembly (\"memory-safe\") {\n            mstore(add(0x28, swapCallbackData), inputToken)\n            mstore(add(0x14, swapCallbackData), address())\n            mstore(swapCallbackData, SWAP_CALLBACK_PREFIX_DATA_SIZE)\n        }\n\n        buyAmount = _uniV3ForkSwap(\n            recipient,\n            encodedPath,\n            // We don't care about phantom overflow here because reserves are limited to 128\n            // bits. Any token balance that would overflow here would also break UniV3.\n            (inputToken.fastSpendableBalance() * ppm).unsafeDiv(BASIS),\n            minBuyAmount,\n            swapCallbackData\n        );\n    }\n\n    /// @dev Sell a token for another token directly against uniswap v3. Payment is using a Permit2 signature (or AllowanceHolder).\n    /// @param encodedPath Uniswap-encoded path.\n    /// @param minBuyAmount Minimum amount of the last token in the path to buy.\n    /// @param recipient The recipient of the bought tokens.\n    /// @param permit The PermitTransferFrom allowing this contract to spend the taker's tokens\n    /// @param sig The taker's signature for Permit2\n    /// @return buyAmount Amount of the last token in the path bought.\n    function sellToUniswapV3VIP(\n        address recipient,\n        bytes memory encodedPath,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory sig,\n        uint256 minBuyAmount\n    ) internal returns (uint256 buyAmount) {\n        if (encodedPath.length < PATH_HOP_SIZE) {\n            Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n        }\n        bytes memory swapCallbackData =\n            new bytes(SWAP_CALLBACK_PREFIX_DATA_SIZE + PERMIT_DATA_SIZE + ISFORWARDED_DATA_SIZE + sig.length);\n        _encodePermit2Data(swapCallbackData, permit, sig, _isForwarded());\n\n        // swapCallbackData[:40] = abi.encodePacked(address(0), permit.permitted.token)\n        assembly (\"memory-safe\") {\n            let length := mload(swapCallbackData)\n            mstore(add(0x28, swapCallbackData), mload(mload(permit)))\n            mstore(add(0x14, swapCallbackData), 0x00)\n            mstore(swapCallbackData, length)\n        }\n\n        buyAmount = _uniV3ForkSwap(\n            recipient,\n            encodedPath,\n            _permitToSellAmount(\n                address(0) /* sentinel for `_msgSender()` */,\n                permit\n            ),\n            minBuyAmount,\n            swapCallbackData\n        );\n    }\n\n    // Executes successive swaps along an encoded uniswap path.\n    function _uniV3ForkSwap(\n        address recipient,\n        bytes memory encodedPath,\n        uint256 sellAmount,\n        uint256 minBuyAmount,\n        bytes memory swapCallbackData\n    ) internal returns (uint256 buyAmount) {\n        if (sellAmount > uint256(type(int256).max)) {\n            Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n        }\n\n        IERC20 outputToken;\n        while (true) {\n            bool isPathMultiHop = encodedPath.length > PATH_HOP_SIZE;\n            bool zeroForOne;\n            IUniswapV3Pool pool;\n            uint160 sqrtPriceLimitX96;\n            uint32 callbackSelector;\n            {\n                IERC20 token0;\n                uint8 forkId;\n                uint24 poolId;\n                IERC20 token1;\n                assembly (\"memory-safe\") {\n                    token0 := mload(add(0x28, swapCallbackData))\n                    forkId := mload(add(0x01, encodedPath))\n                    poolId := mload(add(0x04, encodedPath))\n                    sqrtPriceLimitX96 := mload(add(0x18, encodedPath))\n                    token1 := mload(add(PATH_HOP_SIZE, encodedPath))\n                }\n\n                outputToken = token1;\n                (token0, token1) = (zeroForOne = token0 < token1).maybeSwap(token1, token0);\n                address factory;\n                bytes32 initHash;\n                (factory, initHash, callbackSelector) = _uniV3ForkInfo(forkId);\n                pool = _toPool(forkId, factory, initHash, token0, token1, poolId);\n            }\n\n            // Intermediate tokens go to this contract. Final tokens go to `recipient`.\n            address to = isPathMultiHop.ternary(address(this), recipient);\n            if (!isPathMultiHop) {\n                _checkRecipient(address(pool), recipient, outputToken);\n            }\n\n            (bytes memory data, uint256 freeMemPtr) =\n                FastUniswapV3Pool.fastEncodeSwap(to, zeroForOne, sellAmount, sqrtPriceLimitX96, swapCallbackData);\n\n            (int256 amount0, int256 amount1) = abi.decode(\n                _setOperatorAndCall(address(pool), data, callbackSelector, _uniV3ForkCallback), (int256, int256)\n            );\n\n            assembly (\"memory-safe\") {\n                // release the memory that we allocated above\n                mstore(0x40, freeMemPtr)\n            }\n\n            {\n                int256 _buyAmount = zeroForOne.ternary(amount1, amount0).unsafeNeg();\n                if (_buyAmount < 0) {\n                    Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n                }\n                buyAmount = uint256(_buyAmount);\n            }\n            if (!isPathMultiHop) {\n                // Done.\n                break;\n            }\n\n            // Continue with next hop.\n            sellAmount = buyAmount;\n\n            // encodedPath = encodedPath[44:]\n            assembly (\"memory-safe\") {\n                let pathLength := sub(mload(encodedPath), PATH_HOP_SIZE)\n                encodedPath := add(PATH_HOP_SIZE, encodedPath)\n                mstore(encodedPath, pathLength)\n            }\n            if (encodedPath.length < PATH_HOP_SIZE) {\n                Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n            }\n\n            // Subsequent callbacks contain only the Settler payer and intermediate token.\n            // swapCallbackData = abi.encodePacked(address(this), outputToken)\n            assembly (\"memory-safe\") {\n                mstore(add(0x28, swapCallbackData), outputToken)\n                mstore(add(0x14, swapCallbackData), address())\n                mstore(swapCallbackData, SWAP_CALLBACK_PREFIX_DATA_SIZE)\n            }\n        }\n        if (buyAmount < minBuyAmount) {\n            revertTooMuchSlippage(outputToken, minBuyAmount, buyAmount);\n        }\n    }\n\n    function _encodePermit2Data(\n        bytes memory swapCallbackData,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory sig,\n        bool isForwarded\n    ) private pure {\n        assembly (\"memory-safe\") {\n            mstore(add(SWAP_CALLBACK_PERMIT2DATA_OFFSET, swapCallbackData), mload(add(0x20, mload(permit))))\n            mcopy(add(add(SWAP_CALLBACK_PERMIT2DATA_OFFSET, 0x20), swapCallbackData), add(0x20, permit), 0x40)\n            mstore8(\n                add(add(SWAP_CALLBACK_PERMIT2DATA_OFFSET, PERMIT_DATA_SIZE), swapCallbackData),\n                lt(0x00, isForwarded)\n            )\n            mcopy(\n                add(\n                    add(add(SWAP_CALLBACK_PERMIT2DATA_OFFSET, PERMIT_DATA_SIZE), ISFORWARDED_DATA_SIZE),\n                    swapCallbackData\n                ),\n                add(0x20, sig),\n                mload(sig)\n            )\n        }\n    }\n\n    function _isEraVmUniV3Fork(uint8) internal pure virtual returns (bool) {\n        return false;\n    }\n\n    // Compute the pool address given two tokens and a poolId.\n    function _toPool(uint8 forkId, address factory, bytes32 initHash, IERC20 token0, IERC20 token1, uint24 poolId)\n        private\n        pure\n        returns (IUniswapV3Pool)\n    {\n        // address(keccak256(abi.encodePacked(\n        //     hex\"ff\",\n        //     factory,\n        //     keccak256(abi.encode(token0, token1, poolId)),\n        //     initHash\n        // )))\n        bytes32 salt;\n        assembly (\"memory-safe\") {\n            poolId := and(UINT24_MASK, poolId)\n            let ptr := mload(0x40)\n            mstore(0x40, poolId)\n            mstore(0x20, token1)\n            mstore(0x00, 0x00)\n            mstore(0x0c, shl(0x60, token0))\n            salt := keccak256(0x00, sub(0x60, shl(0x05, iszero(poolId))))\n            mstore(0x40, ptr)\n        }\n        if (_isEraVmUniV3Fork(forkId)) {\n            return IUniswapV3Pool(\n                AddressDerivation.deriveDeterministicContractEraVm(\n                    factory, salt, initHash, 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\n                )\n            );\n        } else {\n            return IUniswapV3Pool(AddressDerivation.deriveDeterministicContract(factory, salt, initHash));\n        }\n    }\n\n    function _uniV3ForkInfo(uint8 forkId) internal view virtual returns (address, bytes32, uint32);\n\n    function _uniV3ForkCallback(bytes calldata data) private returns (bytes memory) {\n        require(data.length >= 0x80);\n        int256 amount0Delta;\n        int256 amount1Delta;\n        assembly (\"memory-safe\") {\n            amount0Delta := calldataload(data.offset)\n            amount1Delta := calldataload(add(0x20, data.offset))\n            data.offset := add(data.offset, calldataload(add(0x40, data.offset)))\n            data.length := calldataload(data.offset)\n            data.offset := add(0x20, data.offset)\n        }\n        uniswapV3SwapCallback(amount0Delta, amount1Delta, data);\n        return new bytes(0);\n    }\n\n    /// @dev The UniswapV3 pool swap callback which pays the funds requested\n    ///      by the caller/pool to the pool. Can only be called by a valid\n    ///      UniswapV3 pool.\n    /// @param amount0Delta Token0 amount owed.\n    /// @param amount1Delta Token1 amount owed.\n    /// @param data Arbitrary data forwarded from swap() caller. A packed encoding of: payer, sellToken, (optionally: permit[0x20:], isForwarded, sig)\n    function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) private {\n        address payer;\n        assembly (\"memory-safe\") {\n            payer := shr(0x60, calldataload(data.offset))\n            data.length := sub(data.length, 0x14)\n            data.offset := add(0x14, data.offset)\n            // We don't check for underflow/array-out-of-bounds here because the trusted inithash\n            // ensures that `data` was passed through unmodified from `sellToUniswapV3` or\n            // `sellToUniswapV3VIP`. Therefore, it is at least 40 bytes long.\n        }\n        uint256 sellAmount = (amount0Delta > 0).ternary(uint256(amount0Delta), uint256(amount1Delta));\n        _pay(payer, sellAmount, data);\n    }\n\n    function _pay(address payer, uint256 amount, bytes calldata permit2Data) private {\n        if (payer == address(this)) {\n            IERC20 token;\n            assembly (\"memory-safe\") {\n                token := shr(0x60, calldataload(permit2Data.offset))\n            }\n            _checkRecipient(address(this), msg.sender, token);\n            token.safeTransfer(msg.sender, amount);\n        } else {\n            assert(payer == address(0));\n            ISignatureTransfer.PermitTransferFrom calldata permit;\n            bool isForwarded;\n            bytes calldata sig;\n            assembly (\"memory-safe\") {\n                // this is super dirty, but it works because although `permit` is aliasing in the\n                // middle of `payer`, because `payer` is all zeroes, it's treated as padding for the\n                // first word of `permit`, which is the sell token\n                permit := sub(permit2Data.offset, 0x0c)\n                isForwarded := shr(0xf8, calldataload(add(0x74, permit2Data.offset)))\n                sig.offset := add(0x75, permit2Data.offset)\n                sig.length := sub(permit2Data.length, 0x75)\n            }\n            ISignatureTransfer.SignatureTransferDetails memory transferDetails =\n                ISignatureTransfer.SignatureTransferDetails({to: msg.sender, requestedAmount: amount});\n            _transferFrom(permit, transferDetails, sig, isForwarded);\n        }\n    }\n}\n\n// src/core/UniswapV4.sol\n\ninterface IRebateClaimer {\n    function rebateClaimer() external view returns (address);\n}\n\nabstract contract UniswapV4 is SettlerSwapAbstract {\n    using SafeTransferLib for IERC20;\n    using UnsafeMath for uint256;\n    using UnsafeMath for int256;\n    using Ternary for bool;\n    using FastLogic for bool;\n    using CreditDebt for int256;\n    using UnsafePoolManager for IPoolManager;\n    using NotesLib for NotesLib.Note[];\n\n    function _uniV4ForkInfo(uint8 forkId) internal view virtual returns (IPoolManager poolManager);\n\n    //// These two functions are the entrypoints to this set of actions. Because UniV4 has a\n    //// mandatory callback, and the vast majority of the business logic has to be executed inside\n    //// the callback, they're pretty minimal. Both end up inside the last function in this file\n    //// `unlockCallback`, which is where most of the business logic lives. Primarily, these\n    //// functions are concerned with correctly encoding the argument to\n    //// `POOL_MANAGER.unlock(...)`. Pay special attention to the `payer` field, which is what\n    //// signals to the callback whether we should be spending a coupon.\n\n    //// `forkId` selects the pool manager of a UniswapV4 deployment. The master list of fork IDs\n    //// is `UNISWAPV4_FORKS.md` at the repository root.\n    ////\n    //// How to generate `fills` for UniV4:\n    ////\n    //// Linearize your DAG of fills by doing a topological sort on the tokens involved. In the\n    //// topological sort of tokens, when there is a choice of the next token, break ties by\n    //// preferring a token if it is the lexicographically largest token that is bought among fills\n    //// with sell token equal to the previous token in the topological sort. Then sort the fills\n    //// belonging to each sell token by their buy token. This technique isn't *quite* optimal, but\n    //// it's pretty close. The buy token of the final fill is special-cased. It is the token that\n    //// will be transferred to `recipient` and have its slippage checked against `amountOutMin`. In\n    //// the event that you are encoding a series of fills with more than one output token, ensure\n    //// that at least one of the global buy token's fills is positioned appropriately.\n    ////\n    //// Now that you have a list of fills, encode each fill as follows.\n    //// First encode the `ppm` for the fill as 3 bytes. Remember that this `ppm` is relative to the\n    //// running balance at the moment that the fill is settled.\n    //// Second, encode the price caps sqrtPriceLimitX96 as 20 bytes.\n    //// Third, encode the packing key for that fill as 1 byte. The packing key byte depends on the\n    //// tokens involved in the previous fill. The packing key for the first fill must be 1;\n    //// i.e. encode only the buy token for the first fill.\n    ////   0 -> sell and buy tokens remain unchanged from the previous fill (pure multiplex)\n    ////   1 -> sell token remains unchanged from the previous fill, buy token is encoded (diamond multiplex)\n    ////   2 -> sell token becomes the buy token from the previous fill, new buy token is encoded (multihop)\n    ////   3 -> both sell and buy token are encoded\n    //// Obviously, after encoding the packing key, you encode 0, 1, or 2 tokens (each as 20 bytes),\n    //// as appropriate.\n    //// The remaining fields of the fill are mandatory.\n    //// Fourth, encode the pool fee as 3 bytes, and the pool tick spacing as 3 bytes.\n    //// Fifth, encode the hook address as 20 bytes.\n    //// Sixth, encode the hook data for the fill. Encode the length of the hook data as 3 bytes,\n    //// then append the hook data itself.\n    ////\n    //// Repeat the process for each fill and concatenate the results without padding.\n\n    function sellToUniswapV4(\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encode(\n            uint32(IPoolManager.unlock.selector),\n            recipient,\n            sellToken,\n            ppm,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            amountOutMin,\n            0\n        );\n        bytes memory encodedBuyAmount = _setOperatorAndCall(\n            address(_uniV4ForkInfo(forkId)), data, uint32(IUnlockCallback.unlockCallback.selector), _uniV4Callback\n        );\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `unlockCallback` and that `unlockCallback` encoded the buy\n            // amount correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function sellToUniswapV4VIP(\n        address recipient,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encodeVIP(\n            uint32(IPoolManager.unlock.selector),\n            recipient,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            permit,\n            sig,\n            _isForwarded(),\n            amountOutMin,\n            0\n        );\n        bytes memory encodedBuyAmount = _setOperatorAndCall(\n            address(_uniV4ForkInfo(forkId)), data, uint32(IUnlockCallback.unlockCallback.selector), _uniV4Callback\n        );\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `unlockCallback` and that `unlockCallback` encoded the buy\n            // amount correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function _uniV4Callback(bytes calldata data) private returns (bytes memory) {\n        // We know that our calldata is well-formed. Therefore, the first slot is 0x20 and the\n        // second slot is the length of the strict ABIEncoded payload\n        assembly (\"memory-safe\") {\n            data.length := calldataload(add(0x20, data.offset))\n            data.offset := add(0x40, data.offset)\n        }\n        return unlockCallback(data);\n    }\n\n    //// The following functions are the helper functions for `unlockCallback`. They abstract much\n    //// of the complexity of tracking which tokens need to be zeroed out at the end of the\n    //// callback.\n    ////\n    //// The two major pieces of state that are maintained through the callback are `Note[] memory\n    //// notes` and `State state`\n    ////\n    //// `notes` keeps track of the list of the tokens that have been touched throughout the\n    //// callback that have nonzero credit. At the end of the fills, all tokens with credit will be\n    //// swept back to Settler. These are the global buy token (against which slippage is checked)\n    //// and any other multiplex-out tokens. Only the global sell token is allowed to have debt, but\n    //// it is accounted slightly differently from the other tokens. The function `_take` is\n    //// responsible for iterating over the list of tokens and withdrawing any credit to the\n    //// appropriate recipient.\n    ////\n    //// `state` exists to reduce stack pressure and to simplify/gas-optimize the process of\n    //// swapping. By keeping track of the sell and buy token on each hop, we're able to compress\n    //// the representation of the fills required to satisfy the swap. Most often in a swap, the\n    //// tokens in adjacent fills are somewhat in common. By caching, we avoid having them appear\n    //// multiple times in the calldata.\n\n    // the mandatory fields are\n    // 3 - sell ppm\n    // 20 - sqrtPriceLimitX96\n    // 1 - pool key tokens case\n    // 3 - pool fee\n    // 3 - pool tick spacing\n    // 20 - pool hooks\n    // 3 - hook data length\n    uint256 private constant _HOP_DATA_LENGTH = 53;\n\n    /// Decode a `PoolKey` from its packed representation in `bytes` and the token information in\n    /// `state`. Returns the `zeroForOne` flag and the suffix of the bytes that are not consumed in\n    /// the decoding process.\n    function _setPoolKey(IPoolManager.PoolKey memory key, State state, bytes calldata data)\n        private\n        pure\n        returns (bool, bytes calldata)\n    {\n        (IERC20 sellToken, IERC20 buyToken) = (state.sell().token(), state.buy().token());\n        bool zeroForOne;\n        assembly (\"memory-safe\") {\n            let sellTokenShifted := shl(0x60, sellToken)\n            let buyTokenShifted := shl(0x60, buyToken)\n            zeroForOne := or(\n                eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, sellTokenShifted),\n                and(\n                    iszero(eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, buyTokenShifted)),\n                    lt(sellTokenShifted, buyTokenShifted)\n                )\n            )\n        }\n        (key.token0, key.token1) = zeroForOne.maybeSwap(buyToken, sellToken);\n\n        uint256 packed;\n        assembly (\"memory-safe\") {\n            packed := shr(0x30, calldataload(data.offset))\n\n            data.offset := add(0x1a, data.offset)\n            data.length := sub(data.length, 0x1a)\n            // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n        }\n\n        key.fee = uint24(packed >> 184);\n        key.tickSpacing = int24(uint24(packed >> 160));\n        key.hooks = IHooks.wrap(address(uint160(packed)));\n\n        return (zeroForOne, data);\n    }\n\n    function _pay(\n        IERC20 sellToken,\n        address payer,\n        uint256 sellAmount,\n        ISignatureTransfer.PermitTransferFrom calldata permit,\n        bool isForwarded,\n        bytes calldata sig\n    ) private returns (uint256) {\n        IPoolManager(msg.sender).unsafeSync(sellToken);\n        if (payer == address(this)) {\n            _checkRecipient(address(this), msg.sender, sellToken);\n            sellToken.safeTransfer(msg.sender, sellAmount);\n        } else {\n            // assert(payer == address(0));\n            ISignatureTransfer.SignatureTransferDetails memory transferDetails =\n                ISignatureTransfer.SignatureTransferDetails({to: msg.sender, requestedAmount: sellAmount});\n            _transferFrom(permit, transferDetails, sig, isForwarded);\n        }\n        return IPoolManager(msg.sender).unsafeSettle();\n    }\n\n    function unlockCallback(bytes calldata data) private returns (bytes memory) {\n        address recipient;\n        uint256 minBuyAmount;\n        uint256 hashMul;\n        uint256 hashMod;\n        bool feeOnTransfer;\n        address payer;\n        (data, recipient, minBuyAmount, hashMul, hashMod, feeOnTransfer, payer) = Decoder.decodeHeader(data);\n\n        // Set up `state` and `notes`. The other values are ancillary and might be used when we need\n        // to settle global sell token debt at the end of swapping.\n        (\n            bytes calldata newData,\n            State state,\n            NotesLib.Note[] memory notes,\n            ISignatureTransfer.PermitTransferFrom calldata permit,\n            bool isForwarded,\n            bytes calldata sig\n        ) = Decoder.initialize(data, hashMul, hashMod, payer);\n        {\n            NotePtr globalSell = state.globalSell();\n            if (payer != address(this)) {\n                globalSell.setAmount(\n                    _permitToSellAmountCalldata(\n                        address(0) /* sentinel for `_msgSender()` */,\n                        permit\n                    )\n                );\n            }\n            if (feeOnTransfer) {\n                globalSell.setAmount(_pay(globalSell.token(), payer, globalSell.amount(), permit, isForwarded, sig));\n            }\n            state.setGlobalSellAmount(globalSell.amount());\n        }\n        state.checkZeroSellAmount();\n        data = newData;\n\n        // Now that we've unpacked and decoded the header, we can begin decoding the array of swaps\n        // and executing them.\n        IPoolManager.PoolKey memory key;\n        IPoolManager.SwapParams memory params;\n        while (data.length >= _HOP_DATA_LENGTH) {\n            uint256 ppm;\n            {\n                uint160 sqrtPriceLimitX96;\n                assembly (\"memory-safe\") {\n                    ppm := shr(0xe8, calldataload(data.offset))\n                    data.offset := add(0x03, data.offset)\n\n                    sqrtPriceLimitX96 := shr(0x60, calldataload(data.offset))\n                    data.offset := add(0x14, data.offset)\n\n                    data.length := sub(data.length, 0x17)\n                    // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n                }\n                params.sqrtPriceLimitX96 = sqrtPriceLimitX96;\n            }\n\n            data = Decoder.updateState(state, notes, data);\n            bool zeroForOne;\n            (zeroForOne, data) = _setPoolKey(key, state, data);\n            bytes calldata hookData;\n            (data, hookData) = Decoder.decodeBytes(data);\n            Decoder.overflowCheck(data);\n\n            params.zeroForOne = zeroForOne;\n            unchecked {\n                params.amountSpecified = int256((state.sell().amount() * ppm).unsafeDiv(BASIS)).unsafeNeg();\n            }\n\n            BalanceDelta delta = IPoolManager(msg.sender).unsafeSwap(key, params, hookData);\n            {\n                (int256 settledSellAmount, int256 settledBuyAmount) =\n                    zeroForOne.maybeSwap(delta.amount1(), delta.amount0());\n                // Some insane hooks may increase the sell amount; obviously this may result in\n                // unavoidable reverts in some cases. But we still need to make sure that we don't\n                // underflow to avoid wildly unexpected behavior. The pool manager enforces that the\n                // settled sell amount cannot be positive\n                NotePtr sell = state.sell();\n                sell.setAmount(sell.amount() - uint256(settledSellAmount.unsafeNeg()));\n                // If `state.buy.amount()` overflows an `int128`, we'll get a revert inside the pool\n                // manager later. We cannot overflow a `uint256`.\n                unchecked {\n                    NotePtr buy = state.buy();\n                    buy.setAmount(buy.amount() + settledBuyAmount.asCredit(buy));\n                }\n            }\n        }\n\n        // `data` has been consumed. All that remains is to settle out the net result of all the\n        // swaps. Any credit in any token other than `state.buy.token` will be swept to\n        // Settler. `state.buy.token` will be sent to `recipient`.\n        {\n            NotePtr globalSell = state.globalSell();\n            (IERC20 globalSellToken, uint256 globalSellAmount) = (globalSell.token(), globalSell.amount());\n            _checkRecipient(\n                msg.sender, recipient, _recipientCheckNeedsToken() ? state.buy().token() : IERC20(address(0))\n            );\n            uint256 globalBuyAmount =\n                Take.take(state, notes, uint32(IPoolManager.take.selector), recipient, minBuyAmount);\n            if (feeOnTransfer) {\n                // We've already transferred the sell token to the pool manager and\n                // `settle`'d. `globalSellAmount` is the verbatim credit in that token stored by the\n                // pool manager. We only need to handle the case of incomplete filling.\n                if (globalSellAmount != 0) {\n                    address refundRecipient = payer == address(this) ? address(this) : _msgSender();\n                    _checkRecipient(msg.sender, refundRecipient, globalSellToken);\n                    Take._callSelector(\n                        uint32(IPoolManager.take.selector), globalSellToken, refundRecipient, globalSellAmount\n                    );\n                }\n            } else {\n                // While `notes` records a credit value, the pool manager actually records a debt\n                // for the global sell token. We recover the exact amount of that debt and then pay\n                // it.\n                // `globalSellAmount` is _usually_ zero, but if it isn't it represents a partial\n                // fill. This subtraction recovers the actual debt recorded in the pool manager.\n                uint256 debt;\n                unchecked {\n                    debt = state.globalSellAmount() - globalSellAmount;\n                }\n                if (debt == 0) {\n                    assembly (\"memory-safe\") {\n                        mstore(0x14, globalSellToken)\n                        mstore(0x00, 0xfb772a88000000000000000000000000) // selector for `ZeroSellAmount(address)` with `globalSellToken`'s padding\n                        revert(0x10, 0x24)\n                    }\n                }\n                if (isNative_1(globalSellToken)) {\n                    IPoolManager(msg.sender).unsafeSync(IERC20(address(0)));\n                    IPoolManager(msg.sender).unsafeSettle(debt);\n                } else {\n                    _pay(globalSellToken, payer, debt, permit, isForwarded, sig);\n                }\n            }\n\n            // return abi.encode(globalBuyAmount);\n            bytes memory returndata;\n            assembly (\"memory-safe\") {\n                returndata := mload(0x40)\n                mstore(returndata, 0x60)\n                mstore(add(0x20, returndata), 0x20)\n                mstore(add(0x40, returndata), 0x20)\n                mstore(add(0x60, returndata), globalBuyAmount)\n                mstore(0x40, add(0x80, returndata))\n            }\n            return returndata;\n        }\n    }\n\n    function _fallback(bytes calldata data) internal virtual override returns (bool success, bytes memory returndata) {\n        success = data.length >= 4;\n        uint256 selector;\n        assembly (\"memory-safe\") {\n            selector := shr(0xe0, calldataload(data.offset))\n        }\n        success = success.and(selector == uint32(IRebateClaimer.rebateClaimer.selector));\n        if (!success) {\n            return super._fallback(data);\n        }\n        assembly (\"memory-safe\") {\n            returndata := mload(0x40)\n            mstore(0x40, add(0x40, returndata))\n            mstore(returndata, 0x20)\n            mstore(add(0x20, returndata), 0x352650Ac2653508d946c4912B07895B22edd84CD) // an EOA owned by Scott\n        }\n    }\n}\n\n// src/core/BalancerV3.sol\n\ninterface IBalancerV3Vault {\n    /**\n     * @notice Creates a context for a sequence of operations (i.e., \"unlocks\" the Vault).\n     * @dev Performs a callback on msg.sender with arguments provided in `data`. The Callback is `transient`,\n     * meaning all balances for the caller have to be settled at the end.\n     *\n     * @param data Contains function signature and args to be passed to the msg.sender\n     * @return result Resulting data from the call\n     */\n    function unlock(bytes calldata data) external returns (bytes memory);\n\n    /**\n     * @notice Settles deltas for a token; must be successful for the current lock to be released.\n     * @dev Protects the caller against leftover dust in the Vault for the token being settled. The caller\n     * should know in advance how many tokens were paid to the Vault, so it can provide it as a hint to discard any\n     * excess in the Vault balance.\n     *\n     * If the given hint is equal to or higher than the difference in reserves, the difference in reserves is given as\n     * credit to the caller. If it's higher, the caller sent fewer tokens than expected, so settlement would fail.\n     *\n     * If the given hint is lower than the difference in reserves, the hint is given as credit to the caller.\n     * In this case, the excess would be absorbed by the Vault (and reflected correctly in the reserves), but would\n     * not affect settlement.\n     *\n     * The credit supplied by the Vault can be calculated as `min(reserveDifference, amountHint)`, where the reserve\n     * difference equals current balance of the token minus existing reserves of the token when the function is called.\n     *\n     * @param token Address of the token\n     * @param amountHint Amount paid as reported by the caller\n     * @return credit Credit received in return of the payment\n     */\n    function settle(IERC20 token, uint256 amountHint) external returns (uint256 credit);\n\n    /**\n     * @notice Sends tokens to a recipient.\n     * @dev There is no inverse operation for this function. Transfer funds to the Vault and call `settle` to cancel\n     * debts.\n     *\n     * @param token Address of the token\n     * @param to Recipient address\n     * @param amount Amount of tokens to send\n     */\n    function sendTo(IERC20 token, address to, uint256 amount) external;\n\n    enum SwapKind {\n        EXACT_IN,\n        EXACT_OUT\n    }\n\n    /**\n     * @notice Data passed into primary Vault `swap` operations.\n     * @param kind Type of swap (Exact In or Exact Out)\n     * @param pool The pool with the tokens being swapped\n     * @param tokenIn The token entering the Vault (balance increases)\n     * @param tokenOut The token leaving the Vault (balance decreases)\n     * @param amountGiven Amount specified for tokenIn or tokenOut (depending on the type of swap)\n     * @param limit Minimum or maximum value of the calculated amount (depending on the type of swap)\n     * @param userData Additional (optional) user data\n     */\n    struct VaultSwapParams {\n        SwapKind kind;\n        address pool;\n        IERC20 tokenIn;\n        IERC20 tokenOut;\n        uint256 amountGiven;\n        uint256 limit;\n        bytes userData;\n    }\n\n    /**\n     * @notice Swaps tokens based on provided parameters.\n     * @dev All parameters are given in raw token decimal encoding.\n     * @param vaultSwapParams Parameters for the swap (see above for struct definition)\n     * @return amountCalculated Calculated swap amount\n     * @return amountIn Amount of input tokens for the swap\n     * @return amountOut Amount of output tokens from the swap\n     */\n    function swap(VaultSwapParams memory vaultSwapParams)\n        external\n        returns (uint256 amountCalculated, uint256 amountIn, uint256 amountOut);\n\n    enum WrappingDirection {\n        WRAP,\n        UNWRAP\n    }\n\n    /**\n     * @notice Data for a wrap/unwrap operation.\n     * @param kind Type of swap (Exact In or Exact Out)\n     * @param direction Direction of the wrapping operation (Wrap or Unwrap)\n     * @param wrappedToken Wrapped token, compatible with interface ERC4626\n     * @param amountGiven Amount specified for tokenIn or tokenOut (depends on the type of swap and wrapping direction)\n     * @param limit Minimum or maximum amount specified for the other token (depends on the type of swap and wrapping\n     * direction)\n     */\n    struct BufferWrapOrUnwrapParams {\n        SwapKind kind;\n        WrappingDirection direction;\n        IERC4626 wrappedToken;\n        uint256 amountGiven;\n        uint256 limit;\n    }\n\n    /**\n     * @notice Wraps/unwraps tokens based on the parameters provided.\n     * @dev All parameters are given in raw token decimal encoding. It requires the buffer to be initialized,\n     * and uses the internal wrapped token buffer when it has enough liquidity to avoid external calls.\n     *\n     * @param params Parameters for the wrap/unwrap operation (see struct definition)\n     * @return amountCalculated Calculated swap amount\n     * @return amountIn Amount of input tokens for the swap\n     * @return amountOut Amount of output tokens from the swap\n     */\n    function erc4626BufferWrapOrUnwrap(BufferWrapOrUnwrapParams memory params)\n        external\n        returns (uint256 amountCalculated, uint256 amountIn, uint256 amountOut);\n}\n\nlibrary UnsafeVault {\n    function unsafeSettle(IBalancerV3Vault vault, IERC20 token, uint256 amount) internal returns (uint256 credit) {\n        assembly (\"memory-safe\") {\n            mstore(0x34, amount) // clobbers the upper (always zero) bits of the free memory pointer\n            mstore(0x14, token)\n            mstore(0x00, 0x15afd409000000000000000000000000) // selector for `settle(address,uint256)` with `token`'s padding\n\n            if iszero(call(gas(), vault, 0x00, 0x10, 0x44, 0x00, 0x20)) {\n                let ptr := and(0xffffff, mload(0x40))\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            credit := mload(0x00)\n\n            mstore(0x34, 0x00)\n        }\n    }\n\n    function unsafeSwap(IBalancerV3Vault vault, IBalancerV3Vault.VaultSwapParams memory params)\n        internal\n        returns (uint256 amountIn, uint256 amountOut)\n    {\n        assembly (\"memory-safe\") {\n            // `VaultSwapParams` is a dynamic type with exactly 1 sub-object, and that sub-object is\n            // dynamic (all the other members are value types). Therefore, the layout in calldata is\n            // nearly identical to the layout in memory, but there's an extra indirection offset\n            // that needs to be prepended. Also the pointer to `params.userData` needs to be\n            // transformed into an offset relative to the start of `params`.\n            // We know that it's safe to (temporarily) clobber the two words in memory immediately\n            // before `params` because they are user-allocated (they're part of `wrapParams`). If\n            // they were not user-allocated, this would be illegal as it could clobber a word that\n            // `solc` spilled from the stack into memory.\n\n            let ptr := mload(0x40)\n            let clobberedPtr0 := sub(params, 0x40)\n            let clobberedVal0 := mload(clobberedPtr0)\n            let clobberedPtr1 := sub(params, 0x20)\n            let clobberedVal1 := mload(clobberedPtr1)\n\n            mstore(clobberedPtr0, 0x2bfb780c) // selector for `swap((uint8,address,address,address,uint256,uint256,bytes))`\n            mstore(clobberedPtr1, 0x20) // indirection offset to the dynamic type `VaultSwapParams`\n\n            // Because we laid out `swapParams` as the last object in memory before\n            // `swapParam.userData`, the two objects are contiguous. Their encoding in calldata is\n            // exactly the same as their encoding in memory, but with pointers changed to offsets.\n            let userDataPtr := add(0xc0, params)\n            let userData := mload(userDataPtr)\n            let userDataLen := mload(userData)\n            // Convert the pointer `userData` into an offset relative to the start of its parent\n            // object (`params`), and replace it in memory to transform it to the calldata encoding\n            let len := sub(userData, params)\n            mstore(userDataPtr, len)\n            // Compute the length of the entire encoded object\n            len := add(0x20, add(userDataLen, len))\n            // The padding is a little wonky (we're not creating the Solidity-strict ABI encoding),\n            // but the Solidity ABIDecoder is relaxed enough that this doesn't matter.\n\n            // The length of the whole call's calldata is 36 bytes longer than the encoding of\n            // `params` in memory to account for the prepending of the selector (4 bytes) and the\n            // indirection offset (32 bytes)\n            if iszero(call(gas(), vault, 0x00, add(0x1c, clobberedPtr0), add(0x24, len), 0x00, 0x60)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            amountIn := mload(0x20)\n            amountOut := mload(0x40)\n\n            // mstore(userDataPtr, userData) // we don't need this because we're immediately going to deallocate\n            mstore(clobberedPtr0, clobberedVal0)\n            mstore(clobberedPtr1, clobberedVal1)\n            mstore(0x40, ptr)\n        }\n    }\n\n    function unsafeErc4626BufferWrapOrUnwrap(\n        IBalancerV3Vault vault,\n        IBalancerV3Vault.BufferWrapOrUnwrapParams memory params\n    ) internal returns (uint256 amountIn, uint256 amountOut) {\n        assembly (\"memory-safe\") {\n            // `BufferWrapOrUnwrapParams` is a static type and contains no sub-objects (all its\n            // members are value types), so the layout in calldata is just the layout in memory,\n            // without any indirection.\n            // We know that it's safe to (temporarily) clobber the word in memory immediately before\n            // `params` because it is user-allocated (it's part of the `Notes` heap). If it were not\n            // user-allocated, this would be illegal as it could clobber a word that `solc` spilled\n            // from the stack into memory.\n\n            let ptr := mload(0x40)\n            let clobberedPtr := sub(params, 0x20)\n            let clobberedVal := mload(clobberedPtr)\n            mstore(clobberedPtr, 0x43583be5) // selector for `erc4626BufferWrapOrUnwrap((uint8,uint8,address,uint256,uint256))`\n\n            if iszero(call(gas(), vault, 0x00, add(0x1c, clobberedPtr), 0xa4, 0x00, 0x60)) {\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            amountIn := mload(0x20)\n            amountOut := mload(0x40)\n\n            mstore(clobberedPtr, clobberedVal)\n            mstore(0x40, ptr)\n        }\n    }\n}\n\nIBalancerV3Vault constant VAULT = IBalancerV3Vault(0xbA1333333333a1BA1108E8412f11850A5C319bA9);\n\nabstract contract BalancerV3 is SettlerSwapAbstract, FreeMemory {\n    using SafeTransferLib for IERC20;\n    using UnsafeMath for uint256;\n    using NotesLib for NotesLib.Note[];\n    using Ternary for bool;\n\n    using UnsafeVault for IBalancerV3Vault;\n\n    //// How to generate `fills` for BalancerV3:\n    ////\n    //// Linearize your DAG of fills by doing a topological sort on the tokens involved. Swapping\n    //// against a boosted pool (usually) creates 3 fills: wrap, swap, unwrap. The tokens involved\n    //// includes each ERC4626 tokenized vault token for any boosted pools. In the topological sort\n    //// of tokens, when there is a choice of the next token, break ties by preferring a token if it\n    //// is the lexicographically largest token that is bought among fills with sell token equal to\n    //// the previous token in the topological sort. Then sort the fills belonging to each sell\n    //// token by their buy token. This technique isn't *quite* optimal, but it's pretty close. The\n    //// buy token of the final fill is special-cased. It is the token that will be transferred to\n    //// `recipient` and have its slippage checked against `amountOutMin`. In the event that you are\n    //// encoding a series of fills with more than one output token, ensure that at least one of the\n    //// global buy token's fills is positioned appropriately.\n    ////\n    //// Now that you have a list of fills, encode each fill as follows.\n    //// First, decide if the fill is a swap or an ERC4626 wrap/unwrap.\n    //// Second, encode the `ppm` for the fill as 3 bytes. Remember that this `ppm` is relative to\n    //// the running balance at the moment that the fill is settled. If the fill is a wrap, set the\n    //// most significant bit of `ppm`. If the fill is an unwrap, set the second most significant\n    //// bit of `ppm`\n    //// Third, encode the packing key for that fill as 1 byte. The packing key byte depends on the\n    //// tokens involved in the previous fill. If the fill is a wrap, the buy token must be the\n    //// ERC4626 vault. If the fill is an unwrap, the sell token must be the ERC4626 vault. If the\n    //// fill is a swap against a boosted pool, both sell and buy tokens must be ERC4626 vaults. God\n    //// help you if you're dealing with a boosted pool where only some of the tokens involved are\n    //// ERC4626. The packing key for the first fill must be 1; i.e. encode only the buy token for\n    //// the first fill.\n    ////   0 -> sell and buy tokens remain unchanged from the previous fill (pure multiplex)\n    ////   1 -> sell token remains unchanged from the previous fill, buy token is encoded (diamond multiplex)\n    ////   2 -> sell token becomes the buy token from the previous fill, new buy token is encoded (multihop)\n    ////   3 -> both sell and buy token are encoded\n    //// Obviously, after encoding the packing key, you encode 0, 1, or 2 tokens (each as 20 bytes),\n    //// as appropriate.\n    //// If the fill is a wrap/unwrap, you're done. Move on to the next fill. If the fill is a swap,\n    //// the following fields are mandatory:\n    //// Fourth, encode the pool address as 20 bytes.\n    //// Fifth, encode the hook data for the fill. Encode the length of the hook data as 3 bytes,\n    //// then append the hook data itself.\n    ////\n    //// Repeat the process for each fill and concatenate the results without padding.\n\n    function sellToBalancerV3(\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encode(\n            uint32(IBalancerV3Vault.unlock.selector),\n            recipient,\n            sellToken,\n            ppm,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            amountOutMin,\n            0\n        );\n        // If, for some insane reason, the first 4 bytes of `recipient` alias the selector for the\n        // only mutative function of Settler (`execute` or `executeMetaTxn`, as appropriate), then\n        // this call will revert. We will encounter a revert in the nested call to\n        // `execute`/`executeMetaTxn` because Settler is reentrancy-locked (this revert is\n        // bubbled). If, instead, it aliases a non-mutative function of Settler, we would encounter\n        // a revert inside `TransientStorage.checkSpentOperatorAndCallback` because the transient\n        // storage slot was not zeroed. This would happen by accident with negligible probability,\n        // and is merely annoying if it does happen.\n        bytes memory encodedBuyAmount =\n            _setOperatorAndCall(address(VAULT), data, uint32(uint256(uint160(recipient)) >> 128), _balV3Callback);\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `balV3UnlockCallback` and that `balV3UnlockCallback` encoded the\n            // buy amount correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function sellToBalancerV3VIP(\n        address recipient,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encodeVIP(\n            uint32(IBalancerV3Vault.unlock.selector),\n            recipient,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            permit,\n            sig,\n            _isForwarded(),\n            amountOutMin,\n            0\n        );\n        // See comment in `sellToBalancerV3` about why `recipient` aliasing a valid selector is\n        // ultimately harmless.\n        bytes memory encodedBuyAmount =\n            _setOperatorAndCall(address(VAULT), data, uint32(uint256(uint160(recipient)) >> 128), _balV3Callback);\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `balV3UnlockCallback` and that `balV3UnlockCallback` encoded the\n            // buy amount correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function _balV3Callback(bytes calldata) private returns (bytes memory) {\n        // `VAULT` doesn't prepend a selector and ABIEncode the payload. It just echoes the decoded\n        // payload verbatim back to us. Therefore, we use `_msgData()` instead of the argument to\n        // this function because `_msgData()` still has the first 4 bytes of the payload attached.\n        return balV3UnlockCallback(_msgData());\n    }\n\n    function _setSwapParams(IBalancerV3Vault.VaultSwapParams memory swapParams, State state, bytes calldata data)\n        private\n        pure\n        returns (bytes calldata)\n    {\n        assembly (\"memory-safe\") {\n            mstore(add(0x20, swapParams), shr(0x60, calldataload(data.offset)))\n            data.offset := add(0x14, data.offset)\n            data.length := sub(data.length, 0x14)\n            // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n        }\n        swapParams.tokenIn = state.sell().token();\n        swapParams.tokenOut = state.buy().token();\n        return data;\n    }\n\n    function _decodeUserdataAndSwap(\n        IBalancerV3Vault.VaultSwapParams memory swapParams,\n        State state,\n        bytes calldata data\n    ) private DANGEROUS_freeMemory returns (bytes calldata) {\n        (data, swapParams.userData) = Decoder.decodeBytes(data);\n        Decoder.overflowCheck(data);\n\n        (uint256 amountIn, uint256 amountOut) = IBalancerV3Vault(msg.sender).unsafeSwap(swapParams);\n        unchecked {\n            // `amountIn` is always exactly `swapParams.amountGiven`\n            NotePtr sell = state.sell();\n            sell.setAmount(sell.amount() - amountIn);\n        }\n\n        // `amountOut` can never get super close to `type(uint256).max` because `VAULT` does its\n        // internal calculations in fixnum with a basis of `1 ether`, giving us a headroom of ~60\n        // bits. However, `state.buy.amount` may be an agglomeration of values returned by ERC4626\n        // vaults, and there is no implicit restriction on those values.\n        NotePtr buy = state.buy();\n        buy.setAmount(buy.amount() + amountOut);\n        assembly (\"memory-safe\") {\n            mstore(add(0xc0, swapParams), 0x60)\n        }\n\n        return data;\n    }\n\n    function _erc4626WrapUnwrap(IBalancerV3Vault.BufferWrapOrUnwrapParams memory wrapParams, State state) private {\n        (uint256 amountIn, uint256 amountOut) = IBalancerV3Vault(msg.sender).unsafeErc4626BufferWrapOrUnwrap(wrapParams);\n        unchecked {\n            // `amountIn` is always exactly `wrapParams.amountGiven`\n            NotePtr sell = state.sell();\n            sell.setAmount(sell.amount() - amountIn);\n        }\n        // `amountOut` may depend on the behavior of the ERC4626 vault. We can make no assumptions\n        // about the reasonableness of the range of values that may be returned.\n        NotePtr buy = state.buy();\n        buy.setAmount(buy.amount() + amountOut);\n    }\n\n    function _balV3Pay(\n        IERC20 sellToken,\n        address payer,\n        uint256 sellAmount,\n        ISignatureTransfer.PermitTransferFrom calldata permit,\n        bool isForwarded,\n        bytes calldata sig\n    ) private returns (uint256) {\n        if (payer == address(this)) {\n            if (sellAmount != 0) {\n                _checkRecipient(address(this), msg.sender, sellToken);\n                sellToken.safeTransfer(msg.sender, sellAmount);\n            }\n        } else {\n            // assert(payer == address(0));\n            ISignatureTransfer.SignatureTransferDetails memory transferDetails =\n                ISignatureTransfer.SignatureTransferDetails({to: msg.sender, requestedAmount: sellAmount});\n            _transferFrom(permit, transferDetails, sig, isForwarded);\n        }\n        return IBalancerV3Vault(msg.sender).unsafeSettle(sellToken, sellAmount);\n    }\n\n    // the mandatory fields are\n    // 3 - sell ppm\n    // 1 - pool key tokens case\n    uint256 private constant _HOP_DATA_LENGTH = 4;\n\n    function balV3UnlockCallback(bytes calldata data) private returns (bytes memory) {\n        address recipient;\n        uint256 minBuyAmount;\n        uint256 hashMul;\n        uint256 hashMod;\n        bool feeOnTransfer;\n        address payer;\n        (data, recipient, minBuyAmount, hashMul, hashMod, feeOnTransfer, payer) = Decoder.decodeHeader(data);\n\n        // Set up `state` and `notes`. The other values are ancillary and might be used when we need\n        // to settle global sell token debt at the end of swapping.\n        (\n            bytes calldata newData,\n            State state,\n            NotesLib.Note[] memory notes,\n            ISignatureTransfer.PermitTransferFrom calldata permit,\n            bool isForwarded,\n            bytes calldata sig\n        ) = Decoder.initialize(data, hashMul, hashMod, payer);\n        {\n            NotePtr globalSell = state.globalSell();\n            if (payer != address(this)) {\n                globalSell.setAmount(\n                    _permitToSellAmountCalldata(\n                        address(0) /* sentinel for `_msgSender()` */,\n                        permit\n                    )\n                );\n            }\n            if (feeOnTransfer) {\n                globalSell.setAmount(\n                    _balV3Pay(globalSell.token(), payer, globalSell.amount(), permit, isForwarded, sig)\n                );\n            }\n            state.setGlobalSellAmount(globalSell.amount());\n        }\n        state.checkZeroSellAmount();\n        data = newData;\n\n        IBalancerV3Vault.BufferWrapOrUnwrapParams memory wrapParams;\n        /*\n        wrapParams.kind = IBalancerV3Vault.SwapKind.EXACT_IN;\n        wrapParams.limit = 0; // TODO: price limits for partial filling\n        */\n\n        // We position `swapParams` at the end of allocated memory so that when we `calldatacopy`\n        // the `userData`, it ends up contiguous\n        IBalancerV3Vault.VaultSwapParams memory swapParams;\n        /*\n        swapParams.kind = IBalancerV3Vault.SwapKind.EXACT_IN;\n        swapParams.limit = 0; // TODO: price limits for partial filling\n        */\n\n        while (data.length >= _HOP_DATA_LENGTH) {\n            uint256 ppm;\n            {\n                uint256 _basis = BASIS;\n                assembly (\"memory-safe\") {\n                    ppm := shr(0xe8, calldataload(data.offset))\n                    if gt(and(0x3fffff, ppm), _basis) {\n                        mstore(0x00, 0x4e487b71) // selector for `Panic(uint256)`\n                        mstore(0x20, 0x11) // arithmetic overflow\n                        revert(0x1c, 0x24)\n                    }\n\n                    data.offset := add(0x03, data.offset)\n                    data.length := sub(data.length, 0x03)\n                    // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n                }\n            }\n            data = Decoder.updateState(state, notes, data);\n\n            if (ppm & 0xc00000 == 0) {\n                data = _setSwapParams(swapParams, state, data);\n                unchecked {\n                    swapParams.amountGiven = (state.sell().amount() * ppm).unsafeDiv(BASIS);\n                }\n                data = _decodeUserdataAndSwap(swapParams, state, data);\n            } else {\n                Decoder.overflowCheck(data);\n\n                if (ppm & 0x400000 == 0) {\n                    wrapParams.direction = IBalancerV3Vault.WrappingDirection.WRAP;\n                    wrapParams.wrappedToken = IERC4626(address(state.buy().token()));\n                } else {\n                    wrapParams.direction = IBalancerV3Vault.WrappingDirection.UNWRAP;\n                    wrapParams.wrappedToken = IERC4626(address(state.sell().token()));\n                }\n                ppm &= 0x3fffff;\n                unchecked {\n                    wrapParams.amountGiven = (state.sell().amount() * ppm).unsafeDiv(BASIS);\n                }\n\n                _erc4626WrapUnwrap(wrapParams, state);\n            }\n        }\n\n        // `data` has been consumed. All that remains is to settle out the net result of all the\n        // swaps. Any credit in any token other than `state.buy.token` will be swept to\n        // Settler. `state.buy.token` will be sent to `recipient`.\n        {\n            NotePtr globalSell = state.globalSell();\n            (IERC20 globalSellToken, uint256 globalSellAmount) = (globalSell.token(), globalSell.amount());\n            _checkRecipient(\n                msg.sender, recipient, _recipientCheckNeedsToken() ? state.buy().token() : IERC20(address(0))\n            );\n            uint256 globalBuyAmount =\n                Take.take(state, notes, uint32(IBalancerV3Vault.sendTo.selector), recipient, minBuyAmount);\n            if (feeOnTransfer) {\n                // We've already transferred the sell token to the vault and\n                // `settle`'d. `globalSellAmount` is the verbatim credit in that token stored by the\n                // vault. We only need to handle the case of incomplete filling.\n                if (globalSellAmount != 0) {\n                    address refundRecipient = payer == address(this) ? address(this) : _msgSender();\n                    _checkRecipient(msg.sender, refundRecipient, globalSellToken);\n                    Take._callSelector(\n                        uint32(IBalancerV3Vault.sendTo.selector), globalSellToken, refundRecipient, globalSellAmount\n                    );\n                }\n            } else {\n                // While `notes` records a credit value, the vault actually records a debt for the\n                // global sell token. We recover the exact amount of that debt and then pay it.\n                // `globalSellAmount` is _usually_ zero, but if it isn't it represents a partial\n                // fill. This subtraction recovers the actual debt recorded in the vault.\n                uint256 debt;\n                unchecked {\n                    debt = state.globalSellAmount() - globalSellAmount;\n                }\n                if (debt == 0) {\n                    assembly (\"memory-safe\") {\n                        mstore(0x14, globalSellToken)\n                        mstore(0x00, 0xfb772a88000000000000000000000000) // selector for `ZeroSellAmount(address)` with `globalSellToken`'s padding\n                        revert(0x10, 0x24)\n                    }\n                }\n                _balV3Pay(globalSellToken, payer, debt, permit, isForwarded, sig);\n            }\n\n            bytes memory returndata;\n            assembly (\"memory-safe\") {\n                returndata := mload(0x40)\n                mstore(returndata, 0x20)\n                mstore(add(0x20, returndata), globalBuyAmount)\n                mstore(0x40, add(0x40, returndata))\n            }\n            return returndata;\n        }\n    }\n}\n\n// src/core/MaverickV2.sol\n\n// Maverick AMM V2 is not open-source. The source code was disclosed to the\n// developers of 0x Settler confidentially and recompiled privately. The\n// deployed bytecode inithash matches the privately recompiled inithash.\nbytes32 constant maverickV2InitHash = 0xbb7b783eb4b8ca46925c5384a6b9919df57cb83da8f76e37291f58d0dd5c439a;\n\n// https://docs.mav.xyz/technical-reference/contract-addresses/v2-contract-addresses\n// For chains: mainnet, base, bnb, arbitrum, sepolia\naddress constant maverickV2Factory = 0x0A7e848Aca42d879EF06507Fca0E7b33A0a63c1e;\n\ninterface IMaverickV2Pool {\n    /**\n     * @notice Parameters for swap.\n     * @param amount Amount of the token that is either the input if exactOutput is false\n     * or the output if exactOutput is true.\n     * @param tokenAIn Boolean indicating whether tokenA is the input.\n     * @param exactOutput Boolean indicating whether the amount specified is\n     * the exact output amount (true).\n     * @param tickLimit The furthest tick a swap will execute in. If no limit\n     * is desired, value should be set to type(int32).max for a tokenAIn swap\n     * and type(int32).min for a swap where tokenB is the input.\n     */\n    struct SwapParams {\n        uint256 amount;\n        bool tokenAIn;\n        bool exactOutput;\n        int32 tickLimit;\n    }\n\n    /**\n     * @notice Swap tokenA/tokenB assets in the pool.  The swap user has two\n     * options for funding their swap.\n     * - The user can push the input token amount to the pool before calling\n     * the swap function. In order to avoid having the pool call the callback,\n     * the user should pass a zero-length `data` bytes object with the swap\n     * call.\n     * - The user can send the input token amount to the pool when the pool\n     * calls the `maverickV2SwapCallback` function on the calling contract.\n     * That callback has input parameters that specify the token address of the\n     * input token, the input and output amounts, and the bytes data sent to\n     * the swap function.\n     * @dev  If the users elects to do a callback-based swap, the output\n     * assets will be sent before the callback is called, allowing the user to\n     * execute flash swaps.  However, the pool does have reentrancy protection,\n     * so a swapper will not be able to interact with the same pool again\n     * while they are in the callback function.\n     * @param recipient The address to receive the output tokens.\n     * @param params Parameters containing the details of the swap\n     * @param data Bytes information that gets passed to the callback.\n     */\n    function swap(address recipient, SwapParams calldata params, bytes calldata data)\n        external\n        returns (uint256 amountIn, uint256 amountOut);\n\n    /**\n     * @notice Pool tokenA.  Address of tokenA is such that tokenA < tokenB.\n     */\n    function tokenA() external view returns (IERC20);\n\n    /**\n     * @notice Pool tokenB.\n     */\n    function tokenB() external view returns (IERC20);\n\n    /**\n     * @notice State of the pool.\n     * @param reserveA Pool tokenA balanceOf at end of last operation\n     * @param reserveB Pool tokenB balanceOf at end of last operation\n     * @param lastTwaD8 Value of log time weighted average price at last block.\n     * Value is 8-decimal scale and is in the fractional tick domain.  E.g. a\n     * value of 12.3e8 indicates the TWAP was 3/10ths of the way into the 12th\n     * tick.\n     * @param lastLogPriceD8 Value of log price at last block. Value is\n     * 8-decimal scale and is in the fractional tick domain.  E.g. a value of\n     * 12.3e8 indicates the price was 3/10ths of the way into the 12th tick.\n     * @param lastTimestamp Last block.timestamp value in seconds for latest\n     * swap transaction.\n     * @param activeTick Current tick position that contains the active bins.\n     * @param isLocked Pool isLocked, E.g., locked or unlocked; isLocked values\n     * defined in Pool.sol.\n     * @param binCounter Index of the last bin created.\n     * @param protocolFeeRatioD3 Ratio of the swap fee that is kept for the\n     * protocol.\n     */\n    struct State {\n        uint128 reserveA;\n        uint128 reserveB;\n        int64 lastTwaD8;\n        int64 lastLogPriceD8;\n        uint40 lastTimestamp;\n        int32 activeTick;\n        bool isLocked;\n        uint32 binCounter;\n        uint8 protocolFeeRatioD3;\n    }\n\n    /**\n     * @notice External function to get the state of the pool.\n     */\n    function getState() external view returns (State memory);\n}\n\nlibrary FastMaverickV2Pool {\n    using Ternary for bool;\n    using FastLogic for bool;\n\n    function fastTokenAOrB(IMaverickV2Pool pool, bool tokenAIn) internal view returns (IERC20) {\n        return fastGetToken(\n            address(pool),\n            tokenAIn.ternary(uint32(IMaverickV2Pool.tokenA.selector), uint32(IMaverickV2Pool.tokenB.selector))\n        );\n    }\n\n    function fastEncodeSwap(\n        IMaverickV2Pool,\n        address recipient,\n        uint256 amount,\n        bool tokenAIn,\n        int256 tickLimit,\n        bytes memory swapCallbackData\n    ) internal pure returns (bytes memory data) {\n        assembly (\"memory-safe\") {\n            data := mload(0x40)\n\n            let swapCallbackDataLength := mload(swapCallbackData)\n\n            mcopy(add(0xe4, data), swapCallbackData, add(0x20, swapCallbackDataLength))\n            mstore(add(0xc4, data), 0xc0)\n            mstore(add(0xa4, data), signextend(0x03, tickLimit))\n            mstore(add(0x84, data), 0x00) // exactOutput is false\n            mstore(add(0x64, data), lt(0x00, tokenAIn))\n            mstore(add(0x44, data), amount)\n            mstore(add(0x24, data), recipient)\n            mstore(add(0x10, data), 0x3eece7db000000000000000000000000) // selector for `swap(address,(uint256,bool,bool,int32),bytes)` with `recipient`'s padding\n            mstore(data, add(0xe4, swapCallbackDataLength))\n\n            mstore(0x40, add(0x120, add(data, swapCallbackDataLength)))\n        }\n    }\n\n    function fastGetFromPoolState(IMaverickV2Pool pool, uint256 pos, uint256 sizeBits)\n        internal\n        view\n        returns (uint256 r)\n    {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(0x00, 0x1865c57d) // selector for `getState()`\n            if iszero(staticcall(gas(), pool, 0x1c, 0x04, ptr, 0x120)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            r := mload(add(pos, ptr))\n            if or(gt(0x120, returndatasize()), shr(sizeBits, r)) { revert(0x00, 0x00) }\n        }\n    }\n\n    function fastGetReserveAOrB(IMaverickV2Pool pool, bool tokenAIn) internal view returns (uint128 r) {\n        return uint128(fastGetFromPoolState(pool, (!tokenAIn).toUint() << 5, 128));\n    }\n}\n\ninterface IMaverickV2SwapCallback {\n    function maverickV2SwapCallback(IERC20 tokenIn, uint256 amountIn, uint256 amountOut, bytes calldata data) external;\n}\n\nabstract contract MaverickV2 is SettlerSwapAbstract {\n    using UnsafeMath for uint256;\n    using SafeTransferLib for IERC20;\n    using FastMaverickV2Pool for IMaverickV2Pool;\n    using Ternary for bool;\n    using Revert for bool;\n\n    function _sellToMaverickV2(\n        IMaverickV2Pool pool,\n        address recipient,\n        bool tokenAIn,\n        uint256 amount,\n        int32 tickLimit,\n        uint256 minBuyAmount\n    ) private returns (uint256 buyAmount) {\n        bytes memory data = pool.fastEncodeSwap(recipient, amount, tokenAIn, tickLimit, new bytes(0));\n\n        assembly (\"memory-safe\") {\n            if iszero(call(gas(), pool, 0x00, add(0x20, data), mload(data), 0x00, 0x40)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            buyAmount := mload(0x20)\n        }\n\n        if (buyAmount < minBuyAmount) {\n            revertTooMuchSlippage(pool.fastTokenAOrB(!tokenAIn), minBuyAmount, buyAmount);\n        }\n    }\n\n    function sellToMaverickV2(\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        IMaverickV2Pool pool,\n        bool tokenAIn,\n        int32 tickLimit,\n        uint256 minBuyAmount\n    ) internal returns (uint256 buyAmount) {\n        uint256 sellAmount;\n        if (ppm != 0) {\n            unchecked {\n                // We don't care about phantom overflow here because reserves\n                // are limited to 128 bits. Any token balance that would\n                // overflow here would also break MaverickV2.\n                sellAmount = (sellToken.fastSpendableBalance() * ppm).unsafeDiv(BASIS);\n            }\n            _checkRecipient(address(this), address(pool), sellToken);\n            sellToken.safeTransfer(address(pool), sellAmount);\n        } else {\n            sellAmount = sellToken.fastBalanceOf(address(pool));\n            unchecked {\n                sellAmount -= pool.fastGetReserveAOrB(tokenAIn);\n            }\n        }\n        _checkRecipient(\n            address(pool), recipient, _recipientCheckNeedsToken() ? pool.fastTokenAOrB(!tokenAIn) : IERC20(address(0))\n        );\n        return _sellToMaverickV2(pool, recipient, tokenAIn, sellAmount, tickLimit, minBuyAmount);\n    }\n}\n\n// src/core/Permit2Payment.sol\n\nISignatureTransfer constant PERMIT2 = ISignatureTransfer(0x000000000022D473030F116dDEE9F6B43aC78BA3);\n\nlibrary FunctionPointerChecker {\n    function isNull(function(bytes calldata) internal returns (bytes memory) callback) internal pure returns (bool r) {\n        assembly (\"memory-safe\") {\n            r := iszero(callback)\n        }\n    }\n}\n\nlibrary TransientStorage {\n    // bytes32((uint256(keccak256(\"operator slot\")) - 1) & type(uint96).max)\n    bytes32 private constant _OPERATOR_SLOT = 0x0000000000000000000000000000000000000000cdccd5c65a7d4860ce3abbe9;\n    // bytes32((uint256(keccak256(\"witness slot\")) - 1) & type(uint96).max)\n    bytes32 private constant _WITNESS_SLOT = 0x0000000000000000000000000000000000000000c7aebfbc05485e093720deaa;\n    // bytes32((uint256(keccak256(\"payer slot\")) - 1) & type(uint96).max)\n    bytes32 private constant _PAYER_SLOT = 0x0000000000000000000000000000000000000000cd1e9517bb0cb8d0d5cde893;\n\n    // We assume (and our CI enforces) that internal function pointers cannot be\n    // greater than 2 bytes. On chains not supporting the ViaIR pipeline, not\n    // supporting EOF, and where the Spurious Dragon size limit is not enforced,\n    // it might be possible to violate this assumption. However, our\n    // `foundry.toml` enforces the use of the IR pipeline, so the point is moot.\n    //\n    // `operator` must not be `address(0)`. This is not checked.\n    // `callback` must not be zero. This is checked in `fallback`.\n    function setOperatorAndCallback(\n        address operator,\n        uint32 selector,\n        function(bytes calldata) internal returns (bytes memory) callback\n    ) internal {\n        address payer = getPayer();\n        assembly (\"memory-safe\") {\n            if iszero(shl(0x60, xor(payer, operator))) {\n                mstore(0x00, 0xe758b8d5) // selector for `ConfusedDeputy()`\n                revert(0x1c, 0x04)\n            }\n            let slotValue := tload(_OPERATOR_SLOT)\n            if slotValue {\n                // It should be impossible to reach this error because the first thing the fallback\n                // does is clear the operator. It's also not possible to reenter the entrypoint\n                // function because `_PAYER_SLOT` is an implicit reentrancy guard.\n                mstore(0x00, 0xab7646c4) // selector for `ReentrantCallback(uint256)`\n                mstore(0x20, slotValue)\n                revert(0x1c, 0x24)\n            }\n\n            tstore(\n                _OPERATOR_SLOT,\n                or(\n                    shl(0xe0, selector),\n                    or(shl(0xa0, and(0xffff, callback)), and(0xffffffffffffffffffffffffffffffffffffffff, operator))\n                )\n            )\n        }\n    }\n\n    function checkSpentOperatorAndCallback() internal view {\n        assembly (\"memory-safe\") {\n            let slotValue := tload(_OPERATOR_SLOT)\n            if slotValue {\n                mstore(0x00, 0xd66fcc38) // selector for `CallbackNotSpent(uint256)`\n                mstore(0x20, slotValue)\n                revert(0x1c, 0x24)\n            }\n        }\n    }\n\n    function clearOperatorAndCallback() internal {\n        assembly (\"memory-safe\") {\n            tstore(_OPERATOR_SLOT, 0x00)\n        }\n    }\n\n    function getAndClearCallback()\n        internal\n        returns (function(bytes calldata) internal returns (bytes memory) callback)\n    {\n        assembly (\"memory-safe\") {\n            let slotValue := tload(_OPERATOR_SLOT)\n            let success :=\n                iszero(or(shr(0xe0, xor(calldataload(0x00), slotValue)), shl(0x60, xor(caller(), slotValue))))\n            callback := mul(and(0xffff, shr(0xa0, slotValue)), success)\n            if success {\n                tstore(_OPERATOR_SLOT, 0x00)\n            }\n        }\n    }\n\n    // `newWitness` must not be `bytes32(0)`. This is not checked.\n    function setWitness(bytes32 newWitness) internal {\n        assembly (\"memory-safe\") {\n            let slotValue := tload(_WITNESS_SLOT)\n            if slotValue {\n                // It should be impossible to reach this error because the first thing a\n                // metatransaction does on entry is to spend the `witness` (either directly or via a\n                // callback)\n                mstore(0x00, 0x9936cbab) // selector for `ReentrantMetatransaction(bytes32)`\n                mstore(0x20, slotValue)\n                revert(0x1c, 0x24)\n            }\n\n            tstore(_WITNESS_SLOT, newWitness)\n        }\n    }\n\n    function checkSpentWitness() internal view {\n        assembly (\"memory-safe\") {\n            let slotValue := tload(_WITNESS_SLOT)\n            if slotValue {\n                mstore(0x00, 0xe25527c2) // selector for `WitnessNotSpent(bytes32)`\n                mstore(0x20, slotValue)\n                revert(0x1c, 0x24)\n            }\n        }\n    }\n\n    function getAndClearWitness() internal returns (bytes32 witness) {\n        assembly (\"memory-safe\") {\n            witness := tload(_WITNESS_SLOT)\n            tstore(_WITNESS_SLOT, 0x00)\n        }\n    }\n\n    function setPayer(address payer) internal {\n        assembly (\"memory-safe\") {\n            if iszero(shl(0x60, payer)) {\n                mstore(0x00, 0xe758b8d5) // selector for `ConfusedDeputy()`\n                revert(0x1c, 0x04)\n            }\n            let slotValue := tload(_PAYER_SLOT)\n            if shl(0x60, slotValue) {\n                mstore(0x14, slotValue)\n                mstore(0x00, 0x7407c0f8000000000000000000000000) // selector for `ReentrantPayer(address)` with `oldPayer`'s padding\n                revert(0x10, 0x24)\n            }\n\n            tstore(_PAYER_SLOT, and(0xffffffffffffffffffffffffffffffffffffffff, payer))\n        }\n    }\n\n    function getPayer() internal view returns (address payer) {\n        assembly (\"memory-safe\") {\n            payer := tload(_PAYER_SLOT)\n        }\n    }\n\n    function setAttested() internal {\n        // transient[payerSlot] |= 1 << 160\n        assembly (\"memory-safe\") {\n            tstore(_PAYER_SLOT, or(shl(0xa0, 0x01), tload(_PAYER_SLOT)))\n        }\n    }\n\n    function getAttestedPayer() internal view returns (address payer) {\n        bool attested;\n        // payer = address(word); attested = bool((word >> 160) & 1)\n        assembly (\"memory-safe\") {\n            payer := tload(_PAYER_SLOT)\n            attested := and(0x01, shr(0xa0, payer))\n        }\n        // `attested == true` implies `payer != address(0)`\n        require(attested);\n    }\n\n    function clearPayer(address expectedOldPayer) internal {\n        address oldPayer = getPayer();\n        assembly (\"memory-safe\") {\n            if shl(0x60, xor(oldPayer, expectedOldPayer)) {\n                mstore(0x00, 0x5149e795) // selector for `PayerSpent()`\n                revert(0x1c, 0x04)\n            }\n            tstore(_PAYER_SLOT, 0x00)\n        }\n    }\n}\n\nabstract contract Permit2PaymentBase is Context, SettlerAbstract {\n    using FastLogic for bool;\n    using Revert for bool;\n\n    function _isRestrictedTarget(address target) internal view virtual override returns (bool) {\n        return (target == address(PERMIT2)).or(super._isRestrictedTarget(target));\n    }\n\n    function _operator() internal view virtual override returns (address) {\n        return super._msgSender();\n    }\n\n    function _msgSender() internal view virtual override(AbstractContext, Context) returns (address) {\n        return TransientStorage.getPayer();\n    }\n\n    /// @dev You must ensure that `target` is derived by hashing trusted initcode or another\n    ///      equivalent mechanism that guarantees \"reasonable\"ness. `target` must not be\n    ///      user-supplied or attacker-controlled. This is required for security and is not checked\n    ///      here. For example, it must not do something weird like modifying the spender (possibly\n    ///      setting it to itself). If the callback is expected to relay a\n    ///      `ISignatureTransfer.PermitTransferFrom` struct, then the computation of `target` using\n    ///      the trusted initcode (or equivalent) must ensure that that calldata is relayed\n    ///      unmodified. The library function `AddressDerivation.deriveDeterministicContract` is\n    ///      recommended.\n    function _setOperatorAndCall(\n        address payable target,\n        uint256 value,\n        bytes memory data,\n        uint32 selector,\n        function(bytes calldata) internal returns (bytes memory) callback\n    ) internal returns (bytes memory) {\n        TransientStorage.setOperatorAndCallback(target, selector, callback);\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        success.maybeRevert(returndata);\n        TransientStorage.checkSpentOperatorAndCallback();\n        return returndata;\n    }\n\n    function _setOperatorAndCall(\n        address target,\n        bytes memory data,\n        uint32 selector,\n        function(bytes calldata) internal returns (bytes memory) callback\n    ) internal override returns (bytes memory) {\n        return _setOperatorAndCall(payable(target), 0, data, selector, callback);\n    }\n\n    /// @dev Revert-tolerant variant of `_setOperatorAndCall` for trial calls: the call runs under\n    ///      an explicit gas limit and failure returns `false` instead of bubbling. Returndata is\n    ///      left uncopied so a failed call cannot charge the caller for large revert data. The\n    ///      trust requirements on `target` above apply here too.\n    function _setOperatorAndTryCall(\n        address target,\n        bytes memory data,\n        uint32 selector,\n        function(bytes calldata) internal returns (bytes memory) callback,\n        uint256 gasLimit\n    ) internal override returns (bool success) {\n        TransientStorage.setOperatorAndCallback(target, selector, callback);\n        assembly (\"memory-safe\") {\n            success := call(gasLimit, target, 0x00, add(0x20, data), mload(data), 0x00, 0x00)\n        }\n        if (success) {\n            TransientStorage.checkSpentOperatorAndCallback();\n        } else {\n            // The failed call reverted its own tstore changes but not ours.\n            TransientStorage.clearOperatorAndCallback();\n        }\n    }\n}\n\nabstract contract Permit2Payment is Permit2PaymentBase {\n    using FunctionPointerChecker for function(bytes calldata) internal returns (bytes memory);\n\n    fallback(bytes calldata) external returns (bytes memory) {\n        function(bytes calldata) internal returns (bytes memory) callback = TransientStorage.getAndClearCallback();\n        bytes calldata data = _msgData();\n        if (callback.isNull()) {\n            (bool success, bytes memory returndata) = _fallback(data);\n            require(success);\n            return returndata;\n        } else {\n            assembly (\"memory-safe\") {\n                data.offset := add(0x04, data.offset)\n                data.length := sub(data.length, 0x04)\n            }\n            return callback(data);\n        }\n    }\n\n    function _permitToTransferDetails(\n        address owner,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        address recipient\n    )\n        internal\n        view\n        override\n        returns (ISignatureTransfer.SignatureTransferDetails memory transferDetails, uint256 sellAmount)\n    {\n        transferDetails.to = recipient;\n        transferDetails.requestedAmount = sellAmount = _permitToSellAmount(owner, permit);\n    }\n\n    // This function is provided *EXCLUSIVELY* for use here and in RfqOrderSettlement. Any other use\n    // of this function is forbidden. You must use the version that does *NOT* take a `from` or\n    // `witness` argument.\n    function _transferFromIKnowWhatImDoing(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        address from,\n        bytes32 witness,\n        string memory witnessTypeString,\n        bytes memory sig,\n        bool isForwarded\n    ) internal override {\n        // Maker and callback payments do not use the direct transfer action, so their recipient\n        // policy is checked here.\n        _checkRecipient(from, transferDetails.to, IERC20(permit.permitted.token));\n        if (isForwarded) {\n            assembly (\"memory-safe\") {\n                mstore(0x00, 0x1c500e5c) // selector for `ForwarderNotAllowed()`\n                revert(0x1c, 0x04)\n            }\n        }\n\n        // This is effectively\n        /*\n        PERMIT2.permitWitnessTransferFrom(permit, transferDetails, from, witness, witnessTypeString, sig);\n        */\n        // but it's written in assembly for contract size reasons. This produces a non-strict ABI\n        // encoding (https://docs.soliditylang.org/en/v0.8.25/abi-spec.html#strict-encoding-mode),\n        // but it's fine because Solidity's ABI *decoder* will handle anything that is validly\n        // encoded, strict or not.\n\n        // Solidity won't let us reference the constant `PERMIT2` in assembly, but this compiles\n        // down to just a single PUSH opcode just before the CALL, with optimization turned on.\n        ISignatureTransfer _PERMIT2 = PERMIT2;\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x137c29fe) // selector for `permitWitnessTransferFrom(((address,uint256),uint256,uint256),(address,uint256),address,bytes32,string,bytes)`\n\n            // The layout of nested structs in memory is different from that in calldata. We have to\n            // chase the pointer to `permit.permitted`.\n            mcopy(add(0x20, ptr), mload(permit), 0x40)\n            // The rest of the members of `permit` are laid out linearly,\n            mcopy(add(0x60, ptr), add(0x20, permit), 0x40)\n            // as are the members of `transferDetails.\n            mcopy(add(0xa0, ptr), transferDetails, 0x40)\n            // Because we're passing `from` on the stack, it must be cleaned.\n            mstore(add(0xe0, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, from))\n            mstore(add(0x100, ptr), witness)\n            mstore(add(0x120, ptr), 0x140) // Offset to `witnessTypeString` (the end of of the non-dynamic types)\n            let witnessTypeStringLength := mload(witnessTypeString)\n            mstore(add(0x140, ptr), add(0x160, witnessTypeStringLength)) // Offset to `sig` (past the end of `witnessTypeString`)\n\n            // Now we encode the 2 dynamic objects, `witnessTypeString` and `sig`.\n            mcopy(add(0x160, ptr), witnessTypeString, add(0x20, witnessTypeStringLength))\n            let sigLength := mload(sig)\n            mcopy(add(0x180, add(ptr, witnessTypeStringLength)), sig, add(0x20, sigLength))\n\n            // We don't need to check that Permit2 has code, and it always signals failure by\n            // reverting.\n            if iszero(\n                call(\n                    gas(),\n                    _PERMIT2,\n                    0x00,\n                    add(0x1c, ptr),\n                    add(0x184, add(witnessTypeStringLength, sigLength)),\n                    0x00,\n                    0x00\n                )\n            ) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n        }\n    }\n\n    // See comment in above overload; don't use this function\n    function _transferFromIKnowWhatImDoing(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        address from,\n        bytes32 witness,\n        string memory witnessTypeString,\n        bytes memory sig\n    ) internal override {\n        _transferFromIKnowWhatImDoing(permit, transferDetails, from, witness, witnessTypeString, sig, _isForwarded());\n    }\n\n    function _transferFrom(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        bytes memory sig\n    ) internal override {\n        _transferFrom(permit, transferDetails, sig, _isForwarded());\n    }\n}\n\n// DANGER: the order of the base contracts here is very significant for the use of `super` below\n// (and in derived contracts). Do not change this order.\nabstract contract Permit2PaymentTakerSubmitted is AllowanceHolderContext, Permit2Payment {\n    using SafeTransferLib for IERC20;\n    using FastLogic for bool;\n\n    constructor() {\n        assert(!_hasMetaTxn());\n    }\n\n    function _permitToSellAmountCalldata(address owner, ISignatureTransfer.PermitTransferFrom calldata permit)\n        internal\n        view\n        override\n        returns (uint256 sellAmount)\n    {\n        sellAmount = permit.permitted.amount;\n        if (~sellAmount < BASIS) {\n            if (owner == address(0)) { // sentinel for `_msgSender()` to avoid extra TLOAD\n                unchecked {\n                    sellAmount = BASIS - ~sellAmount;\n                }\n                sellAmount = tmp().omul(IERC20(permit.permitted.token).fastBalanceOf(_msgSender()), sellAmount)\n                    .unsafeDiv(BASIS);\n            }\n        }\n    }\n\n    function _permitToSellAmount(address owner, ISignatureTransfer.PermitTransferFrom memory permit)\n        internal\n        view\n        override\n        returns (uint256 sellAmount)\n    {\n        sellAmount = permit.permitted.amount;\n        if (~sellAmount < BASIS) {\n            if (owner == address(0)) { // sentinel for `_msgSender()` to avoid extra TLOAD\n                unchecked {\n                    sellAmount = BASIS - ~sellAmount;\n                }\n                sellAmount = tmp().omul(IERC20(permit.permitted.token).fastBalanceOf(_msgSender()), sellAmount)\n                    .unsafeDiv(BASIS);\n            }\n        }\n    }\n\n    function _isRestrictedTarget(address target) internal view virtual override returns (bool) {\n        return (target == address(ALLOWANCE_HOLDER)).or(super._isRestrictedTarget(target));\n    }\n\n    function _transferFrom(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        bytes memory sig,\n        bool isForwarded\n    ) internal override {\n        // Pool callbacks also need recipient validation for both Permit2 and AllowanceHolder\n        // payments. Keeping payer reads in the transfer branches avoids extra gas when recipient\n        // checks are disabled.\n        address from;\n        if (_hasRecipientCheck()) {\n            from = _msgSender();\n            _checkRecipient(from, transferDetails.to, IERC20(permit.permitted.token));\n        }\n        if (isForwarded) {\n            if (sig.length != 0) {\n                assembly (\"memory-safe\") {\n                    mstore(0x00, 0xc321526c) // selector for `InvalidSignatureLen()`\n                    revert(0x1c, 0x04)\n                }\n            }\n            if (permit.nonce != 0) Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n            if (block.timestamp > permit.deadline) {\n                assembly (\"memory-safe\") {\n                    mstore(0x00, 0xcd21db4f) // selector for `SignatureExpired(uint256)`\n                    mstore(0x20, mload(add(0x40, permit)))\n                    revert(0x1c, 0x24)\n                }\n            }\n            // we don't check `requestedAmount` because it's checked by AllowanceHolder itself\n            _allowanceHolderTransferFrom(\n                permit.permitted.token,\n                _hasRecipientCheck() ? from : _msgSender(),\n                transferDetails.to,\n                transferDetails.requestedAmount\n            );\n        } else {\n            // This is effectively\n            /*\n            PERMIT2.permitTransferFrom(permit, transferDetails, _msgSender(), sig);\n            */\n            // but it's written in assembly for contract size reasons. This produces a non-strict\n            // ABI encoding\n            // (https://docs.soliditylang.org/en/v0.8.25/abi-spec.html#strict-encoding-mode), but\n            // it's fine because Solidity's ABI *decoder* will handle anything that is validly\n            // encoded, strict or not.\n\n            // Solidity won't let us reference the constant `PERMIT2` in assembly, but this\n            // compiles down to just a single PUSH opcode just before the CALL, with optimization\n            // turned on.\n            ISignatureTransfer _PERMIT2 = PERMIT2;\n            if (!_hasRecipientCheck()) {\n                from = _msgSender();\n            }\n            assembly (\"memory-safe\") {\n                let ptr := mload(0x40)\n                mstore(ptr, 0x30f28b7a) // selector for `permitTransferFrom(((address,uint256),uint256,uint256),(address,uint256),address,bytes)`\n\n                // The layout of nested structs in memory is different from that in calldata. We\n                // have to chase the pointer to `permit.permitted`.\n                mcopy(add(0x20, ptr), mload(permit), 0x40)\n                // The rest of the members of `permit` are laid out linearly,\n                mcopy(add(0x60, ptr), add(0x20, permit), 0x40)\n                // as are the members of `transferDetails.\n                mcopy(add(0xa0, ptr), transferDetails, 0x40)\n                // Because we're passing `from` on the stack, it must be cleaned.\n                mstore(add(0xe0, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, from))\n                mstore(add(0x100, ptr), 0x100) // Offset to `sig` (the end of the non-dynamic types)\n\n                // Encode the dynamic object `sig`\n                let sigLength := mload(sig)\n                mcopy(add(0x120, ptr), sig, add(0x20, sigLength))\n\n                // We don't need to check that Permit2 has code, and it always signals failure by\n                // reverting.\n                if iszero(call(gas(), _PERMIT2, 0x00, add(0x1c, ptr), add(0x124, sigLength), 0x00, 0x00)) {\n                    let ptr_ := mload(0x40)\n                    returndatacopy(ptr_, 0x00, returndatasize())\n                    revert(ptr_, returndatasize())\n                }\n            }\n        }\n    }\n\n    function _allowanceHolderTransferFrom(address token, address owner, address recipient, uint256 amount)\n        internal\n        override\n    {\n        // `owner` is always `_msgSender()`\n        // This is effectively\n        /*\n        _ALLOWANCE_HOLDER.transferFrom(token, owner, recipient, amount);\n        */\n        // but it's written in assembly for contract size reasons.\n\n        // Solidity won't let us reference the constant `_ALLOWANCE_HOLDER` in assembly, but this\n        // compiles down to just a single PUSH opcode just before the CALL, with optimization turned\n        // on.\n        address _ALLOWANCE_HOLDER = address(ALLOWANCE_HOLDER);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(add(0x80, ptr), amount)\n            mstore(add(0x60, ptr), recipient)\n            mstore(add(0x4c, ptr), shl(0x60, owner)) // clears `recipient`'s padding\n            mstore(add(0x2c, ptr), shl(0x60, token)) // clears `owner`'s padding\n            mstore(add(0x0c, ptr), 0x15dacbea000000000000000000000000) // selector for `transferFrom(address,address,address,uint256)` with `token`'s padding\n\n            // Although `transferFrom` returns `bool`, we don't need to bother checking the return\n            // value because `AllowanceHolder` always either reverts or returns `true`. We also\n            // don't need to check that it has code.\n            if iszero(call(gas(), _ALLOWANCE_HOLDER, 0x00, add(0x1c, ptr), 0x84, 0x00, 0x00)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n        }\n    }\n\n    modifier takerSubmitted() override {\n        address msgSender = _operator();\n        TransientStorage.setPayer(msgSender);\n        _;\n        TransientStorage.clearPayer(msgSender);\n    }\n\n    modifier metaTx(address, bytes32) override {\n        revert();\n        _;\n    }\n\n    // Solidity inheritance is stupid\n    function _isForwarded()\n        internal\n        view\n        virtual\n        override(AbstractContext, Context, AllowanceHolderContext)\n        returns (bool)\n    {\n        return super._isForwarded();\n    }\n\n    function _msgData()\n        internal\n        view\n        virtual\n        override(AbstractContext, Context, AllowanceHolderContext)\n        returns (bytes calldata)\n    {\n        return super._msgData();\n    }\n\n    function _msgSender() internal view virtual override(AllowanceHolderContext, Permit2PaymentBase) returns (address) {\n        return super._msgSender();\n    }\n}\n\n// DANGER: the order of the base contracts here is very significant for the use of `super` below\n// (and in derived contracts). Do not change this order.\nabstract contract Permit2PaymentMetaTxn is Context, Permit2Payment {\n    constructor() {\n        assert(_hasMetaTxn());\n        assert(\n            keccak256(bytes(Permit2PaymentMetaTxn._witnessTypeSuffix()))\n                == keccak256(\n                    abi.encodePacked(\n                        \"SlippageAndActions slippageAndActions)\", SLIPPAGE_AND_ACTIONS_TYPE, TOKEN_PERMISSIONS_TYPE\n                    )\n                )\n        );\n    }\n\n    function _permitToSellAmountCalldata(address, ISignatureTransfer.PermitTransferFrom calldata permit)\n        internal\n        view\n        virtual\n        override\n        returns (uint256)\n    {\n        return permit.permitted.amount;\n    }\n\n    function _permitToSellAmount(address, ISignatureTransfer.PermitTransferFrom memory permit)\n        internal\n        view\n        virtual\n        override\n        returns (uint256)\n    {\n        return permit.permitted.amount;\n    }\n\n    function _witnessTypeSuffix() internal pure virtual returns (string memory) {\n        return \"SlippageAndActions slippageAndActions)SlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)TokenPermissions(address token,uint256 amount)\";\n    }\n\n    function _transferFrom(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        bytes memory sig,\n        bool isForwarded // must be false\n    ) internal override {\n        bytes32 witness = TransientStorage.getAndClearWitness();\n        if (witness == bytes32(0)) {\n            revertConfusedDeputy();\n        }\n        _transferFromIKnowWhatImDoing(\n            permit, transferDetails, _msgSender(), witness, _witnessTypeSuffix(), sig, isForwarded\n        );\n    }\n\n    function _allowanceHolderTransferFrom(address, address, address, uint256) internal pure override {\n        revertConfusedDeputy();\n    }\n\n    modifier takerSubmitted() override {\n        revert();\n        _;\n    }\n\n    modifier metaTx(address msgSender, bytes32 witness) override {\n        if (_isForwarded()) {\n            assembly (\"memory-safe\") {\n                mstore(0x00, 0x1c500e5c) // selector for `ForwarderNotAllowed()`\n                revert(0x1c, 0x04)\n            }\n        }\n        if (_operator() == msgSender) {\n            revertConfusedDeputy();\n        }\n        TransientStorage.setWitness(witness);\n        TransientStorage.setPayer(msgSender);\n        _;\n        TransientStorage.clearPayer(msgSender);\n        // It should not be possible for this check to revert because the very first thing that a\n        // metatransaction does is spend the witness.\n        TransientStorage.checkSpentWitness();\n    }\n\n    // Solidity inheritance is stupid\n    function _msgSender() internal view virtual override(Context, Permit2PaymentBase) returns (address) {\n        return super._msgSender();\n    }\n}\n\nabstract contract Permit2PaymentIntent is Permit2PaymentMetaTxn {\n    using SafeTransferLib for IERC20;\n\n    constructor() {\n        assert(\n            keccak256(bytes(Permit2PaymentIntent._witnessTypeSuffix()))\n                == keccak256(abi.encodePacked(\"Slippage slippage)\", SLIPPAGE_TYPE, TOKEN_PERMISSIONS_TYPE))\n        );\n    }\n\n    function _witnessTypeSuffix() internal pure virtual override returns (string memory) {\n        return \"Slippage slippage)Slippage(address recipient,address buyToken,uint256 minAmountOut)TokenPermissions(address token,uint256 amount)\";\n    }\n\n    bytes32 private constant _BRIDGE_WALLET_CODEHASH =\n        0xe98f46388916ca2f096ea767dc04dddb45d2ca2c2f44e7bcc529d6aded9c11f0;\n\n    function _toCanonicalSellAmount(address owner, IERC20 token, uint256 sellAmount) private view returns (uint256) {\n        unchecked {\n            if (~sellAmount < BASIS) {\n                if (owner == address(0)) { // sentinel for `_msgSender()` to avoid extra TLOAD\n                    owner = _msgSender();\n                    if (owner.codehash == _BRIDGE_WALLET_CODEHASH) {\n                        sellAmount = BASIS - ~sellAmount;\n                        sellAmount = tmp().omul(token.fastBalanceOf(owner), sellAmount).unsafeDiv(BASIS);\n                    }\n                }\n            }\n        }\n        return sellAmount;\n    }\n\n    function _permitToSellAmountCalldata(address owner, ISignatureTransfer.PermitTransferFrom calldata permit)\n        internal\n        view\n        virtual\n        override\n        returns (uint256 sellAmount)\n    {\n        sellAmount = _toCanonicalSellAmount(owner, IERC20(permit.permitted.token), permit.permitted.amount);\n    }\n\n    function _permitToSellAmount(address owner, ISignatureTransfer.PermitTransferFrom memory permit)\n        internal\n        view\n        virtual\n        override\n        returns (uint256 sellAmount)\n    {\n        sellAmount = _toCanonicalSellAmount(owner, IERC20(permit.permitted.token), permit.permitted.amount);\n    }\n}\n\n// src/SettlerBase.sol\n\n/// @dev This library's ABIDecoding is more lax than the Solidity ABIDecoder. This library omits index bounds/overflow\n/// checking when accessing calldata arrays for gas efficiency. It also omits checks against `calldatasize()`. This\n/// means that it is possible that `args` will run off the end of calldata and be implicitly padded with zeroes. That we\n/// don't check for overflow means that offsets can be negative. This can also result in `args` that alias other parts\n/// of calldata, or even the `actions` array itself.\nlibrary CalldataDecoder {\n    function decodeCall(bytes[] calldata data, uint256 i)\n        internal\n        pure\n        returns (uint256 selector, bytes calldata args)\n    {\n        assembly (\"memory-safe\") {\n            // initially, we set `args.offset` to the pointer to the length. this is 32 bytes before the actual start of data\n            args.offset := add(\n                data.offset,\n                // We allow the indirection/offset to `calls[i]` to be negative\n                calldataload(i)\n            )\n            // now we load `args.length` and set `args.offset` to the start of data\n            args.length := calldataload(args.offset)\n            args.offset := add(0x20, args.offset)\n\n            // slice off the first 4 bytes of `args` as the selector\n            selector := shr(0xe0, calldataload(args.offset))\n            args.length := sub(args.length, 0x04)\n            args.offset := add(0x04, args.offset)\n        }\n    }\n}\n\nabstract contract SettlerBase is ISettlerBase, Basic, RfqOrderSettlement, UniswapV3Fork, UniswapV2, Velodrome {\n    using SafeTransferLib for IERC20;\n    using UnsafeMath for uint256;\n    using SafeTransferLib for address payable;\n    using FastLogic for bool;\n    using Ternary for bool;\n\n    receive() external payable {}\n\n    function select(bytes calldata data) internal virtual;\n\n    function _chainId() internal pure virtual returns (uint256);\n\n    event GitCommit(bytes20 indexed);\n\n    // When/if you change this, you must make corresponding changes to\n    // `sh/deploy_new_chain.sh` and 'sh/common_deploy_settler.sh' to set\n    // `constructor_args`.\n    constructor(bytes20 gitCommit) {\n        if (block.chainid != 31337) {\n            emit GitCommit(gitCommit);\n            assert(IERC721Owner(DEPLOYER).ownerOf(_tokenId()) == address(this));\n        } else {\n            assert(gitCommit == bytes20(0));\n        }\n    }\n\n    function _div512to256(uint512 n, uint512 d) internal view virtual override returns (uint256) {\n        return n.div(d);\n    }\n\n    function _mandatorySlippageCheck() internal pure virtual returns (bool) {\n        return false;\n    }\n\n    function _hasRecipientCheck() internal pure virtual override returns (bool) {\n        return false;\n    }\n\n    function _recipientCheckNeedsToken() internal pure virtual override returns (bool) {\n        return false;\n    }\n\n    function _checkRecipient(address sender, address recipient, IERC20 buyToken) internal view virtual override {}\n\n    function _checkSlippageAndTransfer(AllowedSlippage memory slippage, bool transferExactLimit) internal {\n        // This final slippage check effectively prohibits custody optimization on the\n        // final hop of every swap. This is gas-inefficient. This is on purpose. Because\n        // ISettlerActions.BASIC could interact with an intents-based settlement\n        // mechanism, we must ensure that the user's want token increase is coming\n        // directly from us instead of from some other form of exchange of value.\n        (address payable recipient, IERC20 buyToken, uint256 minAmountOut) =\n            (slippage.recipient, slippage.buyToken, slippage.minAmountOut);\n        if (_mandatorySlippageCheck()) {\n            require(minAmountOut != 0);\n        } else if ((minAmountOut == 0).and(address(buyToken) == address(0))) {\n            return;\n        }\n        uint256 amountOut = compatSelfBalance(buyToken);\n        if (amountOut < minAmountOut) {\n            revertTooMuchSlippage(buyToken, minAmountOut, amountOut);\n        }\n        amountOut = transferExactLimit.ternary(minAmountOut, amountOut);\n        _checkRecipient(address(this), recipient, buyToken);\n        if (isNative_1(buyToken)) {\n            recipient.safeTransferETH(amountOut);\n        } else {\n            buyToken.safeTransfer(recipient, amountOut.unsafeDec(amountOut > minAmountOut));\n        }\n\n        // zeroize `slippage`\n        assembly (\"memory-safe\") {\n            codecopy(slippage, codesize(), 0x60)\n        }\n    }\n\n    function _dispatch(uint256, uint256 action, bytes calldata data, AllowedSlippage memory)\n        internal\n        virtual\n        override\n        returns (bool)\n    {\n        //// NOTICE: This function has been largely copy/paste'd into\n        //// `src/chains/Mainnet/Common.sol:MainnetMixin._dispatch`. If you make changes here, you\n        //// need to make sure that corresponding changes are made to that function.\n\n        if (action == uint32(ISettlerActions.RFQ.selector)) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory permit,\n                address maker,\n                bytes memory makerSig,\n                IERC20 takerToken,\n                uint256 maxTakerAmount\n            ) = abi.decode(data, (address, ISignatureTransfer.PermitTransferFrom, address, bytes, IERC20, uint256));\n\n            fillRfqOrderSelfFunded(recipient, permit, maker, makerSig, takerToken, maxTakerAmount);\n        } else if (action == uint32(ISettlerActions.UNISWAPV3.selector)) {\n            (address recipient, uint256 ppm, bytes memory path, uint256 amountOutMin) =\n                abi.decode(data, (address, uint256, bytes, uint256));\n\n            sellToUniswapV3(recipient, ppm, path, amountOutMin);\n        } else if (action == uint32(ISettlerActions.UNISWAPV2.selector)) {\n            (address recipient, address sellToken, uint256 ppm, address pool, uint24 swapInfo, uint256 amountOutMin) =\n                abi.decode(data, (address, address, uint256, address, uint24, uint256));\n\n            sellToUniswapV2(recipient, sellToken, ppm, pool, swapInfo, amountOutMin);\n        } else if (action == uint32(ISettlerActions.BASIC.selector)) {\n            (IERC20 sellToken, uint256 ppm, address pool, uint256 offset, bytes memory _data) =\n                abi.decode(data, (IERC20, uint256, address, uint256, bytes));\n\n            basicSellToPool(sellToken, ppm, pool, offset, _data);\n        } else if (action == uint32(ISettlerActions.VELODROME.selector)) {\n            (address recipient, uint256 ppm, IVelodromePair pool, uint24 swapInfo, uint256 minAmountOut) =\n                abi.decode(data, (address, uint256, IVelodromePair, uint24, uint256));\n\n            sellToVelodrome(recipient, ppm, pool, swapInfo, minAmountOut);\n        } else if (action == uint32(ISettlerActions.POSITIVE_SLIPPAGE.selector)) {\n            (address payable recipient, IERC20 token, uint256 expectedAmount, uint256 surplusPpm, uint256 maxPpm) =\n                abi.decode(data, (address, IERC20, uint256, uint256, uint256));\n            _checkRecipient(address(this), recipient, token);\n            uint256 balance = isNative_1(token) ? address(this).balance : token.fastSpendableBalance();\n            if (balance > expectedAmount) {\n                uint256 cap;\n                unchecked {\n                    cap = balance * maxPpm / BASIS;\n                    balance -= expectedAmount;\n                    balance = balance * surplusPpm / BASIS;\n                }\n                balance = (balance > cap).ternary(cap, balance);\n                if (isNative_1(token)) {\n                    recipient.safeTransferETH(balance);\n                } else {\n                    token.safeTransfer(recipient, balance);\n                }\n            }\n        } else if (action == uint32(ISettlerActions.SELECT.selector)) {\n            select(data);\n        } else {\n            return false;\n        }\n        return true;\n    }\n}\n\n// src/core/Select.sol\n\n/// @notice Ordered candidate-route selection by revertable self-calls.\nabstract contract Select is SettlerBase {\n    using SafeTransferLib for IERC20;\n    using UnsafeMath for uint256;\n    using FastLogic for bool;\n    using Ternary for bool;\n    using CalldataDecoder for bytes[];\n\n    // Listing this base after ordinary dispatchers lets candidates bypass actions in more derived contracts.\n    function _dispatch(uint256 i, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        virtual\n        override\n        returns (bool)\n    {\n        return super._dispatch(i, action, data, slippage);\n    }\n\n    // uint32(bytes4(keccak256(\"executeSelected(bytes[],address,uint256,uint256)\")))\n    uint32 private constant _EXECUTE_SELECTED_SELECTOR = 0xa04c36b2;\n\n    // An overestimate of the gas consumed between reading `gas()` and the trial `CALL`, including\n    // the call's own access cost. This bound is the soundness condition for skipping a failed\n    // trial. Adding one failing empty candidate measured 3,603 gas (solc 0.8.34 via-IR,\n    // 2026-08-31), bounding this plumbing from far above; 8192 is more than double that bound.\n    uint256 private constant _SELECT_OVERHEAD_GAS = 8192;\n\n    function _executeSelected(bytes calldata data) private returns (bytes memory empty) {\n        bytes[] calldata actions;\n        IERC20 token;\n        uint256 minOut;\n        uint256 beforeBalance;\n        // Read the callback head without writing memory:\n        //     [0x00 actions offset][0x20 token][0x40 minOut][0x60 beforeBalance][actions length][offsets/actions]\n        // `select` built the head and copied the complete candidate region.\n        assembly (\"memory-safe\") {\n            actions.offset := add(data.offset, calldataload(data.offset))\n            actions.length := calldataload(actions.offset)\n            actions.offset := add(0x20, actions.offset)\n            token := calldataload(add(0x20, data.offset))\n            minOut := calldataload(add(0x40, data.offset))\n            beforeBalance := calldataload(add(0x60, data.offset))\n        }\n        // A candidate can meet its target by liquidating unexpected assets or unexpected amounts of\n        // assets held by Settler. This is outside `SELECT`'s threat model. The slippage check\n        // enforces the taker's minimum.\n        // See https://web.archive.org/web/20240913184335/https://kebabsec.xyz/posts/critical_vulnerability_in_uniswapx/\n        _runActions(actions);\n        uint256 score = compatSelfBalance(token) - beforeBalance;\n        if (score < minOut) {\n            assembly (\"memory-safe\") {\n                mstore(0x00, 0xa55fee2e) // selector for `Shortfall(uint256)`\n                mstore(0x20, score)\n                revert(0x1c, 0x24)\n            }\n        }\n        return empty;\n    }\n\n    function select(bytes calldata data) internal override {\n        uint256 gasCap;\n        IERC20 token;\n        uint256 targetsData;\n        uint256 candsData;\n        uint256 candsLength;\n        uint256 n;\n        bytes memory callData;\n        // Follow and bound both top-level array offsets. The candidate region is copied once after\n        // the callback head, preserving those calldata offsets.\n        assembly (\"memory-safe\") {\n            let dataStart := data.offset\n            let dataEnd := add(dataStart, data.length)\n            let err := lt(dataEnd, dataStart)\n            err := or(gt(0x80, data.length), err)\n            gasCap := calldataload(dataStart)\n            err := or(or(shr(0x40, gasCap), iszero(gasCap)), err)\n            token := calldataload(add(0x20, dataStart))\n            err := or(or(shr(0xa0, token), iszero(token)), err)\n\n            let targetsOffset := calldataload(add(0x40, dataStart))\n            err := or(gt(targetsOffset, sub(data.length, 0x20)), err) // can't be `gt(add(0x20, targetsOffset), data.length)` due to risk of overflow\n            let targetsBase := add(targetsOffset, dataStart)\n            n := calldataload(targetsBase)\n            targetsData := add(0x20, targetsBase)\n            err := or(or(iszero(n), gt(n, shr(0x05, sub(dataEnd, targetsData)))), err)\n\n            let candidatesOffset := calldataload(add(0x60, dataStart))\n            err := or(gt(candidatesOffset, sub(data.length, 0x20)), err)\n            let candidatesBase := add(candidatesOffset, dataStart)\n            candsData := add(0x20, candidatesBase)\n            // `targets` and `candidates` must be the same length. Unequal lengths are valid ABI but\n            // meaningless here.\n            err := or(xor(calldataload(candidatesBase), n), err)\n            err := or(gt(n, shr(0x05, sub(dataEnd, candsData))), err)\n            if err { revert(0x00, 0x00) }\n\n            candsLength := sub(dataEnd, candsData)\n            callData := mload(0x40)\n            let dst := add(0xa4, callData)\n            calldatacopy(dst, candsData, candsLength)\n            mstore(add(0x44, callData), token)\n            mstore(add(0x04, callData), _EXECUTE_SELECTED_SELECTOR)\n            mstore(callData, add(0x84, candsLength))\n            mstore(0x40, add(dst, candsLength))\n        }\n\n        {\n            uint256 beforeBalance = compatSelfBalance(token);\n            // callData.beforeBalance = beforeBalance;\n            assembly (\"memory-safe\") {\n                mstore(add(0x84, callData), beforeBalance)\n            }\n        }\n\n        // A trial is fully funded when EIP-150's clamp still forwards the whole `gasCap` after\n        // `_SELECT_OVERHEAD_GAS` of overhead between the gas measurement and the `CALL`: `C +\n        // floor(C/63)` forwards exactly `C`.\n        uint256 beforeGasThreshold;\n        unchecked {\n            beforeGasThreshold = _SELECT_OVERHEAD_GAS + gasCap + gasCap / 63;\n        }\n\n        uint256 i;\n        while (true) {\n            // Select one candidate in the shared callback buffer by changing only its dynamic\n            // offset and target.\n            assembly (\"memory-safe\") {\n                let offset := calldataload(add(shl(0x05, i), candsData))\n                if gt(offset, sub(candsLength, 0x20)) { revert(0x00, 0x00) }\n                mstore(add(0x24, callData), add(0x80, offset))\n                mstore(add(0x64, callData), calldataload(add(shl(0x05, i), targetsData)))\n            }\n\n            unchecked {\n                i++;\n            }\n            bool isLast = i == n;\n            uint256 beforeGas;\n\n            if (_setOperatorAndTryCall(\n                    address(this),\n                    callData,\n                    _EXECUTE_SELECTED_SELECTOR,\n                    _executeSelected,\n                    (!isLast).ternary(gasCap, beforeGas = gasleft())\n                )) {\n                break;\n            }\n\n            if (isLast.or(beforeGas < beforeGasThreshold)) {\n                // Copy revert reason from returndata to `[ptr, ptr + returndatasize())` and bubble.\n                assembly (\"memory-safe\") {\n                    let ptr := mload(0x40)\n                    returndatacopy(ptr, 0x00, returndatasize())\n                    revert(ptr, returndatasize())\n                }\n            }\n        }\n    }\n\n    function _runActions(bytes[] calldata actions) private {\n        // A nested `CHECK_SLIPPAGE` no-ops against this zeroed struct in taker-submitted Settler.\n        // The other flavors do not dispatch it, so there it reverts only its own trial.\n        AllowedSlippage memory noSlippage;\n        uint256 it;\n        assembly (\"memory-safe\") {\n            it := actions.offset\n        }\n        for (uint256 i; i < actions.length; (i, it) = (i.unsafeInc(), it.unsafeAdd(32))) {\n            (uint256 action, bytes calldata data) = actions.decodeCall(it);\n            bool tooShort;\n            // A length that wrapped in `decodeCall`'s selector slice has upper bits set.\n            assembly (\"memory-safe\") {\n                tooShort := shr(0x40, data.length)\n                data.length := mul(data.length, iszero(tooShort))\n            }\n            // Not `FastLogic.or`: `_dispatch` must not run on the cleared length.\n            if (tooShort || !Select._dispatch(i, action, data, noSlippage)) {\n                revertActionInvalid(i, action, data);\n            }\n        }\n    }\n}\n\n// src/core/Attest.sol\n\nabstract contract Attest is Select {\n    using FastLogic for bool;\n\n    bytes32 private constant _AUTHORITY_SLOT =\n        bytes32(uint256(uint96(uint256(keccak256(\"attestation authority slot\")) - 1)));\n    bytes32 private constant _ATTESTATION_SLOT =\n        bytes32(uint256(uint96(uint256(keccak256(\"attestation metadata slot\")) - 1)));\n    bytes32 private constant _TYPEHASH =\n        keccak256(\"Attestation(address taker,uint256 deadline,bytes12 zid,string appid)\");\n    bytes32 private constant _DOMAIN_TYPEHASH =\n        keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n    bytes32 private constant _NAME_HASH = keccak256(\"0xSettler\");\n    bytes32 private immutable _DOMAIN_SEPARATOR;\n\n    constructor() {\n        _DOMAIN_SEPARATOR = _domainSeparator(_chainId());\n    }\n\n    function _domainSeparator(uint256 chainId) private view returns (bytes32 domain) {\n        bytes32 domainTypeHash = _DOMAIN_TYPEHASH;\n        bytes32 nameHash = _NAME_HASH;\n        // domain = keccak256(abi.encode(domainTypeHash, nameHash, chainId, address(this))).\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(0x00, domainTypeHash)\n            mstore(0x20, nameHash)\n            mstore(0x40, chainId)\n            mstore(0x60, address())\n            domain := keccak256(0x00, 0x80)\n            mstore(0x40, ptr)\n            mstore(0x60, 0x00)\n        }\n    }\n\n    function _dispatch(uint256 i, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        virtual\n        override\n        returns (bool)\n    {\n        if (action == uint32(ISettlerActions.ATTEST.selector)) {\n            (uint256 deadline, bytes32 r, bytes32 vs) = abi.decode(data, (uint256, bytes32, bytes32));\n            _attest(deadline, r, vs);\n            return true;\n        }\n        return super._dispatch(i, action, data, slippage);\n    }\n\n    function _fallback(bytes calldata data) internal virtual override returns (bool success, bytes memory returndata) {\n        if (bytes4(data) == IAttestation.attestation.selector) {\n            return (true, attestation());\n        }\n        return super._fallback(data);\n    }\n\n    function _attest(uint256 deadline, bytes32 r, bytes32 vs) private {\n        // The free memory pointer is restored by hand because `FreeMemory` cannot be a base of this\n        // contract: chain mixins linearize it between `SettlerBase` and `SettlerBase`'s parents.\n        uint256 freeMemPtr;\n        assembly (\"memory-safe\") {\n            freeMemPtr := mload(0x40)\n        }\n        if ((block.timestamp > deadline).or(deadline >> 40 != 0)) {\n            assembly (\"memory-safe\") {\n                mstore(0x00, 0xcd21db4f) // selector for `SignatureExpired(uint256)`\n                mstore(0x20, deadline)\n                revert(0x1c, 0x24)\n            }\n        }\n        bytes32 metadata;\n        // Every swap entrypoint has this argument at the same offset:\n        // metadata = abi.decode(msg.data[132:164], (bytes32)).\n        assembly (\"memory-safe\") {\n            metadata := calldataload(0x84)\n        }\n        address taker = _msgSender();\n        string memory appid = Cuid.decode(uint128(uint256(metadata)));\n        bytes32 typeHash = _TYPEHASH;\n        bytes32 domain = block.chainid == _chainId() ? _DOMAIN_SEPARATOR : _domainSeparator(block.chainid);\n        address authority;\n        // structHash = keccak256(abi.encode(typeHash, taker, deadline, bytes12(metadata), keccak256(bytes(appid))));\n        // digest = keccak256(abi.encodePacked(hex\"1901\", domain, structHash));\n        // authority = ecrecover(digest, 27 + uint8(uint256(vs) >> 255), r, bytes32(uint256(vs) & (2**255 - 1)));\n        // if (authority == address(0)) revert InvalidSignature();\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, typeHash)\n            mstore(add(0x20, ptr), taker)\n            mstore(add(0x0c, ptr), shl(0x60, typeHash)) // Clears `taker`'s padding.\n            mstore(add(0x40, ptr), deadline)\n            mstore(add(0x60, ptr), shl(0xa0, shr(0xa0, metadata)))\n            mstore(add(0x80, ptr), keccak256(add(0x20, appid), mload(appid)))\n            mstore(0x00, 0x1901)\n            mstore(0x20, domain)\n            mstore(0x40, keccak256(ptr, 0xa0))\n            mstore(0x00, keccak256(0x1e, 0x42))\n            mstore(0x20, add(0x1b, shr(0xff, vs)))\n            mstore(0x40, r)\n            mstore(0x60, and(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, vs))\n            authority := mload(staticcall(gas(), 0x01, 0x00, 0x80, 0x01, 0x20))\n            // Successful recovery returns a 160-bit address in 32 bytes, so the product cannot overflow.\n            if iszero(mul(returndatasize(), authority)) {\n                mstore(0x00, 0x8baa579f) // selector for `InvalidSignature()`\n                revert(0x1c, 0x04)\n            }\n            mstore(0x40, ptr)\n            mstore(0x60, 0x00)\n        }\n        bytes32 authoritySlot = _AUTHORITY_SLOT;\n        bytes32 attestationSlot = _ATTESTATION_SLOT;\n        // transient[authoritySlot] = uint256(uint160(authority)) << 96 | uint256(deadline); transient[attestationSlot] = metadata\n        assembly (\"memory-safe\") {\n            tstore(authoritySlot, or(shl(0x60, authority), and(0xffffffffff, deadline)))\n            tstore(attestationSlot, metadata)\n        }\n        TransientStorage.setAttested();\n        assembly (\"memory-safe\") {\n            mstore(0x40, freeMemPtr)\n        }\n    }\n\n    function attestation() internal view returns (bytes memory result) {\n        address taker = TransientStorage.getAttestedPayer();\n        bytes32 metadata;\n        address authority;\n        uint40 deadline;\n        bytes32 authoritySlot = _AUTHORITY_SLOT;\n        bytes32 attestationSlot = _ATTESTATION_SLOT;\n        // (authority, deadline) = unpack(transient[authoritySlot]); metadata = transient[attestationSlot]\n        assembly (\"memory-safe\") {\n            deadline := tload(authoritySlot)\n            authority := shr(0x60, deadline)\n            metadata := tload(attestationSlot)\n        }\n        // The head is reserved first so that `Cuid.decode`, which allocates at the free memory\n        // pointer, writes the length word and single data word of `appid` (at most 26 bytes)\n        // directly into the tail\n        // result = abi.encode(taker, bytes12(metadata), appid, authority, deadline).\n        assembly (\"memory-safe\") {\n            result := mload(0x40)\n            mstore(0x40, add(0xc0, result))\n        }\n        Cuid.decode(uint128(uint256(metadata)));\n        assembly (\"memory-safe\") {\n            mstore(result, 0xe0)\n            mstore(add(0x20, result), taker)\n            mstore(add(0x0c, result), shl(0x60, 0xe0)) // Clears `taker`'s padding.\n            mstore(add(0xa0, result), and(0xffffffffff, deadline))\n            mstore(add(0x80, result), authority)\n            mstore(add(0x6c, result), shl(0x60, 0xa0)) // Offset to `appid`; clears `authority`'s padding.\n            mstore(add(0x40, result), metadata)\n            mstore(add(0x4c, result), 0x00) // Clears `zid`'s padding and the offset's high bytes.\n        }\n    }\n}\n\n// src/Settler.sol\n\nabstract contract Settler is ISettlerTakerSubmitted, Permit2PaymentTakerSubmitted, SettlerBase, Permit {\n    using UnsafeMath for uint256;\n    using CalldataDecoder for bytes[];\n    using Revert for bool;\n    using FastLogic for bool;\n\n    function _tokenId() internal pure override returns (uint256) {\n        return 2;\n    }\n\n    function _hasMetaTxn() internal pure override returns (bool) {\n        return false;\n    }\n\n    function _dispatch(uint256 i, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        virtual\n        override\n        returns (bool)\n    {\n        if (super._dispatch(i, action, data, slippage)) {\n            return true;\n        } else if (action == uint32(ISettlerActions.NATIVE_CHECK.selector)) {\n            (uint256 deadline, uint256 msgValue) = abi.decode(data, (uint256, uint256));\n            if (block.timestamp > deadline) {\n                assembly (\"memory-safe\") {\n                    mstore(0x00, 0xcd21db4f) // selector for `SignatureExpired(uint256)`\n                    mstore(0x20, deadline)\n                    revert(0x1c, 0x24)\n                }\n            }\n            if (msg.value > msgValue) {\n                assembly (\"memory-safe\") {\n                    mstore(0x00, 0x4a094431) // selector for `MsgValueMismatch(uint256,uint256)`\n                    mstore(0x20, msgValue)\n                    mstore(0x40, callvalue())\n                    revert(0x1c, 0x44)\n                }\n            }\n        } else if (action == uint32(ISettlerActions.CHECK_SLIPPAGE.selector)) {\n            _checkSlippageAndTransfer(slippage, abi.decode(data, (bool)));\n        } else {\n            return false;\n        }\n        return true;\n    }\n\n    function _dispatchVIP(uint256 action, bytes calldata data) internal virtual returns (bool) {\n        if (action == uint32(ISettlerActions.TRANSFER_FROM.selector)) {\n            (address recipient, ISignatureTransfer.PermitTransferFrom memory permit, bytes memory sig) =\n                abi.decode(data, (address, ISignatureTransfer.PermitTransferFrom, bytes));\n            (ISignatureTransfer.SignatureTransferDetails memory transferDetails,) =\n                _permitToTransferDetails(\n                    address(0) /* sentinel for `_msgSender()` */,\n                    permit,\n                    recipient\n                );\n            _transferFrom(permit, transferDetails, sig);\n        } /*\n        // RFQ_VIP is temporarily removed because Solver has no support for it\n        // When support for RFQ_VIP is reenabled, the tests\n        // testAllowanceHolder_rfq_VIP and testSettler_rfq should be reenabled\n        else if (action == uint32(ISettlerActions.RFQ_VIP.selector)) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory takerPermit,\n                ISignatureTransfer.PermitTransferFrom memory makerPermit,\n                address maker,\n                bytes memory makerSig,\n                bytes memory takerSig\n            ) = abi.decode(\n                data,\n                (\n                    address,\n                    ISignatureTransfer.PermitTransferFrom,\n                    ISignatureTransfer.PermitTransferFrom,\n                    address,\n                    bytes,\n                    bytes\n                )\n            );\n            fillRfqOrderVIP(recipient, makerPermit, maker, makerSig, takerPermit, takerSig);\n        } */ else if (action == uint32(ISettlerActions.UNISWAPV3_VIP.selector)) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory permit,\n                bytes memory path,\n                bytes memory sig,\n                uint256 amountOutMin\n            ) = abi.decode(data, (address, ISignatureTransfer.PermitTransferFrom, bytes, bytes, uint256));\n\n            sellToUniswapV3VIP(recipient, path, permit, sig, amountOutMin);\n        } else {\n            return false;\n        }\n        return true;\n    }\n\n    function execute(\n        AllowedSlippage memory slippage,\n        bytes[] calldata actions,\n        bytes32 /* zid & affiliate */\n    )\n        public\n        payable\n        override\n        takerSubmitted\n        returns (bool)\n    {\n        return _execute(slippage, actions);\n    }\n\n    function executeWithPermit(\n        AllowedSlippage memory slippage,\n        bytes[] calldata actions,\n        bytes32 /* zid & affiliate */,\n        bytes memory permitData\n    ) public payable override takerSubmitted returns (bool) {\n        if (!_isForwarded()) {\n            revertConfusedDeputy();\n        }\n        // `token` should not be a restricted target, but `_isRestrictedTarget(token)` is not\n        // verified because the selectors of supported permit calls doesn't clash with any\n        // selectors of existing restricted targets, namely, AllowanceHolder, Permit2 and Bebop\n        address token;\n        assembly (\"memory-safe\") {\n            // initially, we set `args.offset` to the pointer to the length. this is 32 bytes\n            // before the actual start of data\n            let offset :=\n                add(\n                    actions.offset,\n                    // We allow the indirection/offset to `calls[i]` to be negative\n                    calldataload(actions.offset)\n                )\n            // Check that the action has at least the minimum size to be a VIP\n            // It should be at least (4 bytes action selector, 32 bytes recipient, 128 bytes permit)\n            if or(iszero(actions.length), gt(0xa4, calldataload(offset))) { revert(0x00, 0x00) }\n            // Take the token from the first 32 bytes of permit\n            token := calldataload(add(0x44, offset))\n        }\n        _dispatchPermit(_msgSender(), token, permitData);\n        return _execute(slippage, actions);\n    }\n\n    function _execute(AllowedSlippage memory slippage, bytes[] calldata actions) internal returns (bool) {\n        if (actions.length != 0) {\n            uint256 it;\n            assembly (\"memory-safe\") {\n                it := actions.offset\n            }\n            {\n                (uint256 action, bytes calldata data) = actions.decodeCall(it);\n                if (!_dispatchVIP(action, data)) {\n                    if (!_dispatch(0, action, data, slippage)) {\n                        revertActionInvalid(0, action, data);\n                    }\n                }\n            }\n            it = it.unsafeAdd(32);\n            for (uint256 i = 1; i < actions.length; (i, it) = (i.unsafeInc(), it.unsafeAdd(32))) {\n                (uint256 action, bytes calldata data) = actions.decodeCall(it);\n                if (!_dispatch(i, action, data, slippage)) {\n                    revertActionInvalid(i, action, data);\n                }\n            }\n        }\n\n        _checkSlippageAndTransfer(slippage, false);\n        return true;\n    }\n\n    // Solidity inheritance is stupid\n    function _msgSender()\n        internal\n        view\n        virtual\n        override(Permit2PaymentTakerSubmitted, AbstractContext)\n        returns (address)\n    {\n        return super._msgSender();\n    }\n\n    function _isRestrictedTarget(address target)\n        internal\n        view\n        virtual\n        override(Permit2PaymentTakerSubmitted, Permit2PaymentAbstract)\n        returns (bool)\n    {\n        return super._isRestrictedTarget(target);\n    }\n}\n\n// src/chains/Mainnet/Common.sol\n\n// When these actions are reenabled, reenable the integration tests by setting `curveV2TricryptoPoolId()`\n// import {CurveTricrypto} from \"../../core/CurveTricrypto.sol\";\n\n// Solidity inheritance is stupid\n\nabstract contract MainnetMixin is\n    FreeMemory,\n    SettlerBase,\n    MakerPSM,\n    MaverickV2,\n    //CurveTricrypto,\n    DodoV1,\n    DodoV2,\n    UniswapV4,\n    BalancerV3,\n    EkuboV2,\n    EkuboV3,\n    Bebop\n{\n    using SafeTransferLib for IERC20;\n    using SafeTransferLib for address payable;\n    using FastLogic for bool;\n    using Ternary for bool;\n\n    constructor() {\n        assert(block.chainid == _chainId() || block.chainid == 31337);\n    }\n\n    function _chainId() internal pure override returns (uint256) {\n        return 1;\n    }\n\n    function _dispatch(uint256, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        virtual\n        override(SettlerSwapAbstract, SettlerBase)\n        DANGEROUS_freeMemory\n        returns (bool)\n    {\n        //// NOTICE: we re-implement the base `_dispatch` implementation here so that we can remove\n        //// the `VELODROME` action JUST on this chain because it does little-to-no volume.\n\n        if (action == uint32(ISettlerActions.RFQ.selector)) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory permit,\n                address maker,\n                bytes memory makerSig,\n                IERC20 takerToken,\n                uint256 maxTakerAmount\n            ) = abi.decode(data, (address, ISignatureTransfer.PermitTransferFrom, address, bytes, IERC20, uint256));\n\n            fillRfqOrderSelfFunded(recipient, permit, maker, makerSig, takerToken, maxTakerAmount);\n        } else if (action == uint32(ISettlerActions.UNISWAPV3.selector)) {\n            (address recipient, uint256 ppm, bytes memory path, uint256 amountOutMin) =\n                abi.decode(data, (address, uint256, bytes, uint256));\n\n            sellToUniswapV3(recipient, ppm, path, amountOutMin);\n        } else if (action == uint32(ISettlerActions.UNISWAPV2.selector)) {\n            (address recipient, address sellToken, uint256 ppm, address pool, uint24 swapInfo, uint256 amountOutMin) =\n                abi.decode(data, (address, address, uint256, address, uint24, uint256));\n\n            sellToUniswapV2(recipient, sellToken, ppm, pool, swapInfo, amountOutMin);\n        } else if (action == uint32(ISettlerActions.BASIC.selector)) {\n            (IERC20 sellToken, uint256 ppm, address pool, uint256 offset, bytes memory _data) =\n                abi.decode(data, (IERC20, uint256, address, uint256, bytes));\n\n            basicSellToPool(sellToken, ppm, pool, offset, _data);\n        } /* `VELODROME` is removed */\n        else if (action == uint32(ISettlerActions.POSITIVE_SLIPPAGE.selector)) {\n            (address payable recipient, IERC20 token, uint256 expectedAmount, uint256 surplusPpm, uint256 maxPpm) =\n                abi.decode(data, (address, IERC20, uint256, uint256, uint256));\n            _checkRecipient(address(this), recipient, token);\n            bool isETH = (address(token) == ETH_ADDRESS);\n            uint256 balance = isETH ? address(this).balance : token.fastSpendableBalance();\n            if (balance > expectedAmount) {\n                uint256 cap;\n                unchecked {\n                    cap = balance * maxPpm / BASIS;\n                    balance -= expectedAmount;\n                    balance = balance * surplusPpm / BASIS;\n                }\n                balance = (balance > cap).ternary(cap, balance);\n                if (isETH) {\n                    recipient.safeTransferETH(balance);\n                } else {\n                    token.safeTransfer(recipient, balance);\n                }\n            }\n        } else if (action == uint32(ISettlerActions.UNISWAPV4.selector)) {\n            (\n                address recipient,\n                IERC20 sellToken,\n                uint256 ppm,\n                uint8 forkId,\n                bool feeOnTransfer,\n                uint256 hashMul,\n                uint256 hashMod,\n                bytes memory fills,\n                uint256 amountOutMin\n            ) = abi.decode(data, (address, IERC20, uint256, uint8, bool, uint256, uint256, bytes, uint256));\n\n            sellToUniswapV4(recipient, sellToken, ppm, forkId, feeOnTransfer, hashMul, hashMod, fills, amountOutMin);\n        } else if ((action == uint32(ISettlerActions.BALANCERV3.selector))\n                .or(action == uint32(ISettlerActions.EKUBO.selector))\n                .or(action == uint32(ISettlerActions.EKUBOV3.selector))) {\n            (\n                address recipient,\n                IERC20 sellToken,\n                uint256 ppm,\n                bool feeOnTransfer,\n                uint256 hashMul,\n                uint256 hashMod,\n                bytes memory fills,\n                uint256 amountOutMin\n            ) = abi.decode(data, (address, IERC20, uint256, bool, uint256, uint256, bytes, uint256));\n\n            if (action == uint32(ISettlerActions.BALANCERV3.selector)) {\n                sellToBalancerV3(recipient, sellToken, ppm, feeOnTransfer, hashMul, hashMod, fills, amountOutMin);\n            } else if (action == uint32(ISettlerActions.EKUBO.selector)) {\n                sellToEkuboV2(recipient, sellToken, ppm, feeOnTransfer, hashMul, hashMod, fills, amountOutMin);\n            } else { // if (action == uint32(ISettlerActions.EKUBOV3.selector))\n                sellToEkuboV3(recipient, sellToken, ppm, feeOnTransfer, hashMul, hashMod, fills, amountOutMin);\n            }\n        } else if (action == uint32(ISettlerActions.MAKERPSM.selector)) {\n            (address recipient, uint256 ppm, bool buyGem, uint256 amountOutMin, IPSM psm, IERC20 dai) =\n                abi.decode(data, (address, uint256, bool, uint256, IPSM, IERC20));\n\n            sellToMakerPsm(recipient, ppm, buyGem, amountOutMin, psm, dai);\n        } else if (action == uint32(ISettlerActions.MAVERICKV2.selector)) {\n            (\n                address recipient,\n                IERC20 sellToken,\n                uint256 ppm,\n                IMaverickV2Pool pool,\n                bool tokenAIn,\n                int32 tickLimit,\n                uint256 minBuyAmount\n            ) = abi.decode(data, (address, IERC20, uint256, IMaverickV2Pool, bool, int32, uint256));\n\n            sellToMaverickV2(recipient, sellToken, ppm, pool, tokenAIn, tickLimit, minBuyAmount);\n        } else if (action == uint32(ISettlerActions.BEBOP.selector)) {\n            (\n                address recipient,\n                IERC20 sellToken,\n                ISettlerActions.BebopOrder memory order,\n                ISettlerActions.BebopMakerSignature memory makerSignature,\n                uint256 amountOutMin\n            ) = abi.decode(\n                data, (address, IERC20, ISettlerActions.BebopOrder, ISettlerActions.BebopMakerSignature, uint256)\n            );\n\n            sellToBebop(payable(recipient), sellToken, order, makerSignature, amountOutMin);\n        } else if (action == uint32(ISettlerActions.DODOV2.selector)) {\n            (address recipient, IERC20 sellToken, uint256 ppm, IDodoV2 dodo, bool quoteForBase, uint256 minBuyAmount) =\n                abi.decode(data, (address, IERC20, uint256, IDodoV2, bool, uint256));\n\n            sellToDodoV2(recipient, sellToken, ppm, dodo, quoteForBase, minBuyAmount);\n        } else if (action == uint32(ISettlerActions.DODOV1.selector)) {\n            (IERC20 sellToken, uint256 ppm, IDodoV1 dodo, bool quoteForBase, uint256 minBuyAmount) =\n                abi.decode(data, (IERC20, uint256, IDodoV1, bool, uint256));\n\n            sellToDodoV1(sellToken, ppm, dodo, quoteForBase, minBuyAmount);\n        } else if (action == uint32(ISettlerActions.SELECT.selector)) {\n            select(data);\n        } else {\n            return false;\n        }\n        return true;\n    }\n\n    function _uniV3ForkInfo(uint8 forkId)\n        internal\n        pure\n        override\n        returns (address factory, bytes32 initHash, uint32 callbackSelector)\n    {\n        if (forkId == uniswapV3ForkId) {\n            factory = uniswapV3MainnetFactory;\n            initHash = uniswapV3InitHash;\n            callbackSelector = uint32(IUniswapV3Callback.uniswapV3SwapCallback.selector);\n        } else if (forkId == pancakeSwapV3ForkId) {\n            factory = pancakeSwapV3Factory;\n            initHash = pancakeSwapV3InitHash;\n            callbackSelector = uint32(IPancakeSwapV3Callback.pancakeV3SwapCallback.selector);\n        } else if (forkId == sushiswapV3ForkId) {\n            factory = sushiswapV3MainnetFactory;\n            initHash = uniswapV3InitHash;\n            callbackSelector = uint32(IUniswapV3Callback.uniswapV3SwapCallback.selector);\n        } else if (forkId == rubiconCLMMForkId) {\n            factory = rubiconCLMMFactory;\n            initHash = rubiconCLMMInitHash;\n            callbackSelector = uint32(IUniswapV3Callback.uniswapV3SwapCallback.selector);\n        } else if (forkId == namiForkId) {\n            factory = namiMainnetFactory;\n            initHash = namiInitHash;\n            callbackSelector = uint32(IAlgebraCallback.algebraSwapCallback.selector);\n        } else if (forkId == aeroForkId) {\n            factory = aeroMainnetFactory;\n            initHash = aeroInitHash;\n            callbackSelector = uint32(IUniswapV3Callback.uniswapV3SwapCallback.selector);\n        } else {\n            revertUnknownForkId(forkId);\n        }\n    }\n\n    /*\n    function _curveFactory() internal pure override returns (address) {\n        return 0x0c0e5f2fF0ff18a3be9b835635039256dC4B4963;\n    }\n    */\n\n    function _uniV4ForkInfo(uint8 forkId) internal pure override returns (IPoolManager poolManager) {\n        if (forkId == uniswapV4ForkId) {\n            poolManager = uniswapV4MainnetPoolManager;\n        } else {\n            revertUnknownForkId(forkId);\n        }\n    }\n\n    // I hate Solidity inheritance\n    function _fallback(bytes calldata data)\n        internal\n        virtual\n        override(Permit2PaymentAbstract, UniswapV4)\n        returns (bool success, bytes memory returndata)\n    {\n        return super._fallback(data);\n    }\n\n    function _isRestrictedTarget(address target)\n        internal\n        view\n        virtual\n        override(Bebop, Permit2PaymentAbstract)\n        returns (bool)\n    {\n        return super._isRestrictedTarget(target);\n    }\n}\n\n// `Attest` is listed last so that candidate selection sits above the chain actions in the\n// linearization; see `Select`.\nabstract contract MainnetCommon is MainnetMixin, Attest {\n    function _dispatch(uint256 i, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        virtual\n        override(MainnetMixin, Attest)\n        returns (bool)\n    {\n        return super._dispatch(i, action, data, slippage);\n    }\n\n    function _isRestrictedTarget(address target)\n        internal\n        view\n        virtual\n        override(MainnetMixin, Permit2PaymentAbstract)\n        returns (bool)\n    {\n        return super._isRestrictedTarget(target);\n    }\n\n    function _fallback(bytes calldata data)\n        internal\n        virtual\n        override(MainnetMixin, Attest)\n        returns (bool success, bytes memory returndata)\n    {\n        return super._fallback(data);\n    }\n}\n\n// src/chains/Mainnet/TakerSubmitted.sol\n\n// Solidity inheritance is stupid\n\n// The taker dispatcher must precede the chain dispatcher so candidates retain its checks.\n/// @custom:security-contact security@0x.org\ncontract MainnetSettler is MainnetMixin, Settler, MainnetCommon {\n    using FastLogic for bool;\n\n    constructor(bytes20 gitCommit) SettlerBase(gitCommit) {}\n\n    function _dispatch(uint256 i, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        override(Settler, MainnetMixin, MainnetCommon)\n        returns (bool)\n    {\n        return super._dispatch(i, action, data, slippage);\n    }\n\n    function _dispatchVIP(uint256 action, bytes calldata data) internal override DANGEROUS_freeMemory returns (bool) {\n        if (super._dispatchVIP(action, data)) {\n            return true;\n        } else if (action == uint32(ISettlerActions.UNISWAPV4_VIP.selector)) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory permit,\n                uint8 forkId,\n                bool feeOnTransfer,\n                uint256 hashMul,\n                uint256 hashMod,\n                bytes memory fills,\n                bytes memory sig,\n                uint256 amountOutMin\n            ) = abi.decode(\n                data,\n                (address, ISignatureTransfer.PermitTransferFrom, uint8, bool, uint256, uint256, bytes, bytes, uint256)\n            );\n\n            sellToUniswapV4VIP(recipient, forkId, feeOnTransfer, hashMul, hashMod, fills, permit, sig, amountOutMin);\n        } else if ((action == uint32(ISettlerActions.BALANCERV3_VIP.selector))\n                .or(action == uint32(ISettlerActions.EKUBOV3_VIP.selector))) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory permit,\n                bool feeOnTransfer,\n                uint256 hashMul,\n                uint256 hashMod,\n                bytes memory fills,\n                bytes memory sig,\n                uint256 amountOutMin\n            ) = abi.decode(\n                data, (address, ISignatureTransfer.PermitTransferFrom, bool, uint256, uint256, bytes, bytes, uint256)\n            );\n\n            if (action == uint32(ISettlerActions.BALANCERV3_VIP.selector)) {\n                sellToBalancerV3VIP(recipient, feeOnTransfer, hashMul, hashMod, fills, permit, sig, amountOutMin);\n            } else { // if (action == uint32(ISettlerActions.EKUBOV3_VIP.selector))\n                sellToEkuboV3VIP(recipient, feeOnTransfer, hashMul, hashMod, fills, permit, sig, amountOutMin);\n            }\n        } /* else if (action == uint32(ISettlerActions.CURVE_TRICRYPTO_VIP.selector)) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory permit,\n                uint80 poolInfo,\n                bytes memory sig,\n                uint256 minBuyAmount\n            ) = abi.decode(data, (address, ISignatureTransfer.PermitTransferFrom, uint80, bytes, uint256));\n            sellToCurveTricryptoVIP(recipient, poolInfo, permit, sig, minBuyAmount);\n        } */ else {\n            return false;\n        }\n        return true;\n    }\n\n    // Solidity inheritance is stupid\n    function _isRestrictedTarget(address target)\n        internal\n        view\n        override(Settler, MainnetMixin, MainnetCommon)\n        returns (bool)\n    {\n        return super._isRestrictedTarget(target);\n    }\n\n    function _msgSender() internal view override(Settler, AbstractContext) returns (address) {\n        return super._msgSender();\n    }\n\n    function _fallback(bytes calldata data)\n        internal\n        virtual\n        override(Permit2PaymentAbstract, MainnetMixin, MainnetCommon)\n        returns (bool, bytes memory)\n    {\n        return super._fallback(data);\n    }\n}\n"}},"compilation":{"language":"Solidity","compiler":"solc","compilerVersion":"0.8.34+commit.80d5c536","compilerSettings":{"viaIR":true,"metadata":{"appendCBOR":false,"bytecodeHash":"none","useLiteralContent":false},"libraries":{},"optimizer":{"runs":2000,"details":{"yul":true,"constantOptimizer":true},"enabled":true},"evmVersion":"osaka","remappings":["@solmate/=lib/solmate/src/","@permit2/=lib/permit2/src/","@forge-std/=lib/forge-std/src/","@forge-gas-snapshot/=lib/forge-gas-snapshot/src/","@uniswapv4/=lib/v4-core/src/","forge-std/src/=lib/forge-std/src/","lib/permit2/:forge-std/=lib/forge-std/src/","solmate/=lib/solmate/","openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/"]},"name":"MainnetSettler","fullyQualifiedName":"src/flat/MainnetTakerSubmittedFlat.sol:MainnetSettler"},"abi":[{"type":"constructor","inputs":[{"name":"gitCommit","type":"bytes20","internalType":"bytes20"}],"stateMutability":"nonpayable"},{"name":"InvalidOffset","type":"error","inputs":[]},{"name":"InvalidTarget","type":"error","inputs":[]},{"name":"GitCommit","type":"event","inputs":[{"name":"","type":"bytes20","indexed":true,"internalType":"bytes20"}],"anonymous":false},{"type":"fallback","stateMutability":"nonpayable"},{"name":"balanceOf","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"pure"},{"name":"execute","type":"function","inputs":[{"name":"slippage","type":"tuple","components":[{"name":"recipient","type":"address","internalType":"address payable"},{"name":"buyToken","type":"address","internalType":"contract IERC20"},{"name":"minAmountOut","type":"uint256","internalType":"uint256"}],"internalType":"struct ISettlerBase.AllowedSlippage"},{"name":"actions","type":"bytes[]","internalType":"bytes[]"},{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"payable"},{"name":"executeWithPermit","type":"function","inputs":[{"name":"slippage","type":"tuple","components":[{"name":"recipient","type":"address","internalType":"address payable"},{"name":"buyToken","type":"address","internalType":"contract IERC20"},{"name":"minAmountOut","type":"uint256","internalType":"uint256"}],"internalType":"struct ISettlerBase.AllowedSlippage"},{"name":"actions","type":"bytes[]","internalType":"bytes[]"},{"name":"","type":"bytes32","internalType":"bytes32"},{"name":"permitData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"payable"},{"type":"receive","stateMutability":"payable"}],"metadata":{"compiler":{"version":"0.8.34+commit.80d5c536"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"bytes20","name":"gitCommit","type":"bytes20"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidOffset","type":"error"},{"inputs":[],"name":"InvalidTarget","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes20","name":"","type":"bytes20"}],"name":"GitCommit","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"}],"internalType":"struct ISettlerBase.AllowedSlippage","name":"slippage","type":"tuple"},{"internalType":"bytes[]","name":"actions","type":"bytes[]"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"execute","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"}],"internalType":"struct ISettlerBase.AllowedSlippage","name":"slippage","type":"tuple"},{"internalType":"bytes[]","name":"actions","type":"bytes[]"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes","name":"permitData","type":"bytes"}],"name":"executeWithPermit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}],"devdoc":{"custom:security-contact":"security@0x.org","kind":"dev","methods":{},"version":1},"userdoc":{"errors":{"InvalidOffset()":[{"notice":"Thrown when an offset is not the expected value"}],"InvalidTarget()":[{"notice":"Thrown when a target contract is invalid given the context"}]},"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"src/flat/MainnetTakerSubmittedFlat.sol":"MainnetSettler"},"evmVersion":"osaka","libraries":{},"metadata":{"appendCBOR":false,"bytecodeHash":"none"},"optimizer":{"enabled":true,"runs":2000},"remappings":[":@forge-gas-snapshot/=lib/forge-gas-snapshot/src/",":@forge-std/=lib/forge-std/src/",":@permit2/=lib/permit2/src/",":@solmate/=lib/solmate/src/",":@uniswapv4/=lib/v4-core/src/",":forge-std/src/=lib/forge-std/src/",":openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",":solmate/=lib/solmate/","lib/permit2/:forge-std/=lib/forge-std/src/"],"viaIR":true},"sources":{"src/flat/MainnetTakerSubmittedFlat.sol":{"keccak256":"0x7cb265e91e8dcfdd9a95bb919acf88ad007f6622f677f1abe9fba8d2b7ec045a","license":"MIT","urls":["bzz-raw://073485fac98d1dfd07c4a5e6f8782c2fdd679e5f8327891771bd6922f0c41826","dweb:/ipfs/QmXjpneKoRVYWuHoUeATcciYbL1286dXyMe75zu6e45ozB"]}},"version":1},"storageLayout":{"types":null,"storage":[]},"transientStorageLayout":{"types":null,"storage":[]},"userdoc":{"kind":"user","errors":{"InvalidOffset()":[{"notice":"Thrown when an offset is not the expected value"}],"InvalidTarget()":[{"notice":"Thrown when a target contract is invalid given the context"}]},"methods":{},"version":1},"devdoc":{"kind":"dev","methods":{},"version":1,"custom:security-contact":"security@0x.org"},"sourceIds":{"src/flat/MainnetTakerSubmittedFlat.sol":{"id":0}},"additionalInput":null,"stdJsonInput":{"sources":{"src/flat/MainnetTakerSubmittedFlat.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.34 >=0.6.2 >=0.8.25 ^0.8.0 ^0.8.25;\n\n// src/core/univ3forks/Aero.sol\n\naddress constant aeroBaseFactory = 0x9CB220581b91b0C83223012FE69688b92aD07a76;\naddress constant aeroOptimismFactory = 0xfeaB42D90055db3a0616249f76B6002D72266778;\naddress constant aeroArbitrumFactory = 0x88a60ee77392577c355C0acb2A8d476D5a4EC03a;\naddress constant aeroMainnetFactory = 0xF4Fd2E6c5B60c5b365cd1B96DD6245E6D60414c2;\naddress constant aeroInkFactory = 0x7660BF2aDefC687C22906112ca323d60A00358cF;\naddress constant aeroRobinHoodFactory = 0xc63d7338c178e805c544B8f897066bD3BBcBE136;\naddress constant aeroArcFactory = 0x7F83235643181E440433400a027618Cd50879751;\nbytes32 constant aeroInitHash = 0x3e77b70b9c4ce644601ed4aab19834375c6a9a2bca7adeb89a7bdd5fd8eb0a7d; // ERC1167 proxy targeting 0x1642634C8CB1C9f1B84c9a1a08534F8c3F4E89f8\nuint8 constant aeroForkId = 50;\n\n// src/core/univ3forks/Algebra.sol\n\nbytes32 constant algebraV4InitHash = 0xf96d2474815c32e070cd63233f06af5413efc5dcb430aee4ff18cc29007c562d;\n\ninterface IAlgebraCallback {\n    function algebraSwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external;\n}\n\n// src/vendor/Clz.sol\n\nlibrary Clz {\n    /// @dev Count leading zeros.\n    /// Returns the number of zeros preceding the most significant one bit.\n    /// If `x` is zero, returns 256.\n    function clz(uint256 x) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := clz(x)\n        }\n    }\n\n    function bitLength(uint256 x) internal pure returns (uint256) {\n        unchecked {\n            return 256 - clz(x);\n        }\n    }\n}\n\n// src/Context.sol\n\nabstract contract AbstractContext {\n    function _msgSender() internal view virtual returns (address);\n\n    function _msgData() internal view virtual returns (bytes calldata);\n\n    function _isForwarded() internal view virtual returns (bool);\n}\n\nabstract contract Context is AbstractContext {\n    function _msgSender() internal view virtual override returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual override returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _isForwarded() internal view virtual override returns (bool) {\n        return false;\n    }\n}\n\n// src/deployer/DeployerAddress.sol\n\naddress constant DEPLOYER = 0x00000000000004533Fe15556B1E086BB1A72cEae;\n\n// src/utils/FastLogic.sol\n\nlibrary FastLogic {\n    function or(bool a, bool b) internal pure returns (bool r) {\n        assembly (\"memory-safe\") {\n            r := or(a, b)\n        }\n    }\n\n    function and(bool a, bool b) internal pure returns (bool r) {\n        assembly (\"memory-safe\") {\n            r := mul(a, lt(0x00, b))\n        }\n    }\n\n    function andNot(bool a, bool b) internal pure returns (bool r) {\n        assembly (\"memory-safe\") {\n            r := mul(a, iszero(b))\n        }\n    }\n\n    function toUint(bool b) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := lt(0x00, b)\n        }\n    }\n}\n\n// src/utils/FreeMemory.sol\n\nabstract contract FreeMemory {\n    modifier DANGEROUS_freeMemory() {\n        uint256 freeMemPtr;\n        assembly (\"memory-safe\") {\n            freeMemPtr := mload(0x40)\n        }\n        _;\n        assembly (\"memory-safe\") {\n            mstore(0x40, freeMemPtr)\n        }\n    }\n}\n\n// src/allowanceholder/IAllowanceHolder.sol\n\nIAllowanceHolder constant ALLOWANCE_HOLDER = IAllowanceHolder(0x0000000000001fF3684f28c67538d4D072C22734);\n\ninterface IAllowanceHolder {\n    /// @notice Executes against `target` with the `data` payload. Prior to execution, token permits\n    ///         are temporarily stored for the duration of the transaction. These permits can be\n    ///         consumed by the `operator` during the execution\n    /// @notice `operator` consumes the funds during its operations by calling back into\n    ///         `AllowanceHolder` with `transferFrom`, consuming a token permit.\n    /// @dev Neither `exec` nor `transferFrom` check that `token` contains code.\n    /// @dev msg.sender is forwarded to target appended to the msg data (similar to ERC-2771)\n    /// @param operator An address which is allowed to consume the token permits\n    /// @param token The ERC20 token the caller has authorised to be consumed\n    /// @param amount The quantity of `token` the caller has authorised to be consumed\n    /// @param target A contract to execute operations with `data`\n    /// @param data The data to forward to `target`\n    /// @return result The returndata from calling `target` with `data`\n    /// @notice If calling `target` with `data` reverts, the revert is propagated\n    function exec(address operator, address token, uint256 amount, address payable target, bytes calldata data)\n        external\n        payable\n        returns (bytes memory result);\n\n    /// @notice The counterpart to `exec` which allows for the consumption of token permits later\n    ///         during execution\n    /// @dev *DOES NOT* check that `token` contains code. This function vacuously succeeds if\n    ///      `token` is empty.\n    /// @dev can only be called by the `operator` previously registered in `exec`\n    /// @param token The ERC20 token to transfer\n    /// @param owner The owner of tokens to transfer\n    /// @param recipient The destination/beneficiary of the ERC20 `transferFrom`\n    /// @param amount The quantity of `token` to transfer`\n    /// @return true\n    function transferFrom(address token, address owner, address recipient, uint256 amount) external returns (bool);\n}\n\n// src/interfaces/IAttestation.sol\n\ninterface IAttestation {\n    function attestation()\n        external\n        view\n        returns (address taker, bytes12 zid, string memory appid, address authority, uint40 deadline);\n}\n\n// lib/permit2/src/interfaces/IEIP712.sol\n\ninterface IEIP712 {\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n\n// lib/forge-std/src/interfaces/IERC20.sol\n\n/// @dev Interface of the ERC20 standard as defined in the EIP.\n/// @dev This includes the optional name, symbol, and decimals metadata.\ninterface IERC20 {\n    /// @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`).\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /// @dev Emitted when the allowance of a `spender` for an `owner` is set, where `value`\n    /// is the new allowance.\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /// @notice Returns the amount of tokens in existence.\n    function totalSupply() external view returns (uint256);\n\n    /// @notice Returns the amount of tokens owned by `account`.\n    function balanceOf(address account) external view returns (uint256);\n\n    /// @notice Moves `amount` tokens from the caller's account to `to`.\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    /// @notice Returns the remaining number of tokens that `spender` is allowed\n    /// to spend on behalf of `owner`\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /// @notice Sets `amount` as the allowance of `spender` over the caller's tokens.\n    /// @dev Be aware of front-running risks: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /// @notice Moves `amount` tokens from `from` to `to` using the allowance mechanism.\n    /// `amount` is then deducted from the caller's allowance.\n    function transferFrom(address from, address to, uint256 amount) external returns (bool);\n\n    /// @notice Returns the name of the token.\n    function name() external view returns (string memory);\n\n    /// @notice Returns the symbol of the token.\n    function symbol() external view returns (string memory);\n\n    /// @notice Returns the decimals places of the token.\n    function decimals() external view returns (uint8);\n}\n\n// src/IERC721Owner.sol\n\ninterface IERC721Owner {\n    function ownerOf(uint256) external view returns (address);\n}\n\n// src/core/univ3forks/Nami.sol\n\n// Algebra pools use the pool deployer, rather than the factory, for CREATE2 derivation.\naddress constant namiMainnetFactory = 0x86641A77A1172c3CE65bCE52aE91BDADEf0f74c2;\naddress constant namiBaseFactory = 0x79Ea2E90590089bbD13A0C6B5593D71C9E6f78ad;\naddress constant namiRobinhoodFactory = 0xC75fbF81cc29d71589bE9D3c70E6a4eDC41Ac6BC;\nbytes32 constant namiInitHash = 0x62441ebe4e4315cf3d49d5957f94d66b253dbabe7006f34ad7f70947e60bf15c;\nuint8 constant namiForkId = 49;\n\n// src/core/univ3forks/PancakeSwapV3.sol\n\naddress constant pancakeSwapV3Factory = 0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9;\nbytes32 constant pancakeSwapV3InitHash = 0x6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2;\nuint8 constant pancakeSwapV3ForkId = 1;\n\ninterface IPancakeSwapV3Callback {\n    function pancakeV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external;\n}\n\n// src/utils/Panic.sol\n\nlibrary Panic {\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71) // selector for `Panic(uint256)`\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\n\n    // https://docs.soliditylang.org/en/latest/control-structures.html#panic-via-assert-and-error-via-require\n    uint8 internal constant GENERIC = 0x00;\n    uint8 internal constant ASSERT_FAIL = 0x01;\n    uint8 internal constant ARITHMETIC_OVERFLOW = 0x11;\n    uint8 internal constant DIVISION_BY_ZERO = 0x12;\n    uint8 internal constant ENUM_CAST = 0x21;\n    uint8 internal constant CORRUPT_STORAGE_ARRAY = 0x22;\n    uint8 internal constant POP_EMPTY_ARRAY = 0x31;\n    uint8 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    uint8 internal constant OUT_OF_MEMORY = 0x41;\n    uint8 internal constant ZERO_FUNCTION_POINTER = 0x51;\n}\n\n// src/utils/Revert.sol\n\nlibrary Revert {\n    function _revert(bytes memory reason) internal pure {\n        assembly (\"memory-safe\") {\n            revert(add(reason, 0x20), mload(reason))\n        }\n    }\n\n    function maybeRevert(bool success, bytes memory reason) internal pure {\n        if (!success) {\n            _revert(reason);\n        }\n    }\n}\n\n// src/core/univ3forks/RubiconCLMM.sol\n\naddress constant rubiconCLMMFactory = 0xDf62D9e51d7c08360dcd41931A2e6B97FF8C73E8;\nbytes32 constant rubiconCLMMInitHash = 0xd3e7f58b9af034cfa7a0597e539bae7c6b393817a47a6fc1e1503cd6eaffe22a;\nuint8 constant rubiconCLMMForkId = 47;\n\n// src/vendor/Sqrt.sol\n\n// @author Modified from Solady by Vectorized and Akshay Tarpara https://github.com/Vectorized/solady/blob/1198c9f70b30d472a7d0ec021bec080622191b03/src/utils/clz/FixedPointMathLib.sol#L769-L797 under the MIT license.\nlibrary Sqrt {\n    /// @dev Returns the square root of `x`, rounded maybe-up maybe-down. For expert use only.\n    function _sqrt(uint256 x) private pure returns (uint256 z) {\n        assembly (\"memory-safe\") {\n            // Initial guess z = 2^⌊(n+1)/2⌋ where n = ⌊log₂(x)⌋. This seed gives ε₁ = 0.0607 after\n            // one Babylonian step for all inputs. With ε_{n+1} ≈ ε²/2, 6 steps yield 2⁻¹⁶⁰ relative\n            // error (>128 correct bits).\n            z := shl(shr(1, sub(256, clz(x))), 1)\n\n            // 6 Babylonian steps\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n        }\n    }\n\n    /// @dev Returns the square root of `x`, rounded down.\n    function sqrt(uint256 x) internal pure returns (uint256 z) {\n        z = _sqrt(x);\n        assembly (\"memory-safe\") {\n            // If `x+1` is a perfect square, the Babylonian method oscillates between ⌊√x⌋ and\n            // ⌈√x⌉. Floor it. See:\n            // https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\n            z := sub(z, lt(div(x, z), z))\n        }\n    }\n\n    /// @dev Returns the square root of `x`, rounded up.\n    function sqrtUp(uint256 x) internal pure returns (uint256 z) {\n        z = _sqrt(x);\n        assembly (\"memory-safe\") {\n            // `mul(z, z)` can overflow when `x == type(uint256).max`. This is because `_sqrt(x)`\n            // can return ⌈√x⌉ when `x + 1` is square. An overflow in `zz` causes a spurious\n            // round-up (`z` is already rounded up) and causes the result to be `2**128 + 1`, an\n            // off-by-one. To compensate, we detect this overflow and avoid rounding.\n            let zz := mul(z, z)\n            z := add(gt(lt(zz, x), lt(zz, z)), z)\n        }\n    }\n}\n\n// src/core/univ3forks/SushiswapV3.sol\n\naddress constant sushiswapV3MainnetFactory = 0xbACEB8eC6b9355Dfc0269C18bac9d6E2Bdc29C4F;\naddress constant sushiswapV3Factory = 0xc35DADB65012eC5796536bD9864eD8773aBc74C4; // Base, Linea\naddress constant sushiswapV3ArbitrumFactory = 0x1af415a1EbA07a4986a52B6f2e7dE7003D82231e;\naddress constant sushiswapV3ArcFactory = 0x7282249282902e1f99c2CB0A04230091bd30FE3A;\n//address constant sushiswapV3AvalancheFactory = 0x3e603C14aF37EBdaD31709C4f848Fc6aD5BEc715;\n//address constant sushiswapV3BnbFactory = 0x126555dd55a39328F69400d6aE4F782Bd4C34ABb;\naddress constant sushiswapV3OptimismFactory = 0x9c6522117e2ed1fE5bdb72bb0eD5E3f2bdE7DBe0;\naddress constant sushiswapV3PolygonFactory = 0x917933899c6a5F8E37F31E19f92CdBFF7e8FF0e2;\naddress constant sushiswapV3RobinhoodFactory = 0xE51960f1B45f1C9FB6D166E6a884F866fC70433B;\nuint8 constant sushiswapV3ForkId = 2;\n\n// src/core/univ3forks/UniswapV3.sol\n\naddress constant uniswapV3MainnetFactory = 0x1F98431c8aD98523631AE4a59f267346ea31F984;\naddress constant uniswapV3SepoliaFactory = 0x0227628f3F023bb0B980b67D528571c95c6DaC1c;\naddress constant uniswapV3BaseFactory = 0x33128a8fC17869897dcE68Ed026d694621f6FDfD;\naddress constant uniswapV3BnbFactory = 0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7;\naddress constant uniswapV3AvalancheFactory = 0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD;\naddress constant uniswapV3LineaFactory = 0x31FAfd4889FA1269F7a13A66eE0fB458f27D72A9;\naddress constant uniswapV3WorldChainFactory = 0x7a5028BDa40e7B173C278C5342087826455ea25a;\naddress constant uniswapV3InkFactory = 0x640887A9ba3A9C53Ed27D0F7e8246A4F933f3424;\naddress constant uniswapV3UnichainFactory = 0x1F98400000000000000000000000000000000003; // https://github.com/Uniswap/contracts/blob/main/deployments/130.md#fri-nov-08-2024\naddress constant uniswapV3PlasmaFactory = 0xcb2436774C3e191c85056d248EF4260ce5f27A9D;\naddress constant uniswapV3MonadFactory = 0x204FAca1764B154221e35c0d20aBb3c525710498;\naddress constant uniswapV3AbstractFactory = 0xA1160e73B63F322ae88cC2d8E700833e71D0b2a1;\naddress constant uniswapV3TempoFactory = 0x24a3d4757E330890A8b8978028c9e58E04611fd6;\naddress constant uniswapV3RobinhoodFactory = 0x1f7d7550B1b028f7571E69A784071F0205FD2EfA;\naddress constant uniswapV3ArcFactory = 0xf0db7b58379503491d857dB50AC9ece64c653918;\n\nbytes32 constant uniswapV3InitHash = 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54;\n// This isn't a \"hash\" inasmuch as it's a versioned discriminator\n// ref: https://web.archive.org/web/20251108134721/https://matter-labs.github.io/zksync-era/core/latest/guides/advanced/12_alternative_vm_intro.html#bytecode-hashes\nbytes32 constant uniswapV3InitHashEraVm = 0x010013f177ea1fcbc4520f9a3ca7cd2d1d77959e05aa66484027cb38e712aeed;\nuint8 constant uniswapV3ForkId = 0;\n\ninterface IUniswapV3Callback {\n    function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external;\n}\n\n// src/utils/Cuid.sol\n\nlibrary Cuid {\n    using Clz for uint256;\n\n    // CUIDv1: https://github.com/paralleldrive/cuid/blob/master/index.js\n    // The integer encodes the base-36 text after `c`. The timestamp has no leading zeros;\n    // the counter, fingerprint, and random suffix occupy exactly 16 characters.\n    function decode(uint128 packed) internal pure returns (string memory result) {\n        uint256 digits;\n        // Assembly converts independent groups of base-36 digits in one word without temporary memory.\n        // result = \"c\" + base36(packed, minDigits=17).\n        assembly (\"memory-safe\") {\n            packed := and(0xffffffffffffffffffffffffffffffff, packed)\n            // 0x81bf1000 = 36**6 fits in 32 bits; 64-bit lanes also hold each reciprocal product below.\n            // Four lanes take 24 digits. The remainder is at most floor(2**128 / 36**24) = 15: one digit.\n            let sextets := mod(packed, 0x81bf1000)\n            packed := div(packed, 0x81bf1000)\n            sextets := or(shl(0x40, mod(packed, 0x81bf1000)), sextets)\n            packed := div(packed, 0x81bf1000)\n            sextets := or(shl(0x80, mod(packed, 0x81bf1000)), sextets)\n            packed := div(packed, 0x81bf1000)\n            sextets := or(shl(0xc0, mod(packed, 0x81bf1000)), sextets)\n            packed := div(packed, 0x81bf1000)\n\n            // floor(x / d) = (x * ceil(2**s / d)) >> s when (d * ceil(2**s / d) - 2**s) * x < 2**s.\n            // For x < 36**6, d = 36**3, s = 46: 0x59e60383 = ceil(2**46 / 36**3) and the error factor is\n            // 704. Products fit in 64 bits. Each quotient is below 36**3 < 2**16, so 0xffff separates it\n            // from the next lane's product.\n            let upperTriples :=\n                and(mul(0xffff, div(not(0x00), 0xffffffffffffffff)), shr(0x2e, mul(0x59e60383, sextets)))\n            // Adding (2**32 - 36**3) * quotient splits each 64-bit lane into two 32-bit lanes of three digits.\n            let triples := add(mul(0xffff49c0, upperTriples), sextets)\n\n            // For x < 36**3, d = 36, s = 21: 0xe38f = ceil(2**21 / 36) and the error factor is 28.\n            // Products fit in 32 bits. Each quotient is below 36**2 < 2**11, so 0x7ff separates it from\n            // the next lane's product.\n            let mask := mul(0x7ff, div(not(0x00), 0xffffffff))\n            let highPairs := and(mask, shr(0x15, mul(0xe38f, triples)))\n            let highDigits := and(mask, shr(0x15, mul(0xe38f, highPairs)))\n            // x + (256 - 36) * (x / 36 + 256 * (x / 36**2)) places each base-36 digit in one byte.\n            digits := add(mul(0xdc, add(shl(0x08, highDigits), highPairs)), triples)\n\n            // Each 32-bit lane holds three digit bytes under a zero byte. Three merges drop the zero\n            // bytes: lanes of 3+1 bytes become 6+2, then 12+4, then 24+8.\n            mask := mul(0xffffff, div(not(0x00), 0xffffffffffffffff))\n            digits := or(and(mask, digits), shr(0x08, and(not(mask), digits)))\n            mask := 0xffffffffffff00000000000000000000ffffffffffff\n            digits := or(and(mask, digits), shr(0x10, and(not(mask), digits)))\n            mask := 0xffffffffffffffffffffffff\n            digits := or(and(mask, digits), shr(0x20, and(not(mask), digits)))\n            digits := or(shl(0xc0, packed), digits)\n        }\n\n        uint256 length;\n        unchecked {\n            // 17 digits minimum, plus every byte up to the highest nonzero one above them.\n            length = 17 + (((digits >> 136).bitLength() + 7) >> 3);\n        }\n\n        assembly (\"memory-safe\") {\n            let ones := div(not(0x00), 0xff)\n            // Digits are at most 35: adding 118 sets bit 7 exactly for letters, without byte carries.\n            let letters := and(ones, shr(0x07, add(mul(0x76, ones), digits)))\n            digits := add(mul(0x30, ones), add(mul(0x27, letters), digits))\n            // The byte before the first digit is '0'; 0x30 ^ 0x53 = 'c'.\n            digits := xor(shl(shl(0x03, length), 0x53), digits)\n            length := add(0x01, length)\n            result := mload(0x40)\n            mstore(result, length)\n            mstore(add(0x20, result), shl(sub(0x100, shl(0x03, length)), digits))\n            mstore(0x40, add(0x40, result))\n        }\n    }\n}\n\n// src/interfaces/IERC2612.sol\n\ninterface IERC20PermitCommon is IERC20 {\n    function nonces(address owner) external view returns (uint256);\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n\ninterface IERC2612 is IERC20PermitCommon {\n    function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)\n        external;\n}\n\ninterface IDAIStylePermit is IERC20PermitCommon {\n    function permit(\n        address holder,\n        address spender,\n        uint256 nonce,\n        uint256 expiry,\n        bool allowed,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n}\n\n// lib/forge-std/src/interfaces/IERC4626.sol\n\n/// @dev Interface of the ERC4626 \"Tokenized Vault Standard\", as defined in\n/// https://eips.ethereum.org/EIPS/eip-4626\ninterface IERC4626 is IERC20 {\n    event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);\n\n    event Withdraw(\n        address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares\n    );\n\n    /// @notice Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.\n    /// @dev\n    /// - MUST be an ERC-20 token contract.\n    /// - MUST NOT revert.\n    function asset() external view returns (address assetTokenAddress);\n\n    /// @notice Returns the total amount of the underlying asset that is “managed” by Vault.\n    /// @dev\n    /// - SHOULD include any compounding that occurs from yield.\n    /// - MUST be inclusive of any fees that are charged against assets in the Vault.\n    /// - MUST NOT revert.\n    function totalAssets() external view returns (uint256 totalManagedAssets);\n\n    /// @notice Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal\n    /// scenario where all the conditions are met.\n    /// @dev\n    /// - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\n    /// - MUST NOT show any variations depending on the caller.\n    /// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\n    /// - MUST NOT revert.\n    ///\n    /// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the\n    /// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and\n    /// from.\n    function convertToShares(uint256 assets) external view returns (uint256 shares);\n\n    /// @notice Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal\n    /// scenario where all the conditions are met.\n    /// @dev\n    /// - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\n    /// - MUST NOT show any variations depending on the caller.\n    /// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\n    /// - MUST NOT revert.\n    ///\n    /// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the\n    /// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and\n    /// from.\n    function convertToAssets(uint256 shares) external view returns (uint256 assets);\n\n    /// @notice Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,\n    /// through a deposit call.\n    /// @dev\n    /// - MUST return a limited value if receiver is subject to some deposit limit.\n    /// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.\n    /// - MUST NOT revert.\n    function maxDeposit(address receiver) external view returns (uint256 maxAssets);\n\n    /// @notice Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given\n    /// current on-chain conditions.\n    /// @dev\n    /// - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit\n    ///   call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called\n    ///   in the same transaction.\n    /// - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the\n    ///   deposit would be accepted, regardless if the user has enough tokens approved, etc.\n    /// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\n    /// - MUST NOT revert.\n    ///\n    /// NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in\n    /// share price or some other type of condition, meaning the depositor will lose assets by depositing.\n    function previewDeposit(uint256 assets) external view returns (uint256 shares);\n\n    /// @notice Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.\n    /// @dev\n    /// - MUST emit the Deposit event.\n    /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\n    ///   deposit execution, and are accounted for during deposit.\n    /// - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not\n    ///   approving enough underlying tokens to the Vault contract, etc).\n    ///\n    /// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.\n    function deposit(uint256 assets, address receiver) external returns (uint256 shares);\n\n    /// @notice Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.\n    /// @dev\n    /// - MUST return a limited value if receiver is subject to some mint limit.\n    /// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.\n    /// - MUST NOT revert.\n    function maxMint(address receiver) external view returns (uint256 maxShares);\n\n    /// @notice Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given\n    /// current on-chain conditions.\n    /// @dev\n    /// - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call\n    ///   in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the\n    ///   same transaction.\n    /// - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint\n    ///   would be accepted, regardless if the user has enough tokens approved, etc.\n    /// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\n    /// - MUST NOT revert.\n    ///\n    /// NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in\n    /// share price or some other type of condition, meaning the depositor will lose assets by minting.\n    function previewMint(uint256 shares) external view returns (uint256 assets);\n\n    /// @notice Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.\n    /// @dev\n    /// - MUST emit the Deposit event.\n    /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint\n    ///   execution, and are accounted for during mint.\n    /// - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not\n    ///   approving enough underlying tokens to the Vault contract, etc).\n    ///\n    /// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.\n    function mint(uint256 shares, address receiver) external returns (uint256 assets);\n\n    /// @notice Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the\n    /// Vault, through a withdrawal call.\n    /// @dev\n    /// - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\n    /// - MUST NOT revert.\n    function maxWithdraw(address owner) external view returns (uint256 maxAssets);\n\n    /// @notice Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,\n    /// given current on-chain conditions.\n    /// @dev\n    /// - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw\n    ///   call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if\n    ///   called\n    ///   in the same transaction.\n    /// - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though\n    ///   the withdrawal would be accepted, regardless if the user has enough shares, etc.\n    /// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\n    /// - MUST NOT revert.\n    ///\n    /// NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in\n    /// share price or some other type of condition, meaning the depositor will lose assets by depositing.\n    function previewWithdraw(uint256 assets) external view returns (uint256 shares);\n\n    /// @notice Burns shares from owner and sends exactly assets of underlying tokens to receiver.\n    /// @dev\n    /// - MUST emit the Withdraw event.\n    /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\n    ///   withdraw execution, and are accounted for during withdrawal.\n    /// - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner\n    ///   not having enough shares, etc).\n    ///\n    /// Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\n    /// Those methods should be performed separately.\n    function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);\n\n    /// @notice Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,\n    /// through a redeem call.\n    /// @dev\n    /// - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\n    /// - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.\n    /// - MUST NOT revert.\n    function maxRedeem(address owner) external view returns (uint256 maxShares);\n\n    /// @notice Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,\n    /// given current on-chain conditions.\n    /// @dev\n    /// - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call\n    ///   in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the\n    ///   same transaction.\n    /// - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the\n    ///   redemption would be accepted, regardless if the user has enough shares, etc.\n    /// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\n    /// - MUST NOT revert.\n    ///\n    /// NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in\n    /// share price or some other type of condition, meaning the depositor will lose assets by redeeming.\n    function previewRedeem(uint256 shares) external view returns (uint256 assets);\n\n    /// @notice Burns exactly shares from owner and sends assets of underlying tokens to receiver.\n    /// @dev\n    /// - MUST emit the Withdraw event.\n    /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\n    ///   redeem execution, and are accounted for during redeem.\n    /// - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner\n    ///   not having enough shares, etc).\n    ///\n    /// NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\n    /// Those methods should be performed separately.\n    function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);\n}\n\n// src/interfaces/INativeMetaTransaction.sol\n\ninterface INativeMetaTransaction {\n    function executeMetaTransaction(\n        address userAddress,\n        bytes memory functionSignature,\n        bytes32 sigR,\n        bytes32 sigS,\n        uint8 sigV\n    ) external payable returns (bytes memory);\n    function getNonce(address userAddress) external view returns (uint256);\n    function getDomainSeperator() external view returns (bytes32);\n}\n\ninterface IERC20MetaTransaction is INativeMetaTransaction, IERC20 {}\n\n// src/interfaces/ISettlerBase.sol\n\ninterface ISettlerBase {\n    struct AllowedSlippage {\n        address payable recipient;\n        IERC20 buyToken;\n        uint256 minAmountOut;\n    }\n}\n\n// lib/permit2/src/interfaces/ISignatureTransfer.sol\n\n/// @title SignatureTransfer\n/// @notice Handles ERC20 token transfers through signature based actions\n/// @dev Requires user's token approval on the Permit2 contract\ninterface ISignatureTransfer is IEIP712 {\n    /// @notice Thrown when the requested amount for a transfer is larger than the permissioned amount\n    /// @param maxAmount The maximum amount a spender can request to transfer\n    error InvalidAmount(uint256 maxAmount);\n\n    /// @notice Thrown when the number of tokens permissioned to a spender does not match the number of tokens being transferred\n    /// @dev If the spender does not need to transfer the number of tokens permitted, the spender can request amount 0 to be transferred\n    error LengthMismatch();\n\n    /// @notice Emits an event when the owner successfully invalidates an unordered nonce.\n    event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 mask);\n\n    /// @notice The token and amount details for a transfer signed in the permit transfer signature\n    struct TokenPermissions {\n        // ERC20 token address\n        address token;\n        // the maximum amount that can be spent\n        uint256 amount;\n    }\n\n    /// @notice The signed permit message for a single token transfer\n    struct PermitTransferFrom {\n        TokenPermissions permitted;\n        // a unique value for every token owner's signature to prevent signature replays\n        uint256 nonce;\n        // deadline on the permit signature\n        uint256 deadline;\n    }\n\n    /// @notice Specifies the recipient address and amount for batched transfers.\n    /// @dev Recipients and amounts correspond to the index of the signed token permissions array.\n    /// @dev Reverts if the requested amount is greater than the permitted signed amount.\n    struct SignatureTransferDetails {\n        // recipient address\n        address to;\n        // spender requested amount\n        uint256 requestedAmount;\n    }\n\n    /// @notice Used to reconstruct the signed permit message for multiple token transfers\n    /// @dev Do not need to pass in spender address as it is required that it is msg.sender\n    /// @dev Note that a user still signs over a spender address\n    struct PermitBatchTransferFrom {\n        // the tokens and corresponding amounts permitted for a transfer\n        TokenPermissions[] permitted;\n        // a unique value for every token owner's signature to prevent signature replays\n        uint256 nonce;\n        // deadline on the permit signature\n        uint256 deadline;\n    }\n\n    /// @notice A map from token owner address and a caller specified word index to a bitmap. Used to set bits in the bitmap to prevent against signature replay protection\n    /// @dev Uses unordered nonces so that permit messages do not need to be spent in a certain order\n    /// @dev The mapping is indexed first by the token owner, then by an index specified in the nonce\n    /// @dev It returns a uint256 bitmap\n    /// @dev The index, or wordPosition is capped at type(uint248).max\n    function nonceBitmap(address, uint256) external view returns (uint256);\n\n    /// @notice Transfers a token using a signed permit message\n    /// @dev Reverts if the requested amount is greater than the permitted signed amount\n    /// @param permit The permit data signed over by the owner\n    /// @param owner The owner of the tokens to transfer\n    /// @param transferDetails The spender's requested transfer details for the permitted token\n    /// @param signature The signature to verify\n    function permitTransferFrom(\n        PermitTransferFrom memory permit,\n        SignatureTransferDetails calldata transferDetails,\n        address owner,\n        bytes calldata signature\n    ) external;\n\n    /// @notice Transfers a token using a signed permit message\n    /// @notice Includes extra data provided by the caller to verify signature over\n    /// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition\n    /// @dev Reverts if the requested amount is greater than the permitted signed amount\n    /// @param permit The permit data signed over by the owner\n    /// @param owner The owner of the tokens to transfer\n    /// @param transferDetails The spender's requested transfer details for the permitted token\n    /// @param witness Extra data to include when checking the user signature\n    /// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash\n    /// @param signature The signature to verify\n    function permitWitnessTransferFrom(\n        PermitTransferFrom memory permit,\n        SignatureTransferDetails calldata transferDetails,\n        address owner,\n        bytes32 witness,\n        string calldata witnessTypeString,\n        bytes calldata signature\n    ) external;\n\n    /// @notice Transfers multiple tokens using a signed permit message\n    /// @param permit The permit data signed over by the owner\n    /// @param owner The owner of the tokens to transfer\n    /// @param transferDetails Specifies the recipient and requested amount for the token transfer\n    /// @param signature The signature to verify\n    function permitTransferFrom(\n        PermitBatchTransferFrom memory permit,\n        SignatureTransferDetails[] calldata transferDetails,\n        address owner,\n        bytes calldata signature\n    ) external;\n\n    /// @notice Transfers multiple tokens using a signed permit message\n    /// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition\n    /// @notice Includes extra data provided by the caller to verify signature over\n    /// @param permit The permit data signed over by the owner\n    /// @param owner The owner of the tokens to transfer\n    /// @param transferDetails Specifies the recipient and requested amount for the token transfer\n    /// @param witness Extra data to include when checking the user signature\n    /// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash\n    /// @param signature The signature to verify\n    function permitWitnessTransferFrom(\n        PermitBatchTransferFrom memory permit,\n        SignatureTransferDetails[] calldata transferDetails,\n        address owner,\n        bytes32 witness,\n        string calldata witnessTypeString,\n        bytes calldata signature\n    ) external;\n\n    /// @notice Invalidates the bits specified in mask for the bitmap at the word position\n    /// @dev The wordPos is maxed at type(uint248).max\n    /// @param wordPos A number to index the nonceBitmap at\n    /// @param mask A bitmap masked against msg.sender's current bitmap at the word position\n    function invalidateUnorderedNonces(uint256 wordPos, uint256 mask) external;\n}\n\n// src/core/SettlerErrors.sol\n\n/// @notice Thrown when an offset is not the expected value\nerror InvalidOffset();\n\n/// @notice Thrown when a SELECT candidate misses its target.\nerror Shortfall(uint256 score);\n\n/// @notice Thrown when a validating a target contract to avoid certain types of targets\nerror ConfusedDeputy();\n\nfunction revertConfusedDeputy() pure {\n    assembly (\"memory-safe\") {\n        mstore(0x00, 0xe758b8d5) // selector for `ConfusedDeputy()`\n        revert(0x1c, 0x04)\n    }\n}\n\n/// @notice Thrown when a target contract is invalid given the context\nerror InvalidTarget();\n\n/// @notice Thrown when the payout recipient's TIP-1028 receive policy would divert the transfer\nerror ReceivePolicyBlocked(address recipient);\n\n/// @notice Thrown when a transfer to a HyperCore system address would be credited to its sender instead of to the named recipient\nerror HyperCoreSystemAddress(address recipient);\n\n/// @notice Thrown when validating the caller against the expected caller\nerror InvalidSender();\n\n/// @notice Thrown in cases when using a Trusted Forwarder / AllowanceHolder is not allowed\nerror ForwarderNotAllowed();\n\n/// @notice Thrown when a signature length is not the expected length\nerror InvalidSignatureLen();\n\n/// @notice Thrown when a slippage limit is exceeded\nerror TooMuchSlippage(IERC20 token, uint256 expected, uint256 actual);\n\nfunction revertTooMuchSlippage(IERC20 buyToken, uint256 expectedBuyAmount, uint256 actualBuyAmount) pure {\n    assembly (\"memory-safe\") {\n        mstore(0x54, actualBuyAmount)\n        mstore(0x34, expectedBuyAmount)\n        mstore(0x14, buyToken)\n        mstore(0x00, 0x97a6f3b9000000000000000000000000) // selector for `TooMuchSlippage(address,uint256,uint256)` with `buyToken`'s padding\n        revert(0x10, 0x64)\n    }\n}\n\n/// @notice Thrown when a pool demands more of the sell token than the action offered\nerror ExcessiveSellAmount(IERC20 sellToken, uint256 maxSellAmount, uint256 sellAmount);\n\nfunction revertExcessiveSellAmount(IERC20 sellToken, uint256 maxSellAmount, uint256 sellAmount) pure {\n    assembly (\"memory-safe\") {\n        mstore(0x54, sellAmount)\n        mstore(0x34, maxSellAmount)\n        mstore(0x14, sellToken)\n        mstore(0x00, 0x8b115ca5000000000000000000000000) // selector for `ExcessiveSellAmount(address,uint256,uint256)` with `sellToken`'s padding\n        revert(0x10, 0x64)\n    }\n}\n\n/// @notice Thrown when a byte array that is supposed to encode a function from ISettlerActions is\n///         not recognized in context.\nerror ActionInvalid(uint256 i, bytes4 action, bytes data);\n\nfunction revertActionInvalid(uint256 i, uint256 action, bytes calldata data) pure {\n    assembly (\"memory-safe\") {\n        let ptr := mload(0x40)\n        mstore(ptr, 0x3c74eed6) // selector for `ActionInvalid(uint256,bytes4,bytes)`\n        mstore(add(0x20, ptr), i)\n        mstore(add(0x40, ptr), shl(0xe0, action)) // align as `bytes4`\n        mstore(add(0x60, ptr), 0x60) // offset to the length slot of the dynamic value `data`\n        mstore(add(0x80, ptr), data.length)\n        calldatacopy(add(0xa0, ptr), data.offset, data.length)\n        revert(add(0x1c, ptr), add(0x84, data.length))\n    }\n}\n\n/// @notice Thrown when the encoded fork ID as part of UniswapV3 fork path is not on the list of\n///         recognized forks for this chain.\nerror UnknownForkId(uint8 forkId);\n\nfunction revertUnknownForkId(uint8 forkId) pure {\n    assembly (\"memory-safe\") {\n        mstore(0x00, 0xd3b1276d) // selector for `UnknownForkId(uint8)`\n        mstore(0x20, and(0xff, forkId))\n        revert(0x1c, 0x24)\n    }\n}\n\n/// @notice Thrown when an AllowanceHolder transfer's permit is past its deadline\nerror SignatureExpired(uint256 deadline);\n\n/// @notice Thrown when selling the native asset, but `msg.value` exceeds the value from the generated quote\nerror MsgValueMismatch(uint256 expected, uint256 actual);\n\n/// @notice An internal error that should never be thrown. Thrown when a callback reenters the\n///         entrypoint and attempts to clobber the existing callback.\nerror ReentrantCallback(uint256 callbackInt);\n\n/// @notice An internal error that should never be thrown. This error can only be thrown by\n///         non-metatx-supporting Settler instances. Thrown when a callback-requiring liquidity\n///         source is called, but Settler never receives the callback.\nerror CallbackNotSpent(uint256 callbackInt);\n\n/// @notice Thrown when a metatransaction has reentrancy.\nerror ReentrantMetatransaction(bytes32 oldWitness);\n\n/// @notice Thrown when any transaction has reentrancy, not just taker-submitted or metatransaction.\nerror ReentrantPayer(address oldPayer);\n\n/// @notice An internal error that should never be thrown. Thrown when a metatransaction fails to\n///         spend a coupon.\nerror WitnessNotSpent(bytes32 oldWitness);\n\n/// @notice An internal error that should never be thrown. Thrown when the payer is unset\n///         unexpectedly.\nerror PayerSpent();\n\nerror DeltaNotPositive(IERC20 token);\nerror DeltaNotNegative(IERC20 token);\nerror ZeroSellAmount(IERC20 token);\nerror ZeroBuyAmount(IERC20 buyToken);\nerror BoughtSellToken(IERC20 sellToken);\nerror TokenHashCollision(IERC20 token0, IERC20 token1);\nerror ZeroToken();\n\n/// @notice Thrown for liquidities that require a Newton-Raphson approximation to solve their\n///         constant function when Newton-Raphson fails to converge on the solution in a\n///         \"reasonable\" number of iterations.\nerror NotConverged();\n\n/// @notice Thrown when the encoded pool manager ID as part of PancakeSwap Infinity fill is not on\n///         the list of recognized pool managers.\nerror UnknownPoolManagerId(uint8 poolManagerId);\n\nfunction revertUnknownPoolManagerId(uint256 poolManagerId) pure {\n    assembly (\"memory-safe\") {\n        mstore(0x00, 0x0a9a7da6) // selector for `UnknownPoolManagerId(uint8)`\n        mstore(0x20, and(0xff, poolManagerId))\n        revert(0x1c, 0x24)\n    }\n}\n\n/// @notice Thrown when the `msg.value` is less than the minimum expected value.\nerror Underpayment(uint256 msgValueMin, uint256 msgValueActual);\n\n/// @notice Thrown when a permit call fails.\nerror PermitFailed();\n\n/// @notice Thrown when a permit signature is incorrect\nerror InvalidSignature();\n\n/// @notice Thrown when a permit signature is expired\nerror PermitExpired();\n\n/// @notice Thrown when a permit type is unsupported\nerror UnsupportedPermitType();\n\n/// @notice Thrown when a CCIP message specifies a non-zero feeToken (only native fees are supported)\nerror InvalidFeeToken();\n\n/// @notice Thrown when a CCIP message does not have exactly 1 tokenAmounts element\nerror InvalidTokenAmountsLength();\n\n// src/utils/Ternary.sol\n\nlibrary Ternary {\n    //// All the code duplication in this file is because solc isn't smart enough to figure out that\n    //// it doesn't need to do a ton of masking when types are cast to each other without\n    //// modification.\n\n    function ternary(bool c, uint256 x, uint256 y) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := xor(x, mul(xor(x, y), iszero(c)))\n        }\n    }\n\n    function ternary(bool c, int256 x, int256 y) internal pure returns (int256 r) {\n        assembly (\"memory-safe\") {\n            r := xor(x, mul(xor(x, y), iszero(c)))\n        }\n    }\n\n    function ternary(bool c, bytes4 x, bytes4 y) internal pure returns (bytes4 r) {\n        assembly (\"memory-safe\") {\n            r := xor(x, mul(xor(x, y), iszero(c)))\n        }\n    }\n\n    function ternary(bool c, address x, address y) internal pure returns (address r) {\n        assembly (\"memory-safe\") {\n            r := xor(x, mul(xor(x, y), iszero(c)))\n        }\n    }\n\n    function orZero(bool c, uint256 x) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mul(lt(0x00, c), x)\n        }\n    }\n\n    function maybeSwap(bool c, uint256 x, uint256 y) internal pure returns (uint256 a, uint256 b) {\n        assembly (\"memory-safe\") {\n            let t := mul(iszero(c), xor(y, x))\n            a := xor(y, t)\n            b := xor(x, t)\n        }\n    }\n\n    function maybeSwap(bool c, int256 x, int256 y) internal pure returns (int256 a, int256 b) {\n        assembly (\"memory-safe\") {\n            let t := mul(iszero(c), xor(y, x))\n            a := xor(y, t)\n            b := xor(x, t)\n        }\n    }\n\n    function maybeSwap(bool c, IERC20 x, IERC20 y) internal pure returns (IERC20 a, IERC20 b) {\n        assembly (\"memory-safe\") {\n            let t := mul(iszero(c), xor(y, x))\n            a := xor(y, t)\n            b := xor(x, t)\n        }\n    }\n\n    function maybeSwap(bool c, address x, address y) internal pure returns (address a, address b) {\n        assembly (\"memory-safe\") {\n            let t := mul(iszero(c), xor(y, x))\n            a := xor(y, t)\n            b := xor(x, t)\n        }\n    }\n}\n\n// src/utils/TokenGetter.sol\n\nfunction fastGetToken(address pool, uint256 selector) view returns (IERC20 token) {\n    // Scratch memory avoids allocating calldata and return buffers.\n    // (bool success, bytes memory data) = pool.staticcall(abi.encodeWithSelector(bytes4(uint32(selector))));\n    // if (!success) bubbleRevert(data);\n    // token = abi.decode(data, (IERC20));\n    assembly (\"memory-safe\") {\n        mstore(0x00, selector)\n        if iszero(staticcall(gas(), pool, 0x1c, 0x04, 0x00, 0x20)) {\n            let ptr := mload(0x40)\n            returndatacopy(ptr, 0x00, returndatasize())\n            revert(ptr, returndatasize())\n        }\n        token := mload(0x00)\n        if or(gt(0x20, returndatasize()), shr(0xa0, token)) { revert(0x00, 0x00) }\n    }\n}\n\n// src/utils/UnsafeMath.sol\n\nlibrary UnsafeMath {\n    function unsafeInc(uint256 x) internal pure returns (uint256) {\n        unchecked {\n            return x + 1;\n        }\n    }\n\n    function unsafeInc(uint256 x, bool b) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := add(x, lt(0x00, b))\n        }\n    }\n\n    function unsafeInc(int256 x) internal pure returns (int256) {\n        unchecked {\n            return x + 1;\n        }\n    }\n\n    function unsafeDec(uint256 x) internal pure returns (uint256) {\n        unchecked {\n            return x - 1;\n        }\n    }\n\n    function unsafeDec(uint256 x, bool b) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := sub(x, lt(0x00, b))\n        }\n    }\n\n    function unsafeDec(int256 x) internal pure returns (int256) {\n        unchecked {\n            return x - 1;\n        }\n    }\n\n    function unsafeNeg(int256 x) internal pure returns (int256) {\n        unchecked {\n            return -x;\n        }\n    }\n\n    function unsafeAbs(int256 x) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mul(or(0x01, sar(0xff, x)), x)\n        }\n    }\n\n    function unsafeDiv(uint256 numerator, uint256 denominator) internal pure returns (uint256 quotient) {\n        assembly (\"memory-safe\") {\n            quotient := div(numerator, denominator)\n        }\n    }\n\n    function unsafeDiv(int256 numerator, int256 denominator) internal pure returns (int256 quotient) {\n        assembly (\"memory-safe\") {\n            quotient := sdiv(numerator, denominator)\n        }\n    }\n\n    function unsafeMod(uint256 numerator, uint256 denominator) internal pure returns (uint256 remainder) {\n        assembly (\"memory-safe\") {\n            remainder := mod(numerator, denominator)\n        }\n    }\n\n    function unsafeMod(int256 numerator, int256 denominator) internal pure returns (int256 remainder) {\n        assembly (\"memory-safe\") {\n            remainder := smod(numerator, denominator)\n        }\n    }\n\n    function unsafeMulMod(uint256 a, uint256 b, uint256 m) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mulmod(a, b, m)\n        }\n    }\n\n    function unsafeAddMod(uint256 a, uint256 b, uint256 m) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := addmod(a, b, m)\n        }\n    }\n\n    function unsafeDivUp(uint256 n, uint256 d) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := add(gt(mod(n, d), 0x00), div(n, d))\n        }\n    }\n\n    /// rounds away from zero\n    function unsafeDivOut(int256 n, int256 d) internal pure returns (int256 r) {\n        assembly (\"memory-safe\") {\n            let s := sar(0xff, xor(n, d))\n            let c := lt(0x00, smod(n, d))\n            r := add(sdiv(n, d), sub(xor(s, c), s))\n        }\n    }\n\n    function unsafeAdd(uint256 a, uint256 b) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := add(a, b)\n        }\n    }\n}\n\nlibrary Math_0 {\n    function inc(uint256 x, bool c) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := add(x, lt(0x00, c))\n        }\n        if (r < x) {\n            Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n        }\n    }\n\n    function dec(uint256 x, bool c) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := sub(x, lt(0x00, c))\n        }\n        if (r > x) {\n            Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n        }\n    }\n\n    function toInt(bool c) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := lt(0x00, c)\n        }\n    }\n\n    function saturatingAdd(uint256 x, uint256 y) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := add(x, y)\n            r := or(r, sub(0x00, lt(r, y)))\n        }\n    }\n\n    function saturatingSub(uint256 x, uint256 y) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mul(gt(x, y), sub(x, y))\n        }\n    }\n\n    function saturatingDec(uint256 x) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := sub(x, lt(0x00, x))\n        }\n    }\n\n    function absDiff(uint256 x, uint256 y) internal pure returns (uint256 r, bool sign) {\n        assembly (\"memory-safe\") {\n            sign := lt(x, y)\n            let m := sub(0x00, sign)\n            r := sub(xor(sub(x, y), m), m)\n        }\n    }\n}\n\n// src/allowanceholder/AllowanceHolderContext.sol\n\nabstract contract AllowanceHolderContext is Context {\n    function _isForwarded() internal view virtual override returns (bool) {\n        return super._isForwarded() || super._msgSender() == address(ALLOWANCE_HOLDER);\n    }\n\n    function _msgData() internal view virtual override returns (bytes calldata) {\n        if (super._msgSender() == address(ALLOWANCE_HOLDER)) {\n            return msg.data[:msg.data.length - 20];\n        } else {\n            return msg.data;\n        }\n    }\n\n    function _msgSender() internal view virtual override returns (address sender) {\n        sender = super._msgSender();\n        if (sender == address(ALLOWANCE_HOLDER)) {\n            // ERC-2771 like usage where the _trusted_ `AllowanceHolder` has appended the appropriate\n            // msg.sender to the msg data\n            bytes calldata data = super._msgData();\n            assembly (\"memory-safe\") {\n                sender := shr(0x60, calldataload(add(data.offset, sub(data.length, 0x14))))\n            }\n        }\n    }\n\n    // this is here to avoid foot-guns and make it very explicit that we intend\n    // to pass the confused deputy check in AllowanceHolder\n    function balanceOf(address) external pure {\n        assembly (\"memory-safe\") {\n            mstore8(0x00, 0x00)\n            return(0x00, 0x01)\n        }\n    }\n}\n\n// src/ISettlerActions.sol\n\ninterface ISettlerActions {\n    /// VIP actions should always start with `recipient` address and the `permit` from the taker\n    /// followed by all the other parameters to ensure compatibility with `executeWithPermit` entrypoint.\n    /// `minBuyAmount`/`amountOutMin` should always be the last parameter.\n\n    /// @dev Transfer funds from msg.sender Permit2.\n    function TRANSFER_FROM(address recipient, ISignatureTransfer.PermitTransferFrom memory permit, bytes memory sig)\n        external;\n\n    // @dev msgValue is interpreted as an upper bound on the expected msg.value, not as an exact specification\n    function NATIVE_CHECK(uint256 deadline, uint256 msgValue) external;\n\n    /// @dev Verify an EIP-712 signature over the taker and the entrypoint's `zid` argument, then\n    ///      expose the signer to liquidity sources through `attestation()` for the rest of the\n    ///      swap.\n    function ATTEST(uint256 deadline, bytes32 r, bytes32 vs) external;\n\n    /// @dev Transfer funds from metatransaction requestor into the Settler contract using Permit2. Only for use in `Settler.executeMetaTxn` where the signature is provided as calldata\n    function METATXN_TRANSFER_FROM(address recipient, ISignatureTransfer.PermitTransferFrom memory permit) external;\n\n    /// @dev Settle an RfqOrder between maker and taker transfering funds directly between the parties\n    // Post-req: Payout if recipient != taker\n    function RFQ_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory takerPermit,\n        ISignatureTransfer.PermitTransferFrom memory makerPermit,\n        address maker,\n        bytes memory makerSig,\n        bytes memory takerSig\n    ) external;\n\n    /// @dev Settle an RfqOrder between maker and taker transfering funds directly between the parties for the entire amount\n    function METATXN_RFQ_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory takerPermit,\n        ISignatureTransfer.PermitTransferFrom memory makerPermit,\n        address maker,\n        bytes memory makerSig\n    ) external;\n\n    /// @dev Settle an RfqOrder between Maker and Settler. Transfering funds from the Settler contract to maker.\n    /// Retaining funds in the settler contract.\n    // Pre-req: Funded\n    // Post-req: Payout\n    function RFQ(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        address maker,\n        bytes memory makerSig,\n        address takerToken,\n        uint256 maxTakerAmount\n    ) external;\n\n    function UNISWAPV4(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n    function UNISWAPV4_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) external;\n    function METATXN_UNISWAPV4_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n\n    function BALANCERV3(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n    function BALANCERV3_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) external;\n    function METATXN_BALANCERV3_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n\n    function PANCAKE_INFINITY(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n    function PANCAKE_INFINITY_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) external;\n    function METATXN_PANCAKE_INFINITY_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n\n    /// @dev Trades against UniswapV3 using the contracts balance for funding\n    // Pre-req: Funded\n    // Post-req: Payout\n    function UNISWAPV3(address recipient, uint256 ppm, bytes memory path, uint256 amountOutMin) external;\n    /// @dev Trades against UniswapV3 using user funds via Permit2 for funding\n    function UNISWAPV3_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory path,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) external;\n    /// @dev Trades against UniswapV3 using user funds via Permit2 for funding. Metatransaction variant. Signature is over all actions.\n    function METATXN_UNISWAPV3_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory path,\n        uint256 amountOutMin\n    ) external;\n\n    function MAKERPSM(address recipient, uint256 ppm, bool buyGem, uint256 amountOutMin, address psm, address dai)\n        external;\n\n    function CURVE_TRICRYPTO_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        uint80 poolInfo,\n        bytes memory sig,\n        uint256 minBuyAmount\n    ) external;\n    function METATXN_CURVE_TRICRYPTO_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        uint80 poolInfo,\n        uint256 minBuyAmount\n    ) external;\n\n    function DODOV1(address sellToken, uint256 ppm, address pool, bool quoteForBase, uint256 minBuyAmount) external;\n    function DODOV2(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        address pool,\n        bool quoteForBase,\n        uint256 minBuyAmount\n    ) external;\n\n    function VELODROME(address recipient, uint256 ppm, address pool, uint24 swapInfo, uint256 minBuyAmount) external;\n\n    /// @dev Trades against MaverickV2 using the contracts balance for funding\n    /// This action does not use the MaverickV2 callback, so it takes an arbitrary pool address to make calls against.\n    /// Passing `tokenAIn` as a parameter actually saves gas relative to introspecting the pool's `tokenA()` accessor.\n    function MAVERICKV2(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        address pool,\n        bool tokenAIn,\n        int32 tickLimit,\n        uint256 minBuyAmount\n    ) external;\n\n    /// @dev Trades against UniswapV2 using the contracts balance for funding\n    /// @param swapInfo is encoded as the upper 16 bits as the fee of the pool in bps, the second\n    ///                 lowest bit as \"sell token has transfer fee\", and the lowest bit as the\n    ///                 \"token0 for token1\" flag.\n    function UNISWAPV2(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        address pool,\n        uint24 swapInfo,\n        uint256 amountOutMin\n    ) external;\n\n    function POSITIVE_SLIPPAGE(\n        address payable recipient,\n        address token,\n        uint256 expectedAmount,\n        uint256 surplusPpm,\n        uint256 maxPpm\n    ) external;\n\n    /// @dev Trades against a basic AMM which follows the approval, transferFrom(msg.sender) interaction\n    // Pre-req: Funded\n    // Post-req: Payout\n    function BASIC(address sellToken, uint256 ppm, address pool, uint256 offset, bytes calldata data) external;\n\n    /// @dev Fills one Deepstate book with the current `sellToken` balance. Native ETH is the ERC-7528 address in\n    /// both `sellToken` and `buyToken`. Unmatched quantity is discarded rather than rested, so it stays in the\n    /// Settler as `sellToken` for later actions.\n    /// @param epoch Book epoch to match against. The book must already be initialized.\n    /// @param tick Limit price enforced by the engine: `2 ** (96 * tick / 2**31)` units of the higher-addressed\n    /// token per unit of the lower-addressed token.\n    /// @param inversePriceX128 `floor(2**(128 + shift) / factor)` where `(factor, shift)` is Deepstate's\n    /// `TickMath32.getPriceFactorAtTick(tick)`: the Q128 reciprocal of the limit price as the engine represents it.\n    /// Only used when selling the higher-addressed token (a bid): Deepstate sizes bids in the lower-addressed\n    /// token, so the sell amount is converted through this value. Sizing at the limit price means the engine can\n    /// never take more than the sell amount. A larger value lets it take more. If the book is better than the limit,\n    /// the leftover stays in the Settler as `sellToken`. Ignored for an ask.\n    // Pre-req: Funded\n    // Post-req: Payout\n    function DEEPSTATE(\n        address sellToken,\n        uint256 ppm,\n        address buyToken,\n        uint256 epoch,\n        int32 tick,\n        uint256 inversePriceX128\n    ) external;\n\n    /// @dev Tries `candidates` in order and commits the first whose increase in Settler's `token`\n    ///      balance meets its `targets` entry. A decrease reverts the candidate. Candidates run\n    ///      with Settler as the caller and no value, so they must not contain `CHECK_SLIPPAGE` or\n    ///      `NATIVE_CHECK`. Each non-final candidate gets `trialGasLimit` gas, which must be\n    ///      nonzero and fit in 64 bits.\n    // Pre-req: Funded\n    function SELECT(uint256 trialGasLimit, address token, uint256[] calldata targets, bytes[][] calldata candidates)\n        external;\n\n    function EKUBO(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n\n    function EKUBOV3(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n\n    function EKUBOV3_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) external;\n\n    function METATXN_EKUBOV3_VIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) external;\n\n    function FLUXPOOL(address sellToken, uint256 ppm, bytes32 poolId, bool zeroForOne, uint256 minBuyAmount) external;\n\n    struct BebopMakerSignature {\n        bytes signatureBytes;\n        uint256 flags;\n    }\n\n    struct BebopOrder {\n        uint256 expiry;\n        address maker_address;\n        uint256 maker_nonce;\n        address maker_token;\n        uint256 taker_amount;\n        uint256 maker_amount;\n\n        // the high 5 bits are unused\n        // the next 3 bits are the `takerHasNative`, `makerHasNative`, and\n        //   `takerUsingPermit2` flags (in that order from high to low) from the\n        //   original `packed_commands` field\n        // the next 120 bits are unused\n        // the low 128 bits are the `event_id` from the original `flags` field\n        uint256 event_id_and_flags;\n    }\n\n    function BEBOP(\n        address recipient,\n        address sellToken,\n        BebopOrder memory order,\n        BebopMakerSignature memory makerSignature,\n        uint256 amountOutMin\n    ) external;\n\n    function HANJI(\n        address sellToken,\n        uint256 ppm,\n        address pool,\n        uint256 sellScalingFactor,\n        uint256 buyScalingFactor,\n        bool isAsk,\n        uint256 priceLimit,\n        uint256 minBuyAmount\n    ) external;\n\n    function CHECK_SLIPPAGE(bool transferExactLimit) external;\n}\n\n// src/interfaces/ISettlerTakerSubmitted.sol\n\ninterface ISettlerTakerSubmitted is ISettlerBase {\n    function execute(\n        AllowedSlippage memory slippage,\n        bytes[] calldata actions,\n        bytes32 /* zid & affiliate */\n    )\n        external\n        payable\n        returns (bool);\n\n    function executeWithPermit(\n        AllowedSlippage memory slippage,\n        bytes[] calldata actions,\n        bytes32 /* zid & affiliate */,\n        bytes memory permitData\n    ) external payable returns (bool);\n}\n\n// src/utils/AddressDerivation.sol\n\nlibrary AddressDerivation {\n    using UnsafeMath for uint256;\n    using FastLogic for bool;\n\n    uint256 internal constant _SECP256K1_P = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F;\n    uint256 internal constant _SECP256K1_N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141;\n    uint256 internal constant SECP256K1_GX = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798;\n    uint256 internal constant SECP256K1_GY = 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8;\n\n    error InvalidCurve(uint256 x, uint256 y);\n\n    // keccak256(abi.encodePacked(ECMUL([x, y], k)))[12:]\n    function deriveEOA(uint256 x, uint256 y, uint256 k) internal pure returns (address) {\n        if (k == 0) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        if ((k >= _SECP256K1_N).or(x >= _SECP256K1_P).or(y >= _SECP256K1_P)) {\n            Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n        }\n\n        // +/-7 are neither square nor cube mod p, so we only have to check one\n        // coordinate against 0. if it is 0, then the other is too (the point at\n        // infinity) or the point is invalid\n        if ((x == 0)\n            .or(\n                y.unsafeMulMod(y, _SECP256K1_P)\n                    != x.unsafeMulMod(x, _SECP256K1_P).unsafeMulMod(x, _SECP256K1_P).unsafeAddMod(7, _SECP256K1_P)\n            )) {\n            revert InvalidCurve(x, y);\n        }\n\n        unchecked {\n            // https://ethresear.ch/t/you-can-kinda-abuse-ecrecover-to-do-ecmul-in-secp256k1-today/2384\n            return ecrecover(\n                bytes32(0), uint8(27 + (y & 1)), bytes32(x), bytes32(UnsafeMath.unsafeMulMod(x, k, _SECP256K1_N))\n            );\n        }\n    }\n\n    // keccak256(RLP([deployer, nonce]))[12:]\n    function deriveContract(address deployer, uint64 nonce) internal pure returns (address result) {\n        if (nonce == 0) {\n            assembly (\"memory-safe\") {\n                mstore(\n                    0x00,\n                    or(\n                        0xd694000000000000000000000000000000000000000080,\n                        shl(8, and(0xffffffffffffffffffffffffffffffffffffffff, deployer))\n                    )\n                )\n                result := keccak256(0x09, 0x17)\n            }\n        } else if (nonce < 0x80) {\n            assembly (\"memory-safe\") {\n                // we don't care about dirty bits in `deployer`; they'll be overwritten later\n                mstore(0x14, deployer)\n                mstore(0x00, 0xd694)\n                mstore8(0x34, nonce)\n                result := keccak256(0x1e, 0x17)\n            }\n        } else {\n            if (~uint256(nonce) << 192 == 0) {\n                Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n            }\n            // compute ceil(log_256(nonce)) + 1\n            uint256 nonceLength = 8;\n            unchecked {\n                nonceLength += (0 < (uint256(nonce) >> 32)).toUint() << 5;\n                nonceLength += ((uint256(nonce) >> 8) >= (1 << nonceLength)).toUint() << 4;\n                nonceLength += (uint256(nonce) >= (1 << nonceLength)).toUint() << 3;\n                // ceil\n                nonceLength += ((uint256(nonce) << 8) >= (1 << nonceLength)).toUint() << 3;\n                // bytes, not bits\n                nonceLength >>= 3;\n            }\n            assembly (\"memory-safe\") {\n                // we don't care about dirty bits in `deployer` or `nonce`. they'll be overwritten later\n                mstore(nonceLength, nonce)\n                mstore8(0x20, add(0x7f, nonceLength))\n                mstore(0x00, deployer)\n                mstore8(0x0a, add(0xd5, nonceLength))\n                mstore8(0x0b, 0x94)\n                result := keccak256(0x0a, add(0x16, nonceLength))\n            }\n        }\n    }\n\n    // keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initHash))[12:]\n    function deriveDeterministicContract(address deployer, bytes32 salt, bytes32 initHash)\n        internal\n        pure\n        returns (address result)\n    {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n\n            // we don't care about dirty bits in `deployer`; they'll be overwritten later\n            mstore(0x00, deployer)\n            mstore(0x20, salt)\n            mstore(0x40, initHash)\n            mstore8(0x0b, 0xff)\n\n            result := keccak256(0x0b, 0x55)\n\n            mstore(0x40, ptr)\n        }\n    }\n\n    function deriveContractEraVm(address deployer, uint64 nonce) internal pure returns (address result) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x63bae3a9951d38e8a3fbb7b70909afc1200610fc5bc55ade242f815974674f23)\n            mstore(add(0x20, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, deployer))\n            mstore(add(0x40, ptr), and(0xffffffffffffffff, nonce))\n            result := keccak256(ptr, 0x60)\n        }\n    }\n\n    function deriveDeterministicContractEraVm(\n        address deployer,\n        bytes32 salt,\n        bytes32 initCodeWithoutArgsHash,\n        bytes32 initArgsHash\n    ) internal pure returns (address result) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x2020dba91b30cc0006188af794c2fb30dd8520db7e2c088b7fc7c103c00ca494)\n            mstore(add(0x20, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, deployer))\n            mstore(add(0x40, ptr), salt)\n            mstore(add(0x60, ptr), initCodeWithoutArgsHash)\n            mstore(add(0x80, ptr), initArgsHash)\n            result := keccak256(ptr, 0xa0)\n        }\n    }\n}\n\n// src/core/Permit2PaymentAbstract.sol\n\nabstract contract Permit2PaymentAbstract is AbstractContext {\n    string internal constant TOKEN_PERMISSIONS_TYPE = \"TokenPermissions(address token,uint256 amount)\";\n\n    function _isRestrictedTarget(address) internal view virtual returns (bool) {\n        return false;\n    }\n\n    function _fallback(bytes calldata) internal virtual returns (bool success, bytes memory returndata) {\n        return (success, returndata);\n    }\n\n    function _operator() internal view virtual returns (address);\n\n    function _permitToSellAmountCalldata(address owner, ISignatureTransfer.PermitTransferFrom calldata permit)\n        internal\n        view\n        virtual\n        returns (uint256 sellAmount);\n\n    function _permitToSellAmount(address owner, ISignatureTransfer.PermitTransferFrom memory permit)\n        internal\n        view\n        virtual\n        returns (uint256 sellAmount);\n\n    function _permitToTransferDetails(\n        address owner,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        address recipient\n    )\n        internal\n        view\n        virtual\n        returns (ISignatureTransfer.SignatureTransferDetails memory transferDetails, uint256 sellAmount);\n\n    function _transferFromIKnowWhatImDoing(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        address from,\n        bytes32 witness,\n        string memory witnessTypeString,\n        bytes memory sig,\n        bool isForwarded\n    ) internal virtual;\n\n    function _transferFromIKnowWhatImDoing(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        address from,\n        bytes32 witness,\n        string memory witnessTypeString,\n        bytes memory sig\n    ) internal virtual;\n\n    function _transferFrom(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        bytes memory sig,\n        bool isForwarded\n    ) internal virtual;\n\n    function _transferFrom(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        bytes memory sig\n    ) internal virtual;\n\n    function _setOperatorAndCall(\n        address target,\n        bytes memory data,\n        uint32 selector,\n        function(bytes calldata) internal returns (bytes memory) callback\n    ) internal virtual returns (bytes memory);\n\n    function _setOperatorAndTryCall(\n        address target,\n        bytes memory data,\n        uint32 selector,\n        function(bytes calldata) internal returns (bytes memory) callback,\n        uint256 gasLimit\n    ) internal virtual returns (bool);\n\n    modifier metaTx(address msgSender, bytes32 witness) virtual;\n\n    modifier takerSubmitted() virtual;\n\n    function _allowanceHolderTransferFrom(address token, address owner, address recipient, uint256 amount)\n        internal\n        virtual;\n}\n\n// src/vendor/SafeTransferLib.sol\n\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\n/// @author Modified from Solady (https://github.com/vectorized/solady/blob/main/src/utils/SafeTransferLib.sol)\n/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)\n/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.\nlibrary SafeTransferLib {\n    /*//////////////////////////////////////////////////////////////\n                             ETH OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function safeTransferETH(address payable to, uint256 amount) internal {\n        assembly (\"memory-safe\") {\n            // Transfer the ETH and revert if it fails.\n            if iszero(call(gas(), to, amount, 0x00, 0x00, 0x00, 0x00)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n        }\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                            ERC20 OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function fastBalanceOf(IERC20 token, address acct) internal view returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            mstore(0x14, acct) // Store the `acct` argument.\n            mstore(0x00, 0x70a08231000000000000000000000000) // Selector for `balanceOf(address)`, with `acct`'s padding.\n\n            // Call and check for revert. Storing the selector with padding in\n            // memory at 0 results in a start of calldata at offset 16. Calldata\n            // is 36 bytes long (4 bytes selector, 32 bytes argument)\n            if iszero(staticcall(gas(), token, 0x10, 0x24, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            // Check for short returndata and missing code\n            if iszero(lt(0x1f, returndatasize())) { revert(0x00, 0x00) }\n\n            r := mload(0x00)\n        }\n    }\n\n    // Retain one wei to avoid clearing the ERC20 balance slot.\n    function fastSpendableBalance(IERC20 token) internal view returns (uint256) {\n        return Math_0.saturatingDec(fastBalanceOf(token, address(this)));\n    }\n\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 amount) internal {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40) // Cache the free memory pointer.\n\n            mstore(0x60, amount) // Store the `amount` argument.\n            mstore(0x40, to) // Store the `to` argument.\n            mstore(0x2c, shl(0x60, from)) // Store the `from` argument. (Clears `to`'s padding.)\n            mstore(0x0c, 0x23b872dd000000000000000000000000) // Selector for `transferFrom(address,address,uint256)`, with `from`'s padding.\n\n            // Calldata starts at offset 28 and is 100 bytes long (3 * 32 + 4).\n            // If there is returndata (optional) we copy the first 32 bytes into the first slot of memory.\n            if iszero(call(gas(), token, 0x00, 0x1c, 0x64, 0x00, 0x20)) {\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            // We check that the call either returned exactly 1 [true] (can't just be non-zero\n            // data), or had no return data.\n            if iszero(or(and(eq(mload(0x00), 0x01), lt(0x1f, returndatasize())), iszero(returndatasize()))) {\n                mstore(0x00, 0x7939f424) // Selector for `TransferFromFailed()`\n                revert(0x1c, 0x04)\n            }\n\n            mstore(0x60, 0x00) // Restore the zero slot to zero.\n            mstore(0x40, ptr) // Restore the free memory pointer.\n        }\n    }\n\n    function safeTransfer(IERC20 token, address to, uint256 amount) internal {\n        assembly (\"memory-safe\") {\n            mstore(0x14, to) // Store the `to` argument.\n            mstore(0x34, amount) // Store the `amount` argument.\n            // Storing `amount` clobbers the upper bits of the free memory pointer, but those bits\n            // can never be set without running into an OOG, so it's safe. We'll restore them to\n            // zero at the end.\n            mstore(0x00, 0xa9059cbb000000000000000000000000) // Selector for `transfer(address,uint256)`, with `to`'s padding.\n\n            // Calldata starts at offset 16 and is 68 bytes long (2 * 32 + 4).\n            // If there is returndata (optional) we copy the first 32 bytes into the first slot of memory.\n            if iszero(call(gas(), token, 0x00, 0x10, 0x44, 0x00, 0x20)) {\n                let ptr := and(0xffffff, mload(0x40))\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            // We check that the call either returned exactly 1 [true] (can't just be non-zero\n            // data), or had no return data.\n            if iszero(or(and(eq(mload(0x00), 0x01), lt(0x1f, returndatasize())), iszero(returndatasize()))) {\n                mstore(0x00, 0x90b8ec18) // Selector for `TransferFailed()`\n                revert(0x1c, 0x04)\n            }\n\n            mstore(0x34, 0x00) // Restore the part of the free memory pointer that was overwritten.\n        }\n    }\n\n    function safeApprove(IERC20 token, address to, uint256 amount) internal {\n        assembly (\"memory-safe\") {\n            mstore(0x14, to) // Store the `to` argument.\n            mstore(0x34, amount) // Store the `amount` argument.\n            // Storing `amount` clobbers the upper bits of the free memory pointer, but those bits\n            // can never be set without running into an OOG, so it's safe. We'll restore them to\n            // zero at the end.\n            mstore(0x00, 0x095ea7b3000000000000000000000000) // Selector for `approve(address,uint256)`, with `to`'s padding.\n\n            // Calldata starts at offset 16 and is 68 bytes long (2 * 32 + 4).\n            // If there is returndata (optional) we copy the first 32 bytes into the first slot of memory.\n            if iszero(call(gas(), token, 0x00, 0x10, 0x44, 0x00, 0x20)) {\n                let ptr := and(0xffffff, mload(0x40))\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            // We check that the call either returned exactly 1 [true] (can't just be non-zero\n            // data), or had no return data.\n            if iszero(or(and(eq(mload(0x00), 0x01), lt(0x1f, returndatasize())), iszero(returndatasize()))) {\n                mstore(0x00, 0x3e3f8f73) // Selector for `ApproveFailed()`\n                revert(0x1c, 0x04)\n            }\n\n            mstore(0x34, 0x00) // Restore the part of the free memory pointer that was overwritten.\n        }\n    }\n\n    function safeApproveIfBelow(IERC20 token, address spender, uint256 amount) internal {\n        uint256 allowance;\n        assembly (\"memory-safe\") {\n            // Save the free memory pointer for restoration after we clobber it\n            let ptr := mload(0x40)\n\n            mstore(0x40, spender)\n            mstore(0x2c, shl(0x60, address())) // Also clears `spender`'s padding\n            mstore(0x0c, 0xdd62ed3e000000000000000000000000) // Selector for `allowance(address,address)` with `address()`'s padding\n\n            // Calldata starts at offset 28 and is 68 bytes long\n            if iszero(staticcall(gas(), token, 0x1c, 0x44, 0x00, 0x20)) {\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n\n            // Revert on short returndata\n            if gt(0x20, returndatasize()) {\n                revert(0x00, 0x00)\n            }\n\n            allowance := mload(0x00)\n\n            // Restore the free memory pointer\n            mstore(0x40, ptr)\n        }\n\n        if (allowance < amount) {\n            if (allowance != 0) {\n                safeApprove(token, spender, 0);\n            }\n            safeApprove(token, spender, type(uint256).max);\n        }\n    }\n}\n\n// src/core/Constants.sol\n\n// The denominator for all balance-proportional action arguments (parts-per-million).\nuint256 constant BASIS = 1_000_000;\n\n// ERC-7528 native asset designator.\naddress constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\nfunction isNative_0(address token) pure returns (bool r) {\n    assembly (\"memory-safe\") {\n        r := iszero(shl(0x60, xor(ETH_ADDRESS, token)))\n    }\n}\n\nfunction isNative_1(IERC20 token) pure returns (bool) {\n    return isNative_0(address(token));\n}\n\nfunction compatBalance(IERC20 token, address holder) view returns (uint256) {\n    return isNative_1(token) ? holder.balance : SafeTransferLib.fastBalanceOf(token, holder);\n}\n\nfunction compatSelfBalance(IERC20 token) view returns (uint256 r) {\n    if (isNative_1(token)) {\n        // Free functions cannot use `this`. Equivalent Solidity: return address(this).balance;\n        assembly (\"memory-safe\") {\n            r := selfbalance()\n        }\n    } else {\n        address self;\n        // Free functions cannot use `this`. Equivalent Solidity: self = address(this);\n        assembly (\"memory-safe\") {\n            self := address()\n        }\n        r = SafeTransferLib.fastBalanceOf(token, self);\n    }\n}\n\n// src/utils/SafePermit.sol\n\nlibrary FastPermit {\n    function fastPermit(\n        IERC2612 token,\n        address owner,\n        address spender,\n        uint256 amount,\n        uint256 deadline,\n        bytes32 vs,\n        bytes32 r\n    ) internal returns (bool success) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(add(0xd4, ptr), and(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, vs)) // `s`.\n            mstore(add(0xb4, ptr), r) // `r`.\n            mstore(add(0x94, ptr), add(0x1b, shr(0xff, vs))) // `v`.\n            mstore(add(0x74, ptr), deadline)\n            mstore(add(0x54, ptr), amount)\n            mstore(add(0x34, ptr), spender)\n            mstore(add(0x20, ptr), shl(0x60, owner)) // with `spender`'s padding\n            mstore(ptr, 0xd505accf000000000000000000000000) // selector for `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` with `owner`'s padding\n\n            success := call(gas(), token, 0x00, add(0x10, ptr), 0xe4, 0x00, 0x20)\n            success := and(success, and(iszero(xor(mload(0x00), 0x01)), gt(returndatasize(), 0x1f)))\n        }\n    }\n\n    function fastDAIPermit(\n        IDAIStylePermit token,\n        address owner,\n        address spender,\n        uint256 nonce,\n        uint256 expiry,\n        bool allowed,\n        bytes32 vs,\n        bytes32 r\n    ) internal returns (bool success) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(add(0xf4, ptr), and(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, vs)) // `s`.\n            mstore(add(0xd4, ptr), r) // `r`.\n            mstore(add(0xb4, ptr), add(0x1b, shr(0xff, vs))) // `v`.\n            mstore(add(0x94, ptr), lt(0x00, allowed))\n            mstore(add(0x74, ptr), expiry)\n            mstore(add(0x54, ptr), nonce)\n            mstore(add(0x34, ptr), spender)\n            mstore(add(0x20, ptr), shl(0x60, owner)) // with `spender`'s padding\n            mstore(ptr, 0x8fcbaf0c000000000000000000000000) // selector for `permit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32)`\n\n            success := call(gas(), token, 0x00, add(0x10, ptr), 0x104, 0x00, 0x20)\n            success := and(success, and(iszero(xor(mload(0x00), 0x01)), gt(returndatasize(), 0x1f)))\n        }\n    }\n\n    function fastApproveMetaTransaction(\n        IERC20MetaTransaction token,\n        address owner,\n        address spender,\n        uint256 amount,\n        bytes32 vs,\n        bytes32 r\n    ) internal returns (bool success, bytes32 functionSignatureHash) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(add(0xf8, ptr), amount)\n            mstore(add(0xd8, ptr), spender)\n            mstore(add(0xc4, ptr), 0x095ea7b3000000000000000000000000) // selector for `approve(address,uint256)` with `spender` padding\n            mstore(add(0xb4, ptr), 0x44) // length of approve call\n            mstore(add(0x94, ptr), add(0x1b, shr(0xff, vs))) // `v`.\n            mstore(add(0x74, ptr), and(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, vs)) // `s`.\n            mstore(add(0x54, ptr), r) // `r`.\n            mstore(add(0x34, ptr), 0xa0) // offset to function signature\n            mstore(add(0x14, ptr), owner)\n            mstore(ptr, 0x0c53c51c000000000000000000000000) // selector for `executeMetaTransaction(address,bytes,bytes32,bytes32,uint8)` with `owner`'s padding\n\n            functionSignatureHash := keccak256(add(0xd4, ptr), 0x44)\n\n            success := call(gas(), token, 0x00, add(0x10, ptr), 0x108, 0x00, 0x60)\n            success := and(success, and(iszero(xor(mload(0x40), 0x01)), gt(returndatasize(), 0x5f)))\n\n            mstore(0x40, ptr)\n        }\n    }\n\n    function fastDomainSeparator(IERC20 token, uint32 domainSeparatorSelector)\n        internal\n        view\n        returns (bytes32 domainSeparator)\n    {\n        assembly (\"memory-safe\") {\n            mstore(0x00, domainSeparatorSelector)\n            if iszero(staticcall(gas(), token, 0x1c, 0x04, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if gt(0x20, returndatasize()) {\n                revert(0x00, 0x00)\n            }\n            domainSeparator := mload(0x00)\n        }\n    }\n\n    function fastNonce(IERC20 token, address owner, uint32 nonceSelector) internal view returns (uint256 nonce) {\n        assembly (\"memory-safe\") {\n            mstore(0x14, owner)\n            mstore(0x00, shl(0x60, nonceSelector)) // with `owner`'s padding\n            if iszero(staticcall(gas(), token, 0x10, 0x24, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if gt(0x20, returndatasize()) {\n                revert(0x00, 0x00)\n            }\n            nonce := mload(0x00)\n        }\n    }\n\n    function fastAllowance(IERC20 token, address owner, address spender) internal view returns (uint256 allowance) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(0x34, spender)\n            mstore(0x20, shl(0x60, owner)) // with `spender`'s padding\n            mstore(0x00, 0xdd62ed3e000000000000000000000000) // selector for `allowance(address,address)` with `spender`'s padding\n            if iszero(staticcall(gas(), token, 0x10, 0x44, 0x00, 0x20)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            if gt(0x20, returndatasize()) {\n                revert(0x00, 0x00)\n            }\n            allowance := mload(0x00)\n            mstore(0x40, ptr)\n        }\n    }\n}\n\nlibrary SafePermit {\n    using FastLogic for bool;\n    using FastPermit for IERC2612;\n    using FastPermit for IDAIStylePermit;\n    using FastPermit for IERC20MetaTransaction;\n    using FastPermit for IERC20;\n\n    bytes32 private constant _PERMIT_TYPEHASH =\n        keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n    bytes32 private constant _PERMIT_ALLOWED_TYPEHASH =\n        keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n\n    bytes32 private constant _META_TRANSACTION_TYPEHASH =\n        keccak256(\"MetaTransaction(uint256 nonce,address from,bytes functionSignature)\");\n\n    function _revert(uint32 err) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, err)\n            revert(0x1c, 0x04)\n        }\n    }\n\n    function _checkEffects(IERC20 token, address owner, address spender, uint256 amount, uint256 nonce) internal view {\n        if ((nonce == 0).or(token.fastAllowance(owner, spender) != amount)) {\n            _revert(0xb78cb0dd); // selector for `PermitFailed()`\n        }\n    }\n\n    function _checkSignature(bytes32 signingHash, address owner, bytes32 vs, bytes32 r) internal view {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(0x00, signingHash)\n            mstore(0x20, add(0x1b, shr(0xff, vs))) // `v`.\n            mstore(0x40, r) // `r`.\n            mstore(0x60, and(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, vs)) // `s`.\n            let recovered := mload(staticcall(gas(), 0x01, 0x00, 0x80, 0x01, 0x20))\n            if iszero(gt(returndatasize(), shl(0x60, xor(owner, recovered)))) {\n                mstore(0x00, 0x8baa579f) // selector for `InvalidSignature()`\n                revert(0x1c, 0x04)\n            }\n            mstore(0x40, ptr)\n            mstore(0x60, 0x00)\n        }\n    }\n\n    function safePermit(\n        IERC2612 token,\n        address owner,\n        address spender,\n        uint256 amount,\n        uint256 deadline,\n        bytes32 vs,\n        bytes32 r\n    ) internal {\n        // `permit` could succeed vacuously with no returndata if there's a fallback\n        // function (e.g. WETH). `permit` could fail spuriously if it was\n        // replayed/frontrun. Avoid these by manually verifying the effects and\n        // signature. Insufficient gas griefing is defused by checking the effects.\n        if (!token.fastPermit(owner, spender, amount, deadline, vs, r)) {\n            // Check effects and signature\n            if (block.timestamp > deadline) {\n                _revert(0x1a15a3cc); // selector for `PermitExpired()`\n            }\n            uint256 nonce = token.fastNonce(owner, uint32(token.nonces.selector));\n            _checkEffects(token, owner, spender, amount, nonce);\n            unchecked {\n                nonce--;\n            }\n            bytes32 domainSeparator = token.fastDomainSeparator(uint32(token.DOMAIN_SEPARATOR.selector));\n            bytes32 typeHash = _PERMIT_TYPEHASH;\n            bytes32 signingHash;\n            assembly (\"memory-safe\") {\n                let ptr := mload(0x40)\n                mstore(ptr, 0x1901)\n                mstore(add(0x20, ptr), domainSeparator)\n                mstore(add(0x40, ptr), typeHash)\n                mstore(add(0x60, ptr), owner)\n                mstore(add(0x80, ptr), spender)\n                mstore(add(0xa0, ptr), amount)\n                mstore(add(0xc0, ptr), nonce)\n                mstore(add(0xe0, ptr), deadline)\n                mstore(add(0x40, ptr), keccak256(add(0x40, ptr), 0xc0))\n                signingHash := keccak256(add(0x1e, ptr), 0x42)\n            }\n            _checkSignature(signingHash, owner, vs, r);\n        }\n    }\n\n    function safePermit(\n        IDAIStylePermit token,\n        address owner,\n        address spender,\n        uint256 nonce,\n        uint256 deadline,\n        bool allowed,\n        bytes32 vs,\n        bytes32 r\n    ) internal {\n        // See comments above\n        if (!token.fastDAIPermit(owner, spender, nonce, deadline, allowed, vs, r)) {\n            // Check effects and signature\n            // https://etherscan.io/token/0x6b175474e89094c44da98b954eedeac495271d0f#code#L188\n            if ((block.timestamp > deadline).and(deadline > 0)) {\n                _revert(0x1a15a3cc);\n            }\n            nonce = token.fastNonce(owner, uint32(token.nonces.selector));\n            uint256 expectedAllowance;\n            unchecked {\n                expectedAllowance = 0 - allowed.toUint();\n            }\n            _checkEffects(token, owner, spender, expectedAllowance, nonce);\n            unchecked {\n                nonce--;\n            }\n            bytes32 domainSeparator = token.fastDomainSeparator(uint32(token.DOMAIN_SEPARATOR.selector));\n            bytes32 typeHash = _PERMIT_ALLOWED_TYPEHASH;\n            bytes32 signingHash;\n            assembly (\"memory-safe\") {\n                let ptr := mload(0x40)\n                mstore(ptr, 0x1901)\n                mstore(add(0x20, ptr), domainSeparator)\n                mstore(add(0x40, ptr), typeHash)\n                mstore(add(0x60, ptr), owner)\n                mstore(add(0x80, ptr), spender)\n                mstore(add(0xa0, ptr), nonce)\n                mstore(add(0xc0, ptr), deadline)\n                mstore(add(0xe0, ptr), lt(0x00, allowed))\n                mstore(add(0x40, ptr), keccak256(add(0x40, ptr), 0xc0))\n                signingHash := keccak256(add(0x1e, ptr), 0x42)\n            }\n            _checkSignature(signingHash, owner, vs, r);\n        }\n    }\n\n    function safePermit(\n        IERC20MetaTransaction token,\n        address owner,\n        address spender,\n        uint256 amount,\n        bytes32 vs,\n        bytes32 r\n    ) internal {\n        // See comments above\n        (bool success, bytes32 functionSignatureHash) = token.fastApproveMetaTransaction(owner, spender, amount, vs, r);\n        if (!success) {\n            // Check effects and signature\n            uint256 nonce = token.fastNonce(owner, uint32(token.getNonce.selector));\n            _checkEffects(token, owner, spender, amount, nonce);\n            unchecked {\n                nonce--;\n            }\n            bytes32 domainSeparator = token.fastDomainSeparator(uint32(token.getDomainSeperator.selector));\n            bytes32 typeHash = _META_TRANSACTION_TYPEHASH;\n            bytes32 signingHash;\n            assembly (\"memory-safe\") {\n                let ptr := mload(0x40)\n                mstore(ptr, 0x1901)\n                mstore(add(0x20, ptr), domainSeparator)\n                mstore(add(0x40, ptr), typeHash)\n                mstore(add(0x60, ptr), nonce)\n                mstore(add(0x80, ptr), owner)\n                mstore(add(0xa0, ptr), functionSignatureHash)\n                mstore(add(0x40, ptr), keccak256(add(0x40, ptr), 0x80))\n                signingHash := keccak256(add(0x1e, ptr), 0x42)\n            }\n            _checkSignature(signingHash, owner, vs, r);\n        }\n    }\n}\n\n// src/utils/512Math.sol\n\n/*\n\nWARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING\n  ***                                                                     ***\nWARNING                     This code is unaudited                      WARNING\n  ***                                                                     ***\nWARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING\n\n*/\n\n/// The type uint512 behaves as if it were declared as\n///     struct uint512 {\n///         uint256 hi;\n///         uint256 lo;\n///     }\n/// However, returning `memory` references from internal functions is impossible\n/// to do efficiently, especially when the functions are small and are called\n/// frequently. Therefore, we assume direct control over memory allocation using\n/// the functions `tmp()` and `alloc()` defined below. If you need to pass\n/// 512-bit integers between contracts (generally a bad idea), the struct\n/// `uint512_external` defined at the end of this file is provided for this\n/// purpose and has exactly the definition you'd expect (as well as convenient\n/// conversion functions).\n///\n/// MAKING A DECLARATION OF THE FOLLOWING FORM WILL CAUSE UNEXPECTED BEHAVIOR:\n///     uint512 x;\n/// INSTEAD OF DOING THAT, YOU MUST USE `alloc()`, LIKE THIS:\n///     uint512 x = alloc();\n/// IF YOU REALLY WANTED TO DO THAT (ADVANCED USAGE) THEN FOR CLARITY, WRITE THE\n/// FOLLOWING:\n///     uint512 x = tmp();\n///\n/// While user-defined arithmetic operations (i.e. +, -, *, %, /) are provided\n/// for `uint512`, they are not gas-optimal, full-featured, or composable. You\n/// will get a revert upon incorrect usage. Their primary usage is when a simple\n/// arithmetic operation needs to be performed followed by a comparison (e.g. <,\n/// >, ==, etc.) or conversion to a pair of `uint256`s (i.e. `.into()`). The use\n/// of the user-defined arithmetic operations is not composable with the usage\n/// of `tmp()`.\n///\n/// In general, correct usage of `uint512` requires always specifying the output\n/// location of each operation. For each `o*` operation (mnemonic:\n/// out-of-place), the first argument is the output location and the remaining\n/// arguments are the input. For each `i*` operation (mnemonic: in-place), the\n/// first argument is both input and output and the remaining arguments are\n/// purely input. For each `ir*` operation (mnemonic: in-place reverse; only for\n/// non-commutative operations), the semantics of the input arguments are\n/// flipped (i.e. `irsub(foo, bar)` is semantically equivalent to `foo = bar -\n/// foo`); the first argument is still the output location. Only `irsub`,\n/// `irmod`, `irdiv`, `irmodAlt`, and `irdivAlt` exist. Unless otherwise noted,\n/// the return value of each function is the output location. This supports\n/// chaining/pipeline/tacit-style programming.\n///\n/// All provided arithmetic operations behave as if they were inside an\n/// `unchecked` block. We assume that because you're reaching for 512-bit math,\n/// you have domain knowledge about the range of values that you will\n/// encounter. Overflow causes truncation, not a revert. Division or modulo by\n/// zero still causes a panic revert with code 18 (identical behavior to\n/// \"normal\" unchecked arithmetic). The `unsafe*` functions do not perform\n/// checking for division or modulo by zero; in this case division or modulo by\n/// zero is undefined behavior.\n///\n/// Three additional arithmetic operations are provided, bare `sub`, `mod`, and\n/// `div`. These are provided for use when it is known that the result of the\n/// operation will fit into 256 bits. This fact is not checked, but more\n/// efficient algorithms are employed assuming this. The result is a `uint256`.\n///\n/// The operations `*mod` and `*div` with 512-bit denominator are `view` instead\n/// of `pure` because they make use of the MODEXP (5) precompile. Some EVM L2s\n/// and sidechains do not support MODEXP with 512-bit arguments. On those\n/// chains, the `*modAlt` and `*divAlt` functions are provided. These functions\n/// are truly `pure` and do not rely on MODEXP at all. The downside is that they\n/// consume slightly (really only *slightly*) more gas.\n///\n/// ## Full list of provided functions\n///\n/// Unless otherwise noted, all functions return `(uint512)`\n///\n/// ### Utility\n///\n/// * from(uint256)\n/// * from(uint256,uint256) -- The EVM is big-endian. The most-significant word is first.\n/// * from(uint512) -- performs a copy\n/// * into() returns (uint256,uint256) -- Again, the most-significant word is first.\n/// * toExternal(uint512) returns (uint512_external memory)\n///\n/// ### Comparison (all functions return `(bool)`)\n///\n/// * isZero(uint512)\n/// * isMax(uint512)\n/// * eq(uint512,uint256)\n/// * eq(uint512,uint512)\n/// * ne(uint512,uint256)\n/// * ne(uint512,uint512)\n/// * gt(uint512,uint256)\n/// * gt(uint512,uint512)\n/// * ge(uint512,uint256)\n/// * ge(uint512,uint512)\n/// * lt(uint512,uint256)\n/// * lt(uint512,uint512)\n/// * le(uint512,uint256)\n/// * le(uint512,uint512)\n///\n/// ### Addition\n///\n/// * oadd(uint512,uint256,uint256) -- iadd(uint256,uint256) is not provided for somewhat obvious reasons\n/// * oadd(uint512,uint512,uint256)\n/// * iadd(uint512,uint256)\n/// * oadd(uint512,uint512,uint512)\n/// * iadd(uint512,uint512)\n///\n/// ### Subtraction\n///\n/// * sub(uint512,uint256) returns (uint256)\n/// * sub(uint512,uint512) returns (uint256)\n/// * osub(uint512,uint512,uint256)\n/// * isub(uint512,uint256)\n/// * osub(uint512,uint512,uint512)\n/// * isub(uint512,uint512)\n/// * irsub(uint512,uint512)\n///\n/// ### Multiplication\n///\n/// * omul(uint512,uint256,uint256)\n/// * omul(uint512,uint512,uint256)\n/// * imul(uint512,uint256)\n/// * omul(uint512,uint512,uint512)\n/// * imul(uint512,uint512)\n///\n/// ### Modulo\n///\n/// * mod(uint512,uint256) returns (uint256) -- mod(uint512,uint512) is not provided for less obvious reasons\n/// * omod(uint512,uint512,uint512)\n/// * imod(uint512,uint512)\n/// * irmod(uint512,uint512)\n/// * omodAlt(uint512,uint512,uint512)\n/// * imodAlt(uint512,uint512)\n/// * irmodAlt(uint512,uint512)\n///\n/// ### Division\n///\n/// * div(uint512,uint256) returns (uint256)\n/// * divUp(uint512,uint256) returns (uint256)\n/// * unsafeDiv(uint512,uint256) returns (uint256)\n/// * unsafeDivUp(uint512,uint256) returns (uint256)\n/// * div(uint512,uint512) returns (uint256)\n/// * divUp(uint512,uint512) returns (uint256)\n/// * odiv(uint512,uint512,uint256)\n/// * idiv(uint512,uint256)\n/// * odivUp(uint512,uint512,uint256)\n/// * idivUp(uint512,uint256)\n/// * odiv(uint512,uint512,uint512)\n/// * idiv(uint512,uint512)\n/// * irdiv(uint512,uint512)\n/// * odivUp(uint512,uint512,uint512)\n/// * idivUp(uint512,uint512)\n/// * irdivUp(uint512,uint512)\n/// * divAlt(uint512,uint512) returns (uint256) -- divAlt(uint512,uint256) is not provided because div(uint512,uint256) is suitable for chains without MODEXP\n/// * odivAlt(uint512,uint512,uint512)\n/// * idivAlt(uint512,uint512)\n/// * irdivAlt(uint512,uint512)\n/// * divUpAlt(uint512,uint512) returns (uint256)\n/// * odivUpAlt(uint512,uint512,uint512)\n/// * idivUpAlt(uint512,uint512)\n/// * irdivUpAlt(uint512,uint512)\n///\n/// ### Square root\n///\n/// * sqrt(uint512) returns (uint256)\n/// * osqrtUp(uint512,uint512)\n/// * isqrtUp(uint512)\n///\n/// ### Shifting\n///\n/// * oshr(uint512,uint512,uint256)\n/// * ishr(uint512,uint256)\n/// * oshrUp(uint512,uint512,uint256)\n/// * ishrUp(uint512,uint256)\n/// * oshl(uint512,uint512,uint256)\n/// * ishl(uint512,uint256)\ntype uint512 is bytes32;\n\nfunction alloc() pure returns (uint512 r) {\n    assembly (\"memory-safe\") {\n        r := mload(0x40)\n        mstore(0x40, add(0x40, r))\n    }\n}\n\nfunction tmp() pure returns (uint512 r) {}\n\nlibrary Lib512MathAccessors {\n    function from(uint512 r, uint256 x) internal pure returns (uint512 r_out) {\n        assembly (\"memory-safe\") {\n            mstore(r, 0x00)\n            mstore(add(0x20, r), x)\n            r_out := r\n        }\n    }\n\n    function from(uint512 r, uint256 x_hi, uint256 x_lo) internal pure returns (uint512 r_out) {\n        assembly (\"memory-safe\") {\n            mstore(r, x_hi)\n            mstore(add(0x20, r), x_lo)\n            r_out := r\n        }\n    }\n\n    function from(uint512 r, uint512 x) internal pure returns (uint512 r_out) {\n        assembly (\"memory-safe\") {\n            // Paradoxically, using `mload` and `mstore` here (instead of\n            // `mcopy`) produces more optimal code because it gives solc the\n            // opportunity to optimize-out the use of memory entirely, in\n            // typical usage. As a happy side effect, it also means that we\n            // don't have to deal with Cancun hardfork compatibility issues.\n            mstore(r, mload(x))\n            mstore(add(0x20, r), mload(add(0x20, x)))\n            r_out := r\n        }\n    }\n\n    function into(uint512 x) internal pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            r_hi := mload(x)\n            r_lo := mload(add(0x20, x))\n        }\n    }\n}\n\nusing Lib512MathAccessors for uint512 global;\n\nlibrary Lib512MathComparisons {\n    function isZero(uint512 x) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        assembly (\"memory-safe\") {\n            r := iszero(or(x_hi, x_lo))\n        }\n    }\n\n    function isMax(uint512 x) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        assembly (\"memory-safe\") {\n            r := iszero(not(and(x_hi, x_lo)))\n        }\n    }\n\n    function eq(uint512 x, uint256 y) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        assembly (\"memory-safe\") {\n            r := and(iszero(x_hi), eq(x_lo, y))\n        }\n    }\n\n    function gt(uint512 x, uint256 y) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        assembly (\"memory-safe\") {\n            r := or(gt(x_hi, 0x00), gt(x_lo, y))\n        }\n    }\n\n    function lt(uint512 x, uint256 y) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        assembly (\"memory-safe\") {\n            r := and(iszero(x_hi), lt(x_lo, y))\n        }\n    }\n\n    function ne(uint512 x, uint256 y) internal pure returns (bool) {\n        return !eq(x, y);\n    }\n\n    function ge(uint512 x, uint256 y) internal pure returns (bool) {\n        return !lt(x, y);\n    }\n\n    function le(uint512 x, uint256 y) internal pure returns (bool) {\n        return !gt(x, y);\n    }\n\n    function eq(uint512 x, uint512 y) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        assembly (\"memory-safe\") {\n            r := and(eq(x_hi, y_hi), eq(x_lo, y_lo))\n        }\n    }\n\n    function gt(uint512 x, uint512 y) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        assembly (\"memory-safe\") {\n            r := or(gt(x_hi, y_hi), and(eq(x_hi, y_hi), gt(x_lo, y_lo)))\n        }\n    }\n\n    function lt(uint512 x, uint512 y) internal pure returns (bool r) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        assembly (\"memory-safe\") {\n            r := or(lt(x_hi, y_hi), and(eq(x_hi, y_hi), lt(x_lo, y_lo)))\n        }\n    }\n\n    function ne(uint512 x, uint512 y) internal pure returns (bool) {\n        return !eq(x, y);\n    }\n\n    function ge(uint512 x, uint512 y) internal pure returns (bool) {\n        return !lt(x, y);\n    }\n\n    function le(uint512 x, uint512 y) internal pure returns (bool) {\n        return !gt(x, y);\n    }\n}\n\nusing Lib512MathComparisons for uint512 global;\n\nfunction __eq(uint512 x, uint512 y) pure returns (bool) {\n    return x.eq(y);\n}\n\nfunction __gt(uint512 x, uint512 y) pure returns (bool) {\n    return x.gt(y);\n}\n\nfunction __lt(uint512 x, uint512 y) pure returns (bool r) {\n    return x.lt(y);\n}\n\nfunction __ne(uint512 x, uint512 y) pure returns (bool) {\n    return x.ne(y);\n}\n\nfunction __ge(uint512 x, uint512 y) pure returns (bool) {\n    return x.ge(y);\n}\n\nfunction __le(uint512 x, uint512 y) pure returns (bool) {\n    return x.le(y);\n}\n\nusing {__eq as ==, __gt as >, __lt as <, __ne as !=, __ge as >=, __le as <=} for uint512 global;\n\nlibrary Lib512MathArithmetic {\n    using UnsafeMath for uint256;\n    using Clz for uint256;\n    using Ternary for bool;\n    using FastLogic for bool;\n    using Sqrt for uint256;\n\n    function _add(uint256 x, uint256 y) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            r_lo := add(x, y)\n            // `lt(r_lo, x)` indicates overflow in the lower addition. We can\n            // add the bool directly to the integer to perform carry\n            r_hi := lt(r_lo, x)\n        }\n    }\n\n    function _add(uint256 x_hi, uint256 x_lo, uint256 y) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            r_lo := add(x_lo, y)\n            // `lt(r_lo, x_lo)` indicates overflow in the lower\n            // addition. Overflow in the high limb is simply ignored\n            r_hi := add(x_hi, lt(r_lo, x_lo))\n        }\n    }\n\n    function _add(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (uint256 r_hi, uint256 r_lo)\n    {\n        assembly (\"memory-safe\") {\n            r_lo := add(x_lo, y_lo)\n            // `lt(r_lo, x_lo)` indicates overflow in the lower\n            // addition. Overflow in the high limb is simply ignored.\n            r_hi := add(add(x_hi, y_hi), lt(r_lo, x_lo))\n        }\n    }\n\n    function oadd(uint512 r, uint256 x, uint256 y) internal pure returns (uint512) {\n        (uint256 r_hi, uint256 r_lo) = _add(x, y);\n        return r.from(r_hi, r_lo);\n    }\n\n    function oadd(uint512 r, uint512 x, uint256 y) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 r_hi, uint256 r_lo) = _add(x_hi, x_lo, y);\n        return r.from(r_hi, r_lo);\n    }\n\n    function iadd(uint512 r, uint256 y) internal pure returns (uint512) {\n        return oadd(r, r, y);\n    }\n\n    function oadd(uint512 r, uint512 x, uint512 y) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        (uint256 r_hi, uint256 r_lo) = _add(x_hi, x_lo, y_hi, y_lo);\n        return r.from(r_hi, r_lo);\n    }\n\n    function iadd(uint512 r, uint512 y) internal pure returns (uint512) {\n        return oadd(r, r, y);\n    }\n\n    function _sub(uint256 x_hi, uint256 x_lo, uint256 y) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            r_lo := sub(x_lo, y)\n            // `gt(r_lo, x_lo)` indicates underflow in the lower subtraction. We\n            // can subtract the bool directly from the integer to perform carry.\n            r_hi := sub(x_hi, gt(r_lo, x_lo))\n        }\n    }\n\n    function osub(uint512 r, uint512 x, uint256 y) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 r_hi, uint256 r_lo) = _sub(x_hi, x_lo, y);\n        return r.from(r_hi, r_lo);\n    }\n\n    function isub(uint512 r, uint256 y) internal pure returns (uint512) {\n        return osub(r, r, y);\n    }\n\n    function _sub(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (uint256 r_hi, uint256 r_lo)\n    {\n        assembly (\"memory-safe\") {\n            r_lo := sub(x_lo, y_lo)\n            // `gt(r_lo, x_lo)` indicates underflow in the lower subtraction.\n            // Underflow in the high limb is simply ignored.\n            r_hi := sub(sub(x_hi, y_hi), gt(r_lo, x_lo))\n        }\n    }\n\n    function osub(uint512 r, uint512 x, uint512 y) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        (uint256 r_hi, uint256 r_lo) = _sub(x_hi, x_lo, y_hi, y_lo);\n        return r.from(r_hi, r_lo);\n    }\n\n    function isub(uint512 r, uint512 y) internal pure returns (uint512) {\n        return osub(r, r, y);\n    }\n\n    function irsub(uint512 r, uint512 y) internal pure returns (uint512) {\n        return osub(r, y, r);\n    }\n\n    function sub(uint512 x, uint256 y) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := sub(mload(add(0x20, x)), y)\n        }\n    }\n\n    function sub(uint512 x, uint512 y) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := sub(mload(add(0x20, x)), mload(add(0x20, y)))\n        }\n    }\n\n    //// The technique implemented in the following functions for multiplication is\n    //// adapted from Remco Bloemen's work https://2π.com/17/full-mul/ .\n    //// The original code was released under the MIT license.\n\n    function _mul(uint256 x, uint256 y) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            let mm := mulmod(x, y, not(0x00))\n            r_lo := mul(x, y)\n            r_hi := sub(sub(mm, r_lo), lt(mm, r_lo))\n        }\n    }\n\n    function omul(uint512 r, uint256 x, uint256 y) internal pure returns (uint512) {\n        (uint256 r_hi, uint256 r_lo) = _mul(x, y);\n        return r.from(r_hi, r_lo);\n    }\n\n    function _mul(uint256 x_hi, uint256 x_lo, uint256 y) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            let mm := mulmod(x_lo, y, not(0x00))\n            r_lo := mul(x_lo, y)\n            r_hi := add(mul(x_hi, y), sub(sub(mm, r_lo), lt(mm, r_lo)))\n        }\n    }\n\n    function omul(uint512 r, uint512 x, uint256 y) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 r_hi, uint256 r_lo) = _mul(x_hi, x_lo, y);\n        return r.from(r_hi, r_lo);\n    }\n\n    function imul(uint512 r, uint256 y) internal pure returns (uint512) {\n        return omul(r, r, y);\n    }\n\n    function _mul(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (uint256 r_hi, uint256 r_lo)\n    {\n        assembly (\"memory-safe\") {\n            let mm := mulmod(x_lo, y_lo, not(0x00))\n            r_lo := mul(x_lo, y_lo)\n            r_hi := add(add(mul(x_hi, y_lo), mul(x_lo, y_hi)), sub(sub(mm, r_lo), lt(mm, r_lo)))\n        }\n    }\n\n    function omul(uint512 r, uint512 x, uint512 y) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        (uint256 r_hi, uint256 r_lo) = _mul(x_hi, x_lo, y_hi, y_lo);\n        return r.from(r_hi, r_lo);\n    }\n\n    function imul(uint512 r, uint512 y) internal pure returns (uint512) {\n        return omul(r, r, y);\n    }\n\n    function mod(uint512 n, uint256 d) internal pure returns (uint256 r) {\n        if (d == 0) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        (uint256 n_hi, uint256 n_lo) = n.into();\n        assembly (\"memory-safe\") {\n            r := mulmod(n_hi, sub(0x00, d), d)\n            r := addmod(n_lo, r, d)\n        }\n    }\n\n    function omod(uint512 r, uint512 x, uint512 y) internal view returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        assembly (\"memory-safe\") {\n            // We use the MODEXP (5) precompile with an exponent of 1. We encode\n            // the arguments to the precompile at the beginning of free memory\n            // without allocating. Arguments are encoded as:\n            //     [64 32 64 x_hi x_lo 1 y_hi y_lo]\n            let ptr := mload(0x40)\n            mstore(ptr, 0x40)\n            mstore(add(0x20, ptr), 0x20)\n            mstore(add(0x40, ptr), 0x40)\n            // See comment in `from` about why `mstore` is more efficient than `mcopy`\n            mstore(add(0x60, ptr), x_hi)\n            mstore(add(0x80, ptr), x_lo)\n            mstore(add(0xa0, ptr), 0x01)\n            mstore(add(0xc0, ptr), y_hi)\n            mstore(add(0xe0, ptr), y_lo)\n\n            // We write the result of MODEXP directly into the output space r.\n            pop(staticcall(gas(), 0x05, ptr, 0x100, r, 0x40))\n            // The MODEXP precompile can only fail due to out-of-gas. This call\n            // consumes only 200 gas, so if it failed, there is only 4 gas\n            // remaining in this context. Therefore, we will out-of-gas\n            // immediately when we attempt to read the result. We don't bother\n            // to check for failure.\n        }\n        return r;\n    }\n\n    function imod(uint512 r, uint512 y) internal view returns (uint512) {\n        return omod(r, r, y);\n    }\n\n    function irmod(uint512 r, uint512 y) internal view returns (uint512) {\n        return omod(r, y, r);\n    }\n\n    /// Multiply 512-bit [x_hi x_lo] by 256-bit [y] giving 768-bit [r_ex r_hi r_lo]\n    function _mul768(uint256 x_hi, uint256 x_lo, uint256 y)\n        private\n        pure\n        returns (uint256 r_ex, uint256 r_hi, uint256 r_lo)\n    {\n        assembly (\"memory-safe\") {\n            let mm0 := mulmod(x_lo, y, not(0x00))\n            r_lo := mul(x_lo, y)\n            let mm1 := mulmod(x_hi, y, not(0x00))\n            let r_partial := mul(x_hi, y)\n            r_ex := sub(sub(mm1, r_partial), lt(mm1, r_partial))\n\n            r_hi := add(r_partial, sub(sub(mm0, r_lo), lt(mm0, r_lo)))\n            // `lt(r_hi, r_partial)` indicates overflow in the addition to form\n            // `r_hi`. We can add the bool directly to the integer to perform\n            // carry.\n            r_ex := add(r_ex, lt(r_hi, r_partial))\n        }\n    }\n\n    //// The technique implemented in the following functions for division is\n    //// adapted from Remco Bloemen's work https://2π.com/21/muldiv/ .\n    //// The original code was released under the MIT license.\n\n    function _roundDown(uint256 x_hi, uint256 x_lo, uint256 d)\n        private\n        pure\n        returns (uint256 r_hi, uint256 r_lo, uint256 rem)\n    {\n        assembly (\"memory-safe\") {\n            // Get the remainder [n_hi n_lo] % d (< 2²⁵⁶ - 1)\n            // 2**256 % d = -d % 2**256 % d -- https://2π.com/17/512-bit-division/\n            rem := mulmod(x_hi, sub(0x00, d), d)\n            rem := addmod(x_lo, rem, d)\n\n            r_hi := sub(x_hi, gt(rem, x_lo))\n            r_lo := sub(x_lo, rem)\n        }\n    }\n\n    // TODO: remove and replace existing division operations with the Algorithm\n    // D variants\n    function _roundDown(uint256 x_hi, uint256 x_lo, uint256 d_hi, uint256 d_lo)\n        private\n        view\n        returns (uint256 r_hi, uint256 r_lo, uint256 rem_hi, uint256 rem_lo)\n    {\n        uint512 r;\n        assembly (\"memory-safe\") {\n            // We point `r` to the beginning of free memory WITHOUT allocating.\n            // This is not technically \"memory-safe\" because solc might use that\n            // memory for something in between the end of this assembly block\n            // and the beginning of the call to `into()`, but empirically and\n            // practically speaking that won't and doesn't happen. We save some\n            // gas by not bumping the free pointer.\n            r := mload(0x40)\n\n            // Get the remainder [x_hi x_lo] % [d_hi d_lo] (< 2⁵¹² - 1) We use\n            // the MODEXP (5) precompile with an exponent of 1. We encode the\n            // arguments to the precompile at the beginning of free memory\n            // without allocating. Conveniently, `r` already points to this\n            // region. Arguments are encoded as:\n            //     [64 32 64 x_hi x_lo 1 d_hi d_lo]\n            mstore(r, 0x40)\n            mstore(add(0x20, r), 0x20)\n            mstore(add(0x40, r), 0x40)\n            mstore(add(0x60, r), x_hi)\n            mstore(add(0x80, r), x_lo)\n            mstore(add(0xa0, r), 0x01)\n            mstore(add(0xc0, r), d_hi)\n            mstore(add(0xe0, r), d_lo)\n\n            // The MODEXP precompile can only fail due to out-of-gas. This call\n            // consumes only 200 gas, so if it failed, there is only 4 gas\n            // remaining in this context. Therefore, we will out-of-gas\n            // immediately when we attempt to read the result. We don't bother\n            // to check for failure.\n            pop(staticcall(gas(), 0x05, r, 0x100, r, 0x40))\n        }\n        (rem_hi, rem_lo) = r.into();\n        // Round down by subtracting the remainder from the numerator\n        (r_hi, r_lo) = _sub(x_hi, x_lo, rem_hi, rem_lo);\n    }\n\n    function _twos(uint256 x) private pure returns (uint256 twos, uint256 twosInv) {\n        assembly (\"memory-safe\") {\n            // Compute largest power of two divisor of `x`. `x` is nonzero, so\n            // this is always ≥ 1.\n            twos := and(sub(0x00, x), x)\n\n            // To shift up (bits from the high limb into the low limb) we need\n            // the inverse of `twos`. That is, 2²⁵⁶ / twos.\n            //     2**256 / twos = -twos % 2**256 / twos + 1 -- https://2π.com/17/512-bit-division/\n            // If `twos` is zero, then `twosInv` becomes one (not possible)\n            twosInv := add(div(sub(0x00, twos), twos), 0x01)\n        }\n    }\n\n    function _toOdd256(uint256 x_hi, uint256 x_lo, uint256 y) private pure returns (uint256 x_lo_out, uint256 y_out) {\n        // Factor powers of two out of `y` and apply the same shift to [x_hi\n        // x_lo]\n        (uint256 twos, uint256 twosInv) = _twos(y);\n\n        assembly (\"memory-safe\") {\n            // Divide `y` by the power of two\n            y_out := div(y, twos)\n\n            // Divide [x_hi x_lo] by the power of two\n            x_lo_out := or(div(x_lo, twos), mul(x_hi, twosInv))\n        }\n    }\n\n    function _toOdd256(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (uint256 x_lo_out, uint256 y_lo_out)\n    {\n        // Factor powers of two out of `y_lo` and apply the same shift to `x_lo`\n        (uint256 twos, uint256 twosInv) = _twos(y_lo);\n\n        assembly (\"memory-safe\") {\n            // Divide [y_hi y_lo] by the power of two, returning only the low limb\n            y_lo_out := or(div(y_lo, twos), mul(y_hi, twosInv))\n\n            // Divide [x_hi x_lo] by the power of two, returning only the low limb\n            x_lo_out := or(div(x_lo, twos), mul(x_hi, twosInv))\n        }\n    }\n\n    function _toOdd512(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (uint256 x_hi_out, uint256 x_lo_out, uint256 y_hi_out, uint256 y_lo_out)\n    {\n        // Factor powers of two out of [y_hi y_lo] and apply the same shift to\n        // [x_hi x_lo] and [y_hi y_lo]\n        (uint256 twos, uint256 twosInv) = _twos(y_lo);\n\n        assembly (\"memory-safe\") {\n            // Divide [y_hi y_lo] by the power of two\n            y_hi_out := div(y_hi, twos)\n            y_lo_out := or(div(y_lo, twos), mul(y_hi, twosInv))\n\n            // Divide [x_hi x_lo] by the power of two\n            x_hi_out := div(x_hi, twos)\n            x_lo_out := or(div(x_lo, twos), mul(x_hi, twosInv))\n        }\n    }\n\n    function _invert256(uint256 d) private pure returns (uint256 inv) {\n        assembly (\"memory-safe\") {\n            // Invert `d` mod 2²⁵⁶ -- https://2π.com/18/multiplitcative-inverses/\n            // `d` is an odd number (from _toOdd*). It has an inverse modulo\n            // 2²⁵⁶ such that d * inv ≡ 1 mod 2²⁵⁶.\n            // We use Newton-Raphson iterations compute inv. Thanks to Hensel's\n            // lifting lemma, this also works in modular arithmetic, doubling\n            // the correct bits in each step. The Newton-Raphson-Hensel step is:\n            //    inv_{n+1} = inv_n * (2 - d*inv_n) % 2**512\n\n            // To kick off Newton-Raphson-Hensel iterations, we start with a\n            // seed of the inverse that is correct correct for four bits.\n            //     d * inv ≡ 1 mod 2⁴\n            inv := xor(mul(0x03, d), 0x02)\n\n            // Each Newton-Raphson-Hensel step doubles the number of correct\n            // bits in `inv`. After 6 iterations, full convergence is\n            // guaranteed.\n            inv := mul(inv, sub(0x02, mul(d, inv))) // inverse mod 2⁸\n            inv := mul(inv, sub(0x02, mul(d, inv))) // inverse mod 2¹⁶\n            inv := mul(inv, sub(0x02, mul(d, inv))) // inverse mod 2³²\n            inv := mul(inv, sub(0x02, mul(d, inv))) // inverse mod 2⁶⁴\n            inv := mul(inv, sub(0x02, mul(d, inv))) // inverse mod 2¹²⁸\n            inv := mul(inv, sub(0x02, mul(d, inv))) // inverse mod 2²⁵⁶\n        }\n    }\n\n    // TODO: once the existing division routines are ported over to the\n    // Algorithm D variants (avoiding the use of the `MODEXP` precompile), this\n    // function is no longer needed.\n    function _invert512(uint256 d_hi, uint256 d_lo) private pure returns (uint256 inv_hi, uint256 inv_lo) {\n        // First, we get the inverse of `d` mod 2²⁵⁶\n        inv_lo = _invert256(d_lo);\n\n        // To extend this to the inverse mod 2⁵¹², we perform a more elaborate\n        // 7th Newton-Raphson-Hensel iteration with 512 bits of precision.\n\n        // tmp = d * inv_lo % 2**512\n        (uint256 tmp_hi, uint256 tmp_lo) = _mul(d_hi, d_lo, inv_lo);\n        // tmp = 2 - tmp % 2**512\n        (tmp_hi, tmp_lo) = _sub(0, 2, tmp_hi, tmp_lo);\n\n        assembly (\"memory-safe\") {\n            // inv_hi = inv_lo * tmp / 2**256 % 2**256\n            let mm := mulmod(inv_lo, tmp_lo, not(0x00))\n            inv_hi := add(mul(inv_lo, tmp_hi), sub(sub(mm, inv_lo), lt(mm, inv_lo)))\n        }\n    }\n\n    function _div(uint256 n_hi, uint256 n_lo, uint256 d) private pure returns (uint256) {\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result.\n        (n_hi, n_lo,) = _roundDown(n_hi, n_lo, d);\n\n        // Make `d` odd so that it has a multiplicative inverse mod 2²⁵⁶.\n        // After this we can discard `n_hi` because our result is only 256 bits\n        (n_lo, d) = _toOdd256(n_hi, n_lo, d);\n\n        // We perform division by multiplying by the multiplicative inverse of\n        // the denominator mod 2²⁵⁶. Since `d` is odd, this inverse\n        // exists. Compute that inverse\n        d = _invert256(d);\n\n        unchecked {\n            // Because the division is now exact (we rounded `n` down to a\n            // multiple of `d`), we perform it by multiplying with the modular\n            // inverse of the denominator. This is the correct result mod 2²⁵⁶.\n            return n_lo * d;\n        }\n    }\n\n    function _divUp(uint256 n_hi, uint256 n_lo, uint256 d) private pure returns (uint256) {\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result. Store the remainder\n        // for later to determine whether we must increment the result in order\n        // to round up.\n        uint256 rem;\n        (n_hi, n_lo, rem) = _roundDown(n_hi, n_lo, d);\n\n        // Make `d` odd so that it has a multiplicative inverse mod 2²⁵⁶.\n        // After this we can discard `n_hi` because our result is only 256 bits\n        (n_lo, d) = _toOdd256(n_hi, n_lo, d);\n\n        // We perform division by multiplying by the multiplicative inverse of\n        // the denominator mod 2²⁵⁶. Since `d` is odd, this inverse\n        // exists. Compute that inverse\n        d = _invert256(d);\n\n        unchecked {\n            // Because the division is now exact (we rounded `n` down to a\n            // multiple of `d`), we perform it by multiplying with the modular\n            // inverse of the denominator. This is the floor of the division,\n            // mod 2²⁵⁶. To obtain the ceiling, we conditionally add 1 if the\n            // remainder was nonzero.\n            return (n_lo * d).unsafeInc(0 < rem);\n        }\n    }\n\n    function unsafeDiv(uint512 n, uint256 d) internal pure returns (uint256) {\n        (uint256 n_hi, uint256 n_lo) = n.into();\n        if (n_hi == 0) {\n            return n_lo.unsafeDiv(d);\n        }\n\n        return _div(n_hi, n_lo, d);\n    }\n\n    function div(uint512 n, uint256 d) internal pure returns (uint256) {\n        if (d == 0) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        return unsafeDiv(n, d);\n    }\n\n    function unsafeDivUp(uint512 n, uint256 d) internal pure returns (uint256) {\n        (uint256 n_hi, uint256 n_lo) = n.into();\n        if (n_hi == 0) {\n            return n_lo.unsafeDivUp(d);\n        }\n\n        return _divUp(n_hi, n_lo, d);\n    }\n\n    function divUp(uint512 n, uint256 d) internal pure returns (uint256) {\n        if (d == 0) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        return unsafeDivUp(n, d);\n    }\n\n    function _gt(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo) private pure returns (bool r) {\n        assembly (\"memory-safe\") {\n            r := or(gt(x_hi, y_hi), and(eq(x_hi, y_hi), gt(x_lo, y_lo)))\n        }\n    }\n\n    function div(uint512 n, uint512 d) internal view returns (uint256) {\n        (uint256 d_hi, uint256 d_lo) = d.into();\n        if (d_hi == 0) {\n            return div(n, d_lo);\n        }\n        (uint256 n_hi, uint256 n_lo) = n.into();\n        if (d_lo == 0) {\n            return n_hi.unsafeDiv(d_hi);\n        }\n        if (_gt(d_hi, d_lo, n_hi, n_lo)) {\n            // TODO: this optimization may not be overall optimizing\n            return 0;\n        }\n\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result.\n        (n_hi, n_lo,,) = _roundDown(n_hi, n_lo, d_hi, d_lo);\n\n        // Make `d_lo` odd so that it has a multiplicative inverse mod 2²⁵⁶.\n        // After this we can discard `n_hi` and `d_hi` because our result is\n        // only 256 bits\n        (n_lo, d_lo) = _toOdd256(n_hi, n_lo, d_hi, d_lo);\n\n        // We perform division by multiplying by the multiplicative inverse of\n        // the denominator mod 2²⁵⁶. Since `d_lo` is odd, this inverse\n        // exists. Compute that inverse\n        d_lo = _invert256(d_lo);\n\n        unchecked {\n            // Because the division is now exact (we rounded `n` down to a\n            // multiple of `d`), we perform it by multiplying with the modular\n            // inverse of the denominator. This is the correct result mod 2²⁵⁶.\n            return n_lo * d_lo;\n        }\n    }\n\n    function divUp(uint512 n, uint512 d) internal view returns (uint256) {\n        (uint256 d_hi, uint256 d_lo) = d.into();\n        if (d_hi == 0) {\n            return divUp(n, d_lo);\n        }\n        (uint256 n_hi, uint256 n_lo) = n.into();\n        if (d_lo == 0) {\n            return n_hi.unsafeDiv(d_hi).unsafeInc(0 < (n_lo | n_hi.unsafeMod(d_hi)));\n        }\n\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result. Save the remainder\n        // for later to determine whether we need to increment to round up.\n        uint256 rem_hi;\n        uint256 rem_lo;\n        (n_hi, n_lo, rem_hi, rem_lo) = _roundDown(n_hi, n_lo, d_hi, d_lo);\n\n        // Make `d_lo` odd so that it has a multiplicative inverse mod 2²⁵⁶.\n        // After this we can discard `n_hi` and `d_hi` because our result is\n        // only 256 bits\n        (n_lo, d_lo) = _toOdd256(n_hi, n_lo, d_hi, d_lo);\n\n        // We perform division by multiplying by the multiplicative inverse of\n        // the denominator mod 2²⁵⁶. Since `d_lo` is odd, this inverse\n        // exists. Compute that inverse\n        d_lo = _invert256(d_lo);\n\n        unchecked {\n            // Because the division is now exact (we rounded `n` down to a\n            // multiple of `d`), we perform it by multiplying with the modular\n            // inverse of the denominator. This is the floor of the division,\n            // mod 2²⁵⁶. To obtain the ceiling, we conditionally add 1 if the\n            // remainder was nonzero.\n            return (n_lo * d_lo).unsafeInc(0 < (rem_hi | rem_lo));\n        }\n    }\n\n    function odiv(uint512 r, uint512 x, uint256 y) internal pure returns (uint512) {\n        if (y == 0) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (x_hi == 0) {\n            return r.from(0, x_lo.unsafeDiv(y));\n        }\n\n        // The upper word of the quotient is straightforward. We can use\n        // \"normal\" division to obtain it. The remainder after that division\n        // must be carried forward to the later steps, however, because the next\n        // operation we perform is a `mulmod` of `x_hi` with `y`, there's no\n        // need to reduce `x_hi` mod `y` as would be ordinarily expected.\n        uint256 r_hi = x_hi.unsafeDiv(y);\n\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result.\n        (x_hi, x_lo,) = _roundDown(x_hi, x_lo, y);\n\n        // Make `y` odd so that it has a multiplicative inverse mod 2²⁵⁶. After\n        // this we can discard `x_hi` because we have already obtained the upper\n        // word.\n        (x_lo, y) = _toOdd256(x_hi, x_lo, y);\n\n        // The lower word of the quotient is obtained from division by\n        // multiplying by the multiplicative inverse of the denominator mod\n        // 2²⁵⁶. Since `y` is odd, this inverse exists. Compute that inverse\n        y = _invert256(y);\n\n        uint256 r_lo;\n        unchecked {\n            // Because the division is now exact (we rounded `x` down to a\n            // multiple of the original `y`), we perform it by multiplying with\n            // the modular inverse of the denominator. This is the correct\n            // result mod 2²⁵⁶.\n            r_lo = x_lo * y;\n        }\n\n        return r.from(r_hi, r_lo);\n    }\n\n    function idiv(uint512 r, uint256 y) internal pure returns (uint512) {\n        return odiv(r, r, y);\n    }\n\n    function odivUp(uint512 r, uint512 x, uint256 y) internal pure returns (uint512) {\n        if (y == 0) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (x_hi == 0) {\n            return r.from(0, x_lo.unsafeDivUp(y));\n        }\n\n        // The upper word of the quotient is straightforward. We can use\n        // \"normal\" division to obtain it. The remainder after that division\n        // must be carried forward to the later steps, however, because the next\n        // operation we perform is a `mulmod` of `x_hi` with `y`, there's no\n        // need to reduce `x_hi` mod `y` as would be ordinarily expected.\n        uint256 r_hi = x_hi.unsafeDiv(y);\n\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result. Save the remainder\n        // for later to determine whether we need to increment to round up.\n        uint256 rem;\n        (x_hi, x_lo, rem) = _roundDown(x_hi, x_lo, y);\n\n        // Make `y` odd so that it has a multiplicative inverse mod 2²⁵⁶. After\n        // this we can discard `x_hi` because we have already obtained the upper\n        // word.\n        (x_lo, y) = _toOdd256(x_hi, x_lo, y);\n\n        // The lower word of the quotient is obtained from division by\n        // multiplying by the multiplicative inverse of the denominator mod\n        // 2²⁵⁶. Since `y` is odd, this inverse exists. Compute that inverse\n        y = _invert256(y);\n\n        uint256 r_lo;\n        unchecked {\n            // Because the division is now exact (we rounded `x` down to a\n            // multiple of the original `y`), we perform it by multiplying with\n            // the modular inverse of the denominator. This is the floor of the\n            // division, mod 2²⁵⁶.\n            r_lo = x_lo * y;\n        }\n        // To obtain the ceiling, we conditionally add 1 if the remainder was\n        // nonzero.\n        (r_hi, r_lo) = _add(r_hi, r_lo, (0 < rem).toUint());\n\n        return r.from(r_hi, r_lo);\n    }\n\n    function idivUp(uint512 r, uint256 y) internal pure returns (uint512) {\n        return odivUp(r, r, y);\n    }\n\n    function odiv(uint512 r, uint512 x, uint512 y) internal view returns (uint512) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            return odiv(r, x, y_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            return r.from(0, x_hi.unsafeDiv(y_hi));\n        }\n        if (_gt(y_hi, y_lo, x_hi, x_lo)) {\n            // TODO: this optimization may not be overall optimizing\n            return r.from(0, 0);\n        }\n\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result.\n        (x_hi, x_lo,,) = _roundDown(x_hi, x_lo, y_hi, y_lo);\n\n        // Make `y` odd so that it has a multiplicative inverse mod 2⁵¹²\n        (x_hi, x_lo, y_hi, y_lo) = _toOdd512(x_hi, x_lo, y_hi, y_lo);\n\n        // We perform division by multiplying by the multiplicative inverse of\n        // the denominator mod 2⁵¹². Since `y` is odd, this inverse\n        // exists. Compute that inverse\n        (y_hi, y_lo) = _invert512(y_hi, y_lo);\n\n        // Because the division is now exact (we rounded `x` down to a multiple\n        // of `y`), we perform it by multiplying with the modular inverse of the\n        // denominator.\n        (uint256 r_hi, uint256 r_lo) = _mul(x_hi, x_lo, y_hi, y_lo);\n        return r.from(r_hi, r_lo);\n    }\n\n    function idiv(uint512 r, uint512 y) internal view returns (uint512) {\n        return odiv(r, r, y);\n    }\n\n    function irdiv(uint512 r, uint512 y) internal view returns (uint512) {\n        return odiv(r, y, r);\n    }\n\n    function odivUp(uint512 r, uint512 x, uint512 y) internal view returns (uint512) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            return odivUp(r, x, y_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            (uint256 r_hi_, uint256 r_lo_) = _add(0, x_hi.unsafeDiv(y_hi), (0 < (x_lo | x_hi.unsafeMod(y_hi))).toUint());\n            return r.from(r_hi_, r_lo_);\n        }\n\n        // Round the numerator down to a multiple of the denominator. This makes\n        // the division exact without affecting the result. Save the remainder\n        // for later to determine whether we need to increment to round up.\n        uint256 rem_hi;\n        uint256 rem_lo;\n        (x_hi, x_lo, rem_hi, rem_lo) = _roundDown(x_hi, x_lo, y_hi, y_lo);\n\n        // Make `y` odd so that it has a multiplicative inverse mod 2⁵¹²\n        (x_hi, x_lo, y_hi, y_lo) = _toOdd512(x_hi, x_lo, y_hi, y_lo);\n\n        // We perform division by multiplying by the multiplicative inverse of\n        // the denominator mod 2⁵¹². Since `y` is odd, this inverse\n        // exists. Compute that inverse\n        (y_hi, y_lo) = _invert512(y_hi, y_lo);\n\n        // Because the division is now exact (we rounded `x` down to a multiple\n        // of `y`), we perform it by multiplying with the modular inverse of the\n        // denominator. This is the floor of the division.\n        (uint256 r_hi, uint256 r_lo) = _mul(x_hi, x_lo, y_hi, y_lo);\n\n        // To obtain the ceiling, we conditionally add 1 if the remainder was\n        // nonzero.\n        (r_hi, r_lo) = _add(r_hi, r_lo, (0 < (rem_hi | rem_lo)).toUint());\n\n        return r.from(r_hi, r_lo);\n    }\n\n    function idivUp(uint512 r, uint512 y) internal view returns (uint512) {\n        return odivUp(r, r, y);\n    }\n\n    function irdivUp(uint512 r, uint512 y) internal view returns (uint512) {\n        return odivUp(r, y, r);\n    }\n\n    function _gt(uint256 x_ex, uint256 x_hi, uint256 x_lo, uint256 y_ex, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (bool r)\n    {\n        assembly (\"memory-safe\") {\n            r := or(\n                or(gt(x_ex, y_ex), and(eq(x_ex, y_ex), gt(x_hi, y_hi))),\n                and(and(eq(x_ex, y_ex), eq(x_hi, y_hi)), gt(x_lo, y_lo))\n            )\n        }\n    }\n\n    /// The technique implemented in the following helper function for Knuth\n    /// Algorithm D (a modification of the citation further below) is adapted\n    /// from ridiculous fish's (aka corydoras) work\n    /// https://ridiculousfish.com/blog/posts/labor-of-division-episode-iv.html\n    /// and\n    /// https://ridiculousfish.com/blog/posts/labor-of-division-episode-v.html .\n\n    function _correctQ(uint256 q, uint256 r, uint256 x_next, uint256 y_next, uint256 y_whole)\n        private\n        pure\n        returns (uint256 q_out)\n    {\n        assembly (\"memory-safe\") {\n            let c1 := mul(q, y_next)\n            let c2 := or(shl(0x80, r), x_next)\n            q_out := sub(q, shl(gt(sub(c1, c2), y_whole), gt(c1, c2)))\n        }\n    }\n\n    /// The technique implemented in the following function for division is\n    /// adapted from Donald Knuth, The Art of Computer Programming (TAOCP)\n    /// Volume 2, Section 4.3.1, Algorithm D.\n\n    function _algorithmD(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo) private pure returns (uint256 q) {\n        // We treat `x` and `y` each as ≤4-limb bigints where each limb is half\n        // a machine word (128 bits). This lets us perform 2-limb ÷ 1-limb\n        // divisions as a single operation (`div`) as required by Algorithm\n        // D. It also simplifies/optimizes some of the multiplications.\n\n        if (y_hi >> 128 != 0) {\n            // y is 4 limbs, x is 4 limbs, q is 1 limb\n\n            // Normalize. Ensure the uppermost limb of y ≥ 2¹²⁷ (equivalently\n            // y_hi >= 2**255). This is step D1 of Algorithm D. We use `CLZ` to\n            // find the shift amount, then shift both `x` and `y` left. This is\n            // more gas-efficient than multiplication-based normalization.\n            uint256 s = y_hi.clz();\n            uint256 x_ex;\n            (x_ex, x_hi, x_lo) = _shl256(x_hi, x_lo, s);\n            (, y_hi, y_lo) = _shl256(y_hi, y_lo, s);\n\n            // `n_approx` is the 2 most-significant limbs of x, after\n            // normalization\n            uint256 n_approx = (x_ex << 128) | (x_hi >> 128);\n            // `d_approx` is the most significant limb of y, after normalization\n            uint256 d_approx = y_hi >> 128;\n            // Normalization ensures that result of this division is an\n            // approximation of the most significant (and only) limb of the\n            // quotient and is too high by at most 3. This is the \"Calculate\n            // q-hat\" (D3) step of Algorithm D. (did you know that U+0302,\n            // COMBINING CIRCUMFLEX ACCENT cannot be combined with q? shameful)\n            q = n_approx.unsafeDiv(d_approx);\n            uint256 r_hat = n_approx.unsafeMod(d_approx);\n\n            // The process of `_correctQ` subtracts up to 2 from `q`, to make it\n            // more accurate. This is still part of the \"Calculate q-hat\" (D3)\n            // step of Algorithm D.\n            q = _correctQ(q, r_hat, x_hi & type(uint128).max, y_hi & type(uint128).max, y_hi);\n\n            // This final, low-probability, computationally-expensive correction\n            // conditionally subtracts 1 from `q` to make it exactly the\n            // most-significant limb of the quotient. This is the \"Multiply and\n            // subtract\" (D4), \"Test remainder\" (D5), and \"Add back\" (D6) steps\n            // of Algorithm D, with substantial shortcutting\n            {\n                (uint256 tmp_ex, uint256 tmp_hi, uint256 tmp_lo) = _mul768(y_hi, y_lo, q);\n                bool neg = _gt(tmp_ex, tmp_hi, tmp_lo, x_ex, x_hi, x_lo);\n                q = q.unsafeDec(neg);\n            }\n        } else {\n            // y is 3 limbs\n\n            // Normalize. Ensure the most significant limb of y ≥ 2¹²⁷ (step D1)\n            // We use `CLZ` to find the shift amount for normalization\n            uint256 s = (y_hi << 128).clz();\n            (, y_hi, y_lo) = _shl256(y_hi, y_lo, s);\n            // `y_next` is the second-most-significant, nonzero, normalized limb\n            // of y\n            uint256 y_next = y_lo >> 128;\n            // `y_whole` is the 2 most-significant, nonzero, normalized limbs of\n            // y\n            uint256 y_whole = (y_hi << 128) | y_next;\n\n            if (x_hi >> 128 != 0) {\n                // x is 4 limbs, q is 2 limbs\n\n                // Finish normalizing (step D1)\n                uint256 x_ex;\n                (x_ex, x_hi, x_lo) = _shl256(x_hi, x_lo, s);\n\n                uint256 n_approx = (x_ex << 128) | (x_hi >> 128);\n                // As before, `q_hat` is the most significant limb of the\n                // quotient and too high by at most 3 (step D3)\n                uint256 q_hat = n_approx.unsafeDiv(y_hi);\n                uint256 r_hat = n_approx.unsafeMod(y_hi);\n\n                // Subtract up to 2 from `q_hat`, improving our estimate (step\n                // D3)\n                q_hat = _correctQ(q_hat, r_hat, x_hi & type(uint128).max, y_next, y_whole);\n                q = q_hat << 128;\n\n                {\n                    // \"Multiply and subtract\" (D4) step of Algorithm D\n                    (uint256 tmp_hi, uint256 tmp_lo) = _mul(y_hi, y_lo, q_hat);\n                    uint256 tmp_ex = tmp_hi >> 128;\n                    tmp_hi = (tmp_hi << 128) | (tmp_lo >> 128);\n                    tmp_lo <<= 128;\n\n                    // \"Test remainder\" (D5) step of Algorithm D\n                    bool neg = _gt(tmp_ex, tmp_hi, tmp_lo, x_ex, x_hi, x_lo);\n                    // Finish step D4\n                    (x_hi, x_lo) = _sub(x_hi, x_lo, tmp_hi, tmp_lo);\n\n                    // \"Add back\" (D6) step of Algorithm D\n                    if (neg) {\n                        // This branch is quite rare, so it's gas-advantageous\n                        // to actually branch and usually skip the costly `_add`\n                        unchecked {\n                            q -= 1 << 128;\n                        }\n                        (x_hi, x_lo) = _add(x_hi, x_lo, y_whole, y_lo << 128);\n                    }\n                }\n                // `x_ex` is now zero (implicitly)\n\n                // Run another loop (steps D3 through D6) of Algorithm D to get\n                // the lower limb of the quotient\n                q_hat = x_hi.unsafeDiv(y_hi);\n                r_hat = x_hi.unsafeMod(y_hi);\n\n                q_hat = _correctQ(q_hat, r_hat, x_lo >> 128, y_next, y_whole);\n\n                {\n                    (uint256 tmp_hi, uint256 tmp_lo) = _mul(y_hi, y_lo, q_hat);\n                    bool neg = _gt(tmp_hi, tmp_lo, x_hi, x_lo);\n                    q_hat = q_hat.unsafeDec(neg);\n                }\n\n                q |= q_hat;\n            } else {\n                // x is 3 limbs, q is 1 limb\n\n                // Finish normalizing (step D1)\n                (, x_hi, x_lo) = _shl256(x_hi, x_lo, s);\n\n                // `q` is the most significant (and only) limb of the quotient\n                // and too high by at most 3 (step D3)\n                q = x_hi.unsafeDiv(y_hi);\n                uint256 r_hat = x_hi.unsafeMod(y_hi);\n\n                // Subtract up to 2 from `q`, improving our estimate (step D3)\n                q = _correctQ(q, r_hat, x_lo >> 128, y_next, y_whole);\n\n                // Subtract up to 1 from `q` to make it exact (steps D4 through\n                // D6)\n                {\n                    (uint256 tmp_hi, uint256 tmp_lo) = _mul(y_hi, y_lo, q);\n                    bool neg = _gt(tmp_hi, tmp_lo, x_hi, x_lo);\n                    q = q.unsafeDec(neg);\n                }\n            }\n        }\n        // All other cases are handled by the checks that y ≥ 2²⁵⁶ (equivalently\n        // y_hi != 0) and that x ≥ y\n    }\n\n    function _shl256(uint256 x_lo, uint256 s) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            r_hi := shr(sub(0x100, s), x_lo)\n            r_lo := shl(s, x_lo)\n        }\n    }\n\n    function _shl256(uint256 x_hi, uint256 x_lo, uint256 s)\n        private\n        pure\n        returns (uint256 r_ex, uint256 r_hi, uint256 r_lo)\n    {\n        assembly (\"memory-safe\") {\n            let neg_s := sub(0x100, s)\n            r_ex := shr(neg_s, x_hi)\n            r_hi := or(shl(s, x_hi), shr(neg_s, x_lo))\n            r_lo := shl(s, x_lo)\n        }\n    }\n\n    function _shl(uint256 x_lo, uint256 s) private pure returns (uint256 r_hi, uint256 r_lo) {\n        (r_hi, r_lo) = _shl256(x_lo, s);\n        unchecked {\n            r_hi |= x_lo << s - 256;\n        }\n    }\n\n    function _shl(uint256 x_hi, uint256 x_lo, uint256 s) private pure returns (uint256 r_hi, uint256 r_lo) {\n        (, r_hi, r_lo) = _shl256(x_hi, x_lo, s);\n        unchecked {\n            r_hi |= x_lo << s - 256;\n        }\n    }\n\n    function _shr256(uint256 x_hi, uint256 x_lo, uint256 s) private pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            r_hi := shr(s, x_hi)\n            r_lo := shr(s, x_lo)\n            r_lo := or(shl(sub(0x100, s), x_hi), r_lo)\n        }\n    }\n\n    function _shr(uint256 x_hi, uint256 x_lo, uint256 s) private pure returns (uint256 r_hi, uint256 r_lo) {\n        (r_hi, r_lo) = _shr256(x_hi, x_lo, s);\n        unchecked {\n            r_lo |= x_hi >> s - 256;\n        }\n    }\n\n    // This function is a different modification of Knuth's Algorithm D. In this\n    // case, we're only interested in the (normalized) remainder instead of the\n    // quotient. We also substitute the normalization by division for\n    // normalization by shifting because it makes un-normalization more\n    // gas-efficient.\n\n    function _algorithmDRemainder(uint256 x_hi, uint256 x_lo, uint256 y_hi, uint256 y_lo)\n        private\n        pure\n        returns (uint256, uint256)\n    {\n        // We treat `x` and `y` each as ≤4-limb bigints where each limb is half\n        // a machine word (128 bits). This lets us perform 2-limb ÷ 1-limb\n        // divisions as a single operation (`div`) as required by Algorithm D.\n\n        uint256 s;\n        if (y_hi >> 128 != 0) {\n            // y is 4 limbs, x is 4 limbs\n\n            // Normalize. Ensure the uppermost limb of y ≥ 2¹²⁷ (equivalently\n            // y_hi >= 2**255). This is step D1 of Algorithm D. Unlike the\n            // preceeding implementation of Algorithm D, we use a binary shift\n            // instead of a multiply to normalize. This performs a costly \"count\n            // leading zeroes\" operation, but it lets us transform an\n            // even-more-costly division-by-inversion operation later into a\n            // simple shift. This still ultimately satisfies the postcondition\n            // (y_hi >> 128 >= 1 << 127) without overflowing.\n            s = y_hi.clz();\n            uint256 x_ex;\n            (x_ex, x_hi, x_lo) = _shl256(x_hi, x_lo, s);\n            (, y_hi, y_lo) = _shl256(y_hi, y_lo, s);\n\n            // `n_approx` is the 2 most-significant limbs of x, after\n            // normalization\n            uint256 n_approx = (x_ex << 128) | (x_hi >> 128); // TODO: this can probably be optimized (combined with `_shl`)\n            // `d_approx` is the most significant limb of y, after normalization\n            uint256 d_approx = y_hi >> 128; // TODO: this can probably be optimized (combined with `_shl`)\n            // Normalization ensures that result of this division is an\n            // approximation of the most significant (and only) limb of the\n            // quotient and is too high by at most 3. This is the \"Calculate\n            // q-hat\" (D3) step of Algorithm D. (did you know that U+0302,\n            // COMBINING CIRCUMFLEX ACCENT cannot be combined with q? shameful)\n            uint256 q_hat = n_approx.unsafeDiv(d_approx);\n            uint256 r_hat = n_approx.unsafeMod(d_approx);\n\n            // The process of `_correctQ` subtracts up to 2 from `q_hat`, to\n            // make it more accurate. This is still part of the \"Calculate\n            // q-hat\" (D3) step of Algorithm D.\n            q_hat = _correctQ(q_hat, r_hat, x_hi & type(uint128).max, y_hi & type(uint128).max, y_hi);\n\n            {\n                // This penultimate correction subtracts q-hat × y from x to\n                // obtain the normalized remainder. This is the \"Multiply and\n                // subtract\" (D4) and \"Test remainder\" (D5) steps of Algorithm\n                // D, with some shortcutting\n                (uint256 tmp_ex, uint256 tmp_hi, uint256 tmp_lo) = _mul768(y_hi, y_lo, q_hat);\n                bool neg = _gt(tmp_ex, tmp_hi, tmp_lo, x_ex, x_hi, x_lo);\n                (x_hi, x_lo) = _sub(x_hi, x_lo, tmp_hi, tmp_lo);\n                // `x_ex` is now implicitly zero (or signals a carry that we\n                // will clear in the next step)\n\n                // Because `q_hat` may be too high by 1, we have to detect\n                // underflow from the previous step and correct it. This is the\n                // \"Add back\" (D6) step of Algorithm D\n                if (neg) {\n                    (x_hi, x_lo) = _add(x_hi, x_lo, y_hi, y_lo);\n                }\n            }\n        } else {\n            // y is 3 limbs\n\n            // Normalize. Ensure the most significant limb of y ≥ 2¹²⁷ (step D1)\n            // See above comment about the use of a shift instead of division.\n            s = (y_hi << 128).clz();\n            (, y_hi, y_lo) = _shl256(y_hi, y_lo, s);\n            // `y_next` is the second-most-significant, nonzero, normalized limb\n            // of y\n            uint256 y_next = y_lo >> 128; // TODO: this can probably be optimized (combined with `_shl`)\n            // `y_whole` is the 2 most-significant, nonzero, normalized limbs of\n            // y\n            uint256 y_whole = (y_hi << 128) | y_next; // TODO: this can probably be optimized (combined with `_shl`)\n\n            if (x_hi >> 128 != 0) {\n                // x is 4 limbs; we have to run 2 iterations of Algorithm D to\n                // fully divide out by y\n\n                // Finish normalizing (step D1)\n                uint256 x_ex;\n                (x_ex, x_hi, x_lo) = _shl256(x_hi, x_lo, s);\n\n                uint256 n_approx = (x_ex << 128) | (x_hi >> 128); // TODO: this can probably be optimized (combined with `_shl768`)\n                // As before, `q_hat` is the most significant limb of the\n                // quotient and too high by at most 3 (step D3)\n                uint256 q_hat = n_approx.unsafeDiv(y_hi);\n                uint256 r_hat = n_approx.unsafeMod(y_hi);\n\n                // Subtract up to 2 from `q_hat`, improving our estimate (step\n                // D3)\n                q_hat = _correctQ(q_hat, r_hat, x_hi & type(uint128).max, y_next, y_whole);\n\n                // Subtract up to 1 from q-hat to make it exactly the\n                // most-significant limb of the quotient and subtract q-hat × y\n                // from x to clear the most-significant limb of x.\n                {\n                    // \"Multiply and subtract\" (D4) step of Algorithm D\n                    (uint256 tmp_hi, uint256 tmp_lo) = _mul(y_hi, y_lo, q_hat);\n                    uint256 tmp_ex = tmp_hi >> 128;\n                    tmp_hi = (tmp_hi << 128) | (tmp_lo >> 128);\n                    tmp_lo <<= 128;\n\n                    // \"Test remainder\" (D5) step of Algorithm D\n                    bool neg = _gt(tmp_ex, tmp_hi, tmp_lo, x_ex, x_hi, x_lo);\n                    // Finish step D4\n                    (x_hi, x_lo) = _sub(x_hi, x_lo, tmp_hi, tmp_lo);\n\n                    // \"Add back\" (D6) step of Algorithm D. We implicitly\n                    // subtract 1 from `q_hat`, but elide explicitly\n                    // representing that because `q_hat` is no longer needed.\n                    if (neg) {\n                        // This branch is quite rare, so it's gas-advantageous\n                        // to actually branch and usually skip the costly `_add`\n                        (x_hi, x_lo) = _add(x_hi, x_lo, y_whole, y_lo << 128);\n                    }\n                }\n                // `x_ex` is now zero (implicitly)\n                // [x_hi x_lo] now represents the partial, normalized remainder.\n\n                // Run another loop (steps D3 through D6) of Algorithm D to get\n                // the lower limb of the quotient\n                // Step D3\n                q_hat = x_hi.unsafeDiv(y_hi);\n                r_hat = x_hi.unsafeMod(y_hi);\n\n                // Step D3\n                q_hat = _correctQ(q_hat, r_hat, x_lo >> 128, y_next, y_whole);\n\n                // Again, implicitly correct q-hat to make it exactly the\n                // least-significant limb of the quotient. Subtract q-hat × y\n                // from x to obtain the normalized remainder.\n                {\n                    // Steps D4 and D5\n                    (uint256 tmp_hi, uint256 tmp_lo) = _mul(y_hi, y_lo, q_hat);\n                    bool neg = _gt(tmp_hi, tmp_lo, x_hi, x_lo);\n                    (x_hi, x_lo) = _sub(x_hi, x_lo, tmp_hi, tmp_lo);\n\n                    // Step D6\n                    if (neg) {\n                        (x_hi, x_lo) = _add(x_hi, x_lo, y_hi, y_lo);\n                    }\n                }\n            } else {\n                // x is 3 limbs\n\n                // Finish normalizing (step D1)\n                (, x_hi, x_lo) = _shl256(x_hi, x_lo, s);\n\n                // `q_hat` is the most significant (and only) limb of the\n                // quotient and too high by at most 3 (step D3)\n                uint256 q_hat = x_hi.unsafeDiv(y_hi);\n                uint256 r_hat = x_hi.unsafeMod(y_hi);\n\n                // Subtract up to 2 from `q_hat`, improving our estimate (step\n                // D3)\n                q_hat = _correctQ(q_hat, r_hat, x_lo >> 128, y_next, y_whole);\n\n                // Make `q_hat` exact (implicitly) and subtract q-hat × y from x\n                // to obtain the normalized remainder. (steps D4 through D6)\n                {\n                    (uint256 tmp_hi, uint256 tmp_lo) = _mul(y_hi, y_lo, q_hat);\n                    bool neg = _gt(tmp_hi, tmp_lo, x_hi, x_lo);\n                    (x_hi, x_lo) = _sub(x_hi, x_lo, tmp_hi, tmp_lo);\n                    if (neg) {\n                        (x_hi, x_lo) = _add(x_hi, x_lo, y_hi, y_lo);\n                    }\n                }\n            }\n        }\n        // All other cases are handled by the checks that y ≥ 2²⁵⁶ (equivalently\n        // y_hi != 0) and that x ≥ y\n\n        // The second-most-significant limb of normalized x is now zero\n        // (equivalently x_hi < 2**128), but because the entire machine word is\n        // not guaranteed to be cleared, we can't optimize any further.\n\n        // [x_hi x_lo] now represents remainder × 2ˢ (the normalized remainder);\n        // we shift right by `s` (un-normalize) to obtain the result.\n        return _shr256(x_hi, x_lo, s);\n    }\n\n    function odivAlt(uint512 r, uint512 x, uint512 y) internal pure returns (uint512) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            // This is the only case where we can have a 2-word quotient\n            return odiv(r, x, y_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            uint256 r_lo = x_hi.unsafeDiv(y_hi);\n            return r.from(0, r_lo);\n        }\n        if (_gt(y_hi, y_lo, x_hi, x_lo)) {\n            return r.from(0, 0);\n        }\n\n        // At this point, we know that both `x` and `y` are fully represented by\n        // 2 words. There is no simpler representation for the problem. We must\n        // use Knuth's Algorithm D.\n        {\n            uint256 r_lo = _algorithmD(x_hi, x_lo, y_hi, y_lo);\n            return r.from(0, r_lo);\n        }\n    }\n\n    function idivAlt(uint512 r, uint512 y) internal pure returns (uint512) {\n        return odivAlt(r, r, y);\n    }\n\n    function irdivAlt(uint512 r, uint512 y) internal pure returns (uint512) {\n        return odivAlt(r, y, r);\n    }\n\n    function divAlt(uint512 x, uint512 y) internal pure returns (uint256) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            return div(x, y_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            return x_hi.unsafeDiv(y_hi);\n        }\n        if (_gt(y_hi, y_lo, x_hi, x_lo)) {\n            return 0;\n        }\n\n        // At this point, we know that both `x` and `y` are fully represented by\n        // 2 words. There is no simpler representation for the problem. We must\n        // use Knuth's Algorithm D.\n        return _algorithmD(x_hi, x_lo, y_hi, y_lo);\n    }\n\n    function divUpAlt(uint512 x, uint512 y) internal pure returns (uint256) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            return divUp(x, y_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            return x_hi.unsafeDiv(y_hi).unsafeInc(0 < (x_lo | x_hi.unsafeMod(y_hi)));\n        }\n        if (_gt(y_hi, y_lo, x_hi, x_lo)) {\n            return (0 < (x_hi | x_lo)).toUint();\n        }\n\n        // At this point, we know that both `x` and `y` are fully represented by\n        // 2 words. There is no simpler representation for the problem. We must\n        // use Knuth's Algorithm D.\n        uint256 q = _algorithmD(x_hi, x_lo, y_hi, y_lo);\n\n        // If the division was not exact, then we must round up. This is more\n        // efficient than explicitly computing whether the remainder is nonzero\n        // inside `_algorithmD`.\n        (uint256 prod_hi, uint256 prod_lo) = _mul(y_hi, y_lo, q);\n        return q.unsafeInc(0 < (prod_hi ^ x_hi) | (prod_lo ^ x_lo));\n    }\n\n    function odivUpAlt(uint512 r, uint512 x, uint512 y) internal pure returns (uint512) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            return odivUp(r, x, y_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            (uint256 r_hi_, uint256 r_lo_) = _add(0, x_hi.unsafeDiv(y_hi), (0 < (x_lo | x_hi.unsafeMod(y_hi))).toUint());\n            return r.from(r_hi_, r_lo_);\n        }\n        if (_gt(y_hi, y_lo, x_hi, x_lo)) {\n            return r.from(0, (0 < (x_hi | x_lo)).toUint());\n        }\n\n        // At this point, we know that both `x` and `y` are fully represented by\n        // 2 words. There is no simpler representation for the problem. We must\n        // use Knuth's Algorithm D.\n        uint256 q = _algorithmD(x_hi, x_lo, y_hi, y_lo);\n\n        // If the division was not exact, then we must round up. This is more\n        // efficient than explicitly computing whether the remainder is nonzero\n        // inside `_algorithmD`.\n        (uint256 prod_hi, uint256 prod_lo) = _mul(y_hi, y_lo, q);\n        (uint256 r_hi, uint256 r_lo) = _add(0, q, (0 < (prod_hi ^ x_hi) | (prod_lo ^ x_lo)).toUint());\n        return r.from(r_hi, r_lo);\n    }\n\n    function idivUpAlt(uint512 r, uint512 y) internal pure returns (uint512) {\n        return odivUpAlt(r, r, y);\n    }\n\n    function irdivUpAlt(uint512 r, uint512 y) internal pure returns (uint512) {\n        return odivUpAlt(r, y, r);\n    }\n\n    function omodAlt(uint512 r, uint512 x, uint512 y) internal pure returns (uint512) {\n        (uint256 y_hi, uint256 y_lo) = y.into();\n        if (y_hi == 0) {\n            uint256 r_lo = mod(x, y_lo);\n            return r.from(0, r_lo);\n        }\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        if (y_lo == 0) {\n            uint256 r_hi = x_hi.unsafeMod(y_hi);\n            return r.from(r_hi, x_lo);\n        }\n        if (_gt(y_hi, y_lo, x_hi, x_lo)) {\n            return r.from(x_hi, x_lo);\n        }\n\n        // At this point, we know that both `x` and `y` are fully represented by\n        // 2 words. There is no simpler representation for the problem. We must\n        // use Knuth's Algorithm D.\n        {\n            (uint256 r_hi, uint256 r_lo) = _algorithmDRemainder(x_hi, x_lo, y_hi, y_lo);\n            return r.from(r_hi, r_lo);\n        }\n    }\n\n    function imodAlt(uint512 r, uint512 y) internal pure returns (uint512) {\n        return omodAlt(r, r, y);\n    }\n\n    function irmodAlt(uint512 r, uint512 y) internal pure returns (uint512) {\n        return omodAlt(r, y, r);\n    }\n\n    // hi ≈ x · y / 2²⁵⁶ (±1)\n    function _inaccurateMulHi(uint256 x, uint256 y) private pure returns (uint256 hi) {\n        assembly (\"memory-safe\") {\n            hi := sub(mulmod(x, y, not(0x00)), mul(x, y))\n        }\n    }\n\n    // gas benchmark 2025/09/20: ~1425 gas\n    function _sqrt(uint256 x_hi, uint256 x_lo) private pure returns (uint256 r) {\n        /// Our general approach here is to compute the inverse of the square root of the argument\n        /// using Newton-Raphson iterations. Then we combine (multiply) this inverse square root\n        /// approximation with the argument to approximate the square root of the argument. After\n        /// that, a final fixup step is applied to get the exact result. We compute the inverse of\n        /// the square root rather than the square root directly because then our Newton-Raphson\n        /// iteration can avoid the extremely expensive 512-bit division subroutine.\n        unchecked {\n            /// First, we normalize `x` by separating it into a mantissa and exponent. We use\n            /// even-exponent normalization.\n\n            // `e` is half the exponent of `x`\n            // e    = ⌊bitlength(x)/2⌋\n            // invE = 256 - e\n            uint256 invE = (x_hi.clz() + 1) >> 1; // invE ∈ [0, 128]\n\n            // Extract mantissa M by shifting x right by 2·e - 255 bits\n            // `M` is the mantissa of `x` as a Q1.255; M ∈ [½, 2)\n            (, uint256 M) = _shr(x_hi, x_lo, 257 - (invE << 1)); // scale: 2⁽²⁵⁵⁻²ᵉ⁾\n\n            /// Pick an initial estimate (seed) for Y using a lookup table. Even-exponent\n            /// normalization means our mantissa is geometrically symmetric around 1, leading to 16\n            /// buckets on the low side and 32 buckets on the high side.\n            // `Y` _ultimately_ approximates the inverse square root of fixnum `M` as a\n            // Q3.253. However, as a gas optimization, the number of fractional bits in `Y` rises\n            // through the steps, giving an inhomogeneous fixed-point representation. Y ≈∈ [√½, √2]\n            uint256 Y; // scale: 2⁽²⁵³⁺ᵉ⁾\n            uint256 Mbucket;\n            assembly (\"memory-safe\") {\n                // Extract the upper 6 bits of `M` to be used as a table index. `M >> 250 < 16` is\n                // invalid (that would imply M<½), so our lookup table only needs to handle only 16\n                // through 63.\n                Mbucket := shr(0xfa, M)\n                // We can't fit 48 seeds into a single word, so we split the table in 2 and use `c`\n                // to select which table we index.\n                let c := lt(0x27, Mbucket)\n\n                // Each entry is 10 bits and the entries are ordered from lowest `i` to highest. The\n                // seed is the value for `Y` for the midpoint of the bucket, rounded to 10\n                // significant bits. That is, Y ≈ 1/√(2·M_mid), as a Q247.9. The 2 comes from the\n                // half-scale difference between Y and √M. The optimality of this choice was\n                // verified by fuzzing.\n                let table_hi := 0x71dc26f1b76c9ad6a5a46819c661946418c621856057e5ed775d1715b96b\n                let table_lo := 0xb26b4a8690a027198e559263e8ce2887e15832047f1f47b5e677dd974dcd\n                let table := xor(table_lo, mul(xor(table_hi, table_lo), c))\n\n                // Index the table to obtain the initial seed of `Y`.\n                let shift := add(0x186, mul(0x0a, sub(mul(0x18, c), Mbucket)))\n                // We begin the Newton-Raphson iterations with `Y` in Q247.9 format.\n                Y := and(0x3ff, shr(shift, table))\n\n                // The worst-case seed for `Y` occurs when `Mbucket = 16`. For monotone quadratic\n                // convergence, we desire that 1/√3 < Y·√M < √(5/3). At the boundaries (worst case)\n                // of the `Mbucket = 16` range, we are 0.407351 (41.3680%) from the lower bound and\n                // 0.275987 (27.1906%) from the higher bound.\n            }\n\n            /// Perform 5 Newton-Raphson iterations. 5 is enough iterations for sufficient\n            /// convergence that our final fixup step produces an exact result.\n            // The Newton-Raphson iteration for 1/√M is:\n            //     Y ≈ Y · (3 - M · Y²) / 2\n            // The implementation of this iteration is deliberately imprecise. No matter how many\n            // times you run it, you won't converge `Y` on the closest Q3.253 to √M. However, this\n            // is acceptable because the cleanup step applied after the final call is very tolerant\n            // of error in the low bits of `Y`.\n\n            // `M` is Q1.255\n            // `Y` is Q247.9\n            {\n                uint256 Y2 = Y * Y;                    // scale: 2¹⁸\n                // Because `M` is Q1.255, multiplying `Y2` by `M` and taking the high word\n                // implicitly divides `MY2` by 2. We move the division by 2 inside the subtraction\n                // from 3 by adjusting the minuend.\n                uint256 MY2 = _inaccurateMulHi(M, Y2); // scale: 2¹⁸\n                uint256 T = 1.5 * 2 ** 18 - MY2;       // scale: 2¹⁸\n                Y *= T;                                // scale: 2²⁷\n            }\n            // `Y` is Q229.27\n            {\n                uint256 Y2 = Y * Y;                    // scale: 2⁵⁴\n                uint256 MY2 = _inaccurateMulHi(M, Y2); // scale: 2⁵⁴\n                uint256 T = 1.5 * 2 ** 54 - MY2;       // scale: 2⁵⁴\n                Y *= T;                                // scale: 2⁸¹\n            }\n            // `Y` is Q175.81\n            {\n                uint256 Y2 = Y * Y;                    // scale: 2¹⁶²\n                uint256 MY2 = _inaccurateMulHi(M, Y2); // scale: 2¹⁶²\n                uint256 T = 1.5 * 2 ** 162 - MY2;      // scale: 2¹⁶²\n                Y = Y * T >> 116;                      // scale: 2¹²⁷\n            }\n            // `Y` is Q129.127\n            if (invE < 95 - Mbucket) {\n                // Generally speaking, for relatively smaller `e` (lower values of `x`) and for\n                // relatively larger `M`, we can skip the 5th N-R iteration. The constant `95` is\n                // derived by extensive fuzzing. Attempting a higher-order approximation of the\n                // relationship between `M` and `invE` consumes, on average, more gas. When this\n                // branch is not taken, the correct bits that this iteration would obtain are\n                // shifted away during the denormalization step. This branch is net gas-optimizing.\n                uint256 Y2 = Y * Y;                    // scale: 2²⁵⁴\n                uint256 MY2 = _inaccurateMulHi(M, Y2); // scale: 2²⁵⁴\n                uint256 T = 1.5 * 2 ** 254 - MY2;      // scale: 2²⁵⁴\n                Y = _inaccurateMulHi(Y << 2, T);       // scale: 2¹²⁷\n            }\n            // `Y` is Q129.127\n            {\n                uint256 Y2 = Y * Y;                    // scale: 2²⁵⁴\n                uint256 MY2 = _inaccurateMulHi(M, Y2); // scale: 2²⁵⁴\n                uint256 T = 1.5 * 2 ** 254 - MY2;      // scale: 2²⁵⁴\n                Y = _inaccurateMulHi(Y << 128, T);     // scale: 2²⁵³\n            }\n            // `Y` is Q3.253\n\n            /// When we combine `Y` with `M` to form our approximation of the square root, we have\n            /// to un-normalize by the half-scale value. This is where even-exponent normalization\n            /// comes in because the half-scale is integral.\n            ///     M   = ⌊x · 2⁽²⁵⁵⁻²ᵉ⁾⌋\n            ///     Y   ≈ 2²⁵³ / √(M / 2²⁵⁵)\n            ///     Y   ≈ 2³⁸¹ / √(2·M)\n            ///     M·Y ≈ 2³⁸¹ · √(M/2)\n            ///     M·Y ≈ 2⁽⁵⁰⁸⁻ᵉ⁾ · √x\n            ///     r0  ≈ M·Y / 2⁽⁵⁰⁸⁻ᵉ⁾ ≈ ⌊√x⌋\n            // We shift right by `508 - e` to account for both the Q3.253 scaling and\n            // denormalization. We don't care about accuracy in the low bits of `r0`, so we can cut\n            // some corners.\n            (, uint256 r0) = _shr(_inaccurateMulHi(M, Y), 0, 252 + invE);\n\n            /// `r0` is only an approximation of √x, so we perform a single Babylonian step to fully\n            /// converge on ⌊√x⌋ or ⌈√x⌉.  The Babylonian step is:\n            ///     r = ⌊(r0 + ⌊x/r0⌋) / 2⌋\n            // Rather than use the more-expensive division routine that returns a 512-bit result,\n            // because the value the upper word of the quotient can take is highly constrained, we\n            // can compute the quotient mod 2²⁵⁶ and recover the high word separately. Although\n            // `_div` does an expensive Newton-Raphson-Hensel modular inversion:\n            //     ⌊x/r0⌋ ≡ ⌊x/2ⁿ⌋·⌊r0/2ⁿ⌋⁻¹ mod 2²⁵⁶ (for r % 2⁽ⁿ⁺¹⁾ = 2ⁿ)\n            // and we already have a pretty good estimate for r0⁻¹, namely `Y`, refining `Y` into\n            // the appropriate inverse requires a series of 768-bit multiplications that take more\n            // gas.\n            uint256 q_lo = _div(x_hi, x_lo, r0);\n            uint256 q_hi = (r0 <= x_hi).toUint();\n            (uint256 s_hi, uint256 s_lo) = _add(q_hi, q_lo, r0);\n            // `oflo` here is either 0 or 1. When `oflo == 1`, `r == 0`, and the correct value for\n            // `r` is `type(uint256).max`.\n            uint256 oflo;\n            (oflo, r) = _shr256(s_hi, s_lo, 1);\n            r -= oflo; // underflow is desired\n        }\n    }\n\n    function sqrt(uint512 x) internal pure returns (uint256) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n\n        if (x_hi == 0) {\n            return x_lo.sqrt();\n        }\n\n        uint256 r = _sqrt(x_hi, x_lo);\n\n        // Because the Babylonian step can give ⌈√x⌉ if x+1 is a perfect square, we have to\n        // check whether we've overstepped by 1 and clamp as appropriate. ref:\n        // https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\n        (uint256 r2_hi, uint256 r2_lo) = _mul(r, r);\n        return r.unsafeDec(_gt(r2_hi, r2_lo, x_hi, x_lo));\n    }\n\n    function osqrtUp(uint512 r, uint512 x) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n\n        if (x_hi == 0) {\n            return r.from(0, x_lo.sqrtUp());\n        }\n\n        uint256 r_lo = _sqrt(x_hi, x_lo);\n\n        // The Babylonian step can give ⌈√x⌉ if x+1 is a perfect square. This is\n        // fine. If the Babylonian step gave ⌊√x⌋ ≠ √x, we have to round up.\n        (uint256 r2_hi, uint256 r2_lo) = _mul(r_lo, r_lo);\n        uint256 r_hi;\n        (r_hi, r_lo) = _add(0, r_lo, _gt(x_hi, x_lo, r2_hi, r2_lo).toUint());\n        return r.from(r_hi, r_lo);\n    }\n\n    function isqrtUp(uint512 r) internal pure returns (uint512) {\n        return osqrtUp(r, r);\n    }\n\n    function oshr(uint512 r, uint512 x, uint256 s) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 r_hi, uint256 r_lo) = _shr(x_hi, x_lo, s);\n        return r.from(r_hi, r_lo);\n    }\n\n    function ishr(uint512 r, uint256 s) internal pure returns (uint512) {\n        return oshr(r, r, s);\n    }\n\n    function _shrUp(uint256 x_hi, uint256 x_lo, uint256 s) internal pure returns (uint256 r_hi, uint256 r_lo) {\n        assembly (\"memory-safe\") {\n            let neg_s := sub(0x100, s)\n            let s_256 := sub(s, 0x100)\n\n            // compute `(x_hi, x_lo) >> s`, retaining intermediate values\n            let x_lo_shr := shr(s, x_lo)\n            let x_hi_shr := shr(s_256, x_hi)\n            r_hi := shr(s, x_hi)\n            r_lo := or(or(shl(neg_s, x_hi), x_lo_shr), x_hi_shr)\n\n            // detect if nonzero bits were truncated\n            let inc := lt(0x00, or(xor(x_lo, shl(s, x_lo_shr)), mul(xor(x_hi, shl(s_256, x_hi_shr)), lt(0x100, neg_s))))\n\n            // conditionally increment the result\n            r_lo := add(inc, r_lo)\n            r_hi := add(lt(r_lo, inc), r_hi)\n        }\n    }\n\n    function oshrUp(uint512 r, uint512 x, uint256 s) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 r_hi, uint256 r_lo) = _shrUp(x_hi, x_lo, s);\n        return r.from(r_hi, r_lo);\n    }\n\n    function ishrUp(uint512 r, uint256 s) internal pure returns (uint512) {\n        return oshrUp(r, r, s);\n    }\n\n    function oshl(uint512 r, uint512 x, uint256 s) internal pure returns (uint512) {\n        (uint256 x_hi, uint256 x_lo) = x.into();\n        (uint256 r_hi, uint256 r_lo) = _shl(x_hi, x_lo, s);\n        return r.from(r_hi, r_lo);\n    }\n\n    function ishl(uint512 r, uint256 s) internal pure returns (uint512) {\n        return oshl(r, r, s);\n    }\n}\n\nusing Lib512MathArithmetic for uint512 global;\n\nlibrary Lib512MathUserDefinedHelpers {\n    function checkNull(uint512 x, uint512 y) internal pure {\n        unchecked {\n            if (uint256(uint512.unwrap(x)) * uint256(uint512.unwrap(y)) == 0) {\n                Panic.panic(Panic.ASSERT_FAIL);\n            }\n        }\n    }\n\n    function smuggleToPure(function(uint512, uint512, uint512) internal view returns (uint512) f)\n        internal\n        pure\n        returns (function(uint512, uint512, uint512) internal pure returns (uint512) r)\n    {\n        assembly (\"memory-safe\") {\n            r := f\n        }\n    }\n\n    function omod(uint512 r, uint512 x, uint512 y) internal view returns (uint512) {\n        return r.omod(x, y);\n    }\n\n    function odiv(uint512 r, uint512 x, uint512 y) internal view returns (uint512) {\n        return r.odiv(x, y);\n    }\n}\n\nfunction __add(uint512 x, uint512 y) pure returns (uint512 r) {\n    Lib512MathUserDefinedHelpers.checkNull(x, y);\n    r.oadd(x, y);\n}\n\nfunction __sub(uint512 x, uint512 y) pure returns (uint512 r) {\n    Lib512MathUserDefinedHelpers.checkNull(x, y);\n    r.osub(x, y);\n}\n\nfunction __mul(uint512 x, uint512 y) pure returns (uint512 r) {\n    Lib512MathUserDefinedHelpers.checkNull(x, y);\n    r.omul(x, y);\n}\n\nfunction __mod(uint512 x, uint512 y) pure returns (uint512 r) {\n    Lib512MathUserDefinedHelpers.checkNull(x, y);\n    Lib512MathUserDefinedHelpers.smuggleToPure(Lib512MathUserDefinedHelpers.omod)(r, x, y);\n}\n\nfunction __div(uint512 x, uint512 y) pure returns (uint512 r) {\n    Lib512MathUserDefinedHelpers.checkNull(x, y);\n    Lib512MathUserDefinedHelpers.smuggleToPure(Lib512MathUserDefinedHelpers.odiv)(r, x, y);\n}\n\nusing {__add as +, __sub as -, __mul as *, __mod as %, __div as /} for uint512 global;\n\nstruct uint512_external {\n    uint256 hi;\n    uint256 lo;\n}\n\nlibrary Lib512MathExternal {\n    function from(uint512 r, uint512_external memory x) internal pure returns (uint512) {\n        assembly (\"memory-safe\") {\n            // This *could* be done with `mcopy`, but that would mean giving up compatibility with\n            // Shanghai (or less) chains. If you care about gas efficiency, you should be using\n            // `into()` instead.\n            mstore(r, mload(x))\n            mstore(add(0x20, r), mload(add(0x20, x)))\n        }\n        return r;\n    }\n\n    function into(uint512_external memory x) internal pure returns (uint512 r) {\n        assembly (\"memory-safe\") {\n            r := x\n        }\n    }\n\n    function toExternal(uint512 x) internal pure returns (uint512_external memory r) {\n        assembly (\"memory-safe\") {\n            if iszero(eq(mload(0x40), add(0x40, r))) { revert(0x00, 0x00) }\n            mstore(0x40, r)\n            r := x\n        }\n    }\n}\n\nusing Lib512MathExternal for uint512 global;\nusing Lib512MathExternal for uint512_external global;\n\n// src/core/Permit.sol\n\ncontract Permit {\n    using SafePermit for IERC2612;\n    using SafePermit for IDAIStylePermit;\n    using SafePermit for IERC20MetaTransaction;\n\n    enum PermitType {\n        ERC2612,\n        DAIPermit,\n        NativeMetaTransaction\n    }\n\n    function getPermitType(bytes memory permitData)\n        internal\n        pure\n        returns (PermitType permitType, bytes memory permitParams)\n    {\n        assembly (\"memory-safe\") {\n            let length := mload(permitData)\n            permitType := shr(0xf8, mload(add(0x20, permitData)))\n            permitParams := add(0x01, permitData)\n            mstore(permitParams, sub(length, 0x01))\n        }\n    }\n\n    function callPermit(address owner, address token, bytes memory permitData) internal {\n        (uint256 amount, uint256 deadline, bytes32 r, bytes32 vs) =\n            abi.decode(permitData, (uint256, uint256, bytes32, bytes32));\n        IERC2612(token).safePermit(owner, address(ALLOWANCE_HOLDER), amount, deadline, vs, r);\n    }\n\n    function callDAIPermit(address owner, address token, bytes memory permitData) internal {\n        (uint256 nonce, uint256 expiry, bool allowed, bytes32 r, bytes32 vs) =\n            abi.decode(permitData, (uint256, uint256, bool, bytes32, bytes32));\n        IDAIStylePermit(token).safePermit(owner, address(ALLOWANCE_HOLDER), nonce, expiry, allowed, vs, r);\n    }\n\n    function callNativeMetaTransaction(address owner, address token, bytes memory permitData) internal {\n        (uint256 amount, bytes32 r, bytes32 vs) = abi.decode(permitData, (uint256, bytes32, bytes32));\n        IERC20MetaTransaction(token).safePermit(owner, address(ALLOWANCE_HOLDER), amount, vs, r);\n    }\n\n    function _dispatchPermit(address owner, address token, bytes memory permitData) internal {\n        PermitType permitType;\n        (permitType, permitData) = getPermitType(permitData);\n        _handlePermit(owner, token, permitType, permitData);\n    }\n\n    function _handlePermit(address owner, address token, PermitType permitType, bytes memory permitData)\n        internal\n        virtual\n    {\n        if (permitType == PermitType.ERC2612) {\n            callPermit(owner, token, permitData);\n        } else if (permitType == PermitType.DAIPermit) {\n            callDAIPermit(owner, token, permitData);\n        } else {\n            // NativeMetaTransaction is disabled by default\n            // callNativeMetaTransaction(owner, token, permitData);\n            unsupportedPermitType(permitType);\n        }\n    }\n\n    function unsupportedPermitType(PermitType permitType) internal pure {\n        assembly (\"memory-safe\") {\n            let castError := gt(permitType, 0x02)\n            mstore(0x00, xor(0xf9ade075, mul(0xb7e59b04, castError))) // selector for `UnsupportedPermitType(uint8)` or `Panic(uint256)`\n            mstore(0x20, xor(permitType, mul(xor(permitType, 0x21), castError)))\n            revert(0x1c, 0x24)\n        }\n    }\n}\n\n// src/core/FlashAccountingCommon.sol\n\nlibrary CreditDebt {\n    using UnsafeMath for int256;\n\n    function asCredit(int256 delta, NotePtr note) internal pure returns (uint256) {\n        if (delta < 0) {\n            assembly (\"memory-safe\") {\n                mstore(note, 0x4c085bf1) // selector for `DeltaNotPositive(address)`; clobbers `note.amount()`\n                revert(add(0x1c, note), 0x24)\n            }\n        }\n        return uint256(delta);\n    }\n\n    function asDebt(int256 delta, NotePtr note) internal pure returns (uint256) {\n        if (delta > 0) {\n            assembly (\"memory-safe\") {\n                mstore(note, 0x3351b260) // selector for `DeltaNotNegative(address)`; clobbers `note.amount()`\n                revert(add(0x1c, note), 0x24)\n            }\n        }\n        return uint256(delta.unsafeNeg());\n    }\n}\n\n/// This type is the same as `NotesLib.Note`, but as a user-defined value type to sidestep solc's\n/// awful memory handling.\ntype NotePtr is uint256;\n\n/// This library is a highly-optimized, in-memory, enumerable mapping from tokens to amounts. It\n/// consists of 2 components that must be kept synchronized. There is a `memory` array of `Note`\n/// (aka `Note[] memory`) that has up to `MAX_TOKENS` pre-allocated. And there is an implicit heap\n/// packed at the end of the array that stores the `Note`s. Each `Note` has a backpointer that knows\n/// its location in the `Notes[] memory`. While the length of the `Notes[]` array grows and shrinks\n/// as tokens are added and retired, heap objects are only cleared/deallocated when the context\n/// returns. Looking up the `Note` object corresponding to a token uses the perfect hash formed by\n/// `hashMul` and `hashMod`. Pay special attention to these parameters. See further below for\n/// recommendations on how to select values for them. A hash collision will result in a revert with\n/// signature `TokenHashCollision(address,address)`.\nlibrary NotesLib {\n    uint256 private constant _ADDRESS_MASK = 0x00ffffffffffffffffffffffffffffffffffffffff;\n\n    /// This is the maximum number of tokens that may be involved in an action. Increasing or\n    /// decreasing this value requires no other changes elsewhere in this file.\n    uint256 internal constant MAX_TOKENS = 8;\n\n    type NotePtrPtr is uint256;\n\n    struct Note {\n        uint256 amount;\n        IERC20 token;\n        NotePtrPtr backPtr;\n    }\n\n    function construct() internal pure returns (Note[] memory r) {\n        assembly (\"memory-safe\") {\n            r := mload(0x40)\n            // set the length of `r` to zero\n            mstore(r, 0x00)\n            // zeroize the heap\n            codecopy(add(add(0x20, shl(0x05, MAX_TOKENS)), r), codesize(), mul(0x60, MAX_TOKENS))\n            // allocate memory\n            mstore(0x40, add(add(0x20, shl(0x07, MAX_TOKENS)), r))\n        }\n    }\n\n    function amount(NotePtr note) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mload(note)\n        }\n    }\n\n    function setAmount(NotePtr note, uint256 newAmount) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(note, newAmount)\n        }\n    }\n\n    function token(NotePtr note) internal pure returns (IERC20 r) {\n        assembly (\"memory-safe\") {\n            r := mload(add(0x20, note))\n        }\n    }\n\n    function tokenIsEth(NotePtr note) internal pure returns (bool r) {\n        address ethAddress = ETH_ADDRESS;\n        assembly (\"memory-safe\") {\n            r := eq(ethAddress, mload(add(0x20, note)))\n        }\n    }\n\n    function eq(Note memory x, Note memory y) internal pure returns (bool) {\n        NotePtr yp;\n        assembly (\"memory-safe\") {\n            yp := y\n        }\n        return eq(x, yp);\n    }\n\n    function eq(Note memory x, NotePtr y) internal pure returns (bool) {\n        NotePtr xp;\n        assembly (\"memory-safe\") {\n            xp := x\n        }\n        return eq(xp, y);\n    }\n\n    function eq(NotePtr x, NotePtr y) internal pure returns (bool r) {\n        assembly (\"memory-safe\") {\n            r := eq(x, y)\n        }\n    }\n\n    function unsafeGet(Note[] memory a, uint256 i) internal pure returns (IERC20 retToken, uint256 retAmount) {\n        assembly (\"memory-safe\") {\n            let x := mload(add(add(0x20, shl(0x05, i)), a))\n            retToken := mload(add(0x20, x))\n            retAmount := mload(x)\n        }\n    }\n\n    //// How to generate a perfect hash:\n    ////\n    //// The arguments `hashMul` and `hashMod` are required to form a perfect hash for a table with\n    //// size `NotesLib.MAX_TOKENS` when applied to all the tokens involved in fills. The hash\n    //// function is constructed as `uint256 hash = mulmod(uint256(uint160(address(token))),\n    //// hashMul, hashMod) % NotesLib.MAX_TOKENS`.\n    ////\n    //// The \"simple\" or \"obvious\" way to do this is to simply try random 128-bit numbers for both\n    //// `hashMul` and `hashMod` until you obtain a function that has no collisions when applied to\n    //// the tokens involved in fills. A substantially more optimized algorithm can be obtained by\n    //// selecting several (at least 10) prime values for `hashMod`, precomputing the limb moduluses\n    //// for each value, and then selecting randomly from among them. The author recommends using\n    //// the 10 largest 64-bit prime numbers: 2^64 - {59, 83, 95, 179, 189, 257, 279, 323, 353,\n    //// 363}. `hashMul` can then be selected randomly or via some other optimized method.\n    ////\n    //// Note that in spite of the fact that some AMMs represent Ether (or the native asset of the\n    //// chain) as `address(0)`, we represent Ether as `Constants.ETH_ADDRESS` (the address of\n    //// all `e`s) for homogeneity with other parts of the codebase, and because the decision to\n    //// represent Ether as `address(0)` was stupid in the first place. `address(0)` represents the\n    //// absence of a thing, not a special case of the thing. It creates confusion with\n    //// uninitialized memory, storage, and variables.\n    function get(Note[] memory a, IERC20 newToken, uint256 hashMul, uint256 hashMod) internal pure returns (NotePtr x) {\n        assembly (\"memory-safe\") {\n            newToken := and(_ADDRESS_MASK, newToken)\n            x := add(add(0x20, shl(0x05, MAX_TOKENS)), a) // `x` now points at the first `Note` on the heap\n            x := add(mod(mulmod(newToken, hashMul, hashMod), mul(0x60, MAX_TOKENS)), x) // combine with token hash\n            // `x` now points at the exact `Note` object we want; let's check it to be sure, though\n            let x_token_ptr := add(0x20, x)\n\n            // check that we haven't encountered a hash collision. checking for a hash collision is\n            // equivalent to checking for array out-of-bounds or overflow.\n            {\n                let old_token := mload(x_token_ptr)\n                if mul(or(mload(add(0x40, x)), old_token), xor(old_token, newToken)) {\n                    mstore(0x00, 0x9a62e8b4) // selector for `TokenHashCollision(address,address)`\n                    mstore(0x20, old_token)\n                    mstore(0x40, newToken)\n                    revert(0x1c, 0x44)\n                }\n            }\n\n            // zero `newToken` is a footgun; check for it\n            if iszero(newToken) {\n                mstore(0x00, 0xad1991f5) // selector for `ZeroToken()`\n                revert(0x1c, 0x04)\n            }\n\n            // initialize the token (possibly redundant)\n            mstore(x_token_ptr, newToken)\n        }\n    }\n\n    function add(Note[] memory a, Note memory x) internal pure {\n        NotePtr xp;\n        assembly (\"memory-safe\") {\n            xp := x\n        }\n        return add(a, xp);\n    }\n\n    function add(Note[] memory a, NotePtr x) internal pure {\n        assembly (\"memory-safe\") {\n            let backptr_ptr := add(0x40, x)\n            let backptr := mload(backptr_ptr)\n            if iszero(backptr) {\n                let len := add(0x01, mload(a))\n                // We don't need to check for overflow or out-of-bounds access here; the checks in\n                // `get` above for token collision handle that for us. It's not possible to `get`\n                // more than `MAX_TOKENS` tokens\n                mstore(a, len)\n                backptr := add(shl(0x05, len), a)\n                mstore(backptr, x)\n                mstore(backptr_ptr, backptr)\n            }\n        }\n    }\n\n    function del(Note[] memory a, Note memory x) internal pure {\n        NotePtr xp;\n        assembly (\"memory-safe\") {\n            xp := x\n        }\n        return del(a, xp);\n    }\n\n    function del(Note[] memory a, NotePtr x) internal pure {\n        assembly (\"memory-safe\") {\n            let x_backptr_ptr := add(0x40, x)\n            let x_backptr := mload(x_backptr_ptr)\n            if x_backptr {\n                // Clear the backpointer in the referred-to `Note`\n                mstore(x_backptr_ptr, 0x00)\n                // We do not deallocate `x`\n\n                // Decrement the length of `a`\n                let len := mload(a)\n                mstore(a, sub(len, 0x01))\n\n                // Check if this is a \"swap and pop\" or just a \"pop\"\n                let end_ptr := add(shl(0x05, len), a)\n                if iszero(eq(end_ptr, x_backptr)) {\n                    // Overwrite the vacated indirection pointer `x_backptr` with the value at the end.\n                    let end := mload(end_ptr)\n                    mstore(x_backptr, end)\n\n                    // Fix up the backpointer in `end` to point to the new location of the indirection\n                    // pointer.\n                    let end_backptr_ptr := add(0x40, end)\n                    mstore(end_backptr_ptr, x_backptr)\n                }\n            }\n        }\n    }\n}\n\nusing NotesLib for NotePtr global;\n\n/// `State` behaves as if it were declared as:\n///     struct State {\n///         NotesLib.Note buy;\n///         NotesLib.Note sell;\n///         NotesLib.Note globalSell;\n///         uint256 globalSellAmount;\n///         uint256 _hashMul;\n///         uint256 _hashMod;\n///     }\n/// but we use a user-defined value type because solc generates very gas-inefficient boilerplate\n/// that allocates and zeroes a bunch of memory. Consequently, everything is written in assembly and\n/// accessors are provided for the relevant members.\ntype State is bytes32;\n\nlibrary StateLib {\n    using NotesLib for NotesLib.Note;\n    using NotesLib for NotesLib.Note[];\n\n    function construct(IERC20 token, uint256 hashMul, uint256 hashMod)\n        internal\n        pure\n        returns (State state, NotesLib.Note[] memory notes)\n    {\n        assembly (\"memory-safe\") {\n            // Allocate memory\n            state := mload(0x40)\n            mstore(0x40, add(0xc0, state))\n        }\n        // All the pointers in `state` are now pointing into unallocated memory\n        notes = NotesLib.construct();\n        // The pointers in `state` are now illegally aliasing elements in `notes`\n        NotePtr notePtr = notes.get(token, hashMul, hashMod);\n\n        // Here we actually set the pointers into a legal area of memory\n        setBuy(state, notePtr);\n        setSell(state, notePtr);\n        assembly (\"memory-safe\") {\n            // Set `state.globalSell`\n            mstore(add(0x40, state), notePtr)\n            // Set `state._hashMul`\n            mstore(add(0x80, state), hashMul)\n            // Set `state._hashMod`\n            mstore(add(0xa0, state), hashMod)\n        }\n    }\n\n    function buy(State state) internal pure returns (NotePtr note) {\n        assembly (\"memory-safe\") {\n            note := mload(state)\n        }\n    }\n\n    function sell(State state) internal pure returns (NotePtr note) {\n        assembly (\"memory-safe\") {\n            note := mload(add(0x20, state))\n        }\n    }\n\n    function globalSell(State state) internal pure returns (NotePtr note) {\n        assembly (\"memory-safe\") {\n            note := mload(add(0x40, state))\n        }\n    }\n\n    function globalSellAmount(State state) internal pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mload(add(0x60, state))\n        }\n    }\n\n    function setGlobalSellAmount(State state, uint256 newGlobalSellAmount) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(add(0x60, state), newGlobalSellAmount)\n        }\n    }\n\n    function _hashMul(State state) private pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mload(add(0x80, state))\n        }\n    }\n\n    function _hashMod(State state) private pure returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            r := mload(add(0xa0, state))\n        }\n    }\n\n    function checkZeroSellAmount(State state) internal pure {\n        NotePtr globalSell_ = state.globalSell();\n        if (globalSell_.amount() == 0) {\n            assembly (\"memory-safe\") {\n                mstore(globalSell_, 0xfb772a88) // selector for `ZeroSellAmount(address)`; clobbers `globalSell_.amount()`\n                revert(add(0x1c, globalSell_), 0x24)\n            }\n        }\n    }\n\n    function setSell(State state, NotePtr notePtr) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(add(0x20, state), notePtr)\n        }\n    }\n\n    function setSell(State state, NotesLib.Note[] memory notes, IERC20 token) internal pure {\n        setSell(state, notes.get(token, _hashMul(state), _hashMod(state)));\n    }\n\n    function setBuy(State state, NotePtr notePtr) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(state, notePtr)\n        }\n    }\n\n    function setBuy(State state, NotesLib.Note[] memory notes, IERC20 token) internal pure {\n        setBuy(state, notes.get(token, _hashMul(state), _hashMod(state)));\n    }\n}\n\nusing StateLib for State global;\n\nlibrary Encoder {\n    using FastLogic for bool;\n\n    // Offsets, from an encoded `bytes memory` pointer, of the bytes between the header and the fills\n    uint256 private constant _EXTRA_DATA_OFFSET = 212;\n    uint256 private constant _EXTRA_DATA_OFFSET_VIP = 306;\n\n    /// `extraDataSize` uninitialized bytes are reserved between the header and the fills for the\n    /// caller to fill in; `extraData` locates them.\n    function encode(\n        uint256 unlockSelector,\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin,\n        uint256 extraDataSize\n    ) internal view returns (bytes memory data) {\n        hashMul *= 96;\n        hashMod *= 96;\n        if ((ppm > BASIS).or(amountOutMin >> 128 != 0).or(hashMul >> 128 != 0).or(hashMod >> 128 != 0)) {\n            Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n        }\n        assembly (\"memory-safe\") {\n            data := mload(0x40)\n\n            let pathLen := mload(fills)\n            mcopy(add(add(_EXTRA_DATA_OFFSET, extraDataSize), data), add(0x20, fills), pathLen)\n\n            mstore(add(0xb4, data), ppm)\n            mstore(add(0xb1, data), sellToken)\n            mstore(add(0x9d, data), address()) // payer\n            // feeOnTransfer (1 byte)\n\n            mstore(add(0x88, data), hashMod)\n            mstore(add(0x78, data), hashMul)\n            mstore(add(0x68, data), amountOutMin)\n            mstore(add(0x58, data), recipient)\n            mstore(add(0x44, data), add(add(0x70, pathLen), extraDataSize))\n            mstore(add(0x24, data), 0x20)\n            mstore(add(0x04, data), unlockSelector)\n            mstore(data, add(add(0xb4, pathLen), extraDataSize))\n            mstore8(add(0xa8, data), lt(0x00, feeOnTransfer))\n\n            mstore(0x40, add(add(data, add(0xd4, pathLen)), extraDataSize))\n        }\n    }\n\n    /// `extraDataSize` uninitialized bytes are reserved between the header and the fills for the\n    /// caller to fill in; `extraDataVIP` locates them.\n    function encodeVIP(\n        uint256 unlockSelector,\n        address recipient,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory sig,\n        bool isForwarded,\n        uint256 amountOutMin,\n        uint256 extraDataSize\n    ) internal pure returns (bytes memory data) {\n        hashMul *= 96;\n        hashMod *= 96;\n        if ((amountOutMin >> 128 != 0).or(hashMul >> 128 != 0).or(hashMod >> 128 != 0)) {\n            Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n        }\n        assembly (\"memory-safe\") {\n            data := mload(0x40)\n\n            let pathLen := mload(fills)\n            let sigLen := mload(sig)\n\n            {\n                let ptr := add(add(_EXTRA_DATA_OFFSET_VIP, extraDataSize), data)\n\n                // sig length as 3 bytes goes at the end of the callback\n                mstore(sub(add(sigLen, add(pathLen, ptr)), 0x1d), sigLen)\n\n                // fills go at the end of the header\n                mcopy(ptr, add(0x20, fills), pathLen)\n                ptr := add(pathLen, ptr)\n\n                // signature comes after the fills\n                mcopy(ptr, add(0x20, sig), sigLen)\n                ptr := add(sigLen, ptr)\n\n                mstore(0x40, add(0x03, ptr))\n            }\n\n            mstore8(add(0x131, data), lt(0x00, isForwarded))\n            mcopy(add(0xf1, data), add(0x20, permit), 0x40)\n            mcopy(add(0xb1, data), mload(permit), 0x40) // aliases `payer` on purpose\n            mstore(add(0x9d, data), 0x00) // payer\n            // feeOnTransfer (1 byte)\n\n            mstore(add(0x88, data), hashMod)\n            mstore(add(0x78, data), hashMul)\n            mstore(add(0x68, data), amountOutMin)\n            mstore(add(0x58, data), recipient)\n            mstore(add(0x44, data), add(add(0xd1, add(pathLen, sigLen)), extraDataSize))\n            mstore(add(0x24, data), 0x20)\n            mstore(add(0x04, data), unlockSelector)\n            mstore(data, add(add(0x115, add(pathLen, sigLen)), extraDataSize))\n\n            mstore8(add(0xa8, data), lt(0x00, feeOnTransfer))\n        }\n    }\n\n    function extraData(bytes memory data) internal pure returns (uint256 ptr) {\n        assembly (\"memory-safe\") {\n            ptr := add(_EXTRA_DATA_OFFSET, data)\n        }\n    }\n\n    function extraDataVIP(bytes memory data) internal pure returns (uint256 ptr) {\n        assembly (\"memory-safe\") {\n            ptr := add(_EXTRA_DATA_OFFSET_VIP, data)\n        }\n    }\n}\n\nlibrary Decoder {\n    using SafeTransferLib for IERC20;\n    using UnsafeMath for uint256;\n    using NotesLib for NotesLib.Note;\n    using NotesLib for NotesLib.Note[];\n\n    /// Update `state` for the next fill packed in `data`. This also may allocate/append `Note`s\n    /// into `notes`. Returns the suffix of the bytes that are not consumed in the decoding\n    /// process. The first byte of `data` describes which of the compact representations for the hop\n    /// is used.\n    ///\n    ///   0 -> sell and buy tokens remain unchanged from the previous fill (pure multiplex)\n    ///   1 -> sell token remains unchanged from the previous fill, buy token is read from `data` (diamond multiplex)\n    ///   2 -> sell token becomes the buy token from the previous fill, new buy token is read from `data` (multihop)\n    ///   3 -> both sell and buy token are read from `data`\n    ///\n    /// This function is responsible for calling `NotesLib.get(Note[] memory, IERC20, uint256,\n    /// uint256)` (via `StateLib.setSell` and `StateLib.setBuy`), which maintains the `notes` array\n    /// and heap.\n    function updateState(State state, NotesLib.Note[] memory notes, bytes calldata data)\n        internal\n        pure\n        returns (bytes calldata)\n    {\n        bytes32 dataWord;\n        assembly (\"memory-safe\") {\n            dataWord := calldataload(data.offset)\n        }\n        uint256 dataConsumed = 1;\n\n        uint256 caseKey = uint256(dataWord) >> 248;\n        if (caseKey != 0) {\n            notes.add(state.buy());\n\n            if (caseKey > 1) {\n                if (state.sell().amount() == 0) {\n                    notes.del(state.sell());\n                }\n                if (caseKey == 2) {\n                    state.setSell(state.buy());\n                } else {\n                    assert(caseKey == 3);\n\n                    IERC20 sellToken = IERC20(address(uint160(uint256(dataWord) >> 88)));\n                    assembly (\"memory-safe\") {\n                        dataWord := calldataload(add(0x14, data.offset))\n                    }\n                    unchecked {\n                        dataConsumed += 20;\n                    }\n\n                    state.setSell(notes, sellToken);\n                }\n            }\n\n            IERC20 buyToken = IERC20(address(uint160(uint256(dataWord) >> 88)));\n            unchecked {\n                dataConsumed += 20;\n            }\n\n            state.setBuy(notes, buyToken);\n            if (state.buy().eq(state.globalSell())) {\n                assembly (\"memory-safe\") {\n                    let ptr := mload(add(0x40, state)) // dereference `state.globalSell`\n                    mstore(ptr, 0x784cb7b8) // selector for `BoughtSellToken(address)`; clobbers `state.globalSell.amount`\n                    revert(add(0x1c, ptr), 0x24)\n                }\n            }\n        }\n\n        assembly (\"memory-safe\") {\n            data.offset := add(dataConsumed, data.offset)\n            data.length := sub(data.length, dataConsumed)\n            // we don't check for array out-of-bounds here; we will check it later in `_getHookData`\n        }\n\n        return data;\n    }\n\n    function overflowCheck(bytes calldata data) internal pure {\n        if (data.length > 16777215) {\n            Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n        }\n    }\n\n    /// Decode an ABI-ish encoded `bytes` from `data`. It is \"-ish\" in the sense that the encoding\n    /// of the length doesn't take up an entire word. The length is encoded as only 3 bytes (2^24\n    /// bytes of calldata consumes ~67M gas, much more than the block limit). The payload is also\n    /// unpadded. The next fill's `ppm` is encoded immediately after the `hookData` payload.\n    function decodeBytes(bytes calldata data) internal pure returns (bytes calldata retData, bytes calldata hookData) {\n        assembly (\"memory-safe\") {\n            hookData.length := shr(0xe8, calldataload(data.offset))\n            hookData.offset := add(0x03, data.offset)\n            let hop := add(0x03, hookData.length)\n\n            retData.offset := add(data.offset, hop)\n            retData.length := sub(data.length, hop)\n        }\n    }\n\n    function decodeHeader(bytes calldata data)\n        internal\n        pure\n        returns (\n            bytes calldata newData,\n            // These values are user-supplied\n            address recipient,\n            uint256 minBuyAmount,\n            uint256 hashMul,\n            uint256 hashMod,\n            bool feeOnTransfer,\n            // `payer` is special and is authenticated\n            address payer\n        )\n    {\n        // These values are user-supplied\n        assembly (\"memory-safe\") {\n            recipient := shr(0x60, calldataload(data.offset))\n            let packed := calldataload(add(0x14, data.offset))\n            minBuyAmount := shr(0x80, packed)\n            hashMul := and(0xffffffffffffffffffffffffffffffff, packed)\n            packed := calldataload(add(0x34, data.offset))\n            hashMod := shr(0x80, packed)\n            feeOnTransfer := lt(0x00, and(0x1000000000000000000000000000000, packed))\n\n            data.offset := add(0x45, data.offset)\n            data.length := sub(data.length, 0x45)\n            // we don't check for array out-of-bounds here; we will check it later in `initialize`\n        }\n\n        // `payer` is special and is authenticated\n        assembly (\"memory-safe\") {\n            payer := shr(0x60, calldataload(data.offset))\n\n            data.offset := add(0x14, data.offset)\n            data.length := sub(data.length, 0x14)\n            // we don't check for array out-of-bounds here; we will check it later in `initialize`\n        }\n\n        newData = data;\n    }\n\n    function initialize(bytes calldata data, uint256 hashMul, uint256 hashMod, address payer)\n        internal\n        view\n        returns (\n            bytes calldata newData,\n            State state,\n            NotesLib.Note[] memory notes,\n            ISignatureTransfer.PermitTransferFrom calldata permit,\n            bool isForwarded,\n            bytes calldata sig\n        )\n    {\n        {\n            IERC20 sellToken;\n            assembly (\"memory-safe\") {\n                sellToken := shr(0x60, calldataload(data.offset))\n            }\n            // We don't advance `data` here because there's a special interaction between `payer`\n            // (which is the 20 bytes in calldata immediately before `data`), `sellToken`, and\n            // `permit` that's handled below.\n            (state, notes) = StateLib.construct(sellToken, hashMul, hashMod);\n        }\n\n        // This assembly block is just here to appease the compiler. We only use `permit` and `sig`\n        // in the codepaths where they are set away from the values initialized here.\n        assembly (\"memory-safe\") {\n            permit := calldatasize()\n            sig.offset := calldatasize()\n            sig.length := 0x00\n        }\n\n        if (state.globalSell().tokenIsEth()) {\n            assert(payer == address(this));\n\n            uint256 ppm;\n            assembly (\"memory-safe\") {\n                // `data` hasn't been advanced from decoding `sellToken` above. so we have to\n                // advance it by 20 bytes to decode `ppm` then advance by 3 bytes\n\n                data.offset := add(0x14, data.offset)\n                ppm := shr(0xe8, calldataload(data.offset))\n\n                data.offset := add(0x3, data.offset)\n                data.length := sub(data.length, 0x17)\n                // We check for array out-of-bounds below\n            }\n\n            unchecked {\n                state.globalSell().setAmount((address(this).balance * ppm).unsafeDiv(BASIS));\n            }\n        } else {\n            if (payer == address(this)) {\n                uint256 ppm;\n                assembly (\"memory-safe\") {\n                    // `data` hasn't been advanced from decoding `sellToken` above. so we have to\n                    // advance it by 20 bytes to decode `ppm` then advance by 3 bytes\n\n                    data.offset := add(0x14, data.offset)\n                    ppm := shr(0xe8, calldataload(data.offset))\n\n                    data.offset := add(0x3, data.offset)\n                    data.length := sub(data.length, 0x17)\n                    // We check for array out-of-bounds below\n                }\n\n                unchecked {\n                    NotePtr globalSell = state.globalSell();\n                    globalSell.setAmount((globalSell.token().fastSpendableBalance() * ppm).unsafeDiv(BASIS));\n                }\n            } else {\n                assert(payer == address(0));\n\n                assembly (\"memory-safe\") {\n                    // this is super dirty, but it works because although `permit` is aliasing in\n                    // the middle of `payer`, because `payer` is all zeroes, it's treated as padding\n                    // for the first word of `permit`, which is the sell token\n                    permit := sub(data.offset, 0x0c)\n                    isForwarded := and(0x01, calldataload(add(0x55, data.offset)))\n\n                    // `sig` is packed at the end of `data`, in \"reverse ABI-ish encoded\" fashion\n                    sig.offset := sub(add(data.offset, data.length), 0x03)\n                    sig.length := shr(0xe8, calldataload(sig.offset))\n                    sig.offset := sub(sig.offset, sig.length)\n\n                    // Remove `permit` and `isForwarded` from the front of `data`\n                    data.offset := add(0x75, data.offset)\n                    if gt(data.offset, sig.offset) { revert(0x00, 0x00) }\n\n                    // Remove `sig` from the back of `data`\n                    data.length := sub(sub(data.length, 0x78), sig.length)\n                    // We check for array out-of-bounds below\n                }\n            }\n        }\n\n        Decoder.overflowCheck(data);\n        newData = data;\n    }\n}\n\nlibrary Take {\n    using UnsafeMath for uint256;\n    using NotesLib for NotesLib.Note;\n    using NotesLib for NotesLib.Note[];\n\n    function _callSelector(uint256 selector, IERC20 token, address to, uint256 amount) internal {\n        assembly (\"memory-safe\") {\n            token := shl(0x60, token)\n            if iszero(amount) {\n                mstore(0x20, token)\n                mstore(0x00, 0xcbf0dbf5000000000000000000000000) // selector for `ZeroBuyAmount(address)` with `token`'s padding\n                revert(0x10, 0x24)\n            }\n\n            // save the free memory pointer because we're about to clobber it\n            let ptr := mload(0x40)\n\n            mstore(0x60, amount)\n            mstore(0x40, to)\n            mstore(\n                0x2c,\n                mul(iszero(eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, token)), token)\n            ) // clears `to`'s padding\n            mstore(0x0c, shl(0x60, selector)) // clears `token`'s padding\n\n            if iszero(call(gas(), caller(), 0x00, 0x1c, 0x64, 0x00, 0x00)) {\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n\n            // restore clobbered slots\n            mstore(0x60, 0x00)\n            mstore(0x40, ptr)\n        }\n    }\n\n    /// `take` is responsible for removing the accumulated credit in each token from the vault. The\n    /// current `state.buy` is the global buy token. We return the settled amount of that token\n    /// (`buyAmount`), after checking it against the slippage limit (`minBuyAmount`). Each token\n    /// with credit causes a corresponding call to `msg.sender.<selector>(token, recipient,\n    /// amount)`.\n    function take(State state, NotesLib.Note[] memory notes, uint32 selector, address recipient, uint256 minBuyAmount)\n        internal\n        returns (uint256 buyAmount)\n    {\n        // NOTICE: Any changes done in this function most likely need to be applied to `CompactTake.take`\n        // as well because it is a copy of this one with a different `_callSelector` function\n        notes.del(state.buy());\n        if (state.sell().amount() == 0) {\n            notes.del(state.sell());\n        }\n\n        uint256 length = notes.length;\n        // `length` of zero implies that we fully liquidated the global sell token (there is no\n        // `amount` remaining) and that the only token in which we have credit is the global buy\n        // token. We're about to `take` that token below.\n        if (length != 0) {\n            {\n                NotesLib.Note memory firstNote = notes[0]; // out-of-bounds is impossible\n                if (!firstNote.eq(state.globalSell())) {\n                    // The global sell token being in a position other than the 1st would imply that\n                    // at some point we _bought_ that token. This is illegal and results in a revert\n                    // with reason `BoughtSellToken(address)`.\n                    _callSelector(selector, firstNote.token, address(this), firstNote.amount);\n                }\n            }\n            for (uint256 i = 1; i < length; i = i.unsafeInc()) {\n                (IERC20 token, uint256 amount) = notes.unsafeGet(i);\n                _callSelector(selector, token, address(this), amount);\n            }\n        }\n\n        // The final token to be bought is considered the global buy token. We bypass `notes` and\n        // read it directly from `state`. Check the slippage limit. Transfer to the recipient.\n        {\n            IERC20 buyToken = state.buy().token();\n            buyAmount = state.buy().amount();\n            if (buyAmount < minBuyAmount) {\n                revertTooMuchSlippage(buyToken, minBuyAmount, buyAmount);\n            }\n            _callSelector(selector, buyToken, recipient, buyAmount);\n        }\n    }\n}\n\nlibrary CompactTake {\n    // NOTICE: This library is a copy of `Take` with a different `_callSelector` function\n    using UnsafeMath for uint256;\n    using NotesLib for NotesLib.Note;\n    using NotesLib for NotesLib.Note[];\n\n    function _callSelector(uint256 selector, IERC20 token, address to, uint256 amount) internal {\n        assembly (\"memory-safe\") {\n            if iszero(amount) {\n                mstore(0x14, token)\n                mstore(0x00, 0xcbf0dbf5000000000000000000000000) // selector for `ZeroBuyAmount(address)` with `token`'s padding\n                revert(0x10, 0x24)\n            }\n\n            // save the free memory pointer because we're about to clobber it\n            let ptr := mload(0x40)\n\n            mstore(0x38, amount)\n            mstore(0x28, to)\n            mstore(\n                0x14,\n                mul(\n                    lt(0x00, shl(0x60, xor(0x000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, token))),\n                    token\n                )\n            )\n            mstore(0x00, selector)\n\n            if iszero(call(gas(), caller(), 0x00, 0x1c, 0x3c, 0x00, 0x00)) {\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n\n            // restore clobbered slots\n            mstore(0x40, ptr)\n        }\n    }\n\n    /// `take` is responsible for removing the accumulated credit in each token from the vault. The\n    /// current `state.buy` is the global buy token. We return the settled amount of that token\n    /// (`buyAmount`), after checking it against the slippage limit (`minBuyAmount`). Each token\n    /// with credit causes a corresponding call to `msg.sender.<selector>(token, recipient,\n    /// amount)`.\n    function take(State state, NotesLib.Note[] memory notes, uint32 selector, address recipient, uint256 minBuyAmount)\n        internal\n        returns (uint256 buyAmount)\n    {\n        // NOTICE: Any changes done in this function most likely need to be applied to `Take.take`\n        // as well because this function is a copy of it with a different `_callSelector` function\n        notes.del(state.buy());\n        if (state.sell().amount() == 0) {\n            notes.del(state.sell());\n        }\n\n        uint256 length = notes.length;\n        // `length` of zero implies that we fully liquidated the global sell token (there is no\n        // `amount` remaining) and that the only token in which we have credit is the global buy\n        // token. We're about to `take` that token below.\n        if (length != 0) {\n            {\n                NotesLib.Note memory firstNote = notes[0]; // out-of-bounds is impossible\n                if (!firstNote.eq(state.globalSell())) {\n                    // The global sell token being in a position other than the 1st would imply that\n                    // at some point we _bought_ that token. This is illegal and results in a revert\n                    // with reason `BoughtSellToken(address)`.\n                    _callSelector(selector, firstNote.token, address(this), firstNote.amount);\n                }\n            }\n            for (uint256 i = 1; i < length; i = i.unsafeInc()) {\n                (IERC20 token, uint256 amount) = notes.unsafeGet(i);\n                _callSelector(selector, token, address(this), amount);\n            }\n        }\n\n        // The final token to be bought is considered the global buy token. We bypass `notes` and\n        // read it directly from `state`. Check the slippage limit. Transfer to the recipient.\n        {\n            IERC20 buyToken = state.buy().token();\n            buyAmount = state.buy().amount();\n            if (buyAmount < minBuyAmount) {\n                revertTooMuchSlippage(buyToken, minBuyAmount, buyAmount);\n            }\n            _callSelector(selector, buyToken, recipient, buyAmount);\n        }\n    }\n}\n\n// src/core/UniswapV4Types.sol\n\ntype IHooks is address;\n\n/// @dev Two `int128` values packed into a single `int256` where the upper 128 bits represent the amount0\n/// and the lower 128 bits represent the amount1.\ntype BalanceDelta is int256;\n\nusing BalanceDeltaLibrary for BalanceDelta global;\n\n/// @notice Library for getting the amount0 and amount1 deltas from the BalanceDelta type\nlibrary BalanceDeltaLibrary {\n    function amount0(BalanceDelta balanceDelta) internal pure returns (int128 _amount0) {\n        assembly (\"memory-safe\") {\n            _amount0 := sar(0x80, balanceDelta)\n        }\n    }\n\n    function amount1(BalanceDelta balanceDelta) internal pure returns (int128 _amount1) {\n        assembly (\"memory-safe\") {\n            _amount1 := signextend(0x0f, balanceDelta)\n        }\n    }\n}\n\ninterface IPoolManager {\n    /// @notice All interactions on the contract that account deltas require unlocking. A caller that calls `unlock` must implement\n    /// `IUnlockCallback(msg.sender).unlockCallback(data)`, where they interact with the remaining functions on this contract.\n    /// @dev The only functions callable without an unlocking are `initialize` and `updateDynamicLPFee`\n    /// @param data Any data to pass to the callback, via `IUnlockCallback(msg.sender).unlockCallback(data)`\n    /// @return The data returned by the call to `IUnlockCallback(msg.sender).unlockCallback(data)`\n    function unlock(bytes calldata data) external returns (bytes memory);\n\n    /// @notice Returns the key for identifying a pool\n    struct PoolKey {\n        /// @notice The lower token of the pool, sorted numerically\n        IERC20 token0;\n        /// @notice The higher token of the pool, sorted numerically\n        IERC20 token1;\n        /// @notice The pool LP fee, capped at 1_000_000. If the highest bit is 1, the pool has a dynamic fee and must be exactly equal to 0x800000\n        uint24 fee;\n        /// @notice Ticks that involve positions must be a multiple of tick spacing\n        int24 tickSpacing;\n        /// @notice The hooks of the pool\n        IHooks hooks;\n    }\n\n    struct SwapParams {\n        /// Whether to swap token0 for token1 or vice versa\n        bool zeroForOne;\n        /// The desired input amount if negative (exactIn), or the desired output amount if positive (exactOut)\n        int256 amountSpecified;\n        /// The sqrt price at which, if reached, the swap will stop executing\n        uint160 sqrtPriceLimitX96;\n    }\n\n    /// @notice Swap against the given pool\n    /// @param key The pool to swap in\n    /// @param params The parameters for swapping\n    /// @param hookData The data to pass through to the swap hooks\n    /// @return swapDelta The balance delta of the address swapping\n    /// @dev Swapping on low liquidity pools may cause unexpected swap amounts when liquidity available is less than amountSpecified.\n    /// Additionally note that if interacting with hooks that have the BEFORE_SWAP_RETURNS_DELTA_FLAG or AFTER_SWAP_RETURNS_DELTA_FLAG\n    /// the hook may alter the swap input/output. Integrators should perform checks on the returned swapDelta.\n    function swap(PoolKey memory key, SwapParams memory params, bytes calldata hookData)\n        external\n        returns (BalanceDelta swapDelta);\n\n    /// @notice Writes the current ERC20 balance of the specified token to transient storage\n    /// This is used to checkpoint balances for the manager and derive deltas for the caller.\n    /// @dev This MUST be called before any ERC20 tokens are sent into the contract, but can be skipped\n    /// for native tokens because the amount to settle is determined by the sent value.\n    /// However, if an ERC20 token has been synced and not settled, and the caller instead wants to settle\n    /// native funds, this function can be called with the native currency to then be able to settle the native currency\n    function sync(IERC20 token) external;\n\n    /// @notice Called by the user to net out some value owed to the user\n    /// @dev Can also be used as a mechanism for _free_ flash loans\n    /// @param token The token to withdraw from the pool manager\n    /// @param to The address to withdraw to\n    /// @param amount The amount of token to withdraw\n    function take(IERC20 token, address to, uint256 amount) external;\n\n    /// @notice Called by the user to pay what is owed\n    /// @return paid The amount of token settled\n    function settle() external payable returns (uint256 paid);\n}\n\n/// Solc emits code that is both gas inefficient and codesize bloated. By reimplementing these\n/// function calls in Yul, we obtain significant improvements. Solc also emits an EXTCODESIZE check\n/// when an external function doesn't return anything (`sync`). Obviously, we know that POOL_MANAGER\n/// has code, so this omits those checks. Also, for compatibility, these functions identify\n/// `SettlerAbstract.ETH_ADDRESS` (the address of all `e`s) and replace it with `address(0)`.\nlibrary UnsafePoolManager {\n    function unsafeSync(IPoolManager poolManager, IERC20 token) internal {\n        // It is the responsibility of the calling code to determine whether `token` is\n        // `ETH_ADDRESS` and substitute it with `IERC20(address(0))` appropriately. This delegation\n        // of responsibility is required because a call to `unsafeSync(0)` must be followed by a\n        // value-bearing call to `unsafeSettle` instead of using `IERC20.safeTransfer`\n        assembly (\"memory-safe\") {\n            mstore(0x14, token)\n            mstore(0x00, 0xa5841194000000000000000000000000) // selector for `sync(address)` with `token`'s padding\n            if iszero(call(gas(), poolManager, 0x00, 0x10, 0x24, 0x00, 0x00)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n        }\n    }\n\n    function unsafeSwap(\n        IPoolManager poolManager,\n        IPoolManager.PoolKey memory key,\n        IPoolManager.SwapParams memory params,\n        bytes calldata hookData\n    ) internal returns (BalanceDelta r) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, 0xf3cd914c) // selector for `swap((address,address,uint24,int24,address),(bool,int256,uint160),bytes)`\n            let token0 := mload(key)\n            token0 := mul(token0, iszero(eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, token0)))\n            mstore(add(0x20, ptr), token0)\n            mcopy(add(0x40, ptr), add(0x20, key), 0x80)\n            mcopy(add(0xc0, ptr), params, 0x60)\n            mstore(add(0x120, ptr), 0x120)\n            mstore(add(0x140, ptr), hookData.length)\n            calldatacopy(add(0x160, ptr), hookData.offset, hookData.length)\n            if iszero(call(gas(), poolManager, 0x00, add(0x1c, ptr), add(0x144, hookData.length), 0x00, 0x20)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            r := mload(0x00)\n        }\n    }\n\n    function unsafeSettle(IPoolManager poolManager, uint256 value) internal returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x11da60b4) // selector for `settle()`\n            if iszero(call(gas(), poolManager, value, 0x1c, 0x04, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            r := mload(0x00)\n        }\n    }\n\n    function unsafeSettle(IPoolManager poolManager) internal returns (uint256) {\n        return unsafeSettle(poolManager, 0);\n    }\n}\n\n/// @notice Interface for the callback executed when an address unlocks the pool manager\ninterface IUnlockCallback {\n    /// @notice Called by the pool manager on `msg.sender` when the manager is unlocked\n    /// @param data The data that was passed to the call to unlock\n    /// @return Any data that you want to be returned from the unlock call\n    function unlockCallback(bytes calldata data) external returns (bytes memory);\n}\n\n// src/core/univ4forks/UniswapV4.sol\n\nIPoolManager constant uniswapV4MainnetPoolManager = IPoolManager(0x000000000004444c5dc75cB358380D2e3dE08A90);\nIPoolManager constant uniswapV4ArbitrumPoolManager = IPoolManager(0x360E68faCcca8cA495c1B759Fd9EEe466db9FB32);\nIPoolManager constant uniswapV4AvalanchePoolManager = IPoolManager(0x06380C0e0912312B5150364B9DC4542BA0DbBc85);\nIPoolManager constant uniswapV4BasePoolManager = IPoolManager(0x498581fF718922c3f8e6A244956aF099B2652b2b);\nIPoolManager constant uniswapV4BnbPoolManager = IPoolManager(0x28e2Ea090877bF75740558f6BFB36A5ffeE9e9dF);\nIPoolManager constant uniswapV4OptimismPoolManager = IPoolManager(0x9a13F98Cb987694C9F086b1F5eB990EeA8264Ec3);\nIPoolManager constant uniswapV4PolygonPoolManager = IPoolManager(0x67366782805870060151383F4BbFF9daB53e5cD6);\nIPoolManager constant uniswapV4WorldChainPoolManager = IPoolManager(0xb1860D529182ac3BC1F51Fa2ABd56662b7D13f33);\nIPoolManager constant uniswapV4InkPoolManager = IPoolManager(0x360E68faCcca8cA495c1B759Fd9EEe466db9FB32);\nIPoolManager constant uniswapV4UnichainPoolManager = IPoolManager(0x1F98400000000000000000000000000000000004); // https://github.com/Uniswap/contracts/blob/main/deployments/130.md#wed-jan-22-2025\nIPoolManager constant uniswapV4SepoliaPoolManager = IPoolManager(0xE03A1074c86CFeDd5C142C4F04F1a1536e203543);\nIPoolManager constant uniswapV4MonadPoolManager = IPoolManager(0x188d586Ddcf52439676Ca21A244753fA19F9Ea8e);\nIPoolManager constant uniswapV4TempoPoolManager = IPoolManager(0x33620f62C5b9B2086dD6b62F4A297A9f30347029);\nIPoolManager constant uniswapV4RobinhoodPoolManager = IPoolManager(0x8366a39CC670B4001A1121B8F6A443A643e40951);\nIPoolManager constant uniswapV4ArcPoolManager = IPoolManager(0x8366a39CC670B4001A1121B8F6A443A643e40951);\n\nuint8 constant uniswapV4ForkId = 0;\n\n// src/SettlerAbstract.sol\n\nabstract contract SettlerAbstract is Permit2PaymentAbstract {\n    // Permit2 Witness for meta transactions\n    string internal constant SLIPPAGE_AND_ACTIONS_TYPE =\n        \"SlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)\";\n    bytes32 internal constant SLIPPAGE_AND_ACTIONS_TYPEHASH =\n        0x615e8d716cef7295e75dd3f1f10d679914ad6d7759e8e9459f0109ef75241701;\n    // Permit2 Witness for intents\n    string internal constant SLIPPAGE_TYPE = \"Slippage(address recipient,address buyToken,uint256 minAmountOut)\";\n    bytes32 internal constant SLIPPAGE_TYPEHASH = 0xdc83993a2ffc65b01b71ed08790b6e39c5c55d76937b62a3b5085b02071f1259;\n\n    constructor() {\n        assert(SLIPPAGE_AND_ACTIONS_TYPEHASH == keccak256(bytes(SLIPPAGE_AND_ACTIONS_TYPE)));\n        assert(SLIPPAGE_TYPEHASH == keccak256(bytes(SLIPPAGE_TYPE)));\n    }\n\n    function _hasMetaTxn() internal pure virtual returns (bool);\n\n    function _tokenId() internal pure virtual returns (uint256);\n\n    function _div512to256(uint512 n, uint512 d) internal view virtual returns (uint256);\n\n    function _checkRecipient(address sender, address recipient, IERC20 buyToken) internal view virtual;\n\n    // True when `_checkRecipient` is not empty. Call sites that must first resolve the sender or\n    // the recipient at a cost consult this before invoking the hook.\n    function _hasRecipientCheck() internal pure virtual returns (bool);\n\n    // True when `_checkRecipient` reads the buy token. Pool call sites that must look the token\n    // up at a cost consult this before passing it to the hook.\n    function _recipientCheckNeedsToken() internal pure virtual returns (bool);\n}\n\nabstract contract SettlerSwapAbstract is ISettlerBase, SettlerAbstract {\n    function _dispatch(uint256 i, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        virtual\n        returns (bool);\n}\n\nabstract contract SettlerBridgeAbstract is SettlerAbstract {\n    function _dispatch(uint256 i, uint256 action, bytes calldata data) internal virtual returns (bool);\n}\n\n// src/core/RfqOrderSettlement.sol\n\nabstract contract RfqOrderSettlement is SettlerSwapAbstract {\n    using Ternary for bool;\n    using SafeTransferLib for IERC20;\n    using UnsafeMath for uint256;\n\n    struct Consideration {\n        IERC20 token;\n        uint256 amount;\n        address counterparty;\n        bool partialFillAllowed;\n    }\n\n    string internal constant CONSIDERATION_TYPE =\n        \"Consideration(address token,uint256 amount,address counterparty,bool partialFillAllowed)\";\n    // `string.concat` isn't recognized by solc as compile-time constant, but `abi.encodePacked` is\n    string internal constant CONSIDERATION_WITNESS =\n        string(abi.encodePacked(\"Consideration consideration)\", CONSIDERATION_TYPE, TOKEN_PERMISSIONS_TYPE));\n    bytes32 internal constant CONSIDERATION_TYPEHASH =\n        0x7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa;\n\n    string internal constant RFQ_ORDER_TYPE =\n        \"RfqOrder(Consideration makerConsideration,Consideration takerConsideration)\";\n    string internal constant RFQ_ORDER_TYPE_RECURSIVE = string(abi.encodePacked(RFQ_ORDER_TYPE, CONSIDERATION_TYPE));\n    bytes32 internal constant RFQ_ORDER_TYPEHASH = 0x49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a7598276;\n\n    function _hashConsideration(Consideration memory consideration) internal pure returns (bytes32 result) {\n        assembly (\"memory-safe\") {\n            let ptr := sub(consideration, 0x20)\n            let oldValue := mload(ptr)\n            mstore(ptr, CONSIDERATION_TYPEHASH)\n            result := keccak256(ptr, 0xa0)\n            mstore(ptr, oldValue)\n        }\n    }\n\n    function _logRfqOrder(bytes32 makerConsiderationHash, bytes32 takerConsiderationHash, uint128 makerFilledAmount)\n        private\n    {\n        assembly (\"memory-safe\") {\n            mstore(0x00, RFQ_ORDER_TYPEHASH)\n            mstore(0x20, makerConsiderationHash)\n            let ptr := mload(0x40)\n            mstore(0x40, takerConsiderationHash)\n            let orderHash := keccak256(0x00, 0x60)\n            mstore(0x40, ptr)\n            mstore(0x10, makerFilledAmount)\n            mstore(0x00, orderHash)\n            log0(0x00, 0x30)\n        }\n    }\n\n    constructor() {\n        assert(CONSIDERATION_TYPEHASH == keccak256(bytes(CONSIDERATION_TYPE)));\n        assert(RFQ_ORDER_TYPEHASH == keccak256(bytes(RFQ_ORDER_TYPE_RECURSIVE)));\n    }\n\n    /// @dev Settle an RfqOrder between maker and taker transferring funds directly between the counterparties. Either\n    ///      two Permit2 signatures are consumed, with the maker Permit2 containing a witness of the RfqOrder, or\n    ///      AllowanceHolder is supported for the taker payment. The Maker has signed the same order as the\n    ///      Taker. Submission may be directly by the taker or via a third party with the Taker signing a witness.\n    /// @dev if used, the taker's witness is not calculated nor verified here as calling function is trusted\n    function fillRfqOrderVIP(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory makerPermit,\n        address maker,\n        bytes memory makerSig,\n        ISignatureTransfer.PermitTransferFrom memory takerPermit,\n        bytes memory takerSig\n    ) internal {\n        (ISignatureTransfer.SignatureTransferDetails memory makerTransferDetails, uint256 makerAmount) =\n            _permitToTransferDetails(maker, makerPermit, recipient);\n        // In theory, the taker permit could invoke the balance-proportional sell amount logic. However,\n        // because we hash the sell amount computed here into the maker's consideration (witness) only a\n        // balance-proportional sell amount that corresponds exactly to the signed order would avoid a\n        // revert. In other words, no unexpected behavior is possible. It's pointless to prohibit the\n        // use of that logic.\n        (ISignatureTransfer.SignatureTransferDetails memory takerTransferDetails, uint256 takerAmount) =\n            _permitToTransferDetails(\n                address(0) /* sentinel for `_msgSender()` */,\n                takerPermit,\n                maker\n            );\n\n        bytes32 witness = _hashConsideration(\n            Consideration({\n                token: IERC20(takerPermit.permitted.token),\n                amount: takerAmount,\n                counterparty: _msgSender(),\n                partialFillAllowed: false\n            })\n        );\n        _transferFrom(takerPermit, takerTransferDetails, takerSig);\n        _transferFromIKnowWhatImDoing(\n            makerPermit, makerTransferDetails, maker, witness, CONSIDERATION_WITNESS, makerSig, false\n        );\n\n        _logRfqOrder(\n            witness,\n            _hashConsideration(\n                Consideration({\n                    token: IERC20(makerPermit.permitted.token),\n                    amount: makerAmount,\n                    counterparty: maker,\n                    partialFillAllowed: false\n                })\n            ),\n            uint128(makerAmount)\n        );\n    }\n\n    /// @dev Settle an RfqOrder between maker and Settler retaining funds in this contract.\n    /// @dev pre-condition: msgSender has been authenticated against the requestor\n    /// One Permit2 signature is consumed, with the maker Permit2 containing a witness of the RfqOrder.\n    // In this variant, Maker pays recipient and Settler pays Maker\n    function fillRfqOrderSelfFunded(\n        address recipient,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        address maker,\n        bytes memory makerSig,\n        IERC20 takerToken,\n        uint256 maxTakerAmount\n    ) internal {\n        // Compute witnesses. These are based on the quoted maximum amounts. We will modify them\n        // later to adjust for the actual settled amount, which may be modified by encountered\n        // slippage.\n        (ISignatureTransfer.SignatureTransferDetails memory transferDetails, uint256 makerAmount) =\n            _permitToTransferDetails(maker, permit, recipient);\n\n        bytes32 takerWitness = _hashConsideration(\n            Consideration({\n                token: IERC20(permit.permitted.token),\n                amount: makerAmount,\n                counterparty: maker,\n                partialFillAllowed: true\n            })\n        );\n        bytes32 makerWitness = _hashConsideration(\n            Consideration({\n                token: takerToken, amount: maxTakerAmount, counterparty: _msgSender(), partialFillAllowed: true\n            })\n        );\n\n        // Now we adjust the transfer amounts to compensate for encountered slippage. Rounding is\n        // performed in the maker's favor.\n        uint256 takerAmount = takerToken.fastBalanceOf(address(this));\n        takerAmount = (takerAmount > maxTakerAmount).ternary(maxTakerAmount, takerAmount);\n        unchecked {\n            transferDetails.requestedAmount = makerAmount = (makerAmount * takerAmount).unsafeDiv(maxTakerAmount);\n        }\n\n        // Now that we have all the relevant information, make the transfers and log the order.\n        _checkRecipient(address(this), maker, takerToken);\n        takerToken.safeTransfer(maker, takerAmount);\n        _transferFromIKnowWhatImDoing(\n            permit, transferDetails, maker, makerWitness, CONSIDERATION_WITNESS, makerSig, false\n        );\n\n        _logRfqOrder(makerWitness, takerWitness, uint128(makerAmount));\n    }\n}\n\n// src/core/DodoV1.sol\n\ninterface IDodoV1 {\n    function sellBaseToken(uint256 amount, uint256 minReceiveQuote, bytes calldata data) external returns (uint256);\n\n    function buyBaseToken(uint256 amount, uint256 maxPayQuote, bytes calldata data) external returns (uint256);\n\n    function _R_STATUS_() external view returns (uint8);\n\n    function _QUOTE_BALANCE_() external view returns (uint256);\n\n    function _BASE_BALANCE_() external view returns (uint256);\n\n    function _K_() external view returns (uint256);\n\n    function _MT_FEE_RATE_() external view returns (uint256);\n\n    function _LP_FEE_RATE_() external view returns (uint256);\n\n    function getExpectedTarget() external view returns (uint256 baseTarget, uint256 quoteTarget);\n\n    function getOraclePrice() external view returns (uint256);\n\n    function _BASE_TOKEN_() external view returns (IERC20);\n\n    function _QUOTE_TOKEN_() external view returns (IERC20);\n}\n\nlibrary FastDodoV1 {\n    function _callAddressUintEmptyBytesReturnUint(IDodoV1 dodo, uint256 sig, uint256 a, uint256 b)\n        private\n        returns (uint256 r)\n    {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, sig)\n            mstore(add(0x20, ptr), a)\n            mstore(add(0x40, ptr), b)\n            mstore(add(0x60, ptr), 0x60)\n            mstore(add(0x80, ptr), 0x00)\n\n            if iszero(call(gas(), dodo, 0x00, add(0x1c, ptr), 0x84, 0x00, 0x20)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            if iszero(gt(returndatasize(), 0x1f)) { revert(0x00, 0x00) }\n\n            r := mload(0x00)\n        }\n    }\n\n    function fastSellBaseToken(IDodoV1 dodo, uint256 amount, uint256 minReceiveQuote) internal returns (uint256) {\n        return _callAddressUintEmptyBytesReturnUint(dodo, uint32(dodo.sellBaseToken.selector), amount, minReceiveQuote);\n    }\n\n    function fastBuyBaseToken(IDodoV1 dodo, uint256 amount, uint256 maxPayQuote) internal returns (uint256) {\n        return _callAddressUintEmptyBytesReturnUint(dodo, uint32(dodo.buyBaseToken.selector), amount, maxPayQuote);\n    }\n\n    function _get(IDodoV1 dodo, uint256 sig) private view returns (bytes32 r) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, sig)\n            if iszero(staticcall(gas(), dodo, 0x1c, 0x04, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if iszero(gt(returndatasize(), 0x1f)) { revert(0x00, 0x00) }\n\n            r := mload(0x00)\n        }\n    }\n\n    function fast_R_STATUS_(IDodoV1 dodo) internal view returns (uint8) {\n        uint256 result = uint256(_get(dodo, uint32(dodo._R_STATUS_.selector)));\n        require(result >> 8 == 0);\n        return uint8(result);\n    }\n\n    function fast_QUOTE_BALANCE_(IDodoV1 dodo) internal view returns (uint256) {\n        return uint256(_get(dodo, uint32(dodo._QUOTE_BALANCE_.selector)));\n    }\n\n    function fast_BASE_BALANCE_(IDodoV1 dodo) internal view returns (uint256) {\n        return uint256(_get(dodo, uint32(dodo._BASE_BALANCE_.selector)));\n    }\n\n    function fast_K_(IDodoV1 dodo) internal view returns (uint256) {\n        return uint256(_get(dodo, uint32(dodo._K_.selector)));\n    }\n\n    function fast_MT_FEE_RATE_(IDodoV1 dodo) internal view returns (uint256) {\n        return uint256(_get(dodo, uint32(dodo._MT_FEE_RATE_.selector)));\n    }\n\n    function fast_LP_FEE_RATE_(IDodoV1 dodo) internal view returns (uint256) {\n        return uint256(_get(dodo, uint32(dodo._LP_FEE_RATE_.selector)));\n    }\n\n    function fastGetExpectedTarget(IDodoV1 dodo) internal view returns (uint256 baseTarget, uint256 quoteTarget) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0xffa64225)\n            if iszero(staticcall(gas(), dodo, 0x1c, 0x04, 0x00, 0x40)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if iszero(gt(returndatasize(), 0x3f)) { revert(0x00, 0x00) }\n\n            baseTarget := mload(0x00)\n            quoteTarget := mload(0x20)\n        }\n    }\n\n    function fastGetOraclePrice(IDodoV1 dodo) internal view returns (uint256) {\n        return uint256(_get(dodo, uint32(dodo.getOraclePrice.selector)));\n    }\n\n    function fast_BASE_TOKEN_(IDodoV1 dodo) internal view returns (IERC20) {\n        uint256 result = uint256(_get(dodo, uint32(dodo._BASE_TOKEN_.selector)));\n        require(result >> 160 == 0);\n        return IERC20(address(uint160(result)));\n    }\n\n    function fast_QUOTE_TOKEN_(IDodoV1 dodo) internal view returns (IERC20) {\n        uint256 result = uint256(_get(dodo, uint32(dodo._QUOTE_TOKEN_.selector)));\n        require(result >> 160 == 0);\n        return IERC20(address(uint160(result)));\n    }\n}\n\nlibrary Math_1 {\n    using UnsafeMath for uint256;\n\n    function sqrt(uint256 x) internal pure returns (uint256 y) {\n        unchecked {\n            uint256 z = x / 2 + 1;\n            y = x;\n            while (z < y) {\n                y = z;\n                z = (x.unsafeDiv(z) + z) / 2;\n            }\n        }\n    }\n}\n\nlibrary DecimalMath {\n    using UnsafeMath for uint256;\n    using Math_1 for uint256;\n\n    uint256 constant ONE = 10 ** 18;\n\n    function mul(uint256 target, uint256 d) internal pure returns (uint256) {\n        unchecked {\n            return target * d / ONE;\n        }\n    }\n\n    function mulCeil(uint256 target, uint256 d) internal pure returns (uint256) {\n        unchecked {\n            return (target * d).unsafeDivUp(ONE);\n        }\n    }\n\n    function divFloor(uint256 target, uint256 d) internal pure returns (uint256) {\n        unchecked {\n            return (target * ONE).unsafeDiv(d);\n        }\n    }\n\n    function divCeil(uint256 target, uint256 d) internal pure returns (uint256) {\n        unchecked {\n            return (target * ONE).unsafeDivUp(d);\n        }\n    }\n}\n\nlibrary DodoMath {\n    using UnsafeMath for uint256;\n    using Math_1 for uint256;\n\n    /*\n        Integrate dodo curve fron V1 to V2\n        require V0>=V1>=V2>0\n        res = (1-k)i(V1-V2)+ikV0*V0(1/V2-1/V1)\n        let V1-V2=delta\n        res = i*delta*(1-k+k(V0^2/V1/V2))\n    */\n    function _GeneralIntegrate(uint256 V0, uint256 V1, uint256 V2, uint256 i, uint256 k)\n        internal\n        pure\n        returns (uint256)\n    {\n        unchecked {\n            uint256 fairAmount = DecimalMath.mul(i, V1 - V2); // i*delta\n            uint256 V0V0V1V2 = DecimalMath.divCeil((V0 * V0).unsafeDiv(V1), V2);\n            uint256 penalty = DecimalMath.mul(k, V0V0V1V2); // k(V0^2/V1/V2)\n            return DecimalMath.mul(fairAmount, DecimalMath.ONE - k + penalty);\n        }\n    }\n\n    /*\n        The same with integration expression above, we have:\n        i*deltaB = (Q2-Q1)*(1-k+kQ0^2/Q1/Q2)\n        Given Q1 and deltaB, solve Q2\n        This is a quadratic function and the standard version is\n        aQ2^2 + bQ2 + c = 0, where\n        a=1-k\n        -b=(1-k)Q1-kQ0^2/Q1+i*deltaB\n        c=-kQ0^2\n        and Q2=(-b+sqrt(b^2+4(1-k)kQ0^2))/2(1-k)\n        note: another root is negative, abondan\n        if deltaBSig=true, then Q2>Q1\n        if deltaBSig=false, then Q2<Q1\n    */\n    function _SolveQuadraticFunctionForTrade(uint256 Q0, uint256 Q1, uint256 ideltaB, bool deltaBSig, uint256 k)\n        internal\n        pure\n        returns (uint256)\n    {\n        unchecked {\n            // calculate -b value and sig\n            // -b = (1-k)Q1-kQ0^2/Q1+i*deltaB\n            uint256 kQ02Q1 = (DecimalMath.mul(k, Q0) * Q0).unsafeDiv(Q1); // kQ0^2/Q1\n            uint256 b = DecimalMath.mul(DecimalMath.ONE - k, Q1); // (1-k)Q1\n            bool minusbSig = true;\n            if (deltaBSig) {\n                b += ideltaB; // (1-k)Q1+i*deltaB\n            } else {\n                kQ02Q1 += ideltaB; // i*deltaB+kQ0^2/Q1\n            }\n            if (b >= kQ02Q1) {\n                b -= kQ02Q1;\n                minusbSig = true;\n            } else {\n                b = kQ02Q1 - b;\n                minusbSig = false;\n            }\n\n            // calculate sqrt\n            uint256 squareRoot = DecimalMath.mul((DecimalMath.ONE - k) * 4, DecimalMath.mul(k, Q0) * Q0); // 4(1-k)kQ0^2\n            squareRoot = (b * b + squareRoot).sqrt(); // sqrt(b*b+4(1-k)kQ0*Q0)\n\n            // final res\n            uint256 denominator = (DecimalMath.ONE - k) * 2; // 2(1-k)\n            uint256 numerator;\n            if (minusbSig) {\n                numerator = b + squareRoot;\n            } else {\n                numerator = squareRoot - b;\n            }\n\n            if (deltaBSig) {\n                return DecimalMath.divFloor(numerator, denominator);\n            } else {\n                return DecimalMath.divCeil(numerator, denominator);\n            }\n        }\n    }\n\n    /*\n        Start from the integration function\n        i*deltaB = (Q2-Q1)*(1-k+kQ0^2/Q1/Q2)\n        Assume Q2=Q0, Given Q1 and deltaB, solve Q0\n        let fairAmount = i*deltaB\n    */\n    function _SolveQuadraticFunctionForTarget(uint256 V1, uint256 k, uint256 fairAmount)\n        internal\n        pure\n        returns (uint256 V0)\n    {\n        unchecked {\n            // V0 = V1+V1*(sqrt-1)/2k\n            uint256 sqrt = DecimalMath.divCeil(DecimalMath.mul(k, fairAmount) * 4, V1);\n            sqrt = ((sqrt + DecimalMath.ONE) * DecimalMath.ONE).sqrt();\n            uint256 premium = DecimalMath.divCeil(sqrt - DecimalMath.ONE, k * 2);\n            // V0 is greater than or equal to V1 according to the solution\n            return DecimalMath.mul(V1, DecimalMath.ONE + premium);\n        }\n    }\n}\n\nabstract contract DodoSellHelper {\n    using Math_1 for uint256;\n    using FastDodoV1 for IDodoV1;\n    using Ternary for bool;\n\n    enum RStatus {\n        ONE,\n        ABOVE_ONE,\n        BELOW_ONE\n    }\n\n    function dodoQuerySellQuoteToken(IDodoV1 dodo, uint256 amount) internal view returns (uint256) {\n        (uint256 baseTarget, uint256 quoteTarget) = dodo.fastGetExpectedTarget();\n        RStatus rStatus = RStatus(dodo.fast_R_STATUS_());\n        uint256 oraclePrice = dodo.fastGetOraclePrice();\n        uint256 B = dodo.fast_BASE_BALANCE_();\n        uint256 K = dodo.fast_K_();\n\n        unchecked {\n            uint256 boughtAmount;\n            uint256 i = DecimalMath.divFloor(DecimalMath.ONE, oraclePrice);\n            // Determine the status (RStatus) and calculate the amount based on the\n            // state\n            if (rStatus == RStatus.BELOW_ONE) {\n                uint256 Q = dodo.fast_QUOTE_BALANCE_();\n                uint256 backOneBase = B - baseTarget;\n                uint256 backOneQuote = quoteTarget - Q;\n                if (amount <= backOneQuote) {\n                    uint256 Q1 = Q + amount;\n                    boughtAmount = DodoMath._GeneralIntegrate(quoteTarget, Q1, Q, i, K);\n                } else {\n                    boughtAmount = backOneBase + _SellQuoteToken(amount - backOneQuote, i, baseTarget, baseTarget, K);\n                }\n            } else {\n                uint256 Q1 = (rStatus == RStatus.ONE).ternary(baseTarget, B);\n                boughtAmount = _SellQuoteToken(amount, i, baseTarget, Q1, K);\n            }\n            // Calculate fees\n            return\n                DecimalMath.divFloor(\n                    boughtAmount, DecimalMath.ONE + dodo.fast_MT_FEE_RATE_() + dodo.fast_LP_FEE_RATE_()\n                );\n        }\n    }\n\n    function _SellQuoteToken(uint256 amount, uint256 i, uint256 Q0, uint256 Q1, uint256 K)\n        private\n        pure\n        returns (uint256 receiveBaseToken)\n    {\n        unchecked {\n            return Q1 - DodoMath._SolveQuadraticFunctionForTrade(Q0, Q1, DecimalMath.mul(i, amount), false, K);\n        }\n    }\n}\n\nabstract contract DodoV1 is SettlerSwapAbstract, DodoSellHelper {\n    using UnsafeMath for uint256;\n    using SafeTransferLib for IERC20;\n    using FastDodoV1 for IDodoV1;\n\n    function sellToDodoV1(IERC20 sellToken, uint256 ppm, IDodoV1 dodo, bool quoteForBase, uint256 minBuyAmount)\n        internal\n    {\n        uint256 sellAmount;\n        unchecked {\n            sellAmount = (sellToken.fastSpendableBalance() * ppm).unsafeDiv(BASIS);\n        }\n        sellToken.safeApproveIfBelow(address(dodo), sellAmount);\n        if (quoteForBase) {\n            uint256 buyAmount = dodoQuerySellQuoteToken(dodo, sellAmount);\n            if (buyAmount < minBuyAmount) {\n                revertTooMuchSlippage(dodo.fast_BASE_TOKEN_(), minBuyAmount, buyAmount);\n            }\n            dodo.fastBuyBaseToken(buyAmount, sellAmount);\n        } else {\n            dodo.fastSellBaseToken(sellAmount, minBuyAmount);\n        }\n    }\n}\n\n// src/core/MakerPSM.sol\n\ninterface IPSM {\n    /// @dev Fee for selling gem (USDC/USDT) into the PSM\n    /// @return tin toll in [wad]\n    function tin() external view returns (uint256);\n\n    /// @dev Fee for buying gem (USDC/USDT) from the PSM\n    /// @return tout toll out [wad]\n    function tout() external view returns (uint256);\n\n    /// @dev Get the address of the underlying vault powering PSM\n    /// @return address of gemJoin contract\n    function gemJoin() external view returns (address);\n\n    function pocket() external view returns (address);\n\n    function usdsJoin() external view returns (address);\n\n    function usddJoin() external view returns (address);\n\n    /// @dev Sell gem (USDC/USDT) for dai (DAI/USDS/USDD)\n    /// @param usr The address of the account trading gem for dai.\n    /// @param gemAmt The amount of gem to sell in gem base units\n    /// @return daiOutWad The amount of dai bought.\n    function sellGem(address usr, uint256 gemAmt) external returns (uint256 daiOutWad);\n\n    /// @dev Buy gem (USDC/USDT) with dai (DAI/USDS/USDD)\n    /// @param usr The address of the account trading dai for gem\n    /// @param gemAmt The amount of gem to buy in gem base units\n    /// @return daiInWad The amount of dai required to sell.\n    function buyGem(address usr, uint256 gemAmt) external returns (uint256 daiInWad);\n}\n\nlibrary FastPSM {\n    function fastSellGem(IPSM psm, address usr, uint256 gemAmt) internal {\n        assembly (\"memory-safe\") {\n            mstore(0x34, gemAmt)\n            mstore(0x14, usr)\n            mstore(0x00, 0x95991276000000000000000000000000) // selector for `sellGem(address,uint256)` with `usr`'s padding\n\n            if iszero(call(gas(), psm, 0x00, 0x10, 0x44, 0x00, 0x20)) {\n                let ptr := and(0xffffffffffffffffffffffff, mload(0x40))\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            mstore(0x34, 0x00)\n        }\n    }\n\n    function fastBuyGem(IPSM psm, address usr, uint256 gemAmt) internal {\n        assembly (\"memory-safe\") {\n            mstore(0x34, gemAmt)\n            mstore(0x14, usr)\n            mstore(0x00, 0x8d7ef9bb000000000000000000000000) // selector for `buyGem(address,uint256)` with `usr`'s padding\n\n            if iszero(call(gas(), psm, 0x00, 0x10, 0x44, 0x00, 0x20)) {\n                let ptr := and(0xffffffffffffffffffffffff, mload(0x40))\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            mstore(0x34, 0x00)\n        }\n    }\n\n    // Unlike fastSellGem/fastBuyGem, `tin()`/`tout()` are present on both LitePSM and classic DssPsm,\n    // so we require return data here.\n    function fastTin(IPSM psm) internal view returns (uint256 tin) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x568d4b6f) // selector for `tin()`\n\n            if iszero(staticcall(gas(), psm, 0x1c, 0x04, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if iszero(gt(returndatasize(), 0x1f)) { revert(0x00, 0x00) }\n            tin := mload(0x00)\n        }\n    }\n\n    function fastTout(IPSM psm) internal view returns (uint256 tout) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0xfae036d5) // selector for `tout()`\n\n            if iszero(staticcall(gas(), psm, 0x1c, 0x04, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if iszero(gt(returndatasize(), 0x1f)) { revert(0x00, 0x00) }\n            tout := mload(0x00)\n        }\n    }\n}\n\n// Maker units https://github.com/makerdao/dss/blob/master/DEVELOPING.md\n// wad: fixed point decimal with 18 decimals (for basic quantities, e.g. balances)\nuint256 constant WAD = 10 ** 18;\n\nIERC20 constant DAI = IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F);\nIERC20 constant USDS = IERC20(0xdC035D45d973E3EC169d2276DDab16f1e407384F);\nIERC20 constant USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);\nIERC20 constant USDT = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7);\nIERC20 constant USDD = IERC20(0x4f8e5DE400DE08B164E7421B3EE387f461beCD1A);\nIPSM constant LitePSM = IPSM(0xf6e72Db5454dd049d0788e411b06CfAF16853042);\nIPSM constant SkyPSM = IPSM(0xA188EEC8F81263234dA3622A406892F3D630f98c);\nIPSM constant UsddPSM = IPSM(0xcE355440c00014A229bbEc030A2B8f8EB45a2897);\naddress constant UsddGemJoin = 0x217e42CEB2eAE9ECB788fDF0e31c806c531760A3;\n\nabstract contract MakerPSM is SettlerSwapAbstract {\n    using UnsafeMath for uint256;\n    using SafeTransferLib for IERC20;\n    using FastPSM for IPSM;\n    using Ternary for bool;\n\n    // USDC and USDT both have 6 decimals, so GEM_basis (1e6) is safe to use for all supported gems.\n    uint256 private constant GEM_basis = 1_000_000;\n\n    constructor() {\n        assert(block.chainid == 1 || block.chainid == 31337);\n        assert(GEM_basis == 10 ** USDC.decimals());\n        assert(GEM_basis == 10 ** USDT.decimals());\n        // LitePSM is its own join\n        DAI.safeApprove(address(LitePSM), type(uint256).max);\n        USDC.safeApprove(address(LitePSM), type(uint256).max);\n        // SkyPSM is its own join\n        USDS.safeApprove(address(SkyPSM), type(uint256).max);\n        USDC.safeApprove(address(SkyPSM), type(uint256).max);\n        // USDD PSM (classic DssPsm — separate GemJoin)\n        USDD.safeApprove(address(UsddPSM), type(uint256).max);\n        USDT.safeApprove(UsddGemJoin, type(uint256).max);\n    }\n\n    function sellToMakerPsm(address recipient, uint256 ppm, bool buyGem, uint256 amountOutMin, IPSM psm, IERC20 dai)\n        internal\n        returns (uint256 buyAmount)\n    {\n        // Configured approval pairs: LitePSM/DAI/USDC, SkyPSM/USDS/USDC, UsddPSM/USDD/USDT.\n        IERC20 gem = IERC20((psm == UsddPSM).ternary(address(USDT), address(USDC)));\n        (IERC20 sellToken, IERC20 buyToken) = buyGem.maybeSwap(gem, dai);\n        if (_hasRecipientCheck()) {\n            address sender;\n            if (buyGem) {\n                sender = psm == UsddPSM ? UsddGemJoin : psm.pocket();\n            } else if (psm == SkyPSM) {\n                sender = psm.usdsJoin();\n            } else if (psm == UsddPSM) {\n                sender = psm.usddJoin();\n            } else {\n                sender = address(psm);\n            }\n            _checkRecipient(sender, recipient, buyToken);\n        }\n        uint256 sellAmount;\n        unchecked {\n            // phantom overflow can't happen here because:\n            // 1. sellToken has decimals = 18 (sellToken is DAI, USDS, or USDD)\n            // 2. PSM prohibits gemToken with decimals > 18 (sellToken is USDC or USDT)\n            sellAmount = (sellToken.fastSpendableBalance() * ppm).unsafeDiv(BASIS);\n        }\n        if (buyGem) {\n            unchecked {\n                uint256 feeDivisor = psm.fastTout() + WAD; // eg. 1.001 * 10 ** 18 with 0.1% fee [tout is in wad];\n                // overflow can't happen at all because DAI, USDS, and USDD are reasonable and PSM prohibits gemToken with decimals > 18\n                buyAmount = (sellAmount * GEM_basis).unsafeDiv(feeDivisor);\n                if (buyAmount < amountOutMin) {\n                    revertTooMuchSlippage(buyToken, amountOutMin, buyAmount);\n                }\n\n                psm.fastBuyGem(recipient, buyAmount);\n            }\n        } else {\n            psm.fastSellGem(recipient, sellAmount);\n            unchecked {\n                buyAmount = sellAmount * WAD / GEM_basis;\n                buyAmount -= (buyAmount * psm.fastTin()).unsafeDiv(WAD);\n            }\n            if (buyAmount < amountOutMin) {\n                revertTooMuchSlippage(buyToken, amountOutMin, buyAmount);\n            }\n        }\n    }\n}\n\n// src/core/Velodrome.sol\n\n//import {Panic} from \"../utils/Panic.sol\";\n\ninterface IVelodromePair {\n    function metadata()\n        external\n        view\n        returns (\n            uint256 basis0,\n            uint256 basis1,\n            uint256 reserve0,\n            uint256 reserve1,\n            bool stable,\n            IERC20 token0,\n            IERC20 token1\n        );\n    function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;\n}\n\nabstract contract Velodrome is SettlerSwapAbstract {\n    using Math_0 for uint256;\n    using UnsafeMath for uint256;\n    using FastLogic for bool;\n    using SafeTransferLib for IERC20;\n\n    // This is the basis used for token balances. The original token may have fewer decimals, in\n    // which case we scale up by the appropriate factor to give this basis.\n    uint256 internal constant _VELODROME_TOKEN_BASIS = 1 ether;\n\n    // When computing `k`, to minimize rounding error, we use a significantly larger basis. This\n    // also allows us to save work in the Newton-Raphson step because dividing a quantity with this\n    // basis by a quantity with `_VELODROME_TOKEN_BASIS` basis gives that same\n    // `_VELODROME_TOKEN_BASIS` basis. Convenient *and* accurate.\n    uint256 private constant _VELODROME_INTERNAL_BASIS = _VELODROME_TOKEN_BASIS * _VELODROME_TOKEN_BASIS;\n\n    uint256 private constant _VELODROME_INTERNAL_TO_TOKEN_RATIO = _VELODROME_INTERNAL_BASIS / _VELODROME_TOKEN_BASIS;\n\n    // When computing `d` we need to compute the cube of a token quantity and format the result with\n    // `_VELODROME_TOKEN_BASIS`. In order to avoid overflow, we must divide the squared token\n    // quantity by this before multiplying again by the token quantity. Setting this value as small\n    // as possible preserves precision. This gives a result in an awkward basis, but we'll correct\n    // that with `_VELODROME_CUBE_STEP_BASIS` after the cubing\n    uint256 private constant _VELODROME_SQUARE_STEP_BASIS = 216840435;\n\n    // After squaring a token quantity (in `_VELODROME_TOKEN_BASIS`), we need to multiply again by a\n    // token quantity and then divide out the awkward basis to get back to\n    // `_VELODROME_TOKEN_BASIS`. This constant is what gets us back to the original token quantity\n    // basis. `_VELODROME_TOKEN_BASIS * _VELODROME_TOKEN_BASIS / _VELODROME_SQUARE_STEP_BASIS *\n    // _VELODROME_TOKEN_BASIS / _VELODROME_CUBE_STEP_BASIS == _VELODROME_TOKEN_BASIS`\n    uint256 private constant _VELODROME_CUBE_STEP_BASIS = 4611686007731906643703237360;\n\n    // The maximum balance in the AMM's reference implementation of `k` is `b` such that `(b * b) /\n    // 1 ether * ((b * b) / 1 ether + (b * b) / 1 ether)` does not overflow. This that quantity,\n    // `b`. This is roughly 15.5 billion ether.\n    uint256 internal constant _VELODROME_MAX_BALANCE = 15511800964685064948225197537;\n\n    // This is the `k = x^3 * y + y^3 * x` constant function. Unlike the original formulation, the\n    // result has a basis of `_VELODROME_INTERNAL_BASIS` instead of `_VELODROME_TOKEN_BASIS`\n    function _k(uint256 x, uint256 y) private pure returns (uint256) {\n        unchecked {\n            return _k(x, y, x * x);\n        }\n    }\n\n    function _k(uint256 x, uint256 y, uint256 x_squared) private pure returns (uint256) {\n        unchecked {\n            return _k(x, y, x_squared, y * y);\n        }\n    }\n\n    function _k(uint256 x, uint256 y, uint256 x_squared, uint256 y_squared) private pure returns (uint256) {\n        unchecked {\n            return tmp().omul(x * y, x_squared + y_squared).unsafeDiv(_VELODROME_INTERNAL_BASIS);\n        }\n    }\n\n    function _k_compat(uint256 x, uint256 y) internal pure returns (uint256) {\n        unchecked {\n            return tmp().omul(x * y, x * x + y * y).unsafeDiv(_VELODROME_INTERNAL_BASIS * _VELODROME_TOKEN_BASIS);\n        }\n    }\n\n    function _k_compat(uint256 x, uint256 y, uint256 x_squared) private pure returns (uint256) {\n        unchecked {\n            return tmp().omul(x * y, x_squared + y * y).unsafeDiv(_VELODROME_INTERNAL_BASIS * _VELODROME_TOKEN_BASIS);\n        }\n    }\n\n    // For numerically approximating a solution to the `k = x^3 * y + y^3 * x` constant function\n    // using Newton-Raphson, this is `∂k/∂y = 3 * x * y^2 + x^3`. The result has a basis of\n    // `_VELODROME_TOKEN_BASIS`.\n    function _d(uint256 y, uint256 x) private pure returns (uint256) {\n        unchecked {\n            return _d(y, 3 * x, x * x / _VELODROME_SQUARE_STEP_BASIS * x);\n        }\n    }\n\n    function _d(uint256 y, uint256 three_x, uint256 x_cubed) private pure returns (uint256) {\n        unchecked {\n            return _d(y, three_x, x_cubed, y * y / _VELODROME_SQUARE_STEP_BASIS);\n        }\n    }\n\n    function _d(uint256, uint256 three_x, uint256 x_cubed, uint256 y_squared) private pure returns (uint256) {\n        unchecked {\n            return (y_squared * three_x + x_cubed) / _VELODROME_CUBE_STEP_BASIS;\n        }\n    }\n\n    // Using Newton-Raphson iterations, compute the smallest `new_y` such that `_k(x + dx, new_y) >=\n    // _k(x, y)`. As a function of `new_y`, we find the root of `_k(x + dx, new_y) - _k(x, y)`.\n    function _get_y(uint256 x, uint256 dx, uint256 y) internal pure returns (uint256) {\n        unchecked {\n            uint256 k_orig = _k(x, y);\n            // `k_orig` has a basis much greater than is actually required for correctness. To\n            // achieve wei-level accuracy, we perform our final comparisons agains `k_target`\n            // instead, which has the same precision as the AMM itself.\n            uint256 k_target = _k_compat(x, y);\n\n            // Now that we have `k` computed, we offset `x` to account for the sell amount and use\n            // the constant-product formula to compute an initial estimate for `y`.\n            x += dx;\n            y -= (dx * y).unsafeDiv(x);\n\n            // These intermediate values do not change throughout the Newton-Raphson iterations, so\n            // precomputing and caching them saves us gas.\n            uint256 three_x = 3 * x;\n            uint256 x_squared_raw = x * x;\n            uint256 x_cubed_raw = x_squared_raw / _VELODROME_SQUARE_STEP_BASIS * x;\n\n            for (uint256 i; i < 255; i++) {\n                uint256 y_squared_raw = y * y;\n                uint256 k = _k(x, y, x_squared_raw, y_squared_raw);\n                uint256 d = _d(y, three_x, x_cubed_raw, y_squared_raw / _VELODROME_SQUARE_STEP_BASIS);\n\n                // This would exactly solve *OUR* formulation of the `k=x^3*y+y^3*x` constant\n                // function. However, not only is it computationally and contract-size expensive, it\n                // also does not necessarily exactly satisfy the *REFERENCE* implementations of the\n                // same constant function (SolidlyV1, VelodromeV2). Therefore, it is commented out\n                // and the relevant condition is handled by the \"ordinary\" parts of the\n                // Newton-Raphson loop.\n                /* if (k / _VELODROME_INTERNAL_TO_TOKEN_RATIO == k_target) {\n                    uint256 hi = y;\n                    uint256 lo = y - 1;\n                    uint256 k_next = _k_compat(x, lo, x_squared_raw);\n                    while (k_next == k_target) {\n                        (hi, lo) = (lo, lo - (hi - lo) * 2);\n                        k_next = _k_compat(x, lo, x_squared_raw);\n                    }\n                    while (hi != lo) {\n                        uint256 mid = (hi - lo) / 2 + lo;\n                        k_next = _k_compat(x, mid, x_squared_raw);\n                        if (k_next == k_target) {\n                            hi = mid;\n                        } else {\n                            lo = mid + 1;\n                        }\n                    }\n                    return lo;\n                } else */ if (k < k_orig) {\n                    uint256 dy = (k_orig - k).unsafeDiv(d);\n                    // There are two cases where `dy == 0`\n                    // Case 1: The `y` is converged and we find the correct answer\n                    // Case 2: `_d(y, x)` is too large compare to `(k_orig - k)` and the rounding\n                    //         error screwed us.\n                    //         In this case, we need to increase `y` by 1\n                    if (dy == 0) {\n                        if (_k_compat(x, y + 1, x_squared_raw) >= k_target) {\n                            // If `_k(x, y + 1) >= k_orig`, then we are close to the correct answer.\n                            // There's no closer answer than `y + 1`\n                            return y + 1;\n                        }\n                        // `y + 1` does not give us the condition `k >= k_orig`, so we have to do at\n                        // least 1 more iteration to find a satisfactory `y` value. Setting `dy = y\n                        // / 2` also solves the problem where the constant-product estimate of `y`\n                        // is very bad and convergence is only linear.\n                        dy = y / 2;\n                    }\n                    y += dy;\n                    if (y > _VELODROME_MAX_BALANCE) {\n                        y = _VELODROME_MAX_BALANCE;\n                    }\n                } else {\n                    uint256 dy = (k - k_orig).unsafeDiv(d);\n                    if (dy == 0) {\n                        if (_k_compat(x, y - 1, x_squared_raw) < k_target) {\n                            // If `_k(x, y - 1) < k_orig`, then we are close to the correct answer.\n                            // There's no closer answer than `y`. We need to find `y` where `_k(x,\n                            // y) >= k_orig`. As a result, we can't return `y - 1` even it's closer\n                            // to the correct answer\n                            return y;\n                        }\n                        if (_k(x, y - 2, x_squared_raw) < k_orig) {\n                            // It may be the case that all 3 of `y`, `y - 1`, and `y - 2` give the\n                            // same value for `_k_compat`, but that `y - 2` gives a value for `_k`\n                            // that brackets `k_orig`. In this case, we would loop forever. This\n                            // branch causes us to bail out with the approximately correct value.\n                            return y - 1;\n                        }\n                        // It's possible that `y - 1` is the correct answer. To know that, we must\n                        // check that `y - 2` gives `k < k_orig`. We must do at least 1 more\n                        // iteration to determine this.\n                        dy = 2;\n                    }\n                    if (dy > y / 2) {\n                        dy = y / 2;\n                    }\n                    y -= dy;\n                }\n            }\n            assembly (\"memory-safe\") {\n                mstore(0x00, 0x481b61af) // selector for `NotConverged()`\n                revert(0x1c, 0x04)\n            }\n        }\n    }\n\n    function sellToVelodrome(address recipient, uint256 ppm, IVelodromePair pair, uint24 swapInfo, uint256 minAmountOut)\n        internal\n    {\n        // Preventing calls to Permit2 or AH is not explicitly required as neither of these contracts implement the `swap` nor `transfer` selector\n\n        // |7|6|5|4|3|2|1|0| - bit positions in swapInfo (uint8)\n        // |0|0|0|0|0|0|F|Z| - Z: zeroForOne flag, F: sellTokenHasFee flag\n        bool zeroForOne = (swapInfo & 1) == 1; // Extract the least significant bit (bit 0)\n        bool sellTokenHasFee = (swapInfo & 2) >> 1 == 1; // Extract the second least significant bit (bit 1) and shift it right\n        uint256 feeBps = swapInfo >> 8;\n\n        (\n            uint256 sellBasis,\n            uint256 buyBasis,\n            uint256 sellReserve,\n            uint256 buyReserve,\n            bool stable,\n            IERC20 sellToken,\n            IERC20 buyToken\n        ) = pair.metadata();\n        assert(stable);\n        if (!zeroForOne) {\n            (sellBasis, buyBasis, sellReserve, buyReserve, sellToken, buyToken) =\n            (buyBasis, sellBasis, buyReserve, sellReserve, buyToken, sellToken);\n        }\n\n        uint256 buyAmount;\n        unchecked {\n            // Compute sell amount in native units\n            uint256 sellAmount;\n            if (ppm != 0) {\n                // It must be possible to square the sell token balance of the pool, otherwise it\n                // will revert with an overflow. Therefore, it can't be so large that multiplying by\n                // a \"reasonable\" `ppm` value could overflow. We don't care to protect against\n                // unreasonable `ppm` values because that just means the taker is griefing themself.\n                sellAmount = (sellToken.fastSpendableBalance() * ppm).unsafeDiv(BASIS);\n            }\n            if (sellAmount != 0) {\n                _checkRecipient(address(this), address(pair), sellToken);\n                sellToken.safeTransfer(address(pair), sellAmount);\n            }\n            if ((sellAmount == 0).or(sellTokenHasFee)) {\n                sellAmount = sellToken.fastBalanceOf(address(pair)) - sellReserve;\n            }\n\n            // Convert reserves from native units to `_VELODROME_TOKEN_BASIS`\n            sellReserve = (sellReserve * _VELODROME_TOKEN_BASIS).unsafeDiv(sellBasis);\n            buyReserve = (buyReserve * _VELODROME_TOKEN_BASIS).unsafeDiv(buyBasis);\n\n            // This check is commented because values that are too large will\n            // result in reverts inside the pool anyways. We don't need to\n            // bother.\n            /*\n            // Check for overflow\n            if (buyReserve > _VELODROME_MAX_BALANCE) {\n                Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n            }\n            if (sellReserve + (sellAmount * _VELODROME_TOKEN_BASIS).unsafeDiv(sellBasis) > _VELODROME_MAX_BALANCE) {\n                Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n            }\n            */\n\n            // Apply the fee in native units\n            sellAmount -= sellAmount * feeBps / 10_000; // can't overflow\n            // Convert sell amount from native units to `_VELODROME_TOKEN_BASIS`\n            sellAmount = (sellAmount * _VELODROME_TOKEN_BASIS).unsafeDiv(sellBasis);\n\n            // Solve the constant function numerically to get `buyAmount` from `sellAmount`\n            buyAmount = buyReserve - _get_y(sellReserve, sellAmount, buyReserve);\n\n            // Convert `buyAmount` from `_VELODROME_TOKEN_BASIS` to native units\n            buyAmount = buyAmount * buyBasis / _VELODROME_TOKEN_BASIS;\n        }\n\n        // Compensate for rounding error in the reference implementation of the constant-function\n        buyAmount--;\n        buyAmount.dec((sellReserve < sellBasis).or(buyReserve < buyBasis));\n\n        // Check slippage\n        if (buyAmount < minAmountOut) {\n            revertTooMuchSlippage(buyToken, minAmountOut, buyAmount);\n        }\n\n        // Perform the swap\n        {\n            _checkRecipient(address(pair), recipient, buyToken);\n            (uint256 buyAmount0, uint256 buyAmount1) = zeroForOne ? (uint256(0), buyAmount) : (buyAmount, uint256(0));\n            pair.swap(buyAmount0, buyAmount1, recipient, new bytes(0));\n        }\n    }\n}\n\n// src/core/Basic.sol\n\nabstract contract Basic is SettlerAbstract {\n    using UnsafeMath for uint256;\n    using SafeTransferLib for IERC20;\n    using Revert for bool;\n\n    /// @dev Sell to a pool with a generic approval, transferFrom interaction.\n    /// offset in the calldata is used to update the sellAmount given a proportion of the sellToken balance\n    function basicSellToPool(IERC20 sellToken, uint256 ppm, address pool, uint256 offset, bytes memory data) internal {\n        if (_isRestrictedTarget(pool)) {\n            revertConfusedDeputy();\n        }\n\n        bool success;\n        bytes memory returnData;\n        uint256 value;\n        if (address(sellToken) == ETH_ADDRESS) {\n            unchecked {\n                value = (address(this).balance * ppm).unsafeDiv(BASIS);\n            }\n            if (data.length == 0) {\n                if (offset != 0) revert InvalidOffset();\n                (success, returnData) = payable(pool).call{value: value}(\"\");\n                success.maybeRevert(returnData);\n                return;\n            } else {\n                if ((offset += 32) > data.length) {\n                    Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n                }\n                assembly (\"memory-safe\") {\n                    mstore(add(data, offset), value)\n                }\n            }\n        } else if (address(sellToken) == address(0)) {\n            // TODO: check for zero `ppm`\n            if (offset != 0) revert InvalidOffset();\n        } else {\n            // We treat `ppm > Constants.BASIS` as a GIGO error\n            uint256 amount = tmp().omul(sellToken.fastSpendableBalance(), ppm).unsafeDiv(BASIS);\n\n            if ((offset += 32) > data.length) {\n                Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n            }\n            assembly (\"memory-safe\") {\n                mstore(add(data, offset), amount)\n            }\n            if (address(sellToken) != pool) {\n                sellToken.safeApproveIfBelow(pool, amount);\n            }\n        }\n        (success, returnData) = payable(pool).call{value: value}(data);\n        success.maybeRevert(returnData);\n        // forbid sending data to EOAs\n        if (returnData.length == 0 && pool.code.length == 0) revert InvalidTarget();\n    }\n}\n\n// src/core/Bebop.sol\n\ninterface IBebopSettlement {\n    event BebopOrder(uint128 indexed eventId);\n\n    /// @notice Struct for one-to-one trade with one maker\n    struct Single {\n        uint256 expiry;\n        address taker_address;\n        address maker_address;\n        uint256 maker_nonce;\n        IERC20 taker_token;\n        IERC20 maker_token;\n        uint256 taker_amount;\n        uint256 maker_amount;\n        address payable receiver;\n        uint256 packed_commands;\n        uint256 flags; // `hashSingleOrder` doesn't use this field for SingleOrder hash\n    }\n\n    /// @notice Taker execution of one-to-one trade with one maker\n    /// @param order Single order struct\n    /// @param makerSignature Maker's signature for SingleOrder\n    /// @param filledTakerAmount Partially filled taker amount, 0 for full fill\n    function swapSingle(\n        Single calldata order,\n        ISettlerActions.BebopMakerSignature calldata makerSignature,\n        uint256 filledTakerAmount\n    ) external payable;\n}\n\nlibrary FastBebop {\n    function fastSwapSingle(\n        IBebopSettlement bebop,\n        address payable recipient,\n        address taker,\n        IERC20 sellToken,\n        ISettlerActions.BebopOrder memory order,\n        ISettlerActions.BebopMakerSignature memory makerSignature,\n        uint256 filledTakerAmount\n    ) internal {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x4dcebcba)                                                             // IBebopSettlement.swapSingle.selector\n            mstore(add(0x20, ptr), mload(order))                                                // expiry\n            mstore(add(0x40, ptr), address())                                                   // taker_address\n            mcopy(add(0x60, ptr), add(0x20, order), 0x40)                                       // maker_address; maker_nonce\n            mstore(add(0xa0, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, sellToken))  // taker_token\n            mcopy(add(0xc0, ptr), add(0x60, order), 0x60)                                       // maker_token, taker_amount, maker_amount\n            mstore(add(0x120, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, recipient)) // receiver\n\n            let event_id_and_flags := mload(add(0xc0, order))\n            mstore(add(0x140, ptr), or(shl(0x60, taker), shr(0xf8, event_id_and_flags)))        // packed_commands\n            mstore(add(0x160, ptr), shl(0x80, event_id_and_flags))                              // flags\n\n            mstore(add(0x180, ptr), 0x1a0)                                                      // makerSignature.offset\n            mstore(add(0x1a0, ptr), filledTakerAmount)\n            mstore(add(0x1c0, ptr), 0x40)                                                       // makerSignature.signatureBytes.offset\n            mstore(add(0x1e0, ptr), mload(add(0x20, makerSignature)))                           // makerSignature.flags\n\n            let makerSignatureBytes := mload(makerSignature)\n            let makerSignatureBytesLength := mload(makerSignatureBytes)\n            mcopy(add(0x200, ptr), makerSignatureBytes, add(0x20, makerSignatureBytesLength))\n\n            if iszero(call(gas(), bebop, 0x00, add(0x1c, ptr), add(0x204, makerSignatureBytesLength), 0x00, 0x00)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n        }\n    }\n}\n\nabstract contract Bebop is SettlerSwapAbstract {\n    using FastLogic for bool;\n    using SafeTransferLib for IERC20;\n    using Ternary for bool;\n    using UnsafeMath for uint256;\n    using FastBebop for IBebopSettlement;\n\n    IBebopSettlement internal constant _BEBOP = IBebopSettlement(0xbbbbbBB520d69a9775E85b458C58c648259FAD5F);\n\n    constructor() {\n        assert(address(_BEBOP).code.length > 0 || block.chainid == 31337);\n    }\n\n    function _isRestrictedTarget(address target) internal view virtual override returns (bool) {\n        return (target == address(_BEBOP)).or(super._isRestrictedTarget(target));\n    }\n\n    function _logBebopOrder(uint128 eventId, uint128 makerFilledAmount) private {\n        assembly (\"memory-safe\") {\n            mstore(0x10, makerFilledAmount)\n            mstore(0x00, and(0xffffffffffffffffffffffffffffffff, eventId))\n            log0(0x00, 0x30)\n        }\n    }\n\n    function sellToBebop(\n        address payable recipient,\n        IERC20 sellToken,\n        ISettlerActions.BebopOrder memory order,\n        ISettlerActions.BebopMakerSignature memory makerSignature,\n        uint256 amountOutMin\n    ) internal returns (uint256 makerFilledAmount) {\n        _checkRecipient(order.maker_address, recipient, IERC20(order.maker_token));\n        uint256 takerFilledAmount = sellToken.fastBalanceOf(address(this));\n        {\n            uint256 maxTakerAmount = order.taker_amount;\n            takerFilledAmount = (takerFilledAmount > maxTakerAmount).ternary(maxTakerAmount, takerFilledAmount);\n            unchecked {\n                makerFilledAmount = (order.maker_amount * takerFilledAmount).unsafeDiv(maxTakerAmount);\n            }\n        }\n        if (makerFilledAmount < amountOutMin) {\n            revertTooMuchSlippage(IERC20(order.maker_token), amountOutMin, makerFilledAmount);\n        }\n\n        sellToken.safeApproveIfBelow(address(_BEBOP), takerFilledAmount);\n        _BEBOP.fastSwapSingle(recipient, _msgSender(), sellToken, order, makerSignature, takerFilledAmount);\n\n        _logBebopOrder(uint128(order.event_id_and_flags), uint128(makerFilledAmount));\n    }\n}\n\n// src/core/DodoV2.sol\n\ninterface IDodoV2 {\n    function sellBase(address to) external returns (uint256 receiveQuoteAmount);\n    function sellQuote(address to) external returns (uint256 receiveBaseAmount);\n\n    function _BASE_TOKEN_() external view returns (IERC20);\n    function _QUOTE_TOKEN_() external view returns (IERC20);\n}\n\nlibrary FastDodoV2 {\n    using Ternary for bool;\n\n    function _callAddressReturnUint(IDodoV2 dodo, uint256 sig, address addr) private returns (uint256 r) {\n        assembly (\"memory-safe\") {\n            mstore(0x14, addr)\n            mstore(0x00, shl(0x60, sig))\n            if iszero(call(gas(), dodo, 0x00, 0x10, 0x24, 0x00, 0x20)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if iszero(gt(returndatasize(), 0x1f)) { revert(0x00, 0x00) }\n\n            r := mload(0x00)\n        }\n    }\n\n    function fastToken(IDodoV2 dodo, bool isBase) internal view returns (IERC20) {\n        return fastGetToken(\n            address(dodo), isBase.ternary(uint32(dodo._BASE_TOKEN_.selector), uint32(dodo._QUOTE_TOKEN_.selector))\n        );\n    }\n\n    function fastSell(IDodoV2 dodo, bool isBase, address to) internal returns (uint256 receiveQuoteAmount) {\n        return _callAddressReturnUint(\n            dodo, isBase.ternary(uint32(dodo.sellBase.selector), uint32(dodo.sellQuote.selector)), to\n        );\n    }\n}\n\nabstract contract DodoV2 is SettlerSwapAbstract {\n    using UnsafeMath for uint256;\n    using SafeTransferLib for IERC20;\n    using FastDodoV2 for IDodoV2;\n\n    function sellToDodoV2(\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        IDodoV2 dodo,\n        bool quoteForBase,\n        uint256 minBuyAmount\n    ) internal returns (uint256 buyAmount) {\n        if (ppm != 0) {\n            uint256 sellAmount;\n            unchecked {\n                sellAmount = (sellToken.fastSpendableBalance() * ppm).unsafeDiv(BASIS);\n            }\n            _checkRecipient(address(this), address(dodo), sellToken);\n            sellToken.safeTransfer(address(dodo), sellAmount);\n        }\n        _checkRecipient(\n            address(dodo), recipient, _recipientCheckNeedsToken() ? dodo.fastToken(quoteForBase) : IERC20(address(0))\n        );\n        buyAmount = dodo.fastSell(!quoteForBase, recipient);\n        if (buyAmount < minBuyAmount) {\n            revertTooMuchSlippage(dodo.fastToken(quoteForBase), minBuyAmount, buyAmount);\n        }\n    }\n}\n\n// src/core/EkuboV2.sol\n\ntype Config_0 is bytes32;\n\ntype SqrtRatio_0 is uint96;\n\n// Each pool has its own state associated with this key\nstruct PoolKey_0 {\n    address token0;\n    address token1;\n    Config_0 config;\n}\n\ninterface IEkuboCore_0 {\n    // The entrypoint for all operations on the core contract\n    function lock() external;\n\n    // Swap tokens\n    function swap_611415377(\n        PoolKey_0 memory poolKey,\n        int128 amount,\n        bool isToken1,\n        SqrtRatio_0 sqrtRatioLimit,\n        uint256 skipAhead\n    ) external payable returns (int128 delta0, int128 delta1);\n\n    function forward(address to) external;\n\n    // Pay for swapped tokens\n    function pay(address token) external returns (uint128 payment);\n\n    // Get swapped tokens\n    function withdraw(address token, address recipient, uint128 amount) external;\n}\n\nIEkuboCore_0 constant CORE_0 = IEkuboCore_0(0xe0e0e08A6A4b9Dc7bD67BCB7aadE5cF48157d444);\n\n/// @notice Interface for the callback executed when an address locks core\ninterface IEkuboCallbacks_0 {\n    /// @notice Called by Core on `msg.sender` when a lock is acquired\n    /// @param id The id assigned to the action\n    /// @return Any data that you want to be returned from the lock call\n    function locked(uint256 id) external returns (bytes memory);\n\n    /// @notice Called by Core on `msg.sender` to collect assets\n    /// @param id The id assigned to the action\n    /// @param token The token to pay on\n    function payCallback(uint256 id, address token) external;\n}\n\nlibrary UnsafeEkuboCore_0 {\n    /// The `amountSpecified` as well as both `delta`'s are `int256` for contract size savings. If\n    /// `amountSpecified` is not a clean, signed, 128-bit value, the call will revert inside the ABI\n    /// decoding in `CORE`. The `delta`'s are guaranteed clean by the returndata encoding of `CORE`,\n    /// but we keep them as `int256` so as not to duplicate any work.\n    ///\n    /// The `skipAhead` argument of the underlying `swap` function is hardcoded to zero.\n    function unsafeSwap(IEkuboCore_0 core, PoolKey_0 memory poolKey, int256 amount, bool isToken1, SqrtRatio_0 sqrtRatioLimit)\n        internal\n        returns (int256 delta0, int256 delta1)\n    {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n\n            mstore(ptr, 0x00000000) // selector for `swap_611415377((address,address,bytes32),int128,bool,uint96,uint256)`\n            let poolKeyPtr := add(0x20, ptr)\n            mcopy(poolKeyPtr, poolKey, 0x60)\n            // ABI decoding in Ekubo will check if amount fits in int128\n            mstore(add(0x80, ptr), amount)\n            mstore(add(0xa0, ptr), lt(0x00, isToken1))\n            mstore(add(0xc0, ptr), and(0xffffffffffffffffffffffff, sqrtRatioLimit))\n            mstore(add(0xe0, ptr), 0x00)\n\n            if iszero(call(gas(), core, 0x00, add(0x1c, ptr), 0xe4, 0x00, 0x40)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            // Ekubo CORE returns data properly no need to mask\n            delta0 := mload(0x00)\n            delta1 := mload(0x20)\n        }\n    }\n\n    function unsafeForward(\n        IEkuboCore_0 core,\n        PoolKey_0 memory poolKey,\n        int256 amount,\n        bool isToken1,\n        SqrtRatio_0 sqrtRatioLimit\n    ) internal returns (int256 delta0, int256 delta1) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n\n            mstore(ptr, 0x101e8952000000000000000000000000) // selector for `forward(address)` with `to`'s padding\n            mcopy(add(0x20, ptr), add(0x40, poolKey), 0x14) // copy the `extension` from `poolKey.config` as the `to` argument\n\n            let poolKeyPtr := add(0x34, ptr)\n            mcopy(poolKeyPtr, poolKey, 0x60)\n            mstore(add(0x94, ptr), amount)\n            mstore(add(0xb4, ptr), lt(0x00, isToken1))\n            mstore(add(0xd4, ptr), and(0xffffffffffffffffffffffff, sqrtRatioLimit))\n            mstore(add(0xf4, ptr), 0x00)\n\n            if iszero(call(gas(), core, 0x00, add(0x10, ptr), 0x104, 0x00, 0x40)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            delta0 := mload(0x00)\n            delta1 := mload(0x20)\n            if or(\n                or(gt(0x40, returndatasize()), xor(signextend(0x0f, amount), amount)),\n                or(xor(signextend(0x0f, delta0), delta0), xor(signextend(0x0f, delta1), delta1))\n            ) { revert(0x00, 0x00) }\n        }\n    }\n}\n\nabstract contract EkuboV2 is SettlerSwapAbstract {\n    using UnsafeMath for uint256;\n    using UnsafeMath for int256;\n    using CreditDebt for int256;\n    using FastLogic for bool;\n    using Ternary for bool;\n    using SafeTransferLib for IERC20;\n    using NotesLib for NotesLib.Note[];\n    using UnsafeEkuboCore_0 for IEkuboCore_0;\n\n    //// How to generate `fills` for Ekubo\n    ////\n    //// Linearize your DAG of fills by doing a topological sort on the tokens involved. In the\n    //// topological sort of tokens, when there is a choice of the next token, break ties by\n    //// preferring a token if it is the lexicographically largest token that is bought among fills\n    //// with sell token equal to the previous token in the topological sort. Then sort the fills\n    //// belonging to each sell token by their buy token. This technique isn't *quite* optimal, but\n    //// it's pretty close. The buy token of the final fill is special-cased. It is the token that\n    //// will be transferred to `recipient` and have its slippage checked against `amountOutMin`. In\n    //// the event that you are encoding a series of fills with more than one output token, ensure\n    //// that at least one of the global buy token's fills is positioned appropriately.\n    ////\n    //// Take care to note that while Ekubo represents the native asset of the chain as\n    //// the address of all zeroes, Settler represents this as the address of all `e`s. You must use\n    //// Settler's representation. The conversion is performed by Settler before making calls to Ekubo\n    ////\n    //// Now that you have a list of fills, encode each fill as follows.\n    //// First encode the `ppm` for the fill as 3 bytes. Remember that this `ppm` is relative to the\n    //// running balance at the moment that the fill is settled. If the uppermost bit of `ppm` is\n    //// set, then the swap is treated as a swap through an extension that requires forwarding. Only\n    //// the lower 23 bits of `ppm` are used for the amount calculation.\n    //// Second, encode the price caps sqrtRatio as 12 bytes.\n    //// Third, encode the packing key for that fill as 1 byte. The packing key byte depends on the\n    //// tokens involved in the previous fill. The packing key for the first fill must be 1;\n    //// i.e. encode only the buy token for the first fill.\n    ////   0 -> sell and buy tokens remain unchanged from the previous fill (pure multiplex)\n    ////   1 -> sell token remains unchanged from the previous fill, buy token is encoded (diamond multiplex)\n    ////   2 -> sell token becomes the buy token from the previous fill, new buy token is encoded (multihop)\n    ////   3 -> both sell and buy token are encoded\n    //// Obviously, after encoding the packing key, you encode 0, 1, or 2 tokens (each as 20 bytes),\n    //// as appropriate.\n    //// The remaining fields of the fill are mandatory.\n    //// Fourth, encode the config of the pool as 32 bytes. It contains pool parameters which are\n    //// 20 bytes extension address, 8 bytes fee, and 4 bytes tickSpacing.\n    ////\n    //// Repeat the process for each fill and concatenate the results without padding.\n\n    function sellToEkuboV2(\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encode(\n            uint32(IEkuboCore_0.lock.selector),\n            recipient,\n            sellToken,\n            ppm,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            amountOutMin,\n            0\n        );\n        bytes memory encodedBuyAmount =\n            _setOperatorAndCall(address(CORE_0), data, uint32(IEkuboCallbacks_0.locked.selector), _ekuboLockCallbackV2);\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `locked` and that `locked` encoded the buy amount\n            // correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function _ekuboLockCallbackV2(bytes calldata data) private returns (bytes memory) {\n        // We know that our calldata is well-formed. Therefore, the first slot is ekubo lock id,\n        // second slot is 0x20 and third is the length of the strict ABIEncoded payload\n        assembly (\"memory-safe\") {\n            data.length := calldataload(add(0x40, data.offset))\n            data.offset := add(0x60, data.offset)\n        }\n        return locked(data);\n    }\n\n    function _ekuboPayV2(IERC20 sellToken, uint256 sellAmount) private returns (uint256 payment) {\n        if (isNative_1(sellToken)) {\n            SafeTransferLib.safeTransferETH(payable(msg.sender), sellAmount);\n            return sellAmount;\n        } else {\n            // Encode the call plus the extra data that is going to be needed in the callback\n            bytes memory data;\n            assembly (\"memory-safe\") {\n                data := mload(0x40)\n\n                mstore(add(0x44, data), sellAmount)\n                mstore(add(0x24, data), sellToken)\n                mstore(add(0x10, data), 0x0c11dedd000000000000000000000000) // selector for pay(address) with padding for token\n\n                // update data length\n                mstore(data, 0x44)\n\n                // update free memory pointer\n                mstore(0x40, add(0x64, data))\n            }\n            bytes memory encodedPayedAmount =\n                _setOperatorAndCall(msg.sender, data, uint32(IEkuboCallbacks_0.payCallback.selector), payCallback);\n            assembly (\"memory-safe\") {\n                // We can skip all the checks performed by `abi.decode` because we know that `CORE`\n                // is well-behaved and that `CORE`'s `pay` encoded the payment correctly.\n                payment := mload(add(0x20, encodedPayedAmount))\n            }\n        }\n    }\n\n    // the mandatory fields are\n    // 3 - sell ppm\n    // 12 - sqrtRatio\n    // 1 - pool key tokens case\n    // 32 - config (20 extension, 8 fee, 4 tickSpacing)\n    uint256 private constant _HOP_DATA_LENGTH = 48;\n\n    function locked(bytes calldata data) private returns (bytes memory) {\n        address recipient;\n        uint256 minBuyAmount;\n        uint256 hashMul;\n        uint256 hashMod;\n        bool feeOnTransfer;\n        address payer;\n        (data, recipient, minBuyAmount, hashMul, hashMod, feeOnTransfer, payer) = Decoder.decodeHeader(data);\n        require(payer == address(this)); // there is no VIP action\n\n        // Set up `state` and `notes`. The other values are ancillary and might be used when we need\n        // to settle global sell token debt at the end of swapping.\n        (bytes calldata newData, State state, NotesLib.Note[] memory notes,,,) =\n            Decoder.initialize(data, hashMul, hashMod, address(this));\n        {\n            NotePtr globalSell = state.globalSell();\n            if (feeOnTransfer) {\n                globalSell.setAmount(_ekuboPayV2(globalSell.token(), globalSell.amount()));\n            }\n            if (globalSell.amount() >> 127 != 0) {\n                Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n            }\n            state.setGlobalSellAmount(globalSell.amount());\n        }\n        state.checkZeroSellAmount();\n        data = newData;\n\n        PoolKey_0 memory poolKey;\n\n        while (data.length >= _HOP_DATA_LENGTH) {\n            uint256 ppm;\n            SqrtRatio_0 sqrtRatio;\n            assembly (\"memory-safe\") {\n                ppm := shr(0xe8, calldataload(data.offset))\n                data.offset := add(0x03, data.offset)\n\n                sqrtRatio := shr(0xa0, calldataload(data.offset))\n                data.offset := add(0x0c, data.offset)\n\n                data.length := sub(data.length, 0x0f)\n                // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n            }\n\n            data = Decoder.updateState(state, notes, data);\n            // It's not possible for `state.sell.amount` to even *approach* overflowing an `int256`,\n            // given that deltas are `int128`. If it overflows an `int128`, the ABI decoding in\n            // `CORE` will throw.\n            int256 amountSpecified;\n            unchecked {\n                amountSpecified = int256((state.sell().amount() * (ppm & 0x7fffff)).unsafeDiv(BASIS));\n            }\n\n            bool isToken1; // opposite of regular zeroForOne\n            {\n                (IERC20 sellToken, IERC20 buyToken) = (state.sell().token(), state.buy().token());\n                assembly (\"memory-safe\") {\n                    let sellTokenShifted := shl(0x60, sellToken)\n                    let buyTokenShifted := shl(0x60, buyToken)\n                    isToken1 := or(\n                        eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, buyTokenShifted),\n                        and(\n                            iszero(\n                                eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, sellTokenShifted)\n                            ),\n                            lt(buyTokenShifted, sellTokenShifted)\n                        )\n                    )\n                }\n                (poolKey.token0, poolKey.token1) = isToken1.maybeSwap(address(sellToken), address(buyToken));\n                assembly (\"memory-safe\") {\n                    let token0 := mload(poolKey)\n                    // set poolKey to address(0) if it is the native token\n                    mstore(poolKey, mul(token0, iszero(eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, token0))))\n                }\n                // poolKey.token0 is not represented according to ERC-7528 to match the format expected by Ekubo\n            }\n\n            {\n                bytes32 config;\n                assembly (\"memory-safe\") {\n                    config := calldataload(data.offset)\n                    data.offset := add(0x20, data.offset)\n                    data.length := sub(data.length, 0x20)\n                    // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n                }\n                poolKey.config = Config_0.wrap(config);\n            }\n\n            Decoder.overflowCheck(data);\n\n            {\n                int256 delta0;\n                int256 delta1;\n                if (ppm & 0x800000 == 0) {\n                    (delta0, delta1) = IEkuboCore_0(msg.sender).unsafeSwap(poolKey, amountSpecified, isToken1, sqrtRatio);\n                } else {\n                    (delta0, delta1) =\n                        IEkuboCore_0(msg.sender).unsafeForward(poolKey, amountSpecified, isToken1, sqrtRatio);\n                }\n\n                // Ekubo's sign convention here is backwards compared to UniV4/BalV3/PancakeInfinity\n                // `settledSellAmount` is positive, `settledBuyAmount` is negative. So the use of\n                // `asCredit` and `asDebt` below is misleading as they are actually debt and credit,\n                // respectively, in this context.\n                (int256 settledSellAmount, int256 settledBuyAmount) = isToken1.maybeSwap(delta0, delta1);\n\n                // We have to check for underflow in the sell amount (could create more debt than\n                // we're able to pay)\n                unchecked {\n                    NotePtr sell = state.sell();\n                    uint256 sellAmountActual = settledSellAmount.asCredit(sell);\n                    uint256 sellCreditBefore = sell.amount();\n                    sell.setAmount(sellCreditBefore - sellAmountActual);\n                    if ((sellAmountActual > uint256(amountSpecified)).or(sellAmountActual > sellCreditBefore)) {\n                        Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n                    }\n                }\n\n                // We *DON'T* have to check for overflow in the buy amount because adding an\n                // `int128` to a `uint256`, even repeatedly cannot practically overflow.\n                unchecked {\n                    NotePtr buy = state.buy();\n                    buy.setAmount(buy.amount() + settledBuyAmount.asDebt(buy));\n                }\n            }\n        }\n\n        // `data` has been consumed. All that remains is to settle out the net result of all the\n        // swaps. Any credit in any token other than `state.buy.token` will be swept to\n        // Settler. `state.buy.token` will be sent to `recipient`.\n        {\n            NotePtr globalSell = state.globalSell();\n            (IERC20 globalSellToken, uint256 globalSellAmount) = (globalSell.token(), globalSell.amount());\n            _checkRecipient(\n                msg.sender, recipient, _recipientCheckNeedsToken() ? state.buy().token() : IERC20(address(0))\n            );\n            uint256 globalBuyAmount =\n                Take.take(state, notes, uint32(IEkuboCore_0.withdraw.selector), recipient, minBuyAmount);\n            if (feeOnTransfer) {\n                // We've already transferred the sell token to the vault and\n                // `settle`'d. `globalSellAmount` is the verbatim credit in that token stored by the\n                // vault. We only need to handle the case of incomplete filling.\n                if (globalSellAmount != 0) {\n                    Take._callSelector(\n                        uint32(IEkuboCore_0.withdraw.selector),\n                        globalSellToken,\n                        address(this), // there is no VIP action\n                        globalSellAmount\n                    );\n                }\n            } else {\n                // While `notes` records a credit value, the vault actually records a debt for the\n                // global sell token. We recover the exact amount of that debt and then pay it.\n                // `globalSellAmount` is _usually_ zero, but if it isn't it represents a partial\n                // fill. This subtraction recovers the actual debt recorded in the vault.\n                uint256 debt;\n                unchecked {\n                    debt = state.globalSellAmount() - globalSellAmount;\n                }\n                if (debt == 0) {\n                    assembly (\"memory-safe\") {\n                        mstore(0x14, globalSellToken)\n                        mstore(0x00, 0xfb772a88000000000000000000000000) // selector for `ZeroSellAmount(address)` with `globalSellToken`'s padding\n                        revert(0x10, 0x24)\n                    }\n                }\n                _ekuboPayV2(globalSellToken, debt);\n            }\n\n            // return abi.encode(globalBuyAmount);\n            bytes memory returndata;\n            assembly (\"memory-safe\") {\n                returndata := mload(0x40)\n                mstore(returndata, 0x60)\n                mstore(add(0x20, returndata), 0x20)\n                mstore(add(0x40, returndata), 0x20)\n                mstore(add(0x60, returndata), globalBuyAmount)\n                mstore(0x40, add(0x80, returndata))\n            }\n            return returndata;\n        }\n    }\n\n    function payCallback(bytes calldata data) private returns (bytes memory) {\n        IERC20 sellToken;\n        uint256 sellAmount;\n\n        assembly (\"memory-safe\") {\n            // first 2 slots in calldata are id and token\n            // id is not being used so can be skipped\n            sellToken := calldataload(add(0x20, data.offset))\n            // then extra data added in _ekuboPayV2\n            sellAmount := calldataload(add(0x40, data.offset))\n        }\n        _checkRecipient(address(this), msg.sender, sellToken);\n        sellToken.safeTransfer(msg.sender, sellAmount);\n\n        return new bytes(0);\n    }\n}\n\n// src/core/EkuboV3.sol\n\ntype Config_1 is bytes32;\n\ntype SqrtRatio_1 is uint96;\n\n// Each pool has its own state associated with this key\nstruct PoolKey_1 {\n    address token0;\n    address token1;\n    Config_1 config;\n}\n\ninterface IEkuboCore_1 {\n    // The entrypoint for all operations on the core contract\n    function lock() external;\n\n    // Swap tokens\n    function swap_6269342730() external payable;\n\n    function forward(address to) external;\n\n    function startPayments() external;\n\n    function completePayments() external;\n\n    // Get swapped tokens\n    function withdraw() external;\n}\n\nIEkuboCore_1 constant CORE_1 = IEkuboCore_1(0x00000000000014aA86C5d3c41765bb24e11bd701);\n\n/// @notice Interface for the callback executed when an address locks core\ninterface IEkuboCallbacks_1 {\n    /// @notice Called by Core on `msg.sender` when a lock is acquired\n    /// @param id The id assigned to the action\n    /// @return Any data that you want to be returned from the lock call\n    function locked_6416899205(uint256 id) external returns (bytes memory);\n}\n\nlibrary UnsafeEkuboCore_1 {\n    /// The `amount` as well as both `delta`'s are `int256` for contract size savings.  The\n    /// `delta`'s are guaranteed clean by the returndata encoding of `CORE`, but we keep them as\n    /// `int256` so as not to duplicate any work. If `amount` overflows a `int128`, we will throw.\n    ///\n    /// The `skipAhead` argument of the underlying `swap` function is hardcoded to zero.\n    function unsafeSwap(IEkuboCore_1 core, PoolKey_1 memory poolKey, int256 amount, bool isToken1, SqrtRatio_1 sqrtRatioLimit)\n        internal\n        returns (int256 delta0, int256 delta1)\n    {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n\n            // Compact params (uint96 sqrtRatioLimit, int128 amount, bool isToken1, uint32 skipAhead)\n            // skipAhead is encoded as 31 bits\n            // mstore(add(0x80, ptr), 0x00) // skipAhead harcoded to zero\n            mstore(add(0x80, ptr), shl(0x1f, lt(0x00, isToken1))) // sets skipAhead to zero\n            mstore(add(0x7c, ptr), amount)\n            mstore(add(0x6c, ptr), sqrtRatioLimit)\n            mcopy(add(0x20, ptr), poolKey, 0x60)\n            mstore(ptr, 0x00000000) // selector for `swap_6269342730()`\n\n            if iszero(call(gas(), core, 0x00, add(0x1c, ptr), 0x84, 0x00, 0x20)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            let poolBalanceUpdate := mload(0x00)\n            delta1 := signextend(0x0f, poolBalanceUpdate)\n            delta0 := sar(0x80, poolBalanceUpdate)\n            // let poolState := mload(0x20) // unused\n            // Ekubo is well behaved no need to check returndatasize\n            // if gt(0x40, returndatasize()) { revert(0x00, 0x00) }\n            if or(xor(signextend(0x0f, amount), amount), shr(0x60, sqrtRatioLimit)) {\n                revert(0x00, 0x00)\n            }\n        }\n    }\n\n    function unsafeForward(\n        IEkuboCore_1 core,\n        PoolKey_1 memory poolKey,\n        int256 amount,\n        bool isToken1,\n        SqrtRatio_1 sqrtRatioLimit\n    ) internal returns (int256 delta0, int256 delta1) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n\n            /// Compact params (uint96 sqrtRatioLimit, int128 amount, bool isToken1, uint32 skipAhead)\n            // skipAhead is encoded as 31 bits\n            // mstore(add(0x94, ptr), 0x00) // skipAhead harcoded to zero\n            mstore(add(0x94, ptr), shl(0x1f, lt(0x00, isToken1))) // sets skipAhead to zero\n            mstore(add(0x90, ptr), amount)\n            mstore(add(0x80, ptr), sqrtRatioLimit)\n            mcopy(add(0x34, ptr), poolKey, 0x60)\n            mcopy(add(0x20, ptr), add(0x40, poolKey), 0x14) // copy the `extension` from `poolKey.config` as the `to` argument\n            mstore(ptr, 0x101e8952000000000000000000000000) // selector for `forward(address)` with `to`'s padding\n\n            if iszero(call(gas(), core, 0x00, add(0x10, ptr), 0xa4, 0x00, 0x20)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            let poolBalanceUpdate := mload(0x00)\n            delta1 := signextend(0x0f, poolBalanceUpdate)\n            delta0 := sar(0x80, poolBalanceUpdate)\n            // `forward` function returned data depends on the extension implementation\n            // supported extensions are supposed to return same data as `swap_6269342730`\n            // which is (bytes32 balanceUpdate, bytes32 stateAfter), 0x40 bytes long\n            if or(or(gt(0x40, returndatasize()), xor(signextend(0x0f, amount), amount)), shr(0x60, sqrtRatioLimit)) {\n                revert(0x00, 0x00)\n            }\n        }\n    }\n\n    function unsafeStartPayments(IEkuboCore_1 core, IERC20 sellToken) internal {\n        assembly (\"memory-safe\") {\n            mstore(0x14, sellToken)\n            mstore(0x00, 0xf9b6a796000000000000000000000000) // selector for `startPayments()` with `sellToken`'s padding\n            if iszero(call(gas(), core, 0x00, 0x10, 0x24, 0x00, 0x00)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            // Ekubo is well behaved no need to check returndatasize\n            // if gt(0x20, returndatasize()) { revert(0x00, 0x00) }\n            // Ekubo returns its own balance of the token\n            // but the value is unused\n        }\n    }\n\n    function unsafeCompletePayments(IEkuboCore_1 core, IERC20 sellToken) internal returns (uint256 payment) {\n        assembly (\"memory-safe\") {\n            mstore(0x14, sellToken)\n            mstore(0x00, 0x12e103f1000000000000000000000000) // selector for `completePayments()` with `sellToken`'s padding\n            if iszero(call(gas(), core, 0x00, 0x10, 0x24, 0x00, 0x10)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            // Ekubo is well behaved no need to check returndatasize\n            // if gt(0x10, returndatasize()) { revert(0x00, 0x00) }\n            payment := shr(0x80, mload(0x00))\n        }\n    }\n}\n\nabstract contract EkuboV3 is SettlerSwapAbstract {\n    using UnsafeMath for uint256;\n    using UnsafeMath for int256;\n    using CreditDebt for int256;\n    using FastLogic for bool;\n    using Ternary for bool;\n    using SafeTransferLib for IERC20;\n    using NotesLib for NotesLib.Note[];\n    using UnsafeEkuboCore_1 for IEkuboCore_1;\n\n    //// How to generate `fills` for Ekubo\n    ////\n    //// Linearize your DAG of fills by doing a topological sort on the tokens involved. In the\n    //// topological sort of tokens, when there is a choice of the next token, break ties by\n    //// preferring a token if it is the lexicographically largest token that is bought among fills\n    //// with sell token equal to the previous token in the topological sort. Then sort the fills\n    //// belonging to each sell token by their buy token. This technique isn't *quite* optimal, but\n    //// it's pretty close. The buy token of the final fill is special-cased. It is the token that\n    //// will be transferred to `recipient` and have its slippage checked against `amountOutMin`. In\n    //// the event that you are encoding a series of fills with more than one output token, ensure\n    //// that at least one of the global buy token's fills is positioned appropriately.\n    ////\n    //// Take care to note that while Ekubo represents the native asset of the chain as\n    //// the address of all zeroes, Settler represents this as the address of all `e`s. You must use\n    //// Settler's representation. The conversion is performed by Settler before making calls to Ekubo\n    ////\n    //// Now that you have a list of fills, encode each fill as follows.\n    //// First encode the `ppm` for the fill as 3 bytes. Remember that this `ppm` is relative to the\n    //// running balance at the moment that the fill is settled. If the uppermost bit of `ppm` is\n    //// set, then the swap is treated as a swap through an extension that requires forwarding. Only\n    //// the lower 23 bits of `ppm` are used for the amount calculation.\n    //// Second, encode the price caps sqrtRatio as 12 bytes.\n    //// Third, encode the packing key for that fill as 1 byte. The packing key byte depends on the\n    //// tokens involved in the previous fill. The packing key for the first fill must be 1;\n    //// i.e. encode only the buy token for the first fill.\n    ////   0 -> sell and buy tokens remain unchanged from the previous fill (pure multiplex)\n    ////   1 -> sell token remains unchanged from the previous fill, buy token is encoded (diamond multiplex)\n    ////   2 -> sell token becomes the buy token from the previous fill, new buy token is encoded (multihop)\n    ////   3 -> both sell and buy token are encoded\n    //// Obviously, after encoding the packing key, you encode 0, 1, or 2 tokens (each as 20 bytes),\n    //// as appropriate.\n    //// The remaining fields of the fill are mandatory.\n    //// Fourth, encode the config of the pool as 32 bytes. Should be done as described in Ekubo implementation\n    //// https://github.com/EkuboProtocol/evm-contracts/blob/81c2c2642afe321e7f5d7de70f8b3be18f6f80b3/src/types/poolConfig.sol#L6-#L12\n    ////\n    //// Repeat the process for each fill and concatenate the results without padding.\n\n    function sellToEkuboV3(\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encode(\n            uint32(IEkuboCore_1.lock.selector),\n            recipient,\n            sellToken,\n            ppm,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            amountOutMin,\n            0\n        );\n        bytes memory encodedBuyAmount = _setOperatorAndCall(\n            address(CORE_1), data, uint32(IEkuboCallbacks_1.locked_6416899205.selector), _ekuboLockCallbackV3\n        );\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `locked_6416899205` and that `locked_6416899205` encoded the buy amount\n            // correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function sellToEkuboV3VIP(\n        address recipient,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encodeVIP(\n            uint32(IEkuboCore_1.lock.selector),\n            recipient,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            permit,\n            sig,\n            _isForwarded(),\n            amountOutMin,\n            0\n        );\n        bytes memory encodedBuyAmount = _setOperatorAndCall(\n            address(CORE_1), data, uint32(IEkuboCallbacks_1.locked_6416899205.selector), _ekuboLockCallbackV3\n        );\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `locked_6416899205` and that `locked_6416899205` encoded the buy amount\n            // correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function _ekuboLockCallbackV3(bytes calldata data) private returns (bytes memory) {\n        // We know that our calldata is well-formed. Therefore, the first slot is ekubo lock id,\n        // second slot is 0x20 and third is the length of the strict ABIEncoded payload\n        assembly (\"memory-safe\") {\n            data.length := calldataload(add(0x40, data.offset))\n            data.offset := add(0x60, data.offset)\n        }\n        return locked_6416899205(data);\n    }\n\n    function _ekuboPayV3(\n        IERC20 sellToken,\n        address payer,\n        uint256 sellAmount,\n        ISignatureTransfer.PermitTransferFrom calldata permit,\n        bool isForwarded,\n        bytes calldata sig\n    ) private returns (uint256 payment) {\n        if (isNative_1(sellToken)) {\n            SafeTransferLib.safeTransferETH(payable(msg.sender), sellAmount);\n            return sellAmount;\n        } else {\n            // Initiate the payment\n            IEkuboCore_1(msg.sender).unsafeStartPayments(sellToken);\n\n            if (payer == address(this)) {\n                _checkRecipient(address(this), msg.sender, sellToken);\n                sellToken.safeTransfer(msg.sender, sellAmount);\n            } else {\n                ISignatureTransfer.SignatureTransferDetails memory transferDetails =\n                    ISignatureTransfer.SignatureTransferDetails({to: msg.sender, requestedAmount: sellAmount});\n                _transferFrom(permit, transferDetails, sig, isForwarded);\n            }\n\n            payment = IEkuboCore_1(msg.sender).unsafeCompletePayments(sellToken);\n        }\n    }\n\n    // the mandatory fields are\n    // 3 - sell ppm\n    // 12 - sqrtRatio\n    // 1 - pool key tokens case\n    // 32 - config (20 extension, 8 fee, 4 tickSpacing)\n    uint256 private constant _HOP_DATA_LENGTH = 48;\n\n    function locked_6416899205(bytes calldata data) private returns (bytes memory) {\n        address recipient;\n        uint256 minBuyAmount;\n        uint256 hashMul;\n        uint256 hashMod;\n        bool feeOnTransfer;\n        address payer;\n        (data, recipient, minBuyAmount, hashMul, hashMod, feeOnTransfer, payer) = Decoder.decodeHeader(data);\n\n        // Set up `state` and `notes`. The other values are ancillary and might be used when we need\n        // to settle global sell token debt at the end of swapping.\n        (\n            bytes calldata newData,\n            State state,\n            NotesLib.Note[] memory notes,\n            ISignatureTransfer.PermitTransferFrom calldata permit,\n            bool isForwarded,\n            bytes calldata sig\n        ) = Decoder.initialize(data, hashMul, hashMod, payer);\n        {\n            NotePtr globalSell = state.globalSell();\n            if (payer != address(this)) {\n                globalSell.setAmount(\n                    _permitToSellAmountCalldata(\n                        address(0) /* sentinel for `_msgSender()` */,\n                        permit\n                    )\n                );\n            }\n            if (feeOnTransfer) {\n                globalSell.setAmount(\n                    _ekuboPayV3(globalSell.token(), payer, globalSell.amount(), permit, isForwarded, sig)\n                );\n            }\n            if (globalSell.amount() >> 127 != 0) {\n                Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n            }\n            state.setGlobalSellAmount(globalSell.amount());\n        }\n        state.checkZeroSellAmount();\n        data = newData;\n\n        PoolKey_1 memory poolKey;\n\n        while (data.length >= _HOP_DATA_LENGTH) {\n            uint256 ppm;\n            SqrtRatio_1 sqrtRatio;\n            assembly (\"memory-safe\") {\n                ppm := shr(0xe8, calldataload(data.offset))\n                data.offset := add(0x03, data.offset)\n\n                sqrtRatio := shr(0xa0, calldataload(data.offset))\n                data.offset := add(0x0c, data.offset)\n\n                data.length := sub(data.length, 0x0f)\n                // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n            }\n\n            data = Decoder.updateState(state, notes, data);\n            // It's not possible for `state.sell.amount` to even *approach* overflowing an `int256`,\n            // given that deltas are `int128`. If it overflows an `int128`, `unsafeSwap` will throw.\n            int256 amountSpecified;\n            unchecked {\n                amountSpecified = int256((state.sell().amount() * (ppm & 0x7fffff)).unsafeDiv(BASIS));\n            }\n\n            bool isToken1; // opposite of regular zeroForOne\n            {\n                (IERC20 sellToken, IERC20 buyToken) = (state.sell().token(), state.buy().token());\n                assembly (\"memory-safe\") {\n                    let sellTokenShifted := shl(0x60, sellToken)\n                    let buyTokenShifted := shl(0x60, buyToken)\n                    isToken1 := or(\n                        eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, buyTokenShifted),\n                        and(\n                            iszero(\n                                eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, sellTokenShifted)\n                            ),\n                            lt(buyTokenShifted, sellTokenShifted)\n                        )\n                    )\n                }\n                (poolKey.token0, poolKey.token1) = isToken1.maybeSwap(address(sellToken), address(buyToken));\n                assembly (\"memory-safe\") {\n                    let token0 := mload(poolKey)\n                    // set poolKey to address(0) if it is the native token\n                    mstore(poolKey, mul(token0, iszero(eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, token0))))\n                }\n                // poolKey.token0 is not represented according to ERC-7528 to match the format expected by Ekubo\n            }\n\n            {\n                bytes32 config;\n                assembly (\"memory-safe\") {\n                    config := calldataload(data.offset)\n                    data.offset := add(0x20, data.offset)\n                    data.length := sub(data.length, 0x20)\n                    // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n                }\n                poolKey.config = Config_1.wrap(config);\n            }\n\n            Decoder.overflowCheck(data);\n\n            {\n                int256 delta0;\n                int256 delta1;\n                if (ppm & 0x800000 == 0) {\n                    (delta0, delta1) = IEkuboCore_1(msg.sender).unsafeSwap(poolKey, amountSpecified, isToken1, sqrtRatio);\n                } else {\n                    (delta0, delta1) =\n                        IEkuboCore_1(msg.sender).unsafeForward(poolKey, amountSpecified, isToken1, sqrtRatio);\n                }\n\n                // Ekubo's sign convention here is backwards compared to UniV4/BalV3/PancakeInfinity\n                // `settledSellAmount` is positive, `settledBuyAmount` is negative. So the use of\n                // `asCredit` and `asDebt` below is misleading as they are actually debt and credit,\n                // respectively, in this context.\n                (int256 settledSellAmount, int256 settledBuyAmount) = isToken1.maybeSwap(delta0, delta1);\n\n                // We have to check for underflow in the sell amount (could create more debt than\n                // we're able to pay)\n                unchecked {\n                    NotePtr sell = state.sell();\n                    uint256 sellAmountActual = settledSellAmount.asCredit(sell);\n                    uint256 sellCreditBefore = sell.amount();\n                    sell.setAmount(sellCreditBefore - sellAmountActual);\n                    if ((sellAmountActual > uint256(amountSpecified)).or(sellAmountActual > sellCreditBefore)) {\n                        Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n                    }\n                }\n\n                // We *DON'T* have to check for overflow in the buy amount because adding an\n                // `int128` to a `uint256`, even repeatedly cannot practically overflow.\n                unchecked {\n                    NotePtr buy = state.buy();\n                    buy.setAmount(buy.amount() + settledBuyAmount.asDebt(buy));\n                }\n            }\n        }\n\n        // `data` has been consumed. All that remains is to settle out the net result of all the\n        // swaps. Any credit in any token other than `state.buy.token` will be swept to\n        // Settler. `state.buy.token` will be sent to `recipient`.\n        {\n            NotePtr globalSell = state.globalSell();\n            (IERC20 globalSellToken, uint256 globalSellAmount) = (globalSell.token(), globalSell.amount());\n            _checkRecipient(\n                msg.sender, recipient, _recipientCheckNeedsToken() ? state.buy().token() : IERC20(address(0))\n            );\n            uint256 globalBuyAmount =\n                CompactTake.take(state, notes, uint32(IEkuboCore_1.withdraw.selector), recipient, minBuyAmount);\n            if (feeOnTransfer) {\n                // We've already transferred the sell token to the vault and\n                // `settle`'d. `globalSellAmount` is the verbatim credit in that token stored by the\n                // vault. We only need to handle the case of incomplete filling.\n                if (globalSellAmount != 0) {\n                    address refundRecipient = payer == address(this) ? address(this) : _msgSender();\n                    _checkRecipient(msg.sender, refundRecipient, globalSellToken);\n                    CompactTake._callSelector(\n                        uint32(IEkuboCore_1.withdraw.selector), globalSellToken, refundRecipient, globalSellAmount\n                    );\n                }\n            } else {\n                // While `notes` records a credit value, the vault actually records a debt for the\n                // global sell token. We recover the exact amount of that debt and then pay it.\n                // `globalSellAmount` is _usually_ zero, but if it isn't it represents a partial\n                // fill. This subtraction recovers the actual debt recorded in the vault.\n                uint256 debt;\n                unchecked {\n                    debt = state.globalSellAmount() - globalSellAmount;\n                }\n                if (debt == 0) {\n                    assembly (\"memory-safe\") {\n                        mstore(0x14, globalSellToken)\n                        mstore(0x00, 0xfb772a88000000000000000000000000) // selector for `ZeroSellAmount(address)` with `globalSellToken`'s padding\n                        revert(0x10, 0x24)\n                    }\n                }\n                _ekuboPayV3(globalSellToken, payer, debt, permit, isForwarded, sig);\n            }\n\n            // return abi.encode(globalBuyAmount);\n            bytes memory returndata;\n            assembly (\"memory-safe\") {\n                returndata := mload(0x40)\n                mstore(returndata, 0x60)\n                mstore(add(0x20, returndata), 0x20)\n                mstore(add(0x40, returndata), 0x20)\n                mstore(add(0x60, returndata), globalBuyAmount)\n                mstore(0x40, add(0x80, returndata))\n            }\n            return returndata;\n        }\n    }\n}\n\n// src/core/UniswapV2.sol\n\ninterface IUniV2Pair {\n    function token0() external view returns (address);\n\n    function token1() external view returns (address);\n\n    function getReserves() external view returns (uint112, uint112, uint32);\n\n    function swap(uint256, uint256, address, bytes calldata) external;\n}\n\nlibrary FastUniswapV2Pool {\n    using Ternary for bool;\n\n    function fastGetReserves(address pool, bool zeroForOne)\n        internal\n        view\n        returns (uint256 sellReserve, uint256 buyReserve)\n    {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x0902f1ac) // selector for `getReserves()`\n            if iszero(staticcall(gas(), pool, 0x1c, 0x04, 0x00, 0x40)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            if lt(returndatasize(), 0x40) { revert(0x00, 0x00) }\n            let r := shl(0x05, iszero(zeroForOne))\n            sellReserve := mload(r)\n            buyReserve := mload(xor(0x20, r))\n        }\n    }\n\n    function fastToken0or1(address pool, bool zeroForOne) internal view returns (IERC20) {\n        return\n            fastGetToken(\n                pool, zeroForOne.ternary(uint32(IUniV2Pair.token1.selector), uint32(IUniV2Pair.token0.selector))\n            );\n    }\n\n    function fastSwap(address pool, bool zeroForOne, uint256 buyAmount, address recipient) internal {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n\n            mstore(ptr, 0x022c0d9f) // selector for `swap(uint256,uint256,address,bytes)`\n            // set amount0Out and amount1Out\n            let buyAmountBaseOffset := add(0x20, ptr)\n            // If `zeroForOne`, buyAmount offset is 0x40, else 0x20\n            let directionOffset := shl(0x05, iszero(zeroForOne))\n            mstore(add(buyAmountBaseOffset, directionOffset), 0x00)\n            mstore(add(buyAmountBaseOffset, xor(0x20, directionOffset)), buyAmount)\n\n            mstore(add(0x60, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, recipient))\n            mstore(add(0x80, ptr), 0x80) // offset to length of data\n            mstore(add(0xa0, ptr), 0x00) // length of data\n\n            // perform swap at the pool sending bought tokens to the recipient\n            if iszero(call(gas(), pool, 0x00, add(0x1c, ptr), 0xa4, 0x00, 0x00)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n        }\n    }\n}\n\nabstract contract UniswapV2 is SettlerSwapAbstract {\n    using SafeTransferLib for IERC20;\n    using FastUniswapV2Pool for address;\n\n    /// @dev Sell a token for another token using UniswapV2.\n    function sellToUniswapV2(\n        address recipient,\n        address sellToken,\n        uint256 ppm,\n        address pool,\n        uint24 swapInfo,\n        uint256 minBuyAmount\n    ) internal {\n        // Preventing calls to Permit2 or AH is not explicitly required as neither of these contracts implement the `swap` nor `transfer` selector\n\n        // |7|6|5|4|3|2|1|0| - bit positions in swapInfo (uint8)\n        // |0|0|0|0|0|0|F|Z| - Z: zeroForOne flag, F: sellTokenHasFee flag\n        bool zeroForOne = (swapInfo & 1) == 1; // Extract the least significant bit (bit 0)\n        bool sellTokenHasFee = (swapInfo & 2) >> 1 == 1; // Extract the second least significant bit (bit 1) and shift it right\n        uint256 feeBps = swapInfo >> 8;\n\n        uint256 sellAmount;\n        uint256 buyAmount;\n        // If ppm is zero we assume there are no funds within this contract, skip the updating sellAmount.\n        // This case occurs if the pool is being chained, in which the funds have been sent directly to the pool\n        if (ppm != 0) {\n            // We don't care about phantom overflow here because reserves are\n            // limited to 112 bits. Any token balance that would overflow here would\n            // also break UniV2.\n            // It is *possible* to set `ppm` above the basis and therefore\n            // cause an overflow on this multiplication. However, `ppm` is\n            // passed as authenticated calldata, so this is a GIGO error that we\n            // do not attempt to fix.\n            unchecked {\n                sellAmount = IERC20(sellToken).fastSpendableBalance() * ppm / BASIS;\n            }\n            _checkRecipient(address(this), pool, IERC20(sellToken));\n            IERC20(sellToken).safeTransfer(address(pool), sellAmount);\n        }\n        (uint256 sellReserve, uint256 buyReserve) = FastUniswapV2Pool.fastGetReserves(pool, zeroForOne);\n        if (sellAmount == 0 || sellTokenHasFee) {\n            uint256 bal = IERC20(sellToken).fastBalanceOf(pool);\n            sellAmount = bal - sellReserve;\n        }\n        unchecked {\n            uint256 sellAmountWithFee = sellAmount * (10_000 - feeBps);\n            buyAmount = (sellAmountWithFee * buyReserve) / (sellAmountWithFee + sellReserve * 10_000);\n        }\n        if (buyAmount < minBuyAmount) {\n            revertTooMuchSlippage(pool.fastToken0or1(zeroForOne), minBuyAmount, buyAmount);\n        }\n        _checkRecipient(\n            pool, recipient, _recipientCheckNeedsToken() ? pool.fastToken0or1(zeroForOne) : IERC20(address(0))\n        );\n        pool.fastSwap(zeroForOne, buyAmount, recipient);\n    }\n}\n\n// src/core/UniswapV3Fork.sol\n\ninterface IUniswapV3Pool {\n    /// @notice Swap token0 for token1, or token1 for token0\n    /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\n    /// @param recipient The address to receive the output of the swap\n    /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\n    /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive),\n    /// or exact output (negative)\n    /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\n    /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\n    /// @param data Any data to be passed through to the callback\n    /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\n    /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\n    function swap(\n        address recipient,\n        bool zeroForOne,\n        int256 amountSpecified,\n        uint160 sqrtPriceLimitX96,\n        bytes calldata data\n    ) external returns (int256 amount0, int256 amount1);\n}\n\nlibrary FastUniswapV3Pool {\n    function fastEncodeSwap(\n        address recipient,\n        bool zeroForOne,\n        uint256 sellAmount,\n        uint160 sqrtPriceLimitX96,\n        bytes memory swapCallbackData\n    ) internal pure returns (bytes memory data, uint256 freeMemPtr) {\n        // Equivalent to `abi.encodeCall(IUniswapV3Pool.swap, (..., swapCallbackData))`,\n        // but keeps the dynamic bytes tail tightly packed and canonicalizes `zeroForOne`.\n        assembly (\"memory-safe\") {\n            freeMemPtr := mload(0x40)\n            data := freeMemPtr\n\n            // encode the call to pool.swap\n            let callbackLen := mload(swapCallbackData)\n            mcopy(add(0xc4, data), swapCallbackData, add(0x20, callbackLen))\n            mstore(add(0xa4, data), 0xa0)\n            mstore(add(0x84, data), and(0xffffffffffffffffffffffffffffffffffffffff, sqrtPriceLimitX96))\n            mstore(add(0x64, data), sellAmount)\n            mstore(add(0x44, data), lt(0x00, zeroForOne))\n            mstore(add(0x24, data), recipient)\n            mstore(add(0x10, data), 0x128acb08000000000000000000000000) // selector for `swap(address,bool,int256,uint160,bytes)` with `recipient`'s padding\n\n            // set data.length\n            mstore(data, add(0xc4, callbackLen))\n\n            // advance the free memory pointer (we'll put it back later)\n            mstore(0x40, add(add(0xe4, callbackLen), data))\n        }\n    }\n}\n\nabstract contract UniswapV3Fork is SettlerSwapAbstract {\n    using Ternary for bool;\n    using UnsafeMath for uint256;\n    using UnsafeMath for int256;\n    using SafeTransferLib for IERC20;\n\n    /// @dev Minimum size of an encoded swap path:\n    ///      sizeof(address(inputToken) | uint8(forkId) | uint24(poolId) | uint160(sqrtPriceLimitX96) | address(outputToken))\n    uint256 private constant SINGLE_HOP_PATH_SIZE = 0x40;\n    /// @dev The size of each hop after the input token:\n    ///      sizeof(uint8(forkId) | uint24(poolId) | uint160(sqrtPriceLimitX96) | address(outputToken))\n    uint256 private constant PATH_HOP_SIZE = 0x2c;\n    uint256 private constant PATH_INPUT_TOKEN_SIZE = 0x14;\n    /// @dev The size of the swap callback prefix data before the Permit2 data.\n    uint256 private constant SWAP_CALLBACK_PREFIX_DATA_SIZE = 0x28;\n    /// @dev The offset from the pointer to the length of the swap callback prefix data to the start of the Permit2 data.\n    uint256 private constant SWAP_CALLBACK_PERMIT2DATA_OFFSET = 0x48;\n    uint256 private constant PERMIT_DATA_SIZE = 0x60;\n    uint256 private constant ISFORWARDED_DATA_SIZE = 0x01;\n    /// @dev Mask of lower 3 bytes.\n    uint256 private constant UINT24_MASK = 0xffffff;\n\n    /// @dev Sell a token for another token directly against uniswap v3.\n    /// @param encodedPath Uniswap-encoded path.\n    /// @param ppm proportion of current balance of the first token in the path to sell.\n    /// @param minBuyAmount Minimum amount of the last token in the path to buy.\n    /// @param recipient The recipient of the bought tokens.\n    /// @return buyAmount Amount of the last token in the path bought.\n    function sellToUniswapV3(address recipient, uint256 ppm, bytes memory encodedPath, uint256 minBuyAmount)\n        internal\n        returns (uint256 buyAmount)\n    {\n        if (encodedPath.length < SINGLE_HOP_PATH_SIZE) {\n            Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n        }\n        IERC20 inputToken;\n        // inputToken = IERC20(address(bytes20(encodedPath)));\n        // encodedPath = encodedPath[20:];\n        assembly (\"memory-safe\") {\n            let pathLength := sub(mload(encodedPath), PATH_INPUT_TOKEN_SIZE)\n            encodedPath := add(PATH_INPUT_TOKEN_SIZE, encodedPath)\n            inputToken := mload(encodedPath)\n            mstore(encodedPath, pathLength)\n        }\n\n        // bytes memory swapCallbackData = abi.encodePacked(address(this), inputToken)\n        bytes memory swapCallbackData = new bytes(SWAP_CALLBACK_PREFIX_DATA_SIZE);\n        assembly (\"memory-safe\") {\n            mstore(add(0x28, swapCallbackData), inputToken)\n            mstore(add(0x14, swapCallbackData), address())\n            mstore(swapCallbackData, SWAP_CALLBACK_PREFIX_DATA_SIZE)\n        }\n\n        buyAmount = _uniV3ForkSwap(\n            recipient,\n            encodedPath,\n            // We don't care about phantom overflow here because reserves are limited to 128\n            // bits. Any token balance that would overflow here would also break UniV3.\n            (inputToken.fastSpendableBalance() * ppm).unsafeDiv(BASIS),\n            minBuyAmount,\n            swapCallbackData\n        );\n    }\n\n    /// @dev Sell a token for another token directly against uniswap v3. Payment is using a Permit2 signature (or AllowanceHolder).\n    /// @param encodedPath Uniswap-encoded path.\n    /// @param minBuyAmount Minimum amount of the last token in the path to buy.\n    /// @param recipient The recipient of the bought tokens.\n    /// @param permit The PermitTransferFrom allowing this contract to spend the taker's tokens\n    /// @param sig The taker's signature for Permit2\n    /// @return buyAmount Amount of the last token in the path bought.\n    function sellToUniswapV3VIP(\n        address recipient,\n        bytes memory encodedPath,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory sig,\n        uint256 minBuyAmount\n    ) internal returns (uint256 buyAmount) {\n        if (encodedPath.length < PATH_HOP_SIZE) {\n            Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n        }\n        bytes memory swapCallbackData =\n            new bytes(SWAP_CALLBACK_PREFIX_DATA_SIZE + PERMIT_DATA_SIZE + ISFORWARDED_DATA_SIZE + sig.length);\n        _encodePermit2Data(swapCallbackData, permit, sig, _isForwarded());\n\n        // swapCallbackData[:40] = abi.encodePacked(address(0), permit.permitted.token)\n        assembly (\"memory-safe\") {\n            let length := mload(swapCallbackData)\n            mstore(add(0x28, swapCallbackData), mload(mload(permit)))\n            mstore(add(0x14, swapCallbackData), 0x00)\n            mstore(swapCallbackData, length)\n        }\n\n        buyAmount = _uniV3ForkSwap(\n            recipient,\n            encodedPath,\n            _permitToSellAmount(\n                address(0) /* sentinel for `_msgSender()` */,\n                permit\n            ),\n            minBuyAmount,\n            swapCallbackData\n        );\n    }\n\n    // Executes successive swaps along an encoded uniswap path.\n    function _uniV3ForkSwap(\n        address recipient,\n        bytes memory encodedPath,\n        uint256 sellAmount,\n        uint256 minBuyAmount,\n        bytes memory swapCallbackData\n    ) internal returns (uint256 buyAmount) {\n        if (sellAmount > uint256(type(int256).max)) {\n            Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n        }\n\n        IERC20 outputToken;\n        while (true) {\n            bool isPathMultiHop = encodedPath.length > PATH_HOP_SIZE;\n            bool zeroForOne;\n            IUniswapV3Pool pool;\n            uint160 sqrtPriceLimitX96;\n            uint32 callbackSelector;\n            {\n                IERC20 token0;\n                uint8 forkId;\n                uint24 poolId;\n                IERC20 token1;\n                assembly (\"memory-safe\") {\n                    token0 := mload(add(0x28, swapCallbackData))\n                    forkId := mload(add(0x01, encodedPath))\n                    poolId := mload(add(0x04, encodedPath))\n                    sqrtPriceLimitX96 := mload(add(0x18, encodedPath))\n                    token1 := mload(add(PATH_HOP_SIZE, encodedPath))\n                }\n\n                outputToken = token1;\n                (token0, token1) = (zeroForOne = token0 < token1).maybeSwap(token1, token0);\n                address factory;\n                bytes32 initHash;\n                (factory, initHash, callbackSelector) = _uniV3ForkInfo(forkId);\n                pool = _toPool(forkId, factory, initHash, token0, token1, poolId);\n            }\n\n            // Intermediate tokens go to this contract. Final tokens go to `recipient`.\n            address to = isPathMultiHop.ternary(address(this), recipient);\n            if (!isPathMultiHop) {\n                _checkRecipient(address(pool), recipient, outputToken);\n            }\n\n            (bytes memory data, uint256 freeMemPtr) =\n                FastUniswapV3Pool.fastEncodeSwap(to, zeroForOne, sellAmount, sqrtPriceLimitX96, swapCallbackData);\n\n            (int256 amount0, int256 amount1) = abi.decode(\n                _setOperatorAndCall(address(pool), data, callbackSelector, _uniV3ForkCallback), (int256, int256)\n            );\n\n            assembly (\"memory-safe\") {\n                // release the memory that we allocated above\n                mstore(0x40, freeMemPtr)\n            }\n\n            {\n                int256 _buyAmount = zeroForOne.ternary(amount1, amount0).unsafeNeg();\n                if (_buyAmount < 0) {\n                    Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n                }\n                buyAmount = uint256(_buyAmount);\n            }\n            if (!isPathMultiHop) {\n                // Done.\n                break;\n            }\n\n            // Continue with next hop.\n            sellAmount = buyAmount;\n\n            // encodedPath = encodedPath[44:]\n            assembly (\"memory-safe\") {\n                let pathLength := sub(mload(encodedPath), PATH_HOP_SIZE)\n                encodedPath := add(PATH_HOP_SIZE, encodedPath)\n                mstore(encodedPath, pathLength)\n            }\n            if (encodedPath.length < PATH_HOP_SIZE) {\n                Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS);\n            }\n\n            // Subsequent callbacks contain only the Settler payer and intermediate token.\n            // swapCallbackData = abi.encodePacked(address(this), outputToken)\n            assembly (\"memory-safe\") {\n                mstore(add(0x28, swapCallbackData), outputToken)\n                mstore(add(0x14, swapCallbackData), address())\n                mstore(swapCallbackData, SWAP_CALLBACK_PREFIX_DATA_SIZE)\n            }\n        }\n        if (buyAmount < minBuyAmount) {\n            revertTooMuchSlippage(outputToken, minBuyAmount, buyAmount);\n        }\n    }\n\n    function _encodePermit2Data(\n        bytes memory swapCallbackData,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory sig,\n        bool isForwarded\n    ) private pure {\n        assembly (\"memory-safe\") {\n            mstore(add(SWAP_CALLBACK_PERMIT2DATA_OFFSET, swapCallbackData), mload(add(0x20, mload(permit))))\n            mcopy(add(add(SWAP_CALLBACK_PERMIT2DATA_OFFSET, 0x20), swapCallbackData), add(0x20, permit), 0x40)\n            mstore8(\n                add(add(SWAP_CALLBACK_PERMIT2DATA_OFFSET, PERMIT_DATA_SIZE), swapCallbackData),\n                lt(0x00, isForwarded)\n            )\n            mcopy(\n                add(\n                    add(add(SWAP_CALLBACK_PERMIT2DATA_OFFSET, PERMIT_DATA_SIZE), ISFORWARDED_DATA_SIZE),\n                    swapCallbackData\n                ),\n                add(0x20, sig),\n                mload(sig)\n            )\n        }\n    }\n\n    function _isEraVmUniV3Fork(uint8) internal pure virtual returns (bool) {\n        return false;\n    }\n\n    // Compute the pool address given two tokens and a poolId.\n    function _toPool(uint8 forkId, address factory, bytes32 initHash, IERC20 token0, IERC20 token1, uint24 poolId)\n        private\n        pure\n        returns (IUniswapV3Pool)\n    {\n        // address(keccak256(abi.encodePacked(\n        //     hex\"ff\",\n        //     factory,\n        //     keccak256(abi.encode(token0, token1, poolId)),\n        //     initHash\n        // )))\n        bytes32 salt;\n        assembly (\"memory-safe\") {\n            poolId := and(UINT24_MASK, poolId)\n            let ptr := mload(0x40)\n            mstore(0x40, poolId)\n            mstore(0x20, token1)\n            mstore(0x00, 0x00)\n            mstore(0x0c, shl(0x60, token0))\n            salt := keccak256(0x00, sub(0x60, shl(0x05, iszero(poolId))))\n            mstore(0x40, ptr)\n        }\n        if (_isEraVmUniV3Fork(forkId)) {\n            return IUniswapV3Pool(\n                AddressDerivation.deriveDeterministicContractEraVm(\n                    factory, salt, initHash, 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\n                )\n            );\n        } else {\n            return IUniswapV3Pool(AddressDerivation.deriveDeterministicContract(factory, salt, initHash));\n        }\n    }\n\n    function _uniV3ForkInfo(uint8 forkId) internal view virtual returns (address, bytes32, uint32);\n\n    function _uniV3ForkCallback(bytes calldata data) private returns (bytes memory) {\n        require(data.length >= 0x80);\n        int256 amount0Delta;\n        int256 amount1Delta;\n        assembly (\"memory-safe\") {\n            amount0Delta := calldataload(data.offset)\n            amount1Delta := calldataload(add(0x20, data.offset))\n            data.offset := add(data.offset, calldataload(add(0x40, data.offset)))\n            data.length := calldataload(data.offset)\n            data.offset := add(0x20, data.offset)\n        }\n        uniswapV3SwapCallback(amount0Delta, amount1Delta, data);\n        return new bytes(0);\n    }\n\n    /// @dev The UniswapV3 pool swap callback which pays the funds requested\n    ///      by the caller/pool to the pool. Can only be called by a valid\n    ///      UniswapV3 pool.\n    /// @param amount0Delta Token0 amount owed.\n    /// @param amount1Delta Token1 amount owed.\n    /// @param data Arbitrary data forwarded from swap() caller. A packed encoding of: payer, sellToken, (optionally: permit[0x20:], isForwarded, sig)\n    function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) private {\n        address payer;\n        assembly (\"memory-safe\") {\n            payer := shr(0x60, calldataload(data.offset))\n            data.length := sub(data.length, 0x14)\n            data.offset := add(0x14, data.offset)\n            // We don't check for underflow/array-out-of-bounds here because the trusted inithash\n            // ensures that `data` was passed through unmodified from `sellToUniswapV3` or\n            // `sellToUniswapV3VIP`. Therefore, it is at least 40 bytes long.\n        }\n        uint256 sellAmount = (amount0Delta > 0).ternary(uint256(amount0Delta), uint256(amount1Delta));\n        _pay(payer, sellAmount, data);\n    }\n\n    function _pay(address payer, uint256 amount, bytes calldata permit2Data) private {\n        if (payer == address(this)) {\n            IERC20 token;\n            assembly (\"memory-safe\") {\n                token := shr(0x60, calldataload(permit2Data.offset))\n            }\n            _checkRecipient(address(this), msg.sender, token);\n            token.safeTransfer(msg.sender, amount);\n        } else {\n            assert(payer == address(0));\n            ISignatureTransfer.PermitTransferFrom calldata permit;\n            bool isForwarded;\n            bytes calldata sig;\n            assembly (\"memory-safe\") {\n                // this is super dirty, but it works because although `permit` is aliasing in the\n                // middle of `payer`, because `payer` is all zeroes, it's treated as padding for the\n                // first word of `permit`, which is the sell token\n                permit := sub(permit2Data.offset, 0x0c)\n                isForwarded := shr(0xf8, calldataload(add(0x74, permit2Data.offset)))\n                sig.offset := add(0x75, permit2Data.offset)\n                sig.length := sub(permit2Data.length, 0x75)\n            }\n            ISignatureTransfer.SignatureTransferDetails memory transferDetails =\n                ISignatureTransfer.SignatureTransferDetails({to: msg.sender, requestedAmount: amount});\n            _transferFrom(permit, transferDetails, sig, isForwarded);\n        }\n    }\n}\n\n// src/core/UniswapV4.sol\n\ninterface IRebateClaimer {\n    function rebateClaimer() external view returns (address);\n}\n\nabstract contract UniswapV4 is SettlerSwapAbstract {\n    using SafeTransferLib for IERC20;\n    using UnsafeMath for uint256;\n    using UnsafeMath for int256;\n    using Ternary for bool;\n    using FastLogic for bool;\n    using CreditDebt for int256;\n    using UnsafePoolManager for IPoolManager;\n    using NotesLib for NotesLib.Note[];\n\n    function _uniV4ForkInfo(uint8 forkId) internal view virtual returns (IPoolManager poolManager);\n\n    //// These two functions are the entrypoints to this set of actions. Because UniV4 has a\n    //// mandatory callback, and the vast majority of the business logic has to be executed inside\n    //// the callback, they're pretty minimal. Both end up inside the last function in this file\n    //// `unlockCallback`, which is where most of the business logic lives. Primarily, these\n    //// functions are concerned with correctly encoding the argument to\n    //// `POOL_MANAGER.unlock(...)`. Pay special attention to the `payer` field, which is what\n    //// signals to the callback whether we should be spending a coupon.\n\n    //// `forkId` selects the pool manager of a UniswapV4 deployment. The master list of fork IDs\n    //// is `UNISWAPV4_FORKS.md` at the repository root.\n    ////\n    //// How to generate `fills` for UniV4:\n    ////\n    //// Linearize your DAG of fills by doing a topological sort on the tokens involved. In the\n    //// topological sort of tokens, when there is a choice of the next token, break ties by\n    //// preferring a token if it is the lexicographically largest token that is bought among fills\n    //// with sell token equal to the previous token in the topological sort. Then sort the fills\n    //// belonging to each sell token by their buy token. This technique isn't *quite* optimal, but\n    //// it's pretty close. The buy token of the final fill is special-cased. It is the token that\n    //// will be transferred to `recipient` and have its slippage checked against `amountOutMin`. In\n    //// the event that you are encoding a series of fills with more than one output token, ensure\n    //// that at least one of the global buy token's fills is positioned appropriately.\n    ////\n    //// Now that you have a list of fills, encode each fill as follows.\n    //// First encode the `ppm` for the fill as 3 bytes. Remember that this `ppm` is relative to the\n    //// running balance at the moment that the fill is settled.\n    //// Second, encode the price caps sqrtPriceLimitX96 as 20 bytes.\n    //// Third, encode the packing key for that fill as 1 byte. The packing key byte depends on the\n    //// tokens involved in the previous fill. The packing key for the first fill must be 1;\n    //// i.e. encode only the buy token for the first fill.\n    ////   0 -> sell and buy tokens remain unchanged from the previous fill (pure multiplex)\n    ////   1 -> sell token remains unchanged from the previous fill, buy token is encoded (diamond multiplex)\n    ////   2 -> sell token becomes the buy token from the previous fill, new buy token is encoded (multihop)\n    ////   3 -> both sell and buy token are encoded\n    //// Obviously, after encoding the packing key, you encode 0, 1, or 2 tokens (each as 20 bytes),\n    //// as appropriate.\n    //// The remaining fields of the fill are mandatory.\n    //// Fourth, encode the pool fee as 3 bytes, and the pool tick spacing as 3 bytes.\n    //// Fifth, encode the hook address as 20 bytes.\n    //// Sixth, encode the hook data for the fill. Encode the length of the hook data as 3 bytes,\n    //// then append the hook data itself.\n    ////\n    //// Repeat the process for each fill and concatenate the results without padding.\n\n    function sellToUniswapV4(\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encode(\n            uint32(IPoolManager.unlock.selector),\n            recipient,\n            sellToken,\n            ppm,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            amountOutMin,\n            0\n        );\n        bytes memory encodedBuyAmount = _setOperatorAndCall(\n            address(_uniV4ForkInfo(forkId)), data, uint32(IUnlockCallback.unlockCallback.selector), _uniV4Callback\n        );\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `unlockCallback` and that `unlockCallback` encoded the buy\n            // amount correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function sellToUniswapV4VIP(\n        address recipient,\n        uint8 forkId,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encodeVIP(\n            uint32(IPoolManager.unlock.selector),\n            recipient,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            permit,\n            sig,\n            _isForwarded(),\n            amountOutMin,\n            0\n        );\n        bytes memory encodedBuyAmount = _setOperatorAndCall(\n            address(_uniV4ForkInfo(forkId)), data, uint32(IUnlockCallback.unlockCallback.selector), _uniV4Callback\n        );\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `unlockCallback` and that `unlockCallback` encoded the buy\n            // amount correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function _uniV4Callback(bytes calldata data) private returns (bytes memory) {\n        // We know that our calldata is well-formed. Therefore, the first slot is 0x20 and the\n        // second slot is the length of the strict ABIEncoded payload\n        assembly (\"memory-safe\") {\n            data.length := calldataload(add(0x20, data.offset))\n            data.offset := add(0x40, data.offset)\n        }\n        return unlockCallback(data);\n    }\n\n    //// The following functions are the helper functions for `unlockCallback`. They abstract much\n    //// of the complexity of tracking which tokens need to be zeroed out at the end of the\n    //// callback.\n    ////\n    //// The two major pieces of state that are maintained through the callback are `Note[] memory\n    //// notes` and `State state`\n    ////\n    //// `notes` keeps track of the list of the tokens that have been touched throughout the\n    //// callback that have nonzero credit. At the end of the fills, all tokens with credit will be\n    //// swept back to Settler. These are the global buy token (against which slippage is checked)\n    //// and any other multiplex-out tokens. Only the global sell token is allowed to have debt, but\n    //// it is accounted slightly differently from the other tokens. The function `_take` is\n    //// responsible for iterating over the list of tokens and withdrawing any credit to the\n    //// appropriate recipient.\n    ////\n    //// `state` exists to reduce stack pressure and to simplify/gas-optimize the process of\n    //// swapping. By keeping track of the sell and buy token on each hop, we're able to compress\n    //// the representation of the fills required to satisfy the swap. Most often in a swap, the\n    //// tokens in adjacent fills are somewhat in common. By caching, we avoid having them appear\n    //// multiple times in the calldata.\n\n    // the mandatory fields are\n    // 3 - sell ppm\n    // 20 - sqrtPriceLimitX96\n    // 1 - pool key tokens case\n    // 3 - pool fee\n    // 3 - pool tick spacing\n    // 20 - pool hooks\n    // 3 - hook data length\n    uint256 private constant _HOP_DATA_LENGTH = 53;\n\n    /// Decode a `PoolKey` from its packed representation in `bytes` and the token information in\n    /// `state`. Returns the `zeroForOne` flag and the suffix of the bytes that are not consumed in\n    /// the decoding process.\n    function _setPoolKey(IPoolManager.PoolKey memory key, State state, bytes calldata data)\n        private\n        pure\n        returns (bool, bytes calldata)\n    {\n        (IERC20 sellToken, IERC20 buyToken) = (state.sell().token(), state.buy().token());\n        bool zeroForOne;\n        assembly (\"memory-safe\") {\n            let sellTokenShifted := shl(0x60, sellToken)\n            let buyTokenShifted := shl(0x60, buyToken)\n            zeroForOne := or(\n                eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, sellTokenShifted),\n                and(\n                    iszero(eq(0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000, buyTokenShifted)),\n                    lt(sellTokenShifted, buyTokenShifted)\n                )\n            )\n        }\n        (key.token0, key.token1) = zeroForOne.maybeSwap(buyToken, sellToken);\n\n        uint256 packed;\n        assembly (\"memory-safe\") {\n            packed := shr(0x30, calldataload(data.offset))\n\n            data.offset := add(0x1a, data.offset)\n            data.length := sub(data.length, 0x1a)\n            // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n        }\n\n        key.fee = uint24(packed >> 184);\n        key.tickSpacing = int24(uint24(packed >> 160));\n        key.hooks = IHooks.wrap(address(uint160(packed)));\n\n        return (zeroForOne, data);\n    }\n\n    function _pay(\n        IERC20 sellToken,\n        address payer,\n        uint256 sellAmount,\n        ISignatureTransfer.PermitTransferFrom calldata permit,\n        bool isForwarded,\n        bytes calldata sig\n    ) private returns (uint256) {\n        IPoolManager(msg.sender).unsafeSync(sellToken);\n        if (payer == address(this)) {\n            _checkRecipient(address(this), msg.sender, sellToken);\n            sellToken.safeTransfer(msg.sender, sellAmount);\n        } else {\n            // assert(payer == address(0));\n            ISignatureTransfer.SignatureTransferDetails memory transferDetails =\n                ISignatureTransfer.SignatureTransferDetails({to: msg.sender, requestedAmount: sellAmount});\n            _transferFrom(permit, transferDetails, sig, isForwarded);\n        }\n        return IPoolManager(msg.sender).unsafeSettle();\n    }\n\n    function unlockCallback(bytes calldata data) private returns (bytes memory) {\n        address recipient;\n        uint256 minBuyAmount;\n        uint256 hashMul;\n        uint256 hashMod;\n        bool feeOnTransfer;\n        address payer;\n        (data, recipient, minBuyAmount, hashMul, hashMod, feeOnTransfer, payer) = Decoder.decodeHeader(data);\n\n        // Set up `state` and `notes`. The other values are ancillary and might be used when we need\n        // to settle global sell token debt at the end of swapping.\n        (\n            bytes calldata newData,\n            State state,\n            NotesLib.Note[] memory notes,\n            ISignatureTransfer.PermitTransferFrom calldata permit,\n            bool isForwarded,\n            bytes calldata sig\n        ) = Decoder.initialize(data, hashMul, hashMod, payer);\n        {\n            NotePtr globalSell = state.globalSell();\n            if (payer != address(this)) {\n                globalSell.setAmount(\n                    _permitToSellAmountCalldata(\n                        address(0) /* sentinel for `_msgSender()` */,\n                        permit\n                    )\n                );\n            }\n            if (feeOnTransfer) {\n                globalSell.setAmount(_pay(globalSell.token(), payer, globalSell.amount(), permit, isForwarded, sig));\n            }\n            state.setGlobalSellAmount(globalSell.amount());\n        }\n        state.checkZeroSellAmount();\n        data = newData;\n\n        // Now that we've unpacked and decoded the header, we can begin decoding the array of swaps\n        // and executing them.\n        IPoolManager.PoolKey memory key;\n        IPoolManager.SwapParams memory params;\n        while (data.length >= _HOP_DATA_LENGTH) {\n            uint256 ppm;\n            {\n                uint160 sqrtPriceLimitX96;\n                assembly (\"memory-safe\") {\n                    ppm := shr(0xe8, calldataload(data.offset))\n                    data.offset := add(0x03, data.offset)\n\n                    sqrtPriceLimitX96 := shr(0x60, calldataload(data.offset))\n                    data.offset := add(0x14, data.offset)\n\n                    data.length := sub(data.length, 0x17)\n                    // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n                }\n                params.sqrtPriceLimitX96 = sqrtPriceLimitX96;\n            }\n\n            data = Decoder.updateState(state, notes, data);\n            bool zeroForOne;\n            (zeroForOne, data) = _setPoolKey(key, state, data);\n            bytes calldata hookData;\n            (data, hookData) = Decoder.decodeBytes(data);\n            Decoder.overflowCheck(data);\n\n            params.zeroForOne = zeroForOne;\n            unchecked {\n                params.amountSpecified = int256((state.sell().amount() * ppm).unsafeDiv(BASIS)).unsafeNeg();\n            }\n\n            BalanceDelta delta = IPoolManager(msg.sender).unsafeSwap(key, params, hookData);\n            {\n                (int256 settledSellAmount, int256 settledBuyAmount) =\n                    zeroForOne.maybeSwap(delta.amount1(), delta.amount0());\n                // Some insane hooks may increase the sell amount; obviously this may result in\n                // unavoidable reverts in some cases. But we still need to make sure that we don't\n                // underflow to avoid wildly unexpected behavior. The pool manager enforces that the\n                // settled sell amount cannot be positive\n                NotePtr sell = state.sell();\n                sell.setAmount(sell.amount() - uint256(settledSellAmount.unsafeNeg()));\n                // If `state.buy.amount()` overflows an `int128`, we'll get a revert inside the pool\n                // manager later. We cannot overflow a `uint256`.\n                unchecked {\n                    NotePtr buy = state.buy();\n                    buy.setAmount(buy.amount() + settledBuyAmount.asCredit(buy));\n                }\n            }\n        }\n\n        // `data` has been consumed. All that remains is to settle out the net result of all the\n        // swaps. Any credit in any token other than `state.buy.token` will be swept to\n        // Settler. `state.buy.token` will be sent to `recipient`.\n        {\n            NotePtr globalSell = state.globalSell();\n            (IERC20 globalSellToken, uint256 globalSellAmount) = (globalSell.token(), globalSell.amount());\n            _checkRecipient(\n                msg.sender, recipient, _recipientCheckNeedsToken() ? state.buy().token() : IERC20(address(0))\n            );\n            uint256 globalBuyAmount =\n                Take.take(state, notes, uint32(IPoolManager.take.selector), recipient, minBuyAmount);\n            if (feeOnTransfer) {\n                // We've already transferred the sell token to the pool manager and\n                // `settle`'d. `globalSellAmount` is the verbatim credit in that token stored by the\n                // pool manager. We only need to handle the case of incomplete filling.\n                if (globalSellAmount != 0) {\n                    address refundRecipient = payer == address(this) ? address(this) : _msgSender();\n                    _checkRecipient(msg.sender, refundRecipient, globalSellToken);\n                    Take._callSelector(\n                        uint32(IPoolManager.take.selector), globalSellToken, refundRecipient, globalSellAmount\n                    );\n                }\n            } else {\n                // While `notes` records a credit value, the pool manager actually records a debt\n                // for the global sell token. We recover the exact amount of that debt and then pay\n                // it.\n                // `globalSellAmount` is _usually_ zero, but if it isn't it represents a partial\n                // fill. This subtraction recovers the actual debt recorded in the pool manager.\n                uint256 debt;\n                unchecked {\n                    debt = state.globalSellAmount() - globalSellAmount;\n                }\n                if (debt == 0) {\n                    assembly (\"memory-safe\") {\n                        mstore(0x14, globalSellToken)\n                        mstore(0x00, 0xfb772a88000000000000000000000000) // selector for `ZeroSellAmount(address)` with `globalSellToken`'s padding\n                        revert(0x10, 0x24)\n                    }\n                }\n                if (isNative_1(globalSellToken)) {\n                    IPoolManager(msg.sender).unsafeSync(IERC20(address(0)));\n                    IPoolManager(msg.sender).unsafeSettle(debt);\n                } else {\n                    _pay(globalSellToken, payer, debt, permit, isForwarded, sig);\n                }\n            }\n\n            // return abi.encode(globalBuyAmount);\n            bytes memory returndata;\n            assembly (\"memory-safe\") {\n                returndata := mload(0x40)\n                mstore(returndata, 0x60)\n                mstore(add(0x20, returndata), 0x20)\n                mstore(add(0x40, returndata), 0x20)\n                mstore(add(0x60, returndata), globalBuyAmount)\n                mstore(0x40, add(0x80, returndata))\n            }\n            return returndata;\n        }\n    }\n\n    function _fallback(bytes calldata data) internal virtual override returns (bool success, bytes memory returndata) {\n        success = data.length >= 4;\n        uint256 selector;\n        assembly (\"memory-safe\") {\n            selector := shr(0xe0, calldataload(data.offset))\n        }\n        success = success.and(selector == uint32(IRebateClaimer.rebateClaimer.selector));\n        if (!success) {\n            return super._fallback(data);\n        }\n        assembly (\"memory-safe\") {\n            returndata := mload(0x40)\n            mstore(0x40, add(0x40, returndata))\n            mstore(returndata, 0x20)\n            mstore(add(0x20, returndata), 0x352650Ac2653508d946c4912B07895B22edd84CD) // an EOA owned by Scott\n        }\n    }\n}\n\n// src/core/BalancerV3.sol\n\ninterface IBalancerV3Vault {\n    /**\n     * @notice Creates a context for a sequence of operations (i.e., \"unlocks\" the Vault).\n     * @dev Performs a callback on msg.sender with arguments provided in `data`. The Callback is `transient`,\n     * meaning all balances for the caller have to be settled at the end.\n     *\n     * @param data Contains function signature and args to be passed to the msg.sender\n     * @return result Resulting data from the call\n     */\n    function unlock(bytes calldata data) external returns (bytes memory);\n\n    /**\n     * @notice Settles deltas for a token; must be successful for the current lock to be released.\n     * @dev Protects the caller against leftover dust in the Vault for the token being settled. The caller\n     * should know in advance how many tokens were paid to the Vault, so it can provide it as a hint to discard any\n     * excess in the Vault balance.\n     *\n     * If the given hint is equal to or higher than the difference in reserves, the difference in reserves is given as\n     * credit to the caller. If it's higher, the caller sent fewer tokens than expected, so settlement would fail.\n     *\n     * If the given hint is lower than the difference in reserves, the hint is given as credit to the caller.\n     * In this case, the excess would be absorbed by the Vault (and reflected correctly in the reserves), but would\n     * not affect settlement.\n     *\n     * The credit supplied by the Vault can be calculated as `min(reserveDifference, amountHint)`, where the reserve\n     * difference equals current balance of the token minus existing reserves of the token when the function is called.\n     *\n     * @param token Address of the token\n     * @param amountHint Amount paid as reported by the caller\n     * @return credit Credit received in return of the payment\n     */\n    function settle(IERC20 token, uint256 amountHint) external returns (uint256 credit);\n\n    /**\n     * @notice Sends tokens to a recipient.\n     * @dev There is no inverse operation for this function. Transfer funds to the Vault and call `settle` to cancel\n     * debts.\n     *\n     * @param token Address of the token\n     * @param to Recipient address\n     * @param amount Amount of tokens to send\n     */\n    function sendTo(IERC20 token, address to, uint256 amount) external;\n\n    enum SwapKind {\n        EXACT_IN,\n        EXACT_OUT\n    }\n\n    /**\n     * @notice Data passed into primary Vault `swap` operations.\n     * @param kind Type of swap (Exact In or Exact Out)\n     * @param pool The pool with the tokens being swapped\n     * @param tokenIn The token entering the Vault (balance increases)\n     * @param tokenOut The token leaving the Vault (balance decreases)\n     * @param amountGiven Amount specified for tokenIn or tokenOut (depending on the type of swap)\n     * @param limit Minimum or maximum value of the calculated amount (depending on the type of swap)\n     * @param userData Additional (optional) user data\n     */\n    struct VaultSwapParams {\n        SwapKind kind;\n        address pool;\n        IERC20 tokenIn;\n        IERC20 tokenOut;\n        uint256 amountGiven;\n        uint256 limit;\n        bytes userData;\n    }\n\n    /**\n     * @notice Swaps tokens based on provided parameters.\n     * @dev All parameters are given in raw token decimal encoding.\n     * @param vaultSwapParams Parameters for the swap (see above for struct definition)\n     * @return amountCalculated Calculated swap amount\n     * @return amountIn Amount of input tokens for the swap\n     * @return amountOut Amount of output tokens from the swap\n     */\n    function swap(VaultSwapParams memory vaultSwapParams)\n        external\n        returns (uint256 amountCalculated, uint256 amountIn, uint256 amountOut);\n\n    enum WrappingDirection {\n        WRAP,\n        UNWRAP\n    }\n\n    /**\n     * @notice Data for a wrap/unwrap operation.\n     * @param kind Type of swap (Exact In or Exact Out)\n     * @param direction Direction of the wrapping operation (Wrap or Unwrap)\n     * @param wrappedToken Wrapped token, compatible with interface ERC4626\n     * @param amountGiven Amount specified for tokenIn or tokenOut (depends on the type of swap and wrapping direction)\n     * @param limit Minimum or maximum amount specified for the other token (depends on the type of swap and wrapping\n     * direction)\n     */\n    struct BufferWrapOrUnwrapParams {\n        SwapKind kind;\n        WrappingDirection direction;\n        IERC4626 wrappedToken;\n        uint256 amountGiven;\n        uint256 limit;\n    }\n\n    /**\n     * @notice Wraps/unwraps tokens based on the parameters provided.\n     * @dev All parameters are given in raw token decimal encoding. It requires the buffer to be initialized,\n     * and uses the internal wrapped token buffer when it has enough liquidity to avoid external calls.\n     *\n     * @param params Parameters for the wrap/unwrap operation (see struct definition)\n     * @return amountCalculated Calculated swap amount\n     * @return amountIn Amount of input tokens for the swap\n     * @return amountOut Amount of output tokens from the swap\n     */\n    function erc4626BufferWrapOrUnwrap(BufferWrapOrUnwrapParams memory params)\n        external\n        returns (uint256 amountCalculated, uint256 amountIn, uint256 amountOut);\n}\n\nlibrary UnsafeVault {\n    function unsafeSettle(IBalancerV3Vault vault, IERC20 token, uint256 amount) internal returns (uint256 credit) {\n        assembly (\"memory-safe\") {\n            mstore(0x34, amount) // clobbers the upper (always zero) bits of the free memory pointer\n            mstore(0x14, token)\n            mstore(0x00, 0x15afd409000000000000000000000000) // selector for `settle(address,uint256)` with `token`'s padding\n\n            if iszero(call(gas(), vault, 0x00, 0x10, 0x44, 0x00, 0x20)) {\n                let ptr := and(0xffffff, mload(0x40))\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            credit := mload(0x00)\n\n            mstore(0x34, 0x00)\n        }\n    }\n\n    function unsafeSwap(IBalancerV3Vault vault, IBalancerV3Vault.VaultSwapParams memory params)\n        internal\n        returns (uint256 amountIn, uint256 amountOut)\n    {\n        assembly (\"memory-safe\") {\n            // `VaultSwapParams` is a dynamic type with exactly 1 sub-object, and that sub-object is\n            // dynamic (all the other members are value types). Therefore, the layout in calldata is\n            // nearly identical to the layout in memory, but there's an extra indirection offset\n            // that needs to be prepended. Also the pointer to `params.userData` needs to be\n            // transformed into an offset relative to the start of `params`.\n            // We know that it's safe to (temporarily) clobber the two words in memory immediately\n            // before `params` because they are user-allocated (they're part of `wrapParams`). If\n            // they were not user-allocated, this would be illegal as it could clobber a word that\n            // `solc` spilled from the stack into memory.\n\n            let ptr := mload(0x40)\n            let clobberedPtr0 := sub(params, 0x40)\n            let clobberedVal0 := mload(clobberedPtr0)\n            let clobberedPtr1 := sub(params, 0x20)\n            let clobberedVal1 := mload(clobberedPtr1)\n\n            mstore(clobberedPtr0, 0x2bfb780c) // selector for `swap((uint8,address,address,address,uint256,uint256,bytes))`\n            mstore(clobberedPtr1, 0x20) // indirection offset to the dynamic type `VaultSwapParams`\n\n            // Because we laid out `swapParams` as the last object in memory before\n            // `swapParam.userData`, the two objects are contiguous. Their encoding in calldata is\n            // exactly the same as their encoding in memory, but with pointers changed to offsets.\n            let userDataPtr := add(0xc0, params)\n            let userData := mload(userDataPtr)\n            let userDataLen := mload(userData)\n            // Convert the pointer `userData` into an offset relative to the start of its parent\n            // object (`params`), and replace it in memory to transform it to the calldata encoding\n            let len := sub(userData, params)\n            mstore(userDataPtr, len)\n            // Compute the length of the entire encoded object\n            len := add(0x20, add(userDataLen, len))\n            // The padding is a little wonky (we're not creating the Solidity-strict ABI encoding),\n            // but the Solidity ABIDecoder is relaxed enough that this doesn't matter.\n\n            // The length of the whole call's calldata is 36 bytes longer than the encoding of\n            // `params` in memory to account for the prepending of the selector (4 bytes) and the\n            // indirection offset (32 bytes)\n            if iszero(call(gas(), vault, 0x00, add(0x1c, clobberedPtr0), add(0x24, len), 0x00, 0x60)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            amountIn := mload(0x20)\n            amountOut := mload(0x40)\n\n            // mstore(userDataPtr, userData) // we don't need this because we're immediately going to deallocate\n            mstore(clobberedPtr0, clobberedVal0)\n            mstore(clobberedPtr1, clobberedVal1)\n            mstore(0x40, ptr)\n        }\n    }\n\n    function unsafeErc4626BufferWrapOrUnwrap(\n        IBalancerV3Vault vault,\n        IBalancerV3Vault.BufferWrapOrUnwrapParams memory params\n    ) internal returns (uint256 amountIn, uint256 amountOut) {\n        assembly (\"memory-safe\") {\n            // `BufferWrapOrUnwrapParams` is a static type and contains no sub-objects (all its\n            // members are value types), so the layout in calldata is just the layout in memory,\n            // without any indirection.\n            // We know that it's safe to (temporarily) clobber the word in memory immediately before\n            // `params` because it is user-allocated (it's part of the `Notes` heap). If it were not\n            // user-allocated, this would be illegal as it could clobber a word that `solc` spilled\n            // from the stack into memory.\n\n            let ptr := mload(0x40)\n            let clobberedPtr := sub(params, 0x20)\n            let clobberedVal := mload(clobberedPtr)\n            mstore(clobberedPtr, 0x43583be5) // selector for `erc4626BufferWrapOrUnwrap((uint8,uint8,address,uint256,uint256))`\n\n            if iszero(call(gas(), vault, 0x00, add(0x1c, clobberedPtr), 0xa4, 0x00, 0x60)) {\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            amountIn := mload(0x20)\n            amountOut := mload(0x40)\n\n            mstore(clobberedPtr, clobberedVal)\n            mstore(0x40, ptr)\n        }\n    }\n}\n\nIBalancerV3Vault constant VAULT = IBalancerV3Vault(0xbA1333333333a1BA1108E8412f11850A5C319bA9);\n\nabstract contract BalancerV3 is SettlerSwapAbstract, FreeMemory {\n    using SafeTransferLib for IERC20;\n    using UnsafeMath for uint256;\n    using NotesLib for NotesLib.Note[];\n    using Ternary for bool;\n\n    using UnsafeVault for IBalancerV3Vault;\n\n    //// How to generate `fills` for BalancerV3:\n    ////\n    //// Linearize your DAG of fills by doing a topological sort on the tokens involved. Swapping\n    //// against a boosted pool (usually) creates 3 fills: wrap, swap, unwrap. The tokens involved\n    //// includes each ERC4626 tokenized vault token for any boosted pools. In the topological sort\n    //// of tokens, when there is a choice of the next token, break ties by preferring a token if it\n    //// is the lexicographically largest token that is bought among fills with sell token equal to\n    //// the previous token in the topological sort. Then sort the fills belonging to each sell\n    //// token by their buy token. This technique isn't *quite* optimal, but it's pretty close. The\n    //// buy token of the final fill is special-cased. It is the token that will be transferred to\n    //// `recipient` and have its slippage checked against `amountOutMin`. In the event that you are\n    //// encoding a series of fills with more than one output token, ensure that at least one of the\n    //// global buy token's fills is positioned appropriately.\n    ////\n    //// Now that you have a list of fills, encode each fill as follows.\n    //// First, decide if the fill is a swap or an ERC4626 wrap/unwrap.\n    //// Second, encode the `ppm` for the fill as 3 bytes. Remember that this `ppm` is relative to\n    //// the running balance at the moment that the fill is settled. If the fill is a wrap, set the\n    //// most significant bit of `ppm`. If the fill is an unwrap, set the second most significant\n    //// bit of `ppm`\n    //// Third, encode the packing key for that fill as 1 byte. The packing key byte depends on the\n    //// tokens involved in the previous fill. If the fill is a wrap, the buy token must be the\n    //// ERC4626 vault. If the fill is an unwrap, the sell token must be the ERC4626 vault. If the\n    //// fill is a swap against a boosted pool, both sell and buy tokens must be ERC4626 vaults. God\n    //// help you if you're dealing with a boosted pool where only some of the tokens involved are\n    //// ERC4626. The packing key for the first fill must be 1; i.e. encode only the buy token for\n    //// the first fill.\n    ////   0 -> sell and buy tokens remain unchanged from the previous fill (pure multiplex)\n    ////   1 -> sell token remains unchanged from the previous fill, buy token is encoded (diamond multiplex)\n    ////   2 -> sell token becomes the buy token from the previous fill, new buy token is encoded (multihop)\n    ////   3 -> both sell and buy token are encoded\n    //// Obviously, after encoding the packing key, you encode 0, 1, or 2 tokens (each as 20 bytes),\n    //// as appropriate.\n    //// If the fill is a wrap/unwrap, you're done. Move on to the next fill. If the fill is a swap,\n    //// the following fields are mandatory:\n    //// Fourth, encode the pool address as 20 bytes.\n    //// Fifth, encode the hook data for the fill. Encode the length of the hook data as 3 bytes,\n    //// then append the hook data itself.\n    ////\n    //// Repeat the process for each fill and concatenate the results without padding.\n\n    function sellToBalancerV3(\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encode(\n            uint32(IBalancerV3Vault.unlock.selector),\n            recipient,\n            sellToken,\n            ppm,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            amountOutMin,\n            0\n        );\n        // If, for some insane reason, the first 4 bytes of `recipient` alias the selector for the\n        // only mutative function of Settler (`execute` or `executeMetaTxn`, as appropriate), then\n        // this call will revert. We will encounter a revert in the nested call to\n        // `execute`/`executeMetaTxn` because Settler is reentrancy-locked (this revert is\n        // bubbled). If, instead, it aliases a non-mutative function of Settler, we would encounter\n        // a revert inside `TransientStorage.checkSpentOperatorAndCallback` because the transient\n        // storage slot was not zeroed. This would happen by accident with negligible probability,\n        // and is merely annoying if it does happen.\n        bytes memory encodedBuyAmount =\n            _setOperatorAndCall(address(VAULT), data, uint32(uint256(uint160(recipient)) >> 128), _balV3Callback);\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `balV3UnlockCallback` and that `balV3UnlockCallback` encoded the\n            // buy amount correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function sellToBalancerV3VIP(\n        address recipient,\n        bool feeOnTransfer,\n        uint256 hashMul,\n        uint256 hashMod,\n        bytes memory fills,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        bytes memory sig,\n        uint256 amountOutMin\n    ) internal returns (uint256 buyAmount) {\n        bytes memory data = Encoder.encodeVIP(\n            uint32(IBalancerV3Vault.unlock.selector),\n            recipient,\n            feeOnTransfer,\n            hashMul,\n            hashMod,\n            fills,\n            permit,\n            sig,\n            _isForwarded(),\n            amountOutMin,\n            0\n        );\n        // See comment in `sellToBalancerV3` about why `recipient` aliasing a valid selector is\n        // ultimately harmless.\n        bytes memory encodedBuyAmount =\n            _setOperatorAndCall(address(VAULT), data, uint32(uint256(uint160(recipient)) >> 128), _balV3Callback);\n        // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256));\n        assembly (\"memory-safe\") {\n            // We can skip all the checks performed by `abi.decode` because we know that this is the\n            // verbatim result from `balV3UnlockCallback` and that `balV3UnlockCallback` encoded the\n            // buy amount correctly.\n            buyAmount := mload(add(0x60, encodedBuyAmount))\n        }\n    }\n\n    function _balV3Callback(bytes calldata) private returns (bytes memory) {\n        // `VAULT` doesn't prepend a selector and ABIEncode the payload. It just echoes the decoded\n        // payload verbatim back to us. Therefore, we use `_msgData()` instead of the argument to\n        // this function because `_msgData()` still has the first 4 bytes of the payload attached.\n        return balV3UnlockCallback(_msgData());\n    }\n\n    function _setSwapParams(IBalancerV3Vault.VaultSwapParams memory swapParams, State state, bytes calldata data)\n        private\n        pure\n        returns (bytes calldata)\n    {\n        assembly (\"memory-safe\") {\n            mstore(add(0x20, swapParams), shr(0x60, calldataload(data.offset)))\n            data.offset := add(0x14, data.offset)\n            data.length := sub(data.length, 0x14)\n            // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n        }\n        swapParams.tokenIn = state.sell().token();\n        swapParams.tokenOut = state.buy().token();\n        return data;\n    }\n\n    function _decodeUserdataAndSwap(\n        IBalancerV3Vault.VaultSwapParams memory swapParams,\n        State state,\n        bytes calldata data\n    ) private DANGEROUS_freeMemory returns (bytes calldata) {\n        (data, swapParams.userData) = Decoder.decodeBytes(data);\n        Decoder.overflowCheck(data);\n\n        (uint256 amountIn, uint256 amountOut) = IBalancerV3Vault(msg.sender).unsafeSwap(swapParams);\n        unchecked {\n            // `amountIn` is always exactly `swapParams.amountGiven`\n            NotePtr sell = state.sell();\n            sell.setAmount(sell.amount() - amountIn);\n        }\n\n        // `amountOut` can never get super close to `type(uint256).max` because `VAULT` does its\n        // internal calculations in fixnum with a basis of `1 ether`, giving us a headroom of ~60\n        // bits. However, `state.buy.amount` may be an agglomeration of values returned by ERC4626\n        // vaults, and there is no implicit restriction on those values.\n        NotePtr buy = state.buy();\n        buy.setAmount(buy.amount() + amountOut);\n        assembly (\"memory-safe\") {\n            mstore(add(0xc0, swapParams), 0x60)\n        }\n\n        return data;\n    }\n\n    function _erc4626WrapUnwrap(IBalancerV3Vault.BufferWrapOrUnwrapParams memory wrapParams, State state) private {\n        (uint256 amountIn, uint256 amountOut) = IBalancerV3Vault(msg.sender).unsafeErc4626BufferWrapOrUnwrap(wrapParams);\n        unchecked {\n            // `amountIn` is always exactly `wrapParams.amountGiven`\n            NotePtr sell = state.sell();\n            sell.setAmount(sell.amount() - amountIn);\n        }\n        // `amountOut` may depend on the behavior of the ERC4626 vault. We can make no assumptions\n        // about the reasonableness of the range of values that may be returned.\n        NotePtr buy = state.buy();\n        buy.setAmount(buy.amount() + amountOut);\n    }\n\n    function _balV3Pay(\n        IERC20 sellToken,\n        address payer,\n        uint256 sellAmount,\n        ISignatureTransfer.PermitTransferFrom calldata permit,\n        bool isForwarded,\n        bytes calldata sig\n    ) private returns (uint256) {\n        if (payer == address(this)) {\n            if (sellAmount != 0) {\n                _checkRecipient(address(this), msg.sender, sellToken);\n                sellToken.safeTransfer(msg.sender, sellAmount);\n            }\n        } else {\n            // assert(payer == address(0));\n            ISignatureTransfer.SignatureTransferDetails memory transferDetails =\n                ISignatureTransfer.SignatureTransferDetails({to: msg.sender, requestedAmount: sellAmount});\n            _transferFrom(permit, transferDetails, sig, isForwarded);\n        }\n        return IBalancerV3Vault(msg.sender).unsafeSettle(sellToken, sellAmount);\n    }\n\n    // the mandatory fields are\n    // 3 - sell ppm\n    // 1 - pool key tokens case\n    uint256 private constant _HOP_DATA_LENGTH = 4;\n\n    function balV3UnlockCallback(bytes calldata data) private returns (bytes memory) {\n        address recipient;\n        uint256 minBuyAmount;\n        uint256 hashMul;\n        uint256 hashMod;\n        bool feeOnTransfer;\n        address payer;\n        (data, recipient, minBuyAmount, hashMul, hashMod, feeOnTransfer, payer) = Decoder.decodeHeader(data);\n\n        // Set up `state` and `notes`. The other values are ancillary and might be used when we need\n        // to settle global sell token debt at the end of swapping.\n        (\n            bytes calldata newData,\n            State state,\n            NotesLib.Note[] memory notes,\n            ISignatureTransfer.PermitTransferFrom calldata permit,\n            bool isForwarded,\n            bytes calldata sig\n        ) = Decoder.initialize(data, hashMul, hashMod, payer);\n        {\n            NotePtr globalSell = state.globalSell();\n            if (payer != address(this)) {\n                globalSell.setAmount(\n                    _permitToSellAmountCalldata(\n                        address(0) /* sentinel for `_msgSender()` */,\n                        permit\n                    )\n                );\n            }\n            if (feeOnTransfer) {\n                globalSell.setAmount(\n                    _balV3Pay(globalSell.token(), payer, globalSell.amount(), permit, isForwarded, sig)\n                );\n            }\n            state.setGlobalSellAmount(globalSell.amount());\n        }\n        state.checkZeroSellAmount();\n        data = newData;\n\n        IBalancerV3Vault.BufferWrapOrUnwrapParams memory wrapParams;\n        /*\n        wrapParams.kind = IBalancerV3Vault.SwapKind.EXACT_IN;\n        wrapParams.limit = 0; // TODO: price limits for partial filling\n        */\n\n        // We position `swapParams` at the end of allocated memory so that when we `calldatacopy`\n        // the `userData`, it ends up contiguous\n        IBalancerV3Vault.VaultSwapParams memory swapParams;\n        /*\n        swapParams.kind = IBalancerV3Vault.SwapKind.EXACT_IN;\n        swapParams.limit = 0; // TODO: price limits for partial filling\n        */\n\n        while (data.length >= _HOP_DATA_LENGTH) {\n            uint256 ppm;\n            {\n                uint256 _basis = BASIS;\n                assembly (\"memory-safe\") {\n                    ppm := shr(0xe8, calldataload(data.offset))\n                    if gt(and(0x3fffff, ppm), _basis) {\n                        mstore(0x00, 0x4e487b71) // selector for `Panic(uint256)`\n                        mstore(0x20, 0x11) // arithmetic overflow\n                        revert(0x1c, 0x24)\n                    }\n\n                    data.offset := add(0x03, data.offset)\n                    data.length := sub(data.length, 0x03)\n                    // we don't check for array out-of-bounds here; we will check it later in `Decoder.overflowCheck`\n                }\n            }\n            data = Decoder.updateState(state, notes, data);\n\n            if (ppm & 0xc00000 == 0) {\n                data = _setSwapParams(swapParams, state, data);\n                unchecked {\n                    swapParams.amountGiven = (state.sell().amount() * ppm).unsafeDiv(BASIS);\n                }\n                data = _decodeUserdataAndSwap(swapParams, state, data);\n            } else {\n                Decoder.overflowCheck(data);\n\n                if (ppm & 0x400000 == 0) {\n                    wrapParams.direction = IBalancerV3Vault.WrappingDirection.WRAP;\n                    wrapParams.wrappedToken = IERC4626(address(state.buy().token()));\n                } else {\n                    wrapParams.direction = IBalancerV3Vault.WrappingDirection.UNWRAP;\n                    wrapParams.wrappedToken = IERC4626(address(state.sell().token()));\n                }\n                ppm &= 0x3fffff;\n                unchecked {\n                    wrapParams.amountGiven = (state.sell().amount() * ppm).unsafeDiv(BASIS);\n                }\n\n                _erc4626WrapUnwrap(wrapParams, state);\n            }\n        }\n\n        // `data` has been consumed. All that remains is to settle out the net result of all the\n        // swaps. Any credit in any token other than `state.buy.token` will be swept to\n        // Settler. `state.buy.token` will be sent to `recipient`.\n        {\n            NotePtr globalSell = state.globalSell();\n            (IERC20 globalSellToken, uint256 globalSellAmount) = (globalSell.token(), globalSell.amount());\n            _checkRecipient(\n                msg.sender, recipient, _recipientCheckNeedsToken() ? state.buy().token() : IERC20(address(0))\n            );\n            uint256 globalBuyAmount =\n                Take.take(state, notes, uint32(IBalancerV3Vault.sendTo.selector), recipient, minBuyAmount);\n            if (feeOnTransfer) {\n                // We've already transferred the sell token to the vault and\n                // `settle`'d. `globalSellAmount` is the verbatim credit in that token stored by the\n                // vault. We only need to handle the case of incomplete filling.\n                if (globalSellAmount != 0) {\n                    address refundRecipient = payer == address(this) ? address(this) : _msgSender();\n                    _checkRecipient(msg.sender, refundRecipient, globalSellToken);\n                    Take._callSelector(\n                        uint32(IBalancerV3Vault.sendTo.selector), globalSellToken, refundRecipient, globalSellAmount\n                    );\n                }\n            } else {\n                // While `notes` records a credit value, the vault actually records a debt for the\n                // global sell token. We recover the exact amount of that debt and then pay it.\n                // `globalSellAmount` is _usually_ zero, but if it isn't it represents a partial\n                // fill. This subtraction recovers the actual debt recorded in the vault.\n                uint256 debt;\n                unchecked {\n                    debt = state.globalSellAmount() - globalSellAmount;\n                }\n                if (debt == 0) {\n                    assembly (\"memory-safe\") {\n                        mstore(0x14, globalSellToken)\n                        mstore(0x00, 0xfb772a88000000000000000000000000) // selector for `ZeroSellAmount(address)` with `globalSellToken`'s padding\n                        revert(0x10, 0x24)\n                    }\n                }\n                _balV3Pay(globalSellToken, payer, debt, permit, isForwarded, sig);\n            }\n\n            bytes memory returndata;\n            assembly (\"memory-safe\") {\n                returndata := mload(0x40)\n                mstore(returndata, 0x20)\n                mstore(add(0x20, returndata), globalBuyAmount)\n                mstore(0x40, add(0x40, returndata))\n            }\n            return returndata;\n        }\n    }\n}\n\n// src/core/MaverickV2.sol\n\n// Maverick AMM V2 is not open-source. The source code was disclosed to the\n// developers of 0x Settler confidentially and recompiled privately. The\n// deployed bytecode inithash matches the privately recompiled inithash.\nbytes32 constant maverickV2InitHash = 0xbb7b783eb4b8ca46925c5384a6b9919df57cb83da8f76e37291f58d0dd5c439a;\n\n// https://docs.mav.xyz/technical-reference/contract-addresses/v2-contract-addresses\n// For chains: mainnet, base, bnb, arbitrum, sepolia\naddress constant maverickV2Factory = 0x0A7e848Aca42d879EF06507Fca0E7b33A0a63c1e;\n\ninterface IMaverickV2Pool {\n    /**\n     * @notice Parameters for swap.\n     * @param amount Amount of the token that is either the input if exactOutput is false\n     * or the output if exactOutput is true.\n     * @param tokenAIn Boolean indicating whether tokenA is the input.\n     * @param exactOutput Boolean indicating whether the amount specified is\n     * the exact output amount (true).\n     * @param tickLimit The furthest tick a swap will execute in. If no limit\n     * is desired, value should be set to type(int32).max for a tokenAIn swap\n     * and type(int32).min for a swap where tokenB is the input.\n     */\n    struct SwapParams {\n        uint256 amount;\n        bool tokenAIn;\n        bool exactOutput;\n        int32 tickLimit;\n    }\n\n    /**\n     * @notice Swap tokenA/tokenB assets in the pool.  The swap user has two\n     * options for funding their swap.\n     * - The user can push the input token amount to the pool before calling\n     * the swap function. In order to avoid having the pool call the callback,\n     * the user should pass a zero-length `data` bytes object with the swap\n     * call.\n     * - The user can send the input token amount to the pool when the pool\n     * calls the `maverickV2SwapCallback` function on the calling contract.\n     * That callback has input parameters that specify the token address of the\n     * input token, the input and output amounts, and the bytes data sent to\n     * the swap function.\n     * @dev  If the users elects to do a callback-based swap, the output\n     * assets will be sent before the callback is called, allowing the user to\n     * execute flash swaps.  However, the pool does have reentrancy protection,\n     * so a swapper will not be able to interact with the same pool again\n     * while they are in the callback function.\n     * @param recipient The address to receive the output tokens.\n     * @param params Parameters containing the details of the swap\n     * @param data Bytes information that gets passed to the callback.\n     */\n    function swap(address recipient, SwapParams calldata params, bytes calldata data)\n        external\n        returns (uint256 amountIn, uint256 amountOut);\n\n    /**\n     * @notice Pool tokenA.  Address of tokenA is such that tokenA < tokenB.\n     */\n    function tokenA() external view returns (IERC20);\n\n    /**\n     * @notice Pool tokenB.\n     */\n    function tokenB() external view returns (IERC20);\n\n    /**\n     * @notice State of the pool.\n     * @param reserveA Pool tokenA balanceOf at end of last operation\n     * @param reserveB Pool tokenB balanceOf at end of last operation\n     * @param lastTwaD8 Value of log time weighted average price at last block.\n     * Value is 8-decimal scale and is in the fractional tick domain.  E.g. a\n     * value of 12.3e8 indicates the TWAP was 3/10ths of the way into the 12th\n     * tick.\n     * @param lastLogPriceD8 Value of log price at last block. Value is\n     * 8-decimal scale and is in the fractional tick domain.  E.g. a value of\n     * 12.3e8 indicates the price was 3/10ths of the way into the 12th tick.\n     * @param lastTimestamp Last block.timestamp value in seconds for latest\n     * swap transaction.\n     * @param activeTick Current tick position that contains the active bins.\n     * @param isLocked Pool isLocked, E.g., locked or unlocked; isLocked values\n     * defined in Pool.sol.\n     * @param binCounter Index of the last bin created.\n     * @param protocolFeeRatioD3 Ratio of the swap fee that is kept for the\n     * protocol.\n     */\n    struct State {\n        uint128 reserveA;\n        uint128 reserveB;\n        int64 lastTwaD8;\n        int64 lastLogPriceD8;\n        uint40 lastTimestamp;\n        int32 activeTick;\n        bool isLocked;\n        uint32 binCounter;\n        uint8 protocolFeeRatioD3;\n    }\n\n    /**\n     * @notice External function to get the state of the pool.\n     */\n    function getState() external view returns (State memory);\n}\n\nlibrary FastMaverickV2Pool {\n    using Ternary for bool;\n    using FastLogic for bool;\n\n    function fastTokenAOrB(IMaverickV2Pool pool, bool tokenAIn) internal view returns (IERC20) {\n        return fastGetToken(\n            address(pool),\n            tokenAIn.ternary(uint32(IMaverickV2Pool.tokenA.selector), uint32(IMaverickV2Pool.tokenB.selector))\n        );\n    }\n\n    function fastEncodeSwap(\n        IMaverickV2Pool,\n        address recipient,\n        uint256 amount,\n        bool tokenAIn,\n        int256 tickLimit,\n        bytes memory swapCallbackData\n    ) internal pure returns (bytes memory data) {\n        assembly (\"memory-safe\") {\n            data := mload(0x40)\n\n            let swapCallbackDataLength := mload(swapCallbackData)\n\n            mcopy(add(0xe4, data), swapCallbackData, add(0x20, swapCallbackDataLength))\n            mstore(add(0xc4, data), 0xc0)\n            mstore(add(0xa4, data), signextend(0x03, tickLimit))\n            mstore(add(0x84, data), 0x00) // exactOutput is false\n            mstore(add(0x64, data), lt(0x00, tokenAIn))\n            mstore(add(0x44, data), amount)\n            mstore(add(0x24, data), recipient)\n            mstore(add(0x10, data), 0x3eece7db000000000000000000000000) // selector for `swap(address,(uint256,bool,bool,int32),bytes)` with `recipient`'s padding\n            mstore(data, add(0xe4, swapCallbackDataLength))\n\n            mstore(0x40, add(0x120, add(data, swapCallbackDataLength)))\n        }\n    }\n\n    function fastGetFromPoolState(IMaverickV2Pool pool, uint256 pos, uint256 sizeBits)\n        internal\n        view\n        returns (uint256 r)\n    {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(0x00, 0x1865c57d) // selector for `getState()`\n            if iszero(staticcall(gas(), pool, 0x1c, 0x04, ptr, 0x120)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n            r := mload(add(pos, ptr))\n            if or(gt(0x120, returndatasize()), shr(sizeBits, r)) { revert(0x00, 0x00) }\n        }\n    }\n\n    function fastGetReserveAOrB(IMaverickV2Pool pool, bool tokenAIn) internal view returns (uint128 r) {\n        return uint128(fastGetFromPoolState(pool, (!tokenAIn).toUint() << 5, 128));\n    }\n}\n\ninterface IMaverickV2SwapCallback {\n    function maverickV2SwapCallback(IERC20 tokenIn, uint256 amountIn, uint256 amountOut, bytes calldata data) external;\n}\n\nabstract contract MaverickV2 is SettlerSwapAbstract {\n    using UnsafeMath for uint256;\n    using SafeTransferLib for IERC20;\n    using FastMaverickV2Pool for IMaverickV2Pool;\n    using Ternary for bool;\n    using Revert for bool;\n\n    function _sellToMaverickV2(\n        IMaverickV2Pool pool,\n        address recipient,\n        bool tokenAIn,\n        uint256 amount,\n        int32 tickLimit,\n        uint256 minBuyAmount\n    ) private returns (uint256 buyAmount) {\n        bytes memory data = pool.fastEncodeSwap(recipient, amount, tokenAIn, tickLimit, new bytes(0));\n\n        assembly (\"memory-safe\") {\n            if iszero(call(gas(), pool, 0x00, add(0x20, data), mload(data), 0x00, 0x40)) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0x00, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            buyAmount := mload(0x20)\n        }\n\n        if (buyAmount < minBuyAmount) {\n            revertTooMuchSlippage(pool.fastTokenAOrB(!tokenAIn), minBuyAmount, buyAmount);\n        }\n    }\n\n    function sellToMaverickV2(\n        address recipient,\n        IERC20 sellToken,\n        uint256 ppm,\n        IMaverickV2Pool pool,\n        bool tokenAIn,\n        int32 tickLimit,\n        uint256 minBuyAmount\n    ) internal returns (uint256 buyAmount) {\n        uint256 sellAmount;\n        if (ppm != 0) {\n            unchecked {\n                // We don't care about phantom overflow here because reserves\n                // are limited to 128 bits. Any token balance that would\n                // overflow here would also break MaverickV2.\n                sellAmount = (sellToken.fastSpendableBalance() * ppm).unsafeDiv(BASIS);\n            }\n            _checkRecipient(address(this), address(pool), sellToken);\n            sellToken.safeTransfer(address(pool), sellAmount);\n        } else {\n            sellAmount = sellToken.fastBalanceOf(address(pool));\n            unchecked {\n                sellAmount -= pool.fastGetReserveAOrB(tokenAIn);\n            }\n        }\n        _checkRecipient(\n            address(pool), recipient, _recipientCheckNeedsToken() ? pool.fastTokenAOrB(!tokenAIn) : IERC20(address(0))\n        );\n        return _sellToMaverickV2(pool, recipient, tokenAIn, sellAmount, tickLimit, minBuyAmount);\n    }\n}\n\n// src/core/Permit2Payment.sol\n\nISignatureTransfer constant PERMIT2 = ISignatureTransfer(0x000000000022D473030F116dDEE9F6B43aC78BA3);\n\nlibrary FunctionPointerChecker {\n    function isNull(function(bytes calldata) internal returns (bytes memory) callback) internal pure returns (bool r) {\n        assembly (\"memory-safe\") {\n            r := iszero(callback)\n        }\n    }\n}\n\nlibrary TransientStorage {\n    // bytes32((uint256(keccak256(\"operator slot\")) - 1) & type(uint96).max)\n    bytes32 private constant _OPERATOR_SLOT = 0x0000000000000000000000000000000000000000cdccd5c65a7d4860ce3abbe9;\n    // bytes32((uint256(keccak256(\"witness slot\")) - 1) & type(uint96).max)\n    bytes32 private constant _WITNESS_SLOT = 0x0000000000000000000000000000000000000000c7aebfbc05485e093720deaa;\n    // bytes32((uint256(keccak256(\"payer slot\")) - 1) & type(uint96).max)\n    bytes32 private constant _PAYER_SLOT = 0x0000000000000000000000000000000000000000cd1e9517bb0cb8d0d5cde893;\n\n    // We assume (and our CI enforces) that internal function pointers cannot be\n    // greater than 2 bytes. On chains not supporting the ViaIR pipeline, not\n    // supporting EOF, and where the Spurious Dragon size limit is not enforced,\n    // it might be possible to violate this assumption. However, our\n    // `foundry.toml` enforces the use of the IR pipeline, so the point is moot.\n    //\n    // `operator` must not be `address(0)`. This is not checked.\n    // `callback` must not be zero. This is checked in `fallback`.\n    function setOperatorAndCallback(\n        address operator,\n        uint32 selector,\n        function(bytes calldata) internal returns (bytes memory) callback\n    ) internal {\n        address payer = getPayer();\n        assembly (\"memory-safe\") {\n            if iszero(shl(0x60, xor(payer, operator))) {\n                mstore(0x00, 0xe758b8d5) // selector for `ConfusedDeputy()`\n                revert(0x1c, 0x04)\n            }\n            let slotValue := tload(_OPERATOR_SLOT)\n            if slotValue {\n                // It should be impossible to reach this error because the first thing the fallback\n                // does is clear the operator. It's also not possible to reenter the entrypoint\n                // function because `_PAYER_SLOT` is an implicit reentrancy guard.\n                mstore(0x00, 0xab7646c4) // selector for `ReentrantCallback(uint256)`\n                mstore(0x20, slotValue)\n                revert(0x1c, 0x24)\n            }\n\n            tstore(\n                _OPERATOR_SLOT,\n                or(\n                    shl(0xe0, selector),\n                    or(shl(0xa0, and(0xffff, callback)), and(0xffffffffffffffffffffffffffffffffffffffff, operator))\n                )\n            )\n        }\n    }\n\n    function checkSpentOperatorAndCallback() internal view {\n        assembly (\"memory-safe\") {\n            let slotValue := tload(_OPERATOR_SLOT)\n            if slotValue {\n                mstore(0x00, 0xd66fcc38) // selector for `CallbackNotSpent(uint256)`\n                mstore(0x20, slotValue)\n                revert(0x1c, 0x24)\n            }\n        }\n    }\n\n    function clearOperatorAndCallback() internal {\n        assembly (\"memory-safe\") {\n            tstore(_OPERATOR_SLOT, 0x00)\n        }\n    }\n\n    function getAndClearCallback()\n        internal\n        returns (function(bytes calldata) internal returns (bytes memory) callback)\n    {\n        assembly (\"memory-safe\") {\n            let slotValue := tload(_OPERATOR_SLOT)\n            let success :=\n                iszero(or(shr(0xe0, xor(calldataload(0x00), slotValue)), shl(0x60, xor(caller(), slotValue))))\n            callback := mul(and(0xffff, shr(0xa0, slotValue)), success)\n            if success {\n                tstore(_OPERATOR_SLOT, 0x00)\n            }\n        }\n    }\n\n    // `newWitness` must not be `bytes32(0)`. This is not checked.\n    function setWitness(bytes32 newWitness) internal {\n        assembly (\"memory-safe\") {\n            let slotValue := tload(_WITNESS_SLOT)\n            if slotValue {\n                // It should be impossible to reach this error because the first thing a\n                // metatransaction does on entry is to spend the `witness` (either directly or via a\n                // callback)\n                mstore(0x00, 0x9936cbab) // selector for `ReentrantMetatransaction(bytes32)`\n                mstore(0x20, slotValue)\n                revert(0x1c, 0x24)\n            }\n\n            tstore(_WITNESS_SLOT, newWitness)\n        }\n    }\n\n    function checkSpentWitness() internal view {\n        assembly (\"memory-safe\") {\n            let slotValue := tload(_WITNESS_SLOT)\n            if slotValue {\n                mstore(0x00, 0xe25527c2) // selector for `WitnessNotSpent(bytes32)`\n                mstore(0x20, slotValue)\n                revert(0x1c, 0x24)\n            }\n        }\n    }\n\n    function getAndClearWitness() internal returns (bytes32 witness) {\n        assembly (\"memory-safe\") {\n            witness := tload(_WITNESS_SLOT)\n            tstore(_WITNESS_SLOT, 0x00)\n        }\n    }\n\n    function setPayer(address payer) internal {\n        assembly (\"memory-safe\") {\n            if iszero(shl(0x60, payer)) {\n                mstore(0x00, 0xe758b8d5) // selector for `ConfusedDeputy()`\n                revert(0x1c, 0x04)\n            }\n            let slotValue := tload(_PAYER_SLOT)\n            if shl(0x60, slotValue) {\n                mstore(0x14, slotValue)\n                mstore(0x00, 0x7407c0f8000000000000000000000000) // selector for `ReentrantPayer(address)` with `oldPayer`'s padding\n                revert(0x10, 0x24)\n            }\n\n            tstore(_PAYER_SLOT, and(0xffffffffffffffffffffffffffffffffffffffff, payer))\n        }\n    }\n\n    function getPayer() internal view returns (address payer) {\n        assembly (\"memory-safe\") {\n            payer := tload(_PAYER_SLOT)\n        }\n    }\n\n    function setAttested() internal {\n        // transient[payerSlot] |= 1 << 160\n        assembly (\"memory-safe\") {\n            tstore(_PAYER_SLOT, or(shl(0xa0, 0x01), tload(_PAYER_SLOT)))\n        }\n    }\n\n    function getAttestedPayer() internal view returns (address payer) {\n        bool attested;\n        // payer = address(word); attested = bool((word >> 160) & 1)\n        assembly (\"memory-safe\") {\n            payer := tload(_PAYER_SLOT)\n            attested := and(0x01, shr(0xa0, payer))\n        }\n        // `attested == true` implies `payer != address(0)`\n        require(attested);\n    }\n\n    function clearPayer(address expectedOldPayer) internal {\n        address oldPayer = getPayer();\n        assembly (\"memory-safe\") {\n            if shl(0x60, xor(oldPayer, expectedOldPayer)) {\n                mstore(0x00, 0x5149e795) // selector for `PayerSpent()`\n                revert(0x1c, 0x04)\n            }\n            tstore(_PAYER_SLOT, 0x00)\n        }\n    }\n}\n\nabstract contract Permit2PaymentBase is Context, SettlerAbstract {\n    using FastLogic for bool;\n    using Revert for bool;\n\n    function _isRestrictedTarget(address target) internal view virtual override returns (bool) {\n        return (target == address(PERMIT2)).or(super._isRestrictedTarget(target));\n    }\n\n    function _operator() internal view virtual override returns (address) {\n        return super._msgSender();\n    }\n\n    function _msgSender() internal view virtual override(AbstractContext, Context) returns (address) {\n        return TransientStorage.getPayer();\n    }\n\n    /// @dev You must ensure that `target` is derived by hashing trusted initcode or another\n    ///      equivalent mechanism that guarantees \"reasonable\"ness. `target` must not be\n    ///      user-supplied or attacker-controlled. This is required for security and is not checked\n    ///      here. For example, it must not do something weird like modifying the spender (possibly\n    ///      setting it to itself). If the callback is expected to relay a\n    ///      `ISignatureTransfer.PermitTransferFrom` struct, then the computation of `target` using\n    ///      the trusted initcode (or equivalent) must ensure that that calldata is relayed\n    ///      unmodified. The library function `AddressDerivation.deriveDeterministicContract` is\n    ///      recommended.\n    function _setOperatorAndCall(\n        address payable target,\n        uint256 value,\n        bytes memory data,\n        uint32 selector,\n        function(bytes calldata) internal returns (bytes memory) callback\n    ) internal returns (bytes memory) {\n        TransientStorage.setOperatorAndCallback(target, selector, callback);\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        success.maybeRevert(returndata);\n        TransientStorage.checkSpentOperatorAndCallback();\n        return returndata;\n    }\n\n    function _setOperatorAndCall(\n        address target,\n        bytes memory data,\n        uint32 selector,\n        function(bytes calldata) internal returns (bytes memory) callback\n    ) internal override returns (bytes memory) {\n        return _setOperatorAndCall(payable(target), 0, data, selector, callback);\n    }\n\n    /// @dev Revert-tolerant variant of `_setOperatorAndCall` for trial calls: the call runs under\n    ///      an explicit gas limit and failure returns `false` instead of bubbling. Returndata is\n    ///      left uncopied so a failed call cannot charge the caller for large revert data. The\n    ///      trust requirements on `target` above apply here too.\n    function _setOperatorAndTryCall(\n        address target,\n        bytes memory data,\n        uint32 selector,\n        function(bytes calldata) internal returns (bytes memory) callback,\n        uint256 gasLimit\n    ) internal override returns (bool success) {\n        TransientStorage.setOperatorAndCallback(target, selector, callback);\n        assembly (\"memory-safe\") {\n            success := call(gasLimit, target, 0x00, add(0x20, data), mload(data), 0x00, 0x00)\n        }\n        if (success) {\n            TransientStorage.checkSpentOperatorAndCallback();\n        } else {\n            // The failed call reverted its own tstore changes but not ours.\n            TransientStorage.clearOperatorAndCallback();\n        }\n    }\n}\n\nabstract contract Permit2Payment is Permit2PaymentBase {\n    using FunctionPointerChecker for function(bytes calldata) internal returns (bytes memory);\n\n    fallback(bytes calldata) external returns (bytes memory) {\n        function(bytes calldata) internal returns (bytes memory) callback = TransientStorage.getAndClearCallback();\n        bytes calldata data = _msgData();\n        if (callback.isNull()) {\n            (bool success, bytes memory returndata) = _fallback(data);\n            require(success);\n            return returndata;\n        } else {\n            assembly (\"memory-safe\") {\n                data.offset := add(0x04, data.offset)\n                data.length := sub(data.length, 0x04)\n            }\n            return callback(data);\n        }\n    }\n\n    function _permitToTransferDetails(\n        address owner,\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        address recipient\n    )\n        internal\n        view\n        override\n        returns (ISignatureTransfer.SignatureTransferDetails memory transferDetails, uint256 sellAmount)\n    {\n        transferDetails.to = recipient;\n        transferDetails.requestedAmount = sellAmount = _permitToSellAmount(owner, permit);\n    }\n\n    // This function is provided *EXCLUSIVELY* for use here and in RfqOrderSettlement. Any other use\n    // of this function is forbidden. You must use the version that does *NOT* take a `from` or\n    // `witness` argument.\n    function _transferFromIKnowWhatImDoing(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        address from,\n        bytes32 witness,\n        string memory witnessTypeString,\n        bytes memory sig,\n        bool isForwarded\n    ) internal override {\n        // Maker and callback payments do not use the direct transfer action, so their recipient\n        // policy is checked here.\n        _checkRecipient(from, transferDetails.to, IERC20(permit.permitted.token));\n        if (isForwarded) {\n            assembly (\"memory-safe\") {\n                mstore(0x00, 0x1c500e5c) // selector for `ForwarderNotAllowed()`\n                revert(0x1c, 0x04)\n            }\n        }\n\n        // This is effectively\n        /*\n        PERMIT2.permitWitnessTransferFrom(permit, transferDetails, from, witness, witnessTypeString, sig);\n        */\n        // but it's written in assembly for contract size reasons. This produces a non-strict ABI\n        // encoding (https://docs.soliditylang.org/en/v0.8.25/abi-spec.html#strict-encoding-mode),\n        // but it's fine because Solidity's ABI *decoder* will handle anything that is validly\n        // encoded, strict or not.\n\n        // Solidity won't let us reference the constant `PERMIT2` in assembly, but this compiles\n        // down to just a single PUSH opcode just before the CALL, with optimization turned on.\n        ISignatureTransfer _PERMIT2 = PERMIT2;\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, 0x137c29fe) // selector for `permitWitnessTransferFrom(((address,uint256),uint256,uint256),(address,uint256),address,bytes32,string,bytes)`\n\n            // The layout of nested structs in memory is different from that in calldata. We have to\n            // chase the pointer to `permit.permitted`.\n            mcopy(add(0x20, ptr), mload(permit), 0x40)\n            // The rest of the members of `permit` are laid out linearly,\n            mcopy(add(0x60, ptr), add(0x20, permit), 0x40)\n            // as are the members of `transferDetails.\n            mcopy(add(0xa0, ptr), transferDetails, 0x40)\n            // Because we're passing `from` on the stack, it must be cleaned.\n            mstore(add(0xe0, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, from))\n            mstore(add(0x100, ptr), witness)\n            mstore(add(0x120, ptr), 0x140) // Offset to `witnessTypeString` (the end of of the non-dynamic types)\n            let witnessTypeStringLength := mload(witnessTypeString)\n            mstore(add(0x140, ptr), add(0x160, witnessTypeStringLength)) // Offset to `sig` (past the end of `witnessTypeString`)\n\n            // Now we encode the 2 dynamic objects, `witnessTypeString` and `sig`.\n            mcopy(add(0x160, ptr), witnessTypeString, add(0x20, witnessTypeStringLength))\n            let sigLength := mload(sig)\n            mcopy(add(0x180, add(ptr, witnessTypeStringLength)), sig, add(0x20, sigLength))\n\n            // We don't need to check that Permit2 has code, and it always signals failure by\n            // reverting.\n            if iszero(\n                call(\n                    gas(),\n                    _PERMIT2,\n                    0x00,\n                    add(0x1c, ptr),\n                    add(0x184, add(witnessTypeStringLength, sigLength)),\n                    0x00,\n                    0x00\n                )\n            ) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n        }\n    }\n\n    // See comment in above overload; don't use this function\n    function _transferFromIKnowWhatImDoing(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        address from,\n        bytes32 witness,\n        string memory witnessTypeString,\n        bytes memory sig\n    ) internal override {\n        _transferFromIKnowWhatImDoing(permit, transferDetails, from, witness, witnessTypeString, sig, _isForwarded());\n    }\n\n    function _transferFrom(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        bytes memory sig\n    ) internal override {\n        _transferFrom(permit, transferDetails, sig, _isForwarded());\n    }\n}\n\n// DANGER: the order of the base contracts here is very significant for the use of `super` below\n// (and in derived contracts). Do not change this order.\nabstract contract Permit2PaymentTakerSubmitted is AllowanceHolderContext, Permit2Payment {\n    using SafeTransferLib for IERC20;\n    using FastLogic for bool;\n\n    constructor() {\n        assert(!_hasMetaTxn());\n    }\n\n    function _permitToSellAmountCalldata(address owner, ISignatureTransfer.PermitTransferFrom calldata permit)\n        internal\n        view\n        override\n        returns (uint256 sellAmount)\n    {\n        sellAmount = permit.permitted.amount;\n        if (~sellAmount < BASIS) {\n            if (owner == address(0)) { // sentinel for `_msgSender()` to avoid extra TLOAD\n                unchecked {\n                    sellAmount = BASIS - ~sellAmount;\n                }\n                sellAmount = tmp().omul(IERC20(permit.permitted.token).fastBalanceOf(_msgSender()), sellAmount)\n                    .unsafeDiv(BASIS);\n            }\n        }\n    }\n\n    function _permitToSellAmount(address owner, ISignatureTransfer.PermitTransferFrom memory permit)\n        internal\n        view\n        override\n        returns (uint256 sellAmount)\n    {\n        sellAmount = permit.permitted.amount;\n        if (~sellAmount < BASIS) {\n            if (owner == address(0)) { // sentinel for `_msgSender()` to avoid extra TLOAD\n                unchecked {\n                    sellAmount = BASIS - ~sellAmount;\n                }\n                sellAmount = tmp().omul(IERC20(permit.permitted.token).fastBalanceOf(_msgSender()), sellAmount)\n                    .unsafeDiv(BASIS);\n            }\n        }\n    }\n\n    function _isRestrictedTarget(address target) internal view virtual override returns (bool) {\n        return (target == address(ALLOWANCE_HOLDER)).or(super._isRestrictedTarget(target));\n    }\n\n    function _transferFrom(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        bytes memory sig,\n        bool isForwarded\n    ) internal override {\n        // Pool callbacks also need recipient validation for both Permit2 and AllowanceHolder\n        // payments. Keeping payer reads in the transfer branches avoids extra gas when recipient\n        // checks are disabled.\n        address from;\n        if (_hasRecipientCheck()) {\n            from = _msgSender();\n            _checkRecipient(from, transferDetails.to, IERC20(permit.permitted.token));\n        }\n        if (isForwarded) {\n            if (sig.length != 0) {\n                assembly (\"memory-safe\") {\n                    mstore(0x00, 0xc321526c) // selector for `InvalidSignatureLen()`\n                    revert(0x1c, 0x04)\n                }\n            }\n            if (permit.nonce != 0) Panic.panic(Panic.ARITHMETIC_OVERFLOW);\n            if (block.timestamp > permit.deadline) {\n                assembly (\"memory-safe\") {\n                    mstore(0x00, 0xcd21db4f) // selector for `SignatureExpired(uint256)`\n                    mstore(0x20, mload(add(0x40, permit)))\n                    revert(0x1c, 0x24)\n                }\n            }\n            // we don't check `requestedAmount` because it's checked by AllowanceHolder itself\n            _allowanceHolderTransferFrom(\n                permit.permitted.token,\n                _hasRecipientCheck() ? from : _msgSender(),\n                transferDetails.to,\n                transferDetails.requestedAmount\n            );\n        } else {\n            // This is effectively\n            /*\n            PERMIT2.permitTransferFrom(permit, transferDetails, _msgSender(), sig);\n            */\n            // but it's written in assembly for contract size reasons. This produces a non-strict\n            // ABI encoding\n            // (https://docs.soliditylang.org/en/v0.8.25/abi-spec.html#strict-encoding-mode), but\n            // it's fine because Solidity's ABI *decoder* will handle anything that is validly\n            // encoded, strict or not.\n\n            // Solidity won't let us reference the constant `PERMIT2` in assembly, but this\n            // compiles down to just a single PUSH opcode just before the CALL, with optimization\n            // turned on.\n            ISignatureTransfer _PERMIT2 = PERMIT2;\n            if (!_hasRecipientCheck()) {\n                from = _msgSender();\n            }\n            assembly (\"memory-safe\") {\n                let ptr := mload(0x40)\n                mstore(ptr, 0x30f28b7a) // selector for `permitTransferFrom(((address,uint256),uint256,uint256),(address,uint256),address,bytes)`\n\n                // The layout of nested structs in memory is different from that in calldata. We\n                // have to chase the pointer to `permit.permitted`.\n                mcopy(add(0x20, ptr), mload(permit), 0x40)\n                // The rest of the members of `permit` are laid out linearly,\n                mcopy(add(0x60, ptr), add(0x20, permit), 0x40)\n                // as are the members of `transferDetails.\n                mcopy(add(0xa0, ptr), transferDetails, 0x40)\n                // Because we're passing `from` on the stack, it must be cleaned.\n                mstore(add(0xe0, ptr), and(0xffffffffffffffffffffffffffffffffffffffff, from))\n                mstore(add(0x100, ptr), 0x100) // Offset to `sig` (the end of the non-dynamic types)\n\n                // Encode the dynamic object `sig`\n                let sigLength := mload(sig)\n                mcopy(add(0x120, ptr), sig, add(0x20, sigLength))\n\n                // We don't need to check that Permit2 has code, and it always signals failure by\n                // reverting.\n                if iszero(call(gas(), _PERMIT2, 0x00, add(0x1c, ptr), add(0x124, sigLength), 0x00, 0x00)) {\n                    let ptr_ := mload(0x40)\n                    returndatacopy(ptr_, 0x00, returndatasize())\n                    revert(ptr_, returndatasize())\n                }\n            }\n        }\n    }\n\n    function _allowanceHolderTransferFrom(address token, address owner, address recipient, uint256 amount)\n        internal\n        override\n    {\n        // `owner` is always `_msgSender()`\n        // This is effectively\n        /*\n        _ALLOWANCE_HOLDER.transferFrom(token, owner, recipient, amount);\n        */\n        // but it's written in assembly for contract size reasons.\n\n        // Solidity won't let us reference the constant `_ALLOWANCE_HOLDER` in assembly, but this\n        // compiles down to just a single PUSH opcode just before the CALL, with optimization turned\n        // on.\n        address _ALLOWANCE_HOLDER = address(ALLOWANCE_HOLDER);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(add(0x80, ptr), amount)\n            mstore(add(0x60, ptr), recipient)\n            mstore(add(0x4c, ptr), shl(0x60, owner)) // clears `recipient`'s padding\n            mstore(add(0x2c, ptr), shl(0x60, token)) // clears `owner`'s padding\n            mstore(add(0x0c, ptr), 0x15dacbea000000000000000000000000) // selector for `transferFrom(address,address,address,uint256)` with `token`'s padding\n\n            // Although `transferFrom` returns `bool`, we don't need to bother checking the return\n            // value because `AllowanceHolder` always either reverts or returns `true`. We also\n            // don't need to check that it has code.\n            if iszero(call(gas(), _ALLOWANCE_HOLDER, 0x00, add(0x1c, ptr), 0x84, 0x00, 0x00)) {\n                let ptr_ := mload(0x40)\n                returndatacopy(ptr_, 0x00, returndatasize())\n                revert(ptr_, returndatasize())\n            }\n        }\n    }\n\n    modifier takerSubmitted() override {\n        address msgSender = _operator();\n        TransientStorage.setPayer(msgSender);\n        _;\n        TransientStorage.clearPayer(msgSender);\n    }\n\n    modifier metaTx(address, bytes32) override {\n        revert();\n        _;\n    }\n\n    // Solidity inheritance is stupid\n    function _isForwarded()\n        internal\n        view\n        virtual\n        override(AbstractContext, Context, AllowanceHolderContext)\n        returns (bool)\n    {\n        return super._isForwarded();\n    }\n\n    function _msgData()\n        internal\n        view\n        virtual\n        override(AbstractContext, Context, AllowanceHolderContext)\n        returns (bytes calldata)\n    {\n        return super._msgData();\n    }\n\n    function _msgSender() internal view virtual override(AllowanceHolderContext, Permit2PaymentBase) returns (address) {\n        return super._msgSender();\n    }\n}\n\n// DANGER: the order of the base contracts here is very significant for the use of `super` below\n// (and in derived contracts). Do not change this order.\nabstract contract Permit2PaymentMetaTxn is Context, Permit2Payment {\n    constructor() {\n        assert(_hasMetaTxn());\n        assert(\n            keccak256(bytes(Permit2PaymentMetaTxn._witnessTypeSuffix()))\n                == keccak256(\n                    abi.encodePacked(\n                        \"SlippageAndActions slippageAndActions)\", SLIPPAGE_AND_ACTIONS_TYPE, TOKEN_PERMISSIONS_TYPE\n                    )\n                )\n        );\n    }\n\n    function _permitToSellAmountCalldata(address, ISignatureTransfer.PermitTransferFrom calldata permit)\n        internal\n        view\n        virtual\n        override\n        returns (uint256)\n    {\n        return permit.permitted.amount;\n    }\n\n    function _permitToSellAmount(address, ISignatureTransfer.PermitTransferFrom memory permit)\n        internal\n        view\n        virtual\n        override\n        returns (uint256)\n    {\n        return permit.permitted.amount;\n    }\n\n    function _witnessTypeSuffix() internal pure virtual returns (string memory) {\n        return \"SlippageAndActions slippageAndActions)SlippageAndActions(address recipient,address buyToken,uint256 minAmountOut,bytes[] actions)TokenPermissions(address token,uint256 amount)\";\n    }\n\n    function _transferFrom(\n        ISignatureTransfer.PermitTransferFrom memory permit,\n        ISignatureTransfer.SignatureTransferDetails memory transferDetails,\n        bytes memory sig,\n        bool isForwarded // must be false\n    ) internal override {\n        bytes32 witness = TransientStorage.getAndClearWitness();\n        if (witness == bytes32(0)) {\n            revertConfusedDeputy();\n        }\n        _transferFromIKnowWhatImDoing(\n            permit, transferDetails, _msgSender(), witness, _witnessTypeSuffix(), sig, isForwarded\n        );\n    }\n\n    function _allowanceHolderTransferFrom(address, address, address, uint256) internal pure override {\n        revertConfusedDeputy();\n    }\n\n    modifier takerSubmitted() override {\n        revert();\n        _;\n    }\n\n    modifier metaTx(address msgSender, bytes32 witness) override {\n        if (_isForwarded()) {\n            assembly (\"memory-safe\") {\n                mstore(0x00, 0x1c500e5c) // selector for `ForwarderNotAllowed()`\n                revert(0x1c, 0x04)\n            }\n        }\n        if (_operator() == msgSender) {\n            revertConfusedDeputy();\n        }\n        TransientStorage.setWitness(witness);\n        TransientStorage.setPayer(msgSender);\n        _;\n        TransientStorage.clearPayer(msgSender);\n        // It should not be possible for this check to revert because the very first thing that a\n        // metatransaction does is spend the witness.\n        TransientStorage.checkSpentWitness();\n    }\n\n    // Solidity inheritance is stupid\n    function _msgSender() internal view virtual override(Context, Permit2PaymentBase) returns (address) {\n        return super._msgSender();\n    }\n}\n\nabstract contract Permit2PaymentIntent is Permit2PaymentMetaTxn {\n    using SafeTransferLib for IERC20;\n\n    constructor() {\n        assert(\n            keccak256(bytes(Permit2PaymentIntent._witnessTypeSuffix()))\n                == keccak256(abi.encodePacked(\"Slippage slippage)\", SLIPPAGE_TYPE, TOKEN_PERMISSIONS_TYPE))\n        );\n    }\n\n    function _witnessTypeSuffix() internal pure virtual override returns (string memory) {\n        return \"Slippage slippage)Slippage(address recipient,address buyToken,uint256 minAmountOut)TokenPermissions(address token,uint256 amount)\";\n    }\n\n    bytes32 private constant _BRIDGE_WALLET_CODEHASH =\n        0xe98f46388916ca2f096ea767dc04dddb45d2ca2c2f44e7bcc529d6aded9c11f0;\n\n    function _toCanonicalSellAmount(address owner, IERC20 token, uint256 sellAmount) private view returns (uint256) {\n        unchecked {\n            if (~sellAmount < BASIS) {\n                if (owner == address(0)) { // sentinel for `_msgSender()` to avoid extra TLOAD\n                    owner = _msgSender();\n                    if (owner.codehash == _BRIDGE_WALLET_CODEHASH) {\n                        sellAmount = BASIS - ~sellAmount;\n                        sellAmount = tmp().omul(token.fastBalanceOf(owner), sellAmount).unsafeDiv(BASIS);\n                    }\n                }\n            }\n        }\n        return sellAmount;\n    }\n\n    function _permitToSellAmountCalldata(address owner, ISignatureTransfer.PermitTransferFrom calldata permit)\n        internal\n        view\n        virtual\n        override\n        returns (uint256 sellAmount)\n    {\n        sellAmount = _toCanonicalSellAmount(owner, IERC20(permit.permitted.token), permit.permitted.amount);\n    }\n\n    function _permitToSellAmount(address owner, ISignatureTransfer.PermitTransferFrom memory permit)\n        internal\n        view\n        virtual\n        override\n        returns (uint256 sellAmount)\n    {\n        sellAmount = _toCanonicalSellAmount(owner, IERC20(permit.permitted.token), permit.permitted.amount);\n    }\n}\n\n// src/SettlerBase.sol\n\n/// @dev This library's ABIDecoding is more lax than the Solidity ABIDecoder. This library omits index bounds/overflow\n/// checking when accessing calldata arrays for gas efficiency. It also omits checks against `calldatasize()`. This\n/// means that it is possible that `args` will run off the end of calldata and be implicitly padded with zeroes. That we\n/// don't check for overflow means that offsets can be negative. This can also result in `args` that alias other parts\n/// of calldata, or even the `actions` array itself.\nlibrary CalldataDecoder {\n    function decodeCall(bytes[] calldata data, uint256 i)\n        internal\n        pure\n        returns (uint256 selector, bytes calldata args)\n    {\n        assembly (\"memory-safe\") {\n            // initially, we set `args.offset` to the pointer to the length. this is 32 bytes before the actual start of data\n            args.offset := add(\n                data.offset,\n                // We allow the indirection/offset to `calls[i]` to be negative\n                calldataload(i)\n            )\n            // now we load `args.length` and set `args.offset` to the start of data\n            args.length := calldataload(args.offset)\n            args.offset := add(0x20, args.offset)\n\n            // slice off the first 4 bytes of `args` as the selector\n            selector := shr(0xe0, calldataload(args.offset))\n            args.length := sub(args.length, 0x04)\n            args.offset := add(0x04, args.offset)\n        }\n    }\n}\n\nabstract contract SettlerBase is ISettlerBase, Basic, RfqOrderSettlement, UniswapV3Fork, UniswapV2, Velodrome {\n    using SafeTransferLib for IERC20;\n    using UnsafeMath for uint256;\n    using SafeTransferLib for address payable;\n    using FastLogic for bool;\n    using Ternary for bool;\n\n    receive() external payable {}\n\n    function select(bytes calldata data) internal virtual;\n\n    function _chainId() internal pure virtual returns (uint256);\n\n    event GitCommit(bytes20 indexed);\n\n    // When/if you change this, you must make corresponding changes to\n    // `sh/deploy_new_chain.sh` and 'sh/common_deploy_settler.sh' to set\n    // `constructor_args`.\n    constructor(bytes20 gitCommit) {\n        if (block.chainid != 31337) {\n            emit GitCommit(gitCommit);\n            assert(IERC721Owner(DEPLOYER).ownerOf(_tokenId()) == address(this));\n        } else {\n            assert(gitCommit == bytes20(0));\n        }\n    }\n\n    function _div512to256(uint512 n, uint512 d) internal view virtual override returns (uint256) {\n        return n.div(d);\n    }\n\n    function _mandatorySlippageCheck() internal pure virtual returns (bool) {\n        return false;\n    }\n\n    function _hasRecipientCheck() internal pure virtual override returns (bool) {\n        return false;\n    }\n\n    function _recipientCheckNeedsToken() internal pure virtual override returns (bool) {\n        return false;\n    }\n\n    function _checkRecipient(address sender, address recipient, IERC20 buyToken) internal view virtual override {}\n\n    function _checkSlippageAndTransfer(AllowedSlippage memory slippage, bool transferExactLimit) internal {\n        // This final slippage check effectively prohibits custody optimization on the\n        // final hop of every swap. This is gas-inefficient. This is on purpose. Because\n        // ISettlerActions.BASIC could interact with an intents-based settlement\n        // mechanism, we must ensure that the user's want token increase is coming\n        // directly from us instead of from some other form of exchange of value.\n        (address payable recipient, IERC20 buyToken, uint256 minAmountOut) =\n            (slippage.recipient, slippage.buyToken, slippage.minAmountOut);\n        if (_mandatorySlippageCheck()) {\n            require(minAmountOut != 0);\n        } else if ((minAmountOut == 0).and(address(buyToken) == address(0))) {\n            return;\n        }\n        uint256 amountOut = compatSelfBalance(buyToken);\n        if (amountOut < minAmountOut) {\n            revertTooMuchSlippage(buyToken, minAmountOut, amountOut);\n        }\n        amountOut = transferExactLimit.ternary(minAmountOut, amountOut);\n        _checkRecipient(address(this), recipient, buyToken);\n        if (isNative_1(buyToken)) {\n            recipient.safeTransferETH(amountOut);\n        } else {\n            buyToken.safeTransfer(recipient, amountOut.unsafeDec(amountOut > minAmountOut));\n        }\n\n        // zeroize `slippage`\n        assembly (\"memory-safe\") {\n            codecopy(slippage, codesize(), 0x60)\n        }\n    }\n\n    function _dispatch(uint256, uint256 action, bytes calldata data, AllowedSlippage memory)\n        internal\n        virtual\n        override\n        returns (bool)\n    {\n        //// NOTICE: This function has been largely copy/paste'd into\n        //// `src/chains/Mainnet/Common.sol:MainnetMixin._dispatch`. If you make changes here, you\n        //// need to make sure that corresponding changes are made to that function.\n\n        if (action == uint32(ISettlerActions.RFQ.selector)) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory permit,\n                address maker,\n                bytes memory makerSig,\n                IERC20 takerToken,\n                uint256 maxTakerAmount\n            ) = abi.decode(data, (address, ISignatureTransfer.PermitTransferFrom, address, bytes, IERC20, uint256));\n\n            fillRfqOrderSelfFunded(recipient, permit, maker, makerSig, takerToken, maxTakerAmount);\n        } else if (action == uint32(ISettlerActions.UNISWAPV3.selector)) {\n            (address recipient, uint256 ppm, bytes memory path, uint256 amountOutMin) =\n                abi.decode(data, (address, uint256, bytes, uint256));\n\n            sellToUniswapV3(recipient, ppm, path, amountOutMin);\n        } else if (action == uint32(ISettlerActions.UNISWAPV2.selector)) {\n            (address recipient, address sellToken, uint256 ppm, address pool, uint24 swapInfo, uint256 amountOutMin) =\n                abi.decode(data, (address, address, uint256, address, uint24, uint256));\n\n            sellToUniswapV2(recipient, sellToken, ppm, pool, swapInfo, amountOutMin);\n        } else if (action == uint32(ISettlerActions.BASIC.selector)) {\n            (IERC20 sellToken, uint256 ppm, address pool, uint256 offset, bytes memory _data) =\n                abi.decode(data, (IERC20, uint256, address, uint256, bytes));\n\n            basicSellToPool(sellToken, ppm, pool, offset, _data);\n        } else if (action == uint32(ISettlerActions.VELODROME.selector)) {\n            (address recipient, uint256 ppm, IVelodromePair pool, uint24 swapInfo, uint256 minAmountOut) =\n                abi.decode(data, (address, uint256, IVelodromePair, uint24, uint256));\n\n            sellToVelodrome(recipient, ppm, pool, swapInfo, minAmountOut);\n        } else if (action == uint32(ISettlerActions.POSITIVE_SLIPPAGE.selector)) {\n            (address payable recipient, IERC20 token, uint256 expectedAmount, uint256 surplusPpm, uint256 maxPpm) =\n                abi.decode(data, (address, IERC20, uint256, uint256, uint256));\n            _checkRecipient(address(this), recipient, token);\n            uint256 balance = isNative_1(token) ? address(this).balance : token.fastSpendableBalance();\n            if (balance > expectedAmount) {\n                uint256 cap;\n                unchecked {\n                    cap = balance * maxPpm / BASIS;\n                    balance -= expectedAmount;\n                    balance = balance * surplusPpm / BASIS;\n                }\n                balance = (balance > cap).ternary(cap, balance);\n                if (isNative_1(token)) {\n                    recipient.safeTransferETH(balance);\n                } else {\n                    token.safeTransfer(recipient, balance);\n                }\n            }\n        } else if (action == uint32(ISettlerActions.SELECT.selector)) {\n            select(data);\n        } else {\n            return false;\n        }\n        return true;\n    }\n}\n\n// src/core/Select.sol\n\n/// @notice Ordered candidate-route selection by revertable self-calls.\nabstract contract Select is SettlerBase {\n    using SafeTransferLib for IERC20;\n    using UnsafeMath for uint256;\n    using FastLogic for bool;\n    using Ternary for bool;\n    using CalldataDecoder for bytes[];\n\n    // Listing this base after ordinary dispatchers lets candidates bypass actions in more derived contracts.\n    function _dispatch(uint256 i, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        virtual\n        override\n        returns (bool)\n    {\n        return super._dispatch(i, action, data, slippage);\n    }\n\n    // uint32(bytes4(keccak256(\"executeSelected(bytes[],address,uint256,uint256)\")))\n    uint32 private constant _EXECUTE_SELECTED_SELECTOR = 0xa04c36b2;\n\n    // An overestimate of the gas consumed between reading `gas()` and the trial `CALL`, including\n    // the call's own access cost. This bound is the soundness condition for skipping a failed\n    // trial. Adding one failing empty candidate measured 3,603 gas (solc 0.8.34 via-IR,\n    // 2026-08-31), bounding this plumbing from far above; 8192 is more than double that bound.\n    uint256 private constant _SELECT_OVERHEAD_GAS = 8192;\n\n    function _executeSelected(bytes calldata data) private returns (bytes memory empty) {\n        bytes[] calldata actions;\n        IERC20 token;\n        uint256 minOut;\n        uint256 beforeBalance;\n        // Read the callback head without writing memory:\n        //     [0x00 actions offset][0x20 token][0x40 minOut][0x60 beforeBalance][actions length][offsets/actions]\n        // `select` built the head and copied the complete candidate region.\n        assembly (\"memory-safe\") {\n            actions.offset := add(data.offset, calldataload(data.offset))\n            actions.length := calldataload(actions.offset)\n            actions.offset := add(0x20, actions.offset)\n            token := calldataload(add(0x20, data.offset))\n            minOut := calldataload(add(0x40, data.offset))\n            beforeBalance := calldataload(add(0x60, data.offset))\n        }\n        // A candidate can meet its target by liquidating unexpected assets or unexpected amounts of\n        // assets held by Settler. This is outside `SELECT`'s threat model. The slippage check\n        // enforces the taker's minimum.\n        // See https://web.archive.org/web/20240913184335/https://kebabsec.xyz/posts/critical_vulnerability_in_uniswapx/\n        _runActions(actions);\n        uint256 score = compatSelfBalance(token) - beforeBalance;\n        if (score < minOut) {\n            assembly (\"memory-safe\") {\n                mstore(0x00, 0xa55fee2e) // selector for `Shortfall(uint256)`\n                mstore(0x20, score)\n                revert(0x1c, 0x24)\n            }\n        }\n        return empty;\n    }\n\n    function select(bytes calldata data) internal override {\n        uint256 gasCap;\n        IERC20 token;\n        uint256 targetsData;\n        uint256 candsData;\n        uint256 candsLength;\n        uint256 n;\n        bytes memory callData;\n        // Follow and bound both top-level array offsets. The candidate region is copied once after\n        // the callback head, preserving those calldata offsets.\n        assembly (\"memory-safe\") {\n            let dataStart := data.offset\n            let dataEnd := add(dataStart, data.length)\n            let err := lt(dataEnd, dataStart)\n            err := or(gt(0x80, data.length), err)\n            gasCap := calldataload(dataStart)\n            err := or(or(shr(0x40, gasCap), iszero(gasCap)), err)\n            token := calldataload(add(0x20, dataStart))\n            err := or(or(shr(0xa0, token), iszero(token)), err)\n\n            let targetsOffset := calldataload(add(0x40, dataStart))\n            err := or(gt(targetsOffset, sub(data.length, 0x20)), err) // can't be `gt(add(0x20, targetsOffset), data.length)` due to risk of overflow\n            let targetsBase := add(targetsOffset, dataStart)\n            n := calldataload(targetsBase)\n            targetsData := add(0x20, targetsBase)\n            err := or(or(iszero(n), gt(n, shr(0x05, sub(dataEnd, targetsData)))), err)\n\n            let candidatesOffset := calldataload(add(0x60, dataStart))\n            err := or(gt(candidatesOffset, sub(data.length, 0x20)), err)\n            let candidatesBase := add(candidatesOffset, dataStart)\n            candsData := add(0x20, candidatesBase)\n            // `targets` and `candidates` must be the same length. Unequal lengths are valid ABI but\n            // meaningless here.\n            err := or(xor(calldataload(candidatesBase), n), err)\n            err := or(gt(n, shr(0x05, sub(dataEnd, candsData))), err)\n            if err { revert(0x00, 0x00) }\n\n            candsLength := sub(dataEnd, candsData)\n            callData := mload(0x40)\n            let dst := add(0xa4, callData)\n            calldatacopy(dst, candsData, candsLength)\n            mstore(add(0x44, callData), token)\n            mstore(add(0x04, callData), _EXECUTE_SELECTED_SELECTOR)\n            mstore(callData, add(0x84, candsLength))\n            mstore(0x40, add(dst, candsLength))\n        }\n\n        {\n            uint256 beforeBalance = compatSelfBalance(token);\n            // callData.beforeBalance = beforeBalance;\n            assembly (\"memory-safe\") {\n                mstore(add(0x84, callData), beforeBalance)\n            }\n        }\n\n        // A trial is fully funded when EIP-150's clamp still forwards the whole `gasCap` after\n        // `_SELECT_OVERHEAD_GAS` of overhead between the gas measurement and the `CALL`: `C +\n        // floor(C/63)` forwards exactly `C`.\n        uint256 beforeGasThreshold;\n        unchecked {\n            beforeGasThreshold = _SELECT_OVERHEAD_GAS + gasCap + gasCap / 63;\n        }\n\n        uint256 i;\n        while (true) {\n            // Select one candidate in the shared callback buffer by changing only its dynamic\n            // offset and target.\n            assembly (\"memory-safe\") {\n                let offset := calldataload(add(shl(0x05, i), candsData))\n                if gt(offset, sub(candsLength, 0x20)) { revert(0x00, 0x00) }\n                mstore(add(0x24, callData), add(0x80, offset))\n                mstore(add(0x64, callData), calldataload(add(shl(0x05, i), targetsData)))\n            }\n\n            unchecked {\n                i++;\n            }\n            bool isLast = i == n;\n            uint256 beforeGas;\n\n            if (_setOperatorAndTryCall(\n                    address(this),\n                    callData,\n                    _EXECUTE_SELECTED_SELECTOR,\n                    _executeSelected,\n                    (!isLast).ternary(gasCap, beforeGas = gasleft())\n                )) {\n                break;\n            }\n\n            if (isLast.or(beforeGas < beforeGasThreshold)) {\n                // Copy revert reason from returndata to `[ptr, ptr + returndatasize())` and bubble.\n                assembly (\"memory-safe\") {\n                    let ptr := mload(0x40)\n                    returndatacopy(ptr, 0x00, returndatasize())\n                    revert(ptr, returndatasize())\n                }\n            }\n        }\n    }\n\n    function _runActions(bytes[] calldata actions) private {\n        // A nested `CHECK_SLIPPAGE` no-ops against this zeroed struct in taker-submitted Settler.\n        // The other flavors do not dispatch it, so there it reverts only its own trial.\n        AllowedSlippage memory noSlippage;\n        uint256 it;\n        assembly (\"memory-safe\") {\n            it := actions.offset\n        }\n        for (uint256 i; i < actions.length; (i, it) = (i.unsafeInc(), it.unsafeAdd(32))) {\n            (uint256 action, bytes calldata data) = actions.decodeCall(it);\n            bool tooShort;\n            // A length that wrapped in `decodeCall`'s selector slice has upper bits set.\n            assembly (\"memory-safe\") {\n                tooShort := shr(0x40, data.length)\n                data.length := mul(data.length, iszero(tooShort))\n            }\n            // Not `FastLogic.or`: `_dispatch` must not run on the cleared length.\n            if (tooShort || !Select._dispatch(i, action, data, noSlippage)) {\n                revertActionInvalid(i, action, data);\n            }\n        }\n    }\n}\n\n// src/core/Attest.sol\n\nabstract contract Attest is Select {\n    using FastLogic for bool;\n\n    bytes32 private constant _AUTHORITY_SLOT =\n        bytes32(uint256(uint96(uint256(keccak256(\"attestation authority slot\")) - 1)));\n    bytes32 private constant _ATTESTATION_SLOT =\n        bytes32(uint256(uint96(uint256(keccak256(\"attestation metadata slot\")) - 1)));\n    bytes32 private constant _TYPEHASH =\n        keccak256(\"Attestation(address taker,uint256 deadline,bytes12 zid,string appid)\");\n    bytes32 private constant _DOMAIN_TYPEHASH =\n        keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n    bytes32 private constant _NAME_HASH = keccak256(\"0xSettler\");\n    bytes32 private immutable _DOMAIN_SEPARATOR;\n\n    constructor() {\n        _DOMAIN_SEPARATOR = _domainSeparator(_chainId());\n    }\n\n    function _domainSeparator(uint256 chainId) private view returns (bytes32 domain) {\n        bytes32 domainTypeHash = _DOMAIN_TYPEHASH;\n        bytes32 nameHash = _NAME_HASH;\n        // domain = keccak256(abi.encode(domainTypeHash, nameHash, chainId, address(this))).\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(0x00, domainTypeHash)\n            mstore(0x20, nameHash)\n            mstore(0x40, chainId)\n            mstore(0x60, address())\n            domain := keccak256(0x00, 0x80)\n            mstore(0x40, ptr)\n            mstore(0x60, 0x00)\n        }\n    }\n\n    function _dispatch(uint256 i, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        virtual\n        override\n        returns (bool)\n    {\n        if (action == uint32(ISettlerActions.ATTEST.selector)) {\n            (uint256 deadline, bytes32 r, bytes32 vs) = abi.decode(data, (uint256, bytes32, bytes32));\n            _attest(deadline, r, vs);\n            return true;\n        }\n        return super._dispatch(i, action, data, slippage);\n    }\n\n    function _fallback(bytes calldata data) internal virtual override returns (bool success, bytes memory returndata) {\n        if (bytes4(data) == IAttestation.attestation.selector) {\n            return (true, attestation());\n        }\n        return super._fallback(data);\n    }\n\n    function _attest(uint256 deadline, bytes32 r, bytes32 vs) private {\n        // The free memory pointer is restored by hand because `FreeMemory` cannot be a base of this\n        // contract: chain mixins linearize it between `SettlerBase` and `SettlerBase`'s parents.\n        uint256 freeMemPtr;\n        assembly (\"memory-safe\") {\n            freeMemPtr := mload(0x40)\n        }\n        if ((block.timestamp > deadline).or(deadline >> 40 != 0)) {\n            assembly (\"memory-safe\") {\n                mstore(0x00, 0xcd21db4f) // selector for `SignatureExpired(uint256)`\n                mstore(0x20, deadline)\n                revert(0x1c, 0x24)\n            }\n        }\n        bytes32 metadata;\n        // Every swap entrypoint has this argument at the same offset:\n        // metadata = abi.decode(msg.data[132:164], (bytes32)).\n        assembly (\"memory-safe\") {\n            metadata := calldataload(0x84)\n        }\n        address taker = _msgSender();\n        string memory appid = Cuid.decode(uint128(uint256(metadata)));\n        bytes32 typeHash = _TYPEHASH;\n        bytes32 domain = block.chainid == _chainId() ? _DOMAIN_SEPARATOR : _domainSeparator(block.chainid);\n        address authority;\n        // structHash = keccak256(abi.encode(typeHash, taker, deadline, bytes12(metadata), keccak256(bytes(appid))));\n        // digest = keccak256(abi.encodePacked(hex\"1901\", domain, structHash));\n        // authority = ecrecover(digest, 27 + uint8(uint256(vs) >> 255), r, bytes32(uint256(vs) & (2**255 - 1)));\n        // if (authority == address(0)) revert InvalidSignature();\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, typeHash)\n            mstore(add(0x20, ptr), taker)\n            mstore(add(0x0c, ptr), shl(0x60, typeHash)) // Clears `taker`'s padding.\n            mstore(add(0x40, ptr), deadline)\n            mstore(add(0x60, ptr), shl(0xa0, shr(0xa0, metadata)))\n            mstore(add(0x80, ptr), keccak256(add(0x20, appid), mload(appid)))\n            mstore(0x00, 0x1901)\n            mstore(0x20, domain)\n            mstore(0x40, keccak256(ptr, 0xa0))\n            mstore(0x00, keccak256(0x1e, 0x42))\n            mstore(0x20, add(0x1b, shr(0xff, vs)))\n            mstore(0x40, r)\n            mstore(0x60, and(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, vs))\n            authority := mload(staticcall(gas(), 0x01, 0x00, 0x80, 0x01, 0x20))\n            // Successful recovery returns a 160-bit address in 32 bytes, so the product cannot overflow.\n            if iszero(mul(returndatasize(), authority)) {\n                mstore(0x00, 0x8baa579f) // selector for `InvalidSignature()`\n                revert(0x1c, 0x04)\n            }\n            mstore(0x40, ptr)\n            mstore(0x60, 0x00)\n        }\n        bytes32 authoritySlot = _AUTHORITY_SLOT;\n        bytes32 attestationSlot = _ATTESTATION_SLOT;\n        // transient[authoritySlot] = uint256(uint160(authority)) << 96 | uint256(deadline); transient[attestationSlot] = metadata\n        assembly (\"memory-safe\") {\n            tstore(authoritySlot, or(shl(0x60, authority), and(0xffffffffff, deadline)))\n            tstore(attestationSlot, metadata)\n        }\n        TransientStorage.setAttested();\n        assembly (\"memory-safe\") {\n            mstore(0x40, freeMemPtr)\n        }\n    }\n\n    function attestation() internal view returns (bytes memory result) {\n        address taker = TransientStorage.getAttestedPayer();\n        bytes32 metadata;\n        address authority;\n        uint40 deadline;\n        bytes32 authoritySlot = _AUTHORITY_SLOT;\n        bytes32 attestationSlot = _ATTESTATION_SLOT;\n        // (authority, deadline) = unpack(transient[authoritySlot]); metadata = transient[attestationSlot]\n        assembly (\"memory-safe\") {\n            deadline := tload(authoritySlot)\n            authority := shr(0x60, deadline)\n            metadata := tload(attestationSlot)\n        }\n        // The head is reserved first so that `Cuid.decode`, which allocates at the free memory\n        // pointer, writes the length word and single data word of `appid` (at most 26 bytes)\n        // directly into the tail\n        // result = abi.encode(taker, bytes12(metadata), appid, authority, deadline).\n        assembly (\"memory-safe\") {\n            result := mload(0x40)\n            mstore(0x40, add(0xc0, result))\n        }\n        Cuid.decode(uint128(uint256(metadata)));\n        assembly (\"memory-safe\") {\n            mstore(result, 0xe0)\n            mstore(add(0x20, result), taker)\n            mstore(add(0x0c, result), shl(0x60, 0xe0)) // Clears `taker`'s padding.\n            mstore(add(0xa0, result), and(0xffffffffff, deadline))\n            mstore(add(0x80, result), authority)\n            mstore(add(0x6c, result), shl(0x60, 0xa0)) // Offset to `appid`; clears `authority`'s padding.\n            mstore(add(0x40, result), metadata)\n            mstore(add(0x4c, result), 0x00) // Clears `zid`'s padding and the offset's high bytes.\n        }\n    }\n}\n\n// src/Settler.sol\n\nabstract contract Settler is ISettlerTakerSubmitted, Permit2PaymentTakerSubmitted, SettlerBase, Permit {\n    using UnsafeMath for uint256;\n    using CalldataDecoder for bytes[];\n    using Revert for bool;\n    using FastLogic for bool;\n\n    function _tokenId() internal pure override returns (uint256) {\n        return 2;\n    }\n\n    function _hasMetaTxn() internal pure override returns (bool) {\n        return false;\n    }\n\n    function _dispatch(uint256 i, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        virtual\n        override\n        returns (bool)\n    {\n        if (super._dispatch(i, action, data, slippage)) {\n            return true;\n        } else if (action == uint32(ISettlerActions.NATIVE_CHECK.selector)) {\n            (uint256 deadline, uint256 msgValue) = abi.decode(data, (uint256, uint256));\n            if (block.timestamp > deadline) {\n                assembly (\"memory-safe\") {\n                    mstore(0x00, 0xcd21db4f) // selector for `SignatureExpired(uint256)`\n                    mstore(0x20, deadline)\n                    revert(0x1c, 0x24)\n                }\n            }\n            if (msg.value > msgValue) {\n                assembly (\"memory-safe\") {\n                    mstore(0x00, 0x4a094431) // selector for `MsgValueMismatch(uint256,uint256)`\n                    mstore(0x20, msgValue)\n                    mstore(0x40, callvalue())\n                    revert(0x1c, 0x44)\n                }\n            }\n        } else if (action == uint32(ISettlerActions.CHECK_SLIPPAGE.selector)) {\n            _checkSlippageAndTransfer(slippage, abi.decode(data, (bool)));\n        } else {\n            return false;\n        }\n        return true;\n    }\n\n    function _dispatchVIP(uint256 action, bytes calldata data) internal virtual returns (bool) {\n        if (action == uint32(ISettlerActions.TRANSFER_FROM.selector)) {\n            (address recipient, ISignatureTransfer.PermitTransferFrom memory permit, bytes memory sig) =\n                abi.decode(data, (address, ISignatureTransfer.PermitTransferFrom, bytes));\n            (ISignatureTransfer.SignatureTransferDetails memory transferDetails,) =\n                _permitToTransferDetails(\n                    address(0) /* sentinel for `_msgSender()` */,\n                    permit,\n                    recipient\n                );\n            _transferFrom(permit, transferDetails, sig);\n        } /*\n        // RFQ_VIP is temporarily removed because Solver has no support for it\n        // When support for RFQ_VIP is reenabled, the tests\n        // testAllowanceHolder_rfq_VIP and testSettler_rfq should be reenabled\n        else if (action == uint32(ISettlerActions.RFQ_VIP.selector)) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory takerPermit,\n                ISignatureTransfer.PermitTransferFrom memory makerPermit,\n                address maker,\n                bytes memory makerSig,\n                bytes memory takerSig\n            ) = abi.decode(\n                data,\n                (\n                    address,\n                    ISignatureTransfer.PermitTransferFrom,\n                    ISignatureTransfer.PermitTransferFrom,\n                    address,\n                    bytes,\n                    bytes\n                )\n            );\n            fillRfqOrderVIP(recipient, makerPermit, maker, makerSig, takerPermit, takerSig);\n        } */ else if (action == uint32(ISettlerActions.UNISWAPV3_VIP.selector)) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory permit,\n                bytes memory path,\n                bytes memory sig,\n                uint256 amountOutMin\n            ) = abi.decode(data, (address, ISignatureTransfer.PermitTransferFrom, bytes, bytes, uint256));\n\n            sellToUniswapV3VIP(recipient, path, permit, sig, amountOutMin);\n        } else {\n            return false;\n        }\n        return true;\n    }\n\n    function execute(\n        AllowedSlippage memory slippage,\n        bytes[] calldata actions,\n        bytes32 /* zid & affiliate */\n    )\n        public\n        payable\n        override\n        takerSubmitted\n        returns (bool)\n    {\n        return _execute(slippage, actions);\n    }\n\n    function executeWithPermit(\n        AllowedSlippage memory slippage,\n        bytes[] calldata actions,\n        bytes32 /* zid & affiliate */,\n        bytes memory permitData\n    ) public payable override takerSubmitted returns (bool) {\n        if (!_isForwarded()) {\n            revertConfusedDeputy();\n        }\n        // `token` should not be a restricted target, but `_isRestrictedTarget(token)` is not\n        // verified because the selectors of supported permit calls doesn't clash with any\n        // selectors of existing restricted targets, namely, AllowanceHolder, Permit2 and Bebop\n        address token;\n        assembly (\"memory-safe\") {\n            // initially, we set `args.offset` to the pointer to the length. this is 32 bytes\n            // before the actual start of data\n            let offset :=\n                add(\n                    actions.offset,\n                    // We allow the indirection/offset to `calls[i]` to be negative\n                    calldataload(actions.offset)\n                )\n            // Check that the action has at least the minimum size to be a VIP\n            // It should be at least (4 bytes action selector, 32 bytes recipient, 128 bytes permit)\n            if or(iszero(actions.length), gt(0xa4, calldataload(offset))) { revert(0x00, 0x00) }\n            // Take the token from the first 32 bytes of permit\n            token := calldataload(add(0x44, offset))\n        }\n        _dispatchPermit(_msgSender(), token, permitData);\n        return _execute(slippage, actions);\n    }\n\n    function _execute(AllowedSlippage memory slippage, bytes[] calldata actions) internal returns (bool) {\n        if (actions.length != 0) {\n            uint256 it;\n            assembly (\"memory-safe\") {\n                it := actions.offset\n            }\n            {\n                (uint256 action, bytes calldata data) = actions.decodeCall(it);\n                if (!_dispatchVIP(action, data)) {\n                    if (!_dispatch(0, action, data, slippage)) {\n                        revertActionInvalid(0, action, data);\n                    }\n                }\n            }\n            it = it.unsafeAdd(32);\n            for (uint256 i = 1; i < actions.length; (i, it) = (i.unsafeInc(), it.unsafeAdd(32))) {\n                (uint256 action, bytes calldata data) = actions.decodeCall(it);\n                if (!_dispatch(i, action, data, slippage)) {\n                    revertActionInvalid(i, action, data);\n                }\n            }\n        }\n\n        _checkSlippageAndTransfer(slippage, false);\n        return true;\n    }\n\n    // Solidity inheritance is stupid\n    function _msgSender()\n        internal\n        view\n        virtual\n        override(Permit2PaymentTakerSubmitted, AbstractContext)\n        returns (address)\n    {\n        return super._msgSender();\n    }\n\n    function _isRestrictedTarget(address target)\n        internal\n        view\n        virtual\n        override(Permit2PaymentTakerSubmitted, Permit2PaymentAbstract)\n        returns (bool)\n    {\n        return super._isRestrictedTarget(target);\n    }\n}\n\n// src/chains/Mainnet/Common.sol\n\n// When these actions are reenabled, reenable the integration tests by setting `curveV2TricryptoPoolId()`\n// import {CurveTricrypto} from \"../../core/CurveTricrypto.sol\";\n\n// Solidity inheritance is stupid\n\nabstract contract MainnetMixin is\n    FreeMemory,\n    SettlerBase,\n    MakerPSM,\n    MaverickV2,\n    //CurveTricrypto,\n    DodoV1,\n    DodoV2,\n    UniswapV4,\n    BalancerV3,\n    EkuboV2,\n    EkuboV3,\n    Bebop\n{\n    using SafeTransferLib for IERC20;\n    using SafeTransferLib for address payable;\n    using FastLogic for bool;\n    using Ternary for bool;\n\n    constructor() {\n        assert(block.chainid == _chainId() || block.chainid == 31337);\n    }\n\n    function _chainId() internal pure override returns (uint256) {\n        return 1;\n    }\n\n    function _dispatch(uint256, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        virtual\n        override(SettlerSwapAbstract, SettlerBase)\n        DANGEROUS_freeMemory\n        returns (bool)\n    {\n        //// NOTICE: we re-implement the base `_dispatch` implementation here so that we can remove\n        //// the `VELODROME` action JUST on this chain because it does little-to-no volume.\n\n        if (action == uint32(ISettlerActions.RFQ.selector)) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory permit,\n                address maker,\n                bytes memory makerSig,\n                IERC20 takerToken,\n                uint256 maxTakerAmount\n            ) = abi.decode(data, (address, ISignatureTransfer.PermitTransferFrom, address, bytes, IERC20, uint256));\n\n            fillRfqOrderSelfFunded(recipient, permit, maker, makerSig, takerToken, maxTakerAmount);\n        } else if (action == uint32(ISettlerActions.UNISWAPV3.selector)) {\n            (address recipient, uint256 ppm, bytes memory path, uint256 amountOutMin) =\n                abi.decode(data, (address, uint256, bytes, uint256));\n\n            sellToUniswapV3(recipient, ppm, path, amountOutMin);\n        } else if (action == uint32(ISettlerActions.UNISWAPV2.selector)) {\n            (address recipient, address sellToken, uint256 ppm, address pool, uint24 swapInfo, uint256 amountOutMin) =\n                abi.decode(data, (address, address, uint256, address, uint24, uint256));\n\n            sellToUniswapV2(recipient, sellToken, ppm, pool, swapInfo, amountOutMin);\n        } else if (action == uint32(ISettlerActions.BASIC.selector)) {\n            (IERC20 sellToken, uint256 ppm, address pool, uint256 offset, bytes memory _data) =\n                abi.decode(data, (IERC20, uint256, address, uint256, bytes));\n\n            basicSellToPool(sellToken, ppm, pool, offset, _data);\n        } /* `VELODROME` is removed */\n        else if (action == uint32(ISettlerActions.POSITIVE_SLIPPAGE.selector)) {\n            (address payable recipient, IERC20 token, uint256 expectedAmount, uint256 surplusPpm, uint256 maxPpm) =\n                abi.decode(data, (address, IERC20, uint256, uint256, uint256));\n            _checkRecipient(address(this), recipient, token);\n            bool isETH = (address(token) == ETH_ADDRESS);\n            uint256 balance = isETH ? address(this).balance : token.fastSpendableBalance();\n            if (balance > expectedAmount) {\n                uint256 cap;\n                unchecked {\n                    cap = balance * maxPpm / BASIS;\n                    balance -= expectedAmount;\n                    balance = balance * surplusPpm / BASIS;\n                }\n                balance = (balance > cap).ternary(cap, balance);\n                if (isETH) {\n                    recipient.safeTransferETH(balance);\n                } else {\n                    token.safeTransfer(recipient, balance);\n                }\n            }\n        } else if (action == uint32(ISettlerActions.UNISWAPV4.selector)) {\n            (\n                address recipient,\n                IERC20 sellToken,\n                uint256 ppm,\n                uint8 forkId,\n                bool feeOnTransfer,\n                uint256 hashMul,\n                uint256 hashMod,\n                bytes memory fills,\n                uint256 amountOutMin\n            ) = abi.decode(data, (address, IERC20, uint256, uint8, bool, uint256, uint256, bytes, uint256));\n\n            sellToUniswapV4(recipient, sellToken, ppm, forkId, feeOnTransfer, hashMul, hashMod, fills, amountOutMin);\n        } else if ((action == uint32(ISettlerActions.BALANCERV3.selector))\n                .or(action == uint32(ISettlerActions.EKUBO.selector))\n                .or(action == uint32(ISettlerActions.EKUBOV3.selector))) {\n            (\n                address recipient,\n                IERC20 sellToken,\n                uint256 ppm,\n                bool feeOnTransfer,\n                uint256 hashMul,\n                uint256 hashMod,\n                bytes memory fills,\n                uint256 amountOutMin\n            ) = abi.decode(data, (address, IERC20, uint256, bool, uint256, uint256, bytes, uint256));\n\n            if (action == uint32(ISettlerActions.BALANCERV3.selector)) {\n                sellToBalancerV3(recipient, sellToken, ppm, feeOnTransfer, hashMul, hashMod, fills, amountOutMin);\n            } else if (action == uint32(ISettlerActions.EKUBO.selector)) {\n                sellToEkuboV2(recipient, sellToken, ppm, feeOnTransfer, hashMul, hashMod, fills, amountOutMin);\n            } else { // if (action == uint32(ISettlerActions.EKUBOV3.selector))\n                sellToEkuboV3(recipient, sellToken, ppm, feeOnTransfer, hashMul, hashMod, fills, amountOutMin);\n            }\n        } else if (action == uint32(ISettlerActions.MAKERPSM.selector)) {\n            (address recipient, uint256 ppm, bool buyGem, uint256 amountOutMin, IPSM psm, IERC20 dai) =\n                abi.decode(data, (address, uint256, bool, uint256, IPSM, IERC20));\n\n            sellToMakerPsm(recipient, ppm, buyGem, amountOutMin, psm, dai);\n        } else if (action == uint32(ISettlerActions.MAVERICKV2.selector)) {\n            (\n                address recipient,\n                IERC20 sellToken,\n                uint256 ppm,\n                IMaverickV2Pool pool,\n                bool tokenAIn,\n                int32 tickLimit,\n                uint256 minBuyAmount\n            ) = abi.decode(data, (address, IERC20, uint256, IMaverickV2Pool, bool, int32, uint256));\n\n            sellToMaverickV2(recipient, sellToken, ppm, pool, tokenAIn, tickLimit, minBuyAmount);\n        } else if (action == uint32(ISettlerActions.BEBOP.selector)) {\n            (\n                address recipient,\n                IERC20 sellToken,\n                ISettlerActions.BebopOrder memory order,\n                ISettlerActions.BebopMakerSignature memory makerSignature,\n                uint256 amountOutMin\n            ) = abi.decode(\n                data, (address, IERC20, ISettlerActions.BebopOrder, ISettlerActions.BebopMakerSignature, uint256)\n            );\n\n            sellToBebop(payable(recipient), sellToken, order, makerSignature, amountOutMin);\n        } else if (action == uint32(ISettlerActions.DODOV2.selector)) {\n            (address recipient, IERC20 sellToken, uint256 ppm, IDodoV2 dodo, bool quoteForBase, uint256 minBuyAmount) =\n                abi.decode(data, (address, IERC20, uint256, IDodoV2, bool, uint256));\n\n            sellToDodoV2(recipient, sellToken, ppm, dodo, quoteForBase, minBuyAmount);\n        } else if (action == uint32(ISettlerActions.DODOV1.selector)) {\n            (IERC20 sellToken, uint256 ppm, IDodoV1 dodo, bool quoteForBase, uint256 minBuyAmount) =\n                abi.decode(data, (IERC20, uint256, IDodoV1, bool, uint256));\n\n            sellToDodoV1(sellToken, ppm, dodo, quoteForBase, minBuyAmount);\n        } else if (action == uint32(ISettlerActions.SELECT.selector)) {\n            select(data);\n        } else {\n            return false;\n        }\n        return true;\n    }\n\n    function _uniV3ForkInfo(uint8 forkId)\n        internal\n        pure\n        override\n        returns (address factory, bytes32 initHash, uint32 callbackSelector)\n    {\n        if (forkId == uniswapV3ForkId) {\n            factory = uniswapV3MainnetFactory;\n            initHash = uniswapV3InitHash;\n            callbackSelector = uint32(IUniswapV3Callback.uniswapV3SwapCallback.selector);\n        } else if (forkId == pancakeSwapV3ForkId) {\n            factory = pancakeSwapV3Factory;\n            initHash = pancakeSwapV3InitHash;\n            callbackSelector = uint32(IPancakeSwapV3Callback.pancakeV3SwapCallback.selector);\n        } else if (forkId == sushiswapV3ForkId) {\n            factory = sushiswapV3MainnetFactory;\n            initHash = uniswapV3InitHash;\n            callbackSelector = uint32(IUniswapV3Callback.uniswapV3SwapCallback.selector);\n        } else if (forkId == rubiconCLMMForkId) {\n            factory = rubiconCLMMFactory;\n            initHash = rubiconCLMMInitHash;\n            callbackSelector = uint32(IUniswapV3Callback.uniswapV3SwapCallback.selector);\n        } else if (forkId == namiForkId) {\n            factory = namiMainnetFactory;\n            initHash = namiInitHash;\n            callbackSelector = uint32(IAlgebraCallback.algebraSwapCallback.selector);\n        } else if (forkId == aeroForkId) {\n            factory = aeroMainnetFactory;\n            initHash = aeroInitHash;\n            callbackSelector = uint32(IUniswapV3Callback.uniswapV3SwapCallback.selector);\n        } else {\n            revertUnknownForkId(forkId);\n        }\n    }\n\n    /*\n    function _curveFactory() internal pure override returns (address) {\n        return 0x0c0e5f2fF0ff18a3be9b835635039256dC4B4963;\n    }\n    */\n\n    function _uniV4ForkInfo(uint8 forkId) internal pure override returns (IPoolManager poolManager) {\n        if (forkId == uniswapV4ForkId) {\n            poolManager = uniswapV4MainnetPoolManager;\n        } else {\n            revertUnknownForkId(forkId);\n        }\n    }\n\n    // I hate Solidity inheritance\n    function _fallback(bytes calldata data)\n        internal\n        virtual\n        override(Permit2PaymentAbstract, UniswapV4)\n        returns (bool success, bytes memory returndata)\n    {\n        return super._fallback(data);\n    }\n\n    function _isRestrictedTarget(address target)\n        internal\n        view\n        virtual\n        override(Bebop, Permit2PaymentAbstract)\n        returns (bool)\n    {\n        return super._isRestrictedTarget(target);\n    }\n}\n\n// `Attest` is listed last so that candidate selection sits above the chain actions in the\n// linearization; see `Select`.\nabstract contract MainnetCommon is MainnetMixin, Attest {\n    function _dispatch(uint256 i, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        virtual\n        override(MainnetMixin, Attest)\n        returns (bool)\n    {\n        return super._dispatch(i, action, data, slippage);\n    }\n\n    function _isRestrictedTarget(address target)\n        internal\n        view\n        virtual\n        override(MainnetMixin, Permit2PaymentAbstract)\n        returns (bool)\n    {\n        return super._isRestrictedTarget(target);\n    }\n\n    function _fallback(bytes calldata data)\n        internal\n        virtual\n        override(MainnetMixin, Attest)\n        returns (bool success, bytes memory returndata)\n    {\n        return super._fallback(data);\n    }\n}\n\n// src/chains/Mainnet/TakerSubmitted.sol\n\n// Solidity inheritance is stupid\n\n// The taker dispatcher must precede the chain dispatcher so candidates retain its checks.\n/// @custom:security-contact security@0x.org\ncontract MainnetSettler is MainnetMixin, Settler, MainnetCommon {\n    using FastLogic for bool;\n\n    constructor(bytes20 gitCommit) SettlerBase(gitCommit) {}\n\n    function _dispatch(uint256 i, uint256 action, bytes calldata data, AllowedSlippage memory slippage)\n        internal\n        override(Settler, MainnetMixin, MainnetCommon)\n        returns (bool)\n    {\n        return super._dispatch(i, action, data, slippage);\n    }\n\n    function _dispatchVIP(uint256 action, bytes calldata data) internal override DANGEROUS_freeMemory returns (bool) {\n        if (super._dispatchVIP(action, data)) {\n            return true;\n        } else if (action == uint32(ISettlerActions.UNISWAPV4_VIP.selector)) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory permit,\n                uint8 forkId,\n                bool feeOnTransfer,\n                uint256 hashMul,\n                uint256 hashMod,\n                bytes memory fills,\n                bytes memory sig,\n                uint256 amountOutMin\n            ) = abi.decode(\n                data,\n                (address, ISignatureTransfer.PermitTransferFrom, uint8, bool, uint256, uint256, bytes, bytes, uint256)\n            );\n\n            sellToUniswapV4VIP(recipient, forkId, feeOnTransfer, hashMul, hashMod, fills, permit, sig, amountOutMin);\n        } else if ((action == uint32(ISettlerActions.BALANCERV3_VIP.selector))\n                .or(action == uint32(ISettlerActions.EKUBOV3_VIP.selector))) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory permit,\n                bool feeOnTransfer,\n                uint256 hashMul,\n                uint256 hashMod,\n                bytes memory fills,\n                bytes memory sig,\n                uint256 amountOutMin\n            ) = abi.decode(\n                data, (address, ISignatureTransfer.PermitTransferFrom, bool, uint256, uint256, bytes, bytes, uint256)\n            );\n\n            if (action == uint32(ISettlerActions.BALANCERV3_VIP.selector)) {\n                sellToBalancerV3VIP(recipient, feeOnTransfer, hashMul, hashMod, fills, permit, sig, amountOutMin);\n            } else { // if (action == uint32(ISettlerActions.EKUBOV3_VIP.selector))\n                sellToEkuboV3VIP(recipient, feeOnTransfer, hashMul, hashMod, fills, permit, sig, amountOutMin);\n            }\n        } /* else if (action == uint32(ISettlerActions.CURVE_TRICRYPTO_VIP.selector)) {\n            (\n                address recipient,\n                ISignatureTransfer.PermitTransferFrom memory permit,\n                uint80 poolInfo,\n                bytes memory sig,\n                uint256 minBuyAmount\n            ) = abi.decode(data, (address, ISignatureTransfer.PermitTransferFrom, uint80, bytes, uint256));\n            sellToCurveTricryptoVIP(recipient, poolInfo, permit, sig, minBuyAmount);\n        } */ else {\n            return false;\n        }\n        return true;\n    }\n\n    // Solidity inheritance is stupid\n    function _isRestrictedTarget(address target)\n        internal\n        view\n        override(Settler, MainnetMixin, MainnetCommon)\n        returns (bool)\n    {\n        return super._isRestrictedTarget(target);\n    }\n\n    function _msgSender() internal view override(Settler, AbstractContext) returns (address) {\n        return super._msgSender();\n    }\n\n    function _fallback(bytes calldata data)\n        internal\n        virtual\n        override(Permit2PaymentAbstract, MainnetMixin, MainnetCommon)\n        returns (bool, bytes memory)\n    {\n        return super._fallback(data);\n    }\n}\n"}},"language":"Solidity","settings":{"viaIR":true,"metadata":{"appendCBOR":false,"bytecodeHash":"none","useLiteralContent":false},"libraries":{},"optimizer":{"runs":2000,"details":{"yul":true,"constantOptimizer":true},"enabled":true},"evmVersion":"osaka","remappings":["@solmate/=lib/solmate/src/","@permit2/=lib/permit2/src/","@forge-std/=lib/forge-std/src/","@forge-gas-snapshot/=lib/forge-gas-snapshot/src/","@uniswapv4/=lib/v4-core/src/","forge-std/src/=lib/forge-std/src/","lib/permit2/:forge-std/=lib/forge-std/src/","solmate/=lib/solmate/","openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/"]}},"stdJsonOutput":{"sources":{"src/flat/MainnetTakerSubmittedFlat.sol":{"id":0}},"contracts":{"src/flat/MainnetTakerSubmittedFlat.sol":{"MainnetSettler":{"abi":[{"type":"constructor","inputs":[{"name":"gitCommit","type":"bytes20","internalType":"bytes20"}],"stateMutability":"nonpayable"},{"name":"InvalidOffset","type":"error","inputs":[]},{"name":"InvalidTarget","type":"error","inputs":[]},{"name":"GitCommit","type":"event","inputs":[{"name":"","type":"bytes20","indexed":true,"internalType":"bytes20"}],"anonymous":false},{"type":"fallback","stateMutability":"nonpayable"},{"name":"balanceOf","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"pure"},{"name":"execute","type":"function","inputs":[{"name":"slippage","type":"tuple","components":[{"name":"recipient","type":"address","internalType":"address payable"},{"name":"buyToken","type":"address","internalType":"contract IERC20"},{"name":"minAmountOut","type":"uint256","internalType":"uint256"}],"internalType":"struct ISettlerBase.AllowedSlippage"},{"name":"actions","type":"bytes[]","internalType":"bytes[]"},{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"payable"},{"name":"executeWithPermit","type":"function","inputs":[{"name":"slippage","type":"tuple","components":[{"name":"recipient","type":"address","internalType":"address payable"},{"name":"buyToken","type":"address","internalType":"contract IERC20"},{"name":"minAmountOut","type":"uint256","internalType":"uint256"}],"internalType":"struct ISettlerBase.AllowedSlippage"},{"name":"actions","type":"bytes[]","internalType":"bytes[]"},{"name":"","type":"bytes32","internalType":"bytes32"},{"name":"permitData","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"payable"},{"type":"receive","stateMutability":"payable"}],"metadata":"{\"compiler\":{\"version\":\"0.8.34+commit.80d5c536\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes20\",\"name\":\"gitCommit\",\"type\":\"bytes20\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidOffset\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTarget\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes20\",\"name\":\"\",\"type\":\"bytes20\"}],\"name\":\"GitCommit\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"buyToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"}],\"internalType\":\"struct ISettlerBase.AllowedSlippage\",\"name\":\"slippage\",\"type\":\"tuple\"},{\"internalType\":\"bytes[]\",\"name\":\"actions\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execute\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"buyToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"}],\"internalType\":\"struct ISettlerBase.AllowedSlippage\",\"name\":\"slippage\",\"type\":\"tuple\"},{\"internalType\":\"bytes[]\",\"name\":\"actions\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"permitData\",\"type\":\"bytes\"}],\"name\":\"executeWithPermit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"custom:security-contact\":\"security@0x.org\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"errors\":{\"InvalidOffset()\":[{\"notice\":\"Thrown when an offset is not the expected value\"}],\"InvalidTarget()\":[{\"notice\":\"Thrown when a target contract is invalid given the context\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/flat/MainnetTakerSubmittedFlat.sol\":\"MainnetSettler\"},\"evmVersion\":\"osaka\",\"libraries\":{},\"metadata\":{\"appendCBOR\":false,\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[\":@forge-gas-snapshot/=lib/forge-gas-snapshot/src/\",\":@forge-std/=lib/forge-std/src/\",\":@permit2/=lib/permit2/src/\",\":@solmate/=lib/solmate/src/\",\":@uniswapv4/=lib/v4-core/src/\",\":forge-std/src/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/\",\":solmate/=lib/solmate/\",\"lib/permit2/:forge-std/=lib/forge-std/src/\"],\"viaIR\":true},\"sources\":{\"src/flat/MainnetTakerSubmittedFlat.sol\":{\"keccak256\":\"0x7cb265e91e8dcfdd9a95bb919acf88ad007f6622f677f1abe9fba8d2b7ec045a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://073485fac98d1dfd07c4a5e6f8782c2fdd679e5f8327891771bd6922f0c41826\",\"dweb:/ipfs/QmXjpneKoRVYWuHoUeATcciYbL1286dXyMe75zu6e45ozB\"]}},\"version\":1}","userdoc":{"kind":"user","errors":{"InvalidOffset()":[{"notice":"Thrown when an offset is not the expected value"}],"InvalidTarget()":[{"notice":"Thrown when a target contract is invalid given the context"}]},"methods":{},"version":1},"devdoc":{"kind":"dev","methods":{},"version":1,"custom:security-contact":"security@0x.org"},"storageLayout":{"types":null,"storage":[]},"transientStorageLayout":{"types":null,"storage":[]},"evm":{"bytecode":{"object":"60a0806040523461074e5760208161642f803803809161001f8285610769565b83398101031261074e57516001600160601b031981169081900361074e576100cc60405161004e608082610769565b605b81527f536c697070616765416e64416374696f6e73286164647265737320726563697060208201527f69656e742c6164647265737320627579546f6b656e2c75696e74323536206d6960408201527f6e416d6f756e744f75742c62797465735b5d20616374696f6e7329000000000060609091015260016107a0565b61013f6040516100dd608082610769565b604181527f536c697070616765286164647265737320726563697069656e742c616464726560208201527f737320627579546f6b656e2c75696e74323536206d696e416d6f756e744f75746040820152602960f81b60609091015260016107a0565b61017861014a6107f9565b602081519101207f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa146107a0565b61025a604051610189608082610769565b604b8152602081017f5266714f7264657228436f6e73696465726174696f6e206d616b6572436f6e7381527f696465726174696f6e2c436f6e73696465726174696f6e2074616b6572436f6e60408301526a73696465726174696f6e2960a81b60608301526102306101f96107f9565b9160208060405194859382850197518091895e8401908282015f8152815193849201905e01015f815203601f198101835282610769565b5190207f49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a7598276146107a0565b46617a6914908161075a57604051907f16fbd3a71aa6d159973eb9ff1e1199f9fe242767e6f30ac662a492f92ac704115f80a26331a9108f60e11b8152600260048201526020816024816d04533fe15556b1e086bb1a72ceae5afa8015610700575f90610712575b6102d791506001600160a01b031630146107a0565b6001461480918115918261070b575b6102ef906107a0565b60405163313ce56760e01b815260208160048173a0b86991c6218b36c1d19d4a2e9eb0ce3606eb485afa9081156107005761033f91610335915f916106d1575b506107d4565b620f4240146107a0565b60405163313ce56760e01b815260208160048173dac17f958d2ee523a2206206994597c13d831ec75afa9081156107005761038491610335915f916106d157506107d4565b73f6e72db5454dd049d0788e411b06cfaf168530426014525f196034526f095ea7b30000000000000000000000005f5260205f6044601082736b175474e89094c44da98b954eedeac495271d0f5af1156106c1573d153d601f1060015f51141617156106b45773f6e72db5454dd049d0788e411b06cfaf168530426014525f196034526f095ea7b30000000000000000000000005f908152602090604460108273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb485af1156106c1573d153d601f1060015f51141617156106b45773a188eec8f81263234da3622a406892f3d630f98c6014525f196034526f095ea7b30000000000000000000000005f908152602090604460108273dc035d45d973e3ec169d2276ddab16f1e407384f5af1156106c1573d153d601f1060015f51141617156106b45773a188eec8f81263234da3622a406892f3d630f98c6014525f196034526f095ea7b30000000000000000000000005f908152602090604460108273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb485af1156106c1573d153d601f1060015f51141617156106b45773ce355440c00014a229bbec030a2b8f8eb45a28976014525f196034526f095ea7b30000000000000000000000005f9081526020906044601082734f8e5de400de08b164e7421b3ee387f461becd1a5af1156106c1573d153d601f1060015f51141617156106b45773217e42ceb2eae9ecb788fdf0e31c806c531760a36014525f196034526f095ea7b30000000000000000000000005f908152602090604460108273dac17f958d2ee523a2206206994597c13d831ec75af1156106c1573d153d601f1060015f51141617156106b45761062e925f60345273bbbbbbb520d69a9775e85b458c58c648259fad5f3b158015906106ad575b610622906107a0565b916106a5575b506107a0565b6040517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8665f527f574f8ba830fef8423e08e5c83d3cf7988b76ba736a1cb6cd4bd1ca02c0d16edc60205260016040523060605260805f20816040525f606052608052615bae908161088182396080518161295a0152f35b90505f610628565b5081610619565b633e3f8f735f526004601cfd5b60405162ffffff163d5f823e3d90fd5b6106f3915060203d6020116106f9575b6106eb8183610769565b8101906107bb565b5f61032f565b503d6106e1565b6040513d5f823e3d90fd5b50806102e6565b506020813d602011610752575b8161072c60209383610769565b8101031261074e57516001600160a01b038116810361074e576102d7906102c2565b5f80fd5b3d915061071f565b61076490156107a0565b6102d7565b601f909101601f19168101906001600160401b0382119082101761078c57604052565b634e487b7160e01b5f52604160045260245ffd5b156107a757565b634e487b7160e01b5f52600160045260245ffd5b9081602091031261074e575160ff8116810361074e5790565b60ff16604d81116107e557600a0a90565b634e487b7160e01b5f52601160045260245ffd5b60405190610808608083610769565b605882527f626f6f6c207061727469616c46696c6c416c6c6f7765642900000000000000006060837f436f6e73696465726174696f6e286164647265737320746f6b656e2c75696e7460208201527f32353620616d6f756e742c6164647265737320636f756e74657270617274792c6040820152015256fe6080604052600436101561002f575b361561002d5734610029576100216106b6565b602081519101f35b5f80fd5b005b5f3560e01c806306b8524c146100dc5780631fff991f14610076576370a082310361000e57346100295760206003193601126100295761006d6106a0565b505f805360015ff35b60a06003193601126100295761008b366105ae565b6064359067ffffffffffffffff8211610029576100d26100cc6100b460209436906004016105ff565b906100bd611e13565b946100c786611c75565b611cfe565b91611cca565b6040519015158152f35b60c0600319360112610029576100f1366105ae565b60643567ffffffffffffffff8111610029576101119036906004016105ff565b60a43567ffffffffffffffff811161002957610131903690600401610682565b9161013a611e13565b9261014484611c75565b6d1ff3684f28c67538d4d072c2273433036104e65781358201803560a4118415176100295760440135906bcd1e9517bb0cb8d0d5cde8935c918151826020015160f81c83600101915f1901825261019a81611e39565b806103285750516080908301839003126100295760218201516041830151926001600160a01b036081606183015192015193169260205f60e4604051846001600160ff1b03168160d40152858160b401528460ff1c601b0181609401528881607401528681605401526d1ff3684f28c67538d4d072c2273481603401528960601b818501526fd505accf000000000000000000000000815260100182885af1601f3d1160015f5114161615610260575b5050505050506100d2916100cc91602095611cfe565b84979599939694421161031b5789604288610310956100d29b61029e60209f61028c906100cc9e612bdd565b9361029985858984612c10565b612c73565b92604051936119018552602085015283604001927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528685606001526d1ff3684f28c67538d4d072c2273485608001528460a001525f19018360c001528260e0015260c081209052601e0120612c96565b95829482948961024a565b631a15a3cc5f526004601cfd5b91929161033481611e39565b600181036104c457505160a0908201829003126100295760218101516041820151916061810151938415158095036100295760205f6101046001600160a01b0360a1608187015196015194169560405190856001600160ff1b03168260f40152868260d401528560ff1c601b018260b4015289826094015288826074015281605401526d1ff3684f28c67538d4d072c2273481603401528960601b818501526f8fcbaf0c000000000000000000000000815260100182875af1601f3d1160015f5114161615610413575050505050506100d2916100cc91602095611cfe565b8396949795999315158742110261031b578960426100cc98856100d29b61045260209f610443906103109a612bdd565b9261029984845f038984612c10565b92604051936119018552602085015283604001927fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb84528685606001526d1ff3684f28c67538d4d072c2273485608001525f19018460a001528360c001528260e0015260c081209052601e0120612c96565b600281118063b7e59b040263f9ade075185f526021821802186020526024601cfd5b63e758b8d55f526004601cfd5b6060810190811067ffffffffffffffff82111761050f57604052565b634e487b7160e01b5f52604160045260245ffd5b60e0810190811067ffffffffffffffff82111761050f57604052565b6040810190811067ffffffffffffffff82111761050f57604052565b6080810190811067ffffffffffffffff82111761050f57604052565b90601f601f19910116810190811067ffffffffffffffff82111761050f57604052565b35906001600160a01b038216820361002957565b600319606091011261002957604051906105c7826104f3565b816004356001600160a01b03811681036100295781526024356001600160a01b03811681036100295760208201526040604435910152565b9181601f840112156100295782359167ffffffffffffffff8311610029576020808501948460051b01011161002957565b67ffffffffffffffff811161050f57601f01601f191660200190565b92919261065882610630565b916106666040519384610577565b829481845281830111610029578281602093845f960137010152565b9080601f830112156100295781602061069d9335910161064c565b90565b600435906001600160a01b038216820361002957565b60606bcdccd5c65a7d4860ce3abbe95c90813318811b825f351860e01c1715809260a01c61ffff160291611c61575b6106ed612381565b91909280155f1461070c575050610703916126a2565b90156100295790565b83600401909283600314611821578360061461130f5783600514610de05783600414610d1c575082600714610c5f575081600114610790575060021461076057634e487b7160e01b5f52605160045260245ffd5b80604461077592013590602433910135612633565b604051610783602082610577565b5f80825236602083013790565b916107fa9150606460448201359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b6001600160a01b0397939195969497309116036100295761081c9330936136b3565b5050505093919490806040019583875190610c48575b8051607f1c610baf575194828a0195865261084c83613981565b906108556132d5565b9060208201918b8560408301955b8b6030861015610a47575050505050505050855195866020015196519561088b835182613f1c565b8260200151805115610a37575b50805191826109c0575b5050505180602001519051968088106109b957506108c69187916303a65ab6613d6c565b1561098157509081159081156108fc575b5050505b60405182819382526020828101526020826040015201528060800160405290565b841b9061096557604051918452306040528073777777777777777777777777777777777777777760611b141502602c526f03a65ab6000000000000000000000000600c525f806064601c82335af11561095d575f83526040525f80806108d7565b3d5f823e3d90fd5b6020526fcbf0dbf50000000000000000000000005f5260246010fd5b5181811461099c579061099692910390615ac6565b506108db565b826014526ffb772a880000000000000000000000005f5260246010fd5b8791612610565b6109c982613b03565b5190518103610a11575b5060015b828110156108a25780610a0b6109fe6001938560209160051b010151908160200151915190565b9030906303a65ab6613d6c565b016109d7565b60208101519051610a319130906001600160a01b03166303a65ab6613d6c565b5f6109d3565b610a419082613f1c565b5f610898565b60405f610a6d848a953560e81c94600f600e19836003013560a01c9c019201908861399e565b9890966280000087602001956001600160a01b03875199620f42408b51627fffff851602049a602001519051602001519080861b90838084891b92169316918082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159a838383188d0280941816905218168073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028b528d601f198b6020019d019a359052610b298a8d613abf565b16158314610bcc5760e4918451918483528a836020015e87826080015286158260a001528160c00152828160e00152601c0182335af115610bc1575f5192610b8160205194935b848618029485935193849118613acb565b9180519083820390528211911117610baf57610ba38851809381519318613ae6565b01905291858d91610863565b634e487b715f5260116020526024601cfd5b6040513d5f823e3d90fd5b610104918451916f101e8952000000000000000000000000835260148b8701846020015e8a836034015e87826094015286158260b401528160d40152828160f4015260100182335af115610bc1575f51926020518080600f0b188580600f0b18178280600f0b183d604011171761002957610b81909493610b70565b610c588160200151825190615ac6565b8152610832565b909291503581016004810135610c736132d5565b5f92602481015b838510610cbf5750505050506044610ca26064830135610c9d60248501356125d9565b612374565b9101358110610caf575090565b63a55fee2e5f526020526024601cfd5b60048135830101604081013560e01c60446003196020840135019201908260401c9283158091029390610d08575b610d0257505050602060019101940193610c7a565b87612227565b50610d16868484848c613e71565b15610ced565b6080919293506003190110610029573560448301358301906024820135831c9360245f83131591013582180218913084145f14610d65576107759350603833920135901c612633565b5090610d74610ddb9315613698565b60405190610d818261053f565b3382526020820152610d9636602c8401611e57565b90610dd560ac84013560f81c93369060ad7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff77600483013501910161064c565b9161317d565b610775565b505091610e5d91508060446024610e509301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b95869391979894986136b3565b968c868060409d959896979d99949901518c8b8b8b8b8a306001600160a01b038716036112ff575b6112e1575b5050505050908d9493929151910152610ea285613981565b908d85610ead613322565b92610eb66132d5565b945b603582101561110a575050935050505060400151968760200151975199610ee0845182613f1c565b83602001518051156110fa575b508051908161107b575b50508251806020015190519b808d106110745750610f1b918c91630b0d9c09613d6c565b15610ff85750505050508215918215610f54575b5050505060405182819382526020828101526020826040015201528060800160405290565b6001600160a01b03163003610fe45730905b851b91610fc7576040519285526040528073777777777777777777777777777777777777777760611b141502602c526f0b0d9c09000000000000000000000000600c525f806064601c82335af11561095d575f83526040525f808080610f2f565b506020526fcbf0dbf50000000000000000000000005f5260246010fd5b6bcd1e9517bb0cb8d0d5cde8935c90610f66565b89969294969591939501519680880397146110585773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03821618891b61104d57505050505050610996906110475f33613e2c565b33613e55565b906109969691613dbf565b6014526ffb772a880000000000000000000000005f5260246010fd5b8c91612610565b61108481613b03565b51856040015181036110d4575b5060015b8281106110a25750610ef7565b806110ce6110c16001938560209160051b010151908160200151915190565b903090630b0d9c09613d6c565b01611095565b602081015190516110f49130906001600160a01b0316630b0d9c09613d6c565b5f611091565b6111049082613f1c565b5f610eed565b5f620f4240948761121e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe66111698661122d9d60176016196001600160a01b039b60209b3560e81c98604086600301358c1c910152019201908b61399e565b888c8b8a959495019b8c518b015190518b0151918b828b1b848c1b8082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159d8e858518028095181691015218168c526001600160a01b0383358d60408260e81c9101528d8862ffffff8360d01c1660020b91015260301c1660808d01520190601a01919091803560e81c6002198160038185820195010195030192565b93839d85949b9293809f613abf565b88158d5289515102048503868c01526040519363f3cd914c85528a518073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028588015260808b8801866040015e8b8560c0015e61012084810152818461014001528361016001376101440190601c0182335af115610bc1575f51906112c182600f0b9260801d600f0b918383180293519184835191185f0390612374565b90526112d38851809381519318613acb565b019052858f91948e95610eb8565b6112f394866020015190875191613dbf565b81528c8b8b8b8b610e8a565b61130882613835565b8752610e85565b5050905061138e915061137f611323612381565b90919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b958693919598979994996136b3565b9697919492939a90958a84604001998a518c8b8b8b8b8a306001600160a01b03871603611811575b6117f3575b505050505051868301526113ce86613981565b6113d6613322565b925f604051936113e585610523565b8185528160208601528160408601528401525f60808401525f60a08401528d60c08401525b60048110156115e25750505050875197886020015198519b61142d855182613f1c565b84602001518051156115d2575b508051918261155b575b50505082518c816020015191519d8e106115545750611469918d9163ae639329613d6c565b1561152b575050505050831591821561149a575b50505050505b604051906020825281602001528060400160405290565b6001600160a01b031630036115175730905b831b91610fc7576040519383526040528073777777777777777777777777777777777777777760611b141502602c526fae639329000000000000000000000000600c525f806064601c82335af11561150e575f90526040525f8080808061147d565b503d5f823e3d90fd5b6bcd1e9517bb0cb8d0d5cde8935c906114ac565b909396999897999591949295015198808a1461099c5761154e9798990391613ce4565b50611483565b8d91612610565b61156482613b03565b51905181036115ac575b5060015b8281101561144457806115a66115996001938560209160051b010151908160200151915190565b90309063ae639329613d6c565b01611572565b602081015190516115cc9130906001600160a01b031663ae639329613d6c565b5f61156e565b6115dc9082613f1c565b5f61143a565b813560e81c90620f424082623fffff1611610baf578f928f9360021961160e930191600301908a61399e565b9092818462c00000851661173c5750506116908461169c949535831c8760200152620f42408b602001966001600160a01b038851602001511660408a01526001600160a01b038d516020015116858a015287515102046080880152601319604051940190601401919091803560e81c6002198160038185820195010195030192565b9692959196369161064c565b60c08701526116ab8585613abf565b60405190603f19870190815190601f198901938451632bfb780c8552602086528a60c00195875f8d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc60448b805184815191038092520101910182335af115610bc157602051946040519652526040525190815103905261172f8b519182516127d4565b9052526040525b9061140a565b93926117489195613abf565b6240000082166117d0575f60208701526001600160a01b038951602001511660408701525b620f4240623fffff8a602001931683515102048187015260405191601f198701928351926343583be585525f60a46003198b0182335af11561095d57602051926040519452604052519081510390526117c988519182516127d4565b9052611736565b600160208701526001600160a01b0389602001516020015116604087015261176d565b61180594866020015190875191613ce4565b81528c8b8b8b8b6113bb565b61181a82613835565b87526113b6565b50509161189f915080606460446118919301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b9695879391969894986136b3565b9699929398909585604096939601519a306001600160a01b038616149b838d15611c51575b611c35575b8051607f1c610baf5751848f01528d906118e285613981565b91846118ec6132d5565b935b8d6030841015611a565750509250505060400151978860200151985199611916845182613f1c565b8360200151805115611a46575b50805190816119d1575b505082518c816020015191519d8e10611554575061194c918d91613b24565b156119ac57505050505050816119805750505060405182819382526020828101526020826040015201528060800160405290565b6119909215611998573090613b24565b5f80806108d7565b6bcd1e9517bb0cb8d0d5cde8935c90613b24565b909193959294969a9980999850015199808b1461099c576109969798999a039161389d565b6119da81613b03565b5185604001518103611a25575b5060015b8281106119f8575061192d565b80611a1f611a176001938560209160051b010151908160200151915190565b903090613b24565b016119eb565b60208101519051611a409130906001600160a01b0316613b24565b5f6119e7565b611a509082613f1c565b5f611923565b60205f611a7c8489953560e81c94600f600e19836003013560a01c9a019201908861399e565b97909662800000878501956001600160a01b03875199620f42408b51627fffff851602049a88015190518801519080871b908380848a1b92169316918082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159a89848d858518028095181691015218168073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028c52601f198a87019b01993560408d0152611b388a8c613abf565b16158314611bc757608491604051918715601f1b83608001528883607c015282606c01528a8286015e828152601c0182335af115610bc1575f51928080600f0b1861002957611b9a84600f0b9460801d93848618029485935193849118613acb565b9180519083820390528211911117610baf57611bbc8751809381519318613ae6565b019052848f926118ee565b60a491604051918715601f1b836094015288836090015282608001528a826034015e60148a6040018286015e6f101e8952000000000000000000000000815260100182335af115610bc1575f51928080600f0b183d6040111761002957611b9a84600f0b9460801d93610b70565b611c4a8a8a8a8a85602001518b87519161389d565b81526118c9565b611c5a88613835565b82526118c4565b5f6bcdccd5c65a7d4860ce3abbe95d6106e5565b8060601b156104e6576bcd1e9517bb0cb8d0d5cde8935c8060601b611cae57506001600160a01b03166bcd1e9517bb0cb8d0d5cde8935d565b6014526f7407c0f80000000000000000000000005f5260246010fd5b6bcd1e9517bb0cb8d0d5cde8935c1860601b611cf1575f6bcd1e9517bb0cb8d0d5cde8935d565b635149e7955f526004601cfd5b90929180611d18575b50611d1391925061225d565b600190565b8335840180358160200135918260e01c6024600319840192019086604051611d41858585611ecc565b9060405215611da8575b50505050505060208401936001945b828610611d68575050611d07565b80358201806020013560e01c6024600319833501920190611d8c878484848d612b36565b15611da257505050602060019101950194611d5a565b88612227565b8383611db3936128dd565b15611dbf578086611d4b565b60809394507fffffffff0000000000000000000000000000000000000000000000000000000060405195633c74eed687525f876020015216856040015260608581015281858501528460a001370190601c01fd5b33906d1ff3684f28c67538d4d072c227343314611e2c57565b36601319013560601c9150565b60031115611e4357565b634e487b7160e01b5f52602160045260245ffd5b8092910391608083126100295760405190611e71826104f3565b60408294126100295760606040918251611e8a8161053f565b611e938261059a565b81526020820135602082015284528281013560208501520135910152565b3590811515820361002957565b359060ff8216820361002957565b919091611eda8284836123ae565b15611ee757505050600190565b636a92dacb8103611fef575081016101808282031261002957611f098261059a565b611f168260208501611e57565b91611f2360a08501611ebe565b91611f3060c08601611eb1565b9161012086013567ffffffffffffffff81116100295781611f52918801610682565b926101408701359267ffffffffffffffff841161002957875f98976001600160a01b0396611f89611fb696611fbc988d9c01610682565b926d1ff3684f28c67538d4d072c22734331494610160820135968a60e061010085013594013592166127e1565b926128bc565b16611fc681613c57565b82602083519301915af1611fd86132f3565b9015611fe75750611d13613cbe565b602081519101fd5b634150c86c81149291906310cd63431483171561222057810191610160828403126100295761201d8261059a565b9161202b8460208301611e57565b61203760a08301611eb1565b9460e083013560c084013561010085013567ffffffffffffffff81116100295783612063918701610682565b9261012086013567ffffffffffffffff81116100295761014091612088918801610682565b950135976001600160a01b03881696156120f9579463ffffffff946120c9945f9a948b9a99946120d3996d1ff3684f28c67538d4d072c227343314966127e1565b9260801c16613bed565b6020815191018273ba1333333333a1ba1108e8412f11850a5c319ba95af1611fd86132f3565b94919650969291946d1ff3684f28c67538d4d072c227343314936060890298808a046060149015171561220c5760608802978089046060149015171561220c578760801c15158960801c15158260801c15151717610baf575f9889986040610132966101159882519b8051988d81519b8c928c838101938380868801019787601c198a015260200191015e60200191015e60030183528b610131015381816020018c60f1015e518a60b1015e8989609d015288608801528760780152866068015285605801520160d1810184604401526020846024015263f83d08ba846004015201825215158160a801536121ec613b8d565b602081519101826d14aa86c5d3c41765bb24e11bd7015af1611fd86132f3565b634e487b7160e01b5f52601160045260245ffd5b5050505f90565b9291829160405194633c74eed68652856020015260e01b84604001526060848101528184608001528360a0013760840190601c01fd5b906001600160a01b03825116916001600160a01b036020820151169260408201519084158215026122e957612291856125d9565b908282106122e157856060959673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee18861b155f146122cd57506122c89250612693565b389039565b916122dc938111900391612633565b6122c8565b509084612610565b5050509050565b9190916001600160a01b038151166001600160a01b03602083015116604083015191811583150261236c57612324826125d9565b9583871061236457956060959615908418028318918073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee18861b155f146122cd57506122c89250612693565b868484612610565b505050509050565b9190820391821161220c57565b336d1ff3684f28c67538d4d072c22734036123a85760131936019036821161220c575f9190565b5f903690565b90919063c1fb425e8103612448575081019060c081830312610029576123d38161059a565b6123e08360208401611e57565b9160a08101359367ffffffffffffffff851161002957611d13946124049201610682565b90604051906124128261053f565b6001600160a01b0360208301915f835216825261242f845f612cd8565b90526d1ff3684f28c67538d4d072c2273433149261317d565b633036d6a6036125d35781019061010081830312610029576124698161059a565b6124768360208401611e57565b9160a081013567ffffffffffffffff81116100295784612497918301610682565b9360c08201359067ffffffffffffffff8211610029576124b8918301610682565b93602c8151106125c1578451608901938460891161220c5761257495601f196124f96124e388610630565b976124f1604051998a610577565b808952610630565b013660208801376d1ff3684f28c67538d4d072c2273433148251602001518760480152604083602001886068015e8660a801538051906020018660a9015e845181515186602801525f866014015285525191602083015192831990620f4240821061257a575b505060e00135926001600160a01b0316612d39565b50600190565b6001600160a01b039294506125b560e0926125b0856125ba94511691620f424003916bcd1e9517bb0cb8d0d5cde8935c90612ba9565b6135d7565b6135f0565b939161255f565b634e487b715f5260326020526024601cfd5b50505f90565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0382161860601b61260557504790565b61069d903090612ba9565b916054526034526014526f97a6f3b90000000000000000000000005f5260646010fd5b60105f60449260209582956014526034526fa9059cbb00000000000000000000000082525af115612683573d153d601f1060015f5114161715612676575f603452565b6390b8ec185f526004601cfd5b60405162ffffff163d5f823e3d90fd5b5f80809381935af115610bc157565b907f5ea1d46a000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000833581811690600485106127c0575b501614612708576127049161358a565b9091565b50506bcd1e9517bb0cb8d0d5cde8935c908160a01c60011615610029576b3a9113a02a267cff8bfd38516bb39834f1d3371754c5eae0a7905c905c90604051938460c00160405261276a6fffffffffffffffffffffffffffffffff8416613370565b5060e0855284602001526ce000000000000000000000000084600c01528064ffffffffff168460a0015260601c83608001526ca000000000000000000000000083606c015282604001525f82604c015260019190565b828092508560040360031b1b16165f6126f4565b9190820180921161220c57565b92989791909695939860608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c15151717610baf576040610132966101159882519c8d9881519981519b8c928c838101938380868801019787601c198a015260200191015e60200191015e600301835215158c610131015381816020018d60f1015e518b60b1015e5f8a609d015289608801528860780152876068015286605801520160d181018560440152602085602401526348c89491856004015201835215158260a80153565b60ff81166128d857506e04444c5dc75cb358380d2e3de08a9090565b61335d565b9291909263562e052c81146128f7579261069d935f613e71565b5060609150829081010312610029578035604082013590604051928160281c151582421117612b25576084359260206bcd1e9517bb0cb8d0d5cde8935c926129506fffffffffffffffffffffffffffffffff8716613370565b46600103612ac2577f0000000000000000000000000000000000000000000000000000000000000000905b604051957f549c17970871bfdfb0ff321bda3359ea022619d3d8bbae6929a36123a847fb258752868501527fda3359ea022619d3d8bbae6929a36123a847fb2500000000000000000000000086600c01528686604001527fffffffffffffffffffffffff00000000000000000000000000000000000000008816866060015280519084012085608001526119015f52825260a084206040526042601e205f528260ff1c601b01825201356040526001600160ff1b03166060526020600160805f825afa5190813d0215612ab5576040525f6060526b3a9113a02a267cff8bfd3851906bb39834f1d3371754c5eae0a79264ffffffffff169060601b17905d5d6bcd1e9517bb0cb8d0d5cde8935c74010000000000000000000000000000000000000000176bcd1e9517bb0cb8d0d5cde8935d604052600190565b638baa579f5f526004601cfd5b6040517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8665f527f574f8ba830fef8423e08e5c83d3cf7988b76ba736a1cb6cd4bd1ca02c0d16edc8452466040523060605260805f20906040525f6060529061297b565b5063cd21db4f5f526020526024601cfd5b9392919063562e052c8114612b4e5761069d94613e71565b50925060609150829081010312610029578035604082013590604051928160281c151582421117612b25576084359260206bcd1e9517bb0cb8d0d5cde8935c926129506fffffffffffffffffffffffffffffffff8716613370565b602460105f926020946014526f70a0823100000000000000000000000084525afa15610bc1573d601f1015610029575f5190565b602460105f926020946014526f7ecebe0000000000000000000000000084525afa15610bc1573d602011610029575f5190565b5f60446010602093604051956d1ff3684f28c67538d4d072c2273460345260601b85526fdd62ed3e00000000000000000000000084525afa15610bc1573d602011610029575f51906040521415901517612c6657565b63b78cb0dd5f526004601cfd5b5f6004601c602093633644e51584525afa15610bc1573d602011610029575f5190565b92919091604051935f528160ff1c601b016020526040526001600160ff1b03166060526020600160805f825afa511860601b3d1115612ab5576040525f606052565b91905191602083015192831991620f42408310612cf457505050565b6001600160a01b031615612d06575050565b61069d929350906125b06001600160a01b036125b593511691620f424003916bcd1e9517bb0cb8d0d5cde8935c90612ba9565b929491946001600160ff1b038611610baf579094905b602c8651119385602801948551938860010151908960040151958a60180151938b602c0197885180968d6001600160a01b0383166001600160a01b038716109788159684811888029160ff811680155f14612fb2575050936001600160a01b039160e495731f98431c8ad98523631ae4a59f267346ea31f984907fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e33995b62ffffff1691816040519684604052186020525f80521860601b600c521560051b6060035f2090836040525f5260205260405260ff600b536055600b20906040521694159760405197889383519384602001908660c4015e60a08560a401526001600160a01b0316846084015283606401528260440152878a301802301882602401526f128acb0800000000000000000000000082601001528060c40182520101604052816bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa2575081740400000000000000000000000000000000000000005f93849360e01b17176bcdccd5c65a7d4860ce3abbe95d8451908260208701915af1612f036132f3565b9015611fe757612f11613cbe565b604081805181010312610029576040602082015191015192604052821802185f03905f8212610baf578190612f8557507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd4602c91995101808652106125c15790945230601486015260288552909490612d4f565b98505093955050925050818410612f9a575050565b909150612610565b63ab7646c45f526020526024601cfd5b6001810361300c575050936001600160a01b039160e4957341ff9aa7e16b8b1a8a8dc4f0efacd93d02d071c9907f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2926323a69e7599612df2565b60028103613066575050936001600160a01b039160e49573baceb8ec6b9355dfc0269c18bac9d6e2bdc29c4f907fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e3399612df2565b602f81036130c0575050936001600160a01b039160e49573df62d9e51d7c08360dcd41931a2e6b97ff8c73e8907fd3e7f58b9af034cfa7a0597e539bae7c6b393817a47a6fc1e1503cd6eaffe22a9263fa461e3399612df2565b6031810361311a575050936001600160a01b039160e4957386641a77a1172c3ce65bce52ae91bdadef0f74c2907f62441ebe4e4315cf3d49d5957f94d66b253dbabe7006f34ad7f70947e60bf15c92632c8958f699612df2565b94955091939092506032036128d857506001600160a01b038f9160e494938b9173f4fd2e6c5b60c5b365cd1b96dd6245e6d60414c2907f3e77b70b9c4ce644601ed4aab19834375c6a9a2bca7adeb89a7bdd5fd8eb0a7d9263fa461e3399612df2565b9190925f14613259575161324c576020810151610baf57604081015142116132385760845f927fffffffffffffffffffffffffffffffffffffffff000000000000000000000000849351516bcd1e9517bb0cb8d0d5cde8935c60206001600160a01b0385511694015193604051948560800152846060015260601b83604c015260601b1681602c01526f15dacbea00000000000000000000000081600c0152601c01826d1ff3684f28c67538d4d072c227345af115610bc157565b63cd21db4f5f52604001516020526024601cfd5b63c321526c5f526004601cfd5b905f9291839260406bcd1e9517bb0cb8d0d5cde8935c91818051956330f28b7a8752818151886020015e602001866060015e8460a0015e6001600160a01b03168260e0015261010082810152805190816020019083610120015e6101240190601c01826e22d473030f116ddee9f6b43ac78ba35af115610bc157565b604051906132e2826104f3565b5f6040838281528260208201520152565b3d1561331d573d9061330482610630565b916133126040519384610577565b82523d5f602084013e565b606090565b6040519060a0820182811067ffffffffffffffff82111761050f576040525f6080838281528260208201528260408201528260608201520152565b63d3b1276d5f5260ff166020526024601cfd5b6fffffffffffffffffffffffffffffffff166381bf1000808204818082049181808085049606910660401b17910660801b1781830660c01b17806359e6038302602e1c79ffff000000000000ffff000000000000ffff000000000000ffff1663ffff49c002018061e38f0260151c7d07ff000007ff000007ff000007ff000007ff000007ff000007ff000007ff167e07ff000007ff000007ff000007ff000007ff000007ff000007ff000007ff008161e38f02600d1c160160dc02018060081c9072ffffff00000000000000000000000000ffffff75ffffffff000000000000000000000000ffffffff00007effffffffff000000ff00000000000000ffffffffff000000ff00000000000084167affffff00000000000000000000000000ffffff000000000000000084161760101c9316911617177bffffffffffffffffffffffffffffffffffffffff00000000000000008160201c16906bffffffffffffffffffffffff1617910460c01b179060078260881c1e610100030160031c6012810190605360405194838652807f76767676767676767676767676767676767676767676767676767676767676760160071c7f010101010101010101010101010101010101010101010101010101010101010116602702017f3030303030303030303030303030303030303030303030303030303030303030019160110160031b1b189060031b610100031b826020015281604001604052565b600490911015903560e01c6367c4a3b0140290606082156135d1575060405190816040016040526020825273352650ac2653508d946c4912b07895b22edd84cd8260200152565b5f925090565b905f19818309910290818082109103035f526020525f90565b8051906020015181156136405781620f424080620f423f197fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399509830890828211900360fa1b910360061c170290565b620f424091500490565b5f5160205181156136405781620f424080620f423f197fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399509830890828211900360fa1b910360061c170290565b1561369f57565b634e487b7160e01b5f52600160045260245ffd5b90929194935f90604051938460c0015f8152610300386101e08801396104e086016040526136e7828a873560601c846154d0565b918287528287602001528660400199838b5287608001528660a001529495369436935f936020015173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145f146137695761373f906001600160a01b03163014613698565b9851620f42404760148c013560e81c0204905260161901976017015b6137658982613abf565b9796565b6001600160a01b03163081036137ae5750620f42406016196017836014013560e81c930193019a51916137a0308460200151612ba9565b80151590030204905261375b565b935094509750506137c0915015613698565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff48101908060550135600116908681016002198082013560e81c80920301916075019782891161002957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff889103019761375b565b906020820135918219620f4240811061384c575050565b90919250620f42400390356001600160a01b03811680910361002957613880906bcd1e9517bb0cb8d0d5cde8935c90612ba9565b905f19818309910290818082109103035f5260205261069d61364a565b95919491929073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0388161860601b6138db575050505050905061069d8133612693565b866014526ff9b6a7960000000000000000000000005f525f806024601082335af115610bc1576001600160a01b0316300361394c575050505061391f903383612633565b6014526f12e103f10000000000000000000000005f5260105f60248282335af115610bc1575f5160801c90565b61397c9491613974610dd592604051946139658661053f565b33865260208601523690611e57565b93369161064c565b61391f565b6040015180511561398f5750565b8063fb772a8860249252601c01fd5b9190939293813592836001948060f81c91826139c1575b50505050508101920390565b95839496613a06945180604001805115613aa8575b5050818411613a2d575b50601491925001948360800151906001600160a01b038560a001519360581c16906154d0565b9081815260400151809114613a1e57808080806139b5565b8063784cb7b860249252601c01fd5b85602001938451805115613a98575b5060028103613a5757505060149192855190525b82916139e0565b60149350613a69919250600314613698565b8582013592613a9160159287608001516001600160a01b038960a001519260581c168b6154d0565b9052613a50565b613aa2908a613f1c565b5f613a3c565b898051850180825260051b01918252525f806139d6565b5062ffffff106125c157565b905f8212613ad7575090565b80634c085bf160249252601c01fd5b905f8213613af457505f0390565b80633351b26060249252601c01fd5b805115613b105760200190565b634e487b7160e01b5f52603260045260245ffd5b908215613b7057604051926038526028528073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1860601b151502601452633ccfd60b5f525f80603c601c82335af11561095d57604052565b506014526fcbf0dbf50000000000000000000000005f5260246010fd5b6d14aa86c5d3c41765bb24e11bd7016bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa25750740300000000000014aa86c5d3c41765bb24e11bd7016bcdccd5c65a7d4860ce3abbe95d565b73ba1333333333a1ba1108e8412f11850a5c319ba96bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa2575060e01b7406ba1333333333a1ba1108e8412f11850a5c319ba9176bcdccd5c65a7d4860ce3abbe95d565b806bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257506001600160a01b03167f91dd734600000000000000050000000000000000000000000000000000000000176bcdccd5c65a7d4860ce3abbe95d565b6bcdccd5c65a7d4860ce3abbe95c80613cd45750565b63d66fcc385f526020526024601cfd5b9591949392906001600160a01b03163003613d45575050505080613d35575b6034526014526f15afd4090000000000000000000000005f5260205f6044601082335af115612683575f515f60345290565b613d40813384612633565b613d03565b610dd5613d409461397460405193613d5c8561053f565b3385528860208601523690611e57565b919060601b908315610fc757604051936060526040528073777777777777777777777777777777777777777760611b141502602c5260601b600c525f806064601c82335af11561095d575f606052604052565b93959290949194613dd08533613e2c565b6001600160a01b03163003613e0a57505050613dee92503390612633565b6311da60b45f5260205f6004601c82335af115610bc1575f5190565b613e27959492935090613974610dd592604051946139658661053f565b613dee565b602460105f80949381946014526fa584119400000000000000000000000082525af115610bc157565b6004601c6020935f936311da60b485525af115610bc1575f5190565b50909291604051613e83828685613f52565b906040525f14613e965750505050600190565b839163bd01c2268103613ef157506040925081010312610029576020813591013590804211613ee15750803411613ecd5750600190565b634a0944315f52602052346040526044601cfd5b63cd21db4f5f526020526024601cfd5b90915063131ad4280361222057826020918101031261002957613f16611d1392611eb1565b906122f0565b906040019081519182613f2e57505050565b5f905280515f198101825260051b01818103613f48575050565b5180825260400152565b9080929163d92aadfb81145f1461430c5750016101208282031261002957613f798261059a565b613f868260208501611e57565b613f9260a0850161059a565b9260c08501359167ffffffffffffffff831161002957613fb75f939284938801610682565b6001600160a01b03610100613fce60e08a0161059a565b980135961660405190613fe08261053f565b6001600160a01b0360208301978689521682526140f96140008583612cd8565b808952826140676001600160a01b0388515116604051906140208261055b565b815283602082015282604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9b6140d88c6001600160a01b036bcd1e9517bb0cb8d0d5cde8935c6040519261408f8461055b565b8286168452602084015216604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9b6140e33083612ba9565b8181111590821802811880940204809b52612633565b6040805192614109608085610577565b6058845261423760208501947f436f6e73696465726174696f6e286164647265737320746f6b656e2c75696e7486527f32353620616d6f756e742c6164647265737320636f756e74657270617274792c848201527f626f6f6c207061727469616c46696c6c416c6c6f7765642900000000000000006060820152603c8451614192606082610577565b602e815260208101907f546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c7582527f696e7432353620616d6f756e74290000000000000000000000000000000000008782015286519889947f436f6e73696465726174696f6e20636f6e73696465726174696f6e290000000060208701525180918587015e840190838201908d8252519283915e010189815203601f198101865285610577565b8180519663137c29fe8852818151896020015e602001876060015e8560a0015e8360e00152868361010001526101408361012001528051908161016001846101400152816020019084610160015e8151918260200190828501610180015e016101840190601c01826e22d473030f116ddee9f6b43ac78ba35af115610bc1576fffffffffffffffffffffffffffffffff917f49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a75982765f526020526040519260405260605f2092604052166010525f5260305fa0600190565b638d68a15681036143d45750016080828203126100295761432c8261059a565b9060208301359060408401359067ffffffffffffffff821161002957614353918501610682565b9160408351106125c1576013198351019260140180519381526143a16040519461437e606087610577565b602886526040366020880137808660280152308660140152602886523090612ba9565b80151580820394808602958604149114171561220c576001600160a01b03620f4240606061257497013594049216612d39565b63103b48be8103614585575060c09181010312610029576143f48161059a565b906144016020820161059a565b9160408201356144136060840161059a565b9260808101359062ffffff82168203610029576001600160a01b0360a08192013596169416945f928061455b575b50630902f1ac5f5260405f6004601c895afa15610bc15760403d106100295760018083161415928360051b956127108751928860201895848b8851958415801561454d575b61452e575b50505061ffff9060081c168203029202820191821561451a570204928184106144fc5750505f9491936001600160a01b0360a49487966020889586826040519763022c0d9f89528801015285010152168160600152608081810152818160a00152601c01915af115610bc157600190565b9061451587859363dfec36260263d21220a718906159fa565b612610565b634e487b7160e01b5f52601260045260245ffd5b61ffff9394506145429291610c9d91612ba9565b919050848b5f61448b565b5060018085811c1614614486565b620f424091935061456c3087612ba9565b801515900302049161457f838787612633565b5f614441565b6338c9c14781036145f25750019060a081830312610029576145a68161059a565b906145b36040820161059a565b90608081013567ffffffffffffffff811161002957611d13946145d7918301610682565b9260206001600160a01b036060840135941692013590615530565b635f80abae81036146c8575060a09181010312610029576146128161059a565b9061461f6020820161059a565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1491604081013583156146b457475b818111614660575b505050505050600190565b620f424091606083608086013584020494013591030204818111159082180218915f1461469c575061469191612693565b5f8080808080614655565b6001600160a01b036146af931690612633565b614691565b6146be3084612ba9565b801515900361464d565b90506368f5ee258103614768575081019061012081830312610029576146ed8161059a565b6146f96020830161059a565b9161470660608201611ebe565b9161471360808301611eb1565b9460e08301359167ffffffffffffffff8311610029575f96879685614748611fb695611fbc976001600160a01b039901610682565b926101008201359460c08301359389604060a0860135950135921661582f565b63fd8c38e1811492636c5f9cf9821492909183851763f61460f9821417156148e45750810161010082820312610029576147a18261059a565b936147ae6020840161059a565b60408401356147bf60608601611eb1565b9160808601359360a08701359560c088013567ffffffffffffffff81116100295760e0916147ee918a01610682565b970135976001600160a01b038a16911561481f57509463ffffffff946120c9945f9a9893948b9a956120d39961582f565b91985090156148ca57966148329761577c565b73e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4446bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f80917fb45a3c0e0000000000000001e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4446bcdccd5c65a7d4860ce3abbe95d6020815191018273e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4445af1611fd86132f3565b916148dc9593915f988998969461577c565b6121ec613b8d565b90925081935063736180c881145f14614acb575060c091810103126100295761490c8161059a565b9061491960408201611eb1565b9160608201356080830135936001600160a01b03851693848603610029578060206149b06001600160a01b0373ce355440c00014a229bbec030a2b8f8eb45a28978161496b60a0620f4240980161059a565b9916991415737a7916044b0f6e1563f1ff4cb7db270f0b85f58f0273dac17f958d2ee523a2206206994597c13d831ec718169687811886150280981897309118612ba9565b801515900391013502049015614a495763fae036d55f5260205f6004601c885afa15610bc157601f3d111561002957620f4240670de0b6b3a76400005f51019102049181831061451557505060105f60209481946044946034526014526f8d7ef9bb00000000000000000000000082525af115614a30575f603452600190565b6040516bffffffffffffffffffffffff163d5f823e3d90fd5b9092816034959395526014526f959912760000000000000000000000005f5260205f6044601082865af115614a30575f6004601c620f4240670de0b6b3a76400006020958560345202049463568d4b6f84525afa15610bc157601f3d111561002957670de0b6b3a76400005f5182020490039181831061451557505050600190565b639b59756f8103614c7f575060e0918101031261002957614aeb8161059a565b90614af86020820161059a565b916040820135906060830135926001600160a01b0384169384810361002957614b2360808301611eb1565b9560a0830135928360030b8094036100295760c00135948015614c2157918697614b6c60409593620f42405f96614b5d9b9a9b3084612ba9565b801515900302049a8b91612633565b6001600160a01b03602096865192614b848985610577565b868452601f198901368a860137875195845194858b01908860e4015e60c08760c401528660a4015286866084015215159a8b866064015285604401521683602401526f3eece7db00000000000000000000000083601001528060e40183528201610120018452828251928601915af115610bc1575192828410614c0a5750505050600190565b90614515916350a2884b02630fc63d1018906159fa565b5085614c2f91969596612ba9565b91604051631865c57d5f52610120816004601c865afa15610bc157871560051b0151918260801c3d6101201117610029576040936fffffffffffffffffffffffffffffffff5f9416900397614b6c565b905063670335be8103614f5a5750810190808203610160811261002957614ca58261059a565b60e0603f19614cb66020860161059a565b9301126100295760405191614cca83610523565b60408401358352614cdd6060850161059a565b602084015260808401356040840152614cf860a0850161059a565b94606084019586526080840160c0860135815260a085019060e0870135825260c0860196610100810135885261012081013567ffffffffffffffff8111610029578101906040828603126100295760405194614d538661053f565b82359267ffffffffffffffff841161002957614d76602092610140958301610682565b875201356020860152013590614d8c3086612ba9565b90519081811115908218028118809351020497818910614f485750506040519373bbbbbbb520d69a9775e85b458c58c648259fad5f6040523060601b602c526fdd62ed3e000000000000000000000000600c5260205f6044601c875afa15614f3f573d602011610029575f958695865190604052838110614ef3575b506001600160a01b036bcd1e9517bb0cb8d0d5cde8935c9260405196634dcebcba885283518860200152308860400152604084602001896060015e82168760a0015260608381018860c0015e1685610120015260c00151908160f81c9060601b1784610140015260801b8361016001526101a0836101800152826101a001526040826101c001528060200151826101e0015251805190816020019083610200015e6102040190601c018273bbbbbbb520d69a9775e85b458c58c648259fad5f5af115610bc1576fffffffffffffffffffffffffffffffff8091511691166010525f5260305fa0600190565b614f1c575b614f1673bbbbbbb520d69a9775e85b458c58c648259fad5f86615932565b5f614e08565b614f3a73bbbbbbb520d69a9775e85b458c58c648259fad5f866158e2565b614ef8565b843d5f823e3d90fd5b906001600160a01b0389925116612610565b63ca9e5d0f810361504f57508160c0918101031261002957614f7b8161059a565b90614f886020820161059a565b9060408101356060820135916001600160a01b038316928381036100295760105f6024926001600160a01b038560209760a0614fc76080879a01611eb1565b9201359a8a82615028575b50505015991660145288156360f3e02e0263bd6015b41860601b82525af115610bc157601f3d1115610029575f51928284106150115750505050600190565b9061451591639e9dfd6c02634a248d2a18906159fa565b620f42406150479361503a3085612ba9565b8015159003020491612633565b5f808a614fd2565b91929163b8df6d4d810361531357508260a09181010312610029576150738261059a565b60408301356001600160a01b03811691828203610029576150c261509960608701611eb1565b91620f424060808801359760206150b03085612ba9565b8015159003910135020494859161570a565b156153075763ffa642255f5260405f6004601c845afa15610bc157603f3d1115610029575f516020516317be952e5f5260205f6004601c865afa15610bc157601f3d1115610029575f518060081c6100295760ff1661512081611e39565b63796da7af5f5260205f6004601c875afa15610bc157601f3d1115610029575f519063eab5d20e5f5260205f6004601c885afa15610bc157601f3d1115610029575f5163ec2fd46d5f5260205f6004601c895afa15610bc157601f3d111561002957865f51936ec097ce7bc90715b34b9f100000000004926151a181611e39565b600281036152d1575050637c9b8e895f5260205f6004601c895afa15610bc157601f3d1115610029575f51948585038089116152a85750505083670de0b6b3a7640000809592818981950191848303020495800204029080820491061515018202049083030102045b63c0ffa1785f5260205f6004601c855afa15610bc157601f3d1115610029575f5163ab44a7a35f5260205f6004601c865afa15610bc157601f3d111561002957670de0b6b3a764000080915f5101019102049380851061527057509261257492936159b8565b60205f6004601c8895634a248d2a84525afa15610bc157601f3d1115610029575f518060a01c610029576001600160a01b0316612610565b670de0b6b3a76400009296506152c79493919550880302048380615a1e565b810391030161520a565b615300955091670de0b6b3a7640000919693926152ed81611e39565b1515908418028318958692020491615a1e565b900361520a565b90612574929391615976565b9192916342032aef036125d357819281601f1993018435908560200135866040013590878787018184019489868035968486606001359687019c8d86039e8f019f861090608011178b158c60401c171788158960a01c171791111792030160051c85118515171791111782873518178860051c831117610029576153c59060409796975198886020018a60a4013780896044015263a04c36b289600401526064870189526084878a01016040526125d9565b8760840152612000603f840484010195603f195f960190886024019189606401908a602001957fa04c36b2000000000000000700000000000000000000000000000000000000003017995b8060051b90602086830101359184831161002957836020916001946080018a52010135855201938685145a306bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f8f8c8f8380938f926bcdccd5c65a7d4860ce3abbe95d51923090888882180218f180156154bc57615497613cbe565b6154a8578d1117610bc15793615410565b505050505050505050505092505050600190565b5f6bcdccd5c65a7d4860ce3abbe95d615497565b919392610300916001600160a01b031694850906019161012083019261014081019081519081610160858218920151170261551c5750811561550f5752565b63ad1991f55f526004601cfd5b639a62e8b45f52602052506040526044601cfd5b9291906001600160a01b038216936e22d473030f116ddee9f6b43ac78ba385146d1ff3684f28c67538d4d072c2273486141773bbbbbbb520d69a9775e85b458c58c648259fad5f8614176104e6575f906001600160a01b0381169073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee820361567c57505050620f424090470204938051155f146156025750506155da575f80809381935af16155d16132f3565b9015611fe75750565b7f01da1572000000000000000000000000000000000000000000000000000000005f5260045ffd5b9093926020830180841161220c578251106125c157835f9460208695850101525b602083519301915af16156346132f3565b9015611fe75751159081615672575b5061564a57565b7f82d5d76a000000000000000000000000000000000000000000000000000000005f5260045ffd5b90503b155f615643565b9091949282979497155f1461569b575050506155da575f928392615623565b6156aa96939592963083612ba9565b8015159003905f19818309910290818082109103035f526020526156cc61364a565b6020860180871161220c578551106125c15787845f988360208b9a8a010152036156f9575b505050615623565b6157029261570a565b5f80876156f1565b60405192826040523060601b602c526fdd62ed3e000000000000000000000000600c5260205f6044601c855afa15615773573d602011610029575f5193604052831061575557505050565b6157629261576457615932565b565b61576e82826158e2565b615932565b833d5f823e3d90fd5b92939095949796919760608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c1515620f42408c11171717610baf5760d49660405199875180986020018a8d015e8a60b401528960b101523089609d015288608801528760780152866068015285605801526070820185604401526020856024015263f83d08ba856004015260b48201855215158460a80153830101604052565b92939095949796919760608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c1515620f42408c11171717610baf5760d49660405199875180986020018a8d015e8a60b401528960b101523089609d01528860880152876078015286606801528560580152607082018560440152602085602401526348c89491856004015260b48201855215158460a80153830101604052565b604460105f8093602095601452816034526f095ea7b300000000000000000000000082525af115612683573d153d601f1060015f5114161715615925575f603452565b633e3f8f735f526004601cfd5b604460105f809360209560145281196034526f095ea7b300000000000000000000000082525af115612683573d153d601f1060015f5114161715615925575f603452565b6084905f809360209560405191638dae73338352828801528160400152606081810152818160800152601c01915af115610bc157601f3d1115610029575f5190565b6084905f80936020956040519163e67ce7068352828801528160400152606081810152818160800152601c01915af115610bc157601f3d1115610029575f5190565b6004601c5f9260209484525afa15610bc1575f51908160a01c3d6020111761002957565b670de0b6b3a76400008481039594820281900490910292828404019185020480828110615aaf57500392600191670de0b6b3a7640000905b8260021b02048480020193600185811c019185925b838110615aa05750670de0b6b3a76400009394955060011b935f14615a9957015b0290808204910615150190565b9003615a8c565b9250828604830160011c615a6b565b91905003670de0b6b3a76400005f92949194615a56565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0382161860601b615af8575061069d8133612693565b60405191826044015281602401526f0c11dedd00000000000000000000000081601001526044815280606401604052336bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f80917f599d07140000000000000002000000000000000000000000000000000000000033176bcdccd5c65a7d4860ce3abbe95d60208151910182335af1615b996132f3565b9015611fe757615ba7613cbe565b602001519056","sourceMap":"483557:3627:0:-:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;-1:-1:-1;;;;;;483557:3627:0;;;;;;;;233478:84;483557:3627;;;235675:66;483557:3627;;:::i;:::-;233114:66;235675;;233114;483557:3627;233114:66;;;;483557:3627;233114:66;;;;483557:3627;233114:66;;;;233485:76;233478:84;:::i;:::-;233572:60;483557:3627;;;235675:66;483557:3627;;:::i;:::-;233381:66;235675;;233381;483557:3627;233381:66;;;;483557:3627;233381:66;;;-1:-1:-1;;;483557:3627:0;233381:66;;;;233579:52;233572:60;:::i;:::-;237075:70;235675:66;;:::i;:::-;483557:3627;235257:90;;;;237108:36;235675:66;237082:62;237075:70;:::i;:::-;237155:72;483557:3627;;;235675:66;483557:3627;;:::i;:::-;236046:66;235675;;483557:3627;236046:66;;;;;;483557:3627;236046:66;;;-1:-1:-1;;;483557:3627:0;236046:66;;;235940:52;235675:66;;:::i;:::-;483557:3627;;;;;235940:52;;;;;;235257:90;;235798:77;;;;;;;;;;-1:-1:-1;235798:77:0;;235257:90;;235798:77;;;;;;;;-1:-1:-1;235798:77:0;;235940:52;483557:3627;;235940:52;;;;;;:::i;:::-;235257:90;237184:42;;236046:66;237162:64;237155:72;:::i;:::-;443275:13;443292:5;443275:22;;;;;483557:3627;;443318:20;;-1:-1:-1;443318:20:0;;-1:-1:-1;;;443359:42:0;;464907:1;443359:42;;;2347;483557:3627;443359:42;;;2347;443359;;;;;;-1:-1:-1;443359:42:0;;;443271:221;443352:67;;-1:-1:-1;;;;;;483557:3627:0;443413:4;443359:59;443352:67;:::i;:::-;427751:14;443275:13;259989:18;;:44;;;;;;;443271:221;259982:52;;;:::i;:::-;483557:3627;;-1:-1:-1;;;260070:15:0;;483557:3627;;260070:15;483557:3627;259127:42;260070:15;;;;;;;260044:42;260070:15;260064:21;260070:15;-1:-1:-1;260070:15:0;;;443271:221;260064:21;;:::i;:::-;259942:9;260051:34;260044:42;:::i;:::-;483557:3627;;-1:-1:-1;;;260122:15:0;;483557:3627;;260070:15;483557:3627;259202:42;260122:15;;;;;;;260096:42;260122:15;260116:21;260122:15;-1:-1:-1;260122:15:0;;;260116:21;;:::i;260096:42::-;483557:3627;83245:1422;;260217:17;;83245:1422;;;-1:-1:-1;83245:1422:0;483557:3627;-1:-1:-1;83245:1422:0;;;483557:3627;83245:1422;;;;;;;;483557:3627;83245:1422;427751:14;-1:-1:-1;83245:1422:0;;;;;;;483557:3627;83245:1422;;-1:-1:-1;;83245:1422:0;;;-1:-1:-1;83245:1422:0;;;-1:-1:-1;;83245:1422:0;;-1:-1:-1;259127:42:0;83245:1422;;;;;;;;483557:3627;83245:1422;427751:14;-1:-1:-1;83245:1422:0;;;;;;;483557:3627;83245:1422;;-1:-1:-1;;83245:1422:0;;;-1:-1:-1;83245:1422:0;;;-1:-1:-1;;83245:1422:0;;-1:-1:-1;483557:3627:0;83245:1422;;;;;;;;483557:3627;83245:1422;427751:14;-1:-1:-1;83245:1422:0;;;;;;;483557:3627;83245:1422;;-1:-1:-1;;83245:1422:0;;;-1:-1:-1;83245:1422:0;;;-1:-1:-1;;83245:1422:0;;-1:-1:-1;259127:42:0;83245:1422;;;;;;;;483557:3627;83245:1422;427751:14;-1:-1:-1;83245:1422:0;;;;;;;483557:3627;83245:1422;;-1:-1:-1;;83245:1422:0;;;-1:-1:-1;83245:1422:0;;;-1:-1:-1;;83245:1422:0;;-1:-1:-1;483557:3627:0;83245:1422;;;;;;;;483557:3627;83245:1422;427751:14;-1:-1:-1;83245:1422:0;;;;;;;259574:42;83245:1422;;-1:-1:-1;;83245:1422:0;;;-1:-1:-1;83245:1422:0;;;-1:-1:-1;;83245:1422:0;;-1:-1:-1;259202:42:0;83245:1422;;;;;;;;483557:3627;83245:1422;427751:14;-1:-1:-1;83245:1422:0;;;;;;;472607:61;83245:1422;-1:-1:-1;83245:1422:0;;284148:42;284229:27;:31;;;:57;;;443271:221;284222:65;;;:::i;:::-;472614:53;;;443271:221;472607:61;;:::i;:::-;483557:3627;458467:322;457906:80;-1:-1:-1;458467:322:0;458030:22;483557:3627;458467:322;427751:14;483557:3627;458467:322;;483557:3627;458467:322;235675:66;-1:-1:-1;458467:322:0;;483557:3627;458467:322;-1:-1:-1;483557:3627:0;458467:322;235675:66;458132:48;483557:3627;;;;;;235675:66;483557:3627;;;;;;472614:53;;;;;;284229:57;-1:-1:-1;284229:57:0;;;83245:1422;;-1:-1:-1;83245:1422:0;260070:15;83245:1422;;;483557:3627;83245:1422;;;;-1:-1:-1;83245:1422:0;;;;;260122:15;;;;483557:3627;260122:15;483557:3627;260122:15;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;483557:3627;;259120:50;-1:-1:-1;259120:50:0;;;;;259989:44;-1:-1:-1;259989:44:0;;;443359:42;;483557:3627;443359:42;;483557:3627;443359:42;;;;;;483557:3627;443359:42;;;:::i;:::-;;;2347;;;;;-1:-1:-1;;;;;483557:3627:0;;2347:42;;;;443352:67;443359:42;;;2347;-1:-1:-1;2347:42:0;;443359;;;-1:-1:-1;443359:42:0;;443271:221;443450:31;443457:23;;443450:31;:::i;:::-;443271:221;;483557:3627;;;;;-1:-1:-1;;483557:3627:0;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;:::o;:::-;;;;-1:-1:-1;483557:3627:0;;;;;-1:-1:-1;483557:3627:0;;;;;:::o;:::-;;;;;;;;;;;;259120:50;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::o;:::-;483557:3627;;;259120:50;;;;;;;;235675:66;483557:3627;;;;235675:66;483557:3627;;:::i;:::-;235675:66;;;;483557:3627;235675:66;;;;;;;483557:3627;235675:66;;;;;:::o","linkReferences":{}},"deployedBytecode":{"object":"6080604052600436101561002f575b361561002d5734610029576100216106b6565b602081519101f35b5f80fd5b005b5f3560e01c806306b8524c146100dc5780631fff991f14610076576370a082310361000e57346100295760206003193601126100295761006d6106a0565b505f805360015ff35b60a06003193601126100295761008b366105ae565b6064359067ffffffffffffffff8211610029576100d26100cc6100b460209436906004016105ff565b906100bd611e13565b946100c786611c75565b611cfe565b91611cca565b6040519015158152f35b60c0600319360112610029576100f1366105ae565b60643567ffffffffffffffff8111610029576101119036906004016105ff565b60a43567ffffffffffffffff811161002957610131903690600401610682565b9161013a611e13565b9261014484611c75565b6d1ff3684f28c67538d4d072c2273433036104e65781358201803560a4118415176100295760440135906bcd1e9517bb0cb8d0d5cde8935c918151826020015160f81c83600101915f1901825261019a81611e39565b806103285750516080908301839003126100295760218201516041830151926001600160a01b036081606183015192015193169260205f60e4604051846001600160ff1b03168160d40152858160b401528460ff1c601b0181609401528881607401528681605401526d1ff3684f28c67538d4d072c2273481603401528960601b818501526fd505accf000000000000000000000000815260100182885af1601f3d1160015f5114161615610260575b5050505050506100d2916100cc91602095611cfe565b84979599939694421161031b5789604288610310956100d29b61029e60209f61028c906100cc9e612bdd565b9361029985858984612c10565b612c73565b92604051936119018552602085015283604001927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c984528685606001526d1ff3684f28c67538d4d072c2273485608001528460a001525f19018360c001528260e0015260c081209052601e0120612c96565b95829482948961024a565b631a15a3cc5f526004601cfd5b91929161033481611e39565b600181036104c457505160a0908201829003126100295760218101516041820151916061810151938415158095036100295760205f6101046001600160a01b0360a1608187015196015194169560405190856001600160ff1b03168260f40152868260d401528560ff1c601b018260b4015289826094015288826074015281605401526d1ff3684f28c67538d4d072c2273481603401528960601b818501526f8fcbaf0c000000000000000000000000815260100182875af1601f3d1160015f5114161615610413575050505050506100d2916100cc91602095611cfe565b8396949795999315158742110261031b578960426100cc98856100d29b61045260209f610443906103109a612bdd565b9261029984845f038984612c10565b92604051936119018552602085015283604001927fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb84528685606001526d1ff3684f28c67538d4d072c2273485608001525f19018460a001528360c001528260e0015260c081209052601e0120612c96565b600281118063b7e59b040263f9ade075185f526021821802186020526024601cfd5b63e758b8d55f526004601cfd5b6060810190811067ffffffffffffffff82111761050f57604052565b634e487b7160e01b5f52604160045260245ffd5b60e0810190811067ffffffffffffffff82111761050f57604052565b6040810190811067ffffffffffffffff82111761050f57604052565b6080810190811067ffffffffffffffff82111761050f57604052565b90601f601f19910116810190811067ffffffffffffffff82111761050f57604052565b35906001600160a01b038216820361002957565b600319606091011261002957604051906105c7826104f3565b816004356001600160a01b03811681036100295781526024356001600160a01b03811681036100295760208201526040604435910152565b9181601f840112156100295782359167ffffffffffffffff8311610029576020808501948460051b01011161002957565b67ffffffffffffffff811161050f57601f01601f191660200190565b92919261065882610630565b916106666040519384610577565b829481845281830111610029578281602093845f960137010152565b9080601f830112156100295781602061069d9335910161064c565b90565b600435906001600160a01b038216820361002957565b60606bcdccd5c65a7d4860ce3abbe95c90813318811b825f351860e01c1715809260a01c61ffff160291611c61575b6106ed612381565b91909280155f1461070c575050610703916126a2565b90156100295790565b83600401909283600314611821578360061461130f5783600514610de05783600414610d1c575082600714610c5f575081600114610790575060021461076057634e487b7160e01b5f52605160045260245ffd5b80604461077592013590602433910135612633565b604051610783602082610577565b5f80825236602083013790565b916107fa9150606460448201359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b6001600160a01b0397939195969497309116036100295761081c9330936136b3565b5050505093919490806040019583875190610c48575b8051607f1c610baf575194828a0195865261084c83613981565b906108556132d5565b9060208201918b8560408301955b8b6030861015610a47575050505050505050855195866020015196519561088b835182613f1c565b8260200151805115610a37575b50805191826109c0575b5050505180602001519051968088106109b957506108c69187916303a65ab6613d6c565b1561098157509081159081156108fc575b5050505b60405182819382526020828101526020826040015201528060800160405290565b841b9061096557604051918452306040528073777777777777777777777777777777777777777760611b141502602c526f03a65ab6000000000000000000000000600c525f806064601c82335af11561095d575f83526040525f80806108d7565b3d5f823e3d90fd5b6020526fcbf0dbf50000000000000000000000005f5260246010fd5b5181811461099c579061099692910390615ac6565b506108db565b826014526ffb772a880000000000000000000000005f5260246010fd5b8791612610565b6109c982613b03565b5190518103610a11575b5060015b828110156108a25780610a0b6109fe6001938560209160051b010151908160200151915190565b9030906303a65ab6613d6c565b016109d7565b60208101519051610a319130906001600160a01b03166303a65ab6613d6c565b5f6109d3565b610a419082613f1c565b5f610898565b60405f610a6d848a953560e81c94600f600e19836003013560a01c9c019201908861399e565b9890966280000087602001956001600160a01b03875199620f42408b51627fffff851602049a602001519051602001519080861b90838084891b92169316918082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159a838383188d0280941816905218168073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028b528d601f198b6020019d019a359052610b298a8d613abf565b16158314610bcc5760e4918451918483528a836020015e87826080015286158260a001528160c00152828160e00152601c0182335af115610bc1575f5192610b8160205194935b848618029485935193849118613acb565b9180519083820390528211911117610baf57610ba38851809381519318613ae6565b01905291858d91610863565b634e487b715f5260116020526024601cfd5b6040513d5f823e3d90fd5b610104918451916f101e8952000000000000000000000000835260148b8701846020015e8a836034015e87826094015286158260b401528160d40152828160f4015260100182335af115610bc1575f51926020518080600f0b188580600f0b18178280600f0b183d604011171761002957610b81909493610b70565b610c588160200151825190615ac6565b8152610832565b909291503581016004810135610c736132d5565b5f92602481015b838510610cbf5750505050506044610ca26064830135610c9d60248501356125d9565b612374565b9101358110610caf575090565b63a55fee2e5f526020526024601cfd5b60048135830101604081013560e01c60446003196020840135019201908260401c9283158091029390610d08575b610d0257505050602060019101940193610c7a565b87612227565b50610d16868484848c613e71565b15610ced565b6080919293506003190110610029573560448301358301906024820135831c9360245f83131591013582180218913084145f14610d65576107759350603833920135901c612633565b5090610d74610ddb9315613698565b60405190610d818261053f565b3382526020820152610d9636602c8401611e57565b90610dd560ac84013560f81c93369060ad7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff77600483013501910161064c565b9161317d565b610775565b505091610e5d91508060446024610e509301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b95869391979894986136b3565b968c868060409d959896979d99949901518c8b8b8b8b8a306001600160a01b038716036112ff575b6112e1575b5050505050908d9493929151910152610ea285613981565b908d85610ead613322565b92610eb66132d5565b945b603582101561110a575050935050505060400151968760200151975199610ee0845182613f1c565b83602001518051156110fa575b508051908161107b575b50508251806020015190519b808d106110745750610f1b918c91630b0d9c09613d6c565b15610ff85750505050508215918215610f54575b5050505060405182819382526020828101526020826040015201528060800160405290565b6001600160a01b03163003610fe45730905b851b91610fc7576040519285526040528073777777777777777777777777777777777777777760611b141502602c526f0b0d9c09000000000000000000000000600c525f806064601c82335af11561095d575f83526040525f808080610f2f565b506020526fcbf0dbf50000000000000000000000005f5260246010fd5b6bcd1e9517bb0cb8d0d5cde8935c90610f66565b89969294969591939501519680880397146110585773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03821618891b61104d57505050505050610996906110475f33613e2c565b33613e55565b906109969691613dbf565b6014526ffb772a880000000000000000000000005f5260246010fd5b8c91612610565b61108481613b03565b51856040015181036110d4575b5060015b8281106110a25750610ef7565b806110ce6110c16001938560209160051b010151908160200151915190565b903090630b0d9c09613d6c565b01611095565b602081015190516110f49130906001600160a01b0316630b0d9c09613d6c565b5f611091565b6111049082613f1c565b5f610eed565b5f620f4240948761121e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe66111698661122d9d60176016196001600160a01b039b60209b3560e81c98604086600301358c1c910152019201908b61399e565b888c8b8a959495019b8c518b015190518b0151918b828b1b848c1b8082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159d8e858518028095181691015218168c526001600160a01b0383358d60408260e81c9101528d8862ffffff8360d01c1660020b91015260301c1660808d01520190601a01919091803560e81c6002198160038185820195010195030192565b93839d85949b9293809f613abf565b88158d5289515102048503868c01526040519363f3cd914c85528a518073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028588015260808b8801866040015e8b8560c0015e61012084810152818461014001528361016001376101440190601c0182335af115610bc1575f51906112c182600f0b9260801d600f0b918383180293519184835191185f0390612374565b90526112d38851809381519318613acb565b019052858f91948e95610eb8565b6112f394866020015190875191613dbf565b81528c8b8b8b8b610e8a565b61130882613835565b8752610e85565b5050905061138e915061137f611323612381565b90919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b958693919598979994996136b3565b9697919492939a90958a84604001998a518c8b8b8b8b8a306001600160a01b03871603611811575b6117f3575b505050505051868301526113ce86613981565b6113d6613322565b925f604051936113e585610523565b8185528160208601528160408601528401525f60808401525f60a08401528d60c08401525b60048110156115e25750505050875197886020015198519b61142d855182613f1c565b84602001518051156115d2575b508051918261155b575b50505082518c816020015191519d8e106115545750611469918d9163ae639329613d6c565b1561152b575050505050831591821561149a575b50505050505b604051906020825281602001528060400160405290565b6001600160a01b031630036115175730905b831b91610fc7576040519383526040528073777777777777777777777777777777777777777760611b141502602c526fae639329000000000000000000000000600c525f806064601c82335af11561150e575f90526040525f8080808061147d565b503d5f823e3d90fd5b6bcd1e9517bb0cb8d0d5cde8935c906114ac565b909396999897999591949295015198808a1461099c5761154e9798990391613ce4565b50611483565b8d91612610565b61156482613b03565b51905181036115ac575b5060015b8281101561144457806115a66115996001938560209160051b010151908160200151915190565b90309063ae639329613d6c565b01611572565b602081015190516115cc9130906001600160a01b031663ae639329613d6c565b5f61156e565b6115dc9082613f1c565b5f61143a565b813560e81c90620f424082623fffff1611610baf578f928f9360021961160e930191600301908a61399e565b9092818462c00000851661173c5750506116908461169c949535831c8760200152620f42408b602001966001600160a01b038851602001511660408a01526001600160a01b038d516020015116858a015287515102046080880152601319604051940190601401919091803560e81c6002198160038185820195010195030192565b9692959196369161064c565b60c08701526116ab8585613abf565b60405190603f19870190815190601f198901938451632bfb780c8552602086528a60c00195875f8d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc60448b805184815191038092520101910182335af115610bc157602051946040519652526040525190815103905261172f8b519182516127d4565b9052526040525b9061140a565b93926117489195613abf565b6240000082166117d0575f60208701526001600160a01b038951602001511660408701525b620f4240623fffff8a602001931683515102048187015260405191601f198701928351926343583be585525f60a46003198b0182335af11561095d57602051926040519452604052519081510390526117c988519182516127d4565b9052611736565b600160208701526001600160a01b0389602001516020015116604087015261176d565b61180594866020015190875191613ce4565b81528c8b8b8b8b6113bb565b61181a82613835565b87526113b6565b50509161189f915080606460446118919301359101919091803560601c908060140135908160801c916fffffffffffffffffffffffffffffffff16908060340135908160801c916f01000000000000000000000000000000161515906058196059826045013560601c9201980196565b9695879391969894986136b3565b9699929398909585604096939601519a306001600160a01b038616149b838d15611c51575b611c35575b8051607f1c610baf5751848f01528d906118e285613981565b91846118ec6132d5565b935b8d6030841015611a565750509250505060400151978860200151985199611916845182613f1c565b8360200151805115611a46575b50805190816119d1575b505082518c816020015191519d8e10611554575061194c918d91613b24565b156119ac57505050505050816119805750505060405182819382526020828101526020826040015201528060800160405290565b6119909215611998573090613b24565b5f80806108d7565b6bcd1e9517bb0cb8d0d5cde8935c90613b24565b909193959294969a9980999850015199808b1461099c576109969798999a039161389d565b6119da81613b03565b5185604001518103611a25575b5060015b8281106119f8575061192d565b80611a1f611a176001938560209160051b010151908160200151915190565b903090613b24565b016119eb565b60208101519051611a409130906001600160a01b0316613b24565b5f6119e7565b611a509082613f1c565b5f611923565b60205f611a7c8489953560e81c94600f600e19836003013560a01c9a019201908861399e565b97909662800000878501956001600160a01b03875199620f42408b51627fffff851602049a88015190518801519080871b908380848a1b92169316918082109073777777777777777777777777777777777777777760611b1415169073777777777777777777777777777777777777777760611b1417159a89848d858518028095181691015218168073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415028c52601f198a87019b01993560408d0152611b388a8c613abf565b16158314611bc757608491604051918715601f1b83608001528883607c015282606c01528a8286015e828152601c0182335af115610bc1575f51928080600f0b1861002957611b9a84600f0b9460801d93848618029485935193849118613acb565b9180519083820390528211911117610baf57611bbc8751809381519318613ae6565b019052848f926118ee565b60a491604051918715601f1b836094015288836090015282608001528a826034015e60148a6040018286015e6f101e8952000000000000000000000000815260100182335af115610bc1575f51928080600f0b183d6040111761002957611b9a84600f0b9460801d93610b70565b611c4a8a8a8a8a85602001518b87519161389d565b81526118c9565b611c5a88613835565b82526118c4565b5f6bcdccd5c65a7d4860ce3abbe95d6106e5565b8060601b156104e6576bcd1e9517bb0cb8d0d5cde8935c8060601b611cae57506001600160a01b03166bcd1e9517bb0cb8d0d5cde8935d565b6014526f7407c0f80000000000000000000000005f5260246010fd5b6bcd1e9517bb0cb8d0d5cde8935c1860601b611cf1575f6bcd1e9517bb0cb8d0d5cde8935d565b635149e7955f526004601cfd5b90929180611d18575b50611d1391925061225d565b600190565b8335840180358160200135918260e01c6024600319840192019086604051611d41858585611ecc565b9060405215611da8575b50505050505060208401936001945b828610611d68575050611d07565b80358201806020013560e01c6024600319833501920190611d8c878484848d612b36565b15611da257505050602060019101950194611d5a565b88612227565b8383611db3936128dd565b15611dbf578086611d4b565b60809394507fffffffff0000000000000000000000000000000000000000000000000000000060405195633c74eed687525f876020015216856040015260608581015281858501528460a001370190601c01fd5b33906d1ff3684f28c67538d4d072c227343314611e2c57565b36601319013560601c9150565b60031115611e4357565b634e487b7160e01b5f52602160045260245ffd5b8092910391608083126100295760405190611e71826104f3565b60408294126100295760606040918251611e8a8161053f565b611e938261059a565b81526020820135602082015284528281013560208501520135910152565b3590811515820361002957565b359060ff8216820361002957565b919091611eda8284836123ae565b15611ee757505050600190565b636a92dacb8103611fef575081016101808282031261002957611f098261059a565b611f168260208501611e57565b91611f2360a08501611ebe565b91611f3060c08601611eb1565b9161012086013567ffffffffffffffff81116100295781611f52918801610682565b926101408701359267ffffffffffffffff841161002957875f98976001600160a01b0396611f89611fb696611fbc988d9c01610682565b926d1ff3684f28c67538d4d072c22734331494610160820135968a60e061010085013594013592166127e1565b926128bc565b16611fc681613c57565b82602083519301915af1611fd86132f3565b9015611fe75750611d13613cbe565b602081519101fd5b634150c86c81149291906310cd63431483171561222057810191610160828403126100295761201d8261059a565b9161202b8460208301611e57565b61203760a08301611eb1565b9460e083013560c084013561010085013567ffffffffffffffff81116100295783612063918701610682565b9261012086013567ffffffffffffffff81116100295761014091612088918801610682565b950135976001600160a01b03881696156120f9579463ffffffff946120c9945f9a948b9a99946120d3996d1ff3684f28c67538d4d072c227343314966127e1565b9260801c16613bed565b6020815191018273ba1333333333a1ba1108e8412f11850a5c319ba95af1611fd86132f3565b94919650969291946d1ff3684f28c67538d4d072c227343314936060890298808a046060149015171561220c5760608802978089046060149015171561220c578760801c15158960801c15158260801c15151717610baf575f9889986040610132966101159882519b8051988d81519b8c928c838101938380868801019787601c198a015260200191015e60200191015e60030183528b610131015381816020018c60f1015e518a60b1015e8989609d015288608801528760780152866068015285605801520160d1810184604401526020846024015263f83d08ba846004015201825215158160a801536121ec613b8d565b602081519101826d14aa86c5d3c41765bb24e11bd7015af1611fd86132f3565b634e487b7160e01b5f52601160045260245ffd5b5050505f90565b9291829160405194633c74eed68652856020015260e01b84604001526060848101528184608001528360a0013760840190601c01fd5b906001600160a01b03825116916001600160a01b036020820151169260408201519084158215026122e957612291856125d9565b908282106122e157856060959673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee18861b155f146122cd57506122c89250612693565b389039565b916122dc938111900391612633565b6122c8565b509084612610565b5050509050565b9190916001600160a01b038151166001600160a01b03602083015116604083015191811583150261236c57612324826125d9565b9583871061236457956060959615908418028318918073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee18861b155f146122cd57506122c89250612693565b868484612610565b505050509050565b9190820391821161220c57565b336d1ff3684f28c67538d4d072c22734036123a85760131936019036821161220c575f9190565b5f903690565b90919063c1fb425e8103612448575081019060c081830312610029576123d38161059a565b6123e08360208401611e57565b9160a08101359367ffffffffffffffff851161002957611d13946124049201610682565b90604051906124128261053f565b6001600160a01b0360208301915f835216825261242f845f612cd8565b90526d1ff3684f28c67538d4d072c2273433149261317d565b633036d6a6036125d35781019061010081830312610029576124698161059a565b6124768360208401611e57565b9160a081013567ffffffffffffffff81116100295784612497918301610682565b9360c08201359067ffffffffffffffff8211610029576124b8918301610682565b93602c8151106125c1578451608901938460891161220c5761257495601f196124f96124e388610630565b976124f1604051998a610577565b808952610630565b013660208801376d1ff3684f28c67538d4d072c2273433148251602001518760480152604083602001886068015e8660a801538051906020018660a9015e845181515186602801525f866014015285525191602083015192831990620f4240821061257a575b505060e00135926001600160a01b0316612d39565b50600190565b6001600160a01b039294506125b560e0926125b0856125ba94511691620f424003916bcd1e9517bb0cb8d0d5cde8935c90612ba9565b6135d7565b6135f0565b939161255f565b634e487b715f5260326020526024601cfd5b50505f90565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0382161860601b61260557504790565b61069d903090612ba9565b916054526034526014526f97a6f3b90000000000000000000000005f5260646010fd5b60105f60449260209582956014526034526fa9059cbb00000000000000000000000082525af115612683573d153d601f1060015f5114161715612676575f603452565b6390b8ec185f526004601cfd5b60405162ffffff163d5f823e3d90fd5b5f80809381935af115610bc157565b907f5ea1d46a000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000833581811690600485106127c0575b501614612708576127049161358a565b9091565b50506bcd1e9517bb0cb8d0d5cde8935c908160a01c60011615610029576b3a9113a02a267cff8bfd38516bb39834f1d3371754c5eae0a7905c905c90604051938460c00160405261276a6fffffffffffffffffffffffffffffffff8416613370565b5060e0855284602001526ce000000000000000000000000084600c01528064ffffffffff168460a0015260601c83608001526ca000000000000000000000000083606c015282604001525f82604c015260019190565b828092508560040360031b1b16165f6126f4565b9190820180921161220c57565b92989791909695939860608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c15151717610baf576040610132966101159882519c8d9881519981519b8c928c838101938380868801019787601c198a015260200191015e60200191015e600301835215158c610131015381816020018d60f1015e518b60b1015e5f8a609d015289608801528860780152876068015286605801520160d181018560440152602085602401526348c89491856004015201835215158260a80153565b60ff81166128d857506e04444c5dc75cb358380d2e3de08a9090565b61335d565b9291909263562e052c81146128f7579261069d935f613e71565b5060609150829081010312610029578035604082013590604051928160281c151582421117612b25576084359260206bcd1e9517bb0cb8d0d5cde8935c926129506fffffffffffffffffffffffffffffffff8716613370565b46600103612ac2577f0000000000000000000000000000000000000000000000000000000000000000905b604051957f549c17970871bfdfb0ff321bda3359ea022619d3d8bbae6929a36123a847fb258752868501527fda3359ea022619d3d8bbae6929a36123a847fb2500000000000000000000000086600c01528686604001527fffffffffffffffffffffffff00000000000000000000000000000000000000008816866060015280519084012085608001526119015f52825260a084206040526042601e205f528260ff1c601b01825201356040526001600160ff1b03166060526020600160805f825afa5190813d0215612ab5576040525f6060526b3a9113a02a267cff8bfd3851906bb39834f1d3371754c5eae0a79264ffffffffff169060601b17905d5d6bcd1e9517bb0cb8d0d5cde8935c74010000000000000000000000000000000000000000176bcd1e9517bb0cb8d0d5cde8935d604052600190565b638baa579f5f526004601cfd5b6040517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8665f527f574f8ba830fef8423e08e5c83d3cf7988b76ba736a1cb6cd4bd1ca02c0d16edc8452466040523060605260805f20906040525f6060529061297b565b5063cd21db4f5f526020526024601cfd5b9392919063562e052c8114612b4e5761069d94613e71565b50925060609150829081010312610029578035604082013590604051928160281c151582421117612b25576084359260206bcd1e9517bb0cb8d0d5cde8935c926129506fffffffffffffffffffffffffffffffff8716613370565b602460105f926020946014526f70a0823100000000000000000000000084525afa15610bc1573d601f1015610029575f5190565b602460105f926020946014526f7ecebe0000000000000000000000000084525afa15610bc1573d602011610029575f5190565b5f60446010602093604051956d1ff3684f28c67538d4d072c2273460345260601b85526fdd62ed3e00000000000000000000000084525afa15610bc1573d602011610029575f51906040521415901517612c6657565b63b78cb0dd5f526004601cfd5b5f6004601c602093633644e51584525afa15610bc1573d602011610029575f5190565b92919091604051935f528160ff1c601b016020526040526001600160ff1b03166060526020600160805f825afa511860601b3d1115612ab5576040525f606052565b91905191602083015192831991620f42408310612cf457505050565b6001600160a01b031615612d06575050565b61069d929350906125b06001600160a01b036125b593511691620f424003916bcd1e9517bb0cb8d0d5cde8935c90612ba9565b929491946001600160ff1b038611610baf579094905b602c8651119385602801948551938860010151908960040151958a60180151938b602c0197885180968d6001600160a01b0383166001600160a01b038716109788159684811888029160ff811680155f14612fb2575050936001600160a01b039160e495731f98431c8ad98523631ae4a59f267346ea31f984907fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e33995b62ffffff1691816040519684604052186020525f80521860601b600c521560051b6060035f2090836040525f5260205260405260ff600b536055600b20906040521694159760405197889383519384602001908660c4015e60a08560a401526001600160a01b0316846084015283606401528260440152878a301802301882602401526f128acb0800000000000000000000000082601001528060c40182520101604052816bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa2575081740400000000000000000000000000000000000000005f93849360e01b17176bcdccd5c65a7d4860ce3abbe95d8451908260208701915af1612f036132f3565b9015611fe757612f11613cbe565b604081805181010312610029576040602082015191015192604052821802185f03905f8212610baf578190612f8557507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd4602c91995101808652106125c15790945230601486015260288552909490612d4f565b98505093955050925050818410612f9a575050565b909150612610565b63ab7646c45f526020526024601cfd5b6001810361300c575050936001600160a01b039160e4957341ff9aa7e16b8b1a8a8dc4f0efacd93d02d071c9907f6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2926323a69e7599612df2565b60028103613066575050936001600160a01b039160e49573baceb8ec6b9355dfc0269c18bac9d6e2bdc29c4f907fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b549263fa461e3399612df2565b602f81036130c0575050936001600160a01b039160e49573df62d9e51d7c08360dcd41931a2e6b97ff8c73e8907fd3e7f58b9af034cfa7a0597e539bae7c6b393817a47a6fc1e1503cd6eaffe22a9263fa461e3399612df2565b6031810361311a575050936001600160a01b039160e4957386641a77a1172c3ce65bce52ae91bdadef0f74c2907f62441ebe4e4315cf3d49d5957f94d66b253dbabe7006f34ad7f70947e60bf15c92632c8958f699612df2565b94955091939092506032036128d857506001600160a01b038f9160e494938b9173f4fd2e6c5b60c5b365cd1b96dd6245e6d60414c2907f3e77b70b9c4ce644601ed4aab19834375c6a9a2bca7adeb89a7bdd5fd8eb0a7d9263fa461e3399612df2565b9190925f14613259575161324c576020810151610baf57604081015142116132385760845f927fffffffffffffffffffffffffffffffffffffffff000000000000000000000000849351516bcd1e9517bb0cb8d0d5cde8935c60206001600160a01b0385511694015193604051948560800152846060015260601b83604c015260601b1681602c01526f15dacbea00000000000000000000000081600c0152601c01826d1ff3684f28c67538d4d072c227345af115610bc157565b63cd21db4f5f52604001516020526024601cfd5b63c321526c5f526004601cfd5b905f9291839260406bcd1e9517bb0cb8d0d5cde8935c91818051956330f28b7a8752818151886020015e602001866060015e8460a0015e6001600160a01b03168260e0015261010082810152805190816020019083610120015e6101240190601c01826e22d473030f116ddee9f6b43ac78ba35af115610bc157565b604051906132e2826104f3565b5f6040838281528260208201520152565b3d1561331d573d9061330482610630565b916133126040519384610577565b82523d5f602084013e565b606090565b6040519060a0820182811067ffffffffffffffff82111761050f576040525f6080838281528260208201528260408201528260608201520152565b63d3b1276d5f5260ff166020526024601cfd5b6fffffffffffffffffffffffffffffffff166381bf1000808204818082049181808085049606910660401b17910660801b1781830660c01b17806359e6038302602e1c79ffff000000000000ffff000000000000ffff000000000000ffff1663ffff49c002018061e38f0260151c7d07ff000007ff000007ff000007ff000007ff000007ff000007ff000007ff167e07ff000007ff000007ff000007ff000007ff000007ff000007ff000007ff008161e38f02600d1c160160dc02018060081c9072ffffff00000000000000000000000000ffffff75ffffffff000000000000000000000000ffffffff00007effffffffff000000ff00000000000000ffffffffff000000ff00000000000084167affffff00000000000000000000000000ffffff000000000000000084161760101c9316911617177bffffffffffffffffffffffffffffffffffffffff00000000000000008160201c16906bffffffffffffffffffffffff1617910460c01b179060078260881c1e610100030160031c6012810190605360405194838652807f76767676767676767676767676767676767676767676767676767676767676760160071c7f010101010101010101010101010101010101010101010101010101010101010116602702017f3030303030303030303030303030303030303030303030303030303030303030019160110160031b1b189060031b610100031b826020015281604001604052565b600490911015903560e01c6367c4a3b0140290606082156135d1575060405190816040016040526020825273352650ac2653508d946c4912b07895b22edd84cd8260200152565b5f925090565b905f19818309910290818082109103035f526020525f90565b8051906020015181156136405781620f424080620f423f197fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399509830890828211900360fa1b910360061c170290565b620f424091500490565b5f5160205181156136405781620f424080620f423f197fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c261399509830890828211900360fa1b910360061c170290565b1561369f57565b634e487b7160e01b5f52600160045260245ffd5b90929194935f90604051938460c0015f8152610300386101e08801396104e086016040526136e7828a873560601c846154d0565b918287528287602001528660400199838b5287608001528660a001529495369436935f936020015173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145f146137695761373f906001600160a01b03163014613698565b9851620f42404760148c013560e81c0204905260161901976017015b6137658982613abf565b9796565b6001600160a01b03163081036137ae5750620f42406016196017836014013560e81c930193019a51916137a0308460200151612ba9565b80151590030204905261375b565b935094509750506137c0915015613698565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff48101908060550135600116908681016002198082013560e81c80920301916075019782891161002957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff889103019761375b565b906020820135918219620f4240811061384c575050565b90919250620f42400390356001600160a01b03811680910361002957613880906bcd1e9517bb0cb8d0d5cde8935c90612ba9565b905f19818309910290818082109103035f5260205261069d61364a565b95919491929073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0388161860601b6138db575050505050905061069d8133612693565b866014526ff9b6a7960000000000000000000000005f525f806024601082335af115610bc1576001600160a01b0316300361394c575050505061391f903383612633565b6014526f12e103f10000000000000000000000005f5260105f60248282335af115610bc1575f5160801c90565b61397c9491613974610dd592604051946139658661053f565b33865260208601523690611e57565b93369161064c565b61391f565b6040015180511561398f5750565b8063fb772a8860249252601c01fd5b9190939293813592836001948060f81c91826139c1575b50505050508101920390565b95839496613a06945180604001805115613aa8575b5050818411613a2d575b50601491925001948360800151906001600160a01b038560a001519360581c16906154d0565b9081815260400151809114613a1e57808080806139b5565b8063784cb7b860249252601c01fd5b85602001938451805115613a98575b5060028103613a5757505060149192855190525b82916139e0565b60149350613a69919250600314613698565b8582013592613a9160159287608001516001600160a01b038960a001519260581c168b6154d0565b9052613a50565b613aa2908a613f1c565b5f613a3c565b898051850180825260051b01918252525f806139d6565b5062ffffff106125c157565b905f8212613ad7575090565b80634c085bf160249252601c01fd5b905f8213613af457505f0390565b80633351b26060249252601c01fd5b805115613b105760200190565b634e487b7160e01b5f52603260045260245ffd5b908215613b7057604051926038526028528073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1860601b151502601452633ccfd60b5f525f80603c601c82335af11561095d57604052565b506014526fcbf0dbf50000000000000000000000005f5260246010fd5b6d14aa86c5d3c41765bb24e11bd7016bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa25750740300000000000014aa86c5d3c41765bb24e11bd7016bcdccd5c65a7d4860ce3abbe95d565b73ba1333333333a1ba1108e8412f11850a5c319ba96bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa2575060e01b7406ba1333333333a1ba1108e8412f11850a5c319ba9176bcdccd5c65a7d4860ce3abbe95d565b806bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257506001600160a01b03167f91dd734600000000000000050000000000000000000000000000000000000000176bcdccd5c65a7d4860ce3abbe95d565b6bcdccd5c65a7d4860ce3abbe95c80613cd45750565b63d66fcc385f526020526024601cfd5b9591949392906001600160a01b03163003613d45575050505080613d35575b6034526014526f15afd4090000000000000000000000005f5260205f6044601082335af115612683575f515f60345290565b613d40813384612633565b613d03565b610dd5613d409461397460405193613d5c8561053f565b3385528860208601523690611e57565b919060601b908315610fc757604051936060526040528073777777777777777777777777777777777777777760611b141502602c5260601b600c525f806064601c82335af11561095d575f606052604052565b93959290949194613dd08533613e2c565b6001600160a01b03163003613e0a57505050613dee92503390612633565b6311da60b45f5260205f6004601c82335af115610bc1575f5190565b613e27959492935090613974610dd592604051946139658661053f565b613dee565b602460105f80949381946014526fa584119400000000000000000000000082525af115610bc157565b6004601c6020935f936311da60b485525af115610bc1575f5190565b50909291604051613e83828685613f52565b906040525f14613e965750505050600190565b839163bd01c2268103613ef157506040925081010312610029576020813591013590804211613ee15750803411613ecd5750600190565b634a0944315f52602052346040526044601cfd5b63cd21db4f5f526020526024601cfd5b90915063131ad4280361222057826020918101031261002957613f16611d1392611eb1565b906122f0565b906040019081519182613f2e57505050565b5f905280515f198101825260051b01818103613f48575050565b5180825260400152565b9080929163d92aadfb81145f1461430c5750016101208282031261002957613f798261059a565b613f868260208501611e57565b613f9260a0850161059a565b9260c08501359167ffffffffffffffff831161002957613fb75f939284938801610682565b6001600160a01b03610100613fce60e08a0161059a565b980135961660405190613fe08261053f565b6001600160a01b0360208301978689521682526140f96140008583612cd8565b808952826140676001600160a01b0388515116604051906140208261055b565b815283602082015282604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9b6140d88c6001600160a01b036bcd1e9517bb0cb8d0d5cde8935c6040519261408f8461055b565b8286168452602084015216604082015260016060820152601f19019081517f7d806873084f389a66fd0315dead7adaad8ae6e8b6cf9fb0d3db61e5a91c3ffa835260a083209252565b9b6140e33083612ba9565b8181111590821802811880940204809b52612633565b6040805192614109608085610577565b6058845261423760208501947f436f6e73696465726174696f6e286164647265737320746f6b656e2c75696e7486527f32353620616d6f756e742c6164647265737320636f756e74657270617274792c848201527f626f6f6c207061727469616c46696c6c416c6c6f7765642900000000000000006060820152603c8451614192606082610577565b602e815260208101907f546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c7582527f696e7432353620616d6f756e74290000000000000000000000000000000000008782015286519889947f436f6e73696465726174696f6e20636f6e73696465726174696f6e290000000060208701525180918587015e840190838201908d8252519283915e010189815203601f198101865285610577565b8180519663137c29fe8852818151896020015e602001876060015e8560a0015e8360e00152868361010001526101408361012001528051908161016001846101400152816020019084610160015e8151918260200190828501610180015e016101840190601c01826e22d473030f116ddee9f6b43ac78ba35af115610bc1576fffffffffffffffffffffffffffffffff917f49fa719b76f0f6b7e76be94b56c26671a548e1c712d5b13dc2874f70a75982765f526020526040519260405260605f2092604052166010525f5260305fa0600190565b638d68a15681036143d45750016080828203126100295761432c8261059a565b9060208301359060408401359067ffffffffffffffff821161002957614353918501610682565b9160408351106125c1576013198351019260140180519381526143a16040519461437e606087610577565b602886526040366020880137808660280152308660140152602886523090612ba9565b80151580820394808602958604149114171561220c576001600160a01b03620f4240606061257497013594049216612d39565b63103b48be8103614585575060c09181010312610029576143f48161059a565b906144016020820161059a565b9160408201356144136060840161059a565b9260808101359062ffffff82168203610029576001600160a01b0360a08192013596169416945f928061455b575b50630902f1ac5f5260405f6004601c895afa15610bc15760403d106100295760018083161415928360051b956127108751928860201895848b8851958415801561454d575b61452e575b50505061ffff9060081c168203029202820191821561451a570204928184106144fc5750505f9491936001600160a01b0360a49487966020889586826040519763022c0d9f89528801015285010152168160600152608081810152818160a00152601c01915af115610bc157600190565b9061451587859363dfec36260263d21220a718906159fa565b612610565b634e487b7160e01b5f52601260045260245ffd5b61ffff9394506145429291610c9d91612ba9565b919050848b5f61448b565b5060018085811c1614614486565b620f424091935061456c3087612ba9565b801515900302049161457f838787612633565b5f614441565b6338c9c14781036145f25750019060a081830312610029576145a68161059a565b906145b36040820161059a565b90608081013567ffffffffffffffff811161002957611d13946145d7918301610682565b9260206001600160a01b036060840135941692013590615530565b635f80abae81036146c8575060a09181010312610029576146128161059a565b9061461f6020820161059a565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1491604081013583156146b457475b818111614660575b505050505050600190565b620f424091606083608086013584020494013591030204818111159082180218915f1461469c575061469191612693565b5f8080808080614655565b6001600160a01b036146af931690612633565b614691565b6146be3084612ba9565b801515900361464d565b90506368f5ee258103614768575081019061012081830312610029576146ed8161059a565b6146f96020830161059a565b9161470660608201611ebe565b9161471360808301611eb1565b9460e08301359167ffffffffffffffff8311610029575f96879685614748611fb695611fbc976001600160a01b039901610682565b926101008201359460c08301359389604060a0860135950135921661582f565b63fd8c38e1811492636c5f9cf9821492909183851763f61460f9821417156148e45750810161010082820312610029576147a18261059a565b936147ae6020840161059a565b60408401356147bf60608601611eb1565b9160808601359360a08701359560c088013567ffffffffffffffff81116100295760e0916147ee918a01610682565b970135976001600160a01b038a16911561481f57509463ffffffff946120c9945f9a9893948b9a956120d39961582f565b91985090156148ca57966148329761577c565b73e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4446bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f80917fb45a3c0e0000000000000001e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4446bcdccd5c65a7d4860ce3abbe95d6020815191018273e0e0e08a6a4b9dc7bd67bcb7aade5cf48157d4445af1611fd86132f3565b916148dc9593915f988998969461577c565b6121ec613b8d565b90925081935063736180c881145f14614acb575060c091810103126100295761490c8161059a565b9061491960408201611eb1565b9160608201356080830135936001600160a01b03851693848603610029578060206149b06001600160a01b0373ce355440c00014a229bbec030a2b8f8eb45a28978161496b60a0620f4240980161059a565b9916991415737a7916044b0f6e1563f1ff4cb7db270f0b85f58f0273dac17f958d2ee523a2206206994597c13d831ec718169687811886150280981897309118612ba9565b801515900391013502049015614a495763fae036d55f5260205f6004601c885afa15610bc157601f3d111561002957620f4240670de0b6b3a76400005f51019102049181831061451557505060105f60209481946044946034526014526f8d7ef9bb00000000000000000000000082525af115614a30575f603452600190565b6040516bffffffffffffffffffffffff163d5f823e3d90fd5b9092816034959395526014526f959912760000000000000000000000005f5260205f6044601082865af115614a30575f6004601c620f4240670de0b6b3a76400006020958560345202049463568d4b6f84525afa15610bc157601f3d111561002957670de0b6b3a76400005f5182020490039181831061451557505050600190565b639b59756f8103614c7f575060e0918101031261002957614aeb8161059a565b90614af86020820161059a565b916040820135906060830135926001600160a01b0384169384810361002957614b2360808301611eb1565b9560a0830135928360030b8094036100295760c00135948015614c2157918697614b6c60409593620f42405f96614b5d9b9a9b3084612ba9565b801515900302049a8b91612633565b6001600160a01b03602096865192614b848985610577565b868452601f198901368a860137875195845194858b01908860e4015e60c08760c401528660a4015286866084015215159a8b866064015285604401521683602401526f3eece7db00000000000000000000000083601001528060e40183528201610120018452828251928601915af115610bc1575192828410614c0a5750505050600190565b90614515916350a2884b02630fc63d1018906159fa565b5085614c2f91969596612ba9565b91604051631865c57d5f52610120816004601c865afa15610bc157871560051b0151918260801c3d6101201117610029576040936fffffffffffffffffffffffffffffffff5f9416900397614b6c565b905063670335be8103614f5a5750810190808203610160811261002957614ca58261059a565b60e0603f19614cb66020860161059a565b9301126100295760405191614cca83610523565b60408401358352614cdd6060850161059a565b602084015260808401356040840152614cf860a0850161059a565b94606084019586526080840160c0860135815260a085019060e0870135825260c0860196610100810135885261012081013567ffffffffffffffff8111610029578101906040828603126100295760405194614d538661053f565b82359267ffffffffffffffff841161002957614d76602092610140958301610682565b875201356020860152013590614d8c3086612ba9565b90519081811115908218028118809351020497818910614f485750506040519373bbbbbbb520d69a9775e85b458c58c648259fad5f6040523060601b602c526fdd62ed3e000000000000000000000000600c5260205f6044601c875afa15614f3f573d602011610029575f958695865190604052838110614ef3575b506001600160a01b036bcd1e9517bb0cb8d0d5cde8935c9260405196634dcebcba885283518860200152308860400152604084602001896060015e82168760a0015260608381018860c0015e1685610120015260c00151908160f81c9060601b1784610140015260801b8361016001526101a0836101800152826101a001526040826101c001528060200151826101e0015251805190816020019083610200015e6102040190601c018273bbbbbbb520d69a9775e85b458c58c648259fad5f5af115610bc1576fffffffffffffffffffffffffffffffff8091511691166010525f5260305fa0600190565b614f1c575b614f1673bbbbbbb520d69a9775e85b458c58c648259fad5f86615932565b5f614e08565b614f3a73bbbbbbb520d69a9775e85b458c58c648259fad5f866158e2565b614ef8565b843d5f823e3d90fd5b906001600160a01b0389925116612610565b63ca9e5d0f810361504f57508160c0918101031261002957614f7b8161059a565b90614f886020820161059a565b9060408101356060820135916001600160a01b038316928381036100295760105f6024926001600160a01b038560209760a0614fc76080879a01611eb1565b9201359a8a82615028575b50505015991660145288156360f3e02e0263bd6015b41860601b82525af115610bc157601f3d1115610029575f51928284106150115750505050600190565b9061451591639e9dfd6c02634a248d2a18906159fa565b620f42406150479361503a3085612ba9565b8015159003020491612633565b5f808a614fd2565b91929163b8df6d4d810361531357508260a09181010312610029576150738261059a565b60408301356001600160a01b03811691828203610029576150c261509960608701611eb1565b91620f424060808801359760206150b03085612ba9565b8015159003910135020494859161570a565b156153075763ffa642255f5260405f6004601c845afa15610bc157603f3d1115610029575f516020516317be952e5f5260205f6004601c865afa15610bc157601f3d1115610029575f518060081c6100295760ff1661512081611e39565b63796da7af5f5260205f6004601c875afa15610bc157601f3d1115610029575f519063eab5d20e5f5260205f6004601c885afa15610bc157601f3d1115610029575f5163ec2fd46d5f5260205f6004601c895afa15610bc157601f3d111561002957865f51936ec097ce7bc90715b34b9f100000000004926151a181611e39565b600281036152d1575050637c9b8e895f5260205f6004601c895afa15610bc157601f3d1115610029575f51948585038089116152a85750505083670de0b6b3a7640000809592818981950191848303020495800204029080820491061515018202049083030102045b63c0ffa1785f5260205f6004601c855afa15610bc157601f3d1115610029575f5163ab44a7a35f5260205f6004601c865afa15610bc157601f3d111561002957670de0b6b3a764000080915f5101019102049380851061527057509261257492936159b8565b60205f6004601c8895634a248d2a84525afa15610bc157601f3d1115610029575f518060a01c610029576001600160a01b0316612610565b670de0b6b3a76400009296506152c79493919550880302048380615a1e565b810391030161520a565b615300955091670de0b6b3a7640000919693926152ed81611e39565b1515908418028318958692020491615a1e565b900361520a565b90612574929391615976565b9192916342032aef036125d357819281601f1993018435908560200135866040013590878787018184019489868035968486606001359687019c8d86039e8f019f861090608011178b158c60401c171788158960a01c171791111792030160051c85118515171791111782873518178860051c831117610029576153c59060409796975198886020018a60a4013780896044015263a04c36b289600401526064870189526084878a01016040526125d9565b8760840152612000603f840484010195603f195f960190886024019189606401908a602001957fa04c36b2000000000000000700000000000000000000000000000000000000003017995b8060051b90602086830101359184831161002957836020916001946080018a52010135855201938685145a306bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f8f8c8f8380938f926bcdccd5c65a7d4860ce3abbe95d51923090888882180218f180156154bc57615497613cbe565b6154a8578d1117610bc15793615410565b505050505050505050505092505050600190565b5f6bcdccd5c65a7d4860ce3abbe95d615497565b919392610300916001600160a01b031694850906019161012083019261014081019081519081610160858218920151170261551c5750811561550f5752565b63ad1991f55f526004601cfd5b639a62e8b45f52602052506040526044601cfd5b9291906001600160a01b038216936e22d473030f116ddee9f6b43ac78ba385146d1ff3684f28c67538d4d072c2273486141773bbbbbbb520d69a9775e85b458c58c648259fad5f8614176104e6575f906001600160a01b0381169073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee820361567c57505050620f424090470204938051155f146156025750506155da575f80809381935af16155d16132f3565b9015611fe75750565b7f01da1572000000000000000000000000000000000000000000000000000000005f5260045ffd5b9093926020830180841161220c578251106125c157835f9460208695850101525b602083519301915af16156346132f3565b9015611fe75751159081615672575b5061564a57565b7f82d5d76a000000000000000000000000000000000000000000000000000000005f5260045ffd5b90503b155f615643565b9091949282979497155f1461569b575050506155da575f928392615623565b6156aa96939592963083612ba9565b8015159003905f19818309910290818082109103035f526020526156cc61364a565b6020860180871161220c578551106125c15787845f988360208b9a8a010152036156f9575b505050615623565b6157029261570a565b5f80876156f1565b60405192826040523060601b602c526fdd62ed3e000000000000000000000000600c5260205f6044601c855afa15615773573d602011610029575f5193604052831061575557505050565b6157629261576457615932565b565b61576e82826158e2565b615932565b833d5f823e3d90fd5b92939095949796919760608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c1515620f42408c11171717610baf5760d49660405199875180986020018a8d015e8a60b401528960b101523089609d015288608801528760780152866068015285605801526070820185604401526020856024015263f83d08ba856004015260b48201855215158460a80153830101604052565b92939095949796919760608202918083046060149015171561220c5760608102908082046060149015171561220c578060801c15158260801c15158460801c1515620f42408c11171717610baf5760d49660405199875180986020018a8d015e8a60b401528960b101523089609d01528860880152876078015286606801528560580152607082018560440152602085602401526348c89491856004015260b48201855215158460a80153830101604052565b604460105f8093602095601452816034526f095ea7b300000000000000000000000082525af115612683573d153d601f1060015f5114161715615925575f603452565b633e3f8f735f526004601cfd5b604460105f809360209560145281196034526f095ea7b300000000000000000000000082525af115612683573d153d601f1060015f5114161715615925575f603452565b6084905f809360209560405191638dae73338352828801528160400152606081810152818160800152601c01915af115610bc157601f3d1115610029575f5190565b6084905f80936020956040519163e67ce7068352828801528160400152606081810152818160800152601c01915af115610bc157601f3d1115610029575f5190565b6004601c5f9260209484525afa15610bc1575f51908160a01c3d6020111761002957565b670de0b6b3a76400008481039594820281900490910292828404019185020480828110615aaf57500392600191670de0b6b3a7640000905b8260021b02048480020193600185811c019185925b838110615aa05750670de0b6b3a76400009394955060011b935f14615a9957015b0290808204910615150190565b9003615a8c565b9250828604830160011c615a6b565b91905003670de0b6b3a76400005f92949194615a56565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0382161860601b615af8575061069d8133612693565b60405191826044015281602401526f0c11dedd00000000000000000000000081601001526044815280606401604052336bcd1e9517bb0cb8d0d5cde8935c1860601b156104e6576bcdccd5c65a7d4860ce3abbe95c80612fa257505f80917f599d07140000000000000002000000000000000000000000000000000000000033176bcdccd5c65a7d4860ce3abbe95d60208151910182335af1615b996132f3565b9015611fe757615ba7613cbe565b602001519056","sourceMap":"483557:3627:0:-:0;;;;;;;;;-1:-1:-1;483557:3627:0;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;184423:248;483557:3627;184423:248;;;483557:3627;;;;;;;;-1:-1:-1;;483557:3627:0;;;;;;;:::i;:::-;;;55440:99;;;483557:3627;55440:99;483557:3627;;-1:-1:-1;;483557:3627:0;;;;;;;;:::i;:::-;;;;;;;;;435235:9;468862:27;483557:3627;;;;;;;;:::i;:::-;418600:18;;;:::i;:::-;435176:9;;;;:::i;:::-;468862:27;:::i;:::-;435235:9;;:::i;:::-;483557:3627;;;;;;;;;;-1:-1:-1;;483557:3627:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;418600:18;;;:::i;:::-;435176:9;;;;:::i;:::-;3459:42;2042:10;54398:47;469146:68;;469527:805;;;;;;483557:3627;469527:805;;;;;;;;;417138:76;;;184423:248;;;;;;;;;;483557:3627;184423:248;;;;;;;483557:3627;;;:::i;:::-;186105:32;;;-1:-1:-1;483557:3627:0;;184849:60;;;483557:3627;;;;;;184849:60;;;483557:3627;;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;87430:866;184423:248;483557:3627;87430:866;483557:3627;87430:866;;-1:-1:-1;;;;;87430:866:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3459:42;87430:866;;;;;483557:3627;87430:866;;;;;;;;;;;;;;;;;483557:3627;;87430:866;;;;95447:58;95443:1308;;186101:401;;;;;;;435235:9;186101:401;470406:27;186101:401;184423:248;186101:401;470406:27;:::i;95443:1308::-;95568:15;;;;;;;;:26;95564:118;;95711:53;96094:591;95711:53;96738:1;95711:53;435235:9;95711:53;95932:66;184423:248;95711:53;;;470406:27;95711:53;;:::i;:::-;95778:51;;;;;;;:::i;:::-;95932:66;:::i;:::-;96094:591;483557:3627;96094:591;;;;;184423:248;96094:591;;;;483557:3627;96094:591;;93274:95;96094:591;;;;483557:3627;96094:591;;3459:42;96094:591;483557:3627;96094:591;;;483557:3627;96094:591;;184423:248;;483557:3627;96094:591;483557:3627;96094:591;;;483557:3627;96094:591;;483557:3627;96094:591;;;;;;;96738:1;:::i;:::-;95443:1308;;;;;;;;95564:118;95622:10;483557:3627;93738:97;483557:3627;93738:97;;186101:401;483557:3627;;;;;;:::i;:::-;;186210:34;;483557:3627;;-1:-1:-1;483557:3627:0;;185197:66;;;483557:3627;;;;;;185197:66;;;483557:3627;;;;;;;;;;;;;;;;;;;184423:248;483557:3627;88566:900;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;88566:900;483557:3627;88566:900;;;-1:-1:-1;;;;;88566:900:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3459:42;88566:900;;;;;483557:3627;88566:900;;;;;;;;;;;;;;;;;483557:3627;;88566:900;;;;97031:69;97027:1557;;186206:296;;;;;;435235:9;186206:296;470406:27;186206:296;184423:248;186206:296;470406:27;:::i;97027:1557::-;97291:12;;;;;;;;;97259:15;;:26;2657:73;97254:104;;97379:53;97916:602;470406:27;97379:53;;435235:9;97379:53;97746:66;184423:248;97379:53;;;98571:1;97379:53;;:::i;:::-;483557:3627;97581:62;483557:3627;;;;97581:62;;;:::i;97746:66::-;97916:602;483557:3627;97916:602;;;;;184423:248;97916:602;;;;483557:3627;97916:602;;93436:93;97916:602;;;;483557:3627;97916:602;;3459:42;97916:602;483557:3627;97916:602;;184423:248;;483557:3627;97916:602;483557:3627;97916:602;;;483557:3627;97916:602;;;483557:3627;97916:602;;483557:3627;97916:602;;;;;;;98571:1;:::i;186206:296::-;186592:335;;;;;;;;483557:3627;186592:335;;;;;;184423:248;186592:335;;;;469146:68;40444:127;483557:3627;40444:127;483557:3627;40444:127;;483557:3627;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;;483557:3627:0;;;;;-1:-1:-1;483557:3627:0;;414756:381;483557:3627;;;;;;;;;;;;;:::o;:::-;351729:340;483557:3627;;;;;;;;;;;351729:340;483557:3627;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;-1:-1:-1;;483557:3627:0;;;;;;;;;;;;;;;;:::o;:::-;;;-1:-1:-1;;;;;483557:3627:0;;;;;;:::o;:::-;-1:-1:-1;;483557:3627:0;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;-1:-1:-1;;483557:3627:0;;;;:::o;:::-;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;-1:-1:-1;483557:3627:0;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;:::o;421672:610::-;483557:3627;414756:381;;;;;;;;;-1:-1:-1;414756:381:0;;;;;;;;;;;;;;;;421672:610;435782:16;;:::i;:::-;411652:70;;;;;421897:379;421901:17;;;483312:21;;;;;:::i;:::-;483557:3627;;;;422035:17;:::o;421897:379::-;422083:148;;;422251:14;483557:3627;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;483557:3627:0;;422083:148;483557:3627;;-1:-1:-1;483557:3627:0;;308492:325;;308924:10;308492:325;;;414756:381;308492:325;414756:381;308492:325;;;308924:10;:::i;:::-;308492:325;483557:3627;;;;;:::i;:::-;-1:-1:-1;341537:4:0;;;;483557:3627;341537:4;;;422244:21;:::o;483557:3627::-;297696:150;299773:26;297696:150;;;;;;;;;209450:1525;;;209925:664;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;210650:294:0;209925:664;;;210650:294;209925:664;210650:294;;;;;209450:1525;;299773:26;-1:-1:-1;;;;;299834:4:0;;;;;;;;483557:3627;;299817:22;483557:3627;;300131:57;299834:4;;300131:57;;:::i;:::-;198776:80;;;;;;;;;297696:150;198776:80;;;;;300265:126;;;483557:3627;189855:65;;300431:3;384544:60;300404:108;;189855:65;199135:94;;;;;;;300591:25;;;:::i;:::-;300628:14;483557:3627;;:::i;:::-;302593:14;;;;303509;;;297696:150;303509:14;;300688:4836;300695:31;;322824:2;300695:31;;;;;198776:80;;;;;;;;;;190164:76;;302593:14;190164:76;;189855:65;;306157:88;217268:11;198449:69;;217268:11;;:::i;:::-;198604:80;302593:14;198604:80;;189855:65;;217294:26;217290:80;;300688:4836;483557:3627;;;217674:11;;217670:800;;300688:4836;198449:69;;;;190164:76;302593:14;190164:76;;189855:65;;218788:24;;;;218784:119;;218916:55;;;;;483557:3627;218916:55;:::i;:::-;306259:1598;;;306559:21;;;;;;;306555:320;;306259:1598;;;;;297696:150;307959:342;;;;;;302593:14;307959:342;;;;302593:14;307959:342;297696:150;307959:342;;;;;;;297696:150;307959:342;422244:21;:::o;306555:320::-;215396:1065;;;;;297696:150;215396:1065;;;;299834:4;297696:150;215396:1065;;-1:-1:-1;;;215396:1065:0;;;;;;;;-1:-1:-1;414756:381:0;297696:150;215396:1065;414756:381;;215396:1065;;;;;-1:-1:-1;215396:1065:0;;297696:150;215396:1065;306555:320;;;;;215396:1065;;-1:-1:-1;215396:1065:0;;;;;;302593:14;215396:1065;;-1:-1:-1;215396:1065:0;;;;306259:1598;198951:77;307447:9;;;307443:348;;483557:3627;307808:34;483557:3627;;;307808:34;;:::i;:::-;;306259:1598;;307443:348;307480:293;;;;-1:-1:-1;307480:293:0;;;;218784:119;218878:9;;;:::i;217670:800::-;217752:8;;;:::i;:::-;;198776:80;;190934:62;;217809:418;;217670:800;218259:13;218271:1;218274:10;;;;;217670:800;218274:10;218356:18;218392:53;218356:18;218271:1;218356:18;;191124:174;191008:296;191124:174;;;;;;;;;;;;191008:296;;218356:18;299834:4;;218392:53;483557:3627;218392:53;:::i;:::-;483557:3627;218259:13;;217809:418;302593:14;218159:15;;483557:3627;;;218135:73;;299834:4;;-1:-1:-1;;;;;483557:3627:0;;218135:73;:::i;:::-;217809:418;;;217290:80;217346:12;;;;:::i;:::-;217290:80;;;300688:4836;297696:150;-1:-1:-1;301267:39:0;300802:444;;;;;;;;-1:-1:-1;;300802:444:0;;;;414756:381;300802:444;;;;;301267:39;;;:::i;:::-;198604:80;;;303708:8;198604:80;302593:14;198604:80;;-1:-1:-1;;;;;198604:80:0;;189855:65;86062:9;189855:65;;301672:8;301666:14;;322824:2;50991:88;190164:76;302593:14;190164:76;;198449:69;;302593:14;190164:76;;301907:652;;;;;;;;;;483557:3627;;;;301907:652;;;;;-1:-1:-1;;;301907:652:0;;;;-1:-1:-1;;;301907:652:0;;48506:137;;;;;;;;;;;483557:3627;;;48506:137;483557:3627;302686:281;;;;;;;303158:334;-1:-1:-1;;303158:334:0;302593:14;303158:334;;;;;483557:3627;;303598:4;;;;:::i;:::-;303702:14;:19;303708:8;;;;290726:959;;;;;;;;;;302593:14;290726:959;;;;;;;;;;414756:381;290726:959;;;;;;;;414756:381;290726:959;;;;414756:381;;290726:959;;;;;-1:-1:-1;290726:959:0;;304759:32;302593:14;290726:959;303745:101;303698:342;;48506:137;;;;198604:80;;;;48506:137;;;;304759:32;:::i;:::-;189855:65;;;483557:3627;;;;;;305001:35;;304953:43;;2513:62;304948:178;;305452:28;198449:69;;189855:65;;;;48506:137;;305452:28;:::i;:::-;483557:3627;;;300688:4836;;;;;;304948:178;9109:168;-1:-1:-1;9109:168:0;9537:4;302593:14;9109:168;;;;290726:959;297696:150;290726:959;;-1:-1:-1;290726:959:0;;;;;303698:342;291927:1183;;;;;;;;;;;;;302593:14;291927:1183;;;;;;;;;;;;;;;;;;;;;;;;;;;;;414756:381;;291927:1183;;;;;-1:-1:-1;291927:1183:0;;302593:14;291927:1183;;;300802:444;291927:1183;;;;300802:444;291927:1183;;;;;300802:444;291927:1183;;;297696:150;291927:1183;;;;;304759:32;303893:128;;303698:342;;;300265:126;300323:52;190164:76;;;;189855:65;;300323:52;;:::i;:::-;483557:3627;;300265:126;;483557:3627;450802:408;;;;;;;422083:148;450802:408;;;483557:3627;;:::i;:::-;-1:-1:-1;;450802:408:0;;;456677:18;;;;;;450802:408;;;;;;451623:40;450802:408;;;;451623:24;450802:408;;;;451623:24;:::i;:::-;:40;:::i;:::-;450802:408;;;451677:14;;451673:233;;483557:3627;422244:21;:::o;451673:233::-;451707:189;-1:-1:-1;451707:189:0;450802:408;451707:189;450802:408;451707:189;;456697:43;422083:148;441788:767;;;;;450802:408;441788:767;;;414756:381;441788:767;450802:408;-1:-1:-1;;450802:408:0;441788:767;;;;;;456949:157;;450802:408;456949:157;;;;;;;457206:58;;;;456697:43;457202:133;;456697:43;;;450802:408;49839:1;456697:43;52653:63;483557:3627;;456666:9;;;457202:133;457315:4;;:::i;457206:58::-;449699:42;;;;;;;;:::i;:::-;457218:46;457206:58;;483557:3627;351656:4;422083:148;;;;-1:-1:-1;;422083:148:0;351641:19;483557:3627;;351729:340;;;;;;;;;;;352738:461;;;353230:16;351729:340;-1:-1:-1;353230:16:0;;47077:87;351729:340;;;47077:87;;;;353465:4;;353448:22;;353444:1325;353465:4;;;353728:6;414756:381;;352738:461;414756:381;352738:461;;353512:109;;;353728:6;:::i;353444:1325::-;353773:19;;353766:27;354702:56;353773:19;;353766:27;:::i;:::-;351729:340;483557:3627;;;;;:::i;:::-;414756:381;483557:3627;;351729:340;354602:86;;483557:3627;;;353936:568;;;483557:3627;:::i;:::-;353936:568;483557:3627;353936:568;;;;;;483557:3627;;351729:340;353936:568;;422083:148;351729:340;;;353936:568;;;483557:3627;:::i;:::-;354702:56;;:::i;:::-;353444:1325;;483557:3627;361302:150;;;366455:49;361302:150;;;;;366004:26;361302:150;;;;;209450:1525;;;209925:664;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;210650:294:0;209925:664;;;210650:294;209925:664;210650:294;;;;;209450:1525;;366004:26;366455:49;;;;;;;;;:::i;:::-;198776:80;;;;361302:150;198776:80;;;;;;;;;;;366602:4;;;;;;;-1:-1:-1;;;;;483557:3627:0;;366585:22;366581:272;;483557:3627;366866:152;;483557:3627;189855:65;;;;;;;;;;;;199135:94;;;367097:25;;;:::i;:::-;367134:14;483557:3627;;;;:::i;:::-;;;;:::i;:::-;367378:2285;367385:31;363168:2;367385:31;;;;;198776:80;;;;;;;361302:150;198776:80;;190164:76;;361302:150;190164:76;;189855:65;;370296:84;217268:11;198449:69;;217268:11;;:::i;:::-;198604:80;361302:150;198604:80;;189855:65;;217294:26;217290:80;;367378:2285;483557:3627;;;217674:11;;217670:800;;367378:2285;198449:69;;;;190164:76;361302:150;190164:76;;189855:65;;218788:24;;;;218784:119;;218916:55;;;;;483557:3627;218916:55;:::i;:::-;370394:1995;;;370708:21;;;;;;;;;;370704:404;;370394:1995;;;;;361302:150;372491:342;;;;;;361302:150;372491:342;;;;361302:150;372491:342;361302:150;372491:342;;;;;364728:9;372491:342;361302:150;372491:342;422244:21;:::o;370704:404::-;-1:-1:-1;;;;;483557:3627:0;366602:4;366585:22;366602:4;;;370779:53;;215396:1065;;;;;361302:150;215396:1065;;;;361302:150;215396:1065;;-1:-1:-1;;;215396:1065:0;;;;;;;;-1:-1:-1;414756:381:0;215396:1065;228933:956;414756:381;;215396:1065;;;;;-1:-1:-1;215396:1065:0;;361302:150;215396:1065;370704:404;;;;;;215396:1065;;361302:150;215396:1065;;-1:-1:-1;215396:1065:0;361302:150;215396:1065;;370779:53;417138:76;;370779:53;;;370394:1995;199135:94;;;;;;;;;;198951:77;483557:3627;;;;371713:9;;371709:348;;228933:956;-1:-1:-1;;;;;483557:3627:0;;86250:88;;;483557:3627;;414756:381;;;;;;372206:43;414756:381;372165:18;-1:-1:-1;414756:381:0;372165:18;:::i;:::-;414756:381;372206:43;:::i;372074:301::-;372296:60;;;;;:::i;371709:348::-;367518:480;371746:293;;-1:-1:-1;371746:293:0;361302:150;371746:293;;218784:119;218878:9;;;:::i;217670:800::-;217752:8;;;:::i;:::-;;198776:80;361302:150;198776:80;;190934:62;;217809:418;;217670:800;218259:13;218271:1;218274:10;;;;;;217670:800;;;218286:17;218356:18;218392:53;218356:18;218271:1;218356:18;;191124:174;191008:296;191124:174;;;;;;;;;;;;191008:296;;218356:18;366602:4;;218392:53;483557:3627;218392:53;:::i;:::-;483557:3627;218259:13;;217809:418;361302:150;218159:15;;483557:3627;;;218135:73;;366602:4;;-1:-1:-1;;;;;483557:3627:0;;218135:73;:::i;:::-;217809:418;;;217290:80;217346:12;;;;:::i;:::-;217290:80;;;367378:2285;-1:-1:-1;86062:9:0;367518:480;;368297:25;364315:306;368095:39;367518:480;368358:4;367518:480;;-1:-1:-1;;;;;;;367518:480:0;361302:150;367518:480;;;;;361302:150;367518:480;;;;;;368015:24;;483557:3627;367518:480;;;368095:39;;;:::i;:::-;198604:80;;;;;;;;;;;190164:76;;;198449:69;;190164:76;;;363691:512;;;;;;;;;;;;-1:-1:-1;;;363691:512:0;;;;-1:-1:-1;;;363691:512:0;;48506:137;;;;;;;;;;483557:3627;364225:10;;483557:3627;48506:137;483557:3627;;;-1:-1:-1;;;;;364315:306:0;;384544:60;361302:150;384544:60;367518:480;384544:60;364631:7;;483557:3627;384544:60;;483557:3627;384544:60;;;483557:3627;;;364672:15;;483557:3627;364315:306;;483557:3627;364728:9;;;483557:3627;364315:306;;;;209001:443;;;209125:313;;;;-1:-1:-1;;209125:313:0;;;;;;;;;;;;209001:443;;368297:25;368278:44;;;;;;;;;368358:4;;:::i;:::-;483557:3627;;363168:2;;198604:80;;189855:65;322824:2;50991:88;483557:3627;;368450:22;;;483557:3627;361302:150;228933:956;;;;;;;;;;;;;;;;364728:9;228933:956;;;;361302:150;228933:956;;;;;;;;;;;;;;;;;;;;;;;;;;414756:381;;228933:956;;;;;-1:-1:-1;228933:956:0;223559:91;369241:54;223559:91;;;223369:84;364728:9;223369:84;223559:91;363168:2;48506:137;;;;;198604:80;;189855:65;;;;48506:137;;-1:-1:-1;483557:3627:0;369241:54;;:::i;:::-;483557:3627;;369589:30;198449:69;;189855:65;;;;48506:137;;369589:30;:::i;:::-;483557:3627;;;367378:2285;;;;;;;;366866:152;366924:78;190164:76;;361302:150;190164:76;;189855:65;;;366924:78;;:::i;:::-;483557:3627;;366866:152;;;;;;;366581:272;366669:151;;;:::i;:::-;483557:3627;;366581:272;;483557:3627;435782:16;;;;396032:49;435782:16;;395581:26;435782:16;;:::i;:::-;391657:31;209450:1525;;;209925:664;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;210650:294:0;209925:664;;;210650:294;209925:664;210650:294;;;;;209450:1525;;395581:26;396032:49;;;;;;;;;;;:::i;:::-;198776:80;;;;;;;;;;;;;;;;396179:4;;;;;;;-1:-1:-1;;;;;483557:3627:0;;396162:22;396158:272;;483557:3627;396443:195;;483557:3627;189855:65;;;;;;199135:94;;;;396717:25;;;:::i;:::-;483557:3627;;:::i;:::-;;-1:-1:-1;198776:80:0;483557:3627;;;;;:::i;:::-;;;;;;;;;;198776:80;483557:3627;;;;;;-1:-1:-1;483557:3627:0;;;;-1:-1:-1;414756:381:0;483557:3627;;;;;;;;397376:31;422083:148;397376:31;;;;;198776:80;;;;;;190164:76;;483557:3627;190164:76;;189855:65;;399888:90;217268:11;198449:69;;217268:11;;:::i;:::-;198604:80;483557:3627;198604:80;;189855:65;;217294:26;217290:80;;397369:1886;483557:3627;;;217674:11;;217670:800;;397369:1886;198449:69;;;;;190164:76;;483557:3627;190164:76;;189855:65;;218788:24;;;218784:119;;218916:55;;;;;483557:3627;218916:55;:::i;:::-;399992:1719;;;400292:21;;;;;;;;;;400288:410;;399992:1719;;;;;;;198776:80;401762:238;;483557:3627;401762:238;;;483557:3627;401762:238;;;198776:80;401762:238;198776:80;401762:238;422244:21;:::o;400288:410::-;-1:-1:-1;;;;;483557:3627:0;396179:4;396162:22;396179:4;;;400363:53;;215396:1065;;;;;198776:80;215396:1065;;;;198776:80;215396:1065;;-1:-1:-1;;;215396:1065:0;;;;;;;;-1:-1:-1;414756:381:0;215396:1065;;414756:381;;215396:1065;;;;;-1:-1:-1;215396:1065:0;;198776:80;215396:1065;400288:410;;;;;;;215396:1065;;;-1:-1:-1;215396:1065:0;;;;;400363:53;417138:76;;400363:53;;;399992:1719;199135:94;;;;;;;;;;;;;198951:77;401270:9;;;;401266:348;;401631:65;483557:3627;;;;401631:65;;:::i;:::-;;399992:1719;;218784:119;218878:9;;;:::i;217670:800::-;217752:8;;;:::i;:::-;;198776:80;;190934:62;;217809:418;;217670:800;218259:13;218271:1;218274:10;;;;;217670:800;218274:10;218356:18;218392:53;218356:18;218271:1;218356:18;;191124:174;191008:296;191124:174;;;;;;;;;;;;191008:296;;218356:18;396179:4;;218392:53;483557:3627;218392:53;:::i;:::-;483557:3627;218259:13;;217809:418;483557:3627;218159:15;;483557:3627;;;218135:73;;396179:4;;-1:-1:-1;;;;;483557:3627:0;;218135:73;:::i;:::-;217809:418;;;217290:80;217346:12;;;;:::i;:::-;217290:80;;;397369:1886;397506:612;;;;;86062:9;397506:612;;;;;;;;;;-1:-1:-1;;398152:39:0;397506:612;;;;;398152:39;;;:::i;:::-;398145:46;;;;398216:8;398210:14;;398216:8;;391887:326;;392590:25;391887:326;483557:3627;391887:326;;;;;;483557:3627;391887:326;;86062:9;198604:80;483557:3627;198604:80;;-1:-1:-1;;;;;198604:80:0;;483557:3627;190164:76;;483557:3627;198776:80;483557:3627;;;-1:-1:-1;;;;;198449:69:0;;483557:3627;190164:76;;483557:3627;;;;;198604:80;;189855:65;322824:2;50991:88;483557:3627;;;;-1:-1:-1;;198776:80:0;3175:74;391887:326;;;;;209001:443;;;209125:313;;;;-1:-1:-1;;209125:313:0;;;;;;;;;;;;209001:443;;392590:25;483557:3627;;;;;;;;:::i;:::-;;;;392560:55;392647:4;;;;:::i;:::-;198776:80;379877:3157;;-1:-1:-1;;379877:3157:0;;;;;;-1:-1:-1;;379877:3157:0;;;;;;;;483557:3627;379877:3157;;;483557:3627;379877:3157;;;-1:-1:-1;379877:3157:0;;;;;;;;;;;;;;;;;;414756:381;;379877:3157;;;;;483557:3627;379877:3157;;198776:80;379877:3157;;;;198776:80;379877:3157;198604:80;189855:65;;;483557:3627;;;393375:24;198449:69;;189855:65;;;393375:24;:::i;:::-;483557:3627;;393410:84;198776:80;3269:73;398206:1039;397369:1886;;;398206:1039;398567:4;;;;;;:::i;:::-;398601:8;398595:14;;398601:8;;-1:-1:-1;483557:3627:0;398638:20;;395250:1;-1:-1:-1;;;;;198449:69:0;;483557:3627;190164:76;;483557:3627;198776:80;398722:23;;483557:3627;398591:412;86062:9;397506:612;198604:80;483557:3627;198604:80;399020:15;;198604:80;;189855:65;322824:2;50991:88;399085:22;;;483557:3627;198776:80;383255:1245;;-1:-1:-1;;383255:1245:0;;;;;;;;;-1:-1:-1;383255:1245:0;-1:-1:-1;;383255:1245:0;;414756:381;;383255:1245;;;;;483557:3627;383255:1245;;198776:80;383255:1245;;;198776:80;383255:1245;198604:80;189855:65;;;483557:3627;;;394193:24;198449:69;;189855:65;;;394193:24;:::i;:::-;483557:3627;;398206:1039;;398591:412;398856:41;483557:3627;398833:20;;395250:1;-1:-1:-1;;;;;198604:80:0;483557:3627;198604:80;;483557:3627;190164:76;;483557:3627;198776:80;398919:23;;483557:3627;398591:412;;396443:195;396522:83;190164:76;;;;;189855:65;;;396522:83;;:::i;:::-;483557:3627;;396443:195;;;;;;;396158:272;396246:151;;;:::i;:::-;483557:3627;;396158:272;;483557:3627;321303:150;;;323605:49;321303:150;;;;;323154:26;321303:150;;;;;209450:1525;;;209925:664;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;210650:294:0;209925:664;;;210650:294;209925:664;210650:294;;;;;209450:1525;;323154:26;323605:49;;;;;;;;;;:::i;:::-;198776:80;;;;;;;;321303:150;198776:80;;;;;323752:4;;-1:-1:-1;;;;;483557:3627:0;;323735:22;;;;;323731:272;;483557:3627;324016:197;;483557:3627;189855:65;;324253:3;384544:60;324226:108;;189855:65;199135:94;;;;189855:65;;324413:25;199135:94;324413:25;:::i;:::-;324450:14;483557:3627;;;:::i;:::-;324510:4807;324517:31;;322824:2;324517:31;;;;;198776:80;;;;;;321303:150;198776:80;;190164:76;;326386:14;190164:76;;189855:65;;198449:69;221132:11;198449:69;;221132:11;;:::i;:::-;198604:80;326386:14;198604:80;;189855:65;;221158:26;221154:80;;324510:4807;483557:3627;;;221538:11;;221534:800;;324510:4807;198449:69;;;;190164:76;;326386:14;190164:76;;189855:65;;222652:24;;;222648:119;;222780:55;;;;;;:::i;:::-;330059:1726;;;330359:21;;;;;;;330355:415;;330059:1726;;;321303:150;331887:342;;;;;;326386:14;331887:342;;;;326386:14;331887:342;321303:150;331887:342;;;;;;;321303:150;331887:342;422244:21;:::o;330355:415::-;330588:163;;330430:53;;;323752:4;330430:53;330588:163;:::i;:::-;330355:415;;;;;330430:53;417138:76;;330430:53;330588:163;:::i;330059:1726::-;199135:94;;;;;;;;;;;;;;198951:77;331342:9;;;;331338:348;;331703:67;483557:3627;;;;;331703:67;;:::i;221534:800::-;221616:8;;;:::i;:::-;;198776:80;321303:150;198776:80;;190934:62;;221673:418;;221534:800;222123:13;222135:1;222138:10;;;;;;221534:800;;;222150:17;222220:18;222256:53;222220:18;222135:1;222220:18;;191124:174;191008:296;191124:174;;;;;;;;;;;;191008:296;;222220:18;323752:4;;222256:53;;:::i;:::-;483557:3627;222123:13;;221673:418;326386:14;222023:15;;483557:3627;;;221999:73;;323752:4;;-1:-1:-1;;;;;483557:3627:0;221999:73;:::i;:::-;221673:418;;;221154:80;221210:12;;;;:::i;:::-;221154:80;;;324510:4807;326386:14;-1:-1:-1;325089:39:0;324624:444;;;;;;;;-1:-1:-1;;324624:444:0;;;;414756:381;324624:444;;;;;325089:39;;;:::i;:::-;198604:80;;;327501:8;198604:80;;;;-1:-1:-1;;;;;198604:80:0;;189855:65;86062:9;189855:65;;325465:8;325459:14;;322824:2;50991:88;190164:76;;;;198449:69;;190164:76;;;325700:652;;;;;;;;;;483557:3627;;;;325700:652;;;;;-1:-1:-1;;;325700:652:0;;;;-1:-1:-1;;;325700:652:0;;48506:137;;;;;;;;;;;;483557:3627;326386:14;;483557:3627;48506:137;483557:3627;326479:281;;;;;;;-1:-1:-1;;326951:334:0;;;;;;;321303:150;327302:14;;483557:3627;327391:4;;;;:::i;:::-;327495:14;:19;327501:8;;;;310657:1332;;321303:150;310657:1332;;;;;;;;;;;;;;;;;;;;;;;;;;;;;414756:381;;310657:1332;;;;;-1:-1:-1;310657:1332:0;;;;324624:444;310657:1332;;;;328552:32;310657:1332;324624:444;310657:1332;;;;327491:342;48506:137;;;;198604:80;;;;48506:137;;;;328552:32;:::i;:::-;189855:65;;;483557:3627;;;;;;328794:35;;328746:43;;2513:62;328741:178;;329245:28;198449:69;;189855:65;;;;48506:137;;329245:28;:::i;:::-;483557:3627;;;324510:4807;;;;;327491:342;312231:1607;;321303:150;312231:1607;;;;;;;;;;;;;;;;;;;;;;;;;;321303:150;312231:1607;;;;;;;;;;414756:381;;312231:1607;;;;;-1:-1:-1;312231:1607:0;;;;324624:444;312231:1607;;;321303:150;312231:1607;;;;328552:32;312231:1607;324624:444;312231:1607;;;;327491:342;;;324016:197;324095:85;190164:76;;;;;;;;189855:65;;;324095:85;;:::i;:::-;483557:3627;;324016:197;;323731:272;323819:151;;;:::i;:::-;483557:3627;;323731:272;;414756:381;-1:-1:-1;414756:381:0;;;;416406:658;416458:600;;;;;;;;;;;;;;-1:-1:-1;;;;;416458:600:0;;;416406:658::o;416458:600::-;;;;;;;;;417828:365;417138:76;;417932:255;;;;;;417138:76;417932:255;417828:365::o;417932:255::-;;;;;;;470446:1032;;;;470561:19;470557:841;;470446:1032;471444:5;;;;;;:::i;:::-;471467:4;470446:1032;:::o;470557:841::-;441788:767;;;;;;;;;;;;;;;-1:-1:-1;;441788:767:0;;;;3175:74;;;;483991:2561;;;;;:::i;:::-;3269:73;3175:74;3269:73;470812:27;470808:201;;470557:841;52653:63;;;;;;441788:767;52653:63;;471076:13;471088:1;471071:317;471091:18;;;;;;470557:841;;;;471111:43;441788:767;;;;;;;;;;;-1:-1:-1;;441788:767:0;;;;;482832:42;;;;;;;;:::i;:::-;471258:37;471254:120;;471111:43;;;441788:767;471088:1;471111:43;52653:63;483557:3627;;471076:13;;;471254:120;471350:4;;:::i;470808:201::-;482832:42;;;;;:::i;:::-;470867:37;470863:128;;470808:201;;;;470863:128;42745:510;;;;;3175:74;42745:510;;;;;470579:1;42745:510;441788:767;42745:510;;;;3175:74;42745:510;;;;;;;;;;;;;;;;;;;;;54718:524;2042:10;;3459:42;2042:10;54847:35;54843:393;;54718:524::o;54843:393::-;2158:8;-1:-1:-1;;55094:132:0;;;;;-1:-1:-1;54718:524:0:o;483557:3627::-;;-1:-1:-1;483557:3627:0;;;:::o;:::-;-1:-1:-1;;;483557:3627:0;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;:::o;483991:2561::-;;;;484118:32;;;;;:::i;:::-;;;;484166:11;;;484173:4;484166:11;:::o;484114:2411::-;483557:3627;484198:56;;483557:3627;;484631:166;;;483557:3627;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;483557:3627:0;;-1:-1:-1;;;;;483557:3627:0;;360138:294;483557:3627;360515:22;483557:3627;;;;;:::i;:::-;435562:20;3459:42;2042:10;54398:47;483557:3627;;;;;;;;;;;;;;;;;360138:294;:::i;:::-;360515:22;;:::i;:::-;483557:3627;419816:67;;;:::i;:::-;419935:31;483557:3627;419935:31;;;;;;;;;:::i;:::-;10212:8;;10208:54;;420017:16;;;:::i;10208:54::-;10027:89;;;;;;484194:2331;483557:3627;484938:57;;;;;483557:3627;485017:54;2513:62;;483557:3627;;;485419:143;;483557:3627;;;;;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;-1:-1:-1;;;;;483557:3627:0;;;485577:389;;;435562:20;483557:3627;435562:20;390249:298;435562:20;-1:-1:-1;435562:20:0;;;;;;419816:67;435562:20;3459:42;2042:10;54398:47;390249:298;;:::i;:::-;384544:60;390809:3;384544:60;;419816:67;:::i;:::-;483557:3627;419935:31;;;;;384561:42;419935:31;;;;:::i;485577:389::-;435562:20;;;;;;;;3459:42;2042:10;54398:47;320114:292;203193:2;483557:3627;;;;;;203193:2;483557:3627;;;;;;;203193:2;483557:3627;;;;;;203193:2;483557:3627;;;;;;;384544:60;203249:3;384544:60;203286:19;;384544:60;203249:3;384544:60;203262:19;;384544:60;203249:3;384544:60;203233:24;;2513:62;;203228:143;;-1:-1:-1;203380:1552:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;203380:1552:0;;;483557:3627;203380:1552;;;;483557:3627;203380:1552;;;;;;;;;;;;;;483557:3627;203380:1552;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;483557:3627;203380:1552;;;;483557:3627;203380:1552;;;;;;;;;;;;;419816:67;;:::i;:::-;483557:3627;419935:31;;;;;309617:42;419935:31;;;;:::i;483557:3627::-;-1:-1:-1;;;;483557:3627:0;;;;;-1:-1:-1;483557:3627:0;484933:1592;486502:12;;;486509:5;486502:12;:::o;42657:600::-;;;;;42745:510;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;444087:1516;;-1:-1:-1;;;;;483557:3627:0;;;444723:17;-1:-1:-1;;;;;444723:17:0;;;483557:3627;;444742:21;;;;483557:3627;444890:31;;;444867:17;;2657:73;444862:93;;444984:27;;;:::i;:::-;445025:24;;;;445021:111;;86250:88;;;;;;;;;445275:197;86250:88;;;445341:9;;;;;:::i;:::-;445512:85;;;444087:1516::o;445275:197::-;445435:24;445382:79;445435:24;;;50372:73;;445382:79;;:::i;:::-;445275:197;;445021:111;445111:9;;;;:::i;444862:93::-;444938:7;;;;;:::o;444087:1516::-;;;;-1:-1:-1;;;;;483557:3627:0;;;-1:-1:-1;;;;;444723:17:0;;;483557:3627;;444742:21;;;483557:3627;444890:31;;;444867:17;;2657:73;444862:93;;444984:27;;;:::i;:::-;445025:24;;;;445021:111;;47077:87;86250:88;47077:87;;;;;;;;;86250:88;;;;;;;445275:197;86250:88;;;445341:9;;;;;:::i;445021:111::-;445111:9;;;;:::i;444862:93::-;444938:7;;;;;;:::o;483557:3627::-;;;;;;;;;;:::o;54458:254::-;2042:10;3459:42;54548:47;3459:42;;-1:-1:-1;;54618:8:0;483557:3627;54618:8;;483557:3627;;;;-1:-1:-1;54611:38:0;;:::o;54544:162::-;54687:8;;;54680:15;:::o;466318:2286::-;;;;483557:3627;466423:56;;483557:3627;;466604:73;;;483557:3627;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;427376:14;483557:3627;;;;;:::i;:::-;466779:167;483557:3627;;;;;;:::i;:::-;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;422692:34;;483557:3627;422692:34;:::i;:::-;483557:3627;;3459:42;2042:10;54398:47;427376:14;;:::i;466419:2158::-;483557:3627;468057:56;483557:3627;;468357:89;;483557:3627;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;341025:4;483557:3627;;344380:34;344376:103;;483557:3627;;341478:4;;;;;;;;345080:261;344532:97;-1:-1:-1;;341537:4:0;;;;:::i;:::-;483557:3627;;;;;;;:::i;:::-;341537:4;;;;:::i;:::-;;;483557:3627;341537:4;;;3459:42;2042:10;54398:47;349359:699;;483557:3627;349359:699;;;;;;483557:3627;349359:699;483557:3627;349359:699;;;;;;;;;;;;483557:3627;349359:699;;;;;344803:255;;;;;;341232:4;344803:255;;483557:3627;344803:255;;;;;;428642:16;:23;483557:3627;428642:23;;483557:3627;428679:11;;;:19;86062:9;428679:19;;428675:392;;468053:524;-1:-1:-1;;483557:3627:0;;;;-1:-1:-1;;;;;483557:3627:0;345080:261;:::i;:::-;;468593:4;466318:2286;:::o;428675:392::-;-1:-1:-1;;;;;86062:9:0;;;428922:82;483557:3627;86062:9;428933:58;86062:9;428922:120;86062:9;;483557:3627;;86062:9;483557:3627;417138:76;;;428933:58;;:::i;:::-;428922:82;:::i;:::-;:120;:::i;:::-;428675:392;;;;344376:103;9109:168;483557:3627;9109:168;9802:4;483557:3627;9109:168;;;;468053:524;468554:12;;483557:3627;468554:12;:::o;86615:530::-;86250:88;-1:-1:-1;;;;;483557:3627:0;;86250:88;;;483557:3627;;86816:67;;86687:456;86615:530::o;86687:456::-;87094:42;87015:66;;87094:42;;:::i;41441:423::-;;41552:310;;;;;;;;;;;;81644:1513;81727:1424;;;81644:1513;81727:1424;81644:1513;;;81727:1424;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81644:1513::o;81727:1424::-;;;;;;;;;;;;;;;;;;;78393:410;78473:324;78393:410;;;;;78473:324;;;;;78393:410::o;459291:276::-;;459435:33;483557:3627;;;;;;;;;;;;459291:276;483557:3627;;459419:49;459415:108;;482170:21;;;:::i;:::-;459532:28;;459291:276::o;459415:108::-;417601:128;;;;;;;;;;483557:3627;;;;;463327:173;;;;463819:114;;;;;;;;;463942:39;457639:77;;;463942:39;:::i;:::-;;463991:568;;;;;;;;;;;;;;;;417601:128;463991:568;;483557:3627;463327:173;463991:568;;;;;;;;;;463819:114;463991:568;;483557:3627;463991:568;;;;417601:128;459484:28;;:::o;483557:3627::-;;;;;;;;;;;;;;;;341478:4;;;;;;;;;;:::o;202766:2172::-;;;;;;;;;;203193:2;483557:3627;;;;;;203193:2;483557:3627;;;;;;;203193:2;483557:3627;;;;;;203193:2;483557:3627;;;;;;;384544:60;203249:3;384544:60;203286:19;;384544:60;203249:3;384544:60;203262:19;;384544:60;203249:3;384544:60;203233:24;;2513:62;;203228:143;;203380:1552;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;203380:1552:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;203380:1552:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;483557:3627;203380:1552;;;;;;;;;;;;;202766:2172::o;481660:267::-;483557:3627;;;;;481811:41;231050:42;481766:155;481660:267::o;481766:155::-;481903:6;:::i;458801:484::-;;;;;483557:3627;458992:49;;458988:232;;449699:42;;;470579:1;449699:42;:::i;458988:232::-;459101:45;483557:3627;459101:45;;;;;;483557:3627;;;;;;;;;;459876:74;483557:3627;459876:74;384544:60;;460007:2;384544:60;459995:19;;459964:15;;:26;2513:62;459959:281;;460410:79;;417138:76;483557:3627;417138:76;;457639:77;460558:39;457639:77;;;460558:39;:::i;:::-;460662:13;483557:3627;460662:27;483557:3627;;460692:17;460662:81;;483557:3627;461159:1196;;457767:81;461159:1196;;;;;;;;;;;;;483557:3627;461159:1196;;;;;;483557:3627;461159:1196;;;;;;;;;;;;;470579:1;461159:1196;;;;;;483557:3627;461159:1196;;;;470579:1;461159:1196;;483557:3627;461159:1196;;;;;483557:3627;;;461159:1196;-1:-1:-1;;;;;461159:1196:0;483557:3627;461159:1196;483557:3627;;461159:1196;470579:1;461159:1196;;;;;;;;;;;483557:3627;461159:1196;470579:1;483557:3627;461159:1196;483557:3627;462439:17;483557:3627;462597:171;;;;483557:3627;462597:171;;;;;417138:76;417312:109;;;417138:76;417312:109;483557:3627;462817:73;483557:3627;459198:11;:::o;461159:1196::-;;470579:1;461159:1196;;;;460662:81;483557:3627;458467:322;457906:80;470579:1;458467:322;458030:22;458467:322;;460662:13;483557:3627;458467:322;;483557:3627;458467:322;;470579:1;458467:322;;483557:3627;458467:322;470579:1;483557:3627;458467:322;460662:81;;;459959:281;460031:199;;470579:1;460031:199;483557:3627;460031:199;;;;458801:484;;;;;483557:3627;458992:49;;458988:232;;449699:42;;;:::i;458988:232::-;459101:45;;;483557:3627;459101:45;;;;;;483557:3627;;;;;;;;;;459876:74;483557:3627;459876:74;384544:60;;460007:2;384544:60;459995:19;;459964:15;;:26;2513:62;459959:281;;460410:79;;417138:76;483557:3627;417138:76;;457639:77;460558:39;457639:77;;;460558:39;:::i;78993:946::-;79088:845;;;78993:946;79088:845;78993:946;79088:845;;;;;;;;;;;;;;;;;;78993:946;:::o;91540:628::-;91658:504;;;91540:628;91658:504;91540:628;91658:504;;;;;;;;;;;;;;;;;91540:628;:::o;93847:275::-;93985:1;92295:703;;;93847:275;92295:703;;;483557:3627;92295:703;;;;;;;;;;;;;;;;;;;93985:1;92295:703;;;;93991:45;;93976:10;;2513:62;93971:145;;93847:275::o;93971:145::-;94061:10;93985:1;93738:97;;;;90912:622;91073:455;;;;90912:622;483557:3627;91073:455;;;;;;;;;;;;;;90912:622;:::o;94128:780::-;;;;;94236:666;;;;;;;;;;;;;;-1:-1:-1;;;;;94236:666:0;;;;;;;;;;;;;;;;;;;;;;;;94128:780::o;428434:639::-;;;428642:16;:23;;;;483557:3627;428679:11;;;:19;86062:9;428679:19;;428675:392;;428434:639;;;:::o;428675:392::-;-1:-1:-1;;;;;483557:3627:0;428718:19;428714:343;;428434:639;;:::o;428714:343::-;428922:120;86062:9;;;;428933:58;-1:-1:-1;;;;;428922:82:0;86062:9;;483557:3627;;86062:9;483557:3627;417138:76;;;428933:58;;:::i;345418:3726::-;;;;;-1:-1:-1;;;;;345657:38:0;;345653:107;;345770:18;;;345798:3217;341025:4;483557:3627;;345847:34;346174:369;;;;;;;;;345805:4;346174:369;;;;;;;;;;;;;;341025:4;346174:369;;;;483557:3627;;;-1:-1:-1;;;;;483557:3627:0;;-1:-1:-1;;;;;483557:3627:0;;346632:15;48506:137;;;;;;;;;346799:22;483557:3627;;;480108:25;;480104:1392;480108:25;;;480149:33;;;-1:-1:-1;;;;;480149:33:0;339430:953;480149:33;13729:42;480196:28;15101:66;480238:76;483557:3627;480104:1392;;350644:363;;;;339430:953;350644:363;;;339430:953;350644:363;48506:137;339430:953;350644:363;483557:3627;350644:363;;48506:137;350644:363;;;;;;;;;483557:3627;350644:363;;;339430:953;350644:363;483557:3627;73050:371;339430:953;73050:371;339430:953;73050:371;483557:3627;73050:371;;;;;;339430:953;73050:371;483557:3627;47641:87;;339430:953;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;339430:953:0;;;;;;;;;;;;;347065:4;;;47641:87;;347065:4;47641:87;339430:953;;;;;;;;;;;;;;;;;;417138:76;;;413077:1012;350644:363;413077:1012;;;;;;;;;;;;483557:3627;413077:1012;;;;;;;;;419935:31;;;;339430:953;419935:31;;;;;;;:::i;:::-;10212:8;;10208:54;;420017:16;;:::i;:::-;339430:953;483557:3627;;;347423:138;;483557:3627;;;;339430:953;;347423:138;;483557:3627;;;;347576:143;339430:953;347576:143;47264:87;;;;483557:3627;;347841:14;483557:3627;347841:14;;347837:99;;347953:31;348012:84;;;348149:22;348232:224;341025:4;348149:22;348232:224;;;;;;348473:34;348469:111;;348764:241;;;347065:4;348764:241;;;;346174:369;348764:241;;345798:3217;;;;;348012:84;348076:5;;;;;;;;;;349028:24;;;349024:114;;345418:3726;;:::o;349024:114::-;349117:9;;;;:::i;413077:1012::-;;483557:3627;413077:1012;339430:953;413077:1012;339430:953;413077:1012;;480104:1392;345805:4;480335:29;;345805:4;;480380:30;;;-1:-1:-1;;;;;480380:30:0;339430:953;480380:30;8672:42;480424:32;8757:66;480470:80;483557:3627;480331:1165;480104:1392;;480331:1165;13644:1;480571:27;;13644:1;;480614:35;;;-1:-1:-1;;;;;480614:35:0;339430:953;480614:35;12843:42;480663:28;15101:66;480705:76;483557:3627;480567:929;480104:1392;;480567:929;10536:2;480802:27;;10536:2;;480845:28;;;-1:-1:-1;;;;;480845:28:0;339430:953;480845:28;10350:42;480887:30;10433:66;480931:76;483557:3627;480798:698;480104:1392;;480798:698;8585:2;481028:20;;8585:2;;481064:28;;;-1:-1:-1;;;;;481064:28:0;339430:953;481064:28;8250:42;481106:23;8489:66;481143:72;483557:3627;481024:472;480104:1392;;481024:472;481236:20;;-1:-1:-1;481236:20:0;;;;-1:-1:-1;9802:4:0;481236:20;9802:4;;481272:28;-1:-1:-1;;;;;481272:28:0;;339430:953;481272:28;;;;406:42;481314:23;722:66;481351:76;483557:3627;481232:264;480104:1392;;429275:4114;;;;429933:3450;;;;483557:3627;429964:221;;430202:12;;;483557:3627;430198:61;;430295:15;;;483557:3627;430277:15;:33;430273:302;;434061:991;-1:-1:-1;430729:16:0;434061:991;430729:16;;;86062:9;417138:76;;430202:12;-1:-1:-1;;;;;86062:9:0;;483557:3627;430865:31;;483557:3627;434061:991;430295:15;434061:991;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3459:42;434061:991;;;;;429275:4114::o;430273:302::-;430330:231;-1:-1:-1;430330:231:0;430295:15;430330:231;;430202:12;430330:231;;;;429964:221;430003:168;-1:-1:-1;430003:168:0;;;;429933:3450;417138:76;-1:-1:-1;417138:76:0;;;;431808:1565;417138:76;;431808:1565;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;431808:1565:0;;;;;;;;;;;;;;;;;;;;;;;;;;;411445:42;431808:1565;;;;;429275:4114::o;483557:3627::-;;;;;;;:::i;:::-;-1:-1:-1;483557:3627:0;;;;;;;;;;;;:::o;:::-;;;;;;341537:4;;;;:::i;:::-;483557:3627;;;;;;;:::i;:::-;341537:4;;483557:3627;-1:-1:-1;483557:3627:0;;;;:::o;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;483557:3627:0;;;;;;;;;;;;;;;;;;;;;;:::o;43437:227::-;43491:171;;;;;;;;;;16005:3951;16276:2738;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;384544:60;19210:1;384544:60;19191:3;384544:60;1429;1604:3;483557:3627;;19216:1;384544:60;19239:711;;;;;16276:2738;19239:711;;;;;;;;19210:1;19239:711;;;;;;;;483557:3627;19173:2;483557:3627;19216:1;19239:711;;;;19216:1;19239:711;1604:3;19239:711;;;16276:2738;19239:711;;;16276:2738;19239:711;16276:2738;19239:711;16005:3951::o;372886:734::-;373035:1;373020:16;;;;373072:97;;;;483557:3627;373200:57;2657:73;;483557:3627;373272:8;;373268:67;;373344:270;;;;;;;;;;;;;;;;;372886:734::o;373268:67::-;-1:-1:-1;;;373296:28:0;:::o;117115:172::-;;-1:-1:-1;;117115:172:0;;116938:165;;;;;;;;;;;428642:16;108058:126;;;428642:16;117115:172;:::o;131873:239::-;108901:105;;;;;;132009:9;;132005:64;;121971:357;86062:9;121971:357;-1:-1:-1;;127129:1424:0;121971:357;;;;;;;;;;125409:235;;121971:357;;125409:235;;;322824:2;131873:239;:::o;132005:64::-;86062:9;50991:88;;;132034:24;:::o;131873:239::-;427997:16;108901:105;;;132009:9;;132005:64;;121971:357;86062:9;121971:357;-1:-1:-1;;127129:1424:0;121971:357;;;;;;;;;;125409:235;;121971:357;;125409:235;;;322824:2;131873:239;:::o;483557:3627::-;;;;:::o;:::-;-1:-1:-1;;;483557:3627:0;;;;;;;;210981:4177;;;;;;483557:3627;197527:143;;;;;;;483557:3627;189403:366;;;;;;;;;;;197527:143;189403:366;197897:34;211418:106;;;;;;197897:34;;:::i;:::-;483557:3627;;;;200037:82;;;;;198080:284;197527:143;198080:284;;;;;;;;;;;;;211776:64;212047:145;;;;;483557:3627;190369:92;200037:82;190369:92;;86142:42;190369:92;212202:2888;190369:92;;;212253:30;;-1:-1:-1;;;;;483557:3627:0;212277:4;212260:22;212253:30;:::i;:::-;198776:80;;86062:9;212892:21;212323:497;;;;;;322824:2;50991:88;483557:3627;;-1:-1:-1;;212323:497:0;;;;212202:2888;215122:4;;;;:::i;:::-;215137:14;210981:4177;:::o;212202:2888::-;-1:-1:-1;;;;;483557:3627:0;213004:4;212987:22;;213004:4;;213058:529;86062:9;-1:-1:-1;;213058:529:0;;;;;;;;;;;198776:80;;213004:4;80123:35;213004:4;190164:76;200037:82;190164:76;;80123:35;:::i;:::-;53844:73;;;;;322824:2;50991:88;483557:3627;;212202:2888;;212983:2097;213850:19;;;;;;;213843:27;213850:19;;;213843:27;:::i;:::-;213889:1177;;;;;;;;;;;;;;-1:-1:-1;;213889:1177:0;;;;;;;;;;;;;;;;;;;;;;;;212983:2097;212202:2888;;427779:649;;427997:23;;;483557:3627;428034:11;;;86062:9;428034:19;;428030:392;;427779:649;;:::o;428030:392::-;483557:3627;;;;86062:9;483557:3627;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;428288:58;417138:76;;;428288:58;;:::i;:::-;184423:248;-1:-1:-1;;184423:248:0;;116938:165;;;;;;;;;;;483557:3627;108058:126;427997:23;108058:126;428277:120;;:::i;321505:1107::-;;;;;;;86250:88;-1:-1:-1;;;;;483557:3627:0;;86250:88;;;483557:3627;;321851:10;;;;;;;321864;321851;;321864;:::i;321770:836::-;313935:663;;;;483557:3627;313935:663;483557:3627;321986:10;313935:663;;321986:10;;313935:663;;;;;-1:-1:-1;;;;;483557:3627:0;322064:4;322047:22;322064:4;;321986:10;;;;322195;321986;;322195;;:::i;:::-;313935:663;314724:615;;483557:3627;314724:615;313935:663;483557:3627;313935:663;321986:10;;;314724:615;;;;;483557:3627;314724:615;;;321770:836;321505:1107::o;322043:470::-;322442:56;483557:3627;;;;;;;;;;;:::i;:::-;321986:10;483557:3627;;322334:90;;;483557:3627;;;;:::i;:::-;;;;;:::i;322442:56::-;322043:470;;199567:393;198776:80;;;189855:65;;199687:25;199683:271;;199567:393;:::o;199683:271::-;199728:216;;;;;;;;206407:2029;;;;;;206595:86;;;;206713:1;384544:60;;206764:3;384544:60;206781:12;;206777:1368;;206407:2029;208155:253;;;;;;;;;206407:2029;:::o;206777:1368::-;198449:69;;;;200572:50;198449:69;;194676:627;;;;;;;;206777:1368;206850:11;;;;;206846:699;;206777:1368;483557:3627;207684:2;483557:3627;;;;199315:77;;;;;199478;-1:-1:-1;;;;;199478:77:0;;;;384544:60;207621:2;384544:60;483557:3627;200572:50;;:::i;:::-;483557:3627;;;;194676:627;198776:80;;190934:62;;;207758:377;;206777:1368;;;;;;207758:377;207816:305;;;;;;;;206846:699;198604:80;;;;;;189855:65;;206885:26;206881:96;;206846:699;-1:-1:-1;207009:1:0;206998:12;;207009:1;;198449:69;;207684:2;198449:69;;;;200037:82;;206994:537;206846:699;;;;206994:537;207684:2;207114:12;;207107:20;207114:12;;;207125:1;207114:12;207107:20;:::i;:::-;207240:121;;;;207418:18;200244:50;483557:3627;199315:77;;;;;-1:-1:-1;;;;;199478:77:0;;;;384544:60;207213:2;384544:60;483557:3627;200244:50;;:::i;:::-;200037:82;;206994:537;;206881:96;206945:12;;;;:::i;:::-;206881:96;;;194676:627;;;;;;;;;;;;;;;;;;;;208442:165;;208528:8;-1:-1:-1;208510:91:0;;208442:165::o;187035:361::-;;187135:1;187127:9;;187123:236;;187368:21;187035:361;:::o;187123:236::-;187152:197;;;;;;;;187402:371;;187500:1;187492:9;;187488:236;;483557:3627;187500:1;483557:3627;187402:371;:::o;187488:236::-;187517:197;;;;;;;;483557:3627;;;;;;;;;:::o;:::-;-1:-1:-1;;;;483557:3627:0;;;;;-1:-1:-1;483557:3627:0;219221:1112;;219323:1004;;;;;;;;;;;;;;;;;;;;;483557:3627;219323:1004;;;;;;;;;;;;;;;219221:1112::o;219323:1004::-;;;;;;;;;;412858:1237;483557:3627;417138:76;;413077:1012;;;;;;;;;;;;;;;412858:1237::o;:::-;483557:3627;417138:76;;413077:1012;;;;;;;;;;;-1:-1:-1;413077:1012:0;;;;;;412858:1237::o;:::-;417138:76;;;413077:1012;;;;;;;;;;;-1:-1:-1;;;;;;413077:1012:0;;;;;412858:1237::o;414101:359::-;414166:288;;;;;414101:359;:::o;414166:288::-;;;;;;;;;394231:885;;;;;;;-1:-1:-1;;;;;483557:3627:0;394507:4;394490:22;394507:4;;394532:15;;;;;394528:171;;394486:543;379078:610;;;;;-1:-1:-1;379078:610:0;;-1:-1:-1;379078:610:0;;395062:10;;379078:610;;;;;-1:-1:-1;379078:610:0;-1:-1:-1;379078:610:0;;394231:885;:::o;394528:171::-;394673:10;394661;;394673;;:::i;:::-;394528:171;;394486:543;483557:3627;394962:56;483557:3627;;;;;;;;:::i;:::-;394907:10;483557:3627;;394858:90;;;;483557:3627;;;;:::i;215294:1173::-;;;215396:1065;;;;;;;;;;;;;;;-1:-1:-1;;;215396:1065:0;;;;;;;;;;;;;;;;;;;;;;;;;215294:1173::o;364826:854::-;;;;;;;;365112:9;365089:10;;365112:9;:::i;:::-;-1:-1:-1;;;;;483557:3627:0;365153:4;365136:22;365153:4;;365089:10;;;365276;365089;;;365276;;:::i;:::-;230003:369;-1:-1:-1;230003:369:0;;-1:-1:-1;230003:369:0;;365089:10;;230003:369;;;;;-1:-1:-1;230003:369:0;364826:854;:::o;365132:486::-;365551:56;483557:3627;;;;;;;;;;;;;;;:::i;365551:56::-;365132:486;;227822:880;228273:423;;;227822:880;;;;;228273:423;;;;;;;;;;227822:880::o;229901:477::-;230003:369;;;229901:477;230003:369;229901:477;230003:369;;;;;;;;;;229901:477;:::o;465017:1295::-;;;;;3175:74;;472773:7149;;;;;:::i;:::-;3269:73;3175:74;3269:73;465204:1081;473001:4;;;465266:11;;;;465273:4;465266:11;:::o;465204:1081::-;465298:55;;483557:3627;465298:55;;483557:3627;;465408:36;3175:74;465408:36;;;;483557:3627;;;;;;;;;;465462:15;;;:26;465458:279;;465754:9;;;:20;465750:327;;465294:991;466301:4;465017:1295;:::o;465750:327::-;465794:269;483557:3627;465794:269;483557:3627;465794:269;465754:9;3175:74;465794:269;;;;465458:279;465508:215;483557:3627;465508:215;483557:3627;465508:215;;;;465294:991;466097:57;;-1:-1:-1;483557:3627:0;466097:57;483557:3627;;466206:24;483557:3627;466206:24;;;483557:3627;;;;;466206:24;483557:3627;;:::i;:::-;466206:24;;:::i;195499:1161::-;;195564:1090;;;;;;;;;195499:1161;;;:::o;195564:1090::-;;;;;;-1:-1:-1;;195564:1090:0;;;;;;;;;;;;195499:1161;;:::o;195564:1090::-;;;;;;;;428434:639::o;472773:7149::-;;;;;483557:3627;473218:46;;473214:6681;483557:3627;;;473546:99;;483557:3627;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;483557:3627:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;483557:3627:0;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;241985:11;422692:34;;;;:::i;:::-;483557:3627;;;240958:16;240880:242;-1:-1:-1;;;;;240958:16:0;;86062:9;483557:3627;;;;;;;:::i;:::-;;;240912:200;483557:3627;240912:200;;483557:3627;240912:200;483557:3627;240912:200;;483557:3627;;240912:200;;;363168:2;-1:-1:-1;;236232:248:0;;;;;;;;;;;;236119:367;240880:242;417138:76;241155:184;417138:76;-1:-1:-1;;;;;417138:76:0;;483557:3627;;;;;;:::i;:::-;;;;;;;241187:142;;483557:3627;;;241187:142;;483557:3627;;240912:200;241187:142;;363168:2;-1:-1:-1;;236232:248:0;;;;;;;;;;;;236119:367;241155:184;241546:4;241513:39;241546:4;241513:39;;:::i;:::-;241577:28;;;47077:87;;;;;;;322824:2;;;50991:88;483557:3627;;;241985:11;:::i;:::-;483557:3627;;;;;;;;:::i;:::-;;341537:4;;235517:92;483557:3627;;;;;;;;;;;;;240912:200;483557:3627;;;74754:48;483557:3627;;;240912:200;483557:3627;;:::i;:::-;235257:90;341537:4;;483557:3627;235257:90;;;;;;;;;;;483557:3627;;235517:92;;;74754:48;483557:3627;235517:92;;74754:48;483557:3627;74754:48;;;;;;;;;;;;;;;;483557:3627;74754:48;;;;;;;;;235517:92;-1:-1:-1;;235517:92:0;;;;;;:::i;:::-;424463:2129;;;;;;;;;;;483557:3627;424463:2129;;483557:3627;424463:2129;;240912:200;424463:2129;;;483557:3627;424463:2129;;;483557:3627;424463:2129;;;;483557:3627;424463:2129;;;;483557:3627;424463:2129;;;;;;;;;;;;;483557:3627;424463:2129;;;;;;;;;;483557:3627;424463:2129;;;;;;;;;;;;74754:48;424463:2129;;411445:42;424463:2129;;;;;457639:77;236635:404;;-1:-1:-1;236635:404:0;483557:3627;236635:404;483557:3627;236635:404;;483557:3627;236635:404;240912:200;-1:-1:-1;236635:404:0;;483557:3627;236635:404;457639:77;236635:404;;-1:-1:-1;236635:404:0;;-1:-1:-1;236635:404:0;479911:4;472773:7149;:::o;473214:6681::-;483557:3627;473767:52;;483557:3627;;473927:52;;483557:3627;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;342237:41;342233:110;;-1:-1:-1;;342485:269:0;;;;;;;;;;;80123:35;483557:3627;;;;;;;:::i;:::-;341232:4;341537;;;;483557:3627;341537:4;;;342934:224;;341232:4;342934:224;;;;342485:269;342934:224;;341232:4;342934:224;;;80123:35;;:::i;:::-;53844:73;;;;;;343438:39;483557:3627;;;;;;;;;;;;;-1:-1:-1;;;;;86062:9:0;483557:3627;343180:381;483557:3627;;;50991:88;;483557:3627;;343180:381;:::i;473763:6132::-;483557:3627;474066:52;;483557:3627;;474257:71;483557:3627;474257:71;;;483557:3627;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;335787:18;-1:-1:-1;336066:8:0;;336062:753;;474062:5833;332813:535;;-1:-1:-1;332813:535:0;483557:3627;-1:-1:-1;332813:535:0;;;;;;;;483557:3627;332813:535;;;;483557:3627;335545:12;;;335544:19;332813:535;;;;;;337164:6;332813:535;;;;483557:3627;332813:535;;;;;;336933:15;;;:34;;;;474062:5833;336929:160;;474062:5833;384544:60;;;;;335775:1;384544:60;;483557:3627;;322824:2;;;483557:3627;;337206:77;483557:3627;;;;322824:2;483557:3627;337307:24;;;;337303:133;;333733:1095;;-1:-1:-1;333733:1095:0;;;-1:-1:-1;;;;;333733:1095:0;;;;483557:3627;333733:1095;;;;483557:3627;333733:1095;;;;;;;;;;;;;483557:3627;333733:1095;483557:3627;333733:1095;;483557:3627;333733:1095;;;;;;483557:3627;333733:1095;;332813:535;333733:1095;;;;;;;471467:4;470446:1032;:::o;337303:133::-;337369:30;333474:140;337369:30;;;47077:87;;483557:3627;47077:87;333474:140;;:::i;:::-;337415:9;:::i;483557:3627::-;-1:-1:-1;;;;483557:3627:0;;332813:535;483557:3627;;-1:-1:-1;483557:3627:0;336929:160;384544:60;336997:37;;;337061:17;336997:37;;;;;:::i;337061:17::-;336929:160;;;;;;;;336933:34;384544:60;483557:3627;384544:60;;;;;335641:24;336933:34;;336062:753;86062:9;80152:4;;;80123:35;80152:4;80123:35;;:::i;:::-;53844:73;;;;;322824:2;483557:3627;336793:10;;;;;;:::i;:::-;336062:753;;;474062:5833;483557:3627;474436:48;;483557:3627;;474600:60;;483557:3627;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;474721:5;483557:3627;;;;;;:::i;:::-;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;474721:5;;:::i;474432:5463::-;483557:3627;474785:60;;483557:3627;;474981:62;483557:3627;474981:62;;;483557:3627;;;;;;;:::i;:::-;;;;;;;:::i;:::-;-1:-1:-1;;;;;483557:3627:0;;86142:42;475133:29;;483557:3627;;;;475195:60;;;;475203:21;475195:60;475273:24;;;475269:532;;475195:60;474781:5114;;;;;;471467:4;470446:1032;:::o;475269:532::-;86062:9;483557:3627;;;;;;;322824:2;;483557:3627;;;;;;322824:2;483557:3627;475562:13;;;47077:87;;;;;;475616:171;;;;;475675:7;;;;:::i;:::-;475269:532;;;;;;;;475616:171;-1:-1:-1;;;;;475730:38:0;483557:3627;;475730:38;;:::i;:::-;475616:171;;475195:60;80123:35;80152:4;80123:35;;:::i;:::-;53844:73;;;;;475195:60;;474781:5114;475821:52;-1:-1:-1;483557:3627:0;475821:52;;483557:3627;;476210:91;;;483557:3627;;;;;;;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;483557:3627:0;;;;;358880:266;483557:3627;359229:22;483557:3627;-1:-1:-1;;;;;483557:3627:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;358880:266;:::i;475817:4078::-;483557:3627;476442:53;;;483557:3627;476517:48;;;476442:53;;2513:62;;;483557:3627;476587:50;;2513:62;483557:3627;;;476945:84;;;483557:3627;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;-1:-1:-1;;;;;483557:3627:0;;;477044:568;;;388308:270;;483557:3627;388308:270;;;-1:-1:-1;388308:270:0;;;;;;;419816:67;388308:270;;:::i;477044:568::-;477239:373;;-1:-1:-1;477239:373:0;;;;296578:264;;;;:::i;:::-;289397:42;417138:76;;413077:1012;483557:3627;413077:1012;;;;;;;;;;-1:-1:-1;413077:1012:0;;;;;483557:3627;419935:31;;;;;289397:42;419935:31;;;;:::i;477239:373::-;318881:264;;;;;-1:-1:-1;318881:264:0;;;;;;:::i;:::-;419816:67;;:::i;476437:3458::-;477632:51;;;;;;483557:3627;477632:51;;477628:2267;483557:3627;;;477807:65;483557:3627;477807:65;;;483557:3627;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;80123:35;-1:-1:-1;;;;;259498:42:0;483557:3627;;;86062:9;483557:3627;;;:::i;:::-;;;477887:62;260942:14;47641:87;;;259202:42;47641:87;483557:3627;48506:137;;;;;;;;;;80152:4;;48506:137;;80123:35;:::i;:::-;53844:73;;;;;483557:3627;;;322824:2;50991:88;;261914:958;;;258313:435;-1:-1:-1;258313:435:0;483557:3627;-1:-1:-1;258313:435:0;;;;;;;;;;;;;;86062:9;258937:8;-1:-1:-1;258313:435:0;483557:3627;322824:2;;50991:88;262300:24;;;;262296:127;;257047:519;;;-1:-1:-1;483557:3627:0;257047:519;;;;;;;;;;;;;;;;;-1:-1:-1;257047:519:0;;471467:4;470446:1032;:::o;257047:519::-;483557:3627;257047:519;;;;-1:-1:-1;257047:519:0;;;;;261914:958;256437:520;;;;;;;;;;;-1:-1:-1;256437:520:0;483557:3627;-1:-1:-1;256437:520:0;;;;;;;;;-1:-1:-1;257793:433:0;;86062:9;258937:8;483557:3627;256437:520;;;;322824:2;483557:3627;257793:433;;;;;;;;;;;;;;;258937:8;-1:-1:-1;257793:433:0;322824:2;;50991:88;483557:3627;;262747:24;;;;262743:119;;261914:958;;;471467:4;470446:1032;:::o;477628:2267::-;483557:3627;477970:53;;483557:3627;;478294:83;483557:3627;478294:83;;;483557:3627;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;410415:8;;;;80152:4;;;410886:10;483557:3627;80152:4;;86062:9;-1:-1:-1;80152:4:0;80123:35;80152:4;;;;80123:35;;:::i;:::-;53844:73;;;;;322824:2;50991:88;410886:10;;;;:::i;:::-;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;:::i;:::-;341537:4;;;-1:-1:-1;;341537:4:0;;;;;;;407197:840;;;;;;;;;;;;;;483557:3627;407197:840;;;;;;;;;;;;;;;;;;;;;;;;;483557:3627;407197:840;;;;;;;;;;;;;;;;;;;;409645:323;;;;;;;;;;;;;409982:24;;;;409978:132;;477966:1929;;;;471467:4;470446:1032;:::o;409978:132::-;410044:29;406777:161;410044:29;47077:87;;483557:3627;47077:87;406777:161;;:::i;410411:682::-;410941:38;;;;;;;;:::i;:::-;408204:498;483557:3627;408204:498;;-1:-1:-1;408204:498:0;;;;;;;;;;;408866:9;;408889:1;483557:3627;408204:498;;;;483557:3627;408204:498;;;;;;;483557:3627;457639:77;;-1:-1:-1;457639:77:0;;483557:3627;;410411:682;;;477966:1929;478497:48;-1:-1:-1;483557:3627:0;478497:48;;483557:3627;;478817:139;;;483557:3627;;;;;;;;;;;;:::i;:::-;;-1:-1:-1;;483557:3627:0;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;285201:4;285169:38;285201:4;285169:38;;:::i;:::-;483557:3627;;285309:34;;;;47077:87;;;;;;;483557:3627;;;322824:2;50991:88;285553:32;;;;285549:144;;84800:913;;483557:3627;84800:913;;284148:42;483557:3627;84800:913;285201:4;483557:3627;84800:913;;;;;;483557:3627;-1:-1:-1;84800:913:0;;;;;;;;;483557:3627;84800:913;;;-1:-1:-1;84800:913:0;;;;;;483557:3627;84800:913;85727:18;;;85723:191;;478493:1402;417138:76;-1:-1:-1;;;;;417138:76:0;;281717:2134;483557:3627;281717:2134;;;;;;;;483557:3627;281717:2134;;285201:4;281717:2134;483557:3627;281717:2134;;483557:3627;281717:2134;483557:3627;281717:2134;;483557:3627;281717:2134;;;;;483557:3627;281717:2134;;483557:3627;281717:2134;;;;483557:3627;281717:2134;;483557:3627;281717:2134;483557:3627;281717:2134;;483557:3627;281717:2134;;;;;;;483557:3627;281717:2134;;;483557:3627;281717:2134;;483557:3627;281717:2134;;483557:3627;281717:2134;;;;;;;;;;;483557:3627;281717:2134;;;;;483557:3627;281717:2134;;;;;;;;;;;483557:3627;281717:2134;;;;;;;;;84800:913;281717:2134;;284148:42;281717:2134;;;;;457639:77;483557:3627;;;457639:77;;;284572:184;;-1:-1:-1;284572:184:0;;-1:-1:-1;284572:184:0;471467:4;470446:1032;:::o;85723:191::-;85761:83;;85723:191;85885:17;284148:42;85885:17;;:::i;:::-;85723:191;;;85761:83;85799:30;284148:42;85799:30;;:::i;:::-;85761:83;;84800:913;;;-1:-1:-1;84800:913:0;;;;;285549:144;86062:9;-1:-1:-1;;;;;86062:9:0;;;483557:3627;285664:17;:::i;478493:1402::-;483557:3627;479071:49;;483557:3627;;479260:68;;483557:3627;479260:68;;;483557:3627;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;286471:443;-1:-1:-1;286471:443:0;483557:3627;-1:-1:-1;;;;;483557:3627:0;;;;;;;;;;:::i;:::-;;;;287830:8;;;287826:316;;479067:828;288331:13;;;;483557:3627;;286471:443;;483557:3627;;47077:87;;287355:13;47077:87;483557:3627;286471:443;;;;;;;;;;;;;;-1:-1:-1;286471:443:0;288370:24;;;;288366:131;;479067:828;;;;471467:4;470446:1032;:::o;288366:131::-;288432:28;287020:138;288432:28;47077:87;;287083:17;47077:87;287020:138;;:::i;287826:316::-;86062:9;288120:10;80152:4;80123:35;80152:4;80123:35;;:::i;:::-;53844:73;;;;;322824:2;50991:88;288120:10;;:::i;:::-;287826:316;;;;;479067:828;479437:49;;;483557:3627;479437:49;;483557:3627;;479607:59;;483557:3627;479607:59;;;483557:3627;;;;;;;:::i;:::-;;;;;-1:-1:-1;;;;;483557:3627:0;;;;;;;;254572:10;483557:3627;;;;;:::i;:::-;;86062:9;483557:3627;;;;80152:4;483557:3627;80123:35;80152:4;80123:35;;:::i;:::-;53844:73;;;;;483557:3627;;;322824:2;50991:88;;;;254572:10;:::i;:::-;254593:388;;;246053:456;-1:-1:-1;246053:456:0;483557:3627;-1:-1:-1;246053:456:0;;;;;;;;;;;;;;-1:-1:-1;246053:456:0;483557:3627;246053:456;483557:3627;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;-1:-1:-1;244514:401:0;384544:60;245103:1;384544:60;483557:3627;;;;;;;:::i;:::-;;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;-1:-1:-1;244514:401:0;245415:48;483557:3627;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;;-1:-1:-1;244514:401:0;252573:20;322824:2;50991:88;483557:3627;;;;:::i;:::-;252803:17;252792:28;;252803:17;;245253:49;;483557:3627;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;-1:-1:-1;244514:401:0;;483557:3627;;;253010:22;;;;;483557:3627;;;;258937:8;483557:3627;;;;;;;;248779:27;483557:3627;;;322824:2;483557:3627;322824:2;;;50991:88;322824:2;248930:28;52168:89;;;;;;;;322824:2;;483557:3627;248996:58;483557:3627;;;322824:2;483557:3627;253006:325;483557:3627;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;244514:401:0;483557:3627;-1:-1:-1;246053:456:0;;244514:401;;;;;;;;;;;;258937:8;244514:401;;-1:-1:-1;244514:401:0;483557:3627;;322824:2;;50991:88;254704:24;;;;254700:134;;244318:99;;;;;;:::i;254700:134::-;483557:3627;-1:-1:-1;246053:456:0;;246788:46;;483557:3627;244514:401;;;;;;;;;;;;;-1:-1:-1;244514:401:0;384544:60;483557:3627;384544:60;483557:3627;;-1:-1:-1;;;;;483557:3627:0;254809:9;:::i;253006:325::-;258937:8;254012:26;;;253963:86;254012:26;;;;;483557:3627;;322824:2;483557:3627;253963:86;;;:::i;:::-;483557:3627;;;;;253006:325;;252788:734;253963:86;483557:3627;;;258937:8;483557:3627;;;;;;;:::i;:::-;253383:22;47077:87;;;;;;;254012:26;;;322824:2;483557:3627;253963:86;;:::i;:::-;483557:3627;;252788:734;;254593:388;244080:104;;;;;;:::i;479433:462::-;479764:49;;;483557:3627;479764:49;483557:3627;;452351:1895;;;-1:-1:-1;;452351:1895:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;454294:24;452351:1895;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;454294:24;:::i;:::-;454387:99;452351:1895;454387:99;;450336:4;454865:2;483557:3627;;;;;454888:9;-1:-1:-1;;483557:3627:0;455063:343;;;;;;;;452351:1895;455063:343;421129:130;;452351:1895;421129:130;455601:4;413077:1012;455601:4;413077:1012;454907:1348;;455063:343;452351:1895;455063:343;;452351:1895;455063:343;;;;;;;;;;;;452351:1895;455063:343;450336:4;455063:343;452351:1895;455063:343;;;;;;;;450336:4;455493:6;;;;455782:9;455601:4;417138:76;;413077:1012;452351:1895;413077:1012;;;;;;;;;;483557:3627;413077:1012;;;;;;;;;;421129:130;455601:4;;47077:87;;;;;;;421129:130;421268:237;;;;421295:16;;:::i;:::-;455545:305;;455878:30;-1:-1:-1;2513:62:0;455864:381;;454907:1348;;;455545:305;455830:5;;;;;;;;;;;;;;;471467:4;470446:1032;:::o;421268:237::-;483557:3627;413077:1012;414521:77;421268:237;;192935:1486;;;;193060:1355;192935:1486;-1:-1:-1;;;;;193060:1355:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;192935:1486::o;193060:1355::-;;;;;;;;;;;;;-1:-1:-1;193060:1355:0;;;;;278477:1886;;;;-1:-1:-1;;;;;483557:3627:0;;418435:26;411445:42;418435:26;;3459:42;429188:35;;2513:62;284148:42;284409:25;;2513:62;278601:78;;-1:-1:-1;;;;;;;483557:3627:0;;;86142:42;278771:33;;86142:42;;278857:21;;;86062:9;278857:21;;322824:2;50991:88;483557:3627;;;278934:16;278930:510;278934:11;;;278974;;278970:39;;-1:-1:-1;279051:36:0;;;;;;;;;:::i;:::-;10212:8;;10208:54;;279154:7;:::o;278970:39::-;278994:15;-1:-1:-1;278994:15:0;;-1:-1:-1;278994:15:0;278930:510;341478:4;;;279214:2;341478:4;;;;;;;483557:3627;;-1:-1:-1;279199:113:0;;279329:97;-1:-1:-1;279329:97:0;279214:2;279329:97;;;;;;278767:1353;280153:38;;;;;;;;;;:::i;:::-;10212:8;;10208:54;;483557:3627;280285:22;:47;;;;278767:1353;280281:75;;;278477:1886::o;280281:75::-;280341:15;-1:-1:-1;280341:15:0;;-1:-1:-1;280341:15:0;280285:47;280311:16;;;:21;280285:47;;;278767:1353;279460:32;;;;;;;;;279456:664;279460:32;;;279554:11;;;279550:39;;-1:-1:-1;279456:664:0;;;278767:1353;;279456:664;80123:35;80152:4;;;;;;80123:35;;:::i;:::-;53844:73;;;;;;-1:-1:-1;;184423:248:0;53844:73;116938:165;;;;;;;;;;;-1:-1:-1;108058:126:0;;;279701:66;;:::i;:::-;108058:126;341478:4;;;;;;;483557:3627;;-1:-1:-1;279782:105:0;;279900:90;;-1:-1:-1;279900:90:0;;108058:126;279900:90;;;;;;280007:26;280003:107;;279456:664;;;;278767:1353;;280003:107;280088:6;;;:::i;:::-;280003:107;;;;;84679:1241;84800:913;;;;;;;;;;;;;;;-1:-1:-1;84800:913:0;;;;;;;;;;;;;-1:-1:-1;84800:913:0;;;;85727:18;;85723:191;;84679:1241;;;:::o;85723:191::-;85885:17;85765:14;85761:83;;85885:17;:::i;:::-;84679:1241::o;85761:83::-;85799:30;;;;:::i;:::-;85885:17;:::i;84800:913::-;;;-1:-1:-1;84800:913:0;;;;;201089:1517;;;;;;;;;;201447:2;483557:3627;;;;;;201447:2;483557:3627;;;;;;;201447:2;483557:3627;;;;;;201447:2;483557:3627;;;;;;;384544:60;201519:3;384544:60;201556:19;;384544:60;201519:3;384544:60;201532:19;;384544:60;201519:3;384544:60;201503:24;;86062:9;201487:11;;2513:62;;;201482:159;;201650:950;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;483557:3627;201650:950;;;;;;;;;;;;;;;;;;;;201089:1517::o;:::-;;;;;;;;;;201447:2;483557:3627;;;;;;201447:2;483557:3627;;;;;;;201447:2;483557:3627;;;;;;201447:2;483557:3627;;;;;;;384544:60;201519:3;384544:60;201556:19;;384544:60;201519:3;384544:60;201532:19;;384544:60;201519:3;384544:60;201503:24;;86062:9;201487:11;;2513:62;;;201482:159;;201650:950;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;483557:3627;201650:950;;;;;;;;;;;;;;;;;;;;201089:1517::o;83163:1510::-;83245:1422;;-1:-1:-1;83163:1510:0;;83245:1422;83163:1510;83245:1422;;;;;;;;;;;;;;;;;;;-1:-1:-1;83245:1422:0;;;;;;;-1:-1:-1;83245:1422:0;;83163:1510::o;83245:1422::-;;-1:-1:-1;83245:1422:0;;;;83163:1510;83245:1422;;;83163:1510;;83245:1422;83163:1510;83245:1422;;184423:248;;83245:1422;;;;;;;;;;;;;;;;;;;;;;;;;;;83163:1510::o;243182:766::-;243335:607;243182:766;243335:607;243182:766;;243335:607;243182:766;243335:607;;;483557:3627;243335:607;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;243182:766;:::o;:::-;243335:607;243182:766;243335:607;243182:766;;243335:607;243182:766;243335:607;;;483557:3627;243335:607;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;243182:766;:::o;48936:740::-;49287:387;;;48936:740;49287:387;48936:740;49287:387;;;;;;;;;;;;;;;;;;;48936:740::o;249577:1572::-;258937:8;483557:3627;;;;249577:1572;322824:2;;483557:3627;;;322824:2;;;;50991:88;;;483557:3627;;322824:2;;483557:3627;;250240:11;;;;;-1:-1:-1;483557:3627:0;;250048:4;;258937:8;;250236:183;322824:2;;;;483557:3627;322824:2;;;483557:3627;250597:27;250048:4;483557:3627;;;;247370:5;;247389:98;247396:5;;;;;;322824:2;258937:8;322824:2;;;;250048:4;322824:2;250761:17;250792:139;;;;483557:3627;250792:139;322824:2;52168:89;;;;;;;;;249577:1572;:::o;250792:139::-;483557:3627;;250792:139;;247389:98;247421:5;-1:-1:-1;50991:88:0;;;483557:3627;;250048:4;483557:3627;247389:98;;250236:183;483557:3627;;;;258937:8;-1:-1:-1;250236:183:0;;;;;;297887:1355;86250:88;-1:-1:-1;;;;;483557:3627:0;;86250:88;;;483557:3627;;298071:10;298084;298071;;298084;:::i;297990:1246::-;298282:475;;;;;;;;;;;;;;;;;;;;;;;;298840:10;417138:76;;413077:1012;86250:88;413077:1012;;;;;;;;;298840:10;483557:3627;298840:10;;413077:1012;298840:10;413077:1012;;;419935:31;;;;;298840:10;;419935:31;;;;:::i;:::-;10212:8;;10208:54;;420017:16;;:::i;:::-;419935:31;298932:294;;297990:1246;297887:1355::o","linkReferences":{},"immutableReferences":{"21447":[{"start":10586,"length":32}]}}}}}}},"signatures":{"function":[{"signature":"balanceOf(address)","signatureHash4":"0x70a08231","signatureHash32":"0x70a08231b98ef4ca268c9cc3f6b4590e4bfec28280db06bb5d45e689f2a360be"},{"signature":"execute((address,address,uint256),bytes[],bytes32)","signatureHash4":"0x1fff991f","signatureHash32":"0x1fff991faa603c844d6517981ebd5c1bf570207a7336f86a76e28bf5e5942568"},{"signature":"executeWithPermit((address,address,uint256),bytes[],bytes32,bytes)","signatureHash4":"0x06b8524c","signatureHash32":"0x06b8524caa3a15c14cef13dc4a6bdd033d7b6ee7f00c4ba03ee8137cf5d3a7e8"}],"event":[{"signature":"GitCommit(bytes20)","signatureHash4":"0x16fbd3a7","signatureHash32":"0x16fbd3a71aa6d159973eb9ff1e1199f9fe242767e6f30ac662a492f92ac70411"}],"error":[{"signature":"InvalidOffset()","signatureHash4":"0x01da1572","signatureHash32":"0x01da1572466ade17b5659e13c05951ba7b575203021b7c5dabe44a40736dde73"},{"signature":"InvalidTarget()","signatureHash4":"0x82d5d76a","signatureHash32":"0x82d5d76a554b1226e0bd53ae5121b9d30262dd775be75ba7d4bd87ba04ede349"}]},"proxyResolution":{"isProxy":false,"proxyType":null,"implementations":[]},"match":"match","chainId":"1","address":"0xaddC26a3854feaBFd20d6BF658254088D83a425A"}