#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*/ yes;
struct TYPE_2__ {
  int s_addr;
};
struct sockaddr_in {
  TYPE_1__ sin_addr;
  void *sin_port;
  void *sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int socklen_t;
typedef int /*<<< orphan*/ server;

/* Variables and functions */
void *AF_INET;
int /*<<< orphan*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ INADDR_ANY;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_BROADCAST;
int /*<<< orphan*/ SO_REUSEPORT;
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int htonl(int /*<<< orphan*/);
void *htons(int);
int /*<<< orphan*/ perror(char *);
int read(int /*<<< orphan*/, char *, int);
int recvfrom(int, char *, int, int /*<<< orphan*/, struct sockaddr *, int *);
int sendto(int, char *, int, int /*<<< orphan*/, struct sockaddr *, int);
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, char *, int);
int socket(void *, int /*<<< orphan*/, int /*<<< orphan*/);
int write(int, char *, int);
int main(int argc, char *argv[]) {
  int sock;
  struct sockaddr_in server, client;
  socklen_t clientAddrLen;
  int yes = 1;
  int count;
  char buffer[1024];
  if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
    do {
      perror("socket");
      exit(EXIT_FAILURE);
    } while (0);
  }
  if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, (char *)&yes, sizeof(yes)) ==
      -1) {
    do {
      perror("setsockopt");
      exit(EXIT_FAILURE);
    } while (0);
  }
  if (setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, (char *)&yes, sizeof(yes)) ==
      -1) {
    do {
      perror("setsockopt");
      exit(EXIT_FAILURE);
    } while (0);
  }
  server.sin_family = AF_INET;
  server.sin_addr.s_addr = htonl(INADDR_ANY);
  server.sin_port = htons(8010);
  if (bind(sock, (struct sockaddr *)&server, sizeof(server)) == -1) {
    do {
      perror("bind");
      exit(EXIT_FAILURE);
    } while (0);
  }
  if (fork() == 0) {
    while (1) {
      clientAddrLen = sizeof(struct sockaddr_in);
      if ((count = recvfrom(sock, buffer, 1024, 0, (struct sockaddr *)&client,
                            &clientAddrLen)) == -1) {
        do {
          perror("recvfrom");
          exit(EXIT_FAILURE);
        } while (0);
      }
      if (write(1, buffer, count) == -1) {
        do {
          perror("write");
          exit(EXIT_FAILURE);
        } while (0);
      }
    }
  } else {
    while (1) {
      if ((count = read(0, buffer, 1024)) == -1) {
        do {
          perror("read");
          exit(EXIT_FAILURE);
        } while (0);
      }
      server.sin_family = AF_INET;
      server.sin_port = htons(8010);
      server.sin_addr.s_addr = 0xFFFFFFFF;
      if (sendto(sock, buffer, count, 0, (struct sockaddr *)&server,
                 sizeof(server)) == -1) {
        do {
          perror("sendto");
          exit(EXIT_FAILURE);
        } while (0);
      }
    }
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x50(%rbp)
mov    0x2df9(%rip),%rax
mov    (%rax),%rdi
mov    0x2dd7(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10e0 <socket@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
jne    1225 <main+0x65>
jmp    120b <main+0x4b>
lea    0xdee(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2d92(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x14(%rbp),%edi
mov    0x2db9(%rip),%rax
mov    (%rax),%esi
mov    0x2d88(%rip),%rax
mov    (%rax),%edx
lea    -0x50(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    1271 <main+0xb1>
jmp    1257 <main+0x97>
lea    0xda9(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2d46(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x14(%rbp),%edi
mov    0x2d6d(%rip),%rax
mov    (%rax),%esi
mov    0x2d54(%rip),%rax
mov    (%rax),%edx
lea    -0x50(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    12bd <main+0xfd>
jmp    12a3 <main+0xe3>
lea    0xd5d(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2cfa(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    0x2d1c(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cfe(%rip),%rax
mov    (%rax),%edi
call   1060 <htonl@plt>
mov    %eax,-0x30(%rbp)
mov    $0x1f4a,%edi
call   1050 <htons@plt>
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x18,%edx
call   10a0 <bind@plt>
cmp    $0xffffffff,%eax
jne    1323 <main+0x163>
jmp    1309 <main+0x149>
lea    0xd02(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2c94(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    $0x0,%al
call   10d0 <fork@plt>
cmp    $0x0,%rax
jne    13ca <main+0x20a>
jmp    1339 <main+0x179>
movl   $0x18,-0x4c(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x460(%rbp),%rsi
lea    -0x48(%rbp),%r8
mov    $0x400,%edx
xor    %ecx,%ecx
lea    -0x4c(%rbp),%r9
call   1090 <recvfrom@plt>
mov    %eax,-0x54(%rbp)
cmp    $0xffffffff,%eax
jne    1389 <main+0x1c9>
jmp    136f <main+0x1af>
lea    0xca1(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2c2e(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
lea    -0x460(%rbp),%rsi
mov    -0x54(%rbp),%edx
mov    $0x1,%edi
call   1040 <write@plt>
cmp    $0xffffffff,%eax
jne    13c5 <main+0x205>
jmp    13ab <main+0x1eb>
lea    0xc6e(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2bf2(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    1339 <main+0x179>
jmp    13cf <main+0x20f>
lea    -0x460(%rbp),%rsi
xor    %edi,%edi
mov    $0x400,%edx
call   1080 <read@plt>
mov    %eax,-0x54(%rbp)
cmp    $0xffffffff,%eax
jne    140d <main+0x24d>
jmp    13f3 <main+0x233>
lea    0xc2c(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2baa(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    0x2bcc(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    $0x1f4a,%edi
call   1050 <htons@plt>
mov    %rax,-0x28(%rbp)
movl   $0xffffffff,-0x30(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x460(%rbp),%rsi
mov    -0x54(%rbp),%edx
lea    -0x30(%rbp),%r8
xor    %ecx,%ecx
mov    $0x18,%r9d
call   1070 <sendto@plt>
cmp    $0xffffffff,%eax
jne    1476 <main+0x2b6>
jmp    145c <main+0x29c>
lea    0xbc8(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2b41(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    13cf <main+0x20f>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x440,%rsp
movl   $0x1,0x8(%rsp)
mov    0x2e02(%rip),%r15
mov    (%r15),%rdi
mov    0x2de0(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10e0 <socket@plt>
cmp    $0xffffffff,%eax
jne    11ff <main+0x3f>
lea    0xe03(%rip),%rdi
jmp    1256 <main+0x96>
mov    %eax,%r12d
mov    0x2ddf(%rip),%rbx
mov    (%rbx),%esi
mov    0x2dae(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rcx
mov    %r12d,%edi
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0xffffffff,%eax
je     124f <main+0x8f>
mov    (%rbx),%esi
mov    0x2da3(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rcx
mov    %r12d,%edi
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    1269 <main+0xa9>
lea    0xdb1(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2d4e(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    (%r15),%rax
mov    %rax,0x20(%rsp)
mov    0x2d58(%rip),%rax
mov    (%rax),%edi
call   1060 <htonl@plt>
mov    %eax,0x10(%rsp)
mov    $0x1f4a,%edi
call   1050 <htons@plt>
mov    %rax,0x18(%rsp)
lea    0x10(%rsp),%rsi
mov    %r12d,%edi
mov    $0x18,%edx
call   10a0 <bind@plt>
cmp    $0xffffffff,%eax
jne    12b2 <main+0xf2>
lea    0xd62(%rip),%rdi
jmp    1256 <main+0x96>
xor    %eax,%eax
call   10d0 <fork@plt>
lea    0x40(%rsp),%rbx
test   %rax,%rax
jne    1319 <main+0x159>
lea    0x28(%rsp),%r14
lea    0xc(%rsp),%r15
nopl   (%rax)
movl   $0x18,0xc(%rsp)
mov    %r12d,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
xor    %ecx,%ecx
mov    %r14,%r8
mov    %r15,%r9
call   1090 <recvfrom@plt>
cmp    $0xffffffff,%eax
je     137e <main+0x1be>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
cmp    $0xffffffff,%eax
jne    12d0 <main+0x110>
lea    0xd0c(%rip),%rdi
jmp    1256 <main+0x96>
lea    0x10(%rsp),%r14
xchg   %ax,%ax
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
call   1080 <read@plt>
cmp    $0xffffffff,%eax
je     138a <main+0x1ca>
mov    %eax,%ebp
mov    (%r15),%rax
mov    %rax,0x20(%rsp)
mov    $0x1f4a,%edi
call   1050 <htons@plt>
mov    %rax,0x18(%rsp)
movl   $0xffffffff,0x10(%rsp)
ff
mov    %r12d,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
xor    %ecx,%ecx
mov    %r14,%r8
mov    $0x18,%r9d
call   1070 <sendto@plt>
cmp    $0xffffffff,%eax
jne    1320 <main+0x160>
lea    0xcb2(%rip),%rdi
jmp    1256 <main+0x96>
lea    0xc92(%rip),%rdi
jmp    1256 <main+0x96>
lea    0xc95(%rip),%rdi
jmp    1256 <main+0x96>

LLVM IR (-O0):
%struct.sockaddr_in = type { %struct.TYPE_2__, i8*, i8* }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i8* null
@SOCK_DGRAM = global i32 0
@.str = [7 x i8] c"socket\00"
@EXIT_FAILURE = global i32 0
@SOL_SOCKET = global i32 0
@SO_BROADCAST = global i32 0
@.str.1 = [11 x i8] c"setsockopt\00"
@SO_REUSEPORT = global i32 0
@INADDR_ANY = global i32 0
@.str.2 = [5 x i8] c"bind\00"
@.str.3 = [9 x i8] c"recvfrom\00"
@.str.4 = [6 x i8] c"write\00"
@.str.5 = [5 x i8] c"read\00"
@.str.6 = [7 x i8] c"sendto\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %struct.sockaddr_in
%8 = alloca %struct.sockaddr_in
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [1024 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %10
%13 = load i8*, i8** @AF_INET
%14 = load i32, i32* @SOCK_DGRAM
%15 = call i32 @socket(i8* %13, i32 %14, i32 0)
store i32 %15, i32* %6
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %23
17: ; preds = %2
br label %18
18: ; preds = %17
%19 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%20 = load i32, i32* @EXIT_FAILURE
%21 = call i32 @exit(i32 %20)
unreachable
22: ; No predecessors!
br label %23
23: ; preds = %22, %2
%24 = load i32, i32* %6
%25 = load i32, i32* @SOL_SOCKET
%26 = load i32, i32* @SO_BROADCAST
%27 = bitcast i32* %10 to i8*
%28 = call i32 @setsockopt(i32 %24, i32 %25, i32 %26, i8* %27, i32 4)
%29 = icmp eq i32 %28, -1
br i1 %29, label %30, label %36
30: ; preds = %23
br label %31
31: ; preds = %30
%32 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%33 = load i32, i32* @EXIT_FAILURE
%34 = call i32 @exit(i32 %33)
unreachable
35: ; No predecessors!
br label %36
36: ; preds = %35, %23
%37 = load i32, i32* %6
%38 = load i32, i32* @SOL_SOCKET
%39 = load i32, i32* @SO_REUSEPORT
%40 = bitcast i32* %10 to i8*
%41 = call i32 @setsockopt(i32 %37, i32 %38, i32 %39, i8* %40, i32 4)
%42 = icmp eq i32 %41, -1
br i1 %42, label %43, label %49
43: ; preds = %36
br label %44
44: ; preds = %43
%45 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%46 = load i32, i32* @EXIT_FAILURE
%47 = call i32 @exit(i32 %46)
unreachable
48: ; No predecessors!
br label %49
49: ; preds = %48, %36
%50 = load i8*, i8** @AF_INET
%51 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 2
store i8* %50, i8** %51
%52 = load i32, i32* @INADDR_ANY
%53 = call i32 @htonl(i32 %52)
%54 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 0
%55 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %54, i32 0, i32 0
store i32 %53, i32* %55
%56 = call i8* @htons(i32 8010)
%57 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 1
store i8* %56, i8** %57
%58 = load i32, i32* %6
%59 = bitcast %struct.sockaddr_in* %7 to %struct.sockaddr*
%60 = call i32 @bind(i32 %58, %struct.sockaddr* %59, i32 24)
%61 = icmp eq i32 %60, -1
br i1 %61, label %62, label %68
62: ; preds = %49
br label %63
63: ; preds = %62
%64 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%65 = load i32, i32* @EXIT_FAILURE
%66 = call i32 @exit(i32 %65)
unreachable
67: ; No predecessors!
br label %68
68: ; preds = %67, %49
%69 = call i64 (...) @fork()
%70 = icmp eq i64 %69, 0
br i1 %70, label %71, label %96
71: ; preds = %68
br label %72
72: ; preds = %71, %95
store i32 24, i32* %9
%73 = load i32, i32* %6
%74 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%75 = bitcast %struct.sockaddr_in* %8 to %struct.sockaddr*
%76 = call i32 @recvfrom(i32 %73, i8* %74, i32 1024, i32 0, %struct.sockaddr* %75, i32* %9)
store i32 %76, i32* %11
%77 = icmp eq i32 %76, -1
br i1 %77, label %78, label %84
78: ; preds = %72
br label %79
79: ; preds = %78
%80 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%81 = load i32, i32* @EXIT_FAILURE
%82 = call i32 @exit(i32 %81)
unreachable
83: ; No predecessors!
br label %84
84: ; preds = %83, %72
%85 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%86 = load i32, i32* %11
%87 = call i32 @write(i32 1, i8* %85, i32 %86)
%88 = icmp eq i32 %87, -1
br i1 %88, label %89, label %95
89: ; preds = %84
br label %90
90: ; preds = %89
%91 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%92 = load i32, i32* @EXIT_FAILURE
%93 = call i32 @exit(i32 %92)
unreachable
94: ; No predecessors!
br label %95
95: ; preds = %94, %84
br label %72
96: ; preds = %68
br label %97
97: ; preds = %96, %126
%98 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%99 = call i32 @read(i32 0, i8* %98, i32 1024)
store i32 %99, i32* %11
%100 = icmp eq i32 %99, -1
br i1 %100, label %101, label %107
101: ; preds = %97
br label %102
102: ; preds = %101
%103 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%104 = load i32, i32* @EXIT_FAILURE
%105 = call i32 @exit(i32 %104)
unreachable
106: ; No predecessors!
br label %107
107: ; preds = %106, %97
%108 = load i8*, i8** @AF_INET
%109 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 2
store i8* %108, i8** %109
%110 = call i8* @htons(i32 8010)
%111 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 1
store i8* %110, i8** %111
%112 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 0
%113 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %112, i32 0, i32 0
store i32 -1, i32* %113
%114 = load i32, i32* %6
%115 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%116 = load i32, i32* %11
%117 = bitcast %struct.sockaddr_in* %7 to %struct.sockaddr*
%118 = call i32 @sendto(i32 %114, i8* %115, i32 %116, i32 0, %struct.sockaddr* %117, i32 24)
%119 = icmp eq i32 %118, -1
br i1 %119, label %120, label %126
120: ; preds = %107
br label %121
121: ; preds = %120
%122 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%123 = load i32, i32* @EXIT_FAILURE
%124 = call i32 @exit(i32 %123)
unreachable
125: ; No predecessors!
br label %126
126: ; preds = %125, %107
br label %97
}

LLVM IR (-O2):
%struct.sockaddr_in = type { %struct.TYPE_2__, i8*, i8* }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i8* null
@SOCK_DGRAM = global i32 0
@.str = [7 x i8] c"socket\00"
@EXIT_FAILURE = global i32 0
@SOL_SOCKET = global i32 0
@SO_BROADCAST = global i32 0
@.str.1 = [11 x i8] c"setsockopt\00"
@SO_REUSEPORT = global i32 0
@INADDR_ANY = global i32 0
@.str.2 = [5 x i8] c"bind\00"
@.str.3 = [9 x i8] c"recvfrom\00"
@.str.4 = [6 x i8] c"write\00"
@.str.5 = [5 x i8] c"read\00"
@.str.6 = [7 x i8] c"sendto\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.sockaddr_in
%4 = alloca %struct.sockaddr_in
%5 = alloca i32
%6 = alloca i32
%7 = alloca [1024 x i8]
%8 = bitcast %struct.sockaddr_in* %3 to i8*
%9 = bitcast %struct.sockaddr_in* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = bitcast i32* %6 to i8*
store i32 1, i32* %6
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%13 = load i8*, i8** @AF_INET
%14 = load i32, i32* @SOCK_DGRAM
%15 = tail call i32 @socket(i8* %13, i32 %14, i32 0)
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %21
17: ; preds = %2
%18 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%19 = load i32, i32* @EXIT_FAILURE
%20 = tail call i32 @exit(i32 %19)
unreachable
21: ; preds = %2
%22 = load i32, i32* @SOL_SOCKET
%23 = load i32, i32* @SO_BROADCAST
%24 = call i32 @setsockopt(i32 %15, i32 %22, i32 %23, i8* %11, i32 4)
%25 = icmp eq i32 %24, -1
br i1 %25, label %26, label %30
26: ; preds = %21
%27 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%28 = load i32, i32* @EXIT_FAILURE
%29 = call i32 @exit(i32 %28)
unreachable
30: ; preds = %21
%31 = load i32, i32* @SOL_SOCKET
%32 = load i32, i32* @SO_REUSEPORT
%33 = call i32 @setsockopt(i32 %15, i32 %31, i32 %32, i8* %11, i32 4)
%34 = icmp eq i32 %33, -1
br i1 %34, label %35, label %39
35: ; preds = %30
%36 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%37 = load i32, i32* @EXIT_FAILURE
%38 = call i32 @exit(i32 %37)
unreachable
39: ; preds = %30
%40 = load i8*, i8** @AF_INET
%41 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 2
store i8* %40, i8** %41
%42 = load i32, i32* @INADDR_ANY
%43 = call i32 @htonl(i32 %42)
%44 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0, i32 0
store i32 %43, i32* %44
%45 = call i8* @htons(i32 8010)
%46 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 1
store i8* %45, i8** %46
%47 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%48 = call i32 @bind(i32 %15, %struct.sockaddr* %47, i32 24)
%49 = icmp eq i32 %48, -1
br i1 %49, label %50, label %54
50: ; preds = %39
%51 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%52 = load i32, i32* @EXIT_FAILURE
%53 = call i32 @exit(i32 %52)
unreachable
54: ; preds = %39
%55 = call i64 (...) @fork()
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %73
57: ; preds = %54
%58 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
br label %59
59: ; preds = %57, %66
store i32 24, i32* %5
%60 = call i32 @recvfrom(i32 %15, i8* %12, i32 1024, i32 0, %struct.sockaddr* %58, i32* %5)
%61 = icmp eq i32 %60, -1
br i1 %61, label %62, label %66
62: ; preds = %59
%63 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%64 = load i32, i32* @EXIT_FAILURE
%65 = call i32 @exit(i32 %64)
unreachable
66: ; preds = %59
%67 = call i32 @write(i32 1, i8* %12, i32 %60)
%68 = icmp eq i32 %67, -1
br i1 %68, label %69, label %59
69: ; preds = %66
%70 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%71 = load i32, i32* @EXIT_FAILURE
%72 = call i32 @exit(i32 %71)
unreachable
73: ; preds = %54, %80
%74 = call i32 @read(i32 0, i8* %12, i32 1024)
%75 = icmp eq i32 %74, -1
br i1 %75, label %76, label %80
76: ; preds = %73
%77 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%78 = load i32, i32* @EXIT_FAILURE
%79 = call i32 @exit(i32 %78)
unreachable
80: ; preds = %73
%81 = load i8*, i8** @AF_INET
store i8* %81, i8** %41
%82 = call i8* @htons(i32 8010)
store i8* %82, i8** %46
store i32 -1, i32* %44
%83 = call i32 @sendto(i32 %15, i8* %12, i32 %74, i32 0, %struct.sockaddr* %47, i32 24)
%84 = icmp eq i32 %83, -1
br i1 %84, label %85, label %73
85: ; preds = %80
%86 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%87 = load i32, i32* @EXIT_FAILURE
%88 = call i32 @exit(i32 %87)
unreachable
}