#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*/ O_RDONLY;
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ Usage();
void *atoi(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
unsigned char *malloc(unsigned int);
int /*<<< orphan*/ memcpy(unsigned short *, unsigned char *, int);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
unsigned short ntohs(unsigned short);
int open(char *, int /*<<< orphan*/);
int read(int, unsigned char *, unsigned int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ write(int /*<<< orphan*/, unsigned char *, int);
int main(int argc, char *argv[]) {
  int byte_read;
  int fd_ts;
  unsigned short pid;
  unsigned int i;
  unsigned char *packet_buffer;
  unsigned char *current_packet;
  unsigned int buffer_size;
  unsigned char pid_table[8192];
  buffer_size = 0;
  memset(pid_table, 0, 8192);
  if (argc >= 2) {
    fd_ts = open(argv[1], O_RDONLY);
    if (fd_ts < 0) {
      fprintf(stderr, "Can't find file %s\n", argv[1]);
      return 2;
    }
  } else {
    Usage();
    return 2;
  }
  i = 2;
  while (i < argc) {
    if (argv[i][0] == '-') {
      pid = atoi(&(argv[i][1]));
      if (pid < 8192) {
        fprintf(stderr, "remove pid %d\n", pid);
        pid_table[pid] = 1;
        i++;
      } else {
        fprintf(stderr, "pid range should be from 0 to %d\n", 8192);
        return 2;
      }
    } else {
      buffer_size = atoi(&(argv[i][0]));
      i++;
    }
  }
  if (buffer_size == 0) {
    buffer_size = 1;
  }
  buffer_size *= 188;
  packet_buffer = malloc(buffer_size);
  if (packet_buffer == NULL) {
    fprintf(stderr, "Out of memory\n");
    return 2;
  }
  byte_read = 1;
  while (byte_read) {
    byte_read = read(fd_ts, packet_buffer, buffer_size);
    for (i = 0; i < buffer_size; i += 188) {
      current_packet = packet_buffer + i;
      memcpy(&pid, current_packet + 1, 2);
      pid = ntohs(pid);
      pid = pid & 0x1fff;
      if (pid < 8192) {
        if (pid_table[pid] == 0) {
          write(STDOUT_FILENO, current_packet, 188);
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2040,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x34(%rbp)
lea    -0x2040(%rbp),%rdi
xor    %esi,%esi
mov    $0x2000,%edx
call   1040 <memset@plt>
cmpl   $0x2,-0x8(%rbp)
jl     1230 <main+0x90>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2df4(%rip),%rax
mov    (%rax),%esi
call   10b0 <open@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    122b <main+0x8b>
mov    0x2dc9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xde8(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    1441 <main+0x2a1>
jmp    1243 <main+0xa3>
mov    $0x0,%al
call   1060 <Usage@plt>
movl   $0x2,-0x4(%rbp)
jmp    1441 <main+0x2a1>
movl   $0x2,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1317 <main+0x177>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    12f6 <main+0x156>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
add    $0x1,%rdi
call   10c0 <atoi@plt>
mov    %ax,-0x1a(%rbp)
movzwl -0x1a(%rbp),%eax
cmp    $0x2000,%eax
jge    12c9 <main+0x129>
mov    0x2d35(%rip),%rax
mov    (%rax),%edi
movzwl -0x1a(%rbp),%edx
lea    0xd6c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movzwl -0x1a(%rbp),%eax
movb   $0x1,-0x2040(%rbp,%rax,1)
01
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12f1 <main+0x151>
mov    0x2d00(%rip),%rax
mov    (%rax),%edi
lea    0xd4a(%rip),%rsi
mov    $0x2000,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    1441 <main+0x2a1>
jmp    1312 <main+0x172>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    124a <main+0xaa>
cmpl   $0x0,-0x34(%rbp)
jne    1328 <main+0x188>
movl   $0x1,-0x34(%rbp)
imul   $0xbc,-0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%edi
call   1090 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    136c <main+0x1cc>
mov    0x2c80(%rip),%rax
mov    (%rax),%edi
lea    0xcec(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    1441 <main+0x2a1>
movl   $0x1,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     143a <main+0x29a>
mov    -0x18(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1050 <read@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x34(%rbp),%eax
jae    1435 <main+0x295>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rsi
add    $0x1,%rsi
lea    -0x1a(%rbp),%rdi
mov    $0x2,%edx
call   1080 <memcpy@plt>
movzwl -0x1a(%rbp),%edi
call   10a0 <ntohs@plt>
mov    %ax,-0x1a(%rbp)
movzwl -0x1a(%rbp),%eax
and    $0x1fff,%eax
mov    %ax,-0x1a(%rbp)
movzwl -0x1a(%rbp),%eax
cmp    $0x2000,%eax
jge    1420 <main+0x280>
movzwl -0x1a(%rbp),%eax
movzbl -0x2040(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
jne    141b <main+0x27b>
mov    0x2be5(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rsi
mov    $0xbc,%edx
call   1030 <write@plt>
jmp    1420 <main+0x280>
jmp    1425 <main+0x285>
mov    -0x20(%rbp),%eax
add    $0xbc,%eax
mov    %eax,-0x20(%rbp)
jmp    1396 <main+0x1f6>
jmp    1373 <main+0x1d3>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2040,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2018,%rsp
mov    %rsi,%r14
mov    %edi,%ebp
lea    0x10(%rsp),%rdi
xor    %esi,%esi
mov    $0x2000,%edx
call   1040 <memset@plt>
cmp    $0x2,%ebp
jl     1265 <main+0xc5>
mov    0x8(%r14),%rdi
mov    0x2e05(%rip),%rax
mov    (%rax),%esi
call   10b0 <open@plt>
mov    %eax,0x8(%rsp)
test   %eax,%eax
js     1271 <main+0xd1>
cmp    $0x3,%ebp
jb     129f <main+0xff>
mov    %ebp,%r13d
mov    $0x2,%ebx
mov    0x2dca(%rip),%r15
xor    %r12d,%r12d
jmp    1221 <main+0x81>
nopl   0x0(%rax,%rax,1)
call   10c0 <atoi@plt>
mov    %rax,%r12
add    $0x1,%rbx
cmp    %rbx,%r13
je     1291 <main+0xf1>
mov    (%r14,%rbx,8),%rdi
cmpb   $0x2d,(%rdi)
jne    1210 <main+0x70>
add    $0x1,%rdi
call   10c0 <atoi@plt>
mov    %rax,%rbp
mov    %bp,0x6(%rsp)
movzwl %bp,%edx
mov    (%r15),%edi
cmp    $0x1fff,%edx
ja     1374 <main+0x1d4>
lea    0xdc0(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
movzwl %bp,%eax
movb   $0x1,0x10(%rsp,%rax,1)
jmp    1218 <main+0x78>
xor    %eax,%eax
call   1060 <Usage@plt>
jmp    1387 <main+0x1e7>
mov    0x2d58(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r14),%rdx
lea    0xd7b(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    1387 <main+0x1e7>
test   %r12d,%r12d
je     129f <main+0xff>
imul   $0xbc,%r12d,%r13d
jmp    12a5 <main+0x105>
mov    $0xbc,%r13d
mov    %r13d,%edi
call   1090 <malloc@plt>
test   %rax,%rax
je     135b <main+0x1bb>
mov    %rax,%rbp
lea    0x6(%rsp),%r15
mov    0x2d2b(%rip),%r14
jmp    12db <main+0x13b>
nopw   0x0(%rax,%rax,1)
cmpl   $0x0,0xc(%rsp)
je     1357 <main+0x1b7>
mov    0x8(%rsp),%edi
mov    %rbp,%rsi
mov    %r13d,%edx
call   1050 <read@plt>
mov    %eax,0xc(%rsp)
test   %r13d,%r13d
je     12d0 <main+0x130>
xor    %r12d,%r12d
jmp    130c <main+0x16c>
nopl   0x0(%rax,%rax,1)
add    $0xbc,%r12d
cmp    %r13d,%r12d
jae    12d0 <main+0x130>
mov    %r12d,%ebx
lea    (%rbx,%rbp,1),%rsi
add    $0x1,%rsi
mov    %r15,%rdi
mov    $0x2,%edx
call   1080 <memcpy@plt>
movzwl 0x6(%rsp),%edi
call   10a0 <ntohs@plt>
movzwl %ax,%eax
and    $0x1fff,%eax
mov    %ax,0x6(%rsp)
cmpb   $0x0,0x10(%rsp,%rax,1)
jne    1300 <main+0x160>
add    %rbp,%rbx
mov    (%r14),%edi
mov    %rbx,%rsi
mov    $0xbc,%edx
call   1030 <write@plt>
jmp    1300 <main+0x160>
xor    %eax,%eax
jmp    138c <main+0x1ec>
mov    0x2c6e(%rip),%rax
mov    (%rax),%edi
lea    0xcda(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    1387 <main+0x1e7>
lea    0xca8(%rip),%rsi
mov    $0x2000,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x2,%eax
add    $0x2018,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str = [20 x i8] c"Can't find file %s\0A\00"
@.str.1 = [15 x i8] c"remove pid %d\0A\00"
@.str.2 = [34 x i8] c"pid range should be from 0 to %d\0A\00"
@.str.3 = [15 x i8] c"Out of memory\0A\00"
@STDOUT_FILENO = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i16
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca [8192 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %12
%14 = getelementptr inbounds [8192 x i8], [8192 x i8]* %13, i64 0, i64 0
%15 = call i32 @memset(i8* %14, i32 0, i32 8192)
%16 = load i32, i32* %4
%17 = icmp sge i32 %16, 2
br i1 %17, label %18, label %33
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = load i32, i32* @O_RDONLY
%23 = call i32 @open(i8* %21, i32 %22)
store i32 %23, i32* %7
%24 = load i32, i32* %7
%25 = icmp slt i32 %24, 0
br i1 %25, label %26, label %32
26: ; preds = %18
%27 = load i32, i32* @stderr
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %30)
store i32 2, i32* %3
br label %150
32: ; preds = %18
br label %35
33: ; preds = %2
%34 = call i32 (...) @Usage()
store i32 2, i32* %3
br label %150
35: ; preds = %32
store i32 2, i32* %9
br label %36
36: ; preds = %87, %35
%37 = load i32, i32* %9
%38 = load i32, i32* %4
%39 = icmp ult i32 %37, %38
br i1 %39, label %40, label %88
40: ; preds = %36
%41 = load i8**, i8*** %5
%42 = load i32, i32* %9
%43 = zext i32 %42 to i64
%44 = getelementptr inbounds i8*, i8** %41, i64 %43
%45 = load i8*, i8** %44
%46 = getelementptr inbounds i8, i8* %45, i64 0
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 45
br i1 %49, label %50, label %76
50: ; preds = %40
%51 = load i8**, i8*** %5
%52 = load i32, i32* %9
%53 = zext i32 %52 to i64
%54 = getelementptr inbounds i8*, i8** %51, i64 %53
%55 = load i8*, i8** %54
%56 = getelementptr inbounds i8, i8* %55, i64 1
%57 = call i8* @atoi(i8* %56)
%58 = ptrtoint i8* %57 to i16
store i16 %58, i16* %8
%59 = load i16, i16* %8
%60 = zext i16 %59 to i32
%61 = icmp slt i32 %60, 8192
br i1 %61, label %62, label %72
62: ; preds = %50
%63 = load i32, i32* @stderr
%64 = load i16, i16* %8
%65 = zext i16 %64 to i32
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %65)
%67 = load i16, i16* %8
%68 = zext i16 %67 to i64
%69 = getelementptr inbounds [8192 x i8], [8192 x i8]* %13, i64 0, i64 %68
store i8 1, i8* %69
%70 = load i32, i32* %9
%71 = add i32 %70, 1
store i32 %71, i32* %9
br label %75
72: ; preds = %50
%73 = load i32, i32* @stderr
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 8192)
store i32 2, i32* %3
br label %150
75: ; preds = %62
br label %87
76: ; preds = %40
%77 = load i8**, i8*** %5
%78 = load i32, i32* %9
%79 = zext i32 %78 to i64
%80 = getelementptr inbounds i8*, i8** %77, i64 %79
%81 = load i8*, i8** %80
%82 = getelementptr inbounds i8, i8* %81, i64 0
%83 = call i8* @atoi(i8* %82)
%84 = ptrtoint i8* %83 to i32
store i32 %84, i32* %12
%85 = load i32, i32* %9
%86 = add i32 %85, 1
store i32 %86, i32* %9
br label %87
87: ; preds = %76, %75
br label %36
88: ; preds = %36
%89 = load i32, i32* %12
%90 = icmp eq i32 %89, 0
br i1 %90, label %91, label %92
91: ; preds = %88
store i32 1, i32* %12
br label %92
92: ; preds = %91, %88
%93 = load i32, i32* %12
%94 = mul i32 %93, 188
store i32 %94, i32* %12
%95 = load i32, i32* %12
%96 = call i8* @malloc(i32 %95)
store i8* %96, i8** %10
%97 = load i8*, i8** %10
%98 = icmp eq i8* %97, null
br i1 %98, label %99, label %102
99: ; preds = %92
%100 = load i32, i32* @stderr
%101 = call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
store i32 2, i32* %3
br label %150
102: ; preds = %92
store i32 1, i32* %6
br label %103
103: ; preds = %148, %102
%104 = load i32, i32* %6
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %149
106: ; preds = %103
%107 = load i32, i32* %7
%108 = load i8*, i8** %10
%109 = load i32, i32* %12
%110 = call i32 @read(i32 %107, i8* %108, i32 %109)
store i32 %110, i32* %6
store i32 0, i32* %9
br label %111
111: ; preds = %145, %106
%112 = load i32, i32* %9
%113 = load i32, i32* %12
%114 = icmp ult i32 %112, %113
br i1 %114, label %115, label %148
115: ; preds = %111
%116 = load i8*, i8** %10
%117 = load i32, i32* %9
%118 = zext i32 %117 to i64
%119 = getelementptr inbounds i8, i8* %116, i64 %118
store i8* %119, i8** %11
%120 = load i8*, i8** %11
%121 = getelementptr inbounds i8, i8* %120, i64 1
%122 = call i32 @memcpy(i16* %8, i8* %121, i32 2)
%123 = load i16, i16* %8
%124 = call zeroext i16 @ntohs(i16 zeroext %123)
store i16 %124, i16* %8
%125 = load i16, i16* %8
%126 = zext i16 %125 to i32
%127 = and i32 %126, 8191
%128 = trunc i32 %127 to i16
store i16 %128, i16* %8
%129 = load i16, i16* %8
%130 = zext i16 %129 to i32
%131 = icmp slt i32 %130, 8192
br i1 %131, label %132, label %144
132: ; preds = %115
%133 = load i16, i16* %8
%134 = zext i16 %133 to i64
%135 = getelementptr inbounds [8192 x i8], [8192 x i8]* %13, i64 0, i64 %134
%136 = load i8, i8* %135
%137 = zext i8 %136 to i32
%138 = icmp eq i32 %137, 0
br i1 %138, label %139, label %143
139: ; preds = %132
%140 = load i32, i32* @STDOUT_FILENO
%141 = load i8*, i8** %11
%142 = call i32 @write(i32 %140, i8* %141, i32 188)
br label %143
143: ; preds = %139, %132
br label %144
144: ; preds = %143, %115
br label %145
145: ; preds = %144
%146 = load i32, i32* %9
%147 = add i32 %146, 188
store i32 %147, i32* %9
br label %111
148: ; preds = %111
br label %103
149: ; preds = %103
store i32 0, i32* %3
br label %150
150: ; preds = %149, %99, %72, %33, %26
%151 = load i32, i32* %3
ret i32 %151
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str = [20 x i8] c"Can't find file %s\0A\00"
@.str.1 = [15 x i8] c"remove pid %d\0A\00"
@.str.2 = [34 x i8] c"pid range should be from 0 to %d\0A\00"
@.str.3 = [15 x i8] c"Out of memory\0A\00"
@STDOUT_FILENO = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i16
%4 = alloca [8192 x i8]
%5 = bitcast i16* %3 to i8*
%6 = getelementptr inbounds [8192 x i8], [8192 x i8]* %4, i64 0, i64 0
%7 = call i32 @memset(i8* %6, i32 0, i32 8192)
%8 = icmp sgt i32 %0, 1
br i1 %8, label %9, label %23
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = load i32, i32* @O_RDONLY
%13 = call i32 @open(i8* %11, i32 %12)
%14 = icmp slt i32 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %9
%16 = icmp ugt i32 %0, 2
br i1 %16, label %17, label %58
17: ; preds = %15
%18 = zext i32 %0 to i64
br label %25
19: ; preds = %9
%20 = load i32, i32* @stderr
%21 = load i8*, i8** %10
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %21)
br label %91
23: ; preds = %2
%24 = call i32 (...) @Usage()
br label %91
25: ; preds = %17, %51
%26 = phi i64 [ 2, %17 ], [ %53, %51 ]
%27 = phi i32 [ 0, %17 ], [ %52, %51 ]
%28 = getelementptr inbounds i8*, i8** %1, i64 %26
%29 = load i8*, i8** %28
%30 = load i8, i8* %29
%31 = icmp eq i8 %30, 45
br i1 %31, label %32, label %47
32: ; preds = %25
%33 = getelementptr inbounds i8, i8* %29, i64 1
%34 = call i8* @atoi(i8* %33)
%35 = ptrtoint i8* %34 to i64
%36 = trunc i64 %35 to i16
store i16 %36, i16* %3
%37 = trunc i64 %35 to i32
%38 = and i32 %37, 65535
%39 = icmp ult i32 %38, 8192
%40 = load i32, i32* @stderr
br i1 %39, label %41, label %45
41: ; preds = %32
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %38)
%43 = and i64 %35, 65535
%44 = getelementptr inbounds [8192 x i8], [8192 x i8]* %4, i64 0, i64 %43
store i8 1, i8* %44
br label %51
45: ; preds = %32
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 8192)
br label %91
47: ; preds = %25
%48 = call i8* @atoi(i8* %29)
%49 = ptrtoint i8* %48 to i64
%50 = trunc i64 %49 to i32
br label %51
51: ; preds = %47, %41
%52 = phi i32 [ %27, %41 ], [ %50, %47 ]
%53 = add nuw nsw i64 %26, 1
%54 = icmp eq i64 %53, %18
br i1 %54, label %55, label %25
55: ; preds = %51
%56 = icmp eq i32 %52, 0
%57 = mul i32 %52, 188
br i1 %56, label %58, label %59
58: ; preds = %15, %55
br label %59
59: ; preds = %55, %58
%60 = phi i32 [ 188, %58 ], [ %57, %55 ]
%61 = call i8* @malloc(i32 %60)
%62 = icmp eq i8* %61, null
br i1 %62, label %65, label %63
63: ; preds = %59
%64 = icmp eq i32 %60, 0
br label %70
65: ; preds = %59
%66 = load i32, i32* @stderr
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %91
68: ; preds = %88, %70
%69 = icmp eq i32 %71, 0
br i1 %69, label %91, label %70
70: ; preds = %63, %68
%71 = call i32 @read(i32 %13, i8* %61, i32 %60)
br i1 %64, label %68, label %72
72: ; preds = %70, %88
%73 = phi i32 [ %89, %88 ], [ 0, %70 ]
%74 = zext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* %61, i64 %74
%76 = getelementptr inbounds i8, i8* %75, i64 1
%77 = call i32 @memcpy(i16* %3, i8* %76, i32 2)
%78 = load i16, i16* %3
%79 = call zeroext i16 @ntohs(i16 zeroext %78)
%80 = and i16 %79, 8191
store i16 %80, i16* %3
%81 = zext i16 %80 to i64
%82 = getelementptr inbounds [8192 x i8], [8192 x i8]* %4, i64 0, i64 %81
%83 = load i8, i8* %82
%84 = icmp eq i8 %83, 0
br i1 %84, label %85, label %88
85: ; preds = %72
%86 = load i32, i32* @STDOUT_FILENO
%87 = call i32 @write(i32 %86, i8* %75, i32 188)
br label %88
88: ; preds = %85, %72
%89 = add i32 %73, 188
%90 = icmp ult i32 %89, %60
br i1 %90, label %72, label %68
91: ; preds = %68, %65, %45, %23, %19
%92 = phi i32 [ 2, %19 ], [ 2, %45 ], [ 2, %65 ], [ 2, %23 ], [ 0, %68 ]
ret i32 %92
}