#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 */

/* Type definitions */
typedef int /*<<< orphan*/ val;
typedef int socklen_t;

/* Variables and functions */
scalar_t__ EINVAL;
int /*<<< orphan*/ IPPROTO_IP;
int /*<<< orphan*/ err(int, char *, char const *, char const *);
scalar_t__ errno;
int /*<<< orphan*/ errx(int, char *, char const *, char const *, ...);
scalar_t__ getsockopt(int, int /*<<< orphan*/, int, int *, int *);
scalar_t__ setsockopt(int, int /*<<< orphan*/, int, int *, int);
void test_ip_uchar(int sock, const char *socktypename, int option,
                   const char *optionname, int initial) {
  int val[2];
  socklen_t len;
  val[0] = -1;
  val[1] = -1;
  len = sizeof(val);
  if (getsockopt(sock, IPPROTO_IP, option, val, &len) < 0)
    err(-1, "test_ip_uchar(%s, %s): initial getsockopt()", socktypename,
        optionname);
  if (len != sizeof(val[0]))
    errx(-1,
         "test_ip_uchar(%s, %s): initial getsockopt() "
         "returned %d bytes",
         socktypename, optionname, len);
  if (val[0] == -1)
    errx(-1,
         "test_ip_uchar(%s, %s): initial getsockopt() didn't "
         "return data",
         socktypename, optionname);
  if (val[0] != initial)
    errx(-1,
         "test_ip_uchar(%s, %s): initial getsockopt() "
         "returned value of %d, not %d",
         socktypename, optionname, val[0], initial);
  val[0] = 128;
  val[1] = -1;
  if (setsockopt(sock, IPPROTO_IP, option, val, sizeof(val[0])) < 0)
    err(-1, "test_ip_uchar(%s, %s): setsockopt(128)", socktypename, optionname);
  val[0] = -1;
  val[1] = -1;
  len = sizeof(val);
  if (getsockopt(sock, IPPROTO_IP, option, val, &len) < 0)
    err(-1,
        "test_ip_uchar(%s, %s): getsockopt() after set to "
        "128",
        socktypename, optionname);
  if (len != sizeof(val[0]))
    errx(-1,
         "test_ip_uchar(%s, %s): getsockopt() after set to "
         "128 returned %d bytes",
         socktypename, optionname, len);
  if (val[0] == -1)
    errx(-1,
         "test_ip_uchar(%s, %s): getsockopt() after set to "
         "128 didn't return data",
         socktypename, optionname);
  if (val[0] != 128)
    errx(-1,
         "test_ip_uchar(%s, %s): getsockopt() after set to "
         "128 returned %d",
         socktypename, optionname, val[0]);
  val[0] = 0;
  val[1] = 0;
  if (setsockopt(sock, IPPROTO_IP, option, val, sizeof(val[0])) < 0)
    err(-1,
        "test_ip_uchar(%s, %s): setsockopt() to reset from "
        "128",
        socktypename, optionname);
  if (len != sizeof(val[0]))
    errx(-1,
         "test_ip_uchar(%s, %s): getsockopt() after reset "
         "from 128 returned %d bytes",
         socktypename, optionname, len);
  if (val[0] == -1)
    errx(-1,
         "test_ip_uchar(%s, %s): getsockopt() after reset "
         "from 128 didn't return data",
         socktypename, optionname);
  if (val[0] != 0)
    errx(-1,
         "test_ip_uchar(%s, %s): getsockopt() after reset "
         "from 128 returned %d",
         socktypename, optionname, val[0]);
  val[0] = 32000;
  val[1] = -1;
  if (setsockopt(sock, IPPROTO_IP, option, val, sizeof(val[0])) < 0) {
    if (errno == EINVAL)
      return;
    err(-1, "test_ip_uchar(%s, %s): getsockopt(32000)", socktypename,
        optionname);
  }
  val[0] = -1;
  val[1] = -1;
  len = sizeof(val);
  if (getsockopt(sock, IPPROTO_IP, option, val, &len) < 0)
    err(-1,
        "test_ip_uchar(%s, %s): getsockopt() after set to "
        "32000",
        socktypename, optionname);
  if (len != sizeof(val[0]))
    errx(-1,
         "test_ip_uchar(%s, %s): getsockopt() after set to "
         "32000 returned %d bytes",
         socktypename, optionname, len);
  if (val[0] == -1)
    errx(-1,
         "test_ip_uchar(%s, %s): getsockopt() after set to "
         "32000 didn't return data",
         socktypename, optionname);
  if (val[0] == 32000)
    errx(-1,
         "test_ip_uchar(%s, %s): getsockopt() after set to "
         "32000 returned 32000: failed to truncate",
         socktypename, optionname);
}


