#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ ezp_copy_file(char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ unlink(char *);
void ezp_special_process() {
  printf("\nezp_special_process()\n");
  system("cp /web/writeflash_detect0.html  /tmp/writeflash_detect1.html");
  system("echo \"0\" > /proc/sys/net/ipv4/ip_forward");
  if (ezp_copy_file("/bin/busybox", "/tmp/busybox")) {
    printf("copy /bin/busybox to /tmp/busybox failed\n");
  }
  if (ezp_copy_file("/tmp/busybox", "/bin/busybox")) {
    printf("copy /tmp/busybox to /bin/busybox failed\n");
  }
  if (ezp_copy_file("/lib/libuClibc-0.9.29.so", "/tmp/libuClibc-0.9.29.so")) {
    printf("copy /lib/libuClibc-0.9.29.so /tmp/libuClibc-0.9.29.so failed\n");
  }
  if (ezp_copy_file("/tmp/libuClibc-0.9.29.so", "/lib/libuClibc-0.9.29.so")) {
    printf("copy /tmp/libuClibc-0.9.29.so /lib/libuClibc-0.9.29.so failed\n");
  }
  if (ezp_copy_file("/lib/ld-uClibc-0.9.29.so", "/tmp/ld-uClibc-0.9.29.so")) {
    printf("copy /lib/ld-uClibc-0.9.29.so /tmp/ld-uClibc-0.9.29.so failed\n");
  }
  if (ezp_copy_file("/tmp/ld-uClibc-0.9.29.so", "/lib/ld-uClibc-0.9.29.so")) {
    printf("copy /tmp/ld-uClibc-0.9.29.so /lib/ld-uClibc-0.9.29.so failed\n");
  }
  if (ezp_copy_file("/lib/libdl-0.9.29.so", "/tmp/libdl-0.9.29.so")) {
    printf("copy /lib/libdl-0.9.29.so /tmp/libdl-0.9.29.so failed\n");
  }
  if (ezp_copy_file("/tmp/libdl-0.9.29.so", "/lib/libdl-0.9.29.so")) {
    printf("copy /tmp/libdl-0.9.29.so /lib/libdl-0.9.29.so failed\n");
  }
  if (ezp_copy_file("/lib/libm-0.9.29.so", "/tmp/libm-0.9.29.so")) {
    printf("copy /lib/libm-0.9.29.so /tmp/libm-0.9.29.so failed\n");
  }
  if (ezp_copy_file("/tmp/libm-0.9.29.so", "/lib/libm-0.9.29.so")) {
    printf("copy /tmp/libm-0.9.29.so /lib/libm-0.9.29.so failed\n");
  }
  if (ezp_copy_file("/lib/libnsl-0.9.29.so", "/tmp/libnsl-0.9.29.so")) {
    printf("copy /lib/libnsl-0.9.29.so /tmp/libnsl-0.9.29.so failed\n");
  }
  if (ezp_copy_file("/tmp/libnsl-0.9.29.so", "/lib/libnsl-0.9.29.so")) {
    printf("copy /tmp/libnsl-0.9.29.so /lib/libnsl-0.9.29.so failed\n");
  }
  if (ezp_copy_file("/lib/libutil-0.9.29.so", "/tmp/libutil-0.9.29.so")) {
    printf("copy /lib/libutil-0.9.29.so /tmp/libutil-0.9.29.so failed\n");
  }
  if (ezp_copy_file("/tmp/libutil-0.9.29.so", "/lib/libutil-0.9.29.so")) {
    printf("copy /tmp/libutil-0.9.29.so /lib/libutil-0.9.29.so failed\n");
  }
  if (ezp_copy_file("/usr/lib/libnvram.so", "/tmp/libnvram.so")) {
    printf("copy /usr/lib/libnvram.so /tmp/libnvram.so failed\n");
  }
  if (ezp_copy_file("/tmp/libnvram.so", "/usr/lib/libnvram.so")) {
    printf("copy /tmp/libnvram.so /usr/lib/libnvram.so failed\n");
  }
  if (ezp_copy_file("/usr/lib/libshared.so", "/tmp/libshared.so")) {
    printf("copy /usr/lib/libshared.so /tmp/libshared.so failed\n");
  }
  if (ezp_copy_file("/tmp/libshared.so", "/usr/lib/libshared.so")) {
    printf("copy /tmp/libshared.so /usr/lib/libshared.so failed\n");
  }
  unlink("/sbin/reboot");
  unlink("/bin/sync");
  system("chmod 777 /tmp/busybox");
}


