#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 */

/* Variables and functions */
scalar_t__ isascii(int);
scalar_t__ isprint(int);
int /*<<< orphan*/ printf(char *, ...);
short strlen(char *);
void dumpsequence(int state, int c, int private, int param[], int nparam,
                  int inter[], int ninter, int final, short *column) {
  register int i;
  if (isascii(c) && isprint(c)) {
    *column += 2;
    if (*column >= 79) {
      printf("\n");
      *column = 2;
    }
    printf("%c ", c);
  } else if (private == 'X') {
    *column += strlen("bad sequence ");
    if (*column >= 79) {
      printf("\n");
      *column = strlen("bad sequence ");
    }
    printf("bad sequence ");
  } else if (state != 0x00) {
    *column += 32;
    if (*column >= 79) {
      printf("\n");
      *column = 32;
    }
    printf("incomplete sequence (type <%02x>) ", state);
  } else {
    *column += 5;
    if (*column >= 79) {
      printf("\n");
      *column = 6;
    }
    switch (c) {
    case 0x1B:
      printf("<ESC>");
      break;
    case 0x90:
      printf("<DCS>");
      break;
    case 0x9B:
      printf("<CSI>");
      break;
    case 0x8f:
      printf("<SS3>");
      break;
    default:
      printf("<%02x>", c & 0xFF);
    }
    if (c == 0x1B || c == 0x90 || c == 0x9B || c == 0x8f) {
      *column += 1 + nparam * 2 + ninter + 1;
      if (*column >= 79) {
        printf("\n");
        *column = 1 + nparam * 2 + ninter + 1;
      }
      if (private != 0x00 && private != 'X')
        printf("%c", private);
      for (i = 1; i <= nparam; i++)
        printf("%s%d", (i > 1) ? "," : " ", param[i]);
      for (i = 1; i <= ninter; i++)
        printf("%c", inter[i]);
      printf("%c", final);
    }
    (*column)++;
    if (*column >= 79) {
      printf("\n");
      *column = 1;
    }
    printf(" ");
  }
}


