#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 int flags;

/* Variables and functions */
int csc_memdump_find_step(int);
int sprintf(char *, char *, unsigned char);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int csc_memdump_line(void *mem, int msize, int flags, char *buf, int blen) {
  char *mp, format[32], tmp[64];
  int n, sp, step, amnt;
  step = csc_memdump_find_step(flags);
  strcpy(format, "%");
  if (flags & 0x10000) {
    strcat(format, "-");
  }
  n = (flags & 0xf00) >> 8;
  if (n > 0) {
    if (flags & 0x4000) {
      sprintf(tmp, "%d", n);
    } else {
      sprintf(tmp, "0%d", n);
    }
  } else if (flags & 0x4000) {
    strcpy(tmp, "");
  } else if (((((flags)&0xf0) == 0x10) || (((flags)&0xf0) == 0))) {
    sprintf(tmp, "0%d", step * 2);
  } else if ((flags & 0xf0) == 0x40) {
    sprintf(tmp, "0%d", step * 3);
  } else {
    strcpy(tmp, "");
  }
  strcat(format, tmp);
  if ((flags & 0xf) == 3) {
    strcat(format, "ll");
  }
  switch (flags & 0xf0) {
  case 0x10:
    strcat(format, "x");
    break;
  case 0x20:
    strcat(format, "u");
    break;
  case 0x30:
    strcat(format, "d");
    break;
  case 0x40:
    strcat(format, "o");
    break;
  default:
    if ((flags & 0xf) == 4) {
      strcat(format, "f");
      break;
    }
    if ((flags & 0xf) == 5) {
      strcat(format, "e");
      break;
    }
    strcat(format, "X");
    break;
  }
  if ((flags & 0x8000) == 0) {
    strcat(format, " ");
  }
  amnt = 0;
  if ((flags & 0x2000) == 0) {
    n = sprintf(tmp, "%lX: ", (unsigned long)mem);
    if (buf && (blen > n)) {
      strcpy(buf, tmp);
      buf += n;
      blen -= n;
    }
    amnt += n;
  }
  mp = mem;
  sp = msize;
  while (sp >= step) {
    switch (flags & 0xf) {
    case 1:
      if ((((flags)&0xf0) == 0x30)) {
        n = sprintf(tmp, format, *((short *)mp));
      } else {
        n = sprintf(tmp, format, *((unsigned short *)mp));
      }
      break;
    case 2:
      if ((((flags)&0xf0) == 0x30)) {
        n = sprintf(tmp, format, *((int *)mp));
      } else {
        n = sprintf(tmp, format, *((unsigned *)mp));
      }
      break;
    case 3:
      if ((((flags)&0xf0) == 0x30)) {
        n = sprintf(tmp, format, *((long long *)mp));
      } else {
        n = sprintf(tmp, format, *((unsigned long long *)mp));
      }
      break;
    case 4:
      n = sprintf(tmp, format, *((float *)mp));
      break;
    case 5:
      n = sprintf(tmp, format, *((double *)mp));
      break;
    default:
      if ((((flags)&0xf0) == 0x30)) {
        n = sprintf(tmp, format, *mp);
      } else {
        n = sprintf(tmp, format, *((unsigned char *)mp));
      }
      break;
    }
    if (buf && blen >= n) {
      strcpy(buf, tmp);
      buf += n;
      blen -= n;
    }
    amnt += n;
    if (flags & 0x20000) {
      mp -= step;
    } else {
      mp += step;
    }
    sp -= step;
  }
  if (flags & 0x1000) {
    return amnt;
  }
  if (buf && blen > 0) {
    strcpy(buf, " ");
    buf++;
    blen--;
  }
  amnt++;
  mp = mem;
  sp = msize;
  while (sp) {
    if (buf && blen > 0) {
      if ((*mp < ' ') || (*mp > 0x7e)) {
        *buf++ = '.';
      } else {
        *buf++ = *mp;
      }
      blen--;
    }
    if (flags & 0x20000) {
      mp--;
    } else {
      mp++;
    }
    sp--;
    amnt++;
  }
  if (buf && blen > 0) {
    *buf++ = 0;
  }
  return amnt;
}


