#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 */
struct sockaddr_in {
  char *member_3;
  int /*<<< orphan*/ member_2;
  int /*<<< orphan*/ member_1;
  int /*<<< orphan*/ member_0;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ PF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ atoi(char *);
int connect(int, struct sockaddr *, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fe(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ htons(int /*<<< orphan*/);
int /*<<< orphan*/ inet_addr(char *);
int /*<<< orphan*/ memset(char **, char, int);
int /*<<< orphan*/ printf(char *, ...);
int recv(int, char **, int, int /*<<< orphan*/);
int /*<<< orphan*/ send(int, char **, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int main(int argc, char *argv[]) {
  if (argc < 3) {
    printf("USAGE: %s %s %s\n", argv[0], "[ip]", "[port]");
    exit(0);
  }
  int fd, recv_len = 0, i;
  socklen_t addr_len;
  char buf[1024], r_buf[1024], *c_stop = "client(stop)",
                               *s_stop = "server(stop)",
                               *c_msg = "[!] Stop client with \"client(stop)\"",
                               *c_quitting = "[!] Client quitting...";
  memset(&buf, '\x00', 1024);
  struct sockaddr_in c_addr = {AF_INET, htons(atoi(argv[2])),
                               inet_addr(argv[1]), "00000000"};
  fd = socket(PF_INET, SOCK_STREAM, 0);
  if (connect(fd, (struct sockaddr *)&c_addr, sizeof(struct sockaddr)) == -1) {
    snprintf(buf, sizeof buf, "Couldn't CX  to %s:%s !", argv[1], argv[2]);
    fe(buf);
  } else {
    printf("%s\n", c_msg);
    recv_len = recv(fd, &buf, 1024, 0);
    if (recv_len > 0) {
      for (i = 0; i < recv_len; i++) {
        printf("%c", buf[i]);
      }
      printf("\n");
    }
  }
  while (1) {
    memset(&buf, '\x00', 1024);
    fgets(buf, 1024, stdin);
    send(fd, &buf, strlen(buf), 0);
    if ((strncmp(c_stop, buf, 12) == 0) || (strncmp(s_stop, buf, 12) == 0)) {
      printf("%s\n", c_quitting);
      exit(0);
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x870,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    123d <main+0x4d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xddf(%rip),%rdi
lea    0xde9(%rip),%rdx
lea    0xde7(%rip),%rcx
mov    $0x0,%al
call   1080 <printf@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
movl   $0x0,-0x18(%rbp)
lea    0xdd2(%rip),%rax
mov    %rax,-0x828(%rbp)
lea    0xdd1(%rip),%rax
mov    %rax,-0x830(%rbp)
lea    0xdd0(%rip),%rax
mov    %rax,-0x838(%rbp)
lea    0xde6(%rip),%rax
mov    %rax,-0x840(%rbp)
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   10a0 <memset@plt>
mov    0x2d52(%rip),%rax
movslq (%rax),%rax
mov    %rax,-0x858(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10e0 <atoi@plt>
mov    %eax,%edi
call   1060 <htons@plt>
mov    %eax,-0x850(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10c0 <inet_addr@plt>
mov    %eax,-0x84c(%rbp)
lea    0xd9e(%rip),%rax
mov    %eax,-0x848(%rbp)
mov    0x2ce7(%rip),%rax
mov    (%rax),%edi
mov    0x2ce6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1110 <socket@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x858(%rbp),%rsi
mov    $0x4,%edx
call   1100 <connect@plt>
cmp    $0xffffffff,%eax
jne    134c <main+0x15c>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%r8
mov    $0x400,%esi
lea    0xd45(%rip),%rdx
call   1090 <snprintf@plt>
lea    -0x420(%rbp),%rdi
call   10d0 <fe@plt>
jmp    13d2 <main+0x1e2>
mov    -0x838(%rbp),%rsi
lea    0xcb3(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x14(%rbp),%edi
lea    -0x420(%rbp),%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jle    13cd <main+0x1dd>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    13bf <main+0x1cf>
movslq -0x1c(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%esi
ff
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    138b <main+0x19b>
lea    0xc49(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    13d2 <main+0x1e2>
jmp    13d7 <main+0x1e7>
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   10a0 <memset@plt>
lea    -0x420(%rbp),%rdi
mov    0x2be8(%rip),%rax
mov    (%rax),%edx
mov    $0x400,%esi
call   10b0 <fgets@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x864(%rbp)
lea    -0x420(%rbp),%rax
mov    %rax,-0x860(%rbp)
lea    -0x420(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x864(%rbp),%edi
mov    -0x860(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1070 <send@plt>
mov    -0x828(%rbp),%rdi
lea    -0x420(%rbp),%rsi
mov    $0xc,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     1481 <main+0x291>
mov    -0x830(%rbp),%rdi
lea    -0x420(%rbp),%rsi
mov    $0xc,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    149d <main+0x2ad>
mov    -0x840(%rbp),%rsi
lea    0xb7e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
jmp    13d7 <main+0x1e7>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x420,%rsp
mov    %rsi,%r14
cmp    $0x2,%edi
jg     124d <main+0x3d>
mov    (%r14),%rsi
lea    0xdcf(%rip),%rdi
lea    0xdd9(%rip),%rdx
lea    0xdd7(%rip),%rcx
xor    %eax,%eax
call   10a0 <printf@plt>
xor    %edi,%edi
call   1110 <exit@plt>
lea    0x20(%rsp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   10c0 <memset@plt>
mov    0x2d83(%rip),%rax
movslq (%rax),%rax
mov    %rax,0x8(%rsp)
mov    0x10(%r14),%rdi
call   1100 <atoi@plt>
mov    %eax,%edi
call   1080 <htons@plt>
mov    %eax,0x10(%rsp)
mov    0x8(%r14),%rdi
call   10e0 <inet_addr@plt>
mov    %eax,0x14(%rsp)
lea    0xddd(%rip),%rax
mov    %eax,0x18(%rsp)
mov    0x2d28(%rip),%rax
mov    (%rax),%edi
mov    0x2d27(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1130 <socket@plt>
mov    %eax,%r15d
lea    0x8(%rsp),%rsi
mov    %eax,%edi
mov    $0x4,%edx
call   1120 <connect@plt>
cmp    $0xffffffff,%eax
jne    12f6 <main+0xe6>
mov    0x8(%r14),%rcx
mov    0x10(%r14),%r8
lea    0xda1(%rip),%rdx
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   10b0 <snprintf@plt>
mov    %rbx,%rdi
call   10f0 <fe@plt>
jmp    133d <main+0x12d>
lea    0xd3a(%rip),%rdi
call   1060 <puts@plt>
lea    0x20(%rsp),%rsi
mov    %r15d,%edi
mov    $0x400,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
test   %eax,%eax
jle    133d <main+0x12d>
mov    %eax,%ebx
xor    %ebp,%ebp
xchg   %ax,%ax
movsbl 0x20(%rsp,%rbp,1),%edi
call   1040 <putchar@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1320 <main+0x110>
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0x20(%rsp),%rbx
mov    0x2c97(%rip),%r12
lea    0xccd(%rip),%r14
lea    0xcd3(%rip),%rbp
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   10c0 <memset@plt>
mov    (%r12),%edx
mov    %rbx,%rdi
mov    $0x400,%esi
call   10d0 <fgets@plt>
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %r15d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1090 <send@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0xc,%edx
call   1050 <strncmp@plt>
test   %rax,%rax
je     13c1 <main+0x1b1>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0xc,%edx
call   1050 <strncmp@plt>
test   %rax,%rax
jne    1360 <main+0x150>
lea    0xc93(%rip),%rdi
call   1060 <puts@plt>
xor    %edi,%edi
call   1110 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i8*, i32, i32, i32 }
%struct.sockaddr = type { i32 }
@.str = [17 x i8] c"USAGE: %s %s %s\0A\00"
@.str.1 = [5 x i8] c"[ip]\00"
@.str.2 = [7 x i8] c"[port]\00"
@.str.3 = [13 x i8] c"client(stop)\00"
@.str.4 = [13 x i8] c"server(stop)\00"
@.str.5 = [36 x i8] c"[!] Stop client with \22client(stop)\22\00"
@.str.6 = [23 x i8] c"[!] Client quitting...\00"
@AF_INET = global i32 0
@.str.7 = [9 x i8] c"00000000\00"
@PF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.8 = [24 x i8] c"Couldn't CX to %s:%s !\00"
@.str.9 = [4 x i8] c"%s\0A\00"
@.str.10 = [3 x i8] c"%c\00"
@.str.11 = [2 x i8] c"\0A\00"
@stdin = 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 i32
%9 = alloca i32
%10 = alloca [1024 x i8]
%11 = alloca [1024 x i8]
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca %struct.sockaddr_in
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%17 = load i32, i32* %4
%18 = icmp slt i32 %17, 3
br i1 %18, label %19, label %25
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 0
%22 = load i8*, i8** %21
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%24 = call i32 @exit(i32 0)
unreachable
25: ; preds = %2
store i32 0, i32* %7
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8** %12
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8** %13
store i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), i8** %14
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i8** %15
%26 = bitcast [1024 x i8]* %10 to i8**
%27 = call i32 @memset(i8** %26, i8 signext 0, i32 1024)
%28 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %16, i32 0, i32 0
%29 = load i32, i32* @AF_INET
%30 = sext i32 %29 to i64
%31 = inttoptr i64 %30 to i8*
store i8* %31, i8** %28
%32 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %16, i32 0, i32 1
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 2
%35 = load i8*, i8** %34
%36 = call i32 @atoi(i8* %35)
%37 = call i32 @htons(i32 %36)
store i32 %37, i32* %32
%38 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %16, i32 0, i32 2
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = load i8*, i8** %40
%42 = call i32 @inet_addr(i8* %41)
store i32 %42, i32* %38
%43 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %16, i32 0, i32 3
store i32 ptrtoint ([9 x i8]* @.str.7 to i32), i32* %43
%44 = load i32, i32* @PF_INET
%45 = load i32, i32* @SOCK_STREAM
%46 = call i32 @socket(i32 %44, i32 %45, i32 0)
store i32 %46, i32* %6
%47 = load i32, i32* %6
%48 = bitcast %struct.sockaddr_in* %16 to %struct.sockaddr*
%49 = call i32 @connect(i32 %47, %struct.sockaddr* %48, i32 4)
%50 = icmp eq i32 %49, -1
br i1 %50, label %51, label %62
51: ; preds = %25
%52 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%53 = load i8**, i8*** %5
%54 = getelementptr inbounds i8*, i8** %53, i64 1
%55 = load i8*, i8** %54
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 2
%58 = load i8*, i8** %57
%59 = call i32 @snprintf(i8* %52, i32 1024, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* %55, i8* %58)
%60 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%61 = call i32 @fe(i8* %60)
br label %88
62: ; preds = %25
%63 = load i8*, i8** %14
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %63)
%65 = load i32, i32* %6
%66 = bitcast [1024 x i8]* %10 to i8**
%67 = call i32 @recv(i32 %65, i8** %66, i32 1024, i32 0)
store i32 %67, i32* %7
%68 = load i32, i32* %7
%69 = icmp sgt i32 %68, 0
br i1 %69, label %70, label %87
70: ; preds = %62
store i32 0, i32* %8
br label %71
71: ; preds = %82, %70
%72 = load i32, i32* %8
%73 = load i32, i32* %7
%74 = icmp slt i32 %72, %73
br i1 %74, label %75, label %85
75: ; preds = %71
%76 = load i32, i32* %8
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 %77
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 %80)
br label %82
82: ; preds = %75
%83 = load i32, i32* %8
%84 = add nsw i32 %83, 1
store i32 %84, i32* %8
br label %71
85: ; preds = %71
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %87
87: ; preds = %85, %62
br label %88
88: ; preds = %87, %51
br label %89
89: ; preds = %88, %113
%90 = bitcast [1024 x i8]* %10 to i8**
%91 = call i32 @memset(i8** %90, i8 signext 0, i32 1024)
%92 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%93 = load i32, i32* @stdin
%94 = call i32 @fgets(i8* %92, i32 1024, i32 %93)
%95 = load i32, i32* %6
%96 = bitcast [1024 x i8]* %10 to i8**
%97 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%98 = call i32 @strlen(i8* %97)
%99 = call i32 @send(i32 %95, i8** %96, i32 %98, i32 0)
%100 = load i8*, i8** %12
%101 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%102 = call i64 @strncmp(i8* %100, i8* %101, i32 12)
%103 = icmp eq i64 %102, 0
br i1 %103, label %109, label %104
104: ; preds = %89
%105 = load i8*, i8** %13
%106 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%107 = call i64 @strncmp(i8* %105, i8* %106, i32 12)
%108 = icmp eq i64 %107, 0
br i1 %108, label %109, label %113
109: ; preds = %104, %89
%110 = load i8*, i8** %15
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %110)
%112 = call i32 @exit(i32 0)
unreachable
113: ; preds = %104
br label %89
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i8*, i32, i32, i32 }
%struct.sockaddr = type { i32 }
@.str = [17 x i8] c"USAGE: %s %s %s\0A\00"
@.str.1 = [5 x i8] c"[ip]\00"
@.str.2 = [7 x i8] c"[port]\00"
@.str.3 = [13 x i8] c"client(stop)\00"
@.str.4 = [13 x i8] c"server(stop)\00"
@.str.5 = [36 x i8] c"[!] Stop client with \22client(stop)\22\00"
@.str.6 = [23 x i8] c"[!] Client quitting...\00"
@AF_INET = global i32 0
@.str.7 = [9 x i8] c"00000000\00"
@PF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.8 = [24 x i8] c"Couldn't CX to %s:%s !\00"
@stdin = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = alloca %struct.sockaddr_in
%5 = icmp slt i32 %0, 3
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %2
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%12 = bitcast [1024 x i8]* %3 to i8**
%13 = call i32 @memset(i8** %12, i8 signext 0, i32 1024)
%14 = bitcast %struct.sockaddr_in* %4 to i8*
%15 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 0
%16 = load i32, i32* @AF_INET
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i8*
store i8* %18, i8** %15
%19 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 1
%20 = getelementptr inbounds i8*, i8** %1, i64 2
%21 = load i8*, i8** %20
%22 = call i32 @atoi(i8* %21)
%23 = call i32 @htons(i32 %22)
store i32 %23, i32* %19
%24 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 2
%25 = getelementptr inbounds i8*, i8** %1, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @inet_addr(i8* %26)
store i32 %27, i32* %24
%28 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 3
store i32 ptrtoint ([9 x i8]* @.str.7 to i32), i32* %28
%29 = load i32, i32* @PF_INET
%30 = load i32, i32* @SOCK_STREAM
%31 = call i32 @socket(i32 %29, i32 %30, i32 0)
%32 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%33 = call i32 @connect(i32 %31, %struct.sockaddr* %32, i32 4)
%34 = icmp eq i32 %33, -1
br i1 %34, label %35, label %40
35: ; preds = %10
%36 = load i8*, i8** %25
%37 = load i8*, i8** %20
%38 = call i32 @snprintf(i8* %11, i32 1024, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* %36, i8* %37)
%39 = call i32 @fe(i8* %11)
br label %56
40: ; preds = %10
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%42 = call i32 @recv(i32 %31, i8** %12, i32 1024, i32 0)
%43 = icmp sgt i32 %42, 0
br i1 %43, label %44, label %56
44: ; preds = %40
%45 = zext i32 %42 to i64
br label %46
46: ; preds = %44, %46
%47 = phi i64 [ 0, %44 ], [ %52, %46 ]
%48 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %47
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = call i32 @putchar(i32 %50)
%52 = add nuw nsw i64 %47, 1
%53 = icmp eq i64 %52, %45
br i1 %53, label %54, label %46
54: ; preds = %46
%55 = call i32 @putchar(i32 10)
br label %56
56: ; preds = %40, %54, %35
br label %57
57: ; preds = %56, %65
%58 = call i32 @memset(i8** %12, i8 signext 0, i32 1024)
%59 = load i32, i32* @stdin
%60 = call i32 @fgets(i8* %11, i32 1024, i32 %59)
%61 = call i32 @strlen(i8* %11)
%62 = call i32 @send(i32 %31, i8** %12, i32 %61, i32 0)
%63 = call i64 @strncmp(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %11, i32 12)
%64 = icmp eq i64 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %57
%66 = call i64 @strncmp(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* %11, i32 12)
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %57
68: ; preds = %65, %57
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%70 = call i32 @exit(i32 0)
unreachable
}