x86 assembly (clang, -O0):
<dumpsequence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%edi
call   1060 <isascii@plt>
cmp    $0x0,%rax
je     11d5 <dumpsequence+0x95>
mov    -0x8(%rbp),%edi
call   1050 <isprint@plt>
cmp    $0x0,%rax
je     11d5 <dumpsequence+0x95>
mov    0x20(%rbp),%rax
movswl (%rax),%ecx
add    $0x2,%ecx
mov    %cx,(%rax)
mov    0x20(%rbp),%rax
movswl (%rax),%eax
cmp    $0x4f,%eax
jl     11bf <dumpsequence+0x7f>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x20(%rbp),%rax
movw   $0x2,(%rax)
mov    -0x8(%rbp),%esi
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    150b <dumpsequence+0x3cb>
cmpl   $0x58,-0xc(%rbp)
jne    1241 <dumpsequence+0x101>
lea    0xe20(%rip),%rdi
call   1030 <strlen@plt>
movswl %ax,%edx
mov    0x20(%rbp),%rax
movswl (%rax),%ecx
add    %edx,%ecx
mov    %cx,(%rax)
mov    0x20(%rbp),%rax
movswl (%rax),%eax
cmp    $0x4f,%eax
jl     122e <dumpsequence+0xee>
lea    0xdef(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xde7(%rip),%rdi
call   1030 <strlen@plt>
mov    %ax,%cx
mov    0x20(%rbp),%rax
mov    %cx,(%rax)
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1506 <dumpsequence+0x3c6>
cmpl   $0x0,-0x4(%rbp)
je     1295 <dumpsequence+0x155>
mov    0x20(%rbp),%rax
movswl (%rax),%ecx
add    $0x20,%ecx
mov    %cx,(%rax)
mov    0x20(%rbp),%rax
movswl (%rax),%eax
cmp    $0x4f,%eax
jl     127f <dumpsequence+0x13f>
lea    0xd91(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x20(%rbp),%rax
movw   $0x20,(%rax)
mov    -0x4(%rbp),%esi
lea    0xd8b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1501 <dumpsequence+0x3c1>
mov    0x20(%rbp),%rax
movswl (%rax),%ecx
add    $0x5,%ecx
mov    %cx,(%rax)
mov    0x20(%rbp),%rax
movswl (%rax),%eax
cmp    $0x4f,%eax
jl     12c9 <dumpsequence+0x189>
lea    0xd47(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x20(%rbp),%rax
movw   $0x6,(%rax)
mov    -0x8(%rbp),%eax
mov    %eax,-0x30(%rbp)
sub    $0x1b,%eax
je     1316 <dumpsequence+0x1d6>
jmp    12dd <dumpsequence+0x19d>
mov    -0x30(%rbp),%eax
sub    $0x8f,%eax
je     134f <dumpsequence+0x20f>
jmp    12f0 <dumpsequence+0x1b0>
mov    -0x30(%rbp),%eax
sub    $0x90,%eax
je     1329 <dumpsequence+0x1e9>
jmp    1303 <dumpsequence+0x1c3>
mov    -0x30(%rbp),%eax
sub    $0x9b,%eax
je     133c <dumpsequence+0x1fc>
jmp    1362 <dumpsequence+0x222>
lea    0xd1a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1379 <dumpsequence+0x239>
lea    0xd0d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1379 <dumpsequence+0x239>
lea    0xd00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1379 <dumpsequence+0x239>
lea    0xcf3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1379 <dumpsequence+0x239>
mov    -0x8(%rbp),%esi
and    $0xff,%esi
lea    0xcdd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x1b,-0x8(%rbp)
je     13aa <dumpsequence+0x26a>
cmpl   $0x90,-0x8(%rbp)
je     13aa <dumpsequence+0x26a>
cmpl   $0x9b,-0x8(%rbp)
je     13aa <dumpsequence+0x26a>
cmpl   $0x8f,-0x8(%rbp)
jne    14be <dumpsequence+0x37e>
mov    -0x1c(%rbp),%edx
shl    $0x1,%edx
add    $0x1,%edx
add    0x10(%rbp),%edx
add    $0x1,%edx
mov    0x20(%rbp),%rax
movswl (%rax),%ecx
add    %edx,%ecx
mov    %cx,(%rax)
mov    0x20(%rbp),%rax
movswl (%rax),%eax
cmp    $0x4f,%eax
jl     13fc <dumpsequence+0x2bc>
lea    0xc24(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
add    0x10(%rbp),%eax
add    $0x1,%eax
mov    %ax,%cx
mov    0x20(%rbp),%rax
mov    %cx,(%rax)
cmpl   $0x0,-0xc(%rbp)
je     1421 <dumpsequence+0x2e1>
cmpl   $0x58,-0xc(%rbp)
je     1421 <dumpsequence+0x2e1>
mov    -0xc(%rbp),%esi
lea    0xc3c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     1473 <dumpsequence+0x333>
mov    -0x2c(%rbp),%ecx
lea    0xbf7(%rip),%rsi
lea    0xc19(%rip),%rax
cmp    $0x1,%ecx
cmovg  %rax,%rsi
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xbfb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1428 <dumpsequence+0x2e8>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     14ad <dumpsequence+0x36d>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xbbe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    147a <dumpsequence+0x33a>
mov    0x18(%rbp),%esi
lea    0xb9f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x20(%rbp),%rax
mov    (%rax),%cx
add    $0x1,%cx
mov    %cx,(%rax)
mov    0x20(%rbp),%rax
movswl (%rax),%eax
cmp    $0x4f,%eax
jl     14f3 <dumpsequence+0x3b3>
lea    0xb1d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x20(%rbp),%rax
movw   $0x1,(%rax)
lea    0xb3b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1506 <dumpsequence+0x3c6>
jmp    150b <dumpsequence+0x3cb>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpsequence>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,0x20(%rsp)
mov    %r8d,%r15d
mov    %rcx,%r13
mov    %edx,%r12d
mov    %esi,%ebx
mov    %edi,%r14d
mov    0x70(%rsp),%rbp
mov    0x68(%rsp),%eax
mov    %eax,0xc(%rsp)
mov    0x60(%rsp),%eax
mov    %rax,0x10(%rsp)
mov    %esi,%edi
call   1070 <isascii@plt>
test   %rax,%rax
je     11ce <dumpsequence+0x7e>
mov    %ebx,%edi
call   1060 <isprint@plt>
test   %rax,%rax
je     11ce <dumpsequence+0x7e>
movzwl 0x0(%rbp),%eax
add    $0x2,%eax
mov    %ax,0x0(%rbp)
cmp    $0x4f,%ax
jl     11c0 <dumpsequence+0x70>
mov    $0xa,%edi
call   1030 <putchar@plt>
movw   $0x2,0x0(%rbp)
lea    0xe39(%rip),%rdi
mov    %ebx,%esi
jmp    1257 <dumpsequence+0x107>
mov    %r12d,%eax
cmp    $0x58,%r12d
jne    1227 <dumpsequence+0xd7>
lea    0xe26(%rip),%rdi
call   1040 <strlen@plt>
add    0x0(%rbp),%ax
mov    %ax,0x0(%rbp)
cmp    $0x4f,%ax
jl     120b <dumpsequence+0xbb>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe02(%rip),%rdi
call   1040 <strlen@plt>
mov    %ax,0x0(%rbp)
lea    0xdf2(%rip),%rdi
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <printf@plt>
movzwl 0x0(%rbp),%eax
test   %r14d,%r14d
je     126c <dumpsequence+0x11c>
add    $0x20,%eax
mov    %ax,0x0(%rbp)
cmp    $0x4f,%ax
jl     124d <dumpsequence+0xfd>
mov    $0xa,%edi
call   1030 <putchar@plt>
movw   $0x20,0x0(%rbp)
lea    0xdbe(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <printf@plt>
add    $0x5,%eax
mov    %ax,0x0(%rbp)
cmp    $0x4f,%ax
jl     1289 <dumpsequence+0x139>
mov    $0xa,%edi
call   1030 <putchar@plt>
movw   $0x6,0x0(%rbp)
cmp    $0x8f,%ebx
jg     12ab <dumpsequence+0x15b>
cmp    $0x1b,%ebx
je     12c8 <dumpsequence+0x178>
cmp    $0x8f,%ebx
jne    13a2 <dumpsequence+0x252>
lea    0xd9e(%rip),%rdi
jmp    12d8 <dumpsequence+0x188>
cmp    $0x9b,%ebx
je     12d1 <dumpsequence+0x181>
cmp    $0x90,%ebx
jne    13a2 <dumpsequence+0x252>
lea    0xd75(%rip),%rdi
jmp    12d8 <dumpsequence+0x188>
lea    0xd66(%rip),%rdi
jmp    12d8 <dumpsequence+0x188>
lea    0xd69(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rsp),%rax
lea    (%rax,%r15,2),%ebx
add    $0x2,%ebx
movzwl 0x0(%rbp),%eax
add    %bx,%ax
mov    %ax,0x0(%rbp)
cmp    $0x4f,%ax
jl     130a <dumpsequence+0x1ba>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %bx,0x0(%rbp)
mov    %rbp,0x18(%rsp)
test   %r12d,%r12d
je     131c <dumpsequence+0x1cc>
mov    %r12d,%edi
call   1030 <putchar@plt>
test   %r15d,%r15d
jle    1363 <dumpsequence+0x213>
add    $0x1,%r15d
mov    $0x1,%ebp
lea    0xd28(%rip),%r14
lea    0xcfb(%rip),%r12
lea    0xd15(%rip),%rbx
nop
cmp    $0x2,%rbp
mov    %r12,%rsi
cmovae %r14,%rsi
mov    0x0(%r13,%rbp,4),%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1340 <dumpsequence+0x1f0>
mov    0x10(%rsp),%rbp
test   %ebp,%ebp
mov    0x20(%rsp),%r14
jle    1392 <dumpsequence+0x242>
add    $0x1,%ebp
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,4),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1380 <dumpsequence+0x230>
mov    0xc(%rsp),%edi
call   1030 <putchar@plt>
mov    0x18(%rsp),%rbp
jmp    13b3 <dumpsequence+0x263>
movzbl %bl,%esi
lea    0xca1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzwl 0x0(%rbp),%eax
add    $0x1,%eax
mov    %ax,0x0(%rbp)
cmp    $0x4f,%ax
jl     13d4 <dumpsequence+0x284>
mov    $0xa,%edi
call   1030 <putchar@plt>
movw   $0x1,0x0(%rbp)
mov    $0x20,%edi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [4 x i8] c"%c \00"
@.str.2 = [14 x i8] c"bad sequence \00"
@.str.3 = [35 x i8] c"incomplete sequence (type <%02x>) \00"
@.str.4 = [6 x i8] c"<ESC>\00"
@.str.5 = [6 x i8] c"<DCS>\00"
@.str.6 = [6 x i8] c"<CSI>\00"
@.str.7 = [6 x i8] c"<SS3>\00"
@.str.8 = [7 x i8] c"<%02x>\00"
@.str.9 = [3 x i8] c"%c\00"
@.str.10 = [5 x i8] c"%s%d\00"
@.str.11 = [2 x i8] c",\00"
@.str.12 = [2 x i8] c" \00"
define void @dumpsequence(i32 %0, i32 %1, i32 %2, i32* %3, i32 %4, i32* %5, i32 %6, i32 %7, i16* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i16*
%19 = alloca i32
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32* %3, i32** %13
store i32 %4, i32* %14
store i32* %5, i32** %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i16* %8, i16** %18
%20 = load i32, i32* %11
%21 = call i64 @isascii(i32 %20)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %43
23: ; preds = %9
%24 = load i32, i32* %11
%25 = call i64 @isprint(i32 %24)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %43
27: ; preds = %23
%28 = load i16*, i16** %18
%29 = load i16, i16* %28
%30 = sext i16 %29 to i32
%31 = add nsw i32 %30, 2
%32 = trunc i32 %31 to i16
store i16 %32, i16* %28
%33 = load i16*, i16** %18
%34 = load i16, i16* %33
%35 = sext i16 %34 to i32
%36 = icmp sge i32 %35, 79
br i1 %36, label %37, label %40
37: ; preds = %27
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%39 = load i16*, i16** %18
store i16 2, i16* %39
br label %40
40: ; preds = %37, %27
%41 = load i32, i32* %11
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %41)
br label %209
43: ; preds = %23, %9
%44 = load i32, i32* %12
%45 = icmp eq i32 %44, 88
br i1 %45, label %46, label %64
46: ; preds = %43
%47 = call signext i16 @strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%48 = sext i16 %47 to i32
%49 = load i16*, i16** %18
%50 = load i16, i16* %49
%51 = sext i16 %50 to i32
%52 = add nsw i32 %51, %48
%53 = trunc i32 %52 to i16
store i16 %53, i16* %49
%54 = load i16*, i16** %18
%55 = load i16, i16* %54
%56 = sext i16 %55 to i32
%57 = icmp sge i32 %56, 79
br i1 %57, label %58, label %62
58: ; preds = %46
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%60 = call signext i16 @strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%61 = load i16*, i16** %18
store i16 %60, i16* %61
br label %62
62: ; preds = %58, %46
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %208
64: ; preds = %43
%65 = load i32, i32* %10
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %83
67: ; preds = %64
%68 = load i16*, i16** %18
%69 = load i16, i16* %68
%70 = sext i16 %69 to i32
%71 = add nsw i32 %70, 32
%72 = trunc i32 %71 to i16
store i16 %72, i16* %68
%73 = load i16*, i16** %18
%74 = load i16, i16* %73
%75 = sext i16 %74 to i32
%76 = icmp sge i32 %75, 79
br i1 %76, label %77, label %80
77: ; preds = %67
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%79 = load i16*, i16** %18
store i16 32, i16* %79
br label %80
80: ; preds = %77, %67
%81 = load i32, i32* %10
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %81)
br label %207
83: ; preds = %64
%84 = load i16*, i16** %18
%85 = load i16, i16* %84
%86 = sext i16 %85 to i32
%87 = add nsw i32 %86, 5
%88 = trunc i32 %87 to i16
store i16 %88, i16* %84
%89 = load i16*, i16** %18
%90 = load i16, i16* %89
%91 = sext i16 %90 to i32
%92 = icmp sge i32 %91, 79
br i1 %92, label %93, label %96
93: ; preds = %83
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%95 = load i16*, i16** %18
store i16 6, i16* %95
br label %96
96: ; preds = %93, %83
%97 = load i32, i32* %11
switch i32 %97, label %106 [
i32 27, label %98
i32 144, label %100
i32 155, label %102
i32 143, label %104
]
98: ; preds = %96
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %110
100: ; preds = %96
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %110
102: ; preds = %96
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %110
104: ; preds = %96
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %110
106: ; preds = %96
%107 = load i32, i32* %11
%108 = and i32 %107, 255
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 %108)
br label %110
110: ; preds = %106, %104, %102, %100, %98
%111 = load i32, i32* %11
%112 = icmp eq i32 %111, 27
br i1 %112, label %122, label %113
113: ; preds = %110
%114 = load i32, i32* %11
%115 = icmp eq i32 %114, 144
br i1 %115, label %122, label %116
116: ; preds = %113
%117 = load i32, i32* %11
%118 = icmp eq i32 %117, 155
br i1 %118, label %122, label %119
119: ; preds = %116
%120 = load i32, i32* %11
%121 = icmp eq i32 %120, 143
br i1 %121, label %122, label %194
122: ; preds = %119, %116, %113, %110
%123 = load i32, i32* %14
%124 = mul nsw i32 %123, 2
%125 = add nsw i32 1, %124
%126 = load i32, i32* %16
%127 = add nsw i32 %125, %126
%128 = add nsw i32 %127, 1
%129 = load i16*, i16** %18
%130 = load i16, i16* %129
%131 = sext i16 %130 to i32
%132 = add nsw i32 %131, %128
%133 = trunc i32 %132 to i16
store i16 %133, i16* %129
%134 = load i16*, i16** %18
%135 = load i16, i16* %134
%136 = sext i16 %135 to i32
%137 = icmp sge i32 %136, 79
br i1 %137, label %138, label %148
138: ; preds = %122
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%140 = load i32, i32* %14
%141 = mul nsw i32 %140, 2
%142 = add nsw i32 1, %141
%143 = load i32, i32* %16
%144 = add nsw i32 %142, %143
%145 = add nsw i32 %144, 1
%146 = trunc i32 %145 to i16
%147 = load i16*, i16** %18
store i16 %146, i16* %147
br label %148
148: ; preds = %138, %122
%149 = load i32, i32* %12
%150 = icmp ne i32 %149, 0
br i1 %150, label %151, label %157
151: ; preds = %148
%152 = load i32, i32* %12
%153 = icmp ne i32 %152, 88
br i1 %153, label %154, label %157
154: ; preds = %151
%155 = load i32, i32* %12
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 %155)
br label %157
157: ; preds = %154, %151, %148
store i32 1, i32* %19
br label %158
158: ; preds = %173, %157
%159 = load i32, i32* %19
%160 = load i32, i32* %14
%161 = icmp sle i32 %159, %160
br i1 %161, label %162, label %176
162: ; preds = %158
%163 = load i32, i32* %19
%164 = icmp sgt i32 %163, 1
%165 = zext i1 %164 to i64
%166 = select i1 %164, 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)
%167 = load i32*, i32** %13
%168 = load i32, i32* %19
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds i32, i32* %167, i64 %169
%171 = load i32, i32* %170
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* %166, i32 %171)
br label %173
173: ; preds = %162
%174 = load i32, i32* %19
%175 = add nsw i32 %174, 1
store i32 %175, i32* %19
br label %158
176: ; preds = %158
store i32 1, i32* %19
br label %177
177: ; preds = %188, %176
%178 = load i32, i32* %19
%179 = load i32, i32* %16
%180 = icmp sle i32 %178, %179
br i1 %180, label %181, label %191
181: ; preds = %177
%182 = load i32*, i32** %15
%183 = load i32, i32* %19
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds i32, i32* %182, i64 %184
%186 = load i32, i32* %185
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 %186)
br label %188
188: ; preds = %181
%189 = load i32, i32* %19
%190 = add nsw i32 %189, 1
store i32 %190, i32* %19
br label %177
191: ; preds = %177
%192 = load i32, i32* %17
%193 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 %192)
br label %194
194: ; preds = %191, %119
%195 = load i16*, i16** %18
%196 = load i16, i16* %195
%197 = add i16 %196, 1
store i16 %197, i16* %195
%198 = load i16*, i16** %18
%199 = load i16, i16* %198
%200 = sext i16 %199 to i32
%201 = icmp sge i32 %200, 79
br i1 %201, label %202, label %205
202: ; preds = %194
%203 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%204 = load i16*, i16** %18
store i16 1, i16* %204
br label %205
205: ; preds = %202, %194
%206 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %207
207: ; preds = %205, %80
br label %208
208: ; preds = %207, %62
br label %209
209: ; preds = %208, %40
ret void
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%c \00"
@.str.2 = [14 x i8] c"bad sequence \00"
@.str.3 = [35 x i8] c"incomplete sequence (type <%02x>) \00"
@.str.4 = [6 x i8] c"<ESC>\00"
@.str.5 = [6 x i8] c"<DCS>\00"
@.str.6 = [6 x i8] c"<CSI>\00"
@.str.7 = [6 x i8] c"<SS3>\00"
@.str.8 = [7 x i8] c"<%02x>\00"
@.str.10 = [5 x i8] c"%s%d\00"
@.str.11 = [2 x i8] c",\00"
@.str.12 = [2 x i8] c" \00"
define void @dumpsequence(i32 %0, i32 %1, i32 %2, i32* nocapture %3, i32 %4, i32* nocapture %5, i32 %6, i32 %7, i16* nocapture %8) {
%10 = tail call i64 @isascii(i32 %1)
%11 = icmp eq i64 %10, 0
br i1 %11, label %23, label %12
12: ; preds = %9
%13 = tail call i64 @isprint(i32 %1)
%14 = icmp eq i64 %13, 0
br i1 %14, label %23, label %15
15: ; preds = %12
%16 = load i16, i16* %8
%17 = add i16 %16, 2
store i16 %17, i16* %8
%18 = icmp sgt i16 %17, 78
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = tail call i32 @putchar(i32 10)
store i16 2, i16* %8
br label %21
21: ; preds = %19, %15
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %1)
br label %110
23: ; preds = %12, %9
%24 = icmp eq i32 %2, 88
br i1 %24, label %25, label %35
25: ; preds = %23
%26 = tail call signext i16 @strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%27 = load i16, i16* %8
%28 = add i16 %27, %26
store i16 %28, i16* %8
%29 = icmp sgt i16 %28, 78
br i1 %29, label %30, label %33
30: ; preds = %25
%31 = tail call i32 @putchar(i32 10)
%32 = tail call signext i16 @strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
store i16 %32, i16* %8
br label %33
33: ; preds = %30, %25
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %110
35: ; preds = %23
%36 = icmp eq i32 %0, 0
%37 = load i16, i16* %8
br i1 %36, label %45, label %38
38: ; preds = %35
%39 = add i16 %37, 32
store i16 %39, i16* %8
%40 = icmp sgt i16 %39, 78
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = tail call i32 @putchar(i32 10)
store i16 32, i16* %8
br label %43
43: ; preds = %41, %38
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %0)
br label %110
45: ; preds = %35
%46 = add i16 %37, 5
store i16 %46, i16* %8
%47 = icmp sgt i16 %46, 78
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = tail call i32 @putchar(i32 10)
store i16 6, i16* %8
br label %50
50: ; preds = %48, %45
switch i32 %1, label %54 [
i32 27, label %57
i32 144, label %51
i32 155, label %52
i32 143, label %53
]
51: ; preds = %50
br label %57
52: ; preds = %50
br label %57
53: ; preds = %50
br label %57
54: ; preds = %50
%55 = and i32 %1, 255
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 %55)
br label %102
57: ; preds = %50, %51, %52, %53
%58 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), %51 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), %52 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), %53 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %50 ]
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %58)
%60 = shl nsw i32 %4, 1
%61 = or i32 %60, 1
%62 = add nsw i32 %61, %6
%63 = load i16, i16* %8
%64 = trunc i32 %62 to i16
%65 = add i16 %64, 1
%66 = add i16 %63, %65
store i16 %66, i16* %8
%67 = icmp sgt i16 %66, 78
br i1 %67, label %68, label %70
68: ; preds = %57
%69 = tail call i32 @putchar(i32 10)
store i16 %65, i16* %8
br label %70
70: ; preds = %68, %57
%71 = icmp eq i32 %2, 0
br i1 %71, label %74, label %72
72: ; preds = %70
%73 = tail call i32 @putchar(i32 %2)
br label %74
74: ; preds = %72, %70
%75 = icmp slt i32 %4, 1
br i1 %75, label %79, label %76
76: ; preds = %74
%77 = add nuw i32 %4, 1
%78 = zext i32 %77 to i64
br label %84
79: ; preds = %84, %74
%80 = icmp slt i32 %6, 1
br i1 %80, label %100, label %81
81: ; preds = %79
%82 = add nuw i32 %6, 1
%83 = zext i32 %82 to i64
br label %93
84: ; preds = %76, %84
%85 = phi i64 [ 1, %76 ], [ %91, %84 ]
%86 = icmp ugt i64 %85, 1
%87 = select i1 %86, 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)
%88 = getelementptr inbounds i32, i32* %3, i64 %85
%89 = load i32, i32* %88
%90 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* %87, i32 %89)
%91 = add nuw nsw i64 %85, 1
%92 = icmp eq i64 %91, %78
br i1 %92, label %79, label %84
93: ; preds = %81, %93
%94 = phi i64 [ 1, %81 ], [ %98, %93 ]
%95 = getelementptr inbounds i32, i32* %5, i64 %94
%96 = load i32, i32* %95
%97 = tail call i32 @putchar(i32 %96)
%98 = add nuw nsw i64 %94, 1
%99 = icmp eq i64 %98, %83
br i1 %99, label %100, label %93
100: ; preds = %93, %79
%101 = tail call i32 @putchar(i32 %7)
br label %102
102: ; preds = %54, %100
%103 = load i16, i16* %8
%104 = add i16 %103, 1
store i16 %104, i16* %8
%105 = icmp sgt i16 %104, 78
br i1 %105, label %106, label %108
106: ; preds = %102
%107 = tail call i32 @putchar(i32 10)
store i16 1, i16* %8
br label %108
108: ; preds = %106, %102
%109 = tail call i32 @putchar(i32 32)
br label %110
110: ; preds = %33, %108, %43, %21
ret void
}