#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*/ SEEK_SET;
int atoi(char *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
void Line_Printing_After_Matching(char *str, char *search, FILE *fp,
                                  char *NUM) {
  int count1 = 0, count2 = 0, i, j, flag, count = 0, z = 0, y = 0, x,
      count_of_lines, a = 0, line_numbar = 1, b;
  long ab;
  count_of_lines = atoi(NUM);
  ab = ftell(fp);
  while (fgets(str, 180, fp))
    y++;
  long line_pointer[y + 1];
  line_pointer[0] = ab;
  y = 1;
  fseek(fp, line_pointer[0], SEEK_SET);
  while (fgets(str, 180, fp)) {
    line_pointer[y] = ftell(fp);
    y++;
  }
  fseek(fp, line_pointer[0], SEEK_SET);
  while (fgets(str, 180, fp)) {
    count1 = 0;
    count = 0;
    while (str[count1] != '\0')
      count1++;
    count2 = 0;
    while (search[count2] != '\0')
      count2++;
    for (i = 0; i <= count1 - count2; i++) {
      for (j = i; j < i + count2; j++) {
        flag = 1;
        if (str[j] != search[j - i]) {
          flag = 0;
          break;
        }
      }
      if (flag == 1)
        count++;
    }
    if (count != 0) {
      z = 0;
      while (str[z] != '\0') {
        if (str[z] != search[0]) {
          printf("%c", str[z]);
        } else {
          for (i = z; i < z + 1; i++) {
            for (j = i; j <= i + count2 - 1; j++) {
              flag = 1;
              if (str[j] != search[j - i]) {
                flag = 0;
                break;
              }
            }
          }
          if (flag == 1) {
            x = z;
            while (z != (x + count2)) {
              printf("\x1b[31m"
                     "\033[1m"
                     "%c"
                     "\x1b[0m",
                     str[z]);
              z++;
            }
            z--;
          } else
            printf("%c", str[z]);
        }
        z++;
      }
      if (count_of_lines != 0) {
        for (a = 1; a < count_of_lines + 1; a++) {
          fgets(str, 180, fp);
          count1 = 0;
          count = 0;
          while (str[count1] != '\0')
            count1++;
          count2 = 0;
          while (search[count2] != '\0')
            count2++;
          for (i = 0; i <= count1 - count2; i++) {
            for (j = i; j < i + count2; j++) {
              flag = 1;
              if (str[j] != search[j - i]) {
                flag = 0;
                break;
              }
            }
            if (flag == 1)
              count++;
          }
          if (count != 0) {
            fseek(fp, line_pointer[line_numbar], SEEK_SET);
            for (b = 0; b < (a - 1); b++) {
              fgets(str, 180, fp);
              i = 0;
              while (str[i] != '\0') {
                printf("%c", str[i]);
                i++;
              }
            }
            line_numbar = line_numbar + a - 1;
            printf("\x1b[36m"
                   "\n"
                   "\x1b[0m");
            break;
          }
        }
        if (count == 0) {
          fseek(fp, line_pointer[line_numbar], SEEK_SET);
          for (a = 0; a < count_of_lines; a++) {
            fgets(str, 80, fp);
            i = 0;
            while (str[i] != '\0') {
              printf("%c", str[i]);
              i++;
            }
          }
          line_numbar = line_numbar + count_of_lines;
          printf("\x1b[36m"
                 "--\n"
                 "\x1b[0m");
        }
      }
    }
    line_numbar++;
  }
}


x86 assembly (clang, -O0):
<Line_Printing_After_Matching>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x1,-0x50(%rbp)
mov    -0x20(%rbp),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x48(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <ftell@plt>
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0xb4,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     11df <Line_Printing_After_Matching+0x8f>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11b5 <Line_Printing_After_Matching+0x65>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,%ecx
mov    %rsp,%rax
mov    %rax,-0x68(%rbp)
lea    0xf(,%rcx,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,-0x78(%rbp)
mov    %rax,%rsp
mov    %rcx,-0x70(%rbp)
mov    -0x60(%rbp),%rcx
mov    %rcx,(%rax)
movl   $0x1,-0x40(%rbp)
mov    -0x18(%rbp),%rdi
mov    (%rax),%rsi
mov    0x2db9(%rip),%rax
mov    (%rax),%edx
call   1060 <fseek@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0xb4,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     1270 <Line_Printing_After_Matching+0x120>
mov    -0x18(%rbp),%rdi
call   1050 <ftell@plt>
mov    %rax,%rdx
mov    -0x78(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    122e <Line_Printing_After_Matching+0xde>
mov    -0x78(%rbp),%rax
mov    -0x18(%rbp),%rdi
mov    (%rax),%rsi
mov    0x2d5e(%rip),%rax
mov    (%rax),%edx
call   1060 <fseek@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0xb4,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     17f0 <Line_Printing_After_Matching+0x6a0>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     12d6 <Line_Printing_After_Matching+0x186>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12b3 <Line_Printing_After_Matching+0x163>
movl   $0x0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1300 <Line_Printing_After_Matching+0x1b0>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12dd <Line_Printing_After_Matching+0x18d>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    -0x28(%rbp),%ecx
cmp    %ecx,%eax
jg     13a0 <Line_Printing_After_Matching+0x250>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    -0x28(%rbp),%ecx
cmp    %ecx,%eax
jge    137a <Line_Printing_After_Matching+0x22a>
movl   $0x1,-0x34(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
mov    -0x30(%rbp),%edx
sub    -0x2c(%rbp),%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1367 <Line_Printing_After_Matching+0x217>
movl   $0x0,-0x34(%rbp)
jmp    137a <Line_Printing_After_Matching+0x22a>
jmp    136c <Line_Printing_After_Matching+0x21c>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    131e <Line_Printing_After_Matching+0x1ce>
cmpl   $0x1,-0x34(%rbp)
jne    138d <Line_Printing_After_Matching+0x23d>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1392 <Line_Printing_After_Matching+0x242>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1307 <Line_Printing_After_Matching+0x1b7>
cmpl   $0x0,-0x38(%rbp)
je     17e2 <Line_Printing_After_Matching+0x692>
movl   $0x0,-0x3c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1513 <Line_Printing_After_Matching+0x3c3>
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1400 <Line_Printing_After_Matching+0x2b0>
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xc0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1505 <Line_Printing_After_Matching+0x3b5>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    148f <Line_Printing_After_Matching+0x33f>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    -0x28(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     147c <Line_Printing_After_Matching+0x32c>
movl   $0x1,-0x34(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
mov    -0x30(%rbp),%edx
sub    -0x2c(%rbp),%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1469 <Line_Printing_After_Matching+0x319>
movl   $0x0,-0x34(%rbp)
jmp    147c <Line_Printing_After_Matching+0x32c>
jmp    146e <Line_Printing_After_Matching+0x31e>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    141d <Line_Printing_After_Matching+0x2cd>
jmp    1481 <Line_Printing_After_Matching+0x331>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1406 <Line_Printing_After_Matching+0x2b6>
cmpl   $0x1,-0x34(%rbp)
jne    14e6 <Line_Printing_After_Matching+0x396>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x44(%rbp),%ecx
add    -0x28(%rbp),%ecx
cmp    %ecx,%eax
je     14d8 <Line_Printing_After_Matching+0x388>
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xb40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    149f <Line_Printing_After_Matching+0x34f>
mov    -0x3c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x3c(%rbp)
jmp    1500 <Line_Printing_After_Matching+0x3b0>
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xb07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1505 <Line_Printing_After_Matching+0x3b5>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    13b1 <Line_Printing_After_Matching+0x261>
cmpl   $0x0,-0x48(%rbp)
je     17dd <Line_Printing_After_Matching+0x68d>
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    171d <Line_Printing_After_Matching+0x5cd>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0xb4,%esi
call   1040 <fgets@plt>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1578 <Line_Printing_After_Matching+0x428>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1555 <Line_Printing_After_Matching+0x405>
movl   $0x0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     15a2 <Line_Printing_After_Matching+0x452>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    157f <Line_Printing_After_Matching+0x42f>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    -0x28(%rbp),%ecx
cmp    %ecx,%eax
jg     1642 <Line_Printing_After_Matching+0x4f2>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    -0x28(%rbp),%ecx
cmp    %ecx,%eax
jge    161c <Line_Printing_After_Matching+0x4cc>
movl   $0x1,-0x34(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
mov    -0x30(%rbp),%edx
sub    -0x2c(%rbp),%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1609 <Line_Printing_After_Matching+0x4b9>
movl   $0x0,-0x34(%rbp)
jmp    161c <Line_Printing_After_Matching+0x4cc>
jmp    160e <Line_Printing_After_Matching+0x4be>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    15c0 <Line_Printing_After_Matching+0x470>
cmpl   $0x1,-0x34(%rbp)
jne    162f <Line_Printing_After_Matching+0x4df>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1634 <Line_Printing_After_Matching+0x4e4>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    15a9 <Line_Printing_After_Matching+0x459>
cmpl   $0x0,-0x38(%rbp)
je     170a <Line_Printing_After_Matching+0x5ba>
mov    -0x78(%rbp),%rax
mov    -0x18(%rbp),%rdi
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    0x297d(%rip),%rax
mov    (%rax),%edx
call   1060 <fseek@plt>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    16eb <Line_Printing_After_Matching+0x59b>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0xb4,%esi
call   1040 <fgets@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     16d8 <Line_Printing_After_Matching+0x588>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0x93d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    169b <Line_Printing_After_Matching+0x54b>
jmp    16dd <Line_Printing_After_Matching+0x58d>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1671 <Line_Printing_After_Matching+0x521>
mov    -0x50(%rbp),%eax
add    -0x4c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x50(%rbp)
lea    0x915(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    171d <Line_Printing_After_Matching+0x5cd>
jmp    170f <Line_Printing_After_Matching+0x5bf>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1524 <Line_Printing_After_Matching+0x3d4>
cmpl   $0x0,-0x38(%rbp)
jne    17d8 <Line_Printing_After_Matching+0x688>
mov    -0x78(%rbp),%rax
mov    -0x18(%rbp),%rdi
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    0x28a2(%rip),%rax
mov    (%rax),%edx
call   1060 <fseek@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    17c1 <Line_Printing_After_Matching+0x671>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x50,%esi
call   1040 <fgets@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     17ae <Line_Printing_After_Matching+0x65e>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0x867(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1771 <Line_Printing_After_Matching+0x621>
jmp    17b3 <Line_Printing_After_Matching+0x663>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    174c <Line_Printing_After_Matching+0x5fc>
mov    -0x50(%rbp),%eax
add    -0x48(%rbp),%eax
mov    %eax,-0x50(%rbp)
lea    0x84d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    17dd <Line_Printing_After_Matching+0x68d>
jmp    17e2 <Line_Printing_After_Matching+0x692>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1289 <Line_Printing_After_Matching+0x139>
mov    -0x68(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Line_Printing_After_Matching>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
mov    %rcx,%rdi
call   1080 <atoi@plt>
mov    %eax,-0x30(%rbp)
mov    %r15,%rdi
call   1060 <ftell@plt>
mov    %rax,%r13
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
mov    $0xb4,%esi
mov    %r15,%rdx
call   1050 <fgets@plt>
add    $0x1,%r14
test   %rax,%rax
jne    11a0 <Line_Printing_After_Matching+0x40>
mov    %rsp,%rax
lea    0xf(,%r14,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rax,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x58(%rbp)
mov    %rdx,%rsp
neg    %rcx
mov    %r13,(%rax,%rcx,1)
mov    0x2dfd(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    %r13,%rsi
call   1070 <fseek@plt>
mov    %rbx,%rdi
mov    $0xb4,%esi
mov    %r15,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
je     1234 <Line_Printing_After_Matching+0xd4>
mov    -0x58(%rbp),%rax
lea    0x8(%rax),%r14
nopl   (%rax)
mov    %r15,%rdi
call   1060 <ftell@plt>
mov    %rax,(%r14)
mov    %rbx,%rdi
mov    $0xb4,%esi
mov    %r15,%rdx
call   1050 <fgets@plt>
add    $0x8,%r14
test   %rax,%rax
jne    1210 <Line_Printing_After_Matching+0xb0>
mov    0x2da5(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    %r13,%rsi
call   1070 <fseek@plt>
mov    %rbx,%rdi
mov    $0xb4,%esi
mov    %r15,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
mov    -0x30(%rbp),%r13d
je     16f7 <Line_Printing_After_Matching+0x597>
mov    %rbx,%r10
lea    0x1(%rbx),%rax
mov    %rax,-0x60(%rbp)
mov    $0x1,%ebx
movabs $0x100000000,%rax
mov    %r15,-0x48(%rbp)
mov    %r10,-0x38(%rbp)
jmp    12b9 <Line_Printing_After_Matching+0x159>
mov    %ebx,-0x40(%rbp)
mov    -0x2c(%rbp),%ebx
add    $0x1,%ebx
mov    %r10,%rdi
mov    $0xb4,%esi
mov    %r15,%rdx
call   1050 <fgets@plt>
mov    -0x38(%rbp),%r10
test   %rax,%rax
movabs $0x100000000,%rax
je     16f7 <Line_Printing_After_Matching+0x597>
mov    %ebx,-0x2c(%rbp)
xor    %r9d,%r9d
nop
mov    %r9,%rcx
add    $0x1,%r9
cmpb   $0x0,(%r10,%rcx,1)
jne    12c0 <Line_Printing_After_Matching+0x160>
mov    $0xffffffffffffffff,%r11
xor    %edx,%edx
movabs $0xffffffff00000000,%r14
ff ff ff
mov    -0x40(%rbp),%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r11,%rsi
mov    %edx,%edi
add    %rax,%r14
cmpb   $0x0,0x1(%r12,%r11,1)
lea    0x1(%r11),%r11
lea    0x1(%rdi),%edx
jne    12f0 <Line_Printing_After_Matching+0x190>
cmp    %r11d,%ecx
jl     128c <Line_Printing_After_Matching+0x12c>
mov    %rdi,-0x50(%rbp)
sub    %r11d,%r9d
xor    %ecx,%ecx
mov    %r10,%rdx
xor    %r8d,%r8d
jmp    1348 <Line_Printing_After_Matching+0x1e8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
cmp    $0x1,%ebx
sete   %al
add    %eax,%r8d
add    $0x1,%rcx
add    $0x1,%rdx
cmp    %r9,%rcx
je     13a0 <Line_Printing_After_Matching+0x240>
test   %r11d,%r11d
je     1330 <Line_Printing_After_Matching+0x1d0>
lea    (%r11,%rcx,1),%edi
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rdx,%rbx,1),%eax
cmp    (%r12,%rbx,1),%al
jne    1390 <Line_Printing_After_Matching+0x230>
lea    (%rcx,%rbx,1),%rsi
add    $0x1,%rsi
add    $0x1,%rbx
cmp    %rdi,%rsi
jb     1360 <Line_Printing_After_Matching+0x200>
mov    $0x1,%ebx
jmp    1330 <Line_Printing_After_Matching+0x1d0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %ebx,%ebx
jmp    133b <Line_Printing_After_Matching+0x1db>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   %r8d,%r8d
je     1289 <Line_Printing_After_Matching+0x129>
mov    (%r10),%al
test   %al,%al
je     14c0 <Line_Printing_After_Matching+0x360>
mov    %r11,-0x40(%rbp)
sar    $0x20,%r14
xor    %r15d,%r15d
mov    -0x50(%rbp),%r8
jmp    13f1 <Line_Printing_After_Matching+0x291>
cs nopw 0x0(%rax,%rax,1)
nop
call   1030 <putchar@plt>
mov    -0x50(%rbp),%r8
mov    -0x38(%rbp),%r10
movslq %r15d,%r15
mov    0x1(%r10,%r15,1),%al
add    $0x1,%r15
test   %al,%al
je     14c0 <Line_Printing_After_Matching+0x360>
movsbl %al,%edi
cmp    (%r12),%dil
jne    13d0 <Line_Printing_After_Matching+0x270>
mov    %r15d,%r9d
mov    -0x40(%rbp),%rsi
test   %esi,%esi
je     147a <Line_Printing_After_Matching+0x31a>
movslq %r15d,%r13
lea    (%r14,%r13,1),%rax
mov    %r12,%rcx
mov    %r13,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%r10,%rdx,1),%ebx
cmp    (%rcx),%bl
jne    14a0 <Line_Printing_After_Matching+0x340>
add    $0x1,%rdx
add    $0x1,%rcx
cmp    %rax,%rdx
jl     1420 <Line_Printing_After_Matching+0x2c0>
test   %esi,%esi
je     147f <Line_Printing_After_Matching+0x31f>
add    %rsi,%r9
mov    %r9,-0x68(%rbp)
add    %r10,%r13
mov    %r8d,%ebx
lea    0xbb2(%rip),%r15
xchg   %ax,%ax
movsbl 0x0(%r13),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r13
add    $0xffffffff,%ebx
jne    1450 <Line_Printing_After_Matching+0x2f0>
mov    -0x68(%rbp),%r15
mov    -0x38(%rbp),%r10
mov    -0x30(%rbp),%r13d
mov    -0x50(%rbp),%r8
jmp    1486 <Line_Printing_After_Matching+0x326>
cmp    $0x1,%ebx
jne    14a0 <Line_Printing_After_Matching+0x340>
mov    %r9d,%r15d
mov    -0x30(%rbp),%r13d
add    $0xffffffff,%r15d
mov    $0x1,%ebx
jmp    13dd <Line_Printing_After_Matching+0x27d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1030 <putchar@plt>
mov    -0x50(%rbp),%r8
mov    -0x38(%rbp),%r10
xor    %ebx,%ebx
mov    -0x30(%rbp),%r13d
jmp    13dd <Line_Printing_After_Matching+0x27d>
nopl   0x0(%rax,%rax,1)
test   %r13d,%r13d
jle    1635 <Line_Printing_After_Matching+0x4d5>
mov    $0x1,%r14d
mov    -0x48(%rbp),%r15
jmp    14f9 <Line_Printing_After_Matching+0x399>
cs nopw 0x0(%rax,%rax,1)
nop
test   %r8d,%r8d
jne    1653 <Line_Printing_After_Matching+0x4f3>
lea    0x1(%r14),%eax
cmp    %r13d,%r14d
mov    %eax,%r14d
je     15b4 <Line_Printing_After_Matching+0x454>
mov    %r10,%rdi
mov    $0xb4,%esi
mov    %r15,%rdx
call   1050 <fgets@plt>
mov    -0x38(%rbp),%r10
xor    %r9d,%r9d
mov    %r9,%rdx
add    $0x1,%r9
cmpb   $0x0,(%r10,%rdx,1)
jne    1510 <Line_Printing_After_Matching+0x3b0>
mov    $0xffffffffffffffff,%rcx
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x0,0x1(%r12,%rcx,1)
lea    0x1(%rcx),%rcx
jne    1530 <Line_Printing_After_Matching+0x3d0>
cmp    %ecx,%edx
jl     14e9 <Line_Printing_After_Matching+0x389>
sub    %ecx,%r9d
xor    %edx,%edx
mov    %r10,%rsi
xor    %r8d,%r8d
jmp    156c <Line_Printing_After_Matching+0x40c>
nopl   (%rax)
xor    %eax,%eax
cmp    $0x1,%ebx
sete   %al
add    %eax,%r8d
add    $0x1,%rdx
add    $0x1,%rsi
cmp    %r9,%rdx
je     14e0 <Line_Printing_After_Matching+0x380>
test   %ecx,%ecx
je     1550 <Line_Printing_After_Matching+0x3f0>
lea    (%rcx,%rdx,1),%ebx
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rdi,1),%eax
cmp    (%r12,%rdi,1),%al
jne    15b0 <Line_Printing_After_Matching+0x450>
lea    (%rdx,%rdi,1),%rax
add    $0x1,%rax
add    $0x1,%rdi
cmp    %rbx,%rax
jb     1580 <Line_Printing_After_Matching+0x420>
mov    $0x1,%ebx
jmp    1550 <Line_Printing_After_Matching+0x3f0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %ebx,%ebx
jmp    155b <Line_Printing_After_Matching+0x3fb>
test   %r13d,%r13d
mov    %ebx,-0x40(%rbp)
jle    128c <Line_Printing_After_Matching+0x12c>
movslq -0x2c(%rbp),%rax
mov    -0x58(%rbp),%rcx
mov    (%rcx,%rax,8),%rsi
mov    0x2a0d(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
call   1070 <fseek@plt>
xor    %r14d,%r14d
jmp    15f9 <Line_Printing_After_Matching+0x499>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r14d
cmp    %r13d,%r14d
je     1641 <Line_Printing_After_Matching+0x4e1>
mov    -0x38(%rbp),%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
mov    %r15,%rdx
call   1050 <fgets@plt>
mov    (%rbx),%al
test   %al,%al
je     15f0 <Line_Printing_After_Matching+0x490>
mov    -0x60(%rbp),%rbx
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1620 <Line_Printing_After_Matching+0x4c0>
jmp    15f0 <Line_Printing_After_Matching+0x490>
mov    %ebx,-0x40(%rbp)
mov    -0x48(%rbp),%r15
jmp    128c <Line_Printing_After_Matching+0x12c>
mov    -0x2c(%rbp),%ebx
add    %r13d,%ebx
lea    0x9cd(%rip),%rdi
jmp    16e7 <Line_Printing_After_Matching+0x587>
mov    %ebx,-0x40(%rbp)
movslq -0x2c(%rbp),%rax
mov    -0x58(%rbp),%rcx
mov    (%rcx,%rax,8),%rsi
mov    0x2977(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
call   1070 <fseek@plt>
lea    -0x1(%r14),%r15d
cmp    $0x2,%r14d
jb     16d5 <Line_Printing_After_Matching+0x575>
xor    %r14d,%r14d
jmp    1699 <Line_Printing_After_Matching+0x539>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r14d
cmp    %r15d,%r14d
je     16d5 <Line_Printing_After_Matching+0x575>
mov    -0x38(%rbp),%rbx
mov    %rbx,%rdi
mov    $0xb4,%esi
mov    -0x48(%rbp),%rdx
call   1050 <fgets@plt>
mov    (%rbx),%al
test   %al,%al
je     1690 <Line_Printing_After_Matching+0x530>
mov    -0x60(%rbp),%rbx
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    16c0 <Line_Printing_After_Matching+0x560>
jmp    1690 <Line_Printing_After_Matching+0x530>
add    -0x2c(%rbp),%r15d
lea    0x930(%rip),%rdi
mov    %r15d,%ebx
mov    -0x48(%rbp),%r15
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x38(%rbp),%r10
jmp    128f <Line_Printing_After_Matching+0x12f>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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