x86 assembly (clang, -O0):
<csc_memdump_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x18(%rbp),%edi
call   1040 <csc_memdump_find_step@plt>
mov    %eax,-0x9c(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xe9e(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%eax
and    $0x10000,%eax
cmp    $0x0,%eax
je     119c <csc_memdump_line+0x5c>
lea    -0x50(%rbp),%rdi
lea    0xe7f(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x18(%rbp),%eax
and    $0xf00,%eax
sar    $0x8,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x0,-0x94(%rbp)
jle    120d <csc_memdump_line+0xcd>
mov    -0x18(%rbp),%eax
and    $0x4000,%eax
cmp    $0x0,%eax
je     11ec <csc_memdump_line+0xac>
lea    -0x90(%rbp),%rdi
mov    -0x94(%rbp),%eax
lea    0xe3a(%rip),%rsi
movzbl %al,%edx
call   1060 <sprintf@plt>
jmp    1208 <csc_memdump_line+0xc8>
lea    -0x90(%rbp),%rdi
mov    -0x94(%rbp),%eax
lea    0xe18(%rip),%rsi
movzbl %al,%edx
call   1060 <sprintf@plt>
jmp    12d1 <csc_memdump_line+0x191>
mov    -0x18(%rbp),%eax
and    $0x4000,%eax
cmp    $0x0,%eax
je     1236 <csc_memdump_line+0xf6>
lea    -0x90(%rbp),%rdi
lea    0xe04(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12cc <csc_memdump_line+0x18c>
mov    -0x18(%rbp),%eax
and    $0xf0,%eax
cmp    $0x10,%eax
je     1258 <csc_memdump_line+0x118>
mov    -0x18(%rbp),%eax
and    $0xf0,%eax
cmp    $0x0,%eax
jne    127c <csc_memdump_line+0x13c>
lea    -0x90(%rbp),%rdi
mov    -0x9c(%rbp),%eax
shl    $0x1,%eax
lea    0xda9(%rip),%rsi
movzbl %al,%edx
call   1060 <sprintf@plt>
jmp    12c7 <csc_memdump_line+0x187>
mov    -0x18(%rbp),%eax
and    $0xf0,%eax
cmp    $0x40,%eax
jne    12af <csc_memdump_line+0x16f>
lea    -0x90(%rbp),%rdi
imul   $0x3,-0x9c(%rbp),%eax
lea    0xd76(%rip),%rsi
movzbl %al,%edx
call   1060 <sprintf@plt>
jmp    12c2 <csc_memdump_line+0x182>
lea    -0x90(%rbp),%rdi
lea    0xd73(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12c7 <csc_memdump_line+0x187>
jmp    12cc <csc_memdump_line+0x18c>
jmp    12d1 <csc_memdump_line+0x191>
lea    -0x50(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1050 <strcat@plt>
mov    -0x18(%rbp),%eax
and    $0xf,%eax
cmp    $0x3,%eax
jne    1300 <csc_memdump_line+0x1c0>
lea    -0x50(%rbp),%rdi
lea    0xd21(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x18(%rbp),%eax
and    $0xf0,%eax
mov    %eax,-0xa4(%rbp)
sub    $0x10,%eax
je     1358 <csc_memdump_line+0x218>
jmp    131c <csc_memdump_line+0x1dc>
mov    -0xa4(%rbp),%eax
sub    $0x20,%eax
je     136d <csc_memdump_line+0x22d>
jmp    1330 <csc_memdump_line+0x1f0>
mov    -0xa4(%rbp),%eax
sub    $0x30,%eax
je     1382 <csc_memdump_line+0x242>
jmp    1344 <csc_memdump_line+0x204>
mov    -0xa4(%rbp),%eax
sub    $0x40,%eax
je     1397 <csc_memdump_line+0x257>
jmp    13ac <csc_memdump_line+0x26c>
lea    -0x50(%rbp),%rdi
lea    0xcbc(%rip),%rsi
call   1050 <strcat@plt>
jmp    1404 <csc_memdump_line+0x2c4>
lea    -0x50(%rbp),%rdi
lea    0xca9(%rip),%rsi
call   1050 <strcat@plt>
jmp    1404 <csc_memdump_line+0x2c4>
lea    -0x50(%rbp),%rdi
lea    0xc8d(%rip),%rsi
call   1050 <strcat@plt>
jmp    1404 <csc_memdump_line+0x2c4>
lea    -0x50(%rbp),%rdi
lea    0xc81(%rip),%rsi
call   1050 <strcat@plt>
jmp    1404 <csc_memdump_line+0x2c4>
mov    -0x18(%rbp),%eax
and    $0xf,%eax
cmp    $0x4,%eax
jne    13d0 <csc_memdump_line+0x290>
lea    -0x50(%rbp),%rdi
lea    0xc5f(%rip),%rsi
call   1050 <strcat@plt>
jmp    1404 <csc_memdump_line+0x2c4>
mov    -0x18(%rbp),%eax
and    $0xf,%eax
cmp    $0x5,%eax
jne    13f4 <csc_memdump_line+0x2b4>
lea    -0x50(%rbp),%rdi
lea    0xc3d(%rip),%rsi
call   1050 <strcat@plt>
jmp    1404 <csc_memdump_line+0x2c4>
lea    -0x50(%rbp),%rdi
lea    0xc2a(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x18(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
jne    1425 <csc_memdump_line+0x2e5>
lea    -0x50(%rbp),%rdi
lea    0xc0f(%rip),%rsi
call   1050 <strcat@plt>
movl   $0x0,-0xa0(%rbp)
mov    -0x18(%rbp),%eax
and    $0x2000,%eax
cmp    $0x0,%eax
jne    14be <csc_memdump_line+0x37e>
lea    -0x90(%rbp),%rdi
mov    -0x10(%rbp),%rax
lea    0xbd9(%rip),%rsi
movzbl %al,%edx
call   1060 <sprintf@plt>
mov    %eax,-0x94(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     14ac <csc_memdump_line+0x36c>
mov    -0x24(%rbp),%eax
cmp    -0x94(%rbp),%eax
jle    14ac <csc_memdump_line+0x36c>
mov    -0x20(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x94(%rbp),%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x94(%rbp),%ecx
mov    -0x24(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x94(%rbp),%eax
add    -0xa0(%rbp),%eax
mov    %eax,-0xa0(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x98(%rbp)
mov    -0x98(%rbp),%eax
cmp    -0x9c(%rbp),%eax
jl     177d <csc_memdump_line+0x63d>
mov    -0x18(%rbp),%eax
and    $0xf,%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0xb0(%rbp)
sub    $0x4,%eax
ja     166e <csc_memdump_line+0x52e>
mov    -0xb0(%rbp),%rax
lea    0xaf6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x18(%rbp),%eax
and    $0xf0,%eax
cmp    $0x30,%eax
jne    1549 <csc_memdump_line+0x409>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x30(%rbp),%rax
mov    (%rax),%ax
movzbl %al,%edx
call   1060 <sprintf@plt>
mov    %eax,-0x94(%rbp)
jmp    1569 <csc_memdump_line+0x429>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x30(%rbp),%rax
mov    (%rax),%ax
movzbl %al,%edx
call   1060 <sprintf@plt>
mov    %eax,-0x94(%rbp)
jmp    16c3 <csc_memdump_line+0x583>
mov    -0x18(%rbp),%eax
and    $0xf0,%eax
cmp    $0x30,%eax
jne    15a3 <csc_memdump_line+0x463>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
movzbl %al,%edx
call   1060 <sprintf@plt>
mov    %eax,-0x94(%rbp)
jmp    15c2 <csc_memdump_line+0x482>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
movzbl %al,%edx
call   1060 <sprintf@plt>
mov    %eax,-0x94(%rbp)
jmp    16c3 <csc_memdump_line+0x583>
mov    -0x18(%rbp),%eax
and    $0xf0,%eax
cmp    $0x30,%eax
jne    15fd <csc_memdump_line+0x4bd>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x30(%rbp),%rax
mov    (%rax),%rax
movzbl %al,%edx
call   1060 <sprintf@plt>
mov    %eax,-0x94(%rbp)
jmp    161d <csc_memdump_line+0x4dd>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x30(%rbp),%rax
mov    (%rax),%rax
movzbl %al,%edx
call   1060 <sprintf@plt>
mov    %eax,-0x94(%rbp)
jmp    16c3 <csc_memdump_line+0x583>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x30(%rbp),%rax
cvttss2si (%rax),%eax
movzbl %al,%edx
call   1060 <sprintf@plt>
mov    %eax,-0x94(%rbp)
jmp    16c3 <csc_memdump_line+0x583>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x30(%rbp),%rax
cvttsd2si (%rax),%eax
movzbl %al,%edx
call   1060 <sprintf@plt>
mov    %eax,-0x94(%rbp)
jmp    16c3 <csc_memdump_line+0x583>
mov    -0x18(%rbp),%eax
and    $0xf0,%eax
cmp    $0x30,%eax
jne    16a1 <csc_memdump_line+0x561>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x30(%rbp),%rax
movzbl (%rax),%edx
call   1060 <sprintf@plt>
mov    %eax,-0x94(%rbp)
jmp    16be <csc_memdump_line+0x57e>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x30(%rbp),%rax
movzbl (%rax),%edx
call   1060 <sprintf@plt>
mov    %eax,-0x94(%rbp)
jmp    16c3 <csc_memdump_line+0x583>
cmpq   $0x0,-0x20(%rbp)
je     170f <csc_memdump_line+0x5cf>
mov    -0x24(%rbp),%eax
cmp    -0x94(%rbp),%eax
jl     170f <csc_memdump_line+0x5cf>
mov    -0x20(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x94(%rbp),%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x94(%rbp),%ecx
mov    -0x24(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x94(%rbp),%eax
add    -0xa0(%rbp),%eax
mov    %eax,-0xa0(%rbp)
mov    -0x18(%rbp),%eax
and    $0x20000,%eax
cmp    $0x0,%eax
je     1750 <csc_memdump_line+0x610>
mov    -0x9c(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
jmp    1764 <csc_memdump_line+0x624>
mov    -0x9c(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x9c(%rbp),%ecx
mov    -0x98(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x98(%rbp)
jmp    14cf <csc_memdump_line+0x38f>
mov    -0x18(%rbp),%eax
and    $0x1000,%eax
cmp    $0x0,%eax
je     179c <csc_memdump_line+0x65c>
mov    -0xa0(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    18f0 <csc_memdump_line+0x7b0>
cmpq   $0x0,-0x20(%rbp)
je     17d6 <csc_memdump_line+0x696>
cmpl   $0x0,-0x24(%rbp)
jle    17d6 <csc_memdump_line+0x696>
mov    -0x20(%rbp),%rdi
lea    0x873(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
mov    -0xa0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa0(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x98(%rbp)
cmpl   $0x0,-0x98(%rbp)
je     18c0 <csc_memdump_line+0x780>
cmpq   $0x0,-0x20(%rbp)
je     186f <csc_memdump_line+0x72f>
cmpl   $0x0,-0x24(%rbp)
jle    186f <csc_memdump_line+0x72f>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jl     1838 <csc_memdump_line+0x6f8>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7e,%eax
jle    184f <csc_memdump_line+0x70f>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movb   $0x2e,(%rax)
jmp    1866 <csc_memdump_line+0x726>
mov    -0x30(%rbp),%rax
mov    (%rax),%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%eax
and    $0x20000,%eax
cmp    $0x0,%eax
je     1891 <csc_memdump_line+0x751>
mov    -0x30(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x30(%rbp)
jmp    189d <csc_memdump_line+0x75d>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x98(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x98(%rbp)
mov    -0xa0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa0(%rbp)
jmp    17f6 <csc_memdump_line+0x6b6>
cmpq   $0x0,-0x20(%rbp)
je     18e7 <csc_memdump_line+0x7a7>
cmpl   $0x0,-0x24(%rbp)
jle    18e7 <csc_memdump_line+0x7a7>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movb   $0x0,(%rax)
mov    -0xa0(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csc_memdump_line>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r8d,%r15d
mov    %rcx,%r14
mov    %edx,%ebp
mov    %esi,%r13d
mov    %rdi,0x8(%rsp)
mov    %edx,%edi
call   1040 <csc_memdump_find_step@plt>
mov    %eax,%r12d
lea    0xeb2(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1030 <strcpy@plt>
test   $0x10000,%ebp
je     1195 <csc_memdump_line+0x55>
lea    0xe9b(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1050 <strcat@plt>
mov    %ebp,%eax
shr    $0x8,%eax
and    $0xf,%eax
je     11b3 <csc_memdump_line+0x73>
movzbl %al,%edx
test   $0x4000,%ebp
je     11e9 <csc_memdump_line+0xa9>
lea    0xe78(%rip),%rsi
jmp    11f0 <csc_memdump_line+0xb0>
test   $0x4000,%ebp
jne    11cf <csc_memdump_line+0x8f>
mov    %ebp,%eax
and    $0xf0,%al
je     11c9 <csc_memdump_line+0x89>
cmp    $0x40,%al
je     11e2 <csc_memdump_line+0xa2>
cmp    $0x10,%al
jne    11cf <csc_memdump_line+0x8f>
lea    (%r12,%r12,1),%eax
jmp    11e6 <csc_memdump_line+0xa6>
lea    0xe6a(%rip),%rsi
lea    0x50(%rsp),%rdi
call   1030 <strcpy@plt>
jmp    11fa <csc_memdump_line+0xba>
lea    (%r12,%r12,2),%eax
movzbl %al,%edx
lea    0xe38(%rip),%rsi
lea    0x50(%rsp),%rdi
call   1060 <sprintf@plt>
lea    0x30(%rsp),%rdi
lea    0x50(%rsp),%rsi
call   1050 <strcat@plt>
mov    %ebp,%eax
and    $0xf,%eax
mov    %rax,%rbx
cmp    $0x3,%eax
jne    1227 <csc_memdump_line+0xe7>
lea    0xe0f(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1050 <strcat@plt>
mov    %ebp,%eax
and    $0xf0,%eax
add    $0xfffffff0,%eax
cmp    $0x40,%eax
jae    1249 <csc_memdump_line+0x109>
shr    $0x4,%eax
lea    0xdd4(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
jmp    126f <csc_memdump_line+0x12f>
mov    %rbx,%rdx
cmp    $0x5,%edx
lea    0xde1(%rip),%rax
lea    0xddc(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x4,%edx
lea    0xdca(%rip),%rsi
cmovne %rcx,%rsi
lea    0x30(%rsp),%rdi
call   1050 <strcat@plt>
mov    %ebp,(%rsp)
test   $0x8000,%ebp
jne    1295 <csc_memdump_line+0x155>
lea    0xdb4(%rip),%rsi
lea    0x30(%rsp),%rdi
call   1050 <strcat@plt>
xor    %ecx,%ecx
testl  $0x2000,(%rsp)
jne    12e5 <csc_memdump_line+0x1a5>
movzbl 0x8(%rsp),%edx
lea    0xd8f(%rip),%rsi
lea    0x50(%rsp),%rdi
call   1060 <sprintf@plt>
mov    %eax,%ebp
test   %r14,%r14
je     12dc <csc_memdump_line+0x19c>
cmp    %r15d,%ebp
jge    12e3 <csc_memdump_line+0x1a3>
lea    0x50(%rsp),%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
movslq %ebp,%rax
add    %rax,%r14
mov    %ebp,%ecx
sub    %ebp,%r15d
jmp    12e5 <csc_memdump_line+0x1a5>
mov    %ebp,%ecx
xor    %r14d,%r14d
jmp    12e5 <csc_memdump_line+0x1a5>
mov    %ebp,%ecx
cmp    %r13d,%r12d
mov    %r15d,0x4(%rsp)
mov    %r13,0x20(%rsp)
jle    135d <csc_memdump_line+0x21d>
mov    %ecx,%r12d
testl  $0x1000,(%rsp)
mov    0x4(%rsp),%r15d
jne    1470 <csc_memdump_line+0x330>
test   %r14,%r14
je     132a <csc_memdump_line+0x1ea>
test   %r15d,%r15d
jle    132a <csc_memdump_line+0x1ea>
lea    0xd25(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
add    $0x1,%r14
add    $0xffffffff,%r15d
mov    0x8(%rsp),%rbx
mov    0x20(%rsp),%rdx
test   %edx,%edx
je     145e <csc_memdump_line+0x31e>
mov    (%rsp),%eax
and    $0x20000,%eax
neg    %eax
sbb    %rax,%rax
or     $0x1,%rax
test   $0x1,%dl
jne    1424 <csc_memdump_line+0x2e4>
mov    %edx,%ecx
jmp    1456 <csc_memdump_line+0x316>
movslq %r12d,%rax
mov    %rax,%rdx
neg    %rdx
testl  $0x20000,(%rsp)
cmove  %rax,%rdx
mov    %rdx,0x28(%rsp)
mov    %rbx,%rbp
add    $0xffffffff,%ebp
mov    %r13d,%ebx
mov    0x8(%rsp),%r15
mov    %r12,0x18(%rsp)
mov    %ecx,%r12d
jmp    13aa <csc_memdump_line+0x26a>
xchg   %ax,%ax
xor    %r14d,%r14d
mov    0x18(%rsp),%rax
add    %r13d,%r12d
add    0x28(%rsp),%r15
sub    %eax,%ebx
cmp    %eax,%ebx
jl     12f7 <csc_memdump_line+0x1b7>
cmp    $0x4,%ebp
ja     13bf <csc_memdump_line+0x27f>
lea    0xc4a(%rip),%rcx
movslq (%rcx,%rbp,4),%rax
add    %rcx,%rax
jmp    *%rax
movzbl (%r15),%eax
movzbl %al,%edx
lea    0x50(%rsp),%rdi
lea    0x30(%rsp),%rsi
call   1060 <sprintf@plt>
mov    %eax,%r13d
test   %r14,%r14
je     1390 <csc_memdump_line+0x250>
mov    %r12d,0x14(%rsp)
mov    %r14,%r12
mov    0x4(%rsp),%r14d
sub    %r13d,%r14d
jl     1407 <csc_memdump_line+0x2c7>
mov    %r12,%rdi
lea    0x50(%rsp),%rsi
call   1030 <strcpy@plt>
movslq %r13d,%rax
add    %rax,%r12
mov    %r14d,0x4(%rsp)
mov    %r12,%r14
mov    0x18(%rsp),%rax
mov    0x14(%rsp),%r12d
jmp    1398 <csc_memdump_line+0x258>
cvttss2si (%r15),%eax
jmp    13c3 <csc_memdump_line+0x283>
cvttsd2si (%r15),%eax
jmp    13c3 <csc_memdump_line+0x283>
mov    %rdx,%rsi
test   %r14,%r14
je     144d <csc_memdump_line+0x30d>
test   %r15d,%r15d
jle    144d <csc_memdump_line+0x30d>
movzbl (%rbx),%ecx
lea    -0x7f(%rcx),%edx
cmp    $0xa1,%dl
mov    $0x2e,%edx
cmovae %ecx,%edx
mov    %dl,(%r14)
add    $0x1,%r14
add    $0xffffffff,%r15d
add    %rax,%rbx
mov    %rsi,%rdx
lea    -0x1(%rsi),%ecx
add    %edx,%r12d
cmp    $0x1,%edx
jne    1485 <csc_memdump_line+0x345>
add    $0x1,%r12d
test   %r14,%r14
je     1470 <csc_memdump_line+0x330>
test   %r15d,%r15d
jle    1470 <csc_memdump_line+0x330>
movb   $0x0,(%r14)
mov    %r12d,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x2e,%edx
jmp    149b <csc_memdump_line+0x35b>
nopl   0x0(%rax)
add    %rax,%rsi
mov    %rsi,%rbx
add    $0xfffffffe,%ecx
je     145e <csc_memdump_line+0x31e>
test   %r14,%r14
je     14bd <csc_memdump_line+0x37d>
test   %r15d,%r15d
jle    14bd <csc_memdump_line+0x37d>
movzbl (%rbx),%esi
lea    -0x7f(%rsi),%edi
cmp    $0xa1,%dil
cmovb  %edx,%esi
mov    %sil,(%r14)
add    $0x1,%r14
add    $0xffffffff,%r15d
lea    (%rbx,%rax,1),%rsi
test   %r14,%r14
je     1490 <csc_memdump_line+0x350>
test   %r15d,%r15d
jle    1490 <csc_memdump_line+0x350>
movzbl (%rbx,%rax,1),%edi
lea    -0x7f(%rdi),%ebx
cmp    $0xa1,%bl
cmovb  %edx,%edi
mov    %dil,(%r14)
add    $0x1,%r14
add    $0xffffffff,%r15d
jmp    1490 <csc_memdump_line+0x350>

LLVM IR (-O0):
@.str = [2 x i8] c"%\00"
@.str.1 = [2 x i8] c"-\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [4 x i8] c"0%d\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [3 x i8] c"ll\00"
@.str.6 = [2 x i8] c"x\00"
@.str.7 = [2 x i8] c"u\00"
@.str.8 = [2 x i8] c"d\00"
@.str.9 = [2 x i8] c"o\00"
@.str.10 = [2 x i8] c"f\00"
@.str.11 = [2 x i8] c"e\00"
@.str.12 = [2 x i8] c"X\00"
@.str.13 = [2 x i8] c" \00"
@.str.14 = [6 x i8] c"%lX: \00"
define i32 @csc_memdump_line(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i8*
%13 = alloca [32 x i8]
%14 = alloca [64 x i8]
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i8* %3, i8** %10
store i32 %4, i32* %11
%19 = load i32, i32* %9
%20 = call i32 @csc_memdump_find_step(i32 %19)
store i32 %20, i32* %17
%21 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%22 = call i32 @strcpy(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%23 = load i32, i32* %9
%24 = and i32 %23, 65536
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %5
%27 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%28 = call i32 @strcat(i8* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %29
29: ; preds = %26, %5
%30 = load i32, i32* %9
%31 = and i32 %30, 3840
%32 = ashr i32 %31, 8
store i32 %32, i32* %15
%33 = load i32, i32* %15
%34 = icmp sgt i32 %33, 0
br i1 %34, label %35, label %50
35: ; preds = %29
%36 = load i32, i32* %9
%37 = and i32 %36, 16384
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %44
39: ; preds = %35
%40 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%41 = load i32, i32* %15
%42 = trunc i32 %41 to i8
%43 = call i32 @sprintf(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %42)
br label %49
44: ; preds = %35
%45 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%46 = load i32, i32* %15
%47 = trunc i32 %46 to i8
%48 = call i32 @sprintf(i8* %45, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8 zeroext %47)
br label %49
49: ; preds = %44, %39
br label %87
50: ; preds = %29
%51 = load i32, i32* %9
%52 = and i32 %51, 16384
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %57
54: ; preds = %50
%55 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%56 = call i32 @strcpy(i8* %55, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
br label %86
57: ; preds = %50
%58 = load i32, i32* %9
%59 = and i32 %58, 240
%60 = icmp eq i32 %59, 16
br i1 %60, label %65, label %61
61: ; preds = %57
%62 = load i32, i32* %9
%63 = and i32 %62, 240
%64 = icmp eq i32 %63, 0
br i1 %64, label %65, label %71
65: ; preds = %61, %57
%66 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%67 = load i32, i32* %17
%68 = mul nsw i32 %67, 2
%69 = trunc i32 %68 to i8
%70 = call i32 @sprintf(i8* %66, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8 zeroext %69)
br label %85
71: ; preds = %61
%72 = load i32, i32* %9
%73 = and i32 %72, 240
%74 = icmp eq i32 %73, 64
br i1 %74, label %75, label %81
75: ; preds = %71
%76 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%77 = load i32, i32* %17
%78 = mul nsw i32 %77, 3
%79 = trunc i32 %78 to i8
%80 = call i32 @sprintf(i8* %76, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8 zeroext %79)
br label %84
81: ; preds = %71
%82 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%83 = call i32 @strcpy(i8* %82, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
br label %84
84: ; preds = %81, %75
br label %85
85: ; preds = %84, %65
br label %86
86: ; preds = %85, %54
br label %87
87: ; preds = %86, %49
%88 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%89 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%90 = call i32 @strcat(i8* %88, i8* %89)
%91 = load i32, i32* %9
%92 = and i32 %91, 15
%93 = icmp eq i32 %92, 3
br i1 %93, label %94, label %97
94: ; preds = %87
%95 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%96 = call i32 @strcat(i8* %95, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %97
97: ; preds = %94, %87
%98 = load i32, i32* %9
%99 = and i32 %98, 240
switch i32 %99, label %112 [
i32 16, label %100
i32 32, label %103
i32 48, label %106
i32 64, label %109
]
100: ; preds = %97
%101 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%102 = call i32 @strcat(i8* %101, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %129
103: ; preds = %97
%104 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%105 = call i32 @strcat(i8* %104, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %129
106: ; preds = %97
%107 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%108 = call i32 @strcat(i8* %107, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %129
109: ; preds = %97
%110 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%111 = call i32 @strcat(i8* %110, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %129
112: ; preds = %97
%113 = load i32, i32* %9
%114 = and i32 %113, 15
%115 = icmp eq i32 %114, 4
br i1 %115, label %116, label %119
116: ; preds = %112
%117 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%118 = call i32 @strcat(i8* %117, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %129
119: ; preds = %112
%120 = load i32, i32* %9
%121 = and i32 %120, 15
%122 = icmp eq i32 %121, 5
br i1 %122, label %123, label %126
123: ; preds = %119
%124 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%125 = call i32 @strcat(i8* %124, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %129
126: ; preds = %119
%127 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%128 = call i32 @strcat(i8* %127, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %129
129: ; preds = %126, %123, %116, %109, %106, %103, %100
%130 = load i32, i32* %9
%131 = and i32 %130, 32768
%132 = icmp eq i32 %131, 0
br i1 %132, label %133, label %136
133: ; preds = %129
%134 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%135 = call i32 @strcat(i8* %134, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
br label %136
136: ; preds = %133, %129
store i32 0, i32* %18
%137 = load i32, i32* %9
%138 = and i32 %137, 8192
%139 = icmp eq i32 %138, 0
br i1 %139, label %140, label %167
140: ; preds = %136
%141 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%142 = load i8*, i8** %7
%143 = ptrtoint i8* %142 to i64
%144 = trunc i64 %143 to i8
%145 = call i32 @sprintf(i8* %141, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8 zeroext %144)
store i32 %145, i32* %15
%146 = load i8*, i8** %10
%147 = icmp ne i8* %146, null
br i1 %147, label %148, label %163
148: ; preds = %140
%149 = load i32, i32* %11
%150 = load i32, i32* %15
%151 = icmp sgt i32 %149, %150
br i1 %151, label %152, label %163
152: ; preds = %148
%153 = load i8*, i8** %10
%154 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%155 = call i32 @strcpy(i8* %153, i8* %154)
%156 = load i32, i32* %15
%157 = load i8*, i8** %10
%158 = sext i32 %156 to i64
%159 = getelementptr inbounds i8, i8* %157, i64 %158
store i8* %159, i8** %10
%160 = load i32, i32* %15
%161 = load i32, i32* %11
%162 = sub nsw i32 %161, %160
store i32 %162, i32* %11
br label %163
163: ; preds = %152, %148, %140
%164 = load i32, i32* %15
%165 = load i32, i32* %18
%166 = add nsw i32 %165, %164
store i32 %166, i32* %18
br label %167
167: ; preds = %163, %136
%168 = load i8*, i8** %7
store i8* %168, i8** %12
%169 = load i32, i32* %8
store i32 %169, i32* %16
br label %170
170: ; preds = %309, %167
%171 = load i32, i32* %16
%172 = load i32, i32* %17
%173 = icmp sge i32 %171, %172
br i1 %173, label %174, label %313
174: ; preds = %170
%175 = load i32, i32* %9
%176 = and i32 %175, 15
switch i32 %176, label %256 [
i32 1, label %177
i32 2, label %198
i32 3, label %219
i32 4, label %240
i32 5, label %248
]
177: ; preds = %174
%178 = load i32, i32* %9
%179 = and i32 %178, 240
%180 = icmp eq i32 %179, 48
br i1 %180, label %181, label %189
181: ; preds = %177
%182 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%183 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%184 = load i8*, i8** %12
%185 = bitcast i8* %184 to i16*
%186 = load i16, i16* %185
%187 = trunc i16 %186 to i8
%188 = call i32 @sprintf(i8* %182, i8* %183, i8 zeroext %187)
store i32 %188, i32* %15
br label %197
189: ; preds = %177
%190 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%191 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%192 = load i8*, i8** %12
%193 = bitcast i8* %192 to i16*
%194 = load i16, i16* %193
%195 = trunc i16 %194 to i8
%196 = call i32 @sprintf(i8* %190, i8* %191, i8 zeroext %195)
store i32 %196, i32* %15
br label %197
197: ; preds = %189, %181
br label %273
198: ; preds = %174
%199 = load i32, i32* %9
%200 = and i32 %199, 240
%201 = icmp eq i32 %200, 48
br i1 %201, label %202, label %210
202: ; preds = %198
%203 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%204 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%205 = load i8*, i8** %12
%206 = bitcast i8* %205 to i32*
%207 = load i32, i32* %206
%208 = trunc i32 %207 to i8
%209 = call i32 @sprintf(i8* %203, i8* %204, i8 zeroext %208)
store i32 %209, i32* %15
br label %218
210: ; preds = %198
%211 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%212 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%213 = load i8*, i8** %12
%214 = bitcast i8* %213 to i32*
%215 = load i32, i32* %214
%216 = trunc i32 %215 to i8
%217 = call i32 @sprintf(i8* %211, i8* %212, i8 zeroext %216)
store i32 %217, i32* %15
br label %218
218: ; preds = %210, %202
br label %273
219: ; preds = %174
%220 = load i32, i32* %9
%221 = and i32 %220, 240
%222 = icmp eq i32 %221, 48
br i1 %222, label %223, label %231
223: ; preds = %219
%224 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%225 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%226 = load i8*, i8** %12
%227 = bitcast i8* %226 to i64*
%228 = load i64, i64* %227
%229 = trunc i64 %228 to i8
%230 = call i32 @sprintf(i8* %224, i8* %225, i8 zeroext %229)
store i32 %230, i32* %15
br label %239
231: ; preds = %219
%232 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%233 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%234 = load i8*, i8** %12
%235 = bitcast i8* %234 to i64*
%236 = load i64, i64* %235
%237 = trunc i64 %236 to i8
%238 = call i32 @sprintf(i8* %232, i8* %233, i8 zeroext %237)
store i32 %238, i32* %15
br label %239
239: ; preds = %231, %223
br label %273
240: ; preds = %174
%241 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%242 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%243 = load i8*, i8** %12
%244 = bitcast i8* %243 to float*
%245 = load float, float* %244
%246 = fptoui float %245 to i8
%247 = call i32 @sprintf(i8* %241, i8* %242, i8 zeroext %246)
store i32 %247, i32* %15
br label %273
248: ; preds = %174
%249 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%250 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%251 = load i8*, i8** %12
%252 = bitcast i8* %251 to double*
%253 = load double, double* %252
%254 = fptoui double %253 to i8
%255 = call i32 @sprintf(i8* %249, i8* %250, i8 zeroext %254)
store i32 %255, i32* %15
br label %273
256: ; preds = %174
%257 = load i32, i32* %9
%258 = and i32 %257, 240
%259 = icmp eq i32 %258, 48
br i1 %259, label %260, label %266
260: ; preds = %256
%261 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%262 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%263 = load i8*, i8** %12
%264 = load i8, i8* %263
%265 = call i32 @sprintf(i8* %261, i8* %262, i8 zeroext %264)
store i32 %265, i32* %15
br label %272
266: ; preds = %256
%267 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%268 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%269 = load i8*, i8** %12
%270 = load i8, i8* %269
%271 = call i32 @sprintf(i8* %267, i8* %268, i8 zeroext %270)
store i32 %271, i32* %15
br label %272
272: ; preds = %266, %260
br label %273
273: ; preds = %272, %248, %240, %239, %218, %197
%274 = load i8*, i8** %10
%275 = icmp ne i8* %274, null
br i1 %275, label %276, label %291
276: ; preds = %273
%277 = load i32, i32* %11
%278 = load i32, i32* %15
%279 = icmp sge i32 %277, %278
br i1 %279, label %280, label %291
280: ; preds = %276
%281 = load i8*, i8** %10
%282 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%283 = call i32 @strcpy(i8* %281, i8* %282)
%284 = load i32, i32* %15
%285 = load i8*, i8** %10
%286 = sext i32 %284 to i64
%287 = getelementptr inbounds i8, i8* %285, i64 %286
store i8* %287, i8** %10
%288 = load i32, i32* %15
%289 = load i32, i32* %11
%290 = sub nsw i32 %289, %288
store i32 %290, i32* %11
br label %291
291: ; preds = %280, %276, %273
%292 = load i32, i32* %15
%293 = load i32, i32* %18
%294 = add nsw i32 %293, %292
store i32 %294, i32* %18
%295 = load i32, i32* %9
%296 = and i32 %295, 131072
%297 = icmp ne i32 %296, 0
br i1 %297, label %298, label %304
298: ; preds = %291
%299 = load i32, i32* %17
%300 = load i8*, i8** %12
%301 = sext i32 %299 to i64
%302 = sub i64 0, %301
%303 = getelementptr inbounds i8, i8* %300, i64 %302
store i8* %303, i8** %12
br label %309
304: ; preds = %291
%305 = load i32, i32* %17
%306 = load i8*, i8** %12
%307 = sext i32 %305 to i64
%308 = getelementptr inbounds i8, i8* %306, i64 %307
store i8* %308, i8** %12
br label %309
309: ; preds = %304, %298
%310 = load i32, i32* %17
%311 = load i32, i32* %16
%312 = sub nsw i32 %311, %310
store i32 %312, i32* %16
br label %170
313: ; preds = %170
%314 = load i32, i32* %9
%315 = and i32 %314, 4096
%316 = icmp ne i32 %315, 0
br i1 %316, label %317, label %319
317: ; preds = %313
%318 = load i32, i32* %18
store i32 %318, i32* %6
br label %393
319: ; preds = %313
%320 = load i8*, i8** %10
%321 = icmp ne i8* %320, null
br i1 %321, label %322, label %332
322: ; preds = %319
%323 = load i32, i32* %11
%324 = icmp sgt i32 %323, 0
br i1 %324, label %325, label %332
325: ; preds = %322
%326 = load i8*, i8** %10
%327 = call i32 @strcpy(i8* %326, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%328 = load i8*, i8** %10
%329 = getelementptr inbounds i8, i8* %328, i32 1
store i8* %329, i8** %10
%330 = load i32, i32* %11
%331 = add nsw i32 %330, -1
store i32 %331, i32* %11
br label %332
332: ; preds = %325, %322, %319
%333 = load i32, i32* %18
%334 = add nsw i32 %333, 1
store i32 %334, i32* %18
%335 = load i8*, i8** %7
store i8* %335, i8** %12
%336 = load i32, i32* %8
store i32 %336, i32* %16
br label %337
337: ; preds = %377, %332
%338 = load i32, i32* %16
%339 = icmp ne i32 %338, 0
br i1 %339, label %340, label %382
340: ; preds = %337
%341 = load i8*, i8** %10
%342 = icmp ne i8* %341, null
br i1 %342, label %343, label %367
343: ; preds = %340
%344 = load i32, i32* %11
%345 = icmp sgt i32 %344, 0
br i1 %345, label %346, label %367
346: ; preds = %343
%347 = load i8*, i8** %12
%348 = load i8, i8* %347
%349 = sext i8 %348 to i32
%350 = icmp slt i32 %349, 32
br i1 %350, label %356, label %351
351: ; preds = %346
%352 = load i8*, i8** %12
%353 = load i8, i8* %352
%354 = sext i8 %353 to i32
%355 = icmp sgt i32 %354, 126
br i1 %355, label %356, label %359
356: ; preds = %351, %346
%357 = load i8*, i8** %10
%358 = getelementptr inbounds i8, i8* %357, i32 1
store i8* %358, i8** %10
store i8 46, i8* %357
br label %364
359: ; preds = %351
%360 = load i8*, i8** %12
%361 = load i8, i8* %360
%362 = load i8*, i8** %10
%363 = getelementptr inbounds i8, i8* %362, i32 1
store i8* %363, i8** %10
store i8 %361, i8* %362
br label %364
364: ; preds = %359, %356
%365 = load i32, i32* %11
%366 = add nsw i32 %365, -1
store i32 %366, i32* %11
br label %367
367: ; preds = %364, %343, %340
%368 = load i32, i32* %9
%369 = and i32 %368, 131072
%370 = icmp ne i32 %369, 0
br i1 %370, label %371, label %374
371: ; preds = %367
%372 = load i8*, i8** %12
%373 = getelementptr inbounds i8, i8* %372, i32 -1
store i8* %373, i8** %12
br label %377
374: ; preds = %367
%375 = load i8*, i8** %12
%376 = getelementptr inbounds i8, i8* %375, i32 1
store i8* %376, i8** %12
br label %377
377: ; preds = %374, %371
%378 = load i32, i32* %16
%379 = add nsw i32 %378, -1
store i32 %379, i32* %16
%380 = load i32, i32* %18
%381 = add nsw i32 %380, 1
store i32 %381, i32* %18
br label %337
382: ; preds = %337
%383 = load i8*, i8** %10
%384 = icmp ne i8* %383, null
br i1 %384, label %385, label %391
385: ; preds = %382
%386 = load i32, i32* %11
%387 = icmp sgt i32 %386, 0
br i1 %387, label %388, label %391
388: ; preds = %385
%389 = load i8*, i8** %10
%390 = getelementptr inbounds i8, i8* %389, i32 1
store i8* %390, i8** %10
store i8 0, i8* %389
br label %391
391: ; preds = %388, %385, %382
%392 = load i32, i32* %18
store i32 %392, i32* %6
br label %393
393: ; preds = %391, %317
%394 = load i32, i32* %6
ret i32 %394
}

LLVM IR (-O2):
@.str = [2 x i8] c"%\00"
@.str.1 = [2 x i8] c"-\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [4 x i8] c"0%d\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [3 x i8] c"ll\00"
@.str.6 = [2 x i8] c"x\00"
@.str.7 = [2 x i8] c"u\00"
@.str.8 = [2 x i8] c"d\00"
@.str.9 = [2 x i8] c"o\00"
@.str.10 = [2 x i8] c"f\00"
@.str.11 = [2 x i8] c"e\00"
@.str.12 = [2 x i8] c"X\00"
@.str.13 = [2 x i8] c" \00"
@.str.14 = [6 x i8] c"%lX: \00"
@reltable.csc_memdump_line = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.6 to i64), i64 ptrtoint ([4 x i32]* @reltable.csc_memdump_line to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.7 to i64), i64 ptrtoint ([4 x i32]* @reltable.csc_memdump_line to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.8 to i64), i64 ptrtoint ([4 x i32]* @reltable.csc_memdump_line to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.9 to i64), i64 ptrtoint ([4 x i32]* @reltable.csc_memdump_line to i64)) to i32)]
define i32 @csc_memdump_line(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca [32 x i8]
%7 = alloca [64 x i8]
%8 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%10 = tail call i32 @csc_memdump_find_step(i32 %2)
%11 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = and i32 %2, 65536
%13 = icmp eq i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %5
%15 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %5
%17 = lshr i32 %2, 8
%18 = and i32 %17, 15
%19 = icmp eq i32 %18, 0
%20 = and i32 %2, 16384
%21 = icmp eq i32 %20, 0
br i1 %19, label %28, label %22
22: ; preds = %16
%23 = trunc i32 %18 to i8
br i1 %21, label %26, label %24
24: ; preds = %22
%25 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %23)
br label %44
26: ; preds = %22
%27 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8 zeroext %23)
br label %44
28: ; preds = %16
br i1 %21, label %31, label %29
29: ; preds = %28
%30 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
br label %44
31: ; preds = %28
%32 = trunc i32 %2 to i8
%33 = and i8 %32, -16
switch i8 %33, label %42 [
i8 16, label %34
i8 0, label %34
i8 64, label %38
]
34: ; preds = %31, %31
%35 = trunc i32 %10 to i8
%36 = shl i8 %35, 1
%37 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8 zeroext %36)
br label %44
38: ; preds = %31
%39 = trunc i32 %10 to i8
%40 = mul i8 %39, 3
%41 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8 zeroext %40)
br label %44
42: ; preds = %31
%43 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
br label %44
44: ; preds = %29, %38, %42, %34, %24, %26
%45 = call i32 @strcat(i8* %8, i8* %9)
%46 = and i32 %2, 15
%47 = icmp eq i32 %46, 3
br i1 %47, label %48, label %50
48: ; preds = %44
%49 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %50
50: ; preds = %48, %44
%51 = and i32 %2, 240
%52 = add nsw i32 %51, -16
%53 = icmp ult i32 %52, 64
br i1 %53, label %59, label %54
54: ; preds = %50
%55 = icmp eq i32 %46, 5
%56 = select i1 %55, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0)
%57 = icmp eq i32 %46, 4
%58 = select i1 %57, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i8* %56
br label %64
59: ; preds = %50
%60 = lshr exact i32 %52, 4
%61 = zext i32 %60 to i64
%62 = shl i64 %61, 2
%63 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.csc_memdump_line to i8*), i64 %62)
br label %64
64: ; preds = %59, %54
%65 = phi i8* [ %58, %54 ], [ %63, %59 ]
%66 = call i32 @strcat(i8* %8, i8* %65)
%67 = and i32 %2, 32768
%68 = icmp eq i32 %67, 0
br i1 %68, label %69, label %71
69: ; preds = %64
%70 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
br label %71
71: ; preds = %69, %64
%72 = and i32 %2, 8192
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %86
74: ; preds = %71
%75 = ptrtoint i8* %0 to i64
%76 = trunc i64 %75 to i8
%77 = call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8 zeroext %76)
%78 = icmp eq i8* %3, null
br i1 %78, label %86, label %79
79: ; preds = %74
%80 = icmp slt i32 %77, %4
br i1 %80, label %81, label %86
81: ; preds = %79
%82 = call i32 @strcpy(i8* %3, i8* %9)
%83 = sext i32 %77 to i64
%84 = getelementptr inbounds i8, i8* %3, i64 %83
%85 = sub nsw i32 %4, %77
br label %86
86: ; preds = %74, %79, %81, %71
%87 = phi i8* [ %3, %71 ], [ %84, %81 ], [ %3, %79 ], [ null, %74 ]
%88 = phi i32 [ %4, %71 ], [ %85, %81 ], [ %4, %79 ], [ %4, %74 ]
%89 = phi i32 [ 0, %71 ], [ %77, %81 ], [ %77, %79 ], [ %77, %74 ]
%90 = icmp sgt i32 %10, %1
br i1 %90, label %143, label %91
91: ; preds = %86
%92 = and i32 %2, 131072
%93 = icmp eq i32 %92, 0
%94 = sext i32 %10 to i64
%95 = sub nsw i64 0, %94
%96 = select i1 %93, i64 %94, i64 %95
br label %97
97: ; preds = %91, %136
%98 = phi i32 [ %89, %91 ], [ %139, %136 ]
%99 = phi i32 [ %1, %91 ], [ %141, %136 ]
%100 = phi i8* [ %0, %91 ], [ %140, %136 ]
%101 = phi i32 [ %88, %91 ], [ %138, %136 ]
%102 = phi i8* [ %87, %91 ], [ %137, %136 ]
switch i32 %46, label %123 [
i32 1, label %103
i32 2, label %107
i32 3, label %111
i32 4, label %115
i32 5, label %119
]
103: ; preds = %97
%104 = bitcast i8* %100 to i16*
%105 = load i16, i16* %104
%106 = trunc i16 %105 to i8
br label %125
107: ; preds = %97
%108 = bitcast i8* %100 to i32*
%109 = load i32, i32* %108
%110 = trunc i32 %109 to i8
br label %125
111: ; preds = %97
%112 = bitcast i8* %100 to i64*
%113 = load i64, i64* %112
%114 = trunc i64 %113 to i8
br label %125
115: ; preds = %97
%116 = bitcast i8* %100 to float*
%117 = load float, float* %116
%118 = fptoui float %117 to i8
br label %125
119: ; preds = %97
%120 = bitcast i8* %100 to double*
%121 = load double, double* %120
%122 = fptoui double %121 to i8
br label %125
123: ; preds = %97
%124 = load i8, i8* %100
br label %125
125: ; preds = %123, %111, %107, %103, %119, %115
%126 = phi i8 [ %124, %123 ], [ %114, %111 ], [ %110, %107 ], [ %106, %103 ], [ %122, %119 ], [ %118, %115 ]
%127 = call i32 @sprintf(i8* %9, i8* %8, i8 zeroext %126)
%128 = icmp eq i8* %102, null
br i1 %128, label %136, label %129
129: ; preds = %125
%130 = icmp slt i32 %101, %127
br i1 %130, label %136, label %131
131: ; preds = %129
%132 = call i32 @strcpy(i8* %102, i8* %9)
%133 = sext i32 %127 to i64
%134 = getelementptr inbounds i8, i8* %102, i64 %133
%135 = sub nsw i32 %101, %127
br label %136
136: ; preds = %131, %129, %125
%137 = phi i8* [ %134, %131 ], [ %102, %129 ], [ null, %125 ]
%138 = phi i32 [ %135, %131 ], [ %101, %129 ], [ %101, %125 ]
%139 = add nsw i32 %127, %98
%140 = getelementptr inbounds i8, i8* %100, i64 %96
%141 = sub nsw i32 %99, %10
%142 = icmp slt i32 %141, %10
br i1 %142, label %143, label %97
143: ; preds = %136, %86
%144 = phi i8* [ %87, %86 ], [ %137, %136 ]
%145 = phi i32 [ %88, %86 ], [ %138, %136 ]
%146 = phi i32 [ %89, %86 ], [ %139, %136 ]
%147 = and i32 %2, 4096
%148 = icmp eq i32 %147, 0
br i1 %148, label %149, label %236
149: ; preds = %143
%150 = icmp ne i8* %144, null
%151 = icmp sgt i32 %145, 0
%152 = select i1 %150, i1 %151, i1 false
br i1 %152, label %153, label %157
153: ; preds = %149
%154 = call i32 @strcpy(i8* %144, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%155 = getelementptr inbounds i8, i8* %144, i64 1
%156 = add nsw i32 %145, -1
br label %157
157: ; preds = %153, %149
%158 = phi i8* [ %155, %153 ], [ %144, %149 ]
%159 = phi i32 [ %156, %153 ], [ %145, %149 ]
%160 = icmp eq i32 %1, 0
br i1 %160, label %227, label %161
161: ; preds = %157
%162 = and i32 %2, 131072
%163 = icmp eq i32 %162, 0
%164 = select i1 %163, i64 1, i64 -1
%165 = add i32 %146, %1
%166 = and i32 %1, 1
%167 = icmp eq i32 %166, 0
br i1 %167, label %184, label %168
168: ; preds = %161
%169 = icmp ne i8* %158, null
%170 = icmp sgt i32 %159, 0
%171 = select i1 %169, i1 %170, i1 false
br i1 %171, label %172, label %179
172: ; preds = %168
%173 = load i8, i8* %0
%174 = add i8 %173, -127
%175 = icmp ult i8 %174, -95
%176 = select i1 %175, i8 46, i8 %173
%177 = getelementptr inbounds i8, i8* %158, i64 1
store i8 %176, i8* %158
%178 = add nsw i32 %159, -1
br label %179
179: ; preds = %172, %168
%180 = phi i8* [ %177, %172 ], [ %158, %168 ]
%181 = phi i32 [ %178, %172 ], [ %159, %168 ]
%182 = getelementptr inbounds i8, i8* %0, i64 %164
%183 = add nsw i32 %1, -1
br label %184
184: ; preds = %179, %161
%185 = phi i8* [ undef, %161 ], [ %180, %179 ]
%186 = phi i32 [ undef, %161 ], [ %181, %179 ]
%187 = phi i32 [ %1, %161 ], [ %183, %179 ]
%188 = phi i8* [ %0, %161 ], [ %182, %179 ]
%189 = phi i32 [ %159, %161 ], [ %181, %179 ]
%190 = phi i8* [ %158, %161 ], [ %180, %179 ]
%191 = icmp eq i32 %1, 1
br i1 %191, label %227, label %192
192: ; preds = %184, %221
%193 = phi i32 [ %225, %221 ], [ %187, %184 ]
%194 = phi i8* [ %224, %221 ], [ %188, %184 ]
%195 = phi i32 [ %223, %221 ], [ %189, %184 ]
%196 = phi i8* [ %222, %221 ], [ %190, %184 ]
%197 = icmp ne i8* %196, null
%198 = icmp sgt i32 %195, 0
%199 = select i1 %197, i1 %198, i1 false
br i1 %199, label %200, label %207
200: ; preds = %192
%201 = load i8, i8* %194
%202 = add i8 %201, -127
%203 = icmp ult i8 %202, -95
%204 = select i1 %203, i8 46, i8 %201
%205 = getelementptr inbounds i8, i8* %196, i64 1
store i8 %204, i8* %196
%206 = add nsw i32 %195, -1
br label %207
207: ; preds = %200, %192
%208 = phi i8* [ %205, %200 ], [ %196, %192 ]
%209 = phi i32 [ %206, %200 ], [ %195, %192 ]
%210 = getelementptr inbounds i8, i8* %194, i64 %164
%211 = icmp ne i8* %208, null
%212 = icmp sgt i32 %209, 0
%213 = select i1 %211, i1 %212, i1 false
br i1 %213, label %214, label %221
214: ; preds = %207
%215 = load i8, i8* %210
%216 = add i8 %215, -127
%217 = icmp ult i8 %216, -95
%218 = select i1 %217, i8 46, i8 %215
%219 = getelementptr inbounds i8, i8* %208, i64 1
store i8 %218, i8* %208
%220 = add nsw i32 %209, -1
br label %221
221: ; preds = %214, %207
%222 = phi i8* [ %219, %214 ], [ %208, %207 ]
%223 = phi i32 [ %220, %214 ], [ %209, %207 ]
%224 = getelementptr inbounds i8, i8* %210, i64 %164
%225 = add nsw i32 %193, -2
%226 = icmp eq i32 %225, 0
br i1 %226, label %227, label %192
227: ; preds = %184, %221, %157
%228 = phi i8* [ %158, %157 ], [ %185, %184 ], [ %222, %221 ]
%229 = phi i32 [ %159, %157 ], [ %186, %184 ], [ %223, %221 ]
%230 = phi i32 [ %146, %157 ], [ %165, %221 ], [ %165, %184 ]
%231 = add i32 %230, 1
%232 = icmp ne i8* %228, null
%233 = icmp sgt i32 %229, 0
%234 = select i1 %232, i1 %233, i1 false
br i1 %234, label %235, label %236
235: ; preds = %227
store i8 0, i8* %228
br label %236
236: ; preds = %227, %235, %143
%237 = phi i32 [ %146, %143 ], [ %231, %235 ], [ %231, %227 ]
ret i32 %237
}