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

/* Variables and functions */
int /*<<< orphan*/ PF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ SO_ACCEPTCONN;
int /*<<< orphan*/ SO_ATTACH_FILTER;
int /*<<< orphan*/ SO_BINDTODEVICE;
int /*<<< orphan*/ SO_BROADCAST;
int /*<<< orphan*/ SO_BSDCOMPAT;
int /*<<< orphan*/ SO_DEBUG;
int /*<<< orphan*/ SO_DETACH_FILTER;
int /*<<< orphan*/ SO_DONTROUTE;
int /*<<< orphan*/ SO_ERROR;
int /*<<< orphan*/ SO_KEEPALIVE;
int /*<<< orphan*/ SO_LINGER;
int /*<<< orphan*/ SO_NO_CHECK;
int /*<<< orphan*/ SO_OOBINLINE;
int /*<<< orphan*/ SO_PASSCRED;
int /*<<< orphan*/ SO_PEERCRED;
int /*<<< orphan*/ SO_PEERNAME;
int /*<<< orphan*/ SO_PRIORITY;
int /*<<< orphan*/ SO_RCVBUF;
int /*<<< orphan*/ SO_RCVLOWAT;
int /*<<< orphan*/ SO_RCVTIMEO;
int /*<<< orphan*/ SO_REUSEADDR;
int /*<<< orphan*/ SO_SECURITY_AUTHENTICATION;
int /*<<< orphan*/ SO_SECURITY_ENCRYPTION_NETWORK;
int /*<<< orphan*/ SO_SECURITY_ENCRYPTION_TRANSPORT;
int /*<<< orphan*/ SO_SNDBUF;
int /*<<< orphan*/ SO_SNDLOWAT;
int /*<<< orphan*/ SO_SNDTIMEO;
int /*<<< orphan*/ SO_TIMESTAMP;
int /*<<< orphan*/ SO_TYPE;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ doit_int(int, int /*<<< orphan*/, char *);
int /*<<< orphan*/ doit_timeval(int, int /*<<< orphan*/, char *);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char **argv) {
  int sd;
  if ((sd = socket(PF_INET, SOCK_STREAM, 0)) < 0) {
    perror("Couldn't open socket");
    exit(errno);
  };
  doit_int(sd, SO_DEBUG, "SO_DEBUG");
  doit_int(sd, SO_REUSEADDR, "SO_REUSEADDR");
  doit_int(sd, SO_TYPE, "SO_TYPE");
  doit_int(sd, SO_ERROR, "SO_ERROR");
  doit_int(sd, SO_DONTROUTE, "SO_DONTROUTE");
  doit_int(sd, SO_BROADCAST, "SO_BROADCAST");
  doit_int(sd, SO_SNDBUF, "SO_SNDBUF");
  doit_int(sd, SO_RCVBUF, "SO_RCVBUF");
  doit_int(sd, SO_KEEPALIVE, "SO_KEEPALIVE");
  doit_int(sd, SO_OOBINLINE, "SO_OOBINLINE");
  doit_int(sd, SO_NO_CHECK, "SO_NO_CHECK");
  doit_int(sd, SO_PRIORITY, "SO_PRIORITY");
  doit_int(sd, SO_LINGER, "SO_LINGER");
  doit_int(sd, SO_BSDCOMPAT, "SO_BSDCOMPAT");
  doit_int(sd, SO_PASSCRED, "SO_PASSCRED");
  doit_int(sd, SO_PEERCRED, "SO_PEERCRED");
  doit_int(sd, SO_RCVLOWAT, "SO_RCVLOWAT");
  doit_int(sd, SO_SNDLOWAT, "SO_SNDLOWAT");
  doit_timeval(sd, SO_RCVTIMEO, "SO_RCVTIMEO");
  doit_timeval(sd, SO_SNDTIMEO, "SO_SNDTIMEO");
  doit_int(sd, SO_SECURITY_AUTHENTICATION, "SO_SECURITY_AUTHENTICATION");
  doit_int(sd, SO_SECURITY_ENCRYPTION_TRANSPORT,
           "SO_SECURITY_ENCRYPTION_TRANSPORT");
  doit_int(sd, SO_SECURITY_ENCRYPTION_NETWORK,
           "SO_SECURITY_ENCRYPTION_NETWORK");
  doit_int(sd, SO_BINDTODEVICE, "SO_BINDTODEVICE");
  doit_int(sd, SO_ATTACH_FILTER, "SO_ATTACH_FILTER");
  doit_int(sd, SO_DETACH_FILTER, "SO_DETACH_FILTER");
  doit_int(sd, SO_PEERNAME, "SO_PEERNAME");
  doit_int(sd, SO_TIMESTAMP, "SO_TIMESTAMP");
  doit_int(sd, SO_ACCEPTCONN, "SO_ACCEPTCONN");
  close(sd);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2d9b(%rip),%rax
mov    (%rax),%edi
mov    0x2db2(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1080 <socket@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    11b5 <main+0x55>
lea    0xe5e(%rip),%rdi
call   1060 <perror@plt>
mov    0x2d82(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
mov    -0x14(%rbp),%edi
mov    0x2da1(%rip),%rax
mov    (%rax),%esi
lea    0xe4d(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2d29(%rip),%rax
mov    (%rax),%esi
lea    0xe3e(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2d89(%rip),%rax
mov    (%rax),%esi
lea    0xe33(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2d21(%rip),%rax
mov    (%rax),%esi
lea    0xe23(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2cc1(%rip),%rax
mov    (%rax),%esi
lea    0xe14(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2d39(%rip),%rax
mov    (%rax),%esi
lea    0xe09(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2d51(%rip),%rax
mov    (%rax),%esi
lea    0xdfe(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2ce9(%rip),%rax
mov    (%rax),%esi
lea    0xdf0(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2c69(%rip),%rax
mov    (%rax),%esi
lea    0xde2(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2c89(%rip),%rax
mov    (%rax),%esi
lea    0xdd7(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2d21(%rip),%rax
mov    (%rax),%esi
lea    0xdcc(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2d29(%rip),%rax
mov    (%rax),%esi
lea    0xdc0(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2cb1(%rip),%rax
mov    (%rax),%esi
lea    0xdb4(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2c49(%rip),%rax
mov    (%rax),%esi
lea    0xda6(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2c59(%rip),%rax
mov    (%rax),%esi
lea    0xd9b(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2c81(%rip),%rax
mov    (%rax),%esi
lea    0xd8f(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2bc9(%rip),%rax
mov    (%rax),%esi
lea    0xd83(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2c81(%rip),%rax
mov    (%rax),%esi
lea    0xd77(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2bd9(%rip),%rax
mov    (%rax),%esi
lea    0xd6b(%rip),%rdx
call   1030 <doit_timeval@plt>
mov    -0x14(%rbp),%edi
mov    0x2c59(%rip),%rax
mov    (%rax),%esi
lea    0xd5f(%rip),%rdx
call   1030 <doit_timeval@plt>
mov    -0x14(%rbp),%edi
mov    0x2bf9(%rip),%rax
mov    (%rax),%esi
lea    0xd53(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2bc9(%rip),%rax
mov    (%rax),%esi
lea    0xd56(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2b41(%rip),%rax
mov    (%rax),%esi
lea    0xd5f(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2b11(%rip),%rax
mov    (%rax),%esi
lea    0xd66(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2bb9(%rip),%rax
mov    (%rax),%esi
lea    0xd5e(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2b71(%rip),%rax
mov    (%rax),%esi
lea    0xd57(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2b99(%rip),%rax
mov    (%rax),%esi
lea    0xd50(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2b69(%rip),%rax
mov    (%rax),%esi
lea    0xd44(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
mov    0x2b89(%rip),%rax
mov    (%rax),%esi
lea    0xd39(%rip),%rdx
call   1050 <doit_int@plt>
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2db0(%rip),%rax
mov    (%rax),%edi
mov    0x2dc7(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1080 <socket@plt>
test   %eax,%eax
jns    1198 <main+0x38>
lea    0xe7b(%rip),%rdi
call   1060 <perror@plt>
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
mov    %eax,%ebx
mov    0x2dbf(%rip),%rax
mov    (%rax),%esi
lea    0xe6b(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2d48(%rip),%rax
mov    (%rax),%esi
lea    0xe5d(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2da9(%rip),%rax
mov    (%rax),%esi
lea    0xe53(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2d42(%rip),%rax
mov    (%rax),%esi
lea    0xe44(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2ce3(%rip),%rax
mov    (%rax),%esi
lea    0xe36(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2d5c(%rip),%rax
mov    (%rax),%esi
lea    0xe2c(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2d75(%rip),%rax
mov    (%rax),%esi
lea    0xe22(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2d0e(%rip),%rax
mov    (%rax),%esi
lea    0xe15(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2c8f(%rip),%rax
mov    (%rax),%esi
lea    0xe08(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2cb0(%rip),%rax
mov    (%rax),%esi
lea    0xdfe(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2d49(%rip),%rax
mov    (%rax),%esi
lea    0xdf4(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2d52(%rip),%rax
mov    (%rax),%esi
lea    0xde9(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2cdb(%rip),%rax
mov    (%rax),%esi
lea    0xdde(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2c74(%rip),%rax
mov    (%rax),%esi
lea    0xdd1(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2c85(%rip),%rax
mov    (%rax),%esi
lea    0xdc7(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2cae(%rip),%rax
mov    (%rax),%esi
lea    0xdbc(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2bf7(%rip),%rax
mov    (%rax),%esi
lea    0xdb1(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2cb0(%rip),%rax
mov    (%rax),%esi
lea    0xda6(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2c09(%rip),%rax
mov    (%rax),%esi
lea    0xd9b(%rip),%rdx
mov    %ebx,%edi
call   1030 <doit_timeval@plt>
mov    0x2c8a(%rip),%rax
mov    (%rax),%esi
lea    0xd90(%rip),%rdx
mov    %ebx,%edi
call   1030 <doit_timeval@plt>
mov    0x2c2b(%rip),%rax
mov    (%rax),%esi
lea    0xd85(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2bfc(%rip),%rax
mov    (%rax),%esi
lea    0xd89(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2b75(%rip),%rax
mov    (%rax),%esi
lea    0xd93(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2b46(%rip),%rax
mov    (%rax),%esi
lea    0xd9b(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2bef(%rip),%rax
mov    (%rax),%esi
lea    0xd94(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2ba8(%rip),%rax
mov    (%rax),%esi
lea    0xd8e(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2bd1(%rip),%rax
mov    (%rax),%esi
lea    0xd88(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2ba2(%rip),%rax
mov    (%rax),%esi
lea    0xd7d(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    0x2bc3(%rip),%rax
mov    (%rax),%esi
lea    0xd73(%rip),%rdx
mov    %ebx,%edi
call   1050 <doit_int@plt>
mov    %ebx,%edi
call   1040 <close@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@PF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [21 x i8] c"Couldn't open socket\00"
@errno = global i32 0
@SO_DEBUG = global i32 0
@.str.1 = [9 x i8] c"SO_DEBUG\00"
@SO_REUSEADDR = global i32 0
@.str.2 = [13 x i8] c"SO_REUSEADDR\00"
@SO_TYPE = global i32 0
@.str.3 = [8 x i8] c"SO_TYPE\00"
@SO_ERROR = global i32 0
@.str.4 = [9 x i8] c"SO_ERROR\00"
@SO_DONTROUTE = global i32 0
@.str.5 = [13 x i8] c"SO_DONTROUTE\00"
@SO_BROADCAST = global i32 0
@.str.6 = [13 x i8] c"SO_BROADCAST\00"
@SO_SNDBUF = global i32 0
@.str.7 = [10 x i8] c"SO_SNDBUF\00"
@SO_RCVBUF = global i32 0
@.str.8 = [10 x i8] c"SO_RCVBUF\00"
@SO_KEEPALIVE = global i32 0
@.str.9 = [13 x i8] c"SO_KEEPALIVE\00"
@SO_OOBINLINE = global i32 0
@.str.10 = [13 x i8] c"SO_OOBINLINE\00"
@SO_NO_CHECK = global i32 0
@.str.11 = [12 x i8] c"SO_NO_CHECK\00"
@SO_PRIORITY = global i32 0
@.str.12 = [12 x i8] c"SO_PRIORITY\00"
@SO_LINGER = global i32 0
@.str.13 = [10 x i8] c"SO_LINGER\00"
@SO_BSDCOMPAT = global i32 0
@.str.14 = [13 x i8] c"SO_BSDCOMPAT\00"
@SO_PASSCRED = global i32 0
@.str.15 = [12 x i8] c"SO_PASSCRED\00"
@SO_PEERCRED = global i32 0
@.str.16 = [12 x i8] c"SO_PEERCRED\00"
@SO_RCVLOWAT = global i32 0
@.str.17 = [12 x i8] c"SO_RCVLOWAT\00"
@SO_SNDLOWAT = global i32 0
@.str.18 = [12 x i8] c"SO_SNDLOWAT\00"
@SO_RCVTIMEO = global i32 0
@.str.19 = [12 x i8] c"SO_RCVTIMEO\00"
@SO_SNDTIMEO = global i32 0
@.str.20 = [12 x i8] c"SO_SNDTIMEO\00"
@SO_SECURITY_AUTHENTICATION = global i32 0
@.str.21 = [27 x i8] c"SO_SECURITY_AUTHENTICATION\00"
@SO_SECURITY_ENCRYPTION_TRANSPORT = global i32 0
@.str.22 = [33 x i8] c"SO_SECURITY_ENCRYPTION_TRANSPORT\00"
@SO_SECURITY_ENCRYPTION_NETWORK = global i32 0
@.str.23 = [31 x i8] c"SO_SECURITY_ENCRYPTION_NETWORK\00"
@SO_BINDTODEVICE = global i32 0
@.str.24 = [16 x i8] c"SO_BINDTODEVICE\00"
@SO_ATTACH_FILTER = global i32 0
@.str.25 = [17 x i8] c"SO_ATTACH_FILTER\00"
@SO_DETACH_FILTER = global i32 0
@.str.26 = [17 x i8] c"SO_DETACH_FILTER\00"
@SO_PEERNAME = global i32 0
@.str.27 = [12 x i8] c"SO_PEERNAME\00"
@SO_TIMESTAMP = global i32 0
@.str.28 = [13 x i8] c"SO_TIMESTAMP\00"
@SO_ACCEPTCONN = global i32 0
@.str.29 = [14 x i8] c"SO_ACCEPTCONN\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @PF_INET
%8 = load i32, i32* @SOCK_STREAM
%9 = call i32 @socket(i32 %7, i32 %8, i32 0)
store i32 %9, i32* %6
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @errno
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %2
%16 = load i32, i32* %6
%17 = load i32, i32* @SO_DEBUG
%18 = call i32 @doit_int(i32 %16, i32 %17, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%19 = load i32, i32* %6
%20 = load i32, i32* @SO_REUSEADDR
%21 = call i32 @doit_int(i32 %19, i32 %20, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%22 = load i32, i32* %6
%23 = load i32, i32* @SO_TYPE
%24 = call i32 @doit_int(i32 %22, i32 %23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%25 = load i32, i32* %6
%26 = load i32, i32* @SO_ERROR
%27 = call i32 @doit_int(i32 %25, i32 %26, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%28 = load i32, i32* %6
%29 = load i32, i32* @SO_DONTROUTE
%30 = call i32 @doit_int(i32 %28, i32 %29, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%31 = load i32, i32* %6
%32 = load i32, i32* @SO_BROADCAST
%33 = call i32 @doit_int(i32 %31, i32 %32, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%34 = load i32, i32* %6
%35 = load i32, i32* @SO_SNDBUF
%36 = call i32 @doit_int(i32 %34, i32 %35, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%37 = load i32, i32* %6
%38 = load i32, i32* @SO_RCVBUF
%39 = call i32 @doit_int(i32 %37, i32 %38, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%40 = load i32, i32* %6
%41 = load i32, i32* @SO_KEEPALIVE
%42 = call i32 @doit_int(i32 %40, i32 %41, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%43 = load i32, i32* %6
%44 = load i32, i32* @SO_OOBINLINE
%45 = call i32 @doit_int(i32 %43, i32 %44, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%46 = load i32, i32* %6
%47 = load i32, i32* @SO_NO_CHECK
%48 = call i32 @doit_int(i32 %46, i32 %47, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%49 = load i32, i32* %6
%50 = load i32, i32* @SO_PRIORITY
%51 = call i32 @doit_int(i32 %49, i32 %50, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0))
%52 = load i32, i32* %6
%53 = load i32, i32* @SO_LINGER
%54 = call i32 @doit_int(i32 %52, i32 %53, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
%55 = load i32, i32* %6
%56 = load i32, i32* @SO_BSDCOMPAT
%57 = call i32 @doit_int(i32 %55, i32 %56, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%58 = load i32, i32* %6
%59 = load i32, i32* @SO_PASSCRED
%60 = call i32 @doit_int(i32 %58, i32 %59, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
%61 = load i32, i32* %6
%62 = load i32, i32* @SO_PEERCRED
%63 = call i32 @doit_int(i32 %61, i32 %62, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0))
%64 = load i32, i32* %6
%65 = load i32, i32* @SO_RCVLOWAT
%66 = call i32 @doit_int(i32 %64, i32 %65, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0))
%67 = load i32, i32* %6
%68 = load i32, i32* @SO_SNDLOWAT
%69 = call i32 @doit_int(i32 %67, i32 %68, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0))
%70 = load i32, i32* %6
%71 = load i32, i32* @SO_RCVTIMEO
%72 = call i32 @doit_timeval(i32 %70, i32 %71, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0))
%73 = load i32, i32* %6
%74 = load i32, i32* @SO_SNDTIMEO
%75 = call i32 @doit_timeval(i32 %73, i32 %74, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0))
%76 = load i32, i32* %6
%77 = load i32, i32* @SO_SECURITY_AUTHENTICATION
%78 = call i32 @doit_int(i32 %76, i32 %77, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.21, i64 0, i64 0))
%79 = load i32, i32* %6
%80 = load i32, i32* @SO_SECURITY_ENCRYPTION_TRANSPORT
%81 = call i32 @doit_int(i32 %79, i32 %80, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.22, i64 0, i64 0))
%82 = load i32, i32* %6
%83 = load i32, i32* @SO_SECURITY_ENCRYPTION_NETWORK
%84 = call i32 @doit_int(i32 %82, i32 %83, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.23, i64 0, i64 0))
%85 = load i32, i32* %6
%86 = load i32, i32* @SO_BINDTODEVICE
%87 = call i32 @doit_int(i32 %85, i32 %86, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.24, i64 0, i64 0))
%88 = load i32, i32* %6
%89 = load i32, i32* @SO_ATTACH_FILTER
%90 = call i32 @doit_int(i32 %88, i32 %89, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.25, i64 0, i64 0))
%91 = load i32, i32* %6
%92 = load i32, i32* @SO_DETACH_FILTER
%93 = call i32 @doit_int(i32 %91, i32 %92, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.26, i64 0, i64 0))
%94 = load i32, i32* %6
%95 = load i32, i32* @SO_PEERNAME
%96 = call i32 @doit_int(i32 %94, i32 %95, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.27, i64 0, i64 0))
%97 = load i32, i32* %6
%98 = load i32, i32* @SO_TIMESTAMP
%99 = call i32 @doit_int(i32 %97, i32 %98, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.28, i64 0, i64 0))
%100 = load i32, i32* %6
%101 = load i32, i32* @SO_ACCEPTCONN
%102 = call i32 @doit_int(i32 %100, i32 %101, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.29, i64 0, i64 0))
%103 = load i32, i32* %6
%104 = call i32 @close(i32 %103)
%105 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@PF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [21 x i8] c"Couldn't open socket\00"
@errno = global i32 0
@SO_DEBUG = global i32 0
@.str.1 = [9 x i8] c"SO_DEBUG\00"
@SO_REUSEADDR = global i32 0
@.str.2 = [13 x i8] c"SO_REUSEADDR\00"
@SO_TYPE = global i32 0
@.str.3 = [8 x i8] c"SO_TYPE\00"
@SO_ERROR = global i32 0
@.str.4 = [9 x i8] c"SO_ERROR\00"
@SO_DONTROUTE = global i32 0
@.str.5 = [13 x i8] c"SO_DONTROUTE\00"
@SO_BROADCAST = global i32 0
@.str.6 = [13 x i8] c"SO_BROADCAST\00"
@SO_SNDBUF = global i32 0
@.str.7 = [10 x i8] c"SO_SNDBUF\00"
@SO_RCVBUF = global i32 0
@.str.8 = [10 x i8] c"SO_RCVBUF\00"
@SO_KEEPALIVE = global i32 0
@.str.9 = [13 x i8] c"SO_KEEPALIVE\00"
@SO_OOBINLINE = global i32 0
@.str.10 = [13 x i8] c"SO_OOBINLINE\00"
@SO_NO_CHECK = global i32 0
@.str.11 = [12 x i8] c"SO_NO_CHECK\00"
@SO_PRIORITY = global i32 0
@.str.12 = [12 x i8] c"SO_PRIORITY\00"
@SO_LINGER = global i32 0
@.str.13 = [10 x i8] c"SO_LINGER\00"
@SO_BSDCOMPAT = global i32 0
@.str.14 = [13 x i8] c"SO_BSDCOMPAT\00"
@SO_PASSCRED = global i32 0
@.str.15 = [12 x i8] c"SO_PASSCRED\00"
@SO_PEERCRED = global i32 0
@.str.16 = [12 x i8] c"SO_PEERCRED\00"
@SO_RCVLOWAT = global i32 0
@.str.17 = [12 x i8] c"SO_RCVLOWAT\00"
@SO_SNDLOWAT = global i32 0
@.str.18 = [12 x i8] c"SO_SNDLOWAT\00"
@SO_RCVTIMEO = global i32 0
@.str.19 = [12 x i8] c"SO_RCVTIMEO\00"
@SO_SNDTIMEO = global i32 0
@.str.20 = [12 x i8] c"SO_SNDTIMEO\00"
@SO_SECURITY_AUTHENTICATION = global i32 0
@.str.21 = [27 x i8] c"SO_SECURITY_AUTHENTICATION\00"
@SO_SECURITY_ENCRYPTION_TRANSPORT = global i32 0
@.str.22 = [33 x i8] c"SO_SECURITY_ENCRYPTION_TRANSPORT\00"
@SO_SECURITY_ENCRYPTION_NETWORK = global i32 0
@.str.23 = [31 x i8] c"SO_SECURITY_ENCRYPTION_NETWORK\00"
@SO_BINDTODEVICE = global i32 0
@.str.24 = [16 x i8] c"SO_BINDTODEVICE\00"
@SO_ATTACH_FILTER = global i32 0
@.str.25 = [17 x i8] c"SO_ATTACH_FILTER\00"
@SO_DETACH_FILTER = global i32 0
@.str.26 = [17 x i8] c"SO_DETACH_FILTER\00"
@SO_PEERNAME = global i32 0
@.str.27 = [12 x i8] c"SO_PEERNAME\00"
@SO_TIMESTAMP = global i32 0
@.str.28 = [13 x i8] c"SO_TIMESTAMP\00"
@SO_ACCEPTCONN = global i32 0
@.str.29 = [14 x i8] c"SO_ACCEPTCONN\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @PF_INET
%4 = load i32, i32* @SOCK_STREAM
%5 = tail call i32 @socket(i32 %3, i32 %4, i32 0)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = tail call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @errno
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %2
%12 = load i32, i32* @SO_DEBUG
%13 = tail call i32 @doit_int(i32 %5, i32 %12, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%14 = load i32, i32* @SO_REUSEADDR
%15 = tail call i32 @doit_int(i32 %5, i32 %14, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32, i32* @SO_TYPE
%17 = tail call i32 @doit_int(i32 %5, i32 %16, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%18 = load i32, i32* @SO_ERROR
%19 = tail call i32 @doit_int(i32 %5, i32 %18, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%20 = load i32, i32* @SO_DONTROUTE
%21 = tail call i32 @doit_int(i32 %5, i32 %20, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%22 = load i32, i32* @SO_BROADCAST
%23 = tail call i32 @doit_int(i32 %5, i32 %22, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%24 = load i32, i32* @SO_SNDBUF
%25 = tail call i32 @doit_int(i32 %5, i32 %24, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%26 = load i32, i32* @SO_RCVBUF
%27 = tail call i32 @doit_int(i32 %5, i32 %26, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%28 = load i32, i32* @SO_KEEPALIVE
%29 = tail call i32 @doit_int(i32 %5, i32 %28, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%30 = load i32, i32* @SO_OOBINLINE
%31 = tail call i32 @doit_int(i32 %5, i32 %30, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%32 = load i32, i32* @SO_NO_CHECK
%33 = tail call i32 @doit_int(i32 %5, i32 %32, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%34 = load i32, i32* @SO_PRIORITY
%35 = tail call i32 @doit_int(i32 %5, i32 %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0))
%36 = load i32, i32* @SO_LINGER
%37 = tail call i32 @doit_int(i32 %5, i32 %36, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
%38 = load i32, i32* @SO_BSDCOMPAT
%39 = tail call i32 @doit_int(i32 %5, i32 %38, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%40 = load i32, i32* @SO_PASSCRED
%41 = tail call i32 @doit_int(i32 %5, i32 %40, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0))
%42 = load i32, i32* @SO_PEERCRED
%43 = tail call i32 @doit_int(i32 %5, i32 %42, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0))
%44 = load i32, i32* @SO_RCVLOWAT
%45 = tail call i32 @doit_int(i32 %5, i32 %44, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0))
%46 = load i32, i32* @SO_SNDLOWAT
%47 = tail call i32 @doit_int(i32 %5, i32 %46, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0))
%48 = load i32, i32* @SO_RCVTIMEO
%49 = tail call i32 @doit_timeval(i32 %5, i32 %48, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0))
%50 = load i32, i32* @SO_SNDTIMEO
%51 = tail call i32 @doit_timeval(i32 %5, i32 %50, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0))
%52 = load i32, i32* @SO_SECURITY_AUTHENTICATION
%53 = tail call i32 @doit_int(i32 %5, i32 %52, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.21, i64 0, i64 0))
%54 = load i32, i32* @SO_SECURITY_ENCRYPTION_TRANSPORT
%55 = tail call i32 @doit_int(i32 %5, i32 %54, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.22, i64 0, i64 0))
%56 = load i32, i32* @SO_SECURITY_ENCRYPTION_NETWORK
%57 = tail call i32 @doit_int(i32 %5, i32 %56, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.23, i64 0, i64 0))
%58 = load i32, i32* @SO_BINDTODEVICE
%59 = tail call i32 @doit_int(i32 %5, i32 %58, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.24, i64 0, i64 0))
%60 = load i32, i32* @SO_ATTACH_FILTER
%61 = tail call i32 @doit_int(i32 %5, i32 %60, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.25, i64 0, i64 0))
%62 = load i32, i32* @SO_DETACH_FILTER
%63 = tail call i32 @doit_int(i32 %5, i32 %62, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.26, i64 0, i64 0))
%64 = load i32, i32* @SO_PEERNAME
%65 = tail call i32 @doit_int(i32 %5, i32 %64, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.27, i64 0, i64 0))
%66 = load i32, i32* @SO_TIMESTAMP
%67 = tail call i32 @doit_int(i32 %5, i32 %66, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.28, i64 0, i64 0))
%68 = load i32, i32* @SO_ACCEPTCONN
%69 = tail call i32 @doit_int(i32 %5, i32 %68, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.29, i64 0, i64 0))
%70 = tail call i32 @close(i32 %5)
%71 = tail call i32 @exit(i32 0)
unreachable
}