#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 *, unsigned 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(unsigned 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
movzbl (%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
movzbl 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
mov    (%rdi),%r13b
lea    0x18(%rsp),%rdi
lea    0x20(%rsp),%rsi
call   1040 <gettimeofday@plt>
mov    0x2efc(%rip),%eax
mov    0x2efa(%rip),%ecx
mov    %eax,%edx
or     %ecx,%edx
je     1243 <process_client_message+0x43>
mov    0x18(%rsp),%r12d
mov    0x1c(%rsp),%ebp
jmp    1262 <process_client_message+0x62>
mov    0x18(%rsp),%rax
mov    %rax,0x2ed9(%rip)
mov    %rax,0x2eda(%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,0x2e20(%rip)
je     131a <process_client_message+0x11a>
cmpb   $0x0,0x2e23(%rip)
je     133a <process_client_message+0x13a>
cmpl   $0x0,0x2e8e(%rip)
je     12b6 <process_client_message+0xb6>
cmp    $0x5,%r13b
jb     133a <process_client_message+0x13a>
test   %ebx,%ebx
jle    12e3 <process_client_message+0xe3>
lea    0x2dff(%rip),%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
lea    0x2df0(%rip),%rax
add    %rax,%rdi
lea    0xd56(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   10e0 <sprintf@plt>
lea    0x2dd6(%rip),%rdi
lea    0xd3d(%rip),%rsi
call   10d0 <strcat@plt>
lea    0x2dc3(%rip),%rdi
mov    %r14,%rsi
call   1050 <fputs@plt>
mov    0x18(%rsp),%rax
mov    %rax,0x2e17(%rip)
movb   $0x0,0x2da8(%rip)
jmp    133a <process_client_message+0x13a>
movb   $0x1,0x2d8f(%rip)
lea    0xcf4(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1100 <fwrite@plt>
cmp    $0x6,%r13b
ja     1738 <process_client_message+0x538>
movzbl %r13b,%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 = zext 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 = zext 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 = call i32 @gettimeofday(%struct.timeval* %5, %struct.timezone* %6)
%14 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.last_tv, i64 0, i32 0)
%15 = icmp ne i32 %14, 0
%16 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.last_tv, i64 0, i32 1)
%17 = icmp ne i32 %16, 0
%18 = select i1 %15, i1 true, i1 %17
br i1 %18, label %19, label %24
19: ; preds = %3
%20 = bitcast i64* %4 to i32*
%21 = load i32, i32* %20
%22 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%23 = load i32, i32* %22
br label %29
24: ; preds = %3
%25 = load i64, i64* %4
store i64 %25, i64* bitcast (%struct.timeval* @process_client_message.last_tv to i64*)
store i64 %25, i64* bitcast (%struct.timeval* @process_client_message.first_tv to i64*)
%26 = trunc i64 %25 to i32
%27 = lshr i64 %25, 32
%28 = trunc i64 %27 to i32
br label %29
29: ; preds = %19, %24
%30 = phi i32 [ %16, %19 ], [ %28, %24 ]
%31 = phi i32 [ %23, %19 ], [ %28, %24 ]
%32 = phi i32 [ %14, %19 ], [ %26, %24 ]
%33 = phi i32 [ %21, %19 ], [ %26, %24 ]
%34 = sub nsw i32 %33, %32
%35 = sub nsw i32 %31, %30
%36 = mul nsw i32 %34, 1000
%37 = sdiv i32 %35, 1000
%38 = add nsw i32 %37, %36
%39 = load i1, i1* @process_client_message.first
br i1 %39, label %42, label %40
40: ; preds = %29
store i1 true, i1* @process_client_message.first
%41 = 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 %61
42: ; preds = %29
%43 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
%44 = icmp eq i8 %43, 0
br i1 %44, label %61, label %45
45: ; preds = %42
%46 = load i32, i32* @process_client_message.last_was_key_down
%47 = icmp eq i32 %46, 0
%48 = icmp ugt i8 %12, 4
%49 = select i1 %47, i1 true, i1 %48
br i1 %49, label %50, label %61
50: ; preds = %45
%51 = icmp sgt i32 %38, 0
br i1 %51, label %52, label %57
52: ; preds = %50
%53 = tail call i32 @strlen(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0))
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 %54
%56 = tail call i32 (i8*, i8*, ...) @sprintf(i8* %55, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %38)
br label %57
57: ; preds = %52, %50
%58 = 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))
%59 = tail call i32 @fputs(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i32* %2)
%60 = load i64, i64* %4
store i64 %60, 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 %61
61: ; preds = %42, %57, %45, %40
switch i8 %12, label %219 [
i8 0, label %62
i8 1, label %62
i8 2, label %62
i8 3, label %62
i8 4, label %79
i8 5, label %155
i8 6, label %217
]
62: ; preds = %61, %61, %61, %61
%63 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.first_tv, i64 0, i32 0)
%64 = sub nsw i32 %33, %63
%65 = load i32, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @process_client_message.first_tv, i64 0, i32 1)
%66 = sub nsw i32 %31, %65
%67 = mul nsw i32 %64, 1000
%68 = sdiv i32 %66, 1000
%69 = add nsw i32 %68, %67
%70 = load i32, i32* @process_client_message.elapsed
%71 = mul i32 %70, 1000
%72 = add i32 %71, 1000
%73 = icmp sgt i32 %69, %72
br i1 %73, label %74, label %223
74: ; preds = %62
%75 = ptrtoint i32* %2 to i64
%76 = trunc i64 %75 to i32
%77 = tail call i32 (i32, i8*, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %69)
%78 = sdiv i32 %69, 1000
store i32 %78, i32* @process_client_message.elapsed
br label %223
79: ; preds = %61
%80 = bitcast i32* %7 to i8*
%81 = getelementptr inbounds i8, i8* %0, i64 4
%82 = call i32 @memcpy(i32* %7, i8* %81, i32 4)
%83 = load i32, i32* %7
%84 = call i32 @ntohl(i32 %83)
store i32 %84, i32* %7
%85 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
%86 = icmp eq i8 %85, 0
br i1 %86, label %119, label %87
87: ; preds = %79
%88 = getelementptr inbounds i8, i8* %0, i64 1
%89 = load i8, i8* %88
%90 = icmp eq i8 %89, 0
br i1 %90, label %91, label %96
91: ; preds = %87
%92 = load i32, i32* @process_client_message.last_was_key_down
%93 = icmp ne i32 %92, %84
%94 = icmp sgt i32 %38, 400
%95 = select i1 %93, i1 true, i1 %94
br i1 %95, label %96, label %107
96: ; preds = %91, %87
%97 = call i32 @strlen(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0))
%98 = icmp sgt i32 %38, 0
br i1 %98, label %99, label %103
99: ; preds = %96
%100 = sext i32 %97 to i64
%101 = getelementptr inbounds [100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 %100
%102 = call i32 (i8*, i8*, ...) @sprintf(i8* %101, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %38)
br label %103
103: ; preds = %99, %96
%104 = 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))
%105 = call i32 @fputs(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i32* %2)
%106 = load i64, i64* %4
store i64 %106, i64* bitcast (%struct.timeval* @process_client_message.last_tv to i64*)
store i32 0, i32* @process_client_message.last_was_key_down
br label %119
107: ; preds = %91
%108 = 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))
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 %109
%111 = call i32 @strspn(i8* %110, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i8, i8* %110, i64 %112
%114 = call i32 @strcspn(i8* %113, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i8, i8* %113, i64 %115
store i8 0, i8* %116
%117 = call i8* @strdup(i8* %113)
%118 = 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* %117)
store i32 0, i32* @process_client_message.last_was_key_down
br label %154
119: ; preds = %103, %79
%120 = getelementptr inbounds i8, i8* %0, i64 1
%121 = load i8, i8* %120
%122 = icmp eq i8 %121, 0
br i1 %122, label %125, label %123
123: ; preds = %119
%124 = load i32, i32* %7
store i32 %124, i32* @process_client_message.last_was_key_down
br label %125
125: ; preds = %123, %119
%126 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), %123 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), %119 ]
%127 = call i32 @strlen(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0))
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds [100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 %128
%130 = load i32, i32* %7
%131 = icmp ult i32 %130, 256
br i1 %131, label %132, label %145
132: ; preds = %125
%133 = trunc i32 %130 to i8
%134 = call i32 @isprint(i8 signext %133)
%135 = icmp eq i32 %134, 0
br i1 %135, label %145, label %136
136: ; preds = %132
%137 = load i32, i32* %7
%138 = trunc i32 %137 to i8
%139 = call i32 @isspace(i8 signext %138)
%140 = icmp eq i32 %139, 0
br i1 %140, label %141, label %145
141: ; preds = %136
%142 = load i32, i32* %7
%143 = trunc i32 %142 to i8
%144 = getelementptr inbounds i8, i8* %129, i64 1
store i8 %143, i8* %129
br label %151
145: ; preds = %136, %132, %125
%146 = load i32, i32* %7
%147 = call i32 (i8*, i8*, ...) @sprintf(i8* %129, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %146)
%148 = call i32 @strlen(i8* %129)
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds i8, i8* %129, i64 %149
br label %151
151: ; preds = %145, %141
%152 = phi i8* [ %150, %145 ], [ %144, %141 ]
%153 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %152, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %126)
br label %154
154: ; preds = %151, %107
br label %223
155: ; preds = %61
%156 = bitcast i32* %8 to i8*
%157 = bitcast i32* %9 to i8*
%158 = getelementptr inbounds i8, i8* %0, i64 1
%159 = load i8, i8* %158
%160 = getelementptr inbounds i8, i8* %0, i64 2
%161 = call i32 @memcpy(i32* %8, i8* %160, i32 2)
%162 = getelementptr inbounds i8, i8* %0, i64 4
%163 = call i32 @memcpy(i32* %9, i8* %162, i32 2)
%164 = load i32, i32* %8
%165 = call i32 @ntohs(i32 %164)
store i32 %165, i32* %8
%166 = load i32, i32* %9
%167 = call i32 @ntohs(i32 %166)
store i32 %167, i32* %9
%168 = zext i8 %159 to i32
%169 = load i8, i8* @process_client_message.current_buttons
%170 = icmp eq i8 %159, %169
br i1 %170, label %195, label %171
171: ; preds = %155
%172 = xor i8 %169, %159
%173 = zext i8 %172 to i32
%174 = icmp eq i8 %172, 0
br i1 %174, label %194, label %175
175: ; preds = %171
%176 = call i32 @llvm.cttz.i32(i32 %173, i1 true)
br label %177
177: ; preds = %175, %185
%178 = phi i32 [ %192, %185 ], [ %176, %175 ]
%179 = phi i32 [ %191, %185 ], [ %173, %175 ]
%180 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
%181 = icmp eq i8 %180, 0
br i1 %181, label %185, label %182
182: ; preds = %177
%183 = 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))
%184 = 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 %185
185: ; preds = %182, %177
%186 = shl nuw i32 1, %178
%187 = and i32 %186, %168
%188 = icmp eq i32 %187, 0
%189 = select i1 %188, 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)
%190 = 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 %178, i8* %189)
%191 = xor i32 %186, %179
%192 = call i32 @llvm.cttz.i32(i32 %191, i1 true)
%193 = icmp eq i32 %191, 0
br i1 %193, label %194, label %177
194: ; preds = %185, %171
store i8 %159, i8* @process_client_message.current_buttons
br label %195
195: ; preds = %194, %155
%196 = load i32, i32* @process_client_message.current_x
%197 = load i32, i32* %8
%198 = icmp eq i32 %196, %197
br i1 %198, label %199, label %203
199: ; preds = %195
%200 = load i32, i32* @process_client_message.current_y
%201 = load i32, i32* %9
%202 = icmp eq i32 %200, %201
br i1 %202, label %216, label %203
203: ; preds = %199, %195
%204 = load i8, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0)
%205 = icmp eq i8 %204, 0
br i1 %205, label %210, label %206
206: ; preds = %203
%207 = 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))
%208 = call i32 @fputs(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @process_client_message.delayed_output, i64 0, i64 0), i32* %2)
%209 = load i32, i32* %8
br label %210
210: ; preds = %206, %203
%211 = phi i32 [ %209, %206 ], [ %197, %203 ]
%212 = load i32, i32* %9
%213 = 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 %211, i32 %212)
%214 = load i32, i32* %8
store i32 %214, i32* @process_client_message.current_x
%215 = load i32, i32* %9
store i32 %215, i32* @process_client_message.current_y
br label %216
216: ; preds = %210, %199
br label %223
217: ; preds = %61
%218 = 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 %223
219: ; preds = %61
%220 = load i32, i32* @stderr
%221 = tail call i32 (i32, i8*, ...) @fprintf(i32 %220, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0))
%222 = tail call i32 @exit(i32 1)
unreachable
223: ; preds = %154, %216, %217, %62, %74
ret i32 0
}