#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 */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ *inet_readline(int, char *, char **, int);
int inet_write(int, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *strrchr(char *, char);
int mpd_current_album(int sock, char *album, int size) {
  char buf[1280], *rest, *p;
  if (album == NULL || size < 1)
    return -1;
  *album = 0;
  if (inet_write(sock, "currentsong\n") == -1) {
    fprintf(stderr, "error in connection with MPD\n");
    return -1;
  }
  rest = NULL;
  while (inet_readline(sock, buf, &rest, sizeof(buf)) != NULL) {
    if (!strncmp(buf, "file: ", 6)) {
      if ((p = strrchr(buf, '/')) != NULL)
        *p = 0;
      strncpy(album, buf + 6, size - 1);
      album[size - 1] = 0;
    }
    if (!strcmp(buf, "OK"))
      break;
    if (!strncmp(buf, "ACK", 3))
      break;
  }
  if (*album)
    return 0;
  if (inet_write(sock, "playlist\n") == -1) {
    fprintf(stderr, "error in connection with MPD\n");
    return -1;
  }
  rest = NULL;
  while (inet_readline(sock, buf, &rest, sizeof(buf)) != NULL) {
    if (buf[0] == '0' && buf[1] == ':') {
      if ((p = strrchr(buf, '/')) != NULL)
        *p = 0;
      strncpy(album, buf + 2, size - 1);
      album[size - 1] = 0;
    }
    if (!strcmp(buf, "OK"))
      break;
    if (!strncmp(buf, "ACK", 3)) {
      fprintf(stderr, "error from MPD: error listing playlist\n");
      return -1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<mpd_current_album>:
push   %rbp
mov    %rsp,%rbp
sub    $0x530,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     119a <mpd_current_album+0x2a>
cmpl   $0x1,-0x14(%rbp)
jge    11a6 <mpd_current_album+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1442 <mpd_current_album+0x2d2>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%edi
lea    0xe49(%rip),%rsi
call   1030 <inet_write@plt>
cmp    $0xffffffff,%eax
jne    11e6 <mpd_current_album+0x76>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
lea    0xe38(%rip),%rsi
call   1090 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1442 <mpd_current_album+0x2d2>
movq   $0x0,-0x528(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x520(%rbp),%rsi
lea    -0x528(%rbp),%rdx
mov    $0x500,%ecx
call   1060 <inet_readline@plt>
cmp    $0x0,%rax
je     12da <mpd_current_album+0x16a>
lea    -0x520(%rbp),%rdi
lea    0xe07(%rip),%rsi
mov    $0x6,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%eax
jne    128e <mpd_current_album+0x11e>
lea    -0x520(%rbp),%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,-0x530(%rbp)
cmp    $0x0,%rax
je     1263 <mpd_current_album+0xf3>
mov    -0x530(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
lea    -0x520(%rbp),%rsi
add    $0x6,%rsi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <strncpy@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
lea    -0x520(%rbp),%rdi
lea    0xd96(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    12af <mpd_current_album+0x13f>
jmp    12da <mpd_current_album+0x16a>
lea    -0x520(%rbp),%rdi
lea    0xd78(%rip),%rsi
mov    $0x3,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%eax
jne    12d5 <mpd_current_album+0x165>
jmp    12da <mpd_current_album+0x16a>
jmp    11f1 <mpd_current_album+0x81>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     12f3 <mpd_current_album+0x183>
movl   $0x0,-0x4(%rbp)
jmp    1442 <mpd_current_album+0x2d2>
mov    -0x8(%rbp),%edi
lea    0xd5a(%rip),%rsi
call   1030 <inet_write@plt>
cmp    $0xffffffff,%eax
jne    132c <mpd_current_album+0x1bc>
mov    0x2cce(%rip),%rax
mov    (%rax),%edi
lea    0xcf2(%rip),%rsi
call   1090 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1442 <mpd_current_album+0x2d2>
movq   $0x0,-0x528(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x520(%rbp),%rsi
lea    -0x528(%rbp),%rdx
mov    $0x500,%ecx
call   1060 <inet_readline@plt>
cmp    $0x0,%rax
je     143b <mpd_current_album+0x2cb>
movsbl -0x520(%rbp),%eax
cmp    $0x30,%eax
jne    13d3 <mpd_current_album+0x263>
movsbl -0x51f(%rbp),%eax
cmp    $0x3a,%eax
jne    13d3 <mpd_current_album+0x263>
lea    -0x520(%rbp),%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,-0x530(%rbp)
cmp    $0x0,%rax
je     13a8 <mpd_current_album+0x238>
mov    -0x530(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
lea    -0x520(%rbp),%rsi
add    $0x2,%rsi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <strncpy@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
lea    -0x520(%rbp),%rdi
lea    0xc51(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%eax
jne    13f4 <mpd_current_album+0x284>
jmp    143b <mpd_current_album+0x2cb>
lea    -0x520(%rbp),%rdi
lea    0xc33(%rip),%rsi
mov    $0x3,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%eax
jne    1436 <mpd_current_album+0x2c6>
mov    0x2bc4(%rip),%rax
mov    (%rax),%edi
lea    0xc14(%rip),%rsi
call   1090 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1442 <mpd_current_album+0x2d2>
jmp    1337 <mpd_current_album+0x1c7>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x530,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpd_current_album>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x518,%rsp
mov    $0xffffffff,%ebx
test   %rsi,%rsi
je     135a <mpd_current_album+0x1fa>
mov    %edx,%r15d
test   %edx,%edx
jle    135a <mpd_current_album+0x1fa>
mov    %rsi,%rbp
mov    %edi,%r13d
movb   $0x0,(%rsi)
lea    0xe66(%rip),%rsi
call   1030 <inet_write@plt>
cmp    $0xffffffff,%eax
je     1263 <mpd_current_album+0x103>
movq   $0x0,0x8(%rsp)
add    $0xffffffff,%r15d
lea    0x10(%rsp),%rbx
mov    $0x4b4f,%r12d
lea    0xe6e(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %r13d,%edi
mov    %rbx,%rsi
lea    0x8(%rsp),%rdx
mov    $0x500,%ecx
call   1060 <inet_readline@plt>
test   %rax,%rax
je     1256 <mpd_current_album+0xf6>
mov    %rbx,%rdi
lea    0xe37(%rip),%rsi
mov    $0x6,%edx
call   1050 <strncmp@plt>
test   %eax,%eax
jne    122d <mpd_current_album+0xcd>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
test   %rax,%rax
je     1217 <mpd_current_album+0xb7>
movb   $0x0,(%rax)
mov    %rbp,%rdi
lea    0x16(%rsp),%rsi
mov    %r15d,%edx
call   1040 <strncpy@plt>
movb   $0x0,0x0(%rbp,%r15,1)
mov    0x10(%rsp),%eax
xor    %r12d,%eax
movzbl 0x12(%rsp),%ecx
or     %ax,%cx
je     1256 <mpd_current_album+0xf6>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x3,%edx
call   1050 <strncmp@plt>
test   %eax,%eax
jne    11d0 <mpd_current_album+0x70>
cmpb   $0x0,0x0(%rbp)
je     127d <mpd_current_album+0x11d>
xor    %ebx,%ebx
jmp    135a <mpd_current_album+0x1fa>
mov    0x2d76(%rip),%rax
mov    (%rax),%edi
lea    0xd9a(%rip),%rsi
call   1080 <fprintf@plt>
jmp    135a <mpd_current_album+0x1fa>
lea    0xdd3(%rip),%rsi
mov    %r13d,%edi
call   1030 <inet_write@plt>
cmp    $0xffffffff,%eax
je     1340 <mpd_current_album+0x1e0>
movq   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rbx
lea    0x8(%rsp),%r12
mov    $0x4b4f,%r14d
xchg   %ax,%ax
mov    %r13d,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    $0x500,%ecx
call   1060 <inet_readline@plt>
test   %rax,%rax
je     125c <mpd_current_album+0xfc>
cmpb   $0x30,0x10(%rsp)
jne    1301 <mpd_current_album+0x1a1>
cmpb   $0x3a,0x11(%rsp)
jne    1301 <mpd_current_album+0x1a1>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
test   %rax,%rax
je     12eb <mpd_current_album+0x18b>
movb   $0x0,(%rax)
mov    %rbp,%rdi
lea    0x12(%rsp),%rsi
mov    %r15d,%edx
call   1040 <strncpy@plt>
movb   $0x0,0x0(%rbp,%r15,1)
mov    0x10(%rsp),%eax
xor    %r14d,%eax
movzbl 0x12(%rsp),%ecx
or     %ax,%cx
je     125c <mpd_current_album+0xfc>
mov    %rbx,%rdi
lea    0xd15(%rip),%rsi
mov    $0x3,%edx
call   1050 <strncmp@plt>
test   %eax,%eax
jne    12b0 <mpd_current_album+0x150>
mov    0x2cab(%rip),%rax
mov    (%rax),%edi
lea    0xcfb(%rip),%rsi
jmp    1350 <mpd_current_album+0x1f0>
mov    0x2c99(%rip),%rax
mov    (%rax),%edi
lea    0xcbd(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x518,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"currentsong\0A\00"
@stderr = global i32 0
@.str.1 = [30 x i8] c"error in connection with MPD\0A\00"
@.str.2 = [7 x i8] c"file: \00"
@.str.3 = [3 x i8] c"OK\00"
@.str.4 = [4 x i8] c"ACK\00"
@.str.5 = [10 x i8] c"playlist\0A\00"
@.str.6 = [40 x i8] c"error from MPD: error listing playlist\0A\00"
define i32 @mpd_current_album(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca [1280 x i8]
%9 = alloca i8*
%10 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%11 = load i8*, i8** %6
%12 = icmp eq i8* %11, null
br i1 %12, label %16, label %13
13: ; preds = %3
%14 = load i32, i32* %7
%15 = icmp slt i32 %14, 1
br i1 %15, label %16, label %17
16: ; preds = %13, %3
store i32 -1, i32* %4
br label %124
17: ; preds = %13
%18 = load i8*, i8** %6
store i8 0, i8* %18
%19 = load i32, i32* %5
%20 = call i32 @inet_write(i32 %19, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %25
22: ; preds = %17
%23 = load i32, i32* @stderr
%24 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %4
br label %124
25: ; preds = %17
store i8* null, i8** %9
br label %26
26: ; preds = %63, %25
%27 = load i32, i32* %5
%28 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 0
%29 = call i32* @inet_readline(i32 %27, i8* %28, i8** %9, i32 1280)
%30 = icmp ne i32* %29, null
br i1 %30, label %31, label %64
31: ; preds = %26
%32 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 0
%33 = call i32 @strncmp(i8* %32, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 6)
%34 = icmp ne i32 %33, 0
br i1 %34, label %53, label %35
35: ; preds = %31
%36 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 0
%37 = call i8* @strrchr(i8* %36, i8 signext 47)
store i8* %37, i8** %10
%38 = icmp ne i8* %37, null
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = load i8*, i8** %10
store i8 0, i8* %40
br label %41
41: ; preds = %39, %35
%42 = load i8*, i8** %6
%43 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 0
%44 = getelementptr inbounds i8, i8* %43, i64 6
%45 = load i32, i32* %7
%46 = sub nsw i32 %45, 1
%47 = call i32 @strncpy(i8* %42, i8* %44, i32 %46)
%48 = load i8*, i8** %6
%49 = load i32, i32* %7
%50 = sub nsw i32 %49, 1
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8, i8* %48, i64 %51
store i8 0, i8* %52
br label %53
53: ; preds = %41, %31
%54 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 0
%55 = call i32 @strcmp(i8* %54, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%56 = icmp ne i32 %55, 0
br i1 %56, label %58, label %57
57: ; preds = %53
br label %64
58: ; preds = %53
%59 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 0
%60 = call i32 @strncmp(i8* %59, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%61 = icmp ne i32 %60, 0
br i1 %61, label %63, label %62
62: ; preds = %58
br label %64
63: ; preds = %58
br label %26
64: ; preds = %62, %57, %26
%65 = load i8*, i8** %6
%66 = load i8, i8* %65
%67 = icmp ne i8 %66, 0
br i1 %67, label %68, label %69
68: ; preds = %64
store i32 0, i32* %4
br label %124
69: ; preds = %64
%70 = load i32, i32* %5
%71 = call i32 @inet_write(i32 %70, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%72 = icmp eq i32 %71, -1
br i1 %72, label %73, label %76
73: ; preds = %69
%74 = load i32, i32* @stderr
%75 = call i32 @fprintf(i32 %74, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %4
br label %124
76: ; preds = %69
store i8* null, i8** %9
br label %77
77: ; preds = %122, %76
%78 = load i32, i32* %5
%79 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 0
%80 = call i32* @inet_readline(i32 %78, i8* %79, i8** %9, i32 1280)
%81 = icmp ne i32* %80, null
br i1 %81, label %82, label %123
82: ; preds = %77
%83 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 0
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = icmp eq i32 %85, 48
br i1 %86, label %87, label %110
87: ; preds = %82
%88 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 1
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = icmp eq i32 %90, 58
br i1 %91, label %92, label %110
92: ; preds = %87
%93 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 0
%94 = call i8* @strrchr(i8* %93, i8 signext 47)
store i8* %94, i8** %10
%95 = icmp ne i8* %94, null
br i1 %95, label %96, label %98
96: ; preds = %92
%97 = load i8*, i8** %10
store i8 0, i8* %97
br label %98
98: ; preds = %96, %92
%99 = load i8*, i8** %6
%100 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 0
%101 = getelementptr inbounds i8, i8* %100, i64 2
%102 = load i32, i32* %7
%103 = sub nsw i32 %102, 1
%104 = call i32 @strncpy(i8* %99, i8* %101, i32 %103)
%105 = load i8*, i8** %6
%106 = load i32, i32* %7
%107 = sub nsw i32 %106, 1
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds i8, i8* %105, i64 %108
store i8 0, i8* %109
br label %110
110: ; preds = %98, %87, %82
%111 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 0
%112 = call i32 @strcmp(i8* %111, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%113 = icmp ne i32 %112, 0
br i1 %113, label %115, label %114
114: ; preds = %110
br label %123
115: ; preds = %110
%116 = getelementptr inbounds [1280 x i8], [1280 x i8]* %8, i64 0, i64 0
%117 = call i32 @strncmp(i8* %116, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%118 = icmp ne i32 %117, 0
br i1 %118, label %122, label %119
119: ; preds = %115
%120 = load i32, i32* @stderr
%121 = call i32 @fprintf(i32 %120, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
store i32 -1, i32* %4
br label %124
122: ; preds = %115
br label %77
123: ; preds = %114, %77
store i32 0, i32* %4
br label %124
124: ; preds = %123, %119, %73, %68, %22, %16
%125 = load i32, i32* %4
ret i32 %125
}

LLVM IR (-O2):
@.str = [13 x i8] c"currentsong\0A\00"
@stderr = global i32 0
@.str.1 = [30 x i8] c"error in connection with MPD\0A\00"
@.str.2 = [7 x i8] c"file: \00"
@.str.3 = [3 x i8] c"OK\00"
@.str.4 = [4 x i8] c"ACK\00"
@.str.5 = [10 x i8] c"playlist\0A\00"
@.str.6 = [40 x i8] c"error from MPD: error listing playlist\0A\00"
define i32 @mpd_current_album(i32 %0, i8* %1, i32 %2) {
%4 = alloca [1280 x i8]
%5 = alloca i8*
%6 = getelementptr inbounds [1280 x i8], [1280 x i8]* %4, i64 0, i64 0
%7 = bitcast i8** %5 to i8*
%8 = icmp eq i8* %1, null
%9 = icmp slt i32 %2, 1
%10 = or i1 %8, %9
br i1 %10, label %76, label %11
11: ; preds = %3
store i8 0, i8* %1
%12 = tail call i32 @inet_write(i32 %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
br label %76
17: ; preds = %11
store i8* null, i8** %5
%18 = getelementptr inbounds [1280 x i8], [1280 x i8]* %4, i64 0, i64 6
%19 = add nsw i32 %2, -1
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %1, i64 %20
br label %22
22: ; preds = %37, %17
%23 = call i32* @inet_readline(i32 %0, i8* %6, i8** %5, i32 1280)
%24 = icmp eq i32* %23, null
br i1 %24, label %40, label %25
25: ; preds = %22
%26 = call i32 @strncmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 6)
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %34
28: ; preds = %25
%29 = call i8* @strrchr(i8* %6, i8 signext 47)
%30 = icmp eq i8* %29, null
br i1 %30, label %32, label %31
31: ; preds = %28
store i8 0, i8* %29
br label %32
32: ; preds = %31, %28
%33 = call i32 @strncpy(i8* %1, i8* %18, i32 %19)
store i8 0, i8* %21
br label %34
34: ; preds = %32, %25
%35 = call i32 @bcmp(i8* dereferenceable(3) %6, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 3)
%36 = icmp eq i32 %35, 0
br i1 %36, label %40, label %37
37: ; preds = %34
%38 = call i32 @strncmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %22
40: ; preds = %37, %34, %22
%41 = load i8, i8* %1
%42 = icmp eq i8 %41, 0
br i1 %42, label %43, label %76
43: ; preds = %40
%44 = call i32 @inet_write(i32 %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%45 = icmp eq i32 %44, -1
br i1 %45, label %46, label %49
46: ; preds = %43
%47 = load i32, i32* @stderr
%48 = call i32 @fprintf(i32 %47, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
br label %76
49: ; preds = %43
store i8* null, i8** %5
%50 = getelementptr inbounds [1280 x i8], [1280 x i8]* %4, i64 0, i64 1
%51 = getelementptr inbounds [1280 x i8], [1280 x i8]* %4, i64 0, i64 2
br label %52
52: ; preds = %70, %49
%53 = call i32* @inet_readline(i32 %0, i8* %6, i8** %5, i32 1280)
%54 = icmp eq i32* %53, null
br i1 %54, label %76, label %55
55: ; preds = %52
%56 = load i8, i8* %6
%57 = icmp eq i8 %56, 48
%58 = load i8, i8* %50
%59 = icmp eq i8 %58, 58
%60 = select i1 %57, i1 %59, i1 false
br i1 %60, label %61, label %67
61: ; preds = %55
%62 = call i8* @strrchr(i8* %6, i8 signext 47)
%63 = icmp eq i8* %62, null
br i1 %63, label %65, label %64
64: ; preds = %61
store i8 0, i8* %62
br label %65
65: ; preds = %64, %61
%66 = call i32 @strncpy(i8* %1, i8* %51, i32 %19)
store i8 0, i8* %21
br label %67
67: ; preds = %65, %55
%68 = call i32 @bcmp(i8* dereferenceable(3) %6, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 3)
%69 = icmp eq i32 %68, 0
br i1 %69, label %76, label %70
70: ; preds = %67
%71 = call i32 @strncmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %52
73: ; preds = %70
%74 = load i32, i32* @stderr
%75 = call i32 @fprintf(i32 %74, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
br label %76
76: ; preds = %52, %67, %40, %3, %73, %46, %14
%77 = phi i32 [ -1, %14 ], [ -1, %46 ], [ -1, %73 ], [ -1, %3 ], [ 0, %40 ], [ 0, %67 ], [ 0, %52 ]
ret i32 %77
}