#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 */
typedef int /*<<< orphan*/ time_t;
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;
};
struct hostent {
  int /*<<< orphan*/ h_length;
  scalar_t__ h_addr;
};
typedef int /*<<< orphan*/ serv_addr;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
char *asctime(int /*<<< orphan*/);
int atoi(char *);
int /*<<< orphan*/ bcopy(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ bzero(char *, int);
scalar_t__ connect(int, struct sockaddr *, int);
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
char *getenv(char *);
struct hostent *gethostbyname(char *);
int /*<<< orphan*/ htons(int);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *, ...);
int read(int, char *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int write(int, char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int sockfd, portno, n;
  struct sockaddr_in serv_addr;
  struct hostent *server;
  char buffer[256];
  if (argc < 3) {
    fprintf(stderr, "usage %s hostname port\n", argv[0]);
    exit(0);
  }
  portno = atoi(argv[2]);
  sockfd = socket(AF_INET, SOCK_STREAM, 0);
  if (sockfd < 0) {
    error("ERROR opening socket");
  }
  server = gethostbyname(argv[1]);
  if (server == NULL) {
    fprintf(stderr, "ERROR, no such host\n");
    exit(0);
  }
  bzero((char *)&serv_addr, sizeof(serv_addr));
  serv_addr.sin_family = AF_INET;
  bcopy((char *)server->h_addr, (char *)&serv_addr.sin_addr.s_addr,
        server->h_length);
  serv_addr.sin_port = htons(portno);
  if (connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
    error("ERROR with connecting");
  }
  while (1) {
    printf("%s: ", getenv("USER"));
    bzero(buffer, 256);
    fgets(buffer, 255, stdin);
    n = write(sockfd, buffer, strlen(buffer));
    if (n < 0) {
      error("ERROR writing to socket");
    }
    bzero(buffer, 256);
    n = read(sockfd, buffer, 255);
    if (n < 0) {
      error("ERROR reading from socket");
    }
    time_t currtime = time(NULL);
    printf("%s%s", asctime(localtime(&currtime)), buffer);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1278 <main+0x48>
mov    0x2d76(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xd96(%rip),%rsi
mov    $0x0,%al
call   10d0 <fprintf@plt>
xor    %edi,%edi
call   1130 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1120 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    0x2d59(%rip),%rax
mov    (%rax),%edi
mov    0x2d30(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1150 <socket@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    12ba <main+0x8a>
lea    0xd63(%rip),%rdi
call   1100 <error@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10c0 <gethostbyname@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    12f4 <main+0xc4>
mov    0x2cf3(%rip),%rax
mov    (%rax),%edi
lea    0xd47(%rip),%rsi
mov    $0x0,%al
call   10d0 <fprintf@plt>
xor    %edi,%edi
call   1130 <exit@plt>
lea    -0x28(%rbp),%rdi
mov    $0xc,%esi
call   1110 <bzero@plt>
mov    0x2cdf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x30(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x28(%rbp),%rsi
add    $0x4,%rsi
mov    -0x30(%rbp),%rax
mov    (%rax),%edx
call   10f0 <bcopy@plt>
mov    -0x18(%rbp),%edi
call   1080 <htons@plt>
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0xc,%edx
call   1140 <connect@plt>
cmp    $0x0,%rax
jge    135b <main+0x12b>
lea    0xcec(%rip),%rdi
call   1100 <error@plt>
jmp    1360 <main+0x130>
lea    0xcf6(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rsi
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
lea    -0x130(%rbp),%rdi
mov    $0x100,%esi
call   1110 <bzero@plt>
lea    -0x130(%rbp),%rdi
mov    0x2c44(%rip),%rax
mov    (%rax),%edx
mov    $0xff,%esi
call   10b0 <fgets@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x144(%rbp)
lea    -0x130(%rbp),%rax
mov    %rax,-0x140(%rbp)
lea    -0x130(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x144(%rbp),%edi
mov    -0x140(%rbp),%rsi
mov    %eax,%edx
call   1050 <write@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    13f8 <main+0x1c8>
lea    0xc6f(%rip),%rdi
call   1100 <error@plt>
lea    -0x130(%rbp),%rdi
mov    $0x100,%esi
call   1110 <bzero@plt>
mov    -0x14(%rbp),%edi
lea    -0x130(%rbp),%rsi
mov    $0xff,%edx
call   10a0 <read@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1436 <main+0x206>
lea    0xc49(%rip),%rdi
call   1100 <error@plt>
xor    %eax,%eax
mov    %eax,%edi
call   10e0 <time@plt>
mov    %eax,-0x134(%rbp)
lea    -0x134(%rbp),%rdi
call   1040 <localtime@plt>
mov    %eax,%edi
call   1070 <asctime@plt>
mov    %rax,%rsi
lea    -0x130(%rbp),%rdx
lea    0xc2b(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
jmp    1360 <main+0x130>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jle    13d9 <main+0x1a9>
mov    0x10(%rbx),%rdi
call   1120 <atoi@plt>
mov    %eax,%r14d
mov    0x2d88(%rip),%r12
mov    (%r12),%edi
mov    0x2d5d(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1150 <socket@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    1286 <main+0x56>
lea    0xd97(%rip),%rdi
call   1100 <error@plt>
mov    0x8(%rbx),%rdi
call   10c0 <gethostbyname@plt>
test   %rax,%rax
je     13fa <main+0x1ca>
mov    %rax,%rbx
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    $0xc,%esi
call   1110 <bzero@plt>
mov    (%r12),%eax
mov    %eax,0x18(%rsp)
mov    0x8(%rbx),%rsi
lea    0x14(%rsp),%rdi
mov    (%rbx),%edx
call   10f0 <memmove@plt>
mov    %r14d,%edi
call   1080 <htons@plt>
mov    %eax,0x10(%rsp)
mov    %ebp,%edi
mov    %r15,%rsi
mov    $0xc,%edx
call   1140 <connect@plt>
test   %rax,%rax
jns    12f1 <main+0xc1>
lea    0xd56(%rip),%rdi
call   1100 <error@plt>
lea    0xd60(%rip),%r15
lea    0x20(%rsp),%rbx
mov    0x2cdc(%rip),%r14
lea    0xc(%rsp),%r12
lea    0xd84(%rip),%r13
jmp    134a <main+0x11a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %edi,%edi
call   10e0 <time@plt>
mov    %eax,0xc(%rsp)
mov    %r12,%rdi
call   1040 <localtime@plt>
mov    %eax,%edi
call   1070 <asctime@plt>
mov    %r13,%rdi
mov    %rax,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1090 <printf@plt>
lea    0xd0c(%rip),%rdi
call   1030 <getenv@plt>
mov    %r15,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %rbx,%rdi
mov    $0x100,%esi
call   1110 <bzero@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0xff,%esi
call   10b0 <fgets@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1050 <write@plt>
test   %eax,%eax
jns    13a4 <main+0x174>
lea    0xcc3(%rip),%rdi
call   1100 <error@plt>
mov    %rbx,%rdi
mov    $0x100,%esi
call   1110 <bzero@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0xff,%edx
call   10a0 <read@plt>
test   %eax,%eax
jns    1320 <main+0xf0>
lea    0xcab(%rip),%rdi
call   1100 <error@plt>
jmp    1320 <main+0xf0>
mov    0x2bf0(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xc14(%rip),%rsi
xor    %eax,%eax
call   10d0 <fprintf@plt>
xor    %edi,%edi
call   1130 <exit@plt>
mov    0x2bcf(%rip),%rax
mov    (%rax),%edi
lea    0xc23(%rip),%rsi
xor    %eax,%eax
call   10d0 <fprintf@plt>
xor    %edi,%edi
call   1130 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.hostent = type { i32, i64 }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [24 x i8] c"usage %s hostname port\0A\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [21 x i8] c"ERROR opening socket\00"
@.str.2 = [21 x i8] c"ERROR, no such host\0A\00"
@.str.3 = [22 x i8] c"ERROR with connecting\00"
@.str.4 = [5 x i8] c"%s: \00"
@.str.5 = [5 x i8] c"USER\00"
@stdin = global i32 0
@.str.6 = [24 x i8] c"ERROR writing to socket\00"
@.str.7 = [26 x i8] c"ERROR reading from socket\00"
@.str.8 = [5 x i8] c"%s%s\00"
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 %struct.sockaddr_in
%10 = alloca %struct.hostent*
%11 = alloca [256 x i8]
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 3
br i1 %14, label %15, label %22
15: ; preds = %2
%16 = load i32, i32* @stderr
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %19)
%21 = call i32 @exit(i32 0)
unreachable
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 2
%25 = load i8*, i8** %24
%26 = call i32 @atoi(i8* %25)
store i32 %26, i32* %7
%27 = load i32, i32* @AF_INET
%28 = load i32, i32* @SOCK_STREAM
%29 = call i32 @socket(i32 %27, i32 %28, i32 0)
store i32 %29, i32* %6
%30 = load i32, i32* %6
%31 = icmp slt i32 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %22
%33 = call i32 @error(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %34
34: ; preds = %32, %22
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = call %struct.hostent* @gethostbyname(i8* %37)
store %struct.hostent* %38, %struct.hostent** %10
%39 = load %struct.hostent*, %struct.hostent** %10
%40 = icmp eq %struct.hostent* %39, null
br i1 %40, label %41, label %45
41: ; preds = %34
%42 = load i32, i32* @stderr
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%44 = call i32 @exit(i32 0)
unreachable
45: ; preds = %34
%46 = bitcast %struct.sockaddr_in* %9 to i8*
%47 = call i32 @bzero(i8* %46, i32 12)
%48 = load i32, i32* @AF_INET
%49 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 2
store i32 %48, i32* %49
%50 = load %struct.hostent*, %struct.hostent** %10
%51 = getelementptr inbounds %struct.hostent, %struct.hostent* %50, i32 0, i32 1
%52 = load i64, i64* %51
%53 = inttoptr i64 %52 to i8*
%54 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 1
%55 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %54, i32 0, i32 0
%56 = bitcast i32* %55 to i8*
%57 = load %struct.hostent*, %struct.hostent** %10
%58 = getelementptr inbounds %struct.hostent, %struct.hostent* %57, i32 0, i32 0
%59 = load i32, i32* %58
%60 = call i32 @bcopy(i8* %53, i8* %56, i32 %59)
%61 = load i32, i32* %7
%62 = call i32 @htons(i32 %61)
%63 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %9, i32 0, i32 0
store i32 %62, i32* %63
%64 = load i32, i32* %6
%65 = bitcast %struct.sockaddr_in* %9 to %struct.sockaddr*
%66 = call i64 @connect(i32 %64, %struct.sockaddr* %65, i32 12)
%67 = icmp slt i64 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %45
%69 = call i32 @error(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %70
70: ; preds = %68, %45
br label %71
71: ; preds = %70, %98
%72 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%73 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %72)
%74 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%75 = call i32 @bzero(i8* %74, i32 256)
%76 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%77 = load i32, i32* @stdin
%78 = call i32 @fgets(i8* %76, i32 255, i32 %77)
%79 = load i32, i32* %6
%80 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%81 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%82 = call i32 @strlen(i8* %81)
%83 = call i32 @write(i32 %79, i8* %80, i32 %82)
store i32 %83, i32* %8
%84 = load i32, i32* %8
%85 = icmp slt i32 %84, 0
br i1 %85, label %86, label %88
86: ; preds = %71
%87 = call i32 @error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
br label %88
88: ; preds = %86, %71
%89 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%90 = call i32 @bzero(i8* %89, i32 256)
%91 = load i32, i32* %6
%92 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%93 = call i32 @read(i32 %91, i8* %92, i32 255)
store i32 %93, i32* %8
%94 = load i32, i32* %8
%95 = icmp slt i32 %94, 0
br i1 %95, label %96, label %98
96: ; preds = %88
%97 = call i32 @error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
br label %98
98: ; preds = %96, %88
%99 = call i32 @time(i32* null)
store i32 %99, i32* %12
%100 = call i32 @localtime(i32* %12)
%101 = call i8* @asctime(i32 %100)
%102 = getelementptr inbounds [256 x i8], [256 x i8]* %11, i64 0, i64 0
%103 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %101, i8* %102)
br label %71
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.hostent = type { i32, i64 }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [24 x i8] c"usage %s hostname port\0A\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [21 x i8] c"ERROR opening socket\00"
@.str.2 = [21 x i8] c"ERROR, no such host\0A\00"
@.str.3 = [22 x i8] c"ERROR with connecting\00"
@.str.4 = [5 x i8] c"%s: \00"
@.str.5 = [5 x i8] c"USER\00"
@stdin = global i32 0
@.str.6 = [24 x i8] c"ERROR writing to socket\00"
@.str.7 = [26 x i8] c"ERROR reading from socket\00"
@.str.8 = [5 x i8] c"%s%s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.sockaddr_in
%4 = alloca [256 x i8]
%5 = alloca i32
%6 = bitcast %struct.sockaddr_in* %3 to i8*
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%8 = icmp slt i32 %0, 3
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %1
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = tail call i32 @exit(i32 0)
unreachable
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 2
%16 = load i8*, i8** %15
%17 = tail call i32 @atoi(i8* %16)
%18 = load i32, i32* @AF_INET
%19 = load i32, i32* @SOCK_STREAM
%20 = tail call i32 @socket(i32 %18, i32 %19, i32 0)
%21 = icmp slt i32 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %14
%23 = tail call i32 @error(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %14
%25 = getelementptr inbounds i8*, i8** %1, i64 1
%26 = load i8*, i8** %25
%27 = tail call %struct.hostent* @gethostbyname(i8* %26)
%28 = icmp eq %struct.hostent* %27, null
br i1 %28, label %29, label %33
29: ; preds = %24
%30 = load i32, i32* @stderr
%31 = tail call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%32 = tail call i32 @exit(i32 0)
unreachable
33: ; preds = %24
%34 = call i32 @bzero(i8* %6, i32 12)
%35 = load i32, i32* @AF_INET
%36 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 2
store i32 %35, i32* %36
%37 = getelementptr inbounds %struct.hostent, %struct.hostent* %27, i64 0, i32 1
%38 = load i64, i64* %37
%39 = inttoptr i64 %38 to i8*
%40 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 1, i32 0
%41 = bitcast i32* %40 to i8*
%42 = getelementptr inbounds %struct.hostent, %struct.hostent* %27, i64 0, i32 0
%43 = load i32, i32* %42
%44 = tail call i32 @htons(i32 %17)
%45 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
store i32 %44, i32* %45
%46 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%47 = call i64 @connect(i32 %20, %struct.sockaddr* %46, i32 12)
%48 = icmp slt i64 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %33
%50 = call i32 @error(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %51
51: ; preds = %49, %33
%52 = bitcast i32* %5 to i8*
br label %53
53: ; preds = %70, %51
%54 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%55 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %54)
%56 = call i32 @bzero(i8* %7, i32 256)
%57 = load i32, i32* @stdin
%58 = call i32 @fgets(i8* %7, i32 255, i32 %57)
%59 = call i32 @strlen(i8* %7)
%60 = call i32 @write(i32 %20, i8* %7, i32 %59)
%61 = icmp slt i32 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %53
%63 = call i32 @error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
br label %64
64: ; preds = %62, %53
%65 = call i32 @bzero(i8* %7, i32 256)
%66 = call i32 @read(i32 %20, i8* %7, i32 255)
%67 = icmp slt i32 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %64
%69 = call i32 @error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
br label %70
70: ; preds = %68, %64
%71 = call i32 @time(i32* null)
store i32 %71, i32* %5
%72 = call i32 @localtime(i32* %5)
%73 = call i8* @asctime(i32 %72)
%74 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %73, i8* %7)
br label %53
}