2019-03-26 16:35:26 +00:00
|
|
|
{
|
|
|
|
let x := 1
|
|
|
|
let y := 1
|
|
|
|
let a := 7
|
|
|
|
let b := 9
|
|
|
|
for { } calldataload(0) { }
|
|
|
|
{
|
|
|
|
y := 9
|
|
|
|
mstore(a, 7)
|
|
|
|
if callvalue() {
|
|
|
|
x := 2
|
|
|
|
for {} calldataload(1) {}
|
|
|
|
{
|
|
|
|
a := 2 // can be removed
|
|
|
|
if eq(x, 3) {
|
|
|
|
b := 3 // cannot be removed
|
|
|
|
y := 2 // will be removed
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mstore(b, 2)
|
|
|
|
break
|
|
|
|
}
|
|
|
|
if eq(callvalue(), 3) {
|
|
|
|
x := 12
|
|
|
|
y := 12
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
x := 3
|
|
|
|
mstore(y, 3)
|
|
|
|
}
|
|
|
|
mstore(x, 0x42)
|
|
|
|
}
|
|
|
|
// ----
|
2021-11-23 09:42:18 +00:00
|
|
|
// step: unusedAssignEliminator
|
2020-03-17 22:31:56 +00:00
|
|
|
//
|
2019-03-26 16:35:26 +00:00
|
|
|
// {
|
|
|
|
// let x := 1
|
|
|
|
// let y := 1
|
|
|
|
// let a := 7
|
|
|
|
// let b := 9
|
2019-05-08 10:41:19 +00:00
|
|
|
// for { } calldataload(0) { }
|
2019-03-26 16:35:26 +00:00
|
|
|
// {
|
|
|
|
// y := 9
|
|
|
|
// mstore(a, 7)
|
|
|
|
// if callvalue()
|
|
|
|
// {
|
|
|
|
// x := 2
|
2019-05-08 10:41:19 +00:00
|
|
|
// for { } calldataload(1) { }
|
2019-03-26 16:35:26 +00:00
|
|
|
// {
|
|
|
|
// if eq(x, 3)
|
|
|
|
// {
|
|
|
|
// b := 3
|
|
|
|
// continue
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// mstore(b, 2)
|
|
|
|
// break
|
|
|
|
// }
|
|
|
|
// if eq(callvalue(), 3)
|
|
|
|
// {
|
|
|
|
// x := 12
|
|
|
|
// continue
|
|
|
|
// }
|
|
|
|
// x := 3
|
|
|
|
// mstore(y, 3)
|
|
|
|
// }
|
|
|
|
// mstore(x, 0x42)
|
|
|
|
// }
|