#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 */
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;
};
typedef int socklen_t;
typedef int /*<<< orphan*/ servaddr;
typedef int /*<<< orphan*/ cliaddr;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ INADDR_ANY;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ bind(int, struct sockaddr *, int);
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ htons(int);
int /*<<< orphan*/ inet_ntoa(TYPE_1__);
int /*<<< orphan*/ memset(struct sockaddr_in *, int /*<<< orphan*/, int);
int ntohs(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int recvfrom(int, int *, int, int /*<<< orphan*/, struct sockaddr *, int *);
int /*<<< orphan*/ sendto(int, int *, int, int /*<<< orphan*/,
                          struct sockaddr *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  int sockfd, send_number, recv_number, n, sum;
  struct sockaddr_in servaddr, cliaddr;
  socklen_t len;
  char mesg[1000000];
  char buf[100];
  int number1, number2, count = 0;
  sockfd = socket(AF_INET, SOCK_DGRAM, 0);
  memset(&servaddr, 0, sizeof(servaddr));
  servaddr.sin_family = AF_INET;
  servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
  servaddr.sin_port = htons(32000);
  bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr));
  for (;;) {
    switch (count) {
    case 0:
      len = sizeof(cliaddr);
      n = recvfrom(sockfd, &recv_number, sizeof(int), 0,
                   (struct sockaddr *)&cliaddr, &len);
      number1 = recv_number;
      strcpy(buf, inet_ntoa(cliaddr.sin_addr));
      sendto(sockfd, &recv_number, sizeof(int), 0, (struct sockaddr *)&cliaddr,
             sizeof(cliaddr));
      printf("-------------------------------------------------------\n");
      printf("Received the following %d bytes from %s:%d:\n", n, buf,
             ntohs(cliaddr.sin_port));
      printf("(서버측에서 첫 번째로 받은 수는 %d 입니다\n", recv_number);
      printf("-------------------------------------------------------\n");
      ++count;
      break;
    case 1:
      len = sizeof(cliaddr);
      n = recvfrom(sockfd, &recv_number, sizeof(int), 0,
                   (struct sockaddr *)&cliaddr, &len);
      number2 = recv_number;
      sum = number1 + number2;
      strcpy(buf, inet_ntoa(cliaddr.sin_addr));
      sendto(sockfd, &sum, sizeof(int), 0, (struct sockaddr *)&cliaddr,
             sizeof(cliaddr));
      printf("-------------------------------------------------------\n");
      printf("Received the following %d bytes from %s:%d:\n", n, buf,
             ntohs(cliaddr.sin_port));
      printf("서버측에서 두 번째로 받은 수는 %d 이고 두 수의 합은 %d 입니다\n",
             recv_number, sum);
      printf("-------------------------------------------------------\n");
      ++count;
      break;
    default:
      break;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf4340,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0xf430c(%rbp)
mov    0x2e0e(%rip),%rax
mov    (%rax),%edi
mov    0x2df5(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10d0 <socket@plt>
mov    %eax,-0x14(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1080 <memset@plt>
mov    0x2de2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    0x2dce(%rip),%rax
mov    (%rax),%edi
call   1070 <htonl@plt>
mov    %eax,-0x2c(%rbp)
mov    $0x7d00,%edi
call   1050 <htons@plt>
mov    %eax,-0x30(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0xc,%edx
call   10c0 <bind@plt>
mov    -0xf430c(%rbp),%eax
mov    %eax,-0xf4310(%rbp)
test   %eax,%eax
je     1267 <main+0xb7>
jmp    1253 <main+0xa3>
mov    -0xf4310(%rbp),%eax
sub    $0x1,%eax
je     1353 <main+0x1a3>
jmp    1451 <main+0x2a1>
movl   $0xc,-0x44(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x40(%rbp),%r8
lea    -0x1c(%rbp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
lea    -0x44(%rbp),%r9
call   10a0 <recvfrom@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0xf4304(%rbp)
lea    -0xf4300(%rbp),%rax
mov    %rax,-0xf4328(%rbp)
mov    -0x3c(%rbp),%edi
call   1040 <inet_ntoa@plt>
mov    -0xf4328(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
mov    -0x14(%rbp),%edi
lea    -0x40(%rbp),%r8
lea    -0x1c(%rbp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
mov    $0xc,%r9d
call   1090 <sendto@plt>
lea    0xd23(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%eax
mov    %eax,-0xf431c(%rbp)
lea    -0xf4300(%rbp),%rax
mov    %rax,-0xf4318(%rbp)
mov    -0x40(%rbp),%edi
call   10b0 <ntohs@plt>
mov    -0xf431c(%rbp),%esi
mov    -0xf4318(%rbp),%rdx
mov    %eax,%ecx
lea    0xd20(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xd3c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xcc8(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0xf430c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf430c(%rbp)
jmp    1456 <main+0x2a6>
movl   $0xc,-0x44(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x40(%rbp),%r8
lea    -0x1c(%rbp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
lea    -0x44(%rbp),%r9
call   10a0 <recvfrom@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0xf4308(%rbp)
mov    -0xf4304(%rbp),%eax
add    -0xf4308(%rbp),%eax
mov    %eax,-0x24(%rbp)
lea    -0xf4300(%rbp),%rax
mov    %rax,-0xf4340(%rbp)
mov    -0x3c(%rbp),%edi
call   1040 <inet_ntoa@plt>
mov    -0xf4340(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
mov    -0x14(%rbp),%edi
lea    -0x40(%rbp),%r8
lea    -0x24(%rbp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
mov    $0xc,%r9d
call   1090 <sendto@plt>
lea    0xc28(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x20(%rbp),%eax
mov    %eax,-0xf4334(%rbp)
lea    -0xf4300(%rbp),%rax
mov    %rax,-0xf4330(%rbp)
mov    -0x40(%rbp),%edi
call   10b0 <ntohs@plt>
mov    -0xf4334(%rbp),%esi
mov    -0xf4330(%rbp),%rdx
mov    %eax,%ecx
lea    0xc25(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x1c(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xc79(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xbca(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0xf430c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf430c(%rbp)
jmp    1456 <main+0x2a6>
jmp    1456 <main+0x2a6>
jmp    123a <main+0x8a>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    0x2e10(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x2df6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10e0 <socket@plt>
mov    %eax,%r13d
lea    0x20(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1090 <memset@plt>
mov    0x0(%rbp),%eax
mov    %eax,0x28(%rsp)
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
call   1080 <htonl@plt>
mov    %eax,0x24(%rsp)
mov    $0x7d00,%edi
call   1060 <htons@plt>
mov    %eax,0x20(%rsp)
mov    %r13d,%edi
mov    %r14,%rsi
mov    $0xc,%edx
call   10d0 <bind@plt>
lea    0x4(%rsp),%rbx
xor    %ebp,%ebp
jmp    1310 <main+0x150>
movl   $0xc,0x8(%rsp)
mov    %r13d,%edi
mov    %rbx,%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
lea    0x10(%rsp),%rbp
mov    %rbp,%r8
lea    0x8(%rsp),%r9
call   10b0 <recvfrom@plt>
mov    %eax,%r12d
mov    0x4(%rsp),%eax
add    %r15d,%eax
mov    %eax,0xc(%rsp)
mov    0x14(%rsp),%edi
call   1050 <inet_ntoa@plt>
lea    0x30(%rsp),%r14
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
mov    %r13d,%edi
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
mov    %rbp,%r8
mov    $0xc,%r9d
call   10a0 <sendto@plt>
lea    0xe08(%rip),%rdi
call   1040 <puts@plt>
mov    0x10(%rsp),%edi
call   10c0 <ntohs@plt>
lea    0xd35(%rip),%rdi
mov    %r12d,%esi
lea    0xde9(%rip),%r12
mov    %r14,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x4(%rsp),%esi
mov    0xc(%rsp),%edx
lea    0xd78(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x2,%ebp
mov    %r12,%rdi
call   1040 <puts@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0x1,%ebp
je     1245 <main+0x85>
test   %ebp,%ebp
jne    1310 <main+0x150>
movl   $0xc,0x8(%rsp)
mov    %r13d,%edi
mov    %rbx,%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
lea    0x10(%rsp),%r12
mov    %r12,%r8
lea    0x8(%rsp),%r9
call   10b0 <recvfrom@plt>
mov    %eax,%ebp
mov    0x4(%rsp),%r15d
mov    0x14(%rsp),%edi
call   1050 <inet_ntoa@plt>
lea    0x30(%rsp),%r14
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
mov    %r13d,%edi
mov    %rbx,%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
mov    %r12,%r8
lea    0xd44(%rip),%r12
mov    $0xc,%r9d
call   10a0 <sendto@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    0x10(%rsp),%edi
call   10c0 <ntohs@plt>
lea    0xc63(%rip),%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xc77(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x1,%ebp
jmp    12fc <main+0x13c>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@INADDR_ANY = global i32 0
@.str = [57 x i8] c"-------------------------------------------------------\0A\00"
@.str.1 = [45 x i8] c"Received the following %d bytes from %s:%d:\0A\00"
@.str.2 = [59 x i8] c"(\EC\84\9C\EB\B2\84\EC\B8\A1\EC\97\90\EC\84\9C \EC\B2\AB \EB\B2\88\EC\A7\B8\EB\A1\9C \EB\B0\9B\EC\9D\80 \EC\88\98\EB\8A\94 %d \EC\9E\85\EB\8B\88\EB\8B\A4\0A\00"
@.str.3 = [86 x i8] c"\EC\84\9C\EB\B2\84\EC\B8\A1\EC\97\90\EC\84\9C \EB\91\90 \EB\B2\88\EC\A7\B8\EB\A1\9C \EB\B0\9B\EC\9D\80 \EC\88\98\EB\8A\94 %d \EC\9D\B4\EA\B3\A0 \EB\91\90 \EC\88\98\EC\9D\98 \ED\95\A9\EC\9D\80 %d \EC\9E\85\EB\8B\88\EB\8B\A4\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 i32
%11 = alloca %struct.sockaddr_in
%12 = alloca %struct.sockaddr_in
%13 = alloca i32
%14 = alloca [1000000 x i8]
%15 = alloca [100 x i8]
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %18
%19 = load i32, i32* @AF_INET
%20 = load i32, i32* @SOCK_DGRAM
%21 = call i32 @socket(i32 %19, i32 %20, i32 0)
store i32 %21, i32* %6
%22 = call i32 @memset(%struct.sockaddr_in* %11, i32 0, i32 12)
%23 = load i32, i32* @AF_INET
%24 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %11, i32 0, i32 2
store i32 %23, i32* %24
%25 = load i32, i32* @INADDR_ANY
%26 = call i32 @htonl(i32 %25)
%27 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %11, i32 0, i32 1
%28 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %27, i32 0, i32 0
store i32 %26, i32* %28
%29 = call i32 @htons(i32 32000)
%30 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %11, i32 0, i32 0
store i32 %29, i32* %30
%31 = load i32, i32* %6
%32 = bitcast %struct.sockaddr_in* %11 to %struct.sockaddr*
%33 = call i32 @bind(i32 %31, %struct.sockaddr* %32, i32 12)
br label %34
34: ; preds = %93, %2
%35 = load i32, i32* %18
switch i32 %35, label %92 [
i32 0, label %36
i32 1, label %62
]
36: ; preds = %34
store i32 12, i32* %13
%37 = load i32, i32* %6
%38 = bitcast %struct.sockaddr_in* %12 to %struct.sockaddr*
%39 = call i32 @recvfrom(i32 %37, i32* %8, i32 4, i32 0, %struct.sockaddr* %38, i32* %13)
store i32 %39, i32* %9
%40 = load i32, i32* %8
store i32 %40, i32* %16
%41 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%42 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %12, i32 0, i32 1
%43 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %42, i32 0, i32 0
%44 = load i32, i32* %43
%45 = call i32 @inet_ntoa(i32 %44)
%46 = call i32 @strcpy(i8* %41, i32 %45)
%47 = load i32, i32* %6
%48 = bitcast %struct.sockaddr_in* %12 to %struct.sockaddr*
%49 = call i32 @sendto(i32 %47, i32* %8, i32 4, i32 0, %struct.sockaddr* %48, i32 12)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%51 = load i32, i32* %9
%52 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%53 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %12, i32 0, i32 0
%54 = load i32, i32* %53
%55 = call i32 @ntohs(i32 %54)
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i32 %51, i8* %52, i32 %55)
%57 = load i32, i32* %8
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i32 %57)
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%60 = load i32, i32* %18
%61 = add nsw i32 %60, 1
store i32 %61, i32* %18
br label %93
62: ; preds = %34
store i32 12, i32* %13
%63 = load i32, i32* %6
%64 = bitcast %struct.sockaddr_in* %12 to %struct.sockaddr*
%65 = call i32 @recvfrom(i32 %63, i32* %8, i32 4, i32 0, %struct.sockaddr* %64, i32* %13)
store i32 %65, i32* %9
%66 = load i32, i32* %8
store i32 %66, i32* %17
%67 = load i32, i32* %16
%68 = load i32, i32* %17
%69 = add nsw i32 %67, %68
store i32 %69, i32* %10
%70 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%71 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %12, i32 0, i32 1
%72 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %71, i32 0, i32 0
%73 = load i32, i32* %72
%74 = call i32 @inet_ntoa(i32 %73)
%75 = call i32 @strcpy(i8* %70, i32 %74)
%76 = load i32, i32* %6
%77 = bitcast %struct.sockaddr_in* %12 to %struct.sockaddr*
%78 = call i32 @sendto(i32 %76, i32* %10, i32 4, i32 0, %struct.sockaddr* %77, i32 12)
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%80 = load i32, i32* %9
%81 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%82 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %12, i32 0, i32 0
%83 = load i32, i32* %82
%84 = call i32 @ntohs(i32 %83)
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i32 %80, i8* %81, i32 %84)
%86 = load i32, i32* %8
%87 = load i32, i32* %10
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.3, i64 0, i64 0), i32 %86, i32 %87)
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%90 = load i32, i32* %18
%91 = add nsw i32 %90, 1
store i32 %91, i32* %18
br label %93
92: ; preds = %34
br label %93
93: ; preds = %92, %62, %36
br label %34
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@INADDR_ANY = global i32 0
@.str.1 = [45 x i8] c"Received the following %d bytes from %s:%d:\0A\00"
@.str.2 = [59 x i8] c"(\EC\84\9C\EB\B2\84\EC\B8\A1\EC\97\90\EC\84\9C \EC\B2\AB \EB\B2\88\EC\A7\B8\EB\A1\9C \EB\B0\9B\EC\9D\80 \EC\88\98\EB\8A\94 %d \EC\9E\85\EB\8B\88\EB\8B\A4\0A\00"
@.str.3 = [86 x i8] c"\EC\84\9C\EB\B2\84\EC\B8\A1\EC\97\90\EC\84\9C \EB\91\90 \EB\B2\88\EC\A7\B8\EB\A1\9C \EB\B0\9B\EC\9D\80 \EC\88\98\EB\8A\94 %d \EC\9D\B4\EA\B3\A0 \EB\91\90 \EC\88\98\EC\9D\98 \ED\95\A9\EC\9D\80 %d \EC\9E\85\EB\8B\88\EB\8B\A4\0A\00"
@str.6 = [56 x i8] c"-------------------------------------------------------\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sockaddr_in
%6 = alloca %struct.sockaddr_in
%7 = alloca i32
%8 = alloca [100 x i8]
%9 = bitcast i32* %3 to i8*
%10 = bitcast i32* %4 to i8*
%11 = bitcast %struct.sockaddr_in* %5 to i8*
%12 = bitcast %struct.sockaddr_in* %6 to i8*
%13 = bitcast i32* %7 to i8*
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%15 = load i32, i32* @AF_INET
%16 = load i32, i32* @SOCK_DGRAM
%17 = tail call i32 @socket(i32 %15, i32 %16, i32 0)
%18 = call i32 @memset(%struct.sockaddr_in* %5, i32 0, i32 12)
%19 = load i32, i32* @AF_INET
%20 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 2
store i32 %19, i32* %20
%21 = load i32, i32* @INADDR_ANY
%22 = call i32 @htonl(i32 %21)
%23 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 1, i32 0
store i32 %22, i32* %23
%24 = call i32 @htons(i32 32000)
%25 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 0
store i32 %24, i32* %25
%26 = bitcast %struct.sockaddr_in* %5 to %struct.sockaddr*
%27 = call i32 @bind(i32 %17, %struct.sockaddr* %26, i32 12)
%28 = bitcast %struct.sockaddr_in* %6 to %struct.sockaddr*
%29 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i64 0, i32 1, i32 0
%30 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i64 0, i32 0
br label %31
31: ; preds = %63, %2
%32 = phi i32 [ %65, %63 ], [ undef, %2 ]
%33 = phi i32 [ %66, %63 ], [ 0, %2 ]
br label %34
34: ; preds = %31, %34
switch i32 %33, label %34 [
i32 0, label %35
i32 1, label %48
]
35: ; preds = %34
store i32 12, i32* %7
%36 = call i32 @recvfrom(i32 %17, i32* %3, i32 4, i32 0, %struct.sockaddr* %28, i32* %7)
%37 = load i32, i32* %3
%38 = load i32, i32* %29
%39 = call i32 @inet_ntoa(i32 %38)
%40 = call i32 @strcpy(i8* %14, i32 %39)
%41 = call i32 @sendto(i32 %17, i32* %3, i32 4, i32 0, %struct.sockaddr* %28, i32 12)
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.6, i64 0, i64 0))
%43 = load i32, i32* %30
%44 = call i32 @ntohs(i32 %43)
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i32 %36, i8* %14, i32 %44)
%46 = load i32, i32* %3
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i32 %46)
br label %63
48: ; preds = %34
store i32 12, i32* %7
%49 = call i32 @recvfrom(i32 %17, i32* %3, i32 4, i32 0, %struct.sockaddr* %28, i32* %7)
%50 = load i32, i32* %3
%51 = add nsw i32 %50, %32
store i32 %51, i32* %4
%52 = load i32, i32* %29
%53 = call i32 @inet_ntoa(i32 %52)
%54 = call i32 @strcpy(i8* %14, i32 %53)
%55 = call i32 @sendto(i32 %17, i32* %4, i32 4, i32 0, %struct.sockaddr* %28, i32 12)
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.6, i64 0, i64 0))
%57 = load i32, i32* %30
%58 = call i32 @ntohs(i32 %57)
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i32 %49, i8* %14, i32 %58)
%60 = load i32, i32* %3
%61 = load i32, i32* %4
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @.str.3, i64 0, i64 0), i32 %60, i32 %61)
br label %63
63: ; preds = %35, %48
%64 = phi i8* [ getelementptr inbounds ([56 x i8], [56 x i8]* @str.6, i64 0, i64 0), %48 ], [ getelementptr inbounds ([56 x i8], [56 x i8]* @str.6, i64 0, i64 0), %35 ]
%65 = phi i32 [ %32, %48 ], [ %37, %35 ]
%66 = phi i32 [ 2, %48 ], [ 1, %35 ]
%67 = call i32 @puts(i8* dereferenceable(1) %64)
br label %31
}