#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
  TYPE_1__ sin_addr;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ echoServAddr;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
unsigned short atoi(char *);
int /*<<< orphan*/ close(int);
scalar_t__ connect(int, struct sockaddr *, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fatal(char *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ htons(unsigned short);
int /*<<< orphan*/ inet_addr(char *);
char *malloc(int);
int /*<<< orphan*/ memset(struct sockaddr_in *, int /*<<< orphan*/, int);
int readn(int, char *, int);
int send(int, char *, int, int /*<<< orphan*/);
int snprintf(char *, int, char *, char *, char *, char *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ *strstr(char *, char *);
int main(int argc, char *argv[]) {
  char *servIP = NULL;
  char *servPort = NULL;
  switch (argc) {
  case 3:
    servPort = argv[2];
    servIP = argv[1];
    break;
  default:
    fprintf(stderr, "Usage: %s <bgpmon IP> <bgpmon Port> \n", argv[0]);
    exit(1);
    break;
  }
  int sock;
  if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
    fatal("socket() failed");
  unsigned short echoServPort = atoi(servPort);
  struct sockaddr_in echoServAddr;
  memset(&echoServAddr, 0, sizeof(echoServAddr));
  echoServAddr.sin_family = AF_INET;
  echoServAddr.sin_addr.s_addr = inet_addr(servIP);
  echoServAddr.sin_port = htons(echoServPort);
  if (connect(sock, (struct sockaddr *)&echoServAddr, sizeof(echoServAddr)) < 0)
    fatal("connect() failed");
  int size = 2048;
  char *xml = malloc(size + 1);
  xml[0] = '\0';
  xml[size] = '\0';
  int lxml = 0;
  char *xmlver = "";
  char *xmlname = "test client";
  char *type = "message";
  lxml = snprintf(xml, size, "%s<request type=\"%s\" name=\"%s\"/>\n\n", xmlver,
                  type, xmlname);
  if (send(sock, xml, lxml, 0) != lxml)
    fatal("request sent a different number of bytes than expected");
  xml[size] = '\0';
  for (;;) {
    int len = readn(sock, xml, size);
    if (len <= 0)
      break;
    fwrite(xml, 1, len, stdout);
    fflush(stdout);
    if (strstr(xml, "<die>") != NULL)
      break;
  }
  fprintf(stderr, "Done\n");
  close(sock);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
jne    1264 <main+0x54>
jmp    1247 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    128c <main+0x7c>
mov    0x2d6d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd85(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    0x2d55(%rip),%rax
mov    (%rax),%edi
mov    0x2d34(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1130 <socket@plt>
mov    %eax,-0x24(%rbp)
cmp    $0x0,%eax
jge    12bd <main+0xad>
lea    0xd6e(%rip),%rdi
call   1110 <fatal@plt>
mov    -0x20(%rbp),%rdi
call   10d0 <atoi@plt>
mov    %ax,-0x26(%rbp)
lea    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1060 <memset@plt>
mov    0x2d07(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
call   1090 <inet_addr@plt>
mov    %eax,-0x34(%rbp)
movzwl -0x26(%rbp),%edi
call   1030 <htons@plt>
mov    %eax,-0x38(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x38(%rbp),%rsi
mov    $0xc,%edx
call   10f0 <connect@plt>
cmp    $0x0,%rax
jge    1325 <main+0x115>
lea    0xd16(%rip),%rdi
call   1110 <fatal@plt>
movl   $0x800,-0x3c(%rbp)
mov    -0x3c(%rbp),%edi
add    $0x1,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x48(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
movl   $0x0,-0x4c(%rbp)
lea    0xd21(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    0xce0(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    0xce1(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x3c(%rbp),%esi
mov    -0x58(%rbp),%rcx
mov    -0x68(%rbp),%r8
mov    -0x60(%rbp),%r9
lea    0xccb(%rip),%rdx
call   1050 <snprintf@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x48(%rbp),%rsi
mov    -0x4c(%rbp),%edx
xor    %ecx,%ecx
call   1040 <send@plt>
cmp    -0x4c(%rbp),%eax
je     13be <main+0x1ae>
lea    0xcc5(%rip),%rdi
call   1110 <fatal@plt>
mov    -0x48(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x24(%rbp),%edi
mov    -0x48(%rbp),%rsi
mov    -0x3c(%rbp),%edx
call   1070 <readn@plt>
mov    %eax,-0x6c(%rbp)
cmpl   $0x0,-0x6c(%rbp)
jg     13eb <main+0x1db>
jmp    1437 <main+0x227>
mov    -0x48(%rbp),%rdi
mov    -0x6c(%rbp),%edx
mov    0x2bcf(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1100 <fwrite@plt>
mov    0x2bbc(%rip),%rax
mov    (%rax),%edi
call   10c0 <fflush@plt>
mov    -0x48(%rbp),%rdi
lea    0xc97(%rip),%rsi
call   1120 <strstr@plt>
cmp    $0x0,%rax
je     1432 <main+0x222>
jmp    1437 <main+0x227>
jmp    13ca <main+0x1ba>
mov    0x2b9a(%rip),%rax
mov    (%rax),%edi
lea    0xc74(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x24(%rbp),%edi
call   1080 <close@plt>
xor    %edi,%edi
call   10e0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
cmp    $0x3,%edi
jne    1394 <main+0x184>
mov    0x8(%rsi),%r15
mov    0x10(%rsi),%rbp
mov    0x2db4(%rip),%r12
mov    (%r12),%edi
mov    0x2d91(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1130 <socket@plt>
mov    %eax,%r14d
test   %eax,%eax
jns    125b <main+0x4b>
lea    0xdd0(%rip),%rdi
call   1110 <fatal@plt>
mov    %rbp,%rdi
call   10d0 <atoi@plt>
mov    %eax,%ebp
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1060 <memset@plt>
mov    (%r12),%eax
mov    %eax,0x8(%rsp)
mov    %r15,%rdi
call   1090 <inet_addr@plt>
mov    %eax,0x4(%rsp)
movzwl %bp,%edi
call   1030 <htons@plt>
mov    %eax,(%rsp)
mov    %r14d,%edi
mov    %rbx,%rsi
mov    $0xc,%edx
call   10f0 <connect@plt>
test   %rax,%rax
jns    12b7 <main+0xa7>
lea    0xd84(%rip),%rdi
call   1110 <fatal@plt>
mov    $0x801,%edi
call   10b0 <malloc@plt>
mov    %rax,%rbx
movb   $0x0,(%rax)
movb   $0x0,0x800(%rax)
lea    0xd86(%rip),%rdx
lea    0xda1(%rip),%rcx
lea    0xd70(%rip),%r8
lea    0xd5d(%rip),%r9
mov    %rax,%rdi
mov    $0x800,%esi
call   1050 <snprintf@plt>
mov    %eax,%ebp
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1040 <send@plt>
cmp    %ebp,%eax
je     1318 <main+0x108>
lea    0xd6b(%rip),%rdi
call   1110 <fatal@plt>
movb   $0x0,0x800(%rbx)
mov    0x2ca2(%rip),%rbp
lea    0xd88(%rip),%r15
nopl   (%rax)
mov    %r14d,%edi
mov    %rbx,%rsi
mov    $0x800,%edx
call   1070 <readn@plt>
test   %eax,%eax
jle    136e <main+0x15e>
mov    0x0(%rbp),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
call   1100 <fwrite@plt>
mov    0x0(%rbp),%edi
call   10c0 <fflush@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1120 <strstr@plt>
test   %rax,%rax
je     1330 <main+0x120>
mov    0x2c63(%rip),%rax
mov    (%rax),%edi
lea    0xd3d(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    %r14d,%edi
call   1080 <close@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
mov    0x2c3d(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xc59(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [38 x i8] c"Usage: %s <bgpmon IP> <bgpmon Port> \0A\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [16 x i8] c"socket() failed\00"
@.str.2 = [17 x i8] c"connect() failed\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [12 x i8] c"test client\00"
@.str.5 = [8 x i8] c"message\00"
@.str.6 = [35 x i8] c"%s<request type=\22%s\22 name=\22%s\22/>\0A\0A\00"
@.str.7 = [55 x i8] c"request sent a different number of bytes than expected\00"
@stdout = global i32 0
@.str.8 = [6 x i8] c"<die>\00"
@.str.9 = [6 x i8] c"Done\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i16
%10 = alloca %struct.sockaddr_in
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
store i8* null, i8** %7
%18 = load i32, i32* %4
switch i32 %18, label %26 [
i32 3, label %19
]
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 2
%22 = load i8*, i8** %21
store i8* %22, i8** %7
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
store i8* %25, i8** %6
br label %33
26: ; preds = %2
%27 = load i32, i32* @stderr
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 0
%30 = load i8*, i8** %29
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %30)
%32 = call i32 @exit(i32 1)
unreachable
33: ; preds = %19
%34 = load i32, i32* @AF_INET
%35 = load i32, i32* @SOCK_STREAM
%36 = call i32 @socket(i32 %34, i32 %35, i32 0)
store i32 %36, i32* %8
%37 = icmp slt i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %33
%39 = call i32 @fatal(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %40
40: ; preds = %38, %33
%41 = load i8*, i8** %7
%42 = call zeroext i16 @atoi(i8* %41)
store i16 %42, i16* %9
%43 = call i32 @memset(%struct.sockaddr_in* %10, i32 0, i32 12)
%44 = load i32, i32* @AF_INET
%45 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i32 0, i32 2
store i32 %44, i32* %45
%46 = load i8*, i8** %6
%47 = call i32 @inet_addr(i8* %46)
%48 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i32 0, i32 1
%49 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %48, i32 0, i32 0
store i32 %47, i32* %49
%50 = load i16, i16* %9
%51 = call i32 @htons(i16 zeroext %50)
%52 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i32 0, i32 0
store i32 %51, i32* %52
%53 = load i32, i32* %8
%54 = bitcast %struct.sockaddr_in* %10 to %struct.sockaddr*
%55 = call i64 @connect(i32 %53, %struct.sockaddr* %54, i32 12)
%56 = icmp slt i64 %55, 0
br i1 %56, label %57, label %59
57: ; preds = %40
%58 = call i32 @fatal(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %59
59: ; preds = %57, %40
store i32 2048, i32* %11
%60 = load i32, i32* %11
%61 = add nsw i32 %60, 1
%62 = call i8* @malloc(i32 %61)
store i8* %62, i8** %12
%63 = load i8*, i8** %12
%64 = getelementptr inbounds i8, i8* %63, i64 0
store i8 0, i8* %64
%65 = load i8*, i8** %12
%66 = load i32, i32* %11
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8, i8* %65, i64 %67
store i8 0, i8* %68
store i32 0, i32* %13
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8** %14
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8** %15
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8** %16
%69 = load i8*, i8** %12
%70 = load i32, i32* %11
%71 = load i8*, i8** %14
%72 = load i8*, i8** %16
%73 = load i8*, i8** %15
%74 = call i32 @snprintf(i8* %69, i32 %70, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i8* %71, i8* %72, i8* %73)
store i32 %74, i32* %13
%75 = load i32, i32* %8
%76 = load i8*, i8** %12
%77 = load i32, i32* %13
%78 = call i32 @send(i32 %75, i8* %76, i32 %77, i32 0)
%79 = load i32, i32* %13
%80 = icmp ne i32 %78, %79
br i1 %80, label %81, label %83
81: ; preds = %59
%82 = call i32 @fatal(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0))
br label %83
83: ; preds = %81, %59
%84 = load i8*, i8** %12
%85 = load i32, i32* %11
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i8, i8* %84, i64 %86
store i8 0, i8* %87
br label %88
88: ; preds = %107, %83
%89 = load i32, i32* %8
%90 = load i8*, i8** %12
%91 = load i32, i32* %11
%92 = call i32 @readn(i32 %89, i8* %90, i32 %91)
store i32 %92, i32* %17
%93 = load i32, i32* %17
%94 = icmp sle i32 %93, 0
br i1 %94, label %95, label %96
95: ; preds = %88
br label %108
96: ; preds = %88
%97 = load i8*, i8** %12
%98 = load i32, i32* %17
%99 = load i32, i32* @stdout
%100 = call i32 @fwrite(i8* %97, i32 1, i32 %98, i32 %99)
%101 = load i32, i32* @stdout
%102 = call i32 @fflush(i32 %101)
%103 = load i8*, i8** %12
%104 = call i32* @strstr(i8* %103, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%105 = icmp ne i32* %104, null
br i1 %105, label %106, label %107
106: ; preds = %96
br label %108
107: ; preds = %96
br label %88
108: ; preds = %106, %95
%109 = load i32, i32* @stderr
%110 = call i32 (i32, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%111 = load i32, i32* %8
%112 = call i32 @close(i32 %111)
%113 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [38 x i8] c"Usage: %s <bgpmon IP> <bgpmon Port> \0A\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [16 x i8] c"socket() failed\00"
@.str.2 = [17 x i8] c"connect() failed\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [12 x i8] c"test client\00"
@.str.5 = [8 x i8] c"message\00"
@.str.6 = [35 x i8] c"%s<request type=\22%s\22 name=\22%s\22/>\0A\0A\00"
@.str.7 = [55 x i8] c"request sent a different number of bytes than expected\00"
@stdout = global i32 0
@.str.8 = [6 x i8] c"<die>\00"
@.str.9 = [6 x i8] c"Done\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.sockaddr_in
%4 = icmp eq i32 %0, 3
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = load i32, i32* @AF_INET
%11 = load i32, i32* @SOCK_STREAM
%12 = tail call i32 @socket(i32 %10, i32 %11, i32 0)
%13 = icmp slt i32 %12, 0
br i1 %13, label %19, label %21
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %1
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = tail call i32 @exit(i32 1)
unreachable
19: ; preds = %5
%20 = tail call i32 @fatal(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %19, %5
%22 = tail call zeroext i16 @atoi(i8* %7)
%23 = bitcast %struct.sockaddr_in* %3 to i8*
%24 = call i32 @memset(%struct.sockaddr_in* %3, i32 0, i32 12)
%25 = load i32, i32* @AF_INET
%26 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 2
store i32 %25, i32* %26
%27 = call i32 @inet_addr(i8* %9)
%28 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 1, i32 0
store i32 %27, i32* %28
%29 = call i32 @htons(i16 zeroext %22)
%30 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
store i32 %29, i32* %30
%31 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%32 = call i64 @connect(i32 %12, %struct.sockaddr* %31, i32 12)
%33 = icmp slt i64 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %21
%35 = call i32 @fatal(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %36
36: ; preds = %34, %21
%37 = call dereferenceable_or_null(2049) i8* @malloc(i32 2049)
store i8 0, i8* %37
%38 = getelementptr inbounds i8, i8* %37, i64 2048
store i8 0, i8* %38
%39 = call i32 @snprintf(i8* %37, i32 2048, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%40 = call i32 @send(i32 %12, i8* %37, i32 %39, i32 0)
%41 = icmp eq i32 %40, %39
br i1 %41, label %44, label %42
42: ; preds = %36
%43 = call i32 @fatal(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0))
br label %44
44: ; preds = %42, %36
store i8 0, i8* %38
br label %45
45: ; preds = %48, %44
%46 = call i32 @readn(i32 %12, i8* %37, i32 2048)
%47 = icmp slt i32 %46, 1
br i1 %47, label %55, label %48
48: ; preds = %45
%49 = load i32, i32* @stdout
%50 = call i32 @fwrite(i8* %37, i32 1, i32 %46, i32 %49)
%51 = load i32, i32* @stdout
%52 = call i32 @fflush(i32 %51)
%53 = call i32* @strstr(i8* %37, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%54 = icmp eq i32* %53, null
br i1 %54, label %45, label %55
55: ; preds = %45, %48
%56 = load i32, i32* @stderr
%57 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%58 = call i32 @close(i32 %12)
%59 = call i32 @exit(i32 0)
unreachable
}