#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_7__ TYPE_3__;
typedef struct TYPE_6__ TYPE_2__;
typedef struct TYPE_5__ TYPE_1__;

/* Type definitions */
struct TYPE_6__ {
  int /*<<< orphan*/ state;
};
struct TYPE_5__ {
  int /*<<< orphan*/ property;
};
struct TYPE_7__ {
  TYPE_2__ xproperty;
  int /*<<< orphan*/ type;
  TYPE_1__ xselection;
};
typedef TYPE_3__ XEvent;
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ Display;
typedef scalar_t__ Atom;

/* Variables and functions */
int /*<<< orphan*/ AnyPropertyType;
int /*<<< orphan*/ CurrentTime;
int /*<<< orphan*/ False;
int /*<<< orphan*/ None;
int /*<<< orphan*/ PropertyNewValue;
int /*<<< orphan*/ PropertyNotify;
int /*<<< orphan*/ SelectionNotify;
int /*<<< orphan*/ XConvertSelection(int /*<<< orphan*/ *, scalar_t__,
                                     scalar_t__, scalar_t__, int /*<<< orphan*/,
                                     int /*<<< orphan*/);
int /*<<< orphan*/ XDeleteProperty(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   scalar_t__);
int /*<<< orphan*/ XFlush(int /*<<< orphan*/ *);
int /*<<< orphan*/ XFree(unsigned char *);
int /*<<< orphan*/ XGetWindowProperty(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                      scalar_t__, int /*<<< orphan*/, long,
                                      int /*<<< orphan*/, int /*<<< orphan*/,
                                      scalar_t__ *, int *, unsigned long *,
                                      unsigned long *, unsigned char **);
scalar_t__ XInternAtom(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ free(unsigned char *);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, unsigned long);
scalar_t__ xcmalloc(unsigned long);
scalar_t__ xcrealloc(unsigned char *, unsigned long);
int xcout(Display *dpy, Window win, XEvent evt, Atom sel, Atom target,
          unsigned char **txt, unsigned long *len, unsigned int *context) {
  static Atom pty;
  static Atom inc;
  Atom pty_type;
  Atom atomUTF8String;
  int pty_format;
  unsigned char *buffer;
  unsigned long pty_size, pty_items;
  unsigned char *ltxt = *txt;
  if (!pty) {
    pty = XInternAtom(dpy, "XCLIP_OUT", False);
  }
  if (!inc) {
    inc = XInternAtom(dpy, "INCR", False);
  }
  switch (*context) {
  case 0:
    if (*len > 0) {
      free(*txt);
      *len = 0;
    }
    XConvertSelection(dpy, sel, target, pty, win, CurrentTime);
    *context = 1;
    return (0);
  case 1:
    atomUTF8String = XInternAtom(dpy, "UTF8_STRING", False);
    if (evt.type != SelectionNotify)
      return (0);
    if (target == atomUTF8String && evt.xselection.property == None) {
      *context = 3;
      return (0);
    }
    XGetWindowProperty(dpy, win, pty, 0, 0, False, AnyPropertyType, &pty_type,
                       &pty_format, &pty_items, &pty_size, &buffer);
    XFree(buffer);
    if (pty_type == inc) {
      XDeleteProperty(dpy, win, pty);
      XFlush(dpy);
      *context = 2;
      return (0);
    }
    if (pty_format != 8) {
      *context = 0;
      return (0);
    }
    XGetWindowProperty(dpy, win, pty, 0, (long)pty_size, False, AnyPropertyType,
                       &pty_type, &pty_format, &pty_items, &pty_size, &buffer);
    XDeleteProperty(dpy, win, pty);
    ltxt = (unsigned char *)xcmalloc(pty_items);
    memcpy(ltxt, buffer, pty_items);
    *len = pty_items;
    *txt = ltxt;
    XFree(buffer);
    *context = 0;
    return (1);
  case 2:
    if (evt.type != PropertyNotify)
      return (0);
    if (evt.xproperty.state != PropertyNewValue)
      return (0);
    XGetWindowProperty(dpy, win, pty, 0, 0, False, AnyPropertyType, &pty_type,
                       &pty_format, &pty_items, &pty_size,
                       (unsigned char **)&buffer);
    if (pty_format != 8) {
      XFree(buffer);
      XDeleteProperty(dpy, win, pty);
      return (0);
    }
    if (pty_size == 0) {
      XFree(buffer);
      XDeleteProperty(dpy, win, pty);
      *context = 0;
      return (1);
    }
    XFree(buffer);
    XGetWindowProperty(dpy, win, pty, 0, (long)pty_size, False, AnyPropertyType,
                       &pty_type, &pty_format, &pty_items, &pty_size,
                       (unsigned char **)&buffer);
    if (*len == 0) {
      *len = pty_items;
      ltxt = (unsigned char *)xcmalloc(*len);
    } else {
      *len += pty_items;
      ltxt = (unsigned char *)xcrealloc(ltxt, *len);
    }
    memcpy(&ltxt[*len - pty_items], buffer, pty_items);
    *txt = ltxt;
    XFree(buffer);
    XDeleteProperty(dpy, win, pty);
    XFlush(dpy);
    return (0);
  }
  return (0);
}


