Skip to content

Instantly share code, notes, and snippets.

@junhoyeo
Created March 8, 2024 20:12
Show Gist options
  • Select an option

  • Save junhoyeo/8f2ad980340214c760faac50e9bbfa28 to your computer and use it in GitHub Desktop.

Select an option

Save junhoyeo/8f2ad980340214c760faac50e9bbfa28 to your computer and use it in GitHub Desktop.
// Decompiled by library.dedaub.com
// 2024.03.03 03:26 UTC
// Compiled using the solidity compiler version 0.8.23
// Data structures and variables inferred from the use of storage instructions
uint256 _getCirculatingSupply; // STORAGE[0x1]
uint256 stor_2; // STORAGE[0x2]
uint256 stor_0_0_2; // STORAGE[0x0] bytes 0 to 2
mapping (uint256 => struct_1412) map_3; // STORAGE[0x3]
uint256 stor_4; // STORAGE[0x4]
uint256 _borrow; // STORAGE[0x5]
mapping (uint256 => struct_1413) map_6; // STORAGE[0x6]
uint256 stor_0_3_5; // STORAGE[0x0] bytes 3 to 5
struct struct_1412 { uint256 field0; uint256 field1; uint256 field2; };
struct struct_1413 { uint256 field0; uint256 field1; uint256 field2; uint256 field3; uint256 field4; };
// Events
Borrow(address, uint256, uint256, uint256);
Repay(address, uint256, uint256);
function 0x3b47ef56() public nonPayable {
require(msg.data.length + ~3 >= 0);
return address(0x42acfd8f410f5c19f24e3cf703acc7f637390be9);
}
function 0x38570026() public nonPayable {
require(msg.data.length + ~3 >= 0);
return stor_0_0_2;
}
function getCirculatingSupply() public nonPayable {
require(msg.data.length + ~3 >= 0);
v0 = 0x2419();
v1, v2 = 0x290d(v0);
v3 = 0x2494();
v4, v5 = 0x290d(v3);
v6 = 0x2528();
v7, v8 = 0x290d(v6);
require(v1 <= v1 + v4, Panic(17)); // arithmetic overflow or underflow
require(v1 + v4 <= v1 + v4 + v7, Panic(17)); // arithmetic overflow or underflow
v9 = v10 = 32;
v11, /* uint256 */ v12 = address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c).totalSupply().gas(msg.gas);
require(v11, MEM[64], RETURNDATASIZE());
if (v11) {
if (v10 > RETURNDATASIZE()) {
v9 = v13 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v9 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v9 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v9 - MEM[64] >= v10);
}
require(v12 <= v12 + _getCirculatingSupply, Panic(17)); // arithmetic overflow or underflow
require(v12 + _getCirculatingSupply - (v1 + v4 + v7) <= v12 + _getCirculatingSupply, Panic(17)); // arithmetic overflow or underflow
v14, /* uint256 */ v12 = address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c).balanceOf(0).gas(msg.gas);
require(v14, MEM[64], RETURNDATASIZE());
if (v14) {
if (v10 > RETURNDATASIZE()) {
v9 = v15 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v9 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v9 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v9 - MEM[64] >= v10);
}
require(v12 + _getCirculatingSupply - (v1 + v4 + v7) - v12 <= v12 + _getCirculatingSupply - (v1 + v4 + v7), Panic(17)); // arithmetic overflow or underflow
return v12 + _getCirculatingSupply - (v1 + v4 + v7) - v12;
}
function getFloorPrice() public nonPayable {
require(msg.data.length + ~3 >= 0);
v0 = 0x2278();
return v0;
}
function 0x22b164f4() public nonPayable {
require(msg.data.length + ~3 >= 0);
return _getCirculatingSupply;
}
function repay(address borrower, uint256 amount) public nonPayable {
require(~3 + msg.data.length >= 64);
v0 = v1 = 4673;
v2 = 0x260e();
0x293c();
v3 = 0x18a2(amount);
v4 = v5 = 32;
v0 = v3.word0 + v3.word1;
require(v3.word0 <= v0, Panic(17)); // arithmetic overflow or underflow
require(v3.word0);
if (v0 >= v1) {
}
v6 = v7 = 2;
v8 = (v7 - v0 / (v0 & borrower - v0) * (3 * (v0 / (v0 & borrower - v0)) ^ v7)) * (3 * (v0 / (v0 & borrower - v0)) ^ v7);
v9 = (v7 - v0 / (v0 & borrower - v0) * ((v7 - v0 / (v0 & borrower - v0) * v8) * v8)) * ((v7 - v0 / (v0 & borrower - v0) * v8) * v8);
v10 = (v7 - v0 / (v0 & borrower - v0) * ((v7 - v0 / (v0 & borrower - v0) * v9) * v9)) * ((v7 - v0 / (v0 & borrower - v0) * v9) * v9);
if (1) {
if (v3.word2 * v0 % ~0 == v3.word2 * v0 + (v3.word2 * v0 % ~0 < v3.word2 * v0)) {
if (!v0) {
MEM[borrower] = 0xae47f702;
revert(28, 4);
} else {
v11 = v12 = v3.word2 * v0 / v0;
v13 = this.code.size;
}
} else if (v0 <= v3.word2 * v0 % ~0 - (v3.word2 * v0 + (v3.word2 * v0 % ~0 < v3.word2 * v0))) {
MEM[borrower] = 0xae47f702;
revert(28, 4);
} else {
v11 = v14 = ((v3.word2 * v0 % ~0 - (v3.word2 * v0 + (v3.word2 * v0 % ~0 < v3.word2 * v0)) - (v3.word2 * v0 % v0 > v3.word2 * v0)) * ((borrower - (v0 & borrower - v0)) / (v0 & borrower - v0) + 1) | (v3.word2 * v0 - v3.word2 * v0 % v0) / (v0 & borrower - v0)) * ((v7 - v0 / (v0 & borrower - v0) * v10) * v10);
v15 = this.code.size;
}
}
v16 = v17 = 0x12c57;
if (0 == v0 >= v3.word1) {
require(v3.word1 - v0 <= v3.word1, Panic(17)); // arithmetic overflow or underflow
v3.word1 = v3.word1 - v0;
v18 = v19 = address(amount);
v20 = v21 = STORAGE[v22];
} else {
v18 = v0 - v3.word1;
require(v18 <= v0, Panic(17)); // arithmetic overflow or underflow
v3.word1 = borrower;
require(v3.word0 - v18 <= v3.word0, Panic(17)); // arithmetic overflow or underflow
v3.word0 = v3.word0 - v18;
require(v3.word2 - v11 <= v3.word2, Panic(17)); // arithmetic overflow or underflow
v3.word2 = v3.word2 - v11;
v23 = uint160.max;
v24 = address(amount);
MEM[borrower] = v24;
MEM[v5] = 6;
STORAGE[keccak256(MEM[borrower:borrower + 64])] = v3.word0;
STORAGE[keccak256(MEM[borrower:borrower + 64]) + 1] = v3.word1;
STORAGE[keccak256(MEM[borrower:borrower + 64]) + v7] = v3.word2;
STORAGE[keccak256(MEM[borrower:borrower + 64]) + 3] = v3.word3;
STORAGE[keccak256(MEM[borrower:borrower + 64]) + 4] = v3.word4;
require(!((MEM[64] + 96 > uint64.max) | (MEM[64] + 96 < MEM[64])), Panic(65)); // failed memory allocation (too much memory)
MEM[MEM[64]] = map_3[v3.word3].field0;
require(map_3[v3.word3].field0 - v18 <= map_3[v3.word3].field0, Panic(17)); // arithmetic overflow or underflow
require(map_3[v3.word3].field1 - v11 <= map_3[v3.word3].field1, Panic(17)); // arithmetic overflow or underflow
map_3[v3.word3].field0 = map_3[v3.word3].field0 - v18;
map_3[v3.word3].field1 = map_3[v3.word3].field1 - v11;
map_3[v3.word3].field2 = map_3[v3.word3].field2;
v20 = v25 = stor_2;
}
require(v20 - v18 <= v20, Panic(17)); // arithmetic overflow or underflow
STORAGE[v6] = v20 - v18;
require(_getCirculatingSupply - v11 <= _getCirculatingSupply, Panic(17)); // arithmetic overflow or underflow
_getCirculatingSupply = _getCirculatingSupply - v11;
v26, /* bool */ v27 = (0x4300000000000000000000000000000000000004 & v23).transferFrom(msg.sender, address(this), v0).value(v11).gas(msg.gas);
require(v26, MEM[64], RETURNDATASIZE());
if (v26) {
if (v5 > RETURNDATASIZE()) {
v4 = v28 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v4 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v4 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + (~0x1f & v4 + 31);
require(MEM[64] + v4 - MEM[64] >= v5, v11, v11);
require(!(v27 - bool(v27)));
}
v29, /* bool */ v30 = (0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c & v23).transfer(address(v31), v11).value(v11).gas(msg.gas);
require(v29, MEM[64], RETURNDATASIZE());
if (v29) {
if (v5 > RETURNDATASIZE()) {
v4 = v32 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v4 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v4 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v4 - MEM[64] >= v5, v11, v11);
require(!(v30 - bool(v30)));
}
v33 = 0x2419();
v34, v35, v36 = 0x3552(v33, v0);
emit Repay(v24, v0, v11);
return v11;
}
function 0x1303(uint256 varg0, struct(5) varg1, uint256 varg2, uint256 varg3, uint256 varg4, uint256 varg5, uint256 varg6, uint256 varg7, uint256 varg8, uint256 varg9, uint256 varg10) private {
require(varg1.word0 - varg3 <= varg1.word0, Panic(17)); // arithmetic overflow or underflow
varg1.word0 = varg1.word0 - varg3;
require(MEM[varg6] - v0 <= MEM[varg6], Panic(17)); // arithmetic overflow or underflow
MEM[varg6] = MEM[varg6] - v0;
MEM[varg7] = address(varg8);
MEM[varg10] = 6;
STORAGE[keccak256(MEM[v1303arg0x7:v1303arg0x7 + 64])] = varg1.word0;
STORAGE[keccak256(MEM[v1303arg0x7:v1303arg0x7 + 64]) + 1] = MEM[varg0];
STORAGE[keccak256(MEM[v1303arg0x7:v1303arg0x7 + 64]) + varg5] = MEM[varg6];
STORAGE[keccak256(MEM[v1303arg0x7:v1303arg0x7 + 64]) + 3] = varg1.word3;
STORAGE[keccak256(MEM[v1303arg0x7:v1303arg0x7 + 64]) + 4] = varg1.word4;
require(!((MEM[64] + 96 > uint64.max) | (MEM[64] + 96 < MEM[64])), Panic(65)); // failed memory allocation (too much memory)
MEM[MEM[64]] = map_3[varg1.word3].field0;
require(map_3[varg1.word3].field0 - varg3 <= map_3[varg1.word3].field0, Panic(17)); // arithmetic overflow or underflow
require(map_3[varg1.word3].field1 - v0 <= map_3[varg1.word3].field1, Panic(17)); // arithmetic overflow or underflow
map_3[varg1.word3].field0 = map_3[varg1.word3].field0 - varg3;
map_3[varg1.word3].field1 = map_3[varg1.word3].field1 - v0;
map_3[varg1.word3].field2 = map_3[varg1.word3].field2;
return varg3, varg4, varg5, uint160.max, varg7, varg8, varg9, address(varg8), v0;
}
function 0x1740e153() public nonPayable {
require(msg.data.length + ~3 >= 0);
return 6000;
}
function pool() public nonPayable {
require(msg.data.length + ~3 >= 0);
return address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00);
}
function shift() public nonPayable {
require(msg.data.length + ~3 >= 0);
v0, v1, v2, v3 = 0x1ac3();
return bool(v0);
}
function 0x11d7b7ff() public nonPayable {
require(msg.data.length + ~3 >= 0);
return 0x68d3b1390934;
}
function canShift() public nonPayable {
require(msg.data.length + ~3 >= 0);
v0 = 0x19ef();
return bool(v0);
}
function 0x0a87c66a() public nonPayable {
require(msg.data.length + ~3 >= 0);
return stor_2;
}
function 0x093215ff() public nonPayable {
require(msg.data.length + ~3 >= 0);
return 1000;
}
function 0x084b0a97(address varg0) public nonPayable {
require(~3 + msg.data.length >= 32);
v0 = 0x18a2(varg0);
return v0.word0, v0.word1, v0.word2, v0.word3, v0.word4;
}
function 0x07ed68dd() public nonPayable {
require(msg.data.length + ~3 >= 0);
0x293c();
0x2a1d();
return ;
}
function 0x078ddea6(uint256 varg0) public nonPayable {
require(~3 + msg.data.length >= 32);
return map_3[varg0].field0, map_3[varg0].field1, map_3[varg0].field2;
}
function 0x01865b46() public nonPayable {
require(msg.data.length + ~3 >= 0);
return stor_0_3_5;
}
function 0x18a2(address varg0) private {
require(!((MEM[64] + 160 > uint64.max) | (MEM[64] + 160 < MEM[64])), Panic(65)); // failed memory allocation (too much memory)
MEM[MEM[64]] = 0;
MEM[MEM[64] + 32] = 0;
MEM[MEM[64] + 64] = 0;
MEM[MEM[64] + 96] = 0;
MEM[MEM[64] + 128] = 0;
v0 = varg0;
require(!((MEM[64] + 160 > uint64.max) | (MEM[64] + 160 < MEM[64])), Panic(65)); // failed memory allocation (too much memory)
MEM[MEM[64]] = map_6[v0].field0;
MEM[MEM[64] + 32] = map_6[v0].field1;
MEM[MEM[64] + 64] = map_6[v0].field2;
MEM[MEM[64] + 96] = map_6[v0].field3;
MEM[MEM[64] + 128] = map_6[v0].field4;
v1 = v2 = !map_6[v0].field0;
v1 = v3 = bool(map_6[v0].field0);
if (v3) {
if (v3) {
v4 = 0x28e2(block.timestamp);
v1 = v5 = v4 > map_6[v0].field3;
v6 = this.code.size;
}
v7 = this.code.size;
}
if (!v1) {
v8 = new struct(5);
require(!((v8 + 160 > uint64.max) | (v8 + 160 < v8)), Panic(65)); // failed memory allocation (too much memory)
v8.word0 = map_6[v0].field0;
v8.word1 = map_6[v0].field1;
v8.word2 = map_6[v0].field2;
v8.word3 = map_6[v0].field3;
v8.word4 = map_6[v0].field4;
return v8;
} else {
v9 = new struct(5);
require(!((v9 + 160 > uint64.max) | (v9 + 160 < v9)), Panic(65)); // failed memory allocation (too much memory)
v9.word0 = 0;
v9.word1 = 0;
v9.word2 = 0;
v9.word3 = 0;
v9.word4 = 0;
return v9;
}
}
function 0x19ef() private {
v0, v1 = 0x2b09();
require(!((600 + stor_0_3_5 < ~int24.max) | (600 + stor_0_3_5 > int24.max)), Panic(17)); // arithmetic overflow or underflow
if (int24(v0) > int24(600 + stor_0_3_5)) {
v2 = 0x2528();
return int24(v2.word2) > int24(v0);
} else {
return int24(v0) > int24(600 + stor_0_3_5);
}
}
function 0x1ac3() private {
v0 = 0x19ef();
v1 = v2 = 0;
if (!v0) {
return v2;
} else {
v1 = v3, v4 = 0x2b09();
v5 = 0x2494();
v6, v7, v8, v9 = 0x2bf2(v5);
v10 = 0x2528();
v11, v12, v13, v14 = 0x2bf2(v10);
v15, v1 = address(0x4300000000000000000000000000000000000004).balanceOf(this).gas(msg.gas);
require(v15, MEM[64], RETURNDATASIZE());
if (v15) {
v16 = v17 = 32;
if (32 > RETURNDATASIZE()) {
v16 = v18 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v16 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v16 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v16 - MEM[64] >= 32, v2, v2);
}
v19 = 0x2419();
v20, v21, v22, v23 = 0x2bf2(v19);
v24, v1 = address(0x4300000000000000000000000000000000000004).balanceOf(this).gas(msg.gas);
require(v24, MEM[64], RETURNDATASIZE());
if (v24) {
v25 = v26 = 32;
if (32 > RETURNDATASIZE()) {
v25 = v27 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v25 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v25 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v25 - MEM[64] >= 32, v2, v2);
}
require(v1 * !(10 ** 18 * (v1 > 0x12725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f21)));
v28 = v1 * 10 ** 18 / v1;
v29, v1 = address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c).totalSupply().gas(msg.gas);
require(v29, MEM[64], RETURNDATASIZE());
if (v29) {
v30 = v31 = 32;
if (32 > RETURNDATASIZE()) {
v30 = v32 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v30 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v30 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v30 - MEM[64] >= 32, v2, v2);
}
require(v1 <= v1 + _getCirculatingSupply, Panic(17)); // arithmetic overflow or underflow
v33, v1 = address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c).balanceOf(this).gas(msg.gas);
require(v33, MEM[64], RETURNDATASIZE());
if (v33) {
v34 = v35 = 32;
if (32 > RETURNDATASIZE()) {
v34 = v36 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v34 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v34 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v34 - MEM[64] >= 32, v2, v2);
}
v1 = v1 + _getCirculatingSupply - v1;
require(v1 <= v1 + _getCirculatingSupply, Panic(17)); // arithmetic overflow or underflow
require(10000 * !(16000 * (v28 > 0x4189374bc6a7ef9db22d0e5604189374bc6a7ef9db22d0e5604189374bc6a)));
v28 = v37 = v28 * 16000 / 10000;
if (v37 > 0xd02ab486cedc0000) {
}
require(v28 > v28, v2, v2);
require(v28 * !(10 ** 18 * (v1 > 0x12725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f21)));
v1 = v38 = v1 * 10 ** 18 / v28;
v1 = v39 = v1 - v38;
require(v39 <= v1, Panic(17)); // arithmetic overflow or underflow
v40 = v41 = stor_0_0_2;
v1 = v42 = 7380;
require(v39 <= v39 + stor_2, Panic(17)); // arithmetic overflow or underflow
v43 = v44 = 0x2ddb(v39 + stor_2, v38, v41);
require(v44 - v4 <= v44, Panic(17)); // arithmetic overflow or underflow
if (!(!(v44 - v4) | ((v44 - v4) * 1000 / (v44 - v4) == 1000))) {
MEM[v38] = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
MEM[4] = 17;
revert(v38, 36);
} else {
v45, v1, v1 = address(0xc056b34f2afa70ee1351e3659dfbd2097765275).getFeeData().gas(msg.gas);
require(v45, MEM[64], RETURNDATASIZE());
if (v45) {
v46 = v47 = 64;
if (64 > RETURNDATASIZE()) {
v46 = v48 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v46 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v46 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v46 - MEM[64] >= 64, v38, v38);
require(!0x256a493500000000000000000000000000000000000000000000000000000000, v38, v38);
v49 = this.code.size;
}
v50 = v51 = !v1;
if (bool(v1)) {
v50 = v52 = address(0x42acfd8f410f5c19f24e3cf703acc7f637390be9) == address(v1);
}
if (!v50) {
if (!(10000 * !(v1 * ((v44 - v4) * 1000 / 10000 > ~0 / v1)))) {
MEM[v38] = 0xad251c27;
revert(28, 4);
} else {
require((address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c)).code.size, v38, v38);
v53 = address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c).mint(address(v1), v1 * ((v44 - v4) * 1000 / 10000) / 10000).value(v38).gas(msg.gas);
require(v53, MEM[64], RETURNDATASIZE());
if (v53) {
require(MEM[64] <= uint64.max, Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64];
}
require((v44 - v4) * 1000 / 10000 - v1 * ((v44 - v4) * 1000 / 10000) / 10000 <= (v44 - v4) * 1000 / 10000, Panic(17)); // arithmetic overflow or underflow
require((address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c)).code.size, v38, v38);
v54 = address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c).mint(address(0x42acfd8f410f5c19f24e3cf703acc7f637390be9), (v44 - v4) * 1000 / 10000 - v1 * ((v44 - v4) * 1000 / 10000) / 10000).value(v38).gas(msg.gas);
require(v54, MEM[64], RETURNDATASIZE());
if (v54) {
require(MEM[64] <= uint64.max, Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64];
require(!v38, v38, v38);
v55 = this.code.size;
}
v1 = v56 = 0x1e0c((v44 - v4) * 1000, 10000, v4);
}
} else {
require((address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c)).code.size, v38, v38);
v57 = address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c).mint(address(0x42acfd8f410f5c19f24e3cf703acc7f637390be9), (v44 - v4) * 1000 / 10000).value(v38).gas(msg.gas);
require(v57, MEM[64], RETURNDATASIZE());
if (v57) {
require(MEM[64] <= uint64.max, Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64];
require(!v38, v38, v38);
v58 = this.code.size;
}
v1 = v59 = 0x1e0c((v44 - v4) * 1000, 10000, v4);
}
v1 = v60 = stor_2;
while (1) {
v61 = v62 = v43 > v1;
if (v62) {
// Unknown jump to Block 0x1f1c. Refer to 3-address code (TAC);
}
if (!v61) {
v63 = v64 = 0x12f0b;
v65 = v66 = 20;
v67 = v68 = 0x12f2f;
0x2e2c(v40, v1);
} else {
v1 = v69 = 7748;
require(v1 <= v1 + v1, Panic(17)); // arithmetic overflow or underflow
require(!((200 + int24(v40) < ~int24.max) | (200 + int24(v40) > int24.max)), Panic(17)); // arithmetic overflow or underflow
v43 = v70 = 0x2ddb(v1 + v1, v1, 200 + int24(v40));
if (v70 > v1) {
v40 = v71 = 200 + int24(v1);
require(!((v71 < ~int24.max) | (v71 > int24.max)), Panic(17)); // arithmetic overflow or underflow
} else {
v63 = v72 = 0x12e50;
v65 = v73 = 20;
v67 = v74 = 0x12e74;
0x2e2c(v1, v1);
}
}
require(!((int24(v40) + 500 > int24.max) | (int24(v40) + 500 < ~int24.max)), Panic(17)); // arithmetic overflow or underflow
v61 = v75 = int24(v1) > int24(int24(v40) + 500);
}
v76 = 0x2419();
v77, v78, v79 = 0x3552(v76, v1);
v80 = 0x2494();
v81, v82, v83 = 0x3552(v80, v1);
require(v1 <= v1 + stor_2, Panic(17)); // arithmetic overflow or underflow
require((uint128(v77) * (v1 + stor_2) / uint128(v77) == v1 + stor_2) | !uint128(v77), Panic(17)); // arithmetic overflow or underflow
v84 = v85 = (uint128(v77) * (v1 + stor_2) & v1) / 7850;
if (v85 & v65 < v65 & v1) {
require(!(uint128(11 * uint128(v1)) - 11 * uint128(v1)), Panic(17)); // arithmetic overflow or underflow
v84 = (uint128(11 * uint128(v1)) & v65) / 10;
}
v86 = 0x2528();
v87 = v86.data;
require(!((32 + MEM[64] < MEM[64]) | (32 + MEM[64] > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
v88 = 0;
v89 = new uint256[](0);
while (v88 >= 0) {
MEM[196 + (v88 + MEM[64])] = MEM[32 + (v88 + MEM[64])];
v88 += 32;
}
MEM[v89.data] = v88;
v90, /* uint256 */ v91, /* uint256 */ v92 = address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00).mint(this, int24(v86.word1), int24(v86.word2), uint128(v84), v89).value(v88).gas(msg.gas);
require(v90, MEM[64], RETURNDATASIZE());
if (v90) {
if (RETURNDATASIZE() < 64) {
require(!((MEM[64] + (~0x1f & RETURNDATASIZE() + 31) < MEM[64]) | (MEM[64] + (~0x1f & RETURNDATASIZE() + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + (~0x1f & RETURNDATASIZE() + 31);
v93 = MEM[64] + RETURNDATASIZE();
} else {
require(!((MEM[64] + 64 < MEM[64]) | (MEM[64] + 64 > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + 64;
v93 = v94 = MEM[64] + 64;
}
require(v93 - MEM[64] >= 64);
v95 = this.code.size;
}
// Unknown jump to Block {'0x12f2f', '0x12e74'}. Refer to 3-address code (TAC);
0x2a1d();
return 1, v67, v1, v40;
0x2a1d();
}
}
}
function 0xf3c41d26(uint256 varg0, int24 varg1, int24 varg2) public nonPayable {
require(~3 + msg.data.length >= 96);
v0 = new struct(3);
require(!((v0 + 96 > uint64.max) | (v0 + 96 < v0)), Panic(65)); // failed memory allocation (too much memory)
require(varg0 < 3);
v0.word0 = varg0;
v0.word1 = varg1;
v0.word2 = varg2;
v1, v2 = 0x290d(v0);
return v2, v1;
}
function 0x1e0c(uint256 varg0, uint256 varg1, uint256 varg2) private {
require(varg2 <= varg2 + varg0 / varg1, Panic(17)); // arithmetic overflow or underflow
return varg2 + varg0 / varg1;
}
function 0xf1740b54(uint256 varg0) public nonPayable {
require(~3 + msg.data.length >= 32);
v0 = 0x28e2(varg0);
return v0;
}
function uniswapV3MintCallback(uint256 amount0, uint256 amount1, bytes data) public nonPayable {
require(~3 + msg.data.length >= 96);
require(data <= uint64.max);
require(data + 35 < msg.data.length);
require(data.length <= uint64.max);
require(36 + (data + data.length) <= msg.data.length);
require(!(msg.sender - address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00)), InvalidCaller());
if (amount0) {
require((address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c)).code.size);
v0, /* uint256 */ v1 = address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c).mint(address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00), amount0).gas(msg.gas);
require(v0, v1, RETURNDATASIZE());
if (v0) {
require(MEM[64] <= uint64.max, Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64];
require(!0);
v2 = this.code.size;
}
}
if (amount1) {
v3, /* bool */ v4 = address(0x4300000000000000000000000000000000000004).transfer(address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00), amount1).gas(msg.gas);
require(v3, MEM[64], RETURNDATASIZE());
if (v3) {
v5 = v6 = 32;
if (32 > RETURNDATASIZE()) {
v5 = v7 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v5 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v5 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + (~0x1f & v5 + 31);
require(MEM[64] + v5 - MEM[64] >= 32);
require(!(v4 - bool(v4)));
v8 = this.code.size;
}
return ;
} else {
return ;
}
}
function 0x2278() private {
v0 = 0x3018(stor_0_0_2);
require(!(10 ** 18 * (address(v0) > 0x12725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f21)) << 96);
require(10 ** 18 * !((10 ** 18 * address(v0) >> 96) * (10 ** 18 * address(v0) >> 96 > ~0 / (10 ** 18 * address(v0) >> 96))));
return (10 ** 18 * address(v0) >> 96) * (10 ** 18 * address(v0) >> 96) / 10 ** 18;
}
function 0x231b(struct(3) varg0) private {
v0 = varg0.data;
v1 = new bytes[](26);
require(!((v1 + 64 > uint64.max) | (v1 + 64 < v1)), Panic(65)); // failed memory allocation (too much memory)
v2 = v1.length;
MEM[v1 + 64] = 0x514ea4bf00000000000000000000000000000000000000000000000000000000;
MEM[v1 + 68] = keccak256(this, varg0.word1, varg0.word2);
v3, /* uint128 */ v4, v5, v5, /* uint128 */ v6, /* uint128 */ v7 = address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00).positions(keccak256(this, varg0.word1, varg0.word2)).gas(msg.gas);
require(v3, MEM[64], RETURNDATASIZE());
if (v3) {
v8 = v9 = 160;
if (160 > RETURNDATASIZE()) {
v8 = v10 = RETURNDATASIZE();
}
require(!((v1 + 64 + (~0x1f & v8 + 31) < v1 + 64) | (v1 + 64 + (~0x1f & v8 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = v1 + 64 + (~0x1f & v8 + 31);
require(v1 + v8 - v1 >= 160);
require(!0x514ea4bf00000000000000000000000000000000000000000000000000000000);
require(!(v6 - uint128(v6)));
require(!(v7 - uint128(v7)));
return v4;
} else {
return 0;
}
}
function 0x2419() private {
v0 = new struct(3);
require(!((v0 + 96 > uint64.max) | (v0 + 96 < v0)), Panic(65)); // failed memory allocation (too much memory)
v0.word0 = 0;
v0.word1 = 0;
v0.word2 = 0;
require(!(int24(int24(stor_0_3_5 / 200) * 200) - int24(stor_0_3_5 / 200) * 200), Panic(17)); // arithmetic overflow or underflow
require(!((200 + int24(int24(stor_0_3_5 / 200) * 200) < ~int24.max) | (200 + int24(int24(stor_0_3_5 / 200) * 200) > int24.max)), Panic(17)); // arithmetic overflow or underflow
require(!((200 + stor_0_0_2 < ~int24.max) | (200 + stor_0_0_2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
if (int24(200 + stor_0_0_2) > stor_0_3_5) {
require(!((200 + stor_0_0_2 < ~int24.max) | (200 + stor_0_0_2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
}
v0.word0 = 0;
v0.word1 = stor_0_0_2;
require(!((200 + stor_0_0_2 < ~int24.max) | (200 + stor_0_0_2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
v0.word2 = int24(200 + stor_0_0_2);
return v0;
}
function 0x2494() private {
v0 = new struct(3);
require(!((v0 + 96 > uint64.max) | (v0 + 96 < v0)), Panic(65)); // failed memory allocation (too much memory)
v0.word0 = 0;
v0.word1 = 0;
v0.word2 = 0;
require(!(int24(int24(stor_0_3_5 / 200) * 200) - int24(stor_0_3_5 / 200) * 200), Panic(17)); // arithmetic overflow or underflow
v1 = v2 = 200 + int24(int24(stor_0_3_5 / 200) * 200);
require(!((v2 < ~int24.max) | (v2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
require(!((200 + stor_0_0_2 < ~int24.max) | (200 + stor_0_0_2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
if (int24(200 + stor_0_0_2) > stor_0_3_5) {
v1 = 200 + stor_0_0_2;
require(!((v1 < ~int24.max) | (v1 > int24.max)), Panic(17)); // arithmetic overflow or underflow
}
v1 = v3 = 0xcb2c8;
if (int24(v1) <= v3) {
}
v0.word0 = 1;
require(!((200 + stor_0_0_2 < ~int24.max) | (200 + stor_0_0_2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
v0.word1 = int24(200 + stor_0_0_2);
v0.word2 = int24(v1);
return v0;
}
function 0x2528() private {
v0 = new struct(3);
require(!((v0 + 96 > uint64.max) | (v0 + 96 < v0)), Panic(65)); // failed memory allocation (too much memory)
v0.word0 = 0;
v1 = v0.data;
v0.word1 = 0;
v0.word2 = 0;
require(!(int24(int24(stor_0_3_5 / 200) * 200) - int24(stor_0_3_5 / 200) * 200), Panic(17)); // arithmetic overflow or underflow
v2 = v3 = 200 + int24(int24(stor_0_3_5 / 200) * 200);
require(!((v3 < ~int24.max) | (v3 > int24.max)), Panic(17)); // arithmetic overflow or underflow
require(!((200 + stor_0_0_2 < ~int24.max) | (200 + stor_0_0_2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
if (int24(200 + stor_0_0_2) > stor_0_3_5) {
v2 = 200 + stor_0_0_2;
require(!((v2 < ~int24.max) | (v2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
v4 = this.code.size;
}
v2 = v5 = 0xcb2c8;
if (int24(v2) > v5) {
v6 = this.code.size;
}
v0.word0 = 2;
v0.word1 = int24(v2);
require(!((55000 + int24(v2) < ~int24.max) | (55000 + int24(v2) > int24.max)), Panic(17)); // arithmetic overflow or underflow
v0.word2 = int24(55000 + int24(v2));
return v0;
}
function 0x260e() private {
v0, v1, v2, v3 = 0x1ac3();
if (!v0) {
v4, v5 = 0x279b();
return v4;
} else {
return 1;
}
}
function 0x262b() private {
v0, v1 = 0x2b09();
require(!((~599 + stor_0_3_5 > int24.max) | (~599 + stor_0_3_5 < ~int24.max)), Panic(17)); // arithmetic overflow or underflow
if (int24(v0) < int24(~599 + stor_0_3_5)) {
require(!((200 + stor_0_0_2 < ~int24.max) | (200 + stor_0_0_2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
return int24(200 + stor_0_0_2) != int24(v0);
} else {
return int24(v0) < int24(~599 + stor_0_3_5);
}
}
function 0x2682(uint256 varg0, uint256 varg1) private {
v0 = 0x18a2(varg0);
require(v0.word2 <= v0.word2 + varg1, Panic(17)); // arithmetic overflow or underflow
v1 = v2 = !v0.word3;
if (v2) {
v1 = v3 = !v4;
}
require(!v1, InvalidExpiry());
require(v0.word2 + varg1);
v5 = v6 = 0x339e(v0.word3, v4);
v7 = 0x2278();
require(!(v7 * (v0.word2 + varg1 > ~0 / v7)));
v5 = (v0.word2 + varg1) * v7 / 10 ** 18;
require(!(v0.word4 * (v0.word2 > ~0 / v0.word4)));
v5 = v8 = v0.word2 * v0.word4 / 10 ** 18;
require(v5 > v8);
v9 = v5 - v8;
require(v9 <= v5, Panic(17)); // arithmetic overflow or underflow
require(block.timestamp + ~0x1517f <= block.timestamp, Panic(17)); // arithmetic overflow or underflow
v9 = v10 = 10051;
v9 = v11 = 10057;
v9 = v12 = 10063;
v13 = 0x28e2(block.timestamp + ~0x1517f);
require(v6 - v13 <= v6, Panic(17)); // arithmetic overflow or underflow
v14 = v15 = (v6 - v13) / 0x15180;
if (!v0.word3) {
v14 = v16 = 0;
} else {
require(v0.word3 - v13 <= v0.word3, Panic(17)); // arithmetic overflow or underflow
v14 = v17 = (v0.word3 - v13) / 0x15180;
}
while (1) {
require((v5 * v14 / v5 == v14) | !v5, Panic(17)); // arithmetic overflow or underflow
require(!(0x68d3b1390934 * (v5 * v14 > 0x2712ed2ba3867e0019368706e2440c97712712a63f1ed215c7401)));
v14 = v5 * v14 * 0x68d3b1390934 / 10 ** 18;
// Unknown jump to Block {'0x2749', '0x2743'}. Refer to 3-address code (TAC);
require(v14 - v14 <= v14, Panic(17)); // arithmetic overflow or underflow
require(v14 - v14 < v9);
require(v9 - (v14 - v14) <= v9, Panic(17)); // arithmetic overflow or underflow
return v5, v14 - v14, v9 - (v14 - v14), v9;
}
}
function 0x279b() private {
v0 = 0x262b();
if (!v0) {
return 0;
} else {
v1 = 0x2494();
v2, v3, v4, v5 = 0x2bf2(v1);
v6 = 0x2528();
v7, v8, v9, v10 = 0x2bf2(v6);
require(v5 <= v5 + v10, Panic(17)); // arithmetic overflow or underflow
v11 = 0x2419();
v12, v13, v14, v15 = 0x2bf2(v11);
v16, v17 = address(0x4300000000000000000000000000000000000004).balanceOf(this).gas(msg.gas);
require(v16, MEM[64], RETURNDATASIZE());
v17 = v18 = 0;
if (v16) {
v19 = v20 = 32;
if (32 > RETURNDATASIZE()) {
v19 = v21 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v19 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v19 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v19 - MEM[64] >= 32);
}
require(v17 - (v5 + v10) <= v17, Panic(17)); // arithmetic overflow or underflow
v22, v23 = 0x2b09();
0x2e2c(stor_0_0_2, v22);
v24 = 0x2419();
v25, v26, v27 = 0x3552(v24, v17 - (v5 + v10));
v28 = 0x2494();
v29, v30, v31 = 0x3552(v28, v5 + v10);
require(v17 - (v5 + v10) <= v17 - (v5 + v10) + stor_2, Panic(17)); // arithmetic overflow or underflow
require((uint128(v25) * (v17 - (v5 + v10) + stor_2) / uint128(v25) == v17 - (v5 + v10) + stor_2) | !uint128(v25), Panic(17)); // arithmetic overflow or underflow
v32 = v33 = (uint128(v25) * (v17 - (v5 + v10) + stor_2) & v17 - (v5 + v10)) / 10381;
if (uint128(v33) < uint128(20)) {
require(!0, Panic(17)); // arithmetic overflow or underflow
v32 = 22;
}
v34 = 0x2528();
v35 = v34.data;
require(!((32 + MEM[64] < MEM[64]) | (32 + MEM[64] > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
v36 = 0;
v37 = new uint256[](0);
while (v36 >= 0) {
MEM[196 + (v36 + MEM[64])] = MEM[32 + (v36 + MEM[64])];
v36 += 32;
}
MEM[v37.data] = v36;
v38, /* uint256 */ v39, /* uint256 */ v40 = address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00).mint(this, int24(v34.word1), int24(v34.word2), uint128(v32), v37).value(v36).gas(msg.gas);
require(v38, MEM[64], RETURNDATASIZE());
if (v38) {
if (RETURNDATASIZE() < 64) {
require(!((MEM[64] + (~0x1f & RETURNDATASIZE() + 31) < MEM[64]) | (MEM[64] + (~0x1f & RETURNDATASIZE() + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + (~0x1f & RETURNDATASIZE() + 31);
v41 = MEM[64] + RETURNDATASIZE();
} else {
require(!((MEM[64] + 64 < MEM[64]) | (MEM[64] + 64 > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + 64;
v41 = v42 = MEM[64] + 64;
}
require(v41 - MEM[64] >= 64);
v43 = this.code.size;
}
0x2a1d();
return 1, 0x13076;
}
}
function 0x28e2(uint256 varg0) private {
require(varg0 - varg0 % 0x15180 <= varg0, Panic(17)); // arithmetic overflow or underflow
require(varg0 - varg0 % 0x15180 <= varg0 - varg0 % 0x15180 + 0x15180, Panic(17)); // arithmetic overflow or underflow
require(0x1517f + (varg0 - varg0 % 0x15180) <= varg0 - varg0 % 0x15180 + 0x15180, Panic(17)); // arithmetic overflow or underflow
return 0x1517f + (varg0 - varg0 % 0x15180);
}
function 0x290d(struct(3) varg0) private {
v0 = 0x231b(varg0);
if (!uint128(v0)) {
return 0, 0;
} else {
v1, v2 = 0x33f2(varg0, v0);
return v1, v2;
}
}
function 0x293c() private {
v0 = 0x28e2(block.timestamp);
v1 = v2 = stor_4;
v3 = v4 = v2 >= v0;
if (v2 < v0) {
v3 = v5 = !v2;
}
if (v3) {
return ;
} else {
v6 = v7 = 0;
while (1) {
v8 = v9 = v1 < v0;
if (v9) {
// Unknown jump to Block 0x2a07. Refer to 3-address code (TAC);
}
if (!v8) {
require(stor_2 - v6 <= stor_2, Panic(17)); // arithmetic overflow or underflow
stor_2 = stor_2 - v6;
require(_getCirculatingSupply - v6 <= _getCirculatingSupply, Panic(17)); // arithmetic overflow or underflow
_getCirculatingSupply = _getCirculatingSupply - v6;
stor_4 = v1;
return ;
} else {
require(!((MEM[64] + 96 > uint64.max) | (MEM[64] + 96 < MEM[64])), Panic(65)); // failed memory allocation (too much memory)
MEM[MEM[64]] = map_3[v1].field0;
v6 = v6 + map_3[v1].field0;
require(v6 <= v6, Panic(17)); // arithmetic overflow or underflow
v6 = v6 + map_3[v1].field1;
require(v6 <= v6, Panic(17)); // arithmetic overflow or underflow
map_3[v1].field0 = 0;
map_3[v1].field1 = 0;
map_3[v1].field2 = 0;
}
v8 = v10 = bool(v1);
// Unknown jump to Block 0x2967. Refer to 3-address code (TAC);
}
}
}
function 0x2a1d() private {
v0, v1 = address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c).balanceOf(this).gas(msg.gas);
require(v0, MEM[64], RETURNDATASIZE());
v1 = v2 = 0;
if (v0) {
v3 = v4 = 32;
if (32 > RETURNDATASIZE()) {
v3 = v5 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v3 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v3 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v3 - MEM[64] >= 32);
}
require(v1 - _getCirculatingSupply <= v1, Panic(17)); // arithmetic overflow or underflow
if (v1 - _getCirculatingSupply) {
require((address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c)).code.size);
v6, /* uint256 */ v7 = address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c).burn(v1 - _getCirculatingSupply).gas(msg.gas);
require(v6, v7, RETURNDATASIZE());
if (v6) {
require(MEM[64] <= uint64.max, Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64];
return ;
} else {
return ;
}
} else {
return ;
}
}
function 0x2b09() private {
v0, v1, v1, /* uint16 */ v2, /* uint16 */ v3, /* uint16 */ v4, v5, /* bool */ v6 = address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00).slot0().gas(msg.gas);
require(v0, MEM[64], RETURNDATASIZE());
v1 = v7 = 0;
if (v0) {
v8 = v9 = 224;
if (224 > RETURNDATASIZE()) {
v8 = v10 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v8 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v8 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v8 - MEM[64] >= 224, v7, v7);
require(!0x3850c7bd00000000000000000000000000000000000000000000000000000000, v7, v7);
require(!(v1 - int24(v1)), v7, v7);
require(!(v2 - uint16(v2)));
require(!(v3 - uint16(v3)));
require(!(v4 - uint16(v4)));
require(!(uint8(v5) - v5), v7, v7);
require(!(v6 - bool(v6)));
v11 = this.code.size;
}
return v1, v1;
}
function 0x2bf2(struct(3) varg0) private {
v0 = 0x231b(varg0);
if (!uint128(v0)) {
return 0, 0, 0, 0;
} else {
v1 = varg0.data;
v2 = v3 = 64;
v4 = v5 = 0;
v6, /* uint128 */ v4, /* uint128 */ v4 = address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00).burn(int24(varg0.word1), int24(varg0.word2), uint128(v0)).value(v5).gas(msg.gas);
require(v6, MEM[v3], RETURNDATASIZE());
if (v6) {
if (v3 > RETURNDATASIZE()) {
v2 = RETURNDATASIZE();
}
require(!((MEM[v3] + (~0x1f & v2 + 31) < MEM[v3]) | (MEM[v3] + (~0x1f & v2 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[v3] + (~0x1f & v2 + 31);
require(MEM[v3] + v2 - MEM[v3] >= 64);
}
v7, /* uint128 */ v4, /* uint128 */ v4 = address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00).collect(this, int24(varg0.word1), int24(varg0.word2), uint128.max, uint128.max).value(v5).gas(msg.gas);
require(v7, MEM[v3], RETURNDATASIZE());
if (v7) {
if (v3 > RETURNDATASIZE()) {
v2 = v8 = RETURNDATASIZE();
}
require(!((MEM[v3] + (~0x1f & v2 + 31) < MEM[v3]) | (MEM[v3] + (~0x1f & v2 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[v3] + (~0x1f & v2 + 31);
require(MEM[v3] + v2 - MEM[v3] >= v3, v5, v5);
require(!0x4f1eb3d800000000000000000000000000000000000000000000000000000000);
require(!(v4 - uint128(v4)));
}
require(uint128(v4) - v4 <= uint128(v4), Panic(17)); // arithmetic overflow or underflow
require(uint128(v4) - v4 <= uint128(v4), Panic(17)); // arithmetic overflow or underflow
return uint128(v4) - v4, uint128(v4), uint128(v4) - v4, uint128(v4);
}
}
function 0x2ddb(uint256 varg0, uint256 varg1, uint256 varg2) private {
v0 = 0x3018(varg2);
require(!((200 + int24(varg2) < ~int24.max) | (200 + int24(varg2) > int24.max)), Panic(17)); // arithmetic overflow or underflow
v1 = 0x3018(200 + int24(varg2));
v2 = 0x34c7(v0, v1, varg0);
v3 = 0x3504(v4, 11802, v1);
v5 = 0x3504(11814, 11808, v2);
require(v3 <= v3 + v5, Panic(17)); // arithmetic overflow or underflow
return v3 + v5;
}
function 0x2e2c(uint256 varg0, uint256 varg1) private {
require(!((200 + int24(varg0) < ~int24.max) | (200 + int24(varg0) > int24.max)), Panic(17)); // arithmetic overflow or underflow
if (int24(200 + int24(varg0)) == int24(varg1)) {
varg1 = v0 = 200 + int24(varg1);
require(!((v0 < ~int24.max) | (v0 > int24.max)), Panic(17)); // arithmetic overflow or underflow
}
stor_0_0_2 = varg0;
stor_0_3_5 = varg1;
v1 = int24((bytes26(STORAGE[0]) | uint24(varg0) | 0xffffff000000 & varg1 << 24) >> 24);
emit 0xe1c049e29d7195618fb5dc397cf4df73d50bdde65e9d0eeffe7bfdd286b5646e(stor_0_0_2, v1);
return ;
}
function 0x2ec8(struct(3) varg0, uint128 varg1) private {
v0 = varg0.data;
require(!((32 + MEM[64] < MEM[64]) | (32 + MEM[64] > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
v1 = v2 = 0;
v3 = new uint256[](0);
while (v1 >= 0) {
MEM[196 + (v1 + MEM[64])] = MEM[32 + (v1 + MEM[64])];
v1 += 32;
}
MEM[v3.data] = v2;
v4, /* uint256 */ v1, /* uint256 */ v1 = address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00).mint(this, int24(varg0.word1), int24(varg0.word2), varg1, v3).value(v2).gas(msg.gas);
require(v4, MEM[64], RETURNDATASIZE());
if (v4) {
if (RETURNDATASIZE() < 64) {
require(!((MEM[64] + (~0x1f & RETURNDATASIZE() + 31) < MEM[64]) | (MEM[64] + (~0x1f & RETURNDATASIZE() + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + (~0x1f & RETURNDATASIZE() + 31);
v5 = MEM[64] + RETURNDATASIZE();
} else {
require(!((MEM[64] + 64 < MEM[64]) | (MEM[64] + 64 > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + 64;
v5 = v6 = MEM[64] + 64;
}
require(v5 - MEM[64] >= 64);
v7 = this.code.size;
}
return v1, v1;
}
function 0x3018(int24 varg0) private {
v0 = v1 = varg0;
if (v1 < 0) {
v0 = v2 = 0 - v1;
}
require(v0 <= 0xd89e8, T());
if (!(v0 & 0x1)) {
v3 = v4 = 0x100000000000000000000000000000000;
} else {
v3 = v5 = 0xfffcb933bd6fad37aa2d162d1a594001;
}
v6 = v7 = uint136(v3);
if (v0 & 0x2) {
v6 = v8 = 0xfff97272373d413259a46990580e213a * v7 >> 128;
}
if (v0 & 0x4) {
v6 = v9 = 0xfff2e50f5f656932ef12357cf3c7fdcc * v6 >> 128;
}
if (v0 & 0x8) {
v6 = v10 = 0xffe5caca7e10e4e61c3624eaa0941cd0 * v6 >> 128;
}
if (v0 & 0x10) {
v6 = v11 = 0xffcb9843d60f6159c9db58835c926644 * v6 >> 128;
}
if (v0 & 0x20) {
v6 = v12 = 0xff973b41fa98c081472e6896dfb254c0 * v6 >> 128;
}
if (v0 & 0x40) {
v6 = v13 = 0xff2ea16466c96a3843ec78b326b52861 * v6 >> 128;
}
if (v0 & 0x80) {
v6 = v14 = 0xfe5dee046a99a2a811c461f1969c3053 * v6 >> 128;
}
if (v0 & 0x100) {
v6 = v15 = 0xfcbe86c7900a88aedcffc83b479aa3a4 * v6 >> 128;
}
if (v0 & 0x200) {
v6 = v16 = 0xf987a7253ac413176f2b074cf7815e54 * v6 >> 128;
}
if (v0 & 0x400) {
v6 = v17 = 0xf3392b0822b70005940c7a398e4b70f3 * v6 >> 128;
}
if (v0 & 0x800) {
v6 = v18 = 0xe7159475a2c29b7443b29c7fa6e889d9 * v6 >> 128;
}
if (v0 & 0x1000) {
v6 = v19 = 0xd097f3bdfd2022b8845ad8f792aa5825 * v6 >> 128;
}
if (v0 & 0x2000) {
v6 = v20 = 0xa9f746462d870fdf8a65dc1f90e061e5 * v6 >> 128;
}
if (v0 & 0x4000) {
v6 = v21 = 0x70d869a156d2a1b890bb3df62baf32f7 * v6 >> 128;
}
if (v0 & 0x8000) {
v6 = v22 = 0x31be135f97d08fd981231505542fcfa6 * v6 >> 128;
}
if (v0 & 0x10000) {
v6 = v23 = 0x9aa508b5b7a84e1c677de54f3e99bc9 * v6 >> 128;
}
if (v0 & 0x20000) {
v6 = v24 = 0x5d6af8dedb81196699c329225ee604 * v6 >> 128;
}
if (v0 & 0x40000) {
v6 = v25 = v6 * 0x2216e584f5fa1ea926041bedfe98 >> 128;
}
if (0x80000 & v0) {
v6 = v26 = v6 * 0x48a170391f7dc42444e8fa2 >> 128;
}
if (0 < v1) {
require(v6, Panic(18)); // division by zero
v6 = v27 = ~0 / v6;
}
if (uint32(v6)) {
v28 = v29 = 1;
} else {
v28 = v30 = 0;
}
return address(uint8(v28) + (v6 >> 32));
}
function 0x339e(uint256 varg0, uint256 varg1) private {
if (varg0) {
if (varg1) {
require(!(varg1 * 0x15180 / varg1 - 0x15180), Panic(17)); // arithmetic overflow or underflow
require(varg0 <= varg0 + varg1 * 0x15180, Panic(17)); // arithmetic overflow or underflow
v0 = 0x28e2(varg0 + varg1 * 0x15180);
return v0;
} else {
return varg0;
}
} else {
require(!varg1 | (varg1 * 0x15180 / varg1 == 0x15180), Panic(17)); // arithmetic overflow or underflow
require(block.timestamp <= block.timestamp + varg1 * 0x15180, Panic(17)); // arithmetic overflow or underflow
v1 = 0x28e2(block.timestamp + varg1 * 0x15180);
return v1;
}
}
function 0x33f2(struct(3) varg0, uint256 varg1) private {
if (!uint128(varg1)) {
return 0, 0;
} else {
v0 = varg0.data;
v1 = v2 = 0x3018(int24(varg0.word1));
v1 = 0x3018(int24(varg0.word2));
v3, v4 = 0x2b09();
if (address(v2) > address(v1)) {
v5 = this.code.size;
}
if (address(v4) > address(v1)) {
if (0 == address(v1) > address(v4)) {
v6 = 0x3920(v1, v1, varg1);
return 0, v6;
} else {
v7 = 0x3504(v4, v1, varg1);
v8 = 0x3920(v1, v4, varg1);
return v7, v8;
}
} else {
v9 = 0x3504(v1, v1, varg1);
return v9, 0;
}
}
}
function 0x34a0(uint256 varg0, uint256 varg1) private {
if (address(varg0) <= address(varg1)) {
}
require(address(varg0 - varg0));
return 0;
}
function 0x34c7(uint256 varg0, uint256 varg1, uint256 varg2) private {
if (address(varg0) <= address(varg1)) {
}
v0 = address(varg0 - varg0);
v1 = varg2 * 0x1000000000000000000000000 % ~0 - (varg2 << 96) - (varg2 * 0x1000000000000000000000000 % ~0 < varg2 << 96);
if (varg2 * 0x1000000000000000000000000 % ~0 - (varg2 << 96) == varg2 * 0x1000000000000000000000000 % ~0 < varg2 << 96) {
require(v0);
v2 = (varg2 << 96) / v0;
} else {
require(v0 > v1);
v3 = (2 - v0 / (0 - v0 & v0) * ((2 - v0 / (0 - v0 & v0) * (3 * (v0 / (0 - v0 & v0)) ^ 0x2)) * (3 * (v0 / (0 - v0 & v0)) ^ 0x2))) * ((2 - v0 / (0 - v0 & v0) * (3 * (v0 / (0 - v0 & v0)) ^ 0x2)) * (3 * (v0 / (0 - v0 & v0)) ^ 0x2));
v4 = (2 - v0 / (0 - v0 & v0) * ((2 - v0 / (0 - v0 & v0) * v3) * v3)) * ((2 - v0 / (0 - v0 & v0) * v3) * v3);
v2 = v5 = (((varg2 << 96) - varg2 * 0x1000000000000000000000000 % v0) / (0 - v0 & v0) | (v1 - (varg2 * 0x1000000000000000000000000 % v0 > varg2 << 96)) * ((0 - (0 - v0 & v0)) / (0 - v0 & v0) + 1)) * ((2 - v0 / (0 - v0 & v0) * ((2 - v0 / (0 - v0 & v0) * v4) * v4)) * ((2 - v0 / (0 - v0 & v0) * v4) * v4));
}
require(!(uint128(v2) - v2));
return uint128(v2);
}
function 0x3504(uint256 varg0, uint256 varg1, uint256 varg2) private {
if (address(varg0) <= address(varg1)) {
}
v0 = address(varg0);
v1 = address(varg0 - varg0);
v2 = (0xffffffffffffffffffffffffffffffff000000000000000000000000 & varg2 << 96) * v1;
v3 = (0xffffffffffffffffffffffffffffffff000000000000000000000000 & varg2 << 96) * v1 % ~0 - v2 - ((0xffffffffffffffffffffffffffffffff000000000000000000000000 & varg2 << 96) * v1 % ~0 < v2);
if ((0xffffffffffffffffffffffffffffffff000000000000000000000000 & varg2 << 96) * v1 % ~0 - v2 == (0xffffffffffffffffffffffffffffffff000000000000000000000000 & varg2 << 96) * v1 % ~0 < v2) {
require(v0);
v4 = v2 / v0;
} else {
require(v0 > v3);
v5 = (2 - v0 / (0 - v0 & v0) * ((2 - v0 / (0 - v0 & v0) * (3 * (v0 / (0 - v0 & v0)) ^ 0x2)) * (3 * (v0 / (0 - v0 & v0)) ^ 0x2))) * ((2 - v0 / (0 - v0 & v0) * (3 * (v0 / (0 - v0 & v0)) ^ 0x2)) * (3 * (v0 / (0 - v0 & v0)) ^ 0x2));
v6 = (2 - v0 / (0 - v0 & v0) * ((2 - v0 / (0 - v0 & v0) * v5) * v5)) * ((2 - v0 / (0 - v0 & v0) * v5) * v5);
v4 = v7 = ((v2 - (0xffffffffffffffffffffffffffffffff000000000000000000000000 & varg2 << 96) * v1 % v0) / (0 - v0 & v0) | (v3 - ((0xffffffffffffffffffffffffffffffff000000000000000000000000 & varg2 << 96) * v1 % v0 > v2)) * ((0 - (0 - v0 & v0)) / (0 - v0 & v0) + 1)) * ((2 - v0 / (0 - v0 & v0) * ((2 - v0 / (0 - v0 & v0) * v6) * v6)) * ((2 - v0 / (0 - v0 & v0) * v6) * v6));
}
require(address(varg0), Panic(18)); // division by zero
return v4 / address(varg0);
}
function 0x3552(struct(3) varg0, uint256 varg1) private {
v0 = 0x37df(varg0, varg1);
if (!uint128(v0)) {
return 0, 0, 0;
} else {
v1, v2 = 0x2ec8(varg0, v0);
return v0, v1, v2;
}
}
function 0x3589(struct(3) varg0, uint256 varg1) private {
v0 = 0x3898(varg0, varg1);
if (!uint128(v0)) {
return 0, 0, 0;
} else {
v1, v2 = 0x2ec8(varg0, v0);
return v0, v1, v2;
}
}
function 0x36b0(uint256 varg0, uint256 varg1) private {
v0 = varg0 * varg1;
v1 = varg0 * varg1 % ~0 - v0 - (varg0 * varg1 % ~0 < v0);
if (varg0 * varg1 % ~0 - v0 == varg0 * varg1 % ~0 < v0) {
return v0 >> 96;
} else {
require(0x1000000000000000000000000 > v1);
return v0 - varg0 * varg1 % 0x1000000000000000000000000 >> 96 | v1 - (varg0 * varg1 % 0x1000000000000000000000000 > v0) << 160;
}
}
function 0x37df(struct(3) varg0, uint256 varg1) private {
v0 = v1 = !varg1;
if (v1) {
v0 = v2 = 1;
}
if (v0) {
return 0;
} else {
v3 = v4 = 0x3018(int24(varg0.word1));
v3 = 0x3018(int24(varg0.word2));
v5, v6 = 0x2b09();
if (address(v4) > address(v3)) {
v7 = this.code.size;
}
if (address(v6) > address(v3)) {
if (0 == address(v3) > address(v6)) {
v8 = 0x34c7(v3, v3, varg1);
return v8;
} else {
v9 = 0x3afa(v6, v3);
v10 = 0x34c7(v3, v6, varg1);
if (uint128(v9) <= uint128(v10)) {
return v10;
} else {
return v9;
}
}
} else {
v11 = 0x3afa(v3, v3);
return v11;
}
}
}
function 0x3898(struct(3) varg0, uint256 varg1) private {
if (!varg1) {
return 0;
} else {
v0 = varg0.data;
v1 = v2 = 0x3018(int24(varg0.word1));
v1 = 0x3018(int24(varg0.word2));
v3, v4 = 0x2b09();
if (address(v2) > address(v1)) {
v5 = this.code.size;
}
if (address(v4) > address(v1)) {
if (0 == address(v1) > address(v4)) {
v6 = 0x34a0(v1, v1);
return v6;
} else {
v7 = 0x3b31(v4, v1, varg1);
v8 = 0x34a0(v1, v4);
if (uint128(v7) <= uint128(v8)) {
return v8;
} else {
return v7;
}
}
} else {
v9 = 0x3b31(v1, v1, varg1);
return v9;
}
}
}
function 0x3920(uint256 varg0, uint256 varg1, uint128 varg2) private {
if (address(varg0) <= address(varg1)) {
}
v0 = address(varg0 - varg0);
if (varg2 * v0 % ~0 - varg2 * v0 == varg2 * v0 % ~0 < varg2 * v0) {
v1 = v2 = varg2 * v0 >> 96;
} else {
require(0x1000000000000000000000000 > varg2 * v0 % ~0 - varg2 * v0 - (varg2 * v0 % ~0 < varg2 * v0));
v1 = varg2 * v0 - varg2 * v0 % 0x1000000000000000000000000 >> 96 | varg2 * v0 % ~0 - varg2 * v0 - (varg2 * v0 % ~0 < varg2 * v0) - (varg2 * v0 % 0x1000000000000000000000000 > varg2 * v0) << 160;
}
return v1;
}
function 0x3952(struct(3) varg0, uint256 varg1) private {
v0 = 0x37df(varg0, varg1);
if (!uint128(v0)) {
return 0, 0, 0;
} else {
v1 = v2 = 64;
v3 = v4 = 0;
v5, /* uint128 */ v3, /* uint128 */ v3 = address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00).burn(int24(varg0.word1), int24(varg0.word2), uint128(v0)).value(v4).gas(msg.gas);
require(v5, MEM[v2], RETURNDATASIZE());
if (v5) {
if (v2 > RETURNDATASIZE()) {
require(!((MEM[v2] + (~0x1f & RETURNDATASIZE() + 31) < MEM[v2]) | (MEM[v2] + (~0x1f & RETURNDATASIZE() + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[v2] + (~0x1f & RETURNDATASIZE() + 31);
v6 = MEM[v2] + RETURNDATASIZE();
} else {
require(!((MEM[v2] + 64 < MEM[v2]) | (MEM[v2] + 64 > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[v2] + 64;
v6 = v7 = MEM[v2] + v2;
}
require(v6 - MEM[v2] >= 64);
}
v8, /* uint128 */ v3, /* uint128 */ v3 = address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00).collect(this, int24(varg0.word1), int24(varg0.word2), uint128(v3), uint128(v3)).value(v4).gas(msg.gas);
require(v8, MEM[v2], RETURNDATASIZE());
if (v8) {
if (v2 > RETURNDATASIZE()) {
v1 = v9 = RETURNDATASIZE();
}
require(!((MEM[v2] + (~0x1f & v1 + 31) < MEM[v2]) | (MEM[v2] + (~0x1f & v1 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[v2] + (~0x1f & v1 + 31);
require(MEM[v2] + v1 - MEM[v2] >= v2, v4, v4);
require(!0x4f1eb3d800000000000000000000000000000000000000000000000000000000);
require(!(v3 - uint128(v3)));
}
require(uint128(v3) - v3 <= uint128(v3), Panic(17)); // arithmetic overflow or underflow
require(uint128(v3) - v3 <= uint128(v3), Panic(17)); // arithmetic overflow or underflow
return v0, uint128(v3), uint128(v3);
}
}
function 0x3afa(uint256 varg0, uint256 varg1) private {
if (address(varg0) <= address(varg1)) {
}
v0 = 0x36b0(address(varg0), address(varg0));
v1 = address(varg0 - varg0);
v2 = v3 = 0;
if (!(v3 * v0 % ~0)) {
require(v1, v3, v3);
} else {
require(v1 > v3 * v0 % ~0, v3, v3);
v4 = (2 - v1 / (v3 - v1 & v1) * ((2 - v1 / (v3 - v1 & v1) * (3 * (v1 / (v3 - v1 & v1)) ^ 0x2)) * (3 * (v1 / (v3 - v1 & v1)) ^ 0x2))) * ((2 - v1 / (v3 - v1 & v1) * (3 * (v1 / (v3 - v1 & v1)) ^ 0x2)) * (3 * (v1 / (v3 - v1 & v1)) ^ 0x2));
v5 = (2 - v1 / (v3 - v1 & v1) * ((2 - v1 / (v3 - v1 & v1) * v4) * v4)) * ((2 - v1 / (v3 - v1 & v1) * v4) * v4);
v2 = v6 = ((v3 - v3 * v0 % v1) / (v3 - v1 & v1) | (v3 * v0 % ~0 - bool(v3 * v0 % v1)) * ((v3 - (v3 - v1 & v1)) / (v3 - v1 & v1) + 1)) * ((2 - v1 / (v3 - v1 & v1) * ((2 - v1 / (v3 - v1 & v1) * v5) * v5)) * ((2 - v1 / (v3 - v1 & v1) * v5) * v5));
}
require(!(uint128(v2) - v2));
return uint128(v2);
}
function 0x3b31(uint256 varg0, uint256 varg1, uint256 varg2) private {
if (address(varg0) <= address(varg1)) {
}
v0 = 0x36b0(address(varg0), address(varg0));
v1 = address(varg0 - varg0);
v2 = varg2 * v0;
v3 = varg2 * v0 % ~0 - v2 - (varg2 * v0 % ~0 < v2);
if (varg2 * v0 % ~0 - v2 == varg2 * v0 % ~0 < v2) {
require(v1);
v4 = v2 / v1;
} else {
require(v1 > v3);
v5 = (2 - v1 / (0 - v1 & v1) * ((2 - v1 / (0 - v1 & v1) * (3 * (v1 / (0 - v1 & v1)) ^ 0x2)) * (3 * (v1 / (0 - v1 & v1)) ^ 0x2))) * ((2 - v1 / (0 - v1 & v1) * (3 * (v1 / (0 - v1 & v1)) ^ 0x2)) * (3 * (v1 / (0 - v1 & v1)) ^ 0x2));
v6 = (2 - v1 / (0 - v1 & v1) * ((2 - v1 / (0 - v1 & v1) * v5) * v5)) * ((2 - v1 / (0 - v1 & v1) * v5) * v5);
v4 = v7 = ((v2 - varg2 * v0 % v1) / (0 - v1 & v1) | (v3 - (varg2 * v0 % v1 > v2)) * ((0 - (0 - v1 & v1)) / (0 - v1 & v1) + 1)) * ((2 - v1 / (0 - v1 & v1) * ((2 - v1 / (0 - v1 & v1) * v6) * v6)) * ((2 - v1 / (0 - v1 & v1) * v6) * v6));
}
require(!(uint128(v4) - v4));
return uint128(v4);
}
function reserve() public nonPayable {
require(msg.data.length + ~3 >= 0);
return address(0x4300000000000000000000000000000000000004);
}
function REBALANCE_THRESHOLD() public nonPayable {
require(msg.data.length + ~3 >= 0);
return 600;
}
function borrow(address _tokenAddr, uint256 _amount, uint256 _type) public nonPayable {
require(~3 + msg.data.length >= 96);
v0 = 0x260e();
0x293c();
v1, v2, v3, v4 = v5 = 0x2682(_amount, 0);
v6 = 0x2419();
v7 = 0x2494();
v8, v9 = 0x290d(v6);
v10, v11 = 0x290d(v7);
require(v9 <= v9 + v11, Panic(17)); // arithmetic overflow or underflow
require(v9 * !(10 ** 18 * (v9 + v11 > 0x12725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f21)));
if (!((v9 + v11) * 10 ** 18 / v9 * !(10 ** 18 * (v3 > 0x12725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f21)))) {
MEM[v5] = 0x7c5f487d;
revert(28, 4);
} else {
require(v3 - (bool(v3 * 10 ** 18 % ((v9 + v11) * 10 ** 18 / v9)) + v3 * 10 ** 18 / ((v9 + v11) * 10 ** 18 / v9)) <= v3, Panic(17)); // arithmetic overflow or underflow
v12, v13, v14 = 0x3952(v6, bool(v3 * 10 ** 18 % ((v9 + v11) * 10 ** 18 / v9)) + v3 * 10 ** 18 / ((v9 + v11) * 10 ** 18 / v9));
if (v3 - (bool(v3 * 10 ** 18 % ((v9 + v11) * 10 ** 18 / v9)) + v3 * 10 ** 18 / ((v9 + v11) * 10 ** 18 / v9))) {
v15, v16, v4 = v17 = 0x3952(v7, v3 - (bool(v3 * 10 ** 18 % ((v9 + v11) * 10 ** 18 / v9)) + v3 * 10 ** 18 / ((v9 + v11) * 10 ** 18 / v9)));
v18 = this.code.size;
}
require(v14 <= v14 + v4, Panic(17)); // arithmetic overflow or underflow
0x2a1d();
v19 = 0x18a2(1131);
require(v19.word0 <= v19.word0 + (v14 + v4), Panic(17)); // arithmetic overflow or underflow
require(v19.word1 <= v19.word1 + v2, Panic(17)); // arithmetic overflow or underflow
require(v19.word2 <= v19.word2 + _type, Panic(17)); // arithmetic overflow or underflow
v20 = 0x2278();
require(!((MEM[64] + 160 > uint64.max) | (MEM[64] + 160 < MEM[64])), Panic(65)); // failed memory allocation (too much memory)
MEM[v5] = address(0x46b);
MEM[32] = 6;
STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64])] = v19.word0 + (v14 + v4);
STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 1] = v19.word1 + v2;
STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 2] = v19.word2 + _type;
STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 3] = v1;
STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 4] = v20;
require(!((MEM[64] + 96 > uint64.max) | (MEM[64] + 96 < MEM[64])), Panic(65)); // failed memory allocation (too much memory)
MEM[MEM[64]] = map_3[v19.word3].field0;
require(map_3[v19.word3].field0 - v19.word0 <= map_3[v19.word3].field0, Panic(17)); // arithmetic overflow or underflow
require(map_3[v19.word3].field1 - v19.word2 <= map_3[v19.word3].field1, Panic(17)); // arithmetic overflow or underflow
map_3[v19.word3].field0 = map_3[v19.word3].field0 - v19.word0;
map_3[v19.word3].field1 = map_3[v19.word3].field1 - v19.word2;
map_3[v19.word3].field2 = map_3[v19.word3].field2;
if (0 == _borrow < v1) {
MEM[v5] = v1;
MEM[32] = 3;
require(!((MEM[64] + 96 > uint64.max) | (MEM[64] + 96 < MEM[64])), Panic(65)); // failed memory allocation (too much memory)
MEM[MEM[64]] = STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64])];
require(STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64])] <= STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64])] + (v19.word0 + (v14 + v4)), Panic(17)); // arithmetic overflow or underflow
require(STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 1] <= STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 1] + (v19.word2 + _type), Panic(17)); // arithmetic overflow or underflow
MEM[v5] = v1;
MEM[32] = 3;
STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64])] = STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64])] + (v19.word0 + (v14 + v4));
STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 1] = STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 1] + (v19.word2 + _type);
STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 2] = STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 2];
} else {
MEM[v5] = _borrow;
MEM[32] = 3;
STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 2] = v1;
require(!((MEM[64] + 96 > uint64.max) | (MEM[64] + 96 < MEM[64])), Panic(65)); // failed memory allocation (too much memory)
MEM[v5] = v1;
MEM[32] = 3;
STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64])] = v19.word0 + (v14 + v4);
STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 1] = v19.word2 + _type;
STORAGE[keccak256(MEM[v46a_0x3:v46a_0x3 + 64]) + 2] = v5;
_borrow = v1;
}
if (!stor_4) {
if (!_borrow) {
stor_4 = v1;
} else {
stor_4 = _borrow;
}
v21 = this.code.size;
}
require(_getCirculatingSupply <= _getCirculatingSupply + _type, Panic(17)); // arithmetic overflow or underflow
_getCirculatingSupply = _getCirculatingSupply + _type;
require(stor_2 <= stor_2 + (v14 + v4), Panic(17)); // arithmetic overflow or underflow
stor_2 = stor_2 + (v14 + v4);
v22, /* bool */ v23 = address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c).transferFrom(msg.sender, address(this), _type).value(v5).gas(msg.gas);
require(v22, MEM[64], RETURNDATASIZE());
if (v22) {
v24 = v25 = 32;
if (32 > RETURNDATASIZE()) {
v24 = v26 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v24 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v24 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + (~0x1f & v24 + 31);
require(MEM[64] + v24 - MEM[64] >= 32, v5, v5);
require(!(v23 - bool(v23)));
v27 = this.code.size;
}
v28, /* bool */ v29 = address(0x4300000000000000000000000000000000000004).transfer(address(0x46b), v14 + v4).value(v5).gas(msg.gas);
require(v28, MEM[64], RETURNDATASIZE());
if (v28) {
v30 = v31 = 32;
if (32 > RETURNDATASIZE()) {
v30 = v32 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v30 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v30 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v30 - MEM[64] >= 32, v5, v5);
require(!(v29 - bool(v29)));
}
emit Borrow(address(0x46b), _type, v14 + v4, v2);
return v14 + v4, v2;
}
}
function 0xbf3a9c72() public nonPayable {
require(msg.data.length + ~3 >= 0);
return address(0xc056b34f2afa70ee1351e3659dfbd2097765275);
}
function bAsset() public nonPayable {
require(msg.data.length + ~3 >= 0);
return address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c);
}
function PRECISION() public nonPayable {
require(msg.data.length + ~3 >= 0);
return 10 ** 18;
}
function 0xa297ceb6() public nonPayable {
require(msg.data.length + ~3 >= 0);
return stor_4;
}
function 0x982f3bfd() public nonPayable {
require(msg.data.length + ~3 >= 0);
v0, v1 = 0x279b();
return bool(v0);
}
function 0x8a756bb6(address varg0, uint256 varg1, uint256 varg2) public nonPayable {
require(~3 + msg.data.length >= 96);
v0, v1, v2, v3 = 0x2682(varg0, varg1);
return v2, v1, v0;
}
function 0x844b6846() public nonPayable {
require(msg.data.length + ~3 >= 0);
v0 = 0x262b();
return bool(v0);
}
function rebalance() public nonPayable {
require(msg.data.length + ~3 >= 0);
v0 = 0x260e();
return bool(v0);
}
function 0x77378973() public nonPayable {
require(msg.data.length + ~3 >= 0);
return _borrow;
}
function getInterest(uint256 _ltv, uint256 _amount) public nonPayable {
require(~3 + msg.data.length >= 64);
require((_ltv * _amount / _ltv == _amount) | !_ltv, Panic(17)); // arithmetic overflow or underflow
require(!(0x68d3b1390934 * (_ltv * _amount > 0x2712ed2ba3867e0019368706e2440c97712712a63f1ed215c7401)));
return _ltv * _amount * 0x68d3b1390934 / 10 ** 18;
}
function 0x6f6781d3(uint256 varg0) public nonPayable {
require(~3 + msg.data.length >= 32);
require(varg0 < 3);
v0 = new uint256[](2);
require(!((v0 + 96 > uint64.max) | (v0 + 96 < v0)), Panic(65)); // failed memory allocation (too much memory)
MEM[v0.data] = 0;
MEM[v0 + 64] = 0;
require(!(int24(int24(stor_0_3_5 / 200) * 200) - int24(stor_0_3_5 / 200) * 200), Panic(17)); // arithmetic overflow or underflow
v1 = v2 = 200 + int24(int24(stor_0_3_5 / 200) * 200);
require(!((v2 < ~int24.max) | (v2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
require(!((200 + stor_0_0_2 < ~int24.max) | (200 + stor_0_0_2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
if (int24(200 + stor_0_0_2) > stor_0_3_5) {
v1 = 200 + stor_0_0_2;
require(!((v1 < ~int24.max) | (v1 > int24.max)), Panic(17)); // arithmetic overflow or underflow
}
v1 = v3 = 0xcb2c8;
if (int24(v1) > v3) {
v4 = this.code.size;
}
if (varg0) {
if (varg0 - 1) {
if (varg0 == 2) {
MEM[v0.data] = int24(v1);
require(!((55000 + int24(v1) < ~int24.max) | (55000 + int24(v1) > int24.max)), Panic(17)); // arithmetic overflow or underflow
MEM[v0 + 64] = int24(55000 + int24(v1));
v5 = this.code.size;
}
} else {
require(!((200 + stor_0_0_2 < ~int24.max) | (200 + stor_0_0_2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
MEM[v0.data] = int24(200 + stor_0_0_2);
MEM[v0 + 64] = int24(v1);
}
} else {
MEM[v0.data] = stor_0_0_2;
require(!((200 + stor_0_0_2 < ~int24.max) | (200 + stor_0_0_2 > int24.max)), Panic(17)); // arithmetic overflow or underflow
MEM[v0 + 64] = int24(200 + stor_0_0_2);
}
v6 = new uint256[](v0.length);
require(v0.length < 3, Panic(33)); // failed convertion to enum type
MEM[v6.data] = int24(MEM[v0.data]);
return v0.length, int24(MEM[v0.data]), int24(MEM[v0 + 64]);
}
function 0x4c69a6c9() public nonPayable {
require(msg.data.length + ~3 >= 0);
return 10000;
}
function 0x46b0575d(uint256 varg0) public nonPayable {
require(~3 + msg.data.length >= 32);
return varg0 / 0x15180;
}
function 0x421a99d3(uint256 varg0, uint256 varg1, int24 varg2) public nonPayable {
require(~3 + msg.data.length >= 96);
v0 = new struct(3);
require(!((v0 + 96 > uint64.max) | (v0 + 96 < v0)), Panic(65)); // failed memory allocation (too much memory)
require(varg0 < 3);
v0.word0 = varg0;
require(!(varg1 - int24(varg1)));
v0.word1 = varg1;
v0.word2 = varg2;
v1 = 0x231b(v0);
return uint128(v1);
}
function 0x3bcc2f54(address varg0, uint256 varg1, address varg2, int24 varg3, uint256 varg4) public nonPayable {
require(~3 + msg.data.length >= 160);
require(!(varg1 - address(varg1)));
require(!(varg2 - int24(varg2)));
v0, /* bool */ v1 = address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c).approve(address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00), ~0).gas(msg.gas);
require(v0, MEM[64], RETURNDATASIZE());
if (v0) {
v2 = v3 = 32;
if (32 > RETURNDATASIZE()) {
v2 = v4 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v2 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v2 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + (~0x1f & v2 + 31);
require(MEM[64] + v2 - MEM[64] >= 32);
require(!(v1 - bool(v1)));
v5 = this.code.size;
}
v6, /* bool */ v7 = address(0x4300000000000000000000000000000000000004).approve(address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00), ~0).gas(msg.gas);
require(v6, MEM[64], RETURNDATASIZE());
if (v6) {
v8 = v9 = 32;
if (32 > RETURNDATASIZE()) {
v8 = v10 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v8 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v8 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + (~0x1f & v8 + 31);
require(MEM[64] + v8 - MEM[64] >= 32);
require(!(v7 - bool(v7)));
v11 = this.code.size;
}
v12 = 0x3018(varg2);
require((address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00)).code.size);
v13, /* uint256 */ v14 = address(0x1d16788b97edb7d9a6ae66d5c5c16469037faa00).initialize(address(v12)).gas(msg.gas);
require(v13, v14, RETURNDATASIZE());
if (v13) {
require(MEM[64] <= uint64.max, Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64];
}
0x2e2c(varg2, varg2);
v15 = 0x2419();
v16, v17, v18 = 0x3589(v15, varg3);
v19 = 0x2528();
v20, v21, v22 = 0x3589(v19, varg4);
if (varg0) {
v23, /* uint256 */ v24 = varg0.seed().gas(msg.gas);
require(v23, MEM[64], RETURNDATASIZE());
if (v23) {
v25 = v26 = 32;
if (32 > RETURNDATASIZE()) {
v25 = v27 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v25 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v25 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
require(MEM[64] + v25 - MEM[64] >= 32);
v28 = this.code.size;
}
v29, /* bool */ v30 = address(0x4300000000000000000000000000000000000004).approve(address(varg1), v24).gas(msg.gas);
require(v29, MEM[64], RETURNDATASIZE());
if (v29) {
v31 = v32 = 32;
if (32 > RETURNDATASIZE()) {
v31 = v33 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v31 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v31 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + (~0x1f & v31 + 31);
require(MEM[64] + v31 - MEM[64] >= 32);
require(!(v30 - bool(v30)));
v34 = this.code.size;
}
require(block.timestamp <= block.timestamp + 1, Panic(17)); // arithmetic overflow or underflow
require(!((MEM[64] + 256 < MEM[64]) | (MEM[64] + 256 > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
v35 = address(varg1).exactInputSingle(address(0x4300000000000000000000000000000000000004), address(0x20fe91f17ec9080e3cac2d688b4ecb48c5ac3a9c), uint24(10000), varg0, block.timestamp + 1, v24, 0, address(0x0)).gas(msg.gas);
require(v35, MEM[64], RETURNDATASIZE());
if (v35) {
v36 = v37 = 32;
if (v37 > RETURNDATASIZE()) {
v36 = v38 = RETURNDATASIZE();
}
require(!((MEM[64] + (~0x1f & v36 + 31) < MEM[64]) | (MEM[64] + (~0x1f & v36 + 31) > uint64.max)), Panic(65)); // failed memory allocation (too much memory)
MEM[64] = MEM[64] + (~0x1f & v36 + 31);
require(MEM[64] + v36 - MEM[64] >= v37);
v39 = this.code.size;
}
return ;
} else {
return ;
}
}
// Note: The function selector is not present in the original solidity code.
// However, we display it for the sake of completeness.
function function_selector( function_selector) public payable {
MEM[64] = 128;
require(msg.data.length >= 4);
v0 = function_selector >> 224;
if (0x1865b46 == v0) {
0x01865b46(128, v0);
} else if (0x78ddea6 == v0) {
0x078ddea6(v0);
} else if (0x7ed68dd == v0) {
0x07ed68dd(v0);
} else if (0x84b0a97 == v0) {
0x084b0a97(v0);
} else if (0x93215ff == v0) {
0x093215ff(v0);
} else if (0xa87c66a == v0) {
0x0a87c66a(v0);
} else if (0xde00e72 == v0) {
canShift();
} else if (0x11d7b7ff == v0) {
0x11d7b7ff(v0);
} else if (0x12fc41ca == v0) {
shift();
} else if (0x16f0115b == v0) {
pool();
} else if (0x1740e153 == v0) {
0x1740e153(v0);
} else if (0x22867d78 == v0) {
repay(address,uint256);
} else if (0x22b164f4 == v0) {
0x22b164f4(v0);
} else if (0x2a33d6b2 == v0) {
getFloorPrice();
} else if (0x2b112e49 == v0) {
getCirculatingSupply();
} else if (0x38570026 == v0) {
0x38570026(v0);
} else if (0x3b47ef56 == v0) {
0x3b47ef56(v0);
} else if (0x3bcc2f54 == v0) {
0x3bcc2f54(v0);
} else if (0x421a99d3 == v0) {
0x421a99d3(v0);
} else if (0x46b0575d == v0) {
0x46b0575d(v0);
} else if (0x4c69a6c9 == v0) {
0x4c69a6c9(v0);
} else if (0x6f6781d3 == v0) {
0x6f6781d3(v0);
} else if (0x728af7ec == v0) {
getInterest(uint256,uint256);
} else if (0x77378973 == v0) {
0x77378973(v0);
} else if (0x7d7c2a1c == v0) {
rebalance();
} else if (0x844b6846 == v0) {
0x844b6846(v0);
} else if (0x8a756bb6 == v0) {
0x8a756bb6(v0);
} else if (0x982f3bfd == v0) {
0x982f3bfd(v0);
} else if (0xa297ceb6 == v0) {
0xa297ceb6(v0);
} else if (0xaaf5eb68 == v0) {
PRECISION();
} else if (0xb8ab24bd == v0) {
bAsset();
} else if (0xbf3a9c72 == v0) {
0xbf3a9c72(v0);
} else if (0xc1bce0b7 == v0) {
borrow(address,uint256,uint256);
} else if (0xc85b967d == v0) {
REBALANCE_THRESHOLD();
} else if (0xcd3293de == v0) {
reserve();
} else if (0xd3487997 == v0) {
uniswapV3MintCallback(uint256,uint256,bytes);
} else if (0xf1740b54 == v0) {
0xf1740b54(v0);
} else {
require(0xf3c41d26 == v0);
0xf3c41d26();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment