#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 timeval {
  long tv_sec;
  long tv_usec;
};
struct TYPE_2__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  TYPE_1__ sin_addr;
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
struct hostent {
  char *h_name;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ INADDR_ANY;
int /*<<< orphan*/ SOCK_STREAM;
int accept(int, struct sockaddr *, unsigned int *);
int atoi(char *);
scalar_t__ bind(int, struct sockaddr *, int);
scalar_t__ close(int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
struct hostent *gethostbyaddr(TYPE_1__ *, int, int /*<<< orphan*/);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ htons(int);
scalar_t__ listen(int, int);
int read(int, char *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int write(int, char *, int);
int main(int argc, char **argv) {
  int sockfd, port, bits_read, bits_wrote, difference, s;
  unsigned int len;
  int buf_size = 4096;
  long diff, totalbits = 0;
  double rate;
  char text[buf_size];
  struct timeval start, end;
  struct sockaddr_in sin;
  struct hostent *host;
  if (argc != 2) {
    fprintf(stderr, "Error - usage: tcp_recv [port]\n");
    return -1;
  }
  if ((port = atoi(argv[1])) < 1) {
    fprintf(stderr, "Error - Use of invalid port %s\n", argv[2]);
    return -1;
  }
  if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
    fprintf(stderr, "Error - Could not obtain socket: %s\n", strerror(errno));
    return -1;
  }
  sin.sin_family = AF_INET;
  sin.sin_port = htons(port);
  sin.sin_addr.s_addr = INADDR_ANY;
  if (bind(sockfd, (struct sockaddr *)&sin, sizeof sin) < 0) {
    fprintf(stderr, "Error - Could not bind: %s\n", strerror(errno));
    close(sockfd);
    return -1;
  }
  if (listen(sockfd, 1) < 0) {
    fprintf(stderr, "Error - Could listen: %s\n", strerror(errno));
    return -1;
  }
  len = sizeof sin;
  if ((s = accept(sockfd, (struct sockaddr *)&sin, &len)) < 0) {
    fprintf(stderr, "Error - Could not accept: %s\n", strerror(errno));
    return -1;
  }
  if ((host = gethostbyaddr(&sin.sin_addr, sizeof sin.sin_addr, AF_INET)) ==
      NULL)
    fprintf(stderr, "Error - Hostname could not be resolved\n");
  else
    fprintf(stderr, "Connection from %s\n", host->h_name);
  gettimeofday(&start, NULL);
  while (1) {
    if ((bits_read = read(s, text, buf_size)) == 0)
      break;
    if (bits_read < 0) {
      fprintf(stderr, "Error - Cannot read: %s\n", strerror(errno));
      return -1;
    }
    totalbits += bits_read;
    difference = 0;
    while (1) {
      if ((bits_wrote = write(1, text + difference, bits_read)) == bits_read)
        break;
      if (bits_wrote < 0) {
        fprintf(stderr, "Error - Cannot write to socket: %s\n",
                strerror(errno));
        return -1;
      } else if (bits_wrote < bits_read) {
        difference += bits_wrote;
        bits_read -= bits_wrote;
      }
    }
  }
  gettimeofday(&end, NULL);
  if (close(sockfd) < 0) {
    fprintf(stderr, "Error - Could not close socket: %s\n", strerror(errno));
    return -1;
  }
  diff = end.tv_sec * 1000000L + end.tv_usec - start.tv_sec * 1000000L -
         start.tv_usec;
  rate = ((double)totalbits / 1000000) / ((double)diff / 1000000);
  fprintf(stderr, "%ld bytes received at %.2fMB/s\n", totalbits, rate);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1000,-0x30(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x30(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xa0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x58(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1258 <main+0x88>
mov    0x2d9e(%rip),%rax
mov    (%rax),%edi
lea    0xdcd(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x94(%rbp)
jmp    171d <main+0x54d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x1,%eax
jge    12a6 <main+0xd6>
mov    0x2d58(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xd9f(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x94(%rbp)
jmp    171d <main+0x54d>
mov    0x2d3b(%rip),%rax
mov    (%rax),%edi
mov    0x2d12(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1315 <main+0x145>
mov    0x2cfe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xa4(%rbp)
mov    0x2cdf(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xa4(%rbp),%edi
mov    %rax,%rdx
lea    0xd50(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x94(%rbp)
jmp    171d <main+0x54d>
mov    0x2ccc(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x80(%rbp)
mov    -0x18(%rbp),%edi
call   1040 <htons@plt>
mov    %eax,-0x84(%rbp)
mov    0x2caa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x88(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x88(%rbp),%rsi
mov    $0xc,%edx
call   10a0 <bind@plt>
cmp    $0x0,%rax
jge    13ae <main+0x1de>
mov    0x2c6d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xa8(%rbp)
mov    0x2c4e(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xa8(%rbp),%edi
mov    %rax,%rdx
lea    0xce4(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x14(%rbp),%edi
call   1060 <close@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x94(%rbp)
jmp    171d <main+0x54d>
mov    -0x14(%rbp),%edi
mov    $0x1,%esi
call   1090 <listen@plt>
cmp    $0x0,%rax
jge    140f <main+0x23f>
mov    0x2c04(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xac(%rbp)
mov    0x2be5(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xac(%rbp),%edi
mov    %rax,%rdx
lea    0xc97(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x94(%rbp)
jmp    171d <main+0x54d>
movl   $0xc,-0x2c(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x88(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
call   10b0 <accept@plt>
mov    %eax,-0x28(%rbp)
cmp    $0x0,%eax
jge    147f <main+0x2af>
mov    0x2b94(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xb0(%rbp)
mov    0x2b75(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xb0(%rbp),%edi
mov    %rax,%rdx
lea    0xc41(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x94(%rbp)
jmp    171d <main+0x54d>
lea    -0x88(%rbp),%rdi
mov    0x2b5b(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%esi
call   10d0 <gethostbyaddr@plt>
mov    %rax,-0x90(%rbp)
cmp    $0x0,%rax
jne    14c6 <main+0x2f6>
mov    0x2b1f(%rip),%rax
mov    (%rax),%edi
lea    0xc07(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    14e7 <main+0x317>
mov    0x2b03(%rip),%rax
mov    (%rax),%edi
mov    -0x90(%rbp),%rax
mov    (%rax),%rdx
lea    0xc09(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
lea    -0x68(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
jmp    14f9 <main+0x329>
mov    -0xa0(%rbp),%rsi
mov    -0x28(%rbp),%edi
mov    -0x30(%rbp),%edx
call   1070 <read@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jne    151c <main+0x34c>
jmp    1637 <main+0x467>
cmpl   $0x0,-0x1c(%rbp)
jge    1570 <main+0x3a0>
mov    0x2aa3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xb4(%rbp)
mov    0x2a84(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xb4(%rbp),%edi
mov    %rax,%rdx
lea    0xbaa(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x94(%rbp)
jmp    171d <main+0x54d>
movslq -0x1c(%rbp),%rax
add    -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x24(%rbp)
jmp    1588 <main+0x3b8>
mov    -0xa0(%rbp),%rsi
movslq -0x24(%rbp),%rax
add    %rax,%rsi
mov    -0x1c(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
mov    %eax,-0x20(%rbp)
cmp    -0x1c(%rbp),%eax
jne    15b4 <main+0x3e4>
jmp    1632 <main+0x462>
cmpl   $0x0,-0x20(%rbp)
jge    1608 <main+0x438>
mov    0x2a0b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xb8(%rbp)
mov    0x29ec(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xb8(%rbp),%edi
mov    %rax,%rdx
lea    0xb2b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x94(%rbp)
jmp    171d <main+0x54d>
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1628 <main+0x458>
mov    -0x20(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
jmp    162d <main+0x45d>
jmp    1583 <main+0x3b3>
jmp    14f4 <main+0x324>
lea    -0x78(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
mov    -0x14(%rbp),%edi
call   1060 <close@plt>
cmp    $0x0,%rax
jge    16a0 <main+0x4d0>
mov    0x2973(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xbc(%rbp)
mov    0x2954(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
mov    -0xbc(%rbp),%edi
mov    %rax,%rdx
lea    0xab7(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x94(%rbp)
jmp    171d <main+0x54d>
imul   $0xf4240,-0x78(%rbp),%rax
add    -0x70(%rbp),%rax
imul   $0xf4240,-0x68(%rbp),%rcx
sub    %rcx,%rax
sub    -0x60(%rbp),%rax
mov    %rax,-0x38(%rbp)
cvtsi2sdq -0x40(%rbp),%xmm0
movsd  0x933(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdq -0x38(%rbp),%xmm1
movsd  0x921(%rip),%xmm2
divsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    0x28dd(%rip),%rax
mov    (%rax),%edi
mov    -0x40(%rbp),%rdx
movsd  -0x48(%rbp),%xmm0
lea    0xa59(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x94(%rbp)
mov    -0x50(%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    $0x1048,%rsp
mov    %rsp,%r15
cmp    $0x2,%edi
jne    12db <main+0x10b>
mov    %rsi,%rbp
mov    0x8(%rsi),%rdi
call   10c0 <atoi@plt>
test   %eax,%eax
jle    12f7 <main+0x127>
mov    %eax,%ebx
mov    0x2dde(%rip),%r14
mov    (%r14),%edi
mov    0x2db4(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
test   %eax,%eax
js     1310 <main+0x140>
mov    %eax,%r13d
mov    (%r14),%eax
mov    %eax,0x10(%rsp)
mov    %ebx,%edi
call   1040 <htons@plt>
mov    %eax,0xc(%rsp)
mov    0x2d9f(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    %r13d,%edi
mov    $0xc,%edx
call   10a0 <bind@plt>
test   %rax,%rax
js     1333 <main+0x163>
mov    %r13d,%edi
mov    $0x1,%esi
call   1090 <listen@plt>
test   %rax,%rax
js     136a <main+0x19a>
movl   $0xc,0x1c(%rsp)
lea    0x8(%rsp),%rsi
lea    0x1c(%rsp),%rdx
mov    %r13d,%edi
call   10b0 <accept@plt>
test   %eax,%eax
js     138d <main+0x1bd>
mov    %eax,%r12d
mov    (%r14),%edx
lea    0x8(%rsp),%rdi
mov    $0x4,%esi
call   10d0 <gethostbyaddr@plt>
mov    0x2d1a(%rip),%rcx
mov    (%rcx),%edi
test   %rax,%rax
mov    %r15,(%rsp)
je     13b0 <main+0x1e0>
mov    (%rax),%rdx
lea    0xe22(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    13be <main+0x1ee>
mov    0x2cee(%rip),%rax
mov    (%rax),%edi
lea    0xd25(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1560 <main+0x390>
mov    0x2cd2(%rip),%rax
mov    (%rax),%edi
mov    0x10(%rbp),%rdx
lea    0xd25(%rip),%rsi
jmp    1559 <main+0x389>
mov    0x2cb9(%rip),%rax
mov    (%rax),%ebx
mov    0x2ca0(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xd22(%rip),%rsi
jmp    1554 <main+0x384>
mov    0x2c96(%rip),%rax
mov    (%rax),%ebx
mov    0x2c7d(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xd24(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %r13d,%edi
call   1060 <close@plt>
jmp    1560 <main+0x390>
mov    0x2c5f(%rip),%rax
mov    (%rax),%ebx
mov    0x2c46(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xd09(%rip),%rsi
jmp    1554 <main+0x384>
mov    0x2c3c(%rip),%rax
mov    (%rax),%ebx
mov    0x2c23(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xd00(%rip),%rsi
jmp    1554 <main+0x384>
lea    0xd12(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
lea    0x30(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
lea    0x40(%rsp),%rsi
mov    %r12d,%edi
mov    $0x1000,%edx
call   1070 <read@plt>
mov    $0x0,%ebx
test   %eax,%eax
je     14bb <main+0x2eb>
mov    %eax,%r15d
lea    0x40(%rsp),%rbp
xor    %ebx,%ebx
mov    %r12d,0x18(%rsp)
jmp    1421 <main+0x251>
mov    %r15d,%eax
add    %rax,%rbx
mov    0x18(%rsp),%edi
lea    0x40(%rsp),%rbp
mov    %rbp,%rsi
mov    $0x1000,%edx
call   1070 <read@plt>
mov    %eax,%r15d
test   %eax,%eax
je     14bb <main+0x2eb>
test   %r15d,%r15d
js     157c <main+0x3ac>
mov    $0x1,%edi
mov    %rbp,%rsi
mov    %r15d,%edx
call   1030 <write@plt>
cmp    %eax,%r15d
je     13fa <main+0x22a>
xor    %r14d,%r14d
mov    %r15d,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
test   %eax,%eax
js     1483 <main+0x2b3>
cmp    %eax,%ebp
mov    $0x0,%ecx
cmovle %ecx,%eax
add    %eax,%r14d
sub    %eax,%ebp
movslq %r14d,%rax
lea    (%rsp,%rax,1),%rsi
add    $0x40,%rsi
mov    $0x1,%edi
mov    %ebp,%edx
call   1030 <write@plt>
cmp    %eax,%ebp
jne    1450 <main+0x280>
jmp    13fa <main+0x22a>
mov    0x2b46(%rip),%rax
mov    (%rax),%ebx
mov    0x2b2d(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xc7d(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0xffffffff,%ebp
mov    (%rsp),%r15
jmp    1565 <main+0x395>
xor    %ebp,%ebp
lea    0x20(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
mov    %r13d,%edi
call   1060 <close@plt>
test   %rax,%rax
mov    (%rsp),%r15
js     1536 <main+0x366>
mov    0x20(%rsp),%rax
mov    0x28(%rsp),%rcx
sub    0x30(%rsp),%rax
imul   $0xf4240,%rax,%rax
sub    0x38(%rsp),%rcx
add    %rax,%rcx
cvtsi2sd %rcx,%xmm1
cvtsi2sd %rbx,%xmm0
unpcklpd %xmm1,%xmm0
divpd  0xaf2(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
divsd  %xmm1,%xmm0
mov    0x2aaf(%rip),%rax
mov    (%rax),%edi
lea    0xc3c(%rip),%rsi
mov    %rbx,%rdx
mov    $0x1,%al
call   1080 <fprintf@plt>
jmp    1565 <main+0x395>
mov    0x2a93(%rip),%rax
mov    (%rax),%ebx
mov    0x2a7a(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xbee(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0xffffffff,%ebp
mov    %r15,%rsp
mov    %ebp,%eax
add    $0x1048,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2a4d(%rip),%rax
mov    (%rax),%ebx
mov    0x2a34(%rip),%rax
mov    (%rax),%edi
call   10e0 <strerror@plt>
lea    0xb6b(%rip),%rsi
jmp    14a1 <main+0x2d1>

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
%struct.sockaddr_in = type { %struct.TYPE_2__, i32, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.hostent = type { i8* }
%struct.sockaddr = type { i32 }
@stderr = global i32 0
@.str = [32 x i8] c"Error - usage: tcp_recv [port]\0A\00"
@.str.1 = [32 x i8] c"Error - Use of invalid port %s\0A\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.2 = [37 x i8] c"Error - Could not obtain socket: %s\0A\00"
@errno = global i32 0
@INADDR_ANY = global i32 0
@.str.3 = [28 x i8] c"Error - Could not bind: %s\0A\00"
@.str.4 = [26 x i8] c"Error - Could listen: %s\0A\00"
@.str.5 = [30 x i8] c"Error - Could not accept: %s\0A\00"
@.str.6 = [40 x i8] c"Error - Hostname could not be resolved\0A\00"
@.str.7 = [20 x i8] c"Connection from %s\0A\00"
@.str.8 = [25 x i8] c"Error - Cannot read: %s\0A\00"
@.str.9 = [36 x i8] c"Error - Cannot write to socket: %s\0A\00"
@.str.10 = [36 x i8] c"Error - Could not close socket: %s\0A\00"
@.str.11 = [32 x i8] c"%ld bytes received at %.2fMB/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 i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i64
%15 = alloca i64
%16 = alloca double
%17 = alloca i8*
%18 = alloca i64
%19 = alloca %struct.timeval
%20 = alloca %struct.timeval
%21 = alloca %struct.sockaddr_in
%22 = alloca %struct.hostent*
%23 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 4096, i32* %13
store i64 0, i64* %15
%24 = load i32, i32* %13
%25 = zext i32 %24 to i64
%26 = call i8* @llvm.stacksave()
store i8* %26, i8** %17
%27 = alloca i8, i64 %25
store i64 %25, i64* %18
%28 = load i32, i32* %4
%29 = icmp ne i32 %28, 2
br i1 %29, label %30, label %33
30: ; preds = %2
%31 = load i32, i32* @stderr
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
store i32 1, i32* %23
br label %197
33: ; preds = %2
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = load i8*, i8** %35
%37 = call i32 @atoi(i8* %36)
store i32 %37, i32* %7
%38 = icmp slt i32 %37, 1
br i1 %38, label %39, label %45
39: ; preds = %33
%40 = load i32, i32* @stderr
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 2
%43 = load i8*, i8** %42
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %43)
store i32 -1, i32* %3
store i32 1, i32* %23
br label %197
45: ; preds = %33
%46 = load i32, i32* @AF_INET
%47 = load i32, i32* @SOCK_STREAM
%48 = call i32 @socket(i32 %46, i32 %47, i32 0)
store i32 %48, i32* %6
%49 = icmp slt i32 %48, 0
br i1 %49, label %50, label %55
50: ; preds = %45
%51 = load i32, i32* @stderr
%52 = load i32, i32* @errno
%53 = call i8* @strerror(i32 %52)
%54 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %53)
store i32 -1, i32* %3
store i32 1, i32* %23
br label %197
55: ; preds = %45
%56 = load i32, i32* @AF_INET
%57 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %21, i32 0, i32 2
store i32 %56, i32* %57
%58 = load i32, i32* %7
%59 = call i32 @htons(i32 %58)
%60 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %21, i32 0, i32 1
store i32 %59, i32* %60
%61 = load i32, i32* @INADDR_ANY
%62 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %21, i32 0, i32 0
%63 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %62, i32 0, i32 0
store i32 %61, i32* %63
%64 = load i32, i32* %6
%65 = bitcast %struct.sockaddr_in* %21 to %struct.sockaddr*
%66 = call i64 @bind(i32 %64, %struct.sockaddr* %65, i32 12)
%67 = icmp slt i64 %66, 0
br i1 %67, label %68, label %75
68: ; preds = %55
%69 = load i32, i32* @stderr
%70 = load i32, i32* @errno
%71 = call i8* @strerror(i32 %70)
%72 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* %71)
%73 = load i32, i32* %6
%74 = call i64 @close(i32 %73)
store i32 -1, i32* %3
store i32 1, i32* %23
br label %197
75: ; preds = %55
%76 = load i32, i32* %6
%77 = call i64 @listen(i32 %76, i32 1)
%78 = icmp slt i64 %77, 0
br i1 %78, label %79, label %84
79: ; preds = %75
%80 = load i32, i32* @stderr
%81 = load i32, i32* @errno
%82 = call i8* @strerror(i32 %81)
%83 = call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8* %82)
store i32 -1, i32* %3
store i32 1, i32* %23
br label %197
84: ; preds = %75
store i32 12, i32* %12
%85 = load i32, i32* %6
%86 = bitcast %struct.sockaddr_in* %21 to %struct.sockaddr*
%87 = call i32 @accept(i32 %85, %struct.sockaddr* %86, i32* %12)
store i32 %87, i32* %11
%88 = icmp slt i32 %87, 0
br i1 %88, label %89, label %94
89: ; preds = %84
%90 = load i32, i32* @stderr
%91 = load i32, i32* @errno
%92 = call i8* @strerror(i32 %91)
%93 = call i32 (i32, i8*, ...) @fprintf(i32 %90, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* %92)
store i32 -1, i32* %3
store i32 1, i32* %23
br label %197
94: ; preds = %84
%95 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %21, i32 0, i32 0
%96 = load i32, i32* @AF_INET
%97 = call %struct.hostent* @gethostbyaddr(%struct.TYPE_2__* %95, i32 4, i32 %96)
store %struct.hostent* %97, %struct.hostent** %22
%98 = icmp eq %struct.hostent* %97, null
br i1 %98, label %99, label %102
99: ; preds = %94
%100 = load i32, i32* @stderr
%101 = call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
br label %108
102: ; preds = %94
%103 = load i32, i32* @stderr
%104 = load %struct.hostent*, %struct.hostent** %22
%105 = getelementptr inbounds %struct.hostent, %struct.hostent* %104, i32 0, i32 0
%106 = load i8*, i8** %105
%107 = call i32 (i32, i8*, ...) @fprintf(i32 %103, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* %106)
br label %108
108: ; preds = %102, %99
%109 = call i32 @gettimeofday(%struct.timeval* %19, i32* null)
br label %110
110: ; preds = %161, %108
br label %111
111: ; preds = %110
%112 = load i32, i32* %11
%113 = load i32, i32* %13
%114 = call i32 @read(i32 %112, i8* %27, i32 %113)
store i32 %114, i32* %8
%115 = icmp eq i32 %114, 0
br i1 %115, label %116, label %117
116: ; preds = %111
br label %162
117: ; preds = %111
%118 = load i32, i32* %8
%119 = icmp slt i32 %118, 0
br i1 %119, label %120, label %125
120: ; preds = %117
%121 = load i32, i32* @stderr
%122 = load i32, i32* @errno
%123 = call i8* @strerror(i32 %122)
%124 = call i32 (i32, i8*, ...) @fprintf(i32 %121, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i8* %123)
store i32 -1, i32* %3
store i32 1, i32* %23
br label %197
125: ; preds = %117
%126 = load i32, i32* %8
%127 = sext i32 %126 to i64
%128 = load i64, i64* %15
%129 = add nsw i64 %128, %127
store i64 %129, i64* %15
store i32 0, i32* %10
br label %130
130: ; preds = %160, %125
br label %131
131: ; preds = %130
%132 = load i32, i32* %10
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds i8, i8* %27, i64 %133
%135 = load i32, i32* %8
%136 = call i32 @write(i32 1, i8* %134, i32 %135)
store i32 %136, i32* %9
%137 = load i32, i32* %8
%138 = icmp eq i32 %136, %137
br i1 %138, label %139, label %140
139: ; preds = %131
br label %161
140: ; preds = %131
%141 = load i32, i32* %9
%142 = icmp slt i32 %141, 0
br i1 %142, label %143, label %148
143: ; preds = %140
%144 = load i32, i32* @stderr
%145 = load i32, i32* @errno
%146 = call i8* @strerror(i32 %145)
%147 = call i32 (i32, i8*, ...) @fprintf(i32 %144, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i8* %146)
store i32 -1, i32* %3
store i32 1, i32* %23
br label %197
148: ; preds = %140
%149 = load i32, i32* %9
%150 = load i32, i32* %8
%151 = icmp slt i32 %149, %150
br i1 %151, label %152, label %159
152: ; preds = %148
%153 = load i32, i32* %9
%154 = load i32, i32* %10
%155 = add nsw i32 %154, %153
store i32 %155, i32* %10
%156 = load i32, i32* %9
%157 = load i32, i32* %8
%158 = sub nsw i32 %157, %156
store i32 %158, i32* %8
br label %159
159: ; preds = %152, %148
br label %160
160: ; preds = %159
br label %130
161: ; preds = %139
br label %110
162: ; preds = %116
%163 = call i32 @gettimeofday(%struct.timeval* %20, i32* null)
%164 = load i32, i32* %6
%165 = call i64 @close(i32 %164)
%166 = icmp slt i64 %165, 0
br i1 %166, label %167, label %172
167: ; preds = %162
%168 = load i32, i32* @stderr
%169 = load i32, i32* @errno
%170 = call i8* @strerror(i32 %169)
%171 = call i32 (i32, i8*, ...) @fprintf(i32 %168, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0), i8* %170)
store i32 -1, i32* %3
store i32 1, i32* %23
br label %197
172: ; preds = %162
%173 = getelementptr inbounds %struct.timeval, %struct.timeval* %20, i32 0, i32 0
%174 = load i64, i64* %173
%175 = mul nsw i64 %174, 1000000
%176 = getelementptr inbounds %struct.timeval, %struct.timeval* %20, i32 0, i32 1
%177 = load i64, i64* %176
%178 = add nsw i64 %175, %177
%179 = getelementptr inbounds %struct.timeval, %struct.timeval* %19, i32 0, i32 0
%180 = load i64, i64* %179
%181 = mul nsw i64 %180, 1000000
%182 = sub nsw i64 %178, %181
%183 = getelementptr inbounds %struct.timeval, %struct.timeval* %19, i32 0, i32 1
%184 = load i64, i64* %183
%185 = sub nsw i64 %182, %184
store i64 %185, i64* %14
%186 = load i64, i64* %15
%187 = sitofp i64 %186 to double
%188 = fdiv double %187, 1.000000e+06
%189 = load i64, i64* %14
%190 = sitofp i64 %189 to double
%191 = fdiv double %190, 1.000000e+06
%192 = fdiv double %188, %191
store double %192, double* %16
%193 = load i32, i32* @stderr
%194 = load i64, i64* %15
%195 = load double, double* %16
%196 = call i32 (i32, i8*, ...) @fprintf(i32 %193, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), i64 %194, double %195)
store i32 0, i32* %3
store i32 1, i32* %23
br label %197
197: ; preds = %172, %167, %143, %120, %89, %79, %68, %50, %39, %30
%198 = load i8*, i8** %17
%199 = load i32, i32* %3
ret i32 %199
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
%struct.sockaddr_in = type { %struct.TYPE_2__, i32, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
%struct.hostent = type { i8* }
@stderr = global i32 0
@.str = [32 x i8] c"Error - usage: tcp_recv [port]\0A\00"
@.str.1 = [32 x i8] c"Error - Use of invalid port %s\0A\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.2 = [37 x i8] c"Error - Could not obtain socket: %s\0A\00"
@errno = global i32 0
@INADDR_ANY = global i32 0
@.str.3 = [28 x i8] c"Error - Could not bind: %s\0A\00"
@.str.4 = [26 x i8] c"Error - Could listen: %s\0A\00"
@.str.5 = [30 x i8] c"Error - Could not accept: %s\0A\00"
@.str.6 = [40 x i8] c"Error - Hostname could not be resolved\0A\00"
@.str.7 = [20 x i8] c"Connection from %s\0A\00"
@.str.8 = [25 x i8] c"Error - Cannot read: %s\0A\00"
@.str.9 = [36 x i8] c"Error - Cannot write to socket: %s\0A\00"
@.str.10 = [36 x i8] c"Error - Could not close socket: %s\0A\00"
@.str.11 = [32 x i8] c"%ld bytes received at %.2fMB/s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca %struct.timeval
%5 = alloca %struct.timeval
%6 = alloca %struct.sockaddr_in
%7 = bitcast i32* %3 to i8*
%8 = tail call i8* @llvm.stacksave()
%9 = alloca [4096 x i8]
%10 = getelementptr inbounds [4096 x i8], [4096 x i8]* %9, i64 0, i64 0
%11 = bitcast %struct.timeval* %4 to i8*
%12 = bitcast %struct.timeval* %5 to i8*
%13 = bitcast %struct.sockaddr_in* %6 to i8*
%14 = icmp eq i32 %0, 2
br i1 %14, label %18, label %15
15: ; preds = %2
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %154
18: ; preds = %2
%19 = getelementptr inbounds i8*, i8** %1, i64 1
%20 = load i8*, i8** %19
%21 = tail call i32 @atoi(i8* %20)
%22 = icmp slt i32 %21, 1
br i1 %22, label %23, label %28
23: ; preds = %18
%24 = load i32, i32* @stderr
%25 = getelementptr inbounds i8*, i8** %1, i64 2
%26 = load i8*, i8** %25
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %26)
br label %154
28: ; preds = %18
%29 = load i32, i32* @AF_INET
%30 = load i32, i32* @SOCK_STREAM
%31 = tail call i32 @socket(i32 %29, i32 %30, i32 0)
%32 = icmp slt i32 %31, 0
br i1 %32, label %33, label %38
33: ; preds = %28
%34 = load i32, i32* @stderr
%35 = load i32, i32* @errno
%36 = tail call i8* @strerror(i32 %35)
%37 = tail call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %36)
br label %154
38: ; preds = %28
%39 = load i32, i32* @AF_INET
%40 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i64 0, i32 2
store i32 %39, i32* %40
%41 = tail call i32 @htons(i32 %21)
%42 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i64 0, i32 1
store i32 %41, i32* %42
%43 = load i32, i32* @INADDR_ANY
%44 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i64 0, i32 0
%45 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i64 0, i32 0, i32 0
store i32 %43, i32* %45
%46 = bitcast %struct.sockaddr_in* %6 to %struct.sockaddr*
%47 = call i64 @bind(i32 %31, %struct.sockaddr* %46, i32 12)
%48 = icmp slt i64 %47, 0
br i1 %48, label %49, label %55
49: ; preds = %38
%50 = load i32, i32* @stderr
%51 = load i32, i32* @errno
%52 = call i8* @strerror(i32 %51)
%53 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* %52)
%54 = call i64 @close(i32 %31)
br label %154
55: ; preds = %38
%56 = call i64 @listen(i32 %31, i32 1)
%57 = icmp slt i64 %56, 0
br i1 %57, label %58, label %63
58: ; preds = %55
%59 = load i32, i32* @stderr
%60 = load i32, i32* @errno
%61 = call i8* @strerror(i32 %60)
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8* %61)
br label %154
63: ; preds = %55
store i32 12, i32* %3
%64 = call i32 @accept(i32 %31, %struct.sockaddr* %46, i32* %3)
%65 = icmp slt i32 %64, 0
br i1 %65, label %66, label %71
66: ; preds = %63
%67 = load i32, i32* @stderr
%68 = load i32, i32* @errno
%69 = call i8* @strerror(i32 %68)
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* %69)
br label %154
71: ; preds = %63
%72 = load i32, i32* @AF_INET
%73 = call %struct.hostent* @gethostbyaddr(%struct.TYPE_2__* %44, i32 4, i32 %72)
%74 = icmp eq %struct.hostent* %73, null
%75 = load i32, i32* @stderr
br i1 %74, label %76, label %78
76: ; preds = %71
%77 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
br label %82
78: ; preds = %71
%79 = getelementptr inbounds %struct.hostent, %struct.hostent* %73, i64 0, i32 0
%80 = load i8*, i8** %79
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* %80)
br label %82
82: ; preds = %78, %76
%83 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%84 = call i32 @read(i32 %64, i8* %10, i32 4096)
%85 = icmp eq i32 %84, 0
br i1 %85, label %122, label %89
86: ; preds = %113, %98
%87 = call i32 @read(i32 %64, i8* %10, i32 4096)
%88 = icmp eq i32 %87, 0
br i1 %88, label %122, label %89
89: ; preds = %82, %86
%90 = phi i32 [ %87, %86 ], [ %84, %82 ]
%91 = phi i64 [ %100, %86 ], [ 0, %82 ]
%92 = icmp slt i32 %90, 0
br i1 %92, label %93, label %98
93: ; preds = %89
%94 = load i32, i32* @stderr
%95 = load i32, i32* @errno
%96 = call i8* @strerror(i32 %95)
%97 = call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i8* %96)
br label %154
98: ; preds = %89
%99 = zext i32 %90 to i64
%100 = add nuw nsw i64 %91, %99
%101 = call i32 @write(i32 1, i8* %10, i32 %90)
%102 = icmp eq i32 %90, %101
br i1 %102, label %86, label %103
103: ; preds = %98, %113
%104 = phi i32 [ %120, %113 ], [ %101, %98 ]
%105 = phi i32 [ %117, %113 ], [ %90, %98 ]
%106 = phi i32 [ %116, %113 ], [ 0, %98 ]
%107 = icmp slt i32 %104, 0
br i1 %107, label %108, label %113
108: ; preds = %103
%109 = load i32, i32* @stderr
%110 = load i32, i32* @errno
%111 = call i8* @strerror(i32 %110)
%112 = call i32 (i32, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i8* %111)
br label %154
113: ; preds = %103
%114 = icmp sgt i32 %105, %104
%115 = select i1 %114, i32 %104, i32 0
%116 = add nsw i32 %115, %106
%117 = sub nsw i32 %105, %115
%118 = sext i32 %116 to i64
%119 = getelementptr inbounds [4096 x i8], [4096 x i8]* %9, i64 0, i64 %118
%120 = call i32 @write(i32 1, i8* %119, i32 %117)
%121 = icmp eq i32 %117, %120
br i1 %121, label %86, label %103
122: ; preds = %86, %82
%123 = phi i64 [ 0, %82 ], [ %100, %86 ]
%124 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%125 = call i64 @close(i32 %31)
%126 = icmp slt i64 %125, 0
br i1 %126, label %127, label %132
127: ; preds = %122
%128 = load i32, i32* @stderr
%129 = load i32, i32* @errno
%130 = call i8* @strerror(i32 %129)
%131 = call i32 (i32, i8*, ...) @fprintf(i32 %128, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0), i8* %130)
br label %154
132: ; preds = %122
%133 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 0
%134 = load i64, i64* %133
%135 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%136 = load i64, i64* %135
%137 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 0
%138 = load i64, i64* %137
%139 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 1
%140 = load i64, i64* %139
%141 = sub i64 %134, %138
%142 = mul i64 %141, 1000000
%143 = sub i64 %136, %140
%144 = add i64 %143, %142
%145 = insertelement <2 x i64> poison, i64 %123, i64 0
%146 = insertelement <2 x i64> %145, i64 %144, i64 1
%147 = sitofp <2 x i64> %146 to <2 x double>
%148 = fdiv <2 x double> %147, <double 1.000000e+06, double 1.000000e+06>
%149 = extractelement <2 x double> %148, i64 0
%150 = extractelement <2 x double> %148, i64 1
%151 = fdiv double %149, %150
%152 = load i32, i32* @stderr
%153 = call i32 (i32, i8*, ...) @fprintf(i32 %152, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), i64 %123, double %151)
br label %154
154: ; preds = %132, %127, %108, %93, %66, %58, %49, %33, %23, %15
%155 = phi i32 [ -1, %15 ], [ -1, %23 ], [ -1, %33 ], [ -1, %49 ], [ -1, %58 ], [ -1, %66 ], [ -1, %127 ], [ 0, %132 ], [ -1, %93 ], [ -1, %108 ]
ret i32 %155
}