x86 assembly (clang, -O0):
<xcout>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0xb8,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdx,-0x38(%rbp)
mov    %ecx,-0x30(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    %rdi,-0x40(%rbp)
mov    %esi,-0x44(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
mov    0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x90(%rbp)
cmpq   $0x0,0x2e82(%rip)
jne    121c <xcout+0x7c>
mov    -0x40(%rbp),%rdi
mov    0x2dc9(%rip),%rax
mov    (%rax),%edx
lea    0xdf0(%rip),%rsi
call   1080 <XInternAtom@plt>
mov    %rax,0x2e5c(%rip)
cmpq   $0x0,0x2e5c(%rip)
jne    124a <xcout+0xaa>
mov    -0x40(%rbp),%rdi
mov    0x2d9b(%rip),%rax
mov    (%rax),%edx
lea    0xdcc(%rip),%rsi
call   1080 <XInternAtom@plt>
mov    %rax,0x2e36(%rip)
mov    0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x94(%rbp)
test   %eax,%eax
je     128b <xcout+0xeb>
jmp    1263 <xcout+0xc3>
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
je     12ec <xcout+0x14c>
jmp    1277 <xcout+0xd7>
mov    -0x94(%rbp),%eax
sub    $0x2,%eax
je     1504 <xcout+0x364>
jmp    1741 <xcout+0x5a1>
mov    0x18(%rbp),%rax
cmpq   $0x0,(%rax)
jbe    12b0 <xcout+0x110>
mov    0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    0x18(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x40(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    0x2db5(%rip),%rcx
mov    -0x44(%rbp),%r8d
mov    0x2d0a(%rip),%rax
mov    (%rax),%r9d
call   10c0 <XConvertSelection@plt>
mov    0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x1c(%rbp)
jmp    1748 <xcout+0x5a8>
mov    -0x40(%rbp),%rdi
mov    0x2cd9(%rip),%rax
mov    (%rax),%edx
lea    0xd0f(%rip),%rsi
call   1080 <XInternAtom@plt>
mov    %rax,-0x68(%rbp)
mov    -0x24(%rbp),%eax
mov    0x2ce5(%rip),%rcx
cmp    (%rcx),%eax
je     1327 <xcout+0x187>
movl   $0x0,-0x1c(%rbp)
jmp    1748 <xcout+0x5a8>
mov    -0x58(%rbp),%rax
cmp    -0x68(%rbp),%rax
jne    135d <xcout+0x1bd>
mov    -0x20(%rbp),%eax
mov    0x2c81(%rip),%rcx
cmp    (%rcx),%eax
jne    135d <xcout+0x1bd>
mov    0x20(%rbp),%rax
movl   $0x3,(%rax)
movl   $0x0,-0x1c(%rbp)
jmp    1748 <xcout+0x5a8>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    0x2d0d(%rip),%rdx
mov    0x2c5e(%rip),%rax
mov    (%rax),%r9d
mov    0x2c6c(%rip),%rax
mov    (%rax),%r15d
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
lea    -0x60(%rbp),%r14
lea    -0x6c(%rbp),%rbx
lea    -0x88(%rbp),%r11
lea    -0x80(%rbp),%r10
lea    -0x78(%rbp),%rax
mov    %r15d,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   10b0 <XGetWindowProperty@plt>
mov    -0x78(%rbp),%rdi
call   1040 <XFree@plt>
mov    -0x60(%rbp),%rax
cmp    0x2cad(%rip),%rax
jne    140b <xcout+0x26b>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    0x2c91(%rip),%rdx
call   1050 <XDeleteProperty@plt>
mov    -0x40(%rbp),%rdi
call   10a0 <XFlush@plt>
mov    0x20(%rbp),%rax
movl   $0x2,(%rax)
movl   $0x0,-0x1c(%rbp)
jmp    1748 <xcout+0x5a8>
cmpl   $0x8,-0x6c(%rbp)
je     142b <xcout+0x28b>
mov    0x20(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x1c(%rbp)
jmp    1748 <xcout+0x5a8>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    0x2c3f(%rip),%rdx
mov    -0x80(%rbp),%r8
mov    0x2b8c(%rip),%rax
mov    (%rax),%r9d
mov    0x2b9a(%rip),%rax
mov    (%rax),%r15d
xor    %ecx,%ecx
lea    -0x60(%rbp),%r14
lea    -0x6c(%rbp),%rbx
lea    -0x88(%rbp),%r11
lea    -0x80(%rbp),%r10
lea    -0x78(%rbp),%rax
mov    %r15d,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   10b0 <XGetWindowProperty@plt>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    0x2bde(%rip),%rdx
call   1050 <XDeleteProperty@plt>
mov    -0x88(%rbp),%rdi
call   1090 <xcmalloc@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rdi
mov    -0x78(%rbp),%rsi
mov    -0x88(%rbp),%rdx
call   1060 <memcpy@plt>
mov    -0x88(%rbp),%rcx
mov    0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x90(%rbp),%rcx
mov    0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x78(%rbp),%rdi
call   1040 <XFree@plt>
mov    0x20(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x1,-0x1c(%rbp)
jmp    1748 <xcout+0x5a8>
mov    -0x24(%rbp),%eax
mov    0x2aa2(%rip),%rcx
cmp    (%rcx),%eax
je     1522 <xcout+0x382>
movl   $0x0,-0x1c(%rbp)
jmp    1748 <xcout+0x5a8>
mov    -0x28(%rbp),%eax
mov    0x2a9c(%rip),%rcx
cmp    (%rcx),%eax
je     1540 <xcout+0x3a0>
movl   $0x0,-0x1c(%rbp)
jmp    1748 <xcout+0x5a8>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    0x2b2a(%rip),%rdx
mov    0x2a7b(%rip),%rax
mov    (%rax),%r9d
mov    0x2a89(%rip),%rax
mov    (%rax),%r15d
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
lea    -0x60(%rbp),%r14
lea    -0x6c(%rbp),%rbx
lea    -0x88(%rbp),%r11
lea    -0x80(%rbp),%r10
lea    -0x78(%rbp),%rax
mov    %r15d,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   10b0 <XGetWindowProperty@plt>
cmpl   $0x8,-0x6c(%rbp)
je     15d4 <xcout+0x434>
mov    -0x78(%rbp),%rdi
call   1040 <XFree@plt>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    0x2ab5(%rip),%rdx
call   1050 <XDeleteProperty@plt>
movl   $0x0,-0x1c(%rbp)
jmp    1748 <xcout+0x5a8>
cmpq   $0x0,-0x80(%rbp)
jne    1611 <xcout+0x471>
mov    -0x78(%rbp),%rdi
call   1040 <XFree@plt>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    0x2a82(%rip),%rdx
call   1050 <XDeleteProperty@plt>
mov    0x20(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x1,-0x1c(%rbp)
jmp    1748 <xcout+0x5a8>
mov    -0x78(%rbp),%rdi
call   1040 <XFree@plt>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    0x2a50(%rip),%rdx
mov    -0x80(%rbp),%r8
mov    0x299d(%rip),%rax
mov    (%rax),%r9d
mov    0x29ab(%rip),%rax
mov    (%rax),%r15d
xor    %ecx,%ecx
lea    -0x60(%rbp),%r14
lea    -0x6c(%rbp),%rbx
lea    -0x88(%rbp),%r11
lea    -0x80(%rbp),%r10
lea    -0x78(%rbp),%rax
mov    %r15d,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   10b0 <XGetWindowProperty@plt>
mov    0x18(%rbp),%rax
cmpq   $0x0,(%rax)
jne    16af <xcout+0x50f>
mov    -0x88(%rbp),%rcx
mov    0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    0x18(%rbp),%rax
mov    (%rax),%rdi
call   1090 <xcmalloc@plt>
mov    %rax,-0x90(%rbp)
jmp    16da <xcout+0x53a>
mov    -0x88(%rbp),%rcx
mov    0x18(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
mov    -0x90(%rbp),%rdi
mov    0x18(%rbp),%rax
mov    (%rax),%rsi
call   1070 <xcrealloc@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rdi
mov    0x18(%rbp),%rax
mov    (%rax),%rax
sub    -0x88(%rbp),%rax
add    %rax,%rdi
mov    -0x78(%rbp),%rsi
mov    -0x88(%rbp),%rdx
call   1060 <memcpy@plt>
mov    -0x90(%rbp),%rcx
mov    0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x78(%rbp),%rdi
call   1040 <XFree@plt>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    0x2951(%rip),%rdx
call   1050 <XDeleteProperty@plt>
mov    -0x40(%rbp),%rdi
call   10a0 <XFlush@plt>
movl   $0x0,-0x1c(%rbp)
jmp    1748 <xcout+0x5a8>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcout>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,%r14
mov    %r8,%r13
mov    %ecx,0x30(%rsp)
mov    %rdx,%r12
mov    %esi,(%rsp)
mov    %rdi,%rbx
mov    0x70(%rsp),%rax
mov    (%rax),%rbp
cmpq   $0x0,0x2ea7(%rip)
jne    11f2 <xcout+0x52>
mov    0x2df6(%rip),%rax
mov    (%rax),%edx
lea    0xe1d(%rip),%rsi
mov    %rbx,%rdi
call   1080 <XInternAtom@plt>
mov    %rax,0x2e86(%rip)
mov    %r12,%r15
shr    $0x20,%r15
mov    0x80(%rsp),%rcx
cmpq   $0x0,0x2e77(%rip)
jne    1232 <xcout+0x92>
mov    0x2dbe(%rip),%rax
mov    (%rax),%edx
lea    0xdef(%rip),%rsi
mov    %rbx,%rdi
call   1080 <XInternAtom@plt>
mov    0x80(%rsp),%rcx
mov    %rax,0x2e4e(%rip)
mov    %rbx,0x18(%rsp)
mov    0x78(%rsp),%rdx
mov    (%rcx),%eax
xor    %ebx,%ebx
cmp    $0x2,%eax
je     12aa <xcout+0x10a>
cmp    $0x1,%eax
je     13d5 <xcout+0x235>
test   %eax,%eax
jne    161c <xcout+0x47c>
mov    %r14,%rbp
mov    %rcx,%r14
cmpq   $0x0,(%rdx)
je     1279 <xcout+0xd9>
mov    0x70(%rsp),%rax
mov    (%rax),%rdi
mov    %rdx,%r15
call   1030 <free@plt>
movq   $0x0,(%r15)
mov    0x2df8(%rip),%rcx
mov    0x2d51(%rip),%rax
mov    (%rax),%r9d
mov    0x18(%rsp),%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
mov    (%rsp),%r8d
call   10c0 <XConvertSelection@plt>
movl   $0x1,(%r14)
jmp    161c <xcout+0x47c>
mov    0x2cff(%rip),%rax
cmp    %r15d,(%rax)
jne    161c <xcout+0x47c>
mov    0x2d07(%rip),%rax
cmp    %r12d,(%rax)
jne    161c <xcout+0x47c>
mov    %rbp,0x30(%rsp)
mov    0x2da2(%rip),%rdx
mov    0x2cf3(%rip),%rax
mov    (%rax),%r9d
mov    0x2d01(%rip),%rax
mov    (%rax),%eax
lea    0x8(%rsp),%r13
lea    0x20(%rsp),%r15
lea    0x10(%rsp),%r14
lea    0x4(%rsp),%r11
lea    0x28(%rsp),%r10
xor    %ebx,%ebx
mov    0x18(%rsp),%rbp
mov    %rbp,%rdi
mov    (%rsp),%r12d
mov    %r12d,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
push   %r13
push   %r15
push   %r14
push   %r11
push   %r10
push   %rax
call   10b0 <XGetWindowProperty@plt>
add    $0x30,%rsp
cmpl   $0x8,0x4(%rsp)
jne    1427 <xcout+0x287>
mov    0x20(%rsp),%rbp
mov    0x8(%rsp),%rdi
call   1040 <XFree@plt>
mov    0x2d2b(%rip),%rdx
test   %rbp,%rbp
je     1592 <xcout+0x3f2>
mov    0x20(%rsp),%r8
mov    0x2c6e(%rip),%rax
mov    (%rax),%r9d
mov    0x2c7c(%rip),%rax
mov    (%rax),%eax
mov    0x18(%rsp),%r14
mov    %r14,%rdi
mov    (%rsp),%r15d
mov    %r15d,%esi
xor    %ecx,%ecx
lea    0x8(%rsp),%rbp
push   %rbp
lea    0x28(%rsp),%rbp
push   %rbp
lea    0x20(%rsp),%rbp
push   %rbp
lea    0x1c(%rsp),%rbp
push   %rbp
lea    0x48(%rsp),%rbp
push   %rbp
push   %rax
call   10b0 <XGetWindowProperty@plt>
add    $0x30,%rsp
mov    0x78(%rsp),%rcx
mov    (%rcx),%rax
mov    0x10(%rsp),%rsi
test   %rax,%rax
je     15b4 <xcout+0x414>
add    %rax,%rsi
mov    %rsi,(%rcx)
mov    0x30(%rsp),%rdi
mov    %rcx,%rbp
call   1070 <xcrealloc@plt>
jmp    15c2 <xcout+0x422>
mov    0x2bf4(%rip),%rbp
mov    0x0(%rbp),%edx
lea    0xc29(%rip),%rsi
mov    0x18(%rsp),%rdi
call   1080 <XInternAtom@plt>
mov    0x2c01(%rip),%rcx
cmp    %r15d,(%rcx)
jne    161c <xcout+0x47c>
cmp    %r14,%rax
jne    1448 <xcout+0x2a8>
mov    0x2bb4(%rip),%rax
mov    0x30(%rsp),%ecx
cmp    %ecx,(%rax)
jne    1448 <xcout+0x2a8>
mov    0x80(%rsp),%rax
movl   $0x3,(%rax)
jmp    161c <xcout+0x47c>
mov    0x8(%rsp),%rdi
call   1040 <XFree@plt>
mov    0x2c40(%rip),%rdx
mov    %rbp,%rdi
mov    %r12d,%esi
call   1050 <XDeleteProperty@plt>
jmp    161c <xcout+0x47c>
mov    0x2c29(%rip),%rdx
mov    0x0(%rbp),%r9d
mov    0x2b8e(%rip),%rax
mov    (%rax),%r11d
lea    0x8(%rsp),%r10
lea    0x20(%rsp),%r13
lea    0x10(%rsp),%r15
lea    0x4(%rsp),%rax
xor    %ebx,%ebx
mov    0x18(%rsp),%r12
mov    %r12,%rdi
mov    (%rsp),%r14d
mov    %r14d,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
push   %r10
push   %r13
push   %r15
push   %rax
lea    0x48(%rsp),%rax
push   %rax
push   %r11
call   10b0 <XGetWindowProperty@plt>
add    $0x30,%rsp
mov    0x8(%rsp),%rdi
call   1040 <XFree@plt>
mov    0x28(%rsp),%rax
cmp    0x2bcb(%rip),%rax
jne    14e4 <xcout+0x344>
mov    0x2bba(%rip),%rdx
mov    %r12,%rdi
mov    %r14d,%esi
call   1050 <XDeleteProperty@plt>
mov    %r12,%rdi
call   10a0 <XFlush@plt>
mov    0x80(%rsp),%rax
movl   $0x2,(%rax)
jmp    161c <xcout+0x47c>
cmpl   $0x8,0x4(%rsp)
jne    160c <xcout+0x46c>
mov    0x2b82(%rip),%rdx
mov    0x20(%rsp),%r8
mov    0x0(%rbp),%r9d
mov    0x2ae2(%rip),%rax
mov    (%rax),%r10d
mov    0x18(%rsp),%rbx
mov    %rbx,%rdi
mov    (%rsp),%ebp
mov    %ebp,%esi
xor    %ecx,%ecx
lea    0x8(%rsp),%rax
push   %rax
lea    0x28(%rsp),%rax
push   %rax
lea    0x20(%rsp),%rax
push   %rax
lea    0x1c(%rsp),%rax
push   %rax
lea    0x48(%rsp),%rax
push   %rax
push   %r10
call   10b0 <XGetWindowProperty@plt>
add    $0x30,%rsp
mov    0x2b30(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <XDeleteProperty@plt>
mov    0x10(%rsp),%rdi
call   1090 <xcmalloc@plt>
mov    %rax,%rbx
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %rax,%rdi
call   1060 <memcpy@plt>
mov    0x10(%rsp),%rax
mov    0x78(%rsp),%rcx
mov    %rax,(%rcx)
mov    0x70(%rsp),%rax
mov    %rbx,(%rax)
mov    0x8(%rsp),%rdi
call   1040 <XFree@plt>
jmp    159f <xcout+0x3ff>
mov    0x18(%rsp),%rdi
mov    (%rsp),%esi
call   1050 <XDeleteProperty@plt>
mov    0x80(%rsp),%rax
movl   $0x0,(%rax)
mov    $0x1,%ebx
jmp    161c <xcout+0x47c>
mov    %rsi,(%rcx)
mov    %rsi,%rdi
mov    %rcx,%rbp
call   1090 <xcmalloc@plt>
mov    %rax,%rbx
mov    0x0(%rbp),%rdi
mov    0x10(%rsp),%rdx
sub    %rdx,%rdi
add    %rax,%rdi
mov    0x8(%rsp),%rsi
call   1060 <memcpy@plt>
mov    0x70(%rsp),%rax
mov    %rbx,(%rax)
mov    0x8(%rsp),%rdi
call   1040 <XFree@plt>
mov    0x2a81(%rip),%rdx
mov    %r14,%rdi
mov    %r15d,%esi
call   1050 <XDeleteProperty@plt>
mov    %r14,%rdi
call   10a0 <XFlush@plt>
jmp    161a <xcout+0x47a>
mov    0x80(%rsp),%rax
movl   $0x0,(%rax)
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_7__ = type { %struct.TYPE_6__, i32, %struct.TYPE_5__ }
%struct.TYPE_6__ = type { i32 }
%struct.TYPE_5__ = type { i32 }
@xcout.pty = internal global i64 0
@xcout.inc = internal global i64 0
@.str = [10 x i8] c"XCLIP_OUT\00"
@False = global i32 0
@.str.1 = [5 x i8] c"INCR\00"
@CurrentTime = global i32 0
@.str.2 = [12 x i8] c"UTF8_STRING\00"
@SelectionNotify = global i32 0
@None = global i32 0
@AnyPropertyType = global i32 0
@PropertyNotify = global i32 0
@PropertyNewValue = global i32 0
define i32 @xcout(i32* %0, i32 %1, i64 %2, i32 %3, i64 %4, i64 %5, i8** %6, i64* %7, i32* %8) {
%10 = alloca i32
%11 = alloca %struct.TYPE_7__
%12 = alloca { i64, i32 }
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i64
%16 = alloca i64
%17 = alloca i8**
%18 = alloca i64*
%19 = alloca i32*
%20 = alloca i64
%21 = alloca i64
%22 = alloca i32
%23 = alloca i8*
%24 = alloca i64
%25 = alloca i64
%26 = alloca i8*
%27 = getelementptr inbounds { i64, i32 }, { i64, i32 }* %12, i32 0, i32 0
store i64 %2, i64* %27
%28 = getelementptr inbounds { i64, i32 }, { i64, i32 }* %12, i32 0, i32 1
store i32 %3, i32* %28
%29 = bitcast %struct.TYPE_7__* %11 to i8*
%30 = bitcast { i64, i32 }* %12 to i8*
store i32* %0, i32** %13
store i32 %1, i32* %14
store i64 %4, i64* %15
store i64 %5, i64* %16
store i8** %6, i8*** %17
store i64* %7, i64** %18
store i32* %8, i32** %19
%31 = load i8**, i8*** %17
%32 = load i8*, i8** %31
store i8* %32, i8** %26
%33 = load i64, i64* @xcout.pty
%34 = icmp ne i64 %33, 0
br i1 %34, label %39, label %35
35: ; preds = %9
%36 = load i32*, i32** %13
%37 = load i32, i32* @False
%38 = call i64 @XInternAtom(i32* %36, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %37)
store i64 %38, i64* @xcout.pty
br label %39
39: ; preds = %35, %9
%40 = load i64, i64* @xcout.inc
%41 = icmp ne i64 %40, 0
br i1 %41, label %46, label %42
42: ; preds = %39
%43 = load i32*, i32** %13
%44 = load i32, i32* @False
%45 = call i64 @XInternAtom(i32* %43, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %44)
store i64 %45, i64* @xcout.inc
br label %46
46: ; preds = %42, %39
%47 = load i32*, i32** %19
%48 = load i32, i32* %47
switch i32 %48, label %229 [
i32 0, label %49
i32 1, label %67
i32 2, label %139
]
49: ; preds = %46
%50 = load i64*, i64** %18
%51 = load i64, i64* %50
%52 = icmp ugt i64 %51, 0
br i1 %52, label %53, label %58
53: ; preds = %49
%54 = load i8**, i8*** %17
%55 = load i8*, i8** %54
%56 = call i32 @free(i8* %55)
%57 = load i64*, i64** %18
store i64 0, i64* %57
br label %58
58: ; preds = %53, %49
%59 = load i32*, i32** %13
%60 = load i64, i64* %15
%61 = load i64, i64* %16
%62 = load i64, i64* @xcout.pty
%63 = load i32, i32* %14
%64 = load i32, i32* @CurrentTime
%65 = call i32 @XConvertSelection(i32* %59, i64 %60, i64 %61, i64 %62, i32 %63, i32 %64)
%66 = load i32*, i32** %19
store i32 1, i32* %66
store i32 0, i32* %10
br label %230
67: ; preds = %46
%68 = load i32*, i32** %13
%69 = load i32, i32* @False
%70 = call i64 @XInternAtom(i32* %68, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %69)
store i64 %70, i64* %21
%71 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %11, i32 0, i32 1
%72 = load i32, i32* %71
%73 = load i32, i32* @SelectionNotify
%74 = icmp ne i32 %72, %73
br i1 %74, label %75, label %76
75: ; preds = %67
store i32 0, i32* %10
br label %230
76: ; preds = %67
%77 = load i64, i64* %16
%78 = load i64, i64* %21
%79 = icmp eq i64 %77, %78
br i1 %79, label %80, label %88
80: ; preds = %76
%81 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %11, i32 0, i32 2
%82 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %81, i32 0, i32 0
%83 = load i32, i32* %82
%84 = load i32, i32* @None
%85 = icmp eq i32 %83, %84
br i1 %85, label %86, label %88
86: ; preds = %80
%87 = load i32*, i32** %19
store i32 3, i32* %87
store i32 0, i32* %10
br label %230
88: ; preds = %80, %76
%89 = load i32*, i32** %13
%90 = load i32, i32* %14
%91 = load i64, i64* @xcout.pty
%92 = load i32, i32* @False
%93 = load i32, i32* @AnyPropertyType
%94 = call i32 @XGetWindowProperty(i32* %89, i32 %90, i64 %91, i32 0, i64 0, i32 %92, i32 %93, i64* %20, i32* %22, i64* %25, i64* %24, i8** %23)
%95 = load i8*, i8** %23
%96 = call i32 @XFree(i8* %95)
%97 = load i64, i64* %20
%98 = load i64, i64* @xcout.inc
%99 = icmp eq i64 %97, %98
br i1 %99, label %100, label %108
100: ; preds = %88
%101 = load i32*, i32** %13
%102 = load i32, i32* %14
%103 = load i64, i64* @xcout.pty
%104 = call i32 @XDeleteProperty(i32* %101, i32 %102, i64 %103)
%105 = load i32*, i32** %13
%106 = call i32 @XFlush(i32* %105)
%107 = load i32*, i32** %19
store i32 2, i32* %107
store i32 0, i32* %10
br label %230
108: ; preds = %88
%109 = load i32, i32* %22
%110 = icmp ne i32 %109, 8
br i1 %110, label %111, label %113
111: ; preds = %108
%112 = load i32*, i32** %19
store i32 0, i32* %112
store i32 0, i32* %10
br label %230
113: ; preds = %108
%114 = load i32*, i32** %13
%115 = load i32, i32* %14
%116 = load i64, i64* @xcout.pty
%117 = load i64, i64* %24
%118 = load i32, i32* @False
%119 = load i32, i32* @AnyPropertyType
%120 = call i32 @XGetWindowProperty(i32* %114, i32 %115, i64 %116, i32 0, i64 %117, i32 %118, i32 %119, i64* %20, i32* %22, i64* %25, i64* %24, i8** %23)
%121 = load i32*, i32** %13
%122 = load i32, i32* %14
%123 = load i64, i64* @xcout.pty
%124 = call i32 @XDeleteProperty(i32* %121, i32 %122, i64 %123)
%125 = load i64, i64* %25
%126 = call i64 @xcmalloc(i64 %125)
%127 = inttoptr i64 %126 to i8*
store i8* %127, i8** %26
%128 = load i8*, i8** %26
%129 = load i8*, i8** %23
%130 = load i64, i64* %25
%131 = call i32 @memcpy(i8* %128, i8* %129, i64 %130)
%132 = load i64, i64* %25
%133 = load i64*, i64** %18
store i64 %132, i64* %133
%134 = load i8*, i8** %26
%135 = load i8**, i8*** %17
store i8* %134, i8** %135
%136 = load i8*, i8** %23
%137 = call i32 @XFree(i8* %136)
%138 = load i32*, i32** %19
store i32 0, i32* %138
store i32 1, i32* %10
br label %230
139: ; preds = %46
%140 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %11, i32 0, i32 1
%141 = load i32, i32* %140
%142 = load i32, i32* @PropertyNotify
%143 = icmp ne i32 %141, %142
br i1 %143, label %144, label %145
144: ; preds = %139
store i32 0, i32* %10
br label %230
145: ; preds = %139
%146 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %11, i32 0, i32 0
%147 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %146, i32 0, i32 0
%148 = load i32, i32* %147
%149 = load i32, i32* @PropertyNewValue
%150 = icmp ne i32 %148, %149
br i1 %150, label %151, label %152
151: ; preds = %145
store i32 0, i32* %10
br label %230
152: ; preds = %145
%153 = load i32*, i32** %13
%154 = load i32, i32* %14
%155 = load i64, i64* @xcout.pty
%156 = load i32, i32* @False
%157 = load i32, i32* @AnyPropertyType
%158 = call i32 @XGetWindowProperty(i32* %153, i32 %154, i64 %155, i32 0, i64 0, i32 %156, i32 %157, i64* %20, i32* %22, i64* %25, i64* %24, i8** %23)
%159 = load i32, i32* %22
%160 = icmp ne i32 %159, 8
br i1 %160, label %161, label %168
161: ; preds = %152
%162 = load i8*, i8** %23
%163 = call i32 @XFree(i8* %162)
%164 = load i32*, i32** %13
%165 = load i32, i32* %14
%166 = load i64, i64* @xcout.pty
%167 = call i32 @XDeleteProperty(i32* %164, i32 %165, i64 %166)
store i32 0, i32* %10
br label %230
168: ; preds = %152
%169 = load i64, i64* %24
%170 = icmp eq i64 %169, 0
br i1 %170, label %171, label %179
171: ; preds = %168
%172 = load i8*, i8** %23
%173 = call i32 @XFree(i8* %172)
%174 = load i32*, i32** %13
%175 = load i32, i32* %14
%176 = load i64, i64* @xcout.pty
%177 = call i32 @XDeleteProperty(i32* %174, i32 %175, i64 %176)
%178 = load i32*, i32** %19
store i32 0, i32* %178
store i32 1, i32* %10
br label %230
179: ; preds = %168
%180 = load i8*, i8** %23
%181 = call i32 @XFree(i8* %180)
%182 = load i32*, i32** %13
%183 = load i32, i32* %14
%184 = load i64, i64* @xcout.pty
%185 = load i64, i64* %24
%186 = load i32, i32* @False
%187 = load i32, i32* @AnyPropertyType
%188 = call i32 @XGetWindowProperty(i32* %182, i32 %183, i64 %184, i32 0, i64 %185, i32 %186, i32 %187, i64* %20, i32* %22, i64* %25, i64* %24, i8** %23)
%189 = load i64*, i64** %18
%190 = load i64, i64* %189
%191 = icmp eq i64 %190, 0
br i1 %191, label %192, label %199
192: ; preds = %179
%193 = load i64, i64* %25
%194 = load i64*, i64** %18
store i64 %193, i64* %194
%195 = load i64*, i64** %18
%196 = load i64, i64* %195
%197 = call i64 @xcmalloc(i64 %196)
%198 = inttoptr i64 %197 to i8*
store i8* %198, i8** %26
br label %209
199: ; preds = %179
%200 = load i64, i64* %25
%201 = load i64*, i64** %18
%202 = load i64, i64* %201
%203 = add i64 %202, %200
store i64 %203, i64* %201
%204 = load i8*, i8** %26
%205 = load i64*, i64** %18
%206 = load i64, i64* %205
%207 = call i64 @xcrealloc(i8* %204, i64 %206)
%208 = inttoptr i64 %207 to i8*
store i8* %208, i8** %26
br label %209
209: ; preds = %199, %192
%210 = load i8*, i8** %26
%211 = load i64*, i64** %18
%212 = load i64, i64* %211
%213 = load i64, i64* %25
%214 = sub i64 %212, %213
%215 = getelementptr inbounds i8, i8* %210, i64 %214
%216 = load i8*, i8** %23
%217 = load i64, i64* %25
%218 = call i32 @memcpy(i8* %215, i8* %216, i64 %217)
%219 = load i8*, i8** %26
%220 = load i8**, i8*** %17
store i8* %219, i8** %220
%221 = load i8*, i8** %23
%222 = call i32 @XFree(i8* %221)
%223 = load i32*, i32** %13
%224 = load i32, i32* %14
%225 = load i64, i64* @xcout.pty
%226 = call i32 @XDeleteProperty(i32* %223, i32 %224, i64 %225)
%227 = load i32*, i32** %13
%228 = call i32 @XFlush(i32* %227)
store i32 0, i32* %10
br label %230
229: ; preds = %46
store i32 0, i32* %10
br label %230
230: ; preds = %229, %209, %171, %161, %151, %144, %113, %111, %100, %86, %75, %58
%231 = load i32, i32* %10
ret i32 %231
}

LLVM IR (-O2):
@xcout.pty = internal unnamed_addr global i64 0
@xcout.inc = internal unnamed_addr global i64 0
@.str = [10 x i8] c"XCLIP_OUT\00"
@False = global i32 0
@.str.1 = [5 x i8] c"INCR\00"
@CurrentTime = global i32 0
@.str.2 = [12 x i8] c"UTF8_STRING\00"
@SelectionNotify = global i32 0
@None = global i32 0
@AnyPropertyType = global i32 0
@PropertyNotify = global i32 0
@PropertyNewValue = global i32 0
define i32 @xcout(i32* %0, i32 %1, i64 %2, i32 %3, i64 %4, i64 %5, i8** nocapture %6, i64* nocapture %7, i32* nocapture %8) {
%10 = alloca i64
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i64
%15 = trunc i64 %2 to i32
%16 = lshr i64 %2, 32
%17 = trunc i64 %16 to i32
%18 = bitcast i64* %10 to i8*
%19 = bitcast i32* %11 to i8*
%20 = bitcast i8** %12 to i8*
%21 = bitcast i64* %13 to i8*
%22 = bitcast i64* %14 to i8*
%23 = load i8*, i8** %6
%24 = load i64, i64* @xcout.pty
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %9
%27 = load i32, i32* @False
%28 = tail call i64 @XInternAtom(i32* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %27)
store i64 %28, i64* @xcout.pty
br label %29
29: ; preds = %26, %9
%30 = load i64, i64* @xcout.inc
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %29
%33 = load i32, i32* @False
%34 = tail call i64 @XInternAtom(i32* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %33)
store i64 %34, i64* @xcout.inc
br label %35
35: ; preds = %32, %29
%36 = load i32, i32* %8
switch i32 %36, label %146 [
i32 0, label %37
i32 1, label %47
i32 2, label %93
]
37: ; preds = %35
%38 = load i64, i64* %7
%39 = icmp eq i64 %38, 0
br i1 %39, label %43, label %40
40: ; preds = %37
%41 = load i8*, i8** %6
%42 = tail call i32 @free(i8* %41)
store i64 0, i64* %7
br label %43
43: ; preds = %40, %37
%44 = load i64, i64* @xcout.pty
%45 = load i32, i32* @CurrentTime
%46 = tail call i32 @XConvertSelection(i32* %0, i64 %4, i64 %5, i64 %44, i32 %1, i32 %45)
store i32 1, i32* %8
br label %146
47: ; preds = %35
%48 = load i32, i32* @False
%49 = tail call i64 @XInternAtom(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %48)
%50 = load i32, i32* @SelectionNotify
%51 = icmp eq i32 %50, %17
br i1 %51, label %52, label %146
52: ; preds = %47
%53 = icmp eq i64 %49, %5
%54 = load i32, i32* @None
%55 = icmp eq i32 %54, %3
%56 = select i1 %53, i1 %55, i1 false
br i1 %56, label %57, label %58
57: ; preds = %52
store i32 3, i32* %8
br label %146
58: ; preds = %52
%59 = load i64, i64* @xcout.pty
%60 = load i32, i32* @False
%61 = load i32, i32* @AnyPropertyType
%62 = call i32 @XGetWindowProperty(i32* %0, i32 %1, i64 %59, i32 0, i64 0, i32 %60, i32 %61, i64* %10, i32* %11, i64* %14, i64* %13, i8** %12)
%63 = load i8*, i8** %12
%64 = call i32 @XFree(i8* %63)
%65 = load i64, i64* %10
%66 = load i64, i64* @xcout.inc
%67 = icmp eq i64 %65, %66
br i1 %67, label %68, label %72
68: ; preds = %58
%69 = load i64, i64* @xcout.pty
%70 = call i32 @XDeleteProperty(i32* %0, i32 %1, i64 %69)
%71 = call i32 @XFlush(i32* %0)
store i32 2, i32* %8
br label %146
72: ; preds = %58
%73 = load i32, i32* %11
%74 = icmp eq i32 %73, 8
br i1 %74, label %76, label %75
75: ; preds = %72
store i32 0, i32* %8
br label %146
76: ; preds = %72
%77 = load i64, i64* @xcout.pty
%78 = load i64, i64* %13
%79 = load i32, i32* @False
%80 = load i32, i32* @AnyPropertyType
%81 = call i32 @XGetWindowProperty(i32* %0, i32 %1, i64 %77, i32 0, i64 %78, i32 %79, i32 %80, i64* %10, i32* %11, i64* %14, i64* %13, i8** %12)
%82 = load i64, i64* @xcout.pty
%83 = call i32 @XDeleteProperty(i32* %0, i32 %1, i64 %82)
%84 = load i64, i64* %14
%85 = call i64 @xcmalloc(i64 %84)
%86 = inttoptr i64 %85 to i8*
%87 = load i8*, i8** %12
%88 = load i64, i64* %14
%89 = call i32 @memcpy(i8* %86, i8* %87, i64 %88)
%90 = load i64, i64* %14
store i64 %90, i64* %7
store i8* %86, i8** %6
%91 = load i8*, i8** %12
%92 = call i32 @XFree(i8* %91)
store i32 0, i32* %8
br label %146
93: ; preds = %35
%94 = load i32, i32* @PropertyNotify
%95 = icmp eq i32 %94, %17
%96 = load i32, i32* @PropertyNewValue
%97 = icmp eq i32 %96, %15
%98 = select i1 %95, i1 %97, i1 false
br i1 %98, label %99, label %146
99: ; preds = %93
%100 = load i64, i64* @xcout.pty
%101 = load i32, i32* @False
%102 = load i32, i32* @AnyPropertyType
%103 = call i32 @XGetWindowProperty(i32* %0, i32 %1, i64 %100, i32 0, i64 0, i32 %101, i32 %102, i64* %10, i32* %11, i64* %14, i64* %13, i8** %12)
%104 = load i32, i32* %11
%105 = icmp eq i32 %104, 8
br i1 %105, label %111, label %106
106: ; preds = %99
%107 = load i8*, i8** %12
%108 = call i32 @XFree(i8* %107)
%109 = load i64, i64* @xcout.pty
%110 = call i32 @XDeleteProperty(i32* %0, i32 %1, i64 %109)
br label %146
111: ; preds = %99
%112 = load i64, i64* %13
%113 = icmp eq i64 %112, 0
%114 = load i8*, i8** %12
%115 = call i32 @XFree(i8* %114)
%116 = load i64, i64* @xcout.pty
br i1 %113, label %117, label %119
117: ; preds = %111
%118 = call i32 @XDeleteProperty(i32* %0, i32 %1, i64 %116)
store i32 0, i32* %8
br label %146
119: ; preds = %111
%120 = load i64, i64* %13
%121 = load i32, i32* @False
%122 = load i32, i32* @AnyPropertyType
%123 = call i32 @XGetWindowProperty(i32* %0, i32 %1, i64 %116, i32 0, i64 %120, i32 %121, i32 %122, i64* %10, i32* %11, i64* %14, i64* %13, i8** %12)
%124 = load i64, i64* %7
%125 = icmp eq i64 %124, 0
%126 = load i64, i64* %14
br i1 %125, label %127, label %129
127: ; preds = %119
store i64 %126, i64* %7
%128 = call i64 @xcmalloc(i64 %126)
br label %132
129: ; preds = %119
%130 = add i64 %126, %124
store i64 %130, i64* %7
%131 = call i64 @xcrealloc(i8* %23, i64 %130)
br label %132
132: ; preds = %129, %127
%133 = phi i64 [ %128, %127 ], [ %131, %129 ]
%134 = inttoptr i64 %133 to i8*
%135 = load i64, i64* %7
%136 = load i64, i64* %14
%137 = sub i64 %135, %136
%138 = getelementptr inbounds i8, i8* %134, i64 %137
%139 = load i8*, i8** %12
%140 = call i32 @memcpy(i8* %138, i8* %139, i64 %136)
store i8* %134, i8** %6
%141 = load i8*, i8** %12
%142 = call i32 @XFree(i8* %141)
%143 = load i64, i64* @xcout.pty
%144 = call i32 @XDeleteProperty(i32* %0, i32 %1, i64 %143)
%145 = call i32 @XFlush(i32* %0)
br label %146
146: ; preds = %35, %93, %47, %132, %117, %106, %76, %75, %68, %57, %43
%147 = phi i32 [ 0, %106 ], [ 1, %117 ], [ 0, %132 ], [ 0, %57 ], [ 0, %68 ], [ 0, %75 ], [ 1, %76 ], [ 0, %43 ], [ 0, %47 ], [ 0, %93 ], [ 0, %35 ]
ret i32 %147
}