Lot of noise in output
- Dominant language
- C++
- Stars
- 8.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Exe: https://github.com/rfalke/decompiler-subjects/blob/master/from_holdec/dmi/cfg/ia32_elf/subject.exe
Retdec: d57764a
Source (similar to):
```
int basic_5_head_controlled_loop(int arg) {
puts("before");
while (arg != 42) {
puts("body");
arg++;
}
puts("after");
return 0;
}
```
Output:
```
// Address range: 0x8049110 - 0x8049153
int32_t basic_5_head_controlled_loop(int32_t a1) {
char * str = "before"; // bp-28
puts("before");
int32_t v1; // bp-12
int32_t v2 = &v1; // 0x8049122
if (a1 == 42) {
// 0x804913f
*(int32_t *)(v2 - 16) = (int32_t)"after";
puts(str);
g1 = *(int32_t *)(g2 + 24);
return 0;
}
*(int32_t *)(v2 - 16) = (int32_t)"body";
puts(str);
int32_t v3 = g2 + 16; // 0x804913a
while (a1 != 41) {
// 0x804912a
a1++;
*(int32_t *)(v3 - 16) = (int32_t)"body";
puts(str);
v3 = g2 + 16;
// continue -> 0x804912a
}
// 0x804913f
*(int32_t *)(v3 - 16) = (int32_t)"after";
puts(str);
g1 = *(int32_t *)(g2 + 24);
return 0;
}
```
There are a lot of unnecessary statements which should be removed.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.