#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 */
char EOF;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
char getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ *stdin;
void procesarArchivo(const char *separador, int primeraLinea, int incremento,
                     int numerarVacias, int cantidadVaciasJuntas,
                     char *archivo) {
  FILE *entrada = NULL;
  if (cantidadVaciasJuntas == 0)
    cantidadVaciasJuntas = 1;
  if (primeraLinea == 0)
    primeraLinea = 1;
  if (incremento == 0)
    incremento = 1;
  if (archivo == NULL) {
    entrada = stdin;
  } else {
    entrada = fopen(archivo, "r");
  }
  char c;
  int imprimioPrimerLinea = 0;
  int lineaActual = primeraLinea;
  int lineaVacia = 0;
  int lineasVaciasAcumuladas = 0;
  while ((c = getc(entrada)) != EOF) {
    if (imprimioPrimerLinea == 0) {
      imprimioPrimerLinea = 1;
      printf("%i%s ", lineaActual, separador);
    }
    if (c == '\n') {
      if (numerarVacias == 1) {
        if (lineaVacia == 1) {
          if (lineasVaciasAcumuladas == cantidadVaciasJuntas) {
            printf("%i%s ", lineaActual, separador);
            printf("\n");
            lineaActual = lineaActual + incremento;
            lineasVaciasAcumuladas = 1;
          } else {
            lineasVaciasAcumuladas++;
          }
        } else {
          if (lineasVaciasAcumuladas == cantidadVaciasJuntas) {
            printf("\n");
            lineaActual = lineaActual + incremento;
            lineaVacia = 1;
            lineasVaciasAcumuladas = 1;
          } else {
            lineasVaciasAcumuladas++;
            if (lineasVaciasAcumuladas == 1) {
              printf("\n");
              lineaVacia = 1;
              lineaActual = lineaActual + incremento;
            }
          }
        }
      } else {
        if (lineasVaciasAcumuladas == cantidadVaciasJuntas) {
          printf("\n");
          if (lineaVacia == 0)
            lineaActual = lineaActual + incremento;
          lineaVacia = 1;
          lineasVaciasAcumuladas = 1;
        } else {
          lineasVaciasAcumuladas++;
          if (lineasVaciasAcumuladas == 1) {
            printf("\n");
            lineaVacia = 1;
            lineaActual = lineaActual + incremento;
          }
        }
      }
    } else {
      if (lineasVaciasAcumuladas > 1) {
        if (numerarVacias == 1) {
          int i = 1;
          for (i = 1; i < lineasVaciasAcumuladas; i++) {
            printf("%i%s \n", lineaActual, separador);
            lineaActual = lineaActual + incremento;
          }
          lineasVaciasAcumuladas = 0;
        } else {
          int i = 1;
          for (i = 1; i < lineasVaciasAcumuladas; i++) {
            printf("\n");
            lineaVacia = 1;
          }
          lineasVaciasAcumuladas = 0;
        }
      }
      if (lineaVacia == 1) {
        lineaVacia = 0;
        printf("%i%s ", lineaActual, separador);
        lineasVaciasAcumuladas = 0;
      }
      printf("%c", c);
    }
  }
  fclose(entrada);
}


