#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 */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ execl(char *, char *, char *, int /*<<< orphan*/, char *,
                         char *, char *, char *, char *, char *, char *, char *,
                         char *, char *, char *, char *, char *, char *, char *,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fork();
int /*<<< orphan*/ increment_address(char *, int);
int /*<<< orphan*/ m_itoa(int, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ sprintf(char *, char *, int, ...);
int sender(int nAddr, int nStream, float bandwidth, int packet_size,
           int test_time, int test_inc, char *addr, int start_port,
           int verbose) {
  int i, j, pid, k;
  char bw[20];
  sprintf(bw, "%fm", bandwidth);
  char ttime[8];
  m_itoa(test_time, ttime);
  char pktsize[8];
  m_itoa(packet_size, pktsize);
  for (k = 0; k < 8; k++) {
    if (pktsize[k] == '\0') {
      pktsize[k] = 'B';
      pktsize[k + 1] = '\0';
      break;
    }
  }
  k = 1;
  if (test_inc == 0)
    k = nAddr;
  int n = 1;
  signal(SIGCHLD, SIG_IGN);
  while (k <= nAddr) {
    char *plural_s = "";
    if (nStream > 1)
      plural_s = "s";
    char *plural_a = "";
    if (nAddr > 1)
      plural_a = "es";
    if (verbose == 1)
      printf("Test %d: Sending to %d/%d Address%s (starting at %s:%d) over %d "
             "stream%s, at %.2f mbps for %d seconds.\n",
             n, k, nAddr, plural_a, addr, start_port, nStream, plural_s,
             bandwidth, test_time);
    for (i = 0; i < k; i++) {
      for (j = 0; j < nStream; j++) {
        pid = fork();
        if (pid < 0) {
          printf("Error");
          return 0;
        } else if (pid == 0) {
          int port = start_port + i * nStream + j;
          char p[6];
          m_itoa(port, p);
          char fn[20];
          sprintf(fn, "%d.%d.%d.txt", i, j, k);
          execl("/usr/bin/iperf", "/usr/bin/iperf", "-c",
                increment_address(addr, i), "-u", "-T", "32", "-l", pktsize,
                "-p", p, "-x", "CDMSV", "-t", ttime, "-b", bw, "-o", fn, NULL);
          exit(0);
        } else {
          continue;
        }
      }
    }
    n++;
    sleep(test_time + 4);
    if (k == nAddr)
      break;
    if (k == 1 && test_inc != 1)
      k = 0;
    k += test_inc;
    if (k > nAddr)
      k = nAddr;
  }
  return 0;
}


x86 assembly (clang, -O0):
<sender>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x30(%rbp)
mov    %esi,-0x34(%rbp)
movss  %xmm0,-0x38(%rbp)
mov    %edx,-0x3c(%rbp)
mov    %ecx,-0x40(%rbp)
mov    %r8d,-0x44(%rbp)
mov    %r9,-0x50(%rbp)
lea    -0x80(%rbp),%rdi
cvttss2si -0x38(%rbp),%edx
lea    0xe2d(%rip),%rsi
mov    $0x0,%al
call   1070 <sprintf@plt>
mov    -0x40(%rbp),%edi
lea    -0x88(%rbp),%rsi
call   1050 <m_itoa@plt>
mov    -0x3c(%rbp),%edi
lea    -0x90(%rbp),%rsi
call   1050 <m_itoa@plt>
movl   $0x0,-0x60(%rbp)
cmpl   $0x8,-0x60(%rbp)
jge    1252 <sender+0xc2>
movslq -0x60(%rbp),%rax
movsbl -0x90(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
jne    123f <sender+0xaf>
movslq -0x60(%rbp),%rax
movb   $0x42,-0x90(%rbp,%rax,1)
42
mov    -0x60(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,-0x90(%rbp,%rax,1)
jmp    1252 <sender+0xc2>
jmp    1244 <sender+0xb4>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    11ff <sender+0x6f>
movl   $0x1,-0x60(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    1269 <sender+0xd9>
mov    -0x30(%rbp),%eax
mov    %eax,-0x60(%rbp)
movl   $0x1,-0x94(%rbp)
mov    0x2d6e(%rip),%rax
mov    (%rax),%edi
mov    0x2d5d(%rip),%rax
mov    (%rax),%esi
call   1060 <signal@plt>
mov    -0x60(%rbp),%eax
cmp    -0x30(%rbp),%eax
jg     158e <sender+0x3fe>
lea    0xdd1(%rip),%rax
mov    %rax,-0xa0(%rbp)
cmpl   $0x1,-0x34(%rbp)
jle    12bc <sender+0x12c>
lea    0xd50(%rip),%rax
mov    %rax,-0xa0(%rbp)
lea    0xdab(%rip),%rax
mov    %rax,-0xa8(%rbp)
cmpl   $0x1,-0x30(%rbp)
jle    12e2 <sender+0x152>
lea    0xd29(%rip),%rax
mov    %rax,-0xa8(%rbp)
cmpl   $0x1,0x18(%rbp)
jne    133c <sender+0x1ac>
mov    -0x94(%rbp),%esi
mov    -0x60(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0xa8(%rbp),%r8
mov    -0x50(%rbp),%r9
mov    0x10(%rbp),%ebx
mov    -0x34(%rbp),%r11d
mov    -0xa0(%rbp),%r10
movss  -0x38(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x40(%rbp),%eax
lea    0xce3(%rip),%rdi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %eax,0x18(%rsp)
mov    $0x1,%al
call   1040 <printf@plt>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x60(%rbp),%eax
jge    1528 <sender+0x398>
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1515 <sender+0x385>
mov    $0x0,%al
call   10b0 <fork@plt>
mov    %eax,-0x5c(%rbp)
cmpl   $0x0,-0x5c(%rbp)
jge    1390 <sender+0x200>
lea    0xcf2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x2c(%rbp)
jmp    1595 <sender+0x405>
cmpl   $0x0,-0x5c(%rbp)
jne    1502 <sender+0x372>
mov    0x10(%rbp),%eax
mov    -0x54(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    %ecx,%eax
add    -0x58(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    -0xac(%rbp),%edi
lea    -0xb2(%rbp),%rsi
call   1050 <m_itoa@plt>
lea    -0xd0(%rbp),%rdi
mov    -0x54(%rbp),%edx
mov    -0x58(%rbp),%ecx
mov    -0x60(%rbp),%r8d
lea    0xc9c(%rip),%rsi
mov    $0x0,%al
call   1070 <sprintf@plt>
mov    -0x50(%rbp),%rdi
mov    -0x54(%rbp),%esi
call   1030 <increment_address@plt>
mov    %eax,%ecx
lea    -0x90(%rbp),%rax
mov    %rax,-0xf0(%rbp)
lea    -0xb2(%rbp),%rax
mov    %rax,-0xe0(%rbp)
lea    -0x88(%rbp),%r14
lea    -0x80(%rbp),%r11
lea    -0xd0(%rbp),%rax
mov    %rax,-0xd8(%rbp)
lea    0xc58(%rip),%rsi
lea    0xc60(%rip),%rdx
lea    0xc5c(%rip),%r8
lea    0xc58(%rip),%r9
lea    0xc54(%rip),%rax
lea    0xc50(%rip),%rdi
mov    %rdi,-0xf8(%rbp)
lea    0xc45(%rip),%rdi
mov    %rdi,-0xe8(%rbp)
lea    0xc3a(%rip),%r13
lea    0xc36(%rip),%r12
lea    0xc35(%rip),%r15
lea    0xc31(%rip),%rbx
lea    0xc2d(%rip),%r10
xor    %edi,%edi
mov    %rsi,%rdi
mov    %rax,(%rsp)
mov    -0xf8(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0xf0(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0xe8(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    -0xe0(%rbp),%rax
mov    %rax,0x20(%rsp)
mov    -0xd8(%rbp),%rax
mov    %r13,0x28(%rsp)
mov    %r12,0x30(%rsp)
mov    %r15,0x38(%rsp)
mov    %r14,0x40(%rsp)
mov    %rbx,0x48(%rsp)
mov    %r11,0x50(%rsp)
mov    %r10,0x58(%rsp)
mov    %rax,0x60(%rsp)
movq   $0x0,0x68(%rsp)
call   1090 <execl@plt>
xor    %edi,%edi
call   1080 <exit@plt>
jmp    1507 <sender+0x377>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1356 <sender+0x1c6>
jmp    151a <sender+0x38a>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1343 <sender+0x1b3>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
mov    -0x40(%rbp),%edi
add    $0x4,%edi
call   10a0 <sleep@plt>
mov    -0x60(%rbp),%eax
cmp    -0x30(%rbp),%eax
jne    1553 <sender+0x3c3>
jmp    158e <sender+0x3fe>
cmpl   $0x1,-0x60(%rbp)
jne    156e <sender+0x3de>
cmpl   $0x1,-0x44(%rbp)
je     156e <sender+0x3de>
movl   $0x0,-0x60(%rbp)
mov    -0x44(%rbp),%eax
add    -0x60(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x30(%rbp),%eax
jle    1589 <sender+0x3f9>
mov    -0x30(%rbp),%eax
mov    %eax,-0x60(%rbp)
jmp    128a <sender+0xfa>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<sender>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r9,%r12
mov    %r8d,0xc(%rsp)
mov    %ecx,%r13d
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%r15d
movss  %xmm0,0x8(%rsp)
cvttss2si %xmm0,%edx
lea    0xe3b(%rip),%rsi
xor    %ebp,%ebp
lea    0x50(%rsp),%rdi
xor    %eax,%eax
call   1070 <sprintf@plt>
lea    0x42(%rsp),%rsi
mov    %r13,0x20(%rsp)
mov    %r13d,%edi
call   1050 <m_itoa@plt>
mov    %rsp,%rsi
mov    %ebx,%edi
mov    %r12,%r13
call   1050 <m_itoa@plt>
cmpb   $0x0,(%rsp)
je     1258 <sender+0xc8>
cmpb   $0x0,0x1(%rsp)
je     1230 <sender+0xa0>
cmpb   $0x0,0x2(%rsp)
je     1237 <sender+0xa7>
cmpb   $0x0,0x3(%rsp)
je     123e <sender+0xae>
cmpb   $0x0,0x4(%rsp)
je     1245 <sender+0xb5>
cmpb   $0x0,0x5(%rsp)
je     124c <sender+0xbc>
cmpb   $0x0,0x6(%rsp)
je     1253 <sender+0xc3>
cmpb   $0x0,0x7(%rsp)
jne    1260 <sender+0xd0>
mov    $0x7,%ebp
jmp    1258 <sender+0xc8>
mov    $0x1,%ebp
jmp    1258 <sender+0xc8>
mov    $0x2,%ebp
jmp    1258 <sender+0xc8>
mov    $0x3,%ebp
jmp    1258 <sender+0xc8>
mov    $0x4,%ebp
jmp    1258 <sender+0xc8>
mov    $0x5,%ebp
jmp    1258 <sender+0xc8>
mov    $0x6,%ebp
mov    %ebp,%eax
movw   $0x42,(%rsp,%rax,1)
cmpl   $0x0,0xc(%rsp)
mov    $0x1,%ebp
mov    $0x1,%r12d
cmove  %r15d,%r12d
mov    0x2d6d(%rip),%rax
mov    (%rax),%edi
mov    0x2d5c(%rip),%rax
mov    (%rax),%esi
call   1060 <signal@plt>
cmp    %r15d,%r12d
jg     13f3 <sender+0x263>
mov    0xc8(%rsp),%ecx
mov    0xc0(%rsp),%edx
cmp    $0x2,%r15d
lea    0xd57(%rip),%rsi
lea    0xdba(%rip),%rax
cmovl  %rax,%rsi
mov    %rsi,0x38(%rsp)
cmp    $0x2,%r14d
lea    0xd3d(%rip),%rsi
cmovl  %rax,%rsi
mov    %rsi,0x30(%rsp)
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x28(%rsp)
mov    0x20(%rsp),%rax
add    $0x4,%eax
mov    %eax,0x10(%rsp)
mov    %edx,%eax
neg    %eax
mov    %eax,0x14(%rsp)
mov    %r13,0x18(%rsp)
cmp    $0x1,%ecx
jne    1339 <sender+0x1a9>
lea    0xd01(%rip),%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %r15d,%ecx
mov    0x38(%rsp),%r8
mov    %r13,%r9
movsd  0x28(%rsp),%xmm0
mov    $0x1,%al
push   0x20(%rsp)
push   0x38(%rsp)
push   %r14
mov    0xd8(%rsp),%ebx
push   %rbx
call   1040 <printf@plt>
add    $0x20,%rsp
mov    %ebp,0x8(%rsp)
test   %r12d,%r12d
jle    1390 <sender+0x200>
xor    %ebx,%ebx
mov    0x14(%rsp),%ebp
jmp    135b <sender+0x1cb>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebx
sub    %r14d,%ebp
cmp    %r12d,%ebx
je     1390 <sender+0x200>
test   %r14d,%r14d
jle    1350 <sender+0x1c0>
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   10b0 <fork@plt>
test   %eax,%eax
js     13e5 <sender+0x255>
je     1407 <sender+0x277>
add    $0x1,%r13d
cmp    %r13d,%r14d
jne    1370 <sender+0x1e0>
jmp    1350 <sender+0x1c0>
nopl   0x0(%rax)
mov    0x10(%rsp),%edi
call   10a0 <sleep@plt>
cmp    %r15d,%r12d
mov    0x18(%rsp),%r13
mov    0x8(%rsp),%ebp
je     13f3 <sender+0x263>
add    $0x1,%ebp
cmp    $0x1,%r12d
mov    %r12d,%eax
mov    $0x0,%ecx
cmove  %ecx,%eax
mov    0xc(%rsp),%ecx
cmp    $0x1,%ecx
cmove  %r12d,%eax
add    %ecx,%eax
cmp    %r15d,%eax
cmovg  %r15d,%eax
mov    %eax,%r12d
mov    0xc8(%rsp),%ecx
cmp    $0x1,%ecx
je     12ff <sender+0x16f>
jmp    1339 <sender+0x1a9>
lea    0xc83(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r13d,%edi
sub    %ebp,%edi
lea    0x4a(%rsp),%r14
mov    %r14,%rsi
call   1050 <m_itoa@plt>
lea    0xc55(%rip),%rsi
lea    0x70(%rsp),%rbp
mov    %rbp,%rdi
mov    %ebx,%edx
mov    %r13d,%ecx
mov    %r12d,%r8d
xor    %eax,%eax
call   1070 <sprintf@plt>
mov    0x18(%rsp),%rdi
mov    %ebx,%esi
call   1030 <increment_address@plt>
lea    0xc68(%rip),%rbx
lea    0xc5e(%rip),%r12
lea    0xc54(%rip),%r13
lea    0xc47(%rip),%r10
lea    0xc3d(%rip),%r11
lea    0xc33(%rip),%r15
lea    0xc0e(%rip),%rdi
lea    0xc16(%rip),%rdx
lea    0xc12(%rip),%r8
lea    0xc0e(%rip),%r9
mov    %rdi,%rsi
mov    %eax,%ecx
push   $0x0
push   %rbp
push   %rbx
lea    0x68(%rsp),%rax
push   %rax
push   %r12
lea    0x6a(%rsp),%rax
push   %rax
push   %r13
push   %r10
push   %r11
push   %r14
push   %r15
lea    0x58(%rsp),%rax
push   %rax
lea    0xbe6(%rip),%rax
push   %rax
lea    0xbdb(%rip),%rax
push   %rax
call   1090 <execl@plt>
add    $0x70,%rsp
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%fm\00"
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [2 x i8] c"s\00"
@.str.3 = [3 x i8] c"es\00"
@.str.4 = [104 x i8] c"Test %d: Sending to %d/%d Address%s (starting at %s:%d) over %d stream%s, at %.2f mbps for %d seconds.\0A\00"
@.str.5 = [6 x i8] c"Error\00"
@.str.6 = [13 x i8] c"%d.%d.%d.txt\00"
@.str.7 = [15 x i8] c"/usr/bin/iperf\00"
@.str.8 = [3 x i8] c"-c\00"
@.str.9 = [3 x i8] c"-u\00"
@.str.10 = [3 x i8] c"-T\00"
@.str.11 = [3 x i8] c"32\00"
@.str.12 = [3 x i8] c"-l\00"
@.str.13 = [3 x i8] c"-p\00"
@.str.14 = [3 x i8] c"-x\00"
@.str.15 = [6 x i8] c"CDMSV\00"
@.str.16 = [3 x i8] c"-t\00"
@.str.17 = [3 x i8] c"-b\00"
@.str.18 = [3 x i8] c"-o\00"
define i32 @sender(i32 %0, i32 %1, float %2, i32 %3, i32 %4, i32 %5, i8* %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca float
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca [20 x i8]
%25 = alloca [8 x i8]
%26 = alloca [8 x i8]
%27 = alloca i32
%28 = alloca i8*
%29 = alloca i8*
%30 = alloca i32
%31 = alloca [6 x i8]
%32 = alloca [20 x i8]
store i32 %0, i32* %11
store i32 %1, i32* %12
store float %2, float* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store i32 %5, i32* %16
store i8* %6, i8** %17
store i32 %7, i32* %18
store i32 %8, i32* %19
%33 = getelementptr inbounds [20 x i8], [20 x i8]* %24, i64 0, i64 0
%34 = load float, float* %13
%35 = fptosi float %34 to i32
%36 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %33, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %35)
%37 = load i32, i32* %15
%38 = getelementptr inbounds [8 x i8], [8 x i8]* %25, i64 0, i64 0
%39 = call i32 @m_itoa(i32 %37, i8* %38)
%40 = load i32, i32* %14
%41 = getelementptr inbounds [8 x i8], [8 x i8]* %26, i64 0, i64 0
%42 = call i32 @m_itoa(i32 %40, i8* %41)
store i32 0, i32* %23
br label %43
43: ; preds = %62, %9
%44 = load i32, i32* %23
%45 = icmp slt i32 %44, 8
br i1 %45, label %46, label %65
46: ; preds = %43
%47 = load i32, i32* %23
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [8 x i8], [8 x i8]* %26, i64 0, i64 %48
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %61
53: ; preds = %46
%54 = load i32, i32* %23
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [8 x i8], [8 x i8]* %26, i64 0, i64 %55
store i8 66, i8* %56
%57 = load i32, i32* %23
%58 = add nsw i32 %57, 1
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [8 x i8], [8 x i8]* %26, i64 0, i64 %59
store i8 0, i8* %60
br label %65
61: ; preds = %46
br label %62
62: ; preds = %61
%63 = load i32, i32* %23
%64 = add nsw i32 %63, 1
store i32 %64, i32* %23
br label %43
65: ; preds = %53, %43
store i32 1, i32* %23
%66 = load i32, i32* %16
%67 = icmp eq i32 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = load i32, i32* %11
store i32 %69, i32* %23
br label %70
70: ; preds = %68, %65
store i32 1, i32* %27
%71 = load i32, i32* @SIGCHLD
%72 = load i32, i32* @SIG_IGN
%73 = call i32 @signal(i32 %71, i32 %72)
br label %74
74: ; preds = %181, %70
%75 = load i32, i32* %23
%76 = load i32, i32* %11
%77 = icmp sle i32 %75, %76
br i1 %77, label %78, label %182
78: ; preds = %74
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8** %28
%79 = load i32, i32* %12
%80 = icmp sgt i32 %79, 1
br i1 %80, label %81, label %82
81: ; preds = %78
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %28
br label %82
82: ; preds = %81, %78
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8** %29
%83 = load i32, i32* %11
%84 = icmp sgt i32 %83, 1
br i1 %84, label %85, label %86
85: ; preds = %82
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %29
br label %86
86: ; preds = %85, %82
%87 = load i32, i32* %19
%88 = icmp eq i32 %87, 1
br i1 %88, label %89, label %102
89: ; preds = %86
%90 = load i32, i32* %27
%91 = load i32, i32* %23
%92 = load i32, i32* %11
%93 = load i8*, i8** %29
%94 = load i8*, i8** %17
%95 = load i32, i32* %18
%96 = load i32, i32* %12
%97 = load i8*, i8** %28
%98 = load float, float* %13
%99 = fpext float %98 to double
%100 = load i32, i32* %15
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.4, i64 0, i64 0), i32 %90, i32 %91, i32 %92, i8* %93, i8* %94, i32 %95, i32 %96, i8* %97, double %99, i32 %100)
br label %102
102: ; preds = %89, %86
store i32 0, i32* %20
br label %103
103: ; preds = %152, %102
%104 = load i32, i32* %20
%105 = load i32, i32* %23
%106 = icmp slt i32 %104, %105
br i1 %106, label %107, label %155
107: ; preds = %103
store i32 0, i32* %21
br label %108
108: ; preds = %148, %107
%109 = load i32, i32* %21
%110 = load i32, i32* %12
%111 = icmp slt i32 %109, %110
br i1 %111, label %112, label %151
112: ; preds = %108
%113 = call i32 (...) @fork()
store i32 %113, i32* %22
%114 = load i32, i32* %22
%115 = icmp slt i32 %114, 0
br i1 %115, label %116, label %118
116: ; preds = %112
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %10
br label %183
118: ; preds = %112
%119 = load i32, i32* %22
%120 = icmp eq i32 %119, 0
br i1 %120, label %121, label %147
121: ; preds = %118
%122 = load i32, i32* %18
%123 = load i32, i32* %20
%124 = load i32, i32* %12
%125 = mul nsw i32 %123, %124
%126 = add nsw i32 %122, %125
%127 = load i32, i32* %21
%128 = add nsw i32 %126, %127
store i32 %128, i32* %30
%129 = load i32, i32* %30
%130 = getelementptr inbounds [6 x i8], [6 x i8]* %31, i64 0, i64 0
%131 = call i32 @m_itoa(i32 %129, i8* %130)
%132 = getelementptr inbounds [20 x i8], [20 x i8]* %32, i64 0, i64 0
%133 = load i32, i32* %20
%134 = load i32, i32* %21
%135 = load i32, i32* %23
%136 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %132, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 %133, i32 %134, i32 %135)
%137 = load i8*, i8** %17
%138 = load i32, i32* %20
%139 = call i32 @increment_address(i8* %137, i32 %138)
%140 = getelementptr inbounds [8 x i8], [8 x i8]* %26, i64 0, i64 0
%141 = getelementptr inbounds [6 x i8], [6 x i8]* %31, i64 0, i64 0
%142 = getelementptr inbounds [8 x i8], [8 x i8]* %25, i64 0, i64 0
%143 = getelementptr inbounds [20 x i8], [20 x i8]* %24, i64 0, i64 0
%144 = getelementptr inbounds [20 x i8], [20 x i8]* %32, i64 0, i64 0
%145 = call i32 @execl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 %139, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* %140, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* %141, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* %142, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i8* %143, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i8* %144, i32* null)
%146 = call i32 @exit(i32 0)
unreachable
147: ; preds = %118
br label %148
148: ; preds = %147
%149 = load i32, i32* %21
%150 = add nsw i32 %149, 1
store i32 %150, i32* %21
br label %108
151: ; preds = %108
br label %152
152: ; preds = %151
%153 = load i32, i32* %20
%154 = add nsw i32 %153, 1
store i32 %154, i32* %20
br label %103
155: ; preds = %103
%156 = load i32, i32* %27
%157 = add nsw i32 %156, 1
store i32 %157, i32* %27
%158 = load i32, i32* %15
%159 = add nsw i32 %158, 4
%160 = call i32 @sleep(i32 %159)
%161 = load i32, i32* %23
%162 = load i32, i32* %11
%163 = icmp eq i32 %161, %162
br i1 %163, label %164, label %165
164: ; preds = %155
br label %182
165: ; preds = %155
%166 = load i32, i32* %23
%167 = icmp eq i32 %166, 1
br i1 %167, label %168, label %172
168: ; preds = %165
%169 = load i32, i32* %16
%170 = icmp ne i32 %169, 1
br i1 %170, label %171, label %172
171: ; preds = %168
store i32 0, i32* %23
br label %172
172: ; preds = %171, %168, %165
%173 = load i32, i32* %16
%174 = load i32, i32* %23
%175 = add nsw i32 %174, %173
store i32 %175, i32* %23
%176 = load i32, i32* %23
%177 = load i32, i32* %11
%178 = icmp sgt i32 %176, %177
br i1 %178, label %179, label %181
179: ; preds = %172
%180 = load i32, i32* %11
store i32 %180, i32* %23
br label %181
181: ; preds = %179, %172
br label %74
182: ; preds = %164, %74
store i32 0, i32* %10
br label %183
183: ; preds = %182, %116
%184 = load i32, i32* %10
ret i32 %184
}

LLVM IR (-O2):
@.str = [4 x i8] c"%fm\00"
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [2 x i8] c"s\00"
@.str.3 = [3 x i8] c"es\00"
@.str.4 = [104 x i8] c"Test %d: Sending to %d/%d Address%s (starting at %s:%d) over %d stream%s, at %.2f mbps for %d seconds.\0A\00"
@.str.5 = [6 x i8] c"Error\00"
@.str.6 = [13 x i8] c"%d.%d.%d.txt\00"
@.str.7 = [15 x i8] c"/usr/bin/iperf\00"
@.str.8 = [3 x i8] c"-c\00"
@.str.9 = [3 x i8] c"-u\00"
@.str.10 = [3 x i8] c"-T\00"
@.str.11 = [3 x i8] c"32\00"
@.str.12 = [3 x i8] c"-l\00"
@.str.13 = [3 x i8] c"-p\00"
@.str.14 = [3 x i8] c"-x\00"
@.str.15 = [6 x i8] c"CDMSV\00"
@.str.16 = [3 x i8] c"-t\00"
@.str.17 = [3 x i8] c"-b\00"
@.str.18 = [3 x i8] c"-o\00"
define i32 @sender(i32 %0, i32 %1, float %2, i32 %3, i32 %4, i32 %5, i8* %6, i32 %7, i32 %8) {
%10 = alloca [20 x i8]
%11 = alloca [8 x i8]
%12 = alloca [8 x i8]
%13 = alloca [6 x i8]
%14 = alloca [20 x i8]
%15 = getelementptr inbounds [20 x i8], [20 x i8]* %10, i64 0, i64 0
%16 = fptosi float %2 to i32
%17 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds [8 x i8], [8 x i8]* %11, i64 0, i64 0
%19 = call i32 @m_itoa(i32 %4, i8* %18)
%20 = getelementptr inbounds [8 x i8], [8 x i8]* %12, i64 0, i64 0
%21 = call i32 @m_itoa(i32 %3, i8* %20)
%22 = load i8, i8* %20
%23 = icmp eq i8 %22, 0
br i1 %23, label %24, label %31
24: ; preds = %55, %51, %47, %43, %39, %35, %31, %9
%25 = phi i32 [ 0, %9 ], [ 1, %31 ], [ 2, %35 ], [ 3, %39 ], [ 4, %43 ], [ 5, %47 ], [ 6, %51 ], [ 7, %55 ]
%26 = zext i32 %25 to i64
%27 = getelementptr inbounds [8 x i8], [8 x i8]* %12, i64 0, i64 %26
store i8 66, i8* %27
%28 = add nuw nsw i32 %25, 1
%29 = zext i32 %28 to i64
%30 = getelementptr inbounds [8 x i8], [8 x i8]* %12, i64 0, i64 %29
store i8 0, i8* %30
br label %59
31: ; preds = %9
%32 = getelementptr inbounds [8 x i8], [8 x i8]* %12, i64 0, i64 1
%33 = load i8, i8* %32
%34 = icmp eq i8 %33, 0
br i1 %34, label %24, label %35
35: ; preds = %31
%36 = getelementptr inbounds [8 x i8], [8 x i8]* %12, i64 0, i64 2
%37 = load i8, i8* %36
%38 = icmp eq i8 %37, 0
br i1 %38, label %24, label %39
39: ; preds = %35
%40 = getelementptr inbounds [8 x i8], [8 x i8]* %12, i64 0, i64 3
%41 = load i8, i8* %40
%42 = icmp eq i8 %41, 0
br i1 %42, label %24, label %43
43: ; preds = %39
%44 = getelementptr inbounds [8 x i8], [8 x i8]* %12, i64 0, i64 4
%45 = load i8, i8* %44
%46 = icmp eq i8 %45, 0
br i1 %46, label %24, label %47
47: ; preds = %43
%48 = getelementptr inbounds [8 x i8], [8 x i8]* %12, i64 0, i64 5
%49 = load i8, i8* %48
%50 = icmp eq i8 %49, 0
br i1 %50, label %24, label %51
51: ; preds = %47
%52 = getelementptr inbounds [8 x i8], [8 x i8]* %12, i64 0, i64 6
%53 = load i8, i8* %52
%54 = icmp eq i8 %53, 0
br i1 %54, label %24, label %55
55: ; preds = %51
%56 = getelementptr inbounds [8 x i8], [8 x i8]* %12, i64 0, i64 7
%57 = load i8, i8* %56
%58 = icmp eq i8 %57, 0
br i1 %58, label %24, label %59
59: ; preds = %55, %24
%60 = icmp eq i32 %5, 0
%61 = select i1 %60, i32 %0, i32 1
%62 = load i32, i32* @SIGCHLD
%63 = load i32, i32* @SIG_IGN
%64 = call i32 @signal(i32 %62, i32 %63)
%65 = icmp sgt i32 %61, %0
br i1 %65, label %121, label %66
66: ; preds = %59
%67 = icmp eq i32 %8, 1
%68 = icmp sgt i32 %0, 1
%69 = select i1 %68, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%70 = icmp sgt i32 %1, 1
%71 = select i1 %70, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%72 = fpext float %2 to double
%73 = icmp sgt i32 %1, 0
%74 = add nsw i32 %4, 4
%75 = icmp ne i32 %5, 1
br label %76
76: ; preds = %113, %66
%77 = phi i32 [ 1, %66 ], [ %114, %113 ]
%78 = phi i32 [ %61, %66 ], [ %120, %113 ]
br i1 %67, label %79, label %81
79: ; preds = %76
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([104 x i8], [104 x i8]* @.str.4, i64 0, i64 0), i32 %77, i32 %78, i32 %0, i8* %69, i8* %6, i32 %7, i32 %1, i8* %71, double %72, i32 %4)
br label %81
81: ; preds = %79, %76
%82 = icmp sgt i32 %78, 0
br i1 %82, label %83, label %110
83: ; preds = %81, %107
%84 = phi i32 [ %108, %107 ], [ 0, %81 ]
br i1 %73, label %85, label %107
85: ; preds = %83, %104
%86 = phi i32 [ %105, %104 ], [ 0, %83 ]
%87 = call i32 (...) @fork()
%88 = icmp slt i32 %87, 0
br i1 %88, label %89, label %91
89: ; preds = %85
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %121
91: ; preds = %85
%92 = icmp eq i32 %87, 0
br i1 %92, label %93, label %104
93: ; preds = %91
%94 = mul nsw i32 %84, %1
%95 = add nsw i32 %94, %7
%96 = add nsw i32 %95, %86
%97 = getelementptr inbounds [6 x i8], [6 x i8]* %13, i64 0, i64 0
%98 = call i32 @m_itoa(i32 %96, i8* %97)
%99 = getelementptr inbounds [20 x i8], [20 x i8]* %14, i64 0, i64 0
%100 = call i32 (i8*, i8*, i32, ...) @sprintf(i8* %99, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 %84, i32 %86, i32 %78)
%101 = call i32 @increment_address(i8* %6, i32 %84)
%102 = call i32 @execl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 %101, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* %97, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i8* %99, i32* null)
%103 = call i32 @exit(i32 0)
unreachable
104: ; preds = %91
%105 = add nuw nsw i32 %86, 1
%106 = icmp eq i32 %105, %1
br i1 %106, label %107, label %85
107: ; preds = %104, %83
%108 = add nuw nsw i32 %84, 1
%109 = icmp eq i32 %108, %78
br i1 %109, label %110, label %83
110: ; preds = %107, %81
%111 = call i32 @sleep(i32 %74)
%112 = icmp eq i32 %78, %0
br i1 %112, label %121, label %113
113: ; preds = %110
%114 = add nuw nsw i32 %77, 1
%115 = icmp eq i32 %78, 1
%116 = and i1 %75, %115
%117 = select i1 %116, i32 0, i32 %78
%118 = add nsw i32 %117, %5
%119 = icmp sgt i32 %118, %0
%120 = select i1 %119, i32 %0, i32 %118
br label %76
121: ; preds = %110, %59, %89
ret i32 0
}