#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 unsigned int uint32_t;
typedef unsigned int uint16_t;
struct timezone {
  int dummy;
};
struct timeval {
  int tv_sec;
  int tv_usec;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int ffs(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
int /*<<< orphan*/ isprint(char);
int /*<<< orphan*/ isspace(char);
int /*<<< orphan*/ memcpy(unsigned int *, char *, int);
unsigned int ntohl(unsigned int);
unsigned int ntohs(unsigned int);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcspn(char *, char *);
char *strdup(char *);
int strlen(char *);
int /*<<< orphan*/ strspn(char *, char *);
int process_client_message(char *fixed, char *variable, FILE *f) {
  static int first = 1;
  static char delayed_output[100];
  static int elapsed;
  static struct timeval last_tv, first_tv;
  struct timeval tv, diff;
  struct timezone tz;
  static unsigned int last_was_key_down;
  static unsigned int current_x, current_y;
  static unsigned char current_buttons;
  int ms;
  int message = (int)*fixed;
  gettimeofday(&tv, &tz);
  if (!last_tv.tv_sec && !last_tv.tv_usec)
    first_tv = last_tv = tv;
  diff.tv_sec = tv.tv_sec - last_tv.tv_sec;
  diff.tv_usec = tv.tv_usec - last_tv.tv_usec;
  ms = diff.tv_sec * 1000 + diff.tv_usec / 1000;
  if (first) {
    first = 0;
    fputs("RFM 001.000\nshared\n", f);
  } else if (*delayed_output && (!last_was_key_down || message > 4)) {
    if (ms > 0) {
      char *p = delayed_output + strlen(delayed_output);
      sprintf(p, " delay %dms", ms);
    }
    strcat(delayed_output, "\n");
    fputs(delayed_output, f);
    last_tv = tv;
    *delayed_output = '\0';
  }
  switch (message) {
  case 0:
  case 1:
  case 2:
  case 3:
    diff.tv_sec = tv.tv_sec - first_tv.tv_sec;
    diff.tv_usec = tv.tv_usec - first_tv.tv_usec;
    ms = diff.tv_sec * 1000 + diff.tv_usec / 1000;
    if (ms > (1000 * (1 + elapsed))) {
      fprintf(f, "# At %dms from start\n", ms);
      elapsed = ms / 1000;
    }
    return 0;
  case 4: {
    char *p = delayed_output;
    const char *down_flag = "up";
    uint32_t key;
    memcpy(&key, fixed + 4, 4);
    key = ntohl(key);
    if (*delayed_output) {
      if (fixed[1] || last_was_key_down != key || ms > 400) {
        char *p = delayed_output;
        p += strlen(p);
        if (ms > 0)
          sprintf(p, " delay %dms", ms);
        strcat(delayed_output, "\n");
        fputs(delayed_output, f);
        last_tv = tv;
        *delayed_output = '\0';
        last_was_key_down = 0;
      } else {
        char *p = delayed_output;
        char *end;
        p += strcspn(p, " \t");
        p += strspn(p, " \t");
        end = p + strcspn(p, " \t");
        *end = '\0';
        end = strdup(p);
        sprintf(delayed_output, "press %s", end);
        last_was_key_down = 0;
        break;
      }
    }
    if (fixed[1]) {
      last_was_key_down = key;
      down_flag = "down";
    }
    sprintf(p, "key ");
    p += strlen(p);
    if (key < 256 && isprint((char)key) && !isspace((char)key))
      *p++ = (char)key;
    else {
      sprintf(p, "%#x", key);
      p += strlen(p);
    }
    sprintf(p, " %s", down_flag);
    break;
  }
  case 5: {
    uint16_t x, y;
    unsigned char buttons = fixed[1];
    memcpy(&x, fixed + 2, 2);
    memcpy(&y, fixed + 4, 2);
    x = ntohs(x);
    y = ntohs(y);
    if (buttons != current_buttons) {
      int i;
      int diff = buttons ^ current_buttons;
      while ((i = ffs(diff))) {
        if (*delayed_output) {
          strcat(delayed_output, "\n");
          fputs(delayed_output, f);
        }
        i--;
        sprintf(delayed_output, "button %d %s", i,
                (buttons & (1 << i)) ? "down" : "up");
        diff ^= 1 << i;
      }
      current_buttons = buttons;
    }
    if (current_x != x || current_y != y) {
      if (*delayed_output) {
        strcat(delayed_output, "\n");
        fputs(delayed_output, f);
      }
      sprintf(delayed_output, "pointer %d %d", x, y);
      current_x = x;
      current_y = y;
    }
    break;
  }
  case 6:
    fputs("# ClientCutText not supported yet\n", f);
    break;
  default:
    fprintf(stderr, "Protocol error\n");
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<process_client_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x40(%rbp)
lea    -0x28(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1040 <gettimeofday@plt>
cmpl   $0x0,0x2ef3(%rip)
jne    1261 <process_client_message+0x61>
cmpl   $0x0,0x2eea(%rip)
jne    1261 <process_client_message+0x61>
mov    -0x28(%rbp),%rax
mov    %rax,0x2ed5(%rip)
mov    0x2ece(%rip),%rax
mov    %rax,0x2ecf(%rip)
mov    -0x28(%rbp),%eax
sub    0x2ebe(%rip),%eax
mov    %eax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
sub    0x2eb6(%rip),%eax
mov    %eax,-0x2c(%rbp)
imul   $0x3e8,-0x30(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x2c(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x90(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,0x2dfb(%rip)
je     12ca <process_client_message+0xca>
movl   $0x0,0x2deb(%rip)
mov    -0x20(%rbp),%rsi
lea    0xd5c(%rip),%rdi
call   1050 <fputs@plt>
jmp    1367 <process_client_message+0x167>
movsbl 0x2def(%rip),%eax
cmp    $0x0,%eax
je     1362 <process_client_message+0x162>
cmpl   $0x0,0x2e57(%rip)
je     12f1 <process_client_message+0xf1>
cmpl   $0x4,-0x40(%rbp)
jle    1362 <process_client_message+0x162>
cmpl   $0x0,-0x3c(%rbp)
jle    132d <process_client_message+0x12d>
lea    0x2dbe(%rip),%rdi
call   1030 <strlen@plt>
movslq %eax,%rcx
lea    0x2daf(%rip),%rax
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x3c(%rbp),%edx
lea    0xd0a(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    0x2d8c(%rip),%rdi
lea    0xcf3(%rip),%rsi
call   10e0 <strcat@plt>
mov    -0x20(%rbp),%rsi
lea    0x2d75(%rip),%rdi
call   1050 <fputs@plt>
mov    -0x28(%rbp),%rax
mov    %rax,0x2dcd(%rip)
movb   $0x0,0x2d5e(%rip)
jmp    1367 <process_client_message+0x167>
mov    -0x40(%rbp),%eax
mov    %rax,-0x98(%rbp)
sub    $0x6,%rax
ja     188e <process_client_message+0x68e>
mov    -0x98(%rbp),%rax
lea    0xc77(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x28(%rbp),%eax
sub    0x2d95(%rip),%eax
mov    %eax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
sub    0x2d8d(%rip),%eax
mov    %eax,-0x2c(%rbp)
imul   $0x3e8,-0x30(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x2c(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x9c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    0x2d4c(%rip),%ecx
add    $0x1,%ecx
imul   $0x3e8,%ecx,%ecx
cmp    %ecx,%eax
jle    1411 <process_client_message+0x211>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
mov    -0x3c(%rbp),%edx
lea    0xc43(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x3c(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,0x2d13(%rip)
movl   $0x0,-0x4(%rbp)
jmp    18b6 <process_client_message+0x6b6>
lea    0x2c9c(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xc23(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
lea    -0x5c(%rbp),%rdi
mov    $0x4,%edx
call   10a0 <memcpy@plt>
mov    -0x5c(%rbp),%edi
call   1110 <ntohl@plt>
mov    %eax,-0x5c(%rbp)
cmpb   $0x0,0x2c65(%rip)
je     15cf <process_client_message+0x3cf>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    148e <process_client_message+0x28e>
mov    0x2cc0(%rip),%eax
cmp    -0x5c(%rbp),%eax
jne    148e <process_client_message+0x28e>
cmpl   $0x190,-0x3c(%rbp)
jle    1515 <process_client_message+0x315>
lea    0x2c2b(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jle    14d1 <process_client_message+0x2d1>
mov    -0x68(%rbp),%rdi
mov    -0x3c(%rbp),%edx
lea    0xb66(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
lea    0x2be8(%rip),%rdi
lea    0xb4f(%rip),%rsi
call   10e0 <strcat@plt>
mov    -0x20(%rbp),%rsi
lea    0x2bd1(%rip),%rdi
call   1050 <fputs@plt>
mov    -0x28(%rbp),%rax
mov    %rax,0x2c29(%rip)
movb   $0x0,0x2bba(%rip)
movl   $0x0,0x2c28(%rip)
jmp    15ca <process_client_message+0x3ca>
lea    0x2ba4(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rdi
lea    0xb2a(%rip),%rsi
call   1080 <strcspn@plt>
mov    %eax,%ecx
mov    -0x70(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rdi
lea    0xb0a(%rip),%rsi
call   1060 <strspn@plt>
mov    %eax,%ecx
mov    -0x70(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x70(%rbp),%rdi
lea    0xadf(%rip),%rsi
call   1080 <strcspn@plt>
mov    %eax,%ecx
mov    -0xa8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x70(%rbp),%rdi
call   1120 <strdup@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rdx
lea    0x2b13(%rip),%rdi
lea    0xaa4(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
movl   $0x0,0x2b73(%rip)
jmp    18af <process_client_message+0x6af>
jmp    15cf <process_client_message+0x3cf>
mov    -0x10(%rbp),%rax
cmpb   $0x0,0x1(%rax)
je     15f1 <process_client_message+0x3f1>
mov    -0x5c(%rbp),%eax
mov    %eax,0x2b52(%rip)
lea    0xa74(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    -0x50(%rbp),%rdi
lea    0xa6a(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
mov    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x50(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
cmpl   $0x100,-0x5c(%rbp)
jae    166c <process_client_message+0x46c>
mov    -0x5c(%rbp),%eax
movsbl %al,%edi
call   10d0 <isprint@plt>
cmp    $0x0,%eax
je     166c <process_client_message+0x46c>
mov    -0x5c(%rbp),%eax
movsbl %al,%edi
call   1070 <isspace@plt>
cmp    $0x0,%eax
jne    166c <process_client_message+0x46c>
mov    -0x5c(%rbp),%eax
mov    %al,%cl
mov    -0x50(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x50(%rbp)
mov    %cl,(%rax)
jmp    169a <process_client_message+0x49a>
mov    -0x50(%rbp),%rdi
mov    -0x5c(%rbp),%edx
lea    0x9f1(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
mov    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x50(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rdx
lea    0x9cf(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
jmp    18af <process_client_message+0x6af>
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x81(%rbp)
mov    -0x10(%rbp),%rsi
add    $0x2,%rsi
lea    -0x7c(%rbp),%rdi
mov    $0x2,%edx
call   10a0 <memcpy@plt>
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
lea    -0x80(%rbp),%rdi
mov    $0x2,%edx
call   10a0 <memcpy@plt>
mov    -0x7c(%rbp),%edi
call   10c0 <ntohs@plt>
mov    %eax,-0x7c(%rbp)
mov    -0x80(%rbp),%edi
call   10c0 <ntohs@plt>
mov    %eax,-0x80(%rbp)
movzbl -0x81(%rbp),%eax
movzbl 0x2a32(%rip),%ecx
cmp    %ecx,%eax
je     17f9 <process_client_message+0x5f9>
movzbl -0x81(%rbp),%eax
movzbl 0x2a1c(%rip),%ecx
xor    %ecx,%eax
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%edi
call   10b0 <ffs@plt>
mov    %eax,-0x88(%rbp)
cmp    $0x0,%eax
je     17ed <process_client_message+0x5ed>
cmpb   $0x0,0x296f(%rip)
je     177a <process_client_message+0x57a>
lea    0x2962(%rip),%rdi
lea    0x8c9(%rip),%rsi
call   10e0 <strcat@plt>
mov    -0x20(%rbp),%rsi
lea    0x294b(%rip),%rdi
call   1050 <fputs@plt>
mov    -0x88(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x88(%rbp)
mov    -0x88(%rbp),%edx
movzbl -0x81(%rbp),%esi
mov    -0x88(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    %eax,%esi
lea    0x8a6(%rip),%rcx
lea    0x8ae(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%rcx
lea    0x28ff(%rip),%rdi
lea    0x8a7(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
mov    -0x88(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    -0x8c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
jmp    1730 <process_client_message+0x530>
mov    -0x81(%rbp),%al
mov    %al,0x294b(%rip)
mov    0x293d(%rip),%eax
cmp    -0x7c(%rbp),%eax
jne    1817 <process_client_message+0x617>
mov    0x2932(%rip),%eax
cmp    -0x80(%rbp),%eax
je     1874 <process_client_message+0x674>
cmpb   $0x0,0x28a2(%rip)
je     1847 <process_client_message+0x647>
lea    0x2895(%rip),%rdi
lea    0x7fc(%rip),%rsi
call   10e0 <strcat@plt>
mov    -0x20(%rbp),%rsi
lea    0x287e(%rip),%rdi
call   1050 <fputs@plt>
mov    -0x7c(%rbp),%edx
mov    -0x80(%rbp),%ecx
lea    0x286c(%rip),%rdi
lea    0x821(%rip),%rsi
mov    $0x0,%al
call   10f0 <sprintf@plt>
mov    -0x7c(%rbp),%eax
mov    %eax,0x28d1(%rip)
mov    -0x80(%rbp),%eax
mov    %eax,0x28cc(%rip)
jmp    18af <process_client_message+0x6af>
mov    -0x20(%rbp),%rsi
lea    0x806(%rip),%rdi
call   1050 <fputs@plt>
jmp    18af <process_client_message+0x6af>
mov    0x274b(%rip),%rax
mov    (%rax),%edi
lea    0x80f(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_client_message>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r14
mov    %rdi,%r15
movsbl (%rdi),%r13d
lea    0x18(%rsp),%rdi
lea    0x20(%rsp),%rsi
call   1040 <gettimeofday@plt>
mov    0x2efb(%rip),%eax
mov    0x2ef9(%rip),%ecx
mov    %eax,%edx
or     %ecx,%edx
je     1244 <process_client_message+0x44>
mov    0x18(%rsp),%r12d
mov    0x1c(%rsp),%ebp
jmp    1263 <process_client_message+0x63>
mov    0x18(%rsp),%rax
mov    %rax,0x2ed8(%rip)
mov    %rax,0x2ed9(%rip)
mov    %rax,%rcx
shr    $0x20,%rcx
mov    %ecx,%ebp
mov    %eax,%r12d
mov    %r12d,%edx
sub    %eax,%edx
mov    %ebp,%eax
sub    %ecx,%eax
imul   $0x3e8,%edx,%ecx
cltq
imul   $0x10624dd3,%rax,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x26,%rbx
add    %eax,%ebx
add    %ecx,%ebx
cmpb   $0x0,0x2e1f(%rip)
je     131b <process_client_message+0x11b>
cmpb   $0x0,0x2e22(%rip)
je     133b <process_client_message+0x13b>
cmpl   $0x0,0x2e8d(%rip)
je     12b7 <process_client_message+0xb7>
cmp    $0x5,%r13b
jl     133b <process_client_message+0x13b>
test   %ebx,%ebx
jle    12e4 <process_client_message+0xe4>
lea    0x2dfe(%rip),%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
lea    0x2def(%rip),%rax
add    %rax,%rdi
lea    0xd55(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   10e0 <sprintf@plt>
lea    0x2dd5(%rip),%rdi
lea    0xd3c(%rip),%rsi
call   10d0 <strcat@plt>
lea    0x2dc2(%rip),%rdi
mov    %r14,%rsi
call   1050 <fputs@plt>
mov    0x18(%rsp),%rax
mov    %rax,0x2e16(%rip)
movb   $0x0,0x2da7(%rip)
jmp    133b <process_client_message+0x13b>
movb   $0x1,0x2d8e(%rip)
lea    0xcf3(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1100 <fwrite@plt>
cmp    $0x6,%r13d
ja     1738 <process_client_message+0x538>
mov    %r13d,%eax
lea    0xcb1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
sub    0x2dd1(%rip),%r12d
sub    0x2dcf(%rip),%ebp
imul   $0x3e8,%r12d,%eax
movslq %ebp,%rcx
imul   $0x10624dd3,%rcx,%rbx
mov    %rbx,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rbx
add    %ecx,%ebx
add    %eax,%ebx
imul   $0x3e8,0x2d95(%rip),%eax
add    $0x3e8,%eax
cmp    %eax,%ebx
jle    1691 <process_client_message+0x491>
lea    0xc99(%rip),%rsi
mov    %r14d,%edi
mov    %ebx,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
movslq %ebx,%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
mov    %eax,0x2d58(%rip)
jmp    1691 <process_client_message+0x491>
lea    0x4(%r15),%rsi
lea    0xc(%rsp),%rdi
mov    $0x4,%edx
call   10a0 <memcpy@plt>
mov    0xc(%rsp),%edi
call   1110 <ntohl@plt>
mov    %eax,0xc(%rsp)
cmpb   $0x0,0x2cc8(%rip)
je     1467 <process_client_message+0x267>
cmpb   $0x0,0x1(%r15)
je     16a2 <process_client_message+0x4a2>
lea    0x2cb4(%rip),%r12
mov    %r12,%rdi
call   1030 <strlen@plt>
test   %ebx,%ebx
jle    1430 <process_client_message+0x230>
cltq
add    %rax,%r12
lea    0xc0c(%rip),%rsi
mov    %r12,%rdi
mov    %ebx,%edx
xor    %eax,%eax
call   10e0 <sprintf@plt>
lea    0x2c89(%rip),%rbx
lea    0xbf0(%rip),%rsi
mov    %rbx,%rdi
call   10d0 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <fputs@plt>
mov    0x18(%rsp),%rax
mov    %rax,0x2ccb(%rip)
movl   $0x0,0x2cd1(%rip)
cmpb   $0x0,0x1(%r15)
je     1607 <process_client_message+0x407>
mov    0xc(%rsp),%eax
mov    %eax,0x2cbc(%rip)
lea    0xbde(%rip),%r14
jmp    160e <process_client_message+0x40e>
mov    0x1(%r15),%bl
lea    0x2(%r15),%rsi
lea    0xc(%rsp),%rdi
mov    $0x2,%edx
call   10a0 <memcpy@plt>
add    $0x4,%r15
lea    0x14(%rsp),%rdi
mov    %r15,%rsi
mov    $0x2,%edx
call   10a0 <memcpy@plt>
mov    0xc(%rsp),%edi
call   10b0 <ntohs@plt>
mov    %eax,0xc(%rsp)
mov    0x14(%rsp),%edi
call   10b0 <ntohs@plt>
mov    %eax,0x14(%rsp)
mov    0x2c6f(%rip),%al
cmp    %al,%bl
je     158b <process_client_message+0x38b>
mov    %bl,0x13(%rsp)
xor    %bl,%al
je     1581 <process_client_message+0x381>
movzbl 0x13(%rsp),%ebp
movzbl %al,%r13d
bsf    %r13d,%ebx
lea    0x2bc3(%rip),%r15
lea    0xb6b(%rip),%r12
jmp    153e <process_client_message+0x33e>
cs nopw 0x0(%rax,%rax,1)
bt     %ebx,%ebp
lea    0xb47(%rip),%rcx
lea    0xb31(%rip),%rax
cmovae %rax,%rcx
mov    %r15,%rdi
mov    %r12,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   10e0 <sprintf@plt>
btc    %ebx,%r13d
bsf    %r13d,%ebx
je     1581 <process_client_message+0x381>
cmpb   $0x0,0x2b7b(%rip)
je     1510 <process_client_message+0x310>
mov    %r15,%rdi
lea    0xadd(%rip),%rsi
call   10d0 <strcat@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <fputs@plt>
jmp    1510 <process_client_message+0x310>
lea    0xb20(%rip),%rdi
mov    $0x22,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1100 <fwrite@plt>
jmp    1691 <process_client_message+0x491>
mov    0x13(%rsp),%al
mov    %al,0x2bb9(%rip)
mov    0xc(%rsp),%edx
cmp    %edx,0x2ba7(%rip)
jne    15a7 <process_client_message+0x3a7>
mov    0x2ba3(%rip),%eax
cmp    0x14(%rsp),%eax
je     1691 <process_client_message+0x491>
cmpb   $0x0,0x2b12(%rip)
je     15d5 <process_client_message+0x3d5>
lea    0x2b09(%rip),%rbx
lea    0xa70(%rip),%rsi
mov    %rbx,%rdi
call   10d0 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <fputs@plt>
mov    0xc(%rsp),%edx
mov    0x14(%rsp),%ecx
lea    0x2ae0(%rip),%rdi
lea    0xa95(%rip),%rsi
xor    %eax,%eax
call   10e0 <sprintf@plt>
mov    0xc(%rsp),%eax
mov    %eax,0x2b44(%rip)
mov    0x14(%rsp),%eax
mov    %eax,0x2b3e(%rip)
jmp    1691 <process_client_message+0x491>
lea    0xa44(%rip),%r14
movb   $0x0,0x2aaf(%rip)
movl   $0x2079656b,0x2aa1(%rip)
65 79 20
lea    0x2a9a(%rip),%r15
mov    %r15,%rdi
call   1030 <strlen@plt>
movslq %eax,%rbx
add    %r15,%rbx
mov    0xc(%rsp),%eax
cmp    $0xff,%eax
ja     165d <process_client_message+0x45d>
movsbl %al,%edi
call   10c0 <isprint@plt>
test   %eax,%eax
je     165d <process_client_message+0x45d>
movsbl 0xc(%rsp),%edi
call   1070 <isspace@plt>
test   %eax,%eax
je     1726 <process_client_message+0x526>
mov    0xc(%rsp),%edx
lea    0xa03(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   10e0 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
lea    0x9f1(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    %eax,0x2a90(%rip)
jne    1405 <process_client_message+0x205>
cmp    $0x191,%ebx
jge    1405 <process_client_message+0x205>
lea    0x29ff(%rip),%r14
lea    0x98d(%rip),%r15
mov    %r14,%rdi
mov    %r15,%rsi
call   1080 <strcspn@plt>
movslq %eax,%r12
add    %r14,%r12
mov    %r12,%rdi
mov    %r15,%rsi
call   1060 <strspn@plt>
movslq %eax,%rbx
add    %r12,%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1080 <strcspn@plt>
cltq
movb   $0x0,(%rax,%rbx,1)
mov    %rbx,%rdi
call   1120 <strdup@plt>
lea    0x94e(%rip),%rsi
mov    %r14,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   10e0 <sprintf@plt>
movl   $0x0,0x2a17(%rip)
jmp    1691 <process_client_message+0x491>
mov    0xc(%rsp),%al
mov    %al,(%rbx)
add    $0x1,%rbx
mov    %rbx,%rdi
jmp    1680 <process_client_message+0x480>
mov    0x28a1(%rip),%rax
mov    (%rax),%edi
lea    0x965(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
%struct.timezone = type { i32 }
@process_client_message.first = internal global i32 1
@process_client_message.delayed_output = internal global [100 x i8] zeroinitializer
@process_client_message.elapsed = internal global i32 0
@process_client_message.last_tv = internal global %struct.timeval zeroinitializer
@process_client_message.first_tv = internal global %struct.timeval zeroinitializer
@process_client_message.last_was_key_down = internal global i32 0
@process_client_message.current_x = internal global i32 0
@process_client_message.current_y = internal global i32 0
@process_client_message.current_buttons = internal global i8 0
@.str = [20 x i8] c"RFM 001.000\0Ashared\0A\00"
@.str.1 = [12 x i8] c" delay %dms\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [22 x i8] c"# At %dms from start\0A\00"
@.str.4 = [3 x i8] c"up\00"
@.str.5 = [3 x i8] c" \09\00"
@.str.6 = [9 x i8] c"press %s\00"
@.str.7 = [5 x i8] c"down\00"
@.str.8 = [5 x i8] c"key \00"
@.str.9 = [4 x i8] c"%#x\00"
@.str.10 = [4 x i8] c" %s\00"
@.str.11 = [13 x i8] c"button %d %s\00"
@.str.12 = [14 x i8] c"pointer %d %d\00"
@.str.13 = [35 x i8] c"# ClientCutText not supported yet\0A\00"
@stderr = global i32 0
@.str.14 = [16 x i8] c"Protocol error\0A\00"
define i32 @process_client_message(i8* %0, i8* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca %struct.timeval
%9 = alloca %struct.timeval
%10 = alloca %struct.timezone
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i32
%21 = alloca i32
%22 = alloca i8
%23 = alloca i32
%24 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32* %2, i32** %7
%25 = load i8*, i8** %5
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
store i32 %27, i32* %12
%28 = call i32 @gettimeofday(%struct.timeval* %8, %struct.timezone* %10)
%29 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.last_tv, i32 0, i32 0)
%30 = icmp ne i32 %29, 0
br i1 %30, label %36, label %31
31: ; preds = %3
%32 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.last_tv, i32 0, i32 1)
%33 = icmp ne i32 %32, 0
br i1 %33, label %36, label %34
34: ; preds = %31
%35 = bitcast %struct.timeval* %8 to i8*
br label %36
36: ; preds = %34, %31, %3
%37 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%38 = load i32, i32* %37
%39 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.last_tv, i32 0, i32 0)
%40 = sub nsw i32 %38, %39
%41 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 0
store i32 %40, i32* %41
%42 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%43 = load i32, i32* %42
%44 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.last_tv, i32 0, i32 1)
%45 = sub nsw i32 %43, %44
%46 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 1
store i32 %45, i32* %46
%47 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 0
%48 = load i32, i32* %47
%49 = mul nsw i32 %48, 1000
%50 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 1
%51 = load i32, i32* %50
%52 = sdiv i32 %51, 1000
%53 = add nsw i32 %49, %52
store i32 %53, i32* %11
%54 = load i32, i32* @process_client_message.first
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %59
56: ; preds = %36
store i32 0, i32* @process_client_message.first
%57 = load i32*, i32** %7
%58 = call i32 @fputs(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32* %57)
br label %85
59: ; preds = %36
%60 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
%61 = sext i8 %60 to i32
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %84
63: ; preds = %59
%64 = load i32, i32* @process_client_message.last_was_key_down
%65 = icmp ne i32 %64, 0
br i1 %65, label %66, label %69
66: ; preds = %63
%67 = load i32, i32* %12
%68 = icmp sgt i32 %67, 4
br i1 %68, label %69, label %84
69: ; preds = %66, %63
%70 = load i32, i32* %11
%71 = icmp sgt i32 %70, 0
br i1 %71, label %72, label %79
72: ; preds = %69
%73 = call i32 @strlen(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0))
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i64 %74
store i8* %75, i8** %13
%76 = load i8*, i8** %13
%77 = load i32, i32* %11
%78 = call i32 (i8*, i8*, ...) @sprintf(i8* %76, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %77)
br label %79
79: ; preds = %72, %69
%80 = call i32 @strcat(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%81 = load i32*, i32** %7
%82 = call i32 @fputs(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i32* %81)
%83 = bitcast %struct.timeval* %8 to i8*
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
br label %84
84: ; preds = %79, %66, %59
br label %85
85: ; preds = %84, %56
%86 = load i32, i32* %12
switch i32 %86, label %303 [
i32 0, label %87
i32 1, label %87
i32 2, label %87
i32 3, label %87
i32 4, label %118
i32 5, label %223
i32 6, label %300
]
87: ; preds = %85, %85, %85, %85
%88 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%89 = load i32, i32* %88
%90 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.first_tv, i32 0, i32 0)
%91 = sub nsw i32 %89, %90
%92 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 0
store i32 %91, i32* %92
%93 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%94 = load i32, i32* %93
%95 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.first_tv, i32 0, i32 1)
%96 = sub nsw i32 %94, %95
%97 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 1
store i32 %96, i32* %97
%98 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 0
%99 = load i32, i32* %98
%100 = mul nsw i32 %99, 1000
%101 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 1
%102 = load i32, i32* %101
%103 = sdiv i32 %102, 1000
%104 = add nsw i32 %100, %103
store i32 %104, i32* %11
%105 = load i32, i32* %11
%106 = load i32, i32* @process_client_message.elapsed
%107 = add nsw i32 1, %106
%108 = mul nsw i32 1000, %107
%109 = icmp sgt i32 %105, %108
br i1 %109, label %110, label %117
110: ; preds = %87
%111 = load i32*, i32** %7
%112 = ptrtoint i32* %111 to i32
%113 = load i32, i32* %11
%114 = call i32 (i32, i8*, ...) @fprintf(i32 %112, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %113)
%115 = load i32, i32* %11
%116 = sdiv i32 %115, 1000
store i32 %116, i32* @process_client_message.elapsed
br label %117
117: ; preds = %110, %87
store i32 0, i32* %4
br label %308
118: ; preds = %85
store i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8** %14
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8** %15
%119 = load i8*, i8** %5
%120 = getelementptr inbounds i8, i8* %119, i64 4
%121 = call i32 @memcpy(i32* %16, i8* %120, i32 4)
%122 = load i32, i32* %16
%123 = call i32 @ntohl(i32 %122)
store i32 %123, i32* %16
%124 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
%125 = icmp ne i8 %124, 0
br i1 %125, label %126, label %178
126: ; preds = %118
%127 = load i8*, i8** %5
%128 = getelementptr inbounds i8, i8* %127, i64 1
%129 = load i8, i8* %128
%130 = sext i8 %129 to i32
%131 = icmp ne i32 %130, 0
br i1 %131, label %139, label %132
132: ; preds = %126
%133 = load i32, i32* @process_client_message.last_was_key_down
%134 = load i32, i32* %16
%135 = icmp ne i32 %133, %134
br i1 %135, label %139, label %136
136: ; preds = %132
%137 = load i32, i32* %11
%138 = icmp sgt i32 %137, 400
br i1 %138, label %139, label %156
139: ; preds = %136, %132, %126
store i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8** %17
%140 = load i8*, i8** %17
%141 = call i32 @strlen(i8* %140)
%142 = load i8*, i8** %17
%143 = sext i32 %141 to i64
%144 = getelementptr inbounds i8, i8* %142, i64 %143
store i8* %144, i8** %17
%145 = load i32, i32* %11
%146 = icmp sgt i32 %145, 0
br i1 %146, label %147, label %151
147: ; preds = %139
%148 = load i8*, i8** %17
%149 = load i32, i32* %11
%150 = call i32 (i8*, i8*, ...) @sprintf(i8* %148, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %149)
br label %151
151: ; preds = %147, %139
%152 = call i32 @strcat(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%153 = load i32*, i32** %7
%154 = call i32 @fputs(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i32* %153)
%155 = bitcast %struct.timeval* %8 to i8*
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
store i32 0, i32* @process_client_message.last_was_key_down
br label %177
156: ; preds = %136
store i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8** %18
%157 = load i8*, i8** %18
%158 = call i32 @strcspn(i8* %157, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%159 = load i8*, i8** %18
%160 = sext i32 %158 to i64
%161 = getelementptr inbounds i8, i8* %159, i64 %160
store i8* %161, i8** %18
%162 = load i8*, i8** %18
%163 = call i32 @strspn(i8* %162, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%164 = load i8*, i8** %18
%165 = sext i32 %163 to i64
%166 = getelementptr inbounds i8, i8* %164, i64 %165
store i8* %166, i8** %18
%167 = load i8*, i8** %18
%168 = load i8*, i8** %18
%169 = call i32 @strcspn(i8* %168, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds i8, i8* %167, i64 %170
store i8* %171, i8** %19
%172 = load i8*, i8** %19
store i8 0, i8* %172
%173 = load i8*, i8** %18
%174 = call i8* @strdup(i8* %173)
store i8* %174, i8** %19
%175 = load i8*, i8** %19
%176 = call i32 (i8*, i8*, ...) @sprintf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* %175)
store i32 0, i32* @process_client_message.last_was_key_down
br label %307
177: ; preds = %151
br label %178
178: ; preds = %177, %118
%179 = load i8*, i8** %5
%180 = getelementptr inbounds i8, i8* %179, i64 1
%181 = load i8, i8* %180
%182 = icmp ne i8 %181, 0
br i1 %182, label %183, label %185
183: ; preds = %178
%184 = load i32, i32* %16
store i32 %184, i32* @process_client_message.last_was_key_down
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8** %15
br label %185
185: ; preds = %183, %178
%186 = load i8*, i8** %14
%187 = call i32 (i8*, i8*, ...) @sprintf(i8* %186, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%188 = load i8*, i8** %14
%189 = call i32 @strlen(i8* %188)
%190 = load i8*, i8** %14
%191 = sext i32 %189 to i64
%192 = getelementptr inbounds i8, i8* %190, i64 %191
store i8* %192, i8** %14
%193 = load i32, i32* %16
%194 = icmp ult i32 %193, 256
br i1 %194, label %195, label %210
195: ; preds = %185
%196 = load i32, i32* %16
%197 = trunc i32 %196 to i8
%198 = call i32 @isprint(i8 signext %197)
%199 = icmp ne i32 %198, 0
br i1 %199, label %200, label %210
200: ; preds = %195
%201 = load i32, i32* %16
%202 = trunc i32 %201 to i8
%203 = call i32 @isspace(i8 signext %202)
%204 = icmp ne i32 %203, 0
br i1 %204, label %210, label %205
205: ; preds = %200
%206 = load i32, i32* %16
%207 = trunc i32 %206 to i8
%208 = load i8*, i8** %14
%209 = getelementptr inbounds i8, i8* %208, i32 1
store i8* %209, i8** %14
store i8 %207, i8* %208
br label %219
210: ; preds = %200, %195, %185
%211 = load i8*, i8** %14
%212 = load i32, i32* %16
%213 = call i32 (i8*, i8*, ...) @sprintf(i8* %211, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %212)
%214 = load i8*, i8** %14
%215 = call i32 @strlen(i8* %214)
%216 = load i8*, i8** %14
%217 = sext i32 %215 to i64
%218 = getelementptr inbounds i8, i8* %216, i64 %217
store i8* %218, i8** %14
br label %219
219: ; preds = %210, %205
%220 = load i8*, i8** %14
%221 = load i8*, i8** %15
%222 = call i32 (i8*, i8*, ...) @sprintf(i8* %220, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %221)
br label %307
223: ; preds = %85
%224 = load i8*, i8** %5
%225 = getelementptr inbounds i8, i8* %224, i64 1
%226 = load i8, i8* %225
store i8 %226, i8* %22
%227 = load i8*, i8** %5
%228 = getelementptr inbounds i8, i8* %227, i64 2
%229 = call i32 @memcpy(i32* %20, i8* %228, i32 2)
%230 = load i8*, i8** %5
%231 = getelementptr inbounds i8, i8* %230, i64 4
%232 = call i32 @memcpy(i32* %21, i8* %231, i32 2)
%233 = load i32, i32* %20
%234 = call i32 @ntohs(i32 %233)
store i32 %234, i32* %20
%235 = load i32, i32* %21
%236 = call i32 @ntohs(i32 %235)
store i32 %236, i32* %21
%237 = load i8, i8* %22
%238 = zext i8 %237 to i32
%239 = load i8, i8* @process_client_message.current_buttons
%240 = zext i8 %239 to i32
%241 = icmp ne i32 %238, %240
br i1 %241, label %242, label %278
242: ; preds = %223
%243 = load i8, i8* %22
%244 = zext i8 %243 to i32
%245 = load i8, i8* @process_client_message.current_buttons
%246 = zext i8 %245 to i32
%247 = xor i32 %244, %246
store i32 %247, i32* %24
br label %248
248: ; preds = %259, %242
%249 = load i32, i32* %24
%250 = call i32 @ffs(i32 %249)
store i32 %250, i32* %23
%251 = icmp ne i32 %250, 0
br i1 %251, label %252, label %276
252: ; preds = %248
%253 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
%254 = icmp ne i8 %253, 0
br i1 %254, label %255, label %259
255: ; preds = %252
%256 = call i32 @strcat(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%257 = load i32*, i32** %7
%258 = call i32 @fputs(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i32* %257)
br label %259
259: ; preds = %255, %252
%260 = load i32, i32* %23
%261 = add nsw i32 %260, -1
store i32 %261, i32* %23
%262 = load i32, i32* %23
%263 = load i8, i8* %22
%264 = zext i8 %263 to i32
%265 = load i32, i32* %23
%266 = shl i32 1, %265
%267 = and i32 %264, %266
%268 = icmp ne i32 %267, 0
%269 = zext i1 %268 to i64
%270 = select i1 %268, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0)
%271 = call i32 (i8*, i8*, ...) @sprintf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %262, i8* %270)
%272 = load i32, i32* %23
%273 = shl i32 1, %272
%274 = load i32, i32* %24
%275 = xor i32 %274, %273
store i32 %275, i32* %24
br label %248
276: ; preds = %248
%277 = load i8, i8* %22
store i8 %277, i8* @process_client_message.current_buttons
br label %278
278: ; preds = %276, %223
%279 = load i32, i32* @process_client_message.current_x
%280 = load i32, i32* %20
%281 = icmp ne i32 %279, %280
br i1 %281, label %286, label %282
282: ; preds = %278
%283 = load i32, i32* @process_client_message.current_y
%284 = load i32, i32* %21
%285 = icmp ne i32 %283, %284
br i1 %285, label %286, label %299
286: ; preds = %282, %278
%287 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
%288 = icmp ne i8 %287, 0
br i1 %288, label %289, label %293
289: ; preds = %286
%290 = call i32 @strcat(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%291 = load i32*, i32** %7
%292 = call i32 @fputs(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i32* %291)
br label %293
293: ; preds = %289, %286
%294 = load i32, i32* %20
%295 = load i32, i32* %21
%296 = call i32 (i8*, i8*, ...) @sprintf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i32 %294, i32 %295)
%297 = load i32, i32* %20
store i32 %297, i32* @process_client_message.current_x
%298 = load i32, i32* %21
store i32 %298, i32* @process_client_message.current_y
br label %299
299: ; preds = %293, %282
br label %307
300: ; preds = %85
%301 = load i32*, i32** %7
%302 = call i32 @fputs(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0), i32* %301)
br label %307
303: ; preds = %85
%304 = load i32, i32* @stderr
%305 = call i32 (i32, i8*, ...) @fprintf(i32 %304, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0))
%306 = call i32 @exit(i32 1)
unreachable
307: ; preds = %300, %299, %219, %156
store i32 0, i32* %4
br label %308
308: ; preds = %307, %117
%309 = load i32, i32* %4
ret i32 %309
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
%struct.timezone = type { i32 }
@process_client_message.first = internal unnamed_addr global i1 false
@process_client_message.delayed_output = internal global [100 x i8] zeroinitializer
@process_client_message.elapsed = internal unnamed_addr global i32 0
@process_client_message.last_tv = internal unnamed_addr global %struct.timeval zeroinitializer
@process_client_message.first_tv = internal unnamed_addr global %struct.timeval zeroinitializer
@process_client_message.last_was_key_down = internal unnamed_addr global i32 0
@process_client_message.current_x = internal unnamed_addr global i32 0
@process_client_message.current_y = internal unnamed_addr global i32 0
@process_client_message.current_buttons = internal unnamed_addr global i8 0
@.str = [20 x i8] c"RFM 001.000\0Ashared\0A\00"
@.str.1 = [12 x i8] c" delay %dms\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [22 x i8] c"# At %dms from start\0A\00"
@.str.4 = [3 x i8] c"up\00"
@.str.5 = [3 x i8] c" \09\00"
@.str.6 = [9 x i8] c"press %s\00"
@.str.7 = [5 x i8] c"down\00"
@.str.8 = [5 x i8] c"key \00"
@.str.9 = [4 x i8] c"%#x\00"
@.str.10 = [4 x i8] c" %s\00"
@.str.11 = [13 x i8] c"button %d %s\00"
@.str.12 = [14 x i8] c"pointer %d %d\00"
@.str.13 = [35 x i8] c"# ClientCutText not supported yet\0A\00"
@stderr = global i32 0
@.str.14 = [16 x i8] c"Protocol error\0A\00"
define i32 @process_client_message(i8* %0, i8* nocapture readnone %1, i32* %2) {
%4 = alloca i64
%5 = bitcast i64* %4 to %struct.timeval*
%6 = alloca %struct.timezone
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = bitcast i64* %4 to i8*
%11 = bitcast %struct.timezone* %6 to i8*
%12 = load i8, i8* %0
%13 = sext i8 %12 to i32
%14 = call i32 @gettimeofday(%struct.timeval* %5, %struct.timezone* %6)
%15 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.last_tv, i64 0, i32 0)
%16 = icmp ne i32 %15, 0
%17 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.last_tv, i64 0, i32 1)
%18 = icmp ne i32 %17, 0
%19 = select i1 %16, i1 true, i1 %18
br i1 %19, label %20, label %25
20: ; preds = %3
%21 = bitcast i64* %4 to i32*
%22 = load i32, i32* %21
%23 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%24 = load i32, i32* %23
br label %30
25: ; preds = %3
%26 = load i64, i64* %4
store i64 %26, i64* bitcast (%struct.timeval* @process_client_message.last_tv to i64*)
store i64 %26, i64* bitcast (%struct.timeval* @process_client_message.first_tv to i64*)
%27 = trunc i64 %26 to i32
%28 = lshr i64 %26, 32
%29 = trunc i64 %28 to i32
br label %30
30: ; preds = %20, %25
%31 = phi i32 [ %17, %20 ], [ %29, %25 ]
%32 = phi i32 [ %24, %20 ], [ %29, %25 ]
%33 = phi i32 [ %15, %20 ], [ %27, %25 ]
%34 = phi i32 [ %22, %20 ], [ %27, %25 ]
%35 = sub nsw i32 %34, %33
%36 = sub nsw i32 %32, %31
%37 = mul nsw i32 %35, 1000
%38 = sdiv i32 %36, 1000
%39 = add nsw i32 %38, %37
%40 = load i1, i1* @process_client_message.first
br i1 %40, label %43, label %41
41: ; preds = %30
store i1 true, i1* @process_client_message.first
%42 = tail call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i64 19, i64 1, i32* %2)
br label %62
43: ; preds = %30
%44 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
%45 = icmp eq i8 %44, 0
br i1 %45, label %62, label %46
46: ; preds = %43
%47 = load i32, i32* @process_client_message.last_was_key_down
%48 = icmp eq i32 %47, 0
%49 = icmp sgt i8 %12, 4
%50 = select i1 %48, i1 true, i1 %49
br i1 %50, label %51, label %62
51: ; preds = %46
%52 = icmp sgt i32 %39, 0
br i1 %52, label %53, label %58
53: ; preds = %51
%54 = tail call i32 @strlen(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0))
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 %55
%57 = tail call i32 (i8*, i8*, ...) @sprintf(i8* %56, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %39)
br label %58
58: ; preds = %53, %51
%59 = tail call i32 @strcat(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%60 = tail call i32 @fputs(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i32* %2)
%61 = load i64, i64* %4
store i64 %61, i64* bitcast (%struct.timeval* @process_client_message.last_tv to i64*)
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
br label %62
62: ; preds = %43, %58, %46, %41
switch i32 %13, label %220 [
i32 0, label %63
i32 1, label %63
i32 2, label %63
i32 3, label %63
i32 4, label %80
i32 5, label %156
i32 6, label %218
]
63: ; preds = %62, %62, %62, %62
%64 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.first_tv, i64 0, i32 0)
%65 = sub nsw i32 %34, %64
%66 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.first_tv, i64 0, i32 1)
%67 = sub nsw i32 %32, %66
%68 = mul nsw i32 %65, 1000
%69 = sdiv i32 %67, 1000
%70 = add nsw i32 %69, %68
%71 = load i32, i32* @process_client_message.elapsed
%72 = mul i32 %71, 1000
%73 = add i32 %72, 1000
%74 = icmp sgt i32 %70, %73
br i1 %74, label %75, label %224
75: ; preds = %63
%76 = ptrtoint i32* %2 to i64
%77 = trunc i64 %76 to i32
%78 = tail call i32 (i32, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %70)
%79 = sdiv i32 %70, 1000
store i32 %79, i32* @process_client_message.elapsed
br label %224
80: ; preds = %62
%81 = bitcast i32* %7 to i8*
%82 = getelementptr inbounds i8, i8* %0, i64 4
%83 = call i32 @memcpy(i32* %7, i8* %82, i32 4)
%84 = load i32, i32* %7
%85 = call i32 @ntohl(i32 %84)
store i32 %85, i32* %7
%86 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
%87 = icmp eq i8 %86, 0
br i1 %87, label %120, label %88
88: ; preds = %80
%89 = getelementptr inbounds i8, i8* %0, i64 1
%90 = load i8, i8* %89
%91 = icmp eq i8 %90, 0
br i1 %91, label %92, label %97
92: ; preds = %88
%93 = load i32, i32* @process_client_message.last_was_key_down
%94 = icmp ne i32 %93, %85
%95 = icmp sgt i32 %39, 400
%96 = select i1 %94, i1 true, i1 %95
br i1 %96, label %97, label %108
97: ; preds = %92, %88
%98 = call i32 @strlen(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0))
%99 = icmp sgt i32 %39, 0
br i1 %99, label %100, label %104
100: ; preds = %97
%101 = sext i32 %98 to i64
%102 = getelementptr inbounds [100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 %101
%103 = call i32 (i8*, i8*, ...) @sprintf(i8* %102, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %39)
br label %104
104: ; preds = %100, %97
%105 = call i32 @strcat(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%106 = call i32 @fputs(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i32* %2)
%107 = load i64, i64* %4
store i64 %107, i64* bitcast (%struct.timeval* @process_client_message.last_tv to i64*)
store i32 0, i32* @process_client_message.last_was_key_down
br label %120
108: ; preds = %92
%109 = call i32 @strcspn(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds [100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 %110
%112 = call i32 @strspn(i8* %111, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i8, i8* %111, i64 %113
%115 = call i32 @strcspn(i8* %114, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i8, i8* %114, i64 %116
store i8 0, i8* %117
%118 = call i8* @strdup(i8* %114)
%119 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* %118)
store i32 0, i32* @process_client_message.last_was_key_down
br label %155
120: ; preds = %104, %80
%121 = getelementptr inbounds i8, i8* %0, i64 1
%122 = load i8, i8* %121
%123 = icmp eq i8 %122, 0
br i1 %123, label %126, label %124
124: ; preds = %120
%125 = load i32, i32* %7
store i32 %125, i32* @process_client_message.last_was_key_down
br label %126
126: ; preds = %124, %120
%127 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), %124 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), %120 ]
%128 = call i32 @strlen(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0))
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds [100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 %129
%131 = load i32, i32* %7
%132 = icmp ult i32 %131, 256
br i1 %132, label %133, label %146
133: ; preds = %126
%134 = trunc i32 %131 to i8
%135 = call i32 @isprint(i8 signext %134)
%136 = icmp eq i32 %135, 0
br i1 %136, label %146, label %137
137: ; preds = %133
%138 = load i32, i32* %7
%139 = trunc i32 %138 to i8
%140 = call i32 @isspace(i8 signext %139)
%141 = icmp eq i32 %140, 0
br i1 %141, label %142, label %146
142: ; preds = %137
%143 = load i32, i32* %7
%144 = trunc i32 %143 to i8
%145 = getelementptr inbounds i8, i8* %130, i64 1
store i8 %144, i8* %130
br label %152
146: ; preds = %137, %133, %126
%147 = load i32, i32* %7
%148 = call i32 (i8*, i8*, ...) @sprintf(i8* %130, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %147)
%149 = call i32 @strlen(i8* %130)
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i8, i8* %130, i64 %150
br label %152
152: ; preds = %146, %142
%153 = phi i8* [ %151, %146 ], [ %145, %142 ]
%154 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %153, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %127)
br label %155
155: ; preds = %152, %108
br label %224
156: ; preds = %62
%157 = bitcast i32* %8 to i8*
%158 = bitcast i32* %9 to i8*
%159 = getelementptr inbounds i8, i8* %0, i64 1
%160 = load i8, i8* %159
%161 = getelementptr inbounds i8, i8* %0, i64 2
%162 = call i32 @memcpy(i32* %8, i8* %161, i32 2)
%163 = getelementptr inbounds i8, i8* %0, i64 4
%164 = call i32 @memcpy(i32* %9, i8* %163, i32 2)
%165 = load i32, i32* %8
%166 = call i32 @ntohs(i32 %165)
store i32 %166, i32* %8
%167 = load i32, i32* %9
%168 = call i32 @ntohs(i32 %167)
store i32 %168, i32* %9
%169 = zext i8 %160 to i32
%170 = load i8, i8* @process_client_message.current_buttons
%171 = icmp eq i8 %160, %170
br i1 %171, label %196, label %172
172: ; preds = %156
%173 = xor i8 %170, %160
%174 = zext i8 %173 to i32
%175 = icmp eq i8 %173, 0
br i1 %175, label %195, label %176
176: ; preds = %172
%177 = call i32 @llvm.cttz.i32(i32 %174, i1 true)
br label %178
178: ; preds = %176, %186
%179 = phi i32 [ %193, %186 ], [ %177, %176 ]
%180 = phi i32 [ %192, %186 ], [ %174, %176 ]
%181 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
%182 = icmp eq i8 %181, 0
br i1 %182, label %186, label %183
183: ; preds = %178
%184 = call i32 @strcat(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%185 = call i32 @fputs(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i32* %2)
br label %186
186: ; preds = %183, %178
%187 = shl nuw i32 1, %179
%188 = and i32 %187, %169
%189 = icmp eq i32 %188, 0
%190 = select i1 %189, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0)
%191 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %179, i8* %190)
%192 = xor i32 %187, %180
%193 = call i32 @llvm.cttz.i32(i32 %192, i1 true)
%194 = icmp eq i32 %192, 0
br i1 %194, label %195, label %178
195: ; preds = %186, %172
store i8 %160, i8* @process_client_message.current_buttons
br label %196
196: ; preds = %195, %156
%197 = load i32, i32* @process_client_message.current_x
%198 = load i32, i32* %8
%199 = icmp eq i32 %197, %198
br i1 %199, label %200, label %204
200: ; preds = %196
%201 = load i32, i32* @process_client_message.current_y
%202 = load i32, i32* %9
%203 = icmp eq i32 %201, %202
br i1 %203, label %217, label %204
204: ; preds = %200, %196
%205 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
%206 = icmp eq i8 %205, 0
br i1 %206, label %211, label %207
207: ; preds = %204
%208 = call i32 @strcat(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%209 = call i32 @fputs(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i32* %2)
%210 = load i32, i32* %8
br label %211
211: ; preds = %207, %204
%212 = phi i32 [ %210, %207 ], [ %198, %204 ]
%213 = load i32, i32* %9
%214 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i32 %212, i32 %213)
%215 = load i32, i32* %8
store i32 %215, i32* @process_client_message.current_x
%216 = load i32, i32* %9
store i32 %216, i32* @process_client_message.current_y
br label %217
217: ; preds = %211, %200
br label %224
218: ; preds = %62
%219 = tail call i64 @fwrite(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0), i64 34, i64 1, i32* %2)
br label %224
220: ; preds = %62
%221 = load i32, i32* @stderr
%222 = tail call i32 (i32, i8*, ...) @fprintf(i32 %221, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0))
%223 = tail call i32 @exit(i32 1)
unreachable
224: ; preds = %155, %217, %218, %63, %75
ret i32 0
}