#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 sysinfo {
  int /*<<< orphan*/ uptime;
};
struct sockaddr_storage {
  int dummy;
};
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;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ INADDR_ANY;
int INET6_ADDRSTRLEN;
int /*<<< orphan*/ SOCK_DGRAM;
int atoi(char *);
scalar_t__ bind(int, struct sockaddr *, int);
int /*<<< orphan*/ ctime_r(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ htons(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *);
int recvfrom(int, char *, int, int /*<<< orphan*/, struct sockaddr *, int *);
int /*<<< orphan*/ sendto(int, char *, int, int /*<<< orphan*/,
                          struct sockaddr *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ sysinfo(struct sysinfo *);
int main(int argc, char **argv) {
  int port, sd, fd, len;
  char buf[INET6_ADDRSTRLEN];
  struct sysinfo info;
  sysinfo(&info);
  port = atoi(argv[1]);
  if ((sd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
    perror("socket error");
    return -1;
  }
  struct sockaddr_in sockaddr;
  struct sockaddr_storage sender;
  sockaddr.sin_family = AF_INET;
  sockaddr.sin_addr.s_addr = INADDR_ANY;
  sockaddr.sin_port = htons(port);
  len = sizeof sockaddr;
  if (bind(sd, (struct sockaddr *)&sockaddr, len) < 0) {
    perror("bind error");
    return -1;
  }
  int rc;
  char rb[1024], t[512], u[512];
  time_t start;
  while (1) {
    memset(rb, 0, sizeof rb);
    memset(u, 0, sizeof u);
    memset(t, 0, sizeof t);
    rc = recvfrom(sd, rb, 1024, 0, (struct sockaddr *)&sender, &len);
    if (rc < 0)
      perror("receive error");
    printf("%s\n", rb);
    if (!strcmp(rb, "DATE")) {
      ctime_r(&start, t);
      printf("Sending date: %s\n", t);
      sendto(sd, t, sizeof t, 0, (struct sockaddr *)&sender, len);
    }
    if (!strcmp(rb, "UPTIME")) {
      sprintf(u, "%ld", info.uptime);
      printf("Sending Uptime: %s\n", t);
      sendto(sd, u, sizeof u, 0, (struct sockaddr *)&sender, len);
    }
  }
  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)
mov    0x2df8(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
lea    -0x38(%rbp),%rdi
call   10d0 <sysinfo@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
mov    0x2daa(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jge    125a <main+0x8a>
lea    0xdbe(%rip),%rdi
call   10b0 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x3c(%rbp)
jmp    1411 <main+0x241>
mov    0x2d7f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    0x2d6b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <htons@plt>
mov    %eax,-0x48(%rbp)
movl   $0xc,-0x20(%rbp)
mov    -0x18(%rbp),%edi
lea    -0x48(%rbp),%rsi
mov    -0x20(%rbp),%edx
call   10a0 <bind@plt>
cmp    $0x0,%rax
jge    12bc <main+0xec>
lea    0xd69(%rip),%rdi
call   10b0 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x3c(%rbp)
jmp    1411 <main+0x241>
jmp    12c1 <main+0xf1>
jmp    12c6 <main+0xf6>
lea    -0x460(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
lea    -0x860(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1050 <memset@plt>
lea    -0x660(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1050 <memset@plt>
mov    -0x18(%rbp),%edi
lea    -0x460(%rbp),%rsi
lea    -0x50(%rbp),%r8
mov    $0x400,%edx
xor    %ecx,%ecx
lea    -0x20(%rbp),%r9
call   1090 <recvfrom@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x0,-0x54(%rbp)
jge    1336 <main+0x166>
lea    0xce7(%rip),%rdi
call   10b0 <perror@plt>
lea    -0x460(%rbp),%rsi
lea    0xd14(%rip),%rdi
call   1040 <printf@plt>
lea    -0x460(%rbp),%rdi
lea    0xccf(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    13a9 <main+0x1d9>
lea    -0x660(%rbp),%rsi
lea    -0x864(%rbp),%rdi
call   1080 <ctime_r@plt>
lea    -0x660(%rbp),%rsi
lea    0xca5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%edi
lea    -0x660(%rbp),%rsi
lea    -0x50(%rbp),%r8
mov    -0x20(%rbp),%r9d
mov    $0x200,%edx
xor    %ecx,%ecx
call   1060 <sendto@plt>
lea    -0x460(%rbp),%rdi
lea    0xc86(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    140c <main+0x23c>
lea    -0x860(%rbp),%rdi
mov    -0x38(%rbp),%edx
lea    0xc6e(%rip),%rsi
call   10e0 <sprintf@plt>
lea    -0x660(%rbp),%rsi
lea    0xc5f(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%edi
lea    -0x860(%rbp),%rsi
lea    -0x50(%rbp),%r8
mov    -0x20(%rbp),%r9d
mov    $0x200,%edx
xor    %ecx,%ecx
call   1060 <sendto@plt>
jmp    12c1 <main+0xf1>
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x838,%rsp
mov    %rsi,%rbx
mov    %rsp,%r14
lea    0x10(%rsp),%rdi
call   10c0 <sysinfo@plt>
mov    0x8(%rbx),%rdi
call   10b0 <atoi@plt>
mov    %eax,%ebp
mov    0x2df5(%rip),%r15
mov    (%r15),%edi
mov    0x2ddb(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10e0 <socket@plt>
test   %eax,%eax
js     1377 <main+0x1b7>
mov    %eax,%ebx
mov    (%r15),%eax
mov    %eax,0x20(%rsp)
mov    0x2dc2(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x1c(%rsp)
mov    %ebp,%edi
call   1030 <htons@plt>
mov    %eax,0x18(%rsp)
movl   $0xc,0xc(%rsp)
lea    0x18(%rsp),%rsi
mov    %ebx,%edi
mov    $0xc,%edx
call   1090 <bind@plt>
test   %rax,%rax
js     1380 <main+0x1c0>
lea    0x30(%rsp),%r14
lea    0x430(%rsp),%r15
lea    0x630(%rsp),%r12
lea    0x28(%rsp),%r13
mov    $0x454d49,%ebp
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1050 <memset@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1050 <memset@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
mov    %r13,%r8
lea    0xc(%rsp),%r9
call   1080 <recvfrom@plt>
test   %eax,%eax
jns    12c6 <main+0x106>
lea    0xd57(%rip),%rdi
call   10a0 <perror@plt>
lea    0xd8b(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
mov    0x30(%rsp),%eax
mov    $0x45544144,%ecx
xor    %ecx,%eax
movzbl 0x34(%rsp),%ecx
or     %eax,%ecx
jne    131e <main+0x15e>
lea    0x2c(%rsp),%rdi
mov    %r12,%rsi
call   1070 <ctime_r@plt>
lea    0xd2e(%rip),%rdi
mov    %r12,%rsi
call   1040 <printf@plt>
mov    0xc(%rsp),%r9d
mov    %ebx,%edi
mov    %r12,%rsi
mov    $0x200,%edx
xor    %ecx,%ecx
mov    %r13,%r8
call   1060 <sendto@plt>
mov    0x30(%rsp),%eax
mov    $0x49545055,%ecx
xor    %ecx,%eax
mov    0x33(%rsp),%ecx
xor    %ebp,%ecx
or     %eax,%ecx
jne    1270 <main+0xb0>
mov    0x10(%rsp),%edx
mov    %r15,%rdi
lea    0xcff(%rip),%rsi
call   10d0 <sprintf@plt>
lea    0xcf7(%rip),%rdi
mov    %r12,%rsi
call   1040 <printf@plt>
mov    0xc(%rsp),%r9d
mov    %ebx,%edi
mov    %r15,%rsi
mov    $0x200,%edx
xor    %ecx,%ecx
mov    %r13,%r8
call   1060 <sendto@plt>
jmp    1270 <main+0xb0>
lea    0xc82(%rip),%rdi
jmp    1387 <main+0x1c7>
lea    0xc86(%rip),%rdi
call   10a0 <perror@plt>
mov    %r14,%rsp
mov    $0xffffffff,%eax
add    $0x838,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.sysinfo = type { i32 }
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr = type { i32 }
@INET6_ADDRSTRLEN = global i32 0
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@.str = [13 x i8] c"socket error\00"
@INADDR_ANY = global i32 0
@.str.1 = [11 x i8] c"bind error\00"
@.str.2 = [14 x i8] c"receive error\00"
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [5 x i8] c"DATE\00"
@.str.5 = [18 x i8] c"Sending date: %s\0A\00"
@.str.6 = [7 x i8] c"UPTIME\00"
@.str.7 = [4 x i8] c"%ld\00"
@.str.8 = [20 x i8] c"Sending Uptime: %s\0A\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 i32
%10 = alloca i8*
%11 = alloca i64
%12 = alloca %struct.sysinfo
%13 = alloca i32
%14 = alloca %struct.sockaddr_in
%15 = alloca %struct.sockaddr_storage
%16 = alloca i32
%17 = alloca [1024 x i8]
%18 = alloca [512 x i8]
%19 = alloca [512 x i8]
%20 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%21 = load i32, i32* @INET6_ADDRSTRLEN
%22 = zext i32 %21 to i64
%23 = call i8* @llvm.stacksave()
store i8* %23, i8** %10
%24 = alloca i8, i64 %22
store i64 %22, i64* %11
%25 = call i32 @sysinfo(%struct.sysinfo* %12)
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = call i32 @atoi(i8* %28)
store i32 %29, i32* %6
%30 = load i32, i32* @AF_INET
%31 = load i32, i32* @SOCK_DGRAM
%32 = call i32 @socket(i32 %30, i32 %31, i32 0)
store i32 %32, i32* %7
%33 = icmp slt i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %2
%35 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
store i32 1, i32* %13
br label %102
36: ; preds = %2
%37 = load i32, i32* @AF_INET
%38 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %14, i32 0, i32 2
store i32 %37, i32* %38
%39 = load i32, i32* @INADDR_ANY
%40 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %14, i32 0, i32 1
%41 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %40, i32 0, i32 0
store i32 %39, i32* %41
%42 = load i32, i32* %6
%43 = call i32 @htons(i32 %42)
%44 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %14, i32 0, i32 0
store i32 %43, i32* %44
store i32 12, i32* %9
%45 = load i32, i32* %7
%46 = bitcast %struct.sockaddr_in* %14 to %struct.sockaddr*
%47 = load i32, i32* %9
%48 = call i64 @bind(i32 %45, %struct.sockaddr* %46, i32 %47)
%49 = icmp slt i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %36
%51 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %3
store i32 1, i32* %13
br label %102
52: ; preds = %36
br label %53
53: ; preds = %101, %52
br label %54
54: ; preds = %53
%55 = getelementptr inbounds [1024 x i8], [1024 x i8]* %17, i64 0, i64 0
%56 = call i32 @memset(i8* %55, i32 0, i32 1024)
%57 = getelementptr inbounds [512 x i8], [512 x i8]* %19, i64 0, i64 0
%58 = call i32 @memset(i8* %57, i32 0, i32 512)
%59 = getelementptr inbounds [512 x i8], [512 x i8]* %18, i64 0, i64 0
%60 = call i32 @memset(i8* %59, i32 0, i32 512)
%61 = load i32, i32* %7
%62 = getelementptr inbounds [1024 x i8], [1024 x i8]* %17, i64 0, i64 0
%63 = bitcast %struct.sockaddr_storage* %15 to %struct.sockaddr*
%64 = call i32 @recvfrom(i32 %61, i8* %62, i32 1024, i32 0, %struct.sockaddr* %63, i32* %9)
store i32 %64, i32* %16
%65 = load i32, i32* %16
%66 = icmp slt i32 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %54
%68 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %69
69: ; preds = %67, %54
%70 = getelementptr inbounds [1024 x i8], [1024 x i8]* %17, i64 0, i64 0
%71 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %70)
%72 = getelementptr inbounds [1024 x i8], [1024 x i8]* %17, i64 0, i64 0
%73 = call i32 @strcmp(i8* %72, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%74 = icmp ne i32 %73, 0
br i1 %74, label %85, label %75
75: ; preds = %69
%76 = getelementptr inbounds [512 x i8], [512 x i8]* %18, i64 0, i64 0
%77 = call i32 @ctime_r(i32* %20, i8* %76)
%78 = getelementptr inbounds [512 x i8], [512 x i8]* %18, i64 0, i64 0
%79 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %78)
%80 = load i32, i32* %7
%81 = getelementptr inbounds [512 x i8], [512 x i8]* %18, i64 0, i64 0
%82 = bitcast %struct.sockaddr_storage* %15 to %struct.sockaddr*
%83 = load i32, i32* %9
%84 = call i32 @sendto(i32 %80, i8* %81, i32 512, i32 0, %struct.sockaddr* %82, i32 %83)
br label %85
85: ; preds = %75, %69
%86 = getelementptr inbounds [1024 x i8], [1024 x i8]* %17, i64 0, i64 0
%87 = call i32 @strcmp(i8* %86, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%88 = icmp ne i32 %87, 0
br i1 %88, label %101, label %89
89: ; preds = %85
%90 = getelementptr inbounds [512 x i8], [512 x i8]* %19, i64 0, i64 0
%91 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %12, i32 0, i32 0
%92 = load i32, i32* %91
%93 = call i32 @sprintf(i8* %90, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %92)
%94 = getelementptr inbounds [512 x i8], [512 x i8]* %18, i64 0, i64 0
%95 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i8* %94)
%96 = load i32, i32* %7
%97 = getelementptr inbounds [512 x i8], [512 x i8]* %19, i64 0, i64 0
%98 = bitcast %struct.sockaddr_storage* %15 to %struct.sockaddr*
%99 = load i32, i32* %9
%100 = call i32 @sendto(i32 %96, i8* %97, i32 512, i32 0, %struct.sockaddr* %98, i32 %99)
br label %101
101: ; preds = %89, %85
br label %53
102: ; preds = %50, %34
%103 = load i8*, i8** %10
%104 = load i32, i32* %3
ret i32 %104
}

LLVM IR (-O2):
%struct.sysinfo = type { i32 }
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr = type { i32 }
@INET6_ADDRSTRLEN = global i32 0
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@.str = [13 x i8] c"socket error\00"
@INADDR_ANY = global i32 0
@.str.1 = [11 x i8] c"bind error\00"
@.str.2 = [14 x i8] c"receive error\00"
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [5 x i8] c"DATE\00"
@.str.5 = [18 x i8] c"Sending date: %s\0A\00"
@.str.6 = [7 x i8] c"UPTIME\00"
@.str.7 = [4 x i8] c"%ld\00"
@.str.8 = [20 x i8] c"Sending Uptime: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca %struct.sysinfo
%5 = alloca %struct.sockaddr_in
%6 = alloca %struct.sockaddr_storage
%7 = alloca [1024 x i8]
%8 = alloca [512 x i8]
%9 = alloca [512 x i8]
%10 = alloca i32
%11 = bitcast i32* %3 to i8*
%12 = tail call i8* @llvm.stacksave()
%13 = bitcast %struct.sysinfo* %4 to i8*
%14 = call i32 @sysinfo(%struct.sysinfo* %4)
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @atoi(i8* %16)
%18 = load i32, i32* @AF_INET
%19 = load i32, i32* @SOCK_DGRAM
%20 = call i32 @socket(i32 %18, i32 %19, i32 0)
%21 = icmp slt i32 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %2
%23 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %72
24: ; preds = %2
%25 = bitcast %struct.sockaddr_in* %5 to i8*
%26 = bitcast %struct.sockaddr_storage* %6 to i8*
%27 = load i32, i32* @AF_INET
%28 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 2
store i32 %27, i32* %28
%29 = load i32, i32* @INADDR_ANY
%30 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 1, i32 0
store i32 %29, i32* %30
%31 = call i32 @htons(i32 %17)
%32 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 0
store i32 %31, i32* %32
store i32 12, i32* %3
%33 = bitcast %struct.sockaddr_in* %5 to %struct.sockaddr*
%34 = call i64 @bind(i32 %20, %struct.sockaddr* %33, i32 12)
%35 = icmp slt i64 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %24
%37 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %72
38: ; preds = %24
%39 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%40 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%41 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%42 = bitcast i32* %10 to i8*
%43 = bitcast %struct.sockaddr_storage* %6 to %struct.sockaddr*
%44 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %4, i64 0, i32 0
br label %45
45: ; preds = %71, %38
%46 = call i32 @memset(i8* %39, i32 0, i32 1024)
%47 = call i32 @memset(i8* %41, i32 0, i32 512)
%48 = call i32 @memset(i8* %40, i32 0, i32 512)
%49 = call i32 @recvfrom(i32 %20, i8* %39, i32 1024, i32 0, %struct.sockaddr* %43, i32* %3)
%50 = icmp slt i32 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %45
%52 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %53
53: ; preds = %51, %45
%54 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %39)
%55 = call i32 @bcmp(i8* dereferenceable(5) %39, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i64 5)
%56 = icmp eq i32 %55, 0
br i1 %56, label %57, label %62
57: ; preds = %53
%58 = call i32 @ctime_r(i32* %10, i8* %40)
%59 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %40)
%60 = load i32, i32* %3
%61 = call i32 @sendto(i32 %20, i8* %40, i32 512, i32 0, %struct.sockaddr* %43, i32 %60)
br label %62
62: ; preds = %57, %53
%63 = call i32 @bcmp(i8* dereferenceable(7) %39, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i64 7)
%64 = icmp eq i32 %63, 0
br i1 %64, label %65, label %71
65: ; preds = %62
%66 = load i32, i32* %44
%67 = call i32 @sprintf(i8* %41, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %66)
%68 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i8* %40)
%69 = load i32, i32* %3
%70 = call i32 @sendto(i32 %20, i8* %41, i32 512, i32 0, %struct.sockaddr* %43, i32 %69)
br label %71
71: ; preds = %65, %62
br label %45
72: ; preds = %36, %22
ret i32 -1
}