x86 assembly (clang, -O0):
<procesarArchivo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1176 <procesarArchivo+0x36>
movl   $0x1,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1187 <procesarArchivo+0x47>
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1198 <procesarArchivo+0x58>
movl   $0x1,-0x10(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11b6 <procesarArchivo+0x76>
mov    0x2e3e(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
jmp    11ca <procesarArchivo+0x8a>
mov    -0x20(%rbp),%rdi
lea    0xe3f(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x28(%rbp),%rdi
call   1060 <getc@plt>
mov    %al,-0x29(%rbp)
movsbl %al,%eax
mov    0x2de5(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1488 <procesarArchivo+0x348>
cmpl   $0x0,-0x30(%rbp)
jne    122c <procesarArchivo+0xec>
movl   $0x1,-0x30(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    0xddd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsbl -0x29(%rbp),%eax
cmp    $0xa,%eax
jne    1395 <procesarArchivo+0x255>
cmpl   $0x1,-0x14(%rbp)
jne    1315 <procesarArchivo+0x1d5>
cmpl   $0x1,-0x38(%rbp)
jne    129f <procesarArchivo+0x15f>
mov    -0x3c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    1291 <procesarArchivo+0x151>
mov    -0x34(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    0xd9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd98(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x34(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x3c(%rbp)
jmp    129a <procesarArchivo+0x15a>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1310 <procesarArchivo+0x1d0>
mov    -0x3c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    12d5 <procesarArchivo+0x195>
lea    0xd5b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x34(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
movl   $0x1,-0x3c(%rbp)
jmp    130b <procesarArchivo+0x1cb>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x1,-0x3c(%rbp)
jne    1306 <procesarArchivo+0x1c6>
lea    0xd1e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    130b <procesarArchivo+0x1cb>
jmp    1310 <procesarArchivo+0x1d0>
jmp    1390 <procesarArchivo+0x250>
mov    -0x3c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    1355 <procesarArchivo+0x215>
lea    0xce5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x38(%rbp)
jne    1342 <procesarArchivo+0x202>
mov    -0x34(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
movl   $0x1,-0x3c(%rbp)
jmp    138b <procesarArchivo+0x24b>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x1,-0x3c(%rbp)
jne    1386 <procesarArchivo+0x246>
lea    0xc9e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    138b <procesarArchivo+0x24b>
jmp    1390 <procesarArchivo+0x250>
jmp    1483 <procesarArchivo+0x343>
cmpl   $0x1,-0x3c(%rbp)
jle    1444 <procesarArchivo+0x304>
cmpl   $0x1,-0x14(%rbp)
jne    13fb <procesarArchivo+0x2bb>
movl   $0x1,-0x40(%rbp)
movl   $0x1,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    13ef <procesarArchivo+0x2af>
mov    -0x34(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    0xc37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x34(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    13b7 <procesarArchivo+0x277>
movl   $0x0,-0x3c(%rbp)
jmp    143f <procesarArchivo+0x2ff>
movl   $0x1,-0x44(%rbp)
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1438 <procesarArchivo+0x2f8>
lea    0xbf1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1409 <procesarArchivo+0x2c9>
movl   $0x0,-0x3c(%rbp)
jmp    1444 <procesarArchivo+0x304>
cmpl   $0x1,-0x38(%rbp)
jne    1471 <procesarArchivo+0x331>
movl   $0x0,-0x38(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    0xb9f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x3c(%rbp)
movsbl -0x29(%rbp),%esi
lea    0xb93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11e5 <procesarArchivo+0xa5>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<procesarArchivo>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
test   %r8d,%r8d
mov    $0x1,%eax
cmove  %eax,%r8d
mov    %r8d,0x1c(%rsp)
mov    %ecx,%ebx
mov    %esi,%ebp
mov    %rdi,%r15
test   %esi,%esi
cmove  %eax,%ebp
test   %edx,%edx
cmove  %eax,%edx
mov    %edx,0xc(%rsp)
test   %r9,%r9
je     119a <procesarArchivo+0x4a>
lea    0xe70(%rip),%rsi
mov    %r9,%rdi
call   1060 <fopen@plt>
jmp    11a4 <procesarArchivo+0x54>
mov    0x2e47(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x10(%rsp)
mov    %rax,%rdi
call   1070 <getc@plt>
mov    0x2e28(%rip),%rcx
cmp    (%rcx),%al
jne    11d4 <procesarArchivo+0x84>
mov    0x10(%rsp),%rdi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fclose@plt>
mov    $0x1,%dl
lea    0xe2b(%rip),%r12
xor    %r14d,%r14d
xor    %r13d,%r13d
mov    %ebx,0x24(%rsp)
jmp    1234 <procesarArchivo+0xe4>
lea    0xe12(%rip),%rdi
mov    %ebp,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    0xc(%rsp),%ebp
mov    $0x1,%r13d
mov    $0x1,%r14d
mov    0x10(%rsp),%rdi
call   1070 <getc@plt>
xor    %edx,%edx
mov    0x2db7(%rip),%rcx
cmp    (%rcx),%al
lea    0xdd6(%rip),%r12
je     11bc <procesarArchivo+0x6c>
test   $0x1,%dl
je     125d <procesarArchivo+0x10d>
lea    0xdc2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%r12d
mov    %eax,%ebx
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebx,%eax
mov    %r12d,%ebx
lea    0xdab(%rip),%r12
cmp    $0xa,%al
jne    1290 <procesarArchivo+0x140>
cmp    $0x1,%ebx
jne    12e0 <procesarArchivo+0x190>
cmp    $0x1,%r13d
jne    1322 <procesarArchivo+0x1d2>
cmp    0x1c(%rsp),%r14d
je     11e9 <procesarArchivo+0x99>
add    $0x1,%r14d
mov    $0x1,%r13d
jmp    1216 <procesarArchivo+0xc6>
nopw   0x0(%rax,%rax,1)
cmp    $0x2,%r14d
mov    %al,0xb(%rsp)
jl     1310 <procesarArchivo+0x1c0>
cmp    $0x1,%ebx
jne    133c <procesarArchivo+0x1ec>
mov    %r13d,0x20(%rsp)
add    $0xffffffff,%r14d
mov    %r14d,%r13d
mov    0xc(%rsp),%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %r14d,%r14d
mov    %r12,%rdi
mov    %ebp,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
add    %ebx,%ebp
add    $0xffffffff,%r13d
jne    12c0 <procesarArchivo+0x170>
jmp    1315 <procesarArchivo+0x1c5>
nopl   0x0(%rax)
cmp    0x1c(%rsp),%r14d
jne    1378 <procesarArchivo+0x228>
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %r13d,%r13d
mov    $0x0,%eax
cmove  0xc(%rsp),%eax
add    %eax,%ebp
jmp    120a <procesarArchivo+0xba>
nopl   0x0(%rax)
mov    %r13d,0x20(%rsp)
cmpl   $0x1,0x20(%rsp)
mov    0x24(%rsp),%ebx
je     1350 <procesarArchivo+0x200>
jmp    1366 <procesarArchivo+0x216>
cmp    0x1c(%rsp),%r14d
je     11fc <procesarArchivo+0xac>
test   %r14d,%r14d
je     11fc <procesarArchivo+0xac>
add    $0x1,%r14d
jmp    1370 <procesarArchivo+0x220>
add    $0xffffffff,%r14d
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r14d
jne    1340 <procesarArchivo+0x1f0>
xor    %r14d,%r14d
lea    0xca8(%rip),%rdi
mov    %ebp,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0xb(%rsp),%edi
call   1030 <putchar@plt>
xor    %r13d,%r13d
jmp    1216 <procesarArchivo+0xc6>
test   %r14d,%r14d
je     11fc <procesarArchivo+0xac>
add    $0x1,%r14d
jmp    1216 <procesarArchivo+0xc6>

LLVM IR (-O0):
@stdin = global i32* null
@.str = [2 x i8] c"r\00"
@EOF = global i8 0
@.str.1 = [6 x i8] c"%i%s \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [7 x i8] c"%i%s \0A\00"
@.str.4 = [3 x i8] c"%c\00"
define void @procesarArchivo(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32*
%14 = alloca i8
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i8* %5, i8** %12
store i32* null, i32** %13
%21 = load i32, i32* %11
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %6
store i32 1, i32* %11
br label %24
24: ; preds = %23, %6
%25 = load i32, i32* %8
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %24
store i32 1, i32* %8
br label %28
28: ; preds = %27, %24
%29 = load i32, i32* %9
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %28
store i32 1, i32* %9
br label %32
32: ; preds = %31, %28
%33 = load i8*, i8** %12
%34 = icmp eq i8* %33, null
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = load i32*, i32** @stdin
store i32* %36, i32** %13
br label %40
37: ; preds = %32
%38 = load i8*, i8** %12
%39 = call i32* @fopen(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %39, i32** %13
br label %40
40: ; preds = %37, %35
store i32 0, i32* %15
%41 = load i32, i32* %8
store i32 %41, i32* %16
store i32 0, i32* %17
store i32 0, i32* %18
br label %42
42: ; preds = %175, %40
%43 = load i32*, i32** %13
%44 = call signext i8 @getc(i32* %43)
store i8 %44, i8* %14
%45 = sext i8 %44 to i32
%46 = load i8, i8* @EOF
%47 = sext i8 %46 to i32
%48 = icmp ne i32 %45, %47
br i1 %48, label %49, label %176
49: ; preds = %42
%50 = load i32, i32* %15
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %56
52: ; preds = %49
store i32 1, i32* %15
%53 = load i32, i32* %16
%54 = load i8*, i8** %7
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %53, i8* %54)
br label %56
56: ; preds = %52, %49
%57 = load i8, i8* %14
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 10
br i1 %59, label %60, label %130
60: ; preds = %56
%61 = load i32, i32* %10
%62 = icmp eq i32 %61, 1
br i1 %62, label %63, label %104
63: ; preds = %60
%64 = load i32, i32* %17
%65 = icmp eq i32 %64, 1
br i1 %65, label %66, label %82
66: ; preds = %63
%67 = load i32, i32* %18
%68 = load i32, i32* %11
%69 = icmp eq i32 %67, %68
br i1 %69, label %70, label %78
70: ; preds = %66
%71 = load i32, i32* %16
%72 = load i8*, i8** %7
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %71, i8* %72)
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%75 = load i32, i32* %16
%76 = load i32, i32* %9
%77 = add nsw i32 %75, %76
store i32 %77, i32* %16
store i32 1, i32* %18
br label %81
78: ; preds = %66
%79 = load i32, i32* %18
%80 = add nsw i32 %79, 1
store i32 %80, i32* %18
br label %81
81: ; preds = %78, %70
br label %103
82: ; preds = %63
%83 = load i32, i32* %18
%84 = load i32, i32* %11
%85 = icmp eq i32 %83, %84
br i1 %85, label %86, label %91
86: ; preds = %82
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%88 = load i32, i32* %16
%89 = load i32, i32* %9
%90 = add nsw i32 %88, %89
store i32 %90, i32* %16
store i32 1, i32* %17
store i32 1, i32* %18
br label %102
91: ; preds = %82
%92 = load i32, i32* %18
%93 = add nsw i32 %92, 1
store i32 %93, i32* %18
%94 = load i32, i32* %18
%95 = icmp eq i32 %94, 1
br i1 %95, label %96, label %101
96: ; preds = %91
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %17
%98 = load i32, i32* %16
%99 = load i32, i32* %9
%100 = add nsw i32 %98, %99
store i32 %100, i32* %16
br label %101
101: ; preds = %96, %91
br label %102
102: ; preds = %101, %86
br label %103
103: ; preds = %102, %81
br label %129
104: ; preds = %60
%105 = load i32, i32* %18
%106 = load i32, i32* %11
%107 = icmp eq i32 %105, %106
br i1 %107, label %108, label %117
108: ; preds = %104
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%110 = load i32, i32* %17
%111 = icmp eq i32 %110, 0
br i1 %111, label %112, label %116
112: ; preds = %108
%113 = load i32, i32* %16
%114 = load i32, i32* %9
%115 = add nsw i32 %113, %114
store i32 %115, i32* %16
br label %116
116: ; preds = %112, %108
store i32 1, i32* %17
store i32 1, i32* %18
br label %128
117: ; preds = %104
%118 = load i32, i32* %18
%119 = add nsw i32 %118, 1
store i32 %119, i32* %18
%120 = load i32, i32* %18
%121 = icmp eq i32 %120, 1
br i1 %121, label %122, label %127
122: ; preds = %117
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %17
%124 = load i32, i32* %16
%125 = load i32, i32* %9
%126 = add nsw i32 %124, %125
store i32 %126, i32* %16
br label %127
127: ; preds = %122, %117
br label %128
128: ; preds = %127, %116
br label %129
129: ; preds = %128, %103
br label %175
130: ; preds = %56
%131 = load i32, i32* %18
%132 = icmp sgt i32 %131, 1
br i1 %132, label %133, label %164
133: ; preds = %130
%134 = load i32, i32* %10
%135 = icmp eq i32 %134, 1
br i1 %135, label %136, label %152
136: ; preds = %133
store i32 1, i32* %19
store i32 1, i32* %19
br label %137
137: ; preds = %148, %136
%138 = load i32, i32* %19
%139 = load i32, i32* %18
%140 = icmp slt i32 %138, %139
br i1 %140, label %141, label %151
141: ; preds = %137
%142 = load i32, i32* %16
%143 = load i8*, i8** %7
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %142, i8* %143)
%145 = load i32, i32* %16
%146 = load i32, i32* %9
%147 = add nsw i32 %145, %146
store i32 %147, i32* %16
br label %148
148: ; preds = %141
%149 = load i32, i32* %19
%150 = add nsw i32 %149, 1
store i32 %150, i32* %19
br label %137
151: ; preds = %137
store i32 0, i32* %18
br label %163
152: ; preds = %133
store i32 1, i32* %20
store i32 1, i32* %20
br label %153
153: ; preds = %159, %152
%154 = load i32, i32* %20
%155 = load i32, i32* %18
%156 = icmp slt i32 %154, %155
br i1 %156, label %157, label %162
157: ; preds = %153
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %17
br label %159
159: ; preds = %157
%160 = load i32, i32* %20
%161 = add nsw i32 %160, 1
store i32 %161, i32* %20
br label %153
162: ; preds = %153
store i32 0, i32* %18
br label %163
163: ; preds = %162, %151
br label %164
164: ; preds = %163, %130
%165 = load i32, i32* %17
%166 = icmp eq i32 %165, 1
br i1 %166, label %167, label %171
167: ; preds = %164
store i32 0, i32* %17
%168 = load i32, i32* %16
%169 = load i8*, i8** %7
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %168, i8* %169)
store i32 0, i32* %18
br label %171
171: ; preds = %167, %164
%172 = load i8, i8* %14
%173 = sext i8 %172 to i32
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %173)
br label %175
175: ; preds = %171, %129
br label %42
176: ; preds = %42
%177 = load i32*, i32** %13
%178 = call i32 @fclose(i32* %177)
ret void
}

LLVM IR (-O2):
@stdin = global i32* null
@.str = [2 x i8] c"r\00"
@EOF = global i8 0
@.str.1 = [6 x i8] c"%i%s \00"
@.str.3 = [7 x i8] c"%i%s \0A\00"
define void @procesarArchivo(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5) {
%7 = icmp eq i32 %4, 0
%8 = select i1 %7, i32 1, i32 %4
%9 = icmp eq i32 %1, 0
%10 = select i1 %9, i32 1, i32 %1
%11 = icmp eq i32 %2, 0
%12 = select i1 %11, i32 1, i32 %2
%13 = icmp eq i8* %5, null
br i1 %13, label %14, label %16
14: ; preds = %6
%15 = load i32*, i32** @stdin
br label %18
16: ; preds = %6
%17 = tail call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
%19 = phi i32* [ %15, %14 ], [ %17, %16 ]
%20 = tail call signext i8 @getc(i32* %19)
%21 = load i8, i8* @EOF
%22 = icmp eq i8 %20, %21
br i1 %22, label %103, label %23
23: ; preds = %18
%24 = icmp eq i32 %3, 1
br label %25
25: ; preds = %23, %96
%26 = phi i8 [ %20, %23 ], [ %100, %96 ]
%27 = phi i32 [ 0, %23 ], [ %99, %96 ]
%28 = phi i32 [ 0, %23 ], [ %98, %96 ]
%29 = phi i32 [ %10, %23 ], [ %97, %96 ]
%30 = phi i1 [ true, %23 ], [ false, %96 ]
%31 = sext i8 %26 to i32
br i1 %30, label %32, label %34
32: ; preds = %25
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %29, i8* %0)
br label %34
34: ; preds = %32, %25
%35 = icmp eq i8 %26, 10
br i1 %35, label %36, label %70
36: ; preds = %34
br i1 %24, label %37, label %57
37: ; preds = %36
%38 = icmp eq i32 %28, 1
%39 = icmp eq i32 %27, %8
br i1 %38, label %40, label %47
40: ; preds = %37
br i1 %39, label %41, label %45
41: ; preds = %40
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %29, i8* %0)
%43 = tail call i32 @putchar(i32 10)
%44 = add nsw i32 %29, %12
br label %96
45: ; preds = %40
%46 = add nsw i32 %27, 1
br label %96
47: ; preds = %37
br i1 %39, label %48, label %51
48: ; preds = %47
%49 = tail call i32 @putchar(i32 10)
%50 = add nsw i32 %29, %12
br label %96
51: ; preds = %47
%52 = add nsw i32 %27, 1
%53 = icmp eq i32 %27, 0
br i1 %53, label %54, label %96
54: ; preds = %51
%55 = tail call i32 @putchar(i32 10)
%56 = add nsw i32 %29, %12
br label %96
57: ; preds = %36
%58 = icmp eq i32 %27, %8
br i1 %58, label %59, label %64
59: ; preds = %57
%60 = tail call i32 @putchar(i32 10)
%61 = icmp eq i32 %28, 0
%62 = select i1 %61, i32 %12, i32 0
%63 = add nsw i32 %62, %29
br label %96
64: ; preds = %57
%65 = add nsw i32 %27, 1
%66 = icmp eq i32 %27, 0
br i1 %66, label %67, label %96
67: ; preds = %64
%68 = tail call i32 @putchar(i32 10)
%69 = add nsw i32 %29, %12
br label %96
70: ; preds = %34
%71 = icmp sgt i32 %27, 1
br i1 %71, label %72, label %85
72: ; preds = %70
br i1 %24, label %73, label %80
73: ; preds = %72, %73
%74 = phi i32 [ %78, %73 ], [ 1, %72 ]
%75 = phi i32 [ %77, %73 ], [ %29, %72 ]
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %75, i8* %0)
%77 = add nsw i32 %75, %12
%78 = add nuw nsw i32 %74, 1
%79 = icmp eq i32 %78, %27
br i1 %79, label %85, label %73
80: ; preds = %72, %80
%81 = phi i32 [ %83, %80 ], [ 1, %72 ]
%82 = tail call i32 @putchar(i32 10)
%83 = add nuw nsw i32 %81, 1
%84 = icmp eq i32 %83, %27
br i1 %84, label %89, label %80
85: ; preds = %73, %70
%86 = phi i32 [ %29, %70 ], [ %77, %73 ]
%87 = phi i32 [ %27, %70 ], [ 0, %73 ]
%88 = icmp eq i32 %28, 1
br i1 %88, label %89, label %92
89: ; preds = %80, %85
%90 = phi i32 [ %86, %85 ], [ %29, %80 ]
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %90, i8* %0)
br label %92
92: ; preds = %89, %85
%93 = phi i32 [ %90, %89 ], [ %86, %85 ]
%94 = phi i32 [ 0, %89 ], [ %87, %85 ]
%95 = tail call i32 @putchar(i32 %31)
br label %96
96: ; preds = %48, %54, %51, %41, %45, %64, %67, %59, %92
%97 = phi i32 [ %44, %41 ], [ %29, %45 ], [ %50, %48 ], [ %56, %54 ], [ %29, %51 ], [ %63, %59 ], [ %69, %67 ], [ %29, %64 ], [ %93, %92 ]
%98 = phi i32 [ 1, %41 ], [ 1, %45 ], [ 1, %48 ], [ 1, %54 ], [ 0, %51 ], [ 1, %59 ], [ 1, %67 ], [ %28, %64 ], [ 0, %92 ]
%99 = phi i32 [ 1, %41 ], [ %46, %45 ], [ 1, %48 ], [ 1, %54 ], [ %52, %51 ], [ 1, %59 ], [ 1, %67 ], [ %65, %64 ], [ %94, %92 ]
%100 = tail call signext i8 @getc(i32* %19)
%101 = load i8, i8* @EOF
%102 = icmp eq i8 %100, %101
br i1 %102, label %103, label %25
103: ; preds = %96, %18
%104 = tail call i32 @fclose(i32* %19)
ret void
}