#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 /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, ...);
int /*<<< orphan*/ fputs(unsigned char const *const, int /*<<< orphan*/ *);
unsigned char **html_get_armor_table();
int /*<<< orphan*/ putc(char, int /*<<< orphan*/ *);
void html_print_by_line(FILE *f, int utf8_mode, int max_file_length,
                        int max_line_length, unsigned char const *s,
                        size_t size) {
  const unsigned char *p = s;
  const unsigned char *const *trans_table;
  if (max_file_length > 0 && size > max_file_length) {
    fprintf(f,
            "(%s, %s = %"
            "z"
            "u)\n",
            "file is too long", "size", (size));
    return;
  }
  if (!s) {
    fprintf(f, "(%s)\n", "file is missing");
    return;
  }
  trans_table = html_get_armor_table();
  while (*s) {
    while (*s && *s != '\r' && *s != '\n')
      s++;
    if (max_line_length > 0 && s - p > max_line_length) {
      fprintf(f,
              "(%s, %s = %"
              "t"
              "d)\n",
              "line is too long", "size", (s - p));
    } else {
      if (utf8_mode) {
        while (p != s) {
          if (*p <= 0x7f) {
            if (trans_table[*p]) {
              fputs(trans_table[*p++], f);
            } else {
              putc(*p++, f);
            }
          } else if (*p <= 0xbf) {
            putc('?', f);
            p++;
          } else if (*p <= 0xc1) {
            putc('?', f);
            p++;
          } else if (*p <= 0xdf) {
            if (p + 1 < s && p[1] >= 0x80 && p[1] <= 0xbf &&
                (((p[0] & 0x1f) << 6) | (p[1] & 0x3f)) >= 0x80) {
              putc(*p++, f);
              putc(*p++, f);
            } else {
              putc('?', f);
              p++;
            }
          } else if (*p <= 0xef) {
            putc('?', f);
            p++;
          } else if (*p <= 0xf7) {
            putc('?', f);
            p++;
          } else {
            putc('?', f);
            p++;
          }
        }
      } else {
        while (p != s)
          if (trans_table[*p]) {
            fputs(trans_table[*p], f);
            p++;
          } else {
            putc(*p++, f);
          }
      }
    }
    while (*s == '\r' || *s == '\n')
      putc(*s++, f);
    p = s;
  }
  putc('\n', f);
}