x86 assembly (clang, -O0):
<test_ip_uchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
movl   $0xffffffff,-0x2c(%rbp)
movl   $0xffffffff,-0x28(%rbp)
movl   $0x8,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e6f(%rip),%rax
mov    (%rax),%esi
mov    -0x14(%rbp),%edx
lea    -0x2c(%rbp),%rcx
lea    -0x30(%rbp),%r8
call   1050 <getsockopt@plt>
cmp    $0x0,%rax
jge    11ae <test_ip_uchar+0x6e>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%edi
lea    0xe57(%rip),%rsi
call   1060 <err@plt>
movslq -0x30(%rbp),%rax
cmp    $0x4,%rax
je     11db <test_ip_uchar+0x9b>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8d
mov    $0xffffffff,%edi
lea    0xe58(%rip),%rsi
mov    $0x0,%al
call   1040 <errx@plt>
cmpl   $0xffffffff,-0x2c(%rbp)
jne    1200 <test_ip_uchar+0xc0>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%edi
lea    0xe71(%rip),%rsi
mov    $0x0,%al
call   1040 <errx@plt>
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
je     122f <test_ip_uchar+0xef>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    $0xffffffff,%edi
lea    0xe81(%rip),%rsi
mov    $0x0,%al
call   1040 <errx@plt>
movl   $0x80,-0x2c(%rbp)
movl   $0xffffffff,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2da1(%rip),%rax
mov    (%rax),%esi
mov    -0x14(%rbp),%edx
lea    -0x2c(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0x0,%rax
jge    127e <test_ip_uchar+0x13e>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%edi
lea    0xe79(%rip),%rsi
call   1060 <err@plt>
movl   $0xffffffff,-0x2c(%rbp)
movl   $0xffffffff,-0x28(%rbp)
movl   $0x8,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2d4b(%rip),%rax
mov    (%rax),%esi
mov    -0x14(%rbp),%edx
lea    -0x2c(%rbp),%rcx
lea    -0x30(%rbp),%r8
call   1050 <getsockopt@plt>
cmp    $0x0,%rax
jge    12d2 <test_ip_uchar+0x192>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%edi
lea    0xe4c(%rip),%rsi
call   1060 <err@plt>
movslq -0x30(%rbp),%rax
cmp    $0x4,%rax
je     12ff <test_ip_uchar+0x1bf>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8d
mov    $0xffffffff,%edi
lea    0xe56(%rip),%rsi
mov    $0x0,%al
call   1040 <errx@plt>
cmpl   $0xffffffff,-0x2c(%rbp)
jne    1324 <test_ip_uchar+0x1e4>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%edi
lea    0xe78(%rip),%rsi
mov    $0x0,%al
call   1040 <errx@plt>
cmpl   $0x80,-0x2c(%rbp)
je     1350 <test_ip_uchar+0x210>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
mov    $0xffffffff,%edi
lea    0xe94(%rip),%rsi
mov    $0x0,%al
call   1040 <errx@plt>
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2c80(%rip),%rax
mov    (%rax),%esi
mov    -0x14(%rbp),%edx
lea    -0x2c(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0x0,%rax
jge    139f <test_ip_uchar+0x25f>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%edi
lea    0xe84(%rip),%rsi
call   1060 <err@plt>
movslq -0x30(%rbp),%rax
cmp    $0x4,%rax
je     13cc <test_ip_uchar+0x28c>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8d
mov    $0xffffffff,%edi
lea    0xe8f(%rip),%rsi
mov    $0x0,%al
call   1040 <errx@plt>
cmpl   $0xffffffff,-0x2c(%rbp)
jne    13f1 <test_ip_uchar+0x2b1>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%edi
lea    0xeb5(%rip),%rsi
mov    $0x0,%al
call   1040 <errx@plt>
cmpl   $0x0,-0x2c(%rbp)
je     141a <test_ip_uchar+0x2da>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
mov    $0xffffffff,%edi
lea    0xed8(%rip),%rsi
mov    $0x0,%al
call   1040 <errx@plt>
movl   $0x7d00,-0x2c(%rbp)
movl   $0xffffffff,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2bb6(%rip),%rax
mov    (%rax),%esi
mov    -0x14(%rbp),%edx
lea    -0x2c(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0x0,%rax
jge    1488 <test_ip_uchar+0x348>
mov    0x2b81(%rip),%rax
mov    (%rax),%rax
mov    0x2b6f(%rip),%rcx
cmp    (%rcx),%rax
jne    146f <test_ip_uchar+0x32f>
jmp    1556 <test_ip_uchar+0x416>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%edi
lea    0xead(%rip),%rsi
call   1060 <err@plt>
movl   $0xffffffff,-0x2c(%rbp)
movl   $0xffffffff,-0x28(%rbp)
movl   $0x8,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2b41(%rip),%rax
mov    (%rax),%esi
mov    -0x14(%rbp),%edx
lea    -0x2c(%rbp),%rcx
lea    -0x30(%rbp),%r8
call   1050 <getsockopt@plt>
cmp    $0x0,%rax
jge    14dc <test_ip_uchar+0x39c>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%edi
lea    0xe82(%rip),%rsi
call   1060 <err@plt>
movslq -0x30(%rbp),%rax
cmp    $0x4,%rax
je     1509 <test_ip_uchar+0x3c9>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8d
mov    $0xffffffff,%edi
lea    0xe8e(%rip),%rsi
mov    $0x0,%al
call   1040 <errx@plt>
cmpl   $0xffffffff,-0x2c(%rbp)
jne    152e <test_ip_uchar+0x3ee>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%edi
lea    0xeb2(%rip),%rsi
mov    $0x0,%al
call   1040 <errx@plt>
cmpl   $0x7d00,-0x2c(%rbp)
jne    1556 <test_ip_uchar+0x416>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%edi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1040 <errx@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ip_uchar>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r8d,%ebp
mov    %rcx,%r14
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %edi,%r12d
movq   $0xffffffffffffffff,0x10(%rsp)
ff ff
movl   $0x8,0xc(%rsp)
mov    0x2e73(%rip),%r13
mov    0x0(%r13),%esi
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
call   1050 <getsockopt@plt>
test   %rax,%rax
jns    11a4 <test_ip_uchar+0x64>
lea    0xe6c(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1060 <err@plt>
mov    0xc(%rsp),%r8d
cmp    $0x4,%r8d
je     11c8 <test_ip_uchar+0x88>
lea    0xe76(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <errx@plt>
mov    0x10(%rsp),%r8d
cmp    $0xffffffff,%r8d
je     146d <test_ip_uchar+0x32d>
cmp    %ebp,%r8d
je     11f8 <test_ip_uchar+0xb8>
lea    0xec6(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %ebp,%r9d
xor    %eax,%eax
call   1040 <errx@plt>
movabs $0xffffffff00000080,%rax
ff ff ff
mov    %rax,0x10(%rsp)
mov    0x0(%r13),%esi
lea    0x10(%rsp),%rcx
mov    %r12d,%edi
mov    %r15d,%edx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
test   %rax,%rax
jns    123d <test_ip_uchar+0xfd>
lea    0xec5(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1060 <err@plt>
movq   $0xffffffffffffffff,0x10(%rsp)
ff ff
movl   $0x8,0xc(%rsp)
mov    0x0(%r13),%esi
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    %r12d,%edi
mov    %r15d,%edx
call   1050 <getsockopt@plt>
test   %rax,%rax
jns    1283 <test_ip_uchar+0x143>
lea    0xea6(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1060 <err@plt>
mov    0xc(%rsp),%r8d
cmp    $0x4,%r8d
je     12a7 <test_ip_uchar+0x167>
lea    0xeb9(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <errx@plt>
mov    0x10(%rsp),%r8d
cmp    $0xffffffff,%r8d
je     1499 <test_ip_uchar+0x359>
cmp    $0x80,%r8d
je     12d8 <test_ip_uchar+0x198>
lea    0xf17(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <errx@plt>
movq   $0x0,0x10(%rsp)
mov    0x0(%r13),%esi
lea    0x10(%rsp),%rcx
mov    %r12d,%edi
mov    %r15d,%edx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
test   %rax,%rax
jns    1317 <test_ip_uchar+0x1d7>
lea    0xf17(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1060 <err@plt>
mov    0xc(%rsp),%r8d
cmp    $0x4,%r8d
je     133b <test_ip_uchar+0x1fb>
lea    0xf2b(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <errx@plt>
mov    0x10(%rsp),%r8d
cmp    $0xffffffff,%r8d
je     14c9 <test_ip_uchar+0x389>
test   %r8d,%r8d
je     1368 <test_ip_uchar+0x228>
lea    0xf95(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <errx@plt>
movabs $0xffffffff00007d00,%rax
ff ff ff
mov    %rax,0x10(%rsp)
mov    0x0(%r13),%esi
lea    0x10(%rsp),%rcx
mov    %r12d,%edi
mov    %r15d,%edx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
test   %rax,%rax
jns    13c7 <test_ip_uchar+0x287>
mov    0x2c3b(%rip),%rax
mov    (%rax),%rax
mov    0x2c29(%rip),%rcx
cmp    (%rcx),%rax
je     145e <test_ip_uchar+0x31e>
lea    0xf79(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1060 <err@plt>
movq   $0xffffffffffffffff,0x10(%rsp)
ff ff
movl   $0x8,0xc(%rsp)
mov    0x0(%r13),%esi
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    %r12d,%edi
mov    %r15d,%edx
call   1050 <getsockopt@plt>
test   %rax,%rax
jns    140d <test_ip_uchar+0x2cd>
lea    0xf5c(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1060 <err@plt>
mov    0xc(%rsp),%r8d
cmp    $0x4,%r8d
je     1431 <test_ip_uchar+0x2f1>
lea    0xf71(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <errx@plt>
mov    0x10(%rsp),%eax
cmp    $0xffffffff,%eax
je     14f5 <test_ip_uchar+0x3b5>
cmp    $0x7d00,%eax
jne    145e <test_ip_uchar+0x31e>
lea    0xfd7(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <errx@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xbf6(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <errx@plt>
mov    0x10(%rsp),%r8d
cmp    %ebp,%r8d
jne    11dc <test_ip_uchar+0x9c>
jmp    11f8 <test_ip_uchar+0xb8>
lea    0xcf5(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <errx@plt>
mov    0x10(%rsp),%r8d
cmp    $0x80,%r8d
jne    12bf <test_ip_uchar+0x17f>
jmp    12d8 <test_ip_uchar+0x198>
lea    0xdcf(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <errx@plt>
mov    0x10(%rsp),%r8d
test   %r8d,%r8d
jne    134f <test_ip_uchar+0x20f>
jmp    1368 <test_ip_uchar+0x228>
lea    0xedd(%rip),%rsi
mov    $0xffffffff,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <errx@plt>
mov    0x10(%rsp),%eax
cmp    $0x7d00,%eax
je     1445 <test_ip_uchar+0x305>
jmp    145e <test_ip_uchar+0x31e>

LLVM IR (-O0):
@IPPROTO_IP = global i32 0
@.str = [44 x i8] c"test_ip_uchar(%s, %s): initial getsockopt()\00"
@.str.1 = [62 x i8] c"test_ip_uchar(%s, %s): initial getsockopt() returned %d bytes\00"
@.str.2 = [63 x i8] c"test_ip_uchar(%s, %s): initial getsockopt() didn't return data\00"
@.str.3 = [73 x i8] c"test_ip_uchar(%s, %s): initial getsockopt() returned value of %d, not %d\00"
@.str.4 = [39 x i8] c"test_ip_uchar(%s, %s): setsockopt(128)\00"
@.str.5 = [53 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 128\00"
@.str.6 = [71 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 128 returned %d bytes\00"
@.str.7 = [72 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 128 didn't return data\00"
@.str.8 = [65 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 128 returned %d\00"
@.str.9 = [54 x i8] c"test_ip_uchar(%s, %s): setsockopt() to reset from 128\00"
@.str.10 = [75 x i8] c"test_ip_uchar(%s, %s): getsockopt() after reset from 128 returned %d bytes\00"
@.str.11 = [76 x i8] c"test_ip_uchar(%s, %s): getsockopt() after reset from 128 didn't return data\00"
@.str.12 = [69 x i8] c"test_ip_uchar(%s, %s): getsockopt() after reset from 128 returned %d\00"
@errno = global i64 0
@EINVAL = global i64 0
@.str.13 = [41 x i8] c"test_ip_uchar(%s, %s): getsockopt(32000)\00"
@.str.14 = [55 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 32000\00"
@.str.15 = [73 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 32000 returned %d bytes\00"
@.str.16 = [74 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 32000 didn't return data\00"
@.str.17 = [90 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 32000 returned 32000: failed to truncate\00"
define void @test_ip_uchar(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca [2 x i32]
%12 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
store i32 -1, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 1
store i32 -1, i32* %14
store i32 8, i32* %12
%15 = load i32, i32* %6
%16 = load i32, i32* @IPPROTO_IP
%17 = load i32, i32* %8
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%19 = call i64 @getsockopt(i32 %15, i32 %16, i32 %17, i32* %18, i32* %12)
%20 = icmp slt i64 %19, 0
br i1 %20, label %21, label %25
21: ; preds = %5
%22 = load i8*, i8** %7
%23 = load i8*, i8** %9
%24 = call i32 @err(i32 -1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %22, i8* %23)
br label %25
25: ; preds = %21, %5
%26 = load i32, i32* %12
%27 = sext i32 %26 to i64
%28 = icmp ne i64 %27, 4
br i1 %28, label %29, label %34
29: ; preds = %25
%30 = load i8*, i8** %7
%31 = load i8*, i8** %9
%32 = load i32, i32* %12
%33 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0), i8* %30, i8* %31, i32 %32)
br label %34
34: ; preds = %29, %25
%35 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%36 = load i32, i32* %35
%37 = icmp eq i32 %36, -1
br i1 %37, label %38, label %42
38: ; preds = %34
%39 = load i8*, i8** %7
%40 = load i8*, i8** %9
%41 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i8* %39, i8* %40)
br label %42
42: ; preds = %38, %34
%43 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%44 = load i32, i32* %43
%45 = load i32, i32* %10
%46 = icmp ne i32 %44, %45
br i1 %46, label %47, label %54
47: ; preds = %42
%48 = load i8*, i8** %7
%49 = load i8*, i8** %9
%50 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%51 = load i32, i32* %50
%52 = load i32, i32* %10
%53 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.3, i64 0, i64 0), i8* %48, i8* %49, i32 %51, i32 %52)
br label %54
54: ; preds = %47, %42
%55 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
store i32 128, i32* %55
%56 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 1
store i32 -1, i32* %56
%57 = load i32, i32* %6
%58 = load i32, i32* @IPPROTO_IP
%59 = load i32, i32* %8
%60 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%61 = call i64 @setsockopt(i32 %57, i32 %58, i32 %59, i32* %60, i32 4)
%62 = icmp slt i64 %61, 0
br i1 %62, label %63, label %67
63: ; preds = %54
%64 = load i8*, i8** %7
%65 = load i8*, i8** %9
%66 = call i32 @err(i32 -1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i8* %64, i8* %65)
br label %67
67: ; preds = %63, %54
%68 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
store i32 -1, i32* %68
%69 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 1
store i32 -1, i32* %69
store i32 8, i32* %12
%70 = load i32, i32* %6
%71 = load i32, i32* @IPPROTO_IP
%72 = load i32, i32* %8
%73 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%74 = call i64 @getsockopt(i32 %70, i32 %71, i32 %72, i32* %73, i32* %12)
%75 = icmp slt i64 %74, 0
br i1 %75, label %76, label %80
76: ; preds = %67
%77 = load i8*, i8** %7
%78 = load i8*, i8** %9
%79 = call i32 @err(i32 -1, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0), i8* %77, i8* %78)
br label %80
80: ; preds = %76, %67
%81 = load i32, i32* %12
%82 = sext i32 %81 to i64
%83 = icmp ne i64 %82, 4
br i1 %83, label %84, label %89
84: ; preds = %80
%85 = load i8*, i8** %7
%86 = load i8*, i8** %9
%87 = load i32, i32* %12
%88 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.6, i64 0, i64 0), i8* %85, i8* %86, i32 %87)
br label %89
89: ; preds = %84, %80
%90 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%91 = load i32, i32* %90
%92 = icmp eq i32 %91, -1
br i1 %92, label %93, label %97
93: ; preds = %89
%94 = load i8*, i8** %7
%95 = load i8*, i8** %9
%96 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.7, i64 0, i64 0), i8* %94, i8* %95)
br label %97
97: ; preds = %93, %89
%98 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%99 = load i32, i32* %98
%100 = icmp ne i32 %99, 128
br i1 %100, label %101, label %107
101: ; preds = %97
%102 = load i8*, i8** %7
%103 = load i8*, i8** %9
%104 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%105 = load i32, i32* %104
%106 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.8, i64 0, i64 0), i8* %102, i8* %103, i32 %105)
br label %107
107: ; preds = %101, %97
%108 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
store i32 0, i32* %108
%109 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 1
store i32 0, i32* %109
%110 = load i32, i32* %6
%111 = load i32, i32* @IPPROTO_IP
%112 = load i32, i32* %8
%113 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%114 = call i64 @setsockopt(i32 %110, i32 %111, i32 %112, i32* %113, i32 4)
%115 = icmp slt i64 %114, 0
br i1 %115, label %116, label %120
116: ; preds = %107
%117 = load i8*, i8** %7
%118 = load i8*, i8** %9
%119 = call i32 @err(i32 -1, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.9, i64 0, i64 0), i8* %117, i8* %118)
br label %120
120: ; preds = %116, %107
%121 = load i32, i32* %12
%122 = sext i32 %121 to i64
%123 = icmp ne i64 %122, 4
br i1 %123, label %124, label %129
124: ; preds = %120
%125 = load i8*, i8** %7
%126 = load i8*, i8** %9
%127 = load i32, i32* %12
%128 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.10, i64 0, i64 0), i8* %125, i8* %126, i32 %127)
br label %129
129: ; preds = %124, %120
%130 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%131 = load i32, i32* %130
%132 = icmp eq i32 %131, -1
br i1 %132, label %133, label %137
133: ; preds = %129
%134 = load i8*, i8** %7
%135 = load i8*, i8** %9
%136 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.11, i64 0, i64 0), i8* %134, i8* %135)
br label %137
137: ; preds = %133, %129
%138 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%139 = load i32, i32* %138
%140 = icmp ne i32 %139, 0
br i1 %140, label %141, label %147
141: ; preds = %137
%142 = load i8*, i8** %7
%143 = load i8*, i8** %9
%144 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%145 = load i32, i32* %144
%146 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.12, i64 0, i64 0), i8* %142, i8* %143, i32 %145)
br label %147
147: ; preds = %141, %137
%148 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
store i32 32000, i32* %148
%149 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 1
store i32 -1, i32* %149
%150 = load i32, i32* %6
%151 = load i32, i32* @IPPROTO_IP
%152 = load i32, i32* %8
%153 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%154 = call i64 @setsockopt(i32 %150, i32 %151, i32 %152, i32* %153, i32 4)
%155 = icmp slt i64 %154, 0
br i1 %155, label %156, label %165
156: ; preds = %147
%157 = load i64, i64* @errno
%158 = load i64, i64* @EINVAL
%159 = icmp eq i64 %157, %158
br i1 %159, label %160, label %161
160: ; preds = %156
br label %203
161: ; preds = %156
%162 = load i8*, i8** %7
%163 = load i8*, i8** %9
%164 = call i32 @err(i32 -1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.13, i64 0, i64 0), i8* %162, i8* %163)
br label %165
165: ; preds = %161, %147
%166 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
store i32 -1, i32* %166
%167 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 1
store i32 -1, i32* %167
store i32 8, i32* %12
%168 = load i32, i32* %6
%169 = load i32, i32* @IPPROTO_IP
%170 = load i32, i32* %8
%171 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%172 = call i64 @getsockopt(i32 %168, i32 %169, i32 %170, i32* %171, i32* %12)
%173 = icmp slt i64 %172, 0
br i1 %173, label %174, label %178
174: ; preds = %165
%175 = load i8*, i8** %7
%176 = load i8*, i8** %9
%177 = call i32 @err(i32 -1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.14, i64 0, i64 0), i8* %175, i8* %176)
br label %178
178: ; preds = %174, %165
%179 = load i32, i32* %12
%180 = sext i32 %179 to i64
%181 = icmp ne i64 %180, 4
br i1 %181, label %182, label %187
182: ; preds = %178
%183 = load i8*, i8** %7
%184 = load i8*, i8** %9
%185 = load i32, i32* %12
%186 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.15, i64 0, i64 0), i8* %183, i8* %184, i32 %185)
br label %187
187: ; preds = %182, %178
%188 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%189 = load i32, i32* %188
%190 = icmp eq i32 %189, -1
br i1 %190, label %191, label %195
191: ; preds = %187
%192 = load i8*, i8** %7
%193 = load i8*, i8** %9
%194 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.16, i64 0, i64 0), i8* %192, i8* %193)
br label %195
195: ; preds = %191, %187
%196 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0, i64 0
%197 = load i32, i32* %196
%198 = icmp eq i32 %197, 32000
br i1 %198, label %199, label %203
199: ; preds = %195
%200 = load i8*, i8** %7
%201 = load i8*, i8** %9
%202 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.17, i64 0, i64 0), i8* %200, i8* %201)
br label %203
203: ; preds = %160, %199, %195
ret void
}

LLVM IR (-O2):
@IPPROTO_IP = global i32 0
@.str = [44 x i8] c"test_ip_uchar(%s, %s): initial getsockopt()\00"
@.str.1 = [62 x i8] c"test_ip_uchar(%s, %s): initial getsockopt() returned %d bytes\00"
@.str.2 = [63 x i8] c"test_ip_uchar(%s, %s): initial getsockopt() didn't return data\00"
@.str.3 = [73 x i8] c"test_ip_uchar(%s, %s): initial getsockopt() returned value of %d, not %d\00"
@.str.4 = [39 x i8] c"test_ip_uchar(%s, %s): setsockopt(128)\00"
@.str.5 = [53 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 128\00"
@.str.6 = [71 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 128 returned %d bytes\00"
@.str.7 = [72 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 128 didn't return data\00"
@.str.8 = [65 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 128 returned %d\00"
@.str.9 = [54 x i8] c"test_ip_uchar(%s, %s): setsockopt() to reset from 128\00"
@.str.10 = [75 x i8] c"test_ip_uchar(%s, %s): getsockopt() after reset from 128 returned %d bytes\00"
@.str.11 = [76 x i8] c"test_ip_uchar(%s, %s): getsockopt() after reset from 128 didn't return data\00"
@.str.12 = [69 x i8] c"test_ip_uchar(%s, %s): getsockopt() after reset from 128 returned %d\00"
@errno = global i64 0
@EINVAL = global i64 0
@.str.13 = [41 x i8] c"test_ip_uchar(%s, %s): getsockopt(32000)\00"
@.str.14 = [55 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 32000\00"
@.str.15 = [73 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 32000 returned %d bytes\00"
@.str.16 = [74 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 32000 didn't return data\00"
@.str.17 = [90 x i8] c"test_ip_uchar(%s, %s): getsockopt() after set to 32000 returned 32000: failed to truncate\00"
define void @test_ip_uchar(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca [2 x i32]
%7 = alloca i32
%8 = bitcast [2 x i32]* %6 to i8*
%9 = bitcast i32* %7 to i8*
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 -1, i32* %10
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
store i32 -1, i32* %11
store i32 8, i32* %7
%12 = load i32, i32* @IPPROTO_IP
%13 = call i64 @getsockopt(i32 %0, i32 %12, i32 %2, i32* %10, i32* %7)
%14 = icmp slt i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %5
%16 = call i32 @err(i32 -1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %3)
br label %17
17: ; preds = %15, %5
%18 = load i32, i32* %7
%19 = icmp eq i32 %18, 4
br i1 %19, label %22, label %20
20: ; preds = %17
%21 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %3, i32 %18)
br label %22
22: ; preds = %20, %17
%23 = load i32, i32* %10
%24 = icmp eq i32 %23, -1
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i8* %1, i8* %3)
%27 = load i32, i32* %10
br label %28
28: ; preds = %25, %22
%29 = phi i32 [ %27, %25 ], [ %23, %22 ]
%30 = icmp eq i32 %29, %4
br i1 %30, label %33, label %31
31: ; preds = %28
%32 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.3, i64 0, i64 0), i8* %1, i8* %3, i32 %29, i32 %4)
br label %33
33: ; preds = %31, %28
store i32 128, i32* %10
store i32 -1, i32* %11
%34 = load i32, i32* @IPPROTO_IP
%35 = call i64 @setsockopt(i32 %0, i32 %34, i32 %2, i32* %10, i32 4)
%36 = icmp slt i64 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = call i32 @err(i32 -1, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i8* %1, i8* %3)
br label %39
39: ; preds = %37, %33
store i32 -1, i32* %10
store i32 -1, i32* %11
store i32 8, i32* %7
%40 = load i32, i32* @IPPROTO_IP
%41 = call i64 @getsockopt(i32 %0, i32 %40, i32 %2, i32* %10, i32* %7)
%42 = icmp slt i64 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %39
%44 = call i32 @err(i32 -1, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0), i8* %1, i8* %3)
br label %45
45: ; preds = %43, %39
%46 = load i32, i32* %7
%47 = icmp eq i32 %46, 4
br i1 %47, label %50, label %48
48: ; preds = %45
%49 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.6, i64 0, i64 0), i8* %1, i8* %3, i32 %46)
br label %50
50: ; preds = %48, %45
%51 = load i32, i32* %10
%52 = icmp eq i32 %51, -1
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.7, i64 0, i64 0), i8* %1, i8* %3)
%55 = load i32, i32* %10
br label %56
56: ; preds = %53, %50
%57 = phi i32 [ %55, %53 ], [ %51, %50 ]
%58 = icmp eq i32 %57, 128
br i1 %58, label %61, label %59
59: ; preds = %56
%60 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.8, i64 0, i64 0), i8* %1, i8* %3, i32 %57)
br label %61
61: ; preds = %59, %56
store i32 0, i32* %10
store i32 0, i32* %11
%62 = load i32, i32* @IPPROTO_IP
%63 = call i64 @setsockopt(i32 %0, i32 %62, i32 %2, i32* %10, i32 4)
%64 = icmp slt i64 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %61
%66 = call i32 @err(i32 -1, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.9, i64 0, i64 0), i8* %1, i8* %3)
br label %67
67: ; preds = %65, %61
%68 = load i32, i32* %7
%69 = icmp eq i32 %68, 4
br i1 %69, label %72, label %70
70: ; preds = %67
%71 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.10, i64 0, i64 0), i8* %1, i8* %3, i32 %68)
br label %72
72: ; preds = %70, %67
%73 = load i32, i32* %10
%74 = icmp eq i32 %73, -1
br i1 %74, label %75, label %78
75: ; preds = %72
%76 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.11, i64 0, i64 0), i8* %1, i8* %3)
%77 = load i32, i32* %10
br label %78
78: ; preds = %75, %72
%79 = phi i32 [ %77, %75 ], [ %73, %72 ]
%80 = icmp eq i32 %79, 0
br i1 %80, label %83, label %81
81: ; preds = %78
%82 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.12, i64 0, i64 0), i8* %1, i8* %3, i32 %79)
br label %83
83: ; preds = %81, %78
store i32 32000, i32* %10
store i32 -1, i32* %11
%84 = load i32, i32* @IPPROTO_IP
%85 = call i64 @setsockopt(i32 %0, i32 %84, i32 %2, i32* %10, i32 4)
%86 = icmp slt i64 %85, 0
br i1 %86, label %87, label %93
87: ; preds = %83
%88 = load i64, i64* @errno
%89 = load i64, i64* @EINVAL
%90 = icmp eq i64 %88, %89
br i1 %90, label %115, label %91
91: ; preds = %87
%92 = call i32 @err(i32 -1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.13, i64 0, i64 0), i8* %1, i8* %3)
br label %93
93: ; preds = %91, %83
store i32 -1, i32* %10
store i32 -1, i32* %11
store i32 8, i32* %7
%94 = load i32, i32* @IPPROTO_IP
%95 = call i64 @getsockopt(i32 %0, i32 %94, i32 %2, i32* %10, i32* %7)
%96 = icmp slt i64 %95, 0
br i1 %96, label %97, label %99
97: ; preds = %93
%98 = call i32 @err(i32 -1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.14, i64 0, i64 0), i8* %1, i8* %3)
br label %99
99: ; preds = %97, %93
%100 = load i32, i32* %7
%101 = icmp eq i32 %100, 4
br i1 %101, label %104, label %102
102: ; preds = %99
%103 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.15, i64 0, i64 0), i8* %1, i8* %3, i32 %100)
br label %104
104: ; preds = %102, %99
%105 = load i32, i32* %10
%106 = icmp eq i32 %105, -1
br i1 %106, label %107, label %110
107: ; preds = %104
%108 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.16, i64 0, i64 0), i8* %1, i8* %3)
%109 = load i32, i32* %10
br label %110
110: ; preds = %107, %104
%111 = phi i32 [ %109, %107 ], [ %105, %104 ]
%112 = icmp eq i32 %111, 32000
br i1 %112, label %113, label %115
113: ; preds = %110
%114 = call i32 (i32, i8*, i8*, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.17, i64 0, i64 0), i8* %1, i8* %3)
br label %115
115: ; preds = %110, %113, %87
ret void
}