x86 assembly (clang, -O0):
<ezp_special_process>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1050 <printf@plt>
lea    0xec1(%rip),%rdi
call   1040 <system@plt>
lea    0xef3(%rip),%rdi
call   1040 <system@plt>
lea    0xf10(%rip),%rdi
lea    0x1475(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     1191 <ezp_special_process+0x51>
lea    0xf00(%rip),%rdi
call   1050 <printf@plt>
lea    0x1453(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     11ba <ezp_special_process+0x7a>
lea    0xf01(%rip),%rdi
call   1050 <printf@plt>
lea    0xf1f(%rip),%rdi
lea    0xf31(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     11e3 <ezp_special_process+0xa3>
lea    0xf34(%rip),%rdi
call   1050 <printf@plt>
lea    0xf0f(%rip),%rdi
lea    0xeef(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     120c <ezp_special_process+0xcc>
lea    0xf4a(%rip),%rdi
call   1050 <printf@plt>
lea    0xf7d(%rip),%rdi
lea    0xf8f(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     1235 <ezp_special_process+0xf5>
lea    0xf92(%rip),%rdi
call   1050 <printf@plt>
lea    0xf6d(%rip),%rdi
lea    0xf4d(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     125e <ezp_special_process+0x11e>
lea    0xfa8(%rip),%rdi
call   1050 <printf@plt>
lea    0xfdb(%rip),%rdi
lea    0xfe9(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     1287 <ezp_special_process+0x147>
lea    0xfe8(%rip),%rdi
call   1050 <printf@plt>
lea    0xfc7(%rip),%rdi
lea    0xfab(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     12b0 <ezp_special_process+0x170>
lea    0xff6(%rip),%rdi
call   1050 <printf@plt>
lea    0x1021(%rip),%rdi
lea    0x102e(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     12d9 <ezp_special_process+0x199>
lea    0x102c(%rip),%rdi
call   1050 <printf@plt>
lea    0x100c(%rip),%rdi
lea    0xff1(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     1302 <ezp_special_process+0x1c2>
lea    0x1038(%rip),%rdi
call   1050 <printf@plt>
lea    0x1061(%rip),%rdi
lea    0x1070(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     132b <ezp_special_process+0x1eb>
lea    0x1070(%rip),%rdi
call   1050 <printf@plt>
lea    0x104e(%rip),%rdi
lea    0x1031(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     1354 <ezp_special_process+0x214>
lea    0x1080(%rip),%rdi
call   1050 <printf@plt>
lea    0x10ad(%rip),%rdi
lea    0x10bd(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     137d <ezp_special_process+0x23d>
lea    0x10be(%rip),%rdi
call   1050 <printf@plt>
lea    0x109b(%rip),%rdi
lea    0x107d(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     13a6 <ezp_special_process+0x266>
lea    0x10d0(%rip),%rdi
call   1050 <printf@plt>
lea    0x10ff(%rip),%rdi
lea    0x110d(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     13cf <ezp_special_process+0x28f>
lea    0x1108(%rip),%rdi
call   1050 <printf@plt>
lea    0x10eb(%rip),%rdi
lea    0x10cf(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     13f8 <ezp_special_process+0x2b8>
lea    0x1112(%rip),%rdi
call   1050 <printf@plt>
lea    0x1139(%rip),%rdi
lea    0x1148(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     1421 <ezp_special_process+0x2e1>
lea    0x1144(%rip),%rdi
call   1050 <printf@plt>
lea    0x1126(%rip),%rdi
lea    0x1109(%rip),%rsi
call   1060 <ezp_copy_file@plt>
cmp    $0x0,%rax
je     144a <ezp_special_process+0x30a>
lea    0x1150(%rip),%rdi
call   1050 <printf@plt>
lea    0x1179(%rip),%rdi
call   1030 <unlink@plt>
lea    0x117a(%rip),%rdi
call   1030 <unlink@plt>
lea    0x1178(%rip),%rdi
call   1040 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ezp_special_process>:
push   %rax
lea    0x10b8(%rip),%rdi
call   1040 <puts@plt>
lea    0xeac(%rip),%rdi
call   1050 <system@plt>
lea    0xede(%rip),%rdi
call   1050 <system@plt>
lea    0xefb(%rip),%rdi
lea    0x1080(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     1189 <ezp_special_process+0x49>
lea    0x1438(%rip),%rdi
call   1040 <puts@plt>
lea    0x1063(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     11ad <ezp_special_process+0x6d>
lea    0x13eb(%rip),%rdi
call   1040 <puts@plt>
lea    0xec0(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     11d1 <ezp_special_process+0x91>
lea    0x1389(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb5(%rip),%rdi
lea    0xe95(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     11f5 <ezp_special_process+0xb5>
lea    0x1327(%rip),%rdi
call   1040 <puts@plt>
lea    0xeaa(%rip),%rdi
lea    0xebc(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     1219 <ezp_special_process+0xd9>
lea    0x12c5(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9f(%rip),%rdi
lea    0xe7f(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     123d <ezp_special_process+0xfd>
lea    0x1263(%rip),%rdi
call   1040 <puts@plt>
lea    0xe94(%rip),%rdi
lea    0xea2(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     1261 <ezp_special_process+0x121>
lea    0x1209(%rip),%rdi
call   1040 <puts@plt>
lea    0xe85(%rip),%rdi
lea    0xe69(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     1285 <ezp_special_process+0x145>
lea    0x11af(%rip),%rdi
call   1040 <puts@plt>
lea    0xe76(%rip),%rdi
lea    0xe83(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     12a9 <ezp_special_process+0x169>
lea    0x1157(%rip),%rdi
call   1040 <puts@plt>
lea    0xe66(%rip),%rdi
lea    0xe4b(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     12cd <ezp_special_process+0x18d>
lea    0x10ff(%rip),%rdi
call   1040 <puts@plt>
lea    0xe56(%rip),%rdi
lea    0xe65(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     12f1 <ezp_special_process+0x1b1>
lea    0x10a3(%rip),%rdi
call   1040 <puts@plt>
lea    0xe48(%rip),%rdi
lea    0xe2b(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     1315 <ezp_special_process+0x1d5>
lea    0x1047(%rip),%rdi
call   1040 <puts@plt>
lea    0xe3a(%rip),%rdi
lea    0xe4a(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     1339 <ezp_special_process+0x1f9>
lea    0xfe9(%rip),%rdi
call   1040 <puts@plt>
lea    0xe2d(%rip),%rdi
lea    0xe0f(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     135d <ezp_special_process+0x21d>
lea    0xf8b(%rip),%rdi
call   1040 <puts@plt>
lea    0xe20(%rip),%rdi
lea    0xe2e(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     1381 <ezp_special_process+0x241>
lea    0xf35(%rip),%rdi
call   1040 <puts@plt>
lea    0xe11(%rip),%rdi
lea    0xdf5(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     13a5 <ezp_special_process+0x265>
lea    0xedf(%rip),%rdi
call   1040 <puts@plt>
lea    0xdfe(%rip),%rdi
lea    0xe0d(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     13c9 <ezp_special_process+0x289>
lea    0xe87(%rip),%rdi
call   1040 <puts@plt>
lea    0xdf0(%rip),%rdi
lea    0xdd3(%rip),%rsi
call   1060 <ezp_copy_file@plt>
test   %rax,%rax
je     13ed <ezp_special_process+0x2ad>
lea    0xe2f(%rip),%rdi
call   1040 <puts@plt>
lea    0xdde(%rip),%rdi
call   1030 <unlink@plt>
lea    0xddf(%rip),%rdi
call   1030 <unlink@plt>
lea    0xddd(%rip),%rdi
pop    %rax
jmp    1050 <system@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"\0Aezp_special_process()\0A\00"
@.str.1 = [62 x i8] c"cp /web/writeflash_detect0.html /tmp/writeflash_detect1.html\00"
@.str.2 = [41 x i8] c"echo \220\22 > /proc/sys/net/ipv4/ip_forward\00"
@.str.3 = [13 x i8] c"/bin/busybox\00"
@.str.4 = [13 x i8] c"/tmp/busybox\00"
@.str.5 = [42 x i8] c"copy /bin/busybox to /tmp/busybox failed\0A\00"
@.str.6 = [42 x i8] c"copy /tmp/busybox to /bin/busybox failed\0A\00"
@.str.7 = [25 x i8] c"/lib/libuClibc-0.9.29.so\00"
@.str.8 = [25 x i8] c"/tmp/libuClibc-0.9.29.so\00"
@.str.9 = [63 x i8] c"copy /lib/libuClibc-0.9.29.so /tmp/libuClibc-0.9.29.so failed\0A\00"
@.str.10 = [63 x i8] c"copy /tmp/libuClibc-0.9.29.so /lib/libuClibc-0.9.29.so failed\0A\00"
@.str.11 = [25 x i8] c"/lib/ld-uClibc-0.9.29.so\00"
@.str.12 = [25 x i8] c"/tmp/ld-uClibc-0.9.29.so\00"
@.str.13 = [63 x i8] c"copy /lib/ld-uClibc-0.9.29.so /tmp/ld-uClibc-0.9.29.so failed\0A\00"
@.str.14 = [63 x i8] c"copy /tmp/ld-uClibc-0.9.29.so /lib/ld-uClibc-0.9.29.so failed\0A\00"
@.str.15 = [21 x i8] c"/lib/libdl-0.9.29.so\00"
@.str.16 = [21 x i8] c"/tmp/libdl-0.9.29.so\00"
@.str.17 = [55 x i8] c"copy /lib/libdl-0.9.29.so /tmp/libdl-0.9.29.so failed\0A\00"
@.str.18 = [55 x i8] c"copy /tmp/libdl-0.9.29.so /lib/libdl-0.9.29.so failed\0A\00"
@.str.19 = [20 x i8] c"/lib/libm-0.9.29.so\00"
@.str.20 = [20 x i8] c"/tmp/libm-0.9.29.so\00"
@.str.21 = [53 x i8] c"copy /lib/libm-0.9.29.so /tmp/libm-0.9.29.so failed\0A\00"
@.str.22 = [53 x i8] c"copy /tmp/libm-0.9.29.so /lib/libm-0.9.29.so failed\0A\00"
@.str.23 = [22 x i8] c"/lib/libnsl-0.9.29.so\00"
@.str.24 = [22 x i8] c"/tmp/libnsl-0.9.29.so\00"
@.str.25 = [57 x i8] c"copy /lib/libnsl-0.9.29.so /tmp/libnsl-0.9.29.so failed\0A\00"
@.str.26 = [57 x i8] c"copy /tmp/libnsl-0.9.29.so /lib/libnsl-0.9.29.so failed\0A\00"
@.str.27 = [23 x i8] c"/lib/libutil-0.9.29.so\00"
@.str.28 = [23 x i8] c"/tmp/libutil-0.9.29.so\00"
@.str.29 = [59 x i8] c"copy /lib/libutil-0.9.29.so /tmp/libutil-0.9.29.so failed\0A\00"
@.str.30 = [59 x i8] c"copy /tmp/libutil-0.9.29.so /lib/libutil-0.9.29.so failed\0A\00"
@.str.31 = [21 x i8] c"/usr/lib/libnvram.so\00"
@.str.32 = [17 x i8] c"/tmp/libnvram.so\00"
@.str.33 = [51 x i8] c"copy /usr/lib/libnvram.so /tmp/libnvram.so failed\0A\00"
@.str.34 = [51 x i8] c"copy /tmp/libnvram.so /usr/lib/libnvram.so failed\0A\00"
@.str.35 = [22 x i8] c"/usr/lib/libshared.so\00"
@.str.36 = [18 x i8] c"/tmp/libshared.so\00"
@.str.37 = [53 x i8] c"copy /usr/lib/libshared.so /tmp/libshared.so failed\0A\00"
@.str.38 = [53 x i8] c"copy /tmp/libshared.so /usr/lib/libshared.so failed\0A\00"
@.str.39 = [13 x i8] c"/sbin/reboot\00"
@.str.40 = [10 x i8] c"/bin/sync\00"
@.str.41 = [23 x i8] c"chmod 777 /tmp/busybox\00"
define void @ezp_special_process() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%4 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
%14 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.9, i64 0, i64 0))
br label %18
18: ; preds = %16, %13
%19 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.10, i64 0, i64 0))
br label %23
23: ; preds = %21, %18
%24 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0))
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.13, i64 0, i64 0))
br label %28
28: ; preds = %26, %23
%29 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.14, i64 0, i64 0))
br label %33
33: ; preds = %31, %28
%34 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0))
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.17, i64 0, i64 0))
br label %38
38: ; preds = %36, %33
%39 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.18, i64 0, i64 0))
br label %43
43: ; preds = %41, %38
%44 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.20, i64 0, i64 0))
%45 = icmp ne i64 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.21, i64 0, i64 0))
br label %48
48: ; preds = %46, %43
%49 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i64 0, i64 0))
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %48
%52 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.22, i64 0, i64 0))
br label %53
53: ; preds = %51, %48
%54 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i64 0, i64 0))
%55 = icmp ne i64 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %53
%57 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.25, i64 0, i64 0))
br label %58
58: ; preds = %56, %53
%59 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.23, i64 0, i64 0))
%60 = icmp ne i64 %59, 0
br i1 %60, label %61, label %63
61: ; preds = %58
%62 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.26, i64 0, i64 0))
br label %63
63: ; preds = %61, %58
%64 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.28, i64 0, i64 0))
%65 = icmp ne i64 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %63
%67 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.29, i64 0, i64 0))
br label %68
68: ; preds = %66, %63
%69 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.28, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.27, i64 0, i64 0))
%70 = icmp ne i64 %69, 0
br i1 %70, label %71, label %73
71: ; preds = %68
%72 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.30, i64 0, i64 0))
br label %73
73: ; preds = %71, %68
%74 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.31, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.32, i64 0, i64 0))
%75 = icmp ne i64 %74, 0
br i1 %75, label %76, label %78
76: ; preds = %73
%77 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.33, i64 0, i64 0))
br label %78
78: ; preds = %76, %73
%79 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.32, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.31, i64 0, i64 0))
%80 = icmp ne i64 %79, 0
br i1 %80, label %81, label %83
81: ; preds = %78
%82 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.34, i64 0, i64 0))
br label %83
83: ; preds = %81, %78
%84 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.35, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.36, i64 0, i64 0))
%85 = icmp ne i64 %84, 0
br i1 %85, label %86, label %88
86: ; preds = %83
%87 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.37, i64 0, i64 0))
br label %88
88: ; preds = %86, %83
%89 = call i64 @ezp_copy_file(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.36, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.35, i64 0, i64 0))
%90 = icmp ne i64 %89, 0
br i1 %90, label %91, label %93
91: ; preds = %88
%92 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.38, i64 0, i64 0))
br label %93
93: ; preds = %91, %88
%94 = call i32 @unlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.39, i64 0, i64 0))
%95 = call i32 @unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.40, i64 0, i64 0))
%96 = call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.41, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [62 x i8] c"cp /web/writeflash_detect0.html /tmp/writeflash_detect1.html\00"
@.str.2 = [41 x i8] c"echo \220\22 > /proc/sys/net/ipv4/ip_forward\00"
@.str.3 = [13 x i8] c"/bin/busybox\00"
@.str.4 = [13 x i8] c"/tmp/busybox\00"
@.str.7 = [25 x i8] c"/lib/libuClibc-0.9.29.so\00"
@.str.8 = [25 x i8] c"/tmp/libuClibc-0.9.29.so\00"
@.str.11 = [25 x i8] c"/lib/ld-uClibc-0.9.29.so\00"
@.str.12 = [25 x i8] c"/tmp/ld-uClibc-0.9.29.so\00"
@.str.15 = [21 x i8] c"/lib/libdl-0.9.29.so\00"
@.str.16 = [21 x i8] c"/tmp/libdl-0.9.29.so\00"
@.str.19 = [20 x i8] c"/lib/libm-0.9.29.so\00"
@.str.20 = [20 x i8] c"/tmp/libm-0.9.29.so\00"
@.str.23 = [22 x i8] c"/lib/libnsl-0.9.29.so\00"
@.str.24 = [22 x i8] c"/tmp/libnsl-0.9.29.so\00"
@.str.27 = [23 x i8] c"/lib/libutil-0.9.29.so\00"
@.str.28 = [23 x i8] c"/tmp/libutil-0.9.29.so\00"
@.str.31 = [21 x i8] c"/usr/lib/libnvram.so\00"
@.str.32 = [17 x i8] c"/tmp/libnvram.so\00"
@.str.35 = [22 x i8] c"/usr/lib/libshared.so\00"
@.str.36 = [18 x i8] c"/tmp/libshared.so\00"
@.str.39 = [13 x i8] c"/sbin/reboot\00"
@.str.40 = [10 x i8] c"/bin/sync\00"
@.str.41 = [23 x i8] c"chmod 777 /tmp/busybox\00"
@str = [23 x i8] c"\0Aezp_special_process()\00"
@str.42 = [52 x i8] c"copy /tmp/libshared.so /usr/lib/libshared.so failed\00"
@str.43 = [52 x i8] c"copy /usr/lib/libshared.so /tmp/libshared.so failed\00"
@str.44 = [50 x i8] c"copy /tmp/libnvram.so /usr/lib/libnvram.so failed\00"
@str.45 = [50 x i8] c"copy /usr/lib/libnvram.so /tmp/libnvram.so failed\00"
@str.46 = [58 x i8] c"copy /tmp/libutil-0.9.29.so /lib/libutil-0.9.29.so failed\00"
@str.47 = [58 x i8] c"copy /lib/libutil-0.9.29.so /tmp/libutil-0.9.29.so failed\00"
@str.48 = [56 x i8] c"copy /tmp/libnsl-0.9.29.so /lib/libnsl-0.9.29.so failed\00"
@str.49 = [56 x i8] c"copy /lib/libnsl-0.9.29.so /tmp/libnsl-0.9.29.so failed\00"
@str.50 = [52 x i8] c"copy /tmp/libm-0.9.29.so /lib/libm-0.9.29.so failed\00"
@str.51 = [52 x i8] c"copy /lib/libm-0.9.29.so /tmp/libm-0.9.29.so failed\00"
@str.52 = [54 x i8] c"copy /tmp/libdl-0.9.29.so /lib/libdl-0.9.29.so failed\00"
@str.53 = [54 x i8] c"copy /lib/libdl-0.9.29.so /tmp/libdl-0.9.29.so failed\00"
@str.54 = [62 x i8] c"copy /tmp/ld-uClibc-0.9.29.so /lib/ld-uClibc-0.9.29.so failed\00"
@str.55 = [62 x i8] c"copy /lib/ld-uClibc-0.9.29.so /tmp/ld-uClibc-0.9.29.so failed\00"
@str.56 = [62 x i8] c"copy /tmp/libuClibc-0.9.29.so /lib/libuClibc-0.9.29.so failed\00"
@str.57 = [62 x i8] c"copy /lib/libuClibc-0.9.29.so /tmp/libuClibc-0.9.29.so failed\00"
@str.58 = [41 x i8] c"copy /tmp/busybox to /bin/busybox failed\00"
@str.59 = [41 x i8] c"copy /bin/busybox to /tmp/busybox failed\00"
define void @ezp_special_process() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.59, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %8
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.58, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
%14 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %13
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.57, i64 0, i64 0))
br label %18
18: ; preds = %16, %13
%19 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %23, label %21
21: ; preds = %18
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.56, i64 0, i64 0))
br label %23
23: ; preds = %21, %18
%24 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %28, label %26
26: ; preds = %23
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.55, i64 0, i64 0))
br label %28
28: ; preds = %26, %23
%29 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %33, label %31
31: ; preds = %28
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.54, i64 0, i64 0))
br label %33
33: ; preds = %31, %28
%34 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %38, label %36
36: ; preds = %33
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.53, i64 0, i64 0))
br label %38
38: ; preds = %36, %33
%39 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %43, label %41
41: ; preds = %38
%42 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.52, i64 0, i64 0))
br label %43
43: ; preds = %41, %38
%44 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.20, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %48, label %46
46: ; preds = %43
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.51, i64 0, i64 0))
br label %48
48: ; preds = %46, %43
%49 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %53, label %51
51: ; preds = %48
%52 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.50, i64 0, i64 0))
br label %53
53: ; preds = %51, %48
%54 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %58, label %56
56: ; preds = %53
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.49, i64 0, i64 0))
br label %58
58: ; preds = %56, %53
%59 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.23, i64 0, i64 0))
%60 = icmp eq i64 %59, 0
br i1 %60, label %63, label %61
61: ; preds = %58
%62 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.48, i64 0, i64 0))
br label %63
63: ; preds = %61, %58
%64 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.28, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
br i1 %65, label %68, label %66
66: ; preds = %63
%67 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.47, i64 0, i64 0))
br label %68
68: ; preds = %66, %63
%69 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.28, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.27, i64 0, i64 0))
%70 = icmp eq i64 %69, 0
br i1 %70, label %73, label %71
71: ; preds = %68
%72 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.46, i64 0, i64 0))
br label %73
73: ; preds = %71, %68
%74 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.31, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.32, i64 0, i64 0))
%75 = icmp eq i64 %74, 0
br i1 %75, label %78, label %76
76: ; preds = %73
%77 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.45, i64 0, i64 0))
br label %78
78: ; preds = %76, %73
%79 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.32, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.31, i64 0, i64 0))
%80 = icmp eq i64 %79, 0
br i1 %80, label %83, label %81
81: ; preds = %78
%82 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.44, i64 0, i64 0))
br label %83
83: ; preds = %81, %78
%84 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.35, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.36, i64 0, i64 0))
%85 = icmp eq i64 %84, 0
br i1 %85, label %88, label %86
86: ; preds = %83
%87 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.43, i64 0, i64 0))
br label %88
88: ; preds = %86, %83
%89 = tail call i64 @ezp_copy_file(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.36, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.35, i64 0, i64 0))
%90 = icmp eq i64 %89, 0
br i1 %90, label %93, label %91
91: ; preds = %88
%92 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.42, i64 0, i64 0))
br label %93
93: ; preds = %91, %88
%94 = tail call i32 @unlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.39, i64 0, i64 0))
%95 = tail call i32 @unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.40, i64 0, i64 0))
%96 = tail call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.41, i64 0, i64 0))
ret void
}