x86 assembly (clang, -O0):
<html_print_by_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    11a9 <html_print_by_line+0x69>
mov    -0x28(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmp    %rcx,%rax
jbe    11a9 <html_print_by_line+0x69>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%r8
lea    0xe71(%rip),%rsi
lea    0xe7a(%rip),%rdx
lea    0xe84(%rip),%rcx
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    15ec <html_print_by_line+0x4ac>
cmpq   $0x0,-0x20(%rbp)
jne    11d2 <html_print_by_line+0x92>
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
lea    0xe66(%rip),%rdx
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    15ec <html_print_by_line+0x4ac>
mov    $0x0,%al
call   1040 <html_get_armor_table@plt>
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     15de <html_print_by_line+0x49e>
jmp    11ef <html_print_by_line+0xaf>
mov    -0x20(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x39(%rbp)
je     1229 <html_print_by_line+0xe9>
mov    -0x20(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xd,%ecx
mov    %al,-0x39(%rbp)
je     1229 <html_print_by_line+0xe9>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x39(%rbp)
mov    -0x39(%rbp),%al
test   $0x1,%al
jne    1239 <html_print_by_line+0xf9>
jmp    124a <html_print_by_line+0x10a>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    11ef <html_print_by_line+0xaf>
cmpl   $0x0,-0x14(%rbp)
jle    129c <html_print_by_line+0x15c>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    %rcx,%rax
movslq -0x14(%rbp),%rcx
cmp    %rcx,%rax
jle    129c <html_print_by_line+0x15c>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%r8
mov    -0x30(%rbp),%rax
sub    %rax,%r8
lea    0xdba(%rip),%rsi
lea    0xdc3(%rip),%rdx
lea    0xd91(%rip),%rcx
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    1575 <html_print_by_line+0x435>
cmpl   $0x0,-0xc(%rbp)
je     14f7 <html_print_by_line+0x3b7>
jmp    12ab <html_print_by_line+0x16b>
mov    -0x30(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     14f2 <html_print_by_line+0x3b2>
mov    -0x30(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x7f,%eax
jg     1329 <html_print_by_line+0x1e9>
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
movzbl (%rcx),%ecx
cmpq   $0x0,(%rax,%rcx,8)
je     1307 <html_print_by_line+0x1c7>
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x30(%rbp)
movzbl (%rcx),%ecx
mov    (%rax,%rcx,8),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <fputs@plt>
jmp    1324 <html_print_by_line+0x1e4>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1050 <putc@plt>
jmp    14ed <html_print_by_line+0x3ad>
mov    -0x30(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xbf,%eax
jg     135a <html_print_by_line+0x21a>
mov    -0x8(%rbp),%rsi
mov    $0x3f,%edi
call   1050 <putc@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    14e8 <html_print_by_line+0x3a8>
mov    -0x30(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xc1,%eax
jg     138b <html_print_by_line+0x24b>
mov    -0x8(%rbp),%rsi
mov    $0x3f,%edi
call   1050 <putc@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    14e3 <html_print_by_line+0x3a3>
mov    -0x30(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xdf,%eax
jg     1458 <html_print_by_line+0x318>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
cmp    -0x20(%rbp),%rax
jae    1439 <html_print_by_line+0x2f9>
mov    -0x30(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0x80,%eax
jl     1439 <html_print_by_line+0x2f9>
mov    -0x30(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0xbf,%eax
jg     1439 <html_print_by_line+0x2f9>
mov    -0x30(%rbp),%rax
movzbl (%rax),%eax
and    $0x1f,%eax
shl    $0x6,%eax
mov    -0x30(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
and    $0x3f,%ecx
or     %ecx,%eax
cmp    $0x80,%eax
jl     1439 <html_print_by_line+0x2f9>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1050 <putc@plt>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1050 <putc@plt>
jmp    1453 <html_print_by_line+0x313>
mov    -0x8(%rbp),%rsi
mov    $0x3f,%edi
call   1050 <putc@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    14de <html_print_by_line+0x39e>
mov    -0x30(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xef,%eax
jg     1489 <html_print_by_line+0x349>
mov    -0x8(%rbp),%rsi
mov    $0x3f,%edi
call   1050 <putc@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    14d9 <html_print_by_line+0x399>
mov    -0x30(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xf7,%eax
jg     14ba <html_print_by_line+0x37a>
mov    -0x8(%rbp),%rsi
mov    $0x3f,%edi
call   1050 <putc@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    14d4 <html_print_by_line+0x394>
mov    -0x8(%rbp),%rsi
mov    $0x3f,%edi
call   1050 <putc@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    14d9 <html_print_by_line+0x399>
jmp    14de <html_print_by_line+0x39e>
jmp    14e3 <html_print_by_line+0x3a3>
jmp    14e8 <html_print_by_line+0x3a8>
jmp    14ed <html_print_by_line+0x3ad>
jmp    12ab <html_print_by_line+0x16b>
jmp    1570 <html_print_by_line+0x430>
jmp    14fc <html_print_by_line+0x3bc>
mov    -0x30(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     156b <html_print_by_line+0x42b>
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
movzbl (%rcx),%ecx
cmpq   $0x0,(%rax,%rcx,8)
je     1549 <html_print_by_line+0x409>
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
movzbl (%rcx),%ecx
mov    (%rax,%rcx,8),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <fputs@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1566 <html_print_by_line+0x426>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1050 <putc@plt>
jmp    14fc <html_print_by_line+0x3bc>
jmp    1570 <html_print_by_line+0x430>
jmp    1575 <html_print_by_line+0x435>
jmp    157a <html_print_by_line+0x43a>
mov    -0x20(%rbp),%rax
movzbl (%rax),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x3a(%rbp)
je     159f <html_print_by_line+0x45f>
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x3a(%rbp)
mov    -0x3a(%rbp),%al
test   $0x1,%al
jne    15af <html_print_by_line+0x46f>
jmp    15d1 <html_print_by_line+0x491>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1050 <putc@plt>
jmp    157a <html_print_by_line+0x43a>
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    11dd <html_print_by_line+0x9d>
mov    -0x8(%rbp),%rsi
mov    $0xa,%edi
call   1050 <putc@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_print_by_line>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r8,%r13
mov    %rdi,%rbx
test   %edx,%edx
jle    1190 <html_print_by_line+0x50>
movslq %edx,%rax
cmp    %r9,%rax
jae    1190 <html_print_by_line+0x50>
lea    0xe99(%rip),%rsi
lea    0xea2(%rip),%rdx
lea    0xeac(%rip),%rcx
mov    %rbx,%rdi
mov    %r9,%r8
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <fprintf@plt>
test   %r13,%r13
je     13af <html_print_by_line+0x26f>
mov    %esi,0xc(%rsp)
mov    %ecx,0x8(%rsp)
xor    %eax,%eax
call   1040 <html_get_armor_table@plt>
mov    %rax,%r15
mov    0x0(%r13),%al
test   %al,%al
je     1394 <html_print_by_line+0x254>
mov    0x8(%rsp),%ecx
mov    %rcx,0x10(%rsp)
mov    $0x2401,%ebp
xor    %r12d,%r12d
mov    %eax,%ecx
jmp    11da <html_print_by_line+0x9a>
nopl   0x0(%rax)
movzbl 0x1(%r13,%r12,1),%ecx
add    $0x1,%r12
cmp    $0xd,%cl
ja     11d0 <html_print_by_line+0x90>
movzbl %cl,%ecx
bt     %rcx,%rbp
jae    11d0 <html_print_by_line+0x90>
lea    (%r12,%r13,1),%r14
cmpl   $0x0,0x8(%rsp)
jle    1230 <html_print_by_line+0xf0>
cmp    0x10(%rsp),%r12
jle    1230 <html_print_by_line+0xf0>
mov    %rbx,%rdi
lea    0xe38(%rip),%rsi
lea    0xe41(%rip),%rdx
lea    0xe0f(%rip),%rcx
mov    %r12,%r8
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1360 <html_print_by_line+0x220>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,0xc(%rsp)
je     130a <html_print_by_line+0x1ca>
test   %r12,%r12
je     1360 <html_print_by_line+0x220>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   %al,%al
js     1270 <html_print_by_line+0x130>
movzbl %al,%ecx
mov    (%r15,%rcx,8),%rdi
add    $0x1,%r13
test   %rdi,%rdi
je     12d0 <html_print_by_line+0x190>
mov    %rbx,%rsi
call   1030 <fputs@plt>
jmp    12db <html_print_by_line+0x19b>
xchg   %ax,%ax
cmp    $0xbf,%al
jbe    12b0 <html_print_by_line+0x170>
cmp    $0xc1,%al
jbe    12b0 <html_print_by_line+0x170>
cmp    $0xdf,%al
ja     12b0 <html_print_by_line+0x170>
lea    0x1(%r13),%rbp
cmp    %r14,%rbp
jae    12f6 <html_print_by_line+0x1b6>
cmpb   $0xbf,0x0(%rbp)
jg     12f6 <html_print_by_line+0x1b6>
mov    %eax,%ecx
and    $0x1e,%cl
je     12f6 <html_print_by_line+0x1b6>
movsbl %al,%edi
mov    %rbx,%rsi
call   1050 <putc@plt>
movsbl 0x1(%r13),%edi
add    $0x2,%r13
jmp    12d3 <html_print_by_line+0x193>
nopl   0x0(%rax,%rax,1)
mov    $0x3f,%edi
mov    %rbx,%rsi
call   1050 <putc@plt>
add    $0x1,%r13
jmp    12db <html_print_by_line+0x19b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%edi
mov    %rbx,%rsi
call   1050 <putc@plt>
mov    %r13,%rbp
cmp    %rbp,%r14
je     1360 <html_print_by_line+0x220>
mov    0x0(%rbp),%al
mov    %rbp,%r13
test   %al,%al
jns    1254 <html_print_by_line+0x114>
jmp    1270 <html_print_by_line+0x130>
mov    $0x3f,%edi
mov    %rbx,%rsi
call   1050 <putc@plt>
cmp    %rbp,%r14
jne    12e3 <html_print_by_line+0x1a3>
jmp    1360 <html_print_by_line+0x220>
test   %r12,%r12
je     1360 <html_print_by_line+0x220>
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl %al,%ecx
mov    (%r15,%rcx,8),%rdi
test   %rdi,%rdi
je     1340 <html_print_by_line+0x200>
mov    %rbx,%rsi
call   1030 <fputs@plt>
cmp    %rbp,%r12
jne    1350 <html_print_by_line+0x210>
jmp    1360 <html_print_by_line+0x220>
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
mov    %rbx,%rsi
call   1050 <putc@plt>
cmp    %rbp,%r12
je     1360 <html_print_by_line+0x220>
movzbl 0x0(%r13,%rbp,1),%eax
add    $0x1,%rbp
jmp    1320 <html_print_by_line+0x1e0>
nopl   0x0(%rax)
mov    %r14,%r13
mov    $0x2401,%ebp
jmp    137f <html_print_by_line+0x23f>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r13
movsbl %al,%edi
mov    %rbx,%rsi
call   1050 <putc@plt>
movzbl 0x0(%r13),%eax
cmp    $0xa,%al
je     1370 <html_print_by_line+0x230>
cmp    $0xd,%al
je     1370 <html_print_by_line+0x230>
test   %al,%al
jne    11c5 <html_print_by_line+0x85>
mov    $0xa,%edi
mov    %rbx,%rsi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <putc@plt>
lea    0xc70(%rip),%rsi
lea    0xc6f(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <fprintf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"(%s, %s = %zu)\0A\00"
@.str.1 = [17 x i8] c"file is too long\00"
@.str.2 = [5 x i8] c"size\00"
@.str.3 = [6 x i8] c"(%s)\0A\00"
@.str.4 = [16 x i8] c"file is missing\00"
@.str.5 = [16 x i8] c"(%s, %s = %td)\0A\00"
@.str.6 = [17 x i8] c"line is too long\00"
define void @html_print_by_line(i32* %0, i32 %1, i32 %2, i32 %3, i8* %4, i64 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i8*
%14 = alloca i8**
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i8* %4, i8** %11
store i64 %5, i64* %12
%15 = load i8*, i8** %11
store i8* %15, i8** %13
%16 = load i32, i32* %9
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %27
18: ; preds = %6
%19 = load i64, i64* %12
%20 = load i32, i32* %9
%21 = sext i32 %20 to i64
%22 = icmp ugt i64 %19, %21
br i1 %22, label %23, label %27
23: ; preds = %18
%24 = load i32*, i32** %7
%25 = load i64, i64* %12
%26 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %24, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %25)
br label %280
27: ; preds = %18, %6
%28 = load i8*, i8** %11
%29 = icmp ne i8* %28, null
br i1 %29, label %33, label %30
30: ; preds = %27
%31 = load i32*, i32** %7
%32 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %280
33: ; preds = %27
%34 = call i8** (...) @html_get_armor_table()
store i8** %34, i8*** %14
br label %35
35: ; preds = %275, %33
%36 = load i8*, i8** %11
%37 = load i8, i8* %36
%38 = icmp ne i8 %37, 0
br i1 %38, label %39, label %277
39: ; preds = %35
br label %40
40: ; preds = %57, %39
%41 = load i8*, i8** %11
%42 = load i8, i8* %41
%43 = zext i8 %42 to i32
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %55
45: ; preds = %40
%46 = load i8*, i8** %11
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = icmp ne i32 %48, 13
br i1 %49, label %50, label %55
50: ; preds = %45
%51 = load i8*, i8** %11
%52 = load i8, i8* %51
%53 = zext i8 %52 to i32
%54 = icmp ne i32 %53, 10
br label %55
55: ; preds = %50, %45, %40
%56 = phi i1 [ false, %45 ], [ false, %40 ], [ %54, %50 ]
br i1 %56, label %57, label %60
57: ; preds = %55
%58 = load i8*, i8** %11
%59 = getelementptr inbounds i8, i8* %58, i32 1
store i8* %59, i8** %11
br label %40
60: ; preds = %55
%61 = load i32, i32* %10
%62 = icmp sgt i32 %61, 0
br i1 %62, label %63, label %80
63: ; preds = %60
%64 = load i8*, i8** %11
%65 = load i8*, i8** %13
%66 = ptrtoint i8* %64 to i64
%67 = ptrtoint i8* %65 to i64
%68 = sub i64 %66, %67
%69 = load i32, i32* %10
%70 = sext i32 %69 to i64
%71 = icmp sgt i64 %68, %70
br i1 %71, label %72, label %80
72: ; preds = %63
%73 = load i32*, i32** %7
%74 = load i8*, i8** %11
%75 = load i8*, i8** %13
%76 = ptrtoint i8* %74 to i64
%77 = ptrtoint i8* %75 to i64
%78 = sub i64 %76, %77
%79 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %73, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %78)
br label %256
80: ; preds = %63, %60
%81 = load i32, i32* %8
%82 = icmp ne i32 %81, 0
br i1 %82, label %83, label %223
83: ; preds = %80
br label %84
84: ; preds = %221, %83
%85 = load i8*, i8** %13
%86 = load i8*, i8** %11
%87 = icmp ne i8* %85, %86
br i1 %87, label %88, label %222
88: ; preds = %84
%89 = load i8*, i8** %13
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = icmp sle i32 %91, 127
br i1 %92, label %93, label %118
93: ; preds = %88
%94 = load i8**, i8*** %14
%95 = load i8*, i8** %13
%96 = load i8, i8* %95
%97 = zext i8 %96 to i64
%98 = getelementptr inbounds i8*, i8** %94, i64 %97
%99 = load i8*, i8** %98
%100 = icmp ne i8* %99, null
br i1 %100, label %101, label %111
101: ; preds = %93
%102 = load i8**, i8*** %14
%103 = load i8*, i8** %13
%104 = getelementptr inbounds i8, i8* %103, i32 1
store i8* %104, i8** %13
%105 = load i8, i8* %103
%106 = zext i8 %105 to i64
%107 = getelementptr inbounds i8*, i8** %102, i64 %106
%108 = load i8*, i8** %107
%109 = load i32*, i32** %7
%110 = call i32 @fputs(i8* %108, i32* %109)
br label %117
111: ; preds = %93
%112 = load i8*, i8** %13
%113 = getelementptr inbounds i8, i8* %112, i32 1
store i8* %113, i8** %13
%114 = load i8, i8* %112
%115 = load i32*, i32** %7
%116 = call i32 @putc(i8 signext %114, i32* %115)
br label %117
117: ; preds = %111, %101
br label %221
118: ; preds = %88
%119 = load i8*, i8** %13
%120 = load i8, i8* %119
%121 = zext i8 %120 to i32
%122 = icmp sle i32 %121, 191
br i1 %122, label %123, label %128
123: ; preds = %118
%124 = load i32*, i32** %7
%125 = call i32 @putc(i8 signext 63, i32* %124)
%126 = load i8*, i8** %13
%127 = getelementptr inbounds i8, i8* %126, i32 1
store i8* %127, i8** %13
br label %220
128: ; preds = %118
%129 = load i8*, i8** %13
%130 = load i8, i8* %129
%131 = zext i8 %130 to i32
%132 = icmp sle i32 %131, 193
br i1 %132, label %133, label %138
133: ; preds = %128
%134 = load i32*, i32** %7
%135 = call i32 @putc(i8 signext 63, i32* %134)
%136 = load i8*, i8** %13
%137 = getelementptr inbounds i8, i8* %136, i32 1
store i8* %137, i8** %13
br label %219
138: ; preds = %128
%139 = load i8*, i8** %13
%140 = load i8, i8* %139
%141 = zext i8 %140 to i32
%142 = icmp sle i32 %141, 223
br i1 %142, label %143, label %191
143: ; preds = %138
%144 = load i8*, i8** %13
%145 = getelementptr inbounds i8, i8* %144, i64 1
%146 = load i8*, i8** %11
%147 = icmp ult i8* %145, %146
br i1 %147, label %148, label %185
148: ; preds = %143
%149 = load i8*, i8** %13
%150 = getelementptr inbounds i8, i8* %149, i64 1
%151 = load i8, i8* %150
%152 = zext i8 %151 to i32
%153 = icmp sge i32 %152, 128
br i1 %153, label %154, label %185
154: ; preds = %148
%155 = load i8*, i8** %13
%156 = getelementptr inbounds i8, i8* %155, i64 1
%157 = load i8, i8* %156
%158 = zext i8 %157 to i32
%159 = icmp sle i32 %158, 191
br i1 %159, label %160, label %185
160: ; preds = %154
%161 = load i8*, i8** %13
%162 = getelementptr inbounds i8, i8* %161, i64 0
%163 = load i8, i8* %162
%164 = zext i8 %163 to i32
%165 = and i32 %164, 31
%166 = shl i32 %165, 6
%167 = load i8*, i8** %13
%168 = getelementptr inbounds i8, i8* %167, i64 1
%169 = load i8, i8* %168
%170 = zext i8 %169 to i32
%171 = and i32 %170, 63
%172 = or i32 %166, %171
%173 = icmp sge i32 %172, 128
br i1 %173, label %174, label %185
174: ; preds = %160
%175 = load i8*, i8** %13
%176 = getelementptr inbounds i8, i8* %175, i32 1
store i8* %176, i8** %13
%177 = load i8, i8* %175
%178 = load i32*, i32** %7
%179 = call i32 @putc(i8 signext %177, i32* %178)
%180 = load i8*, i8** %13
%181 = getelementptr inbounds i8, i8* %180, i32 1
store i8* %181, i8** %13
%182 = load i8, i8* %180
%183 = load i32*, i32** %7
%184 = call i32 @putc(i8 signext %182, i32* %183)
br label %190
185: ; preds = %160, %154, %148, %143
%186 = load i32*, i32** %7
%187 = call i32 @putc(i8 signext 63, i32* %186)
%188 = load i8*, i8** %13
%189 = getelementptr inbounds i8, i8* %188, i32 1
store i8* %189, i8** %13
br label %190
190: ; preds = %185, %174
br label %218
191: ; preds = %138
%192 = load i8*, i8** %13
%193 = load i8, i8* %192
%194 = zext i8 %193 to i32
%195 = icmp sle i32 %194, 239
br i1 %195, label %196, label %201
196: ; preds = %191
%197 = load i32*, i32** %7
%198 = call i32 @putc(i8 signext 63, i32* %197)
%199 = load i8*, i8** %13
%200 = getelementptr inbounds i8, i8* %199, i32 1
store i8* %200, i8** %13
br label %217
201: ; preds = %191
%202 = load i8*, i8** %13
%203 = load i8, i8* %202
%204 = zext i8 %203 to i32
%205 = icmp sle i32 %204, 247
br i1 %205, label %206, label %211
206: ; preds = %201
%207 = load i32*, i32** %7
%208 = call i32 @putc(i8 signext 63, i32* %207)
%209 = load i8*, i8** %13
%210 = getelementptr inbounds i8, i8* %209, i32 1
store i8* %210, i8** %13
br label %216
211: ; preds = %201
%212 = load i32*, i32** %7
%213 = call i32 @putc(i8 signext 63, i32* %212)
%214 = load i8*, i8** %13
%215 = getelementptr inbounds i8, i8* %214, i32 1
store i8* %215, i8** %13
br label %216
216: ; preds = %211, %206
br label %217
217: ; preds = %216, %196
br label %218
218: ; preds = %217, %190
br label %219
219: ; preds = %218, %133
br label %220
220: ; preds = %219, %123
br label %221
221: ; preds = %220, %117
br label %84
222: ; preds = %84
br label %255
223: ; preds = %80
br label %224
224: ; preds = %253, %223
%225 = load i8*, i8** %13
%226 = load i8*, i8** %11
%227 = icmp ne i8* %225, %226
br i1 %227, label %228, label %254
228: ; preds = %224
%229 = load i8**, i8*** %14
%230 = load i8*, i8** %13
%231 = load i8, i8* %230
%232 = zext i8 %231 to i64
%233 = getelementptr inbounds i8*, i8** %229, i64 %232
%234 = load i8*, i8** %233
%235 = icmp ne i8* %234, null
br i1 %235, label %236, label %247
236: ; preds = %228
%237 = load i8**, i8*** %14
%238 = load i8*, i8** %13
%239 = load i8, i8* %238
%240 = zext i8 %239 to i64
%241 = getelementptr inbounds i8*, i8** %237, i64 %240
%242 = load i8*, i8** %241
%243 = load i32*, i32** %7
%244 = call i32 @fputs(i8* %242, i32* %243)
%245 = load i8*, i8** %13
%246 = getelementptr inbounds i8, i8* %245, i32 1
store i8* %246, i8** %13
br label %253
247: ; preds = %228
%248 = load i8*, i8** %13
%249 = getelementptr inbounds i8, i8* %248, i32 1
store i8* %249, i8** %13
%250 = load i8, i8* %248
%251 = load i32*, i32** %7
%252 = call i32 @putc(i8 signext %250, i32* %251)
br label %253
253: ; preds = %247, %236
br label %224
254: ; preds = %224
br label %255
255: ; preds = %254, %222
br label %256
256: ; preds = %255, %72
br label %257
257: ; preds = %269, %256
%258 = load i8*, i8** %11
%259 = load i8, i8* %258
%260 = zext i8 %259 to i32
%261 = icmp eq i32 %260, 13
br i1 %261, label %267, label %262
262: ; preds = %257
%263 = load i8*, i8** %11
%264 = load i8, i8* %263
%265 = zext i8 %264 to i32
%266 = icmp eq i32 %265, 10
br label %267
267: ; preds = %262, %257
%268 = phi i1 [ true, %257 ], [ %266, %262 ]
br i1 %268, label %269, label %275
269: ; preds = %267
%270 = load i8*, i8** %11
%271 = getelementptr inbounds i8, i8* %270, i32 1
store i8* %271, i8** %11
%272 = load i8, i8* %270
%273 = load i32*, i32** %7
%274 = call i32 @putc(i8 signext %272, i32* %273)
br label %257
275: ; preds = %267
%276 = load i8*, i8** %11
store i8* %276, i8** %13
br label %35
277: ; preds = %35
%278 = load i32*, i32** %7
%279 = call i32 @putc(i8 signext 10, i32* %278)
br label %280
280: ; preds = %277, %30, %23
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"(%s, %s = %zu)\0A\00"
@.str.1 = [17 x i8] c"file is too long\00"
@.str.2 = [5 x i8] c"size\00"
@.str.3 = [6 x i8] c"(%s)\0A\00"
@.str.4 = [16 x i8] c"file is missing\00"
@.str.5 = [16 x i8] c"(%s, %s = %td)\0A\00"
@.str.6 = [17 x i8] c"line is too long\00"
define void @html_print_by_line(i32* nocapture %0, i32 %1, i32 %2, i32 %3, i8* %4, i64 %5) {
%7 = icmp sgt i32 %2, 0
%8 = sext i32 %2 to i64
%9 = icmp ult i64 %8, %5
%10 = and i1 %7, %9
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %5)
br label %121
13: ; preds = %6
%14 = icmp eq i8* %4, null
br i1 %14, label %15, label %17
15: ; preds = %13
%16 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %121
17: ; preds = %13
%18 = tail call i8** (...) @html_get_armor_table()
%19 = load i8, i8* %4
%20 = icmp eq i8 %19, 0
br i1 %20, label %119, label %21
21: ; preds = %17
%22 = icmp sgt i32 %3, 0
%23 = zext i32 %3 to i64
%24 = icmp eq i32 %1, 0
br label %25
25: ; preds = %113, %21
%26 = phi i8 [ %19, %21 ], [ %115, %113 ]
%27 = phi i8* [ %4, %21 ], [ %114, %113 ]
br label %28
28: ; preds = %25, %31
%29 = phi i8 [ %33, %31 ], [ %26, %25 ]
%30 = phi i8* [ %32, %31 ], [ %27, %25 ]
switch i8 %29, label %31 [
i8 0, label %34
i8 13, label %34
i8 10, label %34
]
31: ; preds = %28
%32 = getelementptr inbounds i8, i8* %30, i64 1
%33 = load i8, i8* %32
br label %28
34: ; preds = %28, %28, %28
br i1 %22, label %35, label %43
35: ; preds = %34
%36 = ptrtoint i8* %30 to i64
%37 = ptrtoint i8* %27 to i64
%38 = sub i64 %36, %37
%39 = icmp sgt i64 %38, %23
br i1 %39, label %40, label %43
40: ; preds = %35
%41 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %38)
br label %42
42: ; preds = %92, %108, %45, %46, %40
br label %113
43: ; preds = %35, %34
%44 = icmp eq i8* %27, %30
br i1 %24, label %46, label %45
45: ; preds = %43
br i1 %44, label %42, label %47
46: ; preds = %43
br i1 %44, label %42, label %97
47: ; preds = %45, %95
%48 = phi i8 [ %96, %95 ], [ %26, %45 ]
%49 = phi i8* [ %93, %95 ], [ %27, %45 ]
%50 = icmp sgt i8 %48, -1
br i1 %50, label %51, label %61
51: ; preds = %47
%52 = zext i8 %48 to i64
%53 = getelementptr inbounds i8*, i8** %18, i64 %52
%54 = load i8*, i8** %53
%55 = icmp eq i8* %54, null
%56 = getelementptr inbounds i8, i8* %49, i64 1
br i1 %55, label %59, label %57
57: ; preds = %51
%58 = tail call i32 @fputs(i8* %54, i32* %0)
br label %92
59: ; preds = %51
%60 = tail call i32 @putc(i8 signext %48, i32* %0)
br label %92
61: ; preds = %47
%62 = icmp ult i8 %48, -64
br i1 %62, label %63, label %66
63: ; preds = %61
%64 = tail call i32 @putc(i8 signext 63, i32* %0)
%65 = getelementptr inbounds i8, i8* %49, i64 1
br label %92
66: ; preds = %61
%67 = icmp ult i8 %48, -62
br i1 %67, label %68, label %71
68: ; preds = %66
%69 = tail call i32 @putc(i8 signext 63, i32* %0)
%70 = getelementptr inbounds i8, i8* %49, i64 1
br label %92
71: ; preds = %66
%72 = icmp ult i8 %48, -32
br i1 %72, label %73, label %89
73: ; preds = %71
%74 = getelementptr inbounds i8, i8* %49, i64 1
%75 = icmp ult i8* %74, %30
br i1 %75, label %76, label %87
76: ; preds = %73
%77 = load i8, i8* %74
%78 = icmp sgt i8 %77, -65
%79 = and i8 %48, 30
%80 = icmp eq i8 %79, 0
%81 = select i1 %78, i1 true, i1 %80
br i1 %81, label %87, label %82
82: ; preds = %76
%83 = tail call i32 @putc(i8 signext %48, i32* %0)
%84 = getelementptr inbounds i8, i8* %49, i64 2
%85 = load i8, i8* %74
%86 = tail call i32 @putc(i8 signext %85, i32* %0)
br label %92
87: ; preds = %76, %73
%88 = tail call i32 @putc(i8 signext 63, i32* %0)
br label %92
89: ; preds = %71
%90 = tail call i32 @putc(i8 signext 63, i32* %0)
%91 = getelementptr inbounds i8, i8* %49, i64 1
br label %92
92: ; preds = %89, %63, %87, %82, %68, %57, %59
%93 = phi i8* [ %56, %57 ], [ %56, %59 ], [ %65, %63 ], [ %70, %68 ], [ %84, %82 ], [ %74, %87 ], [ %91, %89 ]
%94 = icmp eq i8* %93, %30
br i1 %94, label %42, label %95
95: ; preds = %92
%96 = load i8, i8* %93
br label %47
97: ; preds = %46, %111
%98 = phi i8 [ %112, %111 ], [ %26, %46 ]
%99 = phi i8* [ %109, %111 ], [ %27, %46 ]
%100 = zext i8 %98 to i64
%101 = getelementptr inbounds i8*, i8** %18, i64 %100
%102 = load i8*, i8** %101
%103 = icmp eq i8* %102, null
br i1 %103, label %106, label %104
104: ; preds = %97
%105 = tail call i32 @fputs(i8* %102, i32* %0)
br label %108
106: ; preds = %97
%107 = tail call i32 @putc(i8 signext %98, i32* %0)
br label %108
108: ; preds = %106, %104
%109 = getelementptr inbounds i8, i8* %99, i64 1
%110 = icmp eq i8* %109, %30
br i1 %110, label %42, label %111
111: ; preds = %108
%112 = load i8, i8* %109
br label %97
113: ; preds = %42, %116
%114 = phi i8* [ %117, %116 ], [ %30, %42 ]
%115 = load i8, i8* %114
switch i8 %115, label %25 [
i8 13, label %116
i8 10, label %116
i8 0, label %119
]
116: ; preds = %113, %113
%117 = getelementptr inbounds i8, i8* %114, i64 1
%118 = tail call i32 @putc(i8 signext %115, i32* %0)
br label %113
119: ; preds = %113, %17
%120 = tail call i32 @putc(i8 signext 10, i32* %0)
br label %121
121: ; preds = %119, %15, %11
ret void
}