mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
126 lines
5.7 KiB
Plaintext
126 lines
5.7 KiB
Plaintext
Optimized IR:
|
|
/// @use-src 0:"name_simplifier/input.sol"
|
|
object "C_59" {
|
|
code {
|
|
{
|
|
/// @src 0:346:625 "contract C {..."
|
|
let _1 := memoryguard(0x80)
|
|
mstore(64, _1)
|
|
if callvalue() { revert(0, 0) }
|
|
let _2 := datasize("C_59_deployed")
|
|
codecopy(_1, dataoffset("C_59_deployed"), _2)
|
|
return(_1, _2)
|
|
}
|
|
}
|
|
/// @use-src 0:"name_simplifier/input.sol"
|
|
object "C_59_deployed" {
|
|
code {
|
|
{
|
|
/// @src 0:346:625 "contract C {..."
|
|
let _1 := memoryguard(0x80)
|
|
let _2 := 4
|
|
if iszero(lt(calldatasize(), _2))
|
|
{
|
|
if eq(0xf8eddcc6, shr(224, calldataload(0)))
|
|
{
|
|
if callvalue() { revert(0, 0) }
|
|
let _3 := 32
|
|
if slt(add(calldatasize(), not(3)), _3) { revert(0, 0) }
|
|
let offset := calldataload(_2)
|
|
let _4 := 0xffffffffffffffff
|
|
if gt(offset, _4) { revert(0, 0) }
|
|
if iszero(slt(add(offset, 35), calldatasize())) { revert(0, 0) }
|
|
let _5 := calldataload(add(_2, offset))
|
|
let _6 := 36
|
|
if gt(_5, _4)
|
|
{
|
|
mstore(0, shl(224, 0x4e487b71))
|
|
mstore(_2, 0x41)
|
|
revert(0, _6)
|
|
}
|
|
let _7 := shl(5, _5)
|
|
let _8 := not(31)
|
|
let newFreePtr := add(_1, and(add(_7, 63), _8))
|
|
if or(gt(newFreePtr, _4), lt(newFreePtr, _1))
|
|
{
|
|
mstore(0, shl(224, 0x4e487b71))
|
|
mstore(_2, 0x41)
|
|
revert(0, _6)
|
|
}
|
|
let _9 := 64
|
|
mstore(_9, newFreePtr)
|
|
let dst := _1
|
|
mstore(_1, _5)
|
|
dst := add(_1, _3)
|
|
let dst_1 := dst
|
|
let srcEnd := add(add(offset, _7), _6)
|
|
if gt(srcEnd, calldatasize()) { revert(0, 0) }
|
|
let src := add(offset, _6)
|
|
for { } lt(src, srcEnd) { src := add(src, _3) }
|
|
{
|
|
if slt(sub(calldatasize(), src), _3) { revert(0, 0) }
|
|
let memPtr := mload(_9)
|
|
let newFreePtr_1 := add(memPtr, _3)
|
|
if or(gt(newFreePtr_1, _4), lt(newFreePtr_1, memPtr))
|
|
{
|
|
mstore(0, shl(224, 0x4e487b71))
|
|
mstore(_2, 0x41)
|
|
revert(0, _6)
|
|
}
|
|
mstore(_9, newFreePtr_1)
|
|
mstore(memPtr, calldataload(src))
|
|
mstore(dst, memPtr)
|
|
dst := add(dst, _3)
|
|
}
|
|
if iszero(mload(_1))
|
|
{
|
|
mstore(0, shl(224, 0x4e487b71))
|
|
mstore(_2, 0x32)
|
|
revert(0, _6)
|
|
}
|
|
sstore(0, mload(/** @src 0:469:474 "_s[0]" */ mload(dst_1)))
|
|
/// @src 0:346:625 "contract C {..."
|
|
if iszero(lt(/** @src 0:492:493 "1" */ 0x01, /** @src 0:346:625 "contract C {..." */ mload(_1)))
|
|
{
|
|
mstore(0, shl(224, 0x4e487b71))
|
|
mstore(_2, 0x32)
|
|
revert(0, _6)
|
|
}
|
|
let _10 := mload(/** @src 0:489:494 "_s[1]" */ mload(/** @src 0:346:625 "contract C {..." */ add(_1, _9)))
|
|
sstore(0x02, _10)
|
|
let memPtr_1 := mload(_9)
|
|
let newFreePtr_2 := add(memPtr_1, 160)
|
|
if or(gt(newFreePtr_2, _4), lt(newFreePtr_2, memPtr_1))
|
|
{
|
|
mstore(0, shl(224, 0x4e487b71))
|
|
mstore(_2, 0x41)
|
|
revert(0, _6)
|
|
}
|
|
mstore(_9, newFreePtr_2)
|
|
mstore(memPtr_1, 100)
|
|
mstore(add(memPtr_1, _3), "longstringlongstringlongstringlo")
|
|
mstore(add(memPtr_1, _9), "ngstringlongstringlongstringlong")
|
|
let _11 := 96
|
|
mstore(add(memPtr_1, _11), "stringlongstringlongstringlongst")
|
|
mstore(add(memPtr_1, 128), "ring")
|
|
let memPos := mload(_9)
|
|
mstore(memPos, _10)
|
|
mstore(add(memPos, _3), _9)
|
|
let length := mload(memPtr_1)
|
|
mstore(add(memPos, _9), length)
|
|
let i := 0
|
|
for { } lt(i, length) { i := add(i, _3) }
|
|
{
|
|
mstore(add(add(memPos, i), _11), mload(add(add(memPtr_1, i), _3)))
|
|
}
|
|
mstore(add(add(memPos, length), _11), 0)
|
|
return(memPos, add(sub(add(memPos, and(add(length, 31), _8)), memPos), _11))
|
|
}
|
|
}
|
|
revert(0, 0)
|
|
}
|
|
}
|
|
data ".metadata" hex"<BYTECODE REMOVED>"
|
|
}
|
|
}
|